aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2007-07-16 15:40:11 +0000
committerSean Dague2007-07-16 15:40:11 +0000
commit2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch)
treee3f80ad51736cf17e856547b1bcf956010927434
parent*Trunk compiles now (diff)
downloadopensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz
changed to native line ending encoding
-rw-r--r--OpenSim.FxCop14482
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs142
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs82
-rw-r--r--OpenSim/Framework/Communications/IInterRegionCommunications.cs76
-rw-r--r--OpenSim/Framework/Communications/IInventoryServices.cs34
-rw-r--r--OpenSim/Framework/Communications/IUserServices.cs86
-rw-r--r--OpenSim/Framework/Communications/Properties/AssemblyInfo.cs120
-rw-r--r--OpenSim/Framework/Communications/caches/CachedUserInfo.cs154
-rw-r--r--OpenSim/Framework/Communications/caches/InventoryFolder.cs102
-rw-r--r--OpenSim/Framework/Communications/caches/UserProfileCache.cs214
-rw-r--r--OpenSim/Framework/Console/AssemblyInfo.cs112
-rw-r--r--OpenSim/Framework/Console/ConsoleCallbacksBase.cs70
-rw-r--r--OpenSim/Framework/Console/LogBase.cs564
-rw-r--r--OpenSim/Framework/Console/MainLog.cs94
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oGridData.cs324
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oManager.cs326
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oUserData.cs404
-rw-r--r--OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs388
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLManager.cs422
-rw-r--r--OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLGridData.cs574
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs618
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLLogData.cs210
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLManager.cs1212
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs512
-rw-r--r--OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteGridData.cs394
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs412
-rw-r--r--OpenSim/Framework/Data/GridData.cs222
-rw-r--r--OpenSim/Framework/Data/ILogData.cs180
-rw-r--r--OpenSim/Framework/Data/IniConfig.cs192
-rw-r--r--OpenSim/Framework/Data/InventoryData.cs394
-rw-r--r--OpenSim/Framework/Data/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/Data/ReservationData.cs94
-rw-r--r--OpenSim/Framework/Data/SimProfileData.cs384
-rw-r--r--OpenSim/Framework/Data/UserData.cs256
-rw-r--r--OpenSim/Framework/Data/UserProfileData.cs360
-rw-r--r--OpenSim/Framework/General/AgentInventory.cs530
-rw-r--r--OpenSim/Framework/General/AuthenticateSessionBase.cs258
-rw-r--r--OpenSim/Framework/General/BlockingQueue.cs116
-rw-r--r--OpenSim/Framework/General/ClientManager.cs72
-rw-r--r--OpenSim/Framework/General/IRegionCommsListener.cs92
-rw-r--r--OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs86
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs76
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs118
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs106
-rw-r--r--OpenSim/Framework/General/Interfaces/IAssetServer.cs128
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs390
-rw-r--r--OpenSim/Framework/General/Interfaces/ILocalStorage.cs142
-rw-r--r--OpenSim/Framework/General/Interfaces/IUserServer.cs78
-rw-r--r--OpenSim/Framework/General/Interfaces/IWorld.cs84
-rw-r--r--OpenSim/Framework/General/NpcClientBase.cs254
-rw-r--r--OpenSim/Framework/General/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Framework/General/RegionCommsListener.cs206
-rw-r--r--OpenSim/Framework/General/Remoting.cs270
-rw-r--r--OpenSim/Framework/General/Types/AgentCiruitData.cs98
-rw-r--r--OpenSim/Framework/General/Types/AgentWearable.cs114
-rw-r--r--OpenSim/Framework/General/Types/AssetBase.cs92
-rw-r--r--OpenSim/Framework/General/Types/AssetLandmark.cs118
-rw-r--r--OpenSim/Framework/General/Types/AssetStorage.cs94
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs186
-rw-r--r--OpenSim/Framework/General/Types/Login.cs98
-rw-r--r--OpenSim/Framework/General/Types/MapBlockData.cs46
-rw-r--r--OpenSim/Framework/General/Types/NeighbourInfo.cs84
-rw-r--r--OpenSim/Framework/General/Types/NetworkServersInfo.cs438
-rw-r--r--OpenSim/Framework/General/Types/ParcelData.cs240
-rw-r--r--OpenSim/Framework/General/Types/PrimData.cs456
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs218
-rw-r--r--OpenSim/Framework/General/Types/RegionHandle.cs242
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs684
-rw-r--r--OpenSim/Framework/General/Types/UUID.cs254
-rw-r--r--OpenSim/Framework/General/UserProfile.cs174
-rw-r--r--OpenSim/Framework/General/Util.cs368
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs244
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs448
-rw-r--r--OpenSim/Framework/Servers/BaseStreamHandler.cs80
-rw-r--r--OpenSim/Framework/Servers/BinaryStreamHandler.cs98
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs252
-rw-r--r--OpenSim/Framework/Servers/IStreamHandler.cs44
-rw-r--r--OpenSim/Framework/Servers/RestMethod.cs62
-rw-r--r--OpenSim/Framework/Servers/RestStreamHandler.cs62
-rw-r--r--OpenSim/Framework/Servers/UDPServerBase.cs174
-rw-r--r--OpenSim/Framework/Servers/XmlRpcMethod.cs66
-rw-r--r--OpenSim/Framework/UserManager/LoginResponse.cs1286
-rw-r--r--OpenSim/Framework/UserManager/UserManagerBase.cs1262
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs812
-rw-r--r--OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs116
-rw-r--r--OpenSim/Grid/Framework.Manager/GridManagementAgent.cs276
-rw-r--r--OpenSim/Grid/Framework.Manager/GridServerManager.cs186
-rw-r--r--OpenSim/Grid/GridServer.Config/AssemblyInfo.cs112
-rw-r--r--OpenSim/Grid/GridServer.Config/DbGridConfig.cs320
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs1420
-rw-r--r--OpenSim/Grid/GridServer/Main.cs516
-rw-r--r--OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs116
-rw-r--r--OpenSim/Grid/InventoryServer/InventoryManager.cs250
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs174
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs66
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs266
-rw-r--r--OpenSim/Grid/UserServer.Config/AssemblyInfo.cs112
-rw-r--r--OpenSim/Grid/UserServer.Config/DbUserConfig.cs190
-rw-r--r--OpenSim/Grid/UserServer/Main.cs428
-rw-r--r--OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs200
-rw-r--r--OpenSim/Region/Application/Application.cs250
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs992
-rw-r--r--OpenSim/Region/Application/VersionInfo.cs72
-rw-r--r--OpenSim/Region/Caches/AssetCache.cs1338
-rw-r--r--OpenSim/Region/Caches/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Region/Capabilities/Caps.cs626
-rw-r--r--OpenSim/Region/Capabilities/LLSDArray.cs84
-rw-r--r--OpenSim/Region/Capabilities/LLSDAssetUploadComplete.cs88
-rw-r--r--OpenSim/Region/Capabilities/LLSDAssetUploadRequest.cs42
-rw-r--r--OpenSim/Region/Capabilities/LLSDAssetUploadResponse.cs36
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapEvent.cs82
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapsDetails.cs34
-rw-r--r--OpenSim/Region/Capabilities/LLSDEmpty.cs76
-rw-r--r--OpenSim/Region/Capabilities/LLSDHelpers.cs328
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayer.cs92
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs82
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapRequest.cs26
-rw-r--r--OpenSim/Region/Capabilities/LLSDMethod.cs16
-rw-r--r--OpenSim/Region/Capabilities/LLSDStreamHandler.cs84
-rw-r--r--OpenSim/Region/Capabilities/LLSDTest.cs82
-rw-r--r--OpenSim/Region/Capabilities/LLSDType.cs118
-rw-r--r--OpenSim/Region/ClientStack/Assets/InventoryCache.cs676
-rw-r--r--OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs80
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs2360
-rw-r--r--OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs714
-rw-r--r--OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs472
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs1294
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs586
-rw-r--r--OpenSim/Region/ClientStack/ClientViewBase.cs652
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs368
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs236
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs390
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs110
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs412
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs284
-rw-r--r--OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs36
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs862
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs138
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs202
-rw-r--r--OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs66
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs598
-rw-r--r--OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs124
-rw-r--r--OpenSim/Region/Environment/ParcelManager.cs2412
-rw-r--r--OpenSim/Region/Environment/RegionManager.cs58
-rw-r--r--OpenSim/Region/Environment/Scenes/Entity.cs230
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityBase.cs284
-rw-r--r--OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs28
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs1296
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs1236
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1838
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs390
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs164
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs618
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs148
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs170
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs1246
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/CSharpScriptEngine.cs204
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs138
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine/JScriptEngine.cs204
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassInstance.cs90
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassRecord.cs1006
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Heap.cs86
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Logic.cs854
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Methods.cs192
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Return.cs80
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.cs270
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MainMemory.cs90
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MethodMemory.cs92
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Object.cs74
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Stack.cs84
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/StackFrame.cs98
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Thread.cs238
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JavaEngine.cs58
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/OpenSimJVM.cs340
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ArrayReference.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/BaseType.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ObjectReference.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Byte.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Char.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Float.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Int.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/Engine.cs280
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSL_CLRInterface.cs102
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Enums.cs970
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Parser.cs1216
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Struct.cs210
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Script.cs128
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs64
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs116
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs412
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedEvents.cs32
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs214
-rw-r--r--OpenSim/Region/Environment/StorageManager.cs120
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs368
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MySceneObject.cs80
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs194
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs252
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs622
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs266
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs602
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs1068
-rw-r--r--OpenSim/Region/Physics/Manager/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs334
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsManager.cs230
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs220
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsVector.cs110
-rw-r--r--OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs914
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs850
-rw-r--r--OpenSim/Region/Scripting/Properties/AssemblyInfo.cs70
-rw-r--r--OpenSim/Region/Scripting/Script.cs64
-rw-r--r--OpenSim/Region/Scripting/ScriptAccess.cs62
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs222
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs112
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs532
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs76
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs94
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs94
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs120
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs394
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs131
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/Properties/AssemblyInfo.cs70
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs120
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs1906
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs252
-rw-r--r--Prebuild/README460
-rw-r--r--Prebuild/doc/prebuild-example1.xml600
-rw-r--r--Prebuild/doc/prebuild-example2.xml144
-rw-r--r--Prebuild/doc/prebuild-example3.xml226
-rw-r--r--Prebuild/doc/prebuild-example4.xml1430
-rw-r--r--Prebuild/scripts/Clean.bat4
-rw-r--r--Prebuild/scripts/Help.bat2
-rw-r--r--Prebuild/scripts/MonoDevelop.sh4
-rw-r--r--Prebuild/scripts/Prebuild.nsi462
-rw-r--r--Prebuild/scripts/SharpDevelop.bat8
-rw-r--r--Prebuild/scripts/SharpDevelop2.bat8
-rw-r--r--Prebuild/scripts/VS2002.bat8
-rw-r--r--Prebuild/scripts/VS2003.bat8
-rw-r--r--Prebuild/scripts/VS2005.bat8
-rw-r--r--Prebuild/scripts/autotools.bat8
-rw-r--r--Prebuild/scripts/nant.bat8
-rw-r--r--Prebuild/scripts/nant.sh4
-rw-r--r--Prebuild/src/Core/Attributes/DataNodeAttribute.cs162
-rw-r--r--Prebuild/src/Core/Attributes/OptionNodeAttribute.cs160
-rw-r--r--Prebuild/src/Core/Attributes/TargetAttribute.cs160
-rw-r--r--Prebuild/src/Core/FatalException.cs188
-rw-r--r--Prebuild/src/Core/Interfaces/IDataNode.cs112
-rw-r--r--Prebuild/src/Core/Interfaces/ITarget.cs118
-rw-r--r--Prebuild/src/Core/Kernel.cs1514
-rw-r--r--Prebuild/src/Core/Nodes/ConfigurationNode.cs374
-rw-r--r--Prebuild/src/Core/Nodes/DataNode.cs164
-rw-r--r--Prebuild/src/Core/Nodes/ExcludeNode.cs170
-rw-r--r--Prebuild/src/Core/Nodes/FileNode.cs476
-rw-r--r--Prebuild/src/Core/Nodes/FilesNode.cs446
-rw-r--r--Prebuild/src/Core/Nodes/MatchNode.cs598
-rw-r--r--Prebuild/src/Core/Nodes/OptionsNode.cs1310
-rw-r--r--Prebuild/src/Core/Nodes/ProcessNode.cs238
-rw-r--r--Prebuild/src/Core/Nodes/ProjectNode.cs1020
-rw-r--r--Prebuild/src/Core/Nodes/ReferenceNode.cs306
-rw-r--r--Prebuild/src/Core/Nodes/ReferencePathNode.cs216
-rw-r--r--Prebuild/src/Core/Nodes/SolutionNode.cs576
-rw-r--r--Prebuild/src/Core/Parse/IfContext.cs326
-rw-r--r--Prebuild/src/Core/Parse/Preprocessor.cs1038
-rw-r--r--Prebuild/src/Core/Targets/AutotoolsTarget.cs1852
-rw-r--r--Prebuild/src/Core/Targets/DebugTarget.cs204
-rw-r--r--Prebuild/src/Core/Targets/MonoDevelopTarget.cs916
-rw-r--r--Prebuild/src/Core/Targets/NAntTarget.cs1242
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelop2Target.cs180
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelopTarget.cs874
-rw-r--r--Prebuild/src/Core/Targets/VS2002Target.cs192
-rw-r--r--Prebuild/src/Core/Targets/VS2003Target.cs1266
-rw-r--r--Prebuild/src/Core/Targets/VS2005Target.cs1766
-rw-r--r--Prebuild/src/Core/UnknownLanguageException.cs126
-rw-r--r--Prebuild/src/Core/Utilities/CommandLineCollection.cs324
-rw-r--r--Prebuild/src/Core/Utilities/CurrentDirectory.cs178
-rw-r--r--Prebuild/src/Core/Utilities/Helper.cs1322
-rw-r--r--Prebuild/src/Core/Utilities/Log.cs558
-rw-r--r--Prebuild/src/Core/WarningException.cs186
-rw-r--r--Prebuild/src/Prebuild.cs330
-rw-r--r--Prebuild/src/Properties/AssemblyInfo.cs202
-rw-r--r--Prebuild/src/data/dnpb-1.0.xsd364
-rw-r--r--Prebuild/src/data/dnpb-1.1.xsd366
-rw-r--r--Prebuild/src/data/dnpb-1.2.xsd394
-rw-r--r--Prebuild/src/data/dnpb-1.3.xsd410
-rw-r--r--Prebuild/src/data/dnpb-1.4.xsd424
-rw-r--r--Prebuild/src/data/dnpb-1.5.xsd430
-rw-r--r--Prebuild/src/data/prebuild-1.6.xsd462
-rw-r--r--ThirdPartyLicenses/Axiom.txt280
-rw-r--r--ThirdPartyLicenses/Bullet for Xna (ModifiedBulletX).txt36
-rw-r--r--ThirdPartyLicenses/Mono.Xna (MonoXnaCompactMaths).txt42
-rw-r--r--ThirdPartyLicenses/MySQL.txt154
-rw-r--r--ThirdPartyLicenses/ODE.txt24
-rw-r--r--ThirdPartyLicenses/OpenJpeg.txt58
-rw-r--r--ThirdPartyLicenses/libsl.txt44
-rw-r--r--bin/TerrainFilters/demofilter.cs98
-rw-r--r--bin/data/LICENSE-README-IMPORTANT.txt8
-rw-r--r--bin/data/avataranimations.xml18
-rw-r--r--bin/openjpegnet.dll.config10
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX.sln84
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/BulletDebug.cs136
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/AxisSweep3.cs1246
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseNativeTypes.cs136
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphasePair.cs226
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseProxy.cs182
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithm.cs102
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithmConstructionInfo.cs84
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/DispatcherInfo.cs108
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IBroadphase.cs72
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IDispatcher.cs84
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IOverlapCallback.cs66
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/OverlappingPairCache.cs318
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphase.cs256
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphaseProxy.cs92
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/BridgeTriangleRaycastCallback.cs118
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionAlgorithmCreateFunc.cs80
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionDispatcher.cs560
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionObject.cs326
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionPairCallback.cs96
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionWorld.cs716
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CompoundCollisionAlgorithm.cs314
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cs378
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConvexCollisionAlgorithm.cs386
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexTriangleCallback.cs260
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/EmptyAlgorithm.cs104
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ManifoldResult.cs294
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SimulationIslandManager.cs608
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereBoxCollisionAlgorithm.cs540
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereSphereCollisionAlgorithm.cs208
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleCollisionAlgorithm.cs200
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleDetector.cs426
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/UnionFind.cs300
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BUSimplex1to4.cs430
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BoxShape.cs632
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BvhTriangleMeshShape.cs166
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CollisionShape.cs296
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CompoundShape.cs366
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConcaveShape.cs108
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConeShape.cs416
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexHullShape.cs368
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexShape.cs282
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexTriangleMeshShape.cs370
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShape.cs272
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeX.cs200
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeZ.cs200
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/EmptyShape.cs160
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/FilteredCallback.cs110
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/InternalTriangleIndexCallback.cs66
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/LocalSupportVertexCallback.cs116
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MinkowskiSumShape.cs198
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MultiSphereShape.cs308
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/NodeOverlapCallback.cs64
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvh.cs586
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvhNode.cs126
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/PolyhedralConvexShape.cs266
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SphereShape.cs232
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StaticPlaneShape.cs248
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StridingMeshInterface.cs230
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SupportVertexCallback.cs134
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleBuffer.cs160
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleCallback.cs66
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleIndexVertexArray.cs272
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMesh.cs204
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMeshShape.cs320
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleShape.cs374
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ContinuousConvexCollision.cs398
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ConvexCast.cs146
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/DiscreteCollisionDetectorInterface.cs234
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkConvexCast.cs352
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpa.cs1266
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaPenetrationDepthSolver.cs112
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaSolver.cs202
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkPairDetector.cs684
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/IConvexPenetrationDepthSolver.cs84
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ISimplexSolver.cs94
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ManifoldPoint.cs156
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cs492
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PersistentManifold.cs544
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PointCollector.cs128
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/SubsimplexConvexCast.cs284
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/TriangleRaycastCallback.cs230
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/VoronoiSimplexSolver.cs1286
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactConstraint.cs976
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactSolverInfo.cs124
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Generic6DofConstraint.cs880
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/HingeConstraint.cs492
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/IConstraintSolver.cs64
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/JacobianEntry.cs310
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Point2PointConstraint.cs312
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SequentialImpulseConstraintSolver.cs1830
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Solve2LinearConstraint.cs376
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverBody.cs156
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverConstraint.cs154
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/TypedConstraint.cs176
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DiscreteDynamicsWorld.cs1578
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DynamicsWorld.cs118
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/RigidBody.cs894
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/SimpleDynamicsWorld.cs422
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/RaycastVehicle.cs186
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/VehicleRaycaster.cs98
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/WheelInfo.cs1058
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Exceptions/BulletException.cs106
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/IDebugDraw.cs118
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/DefaultMotionState.cs132
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MathHelper.cs1162
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MatrixOperations.cs232
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MotionState.cs88
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/QuadWord.cs176
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Quaternion.cs396
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/TransformUtil.cs204
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector3.cs442
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector4.cs220
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Modified.XnaDevRu.BulletX.csproj334
-rw-r--r--libraries/ModifiedBulletX/ModifiedBulletX/Properties/AssemblyInfo.cs70
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/Matrix.cs1366
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/MonoXnaCompactMaths.csproj100
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/Properties/AssemblyInfo.cs66
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/Quaternion.cs692
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector3.cs1240
-rw-r--r--libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector4.cs1260
-rw-r--r--prebuild.xml2120
-rw-r--r--runprebuild.bat2
-rw-r--r--share/php/generateUserFunction.php90
-rw-r--r--share/regions/config_0.xml6
-rw-r--r--share/regions/config_1.xml6
-rw-r--r--share/regions/config_10.xml6
-rw-r--r--share/regions/config_100.xml6
-rw-r--r--share/regions/config_1000.xml6
-rw-r--r--share/regions/config_1001.xml6
-rw-r--r--share/regions/config_1002.xml6
-rw-r--r--share/regions/config_1003.xml6
-rw-r--r--share/regions/config_1004.xml6
-rw-r--r--share/regions/config_1005.xml6
-rw-r--r--share/regions/config_1006.xml6
-rw-r--r--share/regions/config_1007.xml6
-rw-r--r--share/regions/config_1008.xml6
-rw-r--r--share/regions/config_1009.xml6
-rw-r--r--share/regions/config_101.xml6
-rw-r--r--share/regions/config_1010.xml6
-rw-r--r--share/regions/config_1011.xml6
-rw-r--r--share/regions/config_1012.xml6
-rw-r--r--share/regions/config_1013.xml6
-rw-r--r--share/regions/config_1014.xml6
-rw-r--r--share/regions/config_1015.xml6
-rw-r--r--share/regions/config_1016.xml6
-rw-r--r--share/regions/config_1017.xml6
-rw-r--r--share/regions/config_1018.xml6
-rw-r--r--share/regions/config_1019.xml6
-rw-r--r--share/regions/config_102.xml6
-rw-r--r--share/regions/config_1020.xml6
-rw-r--r--share/regions/config_1021.xml6
-rw-r--r--share/regions/config_1022.xml6
-rw-r--r--share/regions/config_1023.xml6
-rw-r--r--share/regions/config_103.xml6
-rw-r--r--share/regions/config_104.xml6
-rw-r--r--share/regions/config_105.xml6
-rw-r--r--share/regions/config_106.xml6
-rw-r--r--share/regions/config_107.xml6
-rw-r--r--share/regions/config_108.xml6
-rw-r--r--share/regions/config_109.xml6
-rw-r--r--share/regions/config_11.xml6
-rw-r--r--share/regions/config_110.xml6
-rw-r--r--share/regions/config_111.xml6
-rw-r--r--share/regions/config_112.xml6
-rw-r--r--share/regions/config_113.xml6
-rw-r--r--share/regions/config_114.xml6
-rw-r--r--share/regions/config_115.xml6
-rw-r--r--share/regions/config_116.xml6
-rw-r--r--share/regions/config_117.xml6
-rw-r--r--share/regions/config_118.xml6
-rw-r--r--share/regions/config_119.xml6
-rw-r--r--share/regions/config_12.xml6
-rw-r--r--share/regions/config_120.xml6
-rw-r--r--share/regions/config_121.xml6
-rw-r--r--share/regions/config_122.xml6
-rw-r--r--share/regions/config_123.xml6
-rw-r--r--share/regions/config_124.xml6
-rw-r--r--share/regions/config_125.xml6
-rw-r--r--share/regions/config_126.xml6
-rw-r--r--share/regions/config_127.xml6
-rw-r--r--share/regions/config_128.xml6
-rw-r--r--share/regions/config_129.xml6
-rw-r--r--share/regions/config_13.xml6
-rw-r--r--share/regions/config_130.xml6
-rw-r--r--share/regions/config_131.xml6
-rw-r--r--share/regions/config_132.xml6
-rw-r--r--share/regions/config_133.xml6
-rw-r--r--share/regions/config_134.xml6
-rw-r--r--share/regions/config_135.xml6
-rw-r--r--share/regions/config_136.xml6
-rw-r--r--share/regions/config_137.xml6
-rw-r--r--share/regions/config_138.xml6
-rw-r--r--share/regions/config_139.xml6
-rw-r--r--share/regions/config_14.xml6
-rw-r--r--share/regions/config_140.xml6
-rw-r--r--share/regions/config_141.xml6
-rw-r--r--share/regions/config_142.xml6
-rw-r--r--share/regions/config_143.xml6
-rw-r--r--share/regions/config_144.xml6
-rw-r--r--share/regions/config_145.xml6
-rw-r--r--share/regions/config_146.xml6
-rw-r--r--share/regions/config_147.xml6
-rw-r--r--share/regions/config_148.xml6
-rw-r--r--share/regions/config_149.xml6
-rw-r--r--share/regions/config_15.xml6
-rw-r--r--share/regions/config_150.xml6
-rw-r--r--share/regions/config_151.xml6
-rw-r--r--share/regions/config_152.xml6
-rw-r--r--share/regions/config_153.xml6
-rw-r--r--share/regions/config_154.xml6
-rw-r--r--share/regions/config_155.xml6
-rw-r--r--share/regions/config_156.xml6
-rw-r--r--share/regions/config_157.xml6
-rw-r--r--share/regions/config_158.xml6
-rw-r--r--share/regions/config_159.xml6
-rw-r--r--share/regions/config_16.xml6
-rw-r--r--share/regions/config_160.xml6
-rw-r--r--share/regions/config_161.xml6
-rw-r--r--share/regions/config_162.xml6
-rw-r--r--share/regions/config_163.xml6
-rw-r--r--share/regions/config_164.xml6
-rw-r--r--share/regions/config_165.xml6
-rw-r--r--share/regions/config_166.xml6
-rw-r--r--share/regions/config_167.xml6
-rw-r--r--share/regions/config_168.xml6
-rw-r--r--share/regions/config_169.xml6
-rw-r--r--share/regions/config_17.xml6
-rw-r--r--share/regions/config_170.xml6
-rw-r--r--share/regions/config_171.xml6
-rw-r--r--share/regions/config_172.xml6
-rw-r--r--share/regions/config_173.xml6
-rw-r--r--share/regions/config_174.xml6
-rw-r--r--share/regions/config_175.xml6
-rw-r--r--share/regions/config_176.xml6
-rw-r--r--share/regions/config_177.xml6
-rw-r--r--share/regions/config_178.xml6
-rw-r--r--share/regions/config_179.xml6
-rw-r--r--share/regions/config_18.xml6
-rw-r--r--share/regions/config_180.xml6
-rw-r--r--share/regions/config_181.xml6
-rw-r--r--share/regions/config_182.xml6
-rw-r--r--share/regions/config_183.xml6
-rw-r--r--share/regions/config_184.xml6
-rw-r--r--share/regions/config_185.xml6
-rw-r--r--share/regions/config_186.xml6
-rw-r--r--share/regions/config_187.xml6
-rw-r--r--share/regions/config_188.xml6
-rw-r--r--share/regions/config_189.xml6
-rw-r--r--share/regions/config_19.xml6
-rw-r--r--share/regions/config_190.xml6
-rw-r--r--share/regions/config_191.xml6
-rw-r--r--share/regions/config_192.xml6
-rw-r--r--share/regions/config_193.xml6
-rw-r--r--share/regions/config_194.xml6
-rw-r--r--share/regions/config_195.xml6
-rw-r--r--share/regions/config_196.xml6
-rw-r--r--share/regions/config_197.xml6
-rw-r--r--share/regions/config_198.xml6
-rw-r--r--share/regions/config_199.xml6
-rw-r--r--share/regions/config_2.xml6
-rw-r--r--share/regions/config_20.xml6
-rw-r--r--share/regions/config_200.xml6
-rw-r--r--share/regions/config_201.xml6
-rw-r--r--share/regions/config_202.xml6
-rw-r--r--share/regions/config_203.xml6
-rw-r--r--share/regions/config_204.xml6
-rw-r--r--share/regions/config_205.xml6
-rw-r--r--share/regions/config_206.xml6
-rw-r--r--share/regions/config_207.xml6
-rw-r--r--share/regions/config_208.xml6
-rw-r--r--share/regions/config_209.xml6
-rw-r--r--share/regions/config_21.xml6
-rw-r--r--share/regions/config_210.xml6
-rw-r--r--share/regions/config_211.xml6
-rw-r--r--share/regions/config_212.xml6
-rw-r--r--share/regions/config_213.xml6
-rw-r--r--share/regions/config_214.xml6
-rw-r--r--share/regions/config_215.xml6
-rw-r--r--share/regions/config_216.xml6
-rw-r--r--share/regions/config_217.xml6
-rw-r--r--share/regions/config_218.xml6
-rw-r--r--share/regions/config_219.xml6
-rw-r--r--share/regions/config_22.xml6
-rw-r--r--share/regions/config_220.xml6
-rw-r--r--share/regions/config_221.xml6
-rw-r--r--share/regions/config_222.xml6
-rw-r--r--share/regions/config_223.xml6
-rw-r--r--share/regions/config_224.xml6
-rw-r--r--share/regions/config_225.xml6
-rw-r--r--share/regions/config_226.xml6
-rw-r--r--share/regions/config_227.xml6
-rw-r--r--share/regions/config_228.xml6
-rw-r--r--share/regions/config_229.xml6
-rw-r--r--share/regions/config_23.xml6
-rw-r--r--share/regions/config_230.xml6
-rw-r--r--share/regions/config_231.xml6
-rw-r--r--share/regions/config_232.xml6
-rw-r--r--share/regions/config_233.xml6
-rw-r--r--share/regions/config_234.xml6
-rw-r--r--share/regions/config_235.xml6
-rw-r--r--share/regions/config_236.xml6
-rw-r--r--share/regions/config_237.xml6
-rw-r--r--share/regions/config_238.xml6
-rw-r--r--share/regions/config_239.xml6
-rw-r--r--share/regions/config_24.xml6
-rw-r--r--share/regions/config_240.xml6
-rw-r--r--share/regions/config_241.xml6
-rw-r--r--share/regions/config_242.xml6
-rw-r--r--share/regions/config_243.xml6
-rw-r--r--share/regions/config_244.xml6
-rw-r--r--share/regions/config_245.xml6
-rw-r--r--share/regions/config_246.xml6
-rw-r--r--share/regions/config_247.xml6
-rw-r--r--share/regions/config_248.xml6
-rw-r--r--share/regions/config_249.xml6
-rw-r--r--share/regions/config_25.xml6
-rw-r--r--share/regions/config_250.xml6
-rw-r--r--share/regions/config_251.xml6
-rw-r--r--share/regions/config_252.xml6
-rw-r--r--share/regions/config_253.xml6
-rw-r--r--share/regions/config_254.xml6
-rw-r--r--share/regions/config_255.xml6
-rw-r--r--share/regions/config_256.xml6
-rw-r--r--share/regions/config_257.xml6
-rw-r--r--share/regions/config_258.xml6
-rw-r--r--share/regions/config_259.xml6
-rw-r--r--share/regions/config_26.xml6
-rw-r--r--share/regions/config_260.xml6
-rw-r--r--share/regions/config_261.xml6
-rw-r--r--share/regions/config_262.xml6
-rw-r--r--share/regions/config_263.xml6
-rw-r--r--share/regions/config_264.xml6
-rw-r--r--share/regions/config_265.xml6
-rw-r--r--share/regions/config_266.xml6
-rw-r--r--share/regions/config_267.xml6
-rw-r--r--share/regions/config_268.xml6
-rw-r--r--share/regions/config_269.xml6
-rw-r--r--share/regions/config_27.xml6
-rw-r--r--share/regions/config_270.xml6
-rw-r--r--share/regions/config_271.xml6
-rw-r--r--share/regions/config_272.xml6
-rw-r--r--share/regions/config_273.xml6
-rw-r--r--share/regions/config_274.xml6
-rw-r--r--share/regions/config_275.xml6
-rw-r--r--share/regions/config_276.xml6
-rw-r--r--share/regions/config_277.xml6
-rw-r--r--share/regions/config_278.xml6
-rw-r--r--share/regions/config_279.xml6
-rw-r--r--share/regions/config_28.xml6
-rw-r--r--share/regions/config_280.xml6
-rw-r--r--share/regions/config_281.xml6
-rw-r--r--share/regions/config_282.xml6
-rw-r--r--share/regions/config_283.xml6
-rw-r--r--share/regions/config_284.xml6
-rw-r--r--share/regions/config_285.xml6
-rw-r--r--share/regions/config_286.xml6
-rw-r--r--share/regions/config_287.xml6
-rw-r--r--share/regions/config_288.xml6
-rw-r--r--share/regions/config_289.xml6
-rw-r--r--share/regions/config_29.xml6
-rw-r--r--share/regions/config_290.xml6
-rw-r--r--share/regions/config_291.xml6
-rw-r--r--share/regions/config_292.xml6
-rw-r--r--share/regions/config_293.xml6
-rw-r--r--share/regions/config_294.xml6
-rw-r--r--share/regions/config_295.xml6
-rw-r--r--share/regions/config_296.xml6
-rw-r--r--share/regions/config_297.xml6
-rw-r--r--share/regions/config_298.xml6
-rw-r--r--share/regions/config_299.xml6
-rw-r--r--share/regions/config_3.xml6
-rw-r--r--share/regions/config_30.xml6
-rw-r--r--share/regions/config_300.xml6
-rw-r--r--share/regions/config_301.xml6
-rw-r--r--share/regions/config_302.xml6
-rw-r--r--share/regions/config_303.xml6
-rw-r--r--share/regions/config_304.xml6
-rw-r--r--share/regions/config_305.xml6
-rw-r--r--share/regions/config_306.xml6
-rw-r--r--share/regions/config_307.xml6
-rw-r--r--share/regions/config_308.xml6
-rw-r--r--share/regions/config_309.xml6
-rw-r--r--share/regions/config_31.xml6
-rw-r--r--share/regions/config_310.xml6
-rw-r--r--share/regions/config_311.xml6
-rw-r--r--share/regions/config_312.xml6
-rw-r--r--share/regions/config_313.xml6
-rw-r--r--share/regions/config_314.xml6
-rw-r--r--share/regions/config_315.xml6
-rw-r--r--share/regions/config_316.xml6
-rw-r--r--share/regions/config_317.xml6
-rw-r--r--share/regions/config_318.xml6
-rw-r--r--share/regions/config_319.xml6
-rw-r--r--share/regions/config_32.xml6
-rw-r--r--share/regions/config_320.xml6
-rw-r--r--share/regions/config_321.xml6
-rw-r--r--share/regions/config_322.xml6
-rw-r--r--share/regions/config_323.xml6
-rw-r--r--share/regions/config_324.xml6
-rw-r--r--share/regions/config_325.xml6
-rw-r--r--share/regions/config_326.xml6
-rw-r--r--share/regions/config_327.xml6
-rw-r--r--share/regions/config_328.xml6
-rw-r--r--share/regions/config_329.xml6
-rw-r--r--share/regions/config_33.xml6
-rw-r--r--share/regions/config_330.xml6
-rw-r--r--share/regions/config_331.xml6
-rw-r--r--share/regions/config_332.xml6
-rw-r--r--share/regions/config_333.xml6
-rw-r--r--share/regions/config_334.xml6
-rw-r--r--share/regions/config_335.xml6
-rw-r--r--share/regions/config_336.xml6
-rw-r--r--share/regions/config_337.xml6
-rw-r--r--share/regions/config_338.xml6
-rw-r--r--share/regions/config_339.xml6
-rw-r--r--share/regions/config_34.xml6
-rw-r--r--share/regions/config_340.xml6
-rw-r--r--share/regions/config_341.xml6
-rw-r--r--share/regions/config_342.xml6
-rw-r--r--share/regions/config_343.xml6
-rw-r--r--share/regions/config_344.xml6
-rw-r--r--share/regions/config_345.xml6
-rw-r--r--share/regions/config_346.xml6
-rw-r--r--share/regions/config_347.xml6
-rw-r--r--share/regions/config_348.xml6
-rw-r--r--share/regions/config_349.xml6
-rw-r--r--share/regions/config_35.xml6
-rw-r--r--share/regions/config_350.xml6
-rw-r--r--share/regions/config_351.xml6
-rw-r--r--share/regions/config_352.xml6
-rw-r--r--share/regions/config_353.xml6
-rw-r--r--share/regions/config_354.xml6
-rw-r--r--share/regions/config_355.xml6
-rw-r--r--share/regions/config_356.xml6
-rw-r--r--share/regions/config_357.xml6
-rw-r--r--share/regions/config_358.xml6
-rw-r--r--share/regions/config_359.xml6
-rw-r--r--share/regions/config_36.xml6
-rw-r--r--share/regions/config_360.xml6
-rw-r--r--share/regions/config_361.xml6
-rw-r--r--share/regions/config_362.xml6
-rw-r--r--share/regions/config_363.xml6
-rw-r--r--share/regions/config_364.xml6
-rw-r--r--share/regions/config_365.xml6
-rw-r--r--share/regions/config_366.xml6
-rw-r--r--share/regions/config_367.xml6
-rw-r--r--share/regions/config_368.xml6
-rw-r--r--share/regions/config_369.xml6
-rw-r--r--share/regions/config_37.xml6
-rw-r--r--share/regions/config_370.xml6
-rw-r--r--share/regions/config_371.xml6
-rw-r--r--share/regions/config_372.xml6
-rw-r--r--share/regions/config_373.xml6
-rw-r--r--share/regions/config_374.xml6
-rw-r--r--share/regions/config_375.xml6
-rw-r--r--share/regions/config_376.xml6
-rw-r--r--share/regions/config_377.xml6
-rw-r--r--share/regions/config_378.xml6
-rw-r--r--share/regions/config_379.xml6
-rw-r--r--share/regions/config_38.xml6
-rw-r--r--share/regions/config_380.xml6
-rw-r--r--share/regions/config_381.xml6
-rw-r--r--share/regions/config_382.xml6
-rw-r--r--share/regions/config_383.xml6
-rw-r--r--share/regions/config_384.xml6
-rw-r--r--share/regions/config_385.xml6
-rw-r--r--share/regions/config_386.xml6
-rw-r--r--share/regions/config_387.xml6
-rw-r--r--share/regions/config_388.xml6
-rw-r--r--share/regions/config_389.xml6
-rw-r--r--share/regions/config_39.xml6
-rw-r--r--share/regions/config_390.xml6
-rw-r--r--share/regions/config_391.xml6
-rw-r--r--share/regions/config_392.xml6
-rw-r--r--share/regions/config_393.xml6
-rw-r--r--share/regions/config_394.xml6
-rw-r--r--share/regions/config_395.xml6
-rw-r--r--share/regions/config_396.xml6
-rw-r--r--share/regions/config_397.xml6
-rw-r--r--share/regions/config_398.xml6
-rw-r--r--share/regions/config_399.xml6
-rw-r--r--share/regions/config_4.xml6
-rw-r--r--share/regions/config_40.xml6
-rw-r--r--share/regions/config_400.xml6
-rw-r--r--share/regions/config_401.xml6
-rw-r--r--share/regions/config_402.xml6
-rw-r--r--share/regions/config_403.xml6
-rw-r--r--share/regions/config_404.xml6
-rw-r--r--share/regions/config_405.xml6
-rw-r--r--share/regions/config_406.xml6
-rw-r--r--share/regions/config_407.xml6
-rw-r--r--share/regions/config_408.xml6
-rw-r--r--share/regions/config_409.xml6
-rw-r--r--share/regions/config_41.xml6
-rw-r--r--share/regions/config_410.xml6
-rw-r--r--share/regions/config_411.xml6
-rw-r--r--share/regions/config_412.xml6
-rw-r--r--share/regions/config_413.xml6
-rw-r--r--share/regions/config_414.xml6
-rw-r--r--share/regions/config_415.xml6
-rw-r--r--share/regions/config_416.xml6
-rw-r--r--share/regions/config_417.xml6
-rw-r--r--share/regions/config_418.xml6
-rw-r--r--share/regions/config_419.xml6
-rw-r--r--share/regions/config_42.xml6
-rw-r--r--share/regions/config_420.xml6
-rw-r--r--share/regions/config_421.xml6
-rw-r--r--share/regions/config_422.xml6
-rw-r--r--share/regions/config_423.xml6
-rw-r--r--share/regions/config_424.xml6
-rw-r--r--share/regions/config_425.xml6
-rw-r--r--share/regions/config_426.xml6
-rw-r--r--share/regions/config_427.xml6
-rw-r--r--share/regions/config_428.xml6
-rw-r--r--share/regions/config_429.xml6
-rw-r--r--share/regions/config_43.xml6
-rw-r--r--share/regions/config_430.xml6
-rw-r--r--share/regions/config_431.xml6
-rw-r--r--share/regions/config_432.xml6
-rw-r--r--share/regions/config_433.xml6
-rw-r--r--share/regions/config_434.xml6
-rw-r--r--share/regions/config_435.xml6
-rw-r--r--share/regions/config_436.xml6
-rw-r--r--share/regions/config_437.xml6
-rw-r--r--share/regions/config_438.xml6
-rw-r--r--share/regions/config_439.xml6
-rw-r--r--share/regions/config_44.xml6
-rw-r--r--share/regions/config_440.xml6
-rw-r--r--share/regions/config_441.xml6
-rw-r--r--share/regions/config_442.xml6
-rw-r--r--share/regions/config_443.xml6
-rw-r--r--share/regions/config_444.xml6
-rw-r--r--share/regions/config_445.xml6
-rw-r--r--share/regions/config_446.xml6
-rw-r--r--share/regions/config_447.xml6
-rw-r--r--share/regions/config_448.xml6
-rw-r--r--share/regions/config_449.xml6
-rw-r--r--share/regions/config_45.xml6
-rw-r--r--share/regions/config_450.xml6
-rw-r--r--share/regions/config_451.xml6
-rw-r--r--share/regions/config_452.xml6
-rw-r--r--share/regions/config_453.xml6
-rw-r--r--share/regions/config_454.xml6
-rw-r--r--share/regions/config_455.xml6
-rw-r--r--share/regions/config_456.xml6
-rw-r--r--share/regions/config_457.xml6
-rw-r--r--share/regions/config_458.xml6
-rw-r--r--share/regions/config_459.xml6
-rw-r--r--share/regions/config_46.xml6
-rw-r--r--share/regions/config_460.xml6
-rw-r--r--share/regions/config_461.xml6
-rw-r--r--share/regions/config_462.xml6
-rw-r--r--share/regions/config_463.xml6
-rw-r--r--share/regions/config_464.xml6
-rw-r--r--share/regions/config_465.xml6
-rw-r--r--share/regions/config_466.xml6
-rw-r--r--share/regions/config_467.xml6
-rw-r--r--share/regions/config_468.xml6
-rw-r--r--share/regions/config_469.xml6
-rw-r--r--share/regions/config_47.xml6
-rw-r--r--share/regions/config_470.xml6
-rw-r--r--share/regions/config_471.xml6
-rw-r--r--share/regions/config_472.xml6
-rw-r--r--share/regions/config_473.xml6
-rw-r--r--share/regions/config_474.xml6
-rw-r--r--share/regions/config_475.xml6
-rw-r--r--share/regions/config_476.xml6
-rw-r--r--share/regions/config_477.xml6
-rw-r--r--share/regions/config_478.xml6
-rw-r--r--share/regions/config_479.xml6
-rw-r--r--share/regions/config_48.xml6
-rw-r--r--share/regions/config_480.xml6
-rw-r--r--share/regions/config_481.xml6
-rw-r--r--share/regions/config_482.xml6
-rw-r--r--share/regions/config_483.xml6
-rw-r--r--share/regions/config_484.xml6
-rw-r--r--share/regions/config_485.xml6
-rw-r--r--share/regions/config_486.xml6
-rw-r--r--share/regions/config_487.xml6
-rw-r--r--share/regions/config_488.xml6
-rw-r--r--share/regions/config_489.xml6
-rw-r--r--share/regions/config_49.xml6
-rw-r--r--share/regions/config_490.xml6
-rw-r--r--share/regions/config_491.xml6
-rw-r--r--share/regions/config_492.xml6
-rw-r--r--share/regions/config_493.xml6
-rw-r--r--share/regions/config_494.xml6
-rw-r--r--share/regions/config_495.xml6
-rw-r--r--share/regions/config_496.xml6
-rw-r--r--share/regions/config_497.xml6
-rw-r--r--share/regions/config_498.xml6
-rw-r--r--share/regions/config_499.xml6
-rw-r--r--share/regions/config_5.xml6
-rw-r--r--share/regions/config_50.xml6
-rw-r--r--share/regions/config_500.xml6
-rw-r--r--share/regions/config_501.xml6
-rw-r--r--share/regions/config_502.xml6
-rw-r--r--share/regions/config_503.xml6
-rw-r--r--share/regions/config_504.xml6
-rw-r--r--share/regions/config_505.xml6
-rw-r--r--share/regions/config_506.xml6
-rw-r--r--share/regions/config_507.xml6
-rw-r--r--share/regions/config_508.xml6
-rw-r--r--share/regions/config_509.xml6
-rw-r--r--share/regions/config_51.xml6
-rw-r--r--share/regions/config_510.xml6
-rw-r--r--share/regions/config_511.xml6
-rw-r--r--share/regions/config_512.xml6
-rw-r--r--share/regions/config_513.xml6
-rw-r--r--share/regions/config_514.xml6
-rw-r--r--share/regions/config_515.xml6
-rw-r--r--share/regions/config_516.xml6
-rw-r--r--share/regions/config_517.xml6
-rw-r--r--share/regions/config_518.xml6
-rw-r--r--share/regions/config_519.xml6
-rw-r--r--share/regions/config_52.xml6
-rw-r--r--share/regions/config_520.xml6
-rw-r--r--share/regions/config_521.xml6
-rw-r--r--share/regions/config_522.xml6
-rw-r--r--share/regions/config_523.xml6
-rw-r--r--share/regions/config_524.xml6
-rw-r--r--share/regions/config_525.xml6
-rw-r--r--share/regions/config_526.xml6
-rw-r--r--share/regions/config_527.xml6
-rw-r--r--share/regions/config_528.xml6
-rw-r--r--share/regions/config_529.xml6
-rw-r--r--share/regions/config_53.xml6
-rw-r--r--share/regions/config_530.xml6
-rw-r--r--share/regions/config_531.xml6
-rw-r--r--share/regions/config_532.xml6
-rw-r--r--share/regions/config_533.xml6
-rw-r--r--share/regions/config_534.xml6
-rw-r--r--share/regions/config_535.xml6
-rw-r--r--share/regions/config_536.xml6
-rw-r--r--share/regions/config_537.xml6
-rw-r--r--share/regions/config_538.xml6
-rw-r--r--share/regions/config_539.xml6
-rw-r--r--share/regions/config_54.xml6
-rw-r--r--share/regions/config_540.xml6
-rw-r--r--share/regions/config_541.xml6
-rw-r--r--share/regions/config_542.xml6
-rw-r--r--share/regions/config_543.xml6
-rw-r--r--share/regions/config_544.xml6
-rw-r--r--share/regions/config_545.xml6
-rw-r--r--share/regions/config_546.xml6
-rw-r--r--share/regions/config_547.xml6
-rw-r--r--share/regions/config_548.xml6
-rw-r--r--share/regions/config_549.xml6
-rw-r--r--share/regions/config_55.xml6
-rw-r--r--share/regions/config_550.xml6
-rw-r--r--share/regions/config_551.xml6
-rw-r--r--share/regions/config_552.xml6
-rw-r--r--share/regions/config_553.xml6
-rw-r--r--share/regions/config_554.xml6
-rw-r--r--share/regions/config_555.xml6
-rw-r--r--share/regions/config_556.xml6
-rw-r--r--share/regions/config_557.xml6
-rw-r--r--share/regions/config_558.xml6
-rw-r--r--share/regions/config_559.xml6
-rw-r--r--share/regions/config_56.xml6
-rw-r--r--share/regions/config_560.xml6
-rw-r--r--share/regions/config_561.xml6
-rw-r--r--share/regions/config_562.xml6
-rw-r--r--share/regions/config_563.xml6
-rw-r--r--share/regions/config_564.xml6
-rw-r--r--share/regions/config_565.xml6
-rw-r--r--share/regions/config_566.xml6
-rw-r--r--share/regions/config_567.xml6
-rw-r--r--share/regions/config_568.xml6
-rw-r--r--share/regions/config_569.xml6
-rw-r--r--share/regions/config_57.xml6
-rw-r--r--share/regions/config_570.xml6
-rw-r--r--share/regions/config_571.xml6
-rw-r--r--share/regions/config_572.xml6
-rw-r--r--share/regions/config_573.xml6
-rw-r--r--share/regions/config_574.xml6
-rw-r--r--share/regions/config_575.xml6
-rw-r--r--share/regions/config_576.xml6
-rw-r--r--share/regions/config_577.xml6
-rw-r--r--share/regions/config_578.xml6
-rw-r--r--share/regions/config_579.xml6
-rw-r--r--share/regions/config_58.xml6
-rw-r--r--share/regions/config_580.xml6
-rw-r--r--share/regions/config_581.xml6
-rw-r--r--share/regions/config_582.xml6
-rw-r--r--share/regions/config_583.xml6
-rw-r--r--share/regions/config_584.xml6
-rw-r--r--share/regions/config_585.xml6
-rw-r--r--share/regions/config_586.xml6
-rw-r--r--share/regions/config_587.xml6
-rw-r--r--share/regions/config_588.xml6
-rw-r--r--share/regions/config_589.xml6
-rw-r--r--share/regions/config_59.xml6
-rw-r--r--share/regions/config_590.xml6
-rw-r--r--share/regions/config_591.xml6
-rw-r--r--share/regions/config_592.xml6
-rw-r--r--share/regions/config_593.xml6
-rw-r--r--share/regions/config_594.xml6
-rw-r--r--share/regions/config_595.xml6
-rw-r--r--share/regions/config_596.xml6
-rw-r--r--share/regions/config_597.xml6
-rw-r--r--share/regions/config_598.xml6
-rw-r--r--share/regions/config_599.xml6
-rw-r--r--share/regions/config_6.xml6
-rw-r--r--share/regions/config_60.xml6
-rw-r--r--share/regions/config_600.xml6
-rw-r--r--share/regions/config_601.xml6
-rw-r--r--share/regions/config_602.xml6
-rw-r--r--share/regions/config_603.xml6
-rw-r--r--share/regions/config_604.xml6
-rw-r--r--share/regions/config_605.xml6
-rw-r--r--share/regions/config_606.xml6
-rw-r--r--share/regions/config_607.xml6
-rw-r--r--share/regions/config_608.xml6
-rw-r--r--share/regions/config_609.xml6
-rw-r--r--share/regions/config_61.xml6
-rw-r--r--share/regions/config_610.xml6
-rw-r--r--share/regions/config_611.xml6
-rw-r--r--share/regions/config_612.xml6
-rw-r--r--share/regions/config_613.xml6
-rw-r--r--share/regions/config_614.xml6
-rw-r--r--share/regions/config_615.xml6
-rw-r--r--share/regions/config_616.xml6
-rw-r--r--share/regions/config_617.xml6
-rw-r--r--share/regions/config_618.xml6
-rw-r--r--share/regions/config_619.xml6
-rw-r--r--share/regions/config_62.xml6
-rw-r--r--share/regions/config_620.xml6
-rw-r--r--share/regions/config_621.xml6
-rw-r--r--share/regions/config_622.xml6
-rw-r--r--share/regions/config_623.xml6
-rw-r--r--share/regions/config_624.xml6
-rw-r--r--share/regions/config_625.xml6
-rw-r--r--share/regions/config_626.xml6
-rw-r--r--share/regions/config_627.xml6
-rw-r--r--share/regions/config_628.xml6
-rw-r--r--share/regions/config_629.xml6
-rw-r--r--share/regions/config_63.xml6
-rw-r--r--share/regions/config_630.xml6
-rw-r--r--share/regions/config_631.xml6
-rw-r--r--share/regions/config_632.xml6
-rw-r--r--share/regions/config_633.xml6
-rw-r--r--share/regions/config_634.xml6
-rw-r--r--share/regions/config_635.xml6
-rw-r--r--share/regions/config_636.xml6
-rw-r--r--share/regions/config_637.xml6
-rw-r--r--share/regions/config_638.xml6
-rw-r--r--share/regions/config_639.xml6
-rw-r--r--share/regions/config_64.xml6
-rw-r--r--share/regions/config_640.xml6
-rw-r--r--share/regions/config_641.xml6
-rw-r--r--share/regions/config_642.xml6
-rw-r--r--share/regions/config_643.xml6
-rw-r--r--share/regions/config_644.xml6
-rw-r--r--share/regions/config_645.xml6
-rw-r--r--share/regions/config_646.xml6
-rw-r--r--share/regions/config_647.xml6
-rw-r--r--share/regions/config_648.xml6
-rw-r--r--share/regions/config_649.xml6
-rw-r--r--share/regions/config_65.xml6
-rw-r--r--share/regions/config_650.xml6
-rw-r--r--share/regions/config_651.xml6
-rw-r--r--share/regions/config_652.xml6
-rw-r--r--share/regions/config_653.xml6
-rw-r--r--share/regions/config_654.xml6
-rw-r--r--share/regions/config_655.xml6
-rw-r--r--share/regions/config_656.xml6
-rw-r--r--share/regions/config_657.xml6
-rw-r--r--share/regions/config_658.xml6
-rw-r--r--share/regions/config_659.xml6
-rw-r--r--share/regions/config_66.xml6
-rw-r--r--share/regions/config_660.xml6
-rw-r--r--share/regions/config_661.xml6
-rw-r--r--share/regions/config_662.xml6
-rw-r--r--share/regions/config_663.xml6
-rw-r--r--share/regions/config_664.xml6
-rw-r--r--share/regions/config_665.xml6
-rw-r--r--share/regions/config_666.xml6
-rw-r--r--share/regions/config_667.xml6
-rw-r--r--share/regions/config_668.xml6
-rw-r--r--share/regions/config_669.xml6
-rw-r--r--share/regions/config_67.xml6
-rw-r--r--share/regions/config_670.xml6
-rw-r--r--share/regions/config_671.xml6
-rw-r--r--share/regions/config_672.xml6
-rw-r--r--share/regions/config_673.xml6
-rw-r--r--share/regions/config_674.xml6
-rw-r--r--share/regions/config_675.xml6
-rw-r--r--share/regions/config_676.xml6
-rw-r--r--share/regions/config_677.xml6
-rw-r--r--share/regions/config_678.xml6
-rw-r--r--share/regions/config_679.xml6
-rw-r--r--share/regions/config_68.xml6
-rw-r--r--share/regions/config_680.xml6
-rw-r--r--share/regions/config_681.xml6
-rw-r--r--share/regions/config_682.xml6
-rw-r--r--share/regions/config_683.xml6
-rw-r--r--share/regions/config_684.xml6
-rw-r--r--share/regions/config_685.xml6
-rw-r--r--share/regions/config_686.xml6
-rw-r--r--share/regions/config_687.xml6
-rw-r--r--share/regions/config_688.xml6
-rw-r--r--share/regions/config_689.xml6
-rw-r--r--share/regions/config_69.xml6
-rw-r--r--share/regions/config_690.xml6
-rw-r--r--share/regions/config_691.xml6
-rw-r--r--share/regions/config_692.xml6
-rw-r--r--share/regions/config_693.xml6
-rw-r--r--share/regions/config_694.xml6
-rw-r--r--share/regions/config_695.xml6
-rw-r--r--share/regions/config_696.xml6
-rw-r--r--share/regions/config_697.xml6
-rw-r--r--share/regions/config_698.xml6
-rw-r--r--share/regions/config_699.xml6
-rw-r--r--share/regions/config_7.xml6
-rw-r--r--share/regions/config_70.xml6
-rw-r--r--share/regions/config_700.xml6
-rw-r--r--share/regions/config_701.xml6
-rw-r--r--share/regions/config_702.xml6
-rw-r--r--share/regions/config_703.xml6
-rw-r--r--share/regions/config_704.xml6
-rw-r--r--share/regions/config_705.xml6
-rw-r--r--share/regions/config_706.xml6
-rw-r--r--share/regions/config_707.xml6
-rw-r--r--share/regions/config_708.xml6
-rw-r--r--share/regions/config_709.xml6
-rw-r--r--share/regions/config_71.xml6
-rw-r--r--share/regions/config_710.xml6
-rw-r--r--share/regions/config_711.xml6
-rw-r--r--share/regions/config_712.xml6
-rw-r--r--share/regions/config_713.xml6
-rw-r--r--share/regions/config_714.xml6
-rw-r--r--share/regions/config_715.xml6
-rw-r--r--share/regions/config_716.xml6
-rw-r--r--share/regions/config_717.xml6
-rw-r--r--share/regions/config_718.xml6
-rw-r--r--share/regions/config_719.xml6
-rw-r--r--share/regions/config_72.xml6
-rw-r--r--share/regions/config_720.xml6
-rw-r--r--share/regions/config_721.xml6
-rw-r--r--share/regions/config_722.xml6
-rw-r--r--share/regions/config_723.xml6
-rw-r--r--share/regions/config_724.xml6
-rw-r--r--share/regions/config_725.xml6
-rw-r--r--share/regions/config_726.xml6
-rw-r--r--share/regions/config_727.xml6
-rw-r--r--share/regions/config_728.xml6
-rw-r--r--share/regions/config_729.xml6
-rw-r--r--share/regions/config_73.xml6
-rw-r--r--share/regions/config_730.xml6
-rw-r--r--share/regions/config_731.xml6
-rw-r--r--share/regions/config_732.xml6
-rw-r--r--share/regions/config_733.xml6
-rw-r--r--share/regions/config_734.xml6
-rw-r--r--share/regions/config_735.xml6
-rw-r--r--share/regions/config_736.xml6
-rw-r--r--share/regions/config_737.xml6
-rw-r--r--share/regions/config_738.xml6
-rw-r--r--share/regions/config_739.xml6
-rw-r--r--share/regions/config_74.xml6
-rw-r--r--share/regions/config_740.xml6
-rw-r--r--share/regions/config_741.xml6
-rw-r--r--share/regions/config_742.xml6
-rw-r--r--share/regions/config_743.xml6
-rw-r--r--share/regions/config_744.xml6
-rw-r--r--share/regions/config_745.xml6
-rw-r--r--share/regions/config_746.xml6
-rw-r--r--share/regions/config_747.xml6
-rw-r--r--share/regions/config_748.xml6
-rw-r--r--share/regions/config_749.xml6
-rw-r--r--share/regions/config_75.xml6
-rw-r--r--share/regions/config_750.xml6
-rw-r--r--share/regions/config_751.xml6
-rw-r--r--share/regions/config_752.xml6
-rw-r--r--share/regions/config_753.xml6
-rw-r--r--share/regions/config_754.xml6
-rw-r--r--share/regions/config_755.xml6
-rw-r--r--share/regions/config_756.xml6
-rw-r--r--share/regions/config_757.xml6
-rw-r--r--share/regions/config_758.xml6
-rw-r--r--share/regions/config_759.xml6
-rw-r--r--share/regions/config_76.xml6
-rw-r--r--share/regions/config_760.xml6
-rw-r--r--share/regions/config_761.xml6
-rw-r--r--share/regions/config_762.xml6
-rw-r--r--share/regions/config_763.xml6
-rw-r--r--share/regions/config_764.xml6
-rw-r--r--share/regions/config_765.xml6
-rw-r--r--share/regions/config_766.xml6
-rw-r--r--share/regions/config_767.xml6
-rw-r--r--share/regions/config_768.xml6
-rw-r--r--share/regions/config_769.xml6
-rw-r--r--share/regions/config_77.xml6
-rw-r--r--share/regions/config_770.xml6
-rw-r--r--share/regions/config_771.xml6
-rw-r--r--share/regions/config_772.xml6
-rw-r--r--share/regions/config_773.xml6
-rw-r--r--share/regions/config_774.xml6
-rw-r--r--share/regions/config_775.xml6
-rw-r--r--share/regions/config_776.xml6
-rw-r--r--share/regions/config_777.xml6
-rw-r--r--share/regions/config_778.xml6
-rw-r--r--share/regions/config_779.xml6
-rw-r--r--share/regions/config_78.xml6
-rw-r--r--share/regions/config_780.xml6
-rw-r--r--share/regions/config_781.xml6
-rw-r--r--share/regions/config_782.xml6
-rw-r--r--share/regions/config_783.xml6
-rw-r--r--share/regions/config_784.xml6
-rw-r--r--share/regions/config_785.xml6
-rw-r--r--share/regions/config_786.xml6
-rw-r--r--share/regions/config_787.xml6
-rw-r--r--share/regions/config_788.xml6
-rw-r--r--share/regions/config_789.xml6
-rw-r--r--share/regions/config_79.xml6
-rw-r--r--share/regions/config_790.xml6
-rw-r--r--share/regions/config_791.xml6
-rw-r--r--share/regions/config_792.xml6
-rw-r--r--share/regions/config_793.xml6
-rw-r--r--share/regions/config_794.xml6
-rw-r--r--share/regions/config_795.xml6
-rw-r--r--share/regions/config_796.xml6
-rw-r--r--share/regions/config_797.xml6
-rw-r--r--share/regions/config_798.xml6
-rw-r--r--share/regions/config_799.xml6
-rw-r--r--share/regions/config_8.xml6
-rw-r--r--share/regions/config_80.xml6
-rw-r--r--share/regions/config_800.xml6
-rw-r--r--share/regions/config_801.xml6
-rw-r--r--share/regions/config_802.xml6
-rw-r--r--share/regions/config_803.xml6
-rw-r--r--share/regions/config_804.xml6
-rw-r--r--share/regions/config_805.xml6
-rw-r--r--share/regions/config_806.xml6
-rw-r--r--share/regions/config_807.xml6
-rw-r--r--share/regions/config_808.xml6
-rw-r--r--share/regions/config_809.xml6
-rw-r--r--share/regions/config_81.xml6
-rw-r--r--share/regions/config_810.xml6
-rw-r--r--share/regions/config_811.xml6
-rw-r--r--share/regions/config_812.xml6
-rw-r--r--share/regions/config_813.xml6
-rw-r--r--share/regions/config_814.xml6
-rw-r--r--share/regions/config_815.xml6
-rw-r--r--share/regions/config_816.xml6
-rw-r--r--share/regions/config_817.xml6
-rw-r--r--share/regions/config_818.xml6
-rw-r--r--share/regions/config_819.xml6
-rw-r--r--share/regions/config_82.xml6
-rw-r--r--share/regions/config_820.xml6
-rw-r--r--share/regions/config_821.xml6
-rw-r--r--share/regions/config_822.xml6
-rw-r--r--share/regions/config_823.xml6
-rw-r--r--share/regions/config_824.xml6
-rw-r--r--share/regions/config_825.xml6
-rw-r--r--share/regions/config_826.xml6
-rw-r--r--share/regions/config_827.xml6
-rw-r--r--share/regions/config_828.xml6
-rw-r--r--share/regions/config_829.xml6
-rw-r--r--share/regions/config_83.xml6
-rw-r--r--share/regions/config_830.xml6
-rw-r--r--share/regions/config_831.xml6
-rw-r--r--share/regions/config_832.xml6
-rw-r--r--share/regions/config_833.xml6
-rw-r--r--share/regions/config_834.xml6
-rw-r--r--share/regions/config_835.xml6
-rw-r--r--share/regions/config_836.xml6
-rw-r--r--share/regions/config_837.xml6
-rw-r--r--share/regions/config_838.xml6
-rw-r--r--share/regions/config_839.xml6
-rw-r--r--share/regions/config_84.xml6
-rw-r--r--share/regions/config_840.xml6
-rw-r--r--share/regions/config_841.xml6
-rw-r--r--share/regions/config_842.xml6
-rw-r--r--share/regions/config_843.xml6
-rw-r--r--share/regions/config_844.xml6
-rw-r--r--share/regions/config_845.xml6
-rw-r--r--share/regions/config_846.xml6
-rw-r--r--share/regions/config_847.xml6
-rw-r--r--share/regions/config_848.xml6
-rw-r--r--share/regions/config_849.xml6
-rw-r--r--share/regions/config_85.xml6
-rw-r--r--share/regions/config_850.xml6
-rw-r--r--share/regions/config_851.xml6
-rw-r--r--share/regions/config_852.xml6
-rw-r--r--share/regions/config_853.xml6
-rw-r--r--share/regions/config_854.xml6
-rw-r--r--share/regions/config_855.xml6
-rw-r--r--share/regions/config_856.xml6
-rw-r--r--share/regions/config_857.xml6
-rw-r--r--share/regions/config_858.xml6
-rw-r--r--share/regions/config_859.xml6
-rw-r--r--share/regions/config_86.xml6
-rw-r--r--share/regions/config_860.xml6
-rw-r--r--share/regions/config_861.xml6
-rw-r--r--share/regions/config_862.xml6
-rw-r--r--share/regions/config_863.xml6
-rw-r--r--share/regions/config_864.xml6
-rw-r--r--share/regions/config_865.xml6
-rw-r--r--share/regions/config_866.xml6
-rw-r--r--share/regions/config_867.xml6
-rw-r--r--share/regions/config_868.xml6
-rw-r--r--share/regions/config_869.xml6
-rw-r--r--share/regions/config_87.xml6
-rw-r--r--share/regions/config_870.xml6
-rw-r--r--share/regions/config_871.xml6
-rw-r--r--share/regions/config_872.xml6
-rw-r--r--share/regions/config_873.xml6
-rw-r--r--share/regions/config_874.xml6
-rw-r--r--share/regions/config_875.xml6
-rw-r--r--share/regions/config_876.xml6
-rw-r--r--share/regions/config_877.xml6
-rw-r--r--share/regions/config_878.xml6
-rw-r--r--share/regions/config_879.xml6
-rw-r--r--share/regions/config_88.xml6
-rw-r--r--share/regions/config_880.xml6
-rw-r--r--share/regions/config_881.xml6
-rw-r--r--share/regions/config_882.xml6
-rw-r--r--share/regions/config_883.xml6
-rw-r--r--share/regions/config_884.xml6
-rw-r--r--share/regions/config_885.xml6
-rw-r--r--share/regions/config_886.xml6
-rw-r--r--share/regions/config_887.xml6
-rw-r--r--share/regions/config_888.xml6
-rw-r--r--share/regions/config_889.xml6
-rw-r--r--share/regions/config_89.xml6
-rw-r--r--share/regions/config_890.xml6
-rw-r--r--share/regions/config_891.xml6
-rw-r--r--share/regions/config_892.xml6
-rw-r--r--share/regions/config_893.xml6
-rw-r--r--share/regions/config_894.xml6
-rw-r--r--share/regions/config_895.xml6
-rw-r--r--share/regions/config_896.xml6
-rw-r--r--share/regions/config_897.xml6
-rw-r--r--share/regions/config_898.xml6
-rw-r--r--share/regions/config_899.xml6
-rw-r--r--share/regions/config_9.xml6
-rw-r--r--share/regions/config_90.xml6
-rw-r--r--share/regions/config_900.xml6
-rw-r--r--share/regions/config_901.xml6
-rw-r--r--share/regions/config_902.xml6
-rw-r--r--share/regions/config_903.xml6
-rw-r--r--share/regions/config_904.xml6
-rw-r--r--share/regions/config_905.xml6
-rw-r--r--share/regions/config_906.xml6
-rw-r--r--share/regions/config_907.xml6
-rw-r--r--share/regions/config_908.xml6
-rw-r--r--share/regions/config_909.xml6
-rw-r--r--share/regions/config_91.xml6
-rw-r--r--share/regions/config_910.xml6
-rw-r--r--share/regions/config_911.xml6
-rw-r--r--share/regions/config_912.xml6
-rw-r--r--share/regions/config_913.xml6
-rw-r--r--share/regions/config_914.xml6
-rw-r--r--share/regions/config_915.xml6
-rw-r--r--share/regions/config_916.xml6
-rw-r--r--share/regions/config_917.xml6
-rw-r--r--share/regions/config_918.xml6
-rw-r--r--share/regions/config_919.xml6
-rw-r--r--share/regions/config_92.xml6
-rw-r--r--share/regions/config_920.xml6
-rw-r--r--share/regions/config_921.xml6
-rw-r--r--share/regions/config_922.xml6
-rw-r--r--share/regions/config_923.xml6
-rw-r--r--share/regions/config_924.xml6
-rw-r--r--share/regions/config_925.xml6
-rw-r--r--share/regions/config_926.xml6
-rw-r--r--share/regions/config_927.xml6
-rw-r--r--share/regions/config_928.xml6
-rw-r--r--share/regions/config_929.xml6
-rw-r--r--share/regions/config_93.xml6
-rw-r--r--share/regions/config_930.xml6
-rw-r--r--share/regions/config_931.xml6
-rw-r--r--share/regions/config_932.xml6
-rw-r--r--share/regions/config_933.xml6
-rw-r--r--share/regions/config_934.xml6
-rw-r--r--share/regions/config_935.xml6
-rw-r--r--share/regions/config_936.xml6
-rw-r--r--share/regions/config_937.xml6
-rw-r--r--share/regions/config_938.xml6
-rw-r--r--share/regions/config_939.xml6
-rw-r--r--share/regions/config_94.xml6
-rw-r--r--share/regions/config_940.xml6
-rw-r--r--share/regions/config_941.xml6
-rw-r--r--share/regions/config_942.xml6
-rw-r--r--share/regions/config_943.xml6
-rw-r--r--share/regions/config_944.xml6
-rw-r--r--share/regions/config_945.xml6
-rw-r--r--share/regions/config_946.xml6
-rw-r--r--share/regions/config_947.xml6
-rw-r--r--share/regions/config_948.xml6
-rw-r--r--share/regions/config_949.xml6
-rw-r--r--share/regions/config_95.xml6
-rw-r--r--share/regions/config_950.xml6
-rw-r--r--share/regions/config_951.xml6
-rw-r--r--share/regions/config_952.xml6
-rw-r--r--share/regions/config_953.xml6
-rw-r--r--share/regions/config_954.xml6
-rw-r--r--share/regions/config_955.xml6
-rw-r--r--share/regions/config_956.xml6
-rw-r--r--share/regions/config_957.xml6
-rw-r--r--share/regions/config_958.xml6
-rw-r--r--share/regions/config_959.xml6
-rw-r--r--share/regions/config_96.xml6
-rw-r--r--share/regions/config_960.xml6
-rw-r--r--share/regions/config_961.xml6
-rw-r--r--share/regions/config_962.xml6
-rw-r--r--share/regions/config_963.xml6
-rw-r--r--share/regions/config_964.xml6
-rw-r--r--share/regions/config_965.xml6
-rw-r--r--share/regions/config_966.xml6
-rw-r--r--share/regions/config_967.xml6
-rw-r--r--share/regions/config_968.xml6
-rw-r--r--share/regions/config_969.xml6
-rw-r--r--share/regions/config_97.xml6
-rw-r--r--share/regions/config_970.xml6
-rw-r--r--share/regions/config_971.xml6
-rw-r--r--share/regions/config_972.xml6
-rw-r--r--share/regions/config_973.xml6
-rw-r--r--share/regions/config_974.xml6
-rw-r--r--share/regions/config_975.xml6
-rw-r--r--share/regions/config_976.xml6
-rw-r--r--share/regions/config_977.xml6
-rw-r--r--share/regions/config_978.xml6
-rw-r--r--share/regions/config_979.xml6
-rw-r--r--share/regions/config_98.xml6
-rw-r--r--share/regions/config_980.xml6
-rw-r--r--share/regions/config_981.xml6
-rw-r--r--share/regions/config_982.xml6
-rw-r--r--share/regions/config_983.xml6
-rw-r--r--share/regions/config_984.xml6
-rw-r--r--share/regions/config_985.xml6
-rw-r--r--share/regions/config_986.xml6
-rw-r--r--share/regions/config_987.xml6
-rw-r--r--share/regions/config_988.xml6
-rw-r--r--share/regions/config_989.xml6
-rw-r--r--share/regions/config_99.xml6
-rw-r--r--share/regions/config_990.xml6
-rw-r--r--share/regions/config_991.xml6
-rw-r--r--share/regions/config_992.xml6
-rw-r--r--share/regions/config_993.xml6
-rw-r--r--share/regions/config_994.xml6
-rw-r--r--share/regions/config_995.xml6
-rw-r--r--share/regions/config_996.xml6
-rw-r--r--share/regions/config_997.xml6
-rw-r--r--share/regions/config_998.xml6
-rw-r--r--share/regions/config_999.xml6
-rw-r--r--share/sql/mysql-inventoryfolders.sql18
-rw-r--r--share/sql/mysql-inventoryitems.sql28
-rw-r--r--share/sql/mysql-reservations.txt32
1462 files changed, 82970 insertions, 82969 deletions
diff --git a/OpenSim.FxCop b/OpenSim.FxCop
index 1e2ea2d..d07c26e 100644
--- a/OpenSim.FxCop
+++ b/OpenSim.FxCop
@@ -1,7241 +1,7241 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<FxCopProject Version="1.35" Name="OpenSim"> 2<FxCopProject Version="1.35" Name="OpenSim">
3 <ProjectOptions> 3 <ProjectOptions>
4 <SharedProject>True</SharedProject> 4 <SharedProject>True</SharedProject>
5 <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet> 5 <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet>
6 <SaveMessages> 6 <SaveMessages>
7 <Project Status="Active, Excluded" NewOnly="False" /> 7 <Project Status="Active, Excluded" NewOnly="False" />
8 <Report Status="Active" NewOnly="False" /> 8 <Report Status="Active" NewOnly="False" />
9 </SaveMessages> 9 </SaveMessages>
10 <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" /> 10 <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" />
11 <EnableMultithreadedLoad>True</EnableMultithreadedLoad> 11 <EnableMultithreadedLoad>True</EnableMultithreadedLoad>
12 <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis> 12 <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis>
13 <SourceLookup>True</SourceLookup> 13 <SourceLookup>True</SourceLookup>
14 <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold> 14 <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold>
15 <RuleExceptionsThreshold>1</RuleExceptionsThreshold> 15 <RuleExceptionsThreshold>1</RuleExceptionsThreshold>
16 <Spelling Locale="en-us" /> 16 <Spelling Locale="en-us" />
17 <VersionAware>False</VersionAware> 17 <VersionAware>False</VersionAware>
18 <OverrideRuleVisibilities>False</OverrideRuleVisibilities> 18 <OverrideRuleVisibilities>False</OverrideRuleVisibilities>
19 <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" /> 19 <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" />
20 <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache> 20 <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache>
21 <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout> 21 <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout>
22 </ProjectOptions> 22 </ProjectOptions>
23 <Targets> 23 <Targets>
24 <AssemblyReferenceDirectories> 24 <AssemblyReferenceDirectories>
25 <Directory>$(ProjectDir)/lib/</Directory> 25 <Directory>$(ProjectDir)/lib/</Directory>
26 </AssemblyReferenceDirectories> 26 </AssemblyReferenceDirectories>
27 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll" Analyze="True" AnalyzeAllChildren="True" /> 27 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll" Analyze="True" AnalyzeAllChildren="True" />
28 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll" Analyze="True" AnalyzeAllChildren="True" /> 28 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll" Analyze="True" AnalyzeAllChildren="True" />
29 <Target Name="$(ProjectDir)/bin/OpenSim.exe" Analyze="True" AnalyzeAllChildren="True" /> 29 <Target Name="$(ProjectDir)/bin/OpenSim.exe" Analyze="True" AnalyzeAllChildren="True" />
30 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll" Analyze="True" AnalyzeAllChildren="True" /> 30 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll" Analyze="True" AnalyzeAllChildren="True" />
31 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll" Analyze="True" AnalyzeAllChildren="True" /> 31 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll" Analyze="True" AnalyzeAllChildren="True" />
32 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll" Analyze="True" AnalyzeAllChildren="True" /> 32 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll" Analyze="True" AnalyzeAllChildren="True" />
33 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll" Analyze="True" AnalyzeAllChildren="True" /> 33 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll" Analyze="True" AnalyzeAllChildren="True" />
34 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll" Analyze="True" AnalyzeAllChildren="True" /> 34 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll" Analyze="True" AnalyzeAllChildren="True" />
35 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll" Analyze="True" AnalyzeAllChildren="True" /> 35 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll" Analyze="True" AnalyzeAllChildren="True" />
36 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll" Analyze="True" AnalyzeAllChildren="True" /> 36 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll" Analyze="True" AnalyzeAllChildren="True" />
37 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll" Analyze="True" AnalyzeAllChildren="True" /> 37 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
38 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll" Analyze="True" AnalyzeAllChildren="True" /> 38 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
39 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll" Analyze="True" AnalyzeAllChildren="True" /> 39 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
40 </Targets> 40 </Targets>
41 <Rules> 41 <Rules>
42 <RuleFiles> 42 <RuleFiles>
43 <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" /> 43 <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" />
44 <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" /> 44 <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
45 <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> 45 <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
46 <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" /> 46 <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" />
47 <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" /> 47 <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" />
48 <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" /> 48 <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" />
49 <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" /> 49 <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
50 <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" /> 50 <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" />
51 <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" /> 51 <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
52 </RuleFiles> 52 </RuleFiles>
53 <Groups /> 53 <Groups />
54 <Settings /> 54 <Settings />
55 </Rules> 55 </Rules>
56 <FxCopReport Version="1.35"> 56 <FxCopReport Version="1.35">
57 <Namespaces> 57 <Namespaces>
58 <Namespace Name="OpenSim"> 58 <Namespace Name="OpenSim">
59 <Messages> 59 <Messages>
60 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 60 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
61 <Issue Name="Namespace"> 61 <Issue Name="Namespace">
62 <Item>Sim</Item> 62 <Item>Sim</Item>
63 <Item>OpenSim</Item> 63 <Item>OpenSim</Item>
64 </Issue> 64 </Issue>
65 </Message> 65 </Message>
66 </Messages> 66 </Messages>
67 </Namespace> 67 </Namespace>
68 <Namespace Name="OpenSim.Assets"> 68 <Namespace Name="OpenSim.Assets">
69 <Messages> 69 <Messages>
70 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 70 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
71 <Issue Name="Namespace"> 71 <Issue Name="Namespace">
72 <Item>Sim</Item> 72 <Item>Sim</Item>
73 <Item>OpenSim.Assets</Item> 73 <Item>OpenSim.Assets</Item>
74 </Issue> 74 </Issue>
75 </Message> 75 </Message>
76 </Messages> 76 </Messages>
77 </Namespace> 77 </Namespace>
78 <Namespace Name="OpenSim.CAPS"> 78 <Namespace Name="OpenSim.CAPS">
79 <Messages> 79 <Messages>
80 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 80 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
81 <Issue> 81 <Issue>
82 <Item>OpenSim.CAPS</Item> 82 <Item>OpenSim.CAPS</Item>
83 </Issue> 83 </Issue>
84 </Message> 84 </Message>
85 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 85 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
86 <Issue Name="Namespace"> 86 <Issue Name="Namespace">
87 <Item>Sim</Item> 87 <Item>Sim</Item>
88 <Item>OpenSim.CAPS</Item> 88 <Item>OpenSim.CAPS</Item>
89 </Issue> 89 </Issue>
90 </Message> 90 </Message>
91 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 91 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
92 <Issue Name="Namespace"> 92 <Issue Name="Namespace">
93 <Item>OpenSim.CAPS</Item> 93 <Item>OpenSim.CAPS</Item>
94 </Issue> 94 </Issue>
95 </Message> 95 </Message>
96 </Messages> 96 </Messages>
97 </Namespace> 97 </Namespace>
98 <Namespace Name="OpenSim.Config.SimConfigDb4o"> 98 <Namespace Name="OpenSim.Config.SimConfigDb4o">
99 <Messages> 99 <Messages>
100 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 100 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
101 <Issue Name="Namespace"> 101 <Issue Name="Namespace">
102 <Item>Sim</Item> 102 <Item>Sim</Item>
103 <Item>OpenSim.Config.SimConfigDb4o</Item> 103 <Item>OpenSim.Config.SimConfigDb4o</Item>
104 </Issue> 104 </Issue>
105 <Issue Name="Namespace"> 105 <Issue Name="Namespace">
106 <Item>Sim</Item> 106 <Item>Sim</Item>
107 <Item>OpenSim.Config.SimConfigDb4o</Item> 107 <Item>OpenSim.Config.SimConfigDb4o</Item>
108 </Issue> 108 </Issue>
109 </Message> 109 </Message>
110 </Messages> 110 </Messages>
111 </Namespace> 111 </Namespace>
112 <Namespace Name="OpenSim.Framework.Assets"> 112 <Namespace Name="OpenSim.Framework.Assets">
113 <Messages> 113 <Messages>
114 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 114 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
115 <Issue> 115 <Issue>
116 <Item>OpenSim.Framework.Assets</Item> 116 <Item>OpenSim.Framework.Assets</Item>
117 </Issue> 117 </Issue>
118 </Message> 118 </Message>
119 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 119 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
120 <Issue Name="Namespace"> 120 <Issue Name="Namespace">
121 <Item>Sim</Item> 121 <Item>Sim</Item>
122 <Item>OpenSim.Framework.Assets</Item> 122 <Item>OpenSim.Framework.Assets</Item>
123 </Issue> 123 </Issue>
124 </Message> 124 </Message>
125 </Messages> 125 </Messages>
126 </Namespace> 126 </Namespace>
127 <Namespace Name="OpenSim.Framework.Console"> 127 <Namespace Name="OpenSim.Framework.Console">
128 <Messages> 128 <Messages>
129 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 129 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
130 <Issue Name="Namespace"> 130 <Issue Name="Namespace">
131 <Item>Sim</Item> 131 <Item>Sim</Item>
132 <Item>OpenSim.Framework.Console</Item> 132 <Item>OpenSim.Framework.Console</Item>
133 </Issue> 133 </Issue>
134 </Message> 134 </Message>
135 </Messages> 135 </Messages>
136 </Namespace> 136 </Namespace>
137 <Namespace Name="OpenSim.Framework.Grid"> 137 <Namespace Name="OpenSim.Framework.Grid">
138 <Messages> 138 <Messages>
139 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 139 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
140 <Issue> 140 <Issue>
141 <Item>OpenSim.Framework.Grid</Item> 141 <Item>OpenSim.Framework.Grid</Item>
142 </Issue> 142 </Issue>
143 </Message> 143 </Message>
144 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 144 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
145 <Issue Name="Namespace"> 145 <Issue Name="Namespace">
146 <Item>Sim</Item> 146 <Item>Sim</Item>
147 <Item>OpenSim.Framework.Grid</Item> 147 <Item>OpenSim.Framework.Grid</Item>
148 </Issue> 148 </Issue>
149 </Message> 149 </Message>
150 </Messages> 150 </Messages>
151 </Namespace> 151 </Namespace>
152 <Namespace Name="OpenSim.Framework.Interfaces"> 152 <Namespace Name="OpenSim.Framework.Interfaces">
153 <Messages> 153 <Messages>
154 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 154 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
155 <Issue Name="Namespace"> 155 <Issue Name="Namespace">
156 <Item>Sim</Item> 156 <Item>Sim</Item>
157 <Item>OpenSim.Framework.Interfaces</Item> 157 <Item>OpenSim.Framework.Interfaces</Item>
158 </Issue> 158 </Issue>
159 </Message> 159 </Message>
160 </Messages> 160 </Messages>
161 </Namespace> 161 </Namespace>
162 <Namespace Name="OpenSim.Framework.Inventory"> 162 <Namespace Name="OpenSim.Framework.Inventory">
163 <Messages> 163 <Messages>
164 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 164 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
165 <Issue> 165 <Issue>
166 <Item>OpenSim.Framework.Inventory</Item> 166 <Item>OpenSim.Framework.Inventory</Item>
167 </Issue> 167 </Issue>
168 </Message> 168 </Message>
169 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 169 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
170 <Issue Name="Namespace"> 170 <Issue Name="Namespace">
171 <Item>Sim</Item> 171 <Item>Sim</Item>
172 <Item>OpenSim.Framework.Inventory</Item> 172 <Item>OpenSim.Framework.Inventory</Item>
173 </Issue> 173 </Issue>
174 </Message> 174 </Message>
175 </Messages> 175 </Messages>
176 </Namespace> 176 </Namespace>
177 <Namespace Name="OpenSim.Framework.Sims"> 177 <Namespace Name="OpenSim.Framework.Sims">
178 <Messages> 178 <Messages>
179 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 179 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
180 <Issue> 180 <Issue>
181 <Item>OpenSim.Framework.Sims</Item> 181 <Item>OpenSim.Framework.Sims</Item>
182 </Issue> 182 </Issue>
183 </Message> 183 </Message>
184 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 184 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
185 <Issue Name="Namespace"> 185 <Issue Name="Namespace">
186 <Item>Sim</Item> 186 <Item>Sim</Item>
187 <Item>OpenSim.Framework.Sims</Item> 187 <Item>OpenSim.Framework.Sims</Item>
188 </Issue> 188 </Issue>
189 </Message> 189 </Message>
190 </Messages> 190 </Messages>
191 </Namespace> 191 </Namespace>
192 <Namespace Name="OpenSim.Framework.Terrain"> 192 <Namespace Name="OpenSim.Framework.Terrain">
193 <Messages> 193 <Messages>
194 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 194 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
195 <Issue> 195 <Issue>
196 <Item>OpenSim.Framework.Terrain</Item> 196 <Item>OpenSim.Framework.Terrain</Item>
197 </Issue> 197 </Issue>
198 </Message> 198 </Message>
199 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 199 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
200 <Issue Name="Namespace"> 200 <Issue Name="Namespace">
201 <Item>Sim</Item> 201 <Item>Sim</Item>
202 <Item>OpenSim.Framework.Terrain</Item> 202 <Item>OpenSim.Framework.Terrain</Item>
203 </Issue> 203 </Issue>
204 </Message> 204 </Message>
205 </Messages> 205 </Messages>
206 </Namespace> 206 </Namespace>
207 <Namespace Name="OpenSim.Framework.User"> 207 <Namespace Name="OpenSim.Framework.User">
208 <Messages> 208 <Messages>
209 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 209 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
210 <Issue> 210 <Issue>
211 <Item>OpenSim.Framework.User</Item> 211 <Item>OpenSim.Framework.User</Item>
212 </Issue> 212 </Issue>
213 </Message> 213 </Message>
214 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 214 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
215 <Issue Name="Namespace"> 215 <Issue Name="Namespace">
216 <Item>Sim</Item> 216 <Item>Sim</Item>
217 <Item>OpenSim.Framework.User</Item> 217 <Item>OpenSim.Framework.User</Item>
218 </Issue> 218 </Issue>
219 </Message> 219 </Message>
220 </Messages> 220 </Messages>
221 </Namespace> 221 </Namespace>
222 <Namespace Name="OpenSim.Framework.Utilities"> 222 <Namespace Name="OpenSim.Framework.Utilities">
223 <Messages> 223 <Messages>
224 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 224 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
225 <Issue> 225 <Issue>
226 <Item>OpenSim.Framework.Utilities</Item> 226 <Item>OpenSim.Framework.Utilities</Item>
227 </Issue> 227 </Issue>
228 </Message> 228 </Message>
229 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 229 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
230 <Issue Name="Namespace"> 230 <Issue Name="Namespace">
231 <Item>Sim</Item> 231 <Item>Sim</Item>
232 <Item>OpenSim.Framework.Utilities</Item> 232 <Item>OpenSim.Framework.Utilities</Item>
233 </Issue> 233 </Issue>
234 </Message> 234 </Message>
235 </Messages> 235 </Messages>
236 </Namespace> 236 </Namespace>
237 <Namespace Name="OpenSim.GridInterfaces.Local"> 237 <Namespace Name="OpenSim.GridInterfaces.Local">
238 <Messages> 238 <Messages>
239 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 239 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
240 <Issue Name="Namespace"> 240 <Issue Name="Namespace">
241 <Item>Sim</Item> 241 <Item>Sim</Item>
242 <Item>OpenSim.GridInterfaces.Local</Item> 242 <Item>OpenSim.GridInterfaces.Local</Item>
243 </Issue> 243 </Issue>
244 </Message> 244 </Message>
245 </Messages> 245 </Messages>
246 </Namespace> 246 </Namespace>
247 <Namespace Name="OpenSim.GridInterfaces.Remote"> 247 <Namespace Name="OpenSim.GridInterfaces.Remote">
248 <Messages> 248 <Messages>
249 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 249 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
250 <Issue> 250 <Issue>
251 <Item>OpenSim.GridInterfaces.Remote</Item> 251 <Item>OpenSim.GridInterfaces.Remote</Item>
252 </Issue> 252 </Issue>
253 </Message> 253 </Message>
254 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 254 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
255 <Issue Name="Namespace"> 255 <Issue Name="Namespace">
256 <Item>Sim</Item> 256 <Item>Sim</Item>
257 <Item>OpenSim.GridInterfaces.Remote</Item> 257 <Item>OpenSim.GridInterfaces.Remote</Item>
258 </Issue> 258 </Issue>
259 </Message> 259 </Message>
260 </Messages> 260 </Messages>
261 </Namespace> 261 </Namespace>
262 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin"> 262 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin">
263 <Messages> 263 <Messages>
264 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 264 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
265 <Issue Name="Namespace"> 265 <Issue Name="Namespace">
266 <Item>Plugin</Item> 266 <Item>Plugin</Item>
267 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 267 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
268 </Issue> 268 </Issue>
269 </Message> 269 </Message>
270 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 270 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
271 <Issue Name="Namespace"> 271 <Issue Name="Namespace">
272 <Item>Sim</Item> 272 <Item>Sim</Item>
273 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 273 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
274 </Issue> 274 </Issue>
275 </Message> 275 </Message>
276 </Messages> 276 </Messages>
277 </Namespace> 277 </Namespace>
278 <Namespace Name="OpenSim.Physics.Manager"> 278 <Namespace Name="OpenSim.Physics.Manager">
279 <Messages> 279 <Messages>
280 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 280 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
281 <Issue Name="Namespace"> 281 <Issue Name="Namespace">
282 <Item>Sim</Item> 282 <Item>Sim</Item>
283 <Item>OpenSim.Physics.Manager</Item> 283 <Item>OpenSim.Physics.Manager</Item>
284 </Issue> 284 </Issue>
285 </Message> 285 </Message>
286 </Messages> 286 </Messages>
287 </Namespace> 287 </Namespace>
288 <Namespace Name="OpenSim.Physics.OdePlugin"> 288 <Namespace Name="OpenSim.Physics.OdePlugin">
289 <Messages> 289 <Messages>
290 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 290 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
291 <Issue> 291 <Issue>
292 <Item>OpenSim.Physics.OdePlugin</Item> 292 <Item>OpenSim.Physics.OdePlugin</Item>
293 </Issue> 293 </Issue>
294 </Message> 294 </Message>
295 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 295 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
296 <Issue Name="Namespace"> 296 <Issue Name="Namespace">
297 <Item>Plugin</Item> 297 <Item>Plugin</Item>
298 <Item>OpenSim.Physics.OdePlugin</Item> 298 <Item>OpenSim.Physics.OdePlugin</Item>
299 </Issue> 299 </Issue>
300 </Message> 300 </Message>
301 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 301 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
302 <Issue Name="Namespace"> 302 <Issue Name="Namespace">
303 <Item>Sim</Item> 303 <Item>Sim</Item>
304 <Item>OpenSim.Physics.OdePlugin</Item> 304 <Item>OpenSim.Physics.OdePlugin</Item>
305 </Issue> 305 </Issue>
306 </Message> 306 </Message>
307 </Messages> 307 </Messages>
308 </Namespace> 308 </Namespace>
309 <Namespace Name="OpenSim.Physics.PhysXPlugin"> 309 <Namespace Name="OpenSim.Physics.PhysXPlugin">
310 <Messages> 310 <Messages>
311 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 311 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
312 <Issue> 312 <Issue>
313 <Item>OpenSim.Physics.PhysXPlugin</Item> 313 <Item>OpenSim.Physics.PhysXPlugin</Item>
314 </Issue> 314 </Issue>
315 </Message> 315 </Message>
316 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 316 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
317 <Issue Name="Namespace"> 317 <Issue Name="Namespace">
318 <Item>Plugin</Item> 318 <Item>Plugin</Item>
319 <Item>OpenSim.Physics.PhysXPlugin</Item> 319 <Item>OpenSim.Physics.PhysXPlugin</Item>
320 </Issue> 320 </Issue>
321 </Message> 321 </Message>
322 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 322 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
323 <Issue Name="Namespace"> 323 <Issue Name="Namespace">
324 <Item>Sim</Item> 324 <Item>Sim</Item>
325 <Item>OpenSim.Physics.PhysXPlugin</Item> 325 <Item>OpenSim.Physics.PhysXPlugin</Item>
326 </Issue> 326 </Issue>
327 </Message> 327 </Message>
328 </Messages> 328 </Messages>
329 </Namespace> 329 </Namespace>
330 <Namespace Name="OpenSim.Storage.LocalStorageDb4o"> 330 <Namespace Name="OpenSim.Storage.LocalStorageDb4o">
331 <Messages> 331 <Messages>
332 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 332 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
333 <Issue Name="Namespace"> 333 <Issue Name="Namespace">
334 <Item>Sim</Item> 334 <Item>Sim</Item>
335 <Item>OpenSim.Storage.LocalStorageDb4o</Item> 335 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
336 </Issue> 336 </Issue>
337 </Message> 337 </Message>
338 </Messages> 338 </Messages>
339 </Namespace> 339 </Namespace>
340 <Namespace Name="OpenSim.types"> 340 <Namespace Name="OpenSim.types">
341 <Messages> 341 <Messages>
342 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 342 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
343 <Issue> 343 <Issue>
344 <Item>OpenSim.types</Item> 344 <Item>OpenSim.types</Item>
345 </Issue> 345 </Issue>
346 </Message> 346 </Message>
347 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 347 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
348 <Issue Name="Namespace"> 348 <Issue Name="Namespace">
349 <Item>OpenSim.types</Item> 349 <Item>OpenSim.types</Item>
350 </Issue> 350 </Issue>
351 </Message> 351 </Message>
352 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 352 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
353 <Issue Name="Namespace"> 353 <Issue Name="Namespace">
354 <Item>Sim</Item> 354 <Item>Sim</Item>
355 <Item>OpenSim.types</Item> 355 <Item>OpenSim.types</Item>
356 </Issue> 356 </Issue>
357 </Message> 357 </Message>
358 </Messages> 358 </Messages>
359 </Namespace> 359 </Namespace>
360 <Namespace Name="OpenSim.UserServer"> 360 <Namespace Name="OpenSim.UserServer">
361 <Messages> 361 <Messages>
362 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 362 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
363 <Issue> 363 <Issue>
364 <Item>OpenSim.UserServer</Item> 364 <Item>OpenSim.UserServer</Item>
365 </Issue> 365 </Issue>
366 </Message> 366 </Message>
367 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 367 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
368 <Issue Name="Namespace"> 368 <Issue Name="Namespace">
369 <Item>Sim</Item> 369 <Item>Sim</Item>
370 <Item>OpenSim.UserServer</Item> 370 <Item>OpenSim.UserServer</Item>
371 </Issue> 371 </Issue>
372 </Message> 372 </Message>
373 </Messages> 373 </Messages>
374 </Namespace> 374 </Namespace>
375 <Namespace Name="OpenSim.world"> 375 <Namespace Name="OpenSim.world">
376 <Messages> 376 <Messages>
377 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 377 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
378 <Issue Name="Namespace"> 378 <Issue Name="Namespace">
379 <Item>OpenSim.world</Item> 379 <Item>OpenSim.world</Item>
380 </Issue> 380 </Issue>
381 </Message> 381 </Message>
382 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 382 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
383 <Issue Name="Namespace"> 383 <Issue Name="Namespace">
384 <Item>Sim</Item> 384 <Item>Sim</Item>
385 <Item>OpenSim.world</Item> 385 <Item>OpenSim.world</Item>
386 </Issue> 386 </Issue>
387 </Message> 387 </Message>
388 </Messages> 388 </Messages>
389 </Namespace> 389 </Namespace>
390 <Namespace Name="OpenSim.world.scripting"> 390 <Namespace Name="OpenSim.world.scripting">
391 <Messages> 391 <Messages>
392 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z"> 392 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
393 <Issue> 393 <Issue>
394 <Item>OpenSim.world.scripting</Item> 394 <Item>OpenSim.world.scripting</Item>
395 </Issue> 395 </Issue>
396 </Message> 396 </Message>
397 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 397 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
398 <Issue Name="Namespace"> 398 <Issue Name="Namespace">
399 <Item>OpenSim.world.scripting</Item> 399 <Item>OpenSim.world.scripting</Item>
400 </Issue> 400 </Issue>
401 <Issue Name="Namespace"> 401 <Issue Name="Namespace">
402 <Item>OpenSim.world.scripting</Item> 402 <Item>OpenSim.world.scripting</Item>
403 </Issue> 403 </Issue>
404 </Message> 404 </Message>
405 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 405 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
406 <Issue Name="Namespace"> 406 <Issue Name="Namespace">
407 <Item>Sim</Item> 407 <Item>Sim</Item>
408 <Item>OpenSim.world.scripting</Item> 408 <Item>OpenSim.world.scripting</Item>
409 </Issue> 409 </Issue>
410 </Message> 410 </Message>
411 </Messages> 411 </Messages>
412 </Namespace> 412 </Namespace>
413 </Namespaces> 413 </Namespaces>
414 <Targets> 414 <Targets>
415 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll"> 415 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll">
416 <Modules> 416 <Modules>
417 <Module Name="opengridservices.serverconsole.dll"> 417 <Module Name="opengridservices.serverconsole.dll">
418 <Messages> 418 <Messages>
419 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 419 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
420 <Issue> 420 <Issue>
421 <Item>OpenGridServices.ServerConsole</Item> 421 <Item>OpenGridServices.ServerConsole</Item>
422 </Issue> 422 </Issue>
423 </Message> 423 </Message>
424 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 424 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
425 <Issue Name="NoStrongName"> 425 <Issue Name="NoStrongName">
426 <Item>OpenGridServices.ServerConsole</Item> 426 <Item>OpenGridServices.ServerConsole</Item>
427 </Issue> 427 </Issue>
428 </Message> 428 </Message>
429 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 429 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
430 <Issue Name="NoAttr"> 430 <Issue Name="NoAttr">
431 <Item>OpenGridServices.ServerConsole</Item> 431 <Item>OpenGridServices.ServerConsole</Item>
432 </Issue> 432 </Issue>
433 </Message> 433 </Message>
434 </Messages> 434 </Messages>
435 <Namespaces> 435 <Namespaces>
436 <Namespace Name="ServerConsole"> 436 <Namespace Name="ServerConsole">
437 <Types> 437 <Types>
438 <Type Name="conscmd_callback"> 438 <Type Name="conscmd_callback">
439 <Messages> 439 <Messages>
440 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 440 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
441 <Issue Name="Type"> 441 <Issue Name="Type">
442 <Item>conscmd_callback</Item> 442 <Item>conscmd_callback</Item>
443 </Issue> 443 </Issue>
444 </Message> 444 </Message>
445 <Message Id="conscmd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 445 <Message Id="conscmd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
446 <Issue Name="Type"> 446 <Issue Name="Type">
447 <Item>conscmd</Item> 447 <Item>conscmd</Item>
448 <Item>ServerConsole.conscmd_callback</Item> 448 <Item>ServerConsole.conscmd_callback</Item>
449 </Issue> 449 </Issue>
450 </Message> 450 </Message>
451 <Message TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 451 <Message TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
452 <Issue Name="Type"> 452 <Issue Name="Type">
453 <Item>conscmd_callback</Item> 453 <Item>conscmd_callback</Item>
454 </Issue> 454 </Issue>
455 </Message> 455 </Message>
456 </Messages> 456 </Messages>
457 <Members> 457 <Members>
458 <Member Name="RunCmd(System.String,System.String[]):System.Void"> 458 <Member Name="RunCmd(System.String,System.String[]):System.Void">
459 <Messages> 459 <Messages>
460 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 460 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
461 <Issue Name="Parameter"> 461 <Issue Name="Parameter">
462 <Item>conscmd_callback.RunCmd(String, String[]):Void</Item> 462 <Item>conscmd_callback.RunCmd(String, String[]):Void</Item>
463 <Item>cmdparams</Item> 463 <Item>cmdparams</Item>
464 <Item>cmdparams</Item> 464 <Item>cmdparams</Item>
465 </Issue> 465 </Issue>
466 </Message> 466 </Message>
467 </Messages> 467 </Messages>
468 </Member> 468 </Member>
469 <Member Name="Show(System.String):System.Void"> 469 <Member Name="Show(System.String):System.Void">
470 <Messages> 470 <Messages>
471 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 471 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
472 <Issue Name="Parameter"> 472 <Issue Name="Parameter">
473 <Item>ShowWhat</Item> 473 <Item>ShowWhat</Item>
474 </Issue> 474 </Issue>
475 </Message> 475 </Message>
476 </Messages> 476 </Messages>
477 </Member> 477 </Member>
478 </Members> 478 </Members>
479 </Type> 479 </Type>
480 <Type Name="ConsoleBase"> 480 <Type Name="ConsoleBase">
481 <Members> 481 <Members>
482 <Member Name="CmdPrompt(System.String,System.String):System.String"> 482 <Member Name="CmdPrompt(System.String,System.String):System.String">
483 <Messages> 483 <Messages>
484 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 484 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
485 <Issue Name="Parameter"> 485 <Issue Name="Parameter">
486 <Item>ConsoleBase.CmdPrompt(String, String):String</Item> 486 <Item>ConsoleBase.CmdPrompt(String, String):String</Item>
487 <Item>defaultresponse</Item> 487 <Item>defaultresponse</Item>
488 <Item>defaultresponse</Item> 488 <Item>defaultresponse</Item>
489 </Issue> 489 </Issue>
490 </Message> 490 </Message>
491 </Messages> 491 </Messages>
492 </Member> 492 </Member>
493 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String"> 493 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String">
494 <Messages> 494 <Messages>
495 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 495 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
496 <Issue Name="Parameter"> 496 <Issue Name="Parameter">
497 <Item>OptionA</Item> 497 <Item>OptionA</Item>
498 </Issue> 498 </Issue>
499 </Message> 499 </Message>
500 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 500 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
501 <Issue Name="Parameter"> 501 <Issue Name="Parameter">
502 <Item>OptionB</Item> 502 <Item>OptionB</Item>
503 </Issue> 503 </Issue>
504 </Message> 504 </Message>
505 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 505 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
506 <Issue Name="Parameter"> 506 <Issue Name="Parameter">
507 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item> 507 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item>
508 <Item>defaultresponse</Item> 508 <Item>defaultresponse</Item>
509 <Item>defaultresponse</Item> 509 <Item>defaultresponse</Item>
510 </Issue> 510 </Issue>
511 </Message> 511 </Message>
512 </Messages> 512 </Messages>
513 </Member> 513 </Member>
514 <Member Name="PasswdPrompt(System.String):System.String"> 514 <Member Name="PasswdPrompt(System.String):System.String">
515 <Messages> 515 <Messages>
516 <Message Id="Passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 516 <Message Id="Passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
517 <Issue Name="Member"> 517 <Issue Name="Member">
518 <Item>Passwd</Item> 518 <Item>Passwd</Item>
519 <Item>ConsoleBase.PasswdPrompt(String):String</Item> 519 <Item>ConsoleBase.PasswdPrompt(String):String</Item>
520 </Issue> 520 </Issue>
521 </Message> 521 </Message>
522 </Messages> 522 </Messages>
523 </Member> 523 </Member>
524 <Member Name="RunCmd(System.String,System.String[]):System.Object"> 524 <Member Name="RunCmd(System.String,System.String[]):System.Object">
525 <Messages> 525 <Messages>
526 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 526 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
527 <Issue Name="Parameter"> 527 <Issue Name="Parameter">
528 <Item>Cmd</Item> 528 <Item>Cmd</Item>
529 </Issue> 529 </Issue>
530 </Message> 530 </Message>
531 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 531 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
532 <Issue Name="Parameter"> 532 <Issue Name="Parameter">
533 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item> 533 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item>
534 <Item>cmdparams</Item> 534 <Item>cmdparams</Item>
535 <Item>cmdparams</Item> 535 <Item>cmdparams</Item>
536 </Issue> 536 </Issue>
537 </Message> 537 </Message>
538 </Messages> 538 </Messages>
539 </Member> 539 </Member>
540 <Member Name="ShowCommands(System.String):System.Void"> 540 <Member Name="ShowCommands(System.String):System.Void">
541 <Messages> 541 <Messages>
542 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 542 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
543 <Issue Name="Parameter"> 543 <Issue Name="Parameter">
544 <Item>ShowWhat</Item> 544 <Item>ShowWhat</Item>
545 </Issue> 545 </Issue>
546 </Message> 546 </Message>
547 </Messages> 547 </Messages>
548 </Member> 548 </Member>
549 <Member Name="Write(System.String):System.Void"> 549 <Member Name="Write(System.String):System.Void">
550 <Messages> 550 <Messages>
551 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 551 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
552 <Issue Name="Parameter"> 552 <Issue Name="Parameter">
553 <Item>Line</Item> 553 <Item>Line</Item>
554 </Issue> 554 </Issue>
555 </Message> 555 </Message>
556 </Messages> 556 </Messages>
557 </Member> 557 </Member>
558 <Member Name="WriteLine(System.String):System.Void"> 558 <Member Name="WriteLine(System.String):System.Void">
559 <Messages> 559 <Messages>
560 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 560 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
561 <Issue Name="Parameter"> 561 <Issue Name="Parameter">
562 <Item>Line</Item> 562 <Item>Line</Item>
563 </Issue> 563 </Issue>
564 </Message> 564 </Message>
565 </Messages> 565 </Messages>
566 </Member> 566 </Member>
567 </Members> 567 </Members>
568 </Type> 568 </Type>
569 <Type Name="ConsoleBase+ConsoleType"> 569 <Type Name="ConsoleBase+ConsoleType">
570 <Members> 570 <Members>
571 <Member Name="SimChat"> 571 <Member Name="SimChat">
572 <Messages> 572 <Messages>
573 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 573 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
574 <Issue Name="Member"> 574 <Issue Name="Member">
575 <Item>Sim</Item> 575 <Item>Sim</Item>
576 <Item>ConsoleType.SimChat</Item> 576 <Item>ConsoleType.SimChat</Item>
577 </Issue> 577 </Issue>
578 </Message> 578 </Message>
579 </Messages> 579 </Messages>
580 </Member> 580 </Member>
581 <Member Name="TCP"> 581 <Member Name="TCP">
582 <Messages> 582 <Messages>
583 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 583 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
584 <Issue Name="Member"> 584 <Issue Name="Member">
585 <Item>ConsoleType.TCP</Item> 585 <Item>ConsoleType.TCP</Item>
586 </Issue> 586 </Issue>
587 </Message> 587 </Message>
588 </Messages> 588 </Messages>
589 </Member> 589 </Member>
590 </Members> 590 </Members>
591 </Type> 591 </Type>
592 <Type Name="MainConsole"> 592 <Type Name="MainConsole">
593 <Messages> 593 <Messages>
594 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z"> 594 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
595 <Issue> 595 <Issue>
596 <Item>MainConsole</Item> 596 <Item>MainConsole</Item>
597 </Issue> 597 </Issue>
598 </Message> 598 </Message>
599 </Messages> 599 </Messages>
600 </Type> 600 </Type>
601 </Types> 601 </Types>
602 </Namespace> 602 </Namespace>
603 </Namespaces> 603 </Namespaces>
604 </Module> 604 </Module>
605 </Modules> 605 </Modules>
606 </Target> 606 </Target>
607 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll"> 607 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll">
608 <Modules> 608 <Modules>
609 <Module Name="opensim.config.simconfigdb4o.dll"> 609 <Module Name="opensim.config.simconfigdb4o.dll">
610 <Messages> 610 <Messages>
611 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 611 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
612 <Issue> 612 <Issue>
613 <Item>OpenSim.Config.SimConfigDb4o</Item> 613 <Item>OpenSim.Config.SimConfigDb4o</Item>
614 </Issue> 614 </Issue>
615 </Message> 615 </Message>
616 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 616 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
617 <Issue Name="NoStrongName"> 617 <Issue Name="NoStrongName">
618 <Item>OpenSim.Config.SimConfigDb4o</Item> 618 <Item>OpenSim.Config.SimConfigDb4o</Item>
619 </Issue> 619 </Issue>
620 </Message> 620 </Message>
621 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 621 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
622 <Issue Name="NoAttr"> 622 <Issue Name="NoAttr">
623 <Item>OpenSim.Config.SimConfigDb4o</Item> 623 <Item>OpenSim.Config.SimConfigDb4o</Item>
624 </Issue> 624 </Issue>
625 </Message> 625 </Message>
626 </Messages> 626 </Messages>
627 <Namespaces> 627 <Namespaces>
628 <Namespace Name="OpenSim.Config.SimConfigDb4o"> 628 <Namespace Name="OpenSim.Config.SimConfigDb4o">
629 <Types> 629 <Types>
630 <Type Name="Db40ConfigPlugin"> 630 <Type Name="Db40ConfigPlugin">
631 <Messages> 631 <Messages>
632 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 632 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
633 <Issue Name="Type"> 633 <Issue Name="Type">
634 <Item>Plugin</Item> 634 <Item>Plugin</Item>
635 <Item>OpenSim.Config.SimConfigDb4o.Db40ConfigPlugin</Item> 635 <Item>OpenSim.Config.SimConfigDb4o.Db40ConfigPlugin</Item>
636 </Issue> 636 </Issue>
637 </Message> 637 </Message>
638 </Messages> 638 </Messages>
639 </Type> 639 </Type>
640 <Type Name="DbSimConfig"> 640 <Type Name="DbSimConfig">
641 <Messages> 641 <Messages>
642 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 642 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
643 <Issue Name="Type"> 643 <Issue Name="Type">
644 <Item>Sim</Item> 644 <Item>Sim</Item>
645 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item> 645 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item>
646 </Issue> 646 </Issue>
647 </Message> 647 </Message>
648 <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 648 <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
649 <Issue Name="Type"> 649 <Issue Name="Type">
650 <Item>Db</Item> 650 <Item>Db</Item>
651 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item> 651 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item>
652 </Issue> 652 </Issue>
653 </Message> 653 </Message>
654 </Messages> 654 </Messages>
655 <Members> 655 <Members>
656 <Member Name="InitConfig(System.Boolean):System.Void"> 656 <Member Name="InitConfig(System.Boolean):System.Void">
657 <Messages> 657 <Messages>
658 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 658 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
659 <Issue> 659 <Issue>
660 <Item>DbSimConfig.InitConfig(Boolean):Void</Item> 660 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
661 <Item>System.Exception</Item> 661 <Item>System.Exception</Item>
662 </Issue> 662 </Issue>
663 </Message> 663 </Message>
664 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 664 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
665 <Issue> 665 <Issue>
666 <Item>DbSimConfig.InitConfig(Boolean):Void</Item> 666 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
667 <Item>System.UInt32.ToString</Item> 667 <Item>System.UInt32.ToString</Item>
668 <Item>System.UInt32.ToString(System.IFormatProvider)</Item> 668 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
669 </Issue> 669 </Issue>
670 </Message> 670 </Message>
671 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 671 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
672 <Issue> 672 <Issue>
673 <Item>DbSimConfig.InitConfig(Boolean):Void</Item> 673 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
674 <Item>System.UInt64.ToString</Item> 674 <Item>System.UInt64.ToString</Item>
675 <Item>System.UInt64.ToString(System.IFormatProvider)</Item> 675 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
676 </Issue> 676 </Issue>
677 </Message> 677 </Message>
678 </Messages> 678 </Messages>
679 </Member> 679 </Member>
680 <Member Name="LoadDefaults():System.Void"> 680 <Member Name="LoadDefaults():System.Void">
681 <Messages> 681 <Messages>
682 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 682 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
683 <Issue> 683 <Issue>
684 <Item>DbSimConfig.LoadDefaults():Void</Item> 684 <Item>DbSimConfig.LoadDefaults():Void</Item>
685 <Item>System.Convert.ToInt32(System.String)</Item> 685 <Item>System.Convert.ToInt32(System.String)</Item>
686 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item> 686 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
687 </Issue> 687 </Issue>
688 <Issue> 688 <Issue>
689 <Item>DbSimConfig.LoadDefaults():Void</Item> 689 <Item>DbSimConfig.LoadDefaults():Void</Item>
690 <Item>System.Convert.ToInt32(System.String)</Item> 690 <Item>System.Convert.ToInt32(System.String)</Item>
691 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item> 691 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
692 </Issue> 692 </Issue>
693 <Issue> 693 <Issue>
694 <Item>DbSimConfig.LoadDefaults():Void</Item> 694 <Item>DbSimConfig.LoadDefaults():Void</Item>
695 <Item>System.Convert.ToInt32(System.String)</Item> 695 <Item>System.Convert.ToInt32(System.String)</Item>
696 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item> 696 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
697 </Issue> 697 </Issue>
698 </Message> 698 </Message>
699 </Messages> 699 </Messages>
700 </Member> 700 </Member>
701 </Members> 701 </Members>
702 </Type> 702 </Type>
703 <Type Name="MapStorage"> 703 <Type Name="MapStorage">
704 <Members> 704 <Members>
705 <Member Name="Map"> 705 <Member Name="Map">
706 <Messages> 706 <Messages>
707 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 707 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
708 <Issue> 708 <Issue>
709 <Item>Map</Item> 709 <Item>Map</Item>
710 </Issue> 710 </Issue>
711 </Message> 711 </Message>
712 </Messages> 712 </Messages>
713 </Member> 713 </Member>
714 </Members> 714 </Members>
715 </Type> 715 </Type>
716 </Types> 716 </Types>
717 </Namespace> 717 </Namespace>
718 </Namespaces> 718 </Namespaces>
719 </Module> 719 </Module>
720 </Modules> 720 </Modules>
721 </Target> 721 </Target>
722 <Target Name="$(ProjectDir)/bin/OpenSim.exe"> 722 <Target Name="$(ProjectDir)/bin/OpenSim.exe">
723 <Modules> 723 <Modules>
724 <Module Name="opensim.exe"> 724 <Module Name="opensim.exe">
725 <Messages> 725 <Messages>
726 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 726 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
727 <Issue> 727 <Issue>
728 <Item>OpenSim</Item> 728 <Item>OpenSim</Item>
729 </Issue> 729 </Issue>
730 </Message> 730 </Message>
731 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 731 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
732 <Issue Name="NoStrongName"> 732 <Issue Name="NoStrongName">
733 <Item>OpenSim</Item> 733 <Item>OpenSim</Item>
734 </Issue> 734 </Issue>
735 </Message> 735 </Message>
736 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z"> 736 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z">
737 <Issue> 737 <Issue>
738 <Item>OpenSim</Item> 738 <Item>OpenSim</Item>
739 </Issue> 739 </Issue>
740 </Message> 740 </Message>
741 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 741 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
742 <Issue Name="NoAttr"> 742 <Issue Name="NoAttr">
743 <Item>OpenSim</Item> 743 <Item>OpenSim</Item>
744 </Issue> 744 </Issue>
745 </Message> 745 </Message>
746 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z"> 746 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z">
747 <Issue Name="NoAttribute" Level="CriticalError"> 747 <Issue Name="NoAttribute" Level="CriticalError">
748 <Item>OpenSim</Item> 748 <Item>OpenSim</Item>
749 </Issue> 749 </Issue>
750 </Message> 750 </Message>
751 </Messages> 751 </Messages>
752 <Namespaces> 752 <Namespaces>
753 <Namespace Name="OpenSim"> 753 <Namespace Name="OpenSim">
754 <Types> 754 <Types>
755 <Type Name="RegionServer"> 755 <Type Name="RegionServer">
756 <Members> 756 <Members>
757 <Member Name="Main(System.String[]):System.Void"> 757 <Member Name="Main(System.String[]):System.Void">
758 <Messages> 758 <Messages>
759 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 759 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
760 <Issue> 760 <Issue>
761 <Item>'args'</Item> 761 <Item>'args'</Item>
762 <Item>RegionServer.Main(String[]):Void</Item> 762 <Item>RegionServer.Main(String[]):Void</Item>
763 </Issue> 763 </Issue>
764 <Issue> 764 <Issue>
765 <Item>'args'</Item> 765 <Item>'args'</Item>
766 <Item>RegionServer.Main(String[]):Void</Item> 766 <Item>RegionServer.Main(String[]):Void</Item>
767 </Issue> 767 </Issue>
768 </Message> 768 </Message>
769 </Messages> 769 </Messages>
770 </Member> 770 </Member>
771 </Members> 771 </Members>
772 </Type> 772 </Type>
773 </Types> 773 </Types>
774 </Namespace> 774 </Namespace>
775 </Namespaces> 775 </Namespaces>
776 </Module> 776 </Module>
777 </Modules> 777 </Modules>
778 </Target> 778 </Target>
779 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll"> 779 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll">
780 <Modules> 780 <Modules>
781 <Module Name="opensim.framework.console.dll"> 781 <Module Name="opensim.framework.console.dll">
782 <Messages> 782 <Messages>
783 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 783 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
784 <Issue> 784 <Issue>
785 <Item>OpenSim.Framework.Console</Item> 785 <Item>OpenSim.Framework.Console</Item>
786 </Issue> 786 </Issue>
787 </Message> 787 </Message>
788 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 788 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
789 <Issue Name="NoStrongName"> 789 <Issue Name="NoStrongName">
790 <Item>OpenSim.Framework.Console</Item> 790 <Item>OpenSim.Framework.Console</Item>
791 </Issue> 791 </Issue>
792 </Message> 792 </Message>
793 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 793 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
794 <Issue Name="NoAttr"> 794 <Issue Name="NoAttr">
795 <Item>OpenSim.Framework.Console</Item> 795 <Item>OpenSim.Framework.Console</Item>
796 </Issue> 796 </Issue>
797 </Message> 797 </Message>
798 </Messages> 798 </Messages>
799 <Namespaces> 799 <Namespaces>
800 <Namespace Name="OpenSim.Framework.Console"> 800 <Namespace Name="OpenSim.Framework.Console">
801 <Types> 801 <Types>
802 <Type Name="ConsoleBase"> 802 <Type Name="ConsoleBase">
803 <Members> 803 <Members>
804 <Member Name="CmdPrompt(System.String,System.String):System.String"> 804 <Member Name="CmdPrompt(System.String,System.String):System.String">
805 <Messages> 805 <Messages>
806 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 806 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
807 <Issue Name="Parameter"> 807 <Issue Name="Parameter">
808 <Item>ConsoleBase.CmdPrompt(String, String):String</Item> 808 <Item>ConsoleBase.CmdPrompt(String, String):String</Item>
809 <Item>defaultresponse</Item> 809 <Item>defaultresponse</Item>
810 <Item>defaultresponse</Item> 810 <Item>defaultresponse</Item>
811 </Issue> 811 </Issue>
812 </Message> 812 </Message>
813 </Messages> 813 </Messages>
814 </Member> 814 </Member>
815 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String"> 815 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String">
816 <Messages> 816 <Messages>
817 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 817 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
818 <Issue Name="Parameter"> 818 <Issue Name="Parameter">
819 <Item>OptionA</Item> 819 <Item>OptionA</Item>
820 </Issue> 820 </Issue>
821 </Message> 821 </Message>
822 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 822 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
823 <Issue Name="Parameter"> 823 <Issue Name="Parameter">
824 <Item>OptionB</Item> 824 <Item>OptionB</Item>
825 </Issue> 825 </Issue>
826 </Message> 826 </Message>
827 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 827 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
828 <Issue Name="Parameter"> 828 <Issue Name="Parameter">
829 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item> 829 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item>
830 <Item>defaultresponse</Item> 830 <Item>defaultresponse</Item>
831 <Item>defaultresponse</Item> 831 <Item>defaultresponse</Item>
832 </Issue> 832 </Issue>
833 </Message> 833 </Message>
834 </Messages> 834 </Messages>
835 </Member> 835 </Member>
836 <Member Name="RunCmd(System.String,System.String[]):System.Object"> 836 <Member Name="RunCmd(System.String,System.String[]):System.Object">
837 <Messages> 837 <Messages>
838 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 838 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
839 <Issue Name="Parameter"> 839 <Issue Name="Parameter">
840 <Item>Cmd</Item> 840 <Item>Cmd</Item>
841 </Issue> 841 </Issue>
842 </Message> 842 </Message>
843 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 843 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
844 <Issue Name="Parameter"> 844 <Issue Name="Parameter">
845 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item> 845 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item>
846 <Item>cmdparams</Item> 846 <Item>cmdparams</Item>
847 <Item>cmdparams</Item> 847 <Item>cmdparams</Item>
848 </Issue> 848 </Issue>
849 </Message> 849 </Message>
850 </Messages> 850 </Messages>
851 </Member> 851 </Member>
852 <Member Name="ShowCommands(System.String):System.Void"> 852 <Member Name="ShowCommands(System.String):System.Void">
853 <Messages> 853 <Messages>
854 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 854 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
855 <Issue Name="Parameter"> 855 <Issue Name="Parameter">
856 <Item>ShowWhat</Item> 856 <Item>ShowWhat</Item>
857 </Issue> 857 </Issue>
858 </Message> 858 </Message>
859 </Messages> 859 </Messages>
860 </Member> 860 </Member>
861 </Members> 861 </Members>
862 </Type> 862 </Type>
863 <Type Name="ConsoleBase+ConsoleType"> 863 <Type Name="ConsoleBase+ConsoleType">
864 <Members> 864 <Members>
865 <Member Name="SimChat"> 865 <Member Name="SimChat">
866 <Messages> 866 <Messages>
867 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 867 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
868 <Issue Name="Member"> 868 <Issue Name="Member">
869 <Item>Sim</Item> 869 <Item>Sim</Item>
870 <Item>ConsoleType.SimChat</Item> 870 <Item>ConsoleType.SimChat</Item>
871 </Issue> 871 </Issue>
872 </Message> 872 </Message>
873 </Messages> 873 </Messages>
874 </Member> 874 </Member>
875 <Member Name="TCP"> 875 <Member Name="TCP">
876 <Messages> 876 <Messages>
877 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 877 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
878 <Issue Name="Member"> 878 <Issue Name="Member">
879 <Item>ConsoleType.TCP</Item> 879 <Item>ConsoleType.TCP</Item>
880 </Issue> 880 </Issue>
881 </Message> 881 </Message>
882 </Messages> 882 </Messages>
883 </Member> 883 </Member>
884 </Members> 884 </Members>
885 </Type> 885 </Type>
886 <Type Name="MainConsole"> 886 <Type Name="MainConsole">
887 <Messages> 887 <Messages>
888 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z"> 888 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
889 <Issue> 889 <Issue>
890 <Item>MainConsole</Item> 890 <Item>MainConsole</Item>
891 </Issue> 891 </Issue>
892 </Message> 892 </Message>
893 </Messages> 893 </Messages>
894 </Type> 894 </Type>
895 </Types> 895 </Types>
896 </Namespace> 896 </Namespace>
897 </Namespaces> 897 </Namespaces>
898 </Module> 898 </Module>
899 </Modules> 899 </Modules>
900 </Target> 900 </Target>
901 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll"> 901 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll">
902 <Modules> 902 <Modules>
903 <Module Name="opensim.framework.dll"> 903 <Module Name="opensim.framework.dll">
904 <Messages> 904 <Messages>
905 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 905 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
906 <Issue> 906 <Issue>
907 <Item>OpenSim.Framework</Item> 907 <Item>OpenSim.Framework</Item>
908 </Issue> 908 </Issue>
909 </Message> 909 </Message>
910 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 910 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
911 <Issue Name="NoStrongName"> 911 <Issue Name="NoStrongName">
912 <Item>OpenSim.Framework</Item> 912 <Item>OpenSim.Framework</Item>
913 </Issue> 913 </Issue>
914 </Message> 914 </Message>
915 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 915 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
916 <Issue Name="NoAttr"> 916 <Issue Name="NoAttr">
917 <Item>OpenSim.Framework</Item> 917 <Item>OpenSim.Framework</Item>
918 </Issue> 918 </Issue>
919 </Message> 919 </Message>
920 </Messages> 920 </Messages>
921 <Namespaces> 921 <Namespaces>
922 <Namespace Name="OpenSim.Framework.Assets"> 922 <Namespace Name="OpenSim.Framework.Assets">
923 <Types> 923 <Types>
924 <Type Name="AssetBase"> 924 <Type Name="AssetBase">
925 <Members> 925 <Members>
926 <Member Name="Data"> 926 <Member Name="Data">
927 <Messages> 927 <Messages>
928 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 928 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
929 <Issue> 929 <Issue>
930 <Item>Data</Item> 930 <Item>Data</Item>
931 </Issue> 931 </Issue>
932 </Message> 932 </Message>
933 </Messages> 933 </Messages>
934 </Member> 934 </Member>
935 <Member Name="Description"> 935 <Member Name="Description">
936 <Messages> 936 <Messages>
937 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 937 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
938 <Issue> 938 <Issue>
939 <Item>Description</Item> 939 <Item>Description</Item>
940 </Issue> 940 </Issue>
941 </Message> 941 </Message>
942 </Messages> 942 </Messages>
943 </Member> 943 </Member>
944 <Member Name="FullID"> 944 <Member Name="FullID">
945 <Messages> 945 <Messages>
946 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 946 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
947 <Issue> 947 <Issue>
948 <Item>FullID</Item> 948 <Item>FullID</Item>
949 </Issue> 949 </Issue>
950 </Message> 950 </Message>
951 </Messages> 951 </Messages>
952 </Member> 952 </Member>
953 <Member Name="InvType"> 953 <Member Name="InvType">
954 <Messages> 954 <Messages>
955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
956 <Issue> 956 <Issue>
957 <Item>InvType</Item> 957 <Item>InvType</Item>
958 </Issue> 958 </Issue>
959 </Message> 959 </Message>
960 </Messages> 960 </Messages>
961 </Member> 961 </Member>
962 <Member Name="Name"> 962 <Member Name="Name">
963 <Messages> 963 <Messages>
964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
965 <Issue> 965 <Issue>
966 <Item>Name</Item> 966 <Item>Name</Item>
967 </Issue> 967 </Issue>
968 </Message> 968 </Message>
969 </Messages> 969 </Messages>
970 </Member> 970 </Member>
971 <Member Name="Type"> 971 <Member Name="Type">
972 <Messages> 972 <Messages>
973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
974 <Issue> 974 <Issue>
975 <Item>Type</Item> 975 <Item>Type</Item>
976 </Issue> 976 </Issue>
977 </Message> 977 </Message>
978 </Messages> 978 </Messages>
979 </Member> 979 </Member>
980 </Members> 980 </Members>
981 </Type> 981 </Type>
982 <Type Name="PrimData"> 982 <Type Name="PrimData">
983 <Members> 983 <Members>
984 <Member Name=".ctor()"> 984 <Member Name=".ctor()">
985 <Messages> 985 <Messages>
986 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 986 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
987 <Issue> 987 <Issue>
988 <Item>PrimData.PrimData()</Item> 988 <Item>PrimData.PrimData()</Item>
989 <Item>ParentID</Item> 989 <Item>ParentID</Item>
990 <Item>System.UInt32</Item> 990 <Item>System.UInt32</Item>
991 <Item>0</Item> 991 <Item>0</Item>
992 </Issue> 992 </Issue>
993 </Message> 993 </Message>
994 </Messages> 994 </Messages>
995 </Member> 995 </Member>
996 <Member Name="FullID"> 996 <Member Name="FullID">
997 <Messages> 997 <Messages>
998 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 998 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
999 <Issue> 999 <Issue>
1000 <Item>FullID</Item> 1000 <Item>FullID</Item>
1001 </Issue> 1001 </Issue>
1002 </Message> 1002 </Message>
1003 </Messages> 1003 </Messages>
1004 </Member> 1004 </Member>
1005 <Member Name="LocalID"> 1005 <Member Name="LocalID">
1006 <Messages> 1006 <Messages>
1007 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1007 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1008 <Issue> 1008 <Issue>
1009 <Item>LocalID</Item> 1009 <Item>LocalID</Item>
1010 </Issue> 1010 </Issue>
1011 </Message> 1011 </Message>
1012 </Messages> 1012 </Messages>
1013 </Member> 1013 </Member>
1014 <Member Name="OwnerID"> 1014 <Member Name="OwnerID">
1015 <Messages> 1015 <Messages>
1016 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1016 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1017 <Issue> 1017 <Issue>
1018 <Item>OwnerID</Item> 1018 <Item>OwnerID</Item>
1019 </Issue> 1019 </Issue>
1020 </Message> 1020 </Message>
1021 </Messages> 1021 </Messages>
1022 </Member> 1022 </Member>
1023 <Member Name="ParentID"> 1023 <Member Name="ParentID">
1024 <Messages> 1024 <Messages>
1025 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1025 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1026 <Issue> 1026 <Issue>
1027 <Item>ParentID</Item> 1027 <Item>ParentID</Item>
1028 </Issue> 1028 </Issue>
1029 </Message> 1029 </Message>
1030 </Messages> 1030 </Messages>
1031 </Member> 1031 </Member>
1032 <Member Name="PathBegin"> 1032 <Member Name="PathBegin">
1033 <Messages> 1033 <Messages>
1034 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1034 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1035 <Issue> 1035 <Issue>
1036 <Item>PathBegin</Item> 1036 <Item>PathBegin</Item>
1037 </Issue> 1037 </Issue>
1038 </Message> 1038 </Message>
1039 </Messages> 1039 </Messages>
1040 </Member> 1040 </Member>
1041 <Member Name="PathCurve"> 1041 <Member Name="PathCurve">
1042 <Messages> 1042 <Messages>
1043 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1043 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1044 <Issue> 1044 <Issue>
1045 <Item>PathCurve</Item> 1045 <Item>PathCurve</Item>
1046 </Issue> 1046 </Issue>
1047 </Message> 1047 </Message>
1048 </Messages> 1048 </Messages>
1049 </Member> 1049 </Member>
1050 <Member Name="PathEnd"> 1050 <Member Name="PathEnd">
1051 <Messages> 1051 <Messages>
1052 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1052 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1053 <Issue> 1053 <Issue>
1054 <Item>PathEnd</Item> 1054 <Item>PathEnd</Item>
1055 </Issue> 1055 </Issue>
1056 </Message> 1056 </Message>
1057 </Messages> 1057 </Messages>
1058 </Member> 1058 </Member>
1059 <Member Name="PathRadiusOffset"> 1059 <Member Name="PathRadiusOffset">
1060 <Messages> 1060 <Messages>
1061 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1061 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1062 <Issue> 1062 <Issue>
1063 <Item>PathRadiusOffset</Item> 1063 <Item>PathRadiusOffset</Item>
1064 </Issue> 1064 </Issue>
1065 </Message> 1065 </Message>
1066 </Messages> 1066 </Messages>
1067 </Member> 1067 </Member>
1068 <Member Name="PathRevolutions"> 1068 <Member Name="PathRevolutions">
1069 <Messages> 1069 <Messages>
1070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1071 <Issue> 1071 <Issue>
1072 <Item>PathRevolutions</Item> 1072 <Item>PathRevolutions</Item>
1073 </Issue> 1073 </Issue>
1074 </Message> 1074 </Message>
1075 </Messages> 1075 </Messages>
1076 </Member> 1076 </Member>
1077 <Member Name="PathScaleX"> 1077 <Member Name="PathScaleX">
1078 <Messages> 1078 <Messages>
1079 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1079 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1080 <Issue> 1080 <Issue>
1081 <Item>PathScaleX</Item> 1081 <Item>PathScaleX</Item>
1082 </Issue> 1082 </Issue>
1083 </Message> 1083 </Message>
1084 </Messages> 1084 </Messages>
1085 </Member> 1085 </Member>
1086 <Member Name="PathScaleY"> 1086 <Member Name="PathScaleY">
1087 <Messages> 1087 <Messages>
1088 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1088 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1089 <Issue> 1089 <Issue>
1090 <Item>PathScaleY</Item> 1090 <Item>PathScaleY</Item>
1091 </Issue> 1091 </Issue>
1092 </Message> 1092 </Message>
1093 </Messages> 1093 </Messages>
1094 </Member> 1094 </Member>
1095 <Member Name="PathShearX"> 1095 <Member Name="PathShearX">
1096 <Messages> 1096 <Messages>
1097 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1097 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1098 <Issue> 1098 <Issue>
1099 <Item>PathShearX</Item> 1099 <Item>PathShearX</Item>
1100 </Issue> 1100 </Issue>
1101 </Message> 1101 </Message>
1102 </Messages> 1102 </Messages>
1103 </Member> 1103 </Member>
1104 <Member Name="PathShearY"> 1104 <Member Name="PathShearY">
1105 <Messages> 1105 <Messages>
1106 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1106 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1107 <Issue> 1107 <Issue>
1108 <Item>PathShearY</Item> 1108 <Item>PathShearY</Item>
1109 </Issue> 1109 </Issue>
1110 </Message> 1110 </Message>
1111 </Messages> 1111 </Messages>
1112 </Member> 1112 </Member>
1113 <Member Name="PathSkew"> 1113 <Member Name="PathSkew">
1114 <Messages> 1114 <Messages>
1115 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1115 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1116 <Issue> 1116 <Issue>
1117 <Item>PathSkew</Item> 1117 <Item>PathSkew</Item>
1118 </Issue> 1118 </Issue>
1119 </Message> 1119 </Message>
1120 </Messages> 1120 </Messages>
1121 </Member> 1121 </Member>
1122 <Member Name="PathTaperX"> 1122 <Member Name="PathTaperX">
1123 <Messages> 1123 <Messages>
1124 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1124 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1125 <Issue> 1125 <Issue>
1126 <Item>PathTaperX</Item> 1126 <Item>PathTaperX</Item>
1127 </Issue> 1127 </Issue>
1128 </Message> 1128 </Message>
1129 </Messages> 1129 </Messages>
1130 </Member> 1130 </Member>
1131 <Member Name="PathTaperY"> 1131 <Member Name="PathTaperY">
1132 <Messages> 1132 <Messages>
1133 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1133 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1134 <Issue> 1134 <Issue>
1135 <Item>PathTaperY</Item> 1135 <Item>PathTaperY</Item>
1136 </Issue> 1136 </Issue>
1137 </Message> 1137 </Message>
1138 </Messages> 1138 </Messages>
1139 </Member> 1139 </Member>
1140 <Member Name="PathTwist"> 1140 <Member Name="PathTwist">
1141 <Messages> 1141 <Messages>
1142 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1142 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1143 <Issue> 1143 <Issue>
1144 <Item>PathTwist</Item> 1144 <Item>PathTwist</Item>
1145 </Issue> 1145 </Issue>
1146 </Message> 1146 </Message>
1147 </Messages> 1147 </Messages>
1148 </Member> 1148 </Member>
1149 <Member Name="PathTwistBegin"> 1149 <Member Name="PathTwistBegin">
1150 <Messages> 1150 <Messages>
1151 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1151 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1152 <Issue> 1152 <Issue>
1153 <Item>PathTwistBegin</Item> 1153 <Item>PathTwistBegin</Item>
1154 </Issue> 1154 </Issue>
1155 </Message> 1155 </Message>
1156 </Messages> 1156 </Messages>
1157 </Member> 1157 </Member>
1158 <Member Name="PCode"> 1158 <Member Name="PCode">
1159 <Messages> 1159 <Messages>
1160 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1160 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1161 <Issue> 1161 <Issue>
1162 <Item>PCode</Item> 1162 <Item>PCode</Item>
1163 </Issue> 1163 </Issue>
1164 </Message> 1164 </Message>
1165 </Messages> 1165 </Messages>
1166 </Member> 1166 </Member>
1167 <Member Name="Position"> 1167 <Member Name="Position">
1168 <Messages> 1168 <Messages>
1169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1170 <Issue> 1170 <Issue>
1171 <Item>Position</Item> 1171 <Item>Position</Item>
1172 </Issue> 1172 </Issue>
1173 </Message> 1173 </Message>
1174 </Messages> 1174 </Messages>
1175 </Member> 1175 </Member>
1176 <Member Name="ProfileBegin"> 1176 <Member Name="ProfileBegin">
1177 <Messages> 1177 <Messages>
1178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1179 <Issue> 1179 <Issue>
1180 <Item>ProfileBegin</Item> 1180 <Item>ProfileBegin</Item>
1181 </Issue> 1181 </Issue>
1182 </Message> 1182 </Message>
1183 </Messages> 1183 </Messages>
1184 </Member> 1184 </Member>
1185 <Member Name="ProfileCurve"> 1185 <Member Name="ProfileCurve">
1186 <Messages> 1186 <Messages>
1187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1188 <Issue> 1188 <Issue>
1189 <Item>ProfileCurve</Item> 1189 <Item>ProfileCurve</Item>
1190 </Issue> 1190 </Issue>
1191 </Message> 1191 </Message>
1192 </Messages> 1192 </Messages>
1193 </Member> 1193 </Member>
1194 <Member Name="ProfileEnd"> 1194 <Member Name="ProfileEnd">
1195 <Messages> 1195 <Messages>
1196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1197 <Issue> 1197 <Issue>
1198 <Item>ProfileEnd</Item> 1198 <Item>ProfileEnd</Item>
1199 </Issue> 1199 </Issue>
1200 </Message> 1200 </Message>
1201 </Messages> 1201 </Messages>
1202 </Member> 1202 </Member>
1203 <Member Name="ProfileHollow"> 1203 <Member Name="ProfileHollow">
1204 <Messages> 1204 <Messages>
1205 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1205 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1206 <Issue> 1206 <Issue>
1207 <Item>ProfileHollow</Item> 1207 <Item>ProfileHollow</Item>
1208 </Issue> 1208 </Issue>
1209 </Message> 1209 </Message>
1210 </Messages> 1210 </Messages>
1211 </Member> 1211 </Member>
1212 <Member Name="Rotation"> 1212 <Member Name="Rotation">
1213 <Messages> 1213 <Messages>
1214 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1214 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1215 <Issue> 1215 <Issue>
1216 <Item>Rotation</Item> 1216 <Item>Rotation</Item>
1217 </Issue> 1217 </Issue>
1218 </Message> 1218 </Message>
1219 </Messages> 1219 </Messages>
1220 </Member> 1220 </Member>
1221 <Member Name="Scale"> 1221 <Member Name="Scale">
1222 <Messages> 1222 <Messages>
1223 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1223 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1224 <Issue> 1224 <Issue>
1225 <Item>Scale</Item> 1225 <Item>Scale</Item>
1226 </Issue> 1226 </Issue>
1227 </Message> 1227 </Message>
1228 </Messages> 1228 </Messages>
1229 </Member> 1229 </Member>
1230 <Member Name="Texture"> 1230 <Member Name="Texture">
1231 <Messages> 1231 <Messages>
1232 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1232 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1233 <Issue> 1233 <Issue>
1234 <Item>Texture</Item> 1234 <Item>Texture</Item>
1235 </Issue> 1235 </Issue>
1236 </Message> 1236 </Message>
1237 </Messages> 1237 </Messages>
1238 </Member> 1238 </Member>
1239 </Members> 1239 </Members>
1240 </Type> 1240 </Type>
1241 </Types> 1241 </Types>
1242 </Namespace> 1242 </Namespace>
1243 <Namespace Name="OpenSim.Framework.Grid"> 1243 <Namespace Name="OpenSim.Framework.Grid">
1244 <Types> 1244 <Types>
1245 <Type Name="LoginService"> 1245 <Type Name="LoginService">
1246 <Messages> 1246 <Messages>
1247 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1247 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1248 <Issue Name="Type"> 1248 <Issue Name="Type">
1249 <Item>Login</Item> 1249 <Item>Login</Item>
1250 <Item>LoginService</Item> 1250 <Item>LoginService</Item>
1251 <Item>LogOn</Item> 1251 <Item>LogOn</Item>
1252 </Issue> 1252 </Issue>
1253 </Message> 1253 </Message>
1254 </Messages> 1254 </Messages>
1255 </Type> 1255 </Type>
1256 </Types> 1256 </Types>
1257 </Namespace> 1257 </Namespace>
1258 <Namespace Name="OpenSim.Framework.Interfaces"> 1258 <Namespace Name="OpenSim.Framework.Interfaces">
1259 <Types> 1259 <Types>
1260 <Type Name="AgentCircuitData"> 1260 <Type Name="AgentCircuitData">
1261 <Members> 1261 <Members>
1262 <Member Name="AgentID"> 1262 <Member Name="AgentID">
1263 <Messages> 1263 <Messages>
1264 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1264 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1265 <Issue> 1265 <Issue>
1266 <Item>AgentID</Item> 1266 <Item>AgentID</Item>
1267 </Issue> 1267 </Issue>
1268 </Message> 1268 </Message>
1269 </Messages> 1269 </Messages>
1270 </Member> 1270 </Member>
1271 <Member Name="circuitcode"> 1271 <Member Name="circuitcode">
1272 <Messages> 1272 <Messages>
1273 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1273 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1274 <Issue> 1274 <Issue>
1275 <Item>circuitcode</Item> 1275 <Item>circuitcode</Item>
1276 </Issue> 1276 </Issue>
1277 </Message> 1277 </Message>
1278 <Message Id="circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1278 <Message Id="circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1279 <Issue Name="Member"> 1279 <Issue Name="Member">
1280 <Item>circuitcode</Item> 1280 <Item>circuitcode</Item>
1281 <Item>AgentCircuitData.circuitcode</Item> 1281 <Item>AgentCircuitData.circuitcode</Item>
1282 </Issue> 1282 </Issue>
1283 </Message> 1283 </Message>
1284 </Messages> 1284 </Messages>
1285 </Member> 1285 </Member>
1286 <Member Name="firstname"> 1286 <Member Name="firstname">
1287 <Messages> 1287 <Messages>
1288 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1288 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1289 <Issue> 1289 <Issue>
1290 <Item>firstname</Item> 1290 <Item>firstname</Item>
1291 </Issue> 1291 </Issue>
1292 </Message> 1292 </Message>
1293 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1293 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1294 <Issue Name="Member"> 1294 <Issue Name="Member">
1295 <Item>firstname</Item> 1295 <Item>firstname</Item>
1296 <Item>AgentCircuitData.firstname</Item> 1296 <Item>AgentCircuitData.firstname</Item>
1297 </Issue> 1297 </Issue>
1298 </Message> 1298 </Message>
1299 </Messages> 1299 </Messages>
1300 </Member> 1300 </Member>
1301 <Member Name="lastname"> 1301 <Member Name="lastname">
1302 <Messages> 1302 <Messages>
1303 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1303 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1304 <Issue> 1304 <Issue>
1305 <Item>lastname</Item> 1305 <Item>lastname</Item>
1306 </Issue> 1306 </Issue>
1307 </Message> 1307 </Message>
1308 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1308 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1309 <Issue Name="Member"> 1309 <Issue Name="Member">
1310 <Item>lastname</Item> 1310 <Item>lastname</Item>
1311 <Item>AgentCircuitData.lastname</Item> 1311 <Item>AgentCircuitData.lastname</Item>
1312 </Issue> 1312 </Issue>
1313 </Message> 1313 </Message>
1314 </Messages> 1314 </Messages>
1315 </Member> 1315 </Member>
1316 <Member Name="SecureSessionID"> 1316 <Member Name="SecureSessionID">
1317 <Messages> 1317 <Messages>
1318 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1318 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1319 <Issue> 1319 <Issue>
1320 <Item>SecureSessionID</Item> 1320 <Item>SecureSessionID</Item>
1321 </Issue> 1321 </Issue>
1322 </Message> 1322 </Message>
1323 </Messages> 1323 </Messages>
1324 </Member> 1324 </Member>
1325 <Member Name="SessionID"> 1325 <Member Name="SessionID">
1326 <Messages> 1326 <Messages>
1327 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1327 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1328 <Issue> 1328 <Issue>
1329 <Item>SessionID</Item> 1329 <Item>SessionID</Item>
1330 </Issue> 1330 </Issue>
1331 </Message> 1331 </Message>
1332 </Messages> 1332 </Messages>
1333 </Member> 1333 </Member>
1334 </Members> 1334 </Members>
1335 </Type> 1335 </Type>
1336 <Type Name="ARequest"> 1336 <Type Name="ARequest">
1337 <Messages> 1337 <Messages>
1338 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z"> 1338 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z">
1339 <Issue Name="Equals"> 1339 <Issue Name="Equals">
1340 <Item>OpenSim.Framework.Interfaces.ARequest</Item> 1340 <Item>OpenSim.Framework.Interfaces.ARequest</Item>
1341 </Issue> 1341 </Issue>
1342 <Issue Name="op_Equality"> 1342 <Issue Name="op_Equality">
1343 <Item>OpenSim.Framework.Interfaces.ARequest</Item> 1343 <Item>OpenSim.Framework.Interfaces.ARequest</Item>
1344 </Issue> 1344 </Issue>
1345 </Message> 1345 </Message>
1346 </Messages> 1346 </Messages>
1347 <Members> 1347 <Members>
1348 <Member Name="AssetID"> 1348 <Member Name="AssetID">
1349 <Messages> 1349 <Messages>
1350 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1350 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1351 <Issue> 1351 <Issue>
1352 <Item>AssetID</Item> 1352 <Item>AssetID</Item>
1353 </Issue> 1353 </Issue>
1354 </Message> 1354 </Message>
1355 </Messages> 1355 </Messages>
1356 </Member> 1356 </Member>
1357 <Member Name="IsTexture"> 1357 <Member Name="IsTexture">
1358 <Messages> 1358 <Messages>
1359 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1359 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1360 <Issue> 1360 <Issue>
1361 <Item>IsTexture</Item> 1361 <Item>IsTexture</Item>
1362 </Issue> 1362 </Issue>
1363 </Message> 1363 </Message>
1364 </Messages> 1364 </Messages>
1365 </Member> 1365 </Member>
1366 </Members> 1366 </Members>
1367 </Type> 1367 </Type>
1368 <Type Name="AuthenticateResponse"> 1368 <Type Name="AuthenticateResponse">
1369 <Members> 1369 <Members>
1370 <Member Name="Authorised"> 1370 <Member Name="Authorised">
1371 <Messages> 1371 <Messages>
1372 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1372 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1373 <Issue> 1373 <Issue>
1374 <Item>Authorised</Item> 1374 <Item>Authorised</Item>
1375 </Issue> 1375 </Issue>
1376 </Message> 1376 </Message>
1377 <Message Id="Authorised" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1377 <Message Id="Authorised" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1378 <Issue Name="Member"> 1378 <Issue Name="Member">
1379 <Item>Authorised</Item> 1379 <Item>Authorised</Item>
1380 <Item>AuthenticateResponse.Authorised</Item> 1380 <Item>AuthenticateResponse.Authorised</Item>
1381 </Issue> 1381 </Issue>
1382 </Message> 1382 </Message>
1383 </Messages> 1383 </Messages>
1384 </Member> 1384 </Member>
1385 <Member Name="LoginInfo"> 1385 <Member Name="LoginInfo">
1386 <Messages> 1386 <Messages>
1387 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1387 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1388 <Issue> 1388 <Issue>
1389 <Item>LoginInfo</Item> 1389 <Item>LoginInfo</Item>
1390 </Issue> 1390 </Issue>
1391 </Message> 1391 </Message>
1392 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1392 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1393 <Issue Name="Member"> 1393 <Issue Name="Member">
1394 <Item>Login</Item> 1394 <Item>Login</Item>
1395 <Item>LoginInfo</Item> 1395 <Item>LoginInfo</Item>
1396 <Item>LogOn</Item> 1396 <Item>LogOn</Item>
1397 </Issue> 1397 </Issue>
1398 </Message> 1398 </Message>
1399 </Messages> 1399 </Messages>
1400 </Member> 1400 </Member>
1401 </Members> 1401 </Members>
1402 </Type> 1402 </Type>
1403 <Type Name="IAssetPlugin"> 1403 <Type Name="IAssetPlugin">
1404 <Messages> 1404 <Messages>
1405 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1405 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1406 <Issue Name="Type"> 1406 <Issue Name="Type">
1407 <Item>Plugin</Item> 1407 <Item>Plugin</Item>
1408 <Item>OpenSim.Framework.Interfaces.IAssetPlugin</Item> 1408 <Item>OpenSim.Framework.Interfaces.IAssetPlugin</Item>
1409 </Issue> 1409 </Issue>
1410 </Message> 1410 </Message>
1411 </Messages> 1411 </Messages>
1412 <Members> 1412 <Members>
1413 <Member Name="GetAssetServer():OpenSim.Framework.Interfaces.IAssetServer"> 1413 <Member Name="GetAssetServer():OpenSim.Framework.Interfaces.IAssetServer">
1414 <Messages> 1414 <Messages>
1415 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 1415 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1416 <Issue Certainty="50"> 1416 <Issue Certainty="50">
1417 <Item>GetAssetServer</Item> 1417 <Item>GetAssetServer</Item>
1418 </Issue> 1418 </Issue>
1419 </Message> 1419 </Message>
1420 </Messages> 1420 </Messages>
1421 </Member> 1421 </Member>
1422 </Members> 1422 </Members>
1423 </Type> 1423 </Type>
1424 <Type Name="IAssetReceiver"> 1424 <Type Name="IAssetReceiver">
1425 <Members> 1425 <Members>
1426 <Member Name="AssetReceived(OpenSim.Framework.Assets.AssetBase,System.Boolean):System.Void"> 1426 <Member Name="AssetReceived(OpenSim.Framework.Assets.AssetBase,System.Boolean):System.Void">
1427 <Messages> 1427 <Messages>
1428 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1428 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1429 <Issue Name="Parameter"> 1429 <Issue Name="Parameter">
1430 <Item>IsTexture</Item> 1430 <Item>IsTexture</Item>
1431 </Issue> 1431 </Issue>
1432 </Message> 1432 </Message>
1433 </Messages> 1433 </Messages>
1434 </Member> 1434 </Member>
1435 </Members> 1435 </Members>
1436 </Type> 1436 </Type>
1437 <Type Name="IAssetServer"> 1437 <Type Name="IAssetServer">
1438 <Members> 1438 <Members>
1439 <Member Name="RequestAsset(libsecondlife.LLUUID,System.Boolean):System.Void"> 1439 <Member Name="RequestAsset(libsecondlife.LLUUID,System.Boolean):System.Void">
1440 <Messages> 1440 <Messages>
1441 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1441 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1442 <Issue Name="ParameterId"> 1442 <Issue Name="ParameterId">
1443 <Item>ID</Item> 1443 <Item>ID</Item>
1444 <Item>assetID</Item> 1444 <Item>assetID</Item>
1445 <Item>Id</Item> 1445 <Item>Id</Item>
1446 </Issue> 1446 </Issue>
1447 </Message> 1447 </Message>
1448 </Messages> 1448 </Messages>
1449 </Member> 1449 </Member>
1450 <Member Name="SetServerInfo(System.String,System.String):System.Void"> 1450 <Member Name="SetServerInfo(System.String,System.String):System.Void">
1451 <Messages> 1451 <Messages>
1452 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1452 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1453 <Issue Name="Parameter"> 1453 <Issue Name="Parameter">
1454 <Item>ServerUrl</Item> 1454 <Item>ServerUrl</Item>
1455 </Issue> 1455 </Issue>
1456 </Message> 1456 </Message>
1457 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1457 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1458 <Issue Name="Parameter"> 1458 <Issue Name="Parameter">
1459 <Item>ServerKey</Item> 1459 <Item>ServerKey</Item>
1460 </Issue> 1460 </Issue>
1461 </Message> 1461 </Message>
1462 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z"> 1462 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1463 <Issue> 1463 <Issue>
1464 <Item>ServerUrl</Item> 1464 <Item>ServerUrl</Item>
1465 <Item>IAssetServer.SetServerInfo(String, String):Void</Item> 1465 <Item>IAssetServer.SetServerInfo(String, String):Void</Item>
1466 </Issue> 1466 </Issue>
1467 </Message> 1467 </Message>
1468 </Messages> 1468 </Messages>
1469 </Member> 1469 </Member>
1470 </Members> 1470 </Members>
1471 </Type> 1471 </Type>
1472 <Type Name="IGridPlugin"> 1472 <Type Name="IGridPlugin">
1473 <Messages> 1473 <Messages>
1474 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1474 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1475 <Issue Name="Type"> 1475 <Issue Name="Type">
1476 <Item>Plugin</Item> 1476 <Item>Plugin</Item>
1477 <Item>OpenSim.Framework.Interfaces.IGridPlugin</Item> 1477 <Item>OpenSim.Framework.Interfaces.IGridPlugin</Item>
1478 </Issue> 1478 </Issue>
1479 </Message> 1479 </Message>
1480 </Messages> 1480 </Messages>
1481 <Members> 1481 <Members>
1482 <Member Name="GetGridServer():OpenSim.Framework.Interfaces.IGridServer"> 1482 <Member Name="GetGridServer():OpenSim.Framework.Interfaces.IGridServer">
1483 <Messages> 1483 <Messages>
1484 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 1484 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1485 <Issue Certainty="50"> 1485 <Issue Certainty="50">
1486 <Item>GetGridServer</Item> 1486 <Item>GetGridServer</Item>
1487 </Issue> 1487 </Issue>
1488 </Message> 1488 </Message>
1489 </Messages> 1489 </Messages>
1490 </Member> 1490 </Member>
1491 </Members> 1491 </Members>
1492 </Type> 1492 </Type>
1493 <Type Name="IGridServer"> 1493 <Type Name="IGridServer">
1494 <Members> 1494 <Members>
1495 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse"> 1495 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse">
1496 <Messages> 1496 <Messages>
1497 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1497 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1498 <Issue Name="ParameterId"> 1498 <Issue Name="ParameterId">
1499 <Item>ID</Item> 1499 <Item>ID</Item>
1500 <Item>sessionID</Item> 1500 <Item>sessionID</Item>
1501 <Item>Id</Item> 1501 <Item>Id</Item>
1502 </Issue> 1502 </Issue>
1503 </Message> 1503 </Message>
1504 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1504 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1505 <Issue Name="ParameterId"> 1505 <Issue Name="ParameterId">
1506 <Item>ID</Item> 1506 <Item>ID</Item>
1507 <Item>agentID</Item> 1507 <Item>agentID</Item>
1508 <Item>Id</Item> 1508 <Item>Id</Item>
1509 </Issue> 1509 </Issue>
1510 </Message> 1510 </Message>
1511 </Messages> 1511 </Messages>
1512 </Member> 1512 </Member>
1513 <Member Name="GetName():System.String"> 1513 <Member Name="GetName():System.String">
1514 <Messages> 1514 <Messages>
1515 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 1515 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1516 <Issue Certainty="50"> 1516 <Issue Certainty="50">
1517 <Item>GetName</Item> 1517 <Item>GetName</Item>
1518 </Issue> 1518 </Issue>
1519 </Message> 1519 </Message>
1520 </Messages> 1520 </Messages>
1521 </Member> 1521 </Member>
1522 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean"> 1522 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1523 <Messages> 1523 <Messages>
1524 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1524 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1525 <Issue Name="ParameterId"> 1525 <Issue Name="ParameterId">
1526 <Item>ID</Item> 1526 <Item>ID</Item>
1527 <Item>sessionID</Item> 1527 <Item>sessionID</Item>
1528 <Item>Id</Item> 1528 <Item>Id</Item>
1529 </Issue> 1529 </Issue>
1530 </Message> 1530 </Message>
1531 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1531 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1532 <Issue Name="ParameterId"> 1532 <Issue Name="ParameterId">
1533 <Item>ID</Item> 1533 <Item>ID</Item>
1534 <Item>agentID</Item> 1534 <Item>agentID</Item>
1535 <Item>Id</Item> 1535 <Item>Id</Item>
1536 </Issue> 1536 </Issue>
1537 </Message> 1537 </Message>
1538 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1538 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1539 <Issue Name="Member"> 1539 <Issue Name="Member">
1540 <Item>Logout</Item> 1540 <Item>Logout</Item>
1541 <Item>LogoutSession</Item> 1541 <Item>LogoutSession</Item>
1542 <Item>LogOff</Item> 1542 <Item>LogOff</Item>
1543 </Issue> 1543 </Issue>
1544 </Message> 1544 </Message>
1545 </Messages> 1545 </Messages>
1546 </Member> 1546 </Member>
1547 <Member Name="RequestNeighbours():OpenSim.Framework.Interfaces.NeighbourInfo[]"> 1547 <Member Name="RequestNeighbours():OpenSim.Framework.Interfaces.NeighbourInfo[]">
1548 <Messages> 1548 <Messages>
1549 <Message Id="Neighbours" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1549 <Message Id="Neighbours" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1550 <Issue Name="Member"> 1550 <Issue Name="Member">
1551 <Item>Neighbours</Item> 1551 <Item>Neighbours</Item>
1552 <Item>IGridServer.RequestNeighbours():NeighbourInfo[]</Item> 1552 <Item>IGridServer.RequestNeighbours():NeighbourInfo[]</Item>
1553 </Issue> 1553 </Issue>
1554 </Message> 1554 </Message>
1555 </Messages> 1555 </Messages>
1556 </Member> 1556 </Member>
1557 <Member Name="RequestUUIDBlock():OpenSim.Framework.Interfaces.UUIDBlock"> 1557 <Member Name="RequestUUIDBlock():OpenSim.Framework.Interfaces.UUIDBlock">
1558 <Messages> 1558 <Messages>
1559 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 1559 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
1560 <Issue Name="Member"> 1560 <Issue Name="Member">
1561 <Item>IGridServer.RequestUUIDBlock():UUIDBlock</Item> 1561 <Item>IGridServer.RequestUUIDBlock():UUIDBlock</Item>
1562 </Issue> 1562 </Issue>
1563 </Message> 1563 </Message>
1564 </Messages> 1564 </Messages>
1565 </Member> 1565 </Member>
1566 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void"> 1566 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void">
1567 <Messages> 1567 <Messages>
1568 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1568 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1569 <Issue Name="Parameter"> 1569 <Issue Name="Parameter">
1570 <Item>ServerUrl</Item> 1570 <Item>ServerUrl</Item>
1571 </Issue> 1571 </Issue>
1572 </Message> 1572 </Message>
1573 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1573 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1574 <Issue Name="Parameter"> 1574 <Issue Name="Parameter">
1575 <Item>SendKey</Item> 1575 <Item>SendKey</Item>
1576 </Issue> 1576 </Issue>
1577 </Message> 1577 </Message>
1578 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1578 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1579 <Issue Name="Parameter"> 1579 <Issue Name="Parameter">
1580 <Item>RecvKey</Item> 1580 <Item>RecvKey</Item>
1581 </Issue> 1581 </Issue>
1582 </Message> 1582 </Message>
1583 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1583 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1584 <Issue Name="Parameter"> 1584 <Issue Name="Parameter">
1585 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item> 1585 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item>
1586 <Item>Recv</Item> 1586 <Item>Recv</Item>
1587 <Item>RecvKey</Item> 1587 <Item>RecvKey</Item>
1588 </Issue> 1588 </Issue>
1589 </Message> 1589 </Message>
1590 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z"> 1590 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1591 <Issue> 1591 <Issue>
1592 <Item>ServerUrl</Item> 1592 <Item>ServerUrl</Item>
1593 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item> 1593 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item>
1594 </Issue> 1594 </Issue>
1595 </Message> 1595 </Message>
1596 </Messages> 1596 </Messages>
1597 </Member> 1597 </Member>
1598 </Members> 1598 </Members>
1599 </Type> 1599 </Type>
1600 <Type Name="ILocalStorage"> 1600 <Type Name="ILocalStorage">
1601 <Members> 1601 <Members>
1602 <Member Name="RemovePrim(libsecondlife.LLUUID):System.Void"> 1602 <Member Name="RemovePrim(libsecondlife.LLUUID):System.Void">
1603 <Messages> 1603 <Messages>
1604 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1604 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1605 <Issue Name="ParameterId"> 1605 <Issue Name="ParameterId">
1606 <Item>ID</Item> 1606 <Item>ID</Item>
1607 <Item>primID</Item> 1607 <Item>primID</Item>
1608 <Item>Id</Item> 1608 <Item>Id</Item>
1609 </Issue> 1609 </Issue>
1610 </Message> 1610 </Message>
1611 </Messages> 1611 </Messages>
1612 </Member> 1612 </Member>
1613 <Member Name="ShutDown():System.Void"> 1613 <Member Name="ShutDown():System.Void">
1614 <Messages> 1614 <Messages>
1615 <Message Id="ShutDown" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z"> 1615 <Message Id="ShutDown" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
1616 <Issue Name="ShouldBeDiscreteTerm"> 1616 <Issue Name="ShouldBeDiscreteTerm">
1617 <Item>ShutDown</Item> 1617 <Item>ShutDown</Item>
1618 <Item>method</Item> 1618 <Item>method</Item>
1619 <Item>ShutDown</Item> 1619 <Item>ShutDown</Item>
1620 <Item>Shutdown</Item> 1620 <Item>Shutdown</Item>
1621 </Issue> 1621 </Issue>
1622 </Message> 1622 </Message>
1623 </Messages> 1623 </Messages>
1624 </Member> 1624 </Member>
1625 </Members> 1625 </Members>
1626 </Type> 1626 </Type>
1627 <Type Name="ISimConfig"> 1627 <Type Name="ISimConfig">
1628 <Messages> 1628 <Messages>
1629 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1629 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1630 <Issue Name="Type"> 1630 <Issue Name="Type">
1631 <Item>Sim</Item> 1631 <Item>Sim</Item>
1632 <Item>OpenSim.Framework.Interfaces.ISimConfig</Item> 1632 <Item>OpenSim.Framework.Interfaces.ISimConfig</Item>
1633 </Issue> 1633 </Issue>
1634 </Message> 1634 </Message>
1635 </Messages> 1635 </Messages>
1636 <Members> 1636 <Members>
1637 <Member Name="GetConfigObject():OpenSim.Framework.Interfaces.SimConfig"> 1637 <Member Name="GetConfigObject():OpenSim.Framework.Interfaces.SimConfig">
1638 <Messages> 1638 <Messages>
1639 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 1639 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1640 <Issue Certainty="50"> 1640 <Issue Certainty="50">
1641 <Item>GetConfigObject</Item> 1641 <Item>GetConfigObject</Item>
1642 </Issue> 1642 </Issue>
1643 </Message> 1643 </Message>
1644 </Messages> 1644 </Messages>
1645 </Member> 1645 </Member>
1646 </Members> 1646 </Members>
1647 </Type> 1647 </Type>
1648 <Type Name="IUserServer"> 1648 <Type Name="IUserServer">
1649 <Members> 1649 <Members>
1650 <Member Name="RequestAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory"> 1650 <Member Name="RequestAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
1651 <Messages> 1651 <Messages>
1652 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 1652 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1653 <Issue Name="ParameterId"> 1653 <Issue Name="ParameterId">
1654 <Item>ID</Item> 1654 <Item>ID</Item>
1655 <Item>agentID</Item> 1655 <Item>agentID</Item>
1656 <Item>Id</Item> 1656 <Item>Id</Item>
1657 </Issue> 1657 </Issue>
1658 </Message> 1658 </Message>
1659 </Messages> 1659 </Messages>
1660 </Member> 1660 </Member>
1661 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void"> 1661 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void">
1662 <Messages> 1662 <Messages>
1663 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1663 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1664 <Issue Name="Parameter"> 1664 <Issue Name="Parameter">
1665 <Item>ServerUrl</Item> 1665 <Item>ServerUrl</Item>
1666 </Issue> 1666 </Issue>
1667 </Message> 1667 </Message>
1668 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1668 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1669 <Issue Name="Parameter"> 1669 <Issue Name="Parameter">
1670 <Item>SendKey</Item> 1670 <Item>SendKey</Item>
1671 </Issue> 1671 </Issue>
1672 </Message> 1672 </Message>
1673 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1673 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1674 <Issue Name="Parameter"> 1674 <Issue Name="Parameter">
1675 <Item>RecvKey</Item> 1675 <Item>RecvKey</Item>
1676 </Issue> 1676 </Issue>
1677 </Message> 1677 </Message>
1678 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1678 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1679 <Issue Name="Parameter"> 1679 <Issue Name="Parameter">
1680 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item> 1680 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item>
1681 <Item>Recv</Item> 1681 <Item>Recv</Item>
1682 <Item>RecvKey</Item> 1682 <Item>RecvKey</Item>
1683 </Issue> 1683 </Issue>
1684 </Message> 1684 </Message>
1685 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z"> 1685 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1686 <Issue> 1686 <Issue>
1687 <Item>ServerUrl</Item> 1687 <Item>ServerUrl</Item>
1688 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item> 1688 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item>
1689 </Issue> 1689 </Issue>
1690 </Message> 1690 </Message>
1691 </Messages> 1691 </Messages>
1692 </Member> 1692 </Member>
1693 </Members> 1693 </Members>
1694 </Type> 1694 </Type>
1695 <Type Name="LocalGridBase"> 1695 <Type Name="LocalGridBase">
1696 <Members> 1696 <Members>
1697 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean"> 1697 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1698 <Messages> 1698 <Messages>
1699 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1699 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1700 <Issue Name="Member"> 1700 <Issue Name="Member">
1701 <Item>Logout</Item> 1701 <Item>Logout</Item>
1702 <Item>LogoutSession</Item> 1702 <Item>LogoutSession</Item>
1703 <Item>LogOff</Item> 1703 <Item>LogOff</Item>
1704 </Issue> 1704 </Issue>
1705 </Message> 1705 </Message>
1706 </Messages> 1706 </Messages>
1707 </Member> 1707 </Member>
1708 </Members> 1708 </Members>
1709 </Type> 1709 </Type>
1710 <Type Name="Login"> 1710 <Type Name="Login">
1711 <Messages> 1711 <Messages>
1712 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1712 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1713 <Issue Name="Type"> 1713 <Issue Name="Type">
1714 <Item>Login</Item> 1714 <Item>Login</Item>
1715 <Item>Login</Item> 1715 <Item>Login</Item>
1716 <Item>LogOn</Item> 1716 <Item>LogOn</Item>
1717 </Issue> 1717 </Issue>
1718 </Message> 1718 </Message>
1719 </Messages> 1719 </Messages>
1720 <Members> 1720 <Members>
1721 <Member Name="Agent"> 1721 <Member Name="Agent">
1722 <Messages> 1722 <Messages>
1723 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1723 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1724 <Issue> 1724 <Issue>
1725 <Item>Agent</Item> 1725 <Item>Agent</Item>
1726 </Issue> 1726 </Issue>
1727 </Message> 1727 </Message>
1728 </Messages> 1728 </Messages>
1729 </Member> 1729 </Member>
1730 <Member Name="BaseFolder"> 1730 <Member Name="BaseFolder">
1731 <Messages> 1731 <Messages>
1732 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1732 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1733 <Issue> 1733 <Issue>
1734 <Item>BaseFolder</Item> 1734 <Item>BaseFolder</Item>
1735 </Issue> 1735 </Issue>
1736 </Message> 1736 </Message>
1737 </Messages> 1737 </Messages>
1738 </Member> 1738 </Member>
1739 <Member Name="First"> 1739 <Member Name="First">
1740 <Messages> 1740 <Messages>
1741 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1741 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1742 <Issue> 1742 <Issue>
1743 <Item>First</Item> 1743 <Item>First</Item>
1744 </Issue> 1744 </Issue>
1745 </Message> 1745 </Message>
1746 </Messages> 1746 </Messages>
1747 </Member> 1747 </Member>
1748 <Member Name="InventoryFolder"> 1748 <Member Name="InventoryFolder">
1749 <Messages> 1749 <Messages>
1750 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1750 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1751 <Issue> 1751 <Issue>
1752 <Item>InventoryFolder</Item> 1752 <Item>InventoryFolder</Item>
1753 </Issue> 1753 </Issue>
1754 </Message> 1754 </Message>
1755 </Messages> 1755 </Messages>
1756 </Member> 1756 </Member>
1757 <Member Name="Last"> 1757 <Member Name="Last">
1758 <Messages> 1758 <Messages>
1759 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1759 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1760 <Issue> 1760 <Issue>
1761 <Item>Last</Item> 1761 <Item>Last</Item>
1762 </Issue> 1762 </Issue>
1763 </Message> 1763 </Message>
1764 </Messages> 1764 </Messages>
1765 </Member> 1765 </Member>
1766 <Member Name="SecureSession"> 1766 <Member Name="SecureSession">
1767 <Messages> 1767 <Messages>
1768 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1768 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1769 <Issue> 1769 <Issue>
1770 <Item>SecureSession</Item> 1770 <Item>SecureSession</Item>
1771 </Issue> 1771 </Issue>
1772 </Message> 1772 </Message>
1773 </Messages> 1773 </Messages>
1774 </Member> 1774 </Member>
1775 <Member Name="Session"> 1775 <Member Name="Session">
1776 <Messages> 1776 <Messages>
1777 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1777 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1778 <Issue> 1778 <Issue>
1779 <Item>Session</Item> 1779 <Item>Session</Item>
1780 </Issue> 1780 </Issue>
1781 </Message> 1781 </Message>
1782 </Messages> 1782 </Messages>
1783 </Member> 1783 </Member>
1784 </Members> 1784 </Members>
1785 </Type> 1785 </Type>
1786 <Type Name="NeighbourInfo"> 1786 <Type Name="NeighbourInfo">
1787 <Messages> 1787 <Messages>
1788 <Message Id="Neighbour" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1788 <Message Id="Neighbour" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1789 <Issue Name="Type"> 1789 <Issue Name="Type">
1790 <Item>Neighbour</Item> 1790 <Item>Neighbour</Item>
1791 <Item>OpenSim.Framework.Interfaces.NeighbourInfo</Item> 1791 <Item>OpenSim.Framework.Interfaces.NeighbourInfo</Item>
1792 </Issue> 1792 </Issue>
1793 </Message> 1793 </Message>
1794 </Messages> 1794 </Messages>
1795 <Members> 1795 <Members>
1796 <Member Name="regionhandle"> 1796 <Member Name="regionhandle">
1797 <Messages> 1797 <Messages>
1798 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1798 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1799 <Issue> 1799 <Issue>
1800 <Item>regionhandle</Item> 1800 <Item>regionhandle</Item>
1801 </Issue> 1801 </Issue>
1802 </Message> 1802 </Message>
1803 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1803 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1804 <Issue Name="Member"> 1804 <Issue Name="Member">
1805 <Item>regionhandle</Item> 1805 <Item>regionhandle</Item>
1806 <Item>NeighbourInfo.regionhandle</Item> 1806 <Item>NeighbourInfo.regionhandle</Item>
1807 </Issue> 1807 </Issue>
1808 </Message> 1808 </Message>
1809 </Messages> 1809 </Messages>
1810 </Member> 1810 </Member>
1811 <Member Name="RegionLocX"> 1811 <Member Name="RegionLocX">
1812 <Messages> 1812 <Messages>
1813 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1813 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1814 <Issue> 1814 <Issue>
1815 <Item>RegionLocX</Item> 1815 <Item>RegionLocX</Item>
1816 </Issue> 1816 </Issue>
1817 </Message> 1817 </Message>
1818 </Messages> 1818 </Messages>
1819 </Member> 1819 </Member>
1820 <Member Name="RegionLocY"> 1820 <Member Name="RegionLocY">
1821 <Messages> 1821 <Messages>
1822 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1822 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1823 <Issue> 1823 <Issue>
1824 <Item>RegionLocY</Item> 1824 <Item>RegionLocY</Item>
1825 </Issue> 1825 </Issue>
1826 </Message> 1826 </Message>
1827 </Messages> 1827 </Messages>
1828 </Member> 1828 </Member>
1829 <Member Name="sim_ip"> 1829 <Member Name="sim_ip">
1830 <Messages> 1830 <Messages>
1831 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1831 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1832 <Issue> 1832 <Issue>
1833 <Item>sim_ip</Item> 1833 <Item>sim_ip</Item>
1834 </Issue> 1834 </Issue>
1835 </Message> 1835 </Message>
1836 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1836 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1837 <Issue Name="Member"> 1837 <Issue Name="Member">
1838 <Item>sim</Item> 1838 <Item>sim</Item>
1839 <Item>NeighbourInfo.sim_ip</Item> 1839 <Item>NeighbourInfo.sim_ip</Item>
1840 </Issue> 1840 </Issue>
1841 </Message> 1841 </Message>
1842 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 1842 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
1843 <Issue Name="Member"> 1843 <Issue Name="Member">
1844 <Item>sim_ip</Item> 1844 <Item>sim_ip</Item>
1845 </Issue> 1845 </Issue>
1846 </Message> 1846 </Message>
1847 </Messages> 1847 </Messages>
1848 </Member> 1848 </Member>
1849 <Member Name="sim_port"> 1849 <Member Name="sim_port">
1850 <Messages> 1850 <Messages>
1851 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1851 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1852 <Issue> 1852 <Issue>
1853 <Item>sim_port</Item> 1853 <Item>sim_port</Item>
1854 </Issue> 1854 </Issue>
1855 </Message> 1855 </Message>
1856 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1856 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1857 <Issue Name="Member"> 1857 <Issue Name="Member">
1858 <Item>sim</Item> 1858 <Item>sim</Item>
1859 <Item>NeighbourInfo.sim_port</Item> 1859 <Item>NeighbourInfo.sim_port</Item>
1860 </Issue> 1860 </Issue>
1861 </Message> 1861 </Message>
1862 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 1862 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
1863 <Issue Name="Member"> 1863 <Issue Name="Member">
1864 <Item>sim_port</Item> 1864 <Item>sim_port</Item>
1865 </Issue> 1865 </Issue>
1866 </Message> 1866 </Message>
1867 </Messages> 1867 </Messages>
1868 </Member> 1868 </Member>
1869 </Members> 1869 </Members>
1870 </Type> 1870 </Type>
1871 <Type Name="RemoteGridBase"> 1871 <Type Name="RemoteGridBase">
1872 <Members> 1872 <Members>
1873 <Member Name="agentcircuits"> 1873 <Member Name="agentcircuits">
1874 <Messages> 1874 <Messages>
1875 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z"> 1875 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z">
1876 <Issue> 1876 <Issue>
1877 <Item>agentcircuits</Item> 1877 <Item>agentcircuits</Item>
1878 </Issue> 1878 </Issue>
1879 </Message> 1879 </Message>
1880 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 1880 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1881 <Issue Name="Member"> 1881 <Issue Name="Member">
1882 <Item>agentcircuits</Item> 1882 <Item>agentcircuits</Item>
1883 </Issue> 1883 </Issue>
1884 </Message> 1884 </Message>
1885 <Message Id="agentcircuits" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1885 <Message Id="agentcircuits" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1886 <Issue Name="Member"> 1886 <Issue Name="Member">
1887 <Item>agentcircuits</Item> 1887 <Item>agentcircuits</Item>
1888 <Item>RemoteGridBase.agentcircuits:Dictionary`2&lt;System.UInt32,OpenSim.Framework.Interfaces.AgentCircuitData&gt;</Item> 1888 <Item>RemoteGridBase.agentcircuits:Dictionary`2&lt;System.UInt32,OpenSim.Framework.Interfaces.AgentCircuitData&gt;</Item>
1889 </Issue> 1889 </Issue>
1890 </Message> 1890 </Message>
1891 </Messages> 1891 </Messages>
1892 </Member> 1892 </Member>
1893 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean"> 1893 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1894 <Messages> 1894 <Messages>
1895 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 1895 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1896 <Issue Name="Member"> 1896 <Issue Name="Member">
1897 <Item>Logout</Item> 1897 <Item>Logout</Item>
1898 <Item>LogoutSession</Item> 1898 <Item>LogoutSession</Item>
1899 <Item>LogOff</Item> 1899 <Item>LogOff</Item>
1900 </Issue> 1900 </Issue>
1901 </Message> 1901 </Message>
1902 </Messages> 1902 </Messages>
1903 </Member> 1903 </Member>
1904 </Members> 1904 </Members>
1905 </Type> 1905 </Type>
1906 <Type Name="SimConfig"> 1906 <Type Name="SimConfig">
1907 <Messages> 1907 <Messages>
1908 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1908 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1909 <Issue Name="Type"> 1909 <Issue Name="Type">
1910 <Item>Sim</Item> 1910 <Item>Sim</Item>
1911 <Item>OpenSim.Framework.Interfaces.SimConfig</Item> 1911 <Item>OpenSim.Framework.Interfaces.SimConfig</Item>
1912 </Issue> 1912 </Issue>
1913 </Message> 1913 </Message>
1914 </Messages> 1914 </Messages>
1915 <Members> 1915 <Members>
1916 <Member Name="AssetSendKey"> 1916 <Member Name="AssetSendKey">
1917 <Messages> 1917 <Messages>
1918 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1918 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1919 <Issue> 1919 <Issue>
1920 <Item>AssetSendKey</Item> 1920 <Item>AssetSendKey</Item>
1921 </Issue> 1921 </Issue>
1922 </Message> 1922 </Message>
1923 </Messages> 1923 </Messages>
1924 </Member> 1924 </Member>
1925 <Member Name="AssetURL"> 1925 <Member Name="AssetURL">
1926 <Messages> 1926 <Messages>
1927 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1927 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1928 <Issue> 1928 <Issue>
1929 <Item>AssetURL</Item> 1929 <Item>AssetURL</Item>
1930 </Issue> 1930 </Issue>
1931 </Message> 1931 </Message>
1932 </Messages> 1932 </Messages>
1933 </Member> 1933 </Member>
1934 <Member Name="GridRecvKey"> 1934 <Member Name="GridRecvKey">
1935 <Messages> 1935 <Messages>
1936 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1936 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1937 <Issue> 1937 <Issue>
1938 <Item>GridRecvKey</Item> 1938 <Item>GridRecvKey</Item>
1939 </Issue> 1939 </Issue>
1940 </Message> 1940 </Message>
1941 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1941 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1942 <Issue Name="Member"> 1942 <Issue Name="Member">
1943 <Item>Recv</Item> 1943 <Item>Recv</Item>
1944 <Item>SimConfig.GridRecvKey</Item> 1944 <Item>SimConfig.GridRecvKey</Item>
1945 </Issue> 1945 </Issue>
1946 </Message> 1946 </Message>
1947 </Messages> 1947 </Messages>
1948 </Member> 1948 </Member>
1949 <Member Name="GridSendKey"> 1949 <Member Name="GridSendKey">
1950 <Messages> 1950 <Messages>
1951 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1951 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1952 <Issue> 1952 <Issue>
1953 <Item>GridSendKey</Item> 1953 <Item>GridSendKey</Item>
1954 </Issue> 1954 </Issue>
1955 </Message> 1955 </Message>
1956 </Messages> 1956 </Messages>
1957 </Member> 1957 </Member>
1958 <Member Name="GridURL"> 1958 <Member Name="GridURL">
1959 <Messages> 1959 <Messages>
1960 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1960 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1961 <Issue> 1961 <Issue>
1962 <Item>GridURL</Item> 1962 <Item>GridURL</Item>
1963 </Issue> 1963 </Issue>
1964 </Message> 1964 </Message>
1965 </Messages> 1965 </Messages>
1966 </Member> 1966 </Member>
1967 <Member Name="IPListenAddr"> 1967 <Member Name="IPListenAddr">
1968 <Messages> 1968 <Messages>
1969 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1969 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1970 <Issue> 1970 <Issue>
1971 <Item>IPListenAddr</Item> 1971 <Item>IPListenAddr</Item>
1972 </Issue> 1972 </Issue>
1973 </Message> 1973 </Message>
1974 <Message Id="Addr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 1974 <Message Id="Addr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1975 <Issue Name="Member"> 1975 <Issue Name="Member">
1976 <Item>Addr</Item> 1976 <Item>Addr</Item>
1977 <Item>SimConfig.IPListenAddr</Item> 1977 <Item>SimConfig.IPListenAddr</Item>
1978 </Issue> 1978 </Issue>
1979 </Message> 1979 </Message>
1980 </Messages> 1980 </Messages>
1981 </Member> 1981 </Member>
1982 <Member Name="IPListenPort"> 1982 <Member Name="IPListenPort">
1983 <Messages> 1983 <Messages>
1984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1985 <Issue> 1985 <Issue>
1986 <Item>IPListenPort</Item> 1986 <Item>IPListenPort</Item>
1987 </Issue> 1987 </Issue>
1988 </Message> 1988 </Message>
1989 </Messages> 1989 </Messages>
1990 </Member> 1990 </Member>
1991 <Member Name="RegionHandle"> 1991 <Member Name="RegionHandle">
1992 <Messages> 1992 <Messages>
1993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 1993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1994 <Issue> 1994 <Issue>
1995 <Item>RegionHandle</Item> 1995 <Item>RegionHandle</Item>
1996 </Issue> 1996 </Issue>
1997 </Message> 1997 </Message>
1998 </Messages> 1998 </Messages>
1999 </Member> 1999 </Member>
2000 <Member Name="RegionLocX"> 2000 <Member Name="RegionLocX">
2001 <Messages> 2001 <Messages>
2002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2003 <Issue> 2003 <Issue>
2004 <Item>RegionLocX</Item> 2004 <Item>RegionLocX</Item>
2005 </Issue> 2005 </Issue>
2006 </Message> 2006 </Message>
2007 </Messages> 2007 </Messages>
2008 </Member> 2008 </Member>
2009 <Member Name="RegionLocY"> 2009 <Member Name="RegionLocY">
2010 <Messages> 2010 <Messages>
2011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2012 <Issue> 2012 <Issue>
2013 <Item>RegionLocY</Item> 2013 <Item>RegionLocY</Item>
2014 </Issue> 2014 </Issue>
2015 </Message> 2015 </Message>
2016 </Messages> 2016 </Messages>
2017 </Member> 2017 </Member>
2018 <Member Name="RegionName"> 2018 <Member Name="RegionName">
2019 <Messages> 2019 <Messages>
2020 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2020 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2021 <Issue> 2021 <Issue>
2022 <Item>RegionName</Item> 2022 <Item>RegionName</Item>
2023 </Issue> 2023 </Issue>
2024 </Message> 2024 </Message>
2025 </Messages> 2025 </Messages>
2026 </Member> 2026 </Member>
2027 <Member Name="SaveMap(System.Single[]):System.Void"> 2027 <Member Name="SaveMap(System.Single[]):System.Void">
2028 <Messages> 2028 <Messages>
2029 <Message Id="0#heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2029 <Message Id="0#heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2030 <Issue Name="Parameter"> 2030 <Issue Name="Parameter">
2031 <Item>SimConfig.SaveMap(Single[]):Void</Item> 2031 <Item>SimConfig.SaveMap(Single[]):Void</Item>
2032 <Item>heightmap</Item> 2032 <Item>heightmap</Item>
2033 <Item>heightmap</Item> 2033 <Item>heightmap</Item>
2034 </Issue> 2034 </Issue>
2035 </Message> 2035 </Message>
2036 </Messages> 2036 </Messages>
2037 </Member> 2037 </Member>
2038 <Member Name="UserRecvKey"> 2038 <Member Name="UserRecvKey">
2039 <Messages> 2039 <Messages>
2040 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2040 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2041 <Issue> 2041 <Issue>
2042 <Item>UserRecvKey</Item> 2042 <Item>UserRecvKey</Item>
2043 </Issue> 2043 </Issue>
2044 </Message> 2044 </Message>
2045 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2045 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2046 <Issue Name="Member"> 2046 <Issue Name="Member">
2047 <Item>Recv</Item> 2047 <Item>Recv</Item>
2048 <Item>SimConfig.UserRecvKey</Item> 2048 <Item>SimConfig.UserRecvKey</Item>
2049 </Issue> 2049 </Issue>
2050 </Message> 2050 </Message>
2051 </Messages> 2051 </Messages>
2052 </Member> 2052 </Member>
2053 <Member Name="UserSendKey"> 2053 <Member Name="UserSendKey">
2054 <Messages> 2054 <Messages>
2055 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2055 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2056 <Issue> 2056 <Issue>
2057 <Item>UserSendKey</Item> 2057 <Item>UserSendKey</Item>
2058 </Issue> 2058 </Issue>
2059 </Message> 2059 </Message>
2060 </Messages> 2060 </Messages>
2061 </Member> 2061 </Member>
2062 <Member Name="UserURL"> 2062 <Member Name="UserURL">
2063 <Messages> 2063 <Messages>
2064 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2064 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2065 <Issue> 2065 <Issue>
2066 <Item>UserURL</Item> 2066 <Item>UserURL</Item>
2067 </Issue> 2067 </Issue>
2068 </Message> 2068 </Message>
2069 </Messages> 2069 </Messages>
2070 </Member> 2070 </Member>
2071 </Members> 2071 </Members>
2072 </Type> 2072 </Type>
2073 <Type Name="UUIDBlock"> 2073 <Type Name="UUIDBlock">
2074 <Messages> 2074 <Messages>
2075 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 2075 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2076 <Issue Name="Type"> 2076 <Issue Name="Type">
2077 <Item>UUIDBlock</Item> 2077 <Item>UUIDBlock</Item>
2078 </Issue> 2078 </Issue>
2079 </Message> 2079 </Message>
2080 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z"> 2080 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z">
2081 <Issue Name="Equals"> 2081 <Issue Name="Equals">
2082 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item> 2082 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item>
2083 </Issue> 2083 </Issue>
2084 <Issue Name="op_Equality"> 2084 <Issue Name="op_Equality">
2085 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item> 2085 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item>
2086 </Issue> 2086 </Issue>
2087 </Message> 2087 </Message>
2088 </Messages> 2088 </Messages>
2089 <Members> 2089 <Members>
2090 <Member Name="BlockEnd"> 2090 <Member Name="BlockEnd">
2091 <Messages> 2091 <Messages>
2092 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2092 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2093 <Issue> 2093 <Issue>
2094 <Item>BlockEnd</Item> 2094 <Item>BlockEnd</Item>
2095 </Issue> 2095 </Issue>
2096 </Message> 2096 </Message>
2097 </Messages> 2097 </Messages>
2098 </Member> 2098 </Member>
2099 <Member Name="BlockStart"> 2099 <Member Name="BlockStart">
2100 <Messages> 2100 <Messages>
2101 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2101 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2102 <Issue> 2102 <Issue>
2103 <Item>BlockStart</Item> 2103 <Item>BlockStart</Item>
2104 </Issue> 2104 </Issue>
2105 </Message> 2105 </Message>
2106 </Messages> 2106 </Messages>
2107 </Member> 2107 </Member>
2108 </Members> 2108 </Members>
2109 </Type> 2109 </Type>
2110 </Types> 2110 </Types>
2111 </Namespace> 2111 </Namespace>
2112 <Namespace Name="OpenSim.Framework.Inventory"> 2112 <Namespace Name="OpenSim.Framework.Inventory">
2113 <Types> 2113 <Types>
2114 <Type Name="AgentInventory"> 2114 <Type Name="AgentInventory">
2115 <Members> 2115 <Members>
2116 <Member Name=".ctor()"> 2116 <Member Name=".ctor()">
2117 <Messages> 2117 <Messages>
2118 <Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2007-03-27 04:29:04Z"> 2118 <Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2007-03-27 04:29:04Z">
2119 <Issue> 2119 <Issue>
2120 <Item>AgentInventory.AgentInventory()</Item> 2120 <Item>AgentInventory.AgentInventory()</Item>
2121 <Item>&#xD;&#xA;&#xD;&#xA;AgentInventory.AgentInventory()&#xD;&#xA;AgentInventory.Initialise():Void</Item> 2121 <Item>&#xD;&#xA;&#xD;&#xA;AgentInventory.AgentInventory()&#xD;&#xA;AgentInventory.Initialise():Void</Item>
2122 </Issue> 2122 </Issue>
2123 </Message> 2123 </Message>
2124 </Messages> 2124 </Messages>
2125 </Member> 2125 </Member>
2126 <Member Name="AddToInventory(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID"> 2126 <Member Name="AddToInventory(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID">
2127 <Messages> 2127 <Messages>
2128 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 2128 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2129 <Issue Name="ParameterId"> 2129 <Issue Name="ParameterId">
2130 <Item>ID</Item> 2130 <Item>ID</Item>
2131 <Item>folderID</Item> 2131 <Item>folderID</Item>
2132 <Item>Id</Item> 2132 <Item>Id</Item>
2133 </Issue> 2133 </Issue>
2134 </Message> 2134 </Message>
2135 </Messages> 2135 </Messages>
2136 </Member> 2136 </Member>
2137 <Member Name="AgentID"> 2137 <Member Name="AgentID">
2138 <Messages> 2138 <Messages>
2139 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2139 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2140 <Issue> 2140 <Issue>
2141 <Item>AgentID</Item> 2141 <Item>AgentID</Item>
2142 </Issue> 2142 </Issue>
2143 </Message> 2143 </Message>
2144 </Messages> 2144 </Messages>
2145 </Member> 2145 </Member>
2146 <Member Name="CreateNewFolder(libsecondlife.LLUUID,System.UInt16):System.Boolean"> 2146 <Member Name="CreateNewFolder(libsecondlife.LLUUID,System.UInt16):System.Boolean">
2147 <Messages> 2147 <Messages>
2148 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 2148 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2149 <Issue Name="ParameterId"> 2149 <Issue Name="ParameterId">
2150 <Item>ID</Item> 2150 <Item>ID</Item>
2151 <Item>folderID</Item> 2151 <Item>folderID</Item>
2152 <Item>Id</Item> 2152 <Item>Id</Item>
2153 </Issue> 2153 </Issue>
2154 </Message> 2154 </Message>
2155 </Messages> 2155 </Messages>
2156 </Member> 2156 </Member>
2157 <Member Name="Initialise():System.Void"> 2157 <Member Name="Initialise():System.Void">
2158 <Messages> 2158 <Messages>
2159 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2159 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2160 <Issue Name="Member"> 2160 <Issue Name="Member">
2161 <Item>Initialise</Item> 2161 <Item>Initialise</Item>
2162 <Item>AgentInventory.Initialise():Void</Item> 2162 <Item>AgentInventory.Initialise():Void</Item>
2163 </Issue> 2163 </Issue>
2164 </Message> 2164 </Message>
2165 </Messages> 2165 </Messages>
2166 </Member> 2166 </Member>
2167 <Member Name="InventoryFolders"> 2167 <Member Name="InventoryFolders">
2168 <Messages> 2168 <Messages>
2169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2170 <Issue> 2170 <Issue>
2171 <Item>InventoryFolders</Item> 2171 <Item>InventoryFolders</Item>
2172 </Issue> 2172 </Issue>
2173 </Message> 2173 </Message>
2174 </Messages> 2174 </Messages>
2175 </Member> 2175 </Member>
2176 <Member Name="InventoryItems"> 2176 <Member Name="InventoryItems">
2177 <Messages> 2177 <Messages>
2178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2179 <Issue> 2179 <Issue>
2180 <Item>InventoryItems</Item> 2180 <Item>InventoryItems</Item>
2181 </Issue> 2181 </Issue>
2182 </Message> 2182 </Message>
2183 </Messages> 2183 </Messages>
2184 </Member> 2184 </Member>
2185 <Member Name="InventoryRoot"> 2185 <Member Name="InventoryRoot">
2186 <Messages> 2186 <Messages>
2187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2188 <Issue> 2188 <Issue>
2189 <Item>InventoryRoot</Item> 2189 <Item>InventoryRoot</Item>
2190 </Issue> 2190 </Issue>
2191 </Message> 2191 </Message>
2192 </Messages> 2192 </Messages>
2193 </Member> 2193 </Member>
2194 <Member Name="LastCached"> 2194 <Member Name="LastCached">
2195 <Messages> 2195 <Messages>
2196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2197 <Issue> 2197 <Issue>
2198 <Item>LastCached</Item> 2198 <Item>LastCached</Item>
2199 </Issue> 2199 </Issue>
2200 </Message> 2200 </Message>
2201 </Messages> 2201 </Messages>
2202 </Member> 2202 </Member>
2203 <Member Name="UpdateItem(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean"> 2203 <Member Name="UpdateItem(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean">
2204 <Messages> 2204 <Messages>
2205 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 2205 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2206 <Issue Name="ParameterId"> 2206 <Issue Name="ParameterId">
2207 <Item>ID</Item> 2207 <Item>ID</Item>
2208 <Item>itemID</Item> 2208 <Item>itemID</Item>
2209 <Item>Id</Item> 2209 <Item>Id</Item>
2210 </Issue> 2210 </Issue>
2211 </Message> 2211 </Message>
2212 </Messages> 2212 </Messages>
2213 </Member> 2213 </Member>
2214 <Member Name="Wearables"> 2214 <Member Name="Wearables">
2215 <Messages> 2215 <Messages>
2216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2217 <Issue> 2217 <Issue>
2218 <Item>Wearables</Item> 2218 <Item>Wearables</Item>
2219 </Issue> 2219 </Issue>
2220 </Message> 2220 </Message>
2221 <Message Id="Wearables" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2221 <Message Id="Wearables" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2222 <Issue Name="Member"> 2222 <Issue Name="Member">
2223 <Item>Wearables</Item> 2223 <Item>Wearables</Item>
2224 <Item>AgentInventory.Wearables</Item> 2224 <Item>AgentInventory.Wearables</Item>
2225 </Issue> 2225 </Issue>
2226 </Message> 2226 </Message>
2227 </Messages> 2227 </Messages>
2228 </Member> 2228 </Member>
2229 </Members> 2229 </Members>
2230 </Type> 2230 </Type>
2231 <Type Name="AvatarWearable"> 2231 <Type Name="AvatarWearable">
2232 <Members> 2232 <Members>
2233 <Member Name="AssetID"> 2233 <Member Name="AssetID">
2234 <Messages> 2234 <Messages>
2235 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2235 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2236 <Issue> 2236 <Issue>
2237 <Item>AssetID</Item> 2237 <Item>AssetID</Item>
2238 </Issue> 2238 </Issue>
2239 </Message> 2239 </Message>
2240 </Messages> 2240 </Messages>
2241 </Member> 2241 </Member>
2242 <Member Name="ItemID"> 2242 <Member Name="ItemID">
2243 <Messages> 2243 <Messages>
2244 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2244 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2245 <Issue> 2245 <Issue>
2246 <Item>ItemID</Item> 2246 <Item>ItemID</Item>
2247 </Issue> 2247 </Issue>
2248 </Message> 2248 </Message>
2249 </Messages> 2249 </Messages>
2250 </Member> 2250 </Member>
2251 </Members> 2251 </Members>
2252 </Type> 2252 </Type>
2253 <Type Name="InventoryFolder"> 2253 <Type Name="InventoryFolder">
2254 <Members> 2254 <Members>
2255 <Member Name="DefaultType"> 2255 <Member Name="DefaultType">
2256 <Messages> 2256 <Messages>
2257 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2257 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2258 <Issue> 2258 <Issue>
2259 <Item>DefaultType</Item> 2259 <Item>DefaultType</Item>
2260 </Issue> 2260 </Issue>
2261 </Message> 2261 </Message>
2262 </Messages> 2262 </Messages>
2263 </Member> 2263 </Member>
2264 <Member Name="FolderID"> 2264 <Member Name="FolderID">
2265 <Messages> 2265 <Messages>
2266 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2266 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2267 <Issue> 2267 <Issue>
2268 <Item>FolderID</Item> 2268 <Item>FolderID</Item>
2269 </Issue> 2269 </Issue>
2270 </Message> 2270 </Message>
2271 </Messages> 2271 </Messages>
2272 </Member> 2272 </Member>
2273 <Member Name="FolderName"> 2273 <Member Name="FolderName">
2274 <Messages> 2274 <Messages>
2275 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2275 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2276 <Issue> 2276 <Issue>
2277 <Item>FolderName</Item> 2277 <Item>FolderName</Item>
2278 </Issue> 2278 </Issue>
2279 </Message> 2279 </Message>
2280 </Messages> 2280 </Messages>
2281 </Member> 2281 </Member>
2282 <Member Name="Items"> 2282 <Member Name="Items">
2283 <Messages> 2283 <Messages>
2284 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2284 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2285 <Issue> 2285 <Issue>
2286 <Item>Items</Item> 2286 <Item>Items</Item>
2287 </Issue> 2287 </Issue>
2288 </Message> 2288 </Message>
2289 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 2289 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
2290 <Issue> 2290 <Issue>
2291 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Inventory.InventoryItem&gt;</Item> 2291 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Inventory.InventoryItem&gt;</Item>
2292 <Item>InventoryFolder.Items</Item> 2292 <Item>InventoryFolder.Items</Item>
2293 </Issue> 2293 </Issue>
2294 </Message> 2294 </Message>
2295 </Messages> 2295 </Messages>
2296 </Member> 2296 </Member>
2297 <Member Name="OwnerID"> 2297 <Member Name="OwnerID">
2298 <Messages> 2298 <Messages>
2299 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2299 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2300 <Issue> 2300 <Issue>
2301 <Item>OwnerID</Item> 2301 <Item>OwnerID</Item>
2302 </Issue> 2302 </Issue>
2303 </Message> 2303 </Message>
2304 </Messages> 2304 </Messages>
2305 </Member> 2305 </Member>
2306 <Member Name="ParentID"> 2306 <Member Name="ParentID">
2307 <Messages> 2307 <Messages>
2308 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2308 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2309 <Issue> 2309 <Issue>
2310 <Item>ParentID</Item> 2310 <Item>ParentID</Item>
2311 </Issue> 2311 </Issue>
2312 </Message> 2312 </Message>
2313 </Messages> 2313 </Messages>
2314 </Member> 2314 </Member>
2315 <Member Name="Version"> 2315 <Member Name="Version">
2316 <Messages> 2316 <Messages>
2317 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2317 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2318 <Issue> 2318 <Issue>
2319 <Item>Version</Item> 2319 <Item>Version</Item>
2320 </Issue> 2320 </Issue>
2321 </Message> 2321 </Message>
2322 </Messages> 2322 </Messages>
2323 </Member> 2323 </Member>
2324 </Members> 2324 </Members>
2325 </Type> 2325 </Type>
2326 <Type Name="InventoryItem"> 2326 <Type Name="InventoryItem">
2327 <Members> 2327 <Members>
2328 <Member Name="AssetID"> 2328 <Member Name="AssetID">
2329 <Messages> 2329 <Messages>
2330 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2330 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2331 <Issue> 2331 <Issue>
2332 <Item>AssetID</Item> 2332 <Item>AssetID</Item>
2333 </Issue> 2333 </Issue>
2334 </Message> 2334 </Message>
2335 </Messages> 2335 </Messages>
2336 </Member> 2336 </Member>
2337 <Member Name="CreatorID"> 2337 <Member Name="CreatorID">
2338 <Messages> 2338 <Messages>
2339 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2339 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2340 <Issue> 2340 <Issue>
2341 <Item>CreatorID</Item> 2341 <Item>CreatorID</Item>
2342 </Issue> 2342 </Issue>
2343 </Message> 2343 </Message>
2344 </Messages> 2344 </Messages>
2345 </Member> 2345 </Member>
2346 <Member Name="Description"> 2346 <Member Name="Description">
2347 <Messages> 2347 <Messages>
2348 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2348 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2349 <Issue> 2349 <Issue>
2350 <Item>Description</Item> 2350 <Item>Description</Item>
2351 </Issue> 2351 </Issue>
2352 </Message> 2352 </Message>
2353 </Messages> 2353 </Messages>
2354 </Member> 2354 </Member>
2355 <Member Name="FolderID"> 2355 <Member Name="FolderID">
2356 <Messages> 2356 <Messages>
2357 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2357 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2358 <Issue> 2358 <Issue>
2359 <Item>FolderID</Item> 2359 <Item>FolderID</Item>
2360 </Issue> 2360 </Issue>
2361 </Message> 2361 </Message>
2362 </Messages> 2362 </Messages>
2363 </Member> 2363 </Member>
2364 <Member Name="InvType"> 2364 <Member Name="InvType">
2365 <Messages> 2365 <Messages>
2366 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2366 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2367 <Issue> 2367 <Issue>
2368 <Item>InvType</Item> 2368 <Item>InvType</Item>
2369 </Issue> 2369 </Issue>
2370 </Message> 2370 </Message>
2371 </Messages> 2371 </Messages>
2372 </Member> 2372 </Member>
2373 <Member Name="ItemID"> 2373 <Member Name="ItemID">
2374 <Messages> 2374 <Messages>
2375 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2375 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2376 <Issue> 2376 <Issue>
2377 <Item>ItemID</Item> 2377 <Item>ItemID</Item>
2378 </Issue> 2378 </Issue>
2379 </Message> 2379 </Message>
2380 </Messages> 2380 </Messages>
2381 </Member> 2381 </Member>
2382 <Member Name="Name"> 2382 <Member Name="Name">
2383 <Messages> 2383 <Messages>
2384 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2384 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2385 <Issue> 2385 <Issue>
2386 <Item>Name</Item> 2386 <Item>Name</Item>
2387 </Issue> 2387 </Issue>
2388 </Message> 2388 </Message>
2389 </Messages> 2389 </Messages>
2390 </Member> 2390 </Member>
2391 <Member Name="OwnerID"> 2391 <Member Name="OwnerID">
2392 <Messages> 2392 <Messages>
2393 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2393 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2394 <Issue> 2394 <Issue>
2395 <Item>OwnerID</Item> 2395 <Item>OwnerID</Item>
2396 </Issue> 2396 </Issue>
2397 </Message> 2397 </Message>
2398 </Messages> 2398 </Messages>
2399 </Member> 2399 </Member>
2400 <Member Name="Type"> 2400 <Member Name="Type">
2401 <Messages> 2401 <Messages>
2402 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2402 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2403 <Issue> 2403 <Issue>
2404 <Item>Type</Item> 2404 <Item>Type</Item>
2405 </Issue> 2405 </Issue>
2406 </Message> 2406 </Message>
2407 </Messages> 2407 </Messages>
2408 </Member> 2408 </Member>
2409 </Members> 2409 </Members>
2410 </Type> 2410 </Type>
2411 </Types> 2411 </Types>
2412 </Namespace> 2412 </Namespace>
2413 <Namespace Name="OpenSim.Framework.Sims"> 2413 <Namespace Name="OpenSim.Framework.Sims">
2414 <Types> 2414 <Types>
2415 <Type Name="SimProfile"> 2415 <Type Name="SimProfile">
2416 <Messages> 2416 <Messages>
2417 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2417 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2418 <Issue Name="Type"> 2418 <Issue Name="Type">
2419 <Item>Sim</Item> 2419 <Item>Sim</Item>
2420 <Item>OpenSim.Framework.Sims.SimProfile</Item> 2420 <Item>OpenSim.Framework.Sims.SimProfile</Item>
2421 </Issue> 2421 </Issue>
2422 </Message> 2422 </Message>
2423 </Messages> 2423 </Messages>
2424 <Members> 2424 <Members>
2425 <Member Name="LoadFromGrid(System.UInt64,System.String,System.String,System.String):OpenSim.Framework.Sims.SimProfile"> 2425 <Member Name="LoadFromGrid(System.UInt64,System.String,System.String,System.String):OpenSim.Framework.Sims.SimProfile">
2426 <Messages> 2426 <Messages>
2427 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 2427 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
2428 <Issue> 2428 <Issue>
2429 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2429 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2430 <Item>System.Exception</Item> 2430 <Item>System.Exception</Item>
2431 </Issue> 2431 </Issue>
2432 </Message> 2432 </Message>
2433 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 2433 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2434 <Issue Name="Parameter"> 2434 <Issue Name="Parameter">
2435 <Item>GridURL</Item> 2435 <Item>GridURL</Item>
2436 </Issue> 2436 </Issue>
2437 </Message> 2437 </Message>
2438 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 2438 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2439 <Issue Name="Parameter"> 2439 <Issue Name="Parameter">
2440 <Item>SendKey</Item> 2440 <Item>SendKey</Item>
2441 </Issue> 2441 </Issue>
2442 </Message> 2442 </Message>
2443 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 2443 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2444 <Issue Name="Parameter"> 2444 <Issue Name="Parameter">
2445 <Item>RecvKey</Item> 2445 <Item>RecvKey</Item>
2446 </Issue> 2446 </Issue>
2447 </Message> 2447 </Message>
2448 <Message Id="3#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2448 <Message Id="3#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2449 <Issue Name="Parameter"> 2449 <Issue Name="Parameter">
2450 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2450 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2451 <Item>Recv</Item> 2451 <Item>Recv</Item>
2452 <Item>RecvKey</Item> 2452 <Item>RecvKey</Item>
2453 </Issue> 2453 </Issue>
2454 </Message> 2454 </Message>
2455 <Message Id="0#" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 2455 <Message Id="0#" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2456 <Issue Name="Parameter"> 2456 <Issue Name="Parameter">
2457 <Item>region_handle</Item> 2457 <Item>region_handle</Item>
2458 </Issue> 2458 </Issue>
2459 </Message> 2459 </Message>
2460 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 2460 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2461 <Issue Name="Parameter"> 2461 <Issue Name="Parameter">
2462 <Item>GridURL</Item> 2462 <Item>GridURL</Item>
2463 </Issue> 2463 </Issue>
2464 </Message> 2464 </Message>
2465 <Message Id="RecvKey" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 2465 <Message Id="RecvKey" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
2466 <Issue> 2466 <Issue>
2467 <Item>RecvKey</Item> 2467 <Item>RecvKey</Item>
2468 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2468 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2469 </Issue> 2469 </Issue>
2470 </Message> 2470 </Message>
2471 <Message Id="System.Convert.ToUInt16(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2471 <Message Id="System.Convert.ToUInt16(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2472 <Issue> 2472 <Issue>
2473 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2473 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2474 <Item>System.Convert.ToUInt16(System.Object)</Item> 2474 <Item>System.Convert.ToUInt16(System.Object)</Item>
2475 <Item>System.Convert.ToUInt16(System.Object,System.IFormatProvider)</Item> 2475 <Item>System.Convert.ToUInt16(System.Object,System.IFormatProvider)</Item>
2476 </Issue> 2476 </Issue>
2477 </Message> 2477 </Message>
2478 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2478 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2479 <Issue> 2479 <Issue>
2480 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2480 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2481 <Item>System.Convert.ToUInt32(System.Object)</Item> 2481 <Item>System.Convert.ToUInt32(System.Object)</Item>
2482 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item> 2482 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
2483 </Issue> 2483 </Issue>
2484 <Issue> 2484 <Issue>
2485 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2485 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2486 <Item>System.Convert.ToUInt32(System.Object)</Item> 2486 <Item>System.Convert.ToUInt32(System.Object)</Item>
2487 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item> 2487 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
2488 </Issue> 2488 </Issue>
2489 </Message> 2489 </Message>
2490 <Message Id="System.Convert.ToUInt64(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2490 <Message Id="System.Convert.ToUInt64(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2491 <Issue> 2491 <Issue>
2492 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2492 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2493 <Item>System.Convert.ToUInt64(System.Object)</Item> 2493 <Item>System.Convert.ToUInt64(System.Object)</Item>
2494 <Item>System.Convert.ToUInt64(System.Object,System.IFormatProvider)</Item> 2494 <Item>System.Convert.ToUInt64(System.Object,System.IFormatProvider)</Item>
2495 </Issue> 2495 </Issue>
2496 </Message> 2496 </Message>
2497 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2497 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2498 <Issue> 2498 <Issue>
2499 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item> 2499 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2500 <Item>System.UInt64.ToString</Item> 2500 <Item>System.UInt64.ToString</Item>
2501 <Item>System.UInt64.ToString(System.IFormatProvider)</Item> 2501 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
2502 </Issue> 2502 </Issue>
2503 </Message> 2503 </Message>
2504 </Messages> 2504 </Messages>
2505 </Member> 2505 </Member>
2506 </Members> 2506 </Members>
2507 </Type> 2507 </Type>
2508 <Type Name="SimProfileBase"> 2508 <Type Name="SimProfileBase">
2509 <Messages> 2509 <Messages>
2510 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2510 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2511 <Issue Name="Type"> 2511 <Issue Name="Type">
2512 <Item>Sim</Item> 2512 <Item>Sim</Item>
2513 <Item>OpenSim.Framework.Sims.SimProfileBase</Item> 2513 <Item>OpenSim.Framework.Sims.SimProfileBase</Item>
2514 </Issue> 2514 </Issue>
2515 </Message> 2515 </Message>
2516 </Messages> 2516 </Messages>
2517 <Members> 2517 <Members>
2518 <Member Name="caps_url"> 2518 <Member Name="caps_url">
2519 <Messages> 2519 <Messages>
2520 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2520 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2521 <Issue> 2521 <Issue>
2522 <Item>caps_url</Item> 2522 <Item>caps_url</Item>
2523 </Issue> 2523 </Issue>
2524 </Message> 2524 </Message>
2525 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 2525 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2526 <Issue Name="Member"> 2526 <Issue Name="Member">
2527 <Item>caps_url</Item> 2527 <Item>caps_url</Item>
2528 </Issue> 2528 </Issue>
2529 </Message> 2529 </Message>
2530 </Messages> 2530 </Messages>
2531 </Member> 2531 </Member>
2532 <Member Name="recvkey"> 2532 <Member Name="recvkey">
2533 <Messages> 2533 <Messages>
2534 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2534 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2535 <Issue> 2535 <Issue>
2536 <Item>recvkey</Item> 2536 <Item>recvkey</Item>
2537 </Issue> 2537 </Issue>
2538 </Message> 2538 </Message>
2539 <Message Id="recvkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2539 <Message Id="recvkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2540 <Issue Name="Member"> 2540 <Issue Name="Member">
2541 <Item>recvkey</Item> 2541 <Item>recvkey</Item>
2542 <Item>SimProfileBase.recvkey</Item> 2542 <Item>SimProfileBase.recvkey</Item>
2543 </Issue> 2543 </Issue>
2544 </Message> 2544 </Message>
2545 </Messages> 2545 </Messages>
2546 </Member> 2546 </Member>
2547 <Member Name="regionhandle"> 2547 <Member Name="regionhandle">
2548 <Messages> 2548 <Messages>
2549 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2549 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2550 <Issue> 2550 <Issue>
2551 <Item>regionhandle</Item> 2551 <Item>regionhandle</Item>
2552 </Issue> 2552 </Issue>
2553 </Message> 2553 </Message>
2554 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2554 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2555 <Issue Name="Member"> 2555 <Issue Name="Member">
2556 <Item>regionhandle</Item> 2556 <Item>regionhandle</Item>
2557 <Item>SimProfileBase.regionhandle</Item> 2557 <Item>SimProfileBase.regionhandle</Item>
2558 </Issue> 2558 </Issue>
2559 </Message> 2559 </Message>
2560 </Messages> 2560 </Messages>
2561 </Member> 2561 </Member>
2562 <Member Name="RegionLocX"> 2562 <Member Name="RegionLocX">
2563 <Messages> 2563 <Messages>
2564 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2564 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2565 <Issue> 2565 <Issue>
2566 <Item>RegionLocX</Item> 2566 <Item>RegionLocX</Item>
2567 </Issue> 2567 </Issue>
2568 </Message> 2568 </Message>
2569 </Messages> 2569 </Messages>
2570 </Member> 2570 </Member>
2571 <Member Name="RegionLocY"> 2571 <Member Name="RegionLocY">
2572 <Messages> 2572 <Messages>
2573 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2573 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2574 <Issue> 2574 <Issue>
2575 <Item>RegionLocY</Item> 2575 <Item>RegionLocY</Item>
2576 </Issue> 2576 </Issue>
2577 </Message> 2577 </Message>
2578 </Messages> 2578 </Messages>
2579 </Member> 2579 </Member>
2580 <Member Name="regionname"> 2580 <Member Name="regionname">
2581 <Messages> 2581 <Messages>
2582 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2582 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2583 <Issue> 2583 <Issue>
2584 <Item>regionname</Item> 2584 <Item>regionname</Item>
2585 </Issue> 2585 </Issue>
2586 </Message> 2586 </Message>
2587 <Message Id="regionname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2587 <Message Id="regionname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2588 <Issue Name="Member"> 2588 <Issue Name="Member">
2589 <Item>regionname</Item> 2589 <Item>regionname</Item>
2590 <Item>SimProfileBase.regionname</Item> 2590 <Item>SimProfileBase.regionname</Item>
2591 </Issue> 2591 </Issue>
2592 </Message> 2592 </Message>
2593 </Messages> 2593 </Messages>
2594 </Member> 2594 </Member>
2595 <Member Name="sendkey"> 2595 <Member Name="sendkey">
2596 <Messages> 2596 <Messages>
2597 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2597 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2598 <Issue> 2598 <Issue>
2599 <Item>sendkey</Item> 2599 <Item>sendkey</Item>
2600 </Issue> 2600 </Issue>
2601 </Message> 2601 </Message>
2602 <Message Id="sendkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2602 <Message Id="sendkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2603 <Issue Name="Member"> 2603 <Issue Name="Member">
2604 <Item>sendkey</Item> 2604 <Item>sendkey</Item>
2605 <Item>SimProfileBase.sendkey</Item> 2605 <Item>SimProfileBase.sendkey</Item>
2606 </Issue> 2606 </Issue>
2607 </Message> 2607 </Message>
2608 </Messages> 2608 </Messages>
2609 </Member> 2609 </Member>
2610 <Member Name="sim_ip"> 2610 <Member Name="sim_ip">
2611 <Messages> 2611 <Messages>
2612 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2612 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2613 <Issue> 2613 <Issue>
2614 <Item>sim_ip</Item> 2614 <Item>sim_ip</Item>
2615 </Issue> 2615 </Issue>
2616 </Message> 2616 </Message>
2617 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2617 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2618 <Issue Name="Member"> 2618 <Issue Name="Member">
2619 <Item>sim</Item> 2619 <Item>sim</Item>
2620 <Item>SimProfileBase.sim_ip</Item> 2620 <Item>SimProfileBase.sim_ip</Item>
2621 </Issue> 2621 </Issue>
2622 </Message> 2622 </Message>
2623 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 2623 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2624 <Issue Name="Member"> 2624 <Issue Name="Member">
2625 <Item>sim_ip</Item> 2625 <Item>sim_ip</Item>
2626 </Issue> 2626 </Issue>
2627 </Message> 2627 </Message>
2628 </Messages> 2628 </Messages>
2629 </Member> 2629 </Member>
2630 <Member Name="sim_port"> 2630 <Member Name="sim_port">
2631 <Messages> 2631 <Messages>
2632 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2632 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2633 <Issue> 2633 <Issue>
2634 <Item>sim_port</Item> 2634 <Item>sim_port</Item>
2635 </Issue> 2635 </Issue>
2636 </Message> 2636 </Message>
2637 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2637 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2638 <Issue Name="Member"> 2638 <Issue Name="Member">
2639 <Item>sim</Item> 2639 <Item>sim</Item>
2640 <Item>SimProfileBase.sim_port</Item> 2640 <Item>SimProfileBase.sim_port</Item>
2641 </Issue> 2641 </Issue>
2642 </Message> 2642 </Message>
2643 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 2643 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2644 <Issue Name="Member"> 2644 <Issue Name="Member">
2645 <Item>sim_port</Item> 2645 <Item>sim_port</Item>
2646 </Issue> 2646 </Issue>
2647 </Message> 2647 </Message>
2648 </Messages> 2648 </Messages>
2649 </Member> 2649 </Member>
2650 <Member Name="UUID"> 2650 <Member Name="UUID">
2651 <Messages> 2651 <Messages>
2652 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2652 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2653 <Issue> 2653 <Issue>
2654 <Item>UUID</Item> 2654 <Item>UUID</Item>
2655 </Issue> 2655 </Issue>
2656 </Message> 2656 </Message>
2657 </Messages> 2657 </Messages>
2658 </Member> 2658 </Member>
2659 </Members> 2659 </Members>
2660 </Type> 2660 </Type>
2661 </Types> 2661 </Types>
2662 </Namespace> 2662 </Namespace>
2663 <Namespace Name="OpenSim.Framework.Terrain"> 2663 <Namespace Name="OpenSim.Framework.Terrain">
2664 <Types> 2664 <Types>
2665 <Type Name="HeightmapGenHills"> 2665 <Type Name="HeightmapGenHills">
2666 <Messages> 2666 <Messages>
2667 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2667 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2668 <Issue Name="Type"> 2668 <Issue Name="Type">
2669 <Item>Heightmap</Item> 2669 <Item>Heightmap</Item>
2670 <Item>OpenSim.Framework.Terrain.HeightmapGenHills</Item> 2670 <Item>OpenSim.Framework.Terrain.HeightmapGenHills</Item>
2671 </Issue> 2671 </Issue>
2672 </Message> 2672 </Message>
2673 </Messages> 2673 </Messages>
2674 <Members> 2674 <Members>
2675 <Member Name="GenerateHeightmap(System.Int32,System.Single,System.Single,System.Boolean):System.Single[]"> 2675 <Member Name="GenerateHeightmap(System.Int32,System.Single,System.Single,System.Boolean):System.Single[]">
2676 <Messages> 2676 <Messages>
2677 <Message Id="0#num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2677 <Message Id="0#num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2678 <Issue Name="Parameter"> 2678 <Issue Name="Parameter">
2679 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item> 2679 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item>
2680 <Item>num</Item> 2680 <Item>num</Item>
2681 <Item>numHills</Item> 2681 <Item>numHills</Item>
2682 </Issue> 2682 </Issue>
2683 </Message> 2683 </Message>
2684 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2684 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2685 <Issue Name="Member"> 2685 <Issue Name="Member">
2686 <Item>Heightmap</Item> 2686 <Item>Heightmap</Item>
2687 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item> 2687 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item>
2688 </Issue> 2688 </Issue>
2689 </Message> 2689 </Message>
2690 </Messages> 2690 </Messages>
2691 </Member> 2691 </Member>
2692 <Member Name="NumHills"> 2692 <Member Name="NumHills">
2693 <Messages> 2693 <Messages>
2694 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 2694 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
2695 <Issue> 2695 <Issue>
2696 <Item>HeightmapGenHills.NumHills</Item> 2696 <Item>HeightmapGenHills.NumHills</Item>
2697 </Issue> 2697 </Issue>
2698 </Message> 2698 </Message>
2699 </Messages> 2699 </Messages>
2700 </Member> 2700 </Member>
2701 </Members> 2701 </Members>
2702 </Type> 2702 </Type>
2703 </Types> 2703 </Types>
2704 </Namespace> 2704 </Namespace>
2705 <Namespace Name="OpenSim.Framework.User"> 2705 <Namespace Name="OpenSim.Framework.User">
2706 <Types> 2706 <Types>
2707 <Type Name="UserProfile"> 2707 <Type Name="UserProfile">
2708 <Members> 2708 <Members>
2709 <Member Name=".ctor()"> 2709 <Member Name=".ctor()">
2710 <Messages> 2710 <Messages>
2711 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 2711 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
2712 <Issue> 2712 <Issue>
2713 <Item>UserProfile.UserProfile()</Item> 2713 <Item>UserProfile.UserProfile()</Item>
2714 <Item>IsGridGod</Item> 2714 <Item>IsGridGod</Item>
2715 <Item>System.Boolean</Item> 2715 <Item>System.Boolean</Item>
2716 <Item>false</Item> 2716 <Item>false</Item>
2717 </Issue> 2717 </Issue>
2718 </Message> 2718 </Message>
2719 </Messages> 2719 </Messages>
2720 </Member> 2720 </Member>
2721 <Member Name="AddSimCircuit(System.UInt32,libsecondlife.LLUUID):System.Void"> 2721 <Member Name="AddSimCircuit(System.UInt32,libsecondlife.LLUUID):System.Void">
2722 <Messages> 2722 <Messages>
2723 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2723 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2724 <Issue Name="Member"> 2724 <Issue Name="Member">
2725 <Item>Sim</Item> 2725 <Item>Sim</Item>
2726 <Item>UserProfile.AddSimCircuit(UInt32, LLUUID):Void</Item> 2726 <Item>UserProfile.AddSimCircuit(UInt32, LLUUID):Void</Item>
2727 </Issue> 2727 </Issue>
2728 </Message> 2728 </Message>
2729 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 2729 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2730 <Issue Name="Parameter"> 2730 <Issue Name="Parameter">
2731 <Item>regionUUID</Item> 2731 <Item>regionUUID</Item>
2732 </Issue> 2732 </Issue>
2733 </Message> 2733 </Message>
2734 </Messages> 2734 </Messages>
2735 </Member> 2735 </Member>
2736 <Member Name="AssetURL"> 2736 <Member Name="AssetURL">
2737 <Messages> 2737 <Messages>
2738 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2738 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2739 <Issue> 2739 <Issue>
2740 <Item>AssetURL</Item> 2740 <Item>AssetURL</Item>
2741 </Issue> 2741 </Issue>
2742 </Message> 2742 </Message>
2743 </Messages> 2743 </Messages>
2744 </Member> 2744 </Member>
2745 <Member Name="Circuits"> 2745 <Member Name="Circuits">
2746 <Messages> 2746 <Messages>
2747 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2747 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2748 <Issue> 2748 <Issue>
2749 <Item>Circuits</Item> 2749 <Item>Circuits</Item>
2750 </Issue> 2750 </Issue>
2751 </Message> 2751 </Message>
2752 </Messages> 2752 </Messages>
2753 </Member> 2753 </Member>
2754 <Member Name="CurrentSecureSessionID"> 2754 <Member Name="CurrentSecureSessionID">
2755 <Messages> 2755 <Messages>
2756 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2756 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2757 <Issue> 2757 <Issue>
2758 <Item>CurrentSecureSessionID</Item> 2758 <Item>CurrentSecureSessionID</Item>
2759 </Issue> 2759 </Issue>
2760 </Message> 2760 </Message>
2761 </Messages> 2761 </Messages>
2762 </Member> 2762 </Member>
2763 <Member Name="CurrentSessionID"> 2763 <Member Name="CurrentSessionID">
2764 <Messages> 2764 <Messages>
2765 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2765 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2766 <Issue> 2766 <Issue>
2767 <Item>CurrentSessionID</Item> 2767 <Item>CurrentSessionID</Item>
2768 </Issue> 2768 </Issue>
2769 </Message> 2769 </Message>
2770 </Messages> 2770 </Messages>
2771 </Member> 2771 </Member>
2772 <Member Name="firstname"> 2772 <Member Name="firstname">
2773 <Messages> 2773 <Messages>
2774 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2774 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2775 <Issue> 2775 <Issue>
2776 <Item>firstname</Item> 2776 <Item>firstname</Item>
2777 </Issue> 2777 </Issue>
2778 </Message> 2778 </Message>
2779 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2779 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2780 <Issue Name="Member"> 2780 <Issue Name="Member">
2781 <Item>firstname</Item> 2781 <Item>firstname</Item>
2782 <Item>UserProfile.firstname</Item> 2782 <Item>UserProfile.firstname</Item>
2783 </Issue> 2783 </Issue>
2784 </Message> 2784 </Message>
2785 </Messages> 2785 </Messages>
2786 </Member> 2786 </Member>
2787 <Member Name="homelookat"> 2787 <Member Name="homelookat">
2788 <Messages> 2788 <Messages>
2789 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2789 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2790 <Issue> 2790 <Issue>
2791 <Item>homelookat</Item> 2791 <Item>homelookat</Item>
2792 </Issue> 2792 </Issue>
2793 </Message> 2793 </Message>
2794 <Message Id="homelookat" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2794 <Message Id="homelookat" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2795 <Issue Name="Member"> 2795 <Issue Name="Member">
2796 <Item>homelookat</Item> 2796 <Item>homelookat</Item>
2797 <Item>UserProfile.homelookat</Item> 2797 <Item>UserProfile.homelookat</Item>
2798 </Issue> 2798 </Issue>
2799 </Message> 2799 </Message>
2800 </Messages> 2800 </Messages>
2801 </Member> 2801 </Member>
2802 <Member Name="homepos"> 2802 <Member Name="homepos">
2803 <Messages> 2803 <Messages>
2804 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2804 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2805 <Issue> 2805 <Issue>
2806 <Item>homepos</Item> 2806 <Item>homepos</Item>
2807 </Issue> 2807 </Issue>
2808 </Message> 2808 </Message>
2809 <Message Id="homepos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2809 <Message Id="homepos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2810 <Issue Name="Member"> 2810 <Issue Name="Member">
2811 <Item>homepos</Item> 2811 <Item>homepos</Item>
2812 <Item>UserProfile.homepos</Item> 2812 <Item>UserProfile.homepos</Item>
2813 </Issue> 2813 </Issue>
2814 </Message> 2814 </Message>
2815 </Messages> 2815 </Messages>
2816 </Member> 2816 </Member>
2817 <Member Name="homeregionhandle"> 2817 <Member Name="homeregionhandle">
2818 <Messages> 2818 <Messages>
2819 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2819 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2820 <Issue> 2820 <Issue>
2821 <Item>homeregionhandle</Item> 2821 <Item>homeregionhandle</Item>
2822 </Issue> 2822 </Issue>
2823 </Message> 2823 </Message>
2824 <Message Id="homeregionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2824 <Message Id="homeregionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2825 <Issue Name="Member"> 2825 <Issue Name="Member">
2826 <Item>homeregionhandle</Item> 2826 <Item>homeregionhandle</Item>
2827 <Item>UserProfile.homeregionhandle</Item> 2827 <Item>UserProfile.homeregionhandle</Item>
2828 </Issue> 2828 </Issue>
2829 </Message> 2829 </Message>
2830 </Messages> 2830 </Messages>
2831 </Member> 2831 </Member>
2832 <Member Name="Inventory"> 2832 <Member Name="Inventory">
2833 <Messages> 2833 <Messages>
2834 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2834 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2835 <Issue> 2835 <Issue>
2836 <Item>Inventory</Item> 2836 <Item>Inventory</Item>
2837 </Issue> 2837 </Issue>
2838 </Message> 2838 </Message>
2839 </Messages> 2839 </Messages>
2840 </Member> 2840 </Member>
2841 <Member Name="IsGridGod"> 2841 <Member Name="IsGridGod">
2842 <Messages> 2842 <Messages>
2843 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2843 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2844 <Issue> 2844 <Issue>
2845 <Item>IsGridGod</Item> 2845 <Item>IsGridGod</Item>
2846 </Issue> 2846 </Issue>
2847 </Message> 2847 </Message>
2848 </Messages> 2848 </Messages>
2849 </Member> 2849 </Member>
2850 <Member Name="IsLocal"> 2850 <Member Name="IsLocal">
2851 <Messages> 2851 <Messages>
2852 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2852 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2853 <Issue> 2853 <Issue>
2854 <Item>IsLocal</Item> 2854 <Item>IsLocal</Item>
2855 </Issue> 2855 </Issue>
2856 </Message> 2856 </Message>
2857 </Messages> 2857 </Messages>
2858 </Member> 2858 </Member>
2859 <Member Name="lastname"> 2859 <Member Name="lastname">
2860 <Messages> 2860 <Messages>
2861 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2861 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2862 <Issue> 2862 <Issue>
2863 <Item>lastname</Item> 2863 <Item>lastname</Item>
2864 </Issue> 2864 </Issue>
2865 </Message> 2865 </Message>
2866 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2866 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2867 <Issue Name="Member"> 2867 <Issue Name="Member">
2868 <Item>lastname</Item> 2868 <Item>lastname</Item>
2869 <Item>UserProfile.lastname</Item> 2869 <Item>UserProfile.lastname</Item>
2870 </Issue> 2870 </Issue>
2871 </Message> 2871 </Message>
2872 </Messages> 2872 </Messages>
2873 </Member> 2873 </Member>
2874 <Member Name="MD5passwd"> 2874 <Member Name="MD5passwd">
2875 <Messages> 2875 <Messages>
2876 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2876 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2877 <Issue> 2877 <Issue>
2878 <Item>MD5passwd</Item> 2878 <Item>MD5passwd</Item>
2879 </Issue> 2879 </Issue>
2880 </Message> 2880 </Message>
2881 </Messages> 2881 </Messages>
2882 </Member> 2882 </Member>
2883 <Member Name="UUID"> 2883 <Member Name="UUID">
2884 <Messages> 2884 <Messages>
2885 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2885 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2886 <Issue> 2886 <Issue>
2887 <Item>UUID</Item> 2887 <Item>UUID</Item>
2888 </Issue> 2888 </Issue>
2889 </Message> 2889 </Message>
2890 </Messages> 2890 </Messages>
2891 </Member> 2891 </Member>
2892 </Members> 2892 </Members>
2893 </Type> 2893 </Type>
2894 <Type Name="UserProfileManager"> 2894 <Type Name="UserProfileManager">
2895 <Members> 2895 <Members>
2896 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void"> 2896 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void">
2897 <Messages> 2897 <Messages>
2898 <Message Id="0#" TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045" Created="2007-03-27 04:29:04Z"> 2898 <Message Id="0#" TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045" Created="2007-03-27 04:29:04Z">
2899 <Issue Level="CriticalWarning"> 2899 <Issue Level="CriticalWarning">
2900 <Item>response</Item> 2900 <Item>response</Item>
2901 </Issue> 2901 </Issue>
2902 </Message> 2902 </Message>
2903 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2903 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2904 <Issue Name="Member"> 2904 <Issue Name="Member">
2905 <Item>Customise</Item> 2905 <Item>Customise</Item>
2906 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2906 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2907 </Issue> 2907 </Issue>
2908 </Message> 2908 </Message>
2909 <Message Id="GridResp" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z"> 2909 <Message Id="GridResp" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
2910 <Issue> 2910 <Issue>
2911 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2911 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2912 <Item>GridResp</Item> 2912 <Item>GridResp</Item>
2913 <Item>Nwc.XmlRpc.XmlRpcResponse</Item> 2913 <Item>Nwc.XmlRpc.XmlRpcResponse</Item>
2914 </Issue> 2914 </Issue>
2915 </Message> 2915 </Message>
2916 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2916 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2917 <Issue> 2917 <Issue>
2918 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2918 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2919 <Item>System.Single.ToString</Item> 2919 <Item>System.Single.ToString</Item>
2920 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2920 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2921 </Issue> 2921 </Issue>
2922 <Issue> 2922 <Issue>
2923 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2923 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2924 <Item>System.Single.ToString</Item> 2924 <Item>System.Single.ToString</Item>
2925 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2925 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2926 </Issue> 2926 </Issue>
2927 <Issue> 2927 <Issue>
2928 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2928 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2929 <Item>System.Single.ToString</Item> 2929 <Item>System.Single.ToString</Item>
2930 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2930 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2931 </Issue> 2931 </Issue>
2932 <Issue> 2932 <Issue>
2933 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2933 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2934 <Item>System.Single.ToString</Item> 2934 <Item>System.Single.ToString</Item>
2935 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2935 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2936 </Issue> 2936 </Issue>
2937 <Issue> 2937 <Issue>
2938 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2938 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2939 <Item>System.Single.ToString</Item> 2939 <Item>System.Single.ToString</Item>
2940 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2940 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2941 </Issue> 2941 </Issue>
2942 <Issue> 2942 <Issue>
2943 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2943 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2944 <Item>System.Single.ToString</Item> 2944 <Item>System.Single.ToString</Item>
2945 <Item>System.Single.ToString(System.IFormatProvider)</Item> 2945 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2946 </Issue> 2946 </Issue>
2947 </Message> 2947 </Message>
2948 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 2948 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2949 <Issue> 2949 <Issue>
2950 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2950 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2951 <Item>System.UInt32.ToString</Item> 2951 <Item>System.UInt32.ToString</Item>
2952 <Item>System.UInt32.ToString(System.IFormatProvider)</Item> 2952 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
2953 </Issue> 2953 </Issue>
2954 <Issue> 2954 <Issue>
2955 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 2955 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2956 <Item>System.UInt32.ToString</Item> 2956 <Item>System.UInt32.ToString</Item>
2957 <Item>System.UInt32.ToString(System.IFormatProvider)</Item> 2957 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
2958 </Issue> 2958 </Issue>
2959 </Message> 2959 </Message>
2960 </Messages> 2960 </Messages>
2961 </Member> 2961 </Member>
2962 <Member Name="DefaultStartupMsg"> 2962 <Member Name="DefaultStartupMsg">
2963 <Messages> 2963 <Messages>
2964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2965 <Issue> 2965 <Issue>
2966 <Item>DefaultStartupMsg</Item> 2966 <Item>DefaultStartupMsg</Item>
2967 </Issue> 2967 </Issue>
2968 </Message> 2968 </Message>
2969 </Messages> 2969 </Messages>
2970 </Member> 2970 </Member>
2971 <Member Name="GridRecvKey"> 2971 <Member Name="GridRecvKey">
2972 <Messages> 2972 <Messages>
2973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2974 <Issue> 2974 <Issue>
2975 <Item>GridRecvKey</Item> 2975 <Item>GridRecvKey</Item>
2976 </Issue> 2976 </Issue>
2977 </Message> 2977 </Message>
2978 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 2978 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2979 <Issue Name="Member"> 2979 <Issue Name="Member">
2980 <Item>Recv</Item> 2980 <Item>Recv</Item>
2981 <Item>UserProfileManager.GridRecvKey</Item> 2981 <Item>UserProfileManager.GridRecvKey</Item>
2982 </Issue> 2982 </Issue>
2983 </Message> 2983 </Message>
2984 </Messages> 2984 </Messages>
2985 </Member> 2985 </Member>
2986 <Member Name="GridSendKey"> 2986 <Member Name="GridSendKey">
2987 <Messages> 2987 <Messages>
2988 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2988 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2989 <Issue> 2989 <Issue>
2990 <Item>GridSendKey</Item> 2990 <Item>GridSendKey</Item>
2991 </Issue> 2991 </Issue>
2992 </Message> 2992 </Message>
2993 </Messages> 2993 </Messages>
2994 </Member> 2994 </Member>
2995 <Member Name="GridURL"> 2995 <Member Name="GridURL">
2996 <Messages> 2996 <Messages>
2997 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 2997 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2998 <Issue> 2998 <Issue>
2999 <Item>GridURL</Item> 2999 <Item>GridURL</Item>
3000 </Issue> 3000 </Issue>
3001 </Message> 3001 </Message>
3002 </Messages> 3002 </Messages>
3003 </Member> 3003 </Member>
3004 <Member Name="ParseXMLRPC(System.String):System.String"> 3004 <Member Name="ParseXMLRPC(System.String):System.String">
3005 <Messages> 3005 <Messages>
3006 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 3006 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
3007 <Issue> 3007 <Issue>
3008 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3008 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3009 <Item>System.Exception</Item> 3009 <Item>System.Exception</Item>
3010 </Issue> 3010 </Issue>
3011 </Message> 3011 </Message>
3012 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 3012 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3013 <Issue Name="Member"> 3013 <Issue Name="Member">
3014 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3014 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3015 </Issue> 3015 </Issue>
3016 </Message> 3016 </Message>
3017 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 3017 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3018 <Issue> 3018 <Issue>
3019 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3019 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3020 <Item>System.Int32.ToString</Item> 3020 <Item>System.Int32.ToString</Item>
3021 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 3021 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3022 </Issue> 3022 </Issue>
3023 <Issue> 3023 <Issue>
3024 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3024 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3025 <Item>System.Int32.ToString</Item> 3025 <Item>System.Int32.ToString</Item>
3026 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 3026 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3027 </Issue> 3027 </Issue>
3028 </Message> 3028 </Message>
3029 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 3029 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3030 <Issue> 3030 <Issue>
3031 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3031 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3032 <Item>System.Single.ToString</Item> 3032 <Item>System.Single.ToString</Item>
3033 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3033 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3034 </Issue> 3034 </Issue>
3035 <Issue> 3035 <Issue>
3036 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3036 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3037 <Item>System.Single.ToString</Item> 3037 <Item>System.Single.ToString</Item>
3038 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3038 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3039 </Issue> 3039 </Issue>
3040 <Issue> 3040 <Issue>
3041 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3041 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3042 <Item>System.Single.ToString</Item> 3042 <Item>System.Single.ToString</Item>
3043 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3043 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3044 </Issue> 3044 </Issue>
3045 <Issue> 3045 <Issue>
3046 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3046 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3047 <Item>System.Single.ToString</Item> 3047 <Item>System.Single.ToString</Item>
3048 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3048 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3049 </Issue> 3049 </Issue>
3050 <Issue> 3050 <Issue>
3051 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3051 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3052 <Item>System.Single.ToString</Item> 3052 <Item>System.Single.ToString</Item>
3053 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3053 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3054 </Issue> 3054 </Issue>
3055 <Issue> 3055 <Issue>
3056 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3056 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3057 <Item>System.Single.ToString</Item> 3057 <Item>System.Single.ToString</Item>
3058 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3058 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3059 </Issue> 3059 </Issue>
3060 <Issue> 3060 <Issue>
3061 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3061 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3062 <Item>System.Single.ToString</Item> 3062 <Item>System.Single.ToString</Item>
3063 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3063 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3064 </Issue> 3064 </Issue>
3065 <Issue> 3065 <Issue>
3066 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3066 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3067 <Item>System.Single.ToString</Item> 3067 <Item>System.Single.ToString</Item>
3068 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3068 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3069 </Issue> 3069 </Issue>
3070 <Issue> 3070 <Issue>
3071 <Item>UserProfileManager.ParseXMLRPC(String):String</Item> 3071 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3072 <Item>System.Single.ToString</Item> 3072 <Item>System.Single.ToString</Item>
3073 <Item>System.Single.ToString(System.IFormatProvider)</Item> 3073 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3074 </Issue> 3074 </Issue>
3075 </Message> 3075 </Message>
3076 </Messages> 3076 </Messages>
3077 </Member> 3077 </Member>
3078 <Member Name="SetKeys(System.String,System.String,System.String,System.String):System.Void"> 3078 <Member Name="SetKeys(System.String,System.String,System.String,System.String):System.Void">
3079 <Messages> 3079 <Messages>
3080 <Message Id="1#recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3080 <Message Id="1#recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3081 <Issue Name="Parameter"> 3081 <Issue Name="Parameter">
3082 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item> 3082 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
3083 <Item>recv</Item> 3083 <Item>recv</Item>
3084 <Item>recvKey</Item> 3084 <Item>recvKey</Item>
3085 </Issue> 3085 </Issue>
3086 </Message> 3086 </Message>
3087 <Message Id="2#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z"> 3087 <Message Id="2#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
3088 <Issue> 3088 <Issue>
3089 <Item>url</Item> 3089 <Item>url</Item>
3090 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item> 3090 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
3091 </Issue> 3091 </Issue>
3092 </Message> 3092 </Message>
3093 </Messages> 3093 </Messages>
3094 </Member> 3094 </Member>
3095 </Members> 3095 </Members>
3096 </Type> 3096 </Type>
3097 <Type Name="UserProfileManagerBase"> 3097 <Type Name="UserProfileManagerBase">
3098 <Members> 3098 <Members>
3099 <Member Name="AuthenticateUser(System.String,System.String,System.String):System.Boolean"> 3099 <Member Name="AuthenticateUser(System.String,System.String,System.String):System.Boolean">
3100 <Messages> 3100 <Messages>
3101 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3101 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3102 <Issue Name="Parameter"> 3102 <Issue Name="Parameter">
3103 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item> 3103 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3104 <Item>firstname</Item> 3104 <Item>firstname</Item>
3105 <Item>firstname</Item> 3105 <Item>firstname</Item>
3106 </Issue> 3106 </Issue>
3107 </Message> 3107 </Message>
3108 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3108 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3109 <Issue Name="Parameter"> 3109 <Issue Name="Parameter">
3110 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item> 3110 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3111 <Item>lastname</Item> 3111 <Item>lastname</Item>
3112 <Item>lastname</Item> 3112 <Item>lastname</Item>
3113 </Issue> 3113 </Issue>
3114 </Message> 3114 </Message>
3115 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3115 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3116 <Issue Name="Parameter"> 3116 <Issue Name="Parameter">
3117 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item> 3117 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3118 <Item>passwd</Item> 3118 <Item>passwd</Item>
3119 <Item>passwd</Item> 3119 <Item>passwd</Item>
3120 </Issue> 3120 </Issue>
3121 </Message> 3121 </Message>
3122 </Messages> 3122 </Messages>
3123 </Member> 3123 </Member>
3124 <Member Name="CreateNewProfile(System.String,System.String,System.String):OpenSim.Framework.User.UserProfile"> 3124 <Member Name="CreateNewProfile(System.String,System.String,System.String):OpenSim.Framework.User.UserProfile">
3125 <Messages> 3125 <Messages>
3126 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 3126 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3127 <Issue Name="Parameter"> 3127 <Issue Name="Parameter">
3128 <Item>MD5passwd</Item> 3128 <Item>MD5passwd</Item>
3129 </Issue> 3129 </Issue>
3130 </Message> 3130 </Message>
3131 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3131 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3132 <Issue Name="Parameter"> 3132 <Issue Name="Parameter">
3133 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item> 3133 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3134 <Item>firstname</Item> 3134 <Item>firstname</Item>
3135 <Item>firstname</Item> 3135 <Item>firstname</Item>
3136 </Issue> 3136 </Issue>
3137 </Message> 3137 </Message>
3138 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3138 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3139 <Issue Name="Parameter"> 3139 <Issue Name="Parameter">
3140 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item> 3140 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3141 <Item>lastname</Item> 3141 <Item>lastname</Item>
3142 <Item>lastname</Item> 3142 <Item>lastname</Item>
3143 </Issue> 3143 </Issue>
3144 </Message> 3144 </Message>
3145 <Message Id="2#M" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3145 <Message Id="2#M" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3146 <Issue Name="Parameter"> 3146 <Issue Name="Parameter">
3147 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item> 3147 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3148 <Item>M</Item> 3148 <Item>M</Item>
3149 <Item>MD5passwd</Item> 3149 <Item>MD5passwd</Item>
3150 </Issue> 3150 </Issue>
3151 </Message> 3151 </Message>
3152 </Messages> 3152 </Messages>
3153 </Member> 3153 </Member>
3154 <Member Name="GetProfileByLLUUID(libsecondlife.LLUUID):OpenSim.Framework.User.UserProfile"> 3154 <Member Name="GetProfileByLLUUID(libsecondlife.LLUUID):OpenSim.Framework.User.UserProfile">
3155 <Messages> 3155 <Messages>
3156 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 3156 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3157 <Issue Name="Parameter"> 3157 <Issue Name="Parameter">
3158 <Item>ProfileLLUUID</Item> 3158 <Item>ProfileLLUUID</Item>
3159 </Issue> 3159 </Issue>
3160 </Message> 3160 </Message>
3161 <Message Id="0#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 3161 <Message Id="0#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3162 <Issue Name="Parameter"> 3162 <Issue Name="Parameter">
3163 <Item>ProfileLLUUID</Item> 3163 <Item>ProfileLLUUID</Item>
3164 </Issue> 3164 </Issue>
3165 </Message> 3165 </Message>
3166 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 3166 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3167 <Issue Name="Member"> 3167 <Issue Name="Member">
3168 <Item>UserProfileManagerBase.GetProfileByLLUUID(LLUUID):UserProfile</Item> 3168 <Item>UserProfileManagerBase.GetProfileByLLUUID(LLUUID):UserProfile</Item>
3169 </Issue> 3169 </Issue>
3170 </Message> 3170 </Message>
3171 </Messages> 3171 </Messages>
3172 </Member> 3172 </Member>
3173 <Member Name="GetProfileByName(System.String,System.String):OpenSim.Framework.User.UserProfile"> 3173 <Member Name="GetProfileByName(System.String,System.String):OpenSim.Framework.User.UserProfile">
3174 <Messages> 3174 <Messages>
3175 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3175 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3176 <Issue Name="Parameter"> 3176 <Issue Name="Parameter">
3177 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item> 3177 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item>
3178 <Item>firstname</Item> 3178 <Item>firstname</Item>
3179 <Item>firstname</Item> 3179 <Item>firstname</Item>
3180 </Issue> 3180 </Issue>
3181 </Message> 3181 </Message>
3182 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3182 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3183 <Issue Name="Parameter"> 3183 <Issue Name="Parameter">
3184 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item> 3184 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item>
3185 <Item>lastname</Item> 3185 <Item>lastname</Item>
3186 <Item>lastname</Item> 3186 <Item>lastname</Item>
3187 </Issue> 3187 </Issue>
3188 </Message> 3188 </Message>
3189 </Messages> 3189 </Messages>
3190 </Member> 3190 </Member>
3191 <Member Name="GetUsersInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory"> 3191 <Member Name="GetUsersInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
3192 <Messages> 3192 <Messages>
3193 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3193 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3194 <Issue Name="ParameterId"> 3194 <Issue Name="ParameterId">
3195 <Item>ID</Item> 3195 <Item>ID</Item>
3196 <Item>agentID</Item> 3196 <Item>agentID</Item>
3197 <Item>Id</Item> 3197 <Item>Id</Item>
3198 </Issue> 3198 </Issue>
3199 </Message> 3199 </Message>
3200 </Messages> 3200 </Messages>
3201 </Member> 3201 </Member>
3202 <Member Name="SetGod(libsecondlife.LLUUID):System.Void"> 3202 <Member Name="SetGod(libsecondlife.LLUUID):System.Void">
3203 <Messages> 3203 <Messages>
3204 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 3204 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3205 <Issue Name="Parameter"> 3205 <Issue Name="Parameter">
3206 <Item>GodID</Item> 3206 <Item>GodID</Item>
3207 </Issue> 3207 </Issue>
3208 </Message> 3208 </Message>
3209 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3209 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3210 <Issue Name="ParameterId"> 3210 <Issue Name="ParameterId">
3211 <Item>ID</Item> 3211 <Item>ID</Item>
3212 <Item>GodID</Item> 3212 <Item>GodID</Item>
3213 <Item>Id</Item> 3213 <Item>Id</Item>
3214 </Issue> 3214 </Issue>
3215 </Message> 3215 </Message>
3216 </Messages> 3216 </Messages>
3217 </Member> 3217 </Member>
3218 <Member Name="UserProfiles"> 3218 <Member Name="UserProfiles">
3219 <Messages> 3219 <Messages>
3220 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3220 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3221 <Issue> 3221 <Issue>
3222 <Item>UserProfiles</Item> 3222 <Item>UserProfiles</Item>
3223 </Issue> 3223 </Issue>
3224 </Message> 3224 </Message>
3225 </Messages> 3225 </Messages>
3226 </Member> 3226 </Member>
3227 </Members> 3227 </Members>
3228 </Type> 3228 </Type>
3229 </Types> 3229 </Types>
3230 </Namespace> 3230 </Namespace>
3231 <Namespace Name="OpenSim.Framework.Utilities"> 3231 <Namespace Name="OpenSim.Framework.Utilities">
3232 <Types> 3232 <Types>
3233 <Type Name="BlockingQueue`1"> 3233 <Type Name="BlockingQueue`1">
3234 <Messages> 3234 <Messages>
3235 <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2007-03-27 04:29:04Z"> 3235 <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2007-03-27 04:29:04Z">
3236 <Issue> 3236 <Issue>
3237 <Item>OpenSim.Framework.Utilities.BlockingQueue`1</Item> 3237 <Item>OpenSim.Framework.Utilities.BlockingQueue`1</Item>
3238 <Item>Queue</Item> 3238 <Item>Queue</Item>
3239 </Issue> 3239 </Issue>
3240 </Message> 3240 </Message>
3241 </Messages> 3241 </Messages>
3242 </Type> 3242 </Type>
3243 <Type Name="Util"> 3243 <Type Name="Util">
3244 <Messages> 3244 <Messages>
3245 <Message Id="Util" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3245 <Message Id="Util" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3246 <Issue Name="Type"> 3246 <Issue Name="Type">
3247 <Item>Util</Item> 3247 <Item>Util</Item>
3248 <Item>OpenSim.Framework.Utilities.Util</Item> 3248 <Item>OpenSim.Framework.Utilities.Util</Item>
3249 </Issue> 3249 </Issue>
3250 </Message> 3250 </Message>
3251 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z"> 3251 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
3252 <Issue> 3252 <Issue>
3253 <Item>Util</Item> 3253 <Item>Util</Item>
3254 </Issue> 3254 </Issue>
3255 </Message> 3255 </Message>
3256 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 3256 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
3257 <Issue> 3257 <Issue>
3258 <Item>Util</Item> 3258 <Item>Util</Item>
3259 <Item>System.Web.Util</Item> 3259 <Item>System.Web.Util</Item>
3260 </Issue> 3260 </Issue>
3261 </Message> 3261 </Message>
3262 </Messages> 3262 </Messages>
3263 <Members> 3263 <Members>
3264 <Member Name="GetNextXferID():System.UInt32"> 3264 <Member Name="GetNextXferID():System.UInt32">
3265 <Messages> 3265 <Messages>
3266 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3266 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3267 <Issue Name="Member"> 3267 <Issue Name="Member">
3268 <Item>Xfer</Item> 3268 <Item>Xfer</Item>
3269 <Item>Util.GetNextXferID():UInt32</Item> 3269 <Item>Util.GetNextXferID():UInt32</Item>
3270 </Issue> 3270 </Issue>
3271 </Message> 3271 </Message>
3272 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3272 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3273 <Issue Name="MemberId"> 3273 <Issue Name="MemberId">
3274 <Item>Util.GetNextXferID():UInt32</Item> 3274 <Item>Util.GetNextXferID():UInt32</Item>
3275 </Issue> 3275 </Issue>
3276 </Message> 3276 </Message>
3277 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 3277 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3278 <Issue> 3278 <Issue>
3279 <Item>GetNextXferID</Item> 3279 <Item>GetNextXferID</Item>
3280 </Issue> 3280 </Issue>
3281 </Message> 3281 </Message>
3282 </Messages> 3282 </Messages>
3283 </Member> 3283 </Member>
3284 <Member Name="UIntsToLong(System.UInt32,System.UInt32):System.UInt64"> 3284 <Member Name="UIntsToLong(System.UInt32,System.UInt32):System.UInt64">
3285 <Messages> 3285 <Messages>
3286 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 3286 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3287 <Issue Name="Parameter"> 3287 <Issue Name="Parameter">
3288 <Item>X</Item> 3288 <Item>X</Item>
3289 </Issue> 3289 </Issue>
3290 </Message> 3290 </Message>
3291 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 3291 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3292 <Issue Name="Parameter"> 3292 <Issue Name="Parameter">
3293 <Item>Y</Item> 3293 <Item>Y</Item>
3294 </Issue> 3294 </Issue>
3295 </Message> 3295 </Message>
3296 <Message Id="0#X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3296 <Message Id="0#X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3297 <Issue Name="ParameterOneLetter"> 3297 <Issue Name="ParameterOneLetter">
3298 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item> 3298 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3299 <Item>X</Item> 3299 <Item>X</Item>
3300 </Issue> 3300 </Issue>
3301 </Message> 3301 </Message>
3302 <Message Id="1#Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3302 <Message Id="1#Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3303 <Issue Name="ParameterOneLetter"> 3303 <Issue Name="ParameterOneLetter">
3304 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item> 3304 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3305 <Item>Y</Item> 3305 <Item>Y</Item>
3306 </Issue> 3306 </Issue>
3307 </Message> 3307 </Message>
3308 <Message Id="Ints" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3308 <Message Id="Ints" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3309 <Issue Name="Member"> 3309 <Issue Name="Member">
3310 <Item>Ints</Item> 3310 <Item>Ints</Item>
3311 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item> 3311 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3312 </Issue> 3312 </Issue>
3313 </Message> 3313 </Message>
3314 </Messages> 3314 </Messages>
3315 </Member> 3315 </Member>
3316 </Members> 3316 </Members>
3317 </Type> 3317 </Type>
3318 </Types> 3318 </Types>
3319 </Namespace> 3319 </Namespace>
3320 </Namespaces> 3320 </Namespaces>
3321 </Module> 3321 </Module>
3322 </Modules> 3322 </Modules>
3323 </Target> 3323 </Target>
3324 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll"> 3324 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll">
3325 <Modules> 3325 <Modules>
3326 <Module Name="opensim.gridinterfaces.local.dll"> 3326 <Module Name="opensim.gridinterfaces.local.dll">
3327 <Messages> 3327 <Messages>
3328 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 3328 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3329 <Issue> 3329 <Issue>
3330 <Item>OpenSim.GridInterfaces.Local</Item> 3330 <Item>OpenSim.GridInterfaces.Local</Item>
3331 </Issue> 3331 </Issue>
3332 </Message> 3332 </Message>
3333 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 3333 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3334 <Issue Name="NoStrongName"> 3334 <Issue Name="NoStrongName">
3335 <Item>OpenSim.GridInterfaces.Local</Item> 3335 <Item>OpenSim.GridInterfaces.Local</Item>
3336 </Issue> 3336 </Issue>
3337 </Message> 3337 </Message>
3338 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 3338 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3339 <Issue Name="NoAttr"> 3339 <Issue Name="NoAttr">
3340 <Item>OpenSim.GridInterfaces.Local</Item> 3340 <Item>OpenSim.GridInterfaces.Local</Item>
3341 </Issue> 3341 </Issue>
3342 </Message> 3342 </Message>
3343 </Messages> 3343 </Messages>
3344 <Namespaces> 3344 <Namespaces>
3345 <Namespace Name="OpenSim.GridInterfaces.Local"> 3345 <Namespace Name="OpenSim.GridInterfaces.Local">
3346 <Types> 3346 <Types>
3347 <Type Name="AssetStorage"> 3347 <Type Name="AssetStorage">
3348 <Members> 3348 <Members>
3349 <Member Name="Data"> 3349 <Member Name="Data">
3350 <Messages> 3350 <Messages>
3351 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3351 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3352 <Issue> 3352 <Issue>
3353 <Item>Data</Item> 3353 <Item>Data</Item>
3354 </Issue> 3354 </Issue>
3355 </Message> 3355 </Message>
3356 </Messages> 3356 </Messages>
3357 </Member> 3357 </Member>
3358 <Member Name="Name"> 3358 <Member Name="Name">
3359 <Messages> 3359 <Messages>
3360 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3360 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3361 <Issue> 3361 <Issue>
3362 <Item>Name</Item> 3362 <Item>Name</Item>
3363 </Issue> 3363 </Issue>
3364 </Message> 3364 </Message>
3365 </Messages> 3365 </Messages>
3366 </Member> 3366 </Member>
3367 <Member Name="Type"> 3367 <Member Name="Type">
3368 <Messages> 3368 <Messages>
3369 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3369 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3370 <Issue> 3370 <Issue>
3371 <Item>Type</Item> 3371 <Item>Type</Item>
3372 </Issue> 3372 </Issue>
3373 </Message> 3373 </Message>
3374 </Messages> 3374 </Messages>
3375 </Member> 3375 </Member>
3376 <Member Name="UUID"> 3376 <Member Name="UUID">
3377 <Messages> 3377 <Messages>
3378 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3378 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3379 <Issue> 3379 <Issue>
3380 <Item>UUID</Item> 3380 <Item>UUID</Item>
3381 </Issue> 3381 </Issue>
3382 </Message> 3382 </Message>
3383 </Messages> 3383 </Messages>
3384 </Member> 3384 </Member>
3385 </Members> 3385 </Members>
3386 </Type> 3386 </Type>
3387 <Type Name="AssetUUIDQuery"> 3387 <Type Name="AssetUUIDQuery">
3388 <Messages> 3388 <Messages>
3389 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 3389 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3390 <Issue Name="Type"> 3390 <Issue Name="Type">
3391 <Item>AssetUUIDQuery</Item> 3391 <Item>AssetUUIDQuery</Item>
3392 </Issue> 3392 </Issue>
3393 </Message> 3393 </Message>
3394 </Messages> 3394 </Messages>
3395 <Members> 3395 <Members>
3396 <Member Name="Match(OpenSim.GridInterfaces.Local.AssetStorage):System.Boolean"> 3396 <Member Name="Match(OpenSim.GridInterfaces.Local.AssetStorage):System.Boolean">
3397 <Messages> 3397 <Messages>
3398 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 3398 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3399 <Issue> 3399 <Issue>
3400 <Item>'asset'</Item> 3400 <Item>'asset'</Item>
3401 <Item>AssetUUIDQuery.Match(AssetStorage):Boolean</Item> 3401 <Item>AssetUUIDQuery.Match(AssetStorage):Boolean</Item>
3402 </Issue> 3402 </Issue>
3403 </Message> 3403 </Message>
3404 </Messages> 3404 </Messages>
3405 </Member> 3405 </Member>
3406 </Members> 3406 </Members>
3407 </Type> 3407 </Type>
3408 <Type Name="LocalAssetPlugin"> 3408 <Type Name="LocalAssetPlugin">
3409 <Messages> 3409 <Messages>
3410 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3410 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3411 <Issue Name="Type"> 3411 <Issue Name="Type">
3412 <Item>Plugin</Item> 3412 <Item>Plugin</Item>
3413 <Item>OpenSim.GridInterfaces.Local.LocalAssetPlugin</Item> 3413 <Item>OpenSim.GridInterfaces.Local.LocalAssetPlugin</Item>
3414 </Issue> 3414 </Issue>
3415 </Message> 3415 </Message>
3416 </Messages> 3416 </Messages>
3417 </Type> 3417 </Type>
3418 <Type Name="LocalAssetServer"> 3418 <Type Name="LocalAssetServer">
3419 <Members> 3419 <Members>
3420 <Member Name=".ctor()"> 3420 <Member Name=".ctor()">
3421 <Messages> 3421 <Messages>
3422 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 3422 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
3423 <Issue> 3423 <Issue>
3424 <Item>LocalAssetServer.LocalAssetServer()</Item> 3424 <Item>LocalAssetServer.LocalAssetServer()</Item>
3425 <Item>System.Exception</Item> 3425 <Item>System.Exception</Item>
3426 </Issue> 3426 </Issue>
3427 </Message> 3427 </Message>
3428 </Messages> 3428 </Messages>
3429 </Member> 3429 </Member>
3430 <Member Name="LoadAsset(OpenSim.Framework.Assets.AssetBase,System.Boolean,System.String):System.Void"> 3430 <Member Name="LoadAsset(OpenSim.Framework.Assets.AssetBase,System.Boolean,System.String):System.Void">
3431 <Messages> 3431 <Messages>
3432 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 3432 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
3433 <Issue> 3433 <Issue>
3434 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item> 3434 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item>
3435 </Issue> 3435 </Issue>
3436 </Message> 3436 </Message>
3437 <Message Id="image" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 3437 <Message Id="image" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
3438 <Issue> 3438 <Issue>
3439 <Item>image</Item> 3439 <Item>image</Item>
3440 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item> 3440 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item>
3441 </Issue> 3441 </Issue>
3442 </Message> 3442 </Message>
3443 </Messages> 3443 </Messages>
3444 </Member> 3444 </Member>
3445 <Member Name="UploadNewAsset(OpenSim.Framework.Assets.AssetBase):System.Void"> 3445 <Member Name="UploadNewAsset(OpenSim.Framework.Assets.AssetBase):System.Void">
3446 <Messages> 3446 <Messages>
3447 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 3447 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3448 <Issue> 3448 <Issue>
3449 <Item>'asset'</Item> 3449 <Item>'asset'</Item>
3450 <Item>LocalAssetServer.UploadNewAsset(AssetBase):Void</Item> 3450 <Item>LocalAssetServer.UploadNewAsset(AssetBase):Void</Item>
3451 </Issue> 3451 </Issue>
3452 </Message> 3452 </Message>
3453 </Messages> 3453 </Messages>
3454 </Member> 3454 </Member>
3455 </Members> 3455 </Members>
3456 </Type> 3456 </Type>
3457 <Type Name="LocalGridPlugin"> 3457 <Type Name="LocalGridPlugin">
3458 <Messages> 3458 <Messages>
3459 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3459 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3460 <Issue Name="Type"> 3460 <Issue Name="Type">
3461 <Item>Plugin</Item> 3461 <Item>Plugin</Item>
3462 <Item>OpenSim.GridInterfaces.Local.LocalGridPlugin</Item> 3462 <Item>OpenSim.GridInterfaces.Local.LocalGridPlugin</Item>
3463 </Issue> 3463 </Issue>
3464 </Message> 3464 </Message>
3465 </Messages> 3465 </Messages>
3466 </Type> 3466 </Type>
3467 <Type Name="LocalGridServer"> 3467 <Type Name="LocalGridServer">
3468 <Members> 3468 <Members>
3469 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean"> 3469 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
3470 <Messages> 3470 <Messages>
3471 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 3471 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
3472 <Issue Name="Member"> 3472 <Issue Name="Member">
3473 <Item>Logout</Item> 3473 <Item>Logout</Item>
3474 <Item>LogoutSession</Item> 3474 <Item>LogoutSession</Item>
3475 <Item>LogOff</Item> 3475 <Item>LogOff</Item>
3476 </Issue> 3476 </Issue>
3477 </Message> 3477 </Message>
3478 </Messages> 3478 </Messages>
3479 </Member> 3479 </Member>
3480 <Member Name="Sessions"> 3480 <Member Name="Sessions">
3481 <Messages> 3481 <Messages>
3482 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3482 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3483 <Issue> 3483 <Issue>
3484 <Item>Sessions</Item> 3484 <Item>Sessions</Item>
3485 </Issue> 3485 </Issue>
3486 </Message> 3486 </Message>
3487 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 3487 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
3488 <Issue> 3488 <Issue>
3489 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Interfaces.Login&gt;</Item> 3489 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Interfaces.Login&gt;</Item>
3490 <Item>LocalGridServer.Sessions</Item> 3490 <Item>LocalGridServer.Sessions</Item>
3491 </Issue> 3491 </Issue>
3492 </Message> 3492 </Message>
3493 </Messages> 3493 </Messages>
3494 </Member> 3494 </Member>
3495 </Members> 3495 </Members>
3496 </Type> 3496 </Type>
3497 </Types> 3497 </Types>
3498 </Namespace> 3498 </Namespace>
3499 </Namespaces> 3499 </Namespaces>
3500 </Module> 3500 </Module>
3501 </Modules> 3501 </Modules>
3502 </Target> 3502 </Target>
3503 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll"> 3503 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll">
3504 <Modules> 3504 <Modules>
3505 <Module Name="opensim.gridinterfaces.remote.dll"> 3505 <Module Name="opensim.gridinterfaces.remote.dll">
3506 <Messages> 3506 <Messages>
3507 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 3507 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3508 <Issue> 3508 <Issue>
3509 <Item>OpenSim.GridInterfaces.Remote</Item> 3509 <Item>OpenSim.GridInterfaces.Remote</Item>
3510 </Issue> 3510 </Issue>
3511 </Message> 3511 </Message>
3512 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 3512 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3513 <Issue Name="NoStrongName"> 3513 <Issue Name="NoStrongName">
3514 <Item>OpenSim.GridInterfaces.Remote</Item> 3514 <Item>OpenSim.GridInterfaces.Remote</Item>
3515 </Issue> 3515 </Issue>
3516 </Message> 3516 </Message>
3517 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 3517 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3518 <Issue Name="NoAttr"> 3518 <Issue Name="NoAttr">
3519 <Item>OpenSim.GridInterfaces.Remote</Item> 3519 <Item>OpenSim.GridInterfaces.Remote</Item>
3520 </Issue> 3520 </Issue>
3521 </Message> 3521 </Message>
3522 </Messages> 3522 </Messages>
3523 <Namespaces> 3523 <Namespaces>
3524 <Namespace Name="OpenSim.GridInterfaces.Remote"> 3524 <Namespace Name="OpenSim.GridInterfaces.Remote">
3525 <Types> 3525 <Types>
3526 <Type Name="RemoteAssetPlugin"> 3526 <Type Name="RemoteAssetPlugin">
3527 <Messages> 3527 <Messages>
3528 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3528 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3529 <Issue Name="Type"> 3529 <Issue Name="Type">
3530 <Item>Plugin</Item> 3530 <Item>Plugin</Item>
3531 <Item>OpenSim.GridInterfaces.Remote.RemoteAssetPlugin</Item> 3531 <Item>OpenSim.GridInterfaces.Remote.RemoteAssetPlugin</Item>
3532 </Issue> 3532 </Issue>
3533 </Message> 3533 </Message>
3534 </Messages> 3534 </Messages>
3535 </Type> 3535 </Type>
3536 <Type Name="RemoteGridPlugin"> 3536 <Type Name="RemoteGridPlugin">
3537 <Messages> 3537 <Messages>
3538 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3538 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3539 <Issue Name="Type"> 3539 <Issue Name="Type">
3540 <Item>Plugin</Item> 3540 <Item>Plugin</Item>
3541 <Item>OpenSim.GridInterfaces.Remote.RemoteGridPlugin</Item> 3541 <Item>OpenSim.GridInterfaces.Remote.RemoteGridPlugin</Item>
3542 </Issue> 3542 </Issue>
3543 </Message> 3543 </Message>
3544 </Messages> 3544 </Messages>
3545 </Type> 3545 </Type>
3546 <Type Name="RemoteGridServer"> 3546 <Type Name="RemoteGridServer">
3547 <Members> 3547 <Members>
3548 <Member Name="agentcircuits"> 3548 <Member Name="agentcircuits">
3549 <Messages> 3549 <Messages>
3550 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z"> 3550 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z">
3551 <Issue> 3551 <Issue>
3552 <Item>agentcircuits</Item> 3552 <Item>agentcircuits</Item>
3553 </Issue> 3553 </Issue>
3554 </Message> 3554 </Message>
3555 </Messages> 3555 </Messages>
3556 </Member> 3556 </Member>
3557 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse"> 3557 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse">
3558 <Messages> 3558 <Messages>
3559 <Message Id="2#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2007-03-27 04:29:04Z"> 3559 <Message Id="2#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2007-03-27 04:29:04Z">
3560 <Issue> 3560 <Issue>
3561 <Item>circuitcode</Item> 3561 <Item>circuitcode</Item>
3562 <Item>RemoteGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item> 3562 <Item>RemoteGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item>
3563 <Item>circuitCode</Item> 3563 <Item>circuitCode</Item>
3564 <Item>IGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item> 3564 <Item>IGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item>
3565 </Issue> 3565 </Issue>
3566 </Message> 3566 </Message>
3567 </Messages> 3567 </Messages>
3568 </Member> 3568 </Member>
3569 <Member Name="GridRecvKey"> 3569 <Member Name="GridRecvKey">
3570 <Messages> 3570 <Messages>
3571 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 3571 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
3572 <Issue> 3572 <Issue>
3573 <Item>RemoteGridServer.GridRecvKey</Item> 3573 <Item>RemoteGridServer.GridRecvKey</Item>
3574 </Issue> 3574 </Issue>
3575 </Message> 3575 </Message>
3576 </Messages> 3576 </Messages>
3577 </Member> 3577 </Member>
3578 <Member Name="GridSendKey"> 3578 <Member Name="GridSendKey">
3579 <Messages> 3579 <Messages>
3580 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 3580 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
3581 <Issue> 3581 <Issue>
3582 <Item>RemoteGridServer.GridSendKey</Item> 3582 <Item>RemoteGridServer.GridSendKey</Item>
3583 </Issue> 3583 </Issue>
3584 </Message> 3584 </Message>
3585 </Messages> 3585 </Messages>
3586 </Member> 3586 </Member>
3587 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean"> 3587 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
3588 <Messages> 3588 <Messages>
3589 <Message TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234" Created="2007-03-27 04:29:04Z"> 3589 <Message TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234" Created="2007-03-27 04:29:04Z">
3590 <Issue> 3590 <Issue>
3591 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item> 3591 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3592 <Item>WebRequest.Create(Uri):WebRequest</Item> 3592 <Item>WebRequest.Create(Uri):WebRequest</Item>
3593 <Item>WebRequest.Create(String):WebRequest</Item> 3593 <Item>WebRequest.Create(String):WebRequest</Item>
3594 </Issue> 3594 </Issue>
3595 </Message> 3595 </Message>
3596 <Message Id="GridResponse" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z"> 3596 <Message Id="GridResponse" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
3597 <Issue> 3597 <Issue>
3598 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item> 3598 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3599 <Item>GridResponse</Item> 3599 <Item>GridResponse</Item>
3600 <Item>System.String</Item> 3600 <Item>System.String</Item>
3601 </Issue> 3601 </Issue>
3602 </Message> 3602 </Message>
3603 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 3603 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
3604 <Issue Name="Member"> 3604 <Issue Name="Member">
3605 <Item>Logout</Item> 3605 <Item>Logout</Item>
3606 <Item>LogoutSession</Item> 3606 <Item>LogoutSession</Item>
3607 <Item>LogOff</Item> 3607 <Item>LogOff</Item>
3608 </Issue> 3608 </Issue>
3609 </Message> 3609 </Message>
3610 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 3610 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3611 <Issue> 3611 <Issue>
3612 <Item>'sessionID'</Item> 3612 <Item>'sessionID'</Item>
3613 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item> 3613 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3614 </Issue> 3614 </Issue>
3615 </Message> 3615 </Message>
3616 </Messages> 3616 </Messages>
3617 </Member> 3617 </Member>
3618 </Members> 3618 </Members>
3619 </Type> 3619 </Type>
3620 </Types> 3620 </Types>
3621 </Namespace> 3621 </Namespace>
3622 </Namespaces> 3622 </Namespaces>
3623 </Module> 3623 </Module>
3624 </Modules> 3624 </Modules>
3625 </Target> 3625 </Target>
3626 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll"> 3626 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll">
3627 <Modules> 3627 <Modules>
3628 <Module Name="opensim.physics.manager.dll"> 3628 <Module Name="opensim.physics.manager.dll">
3629 <Messages> 3629 <Messages>
3630 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 3630 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3631 <Issue> 3631 <Issue>
3632 <Item>OpenSim.Physics.Manager</Item> 3632 <Item>OpenSim.Physics.Manager</Item>
3633 </Issue> 3633 </Issue>
3634 </Message> 3634 </Message>
3635 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 3635 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3636 <Issue Name="NoStrongName"> 3636 <Issue Name="NoStrongName">
3637 <Item>OpenSim.Physics.Manager</Item> 3637 <Item>OpenSim.Physics.Manager</Item>
3638 </Issue> 3638 </Issue>
3639 </Message> 3639 </Message>
3640 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 3640 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3641 <Issue Name="NoAttr"> 3641 <Issue Name="NoAttr">
3642 <Item>OpenSim.Physics.Manager</Item> 3642 <Item>OpenSim.Physics.Manager</Item>
3643 </Issue> 3643 </Issue>
3644 </Message> 3644 </Message>
3645 </Messages> 3645 </Messages>
3646 <Namespaces> 3646 <Namespaces>
3647 <Namespace Name="OpenSim.Physics.Manager"> 3647 <Namespace Name="OpenSim.Physics.Manager">
3648 <Types> 3648 <Types>
3649 <Type Name="IPhysicsPlugin"> 3649 <Type Name="IPhysicsPlugin">
3650 <Messages> 3650 <Messages>
3651 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3651 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3652 <Issue Name="Type"> 3652 <Issue Name="Type">
3653 <Item>Plugin</Item> 3653 <Item>Plugin</Item>
3654 <Item>OpenSim.Physics.Manager.IPhysicsPlugin</Item> 3654 <Item>OpenSim.Physics.Manager.IPhysicsPlugin</Item>
3655 </Issue> 3655 </Issue>
3656 </Message> 3656 </Message>
3657 </Messages> 3657 </Messages>
3658 <Members> 3658 <Members>
3659 <Member Name="GetName():System.String"> 3659 <Member Name="GetName():System.String">
3660 <Messages> 3660 <Messages>
3661 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 3661 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3662 <Issue Certainty="50"> 3662 <Issue Certainty="50">
3663 <Item>GetName</Item> 3663 <Item>GetName</Item>
3664 </Issue> 3664 </Issue>
3665 </Message> 3665 </Message>
3666 </Messages> 3666 </Messages>
3667 </Member> 3667 </Member>
3668 <Member Name="GetScene():OpenSim.Physics.Manager.PhysicsScene"> 3668 <Member Name="GetScene():OpenSim.Physics.Manager.PhysicsScene">
3669 <Messages> 3669 <Messages>
3670 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z"> 3670 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3671 <Issue Certainty="50"> 3671 <Issue Certainty="50">
3672 <Item>GetScene</Item> 3672 <Item>GetScene</Item>
3673 </Issue> 3673 </Issue>
3674 </Message> 3674 </Message>
3675 </Messages> 3675 </Messages>
3676 </Member> 3676 </Member>
3677 </Members> 3677 </Members>
3678 </Type> 3678 </Type>
3679 <Type Name="NullPhysicsScene"> 3679 <Type Name="NullPhysicsScene">
3680 <Members> 3680 <Members>
3681 <Member Name="SetTerrain(System.Single[]):System.Void"> 3681 <Member Name="SetTerrain(System.Single[]):System.Void">
3682 <Messages> 3682 <Messages>
3683 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 3683 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3684 <Issue> 3684 <Issue>
3685 <Item>'heightMap'</Item> 3685 <Item>'heightMap'</Item>
3686 <Item>NullPhysicsScene.SetTerrain(Single[]):Void</Item> 3686 <Item>NullPhysicsScene.SetTerrain(Single[]):Void</Item>
3687 </Issue> 3687 </Issue>
3688 </Message> 3688 </Message>
3689 </Messages> 3689 </Messages>
3690 </Member> 3690 </Member>
3691 <Member Name="Simulate(System.Single):System.Void"> 3691 <Member Name="Simulate(System.Single):System.Void">
3692 <Messages> 3692 <Messages>
3693 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 3693 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3694 <Issue> 3694 <Issue>
3695 <Item>NullPhysicsScene.Simulate(Single):Void</Item> 3695 <Item>NullPhysicsScene.Simulate(Single):Void</Item>
3696 <Item>System.Int32.ToString</Item> 3696 <Item>System.Int32.ToString</Item>
3697 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 3697 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3698 </Issue> 3698 </Issue>
3699 </Message> 3699 </Message>
3700 </Messages> 3700 </Messages>
3701 </Member> 3701 </Member>
3702 </Members> 3702 </Members>
3703 </Type> 3703 </Type>
3704 <Type Name="PhysicsActor"> 3704 <Type Name="PhysicsActor">
3705 <Members> 3705 <Members>
3706 <Member Name="Kinematic"> 3706 <Member Name="Kinematic">
3707 <Messages> 3707 <Messages>
3708 <Message Id="Kinematic" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3708 <Message Id="Kinematic" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3709 <Issue Name="Member"> 3709 <Issue Name="Member">
3710 <Item>Kinematic</Item> 3710 <Item>Kinematic</Item>
3711 <Item>PhysicsActor.Kinematic:Boolean</Item> 3711 <Item>PhysicsActor.Kinematic:Boolean</Item>
3712 </Issue> 3712 </Issue>
3713 </Message> 3713 </Message>
3714 </Messages> 3714 </Messages>
3715 </Member> 3715 </Member>
3716 </Members> 3716 </Members>
3717 </Type> 3717 </Type>
3718 <Type Name="PhysicsManager"> 3718 <Type Name="PhysicsManager">
3719 <Members> 3719 <Members>
3720 <Member Name="GetPhysicsScene(System.String):OpenSim.Physics.Manager.PhysicsScene"> 3720 <Member Name="GetPhysicsScene(System.String):OpenSim.Physics.Manager.PhysicsScene">
3721 <Messages> 3721 <Messages>
3722 <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 3722 <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3723 <Issue> 3723 <Issue>
3724 <Item>PhysicsManager.GetPhysicsScene(String):PhysicsScene</Item> 3724 <Item>PhysicsManager.GetPhysicsScene(String):PhysicsScene</Item>
3725 <Item>System.String.Format(System.String,System.Object)</Item> 3725 <Item>System.String.Format(System.String,System.Object)</Item>
3726 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> 3726 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
3727 </Issue> 3727 </Issue>
3728 </Message> 3728 </Message>
3729 </Messages> 3729 </Messages>
3730 </Member> 3730 </Member>
3731 <Member Name="LoadPlugins():System.Void"> 3731 <Member Name="LoadPlugins():System.Void">
3732 <Messages> 3732 <Messages>
3733 <Message Id="Plugins" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3733 <Message Id="Plugins" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3734 <Issue Name="Member"> 3734 <Issue Name="Member">
3735 <Item>Plugins</Item> 3735 <Item>Plugins</Item>
3736 <Item>PhysicsManager.LoadPlugins():Void</Item> 3736 <Item>PhysicsManager.LoadPlugins():Void</Item>
3737 </Issue> 3737 </Issue>
3738 </Message> 3738 </Message>
3739 </Messages> 3739 </Messages>
3740 </Member> 3740 </Member>
3741 </Members> 3741 </Members>
3742 </Type> 3742 </Type>
3743 <Type Name="PhysicsVector"> 3743 <Type Name="PhysicsVector">
3744 <Members> 3744 <Members>
3745 <Member Name=".ctor(System.Single,System.Single,System.Single)"> 3745 <Member Name=".ctor(System.Single,System.Single,System.Single)">
3746 <Messages> 3746 <Messages>
3747 <Message Id="0#x" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3747 <Message Id="0#x" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3748 <Issue Name="ParameterOneLetter"> 3748 <Issue Name="ParameterOneLetter">
3749 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item> 3749 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3750 <Item>x</Item> 3750 <Item>x</Item>
3751 </Issue> 3751 </Issue>
3752 </Message> 3752 </Message>
3753 <Message Id="1#y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3753 <Message Id="1#y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3754 <Issue Name="ParameterOneLetter"> 3754 <Issue Name="ParameterOneLetter">
3755 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item> 3755 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3756 <Item>y</Item> 3756 <Item>y</Item>
3757 </Issue> 3757 </Issue>
3758 </Message> 3758 </Message>
3759 <Message Id="2#z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3759 <Message Id="2#z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3760 <Issue Name="ParameterOneLetter"> 3760 <Issue Name="ParameterOneLetter">
3761 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item> 3761 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3762 <Item>z</Item> 3762 <Item>z</Item>
3763 </Issue> 3763 </Issue>
3764 </Message> 3764 </Message>
3765 </Messages> 3765 </Messages>
3766 </Member> 3766 </Member>
3767 <Member Name="X"> 3767 <Member Name="X">
3768 <Messages> 3768 <Messages>
3769 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3769 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3770 <Issue> 3770 <Issue>
3771 <Item>X</Item> 3771 <Item>X</Item>
3772 </Issue> 3772 </Issue>
3773 </Message> 3773 </Message>
3774 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3774 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3775 <Issue Name="MemberOneLetter"> 3775 <Issue Name="MemberOneLetter">
3776 <Item>X</Item> 3776 <Item>X</Item>
3777 <Item>PhysicsVector.X</Item> 3777 <Item>PhysicsVector.X</Item>
3778 </Issue> 3778 </Issue>
3779 </Message> 3779 </Message>
3780 </Messages> 3780 </Messages>
3781 </Member> 3781 </Member>
3782 <Member Name="Y"> 3782 <Member Name="Y">
3783 <Messages> 3783 <Messages>
3784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3785 <Issue> 3785 <Issue>
3786 <Item>Y</Item> 3786 <Item>Y</Item>
3787 </Issue> 3787 </Issue>
3788 </Message> 3788 </Message>
3789 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3789 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3790 <Issue Name="MemberOneLetter"> 3790 <Issue Name="MemberOneLetter">
3791 <Item>Y</Item> 3791 <Item>Y</Item>
3792 <Item>PhysicsVector.Y</Item> 3792 <Item>PhysicsVector.Y</Item>
3793 </Issue> 3793 </Issue>
3794 </Message> 3794 </Message>
3795 </Messages> 3795 </Messages>
3796 </Member> 3796 </Member>
3797 <Member Name="Z"> 3797 <Member Name="Z">
3798 <Messages> 3798 <Messages>
3799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3800 <Issue> 3800 <Issue>
3801 <Item>Z</Item> 3801 <Item>Z</Item>
3802 </Issue> 3802 </Issue>
3803 </Message> 3803 </Message>
3804 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3804 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3805 <Issue Name="MemberOneLetter"> 3805 <Issue Name="MemberOneLetter">
3806 <Item>Z</Item> 3806 <Item>Z</Item>
3807 <Item>PhysicsVector.Z</Item> 3807 <Item>PhysicsVector.Z</Item>
3808 </Issue> 3808 </Issue>
3809 </Message> 3809 </Message>
3810 </Messages> 3810 </Messages>
3811 </Member> 3811 </Member>
3812 <Member Name="Zero"> 3812 <Member Name="Zero">
3813 <Messages> 3813 <Messages>
3814 <Message TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104" Created="2007-03-27 04:29:04Z"> 3814 <Message TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104" Created="2007-03-27 04:29:04Z">
3815 <Issue> 3815 <Issue>
3816 <Item>PhysicsVector.Zero</Item> 3816 <Item>PhysicsVector.Zero</Item>
3817 <Item>OpenSim.Physics.Manager.PhysicsVector</Item> 3817 <Item>OpenSim.Physics.Manager.PhysicsVector</Item>
3818 </Issue> 3818 </Issue>
3819 </Message> 3819 </Message>
3820 </Messages> 3820 </Messages>
3821 </Member> 3821 </Member>
3822 </Members> 3822 </Members>
3823 </Type> 3823 </Type>
3824 </Types> 3824 </Types>
3825 </Namespace> 3825 </Namespace>
3826 </Namespaces> 3826 </Namespaces>
3827 </Module> 3827 </Module>
3828 </Modules> 3828 </Modules>
3829 </Target> 3829 </Target>
3830 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll"> 3830 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll">
3831 <Modules> 3831 <Modules>
3832 <Module Name="opensim.regionserver.dll"> 3832 <Module Name="opensim.regionserver.dll">
3833 <Messages> 3833 <Messages>
3834 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 3834 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3835 <Issue> 3835 <Issue>
3836 <Item>OpenSim.RegionServer</Item> 3836 <Item>OpenSim.RegionServer</Item>
3837 </Issue> 3837 </Issue>
3838 </Message> 3838 </Message>
3839 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 3839 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3840 <Issue Name="NoStrongName"> 3840 <Issue Name="NoStrongName">
3841 <Item>OpenSim.RegionServer</Item> 3841 <Item>OpenSim.RegionServer</Item>
3842 </Issue> 3842 </Issue>
3843 </Message> 3843 </Message>
3844 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z"> 3844 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z">
3845 <Issue> 3845 <Issue>
3846 <Item>OpenSim.RegionServer</Item> 3846 <Item>OpenSim.RegionServer</Item>
3847 </Issue> 3847 </Issue>
3848 </Message> 3848 </Message>
3849 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 3849 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3850 <Issue Name="NoAttr"> 3850 <Issue Name="NoAttr">
3851 <Item>OpenSim.RegionServer</Item> 3851 <Item>OpenSim.RegionServer</Item>
3852 </Issue> 3852 </Issue>
3853 </Message> 3853 </Message>
3854 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z"> 3854 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z">
3855 <Issue Name="NoAttribute" Level="CriticalError"> 3855 <Issue Name="NoAttribute" Level="CriticalError">
3856 <Item>OpenSim.RegionServer</Item> 3856 <Item>OpenSim.RegionServer</Item>
3857 </Issue> 3857 </Issue>
3858 </Message> 3858 </Message>
3859 </Messages> 3859 </Messages>
3860 <Namespaces> 3860 <Namespaces>
3861 <Namespace Name="OpenSim"> 3861 <Namespace Name="OpenSim">
3862 <Types> 3862 <Types>
3863 <Type Name="AgentAssetUpload"> 3863 <Type Name="AgentAssetUpload">
3864 <Members> 3864 <Members>
3865 <Member Name="AddUpload(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Void"> 3865 <Member Name="AddUpload(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Void">
3866 <Messages> 3866 <Messages>
3867 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3867 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3868 <Issue Name="ParameterId"> 3868 <Issue Name="ParameterId">
3869 <Item>ID</Item> 3869 <Item>ID</Item>
3870 <Item>transactionID</Item> 3870 <Item>transactionID</Item>
3871 <Item>Id</Item> 3871 <Item>Id</Item>
3872 </Issue> 3872 </Issue>
3873 </Message> 3873 </Message>
3874 </Messages> 3874 </Messages>
3875 </Member> 3875 </Member>
3876 <Member Name="AddUploadToAssetCache(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase"> 3876 <Member Name="AddUploadToAssetCache(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
3877 <Messages> 3877 <Messages>
3878 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3878 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3879 <Issue Name="ParameterId"> 3879 <Issue Name="ParameterId">
3880 <Item>ID</Item> 3880 <Item>ID</Item>
3881 <Item>transactionID</Item> 3881 <Item>transactionID</Item>
3882 <Item>Id</Item> 3882 <Item>Id</Item>
3883 </Issue> 3883 </Issue>
3884 </Message> 3884 </Message>
3885 </Messages> 3885 </Messages>
3886 </Member> 3886 </Member>
3887 <Member Name="GetUpload(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase"> 3887 <Member Name="GetUpload(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
3888 <Messages> 3888 <Messages>
3889 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3889 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3890 <Issue Name="ParameterId"> 3890 <Issue Name="ParameterId">
3891 <Item>ID</Item> 3891 <Item>ID</Item>
3892 <Item>transactionID</Item> 3892 <Item>transactionID</Item>
3893 <Item>Id</Item> 3893 <Item>Id</Item>
3894 </Issue> 3894 </Issue>
3895 </Message> 3895 </Message>
3896 </Messages> 3896 </Messages>
3897 </Member> 3897 </Member>
3898 <Member Name="HandleUploadPacket(libsecondlife.Packets.AssetUploadRequestPacket,libsecondlife.LLUUID):System.Void"> 3898 <Member Name="HandleUploadPacket(libsecondlife.Packets.AssetUploadRequestPacket,libsecondlife.LLUUID):System.Void">
3899 <Messages> 3899 <Messages>
3900 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 3900 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3901 <Issue Name="ParameterId"> 3901 <Issue Name="ParameterId">
3902 <Item>ID</Item> 3902 <Item>ID</Item>
3903 <Item>assetID</Item> 3903 <Item>assetID</Item>
3904 <Item>Id</Item> 3904 <Item>Id</Item>
3905 </Issue> 3905 </Issue>
3906 </Message> 3906 </Message>
3907 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 3907 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3908 <Issue> 3908 <Issue>
3909 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item> 3909 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3910 <Item>System.Int32.ToString(System.String)</Item> 3910 <Item>System.Int32.ToString(System.String)</Item>
3911 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item> 3911 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
3912 </Issue> 3912 </Issue>
3913 <Issue> 3913 <Issue>
3914 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item> 3914 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3915 <Item>System.Int32.ToString(System.String)</Item> 3915 <Item>System.Int32.ToString(System.String)</Item>
3916 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item> 3916 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
3917 </Issue> 3917 </Issue>
3918 </Message> 3918 </Message>
3919 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 3919 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3920 <Issue> 3920 <Issue>
3921 <Item>'assetID'</Item> 3921 <Item>'assetID'</Item>
3922 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item> 3922 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3923 </Issue> 3923 </Issue>
3924 <Issue> 3924 <Issue>
3925 <Item>'pack'</Item> 3925 <Item>'pack'</Item>
3926 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item> 3926 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3927 </Issue> 3927 </Issue>
3928 </Message> 3928 </Message>
3929 </Messages> 3929 </Messages>
3930 </Member> 3930 </Member>
3931 <Member Name="HandleXferPacket(libsecondlife.Packets.SendXferPacketPacket):System.Void"> 3931 <Member Name="HandleXferPacket(libsecondlife.Packets.SendXferPacketPacket):System.Void">
3932 <Messages> 3932 <Messages>
3933 <Message Id="0#xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3933 <Message Id="0#xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3934 <Issue Name="Parameter"> 3934 <Issue Name="Parameter">
3935 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item> 3935 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item>
3936 <Item>xfer</Item> 3936 <Item>xfer</Item>
3937 <Item>xferPacket</Item> 3937 <Item>xferPacket</Item>
3938 </Issue> 3938 </Issue>
3939 </Message> 3939 </Message>
3940 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 3940 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3941 <Issue Name="Member"> 3941 <Issue Name="Member">
3942 <Item>Xfer</Item> 3942 <Item>Xfer</Item>
3943 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item> 3943 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item>
3944 </Issue> 3944 </Issue>
3945 </Message> 3945 </Message>
3946 </Messages> 3946 </Messages>
3947 </Member> 3947 </Member>
3948 </Members> 3948 </Members>
3949 </Type> 3949 </Type>
3950 <Type Name="AssetTransaction"> 3950 <Type Name="AssetTransaction">
3951 <Members> 3951 <Members>
3952 <Member Name=".ctor()"> 3952 <Member Name=".ctor()">
3953 <Messages> 3953 <Messages>
3954 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 3954 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
3955 <Issue> 3955 <Issue>
3956 <Item>AssetTransaction.AssetTransaction()</Item> 3956 <Item>AssetTransaction.AssetTransaction()</Item>
3957 <Item>UploadComplete</Item> 3957 <Item>UploadComplete</Item>
3958 <Item>System.Boolean</Item> 3958 <Item>System.Boolean</Item>
3959 <Item>false</Item> 3959 <Item>false</Item>
3960 </Issue> 3960 </Issue>
3961 </Message> 3961 </Message>
3962 </Messages> 3962 </Messages>
3963 </Member> 3963 </Member>
3964 <Member Name="AddToInventory"> 3964 <Member Name="AddToInventory">
3965 <Messages> 3965 <Messages>
3966 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3966 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3967 <Issue> 3967 <Issue>
3968 <Item>AddToInventory</Item> 3968 <Item>AddToInventory</Item>
3969 </Issue> 3969 </Issue>
3970 </Message> 3970 </Message>
3971 </Messages> 3971 </Messages>
3972 </Member> 3972 </Member>
3973 <Member Name="Asset"> 3973 <Member Name="Asset">
3974 <Messages> 3974 <Messages>
3975 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3975 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3976 <Issue> 3976 <Issue>
3977 <Item>Asset</Item> 3977 <Item>Asset</Item>
3978 </Issue> 3978 </Issue>
3979 </Message> 3979 </Message>
3980 </Messages> 3980 </Messages>
3981 </Member> 3981 </Member>
3982 <Member Name="InventFolder"> 3982 <Member Name="InventFolder">
3983 <Messages> 3983 <Messages>
3984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3985 <Issue> 3985 <Issue>
3986 <Item>InventFolder</Item> 3986 <Item>InventFolder</Item>
3987 </Issue> 3987 </Issue>
3988 </Message> 3988 </Message>
3989 </Messages> 3989 </Messages>
3990 </Member> 3990 </Member>
3991 <Member Name="TransactionID"> 3991 <Member Name="TransactionID">
3992 <Messages> 3992 <Messages>
3993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 3993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3994 <Issue> 3994 <Issue>
3995 <Item>TransactionID</Item> 3995 <Item>TransactionID</Item>
3996 </Issue> 3996 </Issue>
3997 </Message> 3997 </Message>
3998 </Messages> 3998 </Messages>
3999 </Member> 3999 </Member>
4000 <Member Name="UploadComplete"> 4000 <Member Name="UploadComplete">
4001 <Messages> 4001 <Messages>
4002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4003 <Issue> 4003 <Issue>
4004 <Item>UploadComplete</Item> 4004 <Item>UploadComplete</Item>
4005 </Issue> 4005 </Issue>
4006 </Message> 4006 </Message>
4007 </Messages> 4007 </Messages>
4008 </Member> 4008 </Member>
4009 <Member Name="XferID"> 4009 <Member Name="XferID">
4010 <Messages> 4010 <Messages>
4011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4012 <Issue> 4012 <Issue>
4013 <Item>XferID</Item> 4013 <Item>XferID</Item>
4014 </Issue> 4014 </Issue>
4015 </Message> 4015 </Message>
4016 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4016 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4017 <Issue Name="Member"> 4017 <Issue Name="Member">
4018 <Item>Xfer</Item> 4018 <Item>Xfer</Item>
4019 <Item>AssetTransaction.XferID</Item> 4019 <Item>AssetTransaction.XferID</Item>
4020 </Issue> 4020 </Issue>
4021 </Message> 4021 </Message>
4022 </Messages> 4022 </Messages>
4023 </Member> 4023 </Member>
4024 </Members> 4024 </Members>
4025 </Type> 4025 </Type>
4026 <Type Name="Grid"> 4026 <Type Name="Grid">
4027 <Messages> 4027 <Messages>
4028 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 4028 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
4029 <Issue> 4029 <Issue>
4030 <Item>Grid</Item> 4030 <Item>Grid</Item>
4031 <Item>OpenSim.Framework.Grid</Item> 4031 <Item>OpenSim.Framework.Grid</Item>
4032 </Issue> 4032 </Issue>
4033 </Message> 4033 </Message>
4034 </Messages> 4034 </Messages>
4035 <Members> 4035 <Members>
4036 <Member Name="AssetDll"> 4036 <Member Name="AssetDll">
4037 <Messages> 4037 <Messages>
4038 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4038 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4039 <Issue> 4039 <Issue>
4040 <Item>AssetDll</Item> 4040 <Item>AssetDll</Item>
4041 </Issue> 4041 </Issue>
4042 </Message> 4042 </Message>
4043 </Messages> 4043 </Messages>
4044 </Member> 4044 </Member>
4045 <Member Name="AssetServer"> 4045 <Member Name="AssetServer">
4046 <Messages> 4046 <Messages>
4047 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4047 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4048 <Issue> 4048 <Issue>
4049 <Item>AssetServer</Item> 4049 <Item>AssetServer</Item>
4050 </Issue> 4050 </Issue>
4051 </Message> 4051 </Message>
4052 </Messages> 4052 </Messages>
4053 </Member> 4053 </Member>
4054 <Member Name="GridDll"> 4054 <Member Name="GridDll">
4055 <Messages> 4055 <Messages>
4056 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4056 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4057 <Issue> 4057 <Issue>
4058 <Item>GridDll</Item> 4058 <Item>GridDll</Item>
4059 </Issue> 4059 </Issue>
4060 </Message> 4060 </Message>
4061 </Messages> 4061 </Messages>
4062 </Member> 4062 </Member>
4063 <Member Name="GridServer"> 4063 <Member Name="GridServer">
4064 <Messages> 4064 <Messages>
4065 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4065 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4066 <Issue> 4066 <Issue>
4067 <Item>GridServer</Item> 4067 <Item>GridServer</Item>
4068 </Issue> 4068 </Issue>
4069 </Message> 4069 </Message>
4070 </Messages> 4070 </Messages>
4071 </Member> 4071 </Member>
4072 <Member Name="Initialise():System.Void"> 4072 <Member Name="Initialise():System.Void">
4073 <Messages> 4073 <Messages>
4074 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4074 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4075 <Issue Name="Member"> 4075 <Issue Name="Member">
4076 <Item>Initialise</Item> 4076 <Item>Initialise</Item>
4077 <Item>Grid.Initialise():Void</Item> 4077 <Item>Grid.Initialise():Void</Item>
4078 </Issue> 4078 </Issue>
4079 </Message> 4079 </Message>
4080 </Messages> 4080 </Messages>
4081 </Member> 4081 </Member>
4082 <Member Name="LoadAssetDll(System.String):OpenSim.Framework.Interfaces.IAssetServer"> 4082 <Member Name="LoadAssetDll(System.String):OpenSim.Framework.Interfaces.IAssetServer">
4083 <Messages> 4083 <Messages>
4084 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 4084 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4085 <Issue> 4085 <Issue>
4086 <Item>Grid.LoadAssetDll(String):IAssetServer</Item> 4086 <Item>Grid.LoadAssetDll(String):IAssetServer</Item>
4087 </Issue> 4087 </Issue>
4088 </Message> 4088 </Message>
4089 </Messages> 4089 </Messages>
4090 </Member> 4090 </Member>
4091 <Member Name="LoadGridDll(System.String):OpenSim.Framework.Interfaces.IGridServer"> 4091 <Member Name="LoadGridDll(System.String):OpenSim.Framework.Interfaces.IGridServer">
4092 <Messages> 4092 <Messages>
4093 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 4093 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4094 <Issue> 4094 <Issue>
4095 <Item>Grid.LoadGridDll(String):IGridServer</Item> 4095 <Item>Grid.LoadGridDll(String):IGridServer</Item>
4096 </Issue> 4096 </Issue>
4097 </Message> 4097 </Message>
4098 </Messages> 4098 </Messages>
4099 </Member> 4099 </Member>
4100 </Members> 4100 </Members>
4101 </Type> 4101 </Type>
4102 <Type Name="OpenSimApplication"> 4102 <Type Name="OpenSimApplication">
4103 <Messages> 4103 <Messages>
4104 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4104 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4105 <Issue Name="Type"> 4105 <Issue Name="Type">
4106 <Item>Sim</Item> 4106 <Item>Sim</Item>
4107 <Item>OpenSim.OpenSimApplication</Item> 4107 <Item>OpenSim.OpenSimApplication</Item>
4108 </Issue> 4108 </Issue>
4109 </Message> 4109 </Message>
4110 </Messages> 4110 </Messages>
4111 <Members> 4111 <Members>
4112 <Member Name="RemoveClientCircuit(System.UInt32):System.Void"> 4112 <Member Name="RemoveClientCircuit(System.UInt32):System.Void">
4113 <Messages> 4113 <Messages>
4114 <Message Id="0#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4114 <Message Id="0#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4115 <Issue Name="Parameter"> 4115 <Issue Name="Parameter">
4116 <Item>OpenSimApplication.RemoveClientCircuit(UInt32):Void</Item> 4116 <Item>OpenSimApplication.RemoveClientCircuit(UInt32):Void</Item>
4117 <Item>circuitcode</Item> 4117 <Item>circuitcode</Item>
4118 <Item>circuitcode</Item> 4118 <Item>circuitcode</Item>
4119 </Issue> 4119 </Issue>
4120 </Message> 4120 </Message>
4121 </Messages> 4121 </Messages>
4122 </Member> 4122 </Member>
4123 <Member Name="SendPacketTo(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags,System.UInt32):System.Void"> 4123 <Member Name="SendPacketTo(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags,System.UInt32):System.Void">
4124 <Messages> 4124 <Messages>
4125 <Message Id="3#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4125 <Message Id="3#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4126 <Issue Name="Parameter"> 4126 <Issue Name="Parameter">
4127 <Item>OpenSimApplication.SendPacketTo(Byte[], Int32, SocketFlags, UInt32):Void</Item> 4127 <Item>OpenSimApplication.SendPacketTo(Byte[], Int32, SocketFlags, UInt32):Void</Item>
4128 <Item>circuitcode</Item> 4128 <Item>circuitcode</Item>
4129 <Item>circuitcode</Item> 4129 <Item>circuitcode</Item>
4130 </Issue> 4130 </Issue>
4131 </Message> 4131 </Message>
4132 </Messages> 4132 </Messages>
4133 </Member> 4133 </Member>
4134 <Member Name="StartUp():System.Void"> 4134 <Member Name="StartUp():System.Void">
4135 <Messages> 4135 <Messages>
4136 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z"> 4136 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
4137 <Issue Name="ShouldBeDiscreteTerm"> 4137 <Issue Name="ShouldBeDiscreteTerm">
4138 <Item>StartUp</Item> 4138 <Item>StartUp</Item>
4139 <Item>method</Item> 4139 <Item>method</Item>
4140 <Item>StartUp</Item> 4140 <Item>StartUp</Item>
4141 <Item>Startup</Item> 4141 <Item>Startup</Item>
4142 </Issue> 4142 </Issue>
4143 </Message> 4143 </Message>
4144 </Messages> 4144 </Messages>
4145 </Member> 4145 </Member>
4146 </Members> 4146 </Members>
4147 </Type> 4147 </Type>
4148 <Type Name="OpenSimMain"> 4148 <Type Name="OpenSimMain">
4149 <Messages> 4149 <Messages>
4150 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4150 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4151 <Issue Name="Type"> 4151 <Issue Name="Type">
4152 <Item>Sim</Item> 4152 <Item>Sim</Item>
4153 <Item>OpenSim.OpenSimMain</Item> 4153 <Item>OpenSim.OpenSimMain</Item>
4154 </Issue> 4154 </Issue>
4155 </Message> 4155 </Message>
4156 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4156 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4157 <Issue> 4157 <Issue>
4158 <Item>OpenSim.OpenSimMain</Item> 4158 <Item>OpenSim.OpenSimMain</Item>
4159 <Item>System.Timers.Timer, System.Net.Sockets.Socket</Item> 4159 <Item>System.Timers.Timer, System.Net.Sockets.Socket</Item>
4160 </Issue> 4160 </Issue>
4161 </Message> 4161 </Message>
4162 </Messages> 4162 </Messages>
4163 <Members> 4163 <Members>
4164 <Member Name=".ctor()"> 4164 <Member Name=".ctor()">
4165 <Messages> 4165 <Messages>
4166 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 4166 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4167 <Issue> 4167 <Issue>
4168 <Item>OpenSimMain.OpenSimMain()</Item> 4168 <Item>OpenSimMain.OpenSimMain()</Item>
4169 <Item>loginserver</Item> 4169 <Item>loginserver</Item>
4170 <Item>System.Boolean</Item> 4170 <Item>System.Boolean</Item>
4171 <Item>false</Item> 4171 <Item>false</Item>
4172 </Issue> 4172 </Issue>
4173 <Issue> 4173 <Issue>
4174 <Item>OpenSimMain.OpenSimMain()</Item> 4174 <Item>OpenSimMain.OpenSimMain()</Item>
4175 <Item>sandbox</Item> 4175 <Item>sandbox</Item>
4176 <Item>System.Boolean</Item> 4176 <Item>System.Boolean</Item>
4177 <Item>false</Item> 4177 <Item>false</Item>
4178 </Issue> 4178 </Issue>
4179 </Message> 4179 </Message>
4180 </Messages> 4180 </Messages>
4181 </Member> 4181 </Member>
4182 <Member Name="_physicsEngine"> 4182 <Member Name="_physicsEngine">
4183 <Messages> 4183 <Messages>
4184 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4184 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4185 <Issue> 4185 <Issue>
4186 <Item>_physicsEngine</Item> 4186 <Item>_physicsEngine</Item>
4187 </Issue> 4187 </Issue>
4188 </Message> 4188 </Message>
4189 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 4189 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
4190 <Issue Name="Member"> 4190 <Issue Name="Member">
4191 <Item>_physicsEngine</Item> 4191 <Item>_physicsEngine</Item>
4192 </Issue> 4192 </Issue>
4193 </Message> 4193 </Message>
4194 </Messages> 4194 </Messages>
4195 </Member> 4195 </Member>
4196 <Member Name="LoadConfigDll(System.String):OpenSim.Framework.Interfaces.SimConfig"> 4196 <Member Name="LoadConfigDll(System.String):OpenSim.Framework.Interfaces.SimConfig">
4197 <Messages> 4197 <Messages>
4198 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 4198 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4199 <Issue> 4199 <Issue>
4200 <Item>OpenSimMain.LoadConfigDll(String):SimConfig</Item> 4200 <Item>OpenSimMain.LoadConfigDll(String):SimConfig</Item>
4201 </Issue> 4201 </Issue>
4202 </Message> 4202 </Message>
4203 </Messages> 4203 </Messages>
4204 </Member> 4204 </Member>
4205 <Member Name="loginserver"> 4205 <Member Name="loginserver">
4206 <Messages> 4206 <Messages>
4207 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4207 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4208 <Issue> 4208 <Issue>
4209 <Item>loginserver</Item> 4209 <Item>loginserver</Item>
4210 </Issue> 4210 </Issue>
4211 </Message> 4211 </Message>
4212 <Message Id="loginserver" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4212 <Message Id="loginserver" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4213 <Issue Name="Member"> 4213 <Issue Name="Member">
4214 <Item>loginserver</Item> 4214 <Item>loginserver</Item>
4215 <Item>OpenSimMain.loginserver</Item> 4215 <Item>OpenSimMain.loginserver</Item>
4216 </Issue> 4216 </Issue>
4217 </Message> 4217 </Message>
4218 </Messages> 4218 </Messages>
4219 </Member> 4219 </Member>
4220 <Member Name="sandbox"> 4220 <Member Name="sandbox">
4221 <Messages> 4221 <Messages>
4222 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4222 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4223 <Issue> 4223 <Issue>
4224 <Item>sandbox</Item> 4224 <Item>sandbox</Item>
4225 </Issue> 4225 </Issue>
4226 </Message> 4226 </Message>
4227 </Messages> 4227 </Messages>
4228 </Member> 4228 </Member>
4229 <Member Name="Server"> 4229 <Member Name="Server">
4230 <Messages> 4230 <Messages>
4231 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4231 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4232 <Issue> 4232 <Issue>
4233 <Item>Server</Item> 4233 <Item>Server</Item>
4234 </Issue> 4234 </Issue>
4235 </Message> 4235 </Message>
4236 </Messages> 4236 </Messages>
4237 </Member> 4237 </Member>
4238 <Member Name="StartUp():System.Void"> 4238 <Member Name="StartUp():System.Void">
4239 <Messages> 4239 <Messages>
4240 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z"> 4240 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z">
4241 <Issue> 4241 <Issue>
4242 <Item>Timer.set_Interval(Double):Void</Item> 4242 <Item>Timer.set_Interval(Double):Void</Item>
4243 <Item>OpenSimMain.StartUp():Void</Item> 4243 <Item>OpenSimMain.StartUp():Void</Item>
4244 </Issue> 4244 </Issue>
4245 </Message> 4245 </Message>
4246 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 4246 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4247 <Issue> 4247 <Issue>
4248 <Item>OpenSimMain.StartUp():Void</Item> 4248 <Item>OpenSimMain.StartUp():Void</Item>
4249 <Item>System.UInt32.ToString</Item> 4249 <Item>System.UInt32.ToString</Item>
4250 <Item>System.UInt32.ToString(System.IFormatProvider)</Item> 4250 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
4251 </Issue> 4251 </Issue>
4252 <Issue> 4252 <Issue>
4253 <Item>OpenSimMain.StartUp():Void</Item> 4253 <Item>OpenSimMain.StartUp():Void</Item>
4254 <Item>System.UInt32.ToString</Item> 4254 <Item>System.UInt32.ToString</Item>
4255 <Item>System.UInt32.ToString(System.IFormatProvider)</Item> 4255 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
4256 </Issue> 4256 </Issue>
4257 </Message> 4257 </Message>
4258 </Messages> 4258 </Messages>
4259 </Member> 4259 </Member>
4260 </Members> 4260 </Members>
4261 </Type> 4261 </Type>
4262 <Type Name="OpenSimRoot"> 4262 <Type Name="OpenSimRoot">
4263 <Messages> 4263 <Messages>
4264 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4264 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4265 <Issue Name="Type"> 4265 <Issue Name="Type">
4266 <Item>Sim</Item> 4266 <Item>Sim</Item>
4267 <Item>OpenSim.OpenSimRoot</Item> 4267 <Item>OpenSim.OpenSimRoot</Item>
4268 </Issue> 4268 </Issue>
4269 </Message> 4269 </Message>
4270 </Messages> 4270 </Messages>
4271 <Members> 4271 <Members>
4272 <Member Name=".ctor()"> 4272 <Member Name=".ctor()">
4273 <Messages> 4273 <Messages>
4274 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 4274 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4275 <Issue> 4275 <Issue>
4276 <Item>OpenSimRoot.OpenSimRoot()</Item> 4276 <Item>OpenSimRoot.OpenSimRoot()</Item>
4277 <Item>Sandbox</Item> 4277 <Item>Sandbox</Item>
4278 <Item>System.Boolean</Item> 4278 <Item>System.Boolean</Item>
4279 <Item>false</Item> 4279 <Item>false</Item>
4280 </Issue> 4280 </Issue>
4281 </Message> 4281 </Message>
4282 </Messages> 4282 </Messages>
4283 </Member> 4283 </Member>
4284 <Member Name="Application"> 4284 <Member Name="Application">
4285 <Messages> 4285 <Messages>
4286 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4286 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4287 <Issue> 4287 <Issue>
4288 <Item>Application</Item> 4288 <Item>Application</Item>
4289 </Issue> 4289 </Issue>
4290 </Message> 4290 </Message>
4291 </Messages> 4291 </Messages>
4292 </Member> 4292 </Member>
4293 <Member Name="AssetCache"> 4293 <Member Name="AssetCache">
4294 <Messages> 4294 <Messages>
4295 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4295 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4296 <Issue> 4296 <Issue>
4297 <Item>AssetCache</Item> 4297 <Item>AssetCache</Item>
4298 </Issue> 4298 </Issue>
4299 </Message> 4299 </Message>
4300 </Messages> 4300 </Messages>
4301 </Member> 4301 </Member>
4302 <Member Name="Cfg"> 4302 <Member Name="Cfg">
4303 <Messages> 4303 <Messages>
4304 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4304 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4305 <Issue> 4305 <Issue>
4306 <Item>Cfg</Item> 4306 <Item>Cfg</Item>
4307 </Issue> 4307 </Issue>
4308 </Message> 4308 </Message>
4309 <Message Id="Cfg" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4309 <Message Id="Cfg" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4310 <Issue Name="Member"> 4310 <Issue Name="Member">
4311 <Item>Cfg</Item> 4311 <Item>Cfg</Item>
4312 <Item>OpenSimRoot.Cfg</Item> 4312 <Item>OpenSimRoot.Cfg</Item>
4313 </Issue> 4313 </Issue>
4314 </Message> 4314 </Message>
4315 </Messages> 4315 </Messages>
4316 </Member> 4316 </Member>
4317 <Member Name="ClientThreads"> 4317 <Member Name="ClientThreads">
4318 <Messages> 4318 <Messages>
4319 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4319 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4320 <Issue> 4320 <Issue>
4321 <Item>ClientThreads</Item> 4321 <Item>ClientThreads</Item>
4322 </Issue> 4322 </Issue>
4323 </Message> 4323 </Message>
4324 </Messages> 4324 </Messages>
4325 </Member> 4325 </Member>
4326 <Member Name="GridServers"> 4326 <Member Name="GridServers">
4327 <Messages> 4327 <Messages>
4328 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4328 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4329 <Issue> 4329 <Issue>
4330 <Item>GridServers</Item> 4330 <Item>GridServers</Item>
4331 </Issue> 4331 </Issue>
4332 </Message> 4332 </Message>
4333 </Messages> 4333 </Messages>
4334 </Member> 4334 </Member>
4335 <Member Name="HttpServer"> 4335 <Member Name="HttpServer">
4336 <Messages> 4336 <Messages>
4337 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4337 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4338 <Issue> 4338 <Issue>
4339 <Item>HttpServer</Item> 4339 <Item>HttpServer</Item>
4340 </Issue> 4340 </Issue>
4341 </Message> 4341 </Message>
4342 </Messages> 4342 </Messages>
4343 </Member> 4343 </Member>
4344 <Member Name="InventoryCache"> 4344 <Member Name="InventoryCache">
4345 <Messages> 4345 <Messages>
4346 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4346 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4347 <Issue> 4347 <Issue>
4348 <Item>InventoryCache</Item> 4348 <Item>InventoryCache</Item>
4349 </Issue> 4349 </Issue>
4350 </Message> 4350 </Message>
4351 </Messages> 4351 </Messages>
4352 </Member> 4352 </Member>
4353 <Member Name="LocalWorld"> 4353 <Member Name="LocalWorld">
4354 <Messages> 4354 <Messages>
4355 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4355 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4356 <Issue> 4356 <Issue>
4357 <Item>LocalWorld</Item> 4357 <Item>LocalWorld</Item>
4358 </Issue> 4358 </Issue>
4359 </Message> 4359 </Message>
4360 </Messages> 4360 </Messages>
4361 </Member> 4361 </Member>
4362 <Member Name="Sandbox"> 4362 <Member Name="Sandbox">
4363 <Messages> 4363 <Messages>
4364 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4364 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4365 <Issue> 4365 <Issue>
4366 <Item>Sandbox</Item> 4366 <Item>Sandbox</Item>
4367 </Issue> 4367 </Issue>
4368 </Message> 4368 </Message>
4369 </Messages> 4369 </Messages>
4370 </Member> 4370 </Member>
4371 <Member Name="StartUp():System.Void"> 4371 <Member Name="StartUp():System.Void">
4372 <Messages> 4372 <Messages>
4373 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z"> 4373 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
4374 <Issue Name="ShouldBeDiscreteTerm"> 4374 <Issue Name="ShouldBeDiscreteTerm">
4375 <Item>StartUp</Item> 4375 <Item>StartUp</Item>
4376 <Item>method</Item> 4376 <Item>method</Item>
4377 <Item>StartUp</Item> 4377 <Item>StartUp</Item>
4378 <Item>Startup</Item> 4378 <Item>Startup</Item>
4379 </Issue> 4379 </Issue>
4380 </Message> 4380 </Message>
4381 </Messages> 4381 </Messages>
4382 </Member> 4382 </Member>
4383 <Member Name="startuptime"> 4383 <Member Name="startuptime">
4384 <Messages> 4384 <Messages>
4385 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4385 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4386 <Issue> 4386 <Issue>
4387 <Item>startuptime</Item> 4387 <Item>startuptime</Item>
4388 </Issue> 4388 </Issue>
4389 </Message> 4389 </Message>
4390 <Message Id="startuptime" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4390 <Message Id="startuptime" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4391 <Issue Name="Member"> 4391 <Issue Name="Member">
4392 <Item>startuptime</Item> 4392 <Item>startuptime</Item>
4393 <Item>OpenSimRoot.startuptime</Item> 4393 <Item>OpenSimRoot.startuptime</Item>
4394 </Issue> 4394 </Issue>
4395 </Message> 4395 </Message>
4396 </Messages> 4396 </Messages>
4397 </Member> 4397 </Member>
4398 </Members> 4398 </Members>
4399 </Type> 4399 </Type>
4400 <Type Name="QueItem"> 4400 <Type Name="QueItem">
4401 <Messages> 4401 <Messages>
4402 <Message Id="Que" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4402 <Message Id="Que" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4403 <Issue Name="Type"> 4403 <Issue Name="Type">
4404 <Item>Que</Item> 4404 <Item>Que</Item>
4405 <Item>OpenSim.QueItem</Item> 4405 <Item>OpenSim.QueItem</Item>
4406 </Issue> 4406 </Issue>
4407 </Message> 4407 </Message>
4408 </Messages> 4408 </Messages>
4409 <Members> 4409 <Members>
4410 <Member Name="Incoming"> 4410 <Member Name="Incoming">
4411 <Messages> 4411 <Messages>
4412 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4412 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4413 <Issue> 4413 <Issue>
4414 <Item>Incoming</Item> 4414 <Item>Incoming</Item>
4415 </Issue> 4415 </Issue>
4416 </Message> 4416 </Message>
4417 </Messages> 4417 </Messages>
4418 </Member> 4418 </Member>
4419 <Member Name="Packet"> 4419 <Member Name="Packet">
4420 <Messages> 4420 <Messages>
4421 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4421 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4422 <Issue> 4422 <Issue>
4423 <Item>Packet</Item> 4423 <Item>Packet</Item>
4424 </Issue> 4424 </Issue>
4425 </Message> 4425 </Message>
4426 </Messages> 4426 </Messages>
4427 </Member> 4427 </Member>
4428 </Members> 4428 </Members>
4429 </Type> 4429 </Type>
4430 <Type Name="SimClient"> 4430 <Type Name="SimClient">
4431 <Messages> 4431 <Messages>
4432 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4432 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4433 <Issue Name="Type"> 4433 <Issue Name="Type">
4434 <Item>Sim</Item> 4434 <Item>Sim</Item>
4435 <Item>OpenSim.SimClient</Item> 4435 <Item>OpenSim.SimClient</Item>
4436 </Issue> 4436 </Issue>
4437 </Message> 4437 </Message>
4438 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4438 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4439 <Issue> 4439 <Issue>
4440 <Item>OpenSim.SimClient</Item> 4440 <Item>OpenSim.SimClient</Item>
4441 <Item>System.Timers.Timer</Item> 4441 <Item>System.Timers.Timer</Item>
4442 </Issue> 4442 </Issue>
4443 </Message> 4443 </Message>
4444 </Messages> 4444 </Messages>
4445 <Members> 4445 <Members>
4446 <Member Name=".ctor(System.Net.EndPoint,libsecondlife.Packets.UseCircuitCodePacket)"> 4446 <Member Name=".ctor(System.Net.EndPoint,libsecondlife.Packets.UseCircuitCodePacket)">
4447 <Messages> 4447 <Messages>
4448 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 4448 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4449 <Issue> 4449 <Issue>
4450 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item> 4450 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4451 <Item>Sequence</Item> 4451 <Item>Sequence</Item>
4452 <Item>System.UInt32</Item> 4452 <Item>System.UInt32</Item>
4453 <Item>0</Item> 4453 <Item>0</Item>
4454 </Issue> 4454 </Issue>
4455 <Issue> 4455 <Issue>
4456 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item> 4456 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4457 <Item>debug</Item> 4457 <Item>debug</Item>
4458 <Item>System.Boolean</Item> 4458 <Item>System.Boolean</Item>
4459 <Item>false</Item> 4459 <Item>false</Item>
4460 </Issue> 4460 </Issue>
4461 </Message> 4461 </Message>
4462 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z"> 4462 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z">
4463 <Issue> 4463 <Issue>
4464 <Item>Timer.Timer(Double)</Item> 4464 <Item>Timer.Timer(Double)</Item>
4465 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item> 4465 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4466 </Issue> 4466 </Issue>
4467 </Message> 4467 </Message>
4468 <Message Id="1#initialcirpack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4468 <Message Id="1#initialcirpack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4469 <Issue Name="Parameter"> 4469 <Issue Name="Parameter">
4470 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item> 4470 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4471 <Item>initialcirpack</Item> 4471 <Item>initialcirpack</Item>
4472 <Item>initialcirpack</Item> 4472 <Item>initialcirpack</Item>
4473 </Issue> 4473 </Issue>
4474 </Message> 4474 </Message>
4475 </Messages> 4475 </Messages>
4476 </Member> 4476 </Member>
4477 <Member Name="AgentID"> 4477 <Member Name="AgentID">
4478 <Messages> 4478 <Messages>
4479 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4479 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4480 <Issue> 4480 <Issue>
4481 <Item>AgentID</Item> 4481 <Item>AgentID</Item>
4482 </Issue> 4482 </Issue>
4483 </Message> 4483 </Message>
4484 </Messages> 4484 </Messages>
4485 </Member> 4485 </Member>
4486 <Member Name="CircuitCode"> 4486 <Member Name="CircuitCode">
4487 <Messages> 4487 <Messages>
4488 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4488 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4489 <Issue> 4489 <Issue>
4490 <Item>CircuitCode</Item> 4490 <Item>CircuitCode</Item>
4491 </Issue> 4491 </Issue>
4492 </Message> 4492 </Message>
4493 </Messages> 4493 </Messages>
4494 </Member> 4494 </Member>
4495 <Member Name="ClientAvatar"> 4495 <Member Name="ClientAvatar">
4496 <Messages> 4496 <Messages>
4497 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4497 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4498 <Issue> 4498 <Issue>
4499 <Item>ClientAvatar</Item> 4499 <Item>ClientAvatar</Item>
4500 </Issue> 4500 </Issue>
4501 </Message> 4501 </Message>
4502 </Messages> 4502 </Messages>
4503 </Member> 4503 </Member>
4504 <Member Name="InPacket(libsecondlife.Packets.Packet):System.Void"> 4504 <Member Name="InPacket(libsecondlife.Packets.Packet):System.Void">
4505 <Messages> 4505 <Messages>
4506 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 4506 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4507 <Issue Name="Parameter"> 4507 <Issue Name="Parameter">
4508 <Item>NewPack</Item> 4508 <Item>NewPack</Item>
4509 </Issue> 4509 </Issue>
4510 </Message> 4510 </Message>
4511 </Messages> 4511 </Messages>
4512 </Member> 4512 </Member>
4513 <Member Name="newAssetFolder"> 4513 <Member Name="newAssetFolder">
4514 <Messages> 4514 <Messages>
4515 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 4515 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
4516 <Issue> 4516 <Issue>
4517 <Item>SimClient.newAssetFolder</Item> 4517 <Item>SimClient.newAssetFolder</Item>
4518 </Issue> 4518 </Issue>
4519 </Message> 4519 </Message>
4520 </Messages> 4520 </Messages>
4521 </Member> 4521 </Member>
4522 <Member Name="OutPacket(libsecondlife.Packets.Packet):System.Void"> 4522 <Member Name="OutPacket(libsecondlife.Packets.Packet):System.Void">
4523 <Messages> 4523 <Messages>
4524 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 4524 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4525 <Issue Name="Parameter"> 4525 <Issue Name="Parameter">
4526 <Item>NewPack</Item> 4526 <Item>NewPack</Item>
4527 </Issue> 4527 </Issue>
4528 </Message> 4528 </Message>
4529 </Messages> 4529 </Messages>
4530 </Member> 4530 </Member>
4531 <Member Name="ProcessInPacket(libsecondlife.Packets.Packet):System.Void"> 4531 <Member Name="ProcessInPacket(libsecondlife.Packets.Packet):System.Void">
4532 <Messages> 4532 <Messages>
4533 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 4533 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4534 <Issue Name="Parameter"> 4534 <Issue Name="Parameter">
4535 <Item>Pack</Item> 4535 <Item>Pack</Item>
4536 </Issue> 4536 </Issue>
4537 </Message> 4537 </Message>
4538 <Message Id="wear" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z"> 4538 <Message Id="wear" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
4539 <Issue> 4539 <Issue>
4540 <Item>SimClient.ProcessInPacket(Packet):Void</Item> 4540 <Item>SimClient.ProcessInPacket(Packet):Void</Item>
4541 <Item>wear</Item> 4541 <Item>wear</Item>
4542 <Item>libsecondlife.Packets.AgentIsNowWearingPacket</Item> 4542 <Item>libsecondlife.Packets.AgentIsNowWearingPacket</Item>
4543 </Issue> 4543 </Issue>
4544 </Message> 4544 </Message>
4545 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z"> 4545 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
4546 <Issue Name="IsNullOrEmpty"> 4546 <Issue Name="IsNullOrEmpty">
4547 <Item>op_Equality</Item> 4547 <Item>op_Equality</Item>
4548 <Item>""</Item> 4548 <Item>""</Item>
4549 <Item>SimClient.ProcessInPacket(Packet):Void</Item> 4549 <Item>SimClient.ProcessInPacket(Packet):Void</Item>
4550 </Issue> 4550 </Issue>
4551 </Message> 4551 </Message>
4552 </Messages> 4552 </Messages>
4553 </Member> 4553 </Member>
4554 <Member Name="ProcessOutPacket(libsecondlife.Packets.Packet):System.Void"> 4554 <Member Name="ProcessOutPacket(libsecondlife.Packets.Packet):System.Void">
4555 <Messages> 4555 <Messages>
4556 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 4556 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
4557 <Issue> 4557 <Issue>
4558 <Item>SimClient.ProcessOutPacket(Packet):Void</Item> 4558 <Item>SimClient.ProcessOutPacket(Packet):Void</Item>
4559 <Item>System.Exception</Item> 4559 <Item>System.Exception</Item>
4560 </Issue> 4560 </Issue>
4561 </Message> 4561 </Message>
4562 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 4562 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4563 <Issue Name="Parameter"> 4563 <Issue Name="Parameter">
4564 <Item>Pack</Item> 4564 <Item>Pack</Item>
4565 </Issue> 4565 </Issue>
4566 </Message> 4566 </Message>
4567 </Messages> 4567 </Messages>
4568 </Member> 4568 </Member>
4569 <Member Name="SecureSessionID"> 4569 <Member Name="SecureSessionID">
4570 <Messages> 4570 <Messages>
4571 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4571 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4572 <Issue> 4572 <Issue>
4573 <Item>SecureSessionID</Item> 4573 <Item>SecureSessionID</Item>
4574 </Issue> 4574 </Issue>
4575 </Message> 4575 </Message>
4576 </Messages> 4576 </Messages>
4577 </Member> 4577 </Member>
4578 <Member Name="SessionID"> 4578 <Member Name="SessionID">
4579 <Messages> 4579 <Messages>
4580 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4580 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4581 <Issue> 4581 <Issue>
4582 <Item>SessionID</Item> 4582 <Item>SessionID</Item>
4583 </Issue> 4583 </Issue>
4584 </Message> 4584 </Message>
4585 </Messages> 4585 </Messages>
4586 </Member> 4586 </Member>
4587 <Member Name="userEP"> 4587 <Member Name="userEP">
4588 <Messages> 4588 <Messages>
4589 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4589 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4590 <Issue> 4590 <Issue>
4591 <Item>userEP</Item> 4591 <Item>userEP</Item>
4592 </Issue> 4592 </Issue>
4593 </Message> 4593 </Message>
4594 </Messages> 4594 </Messages>
4595 </Member> 4595 </Member>
4596 </Members> 4596 </Members>
4597 </Type> 4597 </Type>
4598 <Type Name="SimConsole"> 4598 <Type Name="SimConsole">
4599 <Messages> 4599 <Messages>
4600 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z"> 4600 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
4601 <Issue> 4601 <Issue>
4602 <Item>OpenSim.SimConsole</Item> 4602 <Item>OpenSim.SimConsole</Item>
4603 <Item> OpenSim.Framework.Console.ConsoleBase</Item> 4603 <Item> OpenSim.Framework.Console.ConsoleBase</Item>
4604 </Issue> 4604 </Issue>
4605 </Message> 4605 </Message>
4606 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4606 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4607 <Issue Name="Type"> 4607 <Issue Name="Type">
4608 <Item>Sim</Item> 4608 <Item>Sim</Item>
4609 <Item>OpenSim.SimConsole</Item> 4609 <Item>OpenSim.SimConsole</Item>
4610 </Issue> 4610 </Issue>
4611 </Message> 4611 </Message>
4612 </Messages> 4612 </Messages>
4613 <Members> 4613 <Members>
4614 <Member Name=".ctor(OpenSim.Framework.Console.ConsoleBase+ConsoleType,System.String,System.Int32)"> 4614 <Member Name=".ctor(OpenSim.Framework.Console.ConsoleBase+ConsoleType,System.String,System.Int32)">
4615 <Messages> 4615 <Messages>
4616 <Message Id="0#constype" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4616 <Message Id="0#constype" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4617 <Issue Name="Parameter"> 4617 <Issue Name="Parameter">
4618 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item> 4618 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4619 <Item>constype</Item> 4619 <Item>constype</Item>
4620 <Item>constype</Item> 4620 <Item>constype</Item>
4621 </Issue> 4621 </Issue>
4622 </Message> 4622 </Message>
4623 <Message Id="1#sparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4623 <Message Id="1#sparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4624 <Issue Name="Parameter"> 4624 <Issue Name="Parameter">
4625 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item> 4625 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4626 <Item>sparam</Item> 4626 <Item>sparam</Item>
4627 <Item>sparam</Item> 4627 <Item>sparam</Item>
4628 </Issue> 4628 </Issue>
4629 </Message> 4629 </Message>
4630 <Message Id="2#iparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4630 <Message Id="2#iparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4631 <Issue Name="Parameter"> 4631 <Issue Name="Parameter">
4632 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item> 4632 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4633 <Item>iparam</Item> 4633 <Item>iparam</Item>
4634 <Item>iparam</Item> 4634 <Item>iparam</Item>
4635 </Issue> 4635 </Issue>
4636 </Message> 4636 </Message>
4637 <Message Id="iparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4637 <Message Id="iparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4638 <Issue> 4638 <Issue>
4639 <Item>iparam</Item> 4639 <Item>iparam</Item>
4640 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item> 4640 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4641 </Issue> 4641 </Issue>
4642 </Message> 4642 </Message>
4643 <Message Id="sparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4643 <Message Id="sparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4644 <Issue> 4644 <Issue>
4645 <Item>sparam</Item> 4645 <Item>sparam</Item>
4646 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item> 4646 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4647 </Issue> 4647 </Issue>
4648 </Message> 4648 </Message>
4649 </Messages> 4649 </Messages>
4650 </Member> 4650 </Member>
4651 <Member Name="CmdPrompt(System.String,System.String):System.String"> 4651 <Member Name="CmdPrompt(System.String,System.String):System.String">
4652 <Messages> 4652 <Messages>
4653 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z"> 4653 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
4654 <Issue Name="IsNullOrEmpty"> 4654 <Issue Name="IsNullOrEmpty">
4655 <Item>op_Equality</Item> 4655 <Item>op_Equality</Item>
4656 <Item>""</Item> 4656 <Item>""</Item>
4657 <Item>SimConsole.CmdPrompt(String, String):String</Item> 4657 <Item>SimConsole.CmdPrompt(String, String):String</Item>
4658 </Issue> 4658 </Issue>
4659 </Message> 4659 </Message>
4660 </Messages> 4660 </Messages>
4661 </Member> 4661 </Member>
4662 <Member Name="ConsType"> 4662 <Member Name="ConsType">
4663 <Messages> 4663 <Messages>
4664 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 4664 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
4665 <Issue> 4665 <Issue>
4666 <Item>SimConsole.ConsType</Item> 4666 <Item>SimConsole.ConsType</Item>
4667 </Issue> 4667 </Issue>
4668 </Message> 4668 </Message>
4669 </Messages> 4669 </Messages>
4670 </Member> 4670 </Member>
4671 <Member Name="MainConsolePrompt():System.Void"> 4671 <Member Name="MainConsolePrompt():System.Void">
4672 <Messages> 4672 <Messages>
4673 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 4673 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4674 <Issue> 4674 <Issue>
4675 <Item>SimConsole.MainConsolePrompt():Void</Item> 4675 <Item>SimConsole.MainConsolePrompt():Void</Item>
4676 <Item>System.UInt64.ToString</Item> 4676 <Item>System.UInt64.ToString</Item>
4677 <Item>System.UInt64.ToString(System.IFormatProvider)</Item> 4677 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
4678 </Issue> 4678 </Issue>
4679 </Message> 4679 </Message>
4680 </Messages> 4680 </Messages>
4681 </Member> 4681 </Member>
4682 <Member Name="RunCmd(System.String,System.String[]):System.Object"> 4682 <Member Name="RunCmd(System.String,System.String[]):System.Object">
4683 <Messages> 4683 <Messages>
4684 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 4684 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4685 <Issue> 4685 <Issue>
4686 <Item>'cmdparams'</Item> 4686 <Item>'cmdparams'</Item>
4687 <Item>SimConsole.RunCmd(String, String[]):Object</Item> 4687 <Item>SimConsole.RunCmd(String, String[]):Object</Item>
4688 </Issue> 4688 </Issue>
4689 </Message> 4689 </Message>
4690 </Messages> 4690 </Messages>
4691 </Member> 4691 </Member>
4692 <Member Name="ShowCommands(System.String):System.Void"> 4692 <Member Name="ShowCommands(System.String):System.Void">
4693 <Messages> 4693 <Messages>
4694 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 4694 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4695 <Issue> 4695 <Issue>
4696 <Item>SimConsole.ShowCommands(String):Void</Item> 4696 <Item>SimConsole.ShowCommands(String):Void</Item>
4697 <Item>System.String.Format(System.String,System.Object[])</Item> 4697 <Item>System.String.Format(System.String,System.Object[])</Item>
4698 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> 4698 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
4699 </Issue> 4699 </Issue>
4700 <Issue> 4700 <Issue>
4701 <Item>SimConsole.ShowCommands(String):Void</Item> 4701 <Item>SimConsole.ShowCommands(String):Void</Item>
4702 <Item>System.String.Format(System.String,System.Object[])</Item> 4702 <Item>System.String.Format(System.String,System.Object[])</Item>
4703 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> 4703 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
4704 </Issue> 4704 </Issue>
4705 </Message> 4705 </Message>
4706 </Messages> 4706 </Messages>
4707 </Member> 4707 </Member>
4708 </Members> 4708 </Members>
4709 </Type> 4709 </Type>
4710 <Type Name="VersionInfo"> 4710 <Type Name="VersionInfo">
4711 <Members> 4711 <Members>
4712 <Member Name="Version"> 4712 <Member Name="Version">
4713 <Messages> 4713 <Messages>
4714 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z"> 4714 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
4715 <Issue> 4715 <Issue>
4716 <Item>Version</Item> 4716 <Item>Version</Item>
4717 </Issue> 4717 </Issue>
4718 </Message> 4718 </Message>
4719 </Messages> 4719 </Messages>
4720 </Member> 4720 </Member>
4721 </Members> 4721 </Members>
4722 </Type> 4722 </Type>
4723 </Types> 4723 </Types>
4724 </Namespace> 4724 </Namespace>
4725 <Namespace Name="OpenSim.Assets"> 4725 <Namespace Name="OpenSim.Assets">
4726 <Types> 4726 <Types>
4727 <Type Name="AssetCache"> 4727 <Type Name="AssetCache">
4728 <Members> 4728 <Members>
4729 <Member Name="AddTextureRequest(OpenSim.SimClient,libsecondlife.LLUUID):System.Void"> 4729 <Member Name="AddTextureRequest(OpenSim.SimClient,libsecondlife.LLUUID):System.Void">
4730 <Messages> 4730 <Messages>
4731 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 4731 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4732 <Issue Name="ParameterId"> 4732 <Issue Name="ParameterId">
4733 <Item>ID</Item> 4733 <Item>ID</Item>
4734 <Item>imageID</Item> 4734 <Item>imageID</Item>
4735 <Item>Id</Item> 4735 <Item>Id</Item>
4736 </Issue> 4736 </Issue>
4737 </Message> 4737 </Message>
4738 </Messages> 4738 </Messages>
4739 </Member> 4739 </Member>
4740 <Member Name="AssetRequests"> 4740 <Member Name="AssetRequests">
4741 <Messages> 4741 <Messages>
4742 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4742 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4743 <Issue> 4743 <Issue>
4744 <Item>AssetRequests</Item> 4744 <Item>AssetRequests</Item>
4745 </Issue> 4745 </Issue>
4746 </Message> 4746 </Message>
4747 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 4747 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
4748 <Issue> 4748 <Issue>
4749 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item> 4749 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item>
4750 <Item>AssetCache.AssetRequests</Item> 4750 <Item>AssetCache.AssetRequests</Item>
4751 </Issue> 4751 </Issue>
4752 </Message> 4752 </Message>
4753 </Messages> 4753 </Messages>
4754 </Member> 4754 </Member>
4755 <Member Name="Assets"> 4755 <Member Name="Assets">
4756 <Messages> 4756 <Messages>
4757 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4757 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4758 <Issue> 4758 <Issue>
4759 <Item>Assets</Item> 4759 <Item>Assets</Item>
4760 </Issue> 4760 </Issue>
4761 </Message> 4761 </Message>
4762 </Messages> 4762 </Messages>
4763 </Member> 4763 </Member>
4764 <Member Name="CloneAsset(libsecondlife.LLUUID,OpenSim.Assets.AssetInfo):OpenSim.Assets.AssetInfo"> 4764 <Member Name="CloneAsset(libsecondlife.LLUUID,OpenSim.Assets.AssetInfo):OpenSim.Assets.AssetInfo">
4765 <Messages> 4765 <Messages>
4766 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z"> 4766 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
4767 <Issue> 4767 <Issue>
4768 <Item>sourceAsset</Item> 4768 <Item>sourceAsset</Item>
4769 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item> 4769 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4770 <Item>OpenSim.Assets.AssetInfo</Item> 4770 <Item>OpenSim.Assets.AssetInfo</Item>
4771 <Item>OpenSim.Framework.Assets.AssetBase</Item> 4771 <Item>OpenSim.Framework.Assets.AssetBase</Item>
4772 </Issue> 4772 </Issue>
4773 </Message> 4773 </Message>
4774 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4774 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4775 <Issue> 4775 <Issue>
4776 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item> 4776 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4777 </Issue> 4777 </Issue>
4778 </Message> 4778 </Message>
4779 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4779 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4780 <Issue> 4780 <Issue>
4781 <Item>newOwner</Item> 4781 <Item>newOwner</Item>
4782 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item> 4782 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4783 </Issue> 4783 </Issue>
4784 </Message> 4784 </Message>
4785 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 4785 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4786 <Issue> 4786 <Issue>
4787 <Item>'sourceAsset'</Item> 4787 <Item>'sourceAsset'</Item>
4788 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item> 4788 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4789 </Issue> 4789 </Issue>
4790 </Message> 4790 </Message>
4791 </Messages> 4791 </Messages>
4792 </Member> 4792 </Member>
4793 <Member Name="CloneImage(libsecondlife.LLUUID,OpenSim.Assets.TextureImage):OpenSim.Assets.TextureImage"> 4793 <Member Name="CloneImage(libsecondlife.LLUUID,OpenSim.Assets.TextureImage):OpenSim.Assets.TextureImage">
4794 <Messages> 4794 <Messages>
4795 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z"> 4795 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
4796 <Issue> 4796 <Issue>
4797 <Item>source</Item> 4797 <Item>source</Item>
4798 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item> 4798 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4799 <Item>OpenSim.Assets.TextureImage</Item> 4799 <Item>OpenSim.Assets.TextureImage</Item>
4800 <Item>OpenSim.Framework.Assets.AssetBase</Item> 4800 <Item>OpenSim.Framework.Assets.AssetBase</Item>
4801 </Issue> 4801 </Issue>
4802 </Message> 4802 </Message>
4803 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4803 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4804 <Issue> 4804 <Issue>
4805 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item> 4805 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4806 </Issue> 4806 </Issue>
4807 </Message> 4807 </Message>
4808 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 4808 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4809 <Issue> 4809 <Issue>
4810 <Item>newOwner</Item> 4810 <Item>newOwner</Item>
4811 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item> 4811 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4812 </Issue> 4812 </Issue>
4813 </Message> 4813 </Message>
4814 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 4814 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4815 <Issue> 4815 <Issue>
4816 <Item>'source'</Item> 4816 <Item>'source'</Item>
4817 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item> 4817 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4818 </Issue> 4818 </Issue>
4819 </Message> 4819 </Message>
4820 </Messages> 4820 </Messages>
4821 </Member> 4821 </Member>
4822 <Member Name="CreateNewInventorySet(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase[]"> 4822 <Member Name="CreateNewInventorySet(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase[]">
4823 <Messages> 4823 <Messages>
4824 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 4824 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4825 <Issue Name="ParameterId"> 4825 <Issue Name="ParameterId">
4826 <Item>ID</Item> 4826 <Item>ID</Item>
4827 <Item>agentID</Item> 4827 <Item>agentID</Item>
4828 <Item>Id</Item> 4828 <Item>Id</Item>
4829 </Issue> 4829 </Issue>
4830 </Message> 4830 </Message>
4831 </Messages> 4831 </Messages>
4832 </Member> 4832 </Member>
4833 <Member Name="GetAsset(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase"> 4833 <Member Name="GetAsset(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
4834 <Messages> 4834 <Messages>
4835 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 4835 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4836 <Issue Name="ParameterId"> 4836 <Issue Name="ParameterId">
4837 <Item>ID</Item> 4837 <Item>ID</Item>
4838 <Item>assetID</Item> 4838 <Item>assetID</Item>
4839 <Item>Id</Item> 4839 <Item>Id</Item>
4840 </Issue> 4840 </Issue>
4841 </Message> 4841 </Message>
4842 </Messages> 4842 </Messages>
4843 </Member> 4843 </Member>
4844 <Member Name="RequestedAssets"> 4844 <Member Name="RequestedAssets">
4845 <Messages> 4845 <Messages>
4846 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4846 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4847 <Issue> 4847 <Issue>
4848 <Item>RequestedAssets</Item> 4848 <Item>RequestedAssets</Item>
4849 </Issue> 4849 </Issue>
4850 </Message> 4850 </Message>
4851 </Messages> 4851 </Messages>
4852 </Member> 4852 </Member>
4853 <Member Name="RequestedTextures"> 4853 <Member Name="RequestedTextures">
4854 <Messages> 4854 <Messages>
4855 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4855 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4856 <Issue> 4856 <Issue>
4857 <Item>RequestedTextures</Item> 4857 <Item>RequestedTextures</Item>
4858 </Issue> 4858 </Issue>
4859 </Message> 4859 </Message>
4860 </Messages> 4860 </Messages>
4861 </Member> 4861 </Member>
4862 <Member Name="RunAssetManager():System.Void"> 4862 <Member Name="RunAssetManager():System.Void">
4863 <Messages> 4863 <Messages>
4864 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 4864 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
4865 <Issue> 4865 <Issue>
4866 <Item>AssetCache.RunAssetManager():Void</Item> 4866 <Item>AssetCache.RunAssetManager():Void</Item>
4867 <Item>System.Exception</Item> 4867 <Item>System.Exception</Item>
4868 </Issue> 4868 </Issue>
4869 </Message> 4869 </Message>
4870 </Messages> 4870 </Messages>
4871 </Member> 4871 </Member>
4872 <Member Name="TextureRequests"> 4872 <Member Name="TextureRequests">
4873 <Messages> 4873 <Messages>
4874 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4874 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4875 <Issue> 4875 <Issue>
4876 <Item>TextureRequests</Item> 4876 <Item>TextureRequests</Item>
4877 </Issue> 4877 </Issue>
4878 </Message> 4878 </Message>
4879 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 4879 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
4880 <Issue> 4880 <Issue>
4881 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item> 4881 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item>
4882 <Item>AssetCache.TextureRequests</Item> 4882 <Item>AssetCache.TextureRequests</Item>
4883 </Issue> 4883 </Issue>
4884 </Message> 4884 </Message>
4885 </Messages> 4885 </Messages>
4886 </Member> 4886 </Member>
4887 <Member Name="Textures"> 4887 <Member Name="Textures">
4888 <Messages> 4888 <Messages>
4889 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4889 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4890 <Issue> 4890 <Issue>
4891 <Item>Textures</Item> 4891 <Item>Textures</Item>
4892 </Issue> 4892 </Issue>
4893 </Message> 4893 </Message>
4894 </Messages> 4894 </Messages>
4895 </Member> 4895 </Member>
4896 </Members> 4896 </Members>
4897 </Type> 4897 </Type>
4898 <Type Name="AssetInfo"> 4898 <Type Name="AssetInfo">
4899 <Messages> 4899 <Messages>
4900 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z"> 4900 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
4901 <Issue> 4901 <Issue>
4902 <Item>OpenSim.Assets.AssetInfo</Item> 4902 <Item>OpenSim.Assets.AssetInfo</Item>
4903 <Item> OpenSim.Framework.Assets.AssetBase</Item> 4903 <Item> OpenSim.Framework.Assets.AssetBase</Item>
4904 </Issue> 4904 </Issue>
4905 </Message> 4905 </Message>
4906 </Messages> 4906 </Messages>
4907 <Members> 4907 <Members>
4908 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)"> 4908 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)">
4909 <Messages> 4909 <Messages>
4910 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4910 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4911 <Issue Name="Parameter"> 4911 <Issue Name="Parameter">
4912 <Item>AssetInfo.AssetInfo(AssetBase)</Item> 4912 <Item>AssetInfo.AssetInfo(AssetBase)</Item>
4913 <Item>a</Item> 4913 <Item>a</Item>
4914 <Item>aBase</Item> 4914 <Item>aBase</Item>
4915 </Issue> 4915 </Issue>
4916 </Message> 4916 </Message>
4917 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 4917 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4918 <Issue> 4918 <Issue>
4919 <Item>'aBase'</Item> 4919 <Item>'aBase'</Item>
4920 <Item>AssetInfo.AssetInfo(AssetBase)</Item> 4920 <Item>AssetInfo.AssetInfo(AssetBase)</Item>
4921 </Issue> 4921 </Issue>
4922 </Message> 4922 </Message>
4923 </Messages> 4923 </Messages>
4924 </Member> 4924 </Member>
4925 </Members> 4925 </Members>
4926 </Type> 4926 </Type>
4927 <Type Name="AssetRequest"> 4927 <Type Name="AssetRequest">
4928 <Members> 4928 <Members>
4929 <Member Name=".ctor()"> 4929 <Member Name=".ctor()">
4930 <Messages> 4930 <Messages>
4931 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 4931 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4932 <Issue> 4932 <Issue>
4933 <Item>AssetRequest.AssetRequest()</Item> 4933 <Item>AssetRequest.AssetRequest()</Item>
4934 <Item>DataPointer</Item> 4934 <Item>DataPointer</Item>
4935 <Item>System.Int64</Item> 4935 <Item>System.Int64</Item>
4936 <Item>0</Item> 4936 <Item>0</Item>
4937 </Issue> 4937 </Issue>
4938 <Issue> 4938 <Issue>
4939 <Item>AssetRequest.AssetRequest()</Item> 4939 <Item>AssetRequest.AssetRequest()</Item>
4940 <Item>NumPackets</Item> 4940 <Item>NumPackets</Item>
4941 <Item>System.Int32</Item> 4941 <Item>System.Int32</Item>
4942 <Item>0</Item> 4942 <Item>0</Item>
4943 </Issue> 4943 </Issue>
4944 <Issue> 4944 <Issue>
4945 <Item>AssetRequest.AssetRequest()</Item> 4945 <Item>AssetRequest.AssetRequest()</Item>
4946 <Item>PacketCounter</Item> 4946 <Item>PacketCounter</Item>
4947 <Item>System.Int32</Item> 4947 <Item>System.Int32</Item>
4948 <Item>0</Item> 4948 <Item>0</Item>
4949 </Issue> 4949 </Issue>
4950 </Message> 4950 </Message>
4951 </Messages> 4951 </Messages>
4952 </Member> 4952 </Member>
4953 <Member Name="AssetInf"> 4953 <Member Name="AssetInf">
4954 <Messages> 4954 <Messages>
4955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4956 <Issue> 4956 <Issue>
4957 <Item>AssetInf</Item> 4957 <Item>AssetInf</Item>
4958 </Issue> 4958 </Issue>
4959 </Message> 4959 </Message>
4960 </Messages> 4960 </Messages>
4961 </Member> 4961 </Member>
4962 <Member Name="DataPointer"> 4962 <Member Name="DataPointer">
4963 <Messages> 4963 <Messages>
4964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4965 <Issue> 4965 <Issue>
4966 <Item>DataPointer</Item> 4966 <Item>DataPointer</Item>
4967 </Issue> 4967 </Issue>
4968 </Message> 4968 </Message>
4969 </Messages> 4969 </Messages>
4970 </Member> 4970 </Member>
4971 <Member Name="ImageInfo"> 4971 <Member Name="ImageInfo">
4972 <Messages> 4972 <Messages>
4973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4974 <Issue> 4974 <Issue>
4975 <Item>ImageInfo</Item> 4975 <Item>ImageInfo</Item>
4976 </Issue> 4976 </Issue>
4977 </Message> 4977 </Message>
4978 </Messages> 4978 </Messages>
4979 </Member> 4979 </Member>
4980 <Member Name="IsTextureRequest"> 4980 <Member Name="IsTextureRequest">
4981 <Messages> 4981 <Messages>
4982 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4982 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4983 <Issue> 4983 <Issue>
4984 <Item>IsTextureRequest</Item> 4984 <Item>IsTextureRequest</Item>
4985 </Issue> 4985 </Issue>
4986 </Message> 4986 </Message>
4987 </Messages> 4987 </Messages>
4988 </Member> 4988 </Member>
4989 <Member Name="NumPackets"> 4989 <Member Name="NumPackets">
4990 <Messages> 4990 <Messages>
4991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 4991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4992 <Issue> 4992 <Issue>
4993 <Item>NumPackets</Item> 4993 <Item>NumPackets</Item>
4994 </Issue> 4994 </Issue>
4995 </Message> 4995 </Message>
4996 <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 4996 <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4997 <Issue Name="Member"> 4997 <Issue Name="Member">
4998 <Item>Num</Item> 4998 <Item>Num</Item>
4999 <Item>AssetRequest.NumPackets</Item> 4999 <Item>AssetRequest.NumPackets</Item>
5000 </Issue> 5000 </Issue>
5001 </Message> 5001 </Message>
5002 </Messages> 5002 </Messages>
5003 </Member> 5003 </Member>
5004 <Member Name="PacketCounter"> 5004 <Member Name="PacketCounter">
5005 <Messages> 5005 <Messages>
5006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5007 <Issue> 5007 <Issue>
5008 <Item>PacketCounter</Item> 5008 <Item>PacketCounter</Item>
5009 </Issue> 5009 </Issue>
5010 </Message> 5010 </Message>
5011 </Messages> 5011 </Messages>
5012 </Member> 5012 </Member>
5013 <Member Name="RequestAssetID"> 5013 <Member Name="RequestAssetID">
5014 <Messages> 5014 <Messages>
5015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5016 <Issue> 5016 <Issue>
5017 <Item>RequestAssetID</Item> 5017 <Item>RequestAssetID</Item>
5018 </Issue> 5018 </Issue>
5019 </Message> 5019 </Message>
5020 </Messages> 5020 </Messages>
5021 </Member> 5021 </Member>
5022 <Member Name="RequestUser"> 5022 <Member Name="RequestUser">
5023 <Messages> 5023 <Messages>
5024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5025 <Issue> 5025 <Issue>
5026 <Item>RequestUser</Item> 5026 <Item>RequestUser</Item>
5027 </Issue> 5027 </Issue>
5028 </Message> 5028 </Message>
5029 </Messages> 5029 </Messages>
5030 </Member> 5030 </Member>
5031 <Member Name="TransferRequestID"> 5031 <Member Name="TransferRequestID">
5032 <Messages> 5032 <Messages>
5033 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5033 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5034 <Issue> 5034 <Issue>
5035 <Item>TransferRequestID</Item> 5035 <Item>TransferRequestID</Item>
5036 </Issue> 5036 </Issue>
5037 </Message> 5037 </Message>
5038 </Messages> 5038 </Messages>
5039 </Member> 5039 </Member>
5040 </Members> 5040 </Members>
5041 </Type> 5041 </Type>
5042 <Type Name="InventoryCache"> 5042 <Type Name="InventoryCache">
5043 <Members> 5043 <Members>
5044 <Member Name="AddNewInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID"> 5044 <Member Name="AddNewInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID">
5045 <Messages> 5045 <Messages>
5046 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5046 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5047 <Issue Name="ParameterId"> 5047 <Issue Name="ParameterId">
5048 <Item>ID</Item> 5048 <Item>ID</Item>
5049 <Item>folderID</Item> 5049 <Item>folderID</Item>
5050 <Item>Id</Item> 5050 <Item>Id</Item>
5051 </Issue> 5051 </Issue>
5052 </Message> 5052 </Message>
5053 </Messages> 5053 </Messages>
5054 </Member> 5054 </Member>
5055 <Member Name="ClientLeaving(libsecondlife.LLUUID):System.Void"> 5055 <Member Name="ClientLeaving(libsecondlife.LLUUID):System.Void">
5056 <Messages> 5056 <Messages>
5057 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5057 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5058 <Issue Name="ParameterId"> 5058 <Issue Name="ParameterId">
5059 <Item>ID</Item> 5059 <Item>ID</Item>
5060 <Item>clientID</Item> 5060 <Item>clientID</Item>
5061 <Item>Id</Item> 5061 <Item>Id</Item>
5062 </Issue> 5062 </Issue>
5063 </Message> 5063 </Message>
5064 </Messages> 5064 </Messages>
5065 </Member> 5065 </Member>
5066 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID):System.Boolean"> 5066 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID):System.Boolean">
5067 <Messages> 5067 <Messages>
5068 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5068 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5069 <Issue Name="ParameterId"> 5069 <Issue Name="ParameterId">
5070 <Item>ID</Item> 5070 <Item>ID</Item>
5071 <Item>folderID</Item> 5071 <Item>folderID</Item>
5072 <Item>Id</Item> 5072 <Item>Id</Item>
5073 </Issue> 5073 </Issue>
5074 </Message> 5074 </Message>
5075 </Messages> 5075 </Messages>
5076 </Member> 5076 </Member>
5077 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID,System.UInt16):System.Boolean"> 5077 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID,System.UInt16):System.Boolean">
5078 <Messages> 5078 <Messages>
5079 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5079 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5080 <Issue Name="ParameterId"> 5080 <Issue Name="ParameterId">
5081 <Item>ID</Item> 5081 <Item>ID</Item>
5082 <Item>folderID</Item> 5082 <Item>folderID</Item>
5083 <Item>Id</Item> 5083 <Item>Id</Item>
5084 </Issue> 5084 </Issue>
5085 </Message> 5085 </Message>
5086 </Messages> 5086 </Messages>
5087 </Member> 5087 </Member>
5088 <Member Name="FetchInventory(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryPacket):System.Void"> 5088 <Member Name="FetchInventory(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryPacket):System.Void">
5089 <Messages> 5089 <Messages>
5090 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5090 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5091 <Issue Name="Parameter"> 5091 <Issue Name="Parameter">
5092 <Item>FetchItems</Item> 5092 <Item>FetchItems</Item>
5093 </Issue> 5093 </Issue>
5094 </Message> 5094 </Message>
5095 </Messages> 5095 </Messages>
5096 </Member> 5096 </Member>
5097 <Member Name="FetchInventoryDescendents(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryDescendentsPacket):System.Void"> 5097 <Member Name="FetchInventoryDescendents(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryDescendentsPacket):System.Void">
5098 <Messages> 5098 <Messages>
5099 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5099 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5100 <Issue Name="Parameter"> 5100 <Issue Name="Parameter">
5101 <Item>FetchDescend</Item> 5101 <Item>FetchDescend</Item>
5102 </Issue> 5102 </Issue>
5103 </Message> 5103 </Message>
5104 </Messages> 5104 </Messages>
5105 </Member> 5105 </Member>
5106 <Member Name="GetAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory"> 5106 <Member Name="GetAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
5107 <Messages> 5107 <Messages>
5108 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5108 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5109 <Issue Name="ParameterId"> 5109 <Issue Name="ParameterId">
5110 <Item>ID</Item> 5110 <Item>ID</Item>
5111 <Item>agentID</Item> 5111 <Item>agentID</Item>
5112 <Item>Id</Item> 5112 <Item>Id</Item>
5113 </Issue> 5113 </Issue>
5114 </Message> 5114 </Message>
5115 </Messages> 5115 </Messages>
5116 </Member> 5116 </Member>
5117 <Member Name="UpdateInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean"> 5117 <Member Name="UpdateInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean">
5118 <Messages> 5118 <Messages>
5119 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 5119 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5120 <Issue Name="ParameterId"> 5120 <Issue Name="ParameterId">
5121 <Item>ID</Item> 5121 <Item>ID</Item>
5122 <Item>itemID</Item> 5122 <Item>itemID</Item>
5123 <Item>Id</Item> 5123 <Item>Id</Item>
5124 </Issue> 5124 </Issue>
5125 </Message> 5125 </Message>
5126 </Messages> 5126 </Messages>
5127 </Member> 5127 </Member>
5128 </Members> 5128 </Members>
5129 </Type> 5129 </Type>
5130 <Type Name="TextureImage"> 5130 <Type Name="TextureImage">
5131 <Messages> 5131 <Messages>
5132 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z"> 5132 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
5133 <Issue> 5133 <Issue>
5134 <Item>OpenSim.Assets.TextureImage</Item> 5134 <Item>OpenSim.Assets.TextureImage</Item>
5135 <Item> OpenSim.Framework.Assets.AssetBase</Item> 5135 <Item> OpenSim.Framework.Assets.AssetBase</Item>
5136 </Issue> 5136 </Issue>
5137 </Message> 5137 </Message>
5138 </Messages> 5138 </Messages>
5139 <Members> 5139 <Members>
5140 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)"> 5140 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)">
5141 <Messages> 5141 <Messages>
5142 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5142 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5143 <Issue Name="Parameter"> 5143 <Issue Name="Parameter">
5144 <Item>TextureImage.TextureImage(AssetBase)</Item> 5144 <Item>TextureImage.TextureImage(AssetBase)</Item>
5145 <Item>a</Item> 5145 <Item>a</Item>
5146 <Item>aBase</Item> 5146 <Item>aBase</Item>
5147 </Issue> 5147 </Issue>
5148 </Message> 5148 </Message>
5149 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 5149 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5150 <Issue> 5150 <Issue>
5151 <Item>'aBase'</Item> 5151 <Item>'aBase'</Item>
5152 <Item>TextureImage.TextureImage(AssetBase)</Item> 5152 <Item>TextureImage.TextureImage(AssetBase)</Item>
5153 </Issue> 5153 </Issue>
5154 </Message> 5154 </Message>
5155 </Messages> 5155 </Messages>
5156 </Member> 5156 </Member>
5157 </Members> 5157 </Members>
5158 </Type> 5158 </Type>
5159 </Types> 5159 </Types>
5160 </Namespace> 5160 </Namespace>
5161 <Namespace Name="OpenSim.CAPS"> 5161 <Namespace Name="OpenSim.CAPS">
5162 <Types> 5162 <Types>
5163 <Type Name="SimCAPSHTTPServer"> 5163 <Type Name="SimCAPSHTTPServer">
5164 <Messages> 5164 <Messages>
5165 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5165 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5166 <Issue Name="Type"> 5166 <Issue Name="Type">
5167 <Item>Sim</Item> 5167 <Item>Sim</Item>
5168 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item> 5168 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item>
5169 </Issue> 5169 </Issue>
5170 </Message> 5170 </Message>
5171 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 5171 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
5172 <Issue Name="Type"> 5172 <Issue Name="Type">
5173 <Item>SimCAPSHTTPServer</Item> 5173 <Item>SimCAPSHTTPServer</Item>
5174 </Issue> 5174 </Issue>
5175 </Message> 5175 </Message>
5176 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 5176 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5177 <Issue> 5177 <Issue>
5178 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item> 5178 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item>
5179 <Item>System.Net.HttpListener</Item> 5179 <Item>System.Net.HttpListener</Item>
5180 </Issue> 5180 </Issue>
5181 </Message> 5181 </Message>
5182 </Messages> 5182 </Messages>
5183 <Members> 5183 <Members>
5184 <Member Name="HandleRequest(System.Object):System.Void"> 5184 <Member Name="HandleRequest(System.Object):System.Void">
5185 <Messages> 5185 <Messages>
5186 <Message Id="0#stateinfo" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5186 <Message Id="0#stateinfo" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5187 <Issue Name="Parameter"> 5187 <Issue Name="Parameter">
5188 <Item>SimCAPSHTTPServer.HandleRequest(Object):Void</Item> 5188 <Item>SimCAPSHTTPServer.HandleRequest(Object):Void</Item>
5189 <Item>stateinfo</Item> 5189 <Item>stateinfo</Item>
5190 <Item>stateinfo</Item> 5190 <Item>stateinfo</Item>
5191 </Issue> 5191 </Issue>
5192 </Message> 5192 </Message>
5193 </Messages> 5193 </Messages>
5194 </Member> 5194 </Member>
5195 <Member Name="HTTPD"> 5195 <Member Name="HTTPD">
5196 <Messages> 5196 <Messages>
5197 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5197 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5198 <Issue> 5198 <Issue>
5199 <Item>HTTPD</Item> 5199 <Item>HTTPD</Item>
5200 </Issue> 5200 </Issue>
5201 </Message> 5201 </Message>
5202 </Messages> 5202 </Messages>
5203 </Member> 5203 </Member>
5204 <Member Name="Listener"> 5204 <Member Name="Listener">
5205 <Messages> 5205 <Messages>
5206 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5206 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5207 <Issue> 5207 <Issue>
5208 <Item>Listener</Item> 5208 <Item>Listener</Item>
5209 </Issue> 5209 </Issue>
5210 </Message> 5210 </Message>
5211 </Messages> 5211 </Messages>
5212 </Member> 5212 </Member>
5213 <Member Name="LoadAdminPage():System.Void"> 5213 <Member Name="LoadAdminPage():System.Void">
5214 <Messages> 5214 <Messages>
5215 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 5215 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5216 <Issue> 5216 <Issue>
5217 <Item>SimCAPSHTTPServer.LoadAdminPage():Void</Item> 5217 <Item>SimCAPSHTTPServer.LoadAdminPage():Void</Item>
5218 <Item>System.Exception</Item> 5218 <Item>System.Exception</Item>
5219 </Issue> 5219 </Issue>
5220 </Message> 5220 </Message>
5221 </Messages> 5221 </Messages>
5222 </Member> 5222 </Member>
5223 <Member Name="ParseLLSDXML(System.String):System.String"> 5223 <Member Name="ParseLLSDXML(System.String):System.String">
5224 <Messages> 5224 <Messages>
5225 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 5225 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5226 <Issue> 5226 <Issue>
5227 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item> 5227 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item>
5228 </Issue> 5228 </Issue>
5229 </Message> 5229 </Message>
5230 <Message Id="requestBody" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 5230 <Message Id="requestBody" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5231 <Issue> 5231 <Issue>
5232 <Item>requestBody</Item> 5232 <Item>requestBody</Item>
5233 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item> 5233 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item>
5234 </Issue> 5234 </Issue>
5235 </Message> 5235 </Message>
5236 </Messages> 5236 </Messages>
5237 </Member> 5237 </Member>
5238 <Member Name="ParseREST(System.String,System.String,System.String):System.String"> 5238 <Member Name="ParseREST(System.String,System.String,System.String):System.String">
5239 <Messages> 5239 <Messages>
5240 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 5240 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5241 <Issue> 5241 <Issue>
5242 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item> 5242 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item>
5243 <Item>System.Exception</Item> 5243 <Item>System.Exception</Item>
5244 </Issue> 5244 </Issue>
5245 </Message> 5245 </Message>
5246 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5246 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5247 <Issue> 5247 <Issue>
5248 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item> 5248 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item>
5249 <Item>System.String.Format(System.String,System.Object[])</Item> 5249 <Item>System.String.Format(System.String,System.Object[])</Item>
5250 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item> 5250 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
5251 </Issue> 5251 </Issue>
5252 </Message> 5252 </Message>
5253 </Messages> 5253 </Messages>
5254 </Member> 5254 </Member>
5255 <Member Name="ParseXMLRPC(System.String):System.String"> 5255 <Member Name="ParseXMLRPC(System.String):System.String">
5256 <Messages> 5256 <Messages>
5257 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 5257 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5258 <Issue> 5258 <Issue>
5259 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item> 5259 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5260 <Item>System.Exception</Item> 5260 <Item>System.Exception</Item>
5261 </Issue> 5261 </Issue>
5262 </Message> 5262 </Message>
5263 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking"> 5263 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5264 <Issue> 5264 <Issue>
5265 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item> 5265 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5266 </Issue> 5266 </Issue>
5267 </Message> 5267 </Message>
5268 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5268 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5269 <Issue> 5269 <Issue>
5270 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item> 5270 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5271 <Item>System.Convert.ToUInt32(System.Object)</Item> 5271 <Item>System.Convert.ToUInt32(System.Object)</Item>
5272 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item> 5272 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
5273 </Issue> 5273 </Issue>
5274 </Message> 5274 </Message>
5275 </Messages> 5275 </Messages>
5276 </Member> 5276 </Member>
5277 <Member Name="StartHTTP():System.Void"> 5277 <Member Name="StartHTTP():System.Void">
5278 <Messages> 5278 <Messages>
5279 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 5279 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5280 <Issue> 5280 <Issue>
5281 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item> 5281 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item>
5282 <Item>System.Exception</Item> 5282 <Item>System.Exception</Item>
5283 </Issue> 5283 </Issue>
5284 </Message> 5284 </Message>
5285 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 5285 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
5286 <Issue Name="Member"> 5286 <Issue Name="Member">
5287 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item> 5287 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item>
5288 </Issue> 5288 </Issue>
5289 </Message> 5289 </Message>
5290 </Messages> 5290 </Messages>
5291 </Member> 5291 </Member>
5292 </Members> 5292 </Members>
5293 </Type> 5293 </Type>
5294 </Types> 5294 </Types>
5295 </Namespace> 5295 </Namespace>
5296 <Namespace Name="OpenSim.types"> 5296 <Namespace Name="OpenSim.types">
5297 <Types> 5297 <Types>
5298 <Type Name="Mesh"> 5298 <Type Name="Mesh">
5299 <Members> 5299 <Members>
5300 <Member Name="mesh"> 5300 <Member Name="mesh">
5301 <Messages> 5301 <Messages>
5302 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5302 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5303 <Issue> 5303 <Issue>
5304 <Item>mesh</Item> 5304 <Item>mesh</Item>
5305 </Issue> 5305 </Issue>
5306 </Message> 5306 </Message>
5307 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 5307 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
5308 <Issue> 5308 <Issue>
5309 <Item>System.Collections.Generic.List`1&lt;OpenSim.types.Triangle&gt;</Item> 5309 <Item>System.Collections.Generic.List`1&lt;OpenSim.types.Triangle&gt;</Item>
5310 <Item>Mesh.mesh</Item> 5310 <Item>Mesh.mesh</Item>
5311 </Issue> 5311 </Issue>
5312 </Message> 5312 </Message>
5313 </Messages> 5313 </Messages>
5314 </Member> 5314 </Member>
5315 <Member Name="op_Addition(OpenSim.types.Mesh,OpenSim.types.Mesh):OpenSim.types.Mesh"> 5315 <Member Name="op_Addition(OpenSim.types.Mesh,OpenSim.types.Mesh):OpenSim.types.Mesh">
5316 <Messages> 5316 <Messages>
5317 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5317 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5318 <Issue Name="ParameterOneLetter"> 5318 <Issue Name="ParameterOneLetter">
5319 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item> 5319 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5320 <Item>a</Item> 5320 <Item>a</Item>
5321 </Issue> 5321 </Issue>
5322 </Message> 5322 </Message>
5323 <Message Id="1#b" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5323 <Message Id="1#b" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5324 <Issue Name="ParameterOneLetter"> 5324 <Issue Name="ParameterOneLetter">
5325 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item> 5325 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5326 <Item>b</Item> 5326 <Item>b</Item>
5327 </Issue> 5327 </Issue>
5328 </Message> 5328 </Message>
5329 <Message TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225" Created="2007-03-27 04:29:04Z"> 5329 <Message TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225" Created="2007-03-27 04:29:04Z">
5330 <Issue> 5330 <Issue>
5331 <Item>Add</Item> 5331 <Item>Add</Item>
5332 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item> 5332 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5333 </Issue> 5333 </Issue>
5334 </Message> 5334 </Message>
5335 <Message TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013" Created="2007-03-27 04:29:04Z"> 5335 <Message TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013" Created="2007-03-27 04:29:04Z">
5336 <Issue> 5336 <Issue>
5337 <Item>Mesh</Item> 5337 <Item>Mesh</Item>
5338 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item> 5338 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5339 </Issue> 5339 </Issue>
5340 </Message> 5340 </Message>
5341 </Messages> 5341 </Messages>
5342 </Member> 5342 </Member>
5343 </Members> 5343 </Members>
5344 </Type> 5344 </Type>
5345 <Type Name="Triangle"> 5345 <Type Name="Triangle">
5346 <Members> 5346 <Members>
5347 <Member Name=".ctor(Axiom.MathLib.Vector3,Axiom.MathLib.Vector3,Axiom.MathLib.Vector3)"> 5347 <Member Name=".ctor(Axiom.MathLib.Vector3,Axiom.MathLib.Vector3,Axiom.MathLib.Vector3)">
5348 <Messages> 5348 <Messages>
5349 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5349 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5350 <Issue Name="Parameter"> 5350 <Issue Name="Parameter">
5351 <Item>A</Item> 5351 <Item>A</Item>
5352 </Issue> 5352 </Issue>
5353 </Message> 5353 </Message>
5354 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5354 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5355 <Issue Name="Parameter"> 5355 <Issue Name="Parameter">
5356 <Item>B</Item> 5356 <Item>B</Item>
5357 </Issue> 5357 </Issue>
5358 </Message> 5358 </Message>
5359 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5359 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5360 <Issue Name="Parameter"> 5360 <Issue Name="Parameter">
5361 <Item>C</Item> 5361 <Item>C</Item>
5362 </Issue> 5362 </Issue>
5363 </Message> 5363 </Message>
5364 <Message Id="0#A" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5364 <Message Id="0#A" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5365 <Issue Name="ParameterOneLetter"> 5365 <Issue Name="ParameterOneLetter">
5366 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item> 5366 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5367 <Item>A</Item> 5367 <Item>A</Item>
5368 </Issue> 5368 </Issue>
5369 </Message> 5369 </Message>
5370 <Message Id="1#B" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5370 <Message Id="1#B" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5371 <Issue Name="ParameterOneLetter"> 5371 <Issue Name="ParameterOneLetter">
5372 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item> 5372 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5373 <Item>B</Item> 5373 <Item>B</Item>
5374 </Issue> 5374 </Issue>
5375 </Message> 5375 </Message>
5376 <Message Id="2#C" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5376 <Message Id="2#C" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5377 <Issue Name="ParameterOneLetter"> 5377 <Issue Name="ParameterOneLetter">
5378 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item> 5378 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5379 <Item>C</Item> 5379 <Item>C</Item>
5380 </Issue> 5380 </Issue>
5381 </Message> 5381 </Message>
5382 </Messages> 5382 </Messages>
5383 </Member> 5383 </Member>
5384 </Members> 5384 </Members>
5385 </Type> 5385 </Type>
5386 </Types> 5386 </Types>
5387 </Namespace> 5387 </Namespace>
5388 <Namespace Name="OpenSim.UserServer"> 5388 <Namespace Name="OpenSim.UserServer">
5389 <Types> 5389 <Types>
5390 <Type Name="LocalUserProfileManager"> 5390 <Type Name="LocalUserProfileManager">
5391 <Members> 5391 <Members>
5392 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void"> 5392 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void">
5393 <Messages> 5393 <Messages>
5394 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5394 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5395 <Issue> 5395 <Issue>
5396 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5396 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5397 <Item>System.Int32.ToString</Item> 5397 <Item>System.Int32.ToString</Item>
5398 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 5398 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5399 </Issue> 5399 </Issue>
5400 <Issue> 5400 <Issue>
5401 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5401 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5402 <Item>System.Int32.ToString</Item> 5402 <Item>System.Int32.ToString</Item>
5403 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 5403 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5404 </Issue> 5404 </Issue>
5405 </Message> 5405 </Message>
5406 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5406 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5407 <Issue> 5407 <Issue>
5408 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5408 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5409 <Item>System.Single.ToString</Item> 5409 <Item>System.Single.ToString</Item>
5410 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5410 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5411 </Issue> 5411 </Issue>
5412 <Issue> 5412 <Issue>
5413 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5413 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5414 <Item>System.Single.ToString</Item> 5414 <Item>System.Single.ToString</Item>
5415 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5415 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5416 </Issue> 5416 </Issue>
5417 <Issue> 5417 <Issue>
5418 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5418 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5419 <Item>System.Single.ToString</Item> 5419 <Item>System.Single.ToString</Item>
5420 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5420 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5421 </Issue> 5421 </Issue>
5422 <Issue> 5422 <Issue>
5423 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5423 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5424 <Item>System.Single.ToString</Item> 5424 <Item>System.Single.ToString</Item>
5425 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5425 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5426 </Issue> 5426 </Issue>
5427 <Issue> 5427 <Issue>
5428 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5428 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5429 <Item>System.Single.ToString</Item> 5429 <Item>System.Single.ToString</Item>
5430 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5430 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5431 </Issue> 5431 </Issue>
5432 <Issue> 5432 <Issue>
5433 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item> 5433 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5434 <Item>System.Single.ToString</Item> 5434 <Item>System.Single.ToString</Item>
5435 <Item>System.Single.ToString(System.IFormatProvider)</Item> 5435 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5436 </Issue> 5436 </Issue>
5437 </Message> 5437 </Message>
5438 </Messages> 5438 </Messages>
5439 </Member> 5439 </Member>
5440 </Members> 5440 </Members>
5441 </Type> 5441 </Type>
5442 <Type Name="LoginServer"> 5442 <Type Name="LoginServer">
5443 <Messages> 5443 <Messages>
5444 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z"> 5444 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
5445 <Issue> 5445 <Issue>
5446 <Item>OpenSim.UserServer.LoginServer</Item> 5446 <Item>OpenSim.UserServer.LoginServer</Item>
5447 <Item> OpenSim.Framework.Grid.LoginService</Item> 5447 <Item> OpenSim.Framework.Grid.LoginService</Item>
5448 </Issue> 5448 </Issue>
5449 </Message> 5449 </Message>
5450 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 5450 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5451 <Issue> 5451 <Issue>
5452 <Item>OpenSim.UserServer.LoginServer</Item> 5452 <Item>OpenSim.UserServer.LoginServer</Item>
5453 <Item>System.Net.Sockets.Socket</Item> 5453 <Item>System.Net.Sockets.Socket</Item>
5454 </Issue> 5454 </Issue>
5455 </Message> 5455 </Message>
5456 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 5456 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
5457 <Issue Name="Type"> 5457 <Issue Name="Type">
5458 <Item>Login</Item> 5458 <Item>Login</Item>
5459 <Item>LoginServer</Item> 5459 <Item>LoginServer</Item>
5460 <Item>LogOn</Item> 5460 <Item>LogOn</Item>
5461 </Issue> 5461 </Issue>
5462 </Message> 5462 </Message>
5463 </Messages> 5463 </Messages>
5464 <Members> 5464 <Members>
5465 <Member Name=".ctor(OpenSim.Framework.Interfaces.IGridServer)"> 5465 <Member Name=".ctor(OpenSim.Framework.Interfaces.IGridServer)">
5466 <Messages> 5466 <Messages>
5467 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 5467 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5468 <Issue> 5468 <Issue>
5469 <Item>LoginServer.LoginServer(IGridServer)</Item> 5469 <Item>LoginServer.LoginServer(IGridServer)</Item>
5470 <Item>_needPasswd</Item> 5470 <Item>_needPasswd</Item>
5471 <Item>System.Boolean</Item> 5471 <Item>System.Boolean</Item>
5472 <Item>false</Item> 5472 <Item>false</Item>
5473 </Issue> 5473 </Issue>
5474 <Issue> 5474 <Issue>
5475 <Item>LoginServer.LoginServer(IGridServer)</Item> 5475 <Item>LoginServer.LoginServer(IGridServer)</Item>
5476 <Item>userAccounts</Item> 5476 <Item>userAccounts</Item>
5477 <Item>System.Boolean</Item> 5477 <Item>System.Boolean</Item>
5478 <Item>false</Item> 5478 <Item>false</Item>
5479 </Issue> 5479 </Issue>
5480 </Message> 5480 </Message>
5481 </Messages> 5481 </Messages>
5482 </Member> 5482 </Member>
5483 <Member Name="Authenticate(System.String,System.String,System.String):System.Boolean"> 5483 <Member Name="Authenticate(System.String,System.String,System.String):System.Boolean">
5484 <Messages> 5484 <Messages>
5485 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5485 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5486 <Issue Name="Parameter"> 5486 <Issue Name="Parameter">
5487 <Item>LoginServer.Authenticate(String, String, String):Boolean</Item> 5487 <Item>LoginServer.Authenticate(String, String, String):Boolean</Item>
5488 <Item>passwd</Item> 5488 <Item>passwd</Item>
5489 <Item>passwd</Item> 5489 <Item>passwd</Item>
5490 </Issue> 5490 </Issue>
5491 </Message> 5491 </Message>
5492 </Messages> 5492 </Messages>
5493 </Member> 5493 </Member>
5494 <Member Name="clientAddress"> 5494 <Member Name="clientAddress">
5495 <Messages> 5495 <Messages>
5496 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5496 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5497 <Issue> 5497 <Issue>
5498 <Item>clientAddress</Item> 5498 <Item>clientAddress</Item>
5499 </Issue> 5499 </Issue>
5500 </Message> 5500 </Message>
5501 </Messages> 5501 </Messages>
5502 </Member> 5502 </Member>
5503 <Member Name="CustomiseLoginResponse(System.Collections.Hashtable,System.String,System.String):System.Void"> 5503 <Member Name="CustomiseLoginResponse(System.Collections.Hashtable,System.String,System.String):System.Void">
5504 <Messages> 5504 <Messages>
5505 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5505 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5506 <Issue Name="Member"> 5506 <Issue Name="Member">
5507 <Item>Customise</Item> 5507 <Item>Customise</Item>
5508 <Item>LoginServer.CustomiseLoginResponse(Hashtable, String, String):Void</Item> 5508 <Item>LoginServer.CustomiseLoginResponse(Hashtable, String, String):Void</Item>
5509 </Issue> 5509 </Issue>
5510 </Message> 5510 </Message>
5511 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z"> 5511 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
5512 <Issue Name="Member"> 5512 <Issue Name="Member">
5513 <Item>Login</Item> 5513 <Item>Login</Item>
5514 <Item>CustomiseLoginResponse</Item> 5514 <Item>CustomiseLoginResponse</Item>
5515 <Item>LogOn</Item> 5515 <Item>LogOn</Item>
5516 </Issue> 5516 </Issue>
5517 </Message> 5517 </Message>
5518 </Messages> 5518 </Messages>
5519 </Member> 5519 </Member>
5520 <Member Name="EncodePassword(System.String):System.String"> 5520 <Member Name="EncodePassword(System.String):System.String">
5521 <Messages> 5521 <Messages>
5522 <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-03-27 04:29:04Z"> 5522 <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-03-27 04:29:04Z">
5523 <Issue> 5523 <Issue>
5524 <Item>LoginServer.EncodePassword(String):String</Item> 5524 <Item>LoginServer.EncodePassword(String):String</Item>
5525 <Item>System.String.ToLower</Item> 5525 <Item>System.String.ToLower</Item>
5526 <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item> 5526 <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
5527 </Issue> 5527 </Issue>
5528 </Message> 5528 </Message>
5529 </Messages> 5529 </Messages>
5530 </Member> 5530 </Member>
5531 <Member Name="GetAgentId(System.String,System.String):libsecondlife.LLUUID"> 5531 <Member Name="GetAgentId(System.String,System.String):libsecondlife.LLUUID">
5532 <Messages> 5532 <Messages>
5533 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5533 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5534 <Issue> 5534 <Issue>
5535 <Item>LoginServer.GetAgentId(String, String):LLUUID</Item> 5535 <Item>LoginServer.GetAgentId(String, String):LLUUID</Item>
5536 <Item>System.Int32.ToString(System.String)</Item> 5536 <Item>System.Int32.ToString(System.String)</Item>
5537 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item> 5537 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
5538 </Issue> 5538 </Issue>
5539 </Message> 5539 </Message>
5540 </Messages> 5540 </Messages>
5541 </Member> 5541 </Member>
5542 <Member Name="InitializeLogin():System.Void"> 5542 <Member Name="InitializeLogin():System.Void">
5543 <Messages> 5543 <Messages>
5544 <Message Id="OpenSim.Framework.User.UserProfileManager.SetKeys(System.String,System.String,System.String,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-03-27 04:29:04Z"> 5544 <Message Id="OpenSim.Framework.User.UserProfileManager.SetKeys(System.String,System.String,System.String,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-03-27 04:29:04Z">
5545 <Issue> 5545 <Issue>
5546 <Item>LoginServer.InitializeLogin():Void</Item> 5546 <Item>LoginServer.InitializeLogin():Void</Item>
5547 <Item>4</Item> 5547 <Item>4</Item>
5548 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item> 5548 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
5549 <Item>Welcome to OpenSim</Item> 5549 <Item>Welcome to OpenSim</Item>
5550 </Issue> 5550 </Issue>
5551 </Message> 5551 </Message>
5552 <Message Id="Sim" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2007-03-27 04:29:04Z"> 5552 <Message Id="Sim" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2007-03-27 04:29:04Z">
5553 <Issue> 5553 <Issue>
5554 <Item>Sim</Item> 5554 <Item>Sim</Item>
5555 <Item>OpenSim</Item> 5555 <Item>OpenSim</Item>
5556 </Issue> 5556 </Issue>
5557 </Message> 5557 </Message>
5558 </Messages> 5558 </Messages>
5559 </Member> 5559 </Member>
5560 <Member Name="LoginRequest(System.IO.StreamReader,System.IO.StreamWriter):System.Void"> 5560 <Member Name="LoginRequest(System.IO.StreamReader,System.IO.StreamWriter):System.Void">
5561 <Messages> 5561 <Messages>
5562 <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-03-27 04:29:04Z"> 5562 <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-03-27 04:29:04Z">
5563 <Issue Name="TooGeneric"> 5563 <Issue Name="TooGeneric">
5564 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item> 5564 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5565 <Item>System.Exception</Item> 5565 <Item>System.Exception</Item>
5566 </Issue> 5566 </Issue>
5567 </Message> 5567 </Message>
5568 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5568 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5569 <Issue> 5569 <Issue>
5570 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item> 5570 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5571 <Item>System.Convert.ToInt32(System.String)</Item> 5571 <Item>System.Convert.ToInt32(System.String)</Item>
5572 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item> 5572 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
5573 </Issue> 5573 </Issue>
5574 </Message> 5574 </Message>
5575 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z"> 5575 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
5576 <Issue Name="IsNullOrEmpty"> 5576 <Issue Name="IsNullOrEmpty">
5577 <Item>op_Inequality</Item> 5577 <Item>op_Inequality</Item>
5578 <Item>""</Item> 5578 <Item>""</Item>
5579 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item> 5579 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5580 </Issue> 5580 </Issue>
5581 </Message> 5581 </Message>
5582 </Messages> 5582 </Messages>
5583 </Member> 5583 </Member>
5584 <Member Name="ProcessXmlRequest(Nwc.XmlRpc.XmlRpcRequest,System.IO.StreamWriter):System.Boolean"> 5584 <Member Name="ProcessXmlRequest(Nwc.XmlRpc.XmlRpcRequest,System.IO.StreamWriter):System.Boolean">
5585 <Messages> 5585 <Messages>
5586 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z"> 5586 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
5587 <Issue> 5587 <Issue>
5588 <Item>writer</Item> 5588 <Item>writer</Item>
5589 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5589 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5590 <Item>System.IO.StreamWriter</Item> 5590 <Item>System.IO.StreamWriter</Item>
5591 <Item>System.IO.TextWriter</Item> 5591 <Item>System.IO.TextWriter</Item>
5592 </Issue> 5592 </Issue>
5593 </Message> 5593 </Message>
5594 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5594 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5595 <Issue> 5595 <Issue>
5596 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5596 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5597 <Item>System.Int32.ToString</Item> 5597 <Item>System.Int32.ToString</Item>
5598 <Item>System.Int32.ToString(System.IFormatProvider)</Item> 5598 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5599 </Issue> 5599 </Issue>
5600 </Message> 5600 </Message>
5601 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 5601 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5602 <Issue> 5602 <Issue>
5603 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5603 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5604 <Item>System.Int32.ToString(System.String)</Item> 5604 <Item>System.Int32.ToString(System.String)</Item>
5605 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item> 5605 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
5606 </Issue> 5606 </Issue>
5607 </Message> 5607 </Message>
5608 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 5608 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5609 <Issue> 5609 <Issue>
5610 <Item>'request'</Item> 5610 <Item>'request'</Item>
5611 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5611 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5612 </Issue> 5612 </Issue>
5613 <Issue> 5613 <Issue>
5614 <Item>'writer'</Item> 5614 <Item>'writer'</Item>
5615 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5615 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5616 </Issue> 5616 </Issue>
5617 <Issue> 5617 <Issue>
5618 <Item>'writer'</Item> 5618 <Item>'writer'</Item>
5619 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item> 5619 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5620 </Issue> 5620 </Issue>
5621 </Message> 5621 </Message>
5622 </Messages> 5622 </Messages>
5623 </Member> 5623 </Member>
5624 <Member Name="remoteAddress"> 5624 <Member Name="remoteAddress">
5625 <Messages> 5625 <Messages>
5626 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5626 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5627 <Issue> 5627 <Issue>
5628 <Item>remoteAddress</Item> 5628 <Item>remoteAddress</Item>
5629 </Issue> 5629 </Issue>
5630 </Message> 5630 </Message>
5631 </Messages> 5631 </Messages>
5632 </Member> 5632 </Member>
5633 <Member Name="RunLogin():System.Void"> 5633 <Member Name="RunLogin():System.Void">
5634 <Messages> 5634 <Messages>
5635 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 5635 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5636 <Issue> 5636 <Issue>
5637 <Item>LoginServer.RunLogin():Void</Item> 5637 <Item>LoginServer.RunLogin():Void</Item>
5638 <Item>System.Exception</Item> 5638 <Item>System.Exception</Item>
5639 </Issue> 5639 </Issue>
5640 <Issue> 5640 <Issue>
5641 <Item>LoginServer.RunLogin():Void</Item> 5641 <Item>LoginServer.RunLogin():Void</Item>
5642 <Item>System.Exception</Item> 5642 <Item>System.Exception</Item>
5643 </Issue> 5643 </Issue>
5644 </Message> 5644 </Message>
5645 <Message Id="clientEndPoint" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z"> 5645 <Message Id="clientEndPoint" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
5646 <Issue> 5646 <Issue>
5647 <Item>LoginServer.RunLogin():Void</Item> 5647 <Item>LoginServer.RunLogin():Void</Item>
5648 <Item>clientEndPoint</Item> 5648 <Item>clientEndPoint</Item>
5649 <Item>System.Net.IPEndPoint</Item> 5649 <Item>System.Net.IPEndPoint</Item>
5650 </Issue> 5650 </Issue>
5651 </Message> 5651 </Message>
5652 </Messages> 5652 </Messages>
5653 </Member> 5653 </Member>
5654 </Members> 5654 </Members>
5655 </Type> 5655 </Type>
5656 </Types> 5656 </Types>
5657 </Namespace> 5657 </Namespace>
5658 <Namespace Name="OpenSim.world"> 5658 <Namespace Name="OpenSim.world">
5659 <Types> 5659 <Types>
5660 <Type Name="Avatar"> 5660 <Type Name="Avatar">
5661 <Members> 5661 <Members>
5662 <Member Name=".cctor()"> 5662 <Member Name=".cctor()">
5663 <Messages> 5663 <Messages>
5664 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 5664 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5665 <Issue> 5665 <Issue>
5666 <Item>Avatar.Avatar()</Item> 5666 <Item>Avatar.Avatar()</Item>
5667 <Item>PhysicsEngineFlying</Item> 5667 <Item>PhysicsEngineFlying</Item>
5668 <Item>System.Boolean</Item> 5668 <Item>System.Boolean</Item>
5669 <Item>false</Item> 5669 <Item>false</Item>
5670 </Issue> 5670 </Issue>
5671 </Message> 5671 </Message>
5672 </Messages> 5672 </Messages>
5673 </Member> 5673 </Member>
5674 <Member Name=".ctor(OpenSim.SimClient)"> 5674 <Member Name=".ctor(OpenSim.SimClient)">
5675 <Messages> 5675 <Messages>
5676 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 5676 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5677 <Issue> 5677 <Issue>
5678 <Item>Avatar.Avatar(SimClient)</Item> 5678 <Item>Avatar.Avatar(SimClient)</Item>
5679 <Item>_updateCount</Item> 5679 <Item>_updateCount</Item>
5680 <Item>System.Int16</Item> 5680 <Item>System.Int16</Item>
5681 <Item>0</Item> 5681 <Item>0</Item>
5682 </Issue> 5682 </Issue>
5683 <Issue> 5683 <Issue>
5684 <Item>Avatar.Avatar(SimClient)</Item> 5684 <Item>Avatar.Avatar(SimClient)</Item>
5685 <Item>avatarAppearanceTexture</Item> 5685 <Item>avatarAppearanceTexture</Item>
5686 <Item>libsecondlife.LLObject+TextureEntry</Item> 5686 <Item>libsecondlife.LLObject+TextureEntry</Item>
5687 <Item>null</Item> 5687 <Item>null</Item>
5688 </Issue> 5688 </Issue>
5689 <Issue> 5689 <Issue>
5690 <Item>Avatar.Avatar(SimClient)</Item> 5690 <Item>Avatar.Avatar(SimClient)</Item>
5691 <Item>movementflag</Item> 5691 <Item>movementflag</Item>
5692 <Item>System.Byte</Item> 5692 <Item>System.Byte</Item>
5693 <Item>0</Item> 5693 <Item>0</Item>
5694 </Issue> 5694 </Issue>
5695 <Issue> 5695 <Issue>
5696 <Item>Avatar.Avatar(SimClient)</Item> 5696 <Item>Avatar.Avatar(SimClient)</Item>
5697 <Item>updateflag</Item> 5697 <Item>updateflag</Item>
5698 <Item>System.Boolean</Item> 5698 <Item>System.Boolean</Item>
5699 <Item>false</Item> 5699 <Item>false</Item>
5700 </Issue> 5700 </Issue>
5701 </Message> 5701 </Message>
5702 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5702 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5703 <Issue Name="Parameter"> 5703 <Issue Name="Parameter">
5704 <Item>TheClient</Item> 5704 <Item>TheClient</Item>
5705 </Issue> 5705 </Issue>
5706 </Message> 5706 </Message>
5707 </Messages> 5707 </Messages>
5708 </Member> 5708 </Member>
5709 <Member Name="anim_seq"> 5709 <Member Name="anim_seq">
5710 <Messages> 5710 <Messages>
5711 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5711 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5712 <Issue> 5712 <Issue>
5713 <Item>anim_seq</Item> 5713 <Item>anim_seq</Item>
5714 </Issue> 5714 </Issue>
5715 </Message> 5715 </Message>
5716 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5716 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5717 <Issue Name="Member"> 5717 <Issue Name="Member">
5718 <Item>anim</Item> 5718 <Item>anim</Item>
5719 <Item>Avatar.anim_seq</Item> 5719 <Item>Avatar.anim_seq</Item>
5720 </Issue> 5720 </Issue>
5721 </Message> 5721 </Message>
5722 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 5722 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
5723 <Issue Name="Member"> 5723 <Issue Name="Member">
5724 <Item>anim_seq</Item> 5724 <Item>anim_seq</Item>
5725 </Issue> 5725 </Issue>
5726 </Message> 5726 </Message>
5727 </Messages> 5727 </Messages>
5728 </Member> 5728 </Member>
5729 <Member Name="Animations"> 5729 <Member Name="Animations">
5730 <Messages> 5730 <Messages>
5731 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z"> 5731 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
5732 <Issue> 5732 <Issue>
5733 <Item>Animations</Item> 5733 <Item>Animations</Item>
5734 </Issue> 5734 </Issue>
5735 </Message> 5735 </Message>
5736 </Messages> 5736 </Messages>
5737 </Member> 5737 </Member>
5738 <Member Name="CompleteMovement(OpenSim.world.World):System.Void"> 5738 <Member Name="CompleteMovement(OpenSim.world.World):System.Void">
5739 <Messages> 5739 <Messages>
5740 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5740 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5741 <Issue Name="Parameter"> 5741 <Issue Name="Parameter">
5742 <Item>RegionInfo</Item> 5742 <Item>RegionInfo</Item>
5743 </Issue> 5743 </Issue>
5744 </Message> 5744 </Message>
5745 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 5745 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5746 <Issue> 5746 <Issue>
5747 <Item>RegionInfo</Item> 5747 <Item>RegionInfo</Item>
5748 <Item>Avatar.CompleteMovement(World):Void</Item> 5748 <Item>Avatar.CompleteMovement(World):Void</Item>
5749 </Issue> 5749 </Issue>
5750 </Message> 5750 </Message>
5751 </Messages> 5751 </Messages>
5752 </Member> 5752 </Member>
5753 <Member Name="ControllingClient"> 5753 <Member Name="ControllingClient">
5754 <Messages> 5754 <Messages>
5755 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5755 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5756 <Issue> 5756 <Issue>
5757 <Item>ControllingClient</Item> 5757 <Item>ControllingClient</Item>
5758 </Issue> 5758 </Issue>
5759 </Message> 5759 </Message>
5760 </Messages> 5760 </Messages>
5761 </Member> 5761 </Member>
5762 <Member Name="current_anim"> 5762 <Member Name="current_anim">
5763 <Messages> 5763 <Messages>
5764 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5764 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5765 <Issue> 5765 <Issue>
5766 <Item>current_anim</Item> 5766 <Item>current_anim</Item>
5767 </Issue> 5767 </Issue>
5768 </Message> 5768 </Message>
5769 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5769 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5770 <Issue Name="Member"> 5770 <Issue Name="Member">
5771 <Item>anim</Item> 5771 <Item>anim</Item>
5772 <Item>Avatar.current_anim</Item> 5772 <Item>Avatar.current_anim</Item>
5773 </Issue> 5773 </Issue>
5774 </Message> 5774 </Message>
5775 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 5775 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
5776 <Issue Name="Member"> 5776 <Issue Name="Member">
5777 <Item>current_anim</Item> 5777 <Item>current_anim</Item>
5778 </Issue> 5778 </Issue>
5779 </Message> 5779 </Message>
5780 </Messages> 5780 </Messages>
5781 </Member> 5781 </Member>
5782 <Member Name="firstname"> 5782 <Member Name="firstname">
5783 <Messages> 5783 <Messages>
5784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5785 <Issue> 5785 <Issue>
5786 <Item>firstname</Item> 5786 <Item>firstname</Item>
5787 </Issue> 5787 </Issue>
5788 </Message> 5788 </Message>
5789 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5789 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5790 <Issue Name="Member"> 5790 <Issue Name="Member">
5791 <Item>firstname</Item> 5791 <Item>firstname</Item>
5792 <Item>Avatar.firstname</Item> 5792 <Item>Avatar.firstname</Item>
5793 </Issue> 5793 </Issue>
5794 </Message> 5794 </Message>
5795 </Messages> 5795 </Messages>
5796 </Member> 5796 </Member>
5797 <Member Name="lastname"> 5797 <Member Name="lastname">
5798 <Messages> 5798 <Messages>
5799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5800 <Issue> 5800 <Issue>
5801 <Item>lastname</Item> 5801 <Item>lastname</Item>
5802 </Issue> 5802 </Issue>
5803 </Message> 5803 </Message>
5804 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5804 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5805 <Issue Name="Member"> 5805 <Issue Name="Member">
5806 <Item>lastname</Item> 5806 <Item>lastname</Item>
5807 <Item>Avatar.lastname</Item> 5807 <Item>Avatar.lastname</Item>
5808 </Issue> 5808 </Issue>
5809 </Message> 5809 </Message>
5810 </Messages> 5810 </Messages>
5811 </Member> 5811 </Member>
5812 <Member Name="LoadAnims():System.Void"> 5812 <Member Name="LoadAnims():System.Void">
5813 <Messages> 5813 <Messages>
5814 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5814 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5815 <Issue Name="Member"> 5815 <Issue Name="Member">
5816 <Item>Anims</Item> 5816 <Item>Anims</Item>
5817 <Item>Avatar.LoadAnims():Void</Item> 5817 <Item>Avatar.LoadAnims():Void</Item>
5818 </Issue> 5818 </Issue>
5819 </Message> 5819 </Message>
5820 </Messages> 5820 </Messages>
5821 </Member> 5821 </Member>
5822 <Member Name="PhysActor"> 5822 <Member Name="PhysActor">
5823 <Messages> 5823 <Messages>
5824 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z"> 5824 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z">
5825 <Issue> 5825 <Issue>
5826 <Item>PhysActor</Item> 5826 <Item>PhysActor</Item>
5827 </Issue> 5827 </Issue>
5828 </Message> 5828 </Message>
5829 </Messages> 5829 </Messages>
5830 </Member> 5830 </Member>
5831 <Member Name="PhysicsEngineFlying"> 5831 <Member Name="PhysicsEngineFlying">
5832 <Messages> 5832 <Messages>
5833 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z"> 5833 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
5834 <Issue> 5834 <Issue>
5835 <Item>PhysicsEngineFlying</Item> 5835 <Item>PhysicsEngineFlying</Item>
5836 </Issue> 5836 </Issue>
5837 </Message> 5837 </Message>
5838 </Messages> 5838 </Messages>
5839 </Member> 5839 </Member>
5840 <Member Name="SendAnimPack():System.Void"> 5840 <Member Name="SendAnimPack():System.Void">
5841 <Messages> 5841 <Messages>
5842 <Message Id="Anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5842 <Message Id="Anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5843 <Issue Name="Member"> 5843 <Issue Name="Member">
5844 <Item>Anim</Item> 5844 <Item>Anim</Item>
5845 <Item>Avatar.SendAnimPack():Void</Item> 5845 <Item>Avatar.SendAnimPack():Void</Item>
5846 </Issue> 5846 </Issue>
5847 </Message> 5847 </Message>
5848 </Messages> 5848 </Messages>
5849 </Member> 5849 </Member>
5850 <Member Name="SendAppearanceToOtherAgent(OpenSim.SimClient):System.Void"> 5850 <Member Name="SendAppearanceToOtherAgent(OpenSim.SimClient):System.Void">
5851 <Messages> 5851 <Messages>
5852 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 5852 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5853 <Issue> 5853 <Issue>
5854 <Item>'userInfo'</Item> 5854 <Item>'userInfo'</Item>
5855 <Item>Avatar.SendAppearanceToOtherAgent(SimClient):Void</Item> 5855 <Item>Avatar.SendAppearanceToOtherAgent(SimClient):Void</Item>
5856 </Issue> 5856 </Issue>
5857 </Message> 5857 </Message>
5858 </Messages> 5858 </Messages>
5859 </Member> 5859 </Member>
5860 <Member Name="SendRegionHandshake(OpenSim.world.World):System.Void"> 5860 <Member Name="SendRegionHandshake(OpenSim.world.World):System.Void">
5861 <Messages> 5861 <Messages>
5862 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5862 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5863 <Issue Name="Parameter"> 5863 <Issue Name="Parameter">
5864 <Item>RegionInfo</Item> 5864 <Item>RegionInfo</Item>
5865 </Issue> 5865 </Issue>
5866 </Message> 5866 </Message>
5867 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 5867 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5868 <Issue> 5868 <Issue>
5869 <Item>RegionInfo</Item> 5869 <Item>RegionInfo</Item>
5870 <Item>Avatar.SendRegionHandshake(World):Void</Item> 5870 <Item>Avatar.SendRegionHandshake(World):Void</Item>
5871 </Issue> 5871 </Issue>
5872 </Message> 5872 </Message>
5873 </Messages> 5873 </Messages>
5874 </Member> 5874 </Member>
5875 </Members> 5875 </Members>
5876 </Type> 5876 </Type>
5877 <Type Name="AvatarAnimations"> 5877 <Type Name="AvatarAnimations">
5878 <Members> 5878 <Members>
5879 <Member Name="AnimsLLUUID"> 5879 <Member Name="AnimsLLUUID">
5880 <Messages> 5880 <Messages>
5881 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5881 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5882 <Issue> 5882 <Issue>
5883 <Item>AnimsLLUUID</Item> 5883 <Item>AnimsLLUUID</Item>
5884 </Issue> 5884 </Issue>
5885 </Message> 5885 </Message>
5886 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5886 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5887 <Issue Name="Member"> 5887 <Issue Name="Member">
5888 <Item>Anims</Item> 5888 <Item>Anims</Item>
5889 <Item>AvatarAnimations.AnimsLLUUID</Item> 5889 <Item>AvatarAnimations.AnimsLLUUID</Item>
5890 </Issue> 5890 </Issue>
5891 </Message> 5891 </Message>
5892 </Messages> 5892 </Messages>
5893 </Member> 5893 </Member>
5894 <Member Name="AnimsNames"> 5894 <Member Name="AnimsNames">
5895 <Messages> 5895 <Messages>
5896 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5896 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5897 <Issue> 5897 <Issue>
5898 <Item>AnimsNames</Item> 5898 <Item>AnimsNames</Item>
5899 </Issue> 5899 </Issue>
5900 </Message> 5900 </Message>
5901 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5901 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5902 <Issue Name="Member"> 5902 <Issue Name="Member">
5903 <Item>Anims</Item> 5903 <Item>Anims</Item>
5904 <Item>AvatarAnimations.AnimsNames</Item> 5904 <Item>AvatarAnimations.AnimsNames</Item>
5905 </Issue> 5905 </Issue>
5906 </Message> 5906 </Message>
5907 </Messages> 5907 </Messages>
5908 </Member> 5908 </Member>
5909 <Member Name="LoadAnims():System.Void"> 5909 <Member Name="LoadAnims():System.Void">
5910 <Messages> 5910 <Messages>
5911 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5911 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5912 <Issue Name="Member"> 5912 <Issue Name="Member">
5913 <Item>Anims</Item> 5913 <Item>Anims</Item>
5914 <Item>AvatarAnimations.LoadAnims():Void</Item> 5914 <Item>AvatarAnimations.LoadAnims():Void</Item>
5915 </Issue> 5915 </Issue>
5916 </Message> 5916 </Message>
5917 </Messages> 5917 </Messages>
5918 </Member> 5918 </Member>
5919 </Members> 5919 </Members>
5920 </Type> 5920 </Type>
5921 <Type Name="Entity"> 5921 <Type Name="Entity">
5922 <Members> 5922 <Members>
5923 <Member Name=".ctor()"> 5923 <Member Name=".ctor()">
5924 <Messages> 5924 <Messages>
5925 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 5925 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5926 <Issue> 5926 <Issue>
5927 <Item>Entity.Entity()</Item> 5927 <Item>Entity.Entity()</Item>
5928 <Item>localid</Item> 5928 <Item>localid</Item>
5929 <Item>System.UInt32</Item> 5929 <Item>System.UInt32</Item>
5930 <Item>0</Item> 5930 <Item>0</Item>
5931 </Issue> 5931 </Issue>
5932 </Message> 5932 </Message>
5933 </Messages> 5933 </Messages>
5934 </Member> 5934 </Member>
5935 <Member Name="addForces():System.Void"> 5935 <Member Name="addForces():System.Void">
5936 <Messages> 5936 <Messages>
5937 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5937 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5938 <Issue Name="Member"> 5938 <Issue Name="Member">
5939 <Item>addForces</Item> 5939 <Item>addForces</Item>
5940 </Issue> 5940 </Issue>
5941 </Message> 5941 </Message>
5942 </Messages> 5942 </Messages>
5943 </Member> 5943 </Member>
5944 <Member Name="BackUp():System.Void"> 5944 <Member Name="BackUp():System.Void">
5945 <Messages> 5945 <Messages>
5946 <Message Id="BackUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z"> 5946 <Message Id="BackUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
5947 <Issue Name="ShouldBeDiscreteTerm"> 5947 <Issue Name="ShouldBeDiscreteTerm">
5948 <Item>BackUp</Item> 5948 <Item>BackUp</Item>
5949 <Item>method</Item> 5949 <Item>method</Item>
5950 <Item>BackUp</Item> 5950 <Item>BackUp</Item>
5951 <Item>Backup</Item> 5951 <Item>Backup</Item>
5952 </Issue> 5952 </Issue>
5953 </Message> 5953 </Message>
5954 </Messages> 5954 </Messages>
5955 </Member> 5955 </Member>
5956 <Member Name="children"> 5956 <Member Name="children">
5957 <Messages> 5957 <Messages>
5958 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5958 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5959 <Issue> 5959 <Issue>
5960 <Item>children</Item> 5960 <Item>children</Item>
5961 </Issue> 5961 </Issue>
5962 </Message> 5962 </Message>
5963 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z"> 5963 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
5964 <Issue> 5964 <Issue>
5965 <Item>System.Collections.Generic.List`1&lt;OpenSim.world.Entity&gt;</Item> 5965 <Item>System.Collections.Generic.List`1&lt;OpenSim.world.Entity&gt;</Item>
5966 <Item>Entity.children</Item> 5966 <Item>Entity.children</Item>
5967 </Issue> 5967 </Issue>
5968 </Message> 5968 </Message>
5969 </Messages> 5969 </Messages>
5970 </Member> 5970 </Member>
5971 <Member Name="getMesh():OpenSim.types.Mesh"> 5971 <Member Name="getMesh():OpenSim.types.Mesh">
5972 <Messages> 5972 <Messages>
5973 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5973 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5974 <Issue Name="Member"> 5974 <Issue Name="Member">
5975 <Item>getMesh</Item> 5975 <Item>getMesh</Item>
5976 </Issue> 5976 </Issue>
5977 </Message> 5977 </Message>
5978 </Messages> 5978 </Messages>
5979 </Member> 5979 </Member>
5980 <Member Name="getName():System.String"> 5980 <Member Name="getName():System.String">
5981 <Messages> 5981 <Messages>
5982 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 5982 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5983 <Issue Name="Member"> 5983 <Issue Name="Member">
5984 <Item>getName</Item> 5984 <Item>getName</Item>
5985 </Issue> 5985 </Issue>
5986 </Message> 5986 </Message>
5987 </Messages> 5987 </Messages>
5988 </Member> 5988 </Member>
5989 <Member Name="localid"> 5989 <Member Name="localid">
5990 <Messages> 5990 <Messages>
5991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 5991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5992 <Issue> 5992 <Issue>
5993 <Item>localid</Item> 5993 <Item>localid</Item>
5994 </Issue> 5994 </Issue>
5995 </Message> 5995 </Message>
5996 <Message Id="localid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 5996 <Message Id="localid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5997 <Issue Name="Member"> 5997 <Issue Name="Member">
5998 <Item>localid</Item> 5998 <Item>localid</Item>
5999 <Item>Entity.localid</Item> 5999 <Item>Entity.localid</Item>
6000 </Issue> 6000 </Issue>
6001 </Message> 6001 </Message>
6002 </Messages> 6002 </Messages>
6003 </Member> 6003 </Member>
6004 <Member Name="name"> 6004 <Member Name="name">
6005 <Messages> 6005 <Messages>
6006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6007 <Issue> 6007 <Issue>
6008 <Item>name</Item> 6008 <Item>name</Item>
6009 </Issue> 6009 </Issue>
6010 </Message> 6010 </Message>
6011 </Messages> 6011 </Messages>
6012 </Member> 6012 </Member>
6013 <Member Name="position"> 6013 <Member Name="position">
6014 <Messages> 6014 <Messages>
6015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6016 <Issue> 6016 <Issue>
6017 <Item>position</Item> 6017 <Item>position</Item>
6018 </Issue> 6018 </Issue>
6019 </Message> 6019 </Message>
6020 </Messages> 6020 </Messages>
6021 </Member> 6021 </Member>
6022 <Member Name="rotation"> 6022 <Member Name="rotation">
6023 <Messages> 6023 <Messages>
6024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6025 <Issue> 6025 <Issue>
6026 <Item>rotation</Item> 6026 <Item>rotation</Item>
6027 </Issue> 6027 </Issue>
6028 </Message> 6028 </Message>
6029 </Messages> 6029 </Messages>
6030 </Member> 6030 </Member>
6031 <Member Name="update():System.Void"> 6031 <Member Name="update():System.Void">
6032 <Messages> 6032 <Messages>
6033 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6033 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6034 <Issue Name="Member"> 6034 <Issue Name="Member">
6035 <Item>update</Item> 6035 <Item>update</Item>
6036 </Issue> 6036 </Issue>
6037 </Message> 6037 </Message>
6038 </Messages> 6038 </Messages>
6039 </Member> 6039 </Member>
6040 <Member Name="uuid"> 6040 <Member Name="uuid">
6041 <Messages> 6041 <Messages>
6042 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6042 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6043 <Issue> 6043 <Issue>
6044 <Item>uuid</Item> 6044 <Item>uuid</Item>
6045 </Issue> 6045 </Issue>
6046 </Message> 6046 </Message>
6047 <Message Id="uuid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6047 <Message Id="uuid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6048 <Issue Name="Member"> 6048 <Issue Name="Member">
6049 <Item>uuid</Item> 6049 <Item>uuid</Item>
6050 <Item>Entity.uuid</Item> 6050 <Item>Entity.uuid</Item>
6051 </Issue> 6051 </Issue>
6052 </Message> 6052 </Message>
6053 </Messages> 6053 </Messages>
6054 </Member> 6054 </Member>
6055 <Member Name="velocity"> 6055 <Member Name="velocity">
6056 <Messages> 6056 <Messages>
6057 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6057 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6058 <Issue> 6058 <Issue>
6059 <Item>velocity</Item> 6059 <Item>velocity</Item>
6060 </Issue> 6060 </Issue>
6061 </Message> 6061 </Message>
6062 </Messages> 6062 </Messages>
6063 </Member> 6063 </Member>
6064 </Members> 6064 </Members>
6065 </Type> 6065 </Type>
6066 <Type Name="NewForce"> 6066 <Type Name="NewForce">
6067 <Members> 6067 <Members>
6068 <Member Name="X"> 6068 <Member Name="X">
6069 <Messages> 6069 <Messages>
6070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6071 <Issue> 6071 <Issue>
6072 <Item>X</Item> 6072 <Item>X</Item>
6073 </Issue> 6073 </Issue>
6074 </Message> 6074 </Message>
6075 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6075 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6076 <Issue Name="MemberOneLetter"> 6076 <Issue Name="MemberOneLetter">
6077 <Item>X</Item> 6077 <Item>X</Item>
6078 <Item>NewForce.X</Item> 6078 <Item>NewForce.X</Item>
6079 </Issue> 6079 </Issue>
6080 </Message> 6080 </Message>
6081 </Messages> 6081 </Messages>
6082 </Member> 6082 </Member>
6083 <Member Name="Y"> 6083 <Member Name="Y">
6084 <Messages> 6084 <Messages>
6085 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6085 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6086 <Issue> 6086 <Issue>
6087 <Item>Y</Item> 6087 <Item>Y</Item>
6088 </Issue> 6088 </Issue>
6089 </Message> 6089 </Message>
6090 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6090 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6091 <Issue Name="MemberOneLetter"> 6091 <Issue Name="MemberOneLetter">
6092 <Item>Y</Item> 6092 <Item>Y</Item>
6093 <Item>NewForce.Y</Item> 6093 <Item>NewForce.Y</Item>
6094 </Issue> 6094 </Issue>
6095 </Message> 6095 </Message>
6096 </Messages> 6096 </Messages>
6097 </Member> 6097 </Member>
6098 <Member Name="Z"> 6098 <Member Name="Z">
6099 <Messages> 6099 <Messages>
6100 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6100 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6101 <Issue> 6101 <Issue>
6102 <Item>Z</Item> 6102 <Item>Z</Item>
6103 </Issue> 6103 </Issue>
6104 </Message> 6104 </Message>
6105 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6105 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6106 <Issue Name="MemberOneLetter"> 6106 <Issue Name="MemberOneLetter">
6107 <Item>Z</Item> 6107 <Item>Z</Item>
6108 <Item>NewForce.Z</Item> 6108 <Item>NewForce.Z</Item>
6109 </Issue> 6109 </Issue>
6110 </Message> 6110 </Message>
6111 </Messages> 6111 </Messages>
6112 </Member> 6112 </Member>
6113 </Members> 6113 </Members>
6114 </Type> 6114 </Type>
6115 <Type Name="Primitive"> 6115 <Type Name="Primitive">
6116 <Messages> 6116 <Messages>
6117 <Message TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708" Created="2007-03-27 04:29:04Z"> 6117 <Message TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708" Created="2007-03-27 04:29:04Z">
6118 <Issue Name="Member"> 6118 <Issue Name="Member">
6119 <Item>'UpdateFlag'</Item> 6119 <Item>'UpdateFlag'</Item>
6120 <Item>updateFlag</Item> 6120 <Item>updateFlag</Item>
6121 </Issue> 6121 </Issue>
6122 </Message> 6122 </Message>
6123 </Messages> 6123 </Messages>
6124 <Members> 6124 <Members>
6125 <Member Name=".ctor()"> 6125 <Member Name=".ctor()">
6126 <Messages> 6126 <Messages>
6127 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 6127 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
6128 <Issue> 6128 <Issue>
6129 <Item>Primitive.Primitive()</Item> 6129 <Item>Primitive.Primitive()</Item>
6130 <Item>dirtyFlag</Item> 6130 <Item>dirtyFlag</Item>
6131 <Item>System.Boolean</Item> 6131 <Item>System.Boolean</Item>
6132 <Item>false</Item> 6132 <Item>false</Item>
6133 </Issue> 6133 </Issue>
6134 <Issue> 6134 <Issue>
6135 <Item>Primitive.Primitive()</Item> 6135 <Item>Primitive.Primitive()</Item>
6136 <Item>mesh_cutbegin</Item> 6136 <Item>mesh_cutbegin</Item>
6137 <Item>System.Single</Item> 6137 <Item>System.Single</Item>
6138 <Item>0.0</Item> 6138 <Item>0.0</Item>
6139 </Issue> 6139 </Issue>
6140 <Issue> 6140 <Issue>
6141 <Item>Primitive.Primitive()</Item> 6141 <Item>Primitive.Primitive()</Item>
6142 <Item>newPrimFlag</Item> 6142 <Item>newPrimFlag</Item>
6143 <Item>System.Boolean</Item> 6143 <Item>System.Boolean</Item>
6144 <Item>false</Item> 6144 <Item>false</Item>
6145 </Issue> 6145 </Issue>
6146 <Issue> 6146 <Issue>
6147 <Item>Primitive.Primitive()</Item> 6147 <Item>Primitive.Primitive()</Item>
6148 <Item>physicsEnabled</Item> 6148 <Item>physicsEnabled</Item>
6149 <Item>System.Boolean</Item> 6149 <Item>System.Boolean</Item>
6150 <Item>false</Item> 6150 <Item>false</Item>
6151 </Issue> 6151 </Issue>
6152 <Issue> 6152 <Issue>
6153 <Item>Primitive.Primitive()</Item> 6153 <Item>Primitive.Primitive()</Item>
6154 <Item>physicstest</Item> 6154 <Item>physicstest</Item>
6155 <Item>System.Boolean</Item> 6155 <Item>System.Boolean</Item>
6156 <Item>false</Item> 6156 <Item>false</Item>
6157 </Issue> 6157 </Issue>
6158 <Issue> 6158 <Issue>
6159 <Item>Primitive.Primitive()</Item> 6159 <Item>Primitive.Primitive()</Item>
6160 <Item>updateFlag</Item> 6160 <Item>updateFlag</Item>
6161 <Item>System.Boolean</Item> 6161 <Item>System.Boolean</Item>
6162 <Item>false</Item> 6162 <Item>false</Item>
6163 </Issue> 6163 </Issue>
6164 </Message> 6164 </Message>
6165 </Messages> 6165 </Messages>
6166 </Member> 6166 </Member>
6167 <Member Name="CreateFromPacket(libsecondlife.Packets.ObjectAddPacket,libsecondlife.LLUUID,System.UInt32):System.Void"> 6167 <Member Name="CreateFromPacket(libsecondlife.Packets.ObjectAddPacket,libsecondlife.LLUUID,System.UInt32):System.Void">
6168 <Messages> 6168 <Messages>
6169 <Message Id="localID-702000" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-03-27 04:29:04Z"> 6169 <Message Id="localID-702000" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-03-27 04:29:04Z">
6170 <Issue> 6170 <Issue>
6171 <Item>localID-702000</Item> 6171 <Item>localID-702000</Item>
6172 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item> 6172 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6173 </Issue> 6173 </Issue>
6174 </Message> 6174 </Message>
6175 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 6175 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6176 <Issue Name="ParameterId"> 6176 <Issue Name="ParameterId">
6177 <Item>ID</Item> 6177 <Item>ID</Item>
6178 <Item>agentID</Item> 6178 <Item>agentID</Item>
6179 <Item>Id</Item> 6179 <Item>Id</Item>
6180 </Issue> 6180 </Issue>
6181 </Message> 6181 </Message>
6182 <Message Id="2#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 6182 <Message Id="2#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6183 <Issue Name="ParameterId"> 6183 <Issue Name="ParameterId">
6184 <Item>ID</Item> 6184 <Item>ID</Item>
6185 <Item>localID</Item> 6185 <Item>localID</Item>
6186 <Item>Id</Item> 6186 <Item>Id</Item>
6187 </Issue> 6187 </Issue>
6188 </Message> 6188 </Message>
6189 <Message Id="System.UInt32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z"> 6189 <Message Id="System.UInt32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
6190 <Issue> 6190 <Issue>
6191 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item> 6191 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6192 <Item>System.UInt32.ToString(System.String)</Item> 6192 <Item>System.UInt32.ToString(System.String)</Item>
6193 <Item>System.UInt32.ToString(System.String,System.IFormatProvider)</Item> 6193 <Item>System.UInt32.ToString(System.String,System.IFormatProvider)</Item>
6194 </Issue> 6194 </Issue>
6195 </Message> 6195 </Message>
6196 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6196 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6197 <Issue> 6197 <Issue>
6198 <Item>'addPacket'</Item> 6198 <Item>'addPacket'</Item>
6199 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item> 6199 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6200 </Issue> 6200 </Issue>
6201 </Message> 6201 </Message>
6202 </Messages> 6202 </Messages>
6203 </Member> 6203 </Member>
6204 <Member Name="CreateFromStorage(OpenSim.Framework.Assets.PrimData):System.Void"> 6204 <Member Name="CreateFromStorage(OpenSim.Framework.Assets.PrimData):System.Void">
6205 <Messages> 6205 <Messages>
6206 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6206 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6207 <Issue> 6207 <Issue>
6208 <Item>'store'</Item> 6208 <Item>'store'</Item>
6209 <Item>Primitive.CreateFromStorage(PrimData):Void</Item> 6209 <Item>Primitive.CreateFromStorage(PrimData):Void</Item>
6210 </Issue> 6210 </Issue>
6211 </Message> 6211 </Message>
6212 </Messages> 6212 </Messages>
6213 </Member> 6213 </Member>
6214 <Member Name="dirtyFlag"> 6214 <Member Name="dirtyFlag">
6215 <Messages> 6215 <Messages>
6216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6217 <Issue> 6217 <Issue>
6218 <Item>dirtyFlag</Item> 6218 <Item>dirtyFlag</Item>
6219 </Issue> 6219 </Issue>
6220 </Message> 6220 </Message>
6221 </Messages> 6221 </Messages>
6222 </Member> 6222 </Member>
6223 <Member Name="mesh_cutbegin"> 6223 <Member Name="mesh_cutbegin">
6224 <Messages> 6224 <Messages>
6225 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6225 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6226 <Issue> 6226 <Issue>
6227 <Item>mesh_cutbegin</Item> 6227 <Item>mesh_cutbegin</Item>
6228 </Issue> 6228 </Issue>
6229 </Message> 6229 </Message>
6230 <Message Id="cutbegin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6230 <Message Id="cutbegin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6231 <Issue Name="Member"> 6231 <Issue Name="Member">
6232 <Item>cutbegin</Item> 6232 <Item>cutbegin</Item>
6233 <Item>Primitive.mesh_cutbegin</Item> 6233 <Item>Primitive.mesh_cutbegin</Item>
6234 </Issue> 6234 </Issue>
6235 </Message> 6235 </Message>
6236 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 6236 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6237 <Issue Name="Member"> 6237 <Issue Name="Member">
6238 <Item>mesh_cutbegin</Item> 6238 <Item>mesh_cutbegin</Item>
6239 </Issue> 6239 </Issue>
6240 </Message> 6240 </Message>
6241 </Messages> 6241 </Messages>
6242 </Member> 6242 </Member>
6243 <Member Name="mesh_cutend"> 6243 <Member Name="mesh_cutend">
6244 <Messages> 6244 <Messages>
6245 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6245 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6246 <Issue> 6246 <Issue>
6247 <Item>mesh_cutend</Item> 6247 <Item>mesh_cutend</Item>
6248 </Issue> 6248 </Issue>
6249 </Message> 6249 </Message>
6250 <Message Id="cutend" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6250 <Message Id="cutend" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6251 <Issue Name="Member"> 6251 <Issue Name="Member">
6252 <Item>cutend</Item> 6252 <Item>cutend</Item>
6253 <Item>Primitive.mesh_cutend</Item> 6253 <Item>Primitive.mesh_cutend</Item>
6254 </Issue> 6254 </Issue>
6255 </Message> 6255 </Message>
6256 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 6256 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6257 <Issue Name="Member"> 6257 <Issue Name="Member">
6258 <Item>mesh_cutend</Item> 6258 <Item>mesh_cutend</Item>
6259 </Issue> 6259 </Issue>
6260 </Message> 6260 </Message>
6261 </Messages> 6261 </Messages>
6262 </Member> 6262 </Member>
6263 <Member Name="newPrimFlag"> 6263 <Member Name="newPrimFlag">
6264 <Messages> 6264 <Messages>
6265 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6265 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6266 <Issue> 6266 <Issue>
6267 <Item>newPrimFlag</Item> 6267 <Item>newPrimFlag</Item>
6268 </Issue> 6268 </Issue>
6269 </Message> 6269 </Message>
6270 </Messages> 6270 </Messages>
6271 </Member> 6271 </Member>
6272 <Member Name="PhysActor"> 6272 <Member Name="PhysActor">
6273 <Messages> 6273 <Messages>
6274 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z"> 6274 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z">
6275 <Issue> 6275 <Issue>
6276 <Item>PhysActor</Item> 6276 <Item>PhysActor</Item>
6277 </Issue> 6277 </Issue>
6278 </Message> 6278 </Message>
6279 </Messages> 6279 </Messages>
6280 </Member> 6280 </Member>
6281 <Member Name="primData"> 6281 <Member Name="primData">
6282 <Messages> 6282 <Messages>
6283 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6283 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6284 <Issue> 6284 <Issue>
6285 <Item>primData</Item> 6285 <Item>primData</Item>
6286 </Issue> 6286 </Issue>
6287 </Message> 6287 </Message>
6288 </Messages> 6288 </Messages>
6289 </Member> 6289 </Member>
6290 <Member Name="UpdateClient(OpenSim.SimClient):System.Void"> 6290 <Member Name="UpdateClient(OpenSim.SimClient):System.Void">
6291 <Messages> 6291 <Messages>
6292 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6292 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6293 <Issue Name="Parameter"> 6293 <Issue Name="Parameter">
6294 <Item>RemoteClient</Item> 6294 <Item>RemoteClient</Item>
6295 </Issue> 6295 </Issue>
6296 </Message> 6296 </Message>
6297 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6297 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6298 <Issue> 6298 <Issue>
6299 <Item>'RemoteClient'</Item> 6299 <Item>'RemoteClient'</Item>
6300 <Item>Primitive.UpdateClient(SimClient):Void</Item> 6300 <Item>Primitive.UpdateClient(SimClient):Void</Item>
6301 </Issue> 6301 </Issue>
6302 </Message> 6302 </Message>
6303 </Messages> 6303 </Messages>
6304 </Member> 6304 </Member>
6305 <Member Name="updateFlag"> 6305 <Member Name="updateFlag">
6306 <Messages> 6306 <Messages>
6307 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6307 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6308 <Issue> 6308 <Issue>
6309 <Item>updateFlag</Item> 6309 <Item>updateFlag</Item>
6310 </Issue> 6310 </Issue>
6311 </Message> 6311 </Message>
6312 </Messages> 6312 </Messages>
6313 </Member> 6313 </Member>
6314 <Member Name="UpdateObjectFlags(libsecondlife.Packets.ObjectFlagUpdatePacket):System.Void"> 6314 <Member Name="UpdateObjectFlags(libsecondlife.Packets.ObjectFlagUpdatePacket):System.Void">
6315 <Messages> 6315 <Messages>
6316 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6316 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6317 <Issue> 6317 <Issue>
6318 <Item>'pack'</Item> 6318 <Item>'pack'</Item>
6319 <Item>Primitive.UpdateObjectFlags(ObjectFlagUpdatePacket):Void</Item> 6319 <Item>Primitive.UpdateObjectFlags(ObjectFlagUpdatePacket):Void</Item>
6320 </Issue> 6320 </Issue>
6321 </Message> 6321 </Message>
6322 </Messages> 6322 </Messages>
6323 </Member> 6323 </Member>
6324 <Member Name="UpdateShape(libsecondlife.Packets.ObjectShapePacket+ObjectDataBlock):System.Void"> 6324 <Member Name="UpdateShape(libsecondlife.Packets.ObjectShapePacket+ObjectDataBlock):System.Void">
6325 <Messages> 6325 <Messages>
6326 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6326 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6327 <Issue> 6327 <Issue>
6328 <Item>'addPacket'</Item> 6328 <Item>'addPacket'</Item>
6329 <Item>Primitive.UpdateShape(ObjectDataBlock):Void</Item> 6329 <Item>Primitive.UpdateShape(ObjectDataBlock):Void</Item>
6330 </Issue> 6330 </Issue>
6331 </Message> 6331 </Message>
6332 </Messages> 6332 </Messages>
6333 </Member> 6333 </Member>
6334 </Members> 6334 </Members>
6335 </Type> 6335 </Type>
6336 <Type Name="ScriptEngine"> 6336 <Type Name="ScriptEngine">
6337 <Members> 6337 <Members>
6338 <Member Name=".ctor(OpenSim.world.World)"> 6338 <Member Name=".ctor(OpenSim.world.World)">
6339 <Messages> 6339 <Messages>
6340 <Message Id="0#env" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6340 <Message Id="0#env" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6341 <Issue Name="Parameter"> 6341 <Issue Name="Parameter">
6342 <Item>ScriptEngine.ScriptEngine(World)</Item> 6342 <Item>ScriptEngine.ScriptEngine(World)</Item>
6343 <Item>env</Item> 6343 <Item>env</Item>
6344 <Item>env</Item> 6344 <Item>env</Item>
6345 </Issue> 6345 </Issue>
6346 </Message> 6346 </Message>
6347 <Message Id="env" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 6347 <Message Id="env" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6348 <Issue> 6348 <Issue>
6349 <Item>env</Item> 6349 <Item>env</Item>
6350 <Item>ScriptEngine.ScriptEngine(World)</Item> 6350 <Item>ScriptEngine.ScriptEngine(World)</Item>
6351 </Issue> 6351 </Issue>
6352 </Message> 6352 </Message>
6353 </Messages> 6353 </Messages>
6354 </Member> 6354 </Member>
6355 <Member Name="LoadScript():System.Void"> 6355 <Member Name="LoadScript():System.Void">
6356 <Messages> 6356 <Messages>
6357 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 6357 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6358 <Issue> 6358 <Issue>
6359 <Item>ScriptEngine.LoadScript():Void</Item> 6359 <Item>ScriptEngine.LoadScript():Void</Item>
6360 </Issue> 6360 </Issue>
6361 </Message> 6361 </Message>
6362 </Messages> 6362 </Messages>
6363 </Member> 6363 </Member>
6364 </Members> 6364 </Members>
6365 </Type> 6365 </Type>
6366 <Type Name="SurfacePatch"> 6366 <Type Name="SurfacePatch">
6367 <Members> 6367 <Members>
6368 <Member Name="HeightMap"> 6368 <Member Name="HeightMap">
6369 <Messages> 6369 <Messages>
6370 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6370 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6371 <Issue> 6371 <Issue>
6372 <Item>HeightMap</Item> 6372 <Item>HeightMap</Item>
6373 </Issue> 6373 </Issue>
6374 </Message> 6374 </Message>
6375 </Messages> 6375 </Messages>
6376 </Member> 6376 </Member>
6377 </Members> 6377 </Members>
6378 </Type> 6378 </Type>
6379 <Type Name="World"> 6379 <Type Name="World">
6380 <Messages> 6380 <Messages>
6381 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 6381 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6382 <Issue> 6382 <Issue>
6383 <Item>World</Item> 6383 <Item>World</Item>
6384 <Item>OpenSim.world</Item> 6384 <Item>OpenSim.world</Item>
6385 </Issue> 6385 </Issue>
6386 </Message> 6386 </Message>
6387 </Messages> 6387 </Messages>
6388 <Members> 6388 <Members>
6389 <Member Name=".ctor()"> 6389 <Member Name=".ctor()">
6390 <Messages> 6390 <Messages>
6391 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z"> 6391 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
6392 <Issue> 6392 <Issue>
6393 <Item>World.World()</Item> 6393 <Item>World.World()</Item>
6394 <Item>_localNumber</Item> 6394 <Item>_localNumber</Item>
6395 <Item>System.UInt32</Item> 6395 <Item>System.UInt32</Item>
6396 <Item>0</Item> 6396 <Item>0</Item>
6397 </Issue> 6397 </Issue>
6398 </Message> 6398 </Message>
6399 </Messages> 6399 </Messages>
6400 </Member> 6400 </Member>
6401 <Member Name="_localNumber"> 6401 <Member Name="_localNumber">
6402 <Messages> 6402 <Messages>
6403 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6403 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6404 <Issue> 6404 <Issue>
6405 <Item>_localNumber</Item> 6405 <Item>_localNumber</Item>
6406 </Issue> 6406 </Issue>
6407 </Message> 6407 </Message>
6408 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z"> 6408 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6409 <Issue Name="Member"> 6409 <Issue Name="Member">
6410 <Item>_localNumber</Item> 6410 <Item>_localNumber</Item>
6411 </Issue> 6411 </Issue>
6412 </Message> 6412 </Message>
6413 </Messages> 6413 </Messages>
6414 </Member> 6414 </Member>
6415 <Member Name="AddNewPrim(libsecondlife.Packets.ObjectAddPacket,OpenSim.SimClient):System.Void"> 6415 <Member Name="AddNewPrim(libsecondlife.Packets.ObjectAddPacket,OpenSim.SimClient):System.Void">
6416 <Messages> 6416 <Messages>
6417 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6417 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6418 <Issue Name="Parameter"> 6418 <Issue Name="Parameter">
6419 <Item>AgentClient</Item> 6419 <Item>AgentClient</Item>
6420 </Issue> 6420 </Issue>
6421 </Message> 6421 </Message>
6422 </Messages> 6422 </Messages>
6423 </Member> 6423 </Member>
6424 <Member Name="AddViewerAgent(OpenSim.SimClient):System.Void"> 6424 <Member Name="AddViewerAgent(OpenSim.SimClient):System.Void">
6425 <Messages> 6425 <Messages>
6426 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6426 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6427 <Issue Name="Parameter"> 6427 <Issue Name="Parameter">
6428 <Item>AgentClient</Item> 6428 <Item>AgentClient</Item>
6429 </Issue> 6429 </Issue>
6430 </Message> 6430 </Message>
6431 </Messages> 6431 </Messages>
6432 </Member> 6432 </Member>
6433 <Member Name="DeRezObject(libsecondlife.Packets.DeRezObjectPacket,OpenSim.SimClient):System.Void"> 6433 <Member Name="DeRezObject(libsecondlife.Packets.DeRezObjectPacket,OpenSim.SimClient):System.Void">
6434 <Messages> 6434 <Messages>
6435 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6435 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6436 <Issue Name="Parameter"> 6436 <Issue Name="Parameter">
6437 <Item>DeRezPacket</Item> 6437 <Item>DeRezPacket</Item>
6438 </Issue> 6438 </Issue>
6439 </Message> 6439 </Message>
6440 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6440 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6441 <Issue Name="Parameter"> 6441 <Issue Name="Parameter">
6442 <Item>AgentClient</Item> 6442 <Item>AgentClient</Item>
6443 </Issue> 6443 </Issue>
6444 </Message> 6444 </Message>
6445 <Message Id="0#Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6445 <Message Id="0#Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6446 <Issue Name="Parameter"> 6446 <Issue Name="Parameter">
6447 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item> 6447 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6448 <Item>Rez</Item> 6448 <Item>Rez</Item>
6449 <Item>DeRezPacket</Item> 6449 <Item>DeRezPacket</Item>
6450 </Issue> 6450 </Issue>
6451 </Message> 6451 </Message>
6452 <Message Id="Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6452 <Message Id="Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6453 <Issue Name="Member"> 6453 <Issue Name="Member">
6454 <Item>Rez</Item> 6454 <Item>Rez</Item>
6455 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item> 6455 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6456 </Issue> 6456 </Issue>
6457 </Message> 6457 </Message>
6458 <Message Id="AgentClient" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 6458 <Message Id="AgentClient" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6459 <Issue> 6459 <Issue>
6460 <Item>AgentClient</Item> 6460 <Item>AgentClient</Item>
6461 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item> 6461 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6462 </Issue> 6462 </Issue>
6463 </Message> 6463 </Message>
6464 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z"> 6464 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6465 <Issue Name="Member"> 6465 <Issue Name="Member">
6466 <Item>De</Item> 6466 <Item>De</Item>
6467 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item> 6467 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6468 </Issue> 6468 </Issue>
6469 </Message> 6469 </Message>
6470 </Messages> 6470 </Messages>
6471 </Member> 6471 </Member>
6472 <Member Name="Entities"> 6472 <Member Name="Entities">
6473 <Messages> 6473 <Messages>
6474 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6474 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6475 <Issue> 6475 <Issue>
6476 <Item>Entities</Item> 6476 <Item>Entities</Item>
6477 </Issue> 6477 </Issue>
6478 </Message> 6478 </Message>
6479 </Messages> 6479 </Messages>
6480 </Member> 6480 </Member>
6481 <Member Name="GetInitialPrims(OpenSim.SimClient):System.Void"> 6481 <Member Name="GetInitialPrims(OpenSim.SimClient):System.Void">
6482 <Messages> 6482 <Messages>
6483 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6483 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6484 <Issue Name="Parameter"> 6484 <Issue Name="Parameter">
6485 <Item>RemoteClient</Item> 6485 <Item>RemoteClient</Item>
6486 </Issue> 6486 </Issue>
6487 </Message> 6487 </Message>
6488 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6488 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6489 <Issue Name="Member"> 6489 <Issue Name="Member">
6490 <Item>Prims</Item> 6490 <Item>Prims</Item>
6491 <Item>World.GetInitialPrims(SimClient):Void</Item> 6491 <Item>World.GetInitialPrims(SimClient):Void</Item>
6492 </Issue> 6492 </Issue>
6493 </Message> 6493 </Message>
6494 </Messages> 6494 </Messages>
6495 </Member> 6495 </Member>
6496 <Member Name="LandMap"> 6496 <Member Name="LandMap">
6497 <Messages> 6497 <Messages>
6498 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6498 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6499 <Issue> 6499 <Issue>
6500 <Item>LandMap</Item> 6500 <Item>LandMap</Item>
6501 </Issue> 6501 </Issue>
6502 </Message> 6502 </Message>
6503 </Messages> 6503 </Messages>
6504 </Member> 6504 </Member>
6505 <Member Name="LoadPrimsFromStorage():System.Void"> 6505 <Member Name="LoadPrimsFromStorage():System.Void">
6506 <Messages> 6506 <Messages>
6507 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6507 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6508 <Issue Name="Member"> 6508 <Issue Name="Member">
6509 <Item>Prims</Item> 6509 <Item>Prims</Item>
6510 <Item>World.LoadPrimsFromStorage():Void</Item> 6510 <Item>World.LoadPrimsFromStorage():Void</Item>
6511 </Issue> 6511 </Issue>
6512 </Message> 6512 </Message>
6513 </Messages> 6513 </Messages>
6514 </Member> 6514 </Member>
6515 <Member Name="LoadStorageDLL(System.String):System.Boolean"> 6515 <Member Name="LoadStorageDLL(System.String):System.Boolean">
6516 <Messages> 6516 <Messages>
6517 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 6517 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
6518 <Issue Name="Member"> 6518 <Issue Name="Member">
6519 <Item>World.LoadStorageDLL(String):Boolean</Item> 6519 <Item>World.LoadStorageDLL(String):Boolean</Item>
6520 </Issue> 6520 </Issue>
6521 </Message> 6521 </Message>
6522 </Messages> 6522 </Messages>
6523 </Member> 6523 </Member>
6524 <Member Name="localStorage"> 6524 <Member Name="localStorage">
6525 <Messages> 6525 <Messages>
6526 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6526 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6527 <Issue> 6527 <Issue>
6528 <Item>localStorage</Item> 6528 <Item>localStorage</Item>
6529 </Issue> 6529 </Issue>
6530 </Message> 6530 </Message>
6531 </Messages> 6531 </Messages>
6532 </Member> 6532 </Member>
6533 <Member Name="Rand"> 6533 <Member Name="Rand">
6534 <Messages> 6534 <Messages>
6535 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6535 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6536 <Issue> 6536 <Issue>
6537 <Item>World.Rand</Item> 6537 <Item>World.Rand</Item>
6538 </Issue> 6538 </Issue>
6539 </Message> 6539 </Message>
6540 </Messages> 6540 </Messages>
6541 </Member> 6541 </Member>
6542 <Member Name="Scripts"> 6542 <Member Name="Scripts">
6543 <Messages> 6543 <Messages>
6544 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z"> 6544 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6545 <Issue> 6545 <Issue>
6546 <Item>Scripts</Item> 6546 <Item>Scripts</Item>
6547 </Issue> 6547 </Issue>
6548 </Message> 6548 </Message>
6549 </Messages> 6549 </Messages>
6550 </Member> 6550 </Member>
6551 <Member Name="SendLayerData(OpenSim.SimClient):System.Void"> 6551 <Member Name="SendLayerData(OpenSim.SimClient):System.Void">
6552 <Messages> 6552 <Messages>
6553 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z"> 6553 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6554 <Issue Name="Parameter"> 6554 <Issue Name="Parameter">
6555 <Item>RemoteClient</Item> 6555 <Item>RemoteClient</Item>
6556 </Issue> 6556 </Issue>
6557 </Message> 6557 </Message>
6558 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6558 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6559 <Issue> 6559 <Issue>
6560 <Item>'RemoteClient'</Item> 6560 <Item>'RemoteClient'</Item>
6561 <Item>World.SendLayerData(SimClient):Void</Item> 6561 <Item>World.SendLayerData(SimClient):Void</Item>
6562 </Issue> 6562 </Issue>
6563 <Issue> 6563 <Issue>
6564 <Item>'RemoteClient'</Item> 6564 <Item>'RemoteClient'</Item>
6565 <Item>World.SendLayerData(SimClient):Void</Item> 6565 <Item>World.SendLayerData(SimClient):Void</Item>
6566 </Issue> 6566 </Issue>
6567 <Issue> 6567 <Issue>
6568 <Item>'RemoteClient'</Item> 6568 <Item>'RemoteClient'</Item>
6569 <Item>World.SendLayerData(SimClient):Void</Item> 6569 <Item>World.SendLayerData(SimClient):Void</Item>
6570 </Issue> 6570 </Issue>
6571 </Message> 6571 </Message>
6572 </Messages> 6572 </Messages>
6573 </Member> 6573 </Member>
6574 </Members> 6574 </Members>
6575 </Type> 6575 </Type>
6576 </Types> 6576 </Types>
6577 </Namespace> 6577 </Namespace>
6578 <Namespace Name="OpenSim.world.scripting"> 6578 <Namespace Name="OpenSim.world.scripting">
6579 <Types> 6579 <Types>
6580 <Type Name="IScriptHost"> 6580 <Type Name="IScriptHost">
6581 <Members> 6581 <Members>
6582 <Member Name="Register(OpenSim.world.scripting.IScript):System.Boolean"> 6582 <Member Name="Register(OpenSim.world.scripting.IScript):System.Boolean">
6583 <Messages> 6583 <Messages>
6584 <Message Id="0#iscript" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6584 <Message Id="0#iscript" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6585 <Issue Name="Parameter"> 6585 <Issue Name="Parameter">
6586 <Item>IScriptHost.Register(IScript):Boolean</Item> 6586 <Item>IScriptHost.Register(IScript):Boolean</Item>
6587 <Item>iscript</Item> 6587 <Item>iscript</Item>
6588 <Item>iscript</Item> 6588 <Item>iscript</Item>
6589 </Issue> 6589 </Issue>
6590 </Message> 6590 </Message>
6591 </Messages> 6591 </Messages>
6592 </Member> 6592 </Member>
6593 </Members> 6593 </Members>
6594 </Type> 6594 </Type>
6595 </Types> 6595 </Types>
6596 </Namespace> 6596 </Namespace>
6597 </Namespaces> 6597 </Namespaces>
6598 </Module> 6598 </Module>
6599 </Modules> 6599 </Modules>
6600 </Target> 6600 </Target>
6601 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll"> 6601 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll">
6602 <Modules> 6602 <Modules>
6603 <Module Name="opensim.storage.localstoragedb4o.dll"> 6603 <Module Name="opensim.storage.localstoragedb4o.dll">
6604 <Messages> 6604 <Messages>
6605 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 6605 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6606 <Issue> 6606 <Issue>
6607 <Item>OpenSim.Storage.LocalStorageDb4o</Item> 6607 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6608 </Issue> 6608 </Issue>
6609 </Message> 6609 </Message>
6610 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 6610 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6611 <Issue Name="NoStrongName"> 6611 <Issue Name="NoStrongName">
6612 <Item>OpenSim.Storage.LocalStorageDb4o</Item> 6612 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6613 </Issue> 6613 </Issue>
6614 </Message> 6614 </Message>
6615 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 6615 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6616 <Issue Name="NoAttr"> 6616 <Issue Name="NoAttr">
6617 <Item>OpenSim.Storage.LocalStorageDb4o</Item> 6617 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6618 </Issue> 6618 </Issue>
6619 </Message> 6619 </Message>
6620 </Messages> 6620 </Messages>
6621 <Namespaces> 6621 <Namespaces>
6622 <Namespace Name="OpenSim.Storage.LocalStorageDb4o"> 6622 <Namespace Name="OpenSim.Storage.LocalStorageDb4o">
6623 <Types> 6623 <Types>
6624 <Type Name="Db4LocalStorage"> 6624 <Type Name="Db4LocalStorage">
6625 <Members> 6625 <Members>
6626 <Member Name=".ctor()"> 6626 <Member Name=".ctor()">
6627 <Messages> 6627 <Messages>
6628 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z"> 6628 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
6629 <Issue> 6629 <Issue>
6630 <Item>Db4LocalStorage.Db4LocalStorage()</Item> 6630 <Item>Db4LocalStorage.Db4LocalStorage()</Item>
6631 <Item>System.Exception</Item> 6631 <Item>System.Exception</Item>
6632 </Issue> 6632 </Issue>
6633 </Message> 6633 </Message>
6634 </Messages> 6634 </Messages>
6635 </Member> 6635 </Member>
6636 <Member Name="LoadPrimitives(OpenSim.Framework.Interfaces.ILocalStorageReceiver):System.Void"> 6636 <Member Name="LoadPrimitives(OpenSim.Framework.Interfaces.ILocalStorageReceiver):System.Void">
6637 <Messages> 6637 <Messages>
6638 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6638 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6639 <Issue> 6639 <Issue>
6640 <Item>'receiver'</Item> 6640 <Item>'receiver'</Item>
6641 <Item>Db4LocalStorage.LoadPrimitives(ILocalStorageReceiver):Void</Item> 6641 <Item>Db4LocalStorage.LoadPrimitives(ILocalStorageReceiver):Void</Item>
6642 </Issue> 6642 </Issue>
6643 </Message> 6643 </Message>
6644 </Messages> 6644 </Messages>
6645 </Member> 6645 </Member>
6646 <Member Name="StorePrim(OpenSim.Framework.Assets.PrimData):System.Void"> 6646 <Member Name="StorePrim(OpenSim.Framework.Assets.PrimData):System.Void">
6647 <Messages> 6647 <Messages>
6648 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6648 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6649 <Issue> 6649 <Issue>
6650 <Item>'prim'</Item> 6650 <Item>'prim'</Item>
6651 <Item>Db4LocalStorage.StorePrim(PrimData):Void</Item> 6651 <Item>Db4LocalStorage.StorePrim(PrimData):Void</Item>
6652 </Issue> 6652 </Issue>
6653 </Message> 6653 </Message>
6654 </Messages> 6654 </Messages>
6655 </Member> 6655 </Member>
6656 </Members> 6656 </Members>
6657 </Type> 6657 </Type>
6658 <Type Name="UUIDQuery"> 6658 <Type Name="UUIDQuery">
6659 <Messages> 6659 <Messages>
6660 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z"> 6660 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
6661 <Issue Name="Type"> 6661 <Issue Name="Type">
6662 <Item>UUIDQuery</Item> 6662 <Item>UUIDQuery</Item>
6663 </Issue> 6663 </Issue>
6664 </Message> 6664 </Message>
6665 </Messages> 6665 </Messages>
6666 <Members> 6666 <Members>
6667 <Member Name="Match(OpenSim.Framework.Assets.PrimData):System.Boolean"> 6667 <Member Name="Match(OpenSim.Framework.Assets.PrimData):System.Boolean">
6668 <Messages> 6668 <Messages>
6669 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6669 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6670 <Issue> 6670 <Issue>
6671 <Item>'prim'</Item> 6671 <Item>'prim'</Item>
6672 <Item>UUIDQuery.Match(PrimData):Boolean</Item> 6672 <Item>UUIDQuery.Match(PrimData):Boolean</Item>
6673 </Issue> 6673 </Issue>
6674 </Message> 6674 </Message>
6675 </Messages> 6675 </Messages>
6676 </Member> 6676 </Member>
6677 </Members> 6677 </Members>
6678 </Type> 6678 </Type>
6679 </Types> 6679 </Types>
6680 </Namespace> 6680 </Namespace>
6681 </Namespaces> 6681 </Namespaces>
6682 </Module> 6682 </Module>
6683 </Modules> 6683 </Modules>
6684 </Target> 6684 </Target>
6685 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll"> 6685 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll">
6686 <Modules> 6686 <Modules>
6687 <Module Name="opensim.physics.basicphysicsplugin.dll"> 6687 <Module Name="opensim.physics.basicphysicsplugin.dll">
6688 <Messages> 6688 <Messages>
6689 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Status="Excluded" Created="2007-03-27 04:29:04Z"> 6689 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Status="Excluded" Created="2007-03-27 04:29:04Z">
6690 <Issue> 6690 <Issue>
6691 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 6691 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6692 </Issue> 6692 </Issue>
6693 <Notes> 6693 <Notes>
6694 <User Name="Stefan"> 6694 <User Name="Stefan">
6695 <Note Id="2" /> 6695 <Note Id="2" />
6696 </User> 6696 </User>
6697 </Notes> 6697 </Notes>
6698 </Message> 6698 </Message>
6699 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Status="Excluded" Created="2007-03-27 04:29:04Z"> 6699 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Status="Excluded" Created="2007-03-27 04:29:04Z">
6700 <Issue Name="NoStrongName"> 6700 <Issue Name="NoStrongName">
6701 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 6701 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6702 </Issue> 6702 </Issue>
6703 <Notes> 6703 <Notes>
6704 <User Name="Stefan"> 6704 <User Name="Stefan">
6705 <Note Id="0" /> 6705 <Note Id="0" />
6706 </User> 6706 </User>
6707 </Notes> 6707 </Notes>
6708 </Message> 6708 </Message>
6709 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Status="Excluded" Created="2007-03-27 04:29:04Z"> 6709 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Status="Excluded" Created="2007-03-27 04:29:04Z">
6710 <Issue Name="NoAttr"> 6710 <Issue Name="NoAttr">
6711 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 6711 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6712 </Issue> 6712 </Issue>
6713 <Notes> 6713 <Notes>
6714 <User Name="Stefan"> 6714 <User Name="Stefan">
6715 <Note Id="1" /> 6715 <Note Id="1" />
6716 </User> 6716 </User>
6717 </Notes> 6717 </Notes>
6718 </Message> 6718 </Message>
6719 </Messages> 6719 </Messages>
6720 <Namespaces> 6720 <Namespaces>
6721 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin"> 6721 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin">
6722 <Types> 6722 <Types>
6723 <Type Name="BasicActor"> 6723 <Type Name="BasicActor">
6724 <Members> 6724 <Members>
6725 <Member Name="flying"> 6725 <Member Name="flying">
6726 <Messages> 6726 <Messages>
6727 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6727 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6728 <Issue> 6728 <Issue>
6729 <Item>BasicActor.flying</Item> 6729 <Item>BasicActor.flying</Item>
6730 </Issue> 6730 </Issue>
6731 </Message> 6731 </Message>
6732 </Messages> 6732 </Messages>
6733 </Member> 6733 </Member>
6734 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void"> 6734 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6735 <Messages> 6735 <Messages>
6736 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6736 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6737 <Issue Name="Parameter"> 6737 <Issue Name="Parameter">
6738 <Item>BasicActor.SetAcceleration(PhysicsVector):Void</Item> 6738 <Item>BasicActor.SetAcceleration(PhysicsVector):Void</Item>
6739 <Item>accel</Item> 6739 <Item>accel</Item>
6740 <Item>accel</Item> 6740 <Item>accel</Item>
6741 </Issue> 6741 </Issue>
6742 </Message> 6742 </Message>
6743 </Messages> 6743 </Messages>
6744 </Member> 6744 </Member>
6745 </Members> 6745 </Members>
6746 </Type> 6746 </Type>
6747 <Type Name="BasicPhysicsPlugin"> 6747 <Type Name="BasicPhysicsPlugin">
6748 <Messages> 6748 <Messages>
6749 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6749 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6750 <Issue Name="Type"> 6750 <Issue Name="Type">
6751 <Item>Plugin</Item> 6751 <Item>Plugin</Item>
6752 <Item>OpenSim.Physics.BasicPhysicsPlugin.BasicPhysicsPlugin</Item> 6752 <Item>OpenSim.Physics.BasicPhysicsPlugin.BasicPhysicsPlugin</Item>
6753 </Issue> 6753 </Issue>
6754 </Message> 6754 </Message>
6755 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 6755 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6756 <Issue> 6756 <Issue>
6757 <Item>BasicPhysicsPlugin</Item> 6757 <Item>BasicPhysicsPlugin</Item>
6758 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item> 6758 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6759 </Issue> 6759 </Issue>
6760 </Message> 6760 </Message>
6761 </Messages> 6761 </Messages>
6762 </Type> 6762 </Type>
6763 </Types> 6763 </Types>
6764 </Namespace> 6764 </Namespace>
6765 </Namespaces> 6765 </Namespaces>
6766 </Module> 6766 </Module>
6767 </Modules> 6767 </Modules>
6768 </Target> 6768 </Target>
6769 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll"> 6769 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll">
6770 <Modules> 6770 <Modules>
6771 <Module Name="opensim.physics.odeplugin.dll"> 6771 <Module Name="opensim.physics.odeplugin.dll">
6772 <Messages> 6772 <Messages>
6773 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 6773 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6774 <Issue> 6774 <Issue>
6775 <Item>OpenSim.Physics.OdePlugin</Item> 6775 <Item>OpenSim.Physics.OdePlugin</Item>
6776 </Issue> 6776 </Issue>
6777 </Message> 6777 </Message>
6778 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 6778 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6779 <Issue Name="NoStrongName"> 6779 <Issue Name="NoStrongName">
6780 <Item>OpenSim.Physics.OdePlugin</Item> 6780 <Item>OpenSim.Physics.OdePlugin</Item>
6781 </Issue> 6781 </Issue>
6782 </Message> 6782 </Message>
6783 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 6783 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6784 <Issue Name="NoAttr"> 6784 <Issue Name="NoAttr">
6785 <Item>OpenSim.Physics.OdePlugin</Item> 6785 <Item>OpenSim.Physics.OdePlugin</Item>
6786 </Issue> 6786 </Issue>
6787 </Message> 6787 </Message>
6788 </Messages> 6788 </Messages>
6789 <Namespaces> 6789 <Namespaces>
6790 <Namespace Name="OpenSim.Physics.OdePlugin"> 6790 <Namespace Name="OpenSim.Physics.OdePlugin">
6791 <Types> 6791 <Types>
6792 <Type Name="OdeCharacter"> 6792 <Type Name="OdeCharacter">
6793 <Messages> 6793 <Messages>
6794 <Message TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049" Created="2007-03-27 04:29:04Z"> 6794 <Message TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049" Created="2007-03-27 04:29:04Z">
6795 <Issue> 6795 <Issue>
6796 <Item>OdeCharacter</Item> 6796 <Item>OdeCharacter</Item>
6797 </Issue> 6797 </Issue>
6798 </Message> 6798 </Message>
6799 </Messages> 6799 </Messages>
6800 <Members> 6800 <Members>
6801 <Member Name=".ctor(OpenSim.Physics.OdePlugin.OdeScene,OpenSim.Physics.Manager.PhysicsVector)"> 6801 <Member Name=".ctor(OpenSim.Physics.OdePlugin.OdeScene,OpenSim.Physics.Manager.PhysicsVector)">
6802 <Messages> 6802 <Messages>
6803 <Message Id="parent_scene" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking"> 6803 <Message Id="parent_scene" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6804 <Issue> 6804 <Issue>
6805 <Item>parent_scene</Item> 6805 <Item>parent_scene</Item>
6806 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item> 6806 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item>
6807 </Issue> 6807 </Issue>
6808 </Message> 6808 </Message>
6809 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6809 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6810 <Issue> 6810 <Issue>
6811 <Item>'pos'</Item> 6811 <Item>'pos'</Item>
6812 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item> 6812 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item>
6813 </Issue> 6813 </Issue>
6814 </Message> 6814 </Message>
6815 </Messages> 6815 </Messages>
6816 </Member> 6816 </Member>
6817 <Member Name="capsule_geom"> 6817 <Member Name="capsule_geom">
6818 <Messages> 6818 <Messages>
6819 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6819 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6820 <Issue> 6820 <Issue>
6821 <Item>OdeCharacter.capsule_geom</Item> 6821 <Item>OdeCharacter.capsule_geom</Item>
6822 </Issue> 6822 </Issue>
6823 </Message> 6823 </Message>
6824 </Messages> 6824 </Messages>
6825 </Member> 6825 </Member>
6826 <Member Name="gravityAccel"> 6826 <Member Name="gravityAccel">
6827 <Messages> 6827 <Messages>
6828 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6828 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6829 <Issue> 6829 <Issue>
6830 <Item>OdeCharacter.gravityAccel</Item> 6830 <Item>OdeCharacter.gravityAccel</Item>
6831 </Issue> 6831 </Issue>
6832 </Message> 6832 </Message>
6833 </Messages> 6833 </Messages>
6834 </Member> 6834 </Member>
6835 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void"> 6835 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6836 <Messages> 6836 <Messages>
6837 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6837 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6838 <Issue Name="Parameter"> 6838 <Issue Name="Parameter">
6839 <Item>OdeCharacter.SetAcceleration(PhysicsVector):Void</Item> 6839 <Item>OdeCharacter.SetAcceleration(PhysicsVector):Void</Item>
6840 <Item>accel</Item> 6840 <Item>accel</Item>
6841 <Item>accel</Item> 6841 <Item>accel</Item>
6842 </Issue> 6842 </Issue>
6843 </Message> 6843 </Message>
6844 </Messages> 6844 </Messages>
6845 </Member> 6845 </Member>
6846 </Members> 6846 </Members>
6847 </Type> 6847 </Type>
6848 <Type Name="OdePlugin"> 6848 <Type Name="OdePlugin">
6849 <Messages> 6849 <Messages>
6850 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6850 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6851 <Issue Name="Type"> 6851 <Issue Name="Type">
6852 <Item>Plugin</Item> 6852 <Item>Plugin</Item>
6853 <Item>OpenSim.Physics.OdePlugin.OdePlugin</Item> 6853 <Item>OpenSim.Physics.OdePlugin.OdePlugin</Item>
6854 </Issue> 6854 </Issue>
6855 </Message> 6855 </Message>
6856 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 6856 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6857 <Issue> 6857 <Issue>
6858 <Item>OdePlugin</Item> 6858 <Item>OdePlugin</Item>
6859 <Item>OpenSim.Physics.OdePlugin</Item> 6859 <Item>OpenSim.Physics.OdePlugin</Item>
6860 </Issue> 6860 </Issue>
6861 </Message> 6861 </Message>
6862 </Messages> 6862 </Messages>
6863 </Type> 6863 </Type>
6864 <Type Name="OdePrim"> 6864 <Type Name="OdePrim">
6865 <Members> 6865 <Members>
6866 <Member Name="_position"> 6866 <Member Name="_position">
6867 <Messages> 6867 <Messages>
6868 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6868 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6869 <Issue> 6869 <Issue>
6870 <Item>OdePrim._position</Item> 6870 <Item>OdePrim._position</Item>
6871 </Issue> 6871 </Issue>
6872 </Message> 6872 </Message>
6873 </Messages> 6873 </Messages>
6874 </Member> 6874 </Member>
6875 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void"> 6875 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6876 <Messages> 6876 <Messages>
6877 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6877 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6878 <Issue Name="Parameter"> 6878 <Issue Name="Parameter">
6879 <Item>OdePrim.SetAcceleration(PhysicsVector):Void</Item> 6879 <Item>OdePrim.SetAcceleration(PhysicsVector):Void</Item>
6880 <Item>accel</Item> 6880 <Item>accel</Item>
6881 <Item>accel</Item> 6881 <Item>accel</Item>
6882 </Issue> 6882 </Issue>
6883 </Message> 6883 </Message>
6884 </Messages> 6884 </Messages>
6885 </Member> 6885 </Member>
6886 </Members> 6886 </Members>
6887 </Type> 6887 </Type>
6888 <Type Name="OdeScene"> 6888 <Type Name="OdeScene">
6889 <Members> 6889 <Members>
6890 <Member Name="AddPrim(OpenSim.Physics.Manager.PhysicsVector,OpenSim.Physics.Manager.PhysicsVector):OpenSim.Physics.Manager.PhysicsActor"> 6890 <Member Name="AddPrim(OpenSim.Physics.Manager.PhysicsVector,OpenSim.Physics.Manager.PhysicsVector):OpenSim.Physics.Manager.PhysicsActor">
6891 <Messages> 6891 <Messages>
6892 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6892 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6893 <Issue> 6893 <Issue>
6894 <Item>'position'</Item> 6894 <Item>'position'</Item>
6895 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item> 6895 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item>
6896 </Issue> 6896 </Issue>
6897 <Issue> 6897 <Issue>
6898 <Item>'size'</Item> 6898 <Item>'size'</Item>
6899 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item> 6899 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item>
6900 </Issue> 6900 </Issue>
6901 </Message> 6901 </Message>
6902 </Messages> 6902 </Messages>
6903 </Member> 6903 </Member>
6904 <Member Name="Land"> 6904 <Member Name="Land">
6905 <Messages> 6905 <Messages>
6906 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6906 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6907 <Issue> 6907 <Issue>
6908 <Item>OdeScene.Land</Item> 6908 <Item>OdeScene.Land</Item>
6909 </Issue> 6909 </Issue>
6910 </Message> 6910 </Message>
6911 </Messages> 6911 </Messages>
6912 </Member> 6912 </Member>
6913 <Member Name="LandGeom"> 6913 <Member Name="LandGeom">
6914 <Messages> 6914 <Messages>
6915 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 6915 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6916 <Issue> 6916 <Issue>
6917 <Item>OdeScene.LandGeom</Item> 6917 <Item>OdeScene.LandGeom</Item>
6918 </Issue> 6918 </Issue>
6919 </Message> 6919 </Message>
6920 </Messages> 6920 </Messages>
6921 </Member> 6921 </Member>
6922 <Member Name="SetTerrain(System.Single[]):System.Void"> 6922 <Member Name="SetTerrain(System.Single[]):System.Void">
6923 <Messages> 6923 <Messages>
6924 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z"> 6924 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6925 <Issue> 6925 <Issue>
6926 <Item>'heightMap'</Item> 6926 <Item>'heightMap'</Item>
6927 <Item>OdeScene.SetTerrain(Single[]):Void</Item> 6927 <Item>OdeScene.SetTerrain(Single[]):Void</Item>
6928 </Issue> 6928 </Issue>
6929 <Issue> 6929 <Issue>
6930 <Item>'heightMap'</Item> 6930 <Item>'heightMap'</Item>
6931 <Item>OdeScene.SetTerrain(Single[]):Void</Item> 6931 <Item>OdeScene.SetTerrain(Single[]):Void</Item>
6932 </Issue> 6932 </Issue>
6933 </Message> 6933 </Message>
6934 </Messages> 6934 </Messages>
6935 </Member> 6935 </Member>
6936 <Member Name="space"> 6936 <Member Name="space">
6937 <Messages> 6937 <Messages>
6938 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z"> 6938 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
6939 <Issue> 6939 <Issue>
6940 <Item>space</Item> 6940 <Item>space</Item>
6941 </Issue> 6941 </Issue>
6942 </Message> 6942 </Message>
6943 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z"> 6943 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z">
6944 <Issue> 6944 <Issue>
6945 <Item>space</Item> 6945 <Item>space</Item>
6946 </Issue> 6946 </Issue>
6947 </Message> 6947 </Message>
6948 </Messages> 6948 </Messages>
6949 </Member> 6949 </Member>
6950 <Member Name="world"> 6950 <Member Name="world">
6951 <Messages> 6951 <Messages>
6952 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z"> 6952 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
6953 <Issue> 6953 <Issue>
6954 <Item>world</Item> 6954 <Item>world</Item>
6955 </Issue> 6955 </Issue>
6956 </Message> 6956 </Message>
6957 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z"> 6957 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z">
6958 <Issue> 6958 <Issue>
6959 <Item>world</Item> 6959 <Item>world</Item>
6960 </Issue> 6960 </Issue>
6961 </Message> 6961 </Message>
6962 </Messages> 6962 </Messages>
6963 </Member> 6963 </Member>
6964 </Members> 6964 </Members>
6965 </Type> 6965 </Type>
6966 </Types> 6966 </Types>
6967 </Namespace> 6967 </Namespace>
6968 </Namespaces> 6968 </Namespaces>
6969 </Module> 6969 </Module>
6970 </Modules> 6970 </Modules>
6971 </Target> 6971 </Target>
6972 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll"> 6972 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll">
6973 <Modules> 6973 <Modules>
6974 <Module Name="opensim.physics.physxplugin.dll"> 6974 <Module Name="opensim.physics.physxplugin.dll">
6975 <Messages> 6975 <Messages>
6976 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z"> 6976 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6977 <Issue> 6977 <Issue>
6978 <Item>OpenSim.Physics.PhysXPlugin</Item> 6978 <Item>OpenSim.Physics.PhysXPlugin</Item>
6979 </Issue> 6979 </Issue>
6980 </Message> 6980 </Message>
6981 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z"> 6981 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6982 <Issue Name="NoStrongName"> 6982 <Issue Name="NoStrongName">
6983 <Item>OpenSim.Physics.PhysXPlugin</Item> 6983 <Item>OpenSim.Physics.PhysXPlugin</Item>
6984 </Issue> 6984 </Issue>
6985 </Message> 6985 </Message>
6986 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z"> 6986 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6987 <Issue Name="NoAttr"> 6987 <Issue Name="NoAttr">
6988 <Item>OpenSim.Physics.PhysXPlugin</Item> 6988 <Item>OpenSim.Physics.PhysXPlugin</Item>
6989 </Issue> 6989 </Issue>
6990 </Message> 6990 </Message>
6991 </Messages> 6991 </Messages>
6992 <Namespaces> 6992 <Namespaces>
6993 <Namespace Name="OpenSim.Physics.PhysXPlugin"> 6993 <Namespace Name="OpenSim.Physics.PhysXPlugin">
6994 <Types> 6994 <Types>
6995 <Type Name="PhysXCharacter"> 6995 <Type Name="PhysXCharacter">
6996 <Members> 6996 <Members>
6997 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void"> 6997 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6998 <Messages> 6998 <Messages>
6999 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 6999 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7000 <Issue Name="Parameter"> 7000 <Issue Name="Parameter">
7001 <Item>PhysXCharacter.SetAcceleration(PhysicsVector):Void</Item> 7001 <Item>PhysXCharacter.SetAcceleration(PhysicsVector):Void</Item>
7002 <Item>accel</Item> 7002 <Item>accel</Item>
7003 <Item>accel</Item> 7003 <Item>accel</Item>
7004 </Issue> 7004 </Issue>
7005 </Message> 7005 </Message>
7006 </Messages> 7006 </Messages>
7007 </Member> 7007 </Member>
7008 </Members> 7008 </Members>
7009 </Type> 7009 </Type>
7010 <Type Name="PhysXPlugin"> 7010 <Type Name="PhysXPlugin">
7011 <Messages> 7011 <Messages>
7012 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 7012 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7013 <Issue Name="Type"> 7013 <Issue Name="Type">
7014 <Item>Plugin</Item> 7014 <Item>Plugin</Item>
7015 <Item>OpenSim.Physics.PhysXPlugin.PhysXPlugin</Item> 7015 <Item>OpenSim.Physics.PhysXPlugin.PhysXPlugin</Item>
7016 </Issue> 7016 </Issue>
7017 </Message> 7017 </Message>
7018 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z"> 7018 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
7019 <Issue> 7019 <Issue>
7020 <Item>PhysXPlugin</Item> 7020 <Item>PhysXPlugin</Item>
7021 <Item>OpenSim.Physics.PhysXPlugin</Item> 7021 <Item>OpenSim.Physics.PhysXPlugin</Item>
7022 </Issue> 7022 </Issue>
7023 </Message> 7023 </Message>
7024 </Messages> 7024 </Messages>
7025 </Type> 7025 </Type>
7026 <Type Name="PhysXPrim"> 7026 <Type Name="PhysXPrim">
7027 <Members> 7027 <Members>
7028 <Member Name="_position"> 7028 <Member Name="_position">
7029 <Messages> 7029 <Messages>
7030 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z"> 7030 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
7031 <Issue> 7031 <Issue>
7032 <Item>PhysXPrim._position</Item> 7032 <Item>PhysXPrim._position</Item>
7033 </Issue> 7033 </Issue>
7034 </Message> 7034 </Message>
7035 </Messages> 7035 </Messages>
7036 </Member> 7036 </Member>
7037 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void"> 7037 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
7038 <Messages> 7038 <Messages>
7039 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z"> 7039 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7040 <Issue Name="Parameter"> 7040 <Issue Name="Parameter">
7041 <Item>PhysXPrim.SetAcceleration(PhysicsVector):Void</Item> 7041 <Item>PhysXPrim.SetAcceleration(PhysicsVector):Void</Item>
7042 <Item>accel</Item> 7042 <Item>accel</Item>
7043 <Item>accel</Item> 7043 <Item>accel</Item>
7044 </Issue> 7044 </Issue>
7045 </Message> 7045 </Message>
7046 </Messages> 7046 </Messages>
7047 </Member> 7047 </Member>
7048 </Members> 7048 </Members>
7049 </Type> 7049 </Type>
7050 </Types> 7050 </Types>
7051 </Namespace> 7051 </Namespace>
7052 </Namespaces> 7052 </Namespaces>
7053 </Module> 7053 </Module>
7054 </Modules> 7054 </Modules>
7055 </Target> 7055 </Target>
7056 </Targets> 7056 </Targets>
7057 <Notes> 7057 <Notes>
7058 <User Name="Stefan"> 7058 <User Name="Stefan">
7059 <Note Id="0" Modified="2007-03-27 04:30:24Z">Save it for a rainy day.</Note> 7059 <Note Id="0" Modified="2007-03-27 04:30:24Z">Save it for a rainy day.</Note>
7060 <Note Id="1" Modified="2007-03-27 04:30:31Z">Save it for a rainy day.</Note> 7060 <Note Id="1" Modified="2007-03-27 04:30:31Z">Save it for a rainy day.</Note>
7061 <Note Id="2" Modified="2007-03-27 04:30:38Z">Save it for a rainy day.</Note> 7061 <Note Id="2" Modified="2007-03-27 04:30:38Z">Save it for a rainy day.</Note>
7062 </User> 7062 </User>
7063 </Notes> 7063 </Notes>
7064 <Rules> 7064 <Rules>
7065 <Rule TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209"> 7065 <Rule TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209">
7066 <Resolution Name="Default">No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.</Resolution> 7066 <Resolution Name="Default">No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.</Resolution>
7067 </Rule> 7067 </Rule>
7068 <Rule TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210"> 7068 <Rule TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210">
7069 <Resolution Name="NoStrongName">Sign '{0}' with a strong name key.</Resolution> 7069 <Resolution Name="NoStrongName">Sign '{0}' with a strong name key.</Resolution>
7070 </Rule> 7070 </Rule>
7071 <Rule TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020"> 7071 <Rule TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020">
7072 <Resolution Name="Default">Consider merging the types defined in '{0}' with another namespace.</Resolution> 7072 <Resolution Name="Default">Consider merging the types defined in '{0}' with another namespace.</Resolution>
7073 </Rule> 7073 </Rule>
7074 <Rule TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823"> 7074 <Rule TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823">
7075 <Resolution Name="Default">It appears that field '{0}' is never used or is only ever assigned to. Use this field or remove it.</Resolution> 7075 <Resolution Name="Default">It appears that field '{0}' is never used or is only ever assigned to. Use this field or remove it.</Resolution>
7076 </Rule> 7076 </Rule>
7077 <Rule TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227"> 7077 <Rule TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227">
7078 <Resolution Name="Default">Change '{0}' to be read-only by removing the property setter.</Resolution> 7078 <Resolution Name="Default">Change '{0}' to be read-only by removing the property setter.</Resolution>
7079 </Rule> 7079 </Rule>
7080 <Rule TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702"> 7080 <Rule TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702">
7081 <Resolution Name="ShouldBeDiscreteTerm">The compound word '{0}' in {1} '{2}' exists as a discrete term. If your usage is intended to be single word, case it as '{3}'.</Resolution> 7081 <Resolution Name="ShouldBeDiscreteTerm">The compound word '{0}' in {1} '{2}' exists as a discrete term. If your usage is intended to be single word, case it as '{3}'.</Resolution>
7082 </Rule> 7082 </Rule>
7083 <Rule TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405"> 7083 <Rule TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405">
7084 <Resolution Name="Default">'{0}' is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: {1}</Resolution> 7084 <Resolution Name="Default">'{0}' is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: {1}</Resolution>
7085 </Rule> 7085 </Rule>
7086 <Rule TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011"> 7086 <Rule TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011">
7087 <Resolution Name="Default">Consider changing the type of parameter '{0}' in {1} from {2} to its base type {3}. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature.</Resolution> 7087 <Resolution Name="Default">Consider changing the type of parameter '{0}' in {1} from {2} to its base type {3}. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature.</Resolution>
7088 </Rule> 7088 </Rule>
7089 <Rule TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214"> 7089 <Rule TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214">
7090 <Resolution Name="Default">'{0}' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: {1}</Resolution> 7090 <Resolution Name="Default">'{0}' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: {1}</Resolution>
7091 </Rule> 7091 </Rule>
7092 <Rule TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031"> 7092 <Rule TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031">
7093 <Resolution Name="Default">Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception.</Resolution> 7093 <Resolution Name="Default">Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception.</Resolution>
7094 </Rule> 7094 </Rule>
7095 <Rule TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104"> 7095 <Rule TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104">
7096 <Resolution Name="Default">Remove the readonly declaration from '{0}' or change the field to one that is an immutable reference type. If the reference type '{1}' is, in fact, immutable, exclude this message.</Resolution> 7096 <Resolution Name="Default">Remove the readonly declaration from '{0}' or change the field to one that is an immutable reference type. If the reference type '{1}' is, in fact, immutable, exclude this message.</Resolution>
7097 </Rule> 7097 </Rule>
7098 <Rule TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051"> 7098 <Rule TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051">
7099 <Resolution Name="Default">Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it.</Resolution> 7099 <Resolution Name="Default">Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it.</Resolution>
7100 </Rule> 7100 </Rule>
7101 <Rule TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002"> 7101 <Rule TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002">
7102 <Resolution Name="Default">Change '{0}' in {1} to use Collection&lt;T&gt;, ReadOnlyCollection&lt;T&gt; or KeyedCollection&lt;K,V&gt;</Resolution> 7102 <Resolution Name="Default">Change '{0}' in {1} to use Collection&lt;T&gt;, ReadOnlyCollection&lt;T&gt; or KeyedCollection&lt;K,V&gt;</Resolution>
7103 </Rule> 7103 </Rule>
7104 <Rule TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805"> 7104 <Rule TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805">
7105 <Resolution Name="Default">{0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime.</Resolution> 7105 <Resolution Name="Default">{0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime.</Resolution>
7106 </Rule> 7106 </Rule>
7107 <Rule TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303"> 7107 <Rule TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303">
7108 <Resolution Name="Default">{0} passes a literal as parameter {1} of a call to {2}. Retrieve the following string argument from a resource table instead: '{3}'</Resolution> 7108 <Resolution Name="Default">{0} passes a literal as parameter {1} of a call to {2}. Retrieve the following string argument from a resource table instead: '{3}'</Resolution>
7109 </Rule> 7109 </Rule>
7110 <Rule TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045"> 7110 <Rule TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045">
7111 <Resolution Name="Default">Consider a design that does not require that '{0}' be a reference parameter.</Resolution> 7111 <Resolution Name="Default">Consider a design that does not require that '{0}' be a reference parameter.</Resolution>
7112 </Rule> 7112 </Rule>
7113 <Rule TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201"> 7113 <Rule TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201">
7114 <Resolution Name="TooGeneric">{0} creates an exception of type '{1}', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type.</Resolution> 7114 <Resolution Name="TooGeneric">{0} creates an exception of type '{1}', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type.</Resolution>
7115 </Rule> 7115 </Rule>
7116 <Rule TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601"> 7116 <Rule TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601">
7117 <Resolution Name="Default">Modify the call to {0} in method {1} to set the timer interval to a value that's greater than or equal to one second.</Resolution> 7117 <Resolution Name="Default">Modify the call to {0} in method {1} to set the timer interval to a value that's greater than or equal to one second.</Resolution>
7118 </Rule> 7118 </Rule>
7119 <Rule TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709"> 7119 <Rule TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709">
7120 <Resolution Name="Member">Correct the casing of member name '{0}'.</Resolution> 7120 <Resolution Name="Member">Correct the casing of member name '{0}'.</Resolution>
7121 <Resolution Name="Namespace">Correct the casing of namespace name '{0}'.</Resolution> 7121 <Resolution Name="Namespace">Correct the casing of namespace name '{0}'.</Resolution>
7122 <Resolution Name="Parameter">Correct the casing of parameter name '{0}'.</Resolution> 7122 <Resolution Name="Parameter">Correct the casing of parameter name '{0}'.</Resolution>
7123 <Resolution Name="Type">Correct the casing of type name '{0}'.</Resolution> 7123 <Resolution Name="Type">Correct the casing of type name '{0}'.</Resolution>
7124 </Rule> 7124 </Rule>
7125 <Rule TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704"> 7125 <Rule TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704">
7126 <Resolution Name="Member">Correct the spelling of the unrecognized token '{0}' in member name '{1}'.</Resolution> 7126 <Resolution Name="Member">Correct the spelling of the unrecognized token '{0}' in member name '{1}'.</Resolution>
7127 <Resolution Name="MemberOneLetter">Consider providing a more meaningful name than the one-letter token '{0}' in member name '{1}'.</Resolution> 7127 <Resolution Name="MemberOneLetter">Consider providing a more meaningful name than the one-letter token '{0}' in member name '{1}'.</Resolution>
7128 <Resolution Name="Namespace">Correct the spelling of the unrecognized token '{0}' in namespace '{1}'.</Resolution> 7128 <Resolution Name="Namespace">Correct the spelling of the unrecognized token '{0}' in namespace '{1}'.</Resolution>
7129 <Resolution Name="Parameter">In method {0}, correct the spelling of the unrecognized token '{1}' in parameter name '{2}' or strip it entirely if it represents any sort of hungarian notation.</Resolution> 7129 <Resolution Name="Parameter">In method {0}, correct the spelling of the unrecognized token '{1}' in parameter name '{2}' or strip it entirely if it represents any sort of hungarian notation.</Resolution>
7130 <Resolution Name="ParameterOneLetter">In method {0}, consider providing a more meaningful name than the one-letter parameter name '{1}'.</Resolution> 7130 <Resolution Name="ParameterOneLetter">In method {0}, consider providing a more meaningful name than the one-letter parameter name '{1}'.</Resolution>
7131 <Resolution Name="Type">Correct the spelling of the unrecognized token '{0}' in type name '{1}'.</Resolution> 7131 <Resolution Name="Type">Correct the spelling of the unrecognized token '{0}' in type name '{1}'.</Resolution>
7132 </Rule> 7132 </Rule>
7133 <Rule TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708"> 7133 <Rule TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708">
7134 <Resolution Name="Member">Change member names {0} and '{1}' so that they differ by more than case.</Resolution> 7134 <Resolution Name="Member">Change member names {0} and '{1}' so that they differ by more than case.</Resolution>
7135 </Rule> 7135 </Rule>
7136 <Rule TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707"> 7136 <Rule TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707">
7137 <Resolution Name="Member">Remove all underscores from member '{0}'.</Resolution> 7137 <Resolution Name="Member">Remove all underscores from member '{0}'.</Resolution>
7138 <Resolution Name="Parameter">Remove all underscores from parameter '{0}'.</Resolution> 7138 <Resolution Name="Parameter">Remove all underscores from parameter '{0}'.</Resolution>
7139 <Resolution Name="Type">Remove all underscores from type '{0}'.</Resolution> 7139 <Resolution Name="Type">Remove all underscores from type '{0}'.</Resolution>
7140 </Rule> 7140 </Rule>
7141 <Rule TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711"> 7141 <Rule TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711">
7142 <Resolution Name="Default">Rename '{0}' so that it does not end in '{1}'.</Resolution> 7142 <Resolution Name="Default">Rename '{0}' so that it does not end in '{1}'.</Resolution>
7143 </Rule> 7143 </Rule>
7144 <Rule TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204"> 7144 <Rule TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204">
7145 <Resolution Name="Default">Correct the spelling of the unrecognized token '{0}' in the literal '{1}'.</Resolution> 7145 <Resolution Name="Default">Correct the spelling of the unrecognized token '{0}' in the literal '{1}'.</Resolution>
7146 </Rule> 7146 </Rule>
7147 <Rule TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705"> 7147 <Rule TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705">
7148 <Resolution Name="Member">Correct the capitalization of member name '{0}'.</Resolution> 7148 <Resolution Name="Member">Correct the capitalization of member name '{0}'.</Resolution>
7149 <Resolution Name="Namespace">Correct the capitalization of namespace name '{0}'.</Resolution> 7149 <Resolution Name="Namespace">Correct the capitalization of namespace name '{0}'.</Resolution>
7150 <Resolution Name="Parameter">Correct the capitalization of parameter name '{0}'.</Resolution> 7150 <Resolution Name="Parameter">Correct the capitalization of parameter name '{0}'.</Resolution>
7151 <Resolution Name="Type">Correct the capitalization of type name '{0}'.</Resolution> 7151 <Resolution Name="Type">Correct the capitalization of type name '{0}'.</Resolution>
7152 </Rule> 7152 </Rule>
7153 <Rule TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016"> 7153 <Rule TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016">
7154 <Resolution Name="Default">Add an AssemblyVersion attribute to '{0}'.</Resolution> 7154 <Resolution Name="Default">Add an AssemblyVersion attribute to '{0}'.</Resolution>
7155 </Rule> 7155 </Rule>
7156 <Rule TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014"> 7156 <Rule TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014">
7157 <Resolution Name="NoAttr">'{0}' should be marked with CLSCompliantAttribute and its value should be true.</Resolution> 7157 <Resolution Name="NoAttr">'{0}' should be marked with CLSCompliantAttribute and its value should be true.</Resolution>
7158 </Rule> 7158 </Rule>
7159 <Rule TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017"> 7159 <Rule TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017">
7160 <Resolution Name="NoAttribute">Mark '{0}' as ComVisible(false) at the assembly level, then mark all types within the assembly that should be exposed to Com clients as ComVisible(true).</Resolution> 7160 <Resolution Name="NoAttribute">Mark '{0}' as ComVisible(false) at the assembly level, then mark all types within the assembly that should be exposed to Com clients as ComVisible(true).</Resolution>
7161 </Rule> 7161 </Rule>
7162 <Rule TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822"> 7162 <Rule TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822">
7163 <Resolution Name="Default">The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the member as static (or Shared in VB) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate.</Resolution> 7163 <Resolution Name="Default">The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the member as static (or Shared in VB) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate.</Resolution>
7164 </Rule> 7164 </Rule>
7165 <Rule TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211"> 7165 <Rule TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211">
7166 <Resolution Name="Default">Consider making '{0}' non-public or a constant.</Resolution> 7166 <Resolution Name="Default">Consider making '{0}' non-public or a constant.</Resolution>
7167 </Rule> 7167 </Rule>
7168 <Rule TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233"> 7168 <Rule TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233">
7169 <Resolution Name="Default">Correct the potential overflow in the operation '{0}' in '{1}'.</Resolution> 7169 <Resolution Name="Default">Correct the potential overflow in the operation '{0}' in '{1}'.</Resolution>
7170 </Rule> 7170 </Rule>
7171 <Rule TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225"> 7171 <Rule TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225">
7172 <Resolution Name="Default">Provide a method named '{0}' as a friendly alternate for operator {1}.</Resolution> 7172 <Resolution Name="Default">Provide a method named '{0}' as a friendly alternate for operator {1}.</Resolution>
7173 </Rule> 7173 </Rule>
7174 <Rule TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013"> 7174 <Rule TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013">
7175 <Resolution Name="Default">Consider adding an overload of the equality operator for '{0}' that takes the same parameters as {1}.</Resolution> 7175 <Resolution Name="Default">Consider adding an overload of the equality operator for '{0}' that takes the same parameters as {1}.</Resolution>
7176 </Rule> 7176 </Rule>
7177 <Rule TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815"> 7177 <Rule TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815">
7178 <Resolution Name="Equals">'{0}' should override Equals.</Resolution> 7178 <Resolution Name="Equals">'{0}' should override Equals.</Resolution>
7179 <Resolution Name="op_Equality">'{0}' should override the equality (==) and inequality (!=) operators.</Resolution> 7179 <Resolution Name="op_Equality">'{0}' should override the equality (==) and inequality (!=) operators.</Resolution>
7180 </Rule> 7180 </Rule>
7181 <Rule TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725"> 7181 <Rule TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725">
7182 <Resolution Name="Default">Change parameter name '{0}' of method {1} to '{2}' in order to match the identifier as it has been declared in {3}.</Resolution> 7182 <Resolution Name="Default">Change parameter name '{0}' of method {1} to '{2}' in order to match the identifier as it has been declared in {3}.</Resolution>
7183 </Rule> 7183 </Rule>
7184 <Rule TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234"> 7184 <Rule TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234">
7185 <Resolution Name="Default">Modify {0} to call {1} instead of {2}.</Resolution> 7185 <Resolution Name="Default">Modify {0} to call {1} instead of {2}.</Resolution>
7186 </Rule> 7186 </Rule>
7187 <Rule TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111"> 7187 <Rule TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111">
7188 <Resolution Name="Default">Make '{0}' private.</Resolution> 7188 <Resolution Name="Default">Make '{0}' private.</Resolution>
7189 </Rule> 7189 </Rule>
7190 <Rule TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044"> 7190 <Rule TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044">
7191 <Resolution Name="Default">Add a property getter to '{0}'.</Resolution> 7191 <Resolution Name="Default">Add a property getter to '{0}'.</Resolution>
7192 </Rule> 7192 </Rule>
7193 <Rule TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804"> 7193 <Rule TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804">
7194 <Resolution Name="Default">{0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it.</Resolution> 7194 <Resolution Name="Default">{0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it.</Resolution>
7195 </Rule> 7195 </Rule>
7196 <Rule TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801"> 7196 <Rule TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801">
7197 <Resolution Name="Default">Parameter '{0}' of {1} is never used. Remove the parameter or use it in the method body.</Resolution> 7197 <Resolution Name="Default">Parameter '{0}' of {1} is never used. Remove the parameter or use it in the method body.</Resolution>
7198 </Rule> 7198 </Rule>
7199 <Rule TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706"> 7199 <Rule TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706">
7200 <Resolution Name="Member">Correct the capitalization of '{0}' in member name '{1}'.</Resolution> 7200 <Resolution Name="Member">Correct the capitalization of '{0}' in member name '{1}'.</Resolution>
7201 <Resolution Name="MemberId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of 'ID' in member name '{0}' by changing it to 'Id'.</Resolution> 7201 <Resolution Name="MemberId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of 'ID' in member name '{0}' by changing it to 'Id'.</Resolution>
7202 <Resolution Name="ParameterId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of '{0}' in parameter name '{1}' by changing it to '{2}'.</Resolution> 7202 <Resolution Name="ParameterId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of '{0}' in parameter name '{1}' by changing it to '{2}'.</Resolution>
7203 <Resolution Name="Type">Correct the capitalization of '{0}' in type name '{1}'.</Resolution> 7203 <Resolution Name="Type">Correct the capitalization of '{0}' in type name '{1}'.</Resolution>
7204 </Rule> 7204 </Rule>
7205 <Rule TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304"> 7205 <Rule TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304">
7206 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide a CultureInfo. This should be replaced with a call to {2}.</Resolution> 7206 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide a CultureInfo. This should be replaced with a call to {2}.</Resolution>
7207 </Rule> 7207 </Rule>
7208 <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305"> 7208 <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305">
7209 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}.</Resolution> 7209 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}.</Resolution>
7210 </Rule> 7210 </Rule>
7211 <Rule TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053"> 7211 <Rule TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053">
7212 <Resolution Name="Default">Remove the public constructors from '{0}'.</Resolution> 7212 <Resolution Name="Default">Remove the public constructors from '{0}'.</Resolution>
7213 </Rule> 7213 </Rule>
7214 <Rule TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820"> 7214 <Rule TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820">
7215 <Resolution Name="IsNullOrEmpty">Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty.</Resolution> 7215 <Resolution Name="IsNullOrEmpty">Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty.</Resolution>
7216 </Rule> 7216 </Rule>
7217 <Rule TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724"> 7217 <Rule TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724">
7218 <Resolution Name="Default">The type name '{0}' conflicts in whole or in part with the namespace name '{1}'. Change either name to eliminate the conflict.</Resolution> 7218 <Resolution Name="Default">The type name '{0}' conflicts in whole or in part with the namespace name '{1}'. Change either name to eliminate the conflict.</Resolution>
7219 </Rule> 7219 </Rule>
7220 <Rule TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001"> 7220 <Rule TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001">
7221 <Resolution Name="Default">Implement IDisposable on '{0}' as it instantiates members of the following IDisposable types: {1}</Resolution> 7221 <Resolution Name="Default">Implement IDisposable on '{0}' as it instantiates members of the following IDisposable types: {1}</Resolution>
7222 </Rule> 7222 </Rule>
7223 <Rule TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049"> 7223 <Rule TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049">
7224 <Resolution Name="Default">Implement IDisposable on '{0}'.</Resolution> 7224 <Resolution Name="Default">Implement IDisposable on '{0}'.</Resolution>
7225 </Rule> 7225 </Rule>
7226 <Rule TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054"> 7226 <Rule TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054">
7227 <Resolution Name="Default">Change the type of parameter '{0}' of method {1} from string to System.Uri, or provide an overload of {1}, that allows '{0}' to be passed as a System.Uri object.</Resolution> 7227 <Resolution Name="Default">Change the type of parameter '{0}' of method {1} from string to System.Uri, or provide an overload of {1}, that allows '{0}' to be passed as a System.Uri object.</Resolution>
7228 </Rule> 7228 </Rule>
7229 <Rule TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726"> 7229 <Rule TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726">
7230 <Resolution Name="Member">Replace the term '{0}' in member name '{1}' with the preferred alternate '{2}'.</Resolution> 7230 <Resolution Name="Member">Replace the term '{0}' in member name '{1}' with the preferred alternate '{2}'.</Resolution>
7231 <Resolution Name="Type">Replace the term '{0}' in type name '{1}' with the preferred alternate '{2}'.</Resolution> 7231 <Resolution Name="Type">Replace the term '{0}' in type name '{1}' with the preferred alternate '{2}'.</Resolution>
7232 </Rule> 7232 </Rule>
7233 <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024"> 7233 <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024">
7234 <Resolution Name="Default">Change '{0}' to a property if appropriate.</Resolution> 7234 <Resolution Name="Default">Change '{0}' to a property if appropriate.</Resolution>
7235 </Rule> 7235 </Rule>
7236 <Rule TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062"> 7236 <Rule TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062">
7237 <Resolution Name="Default">Validate parameter {0} passed to externally visible method {1}.</Resolution> 7237 <Resolution Name="Default">Validate parameter {0} passed to externally visible method {1}.</Resolution>
7238 </Rule> 7238 </Rule>
7239 </Rules> 7239 </Rules>
7240 </FxCopReport> 7240 </FxCopReport>
7241</FxCopProject> 7241</FxCopProject>
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 550372f..db34d1b 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -1,71 +1,71 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Text; 28using System.Text;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework.Data; 31using OpenSim.Framework.Data;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
35using OpenSim.Framework.Communications.Caches; 35using OpenSim.Framework.Communications.Caches;
36 36
37namespace OpenSim.Framework.Communications 37namespace OpenSim.Framework.Communications
38{ 38{
39 39
40 public class CommunicationsManager 40 public class CommunicationsManager
41 { 41 {
42 public IUserServices UserServer; 42 public IUserServices UserServer;
43 public IGridServices GridServer; 43 public IGridServices GridServer;
44 public IInventoryServices InventoryServer; 44 public IInventoryServices InventoryServer;
45 public IInterRegionCommunications InterRegion; 45 public IInterRegionCommunications InterRegion;
46 public UserProfileCache UserProfilesCache; 46 public UserProfileCache UserProfilesCache;
47 47
48 public NetworkServersInfo ServersInfo; 48 public NetworkServersInfo ServersInfo;
49 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer) 49 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer)
50 { 50 {
51 ServersInfo = serversInfo; 51 ServersInfo = serversInfo;
52 UserProfilesCache = new UserProfileCache(this); 52 UserProfilesCache = new UserProfileCache(this);
53 } 53 }
54 54
55 #region Packet Handlers 55 #region Packet Handlers
56 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) 56 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
57 { 57 {
58 UserProfileData profileData = this.UserServer.GetUserProfile(uuid); 58 UserProfileData profileData = this.UserServer.GetUserProfile(uuid);
59 if (profileData != null) 59 if (profileData != null)
60 { 60 {
61 LLUUID profileId = profileData.UUID; 61 LLUUID profileId = profileData.UUID;
62 string firstname = profileData.username; 62 string firstname = profileData.username;
63 string lastname = profileData.surname; 63 string lastname = profileData.surname;
64 64
65 remote_client.SendNameReply(profileId, firstname, lastname); 65 remote_client.SendNameReply(profileId, firstname, lastname);
66 } 66 }
67 } 67 }
68 68
69 #endregion 69 #endregion
70 } 70 }
71} 71}
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
index d2e5ab6..1cfe2b6 100644
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -1,41 +1,41 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System.Collections.Generic; 29using System.Collections.Generic;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Framework.Communications 32namespace OpenSim.Framework.Communications
33{ 33{
34 public interface IGridServices 34 public interface IGridServices
35 { 35 {
36 RegionCommsListener RegisterRegion(RegionInfo regionInfos); 36 RegionCommsListener RegisterRegion(RegionInfo regionInfos);
37 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo); 37 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo);
38 RegionInfo RequestNeighbourInfo(ulong regionHandle); 38 RegionInfo RequestNeighbourInfo(ulong regionHandle);
39 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); 39 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
40 } 40 }
41} 41}
diff --git a/OpenSim/Framework/Communications/IInterRegionCommunications.cs b/OpenSim/Framework/Communications/IInterRegionCommunications.cs
index 55f12ac..7758f2b 100644
--- a/OpenSim/Framework/Communications/IInterRegionCommunications.cs
+++ b/OpenSim/Framework/Communications/IInterRegionCommunications.cs
@@ -1,38 +1,38 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Communications 31namespace OpenSim.Framework.Communications
32{ 32{
33 public interface IInterRegionCommunications 33 public interface IInterRegionCommunications
34 { 34 {
35 bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData); 35 bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
36 bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position); 36 bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position);
37 } 37 }
38} 38}
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
index 0b05834..807952c 100644
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInventoryServices.cs
@@ -1,17 +1,17 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
5using libsecondlife; 5using libsecondlife;
6using OpenSim.Framework.Communications.Caches; 6using OpenSim.Framework.Communications.Caches;
7 7
8namespace OpenSim.Framework.Communications 8namespace OpenSim.Framework.Communications
9{ 9{
10 public delegate void InventoryFolderInfo(LLUUID userID, InventoryFolder folderInfo); 10 public delegate void InventoryFolderInfo(LLUUID userID, InventoryFolder folderInfo);
11 public delegate void InventoryItemInfo(LLUUID userID, InventoryItemBase itemInfo); 11 public delegate void InventoryItemInfo(LLUUID userID, InventoryItemBase itemInfo);
12 12
13 public interface IInventoryServices 13 public interface IInventoryServices
14 { 14 {
15 void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack); 15 void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack);
16 } 16 }
17} 17}
diff --git a/OpenSim/Framework/Communications/IUserServices.cs b/OpenSim/Framework/Communications/IUserServices.cs
index 0b1f86c..cd97b52 100644
--- a/OpenSim/Framework/Communications/IUserServices.cs
+++ b/OpenSim/Framework/Communications/IUserServices.cs
@@ -1,43 +1,43 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Data; 29using OpenSim.Framework.Data;
30 30
31namespace OpenSim.Framework.Communications 31namespace OpenSim.Framework.Communications
32{ 32{
33 public interface IUserServices 33 public interface IUserServices
34 { 34 {
35 UserProfileData GetUserProfile(string firstName, string lastName); 35 UserProfileData GetUserProfile(string firstName, string lastName);
36 UserProfileData GetUserProfile(string name); 36 UserProfileData GetUserProfile(string name);
37 UserProfileData GetUserProfile(LLUUID avatarID); 37 UserProfileData GetUserProfile(LLUUID avatarID);
38 38
39 UserProfileData SetupMasterUser(string firstName, string lastName); 39 UserProfileData SetupMasterUser(string firstName, string lastName);
40 UserProfileData SetupMasterUser(string firstName, string lastName, string password); 40 UserProfileData SetupMasterUser(string firstName, string lastName, string password);
41 41
42 } 42 }
43} 43}
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
index 09f6473..79f3e30 100644
--- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
@@ -1,60 +1,60 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// General Information about an assembly is controlled through the following 30// General Information about an assembly is controlled through the following
31// set of attributes. Change these attribute values to modify the information 31// set of attributes. Change these attribute values to modify the information
32// associated with an assembly. 32// associated with an assembly.
33[assembly: AssemblyTitle("OpenGrid.Framework.Communications")] 33[assembly: AssemblyTitle("OpenGrid.Framework.Communications")]
34[assembly: AssemblyDescription("")] 34[assembly: AssemblyDescription("")]
35[assembly: AssemblyConfiguration("")] 35[assembly: AssemblyConfiguration("")]
36[assembly: AssemblyCompany("")] 36[assembly: AssemblyCompany("")]
37[assembly: AssemblyProduct("OpenGrid.Framework.Communications")] 37[assembly: AssemblyProduct("OpenGrid.Framework.Communications")]
38[assembly: AssemblyCopyright("Copyright © 2007")] 38[assembly: AssemblyCopyright("Copyright © 2007")]
39[assembly: AssemblyTrademark("")] 39[assembly: AssemblyTrademark("")]
40[assembly: AssemblyCulture("")] 40[assembly: AssemblyCulture("")]
41 41
42// Setting ComVisible to false makes the types in this assembly not visible 42// Setting ComVisible to false makes the types in this assembly not visible
43// to COM components. If you need to access a type in this assembly from 43// to COM components. If you need to access a type in this assembly from
44// COM, set the ComVisible attribute to true on that type. 44// COM, set the ComVisible attribute to true on that type.
45[assembly: ComVisible(false)] 45[assembly: ComVisible(false)]
46 46
47// The following GUID is for the ID of the typelib if this project is exposed to COM 47// The following GUID is for the ID of the typelib if this project is exposed to COM
48[assembly: Guid("13e7c396-78a9-4a5c-baf2-6f980ea75d95")] 48[assembly: Guid("13e7c396-78a9-4a5c-baf2-6f980ea75d95")]
49 49
50// Version information for an assembly consists of the following four values: 50// Version information for an assembly consists of the following four values:
51// 51//
52// Major Version 52// Major Version
53// Minor Version 53// Minor Version
54// Build Number 54// Build Number
55// Revision 55// Revision
56// 56//
57// You can specify all the values or you can default the Revision and Build Numbers 57// You can specify all the values or you can default the Revision and Build Numbers
58// by using the '*' as shown below: 58// by using the '*' as shown below:
59[assembly: AssemblyVersion("1.0.0.0")] 59[assembly: AssemblyVersion("1.0.0.0")]
60[assembly: AssemblyFileVersion("1.0.0.0")] 60[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Communications/caches/CachedUserInfo.cs b/OpenSim/Framework/Communications/caches/CachedUserInfo.cs
index 1c779e9..b8d8847 100644
--- a/OpenSim/Framework/Communications/caches/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/caches/CachedUserInfo.cs
@@ -1,77 +1,77 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
5using libsecondlife; 5using libsecondlife;
6 6
7namespace OpenSim.Framework.Communications.Caches 7namespace OpenSim.Framework.Communications.Caches
8{ 8{
9 public class CachedUserInfo 9 public class CachedUserInfo
10 { 10 {
11 public UserProfileData UserProfile; 11 public UserProfileData UserProfile;
12 //public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>(); 12 //public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>();
13 public InventoryFolder RootFolder; 13 public InventoryFolder RootFolder;
14 14
15 public CachedUserInfo() 15 public CachedUserInfo()
16 { 16 {
17 17
18 } 18 }
19 19
20 /// <summary> 20 /// <summary>
21 /// 21 ///
22 /// </summary> 22 /// </summary>
23 /// <param name="userID"></param> 23 /// <param name="userID"></param>
24 /// <param name="folderInfo"></param> 24 /// <param name="folderInfo"></param>
25 public void FolderReceive(LLUUID userID, InventoryFolder folderInfo) 25 public void FolderReceive(LLUUID userID, InventoryFolder folderInfo)
26 { 26 {
27 if (userID == UserProfile.UUID) 27 if (userID == UserProfile.UUID)
28 { 28 {
29 if (this.RootFolder == null) 29 if (this.RootFolder == null)
30 { 30 {
31 if (folderInfo.parentID == LLUUID.Zero) 31 if (folderInfo.parentID == LLUUID.Zero)
32 { 32 {
33 this.RootFolder = folderInfo; 33 this.RootFolder = folderInfo;
34 } 34 }
35 } 35 }
36 else 36 else
37 { 37 {
38 if (this.RootFolder.folderID == folderInfo.parentID) 38 if (this.RootFolder.folderID == folderInfo.parentID)
39 { 39 {
40 this.RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo); 40 this.RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
41 } 41 }
42 else 42 else
43 { 43 {
44 InventoryFolder pFolder = this.RootFolder.HasSubFolder(folderInfo.parentID); 44 InventoryFolder pFolder = this.RootFolder.HasSubFolder(folderInfo.parentID);
45 if (pFolder != null) 45 if (pFolder != null)
46 { 46 {
47 pFolder.SubFolders.Add(folderInfo.folderID, folderInfo); 47 pFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
48 } 48 }
49 } 49 }
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) 54 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo)
55 { 55 {
56 if (userID == UserProfile.UUID) 56 if (userID == UserProfile.UUID)
57 { 57 {
58 if (this.RootFolder != null) 58 if (this.RootFolder != null)
59 { 59 {
60 if (itemInfo.parentFolderID == this.RootFolder.folderID) 60 if (itemInfo.parentFolderID == this.RootFolder.folderID)
61 { 61 {
62 this.RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); 62 this.RootFolder.Items.Add(itemInfo.inventoryID, itemInfo);
63 } 63 }
64 else 64 else
65 { 65 {
66 InventoryFolder pFolder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID); 66 InventoryFolder pFolder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID);
67 if (pFolder != null) 67 if (pFolder != null)
68 { 68 {
69 pFolder.Items.Add(itemInfo.inventoryID, itemInfo); 69 pFolder.Items.Add(itemInfo.inventoryID, itemInfo);
70 } 70 }
71 } 71 }
72 } 72 }
73 73
74 } 74 }
75 } 75 }
76 } 76 }
77} 77}
diff --git a/OpenSim/Framework/Communications/caches/InventoryFolder.cs b/OpenSim/Framework/Communications/caches/InventoryFolder.cs
index eaddf19..af38b12 100644
--- a/OpenSim/Framework/Communications/caches/InventoryFolder.cs
+++ b/OpenSim/Framework/Communications/caches/InventoryFolder.cs
@@ -1,51 +1,51 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5using OpenSim.Framework.Data; 5using OpenSim.Framework.Data;
6 6
7namespace OpenSim.Framework.Communications.Caches 7namespace OpenSim.Framework.Communications.Caches
8{ 8{
9 public class InventoryFolder : InventoryFolderBase 9 public class InventoryFolder : InventoryFolderBase
10 { 10 {
11 public Dictionary<LLUUID, InventoryFolder> SubFolders = new Dictionary<LLUUID, InventoryFolder>(); 11 public Dictionary<LLUUID, InventoryFolder> SubFolders = new Dictionary<LLUUID, InventoryFolder>();
12 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); 12 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
13 13
14 public InventoryFolder() 14 public InventoryFolder()
15 { 15 {
16 } 16 }
17 17
18 public InventoryFolder HasSubFolder(LLUUID folderID) 18 public InventoryFolder HasSubFolder(LLUUID folderID)
19 { 19 {
20 InventoryFolder returnFolder = null; 20 InventoryFolder returnFolder = null;
21 if (this.SubFolders.ContainsKey(folderID)) 21 if (this.SubFolders.ContainsKey(folderID))
22 { 22 {
23 returnFolder = this.SubFolders[folderID]; 23 returnFolder = this.SubFolders[folderID];
24 } 24 }
25 else 25 else
26 { 26 {
27 foreach (InventoryFolder folder in this.SubFolders.Values) 27 foreach (InventoryFolder folder in this.SubFolders.Values)
28 { 28 {
29 returnFolder = folder.HasSubFolder(folderID); 29 returnFolder = folder.HasSubFolder(folderID);
30 if (returnFolder != null) 30 if (returnFolder != null)
31 { 31 {
32 break; 32 break;
33 } 33 }
34 } 34 }
35 } 35 }
36 return returnFolder; 36 return returnFolder;
37 } 37 }
38 38
39 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type) 39 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type)
40 { 40 {
41 InventoryFolder subFold = new InventoryFolder(); 41 InventoryFolder subFold = new InventoryFolder();
42 subFold.name = folderName; 42 subFold.name = folderName;
43 subFold.folderID = folderID; 43 subFold.folderID = folderID;
44 subFold.type = type; 44 subFold.type = type;
45 subFold.parentID = this.folderID; 45 subFold.parentID = this.folderID;
46 subFold.agentID = this.agentID; 46 subFold.agentID = this.agentID;
47 this.SubFolders.Add(subFold.folderID, subFold); 47 this.SubFolders.Add(subFold.folderID, subFold);
48 return subFold; 48 return subFold;
49 } 49 }
50 } 50 }
51} 51}
diff --git a/OpenSim/Framework/Communications/caches/UserProfileCache.cs b/OpenSim/Framework/Communications/caches/UserProfileCache.cs
index 0ee63ba..f651b8a 100644
--- a/OpenSim/Framework/Communications/caches/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/caches/UserProfileCache.cs
@@ -1,107 +1,107 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5using OpenSim.Framework.Data; 5using OpenSim.Framework.Data;
6using OpenSim.Framework.Communications; 6using OpenSim.Framework.Communications;
7 7
8namespace OpenSim.Framework.Communications.Caches 8namespace OpenSim.Framework.Communications.Caches
9{ 9{
10 public class UserProfileCache 10 public class UserProfileCache
11 { 11 {
12 public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>(); 12 public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>();
13 13
14 private CommunicationsManager m_parent; 14 private CommunicationsManager m_parent;
15 15
16 public UserProfileCache(CommunicationsManager parent) 16 public UserProfileCache(CommunicationsManager parent)
17 { 17 {
18 m_parent = parent; 18 m_parent = parent;
19 } 19 }
20 20
21 /// <summary> 21 /// <summary>
22 /// A new user has moved into a region in this instance 22 /// A new user has moved into a region in this instance
23 /// so get info from servers 23 /// so get info from servers
24 /// </summary> 24 /// </summary>
25 /// <param name="userID"></param> 25 /// <param name="userID"></param>
26 public void AddNewUser(LLUUID userID) 26 public void AddNewUser(LLUUID userID)
27 { 27 {
28 if (!this.UserProfiles.ContainsKey(userID)) 28 if (!this.UserProfiles.ContainsKey(userID))
29 { 29 {
30 CachedUserInfo userInfo = new CachedUserInfo(); 30 CachedUserInfo userInfo = new CachedUserInfo();
31 userInfo.UserProfile = this.RequestUserProfileForUser(userID); 31 userInfo.UserProfile = this.RequestUserProfileForUser(userID);
32 this.m_parent.InventoryServer.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); 32 this.m_parent.InventoryServer.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive);
33 if (userInfo.UserProfile != null) 33 if (userInfo.UserProfile != null)
34 { 34 {
35 this.UserProfiles.Add(userID, userInfo); 35 this.UserProfiles.Add(userID, userInfo);
36 } 36 }
37 else 37 else
38 { 38 {
39 //no profile for this user, what do we do now? 39 //no profile for this user, what do we do now?
40 } 40 }
41 } 41 }
42 else 42 else
43 { 43 {
44 //already have a cached profile for this user 44 //already have a cached profile for this user
45 //we should make sure its upto date with the user server version 45 //we should make sure its upto date with the user server version
46 } 46 }
47 } 47 }
48 48
49 /// <summary> 49 /// <summary>
50 /// A new user has moved into a region in this instance 50 /// A new user has moved into a region in this instance
51 /// so get info from servers 51 /// so get info from servers
52 /// </summary> 52 /// </summary>
53 /// <param name="firstName"></param> 53 /// <param name="firstName"></param>
54 /// <param name="lastName"></param> 54 /// <param name="lastName"></param>
55 public void AddNewUser(string firstName, string lastName) 55 public void AddNewUser(string firstName, string lastName)
56 { 56 {
57 57
58 } 58 }
59 59
60 /// <summary> 60 /// <summary>
61 /// A user has left this instance 61 /// A user has left this instance
62 /// so make sure servers have been updated 62 /// so make sure servers have been updated
63 /// Then remove cached info 63 /// Then remove cached info
64 /// </summary> 64 /// </summary>
65 /// <param name="userID"></param> 65 /// <param name="userID"></param>
66 public void UserLogOut(LLUUID userID) 66 public void UserLogOut(LLUUID userID)
67 { 67 {
68 68
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Request the user profile from User server 72 /// Request the user profile from User server
73 /// </summary> 73 /// </summary>
74 /// <param name="userID"></param> 74 /// <param name="userID"></param>
75 private UserProfileData RequestUserProfileForUser(LLUUID userID) 75 private UserProfileData RequestUserProfileForUser(LLUUID userID)
76 { 76 {
77 return this.m_parent.UserServer.GetUserProfile(userID); 77 return this.m_parent.UserServer.GetUserProfile(userID);
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Request Iventory Info from Inventory server 81 /// Request Iventory Info from Inventory server
82 /// </summary> 82 /// </summary>
83 /// <param name="userID"></param> 83 /// <param name="userID"></param>
84 private void RequestInventoryForUser(LLUUID userID) 84 private void RequestInventoryForUser(LLUUID userID)
85 { 85 {
86 86
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// Make sure UserProfile is updated on user server 90 /// Make sure UserProfile is updated on user server
91 /// </summary> 91 /// </summary>
92 /// <param name="userID"></param> 92 /// <param name="userID"></param>
93 private void UpdateUserProfileToServer(LLUUID userID) 93 private void UpdateUserProfileToServer(LLUUID userID)
94 { 94 {
95 95
96 } 96 }
97 97
98 /// <summary> 98 /// <summary>
99 /// Update Inventory data to Inventory server 99 /// Update Inventory data to Inventory server
100 /// </summary> 100 /// </summary>
101 /// <param name="userID"></param> 101 /// <param name="userID"></param>
102 private void UpdateInventoryToServer(LLUUID userID) 102 private void UpdateInventoryToServer(LLUUID userID)
103 { 103 {
104 104
105 } 105 }
106 } 106 }
107} 107}
diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs
index 30f6167..61bd423 100644
--- a/OpenSim/Framework/Console/AssemblyInfo.cs
+++ b/OpenSim/Framework/Console/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("ServerConsole")] 36[assembly: AssemblyTitle("ServerConsole")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("ServerConsole")] 40[assembly: AssemblyProduct("ServerConsole")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
index 346cfe6..1dea251 100644
--- a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
+++ b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
@@ -1,35 +1,35 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Console 28namespace OpenSim.Framework.Console
29{ 29{
30 public interface conscmd_callback 30 public interface conscmd_callback
31 { 31 {
32 void RunCmd(string cmd, string[] cmdparams); 32 void RunCmd(string cmd, string[] cmdparams);
33 void Show(string ShowWhat); 33 void Show(string ShowWhat);
34 } 34 }
35} 35}
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index f73e15e..1eb6ff0 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -1,282 +1,282 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Net; 30using System.Net;
31 31
32namespace OpenSim.Framework.Console 32namespace OpenSim.Framework.Console
33{ 33{
34 public enum LogPriority : int 34 public enum LogPriority : int
35 { 35 {
36 CRITICAL, 36 CRITICAL,
37 HIGH, 37 HIGH,
38 MEDIUM, 38 MEDIUM,
39 NORMAL, 39 NORMAL,
40 LOW, 40 LOW,
41 VERBOSE, 41 VERBOSE,
42 EXTRAVERBOSE 42 EXTRAVERBOSE
43 } 43 }
44 44
45 public class LogBase 45 public class LogBase
46 { 46 {
47 StreamWriter Log; 47 StreamWriter Log;
48 public conscmd_callback cmdparser; 48 public conscmd_callback cmdparser;
49 public string componentname; 49 public string componentname;
50 private bool m_silent; 50 private bool m_silent;
51 51
52 public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool silent) 52 public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool silent)
53 { 53 {
54 this.componentname = componentname; 54 this.componentname = componentname;
55 this.cmdparser = cmdparser; 55 this.cmdparser = cmdparser;
56 this.m_silent = silent; 56 this.m_silent = silent;
57 System.Console.WriteLine("ServerConsole.cs - creating new local console"); 57 System.Console.WriteLine("ServerConsole.cs - creating new local console");
58 58
59 if (String.IsNullOrEmpty(LogFile)) 59 if (String.IsNullOrEmpty(LogFile))
60 { 60 {
61 LogFile = componentname + ".log"; 61 LogFile = componentname + ".log";
62 } 62 }
63 63
64 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); 64 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
65 Log = File.AppendText(LogFile); 65 Log = File.AppendText(LogFile);
66 Log.WriteLine("========================================================================"); 66 Log.WriteLine("========================================================================");
67 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString()); 67 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72 Log.WriteLine("Shutdown at " + DateTime.Now.ToString()); 72 Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
73 Log.Close(); 73 Log.Close();
74 } 74 }
75 75
76 public void Write(string format, params object[] args) 76 public void Write(string format, params object[] args)
77 { 77 {
78 Notice(format, args); 78 Notice(format, args);
79 return; 79 return;
80 } 80 }
81 81
82 public void WriteLine(LogPriority importance, string format, params object[] args) 82 public void WriteLine(LogPriority importance, string format, params object[] args)
83 { 83 {
84 Log.WriteLine(format, args); 84 Log.WriteLine(format, args);
85 Log.Flush(); 85 Log.Flush();
86 if (!m_silent) 86 if (!m_silent)
87 { 87 {
88 System.Console.WriteLine(format, args); 88 System.Console.WriteLine(format, args);
89 } 89 }
90 return; 90 return;
91 } 91 }
92 92
93 public void Warn(string format, params object[] args) 93 public void Warn(string format, params object[] args)
94 { 94 {
95 WriteNewLine(ConsoleColor.Yellow, format, args); 95 WriteNewLine(ConsoleColor.Yellow, format, args);
96 return; 96 return;
97 } 97 }
98 98
99 public void Notice(string format, params object[] args) 99 public void Notice(string format, params object[] args)
100 { 100 {
101 WriteNewLine(ConsoleColor.White, format, args); 101 WriteNewLine(ConsoleColor.White, format, args);
102 return; 102 return;
103 } 103 }
104 104
105 public void Error(string format, params object[] args) 105 public void Error(string format, params object[] args)
106 { 106 {
107 WriteNewLine(ConsoleColor.Red, format, args); 107 WriteNewLine(ConsoleColor.Red, format, args);
108 return; 108 return;
109 } 109 }
110 110
111 public void Verbose(string format, params object[] args) 111 public void Verbose(string format, params object[] args)
112 { 112 {
113 WriteNewLine(ConsoleColor.Gray, format, args); 113 WriteNewLine(ConsoleColor.Gray, format, args);
114 return; 114 return;
115 } 115 }
116 116
117 public void Status(string format, params object[] args) 117 public void Status(string format, params object[] args)
118 { 118 {
119 WriteNewLine(ConsoleColor.Blue, format, args); 119 WriteNewLine(ConsoleColor.Blue, format, args);
120 return; 120 return;
121 } 121 }
122 122
123 private void WriteNewLine(ConsoleColor color, string format, params object[] args) 123 private void WriteNewLine(ConsoleColor color, string format, params object[] args)
124 { 124 {
125 Log.WriteLine(format, args); 125 Log.WriteLine(format, args);
126 Log.Flush(); 126 Log.Flush();
127 if (!m_silent) 127 if (!m_silent)
128 { 128 {
129 try 129 try
130 { 130 {
131 System.Console.ForegroundColor = color; 131 System.Console.ForegroundColor = color;
132 System.Console.WriteLine(format, args); 132 System.Console.WriteLine(format, args);
133 System.Console.ResetColor(); 133 System.Console.ResetColor();
134 } 134 }
135 catch (ArgumentNullException) 135 catch (ArgumentNullException)
136 { 136 {
137 // Some older systems dont support coloured text. 137 // Some older systems dont support coloured text.
138 System.Console.WriteLine(format, args); 138 System.Console.WriteLine(format, args);
139 } 139 }
140 } 140 }
141 return; 141 return;
142 } 142 }
143 143
144 public string ReadLine() 144 public string ReadLine()
145 { 145 {
146 string TempStr = System.Console.ReadLine(); 146 string TempStr = System.Console.ReadLine();
147 Log.WriteLine(TempStr); 147 Log.WriteLine(TempStr);
148 return TempStr; 148 return TempStr;
149 } 149 }
150 150
151 public int Read() 151 public int Read()
152 { 152 {
153 int TempInt = System.Console.Read(); 153 int TempInt = System.Console.Read();
154 Log.Write((char)TempInt); 154 Log.Write((char)TempInt);
155 return TempInt; 155 return TempInt;
156 } 156 }
157 157
158 public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue) 158 public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue)
159 { 159 {
160 IPAddress address; 160 IPAddress address;
161 string addressStr; 161 string addressStr;
162 162
163 while (true) 163 while (true)
164 { 164 {
165 addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 165 addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
166 if (IPAddress.TryParse(addressStr, out address)) 166 if (IPAddress.TryParse(addressStr, out address))
167 { 167 {
168 break; 168 break;
169 } 169 }
170 else 170 else
171 { 171 {
172 MainLog.Instance.Error("Illegal address. Please re-enter."); 172 MainLog.Instance.Error("Illegal address. Please re-enter.");
173 } 173 }
174 } 174 }
175 175
176 return address; 176 return address;
177 } 177 }
178 178
179 public int CmdPromptIPPort(string prompt, string defaultvalue) 179 public int CmdPromptIPPort(string prompt, string defaultvalue)
180 { 180 {
181 int port; 181 int port;
182 string portStr; 182 string portStr;
183 183
184 while (true) 184 while (true)
185 { 185 {
186 portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 186 portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
187 if (int.TryParse(portStr, out port)) 187 if (int.TryParse(portStr, out port))
188 { 188 {
189 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) 189 if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort)
190 { 190 {
191 break; 191 break;
192 } 192 }
193 } 193 }
194 194
195 MainLog.Instance.Error("Illegal address. Please re-enter."); 195 MainLog.Instance.Error("Illegal address. Please re-enter.");
196 } 196 }
197 197
198 return port; 198 return port;
199 } 199 }
200 200
201 // Displays a prompt and waits for the user to enter a string, then returns that string 201 // Displays a prompt and waits for the user to enter a string, then returns that string
202 // Done with no echo and suitable for passwords 202 // Done with no echo and suitable for passwords
203 public string PasswdPrompt(string prompt) 203 public string PasswdPrompt(string prompt)
204 { 204 {
205 // FIXME: Needs to be better abstracted 205 // FIXME: Needs to be better abstracted
206 Log.WriteLine(prompt); 206 Log.WriteLine(prompt);
207 this.Write(prompt); 207 this.Write(prompt);
208 ConsoleColor oldfg = System.Console.ForegroundColor; 208 ConsoleColor oldfg = System.Console.ForegroundColor;
209 System.Console.ForegroundColor = System.Console.BackgroundColor; 209 System.Console.ForegroundColor = System.Console.BackgroundColor;
210 string temp = System.Console.ReadLine(); 210 string temp = System.Console.ReadLine();
211 System.Console.ForegroundColor = oldfg; 211 System.Console.ForegroundColor = oldfg;
212 return temp; 212 return temp;
213 } 213 }
214 214
215 // Displays a command prompt and waits for the user to enter a string, then returns that string 215 // Displays a command prompt and waits for the user to enter a string, then returns that string
216 public string CmdPrompt(string prompt) 216 public string CmdPrompt(string prompt)
217 { 217 {
218 this.Write(String.Format("{0}: ", prompt)); 218 this.Write(String.Format("{0}: ", prompt));
219 return this.ReadLine(); 219 return this.ReadLine();
220 } 220 }
221 221
222 // Displays a command prompt and returns a default value if the user simply presses enter 222 // Displays a command prompt and returns a default value if the user simply presses enter
223 public string CmdPrompt(string prompt, string defaultresponse) 223 public string CmdPrompt(string prompt, string defaultresponse)
224 { 224 {
225 string temp = CmdPrompt(String.Format("{0} [{1}]", prompt, defaultresponse)); 225 string temp = CmdPrompt(String.Format("{0} [{1}]", prompt, defaultresponse));
226 if (temp == "") 226 if (temp == "")
227 { 227 {
228 return defaultresponse; 228 return defaultresponse;
229 } 229 }
230 else 230 else
231 { 231 {
232 return temp; 232 return temp;
233 } 233 }
234 } 234 }
235 235
236 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options 236 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
237 public string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB) 237 public string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB)
238 { 238 {
239 bool itisdone = false; 239 bool itisdone = false;
240 string temp = CmdPrompt(prompt, defaultresponse); 240 string temp = CmdPrompt(prompt, defaultresponse);
241 while (itisdone == false) 241 while (itisdone == false)
242 { 242 {
243 if ((temp == OptionA) || (temp == OptionB)) 243 if ((temp == OptionA) || (temp == OptionB))
244 { 244 {
245 itisdone = true; 245 itisdone = true;
246 } 246 }
247 else 247 else
248 { 248 {
249 Notice("Valid options are " + OptionA + " or " + OptionB); 249 Notice("Valid options are " + OptionA + " or " + OptionB);
250 temp = CmdPrompt(prompt, defaultresponse); 250 temp = CmdPrompt(prompt, defaultresponse);
251 } 251 }
252 } 252 }
253 return temp; 253 return temp;
254 } 254 }
255 255
256 // Runs a command with a number of parameters 256 // Runs a command with a number of parameters
257 public Object RunCmd(string Cmd, string[] cmdparams) 257 public Object RunCmd(string Cmd, string[] cmdparams)
258 { 258 {
259 cmdparser.RunCmd(Cmd, cmdparams); 259 cmdparser.RunCmd(Cmd, cmdparams);
260 return null; 260 return null;
261 } 261 }
262 262
263 // Shows data about something 263 // Shows data about something
264 public void ShowCommands(string ShowWhat) 264 public void ShowCommands(string ShowWhat)
265 { 265 {
266 cmdparser.Show(ShowWhat); 266 cmdparser.Show(ShowWhat);
267 } 267 }
268 268
269 public void MainLogPrompt() 269 public void MainLogPrompt()
270 { 270 {
271 string[] tempstrarray; 271 string[] tempstrarray;
272 string tempstr = this.CmdPrompt(this.componentname + "# "); 272 string tempstr = this.CmdPrompt(this.componentname + "# ");
273 tempstrarray = tempstr.Split(' '); 273 tempstrarray = tempstr.Split(' ');
274 string cmd = tempstrarray[0]; 274 string cmd = tempstrarray[0];
275 Array.Reverse(tempstrarray); 275 Array.Reverse(tempstrarray);
276 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1); 276 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1);
277 Array.Reverse(tempstrarray); 277 Array.Reverse(tempstrarray);
278 string[] cmdparams = (string[])tempstrarray; 278 string[] cmdparams = (string[])tempstrarray;
279 RunCmd(cmd, cmdparams); 279 RunCmd(cmd, cmdparams);
280 } 280 }
281 } 281 }
282} 282}
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainLog.cs
index 7d52622..e6bf9d9 100644
--- a/OpenSim/Framework/Console/MainLog.cs
+++ b/OpenSim/Framework/Console/MainLog.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Console 28namespace OpenSim.Framework.Console
29{ 29{
30 public class MainLog { 30 public class MainLog {
31 31
32 private static LogBase instance; 32 private static LogBase instance;
33 33
34 public static LogBase Instance 34 public static LogBase Instance
35 { 35 {
36 get 36 get
37 { 37 {
38 return instance; 38 return instance;
39 } 39 }
40 set 40 set
41 { 41 {
42 instance = value; 42 instance = value;
43 } 43 }
44 } 44 }
45 } 45 }
46 46
47} 47}
diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs
index 5fec367..e57a3aa 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs
@@ -1,162 +1,162 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using libsecondlife; 30using libsecondlife;
31 31
32namespace OpenSim.Framework.Data.DB4o 32namespace OpenSim.Framework.Data.DB4o
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// A grid server storage mechanism employing the DB4o database system 35 /// A grid server storage mechanism employing the DB4o database system
36 /// </summary> 36 /// </summary>
37 class DB4oGridData : IGridData 37 class DB4oGridData : IGridData
38 { 38 {
39 /// <summary> 39 /// <summary>
40 /// The database manager object 40 /// The database manager object
41 /// </summary> 41 /// </summary>
42 DB4oGridManager manager; 42 DB4oGridManager manager;
43 43
44 /// <summary> 44 /// <summary>
45 /// Called when the plugin is first loaded (as constructors are not called) 45 /// Called when the plugin is first loaded (as constructors are not called)
46 /// </summary> 46 /// </summary>
47 public void Initialise() { 47 public void Initialise() {
48 manager = new DB4oGridManager("gridserver.yap"); 48 manager = new DB4oGridManager("gridserver.yap");
49 } 49 }
50 50
51 /// <summary> 51 /// <summary>
52 /// Returns a list of regions within the specified ranges 52 /// Returns a list of regions within the specified ranges
53 /// </summary> 53 /// </summary>
54 /// <param name="a">minimum X coordinate</param> 54 /// <param name="a">minimum X coordinate</param>
55 /// <param name="b">minimum Y coordinate</param> 55 /// <param name="b">minimum Y coordinate</param>
56 /// <param name="c">maximum X coordinate</param> 56 /// <param name="c">maximum X coordinate</param>
57 /// <param name="d">maximum Y coordinate</param> 57 /// <param name="d">maximum Y coordinate</param>
58 /// <returns>An array of region profiles</returns> 58 /// <returns>An array of region profiles</returns>
59 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) 59 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
60 { 60 {
61 return null; 61 return null;
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned) 65 /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned)
66 /// </summary> 66 /// </summary>
67 /// <param name="handle">The handle to search for</param> 67 /// <param name="handle">The handle to search for</param>
68 /// <returns>A region profile</returns> 68 /// <returns>A region profile</returns>
69 public SimProfileData GetProfileByHandle(ulong handle) { 69 public SimProfileData GetProfileByHandle(ulong handle) {
70 lock (manager.simProfiles) 70 lock (manager.simProfiles)
71 { 71 {
72 foreach (LLUUID UUID in manager.simProfiles.Keys) 72 foreach (LLUUID UUID in manager.simProfiles.Keys)
73 { 73 {
74 if (manager.simProfiles[UUID].regionHandle == handle) 74 if (manager.simProfiles[UUID].regionHandle == handle)
75 { 75 {
76 return manager.simProfiles[UUID]; 76 return manager.simProfiles[UUID];
77 } 77 }
78 } 78 }
79 } 79 }
80 throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")"); 80 throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")");
81 } 81 }
82 82
83 /// <summary> 83 /// <summary>
84 /// Returns a specific region 84 /// Returns a specific region
85 /// </summary> 85 /// </summary>
86 /// <param name="uuid">The region ID code</param> 86 /// <param name="uuid">The region ID code</param>
87 /// <returns>A region profile</returns> 87 /// <returns>A region profile</returns>
88 public SimProfileData GetProfileByLLUUID(LLUUID uuid) 88 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
89 { 89 {
90 lock (manager.simProfiles) 90 lock (manager.simProfiles)
91 { 91 {
92 if (manager.simProfiles.ContainsKey(uuid)) 92 if (manager.simProfiles.ContainsKey(uuid))
93 return manager.simProfiles[uuid]; 93 return manager.simProfiles[uuid];
94 } 94 }
95 throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + "). Total Registered Regions: " + manager.simProfiles.Count); 95 throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + "). Total Registered Regions: " + manager.simProfiles.Count);
96 } 96 }
97 97
98 /// <summary> 98 /// <summary>
99 /// Adds a new specified region to the database 99 /// Adds a new specified region to the database
100 /// </summary> 100 /// </summary>
101 /// <param name="profile">The profile to add</param> 101 /// <param name="profile">The profile to add</param>
102 /// <returns>A dataresponse enum indicating success</returns> 102 /// <returns>A dataresponse enum indicating success</returns>
103 public DataResponse AddProfile(SimProfileData profile) 103 public DataResponse AddProfile(SimProfileData profile)
104 { 104 {
105 lock (manager.simProfiles) 105 lock (manager.simProfiles)
106 { 106 {
107 if (manager.AddRow(profile)) 107 if (manager.AddRow(profile))
108 { 108 {
109 return DataResponse.RESPONSE_OK; 109 return DataResponse.RESPONSE_OK;
110 } 110 }
111 else 111 else
112 { 112 {
113 return DataResponse.RESPONSE_ERROR; 113 return DataResponse.RESPONSE_ERROR;
114 } 114 }
115 } 115 }
116 } 116 }
117 117
118 /// <summary> 118 /// <summary>
119 /// Authenticates a new region using the shared secrets. NOT SECURE. 119 /// Authenticates a new region using the shared secrets. NOT SECURE.
120 /// </summary> 120 /// </summary>
121 /// <param name="uuid">The UUID the region is authenticating with</param> 121 /// <param name="uuid">The UUID the region is authenticating with</param>
122 /// <param name="handle">The location the region is logging into (unused in Db4o)</param> 122 /// <param name="handle">The location the region is logging into (unused in Db4o)</param>
123 /// <param name="key">The shared secret</param> 123 /// <param name="key">The shared secret</param>
124 /// <returns>Authenticated?</returns> 124 /// <returns>Authenticated?</returns>
125 public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) { 125 public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) {
126 if (manager.simProfiles[uuid].regionRecvKey == key) 126 if (manager.simProfiles[uuid].regionRecvKey == key)
127 return true; 127 return true;
128 return false; 128 return false;
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// Shuts down the database 132 /// Shuts down the database
133 /// </summary> 133 /// </summary>
134 public void Close() 134 public void Close()
135 { 135 {
136 manager = null; 136 manager = null;
137 } 137 }
138 138
139 /// <summary> 139 /// <summary>
140 /// Returns the providers name 140 /// Returns the providers name
141 /// </summary> 141 /// </summary>
142 /// <returns>The name of the storage system</returns> 142 /// <returns>The name of the storage system</returns>
143 public string getName() 143 public string getName()
144 { 144 {
145 return "DB4o Grid Provider"; 145 return "DB4o Grid Provider";
146 } 146 }
147 147
148 /// <summary> 148 /// <summary>
149 /// Returns the providers version 149 /// Returns the providers version
150 /// </summary> 150 /// </summary>
151 /// <returns>The version of the storage system</returns> 151 /// <returns>The version of the storage system</returns>
152 public string getVersion() 152 public string getVersion()
153 { 153 {
154 return "0.1"; 154 return "0.1";
155 } 155 }
156 156
157 public ReservationData GetReservationAtPoint(uint x, uint y) 157 public ReservationData GetReservationAtPoint(uint x, uint y)
158 { 158 {
159 return null; 159 return null;
160 } 160 }
161 } 161 }
162} 162}
diff --git a/OpenSim/Framework/Data.DB4o/DB4oManager.cs b/OpenSim/Framework/Data.DB4o/DB4oManager.cs
index 0df6350..43f9095 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oManager.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oManager.cs
@@ -1,163 +1,163 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Db4objects.Db4o; 30using Db4objects.Db4o;
31using libsecondlife; 31using libsecondlife;
32 32
33namespace OpenSim.Framework.Data.DB4o 33namespace OpenSim.Framework.Data.DB4o
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// A Database manager for Db4o 36 /// A Database manager for Db4o
37 /// </summary> 37 /// </summary>
38 class DB4oGridManager 38 class DB4oGridManager
39 { 39 {
40 /// <summary> 40 /// <summary>
41 /// A list of the current regions connected (in-memory cache) 41 /// A list of the current regions connected (in-memory cache)
42 /// </summary> 42 /// </summary>
43 public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>(); 43 public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>();
44 /// <summary> 44 /// <summary>
45 /// Database File Name 45 /// Database File Name
46 /// </summary> 46 /// </summary>
47 string dbfl; 47 string dbfl;
48 48
49 /// <summary> 49 /// <summary>
50 /// Creates a new grid storage manager 50 /// Creates a new grid storage manager
51 /// </summary> 51 /// </summary>
52 /// <param name="db4odb">Filename to the database file</param> 52 /// <param name="db4odb">Filename to the database file</param>
53 public DB4oGridManager(string db4odb) 53 public DB4oGridManager(string db4odb)
54 { 54 {
55 dbfl = db4odb; 55 dbfl = db4odb;
56 IObjectContainer database; 56 IObjectContainer database;
57 database = Db4oFactory.OpenFile(dbfl); 57 database = Db4oFactory.OpenFile(dbfl);
58 IObjectSet result = database.Get(typeof(SimProfileData)); 58 IObjectSet result = database.Get(typeof(SimProfileData));
59 // Loads the file into the in-memory cache 59 // Loads the file into the in-memory cache
60 foreach(SimProfileData row in result) { 60 foreach(SimProfileData row in result) {
61 simProfiles.Add(row.UUID, row); 61 simProfiles.Add(row.UUID, row);
62 } 62 }
63 database.Close(); 63 database.Close();
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Adds a new profile to the database (Warning: Probably slow.) 67 /// Adds a new profile to the database (Warning: Probably slow.)
68 /// </summary> 68 /// </summary>
69 /// <param name="row">The profile to add</param> 69 /// <param name="row">The profile to add</param>
70 /// <returns>Successful?</returns> 70 /// <returns>Successful?</returns>
71 public bool AddRow(SimProfileData row) 71 public bool AddRow(SimProfileData row)
72 { 72 {
73 if (simProfiles.ContainsKey(row.UUID)) 73 if (simProfiles.ContainsKey(row.UUID))
74 { 74 {
75 simProfiles[row.UUID] = row; 75 simProfiles[row.UUID] = row;
76 } 76 }
77 else 77 else
78 { 78 {
79 simProfiles.Add(row.UUID, row); 79 simProfiles.Add(row.UUID, row);
80 } 80 }
81 81
82 try 82 try
83 { 83 {
84 IObjectContainer database; 84 IObjectContainer database;
85 database = Db4oFactory.OpenFile(dbfl); 85 database = Db4oFactory.OpenFile(dbfl);
86 database.Set(row); 86 database.Set(row);
87 database.Close(); 87 database.Close();
88 return true; 88 return true;
89 } 89 }
90 catch (Exception) 90 catch (Exception)
91 { 91 {
92 return false; 92 return false;
93 } 93 }
94 } 94 }
95 95
96 96
97 } 97 }
98 98
99 /// <summary> 99 /// <summary>
100 /// A manager for the DB4o database (user profiles) 100 /// A manager for the DB4o database (user profiles)
101 /// </summary> 101 /// </summary>
102 class DB4oUserManager 102 class DB4oUserManager
103 { 103 {
104 /// <summary> 104 /// <summary>
105 /// A list of the user profiles (in memory cache) 105 /// A list of the user profiles (in memory cache)
106 /// </summary> 106 /// </summary>
107 public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>(); 107 public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>();
108 /// <summary> 108 /// <summary>
109 /// Database filename 109 /// Database filename
110 /// </summary> 110 /// </summary>
111 string dbfl; 111 string dbfl;
112 112
113 /// <summary> 113 /// <summary>
114 /// Initialises a new DB manager 114 /// Initialises a new DB manager
115 /// </summary> 115 /// </summary>
116 /// <param name="db4odb">The filename to the database</param> 116 /// <param name="db4odb">The filename to the database</param>
117 public DB4oUserManager(string db4odb) 117 public DB4oUserManager(string db4odb)
118 { 118 {
119 dbfl = db4odb; 119 dbfl = db4odb;
120 IObjectContainer database; 120 IObjectContainer database;
121 database = Db4oFactory.OpenFile(dbfl); 121 database = Db4oFactory.OpenFile(dbfl);
122 // Load to cache 122 // Load to cache
123 IObjectSet result = database.Get(typeof(UserProfileData)); 123 IObjectSet result = database.Get(typeof(UserProfileData));
124 foreach (UserProfileData row in result) 124 foreach (UserProfileData row in result)
125 { 125 {
126 userProfiles.Add(row.UUID, row); 126 userProfiles.Add(row.UUID, row);
127 } 127 }
128 database.Close(); 128 database.Close();
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// Adds a new profile to the database (Warning: Probably slow.) 132 /// Adds a new profile to the database (Warning: Probably slow.)
133 /// </summary> 133 /// </summary>
134 /// <param name="row">The profile to add</param> 134 /// <param name="row">The profile to add</param>
135 /// <returns>Successful?</returns> 135 /// <returns>Successful?</returns>
136 public bool AddRow(UserProfileData row) 136 public bool AddRow(UserProfileData row)
137 { 137 {
138 if (userProfiles.ContainsKey(row.UUID)) 138 if (userProfiles.ContainsKey(row.UUID))
139 { 139 {
140 userProfiles[row.UUID] = row; 140 userProfiles[row.UUID] = row;
141 } 141 }
142 else 142 else
143 { 143 {
144 userProfiles.Add(row.UUID, row); 144 userProfiles.Add(row.UUID, row);
145 } 145 }
146 146
147 try 147 try
148 { 148 {
149 IObjectContainer database; 149 IObjectContainer database;
150 database = Db4oFactory.OpenFile(dbfl); 150 database = Db4oFactory.OpenFile(dbfl);
151 database.Set(row); 151 database.Set(row);
152 database.Close(); 152 database.Close();
153 return true; 153 return true;
154 } 154 }
155 catch (Exception) 155 catch (Exception)
156 { 156 {
157 return false; 157 return false;
158 } 158 }
159 } 159 }
160 160
161 161
162 } 162 }
163} 163}
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
index 2e33ab0..845b764 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
@@ -1,202 +1,202 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Data.DB4o 31namespace OpenSim.Framework.Data.DB4o
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// A User storage interface for the DB4o database system 34 /// A User storage interface for the DB4o database system
35 /// </summary> 35 /// </summary>
36 public class DB4oUserData : IUserData 36 public class DB4oUserData : IUserData
37 { 37 {
38 /// <summary> 38 /// <summary>
39 /// The database manager 39 /// The database manager
40 /// </summary> 40 /// </summary>
41 DB4oUserManager manager; 41 DB4oUserManager manager;
42 42
43 /// <summary> 43 /// <summary>
44 /// Artificial constructor called upon plugin load 44 /// Artificial constructor called upon plugin load
45 /// </summary> 45 /// </summary>
46 public void Initialise() 46 public void Initialise()
47 { 47 {
48 manager = new DB4oUserManager("userprofiles.yap"); 48 manager = new DB4oUserManager("userprofiles.yap");
49 } 49 }
50 50
51 /// <summary> 51 /// <summary>
52 /// Loads a specified user profile from a UUID 52 /// Loads a specified user profile from a UUID
53 /// </summary> 53 /// </summary>
54 /// <param name="uuid">The users UUID</param> 54 /// <param name="uuid">The users UUID</param>
55 /// <returns>A user profile</returns> 55 /// <returns>A user profile</returns>
56 public UserProfileData getUserByUUID(LLUUID uuid) 56 public UserProfileData getUserByUUID(LLUUID uuid)
57 { 57 {
58 if(manager.userProfiles.ContainsKey(uuid)) 58 if(manager.userProfiles.ContainsKey(uuid))
59 return manager.userProfiles[uuid]; 59 return manager.userProfiles[uuid];
60 return null; 60 return null;
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Returns a user by searching for its name 64 /// Returns a user by searching for its name
65 /// </summary> 65 /// </summary>
66 /// <param name="name">The users account name</param> 66 /// <param name="name">The users account name</param>
67 /// <returns>A matching users profile</returns> 67 /// <returns>A matching users profile</returns>
68 public UserProfileData getUserByName(string name) 68 public UserProfileData getUserByName(string name)
69 { 69 {
70 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); 70 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Returns a user by searching for its name 74 /// Returns a user by searching for its name
75 /// </summary> 75 /// </summary>
76 /// <param name="fname">The first part of the users account name</param> 76 /// <param name="fname">The first part of the users account name</param>
77 /// <param name="lname">The second part of the users account name</param> 77 /// <param name="lname">The second part of the users account name</param>
78 /// <returns>A matching users profile</returns> 78 /// <returns>A matching users profile</returns>
79 public UserProfileData getUserByName(string fname, string lname) 79 public UserProfileData getUserByName(string fname, string lname)
80 { 80 {
81 foreach (UserProfileData profile in manager.userProfiles.Values) 81 foreach (UserProfileData profile in manager.userProfiles.Values)
82 { 82 {
83 if (profile.username == fname && profile.surname == lname) 83 if (profile.username == fname && profile.surname == lname)
84 return profile; 84 return profile;
85 } 85 }
86 return null; 86 return null;
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// Returns a user by UUID direct 90 /// Returns a user by UUID direct
91 /// </summary> 91 /// </summary>
92 /// <param name="uuid">The users account ID</param> 92 /// <param name="uuid">The users account ID</param>
93 /// <returns>A matching users profile</returns> 93 /// <returns>A matching users profile</returns>
94 public UserAgentData getAgentByUUID(LLUUID uuid) 94 public UserAgentData getAgentByUUID(LLUUID uuid)
95 { 95 {
96 try 96 try
97 { 97 {
98 return getUserByUUID(uuid).currentAgent; 98 return getUserByUUID(uuid).currentAgent;
99 } 99 }
100 catch (Exception) 100 catch (Exception)
101 { 101 {
102 return null; 102 return null;
103 } 103 }
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// Returns a session by account name 107 /// Returns a session by account name
108 /// </summary> 108 /// </summary>
109 /// <param name="name">The account name</param> 109 /// <param name="name">The account name</param>
110 /// <returns>The users session agent</returns> 110 /// <returns>The users session agent</returns>
111 public UserAgentData getAgentByName(string name) 111 public UserAgentData getAgentByName(string name)
112 { 112 {
113 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); 113 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
114 } 114 }
115 115
116 /// <summary> 116 /// <summary>
117 /// Returns a session by account name 117 /// Returns a session by account name
118 /// </summary> 118 /// </summary>
119 /// <param name="fname">The first part of the users account name</param> 119 /// <param name="fname">The first part of the users account name</param>
120 /// <param name="lname">The second part of the users account name</param> 120 /// <param name="lname">The second part of the users account name</param>
121 /// <returns>A user agent</returns> 121 /// <returns>A user agent</returns>
122 public UserAgentData getAgentByName(string fname, string lname) 122 public UserAgentData getAgentByName(string fname, string lname)
123 { 123 {
124 try 124 try
125 { 125 {
126 return getUserByName(fname,lname).currentAgent; 126 return getUserByName(fname,lname).currentAgent;
127 } 127 }
128 catch (Exception) 128 catch (Exception)
129 { 129 {
130 return null; 130 return null;
131 } 131 }
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Creates a new user profile 135 /// Creates a new user profile
136 /// </summary> 136 /// </summary>
137 /// <param name="user">The profile to add to the database</param> 137 /// <param name="user">The profile to add to the database</param>
138 public void addNewUserProfile(UserProfileData user) 138 public void addNewUserProfile(UserProfileData user)
139 { 139 {
140 try 140 try
141 { 141 {
142 manager.AddRow(user); 142 manager.AddRow(user);
143 } 143 }
144 catch (Exception e) 144 catch (Exception e)
145 { 145 {
146 Console.WriteLine(e.ToString()); 146 Console.WriteLine(e.ToString());
147 } 147 }
148 } 148 }
149 149
150 /// <summary> 150 /// <summary>
151 /// Creates a new user agent 151 /// Creates a new user agent
152 /// </summary> 152 /// </summary>
153 /// <param name="agent">The agent to add to the database</param> 153 /// <param name="agent">The agent to add to the database</param>
154 public void addNewUserAgent(UserAgentData agent) 154 public void addNewUserAgent(UserAgentData agent)
155 { 155 {
156 // Do nothing. yet. 156 // Do nothing. yet.
157 } 157 }
158 158
159 /// <summary> 159 /// <summary>
160 /// Transfers money between two user accounts 160 /// Transfers money between two user accounts
161 /// </summary> 161 /// </summary>
162 /// <param name="from">Starting account</param> 162 /// <param name="from">Starting account</param>
163 /// <param name="to">End account</param> 163 /// <param name="to">End account</param>
164 /// <param name="amount">The amount to move</param> 164 /// <param name="amount">The amount to move</param>
165 /// <returns>Success?</returns> 165 /// <returns>Success?</returns>
166 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) 166 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
167 { 167 {
168 return true; 168 return true;
169 } 169 }
170 170
171 /// <summary> 171 /// <summary>
172 /// Transfers inventory between two accounts 172 /// Transfers inventory between two accounts
173 /// </summary> 173 /// </summary>
174 /// <remarks>Move to inventory server</remarks> 174 /// <remarks>Move to inventory server</remarks>
175 /// <param name="from">Senders account</param> 175 /// <param name="from">Senders account</param>
176 /// <param name="to">Recievers account</param> 176 /// <param name="to">Recievers account</param>
177 /// <param name="item">Inventory item</param> 177 /// <param name="item">Inventory item</param>
178 /// <returns>Success?</returns> 178 /// <returns>Success?</returns>
179 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 179 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
180 { 180 {
181 return true; 181 return true;
182 } 182 }
183 183
184 /// <summary> 184 /// <summary>
185 /// Returns the name of the storage provider 185 /// Returns the name of the storage provider
186 /// </summary> 186 /// </summary>
187 /// <returns>Storage provider name</returns> 187 /// <returns>Storage provider name</returns>
188 public string getName() 188 public string getName()
189 { 189 {
190 return "DB4o Userdata"; 190 return "DB4o Userdata";
191 } 191 }
192 192
193 /// <summary> 193 /// <summary>
194 /// Returns the version of the storage provider 194 /// Returns the version of the storage provider
195 /// </summary> 195 /// </summary>
196 /// <returns>Storage provider version</returns> 196 /// <returns>Storage provider version</returns>
197 public string getVersion() 197 public string getVersion()
198 { 198 {
199 return "0.1"; 199 return "0.1";
200 } 200 }
201 } 201 }
202} 202}
diff --git a/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs
index 905cd9b..52d09fa 100644
--- a/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Framework.Data.DB4o")] 6[assembly: AssemblyTitle("OpenSim.Framework.Data.DB4o")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Framework.Data.DB4o")] 10[assembly: AssemblyProduct("OpenSim.Framework.Data.DB4o")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("57991e15-79da-41b7-aa06-2e6b49165a63")] 21[assembly: Guid("57991e15-79da-41b7-aa06-2e6b49165a63")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
index ca9196a5..dc60ca4 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
@@ -1,194 +1,194 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Security.Cryptography; 31using System.Security.Cryptography;
32using System.Text; 32using System.Text;
33using libsecondlife; 33using libsecondlife;
34 34
35namespace OpenSim.Framework.Data.MSSQL 35namespace OpenSim.Framework.Data.MSSQL
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// A grid data interface for Microsoft SQL Server 38 /// A grid data interface for Microsoft SQL Server
39 /// </summary> 39 /// </summary>
40 public class SqlGridData : IGridData 40 public class SqlGridData : IGridData
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// Database manager 43 /// Database manager
44 /// </summary> 44 /// </summary>
45 private MSSqlManager database; 45 private MSSqlManager database;
46 46
47 /// <summary> 47 /// <summary>
48 /// Initialises the Grid Interface 48 /// Initialises the Grid Interface
49 /// </summary> 49 /// </summary>
50 public void Initialise() 50 public void Initialise()
51 { 51 {
52 database = new MSSqlManager("localhost", "db", "user", "password", "false"); 52 database = new MSSqlManager("localhost", "db", "user", "password", "false");
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 /// Shuts down the grid interface 56 /// Shuts down the grid interface
57 /// </summary> 57 /// </summary>
58 public void Close() 58 public void Close()
59 { 59 {
60 database.Close(); 60 database.Close();
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Returns the storage system name 64 /// Returns the storage system name
65 /// </summary> 65 /// </summary>
66 /// <returns>A string containing the storage system name</returns> 66 /// <returns>A string containing the storage system name</returns>
67 public string getName() 67 public string getName()
68 { 68 {
69 return "Sql OpenGridData"; 69 return "Sql OpenGridData";
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// Returns the storage system version 73 /// Returns the storage system version
74 /// </summary> 74 /// </summary>
75 /// <returns>A string containing the storage system version</returns> 75 /// <returns>A string containing the storage system version</returns>
76 public string getVersion() 76 public string getVersion()
77 { 77 {
78 return "0.1"; 78 return "0.1";
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Returns a list of regions within the specified ranges 82 /// Returns a list of regions within the specified ranges
83 /// </summary> 83 /// </summary>
84 /// <param name="a">minimum X coordinate</param> 84 /// <param name="a">minimum X coordinate</param>
85 /// <param name="b">minimum Y coordinate</param> 85 /// <param name="b">minimum Y coordinate</param>
86 /// <param name="c">maximum X coordinate</param> 86 /// <param name="c">maximum X coordinate</param>
87 /// <param name="d">maximum Y coordinate</param> 87 /// <param name="d">maximum Y coordinate</param>
88 /// <returns>An array of region profiles</returns> 88 /// <returns>An array of region profiles</returns>
89 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) 89 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
90 { 90 {
91 return null; 91 return null;
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// Returns a sim profile from it's location 95 /// Returns a sim profile from it's location
96 /// </summary> 96 /// </summary>
97 /// <param name="handle">Region location handle</param> 97 /// <param name="handle">Region location handle</param>
98 /// <returns>Sim profile</returns> 98 /// <returns>Sim profile</returns>
99 public SimProfileData GetProfileByHandle(ulong handle) 99 public SimProfileData GetProfileByHandle(ulong handle)
100 { 100 {
101 Dictionary<string, string> param = new Dictionary<string, string>(); 101 Dictionary<string, string> param = new Dictionary<string, string>();
102 param["handle"] = handle.ToString(); 102 param["handle"] = handle.ToString();
103 103
104 IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); 104 IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
105 IDataReader reader = result.ExecuteReader(); 105 IDataReader reader = result.ExecuteReader();
106 106
107 SimProfileData row = database.getRow(reader); 107 SimProfileData row = database.getRow(reader);
108 reader.Close(); 108 reader.Close();
109 result.Dispose(); 109 result.Dispose();
110 110
111 return row; 111 return row;
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Returns a sim profile from it's UUID 115 /// Returns a sim profile from it's UUID
116 /// </summary> 116 /// </summary>
117 /// <param name="uuid">The region UUID</param> 117 /// <param name="uuid">The region UUID</param>
118 /// <returns>The sim profile</returns> 118 /// <returns>The sim profile</returns>
119 public SimProfileData GetProfileByLLUUID(LLUUID uuid) 119 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
120 { 120 {
121 Dictionary<string, string> param = new Dictionary<string, string>(); 121 Dictionary<string, string> param = new Dictionary<string, string>();
122 param["uuid"] = uuid.ToStringHyphenated(); 122 param["uuid"] = uuid.ToStringHyphenated();
123 123
124 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); 124 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
125 IDataReader reader = result.ExecuteReader(); 125 IDataReader reader = result.ExecuteReader();
126 126
127 SimProfileData row = database.getRow(reader); 127 SimProfileData row = database.getRow(reader);
128 reader.Close(); 128 reader.Close();
129 result.Dispose(); 129 result.Dispose();
130 130
131 return row; 131 return row;
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Adds a new specified region to the database 135 /// Adds a new specified region to the database
136 /// </summary> 136 /// </summary>
137 /// <param name="profile">The profile to add</param> 137 /// <param name="profile">The profile to add</param>
138 /// <returns>A dataresponse enum indicating success</returns> 138 /// <returns>A dataresponse enum indicating success</returns>
139 public DataResponse AddProfile(SimProfileData profile) 139 public DataResponse AddProfile(SimProfileData profile)
140 { 140 {
141 if (database.insertRow(profile)) 141 if (database.insertRow(profile))
142 { 142 {
143 return DataResponse.RESPONSE_OK; 143 return DataResponse.RESPONSE_OK;
144 } 144 }
145 else 145 else
146 { 146 {
147 return DataResponse.RESPONSE_ERROR; 147 return DataResponse.RESPONSE_ERROR;
148 } 148 }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. 152 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
153 /// </summary> 153 /// </summary>
154 /// <param name="uuid">The UUID of the challenger</param> 154 /// <param name="uuid">The UUID of the challenger</param>
155 /// <param name="handle">The attempted regionHandle of the challenger</param> 155 /// <param name="handle">The attempted regionHandle of the challenger</param>
156 /// <param name="authkey">The secret</param> 156 /// <param name="authkey">The secret</param>
157 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 157 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
158 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 158 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey)
159 { 159 {
160 bool throwHissyFit = false; // Should be true by 1.0 160 bool throwHissyFit = false; // Should be true by 1.0
161 161
162 if (throwHissyFit) 162 if (throwHissyFit)
163 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 163 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
164 164
165 SimProfileData data = GetProfileByLLUUID(uuid); 165 SimProfileData data = GetProfileByLLUUID(uuid);
166 166
167 return (handle == data.regionHandle && authkey == data.regionSecret); 167 return (handle == data.regionHandle && authkey == data.regionSecret);
168 } 168 }
169 169
170 /// <summary> 170 /// <summary>
171 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region 171 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
172 /// </summary> 172 /// </summary>
173 /// <remarks>This requires a security audit.</remarks> 173 /// <remarks>This requires a security audit.</remarks>
174 /// <param name="uuid"></param> 174 /// <param name="uuid"></param>
175 /// <param name="handle"></param> 175 /// <param name="handle"></param>
176 /// <param name="authhash"></param> 176 /// <param name="authhash"></param>
177 /// <param name="challenge"></param> 177 /// <param name="challenge"></param>
178 /// <returns></returns> 178 /// <returns></returns>
179 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 179 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
180 { 180 {
181 SHA512Managed HashProvider = new SHA512Managed(); 181 SHA512Managed HashProvider = new SHA512Managed();
182 ASCIIEncoding TextProvider = new ASCIIEncoding(); 182 ASCIIEncoding TextProvider = new ASCIIEncoding();
183 183
184 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); 184 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
185 byte[] hash = HashProvider.ComputeHash(stream); 185 byte[] hash = HashProvider.ComputeHash(stream);
186 return false; 186 return false;
187 } 187 }
188 public ReservationData GetReservationAtPoint(uint x, uint y) 188 public ReservationData GetReservationAtPoint(uint x, uint y)
189 { 189 {
190 return null; 190 return null;
191 } 191 }
192 } 192 }
193 193
194} 194}
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
index 49bf31c..26677a5 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
@@ -1,211 +1,211 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using libsecondlife; 32using libsecondlife;
33 33
34namespace OpenSim.Framework.Data.MSSQL 34namespace OpenSim.Framework.Data.MSSQL
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// A management class for the MS SQL Storage Engine 37 /// A management class for the MS SQL Storage Engine
38 /// </summary> 38 /// </summary>
39 class MSSqlManager 39 class MSSqlManager
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// The database connection object 42 /// The database connection object
43 /// </summary> 43 /// </summary>
44 IDbConnection dbcon; 44 IDbConnection dbcon;
45 45
46 /// <summary> 46 /// <summary>
47 /// Initialises and creates a new Sql connection and maintains it. 47 /// Initialises and creates a new Sql connection and maintains it.
48 /// </summary> 48 /// </summary>
49 /// <param name="hostname">The Sql server being connected to</param> 49 /// <param name="hostname">The Sql server being connected to</param>
50 /// <param name="database">The name of the Sql database being used</param> 50 /// <param name="database">The name of the Sql database being used</param>
51 /// <param name="username">The username logging into the database</param> 51 /// <param name="username">The username logging into the database</param>
52 /// <param name="password">The password for the user logging in</param> 52 /// <param name="password">The password for the user logging in</param>
53 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> 53 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
54 public MSSqlManager(string hostname, string database, string username, string password, string cpooling) 54 public MSSqlManager(string hostname, string database, string username, string password, string cpooling)
55 { 55 {
56 try 56 try
57 { 57 {
58 string connectionString = "Server=" + hostname + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";"; 58 string connectionString = "Server=" + hostname + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
59 dbcon = new SqlConnection(connectionString); 59 dbcon = new SqlConnection(connectionString);
60 60
61 dbcon.Open(); 61 dbcon.Open();
62 } 62 }
63 catch (Exception e) 63 catch (Exception e)
64 { 64 {
65 throw new Exception("Error initialising Sql Database: " + e.ToString()); 65 throw new Exception("Error initialising Sql Database: " + e.ToString());
66 } 66 }
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// Shuts down the database connection 70 /// Shuts down the database connection
71 /// </summary> 71 /// </summary>
72 public void Close() 72 public void Close()
73 { 73 {
74 dbcon.Close(); 74 dbcon.Close();
75 dbcon = null; 75 dbcon = null;
76 } 76 }
77 77
78 /// <summary> 78 /// <summary>
79 /// Runs a query with protection against SQL Injection by using parameterised input. 79 /// Runs a query with protection against SQL Injection by using parameterised input.
80 /// </summary> 80 /// </summary>
81 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> 81 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
82 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> 82 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
83 /// <returns>A Sql DB Command</returns> 83 /// <returns>A Sql DB Command</returns>
84 public IDbCommand Query(string sql, Dictionary<string, string> parameters) 84 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
85 { 85 {
86 SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand(); 86 SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand();
87 dbcommand.CommandText = sql; 87 dbcommand.CommandText = sql;
88 foreach (KeyValuePair<string, string> param in parameters) 88 foreach (KeyValuePair<string, string> param in parameters)
89 { 89 {
90 dbcommand.Parameters.AddWithValue(param.Key, param.Value); 90 dbcommand.Parameters.AddWithValue(param.Key, param.Value);
91 } 91 }
92 92
93 return (IDbCommand)dbcommand; 93 return (IDbCommand)dbcommand;
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Runs a database reader object and returns a region row 97 /// Runs a database reader object and returns a region row
98 /// </summary> 98 /// </summary>
99 /// <param name="reader">An active database reader</param> 99 /// <param name="reader">An active database reader</param>
100 /// <returns>A region row</returns> 100 /// <returns>A region row</returns>
101 public SimProfileData getRow(IDataReader reader) 101 public SimProfileData getRow(IDataReader reader)
102 { 102 {
103 SimProfileData regionprofile = new SimProfileData(); 103 SimProfileData regionprofile = new SimProfileData();
104 104
105 if (reader.Read()) 105 if (reader.Read())
106 { 106 {
107 // Region Main 107 // Region Main
108 regionprofile.regionHandle = (ulong)reader["regionHandle"]; 108 regionprofile.regionHandle = (ulong)reader["regionHandle"];
109 regionprofile.regionName = (string)reader["regionName"]; 109 regionprofile.regionName = (string)reader["regionName"];
110 regionprofile.UUID = new LLUUID((string)reader["uuid"]); 110 regionprofile.UUID = new LLUUID((string)reader["uuid"]);
111 111
112 // Secrets 112 // Secrets
113 regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; 113 regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
114 regionprofile.regionSecret = (string)reader["regionSecret"]; 114 regionprofile.regionSecret = (string)reader["regionSecret"];
115 regionprofile.regionSendKey = (string)reader["regionSendKey"]; 115 regionprofile.regionSendKey = (string)reader["regionSendKey"];
116 116
117 // Region Server 117 // Region Server
118 regionprofile.regionDataURI = (string)reader["regionDataURI"]; 118 regionprofile.regionDataURI = (string)reader["regionDataURI"];
119 regionprofile.regionOnline = false; // Needs to be pinged before this can be set. 119 regionprofile.regionOnline = false; // Needs to be pinged before this can be set.
120 regionprofile.serverIP = (string)reader["serverIP"]; 120 regionprofile.serverIP = (string)reader["serverIP"];
121 regionprofile.serverPort = (uint)reader["serverPort"]; 121 regionprofile.serverPort = (uint)reader["serverPort"];
122 regionprofile.serverURI = (string)reader["serverURI"]; 122 regionprofile.serverURI = (string)reader["serverURI"];
123 123
124 // Location 124 // Location
125 regionprofile.regionLocX = (uint)((int)reader["locX"]); 125 regionprofile.regionLocX = (uint)((int)reader["locX"]);
126 regionprofile.regionLocY = (uint)((int)reader["locY"]); 126 regionprofile.regionLocY = (uint)((int)reader["locY"]);
127 regionprofile.regionLocZ = (uint)((int)reader["locZ"]); 127 regionprofile.regionLocZ = (uint)((int)reader["locZ"]);
128 128
129 // Neighbours - 0 = No Override 129 // Neighbours - 0 = No Override
130 regionprofile.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"]; 130 regionprofile.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
131 regionprofile.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"]; 131 regionprofile.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
132 regionprofile.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"]; 132 regionprofile.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
133 regionprofile.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"]; 133 regionprofile.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
134 134
135 // Assets 135 // Assets
136 regionprofile.regionAssetURI = (string)reader["regionAssetURI"]; 136 regionprofile.regionAssetURI = (string)reader["regionAssetURI"];
137 regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; 137 regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
138 regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"]; 138 regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"];
139 139
140 // Userserver 140 // Userserver
141 regionprofile.regionUserURI = (string)reader["regionUserURI"]; 141 regionprofile.regionUserURI = (string)reader["regionUserURI"];
142 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 142 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
143 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; 143 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
144 } 144 }
145 else 145 else
146 { 146 {
147 throw new Exception("No rows to return"); 147 throw new Exception("No rows to return");
148 } 148 }
149 return regionprofile; 149 return regionprofile;
150 } 150 }
151 151
152 /// <summary> 152 /// <summary>
153 /// Creates a new region in the database 153 /// Creates a new region in the database
154 /// </summary> 154 /// </summary>
155 /// <param name="profile">The region profile to insert</param> 155 /// <param name="profile">The region profile to insert</param>
156 /// <returns>Successful?</returns> 156 /// <returns>Successful?</returns>
157 public bool insertRow(SimProfileData profile) 157 public bool insertRow(SimProfileData profile)
158 { 158 {
159 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; 159 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
160 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; 160 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
161 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES "; 161 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
162 162
163 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; 163 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
164 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; 164 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
165 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);"; 165 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
166 166
167 Dictionary<string, string> parameters = new Dictionary<string, string>(); 167 Dictionary<string, string> parameters = new Dictionary<string, string>();
168 168
169 parameters["regionHandle"] = profile.regionHandle.ToString(); 169 parameters["regionHandle"] = profile.regionHandle.ToString();
170 parameters["regionName"] = profile.regionName; 170 parameters["regionName"] = profile.regionName;
171 parameters["uuid"] = profile.UUID.ToString(); 171 parameters["uuid"] = profile.UUID.ToString();
172 parameters["regionRecvKey"] = profile.regionRecvKey; 172 parameters["regionRecvKey"] = profile.regionRecvKey;
173 parameters["regionSendKey"] = profile.regionSendKey; 173 parameters["regionSendKey"] = profile.regionSendKey;
174 parameters["regionDataURI"] = profile.regionDataURI; 174 parameters["regionDataURI"] = profile.regionDataURI;
175 parameters["serverIP"] = profile.serverIP; 175 parameters["serverIP"] = profile.serverIP;
176 parameters["serverPort"] = profile.serverPort.ToString(); 176 parameters["serverPort"] = profile.serverPort.ToString();
177 parameters["serverURI"] = profile.serverURI; 177 parameters["serverURI"] = profile.serverURI;
178 parameters["locX"] = profile.regionLocX.ToString(); 178 parameters["locX"] = profile.regionLocX.ToString();
179 parameters["locY"] = profile.regionLocY.ToString(); 179 parameters["locY"] = profile.regionLocY.ToString();
180 parameters["locZ"] = profile.regionLocZ.ToString(); 180 parameters["locZ"] = profile.regionLocZ.ToString();
181 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString(); 181 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
182 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString(); 182 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
183 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString(); 183 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
184 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString(); 184 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
185 parameters["regionAssetURI"] = profile.regionAssetURI; 185 parameters["regionAssetURI"] = profile.regionAssetURI;
186 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey; 186 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
187 parameters["regionAssetSendKey"] = profile.regionAssetSendKey; 187 parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
188 parameters["regionUserURI"] = profile.regionUserURI; 188 parameters["regionUserURI"] = profile.regionUserURI;
189 parameters["regionUserRecvKey"] = profile.regionUserRecvKey; 189 parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
190 parameters["regionUserSendKey"] = profile.regionUserSendKey; 190 parameters["regionUserSendKey"] = profile.regionUserSendKey;
191 191
192 bool returnval = false; 192 bool returnval = false;
193 193
194 try 194 try
195 { 195 {
196 IDbCommand result = Query(sql, parameters); 196 IDbCommand result = Query(sql, parameters);
197 197
198 if (result.ExecuteNonQuery() == 1) 198 if (result.ExecuteNonQuery() == 1)
199 returnval = true; 199 returnval = true;
200 200
201 result.Dispose(); 201 result.Dispose();
202 } 202 }
203 catch (Exception) 203 catch (Exception)
204 { 204 {
205 return false; 205 return false;
206 } 206 }
207 207
208 return returnval; 208 return returnval;
209 } 209 }
210 } 210 }
211} 211}
diff --git a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs
index 066c739..eeac06c 100644
--- a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Framework.Data.MSSQL")] 6[assembly: AssemblyTitle("OpenSim.Framework.Data.MSSQL")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Framework.Data.MSSQL")] 10[assembly: AssemblyProduct("OpenSim.Framework.Data.MSSQL")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("0e1c1ca4-2cf2-4315-b0e7-432c02feea8a")] 21[assembly: Guid("0e1c1ca4-2cf2-4315-b0e7-432c02feea8a")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
index ef643d2..09f5e83 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -1,287 +1,287 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Security.Cryptography; 31using System.Security.Cryptography;
32using System.Text; 32using System.Text;
33using libsecondlife; 33using libsecondlife;
34 34
35namespace OpenSim.Framework.Data.MySQL 35namespace OpenSim.Framework.Data.MySQL
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// A MySQL Interface for the Grid Server 38 /// A MySQL Interface for the Grid Server
39 /// </summary> 39 /// </summary>
40 public class MySQLGridData : IGridData 40 public class MySQLGridData : IGridData
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// MySQL Database Manager 43 /// MySQL Database Manager
44 /// </summary> 44 /// </summary>
45 private MySQLManager database; 45 private MySQLManager database;
46 46
47 /// <summary> 47 /// <summary>
48 /// Initialises the Grid Interface 48 /// Initialises the Grid Interface
49 /// </summary> 49 /// </summary>
50 public void Initialise() 50 public void Initialise()
51 { 51 {
52 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 52 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
53 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 53 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
54 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 54 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
55 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 55 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
56 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 56 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
57 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 57 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
58 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 58 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
59 59
60 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); 60 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Shuts down the grid interface 64 /// Shuts down the grid interface
65 /// </summary> 65 /// </summary>
66 public void Close() 66 public void Close()
67 { 67 {
68 database.Close(); 68 database.Close();
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Returns the plugin name 72 /// Returns the plugin name
73 /// </summary> 73 /// </summary>
74 /// <returns>Plugin name</returns> 74 /// <returns>Plugin name</returns>
75 public string getName() 75 public string getName()
76 { 76 {
77 return "MySql OpenGridData"; 77 return "MySql OpenGridData";
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Returns the plugin version 81 /// Returns the plugin version
82 /// </summary> 82 /// </summary>
83 /// <returns>Plugin version</returns> 83 /// <returns>Plugin version</returns>
84 public string getVersion() 84 public string getVersion()
85 { 85 {
86 return "0.1"; 86 return "0.1";
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// Returns all the specified region profiles within coordates -- coordinates are inclusive 90 /// Returns all the specified region profiles within coordates -- coordinates are inclusive
91 /// </summary> 91 /// </summary>
92 /// <param name="xmin">Minimum X coordinate</param> 92 /// <param name="xmin">Minimum X coordinate</param>
93 /// <param name="ymin">Minimum Y coordinate</param> 93 /// <param name="ymin">Minimum Y coordinate</param>
94 /// <param name="xmax">Maximum X coordinate</param> 94 /// <param name="xmax">Maximum X coordinate</param>
95 /// <param name="ymax">Maximum Y coordinate</param> 95 /// <param name="ymax">Maximum Y coordinate</param>
96 /// <returns></returns> 96 /// <returns></returns>
97 public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax) 97 public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax)
98 { 98 {
99 try 99 try
100 { 100 {
101 lock (database) 101 lock (database)
102 { 102 {
103 Dictionary<string, string> param = new Dictionary<string, string>(); 103 Dictionary<string, string> param = new Dictionary<string, string>();
104 param["?xmin"] = xmin.ToString(); 104 param["?xmin"] = xmin.ToString();
105 param["?ymin"] = ymin.ToString(); 105 param["?ymin"] = ymin.ToString();
106 param["?xmax"] = xmax.ToString(); 106 param["?xmax"] = xmax.ToString();
107 param["?ymax"] = ymax.ToString(); 107 param["?ymax"] = ymax.ToString();
108 108
109 IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param); 109 IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param);
110 IDataReader reader = result.ExecuteReader(); 110 IDataReader reader = result.ExecuteReader();
111 111
112 SimProfileData row; 112 SimProfileData row;
113 113
114 List<SimProfileData> rows = new List<SimProfileData>(); 114 List<SimProfileData> rows = new List<SimProfileData>();
115 115
116 while ((row = database.readSimRow(reader)) != null) 116 while ((row = database.readSimRow(reader)) != null)
117 { 117 {
118 rows.Add(row); 118 rows.Add(row);
119 } 119 }
120 reader.Close(); 120 reader.Close();
121 result.Dispose(); 121 result.Dispose();
122 122
123 return rows.ToArray(); 123 return rows.ToArray();
124 124
125 } 125 }
126 } 126 }
127 catch (Exception e) 127 catch (Exception e)
128 { 128 {
129 database.Reconnect(); 129 database.Reconnect();
130 Console.WriteLine(e.ToString()); 130 Console.WriteLine(e.ToString());
131 return null; 131 return null;
132 } 132 }
133 } 133 }
134 134
135 /// <summary> 135 /// <summary>
136 /// Returns a sim profile from it's location 136 /// Returns a sim profile from it's location
137 /// </summary> 137 /// </summary>
138 /// <param name="handle">Region location handle</param> 138 /// <param name="handle">Region location handle</param>
139 /// <returns>Sim profile</returns> 139 /// <returns>Sim profile</returns>
140 public SimProfileData GetProfileByHandle(ulong handle) 140 public SimProfileData GetProfileByHandle(ulong handle)
141 { 141 {
142 try 142 try
143 { 143 {
144 lock (database) 144 lock (database)
145 { 145 {
146 Dictionary<string, string> param = new Dictionary<string, string>(); 146 Dictionary<string, string> param = new Dictionary<string, string>();
147 param["?handle"] = handle.ToString(); 147 param["?handle"] = handle.ToString();
148 148
149 IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param); 149 IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param);
150 IDataReader reader = result.ExecuteReader(); 150 IDataReader reader = result.ExecuteReader();
151 151
152 SimProfileData row = database.readSimRow(reader); 152 SimProfileData row = database.readSimRow(reader);
153 reader.Close(); 153 reader.Close();
154 result.Dispose(); 154 result.Dispose();
155 155
156 return row; 156 return row;
157 } 157 }
158 } 158 }
159 catch (Exception e) 159 catch (Exception e)
160 { 160 {
161 database.Reconnect(); 161 database.Reconnect();
162 Console.WriteLine(e.ToString()); 162 Console.WriteLine(e.ToString());
163 return null; 163 return null;
164 } 164 }
165 } 165 }
166 166
167 /// <summary> 167 /// <summary>
168 /// Returns a sim profile from it's UUID 168 /// Returns a sim profile from it's UUID
169 /// </summary> 169 /// </summary>
170 /// <param name="uuid">The region UUID</param> 170 /// <param name="uuid">The region UUID</param>
171 /// <returns>The sim profile</returns> 171 /// <returns>The sim profile</returns>
172 public SimProfileData GetProfileByLLUUID(LLUUID uuid) 172 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
173 { 173 {
174 try 174 try
175 { 175 {
176 lock (database) 176 lock (database)
177 { 177 {
178 Dictionary<string, string> param = new Dictionary<string, string>(); 178 Dictionary<string, string> param = new Dictionary<string, string>();
179 param["?uuid"] = uuid.ToStringHyphenated(); 179 param["?uuid"] = uuid.ToStringHyphenated();
180 180
181 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); 181 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param);
182 IDataReader reader = result.ExecuteReader(); 182 IDataReader reader = result.ExecuteReader();
183 183
184 SimProfileData row = database.readSimRow(reader); 184 SimProfileData row = database.readSimRow(reader);
185 reader.Close(); 185 reader.Close();
186 result.Dispose(); 186 result.Dispose();
187 187
188 return row; 188 return row;
189 } 189 }
190 } 190 }
191 catch (Exception e) 191 catch (Exception e)
192 { 192 {
193 database.Reconnect(); 193 database.Reconnect();
194 Console.WriteLine(e.ToString()); 194 Console.WriteLine(e.ToString());
195 return null; 195 return null;
196 } 196 }
197 } 197 }
198 198
199 /// <summary> 199 /// <summary>
200 /// Adds a new profile to the database 200 /// Adds a new profile to the database
201 /// </summary> 201 /// </summary>
202 /// <param name="profile">The profile to add</param> 202 /// <param name="profile">The profile to add</param>
203 /// <returns>Successful?</returns> 203 /// <returns>Successful?</returns>
204 public DataResponse AddProfile(SimProfileData profile) 204 public DataResponse AddProfile(SimProfileData profile)
205 { 205 {
206 lock (database) 206 lock (database)
207 { 207 {
208 if (database.insertRegion(profile)) 208 if (database.insertRegion(profile))
209 { 209 {
210 return DataResponse.RESPONSE_OK; 210 return DataResponse.RESPONSE_OK;
211 } 211 }
212 else 212 else
213 { 213 {
214 return DataResponse.RESPONSE_ERROR; 214 return DataResponse.RESPONSE_ERROR;
215 } 215 }
216 } 216 }
217 } 217 }
218 218
219 /// <summary> 219 /// <summary>
220 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. 220 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
221 /// </summary> 221 /// </summary>
222 /// <param name="uuid">The UUID of the challenger</param> 222 /// <param name="uuid">The UUID of the challenger</param>
223 /// <param name="handle">The attempted regionHandle of the challenger</param> 223 /// <param name="handle">The attempted regionHandle of the challenger</param>
224 /// <param name="authkey">The secret</param> 224 /// <param name="authkey">The secret</param>
225 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 225 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
226 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 226 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey)
227 { 227 {
228 bool throwHissyFit = false; // Should be true by 1.0 228 bool throwHissyFit = false; // Should be true by 1.0
229 229
230 if (throwHissyFit) 230 if (throwHissyFit)
231 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 231 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
232 232
233 SimProfileData data = GetProfileByLLUUID(uuid); 233 SimProfileData data = GetProfileByLLUUID(uuid);
234 234
235 return (handle == data.regionHandle && authkey == data.regionSecret); 235 return (handle == data.regionHandle && authkey == data.regionSecret);
236 } 236 }
237 237
238 /// <summary> 238 /// <summary>
239 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region 239 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
240 /// </summary> 240 /// </summary>
241 /// <remarks>This requires a security audit.</remarks> 241 /// <remarks>This requires a security audit.</remarks>
242 /// <param name="uuid"></param> 242 /// <param name="uuid"></param>
243 /// <param name="handle"></param> 243 /// <param name="handle"></param>
244 /// <param name="authhash"></param> 244 /// <param name="authhash"></param>
245 /// <param name="challenge"></param> 245 /// <param name="challenge"></param>
246 /// <returns></returns> 246 /// <returns></returns>
247 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 247 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
248 { 248 {
249 SHA512Managed HashProvider = new SHA512Managed(); 249 SHA512Managed HashProvider = new SHA512Managed();
250 ASCIIEncoding TextProvider = new ASCIIEncoding(); 250 ASCIIEncoding TextProvider = new ASCIIEncoding();
251 251
252 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); 252 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
253 byte[] hash = HashProvider.ComputeHash(stream); 253 byte[] hash = HashProvider.ComputeHash(stream);
254 254
255 return false; 255 return false;
256 } 256 }
257 257
258 public ReservationData GetReservationAtPoint(uint x, uint y) 258 public ReservationData GetReservationAtPoint(uint x, uint y)
259 { 259 {
260 try 260 try
261 { 261 {
262 lock (database) 262 lock (database)
263 { 263 {
264 Dictionary<string, string> param = new Dictionary<string, string>(); 264 Dictionary<string, string> param = new Dictionary<string, string>();
265 param["?x"] = x.ToString(); 265 param["?x"] = x.ToString();
266 param["?y"] = y.ToString(); 266 param["?y"] = y.ToString();
267 IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param); 267 IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param);
268 IDataReader reader = result.ExecuteReader(); 268 IDataReader reader = result.ExecuteReader();
269 269
270 ReservationData row = database.readReservationRow(reader); 270 ReservationData row = database.readReservationRow(reader);
271 reader.Close(); 271 reader.Close();
272 result.Dispose(); 272 result.Dispose();
273 273
274 return row; 274 return row;
275 } 275 }
276 } 276 }
277 catch (Exception e) 277 catch (Exception e)
278 { 278 {
279 database.Reconnect(); 279 database.Reconnect();
280 Console.WriteLine(e.ToString()); 280 Console.WriteLine(e.ToString());
281 return null; 281 return null;
282 } 282 }
283 } 283 }
284 } 284 }
285 285
286 286
287} 287}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
index 790759a..d32db1b 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
@@ -1,309 +1,309 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using libsecondlife; 31using libsecondlife;
32 32
33namespace OpenSim.Framework.Data.MySQL 33namespace OpenSim.Framework.Data.MySQL
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// A MySQL interface for the inventory server 36 /// A MySQL interface for the inventory server
37 /// </summary> 37 /// </summary>
38 class MySQLInventoryData : IInventoryData 38 class MySQLInventoryData : IInventoryData
39 { 39 {
40 /// <summary> 40 /// <summary>
41 /// The database manager 41 /// The database manager
42 /// </summary> 42 /// </summary>
43 public MySQLManager database; 43 public MySQLManager database;
44 44
45 /// <summary> 45 /// <summary>
46 /// Loads and initialises this database plugin 46 /// Loads and initialises this database plugin
47 /// </summary> 47 /// </summary>
48 public void Initialise() 48 public void Initialise()
49 { 49 {
50 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 50 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
51 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 51 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
52 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 52 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
53 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 53 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
54 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 54 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
55 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 55 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
56 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 56 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
57 57
58 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); 58 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
59 } 59 }
60 60
61 /// <summary> 61 /// <summary>
62 /// The name of this DB provider 62 /// The name of this DB provider
63 /// </summary> 63 /// </summary>
64 /// <returns>Name of DB provider</returns> 64 /// <returns>Name of DB provider</returns>
65 public string getName() 65 public string getName()
66 { 66 {
67 return "MySQL Inventory Data Interface"; 67 return "MySQL Inventory Data Interface";
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// Closes this DB provider 71 /// Closes this DB provider
72 /// </summary> 72 /// </summary>
73 public void Close() 73 public void Close()
74 { 74 {
75 // Do nothing. 75 // Do nothing.
76 } 76 }
77 77
78 /// <summary> 78 /// <summary>
79 /// Returns the version of this DB provider 79 /// Returns the version of this DB provider
80 /// </summary> 80 /// </summary>
81 /// <returns>A string containing the DB provider</returns> 81 /// <returns>A string containing the DB provider</returns>
82 public string getVersion() 82 public string getVersion()
83 { 83 {
84 return "0.1"; 84 return "0.1";
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Returns a list of items in a specified folder 88 /// Returns a list of items in a specified folder
89 /// </summary> 89 /// </summary>
90 /// <param name="folderID">The folder to search</param> 90 /// <param name="folderID">The folder to search</param>
91 /// <returns>A list containing inventory items</returns> 91 /// <returns>A list containing inventory items</returns>
92 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 92 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID)
93 { 93 {
94 try 94 try
95 { 95 {
96 lock (database) 96 lock (database)
97 { 97 {
98 Dictionary<string, string> param = new Dictionary<string, string>(); 98 Dictionary<string, string> param = new Dictionary<string, string>();
99 param["?uuid"] = folderID.ToStringHyphenated(); 99 param["?uuid"] = folderID.ToStringHyphenated();
100 100
101 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param); 101 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param);
102 IDataReader reader = result.ExecuteReader(); 102 IDataReader reader = result.ExecuteReader();
103 103
104 List<InventoryItemBase> items = database.readInventoryItems(reader); 104 List<InventoryItemBase> items = database.readInventoryItems(reader);
105 105
106 reader.Close(); 106 reader.Close();
107 result.Dispose(); 107 result.Dispose();
108 108
109 return items; 109 return items;
110 } 110 }
111 } 111 }
112 catch (Exception e) 112 catch (Exception e)
113 { 113 {
114 database.Reconnect(); 114 database.Reconnect();
115 Console.WriteLine(e.ToString()); 115 Console.WriteLine(e.ToString());
116 return null; 116 return null;
117 } 117 }
118 } 118 }
119 119
120 /// <summary> 120 /// <summary>
121 /// Returns a list of the root folders within a users inventory 121 /// Returns a list of the root folders within a users inventory
122 /// </summary> 122 /// </summary>
123 /// <param name="user">The user whos inventory is to be searched</param> 123 /// <param name="user">The user whos inventory is to be searched</param>
124 /// <returns>A list of folder objects</returns> 124 /// <returns>A list of folder objects</returns>
125 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 125 public List<InventoryFolderBase> getUserRootFolders(LLUUID user)
126 { 126 {
127 try 127 try
128 { 128 {
129 lock (database) 129 lock (database)
130 { 130 {
131 Dictionary<string, string> param = new Dictionary<string, string>(); 131 Dictionary<string, string> param = new Dictionary<string, string>();
132 param["?uuid"] = user.ToStringHyphenated(); 132 param["?uuid"] = user.ToStringHyphenated();
133 param["?zero"] = LLUUID.Zero.ToStringHyphenated(); 133 param["?zero"] = LLUUID.Zero.ToStringHyphenated();
134 134
135 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); 135 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param);
136 IDataReader reader = result.ExecuteReader(); 136 IDataReader reader = result.ExecuteReader();
137 137
138 List<InventoryFolderBase> items = database.readInventoryFolders(reader); 138 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
139 139
140 reader.Close(); 140 reader.Close();
141 result.Dispose(); 141 result.Dispose();
142 142
143 return items; 143 return items;
144 } 144 }
145 } 145 }
146 catch (Exception e) 146 catch (Exception e)
147 { 147 {
148 database.Reconnect(); 148 database.Reconnect();
149 Console.WriteLine(e.ToString()); 149 Console.WriteLine(e.ToString());
150 return null; 150 return null;
151 } 151 }
152 } 152 }
153 153
154 /// <summary> 154 /// <summary>
155 /// Returns a list of folders in a users inventory contained within the specified folder 155 /// Returns a list of folders in a users inventory contained within the specified folder
156 /// </summary> 156 /// </summary>
157 /// <param name="parentID">The folder to search</param> 157 /// <param name="parentID">The folder to search</param>
158 /// <returns>A list of inventory folders</returns> 158 /// <returns>A list of inventory folders</returns>
159 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 159 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID)
160 { 160 {
161 try 161 try
162 { 162 {
163 lock (database) 163 lock (database)
164 { 164 {
165 Dictionary<string, string> param = new Dictionary<string, string>(); 165 Dictionary<string, string> param = new Dictionary<string, string>();
166 param["?uuid"] = parentID.ToStringHyphenated(); 166 param["?uuid"] = parentID.ToStringHyphenated();
167 167
168 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param); 168 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param);
169 IDataReader reader = result.ExecuteReader(); 169 IDataReader reader = result.ExecuteReader();
170 170
171 List<InventoryFolderBase> items = database.readInventoryFolders(reader); 171 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
172 172
173 reader.Close(); 173 reader.Close();
174 result.Dispose(); 174 result.Dispose();
175 175
176 return items; 176 return items;
177 } 177 }
178 } 178 }
179 catch (Exception e) 179 catch (Exception e)
180 { 180 {
181 database.Reconnect(); 181 database.Reconnect();
182 Console.WriteLine(e.ToString()); 182 Console.WriteLine(e.ToString());
183 return null; 183 return null;
184 } 184 }
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// Returns a specified inventory item 188 /// Returns a specified inventory item
189 /// </summary> 189 /// </summary>
190 /// <param name="item">The item to return</param> 190 /// <param name="item">The item to return</param>
191 /// <returns>An inventory item</returns> 191 /// <returns>An inventory item</returns>
192 public InventoryItemBase getInventoryItem(LLUUID item) 192 public InventoryItemBase getInventoryItem(LLUUID item)
193 { 193 {
194 try 194 try
195 { 195 {
196 lock (database) 196 lock (database)
197 { 197 {
198 Dictionary<string, string> param = new Dictionary<string, string>(); 198 Dictionary<string, string> param = new Dictionary<string, string>();
199 param["?uuid"] = item.ToStringHyphenated(); 199 param["?uuid"] = item.ToStringHyphenated();
200 200
201 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param); 201 IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param);
202 IDataReader reader = result.ExecuteReader(); 202 IDataReader reader = result.ExecuteReader();
203 203
204 List<InventoryItemBase> items = database.readInventoryItems(reader); 204 List<InventoryItemBase> items = database.readInventoryItems(reader);
205 205
206 reader.Close(); 206 reader.Close();
207 result.Dispose(); 207 result.Dispose();
208 208
209 if (items.Count > 0) 209 if (items.Count > 0)
210 { 210 {
211 return items[0]; 211 return items[0];
212 } 212 }
213 else 213 else
214 { 214 {
215 return null; 215 return null;
216 } 216 }
217 } 217 }
218 } 218 }
219 catch (Exception e) 219 catch (Exception e)
220 { 220 {
221 database.Reconnect(); 221 database.Reconnect();
222 Console.WriteLine(e.ToString()); 222 Console.WriteLine(e.ToString());
223 return null; 223 return null;
224 } 224 }
225 } 225 }
226 226
227 /// <summary> 227 /// <summary>
228 /// Returns a specified inventory folder 228 /// Returns a specified inventory folder
229 /// </summary> 229 /// </summary>
230 /// <param name="folder">The folder to return</param> 230 /// <param name="folder">The folder to return</param>
231 /// <returns>A folder class</returns> 231 /// <returns>A folder class</returns>
232 public InventoryFolderBase getInventoryFolder(LLUUID folder) 232 public InventoryFolderBase getInventoryFolder(LLUUID folder)
233 { 233 {
234 try 234 try
235 { 235 {
236 lock (database) 236 lock (database)
237 { 237 {
238 Dictionary<string, string> param = new Dictionary<string, string>(); 238 Dictionary<string, string> param = new Dictionary<string, string>();
239 param["?uuid"] = folder.ToStringHyphenated(); 239 param["?uuid"] = folder.ToStringHyphenated();
240 240
241 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param); 241 IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param);
242 IDataReader reader = result.ExecuteReader(); 242 IDataReader reader = result.ExecuteReader();
243 243
244 List<InventoryFolderBase> items = database.readInventoryFolders(reader); 244 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
245 245
246 reader.Close(); 246 reader.Close();
247 result.Dispose(); 247 result.Dispose();
248 248
249 if (items.Count > 0) 249 if (items.Count > 0)
250 { 250 {
251 return items[0]; 251 return items[0];
252 } 252 }
253 else 253 else
254 { 254 {
255 return null; 255 return null;
256 } 256 }
257 } 257 }
258 } 258 }
259 catch (Exception e) 259 catch (Exception e)
260 { 260 {
261 database.Reconnect(); 261 database.Reconnect();
262 Console.WriteLine(e.ToString()); 262 Console.WriteLine(e.ToString());
263 return null; 263 return null;
264 } 264 }
265 } 265 }
266 266
267 /// <summary> 267 /// <summary>
268 /// Adds a specified item to the database 268 /// Adds a specified item to the database
269 /// </summary> 269 /// </summary>
270 /// <param name="item">The inventory item</param> 270 /// <param name="item">The inventory item</param>
271 public void addInventoryItem(InventoryItemBase item) 271 public void addInventoryItem(InventoryItemBase item)
272 { 272 {
273 lock (database) 273 lock (database)
274 { 274 {
275 database.insertItem(item); 275 database.insertItem(item);
276 } 276 }
277 } 277 }
278 278
279 /// <summary> 279 /// <summary>
280 /// Updates the specified inventory item 280 /// Updates the specified inventory item
281 /// </summary> 281 /// </summary>
282 /// <param name="item">Inventory item to update</param> 282 /// <param name="item">Inventory item to update</param>
283 public void updateInventoryItem(InventoryItemBase item) 283 public void updateInventoryItem(InventoryItemBase item)
284 { 284 {
285 addInventoryItem(item); 285 addInventoryItem(item);
286 } 286 }
287 287
288 /// <summary> 288 /// <summary>
289 /// Creates a new inventory folder 289 /// Creates a new inventory folder
290 /// </summary> 290 /// </summary>
291 /// <param name="folder">Folder to create</param> 291 /// <param name="folder">Folder to create</param>
292 public void addInventoryFolder(InventoryFolderBase folder) 292 public void addInventoryFolder(InventoryFolderBase folder)
293 { 293 {
294 lock (database) 294 lock (database)
295 { 295 {
296 database.insertFolder(folder); 296 database.insertFolder(folder);
297 } 297 }
298 } 298 }
299 299
300 /// <summary> 300 /// <summary>
301 /// Updates an inventory folder 301 /// Updates an inventory folder
302 /// </summary> 302 /// </summary>
303 /// <param name="folder">Folder to update</param> 303 /// <param name="folder">Folder to update</param>
304 public void updateInventoryFolder(InventoryFolderBase folder) 304 public void updateInventoryFolder(InventoryFolderBase folder)
305 { 305 {
306 addInventoryFolder(folder); 306 addInventoryFolder(folder);
307 } 307 }
308 } 308 }
309} 309}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs
index 38f9fd3..2ba9c3d 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs
@@ -1,105 +1,105 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29 29
30namespace OpenSim.Framework.Data.MySQL 30namespace OpenSim.Framework.Data.MySQL
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// An interface to the log database for MySQL 33 /// An interface to the log database for MySQL
34 /// </summary> 34 /// </summary>
35 class MySQLLogData : ILogData 35 class MySQLLogData : ILogData
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// The database manager 38 /// The database manager
39 /// </summary> 39 /// </summary>
40 public MySQLManager database; 40 public MySQLManager database;
41 41
42 /// <summary> 42 /// <summary>
43 /// Artificial constructor called when the plugin is loaded 43 /// Artificial constructor called when the plugin is loaded
44 /// </summary> 44 /// </summary>
45 public void Initialise() 45 public void Initialise()
46 { 46 {
47 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 47 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
48 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 48 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
49 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 49 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
50 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 50 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
51 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 51 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
52 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 52 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
53 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 53 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
54 54
55 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); 55 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Saves a log item to the database 59 /// Saves a log item to the database
60 /// </summary> 60 /// </summary>
61 /// <param name="serverDaemon">The daemon triggering the event</param> 61 /// <param name="serverDaemon">The daemon triggering the event</param>
62 /// <param name="target">The target of the action (region / agent UUID, etc)</param> 62 /// <param name="target">The target of the action (region / agent UUID, etc)</param>
63 /// <param name="methodCall">The method call where the problem occured</param> 63 /// <param name="methodCall">The method call where the problem occured</param>
64 /// <param name="arguments">The arguments passed to the method</param> 64 /// <param name="arguments">The arguments passed to the method</param>
65 /// <param name="priority">How critical is this?</param> 65 /// <param name="priority">How critical is this?</param>
66 /// <param name="logMessage">The message to log</param> 66 /// <param name="logMessage">The message to log</param>
67 public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) 67 public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
68 { 68 {
69 try 69 try
70 { 70 {
71 database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage); 71 database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage);
72 } 72 }
73 catch 73 catch
74 { 74 {
75 database.Reconnect(); 75 database.Reconnect();
76 } 76 }
77 } 77 }
78 78
79 /// <summary> 79 /// <summary>
80 /// Returns the name of this DB provider 80 /// Returns the name of this DB provider
81 /// </summary> 81 /// </summary>
82 /// <returns>A string containing the DB provider name</returns> 82 /// <returns>A string containing the DB provider name</returns>
83 public string getName() 83 public string getName()
84 { 84 {
85 return "MySQL Logdata Interface"; 85 return "MySQL Logdata Interface";
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// Closes the database provider 89 /// Closes the database provider
90 /// </summary> 90 /// </summary>
91 public void Close() 91 public void Close()
92 { 92 {
93 // Do nothing. 93 // Do nothing.
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Returns the version of this DB provider 97 /// Returns the version of this DB provider
98 /// </summary> 98 /// </summary>
99 /// <returns>A string containing the provider version</returns> 99 /// <returns>A string containing the provider version</returns>
100 public string getVersion() 100 public string getVersion()
101 { 101 {
102 return "0.1"; 102 return "0.1";
103 } 103 }
104 } 104 }
105} 105}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
index ab7f277..a5434c8 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
@@ -1,606 +1,606 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using libsecondlife; 31using libsecondlife;
32using MySql.Data.MySqlClient; 32using MySql.Data.MySqlClient;
33 33
34namespace OpenSim.Framework.Data.MySQL 34namespace OpenSim.Framework.Data.MySQL
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// A MySQL Database manager 37 /// A MySQL Database manager
38 /// </summary> 38 /// </summary>
39 class MySQLManager 39 class MySQLManager
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// The database connection object 42 /// The database connection object
43 /// </summary> 43 /// </summary>
44 IDbConnection dbcon; 44 IDbConnection dbcon;
45 /// <summary> 45 /// <summary>
46 /// Connection string for ADO.net 46 /// Connection string for ADO.net
47 /// </summary> 47 /// </summary>
48 string connectionString; 48 string connectionString;
49 49
50 /// <summary> 50 /// <summary>
51 /// Initialises and creates a new MySQL connection and maintains it. 51 /// Initialises and creates a new MySQL connection and maintains it.
52 /// </summary> 52 /// </summary>
53 /// <param name="hostname">The MySQL server being connected to</param> 53 /// <param name="hostname">The MySQL server being connected to</param>
54 /// <param name="database">The name of the MySQL database being used</param> 54 /// <param name="database">The name of the MySQL database being used</param>
55 /// <param name="username">The username logging into the database</param> 55 /// <param name="username">The username logging into the database</param>
56 /// <param name="password">The password for the user logging in</param> 56 /// <param name="password">The password for the user logging in</param>
57 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> 57 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
58 public MySQLManager(string hostname, string database, string username, string password, string cpooling, string port) 58 public MySQLManager(string hostname, string database, string username, string password, string cpooling, string port)
59 { 59 {
60 try 60 try
61 { 61 {
62 connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";"; 62 connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
63 dbcon = new MySqlConnection(connectionString); 63 dbcon = new MySqlConnection(connectionString);
64 64
65 dbcon.Open(); 65 dbcon.Open();
66 66
67 Console.WriteLine("MySQL connection established"); 67 Console.WriteLine("MySQL connection established");
68 } 68 }
69 catch (Exception e) 69 catch (Exception e)
70 { 70 {
71 throw new Exception("Error initialising MySql Database: " + e.ToString()); 71 throw new Exception("Error initialising MySql Database: " + e.ToString());
72 } 72 }
73 } 73 }
74 74
75 /// <summary> 75 /// <summary>
76 /// Shuts down the database connection 76 /// Shuts down the database connection
77 /// </summary> 77 /// </summary>
78 public void Close() 78 public void Close()
79 { 79 {
80 dbcon.Close(); 80 dbcon.Close();
81 dbcon = null; 81 dbcon = null;
82 } 82 }
83 83
84 /// <summary> 84 /// <summary>
85 /// Reconnects to the database 85 /// Reconnects to the database
86 /// </summary> 86 /// </summary>
87 public void Reconnect() 87 public void Reconnect()
88 { 88 {
89 lock (dbcon) 89 lock (dbcon)
90 { 90 {
91 try 91 try
92 { 92 {
93 // Close the DB connection 93 // Close the DB connection
94 dbcon.Close(); 94 dbcon.Close();
95 // Try reopen it 95 // Try reopen it
96 dbcon = new MySqlConnection(connectionString); 96 dbcon = new MySqlConnection(connectionString);
97 dbcon.Open(); 97 dbcon.Open();
98 } 98 }
99 catch (Exception e) 99 catch (Exception e)
100 { 100 {
101 Console.WriteLine("Unable to reconnect to database " + e.ToString()); 101 Console.WriteLine("Unable to reconnect to database " + e.ToString());
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// Runs a query with protection against SQL Injection by using parameterised input. 107 /// Runs a query with protection against SQL Injection by using parameterised input.
108 /// </summary> 108 /// </summary>
109 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> 109 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
110 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> 110 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
111 /// <returns>A MySQL DB Command</returns> 111 /// <returns>A MySQL DB Command</returns>
112 public IDbCommand Query(string sql, Dictionary<string, string> parameters) 112 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
113 { 113 {
114 try 114 try
115 { 115 {
116 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); 116 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
117 dbcommand.CommandText = sql; 117 dbcommand.CommandText = sql;
118 foreach (KeyValuePair<string, string> param in parameters) 118 foreach (KeyValuePair<string, string> param in parameters)
119 { 119 {
120 dbcommand.Parameters.Add(param.Key, param.Value); 120 dbcommand.Parameters.Add(param.Key, param.Value);
121 } 121 }
122 122
123 return (IDbCommand)dbcommand; 123 return (IDbCommand)dbcommand;
124 } 124 }
125 catch 125 catch
126 { 126 {
127 lock (dbcon) 127 lock (dbcon)
128 { 128 {
129 // Close the DB connection 129 // Close the DB connection
130 try 130 try
131 { 131 {
132 dbcon.Close(); 132 dbcon.Close();
133 } 133 }
134 catch { } 134 catch { }
135 135
136 // Try reopen it 136 // Try reopen it
137 try 137 try
138 { 138 {
139 dbcon = new MySqlConnection(connectionString); 139 dbcon = new MySqlConnection(connectionString);
140 dbcon.Open(); 140 dbcon.Open();
141 } 141 }
142 catch (Exception e) 142 catch (Exception e)
143 { 143 {
144 Console.WriteLine("Unable to reconnect to database " + e.ToString()); 144 Console.WriteLine("Unable to reconnect to database " + e.ToString());
145 } 145 }
146 146
147 // Run the query again 147 // Run the query again
148 try 148 try
149 { 149 {
150 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); 150 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
151 dbcommand.CommandText = sql; 151 dbcommand.CommandText = sql;
152 foreach (KeyValuePair<string, string> param in parameters) 152 foreach (KeyValuePair<string, string> param in parameters)
153 { 153 {
154 dbcommand.Parameters.Add(param.Key, param.Value); 154 dbcommand.Parameters.Add(param.Key, param.Value);
155 } 155 }
156 156
157 return (IDbCommand)dbcommand; 157 return (IDbCommand)dbcommand;
158 } 158 }
159 catch (Exception e) 159 catch (Exception e)
160 { 160 {
161 // Return null if it fails. 161 // Return null if it fails.
162 Console.WriteLine("Failed during Query generation: " + e.ToString()); 162 Console.WriteLine("Failed during Query generation: " + e.ToString());
163 return null; 163 return null;
164 } 164 }
165 } 165 }
166 } 166 }
167 } 167 }
168 168
169 /// <summary> 169 /// <summary>
170 /// Reads a region row from a database reader 170 /// Reads a region row from a database reader
171 /// </summary> 171 /// </summary>
172 /// <param name="reader">An active database reader</param> 172 /// <param name="reader">An active database reader</param>
173 /// <returns>A region profile</returns> 173 /// <returns>A region profile</returns>
174 public SimProfileData readSimRow(IDataReader reader) 174 public SimProfileData readSimRow(IDataReader reader)
175 { 175 {
176 SimProfileData retval = new SimProfileData(); 176 SimProfileData retval = new SimProfileData();
177 177
178 if (reader.Read()) 178 if (reader.Read())
179 { 179 {
180 // Region Main 180 // Region Main
181 retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString()); 181 retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString());
182 retval.regionName = (string)reader["regionName"]; 182 retval.regionName = (string)reader["regionName"];
183 retval.UUID = new LLUUID((string)reader["uuid"]); 183 retval.UUID = new LLUUID((string)reader["uuid"]);
184 184
185 // Secrets 185 // Secrets
186 retval.regionRecvKey = (string)reader["regionRecvKey"]; 186 retval.regionRecvKey = (string)reader["regionRecvKey"];
187 retval.regionSecret = (string)reader["regionSecret"]; 187 retval.regionSecret = (string)reader["regionSecret"];
188 retval.regionSendKey = (string)reader["regionSendKey"]; 188 retval.regionSendKey = (string)reader["regionSendKey"];
189 189
190 // Region Server 190 // Region Server
191 retval.regionDataURI = (string)reader["regionDataURI"]; 191 retval.regionDataURI = (string)reader["regionDataURI"];
192 retval.regionOnline = false; // Needs to be pinged before this can be set. 192 retval.regionOnline = false; // Needs to be pinged before this can be set.
193 retval.serverIP = (string)reader["serverIP"]; 193 retval.serverIP = (string)reader["serverIP"];
194 retval.serverPort = (uint)reader["serverPort"]; 194 retval.serverPort = (uint)reader["serverPort"];
195 retval.serverURI = (string)reader["serverURI"]; 195 retval.serverURI = (string)reader["serverURI"];
196 retval.httpPort = Convert.ToUInt32(reader["serverHttpPort"].ToString()); 196 retval.httpPort = Convert.ToUInt32(reader["serverHttpPort"].ToString());
197 retval.remotingPort = Convert.ToUInt32(reader["serverRemotingPort"].ToString()); 197 retval.remotingPort = Convert.ToUInt32(reader["serverRemotingPort"].ToString());
198 198
199 // Location 199 // Location
200 retval.regionLocX = Convert.ToUInt32(reader["locX"].ToString()); 200 retval.regionLocX = Convert.ToUInt32(reader["locX"].ToString());
201 retval.regionLocY = Convert.ToUInt32(reader["locY"].ToString()); 201 retval.regionLocY = Convert.ToUInt32(reader["locY"].ToString());
202 retval.regionLocZ = Convert.ToUInt32(reader["locZ"].ToString()); 202 retval.regionLocZ = Convert.ToUInt32(reader["locZ"].ToString());
203 203
204 // Neighbours - 0 = No Override 204 // Neighbours - 0 = No Override
205 retval.regionEastOverrideHandle = Convert.ToUInt64(reader["eastOverrideHandle"].ToString()); 205 retval.regionEastOverrideHandle = Convert.ToUInt64(reader["eastOverrideHandle"].ToString());
206 retval.regionWestOverrideHandle = Convert.ToUInt64(reader["westOverrideHandle"].ToString()); 206 retval.regionWestOverrideHandle = Convert.ToUInt64(reader["westOverrideHandle"].ToString());
207 retval.regionSouthOverrideHandle = Convert.ToUInt64(reader["southOverrideHandle"].ToString()); 207 retval.regionSouthOverrideHandle = Convert.ToUInt64(reader["southOverrideHandle"].ToString());
208 retval.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"].ToString()); 208 retval.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"].ToString());
209 209
210 // Assets 210 // Assets
211 retval.regionAssetURI = (string)reader["regionAssetURI"]; 211 retval.regionAssetURI = (string)reader["regionAssetURI"];
212 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; 212 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
213 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"]; 213 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
214 214
215 // Userserver 215 // Userserver
216 retval.regionUserURI = (string)reader["regionUserURI"]; 216 retval.regionUserURI = (string)reader["regionUserURI"];
217 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 217 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
218 retval.regionUserSendKey = (string)reader["regionUserSendKey"]; 218 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
219 219
220 // World Map Addition 220 // World Map Addition
221 string tempRegionMap = reader["regionMapTexture"].ToString(); 221 string tempRegionMap = reader["regionMapTexture"].ToString();
222 if (tempRegionMap != "") 222 if (tempRegionMap != "")
223 { 223 {
224 retval.regionMapTextureID = new LLUUID(tempRegionMap); 224 retval.regionMapTextureID = new LLUUID(tempRegionMap);
225 } 225 }
226 else 226 else
227 { 227 {
228 retval.regionMapTextureID = new LLUUID(); 228 retval.regionMapTextureID = new LLUUID();
229 } 229 }
230 } 230 }
231 else 231 else
232 { 232 {
233 return null; 233 return null;
234 } 234 }
235 return retval; 235 return retval;
236 } 236 }
237 237
238 /// <summary> 238 /// <summary>
239 /// Reads a reservation row from a database reader 239 /// Reads a reservation row from a database reader
240 /// </summary> 240 /// </summary>
241 /// <param name="reader">An active database reader</param> 241 /// <param name="reader">An active database reader</param>
242 /// <returns>A reservation data object</returns> 242 /// <returns>A reservation data object</returns>
243 public ReservationData readReservationRow(IDataReader reader) 243 public ReservationData readReservationRow(IDataReader reader)
244 { 244 {
245 ReservationData retval = new ReservationData(); 245 ReservationData retval = new ReservationData();
246 if (reader.Read()) 246 if (reader.Read())
247 { 247 {
248 retval.gridRecvKey = (string)reader["gridRecvKey"]; 248 retval.gridRecvKey = (string)reader["gridRecvKey"];
249 retval.gridSendKey = (string)reader["gridSendKey"]; 249 retval.gridSendKey = (string)reader["gridSendKey"];
250 retval.reservationCompany = (string)reader["resCompany"]; 250 retval.reservationCompany = (string)reader["resCompany"];
251 retval.reservationMaxX = Convert.ToInt32(reader["resXMax"].ToString()); 251 retval.reservationMaxX = Convert.ToInt32(reader["resXMax"].ToString());
252 retval.reservationMaxY = Convert.ToInt32(reader["resYMax"].ToString()); 252 retval.reservationMaxY = Convert.ToInt32(reader["resYMax"].ToString());
253 retval.reservationMinX = Convert.ToInt32(reader["resXMin"].ToString()); 253 retval.reservationMinX = Convert.ToInt32(reader["resXMin"].ToString());
254 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString()); 254 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString());
255 retval.reservationName = (string)reader["resName"]; 255 retval.reservationName = (string)reader["resName"];
256 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1; 256 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1;
257 retval.userUUID = new LLUUID((string)reader["userUUID"]); 257 retval.userUUID = new LLUUID((string)reader["userUUID"]);
258 258
259 } 259 }
260 else 260 else
261 { 261 {
262 return null; 262 return null;
263 } 263 }
264 return retval; 264 return retval;
265 } 265 }
266 /// <summary> 266 /// <summary>
267 /// Reads an agent row from a database reader 267 /// Reads an agent row from a database reader
268 /// </summary> 268 /// </summary>
269 /// <param name="reader">An active database reader</param> 269 /// <param name="reader">An active database reader</param>
270 /// <returns>A user session agent</returns> 270 /// <returns>A user session agent</returns>
271 public UserAgentData readAgentRow(IDataReader reader) 271 public UserAgentData readAgentRow(IDataReader reader)
272 { 272 {
273 UserAgentData retval = new UserAgentData(); 273 UserAgentData retval = new UserAgentData();
274 274
275 if (reader.Read()) 275 if (reader.Read())
276 { 276 {
277 // Agent IDs 277 // Agent IDs
278 retval.UUID = new LLUUID((string)reader["UUID"]); 278 retval.UUID = new LLUUID((string)reader["UUID"]);
279 retval.sessionID = new LLUUID((string)reader["sessionID"]); 279 retval.sessionID = new LLUUID((string)reader["sessionID"]);
280 retval.secureSessionID = new LLUUID((string)reader["secureSessionID"]); 280 retval.secureSessionID = new LLUUID((string)reader["secureSessionID"]);
281 281
282 // Agent Who? 282 // Agent Who?
283 retval.agentIP = (string)reader["agentIP"]; 283 retval.agentIP = (string)reader["agentIP"];
284 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString()); 284 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
285 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString()); 285 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
286 286
287 // Login/Logout times (UNIX Epoch) 287 // Login/Logout times (UNIX Epoch)
288 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString()); 288 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
289 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); 289 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
290 290
291 // Current position 291 // Current position
292 retval.currentRegion = (string)reader["currentRegion"]; 292 retval.currentRegion = (string)reader["currentRegion"];
293 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); 293 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
294 LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); 294 LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
295 } 295 }
296 else 296 else
297 { 297 {
298 return null; 298 return null;
299 } 299 }
300 return retval; 300 return retval;
301 } 301 }
302 302
303 /// <summary> 303 /// <summary>
304 /// Reads a user profile from an active data reader 304 /// Reads a user profile from an active data reader
305 /// </summary> 305 /// </summary>
306 /// <param name="reader">An active database reader</param> 306 /// <param name="reader">An active database reader</param>
307 /// <returns>A user profile</returns> 307 /// <returns>A user profile</returns>
308 public UserProfileData readUserRow(IDataReader reader) 308 public UserProfileData readUserRow(IDataReader reader)
309 { 309 {
310 UserProfileData retval = new UserProfileData(); 310 UserProfileData retval = new UserProfileData();
311 311
312 if (reader.Read()) 312 if (reader.Read())
313 { 313 {
314 retval.UUID = new LLUUID((string)reader["UUID"]); 314 retval.UUID = new LLUUID((string)reader["UUID"]);
315 retval.username = (string)reader["username"]; 315 retval.username = (string)reader["username"];
316 retval.surname = (string)reader["lastname"]; 316 retval.surname = (string)reader["lastname"];
317 317
318 retval.passwordHash = (string)reader["passwordHash"]; 318 retval.passwordHash = (string)reader["passwordHash"];
319 retval.passwordSalt = (string)reader["passwordSalt"]; 319 retval.passwordSalt = (string)reader["passwordSalt"];
320 320
321 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); 321 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
322 retval.homeLocation = new LLVector3( 322 retval.homeLocation = new LLVector3(
323 Convert.ToSingle(reader["homeLocationX"].ToString()), 323 Convert.ToSingle(reader["homeLocationX"].ToString()),
324 Convert.ToSingle(reader["homeLocationY"].ToString()), 324 Convert.ToSingle(reader["homeLocationY"].ToString()),
325 Convert.ToSingle(reader["homeLocationZ"].ToString())); 325 Convert.ToSingle(reader["homeLocationZ"].ToString()));
326 retval.homeLookAt = new LLVector3( 326 retval.homeLookAt = new LLVector3(
327 Convert.ToSingle(reader["homeLookAtX"].ToString()), 327 Convert.ToSingle(reader["homeLookAtX"].ToString()),
328 Convert.ToSingle(reader["homeLookAtY"].ToString()), 328 Convert.ToSingle(reader["homeLookAtY"].ToString()),
329 Convert.ToSingle(reader["homeLookAtZ"].ToString())); 329 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
330 330
331 retval.created = Convert.ToInt32(reader["created"].ToString()); 331 retval.created = Convert.ToInt32(reader["created"].ToString());
332 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); 332 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
333 333
334 retval.userInventoryURI = (string)reader["userInventoryURI"]; 334 retval.userInventoryURI = (string)reader["userInventoryURI"];
335 retval.userAssetURI = (string)reader["userAssetURI"]; 335 retval.userAssetURI = (string)reader["userAssetURI"];
336 336
337 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); 337 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
338 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); 338 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
339 339
340 retval.profileAboutText = (string)reader["profileAboutText"]; 340 retval.profileAboutText = (string)reader["profileAboutText"];
341 retval.profileFirstText = (string)reader["profileFirstText"]; 341 retval.profileFirstText = (string)reader["profileFirstText"];
342 342
343 retval.profileImage = new LLUUID((string)reader["profileImage"]); 343 retval.profileImage = new LLUUID((string)reader["profileImage"]);
344 retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); 344 retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]);
345 345
346 } 346 }
347 else 347 else
348 { 348 {
349 return null; 349 return null;
350 } 350 }
351 return retval; 351 return retval;
352 } 352 }
353 353
354 /// <summary> 354 /// <summary>
355 /// Reads a list of inventory folders returned by a query. 355 /// Reads a list of inventory folders returned by a query.
356 /// </summary> 356 /// </summary>
357 /// <param name="reader">A MySQL Data Reader</param> 357 /// <param name="reader">A MySQL Data Reader</param>
358 /// <returns>A List containing inventory folders</returns> 358 /// <returns>A List containing inventory folders</returns>
359 public List<InventoryFolderBase> readInventoryFolders(IDataReader reader) 359 public List<InventoryFolderBase> readInventoryFolders(IDataReader reader)
360 { 360 {
361 List<InventoryFolderBase> rows = new List<InventoryFolderBase>(); 361 List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
362 362
363 while(reader.Read()) 363 while(reader.Read())
364 { 364 {
365 try 365 try
366 { 366 {
367 InventoryFolderBase folder = new InventoryFolderBase(); 367 InventoryFolderBase folder = new InventoryFolderBase();
368 368
369 folder.agentID = new LLUUID((string)reader["agentID"]); 369 folder.agentID = new LLUUID((string)reader["agentID"]);
370 folder.parentID = new LLUUID((string)reader["parentFolderID"]); 370 folder.parentID = new LLUUID((string)reader["parentFolderID"]);
371 folder.folderID = new LLUUID((string)reader["folderID"]); 371 folder.folderID = new LLUUID((string)reader["folderID"]);
372 folder.name = (string)reader["folderName"]; 372 folder.name = (string)reader["folderName"];
373 373
374 rows.Add(folder); 374 rows.Add(folder);
375 } 375 }
376 catch (Exception e) 376 catch (Exception e)
377 { 377 {
378 Console.WriteLine(e.ToString()); 378 Console.WriteLine(e.ToString());
379 } 379 }
380 } 380 }
381 381
382 return rows; 382 return rows;
383 } 383 }
384 384
385 /// <summary> 385 /// <summary>
386 /// Reads a collection of items from an SQL result 386 /// Reads a collection of items from an SQL result
387 /// </summary> 387 /// </summary>
388 /// <param name="reader">The SQL Result</param> 388 /// <param name="reader">The SQL Result</param>
389 /// <returns>A List containing Inventory Items</returns> 389 /// <returns>A List containing Inventory Items</returns>
390 public List<InventoryItemBase> readInventoryItems(IDataReader reader) 390 public List<InventoryItemBase> readInventoryItems(IDataReader reader)
391 { 391 {
392 List<InventoryItemBase> rows = new List<InventoryItemBase>(); 392 List<InventoryItemBase> rows = new List<InventoryItemBase>();
393 393
394 while (reader.Read()) 394 while (reader.Read())
395 { 395 {
396 try 396 try
397 { 397 {
398 InventoryItemBase item = new InventoryItemBase(); 398 InventoryItemBase item = new InventoryItemBase();
399 399
400 item.assetID = new LLUUID((string)reader["assetID"]); 400 item.assetID = new LLUUID((string)reader["assetID"]);
401 item.avatarID = new LLUUID((string)reader["avatarID"]); 401 item.avatarID = new LLUUID((string)reader["avatarID"]);
402 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString()); 402 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
403 item.inventoryDescription = (string)reader["inventoryDescription"]; 403 item.inventoryDescription = (string)reader["inventoryDescription"];
404 item.inventoryID = new LLUUID((string)reader["inventoryID"]); 404 item.inventoryID = new LLUUID((string)reader["inventoryID"]);
405 item.inventoryName = (string)reader["inventoryName"]; 405 item.inventoryName = (string)reader["inventoryName"];
406 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString()); 406 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
407 item.parentFolderID = new LLUUID((string)reader["parentFolderID"]); 407 item.parentFolderID = new LLUUID((string)reader["parentFolderID"]);
408 item.type = Convert.ToInt32(reader["type"].ToString()); 408 item.type = Convert.ToInt32(reader["type"].ToString());
409 409
410 rows.Add(item); 410 rows.Add(item);
411 } 411 }
412 catch (Exception e) 412 catch (Exception e)
413 { 413 {
414 Console.WriteLine(e.ToString()); 414 Console.WriteLine(e.ToString());
415 } 415 }
416 } 416 }
417 417
418 return rows; 418 return rows;
419 } 419 }
420 420
421 /// <summary> 421 /// <summary>
422 /// Inserts a new row into the log database 422 /// Inserts a new row into the log database
423 /// </summary> 423 /// </summary>
424 /// <param name="serverDaemon">The daemon which triggered this event</param> 424 /// <param name="serverDaemon">The daemon which triggered this event</param>
425 /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param> 425 /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param>
426 /// <param name="methodCall">The method call where the problem occured</param> 426 /// <param name="methodCall">The method call where the problem occured</param>
427 /// <param name="arguments">The arguments passed to the method</param> 427 /// <param name="arguments">The arguments passed to the method</param>
428 /// <param name="priority">How critical is this?</param> 428 /// <param name="priority">How critical is this?</param>
429 /// <param name="logMessage">Extra message info</param> 429 /// <param name="logMessage">Extra message info</param>
430 /// <returns>Saved successfully?</returns> 430 /// <returns>Saved successfully?</returns>
431 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) 431 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
432 { 432 {
433 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES "; 433 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
434 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)"; 434 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
435 435
436 Dictionary<string, string> parameters = new Dictionary<string, string>(); 436 Dictionary<string, string> parameters = new Dictionary<string, string>();
437 parameters["?server"] = serverDaemon; 437 parameters["?server"] = serverDaemon;
438 parameters["?target"] = target; 438 parameters["?target"] = target;
439 parameters["?method"] = methodCall; 439 parameters["?method"] = methodCall;
440 parameters["?arguments"] = arguments; 440 parameters["?arguments"] = arguments;
441 parameters["?priority"] = priority.ToString(); 441 parameters["?priority"] = priority.ToString();
442 parameters["?message"] = logMessage; 442 parameters["?message"] = logMessage;
443 443
444 bool returnval = false; 444 bool returnval = false;
445 445
446 try 446 try
447 { 447 {
448 IDbCommand result = Query(sql, parameters); 448 IDbCommand result = Query(sql, parameters);
449 449
450 if (result.ExecuteNonQuery() == 1) 450 if (result.ExecuteNonQuery() == 1)
451 returnval = true; 451 returnval = true;
452 452
453 result.Dispose(); 453 result.Dispose();
454 } 454 }
455 catch (Exception e) 455 catch (Exception e)
456 { 456 {
457 Console.WriteLine(e.ToString()); 457 Console.WriteLine(e.ToString());
458 return false; 458 return false;
459 } 459 }
460 460
461 return returnval; 461 return returnval;
462 } 462 }
463 463
464 /// <summary> 464 /// <summary>
465 /// Inserts a new item into the database 465 /// Inserts a new item into the database
466 /// </summary> 466 /// </summary>
467 /// <param name="item">The item</param> 467 /// <param name="item">The item</param>
468 /// <returns>Success?</returns> 468 /// <returns>Success?</returns>
469 public bool insertItem(InventoryItemBase item) 469 public bool insertItem(InventoryItemBase item)
470 { 470 {
471 string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES "; 471 string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES ";
472 sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)"; 472 sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)";
473 473
474 Dictionary<string, string> parameters = new Dictionary<string, string>(); 474 Dictionary<string, string> parameters = new Dictionary<string, string>();
475 parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated(); 475 parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated();
476 parameters["?assetID"] = item.assetID.ToStringHyphenated(); 476 parameters["?assetID"] = item.assetID.ToStringHyphenated();
477 parameters["?type"] = item.type.ToString(); 477 parameters["?type"] = item.type.ToString();
478 parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated(); 478 parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated();
479 parameters["?avatarID"] = item.avatarID.ToStringHyphenated(); 479 parameters["?avatarID"] = item.avatarID.ToStringHyphenated();
480 parameters["?inventoryName"] = item.inventoryName; 480 parameters["?inventoryName"] = item.inventoryName;
481 parameters["?inventoryDescription"] = item.inventoryDescription; 481 parameters["?inventoryDescription"] = item.inventoryDescription;
482 parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); 482 parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
483 parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); 483 parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
484 484
485 bool returnval = false; 485 bool returnval = false;
486 486
487 try 487 try
488 { 488 {
489 IDbCommand result = Query(sql, parameters); 489 IDbCommand result = Query(sql, parameters);
490 490
491 if (result.ExecuteNonQuery() == 1) 491 if (result.ExecuteNonQuery() == 1)
492 returnval = true; 492 returnval = true;
493 493
494 result.Dispose(); 494 result.Dispose();
495 } 495 }
496 catch (Exception e) 496 catch (Exception e)
497 { 497 {
498 Console.WriteLine(e.ToString()); 498 Console.WriteLine(e.ToString());
499 return false; 499 return false;
500 } 500 }
501 501
502 return returnval; 502 return returnval;
503 } 503 }
504 504
505 /// <summary> 505 /// <summary>
506 /// Inserts a new folder into the database 506 /// Inserts a new folder into the database
507 /// </summary> 507 /// </summary>
508 /// <param name="folder">The folder</param> 508 /// <param name="folder">The folder</param>
509 /// <returns>Success?</returns> 509 /// <returns>Success?</returns>
510 public bool insertFolder(InventoryFolderBase folder) 510 public bool insertFolder(InventoryFolderBase folder)
511 { 511 {
512 string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES "; 512 string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
513 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)"; 513 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
514 514
515 Dictionary<string, string> parameters = new Dictionary<string, string>(); 515 Dictionary<string, string> parameters = new Dictionary<string, string>();
516 parameters["?folderID"] = folder.folderID.ToStringHyphenated(); 516 parameters["?folderID"] = folder.folderID.ToStringHyphenated();
517 parameters["?agentID"] = folder.agentID.ToStringHyphenated(); 517 parameters["?agentID"] = folder.agentID.ToStringHyphenated();
518 parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated(); 518 parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated();
519 parameters["?folderName"] = folder.name; 519 parameters["?folderName"] = folder.name;
520 520
521 bool returnval = false; 521 bool returnval = false;
522 try 522 try
523 { 523 {
524 IDbCommand result = Query(sql, parameters); 524 IDbCommand result = Query(sql, parameters);
525 525
526 if (result.ExecuteNonQuery() == 1) 526 if (result.ExecuteNonQuery() == 1)
527 returnval = true; 527 returnval = true;
528 528
529 result.Dispose(); 529 result.Dispose();
530 } 530 }
531 catch (Exception e) 531 catch (Exception e)
532 { 532 {
533 Console.WriteLine(e.ToString()); 533 Console.WriteLine(e.ToString());
534 return false; 534 return false;
535 } 535 }
536 return returnval; 536 return returnval;
537 } 537 }
538 538
539 /// <summary> 539 /// <summary>
540 /// Inserts a new region into the database 540 /// Inserts a new region into the database
541 /// </summary> 541 /// </summary>
542 /// <param name="profile">The region to insert</param> 542 /// <param name="profile">The region to insert</param>
543 /// <returns>Success?</returns> 543 /// <returns>Success?</returns>
544 public bool insertRegion(SimProfileData regiondata) 544 public bool insertRegion(SimProfileData regiondata)
545 { 545 {
546 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; 546 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
547 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; 547 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
548 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort) VALUES "; 548 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort) VALUES ";
549 549
550 sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, "; 550 sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
551 sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, "; 551 sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
552 sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort);"; 552 sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort);";
553 553
554 Dictionary<string, string> parameters = new Dictionary<string, string>(); 554 Dictionary<string, string> parameters = new Dictionary<string, string>();
555 555
556 parameters["?regionHandle"] = regiondata.regionHandle.ToString(); 556 parameters["?regionHandle"] = regiondata.regionHandle.ToString();
557 parameters["?regionName"] = regiondata.regionName.ToString(); 557 parameters["?regionName"] = regiondata.regionName.ToString();
558 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated(); 558 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated();
559 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString(); 559 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
560 parameters["?regionSecret"] = regiondata.regionSecret.ToString(); 560 parameters["?regionSecret"] = regiondata.regionSecret.ToString();
561 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString(); 561 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
562 parameters["?regionDataURI"] = regiondata.regionDataURI.ToString(); 562 parameters["?regionDataURI"] = regiondata.regionDataURI.ToString();
563 parameters["?serverIP"] = regiondata.serverIP.ToString(); 563 parameters["?serverIP"] = regiondata.serverIP.ToString();
564 parameters["?serverPort"] = regiondata.serverPort.ToString(); 564 parameters["?serverPort"] = regiondata.serverPort.ToString();
565 parameters["?serverURI"] = regiondata.serverURI.ToString(); 565 parameters["?serverURI"] = regiondata.serverURI.ToString();
566 parameters["?locX"] = regiondata.regionLocX.ToString(); 566 parameters["?locX"] = regiondata.regionLocX.ToString();
567 parameters["?locY"] = regiondata.regionLocY.ToString(); 567 parameters["?locY"] = regiondata.regionLocY.ToString();
568 parameters["?locZ"] = regiondata.regionLocZ.ToString(); 568 parameters["?locZ"] = regiondata.regionLocZ.ToString();
569 parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString(); 569 parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString();
570 parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString(); 570 parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString();
571 parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString(); 571 parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString();
572 parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString(); 572 parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString();
573 parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString(); 573 parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString();
574 parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString(); 574 parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString();
575 parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString(); 575 parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString();
576 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString(); 576 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
577 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString(); 577 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
578 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString(); 578 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
579 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated(); 579 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated();
580 parameters["?serverHttpPort"] = regiondata.httpPort.ToString(); 580 parameters["?serverHttpPort"] = regiondata.httpPort.ToString();
581 parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); 581 parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString();
582 582
583 bool returnval = false; 583 bool returnval = false;
584 584
585 try 585 try
586 { 586 {
587 587
588 IDbCommand result = Query(sql, parameters); 588 IDbCommand result = Query(sql, parameters);
589 589
590 //Console.WriteLine(result.CommandText); 590 //Console.WriteLine(result.CommandText);
591 591
592 if (result.ExecuteNonQuery() == 1) 592 if (result.ExecuteNonQuery() == 1)
593 returnval = true; 593 returnval = true;
594 594
595 result.Dispose(); 595 result.Dispose();
596 } 596 }
597 catch (Exception e) 597 catch (Exception e)
598 { 598 {
599 Console.WriteLine(e.ToString()); 599 Console.WriteLine(e.ToString());
600 return false; 600 return false;
601 } 601 }
602 602
603 return returnval; 603 return returnval;
604 } 604 }
605 } 605 }
606} 606}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
index c116536..b044bdd 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -1,256 +1,256 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using libsecondlife; 31using libsecondlife;
32 32
33namespace OpenSim.Framework.Data.MySQL 33namespace OpenSim.Framework.Data.MySQL
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// A database interface class to a user profile storage system 36 /// A database interface class to a user profile storage system
37 /// </summary> 37 /// </summary>
38 class MySQLUserData : IUserData 38 class MySQLUserData : IUserData
39 { 39 {
40 /// <summary> 40 /// <summary>
41 /// Database manager for MySQL 41 /// Database manager for MySQL
42 /// </summary> 42 /// </summary>
43 public MySQLManager database; 43 public MySQLManager database;
44 44
45 /// <summary> 45 /// <summary>
46 /// Loads and initialises the MySQL storage plugin 46 /// Loads and initialises the MySQL storage plugin
47 /// </summary> 47 /// </summary>
48 public void Initialise() 48 public void Initialise()
49 { 49 {
50 // Load from an INI file connection details 50 // Load from an INI file connection details
51 // TODO: move this to XML? 51 // TODO: move this to XML?
52 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); 52 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
53 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); 53 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
54 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); 54 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
55 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); 55 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
56 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); 56 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
57 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 57 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
58 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 58 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
59 59
60 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); 60 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Searches the database for a specified user profile 64 /// Searches the database for a specified user profile
65 /// </summary> 65 /// </summary>
66 /// <param name="name">The account name of the user</param> 66 /// <param name="name">The account name of the user</param>
67 /// <returns>A user profile</returns> 67 /// <returns>A user profile</returns>
68 public UserProfileData getUserByName(string name) 68 public UserProfileData getUserByName(string name)
69 { 69 {
70 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); 70 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Searches the database for a specified user profile by name components 74 /// Searches the database for a specified user profile by name components
75 /// </summary> 75 /// </summary>
76 /// <param name="user">The first part of the account name</param> 76 /// <param name="user">The first part of the account name</param>
77 /// <param name="last">The second part of the account name</param> 77 /// <param name="last">The second part of the account name</param>
78 /// <returns>A user profile</returns> 78 /// <returns>A user profile</returns>
79 public UserProfileData getUserByName(string user, string last) 79 public UserProfileData getUserByName(string user, string last)
80 { 80 {
81 try 81 try
82 { 82 {
83 lock (database) 83 lock (database)
84 { 84 {
85 Dictionary<string, string> param = new Dictionary<string, string>(); 85 Dictionary<string, string> param = new Dictionary<string, string>();
86 param["?first"] = user; 86 param["?first"] = user;
87 param["?second"] = last; 87 param["?second"] = last;
88 88
89 IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param); 89 IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param);
90 IDataReader reader = result.ExecuteReader(); 90 IDataReader reader = result.ExecuteReader();
91 91
92 UserProfileData row = database.readUserRow(reader); 92 UserProfileData row = database.readUserRow(reader);
93 93
94 reader.Close(); 94 reader.Close();
95 result.Dispose(); 95 result.Dispose();
96 96
97 return row; 97 return row;
98 } 98 }
99 } 99 }
100 catch (Exception e) 100 catch (Exception e)
101 { 101 {
102 database.Reconnect(); 102 database.Reconnect();
103 Console.WriteLine(e.ToString()); 103 Console.WriteLine(e.ToString());
104 return null; 104 return null;
105 } 105 }
106 } 106 }
107 107
108 /// <summary> 108 /// <summary>
109 /// Searches the database for a specified user profile by UUID 109 /// Searches the database for a specified user profile by UUID
110 /// </summary> 110 /// </summary>
111 /// <param name="uuid">The account ID</param> 111 /// <param name="uuid">The account ID</param>
112 /// <returns>The users profile</returns> 112 /// <returns>The users profile</returns>
113 public UserProfileData getUserByUUID(LLUUID uuid) 113 public UserProfileData getUserByUUID(LLUUID uuid)
114 { 114 {
115 try 115 try
116 { 116 {
117 lock (database) 117 lock (database)
118 { 118 {
119 Dictionary<string, string> param = new Dictionary<string, string>(); 119 Dictionary<string, string> param = new Dictionary<string, string>();
120 param["?uuid"] = uuid.ToStringHyphenated(); 120 param["?uuid"] = uuid.ToStringHyphenated();
121 121
122 IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); 122 IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param);
123 IDataReader reader = result.ExecuteReader(); 123 IDataReader reader = result.ExecuteReader();
124 124
125 UserProfileData row = database.readUserRow(reader); 125 UserProfileData row = database.readUserRow(reader);
126 126
127 reader.Close(); 127 reader.Close();
128 result.Dispose(); 128 result.Dispose();
129 129
130 return row; 130 return row;
131 } 131 }
132 } 132 }
133 catch (Exception e) 133 catch (Exception e)
134 { 134 {
135 database.Reconnect(); 135 database.Reconnect();
136 Console.WriteLine(e.ToString()); 136 Console.WriteLine(e.ToString());
137 return null; 137 return null;
138 } 138 }
139 } 139 }
140 140
141 /// <summary> 141 /// <summary>
142 /// Returns a user session searching by name 142 /// Returns a user session searching by name
143 /// </summary> 143 /// </summary>
144 /// <param name="name">The account name</param> 144 /// <param name="name">The account name</param>
145 /// <returns>The users session</returns> 145 /// <returns>The users session</returns>
146 public UserAgentData getAgentByName(string name) 146 public UserAgentData getAgentByName(string name)
147 { 147 {
148 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); 148 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Returns a user session by account name 152 /// Returns a user session by account name
153 /// </summary> 153 /// </summary>
154 /// <param name="user">First part of the users account name</param> 154 /// <param name="user">First part of the users account name</param>
155 /// <param name="last">Second part of the users account name</param> 155 /// <param name="last">Second part of the users account name</param>
156 /// <returns>The users session</returns> 156 /// <returns>The users session</returns>
157 public UserAgentData getAgentByName(string user, string last) 157 public UserAgentData getAgentByName(string user, string last)
158 { 158 {
159 UserProfileData profile = getUserByName(user, last); 159 UserProfileData profile = getUserByName(user, last);
160 return getAgentByUUID(profile.UUID); 160 return getAgentByUUID(profile.UUID);
161 } 161 }
162 162
163 /// <summary> 163 /// <summary>
164 /// Returns an agent session by account UUID 164 /// Returns an agent session by account UUID
165 /// </summary> 165 /// </summary>
166 /// <param name="uuid">The accounts UUID</param> 166 /// <param name="uuid">The accounts UUID</param>
167 /// <returns>The users session</returns> 167 /// <returns>The users session</returns>
168 public UserAgentData getAgentByUUID(LLUUID uuid) 168 public UserAgentData getAgentByUUID(LLUUID uuid)
169 { 169 {
170 try 170 try
171 { 171 {
172 lock (database) 172 lock (database)
173 { 173 {
174 Dictionary<string, string> param = new Dictionary<string, string>(); 174 Dictionary<string, string> param = new Dictionary<string, string>();
175 param["?uuid"] = uuid.ToStringHyphenated(); 175 param["?uuid"] = uuid.ToStringHyphenated();
176 176
177 IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); 177 IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param);
178 IDataReader reader = result.ExecuteReader(); 178 IDataReader reader = result.ExecuteReader();
179 179
180 UserAgentData row = database.readAgentRow(reader); 180 UserAgentData row = database.readAgentRow(reader);
181 181
182 reader.Close(); 182 reader.Close();
183 result.Dispose(); 183 result.Dispose();
184 184
185 return row; 185 return row;
186 } 186 }
187 } 187 }
188 catch (Exception e) 188 catch (Exception e)
189 { 189 {
190 database.Reconnect(); 190 database.Reconnect();
191 Console.WriteLine(e.ToString()); 191 Console.WriteLine(e.ToString());
192 return null; 192 return null;
193 } 193 }
194 } 194 }
195 195
196 /// <summary> 196 /// <summary>
197 /// Creates a new users profile 197 /// Creates a new users profile
198 /// </summary> 198 /// </summary>
199 /// <param name="user">The user profile to create</param> 199 /// <param name="user">The user profile to create</param>
200 public void addNewUserProfile(UserProfileData user) 200 public void addNewUserProfile(UserProfileData user)
201 { 201 {
202 } 202 }
203 203
204 /// <summary> 204 /// <summary>
205 /// Creates a new agent 205 /// Creates a new agent
206 /// </summary> 206 /// </summary>
207 /// <param name="agent">The agent to create</param> 207 /// <param name="agent">The agent to create</param>
208 public void addNewUserAgent(UserAgentData agent) 208 public void addNewUserAgent(UserAgentData agent)
209 { 209 {
210 // Do nothing. 210 // Do nothing.
211 } 211 }
212 212
213 /// <summary> 213 /// <summary>
214 /// Performs a money transfer request between two accounts 214 /// Performs a money transfer request between two accounts
215 /// </summary> 215 /// </summary>
216 /// <param name="from">The senders account ID</param> 216 /// <param name="from">The senders account ID</param>
217 /// <param name="to">The recievers account ID</param> 217 /// <param name="to">The recievers account ID</param>
218 /// <param name="amount">The amount to transfer</param> 218 /// <param name="amount">The amount to transfer</param>
219 /// <returns>Success?</returns> 219 /// <returns>Success?</returns>
220 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) 220 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
221 { 221 {
222 return false; 222 return false;
223 } 223 }
224 224
225 /// <summary> 225 /// <summary>
226 /// Performs an inventory transfer request between two accounts 226 /// Performs an inventory transfer request between two accounts
227 /// </summary> 227 /// </summary>
228 /// <remarks>TODO: Move to inventory server</remarks> 228 /// <remarks>TODO: Move to inventory server</remarks>
229 /// <param name="from">The senders account ID</param> 229 /// <param name="from">The senders account ID</param>
230 /// <param name="to">The recievers account ID</param> 230 /// <param name="to">The recievers account ID</param>
231 /// <param name="item">The item to transfer</param> 231 /// <param name="item">The item to transfer</param>
232 /// <returns>Success?</returns> 232 /// <returns>Success?</returns>
233 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 233 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
234 { 234 {
235 return false; 235 return false;
236 } 236 }
237 237
238 /// <summary> 238 /// <summary>
239 /// Database provider name 239 /// Database provider name
240 /// </summary> 240 /// </summary>
241 /// <returns>Provider name</returns> 241 /// <returns>Provider name</returns>
242 public string getName() 242 public string getName()
243 { 243 {
244 return "MySQL Userdata Interface"; 244 return "MySQL Userdata Interface";
245 } 245 }
246 246
247 /// <summary> 247 /// <summary>
248 /// Database provider version 248 /// Database provider version
249 /// </summary> 249 /// </summary>
250 /// <returns>provider version</returns> 250 /// <returns>provider version</returns>
251 public string getVersion() 251 public string getVersion()
252 { 252 {
253 return "0.1"; 253 return "0.1";
254 } 254 }
255 } 255 }
256} 256}
diff --git a/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs
index 52d6a54..46c0ae0 100644
--- a/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Framework.Data.MySQL")] 6[assembly: AssemblyTitle("OpenSim.Framework.Data.MySQL")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Framework.Data.MySQL")] 10[assembly: AssemblyProduct("OpenSim.Framework.Data.MySQL")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("e49826b2-dcef-41be-a5bd-596733fa3304")] 21[assembly: Guid("e49826b2-dcef-41be-a5bd-596733fa3304")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
index 9de5edb..8136bc1 100644
--- a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Framework.Data.SQLite")] 6[assembly: AssemblyTitle("OpenSim.Framework.Data.SQLite")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Framework.Data.SQLite")] 10[assembly: AssemblyProduct("OpenSim.Framework.Data.SQLite")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("6113d5ce-4547-49f4-9236-0dcc503457b1")] 21[assembly: Guid("6113d5ce-4547-49f4-9236-0dcc503457b1")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
index 511c5f0..c1d74ae 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
@@ -1,197 +1,197 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Security.Cryptography; 31using System.Security.Cryptography;
32using System.Text; 32using System.Text;
33using libsecondlife; 33using libsecondlife;
34 34
35namespace OpenSim.Framework.Data.SQLite 35namespace OpenSim.Framework.Data.SQLite
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// A Grid Interface to the SQLite database 38 /// A Grid Interface to the SQLite database
39 /// </summary> 39 /// </summary>
40 public class SQLiteGridData : IGridData 40 public class SQLiteGridData : IGridData
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// A database manager 43 /// A database manager
44 /// </summary> 44 /// </summary>
45 private SQLiteManager database; 45 private SQLiteManager database;
46 46
47 /// <summary> 47 /// <summary>
48 /// Initialises the Grid Interface 48 /// Initialises the Grid Interface
49 /// </summary> 49 /// </summary>
50 public void Initialise() 50 public void Initialise()
51 { 51 {
52 database = new SQLiteManager("localhost", "db", "user", "password", "false"); 52 database = new SQLiteManager("localhost", "db", "user", "password", "false");
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 /// Shuts down the grid interface 56 /// Shuts down the grid interface
57 /// </summary> 57 /// </summary>
58 public void Close() 58 public void Close()
59 { 59 {
60 database.Close(); 60 database.Close();
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Returns the name of this grid interface 64 /// Returns the name of this grid interface
65 /// </summary> 65 /// </summary>
66 /// <returns>A string containing the grid interface</returns> 66 /// <returns>A string containing the grid interface</returns>
67 public string getName() 67 public string getName()
68 { 68 {
69 return "SQLite OpenGridData"; 69 return "SQLite OpenGridData";
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// Returns the version of this grid interface 73 /// Returns the version of this grid interface
74 /// </summary> 74 /// </summary>
75 /// <returns>A string containing the version</returns> 75 /// <returns>A string containing the version</returns>
76 public string getVersion() 76 public string getVersion()
77 { 77 {
78 return "0.1"; 78 return "0.1";
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Returns a list of regions within the specified ranges 82 /// Returns a list of regions within the specified ranges
83 /// </summary> 83 /// </summary>
84 /// <param name="a">minimum X coordinate</param> 84 /// <param name="a">minimum X coordinate</param>
85 /// <param name="b">minimum Y coordinate</param> 85 /// <param name="b">minimum Y coordinate</param>
86 /// <param name="c">maximum X coordinate</param> 86 /// <param name="c">maximum X coordinate</param>
87 /// <param name="d">maximum Y coordinate</param> 87 /// <param name="d">maximum Y coordinate</param>
88 /// <returns>An array of region profiles</returns> 88 /// <returns>An array of region profiles</returns>
89 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) 89 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
90 { 90 {
91 return null; 91 return null;
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// Returns a sim profile from it's location 95 /// Returns a sim profile from it's location
96 /// </summary> 96 /// </summary>
97 /// <param name="handle">Region location handle</param> 97 /// <param name="handle">Region location handle</param>
98 /// <returns>Sim profile</returns> 98 /// <returns>Sim profile</returns>
99 public SimProfileData GetProfileByHandle(ulong handle) 99 public SimProfileData GetProfileByHandle(ulong handle)
100 { 100 {
101 Dictionary<string, string> param = new Dictionary<string, string>(); 101 Dictionary<string, string> param = new Dictionary<string, string>();
102 param["handle"] = handle.ToString(); 102 param["handle"] = handle.ToString();
103 103
104 IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); 104 IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
105 IDataReader reader = result.ExecuteReader(); 105 IDataReader reader = result.ExecuteReader();
106 106
107 SimProfileData row = database.getRow(reader); 107 SimProfileData row = database.getRow(reader);
108 reader.Close(); 108 reader.Close();
109 result.Dispose(); 109 result.Dispose();
110 110
111 return row; 111 return row;
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Returns a sim profile from it's UUID 115 /// Returns a sim profile from it's UUID
116 /// </summary> 116 /// </summary>
117 /// <param name="uuid">The region UUID</param> 117 /// <param name="uuid">The region UUID</param>
118 /// <returns>The sim profile</returns> 118 /// <returns>The sim profile</returns>
119 public SimProfileData GetProfileByLLUUID(LLUUID uuid) 119 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
120 { 120 {
121 Dictionary<string, string> param = new Dictionary<string, string>(); 121 Dictionary<string, string> param = new Dictionary<string, string>();
122 param["uuid"] = uuid.ToStringHyphenated(); 122 param["uuid"] = uuid.ToStringHyphenated();
123 123
124 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); 124 IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
125 IDataReader reader = result.ExecuteReader(); 125 IDataReader reader = result.ExecuteReader();
126 126
127 SimProfileData row = database.getRow(reader); 127 SimProfileData row = database.getRow(reader);
128 reader.Close(); 128 reader.Close();
129 result.Dispose(); 129 result.Dispose();
130 130
131 return row; 131 return row;
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Adds a new specified region to the database 135 /// Adds a new specified region to the database
136 /// </summary> 136 /// </summary>
137 /// <param name="profile">The profile to add</param> 137 /// <param name="profile">The profile to add</param>
138 /// <returns>A dataresponse enum indicating success</returns> 138 /// <returns>A dataresponse enum indicating success</returns>
139 public DataResponse AddProfile(SimProfileData profile) 139 public DataResponse AddProfile(SimProfileData profile)
140 { 140 {
141 if (database.insertRow(profile)) 141 if (database.insertRow(profile))
142 { 142 {
143 return DataResponse.RESPONSE_OK; 143 return DataResponse.RESPONSE_OK;
144 } 144 }
145 else 145 else
146 { 146 {
147 return DataResponse.RESPONSE_ERROR; 147 return DataResponse.RESPONSE_ERROR;
148 } 148 }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. 152 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
153 /// </summary> 153 /// </summary>
154 /// <param name="uuid">The UUID of the challenger</param> 154 /// <param name="uuid">The UUID of the challenger</param>
155 /// <param name="handle">The attempted regionHandle of the challenger</param> 155 /// <param name="handle">The attempted regionHandle of the challenger</param>
156 /// <param name="authkey">The secret</param> 156 /// <param name="authkey">The secret</param>
157 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 157 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
158 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 158 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey)
159 { 159 {
160 bool throwHissyFit = false; // Should be true by 1.0 160 bool throwHissyFit = false; // Should be true by 1.0
161 161
162 if (throwHissyFit) 162 if (throwHissyFit)
163 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 163 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
164 164
165 SimProfileData data = GetProfileByLLUUID(uuid); 165 SimProfileData data = GetProfileByLLUUID(uuid);
166 166
167 return (handle == data.regionHandle && authkey == data.regionSecret); 167 return (handle == data.regionHandle && authkey == data.regionSecret);
168 } 168 }
169 169
170 /// <summary> 170 /// <summary>
171 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region 171 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
172 /// </summary> 172 /// </summary>
173 /// <remarks>This requires a security audit.</remarks> 173 /// <remarks>This requires a security audit.</remarks>
174 /// <param name="uuid"></param> 174 /// <param name="uuid"></param>
175 /// <param name="handle"></param> 175 /// <param name="handle"></param>
176 /// <param name="authhash"></param> 176 /// <param name="authhash"></param>
177 /// <param name="challenge"></param> 177 /// <param name="challenge"></param>
178 /// <returns></returns> 178 /// <returns></returns>
179 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 179 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge)
180 { 180 {
181 SHA512Managed HashProvider = new SHA512Managed(); 181 SHA512Managed HashProvider = new SHA512Managed();
182 ASCIIEncoding TextProvider = new ASCIIEncoding(); 182 ASCIIEncoding TextProvider = new ASCIIEncoding();
183 183
184 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); 184 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
185 byte[] hash = HashProvider.ComputeHash(stream); 185 byte[] hash = HashProvider.ComputeHash(stream);
186 186
187 return false; 187 return false;
188 } 188 }
189 189
190 public ReservationData GetReservationAtPoint(uint x, uint y) 190 public ReservationData GetReservationAtPoint(uint x, uint y)
191 { 191 {
192 return null; 192 return null;
193 } 193 }
194 } 194 }
195 195
196 196
197} 197}
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index c9931ab..a69611a 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -1,206 +1,206 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SQLite; 31using System.Data.SQLite;
32using libsecondlife; 32using libsecondlife;
33 33
34namespace OpenSim.Framework.Data.SQLite 34namespace OpenSim.Framework.Data.SQLite
35{ 35{
36 class SQLiteManager 36 class SQLiteManager
37 { 37 {
38 IDbConnection dbcon; 38 IDbConnection dbcon;
39 39
40 /// <summary> 40 /// <summary>
41 /// Initialises and creates a new SQLite connection and maintains it. 41 /// Initialises and creates a new SQLite connection and maintains it.
42 /// </summary> 42 /// </summary>
43 /// <param name="hostname">The SQLite server being connected to</param> 43 /// <param name="hostname">The SQLite server being connected to</param>
44 /// <param name="database">The name of the SQLite database being used</param> 44 /// <param name="database">The name of the SQLite database being used</param>
45 /// <param name="username">The username logging into the database</param> 45 /// <param name="username">The username logging into the database</param>
46 /// <param name="password">The password for the user logging in</param> 46 /// <param name="password">The password for the user logging in</param>
47 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param> 47 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
48 public SQLiteManager(string hostname, string database, string username, string password, string cpooling) 48 public SQLiteManager(string hostname, string database, string username, string password, string cpooling)
49 { 49 {
50 try 50 try
51 { 51 {
52 string connectionString = "URI=file:GridServerSqlite.db;"; 52 string connectionString = "URI=file:GridServerSqlite.db;";
53 dbcon = new SQLiteConnection(connectionString); 53 dbcon = new SQLiteConnection(connectionString);
54 54
55 dbcon.Open(); 55 dbcon.Open();
56 } 56 }
57 catch (Exception e) 57 catch (Exception e)
58 { 58 {
59 throw new Exception("Error initialising SQLite Database: " + e.ToString()); 59 throw new Exception("Error initialising SQLite Database: " + e.ToString());
60 } 60 }
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// Shuts down the database connection 64 /// Shuts down the database connection
65 /// </summary> 65 /// </summary>
66 public void Close() 66 public void Close()
67 { 67 {
68 dbcon.Close(); 68 dbcon.Close();
69 dbcon = null; 69 dbcon = null;
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// Runs a query with protection against SQL Injection by using parameterised input. 73 /// Runs a query with protection against SQL Injection by using parameterised input.
74 /// </summary> 74 /// </summary>
75 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> 75 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
76 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> 76 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
77 /// <returns>A SQLite DB Command</returns> 77 /// <returns>A SQLite DB Command</returns>
78 public IDbCommand Query(string sql, Dictionary<string, string> parameters) 78 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
79 { 79 {
80 SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand(); 80 SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand();
81 dbcommand.CommandText = sql; 81 dbcommand.CommandText = sql;
82 foreach (KeyValuePair<string, string> param in parameters) 82 foreach (KeyValuePair<string, string> param in parameters)
83 { 83 {
84 SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value); 84 SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value);
85 dbcommand.Parameters.Add(paramx); 85 dbcommand.Parameters.Add(paramx);
86 } 86 }
87 87
88 return (IDbCommand)dbcommand; 88 return (IDbCommand)dbcommand;
89 } 89 }
90 90
91 /// <summary> 91 /// <summary>
92 /// Reads a region row from a database reader 92 /// Reads a region row from a database reader
93 /// </summary> 93 /// </summary>
94 /// <param name="reader">An active database reader</param> 94 /// <param name="reader">An active database reader</param>
95 /// <returns>A region profile</returns> 95 /// <returns>A region profile</returns>
96 public SimProfileData getRow(IDataReader reader) 96 public SimProfileData getRow(IDataReader reader)
97 { 97 {
98 SimProfileData retval = new SimProfileData(); 98 SimProfileData retval = new SimProfileData();
99 99
100 if (reader.Read()) 100 if (reader.Read())
101 { 101 {
102 // Region Main 102 // Region Main
103 retval.regionHandle = (ulong)reader["regionHandle"]; 103 retval.regionHandle = (ulong)reader["regionHandle"];
104 retval.regionName = (string)reader["regionName"]; 104 retval.regionName = (string)reader["regionName"];
105 retval.UUID = new LLUUID((string)reader["uuid"]); 105 retval.UUID = new LLUUID((string)reader["uuid"]);
106 106
107 // Secrets 107 // Secrets
108 retval.regionRecvKey = (string)reader["regionRecvKey"]; 108 retval.regionRecvKey = (string)reader["regionRecvKey"];
109 retval.regionSecret = (string)reader["regionSecret"]; 109 retval.regionSecret = (string)reader["regionSecret"];
110 retval.regionSendKey = (string)reader["regionSendKey"]; 110 retval.regionSendKey = (string)reader["regionSendKey"];
111 111
112 // Region Server 112 // Region Server
113 retval.regionDataURI = (string)reader["regionDataURI"]; 113 retval.regionDataURI = (string)reader["regionDataURI"];
114 retval.regionOnline = false; // Needs to be pinged before this can be set. 114 retval.regionOnline = false; // Needs to be pinged before this can be set.
115 retval.serverIP = (string)reader["serverIP"]; 115 retval.serverIP = (string)reader["serverIP"];
116 retval.serverPort = (uint)reader["serverPort"]; 116 retval.serverPort = (uint)reader["serverPort"];
117 retval.serverURI = (string)reader["serverURI"]; 117 retval.serverURI = (string)reader["serverURI"];
118 118
119 // Location 119 // Location
120 retval.regionLocX = (uint)((int)reader["locX"]); 120 retval.regionLocX = (uint)((int)reader["locX"]);
121 retval.regionLocY = (uint)((int)reader["locY"]); 121 retval.regionLocY = (uint)((int)reader["locY"]);
122 retval.regionLocZ = (uint)((int)reader["locZ"]); 122 retval.regionLocZ = (uint)((int)reader["locZ"]);
123 123
124 // Neighbours - 0 = No Override 124 // Neighbours - 0 = No Override
125 retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"]; 125 retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
126 retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"]; 126 retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
127 retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"]; 127 retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
128 retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"]; 128 retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
129 129
130 // Assets 130 // Assets
131 retval.regionAssetURI = (string)reader["regionAssetURI"]; 131 retval.regionAssetURI = (string)reader["regionAssetURI"];
132 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; 132 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
133 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"]; 133 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
134 134
135 // Userserver 135 // Userserver
136 retval.regionUserURI = (string)reader["regionUserURI"]; 136 retval.regionUserURI = (string)reader["regionUserURI"];
137 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 137 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
138 retval.regionUserSendKey = (string)reader["regionUserSendKey"]; 138 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
139 } 139 }
140 else 140 else
141 { 141 {
142 throw new Exception("No rows to return"); 142 throw new Exception("No rows to return");
143 } 143 }
144 return retval; 144 return retval;
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 /// Inserts a new region into the database 148 /// Inserts a new region into the database
149 /// </summary> 149 /// </summary>
150 /// <param name="profile">The region to insert</param> 150 /// <param name="profile">The region to insert</param>
151 /// <returns>Success?</returns> 151 /// <returns>Success?</returns>
152 public bool insertRow(SimProfileData profile) 152 public bool insertRow(SimProfileData profile)
153 { 153 {
154 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; 154 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
155 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; 155 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
156 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES "; 156 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
157 157
158 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; 158 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
159 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; 159 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
160 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);"; 160 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
161 161
162 Dictionary<string, string> parameters = new Dictionary<string, string>(); 162 Dictionary<string, string> parameters = new Dictionary<string, string>();
163 163
164 parameters["regionHandle"] = profile.regionHandle.ToString(); 164 parameters["regionHandle"] = profile.regionHandle.ToString();
165 parameters["regionName"] = profile.regionName; 165 parameters["regionName"] = profile.regionName;
166 parameters["uuid"] = profile.UUID.ToString(); 166 parameters["uuid"] = profile.UUID.ToString();
167 parameters["regionRecvKey"] = profile.regionRecvKey; 167 parameters["regionRecvKey"] = profile.regionRecvKey;
168 parameters["regionSendKey"] = profile.regionSendKey; 168 parameters["regionSendKey"] = profile.regionSendKey;
169 parameters["regionDataURI"] = profile.regionDataURI; 169 parameters["regionDataURI"] = profile.regionDataURI;
170 parameters["serverIP"] = profile.serverIP; 170 parameters["serverIP"] = profile.serverIP;
171 parameters["serverPort"] = profile.serverPort.ToString(); 171 parameters["serverPort"] = profile.serverPort.ToString();
172 parameters["serverURI"] = profile.serverURI; 172 parameters["serverURI"] = profile.serverURI;
173 parameters["locX"] = profile.regionLocX.ToString(); 173 parameters["locX"] = profile.regionLocX.ToString();
174 parameters["locY"] = profile.regionLocY.ToString(); 174 parameters["locY"] = profile.regionLocY.ToString();
175 parameters["locZ"] = profile.regionLocZ.ToString(); 175 parameters["locZ"] = profile.regionLocZ.ToString();
176 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString(); 176 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
177 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString(); 177 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
178 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString(); 178 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
179 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString(); 179 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
180 parameters["regionAssetURI"] = profile.regionAssetURI; 180 parameters["regionAssetURI"] = profile.regionAssetURI;
181 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey; 181 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
182 parameters["regionAssetSendKey"] = profile.regionAssetSendKey; 182 parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
183 parameters["regionUserURI"] = profile.regionUserURI; 183 parameters["regionUserURI"] = profile.regionUserURI;
184 parameters["regionUserRecvKey"] = profile.regionUserRecvKey; 184 parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
185 parameters["regionUserSendKey"] = profile.regionUserSendKey; 185 parameters["regionUserSendKey"] = profile.regionUserSendKey;
186 186
187 bool returnval = false; 187 bool returnval = false;
188 188
189 try 189 try
190 { 190 {
191 IDbCommand result = Query(sql, parameters); 191 IDbCommand result = Query(sql, parameters);
192 192
193 if (result.ExecuteNonQuery() == 1) 193 if (result.ExecuteNonQuery() == 1)
194 returnval = true; 194 returnval = true;
195 195
196 result.Dispose(); 196 result.Dispose();
197 } 197 }
198 catch (Exception) 198 catch (Exception)
199 { 199 {
200 return false; 200 return false;
201 } 201 }
202 202
203 return returnval; 203 return returnval;
204 } 204 }
205 } 205 }
206} 206}
diff --git a/OpenSim/Framework/Data/GridData.cs b/OpenSim/Framework/Data/GridData.cs
index 5a17d20..c96353b 100644
--- a/OpenSim/Framework/Data/GridData.cs
+++ b/OpenSim/Framework/Data/GridData.cs
@@ -1,111 +1,111 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Data 30namespace OpenSim.Framework.Data
31{ 31{
32 public enum DataResponse 32 public enum DataResponse
33 { 33 {
34 RESPONSE_OK, 34 RESPONSE_OK,
35 RESPONSE_AUTHREQUIRED, 35 RESPONSE_AUTHREQUIRED,
36 RESPONSE_INVALIDCREDENTIALS, 36 RESPONSE_INVALIDCREDENTIALS,
37 RESPONSE_ERROR 37 RESPONSE_ERROR
38 } 38 }
39 39
40 /// <summary> 40 /// <summary>
41 /// A standard grid interface 41 /// A standard grid interface
42 /// </summary> 42 /// </summary>
43 public interface IGridData 43 public interface IGridData
44 { 44 {
45 /// <summary> 45 /// <summary>
46 /// Returns a sim profile from a regionHandle 46 /// Returns a sim profile from a regionHandle
47 /// </summary> 47 /// </summary>
48 /// <param name="regionHandle">A 64bit Region Handle</param> 48 /// <param name="regionHandle">A 64bit Region Handle</param>
49 /// <returns>A simprofile</returns> 49 /// <returns>A simprofile</returns>
50 SimProfileData GetProfileByHandle(ulong regionHandle); 50 SimProfileData GetProfileByHandle(ulong regionHandle);
51 51
52 /// <summary> 52 /// <summary>
53 /// Returns a sim profile from a UUID 53 /// Returns a sim profile from a UUID
54 /// </summary> 54 /// </summary>
55 /// <param name="UUID">A 128bit UUID</param> 55 /// <param name="UUID">A 128bit UUID</param>
56 /// <returns>A sim profile</returns> 56 /// <returns>A sim profile</returns>
57 SimProfileData GetProfileByLLUUID(LLUUID UUID); 57 SimProfileData GetProfileByLLUUID(LLUUID UUID);
58 58
59 /// <summary> 59 /// <summary>
60 /// Returns all profiles within the specified range 60 /// Returns all profiles within the specified range
61 /// </summary> 61 /// </summary>
62 /// <param name="Xmin">Minimum sim coordinate (X)</param> 62 /// <param name="Xmin">Minimum sim coordinate (X)</param>
63 /// <param name="Ymin">Minimum sim coordinate (Y)</param> 63 /// <param name="Ymin">Minimum sim coordinate (Y)</param>
64 /// <param name="Xmax">Maximum sim coordinate (X)</param> 64 /// <param name="Xmax">Maximum sim coordinate (X)</param>
65 /// <param name="Ymin">Maximum sim coordinate (Y)</param> 65 /// <param name="Ymin">Maximum sim coordinate (Y)</param>
66 /// <returns>An array containing all the sim profiles in the specified range</returns> 66 /// <returns>An array containing all the sim profiles in the specified range</returns>
67 SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax); 67 SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
68 68
69 /// <summary> 69 /// <summary>
70 /// Authenticates a sim by use of it's recv key. 70 /// Authenticates a sim by use of it's recv key.
71 /// WARNING: Insecure 71 /// WARNING: Insecure
72 /// </summary> 72 /// </summary>
73 /// <param name="UUID">The UUID sent by the sim</param> 73 /// <param name="UUID">The UUID sent by the sim</param>
74 /// <param name="regionHandle">The regionhandle sent by the sim</param> 74 /// <param name="regionHandle">The regionhandle sent by the sim</param>
75 /// <param name="simrecvkey">The recieving key sent by the sim</param> 75 /// <param name="simrecvkey">The recieving key sent by the sim</param>
76 /// <returns>Whether the sim has been authenticated</returns> 76 /// <returns>Whether the sim has been authenticated</returns>
77 bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); 77 bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey);
78 78
79 /// <summary> 79 /// <summary>
80 /// Initialises the interface 80 /// Initialises the interface
81 /// </summary> 81 /// </summary>
82 void Initialise(); 82 void Initialise();
83 83
84 /// <summary> 84 /// <summary>
85 /// Closes the interface 85 /// Closes the interface
86 /// </summary> 86 /// </summary>
87 void Close(); 87 void Close();
88 88
89 /// <summary> 89 /// <summary>
90 /// The plugin being loaded 90 /// The plugin being loaded
91 /// </summary> 91 /// </summary>
92 /// <returns>A string containing the plugin name</returns> 92 /// <returns>A string containing the plugin name</returns>
93 string getName(); 93 string getName();
94 94
95 /// <summary> 95 /// <summary>
96 /// The plugins version 96 /// The plugins version
97 /// </summary> 97 /// </summary>
98 /// <returns>A string containing the plugin version</returns> 98 /// <returns>A string containing the plugin version</returns>
99 string getVersion(); 99 string getVersion();
100 100
101 /// <summary> 101 /// <summary>
102 /// Adds a new profile to the database 102 /// Adds a new profile to the database
103 /// </summary> 103 /// </summary>
104 /// <param name="profile">The profile to add</param> 104 /// <param name="profile">The profile to add</param>
105 /// <returns>RESPONSE_OK if successful, error if not.</returns> 105 /// <returns>RESPONSE_OK if successful, error if not.</returns>
106 DataResponse AddProfile(SimProfileData profile); 106 DataResponse AddProfile(SimProfileData profile);
107 107
108 ReservationData GetReservationAtPoint(uint x, uint y); 108 ReservationData GetReservationAtPoint(uint x, uint y);
109 109
110 } 110 }
111} 111}
diff --git a/OpenSim/Framework/Data/ILogData.cs b/OpenSim/Framework/Data/ILogData.cs
index 059fef5..a827c0c 100644
--- a/OpenSim/Framework/Data/ILogData.cs
+++ b/OpenSim/Framework/Data/ILogData.cs
@@ -1,90 +1,90 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Data 28namespace OpenSim.Framework.Data
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// The severity of an individual log message 31 /// The severity of an individual log message
32 /// </summary> 32 /// </summary>
33 public enum LogSeverity : int 33 public enum LogSeverity : int
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// Critical: systems failure 36 /// Critical: systems failure
37 /// </summary> 37 /// </summary>
38 CRITICAL = 1, 38 CRITICAL = 1,
39 /// <summary> 39 /// <summary>
40 /// Major: warning prior to systems failure 40 /// Major: warning prior to systems failure
41 /// </summary> 41 /// </summary>
42 MAJOR = 2, 42 MAJOR = 2,
43 /// <summary> 43 /// <summary>
44 /// Medium: an individual non-critical task failed 44 /// Medium: an individual non-critical task failed
45 /// </summary> 45 /// </summary>
46 MEDIUM = 3, 46 MEDIUM = 3,
47 /// <summary> 47 /// <summary>
48 /// Low: Informational warning 48 /// Low: Informational warning
49 /// </summary> 49 /// </summary>
50 LOW = 4, 50 LOW = 4,
51 /// <summary> 51 /// <summary>
52 /// Info: Information 52 /// Info: Information
53 /// </summary> 53 /// </summary>
54 INFO = 5, 54 INFO = 5,
55 /// <summary> 55 /// <summary>
56 /// Verbose: Debug Information 56 /// Verbose: Debug Information
57 /// </summary> 57 /// </summary>
58 VERBOSE = 6 58 VERBOSE = 6
59 } 59 }
60 60
61 /// <summary> 61 /// <summary>
62 /// An interface to a LogData storage system 62 /// An interface to a LogData storage system
63 /// </summary> 63 /// </summary>
64 public interface ILogData 64 public interface ILogData
65 { 65 {
66 void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage); 66 void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);
67 /// <summary> 67 /// <summary>
68 /// Initialises the interface 68 /// Initialises the interface
69 /// </summary> 69 /// </summary>
70 void Initialise(); 70 void Initialise();
71 71
72 /// <summary> 72 /// <summary>
73 /// Closes the interface 73 /// Closes the interface
74 /// </summary> 74 /// </summary>
75 void Close(); 75 void Close();
76 76
77 /// <summary> 77 /// <summary>
78 /// The plugin being loaded 78 /// The plugin being loaded
79 /// </summary> 79 /// </summary>
80 /// <returns>A string containing the plugin name</returns> 80 /// <returns>A string containing the plugin name</returns>
81 string getName(); 81 string getName();
82 82
83 /// <summary> 83 /// <summary>
84 /// The plugins version 84 /// The plugins version
85 /// </summary> 85 /// </summary>
86 /// <returns>A string containing the plugin version</returns> 86 /// <returns>A string containing the plugin version</returns>
87 string getVersion(); 87 string getVersion();
88 } 88 }
89 89
90} 90}
diff --git a/OpenSim/Framework/Data/IniConfig.cs b/OpenSim/Framework/Data/IniConfig.cs
index 2b52fd1..5dcb2fd 100644
--- a/OpenSim/Framework/Data/IniConfig.cs
+++ b/OpenSim/Framework/Data/IniConfig.cs
@@ -1,96 +1,96 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.IO; 28using System.IO;
29using System.Text.RegularExpressions; 29using System.Text.RegularExpressions;
30/* 30/*
31 Taken from public code listing at by Alex Pinsker 31 Taken from public code listing at by Alex Pinsker
32 http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html 32 http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html
33 */ 33 */
34 34
35namespace OpenSim.Framework.Data 35namespace OpenSim.Framework.Data
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Parse settings from ini-like files 38 /// Parse settings from ini-like files
39 /// </summary> 39 /// </summary>
40 public class IniFile 40 public class IniFile
41 { 41 {
42 static IniFile() 42 static IniFile()
43 { 43 {
44 _iniKeyValuePatternRegex = new Regex( 44 _iniKeyValuePatternRegex = new Regex(
45 @"((\s)*(?<Key>([^\=^\s^\n]+))[\s^\n]* 45 @"((\s)*(?<Key>([^\=^\s^\n]+))[\s^\n]*
46 # key part (surrounding whitespace stripped) 46 # key part (surrounding whitespace stripped)
47 \= 47 \=
48 (\s)*(?<Value>([^\n^\s]+(\n){0,1}))) 48 (\s)*(?<Value>([^\n^\s]+(\n){0,1})))
49 # value part (surrounding whitespace stripped) 49 # value part (surrounding whitespace stripped)
50 ", 50 ",
51 RegexOptions.IgnorePatternWhitespace | 51 RegexOptions.IgnorePatternWhitespace |
52 RegexOptions.Compiled | 52 RegexOptions.Compiled |
53 RegexOptions.CultureInvariant); 53 RegexOptions.CultureInvariant);
54 } 54 }
55 static private Regex _iniKeyValuePatternRegex; 55 static private Regex _iniKeyValuePatternRegex;
56 56
57 public IniFile(string iniFileName) 57 public IniFile(string iniFileName)
58 { 58 {
59 _iniFileName = iniFileName; 59 _iniFileName = iniFileName;
60 } 60 }
61 61
62 public string ParseFileReadValue(string key) 62 public string ParseFileReadValue(string key)
63 { 63 {
64 using (StreamReader reader = 64 using (StreamReader reader =
65 new StreamReader(_iniFileName)) 65 new StreamReader(_iniFileName))
66 { 66 {
67 do 67 do
68 { 68 {
69 string line = reader.ReadLine(); 69 string line = reader.ReadLine();
70 Match match = 70 Match match =
71 _iniKeyValuePatternRegex.Match(line); 71 _iniKeyValuePatternRegex.Match(line);
72 if (match.Success) 72 if (match.Success)
73 { 73 {
74 string currentKey = 74 string currentKey =
75 match.Groups["Key"].Value as string; 75 match.Groups["Key"].Value as string;
76 if (currentKey != null && 76 if (currentKey != null &&
77 currentKey.Trim().CompareTo(key) == 0) 77 currentKey.Trim().CompareTo(key) == 0)
78 { 78 {
79 string value = 79 string value =
80 match.Groups["Value"].Value as string; 80 match.Groups["Value"].Value as string;
81 return value; 81 return value;
82 } 82 }
83 } 83 }
84 84
85 } 85 }
86 while (reader.Peek() != -1); 86 while (reader.Peek() != -1);
87 } 87 }
88 return null; 88 return null;
89 } 89 }
90 90
91 public string IniFileName 91 public string IniFileName
92 { 92 {
93 get { return _iniFileName; } 93 get { return _iniFileName; }
94 } private string _iniFileName; 94 } private string _iniFileName;
95 } 95 }
96} 96}
diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs
index 7253cc7..f6aeb58 100644
--- a/OpenSim/Framework/Data/InventoryData.cs
+++ b/OpenSim/Framework/Data/InventoryData.cs
@@ -1,197 +1,197 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Data 31namespace OpenSim.Framework.Data
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Inventory Item - contains all the properties associated with an individual inventory piece. 34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase 36 public class InventoryItemBase
37 { 37 {
38 /// <summary> 38 /// <summary>
39 /// A UUID containing the ID for the inventory item itself 39 /// A UUID containing the ID for the inventory item itself
40 /// </summary> 40 /// </summary>
41 public LLUUID inventoryID; 41 public LLUUID inventoryID;
42 /// <summary> 42 /// <summary>
43 /// The UUID of the associated asset on the asset server 43 /// The UUID of the associated asset on the asset server
44 /// </summary> 44 /// </summary>
45 public LLUUID assetID; 45 public LLUUID assetID;
46 /// <summary> 46 /// <summary>
47 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) 47 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
48 /// </summary> 48 /// </summary>
49 public int type; 49 public int type;
50 /// <summary> 50 /// <summary>
51 /// The folder this item is contained in 51 /// The folder this item is contained in
52 /// </summary> 52 /// </summary>
53 public LLUUID parentFolderID; 53 public LLUUID parentFolderID;
54 /// <summary> 54 /// <summary>
55 /// The owner of this inventory item 55 /// The owner of this inventory item
56 /// </summary> 56 /// </summary>
57 public LLUUID avatarID; 57 public LLUUID avatarID;
58 /// <summary> 58 /// <summary>
59 /// The creator of this item 59 /// The creator of this item
60 /// </summary> 60 /// </summary>
61 public LLUUID creatorsID; 61 public LLUUID creatorsID;
62 /// <summary> 62 /// <summary>
63 /// The name of the inventory item (must be less than 64 characters) 63 /// The name of the inventory item (must be less than 64 characters)
64 /// </summary> 64 /// </summary>
65 public string inventoryName; 65 public string inventoryName;
66 /// <summary> 66 /// <summary>
67 /// The description of the inventory item (must be less than 64 characters) 67 /// The description of the inventory item (must be less than 64 characters)
68 /// </summary> 68 /// </summary>
69 public string inventoryDescription; 69 public string inventoryDescription;
70 /// <summary> 70 /// <summary>
71 /// A mask containing the permissions for the next owner (cannot be enforced) 71 /// A mask containing the permissions for the next owner (cannot be enforced)
72 /// </summary> 72 /// </summary>
73 public uint inventoryNextPermissions; 73 public uint inventoryNextPermissions;
74 /// <summary> 74 /// <summary>
75 /// A mask containing permissions for the current owner (cannot be enforced) 75 /// A mask containing permissions for the current owner (cannot be enforced)
76 /// </summary> 76 /// </summary>
77 public uint inventoryCurrentPermissions; 77 public uint inventoryCurrentPermissions;
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// A Class for folders which contain users inventory 81 /// A Class for folders which contain users inventory
82 /// </summary> 82 /// </summary>
83 public class InventoryFolderBase 83 public class InventoryFolderBase
84 { 84 {
85 /// <summary> 85 /// <summary>
86 /// The name of the folder (64 characters or less) 86 /// The name of the folder (64 characters or less)
87 /// </summary> 87 /// </summary>
88 public string name; 88 public string name;
89 /// <summary> 89 /// <summary>
90 /// The agent who's inventory this is contained by 90 /// The agent who's inventory this is contained by
91 /// </summary> 91 /// </summary>
92 public LLUUID agentID; 92 public LLUUID agentID;
93 /// <summary> 93 /// <summary>
94 /// The folder this folder is contained in 94 /// The folder this folder is contained in
95 /// </summary> 95 /// </summary>
96 public LLUUID parentID; 96 public LLUUID parentID;
97 /// <summary> 97 /// <summary>
98 /// The UUID for this folder 98 /// The UUID for this folder
99 /// </summary> 99 /// </summary>
100 public LLUUID folderID; 100 public LLUUID folderID;
101 /// <summary> 101 /// <summary>
102 /// Tyep of Items normally stored in this folder 102 /// Tyep of Items normally stored in this folder
103 /// </summary> 103 /// </summary>
104 public ushort type; 104 public ushort type;
105 /// <summary> 105 /// <summary>
106 /// 106 ///
107 /// </summary> 107 /// </summary>
108 public ushort version; 108 public ushort version;
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
112 /// An interface for accessing inventory data from a storage server 112 /// An interface for accessing inventory data from a storage server
113 /// </summary> 113 /// </summary>
114 public interface IInventoryData 114 public interface IInventoryData
115 { 115 {
116 /// <summary> 116 /// <summary>
117 /// Initialises the interface 117 /// Initialises the interface
118 /// </summary> 118 /// </summary>
119 void Initialise(); 119 void Initialise();
120 120
121 /// <summary> 121 /// <summary>
122 /// Closes the interface 122 /// Closes the interface
123 /// </summary> 123 /// </summary>
124 void Close(); 124 void Close();
125 125
126 /// <summary> 126 /// <summary>
127 /// The plugin being loaded 127 /// The plugin being loaded
128 /// </summary> 128 /// </summary>
129 /// <returns>A string containing the plugin name</returns> 129 /// <returns>A string containing the plugin name</returns>
130 string getName(); 130 string getName();
131 131
132 /// <summary> 132 /// <summary>
133 /// The plugins version 133 /// The plugins version
134 /// </summary> 134 /// </summary>
135 /// <returns>A string containing the plugin version</returns> 135 /// <returns>A string containing the plugin version</returns>
136 string getVersion(); 136 string getVersion();
137 137
138 /// <summary> 138 /// <summary>
139 /// Returns a list of inventory items contained within the specified folder 139 /// Returns a list of inventory items contained within the specified folder
140 /// </summary> 140 /// </summary>
141 /// <param name="folderID">The UUID of the target folder</param> 141 /// <param name="folderID">The UUID of the target folder</param>
142 /// <returns>A List of InventoryItemBase items</returns> 142 /// <returns>A List of InventoryItemBase items</returns>
143 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID); 143 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
144 144
145 /// <summary> 145 /// <summary>
146 /// Returns a list of folders in the users inventory root. 146 /// Returns a list of folders in the users inventory root.
147 /// </summary> 147 /// </summary>
148 /// <param name="user">The UUID of the user who is having inventory being returned</param> 148 /// <param name="user">The UUID of the user who is having inventory being returned</param>
149 /// <returns>A list of folders</returns> 149 /// <returns>A list of folders</returns>
150 List<InventoryFolderBase> getUserRootFolders(LLUUID user); 150 List<InventoryFolderBase> getUserRootFolders(LLUUID user);
151 151
152 /// <summary> 152 /// <summary>
153 /// Returns a list of inventory folders contained in the folder 'parentID' 153 /// Returns a list of inventory folders contained in the folder 'parentID'
154 /// </summary> 154 /// </summary>
155 /// <param name="parentID">The folder to get subfolders for</param> 155 /// <param name="parentID">The folder to get subfolders for</param>
156 /// <returns>A list of inventory folders</returns> 156 /// <returns>A list of inventory folders</returns>
157 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID); 157 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
158 158
159 /// <summary> 159 /// <summary>
160 /// Returns an inventory item by its UUID 160 /// Returns an inventory item by its UUID
161 /// </summary> 161 /// </summary>
162 /// <param name="item">The UUID of the item to be returned</param> 162 /// <param name="item">The UUID of the item to be returned</param>
163 /// <returns>A class containing item information</returns> 163 /// <returns>A class containing item information</returns>
164 InventoryItemBase getInventoryItem(LLUUID item); 164 InventoryItemBase getInventoryItem(LLUUID item);
165 165
166 /// <summary> 166 /// <summary>
167 /// Returns a specified inventory folder by its UUID 167 /// Returns a specified inventory folder by its UUID
168 /// </summary> 168 /// </summary>
169 /// <param name="folder">The UUID of the folder to be returned</param> 169 /// <param name="folder">The UUID of the folder to be returned</param>
170 /// <returns>A class containing folder information</returns> 170 /// <returns>A class containing folder information</returns>
171 InventoryFolderBase getInventoryFolder(LLUUID folder); 171 InventoryFolderBase getInventoryFolder(LLUUID folder);
172 172
173 /// <summary> 173 /// <summary>
174 /// Creates a new inventory item based on item 174 /// Creates a new inventory item based on item
175 /// </summary> 175 /// </summary>
176 /// <param name="item">The item to be created</param> 176 /// <param name="item">The item to be created</param>
177 void addInventoryItem(InventoryItemBase item); 177 void addInventoryItem(InventoryItemBase item);
178 178
179 /// <summary> 179 /// <summary>
180 /// Updates an inventory item with item (updates based on ID) 180 /// Updates an inventory item with item (updates based on ID)
181 /// </summary> 181 /// </summary>
182 /// <param name="item">The updated item</param> 182 /// <param name="item">The updated item</param>
183 void updateInventoryItem(InventoryItemBase item); 183 void updateInventoryItem(InventoryItemBase item);
184 184
185 /// <summary> 185 /// <summary>
186 /// Adds a new folder specified by folder 186 /// Adds a new folder specified by folder
187 /// </summary> 187 /// </summary>
188 /// <param name="folder">The inventory folder</param> 188 /// <param name="folder">The inventory folder</param>
189 void addInventoryFolder(InventoryFolderBase folder); 189 void addInventoryFolder(InventoryFolderBase folder);
190 190
191 /// <summary> 191 /// <summary>
192 /// Updates a folder based on its ID with folder 192 /// Updates a folder based on its ID with folder
193 /// </summary> 193 /// </summary>
194 /// <param name="folder">The inventory folder</param> 194 /// <param name="folder">The inventory folder</param>
195 void updateInventoryFolder(InventoryFolderBase folder); 195 void updateInventoryFolder(InventoryFolderBase folder);
196 } 196 }
197} 197}
diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
index f9260a1..556d589 100644
--- a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Framework.Data")] 6[assembly: AssemblyTitle("OpenSim.Framework.Data")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Framework.Data")] 10[assembly: AssemblyProduct("OpenSim.Framework.Data")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")] 21[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data/ReservationData.cs b/OpenSim/Framework/Data/ReservationData.cs
index 0078df0..8344d6c 100644
--- a/OpenSim/Framework/Data/ReservationData.cs
+++ b/OpenSim/Framework/Data/ReservationData.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Data 30namespace OpenSim.Framework.Data
31{ 31{
32 public class ReservationData 32 public class ReservationData
33 { 33 {
34 public LLUUID userUUID = new LLUUID(); 34 public LLUUID userUUID = new LLUUID();
35 public int reservationMinX = 0; 35 public int reservationMinX = 0;
36 public int reservationMinY = 0; 36 public int reservationMinY = 0;
37 public int reservationMaxX = 65536; 37 public int reservationMaxX = 65536;
38 public int reservationMaxY = 65536; 38 public int reservationMaxY = 65536;
39 39
40 public string reservationName = ""; 40 public string reservationName = "";
41 public string reservationCompany = ""; 41 public string reservationCompany = "";
42 public bool status = true; 42 public bool status = true;
43 43
44 public string gridSendKey = ""; 44 public string gridSendKey = "";
45 public string gridRecvKey = ""; 45 public string gridRecvKey = "";
46 } 46 }
47} 47}
diff --git a/OpenSim/Framework/Data/SimProfileData.cs b/OpenSim/Framework/Data/SimProfileData.cs
index b920cab..c963455 100644
--- a/OpenSim/Framework/Data/SimProfileData.cs
+++ b/OpenSim/Framework/Data/SimProfileData.cs
@@ -1,192 +1,192 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using Nwc.XmlRpc; 29using Nwc.XmlRpc;
30 30
31using System; 31using System;
32using System.Collections; 32using System.Collections;
33 33
34namespace OpenSim.Framework.Data 34namespace OpenSim.Framework.Data
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// A class which contains information known to the grid server about a region 37 /// A class which contains information known to the grid server about a region
38 /// </summary> 38 /// </summary>
39 public class SimProfileData 39 public class SimProfileData
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// The name of the region 42 /// The name of the region
43 /// </summary> 43 /// </summary>
44 public string regionName = ""; 44 public string regionName = "";
45 45
46 /// <summary> 46 /// <summary>
47 /// A 64-bit number combining map position into a (mostly) unique ID 47 /// A 64-bit number combining map position into a (mostly) unique ID
48 /// </summary> 48 /// </summary>
49 public ulong regionHandle; 49 public ulong regionHandle;
50 50
51 /// <summary> 51 /// <summary>
52 /// OGS/OpenSim Specific ID for a region 52 /// OGS/OpenSim Specific ID for a region
53 /// </summary> 53 /// </summary>
54 public LLUUID UUID; 54 public LLUUID UUID;
55 55
56 /// <summary> 56 /// <summary>
57 /// Coordinates of the region 57 /// Coordinates of the region
58 /// </summary> 58 /// </summary>
59 public uint regionLocX; 59 public uint regionLocX;
60 public uint regionLocY; 60 public uint regionLocY;
61 public uint regionLocZ; // Reserved (round-robin, layers, etc) 61 public uint regionLocZ; // Reserved (round-robin, layers, etc)
62 62
63 /// <summary> 63 /// <summary>
64 /// Authentication secrets 64 /// Authentication secrets
65 /// </summary> 65 /// </summary>
66 /// <remarks>Not very secure, needs improvement.</remarks> 66 /// <remarks>Not very secure, needs improvement.</remarks>
67 public string regionSendKey = ""; 67 public string regionSendKey = "";
68 public string regionRecvKey = ""; 68 public string regionRecvKey = "";
69 public string regionSecret = ""; 69 public string regionSecret = "";
70 70
71 /// <summary> 71 /// <summary>
72 /// Whether the region is online 72 /// Whether the region is online
73 /// </summary> 73 /// </summary>
74 public bool regionOnline; 74 public bool regionOnline;
75 75
76 /// <summary> 76 /// <summary>
77 /// Information about the server that the region is currently hosted on 77 /// Information about the server that the region is currently hosted on
78 /// </summary> 78 /// </summary>
79 public string serverIP = ""; 79 public string serverIP = "";
80 public uint serverPort; 80 public uint serverPort;
81 public string serverURI = ""; 81 public string serverURI = "";
82 82
83 public uint httpPort; 83 public uint httpPort;
84 public uint remotingPort; 84 public uint remotingPort;
85 public string httpServerURI = ""; 85 public string httpServerURI = "";
86 86
87 /// <summary> 87 /// <summary>
88 /// Set of optional overrides. Can be used to create non-eulicidean spaces. 88 /// Set of optional overrides. Can be used to create non-eulicidean spaces.
89 /// </summary> 89 /// </summary>
90 public ulong regionNorthOverrideHandle; 90 public ulong regionNorthOverrideHandle;
91 public ulong regionSouthOverrideHandle; 91 public ulong regionSouthOverrideHandle;
92 public ulong regionEastOverrideHandle; 92 public ulong regionEastOverrideHandle;
93 public ulong regionWestOverrideHandle; 93 public ulong regionWestOverrideHandle;
94 94
95 /// <summary> 95 /// <summary>
96 /// Optional: URI Location of the region database 96 /// Optional: URI Location of the region database
97 /// </summary> 97 /// </summary>
98 /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks> 98 /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
99 public string regionDataURI = ""; 99 public string regionDataURI = "";
100 100
101 /// <summary> 101 /// <summary>
102 /// Region Asset Details 102 /// Region Asset Details
103 /// </summary> 103 /// </summary>
104 public string regionAssetURI = ""; 104 public string regionAssetURI = "";
105 public string regionAssetSendKey = ""; 105 public string regionAssetSendKey = "";
106 public string regionAssetRecvKey = ""; 106 public string regionAssetRecvKey = "";
107 107
108 /// <summary> 108 /// <summary>
109 /// Region Userserver Details 109 /// Region Userserver Details
110 /// </summary> 110 /// </summary>
111 public string regionUserURI = ""; 111 public string regionUserURI = "";
112 public string regionUserSendKey = ""; 112 public string regionUserSendKey = "";
113 public string regionUserRecvKey = ""; 113 public string regionUserRecvKey = "";
114 114
115 /// <summary> 115 /// <summary>
116 /// Region Map Texture Asset 116 /// Region Map Texture Asset
117 /// </summary> 117 /// </summary>
118 public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006"); 118 public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006");
119 119
120 /// <summary> 120 /// <summary>
121 /// Get Sim profile data from grid server when in grid mode 121 /// Get Sim profile data from grid server when in grid mode
122 /// </summary> 122 /// </summary>
123 /// <param name="region_uuid"></param> 123 /// <param name="region_uuid"></param>
124 /// <param name="gridserver_url"></param> 124 /// <param name="gridserver_url"></param>
125 /// <param name="?"></param> 125 /// <param name="?"></param>
126 /// <returns></returns> 126 /// <returns></returns>
127 public SimProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) 127 public SimProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey)
128 { 128 {
129 Hashtable requestData = new Hashtable(); 129 Hashtable requestData = new Hashtable();
130 requestData["region_uuid"] = region_uuid.UUID.ToString(); 130 requestData["region_uuid"] = region_uuid.UUID.ToString();
131 requestData["authkey"] = gridserver_sendkey; 131 requestData["authkey"] = gridserver_sendkey;
132 ArrayList SendParams = new ArrayList(); 132 ArrayList SendParams = new ArrayList();
133 SendParams.Add(requestData); 133 SendParams.Add(requestData);
134 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 134 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
135 XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); 135 XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
136 136
137 Hashtable responseData = (Hashtable)GridResp.Value; 137 Hashtable responseData = (Hashtable)GridResp.Value;
138 138
139 if (responseData.ContainsKey("error")) 139 if (responseData.ContainsKey("error"))
140 { 140 {
141 return null; 141 return null;
142 } 142 }
143 143
144 SimProfileData simData = new SimProfileData(); 144 SimProfileData simData = new SimProfileData();
145 simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); 145 simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]);
146 simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); 146 simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]);
147 simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); 147 simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256));
148 simData.serverIP = (string)responseData["sim_ip"]; 148 simData.serverIP = (string)responseData["sim_ip"];
149 simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); 149 simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]);
150 simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); 150 simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]);
151 simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 151 simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
152 simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; 152 simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/";
153 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; 153 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
154 simData.UUID = new LLUUID((string)responseData["region_UUID"]); 154 simData.UUID = new LLUUID((string)responseData["region_UUID"]);
155 simData.regionName = (string)responseData["region_name"]; 155 simData.regionName = (string)responseData["region_name"];
156 156
157 return simData; 157 return simData;
158 } 158 }
159 public SimProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) 159 public SimProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey)
160 { 160 {
161 Hashtable requestData = new Hashtable(); 161 Hashtable requestData = new Hashtable();
162 requestData["region_handle"] = region_handle.ToString(); 162 requestData["region_handle"] = region_handle.ToString();
163 requestData["authkey"] = gridserver_sendkey; 163 requestData["authkey"] = gridserver_sendkey;
164 ArrayList SendParams = new ArrayList(); 164 ArrayList SendParams = new ArrayList();
165 SendParams.Add(requestData); 165 SendParams.Add(requestData);
166 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 166 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
167 XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); 167 XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000);
168 168
169 Hashtable responseData = (Hashtable)GridResp.Value; 169 Hashtable responseData = (Hashtable)GridResp.Value;
170 170
171 if (responseData.ContainsKey("error")) 171 if (responseData.ContainsKey("error"))
172 { 172 {
173 return null; 173 return null;
174 } 174 }
175 175
176 SimProfileData simData = new SimProfileData(); 176 SimProfileData simData = new SimProfileData();
177 simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); 177 simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]);
178 simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); 178 simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]);
179 simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); 179 simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256));
180 simData.serverIP = (string)responseData["sim_ip"]; 180 simData.serverIP = (string)responseData["sim_ip"];
181 simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); 181 simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]);
182 simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); 182 simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]);
183 simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 183 simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
184 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; 184 simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/";
185 simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; 185 simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/";
186 simData.UUID = new LLUUID((string)responseData["region_UUID"]); 186 simData.UUID = new LLUUID((string)responseData["region_UUID"]);
187 simData.regionName = (string)responseData["region_name"]; 187 simData.regionName = (string)responseData["region_name"];
188 188
189 return simData; 189 return simData;
190 } 190 }
191 } 191 }
192} 192}
diff --git a/OpenSim/Framework/Data/UserData.cs b/OpenSim/Framework/Data/UserData.cs
index c65f9fd..d849e12 100644
--- a/OpenSim/Framework/Data/UserData.cs
+++ b/OpenSim/Framework/Data/UserData.cs
@@ -1,128 +1,128 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Data 30namespace OpenSim.Framework.Data
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// An interface for connecting to user storage servers. 33 /// An interface for connecting to user storage servers.
34 /// </summary> 34 /// </summary>
35 public interface IUserData 35 public interface IUserData
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// Returns a user profile from a database via their UUID 38 /// Returns a user profile from a database via their UUID
39 /// </summary> 39 /// </summary>
40 /// <param name="user">The accounts UUID</param> 40 /// <param name="user">The accounts UUID</param>
41 /// <returns>The user data profile</returns> 41 /// <returns>The user data profile</returns>
42 UserProfileData getUserByUUID(LLUUID user); 42 UserProfileData getUserByUUID(LLUUID user);
43 43
44 /// <summary> 44 /// <summary>
45 /// Returns a users profile by searching their username 45 /// Returns a users profile by searching their username
46 /// </summary> 46 /// </summary>
47 /// <param name="name">The users username</param> 47 /// <param name="name">The users username</param>
48 /// <returns>The user data profile</returns> 48 /// <returns>The user data profile</returns>
49 UserProfileData getUserByName(string name); 49 UserProfileData getUserByName(string name);
50 50
51 /// <summary> 51 /// <summary>
52 /// Returns a users profile by searching their username parts 52 /// Returns a users profile by searching their username parts
53 /// </summary> 53 /// </summary>
54 /// <param name="fname">Account firstname</param> 54 /// <param name="fname">Account firstname</param>
55 /// <param name="lname">Account lastname</param> 55 /// <param name="lname">Account lastname</param>
56 /// <returns>The user data profile</returns> 56 /// <returns>The user data profile</returns>
57 UserProfileData getUserByName(string fname, string lname); 57 UserProfileData getUserByName(string fname, string lname);
58 58
59 /// <summary> 59 /// <summary>
60 /// Returns the current agent for a user searching by it's UUID 60 /// Returns the current agent for a user searching by it's UUID
61 /// </summary> 61 /// </summary>
62 /// <param name="user">The users UUID</param> 62 /// <param name="user">The users UUID</param>
63 /// <returns>The current agent session</returns> 63 /// <returns>The current agent session</returns>
64 UserAgentData getAgentByUUID(LLUUID user); 64 UserAgentData getAgentByUUID(LLUUID user);
65 65
66 /// <summary> 66 /// <summary>
67 /// Returns the current session agent for a user searching by username 67 /// Returns the current session agent for a user searching by username
68 /// </summary> 68 /// </summary>
69 /// <param name="name">The users account name</param> 69 /// <param name="name">The users account name</param>
70 /// <returns>The current agent session</returns> 70 /// <returns>The current agent session</returns>
71 UserAgentData getAgentByName(string name); 71 UserAgentData getAgentByName(string name);
72 72
73 /// <summary> 73 /// <summary>
74 /// Returns the current session agent for a user searching by username parts 74 /// Returns the current session agent for a user searching by username parts
75 /// </summary> 75 /// </summary>
76 /// <param name="fname">The users first account name</param> 76 /// <param name="fname">The users first account name</param>
77 /// <param name="lname">The users account surname</param> 77 /// <param name="lname">The users account surname</param>
78 /// <returns>The current agent session</returns> 78 /// <returns>The current agent session</returns>
79 UserAgentData getAgentByName(string fname, string lname); 79 UserAgentData getAgentByName(string fname, string lname);
80 80
81 /// <summary> 81 /// <summary>
82 /// Adds a new User profile to the database 82 /// Adds a new User profile to the database
83 /// </summary> 83 /// </summary>
84 /// <param name="user">UserProfile to add</param> 84 /// <param name="user">UserProfile to add</param>
85 void addNewUserProfile(UserProfileData user); 85 void addNewUserProfile(UserProfileData user);
86 86
87 /// <summary> 87 /// <summary>
88 /// Adds a new agent to the database 88 /// Adds a new agent to the database
89 /// </summary> 89 /// </summary>
90 /// <param name="agent">The agent to add</param> 90 /// <param name="agent">The agent to add</param>
91 void addNewUserAgent(UserAgentData agent); 91 void addNewUserAgent(UserAgentData agent);
92 92
93 /// <summary> 93 /// <summary>
94 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) 94 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
95 /// </summary> 95 /// </summary>
96 /// <param name="from">The account to transfer from</param> 96 /// <param name="from">The account to transfer from</param>
97 /// <param name="to">The account to transfer to</param> 97 /// <param name="to">The account to transfer to</param>
98 /// <param name="amount">The amount to transfer</param> 98 /// <param name="amount">The amount to transfer</param>
99 /// <returns>Successful?</returns> 99 /// <returns>Successful?</returns>
100 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount); 100 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
101 101
102 /// <summary> 102 /// <summary>
103 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. 103 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
104 /// </summary> 104 /// </summary>
105 /// <param name="from">User to transfer from</param> 105 /// <param name="from">User to transfer from</param>
106 /// <param name="to">User to transfer to</param> 106 /// <param name="to">User to transfer to</param>
107 /// <param name="inventory">Specified inventory item</param> 107 /// <param name="inventory">Specified inventory item</param>
108 /// <returns>Successful?</returns> 108 /// <returns>Successful?</returns>
109 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); 109 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
110 110
111 /// <summary> 111 /// <summary>
112 /// Returns the plugin version 112 /// Returns the plugin version
113 /// </summary> 113 /// </summary>
114 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> 114 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
115 string getVersion(); 115 string getVersion();
116 116
117 /// <summary> 117 /// <summary>
118 /// Returns the plugin name 118 /// Returns the plugin name
119 /// </summary> 119 /// </summary>
120 /// <returns>Plugin name, eg MySQL User Provider</returns> 120 /// <returns>Plugin name, eg MySQL User Provider</returns>
121 string getName(); 121 string getName();
122 122
123 /// <summary> 123 /// <summary>
124 /// Initialises the plugin (artificial constructor) 124 /// Initialises the plugin (artificial constructor)
125 /// </summary> 125 /// </summary>
126 void Initialise(); 126 void Initialise();
127 } 127 }
128} 128}
diff --git a/OpenSim/Framework/Data/UserProfileData.cs b/OpenSim/Framework/Data/UserProfileData.cs
index bb7d48c..88f956f 100644
--- a/OpenSim/Framework/Data/UserProfileData.cs
+++ b/OpenSim/Framework/Data/UserProfileData.cs
@@ -1,180 +1,180 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Data 31namespace OpenSim.Framework.Data
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Information about a particular user known to the userserver 34 /// Information about a particular user known to the userserver
35 /// </summary> 35 /// </summary>
36 public class UserProfileData 36 public class UserProfileData
37 { 37 {
38 /// <summary> 38 /// <summary>
39 /// The ID value for this user 39 /// The ID value for this user
40 /// </summary> 40 /// </summary>
41 public LLUUID UUID; 41 public LLUUID UUID;
42 42
43 /// <summary> 43 /// <summary>
44 /// The first component of a users account name 44 /// The first component of a users account name
45 /// </summary> 45 /// </summary>
46 public string username; 46 public string username;
47 /// <summary> 47 /// <summary>
48 /// The second component of a users account name 48 /// The second component of a users account name
49 /// </summary> 49 /// </summary>
50 public string surname; 50 public string surname;
51 51
52 /// <summary> 52 /// <summary>
53 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) 53 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
54 /// </summary> 54 /// </summary>
55 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> 55 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
56 public string passwordHash; 56 public string passwordHash;
57 /// <summary> 57 /// <summary>
58 /// The salt used for the users hash, should be 32 bytes or longer 58 /// The salt used for the users hash, should be 32 bytes or longer
59 /// </summary> 59 /// </summary>
60 public string passwordSalt; 60 public string passwordSalt;
61 61
62 /// <summary> 62 /// <summary>
63 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into 63 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
64 /// </summary> 64 /// </summary>
65 public ulong homeRegion; 65 public ulong homeRegion;
66 /// <summary> 66 /// <summary>
67 /// The coordinates inside the region of the home location 67 /// The coordinates inside the region of the home location
68 /// </summary> 68 /// </summary>
69 public LLVector3 homeLocation; 69 public LLVector3 homeLocation;
70 /// <summary> 70 /// <summary>
71 /// Where the user will be looking when they rez. 71 /// Where the user will be looking when they rez.
72 /// </summary> 72 /// </summary>
73 public LLVector3 homeLookAt; 73 public LLVector3 homeLookAt;
74 74
75 /// <summary> 75 /// <summary>
76 /// A UNIX Timestamp (seconds since epoch) for the users creation 76 /// A UNIX Timestamp (seconds since epoch) for the users creation
77 /// </summary> 77 /// </summary>
78 public int created; 78 public int created;
79 /// <summary> 79 /// <summary>
80 /// A UNIX Timestamp for the users last login date / time 80 /// A UNIX Timestamp for the users last login date / time
81 /// </summary> 81 /// </summary>
82 public int lastLogin; 82 public int lastLogin;
83 83
84 /// <summary> 84 /// <summary>
85 /// A URI to the users inventory server, used for foreigners and large grids 85 /// A URI to the users inventory server, used for foreigners and large grids
86 /// </summary> 86 /// </summary>
87 public string userInventoryURI; 87 public string userInventoryURI;
88 /// <summary> 88 /// <summary>
89 /// A URI to the users asset server, used for foreigners and large grids. 89 /// A URI to the users asset server, used for foreigners and large grids.
90 /// </summary> 90 /// </summary>
91 public string userAssetURI; 91 public string userAssetURI;
92 92
93 /// <summary> 93 /// <summary>
94 /// A uint mask containing the "I can do" fields of the users profile 94 /// A uint mask containing the "I can do" fields of the users profile
95 /// </summary> 95 /// </summary>
96 public uint profileCanDoMask; 96 public uint profileCanDoMask;
97 /// <summary> 97 /// <summary>
98 /// A uint mask containing the "I want to do" part of the users profile 98 /// A uint mask containing the "I want to do" part of the users profile
99 /// </summary> 99 /// </summary>
100 public uint profileWantDoMask; // Profile window "I want to" mask 100 public uint profileWantDoMask; // Profile window "I want to" mask
101 101
102 /// <summary> 102 /// <summary>
103 /// The about text listed in a users profile. 103 /// The about text listed in a users profile.
104 /// </summary> 104 /// </summary>
105 public string profileAboutText; 105 public string profileAboutText;
106 /// <summary> 106 /// <summary>
107 /// The first life about text listed in a users profile 107 /// The first life about text listed in a users profile
108 /// </summary> 108 /// </summary>
109 public string profileFirstText; 109 public string profileFirstText;
110 110
111 /// <summary> 111 /// <summary>
112 /// The profile image for an avatar stored on the asset server 112 /// The profile image for an avatar stored on the asset server
113 /// </summary> 113 /// </summary>
114 public LLUUID profileImage; 114 public LLUUID profileImage;
115 /// <summary> 115 /// <summary>
116 /// The profile image for the users first life tab 116 /// The profile image for the users first life tab
117 /// </summary> 117 /// </summary>
118 public LLUUID profileFirstImage; 118 public LLUUID profileFirstImage;
119 /// <summary> 119 /// <summary>
120 /// The users last registered agent (filled in on the user server) 120 /// The users last registered agent (filled in on the user server)
121 /// </summary> 121 /// </summary>
122 public UserAgentData currentAgent; 122 public UserAgentData currentAgent;
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// Information about a users session 126 /// Information about a users session
127 /// </summary> 127 /// </summary>
128 public class UserAgentData 128 public class UserAgentData
129 { 129 {
130 /// <summary> 130 /// <summary>
131 /// The UUID of the users avatar (not the agent!) 131 /// The UUID of the users avatar (not the agent!)
132 /// </summary> 132 /// </summary>
133 public LLUUID UUID; 133 public LLUUID UUID;
134 /// <summary> 134 /// <summary>
135 /// The IP address of the user 135 /// The IP address of the user
136 /// </summary> 136 /// </summary>
137 public string agentIP = String.Empty; 137 public string agentIP = String.Empty;
138 /// <summary> 138 /// <summary>
139 /// The port of the user 139 /// The port of the user
140 /// </summary> 140 /// </summary>
141 public uint agentPort; 141 public uint agentPort;
142 /// <summary> 142 /// <summary>
143 /// Is the user online? 143 /// Is the user online?
144 /// </summary> 144 /// </summary>
145 public bool agentOnline; 145 public bool agentOnline;
146 /// <summary> 146 /// <summary>
147 /// The session ID for the user (also the agent ID) 147 /// The session ID for the user (also the agent ID)
148 /// </summary> 148 /// </summary>
149 public LLUUID sessionID; 149 public LLUUID sessionID;
150 /// <summary> 150 /// <summary>
151 /// The "secure" session ID for the user 151 /// The "secure" session ID for the user
152 /// </summary> 152 /// </summary>
153 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks> 153 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
154 public LLUUID secureSessionID; 154 public LLUUID secureSessionID;
155 /// <summary> 155 /// <summary>
156 /// The region the user logged into initially 156 /// The region the user logged into initially
157 /// </summary> 157 /// </summary>
158 public LLUUID regionID; 158 public LLUUID regionID;
159 /// <summary> 159 /// <summary>
160 /// A unix timestamp from when the user logged in 160 /// A unix timestamp from when the user logged in
161 /// </summary> 161 /// </summary>
162 public int loginTime; 162 public int loginTime;
163 /// <summary> 163 /// <summary>
164 /// When this agent expired and logged out, 0 if still online 164 /// When this agent expired and logged out, 0 if still online
165 /// </summary> 165 /// </summary>
166 public int logoutTime; 166 public int logoutTime;
167 /// <summary> 167 /// <summary>
168 /// Current region the user is logged into 168 /// Current region the user is logged into
169 /// </summary> 169 /// </summary>
170 public LLUUID currentRegion; 170 public LLUUID currentRegion;
171 /// <summary> 171 /// <summary>
172 /// Region handle of the current region the user is in 172 /// Region handle of the current region the user is in
173 /// </summary> 173 /// </summary>
174 public ulong currentHandle; 174 public ulong currentHandle;
175 /// <summary> 175 /// <summary>
176 /// The position of the user within the region 176 /// The position of the user within the region
177 /// </summary> 177 /// </summary>
178 public LLVector3 currentPos; 178 public LLVector3 currentPos;
179 } 179 }
180} 180}
diff --git a/OpenSim/Framework/General/AgentInventory.cs b/OpenSim/Framework/General/AgentInventory.cs
index e45a0cd..0aeb0b3 100644
--- a/OpenSim/Framework/General/AgentInventory.cs
+++ b/OpenSim/Framework/General/AgentInventory.cs
@@ -1,265 +1,265 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32using OpenSim.Framework.Utilities; 32using OpenSim.Framework.Utilities;
33 33
34namespace OpenSim.Framework.Inventory 34namespace OpenSim.Framework.Inventory
35{ 35{
36 public class AgentInventory 36 public class AgentInventory
37 { 37 {
38 //Holds the local copy of Inventory info for a agent 38 //Holds the local copy of Inventory info for a agent
39 public Dictionary<LLUUID, InventoryFolder> InventoryFolders; 39 public Dictionary<LLUUID, InventoryFolder> InventoryFolders;
40 public Dictionary<LLUUID, InventoryItem> InventoryItems; 40 public Dictionary<LLUUID, InventoryItem> InventoryItems;
41 public InventoryFolder InventoryRoot; 41 public InventoryFolder InventoryRoot;
42 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server 42 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server
43 public LLUUID AgentID; 43 public LLUUID AgentID;
44 public AvatarWearable[] Wearables; 44 public AvatarWearable[] Wearables;
45 45
46 public AgentInventory() 46 public AgentInventory()
47 { 47 {
48 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>(); 48 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>();
49 InventoryItems = new Dictionary<LLUUID, InventoryItem>(); 49 InventoryItems = new Dictionary<LLUUID, InventoryItem>();
50 this.Initialise(); 50 this.Initialise();
51 } 51 }
52 52
53 public virtual void Initialise() 53 public virtual void Initialise()
54 { 54 {
55 Wearables = new AvatarWearable[13]; //should be 12 of these 55 Wearables = new AvatarWearable[13]; //should be 12 of these
56 for (int i = 0; i < 13; i++) 56 for (int i = 0; i < 13; i++)
57 { 57 {
58 Wearables[i] = new AvatarWearable(); 58 Wearables[i] = new AvatarWearable();
59 } 59 }
60 60
61 } 61 }
62 62
63 public bool CreateNewFolder(LLUUID folderID, ushort type) 63 public bool CreateNewFolder(LLUUID folderID, ushort type)
64 { 64 {
65 InventoryFolder Folder = new InventoryFolder(); 65 InventoryFolder Folder = new InventoryFolder();
66 Folder.FolderID = folderID; 66 Folder.FolderID = folderID;
67 Folder.OwnerID = this.AgentID; 67 Folder.OwnerID = this.AgentID;
68 Folder.DefaultType = type; 68 Folder.DefaultType = type;
69 this.InventoryFolders.Add(Folder.FolderID, Folder); 69 this.InventoryFolders.Add(Folder.FolderID, Folder);
70 return (true); 70 return (true);
71 } 71 }
72 72
73 public void CreateRootFolder(LLUUID newAgentID, bool createTextures) 73 public void CreateRootFolder(LLUUID newAgentID, bool createTextures)
74 { 74 {
75 this.AgentID = newAgentID; 75 this.AgentID = newAgentID;
76 InventoryRoot = new InventoryFolder(); 76 InventoryRoot = new InventoryFolder();
77 InventoryRoot.FolderID = LLUUID.Random(); 77 InventoryRoot.FolderID = LLUUID.Random();
78 InventoryRoot.ParentID = new LLUUID(); 78 InventoryRoot.ParentID = new LLUUID();
79 InventoryRoot.Version = 1; 79 InventoryRoot.Version = 1;
80 InventoryRoot.DefaultType = 8; 80 InventoryRoot.DefaultType = 8;
81 InventoryRoot.OwnerID = this.AgentID; 81 InventoryRoot.OwnerID = this.AgentID;
82 InventoryRoot.FolderName = "My Inventory"; 82 InventoryRoot.FolderName = "My Inventory";
83 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot); 83 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot);
84 InventoryRoot.OwnerID = this.AgentID; 84 InventoryRoot.OwnerID = this.AgentID;
85 if (createTextures) 85 if (createTextures)
86 { 86 {
87 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID); 87 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID);
88 } 88 }
89 } 89 }
90 90
91 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName) 91 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName)
92 { 92 {
93 InventoryFolder Folder = new InventoryFolder(); 93 InventoryFolder Folder = new InventoryFolder();
94 Folder.FolderID = folderID; 94 Folder.FolderID = folderID;
95 Folder.OwnerID = this.AgentID; 95 Folder.OwnerID = this.AgentID;
96 Folder.DefaultType = type; 96 Folder.DefaultType = type;
97 Folder.FolderName = folderName; 97 Folder.FolderName = folderName;
98 this.InventoryFolders.Add(Folder.FolderID, Folder); 98 this.InventoryFolders.Add(Folder.FolderID, Folder);
99 99
100 return (true); 100 return (true);
101 } 101 }
102 102
103 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent) 103 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
104 { 104 {
105 if (!this.InventoryFolders.ContainsKey(folderID)) 105 if (!this.InventoryFolders.ContainsKey(folderID))
106 { 106 {
107 System.Console.WriteLine("creating new folder called " + folderName + " in agents inventory"); 107 System.Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
108 InventoryFolder Folder = new InventoryFolder(); 108 InventoryFolder Folder = new InventoryFolder();
109 Folder.FolderID = folderID; 109 Folder.FolderID = folderID;
110 Folder.OwnerID = this.AgentID; 110 Folder.OwnerID = this.AgentID;
111 Folder.DefaultType = type; 111 Folder.DefaultType = type;
112 Folder.FolderName = folderName; 112 Folder.FolderName = folderName;
113 Folder.ParentID = parent; 113 Folder.ParentID = parent;
114 this.InventoryFolders.Add(Folder.FolderID, Folder); 114 this.InventoryFolders.Add(Folder.FolderID, Folder);
115 } 115 }
116 116
117 return (true); 117 return (true);
118 } 118 }
119 119
120 public bool HasFolder(LLUUID folderID) 120 public bool HasFolder(LLUUID folderID)
121 { 121 {
122 if (this.InventoryFolders.ContainsKey(folderID)) 122 if (this.InventoryFolders.ContainsKey(folderID))
123 { 123 {
124 return true; 124 return true;
125 } 125 }
126 return false; 126 return false;
127 } 127 }
128 128
129 public LLUUID GetFolderID(string folderName) 129 public LLUUID GetFolderID(string folderName)
130 { 130 {
131 foreach (InventoryFolder inv in this.InventoryFolders.Values) 131 foreach (InventoryFolder inv in this.InventoryFolders.Values)
132 { 132 {
133 if (inv.FolderName == folderName) 133 if (inv.FolderName == folderName)
134 { 134 {
135 return inv.FolderID; 135 return inv.FolderID;
136 } 136 }
137 } 137 }
138 138
139 return LLUUID.Zero; 139 return LLUUID.Zero;
140 } 140 }
141 141
142 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset) 142 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset)
143 { 143 {
144 if(this.InventoryItems.ContainsKey(itemID)) 144 if(this.InventoryItems.ContainsKey(itemID))
145 { 145 {
146 InventoryItem Item = this.InventoryItems[itemID]; 146 InventoryItem Item = this.InventoryItems[itemID];
147 Item.AssetID = asset.FullID; 147 Item.AssetID = asset.FullID;
148 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated()); 148 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated());
149 //TODO need to update the rest of the info 149 //TODO need to update the rest of the info
150 } 150 }
151 return true; 151 return true;
152 } 152 }
153 153
154 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet) 154 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
155 { 155 {
156 System.Console.WriteLine("updating inventory item details"); 156 System.Console.WriteLine("updating inventory item details");
157 if (this.InventoryItems.ContainsKey(itemID)) 157 if (this.InventoryItems.ContainsKey(itemID))
158 { 158 {
159 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name)); 159 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
160 InventoryItem Item = this.InventoryItems[itemID]; 160 InventoryItem Item = this.InventoryItems[itemID];
161 Item.Name = Util.FieldToString(packet.Name); 161 Item.Name = Util.FieldToString(packet.Name);
162 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated()); 162 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated());
163 //TODO need to update the rest of the info 163 //TODO need to update the rest of the info
164 } 164 }
165 return true; 165 return true;
166 } 166 }
167 167
168 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) 168 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset)
169 { 169 {
170 if (this.InventoryFolders.ContainsKey(folderID)) 170 if (this.InventoryFolders.ContainsKey(folderID))
171 { 171 {
172 LLUUID NewItemID = LLUUID.Random(); 172 LLUUID NewItemID = LLUUID.Random();
173 173
174 InventoryItem Item = new InventoryItem(); 174 InventoryItem Item = new InventoryItem();
175 Item.FolderID = folderID; 175 Item.FolderID = folderID;
176 Item.OwnerID = AgentID; 176 Item.OwnerID = AgentID;
177 Item.AssetID = asset.FullID; 177 Item.AssetID = asset.FullID;
178 Item.ItemID = NewItemID; 178 Item.ItemID = NewItemID;
179 Item.Type = asset.Type; 179 Item.Type = asset.Type;
180 Item.Name = asset.Name; 180 Item.Name = asset.Name;
181 Item.Description = asset.Description; 181 Item.Description = asset.Description;
182 Item.InvType = asset.InvType; 182 Item.InvType = asset.InvType;
183 this.InventoryItems.Add(Item.ItemID, Item); 183 this.InventoryItems.Add(Item.ItemID, Item);
184 InventoryFolder Folder = InventoryFolders[Item.FolderID]; 184 InventoryFolder Folder = InventoryFolders[Item.FolderID];
185 Folder.Items.Add(Item); 185 Folder.Items.Add(Item);
186 return (Item.ItemID); 186 return (Item.ItemID);
187 } 187 }
188 else 188 else
189 { 189 {
190 return (null); 190 return (null);
191 } 191 }
192 } 192 }
193 193
194 public bool DeleteFromInventory(LLUUID itemID) 194 public bool DeleteFromInventory(LLUUID itemID)
195 { 195 {
196 bool res = false; 196 bool res = false;
197 if (this.InventoryItems.ContainsKey(itemID)) 197 if (this.InventoryItems.ContainsKey(itemID))
198 { 198 {
199 InventoryItem item = this.InventoryItems[itemID]; 199 InventoryItem item = this.InventoryItems[itemID];
200 this.InventoryItems.Remove(itemID); 200 this.InventoryItems.Remove(itemID);
201 foreach (InventoryFolder fold in InventoryFolders.Values) 201 foreach (InventoryFolder fold in InventoryFolders.Values)
202 { 202 {
203 if (fold.Items.Contains(item)) 203 if (fold.Items.Contains(item))
204 { 204 {
205 fold.Items.Remove(item); 205 fold.Items.Remove(item);
206 break; 206 break;
207 } 207 }
208 } 208 }
209 res = true; 209 res = true;
210 210
211 } 211 }
212 return res; 212 return res;
213 } 213 }
214 } 214 }
215 215
216 public class InventoryFolder 216 public class InventoryFolder
217 { 217 {
218 public List<InventoryItem> Items; 218 public List<InventoryItem> Items;
219 //public List<InventoryFolder> Subfolders; 219 //public List<InventoryFolder> Subfolders;
220 public LLUUID FolderID; 220 public LLUUID FolderID;
221 public LLUUID OwnerID; 221 public LLUUID OwnerID;
222 public LLUUID ParentID = LLUUID.Zero; 222 public LLUUID ParentID = LLUUID.Zero;
223 public string FolderName; 223 public string FolderName;
224 public ushort DefaultType; 224 public ushort DefaultType;
225 public ushort Version; 225 public ushort Version;
226 226
227 public InventoryFolder() 227 public InventoryFolder()
228 { 228 {
229 Items = new List<InventoryItem>(); 229 Items = new List<InventoryItem>();
230 //Subfolders = new List<InventoryFolder>(); 230 //Subfolders = new List<InventoryFolder>();
231 } 231 }
232 232
233 } 233 }
234 234
235 public class InventoryItem 235 public class InventoryItem
236 { 236 {
237 public LLUUID FolderID; 237 public LLUUID FolderID;
238 public LLUUID OwnerID; 238 public LLUUID OwnerID;
239 public LLUUID ItemID; 239 public LLUUID ItemID;
240 public LLUUID AssetID; 240 public LLUUID AssetID;
241 public LLUUID CreatorID; 241 public LLUUID CreatorID;
242 public sbyte InvType; 242 public sbyte InvType;
243 public sbyte Type; 243 public sbyte Type;
244 public string Name =""; 244 public string Name ="";
245 public string Description; 245 public string Description;
246 246
247 public InventoryItem() 247 public InventoryItem()
248 { 248 {
249 this.CreatorID = LLUUID.Zero; 249 this.CreatorID = LLUUID.Zero;
250 } 250 }
251 251
252 public string ExportString() 252 public string ExportString()
253 { 253 {
254 string typ = "notecard"; 254 string typ = "notecard";
255 string result = ""; 255 string result = "";
256 result += "\tinv_object\t0\n\t{\n"; 256 result += "\tinv_object\t0\n\t{\n";
257 result += "\t\tobj_id\t%s\n"; 257 result += "\t\tobj_id\t%s\n";
258 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n"; 258 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n";
259 result += "\t\ttype\t"+ typ +"\n"; 259 result += "\t\ttype\t"+ typ +"\n";
260 result += "\t\tname\t" + Name+"|\n"; 260 result += "\t\tname\t" + Name+"|\n";
261 result += "\t}\n"; 261 result += "\t}\n";
262 return result; 262 return result;
263 } 263 }
264 } 264 }
265} 265}
diff --git a/OpenSim/Framework/General/AuthenticateSessionBase.cs b/OpenSim/Framework/General/AuthenticateSessionBase.cs
index 71616e3..2d02286 100644
--- a/OpenSim/Framework/General/AuthenticateSessionBase.cs
+++ b/OpenSim/Framework/General/AuthenticateSessionBase.cs
@@ -1,130 +1,130 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 public class AuthenticateSessionsBase 35 public class AuthenticateSessionsBase
36 { 36 {
37 public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); 37 public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
38 38
39 public AuthenticateSessionsBase() 39 public AuthenticateSessionsBase()
40 { 40 {
41 41
42 } 42 }
43 43
44 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) 44 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
45 { 45 {
46 AgentCircuitData validcircuit = null; 46 AgentCircuitData validcircuit = null;
47 if (this.AgentCircuits.ContainsKey(circuitcode)) 47 if (this.AgentCircuits.ContainsKey(circuitcode))
48 { 48 {
49 validcircuit = this.AgentCircuits[circuitcode]; 49 validcircuit = this.AgentCircuits[circuitcode];
50 } 50 }
51 AuthenticateResponse user = new AuthenticateResponse(); 51 AuthenticateResponse user = new AuthenticateResponse();
52 if (validcircuit == null) 52 if (validcircuit == null)
53 { 53 {
54 //don't have this circuit code in our list 54 //don't have this circuit code in our list
55 user.Authorised = false; 55 user.Authorised = false;
56 return (user); 56 return (user);
57 } 57 }
58 58
59 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID)) 59 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
60 { 60 {
61 user.Authorised = true; 61 user.Authorised = true;
62 user.LoginInfo = new Login(); 62 user.LoginInfo = new Login();
63 user.LoginInfo.Agent = agentID; 63 user.LoginInfo.Agent = agentID;
64 user.LoginInfo.Session = sessionID; 64 user.LoginInfo.Session = sessionID;
65 user.LoginInfo.SecureSession = validcircuit.SecureSessionID; 65 user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
66 user.LoginInfo.First = validcircuit.firstname; 66 user.LoginInfo.First = validcircuit.firstname;
67 user.LoginInfo.Last = validcircuit.lastname; 67 user.LoginInfo.Last = validcircuit.lastname;
68 user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; 68 user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder;
69 user.LoginInfo.BaseFolder = validcircuit.BaseFolder; 69 user.LoginInfo.BaseFolder = validcircuit.BaseFolder;
70 } 70 }
71 else 71 else
72 { 72 {
73 // Invalid 73 // Invalid
74 user.Authorised = false; 74 user.Authorised = false;
75 } 75 }
76 76
77 return (user); 77 return (user);
78 } 78 }
79 79
80 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) 80 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
81 { 81 {
82 if (this.AgentCircuits.ContainsKey(circuitCode)) 82 if (this.AgentCircuits.ContainsKey(circuitCode))
83 { 83 {
84 this.AgentCircuits[circuitCode] = agentData; 84 this.AgentCircuits[circuitCode] = agentData;
85 } 85 }
86 else 86 else
87 { 87 {
88 this.AgentCircuits.Add(circuitCode, agentData); 88 this.AgentCircuits.Add(circuitCode, agentData);
89 } 89 }
90 } 90 }
91 91
92 public LLVector3 GetPosition(uint circuitCode) 92 public LLVector3 GetPosition(uint circuitCode)
93 { 93 {
94 LLVector3 vec = new LLVector3(); 94 LLVector3 vec = new LLVector3();
95 if (this.AgentCircuits.ContainsKey(circuitCode)) 95 if (this.AgentCircuits.ContainsKey(circuitCode))
96 { 96 {
97 vec = this.AgentCircuits[circuitCode].startpos; 97 vec = this.AgentCircuits[circuitCode].startpos;
98 } 98 }
99 return vec; 99 return vec;
100 } 100 }
101 101
102 public void UpdateAgentData(AgentCircuitData agentData) 102 public void UpdateAgentData(AgentCircuitData agentData)
103 { 103 {
104 if (this.AgentCircuits.ContainsKey((uint)agentData.circuitcode)) 104 if (this.AgentCircuits.ContainsKey((uint)agentData.circuitcode))
105 { 105 {
106 this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname; 106 this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname;
107 this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname; 107 this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname;
108 this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos; 108 this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
109 // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); 109 // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
110 } 110 }
111 } 111 }
112 112
113 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) 113 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
114 { 114 {
115 if (this.AgentCircuits.ContainsKey(circuitcode)) 115 if (this.AgentCircuits.ContainsKey(circuitcode))
116 { 116 {
117 this.AgentCircuits[circuitcode].child = childstatus; 117 this.AgentCircuits[circuitcode].child = childstatus;
118 } 118 }
119 } 119 }
120 120
121 public bool GetAgentChildStatus(uint circuitcode) 121 public bool GetAgentChildStatus(uint circuitcode)
122 { 122 {
123 if (this.AgentCircuits.ContainsKey(circuitcode)) 123 if (this.AgentCircuits.ContainsKey(circuitcode))
124 { 124 {
125 return this.AgentCircuits[circuitcode].child; 125 return this.AgentCircuits[circuitcode].child;
126 } 126 }
127 return false; 127 return false;
128 } 128 }
129 } 129 }
130} \ No newline at end of file 130} \ No newline at end of file
diff --git a/OpenSim/Framework/General/BlockingQueue.cs b/OpenSim/Framework/General/BlockingQueue.cs
index 0cc8124..e263d71 100644
--- a/OpenSim/Framework/General/BlockingQueue.cs
+++ b/OpenSim/Framework/General/BlockingQueue.cs
@@ -1,58 +1,58 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Threading; 29using System.Threading;
30 30
31namespace OpenSim.Framework.Utilities 31namespace OpenSim.Framework.Utilities
32{ 32{
33 public class BlockingQueue<T> 33 public class BlockingQueue<T>
34 { 34 {
35 private Queue<T> _queue = new Queue<T>(); 35 private Queue<T> _queue = new Queue<T>();
36 private object _queueSync = new object(); 36 private object _queueSync = new object();
37 37
38 public void Enqueue(T value) 38 public void Enqueue(T value)
39 { 39 {
40 lock (_queueSync) 40 lock (_queueSync)
41 { 41 {
42 _queue.Enqueue(value); 42 _queue.Enqueue(value);
43 Monitor.Pulse(_queueSync); 43 Monitor.Pulse(_queueSync);
44 } 44 }
45 } 45 }
46 46
47 public T Dequeue() 47 public T Dequeue()
48 { 48 {
49 lock (_queueSync) 49 lock (_queueSync)
50 { 50 {
51 if (_queue.Count < 1) 51 if (_queue.Count < 1)
52 Monitor.Wait(_queueSync); 52 Monitor.Wait(_queueSync);
53 53
54 return _queue.Dequeue(); 54 return _queue.Dequeue();
55 } 55 }
56 } 56 }
57 } 57 }
58} 58}
diff --git a/OpenSim/Framework/General/ClientManager.cs b/OpenSim/Framework/General/ClientManager.cs
index b560ca8..0e45d03 100644
--- a/OpenSim/Framework/General/ClientManager.cs
+++ b/OpenSim/Framework/General/ClientManager.cs
@@ -1,36 +1,36 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Interfaces; 4using OpenSim.Framework.Interfaces;
5 5
6namespace OpenSim.Framework 6namespace OpenSim.Framework
7{ 7{
8 public delegate void ForEachClientDelegate( IClientAPI client ); 8 public delegate void ForEachClientDelegate( IClientAPI client );
9 public class ClientManager 9 public class ClientManager
10 { 10 {
11 private Dictionary<uint, IClientAPI> m_clients; 11 private Dictionary<uint, IClientAPI> m_clients;
12 12
13 public void ForEachClient(ForEachClientDelegate whatToDo) 13 public void ForEachClient(ForEachClientDelegate whatToDo)
14 { 14 {
15 foreach (IClientAPI client in m_clients.Values) 15 foreach (IClientAPI client in m_clients.Values)
16 { 16 {
17 whatToDo(client); 17 whatToDo(client);
18 } 18 }
19 } 19 }
20 20
21 public ClientManager() 21 public ClientManager()
22 { 22 {
23 m_clients = new Dictionary<uint, IClientAPI>(); 23 m_clients = new Dictionary<uint, IClientAPI>();
24 } 24 }
25 25
26 public void Remove(uint id) 26 public void Remove(uint id)
27 { 27 {
28 m_clients.Remove(id); 28 m_clients.Remove(id);
29 } 29 }
30 30
31 public void Add(uint id, IClientAPI client ) 31 public void Add(uint id, IClientAPI client )
32 { 32 {
33 m_clients.Add( id, client ); 33 m_clients.Add( id, client );
34 } 34 }
35 } 35 }
36} 36}
diff --git a/OpenSim/Framework/General/IRegionCommsListener.cs b/OpenSim/Framework/General/IRegionCommsListener.cs
index 32444f9..81da5d4 100644
--- a/OpenSim/Framework/General/IRegionCommsListener.cs
+++ b/OpenSim/Framework/General/IRegionCommsListener.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent); 35 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
36 public delegate void UpdateNeighbours(List<RegionInfo> neighbours); 36 public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
37 public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position); 37 public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position);
38 38
39 public interface IRegionCommsListener 39 public interface IRegionCommsListener
40 { 40 {
41 event ExpectUserDelegate OnExpectUser; 41 event ExpectUserDelegate OnExpectUser;
42 event GenericCall2 OnExpectChildAgent; 42 event GenericCall2 OnExpectChildAgent;
43 event AgentCrossing OnAvatarCrossingIntoRegion; 43 event AgentCrossing OnAvatarCrossingIntoRegion;
44 event UpdateNeighbours OnNeighboursUpdate; 44 event UpdateNeighbours OnNeighboursUpdate;
45 } 45 }
46} 46}
diff --git a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
index 508485b..7c49785 100644
--- a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
+++ b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
@@ -1,43 +1,43 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using OpenSim.Framework.Types; 28using OpenSim.Framework.Types;
29 29
30namespace OpenSim.Framework.Interfaces 30namespace OpenSim.Framework.Interfaces
31{ 31{
32 public class AuthenticateResponse 32 public class AuthenticateResponse
33 { 33 {
34 public bool Authorised; 34 public bool Authorised;
35 public Login LoginInfo; 35 public Login LoginInfo;
36 36
37 public AuthenticateResponse() 37 public AuthenticateResponse()
38 { 38 {
39 39
40 } 40 }
41 41
42 } 42 }
43} 43}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
index 2c379dd..57aa0c0 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
@@ -1,38 +1,38 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Interfaces 28namespace OpenSim.Framework.Interfaces
29{ 29{
30 public interface IGenericConfig 30 public interface IGenericConfig
31 { 31 {
32 void LoadData(); 32 void LoadData();
33 string GetAttribute(string attributeName); 33 string GetAttribute(string attributeName);
34 bool SetAttribute(string attributeName, string attributeValue); 34 bool SetAttribute(string attributeName, string attributeValue);
35 void Commit(); 35 void Commit();
36 void Close(); 36 void Close();
37 } 37 }
38} 38}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
index 81dc293..20cc320 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
@@ -1,59 +1,59 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29//using OpenSim.world; 29//using OpenSim.world;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// </summary> 34 /// </summary>
35 35
36 36
37 public abstract class GridConfig 37 public abstract class GridConfig
38 { 38 {
39 public string GridOwner; 39 public string GridOwner;
40 public string DefaultStartupMsg; 40 public string DefaultStartupMsg;
41 public string DefaultAssetServer; 41 public string DefaultAssetServer;
42 public string AssetSendKey; 42 public string AssetSendKey;
43 public string AssetRecvKey; 43 public string AssetRecvKey;
44 public string DefaultUserServer; 44 public string DefaultUserServer;
45 public string UserSendKey; 45 public string UserSendKey;
46 public string UserRecvKey; 46 public string UserRecvKey;
47 public string SimSendKey; 47 public string SimSendKey;
48 public string SimRecvKey; 48 public string SimRecvKey;
49 49
50 50
51 public abstract void InitConfig(); 51 public abstract void InitConfig();
52 52
53 } 53 }
54 54
55 public interface IGridConfig 55 public interface IGridConfig
56 { 56 {
57 GridConfig GetConfigObject(); 57 GridConfig GetConfigObject();
58 } 58 }
59} 59}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
index ae6cedb..a17804a 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
@@ -1,53 +1,53 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29//using OpenSim.world; 29//using OpenSim.world;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// </summary> 34 /// </summary>
35 35
36 36
37 public abstract class UserConfig 37 public abstract class UserConfig
38 { 38 {
39 public string DefaultStartupMsg; 39 public string DefaultStartupMsg;
40 public string GridServerURL; 40 public string GridServerURL;
41 public string GridSendKey; 41 public string GridSendKey;
42 public string GridRecvKey; 42 public string GridRecvKey;
43 43
44 44
45 public abstract void InitConfig(); 45 public abstract void InitConfig();
46 46
47 } 47 }
48 48
49 public interface IUserConfig 49 public interface IUserConfig
50 { 50 {
51 UserConfig GetConfigObject(); 51 UserConfig GetConfigObject();
52 } 52 }
53} 53}
diff --git a/OpenSim/Framework/General/Interfaces/IAssetServer.cs b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
index ab60dd7..cbb5c36 100644
--- a/OpenSim/Framework/General/Interfaces/IAssetServer.cs
+++ b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
@@ -1,64 +1,64 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Description of IAssetServer. 34 /// Description of IAssetServer.
35 /// </summary> 35 /// </summary>
36 36
37 public interface IAssetServer 37 public interface IAssetServer
38 { 38 {
39 void SetReceiver(IAssetReceiver receiver); 39 void SetReceiver(IAssetReceiver receiver);
40 void RequestAsset(LLUUID assetID, bool isTexture); 40 void RequestAsset(LLUUID assetID, bool isTexture);
41 void UpdateAsset(AssetBase asset); 41 void UpdateAsset(AssetBase asset);
42 void UploadNewAsset(AssetBase asset); 42 void UploadNewAsset(AssetBase asset);
43 void SetServerInfo(string ServerUrl, string ServerKey); 43 void SetServerInfo(string ServerUrl, string ServerKey);
44 void Close(); 44 void Close();
45 } 45 }
46 46
47 // could change to delegate? 47 // could change to delegate?
48 public interface IAssetReceiver 48 public interface IAssetReceiver
49 { 49 {
50 void AssetReceived(AssetBase asset, bool IsTexture); 50 void AssetReceived(AssetBase asset, bool IsTexture);
51 void AssetNotFound(AssetBase asset); 51 void AssetNotFound(AssetBase asset);
52 } 52 }
53 53
54 public interface IAssetPlugin 54 public interface IAssetPlugin
55 { 55 {
56 IAssetServer GetAssetServer(); 56 IAssetServer GetAssetServer();
57 } 57 }
58 58
59 public struct ARequest 59 public struct ARequest
60 { 60 {
61 public LLUUID AssetID; 61 public LLUUID AssetID;
62 public bool IsTexture; 62 public bool IsTexture;
63 } 63 }
64} 64}
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index bd258a3..0606e43 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -1,195 +1,195 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Net; 29using System.Net;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
33using OpenSim.Framework.Data; 33using OpenSim.Framework.Data;
34 34
35namespace OpenSim.Framework.Interfaces 35namespace OpenSim.Framework.Interfaces
36{ 36{
37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list 38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos); 39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west); 40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); 41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
42 public delegate void StartAnim(LLUUID animID, int seq); 42 public delegate void StartAnim(LLUUID animID, int seq);
43 public delegate void LinkObjects(uint parent, List<uint> children); 43 public delegate void LinkObjects(uint parent, List<uint> children);
44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); 44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); 45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
46 46
47 public delegate void GenericCall(IClientAPI remoteClient); 47 public delegate void GenericCall(IClientAPI remoteClient);
48 public delegate void GenericCall2(); 48 public delegate void GenericCall2();
49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary. 49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); 50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
51 public delegate void GenericCall5(IClientAPI remoteClient, bool status); 51 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
52 public delegate void GenericCall6(LLUUID uid); 52 public delegate void GenericCall6(LLUUID uid);
53 public delegate void GenericCall7(uint localID, string message); 53 public delegate void GenericCall7(uint localID, string message);
54 54
55 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); 55 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
56 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); 56 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
57 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); 57 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
58 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); 58 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
59 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); 59 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
60 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); 60 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
61 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 61 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
62 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 62 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
63 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); 63 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
64 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags); 64 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags);
65 public delegate void StatusChange(bool status); 65 public delegate void StatusChange(bool status);
66 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); 66 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
67 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); 67 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
68 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); 68 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
69 69
70 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); 70 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
71 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); 71 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
72 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); 72 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
73 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); 73 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
74 public delegate void ParcelSelectObjects(int parcel_local_id, int request_type, IClientAPI remote_client); 74 public delegate void ParcelSelectObjects(int parcel_local_id, int request_type, IClientAPI remote_client);
75 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); 75 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
76 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); 76 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
77 77
78 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 78 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
79 79
80 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); 80 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
81 81
82 82
83 83
84 public interface IClientAPI 84 public interface IClientAPI
85 { 85 {
86 event ImprovedInstantMessage OnInstantMessage; 86 event ImprovedInstantMessage OnInstantMessage;
87 event ChatFromViewer OnChatFromViewer; 87 event ChatFromViewer OnChatFromViewer;
88 event RezObject OnRezObject; 88 event RezObject OnRezObject;
89 event ModifyTerrain OnModifyTerrain; 89 event ModifyTerrain OnModifyTerrain;
90 event SetAppearance OnSetAppearance; 90 event SetAppearance OnSetAppearance;
91 event StartAnim OnStartAnim; 91 event StartAnim OnStartAnim;
92 event LinkObjects OnLinkObjects; 92 event LinkObjects OnLinkObjects;
93 event RequestMapBlocks OnRequestMapBlocks; 93 event RequestMapBlocks OnRequestMapBlocks;
94 event TeleportLocationRequest OnTeleportLocationRequest; 94 event TeleportLocationRequest OnTeleportLocationRequest;
95 95
96 event GenericCall4 OnDeRezObject; 96 event GenericCall4 OnDeRezObject;
97 event GenericCall OnRegionHandShakeReply; 97 event GenericCall OnRegionHandShakeReply;
98 event GenericCall OnRequestWearables; 98 event GenericCall OnRequestWearables;
99 event GenericCall2 OnCompleteMovementToRegion; 99 event GenericCall2 OnCompleteMovementToRegion;
100 event UpdateAgent OnAgentUpdate; 100 event UpdateAgent OnAgentUpdate;
101 event GenericCall OnRequestAvatarsData; 101 event GenericCall OnRequestAvatarsData;
102 event AddNewPrim OnAddPrim; 102 event AddNewPrim OnAddPrim;
103 event ObjectDuplicate OnObjectDuplicate; 103 event ObjectDuplicate OnObjectDuplicate;
104 event UpdateVector OnGrapObject; 104 event UpdateVector OnGrapObject;
105 event ObjectSelect OnDeGrapObject; 105 event ObjectSelect OnDeGrapObject;
106 event MoveObject OnGrapUpdate; 106 event MoveObject OnGrapUpdate;
107 107
108 event UpdateShape OnUpdatePrimShape; 108 event UpdateShape OnUpdatePrimShape;
109 event ObjectSelect OnObjectSelect; 109 event ObjectSelect OnObjectSelect;
110 event ObjectDeselect OnObjectDeselect; 110 event ObjectDeselect OnObjectDeselect;
111 event GenericCall7 OnObjectDescription; 111 event GenericCall7 OnObjectDescription;
112 event GenericCall7 OnObjectName; 112 event GenericCall7 OnObjectName;
113 event UpdatePrimFlags OnUpdatePrimFlags; 113 event UpdatePrimFlags OnUpdatePrimFlags;
114 event UpdatePrimTexture OnUpdatePrimTexture; 114 event UpdatePrimTexture OnUpdatePrimTexture;
115 event UpdateVector OnUpdatePrimGroupPosition; 115 event UpdateVector OnUpdatePrimGroupPosition;
116 event UpdateVector OnUpdatePrimSinglePosition; 116 event UpdateVector OnUpdatePrimSinglePosition;
117 event UpdatePrimRotation OnUpdatePrimGroupRotation; 117 event UpdatePrimRotation OnUpdatePrimGroupRotation;
118 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 118 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
119 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 119 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
120 event UpdateVector OnUpdatePrimScale; 120 event UpdateVector OnUpdatePrimScale;
121 event StatusChange OnChildAgentStatus; 121 event StatusChange OnChildAgentStatus;
122 event GenericCall2 OnStopMovement; 122 event GenericCall2 OnStopMovement;
123 event NewAvatar OnNewAvatar; 123 event NewAvatar OnNewAvatar;
124 event GenericCall6 OnRemoveAvatar; 124 event GenericCall6 OnRemoveAvatar;
125 125
126 event UUIDNameRequest OnNameFromUUIDRequest; 126 event UUIDNameRequest OnNameFromUUIDRequest;
127 127
128 event ParcelPropertiesRequest OnParcelPropertiesRequest; 128 event ParcelPropertiesRequest OnParcelPropertiesRequest;
129 event ParcelDivideRequest OnParcelDivideRequest; 129 event ParcelDivideRequest OnParcelDivideRequest;
130 event ParcelJoinRequest OnParcelJoinRequest; 130 event ParcelJoinRequest OnParcelJoinRequest;
131 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 131 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
132 event ParcelSelectObjects OnParcelSelectObjects; 132 event ParcelSelectObjects OnParcelSelectObjects;
133 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 133 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
134 event EstateOwnerMessageRequest OnEstateOwnerMessage; 134 event EstateOwnerMessageRequest OnEstateOwnerMessage;
135 135
136 LLVector3 StartPos 136 LLVector3 StartPos
137 { 137 {
138 get; 138 get;
139 set; 139 set;
140 } 140 }
141 141
142 LLUUID AgentId 142 LLUUID AgentId
143 { 143 {
144 get; 144 get;
145 } 145 }
146 146
147 string FirstName 147 string FirstName
148 { 148 {
149 get; 149 get;
150 } 150 }
151 151
152 string LastName 152 string LastName
153 { 153 {
154 get; 154 get;
155 } 155 }
156 156
157 void OutPacket(Packet newPack); 157 void OutPacket(Packet newPack);
158 void SendWearables(AvatarWearable[] wearables); 158 void SendWearables(AvatarWearable[] wearables);
159 void SendStartPingCheck(byte seq); 159 void SendStartPingCheck(byte seq);
160 void SendKillObject(ulong regionHandle, uint avatarLocalID); 160 void SendKillObject(ulong regionHandle, uint avatarLocalID);
161 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId); 161 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
162 void SendRegionHandshake(RegionInfo regionInfo); 162 void SendRegionHandshake(RegionInfo regionInfo);
163 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 163 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
164 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 164 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
165 void SendInstantMessage(string message, LLUUID target, string fromName); 165 void SendInstantMessage(string message, LLUUID target, string fromName);
166 void SendLayerData(float[] map); 166 void SendLayerData(float[] map);
167 void SendLayerData(int px, int py, float[] map); 167 void SendLayerData(int px, int py, float[] map);
168 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); 168 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
169 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint ); 169 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint );
170 AgentCircuitData RequestClientInfo(); 170 AgentCircuitData RequestClientInfo();
171 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint ); 171 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint );
172 void SendMapBlock(List<MapBlockData> mapBlocks); 172 void SendMapBlock(List<MapBlockData> mapBlocks);
173 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); 173 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
174 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags); 174 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags);
175 void SendTeleportCancel(); 175 void SendTeleportCancel();
176 void SendTeleportLocationStart(); 176 void SendTeleportLocationStart();
177 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); 177 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
178 178
179 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry); 179 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
180 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity); 180 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
181 181
182 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 182 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
183 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags); 183 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags);
184 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags); 184 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags);
185 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID); 185 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
186 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID); 186 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
187 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); 187 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
188 188
189 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); 189 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items);
190 void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item); 190 void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item);
191 void SendNameReply(LLUUID profileId, string firstname, string lastname); 191 void SendNameReply(LLUUID profileId, string firstname, string lastname);
192 192
193 193
194 } 194 }
195} 195}
diff --git a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
index 7093121..c7c0b5f 100644
--- a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
+++ b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
@@ -1,71 +1,71 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Framework.Interfaces 32namespace OpenSim.Framework.Interfaces
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// ILocalStorage. Really hacked together right now needs cleaning up 35 /// ILocalStorage. Really hacked together right now needs cleaning up
36 /// </summary> 36 /// </summary>
37 [System.Obsolete("Redundant, use IRegionDataStore instead")] 37 [System.Obsolete("Redundant, use IRegionDataStore instead")]
38 public interface ILocalStorage 38 public interface ILocalStorage
39 { 39 {
40 void Initialise(string datastore); 40 void Initialise(string datastore);
41 41
42 void StorePrim(PrimData prim); 42 void StorePrim(PrimData prim);
43 void RemovePrim(LLUUID primID); 43 void RemovePrim(LLUUID primID);
44 void LoadPrimitives(ILocalStorageReceiver receiver); 44 void LoadPrimitives(ILocalStorageReceiver receiver);
45 45
46 [System.Obsolete("Use DataStorage instead")] 46 [System.Obsolete("Use DataStorage instead")]
47 float[] LoadWorld(); 47 float[] LoadWorld();
48 [System.Obsolete("Use DataStorage instead")] 48 [System.Obsolete("Use DataStorage instead")]
49 void SaveMap(float[] heightmap); 49 void SaveMap(float[] heightmap);
50 50
51 void SaveParcels(ParcelData[] parcels); 51 void SaveParcels(ParcelData[] parcels);
52 void SaveParcel(ParcelData parcel); 52 void SaveParcel(ParcelData parcel);
53 void RemoveParcel(ParcelData parcel); 53 void RemoveParcel(ParcelData parcel);
54 void RemoveAllParcels(); 54 void RemoveAllParcels();
55 void LoadParcels(ILocalStorageParcelReceiver recv); 55 void LoadParcels(ILocalStorageParcelReceiver recv);
56 56
57 void ShutDown(); 57 void ShutDown();
58 } 58 }
59 59
60 public interface ILocalStorageReceiver 60 public interface ILocalStorageReceiver
61 { 61 {
62 void PrimFromStorage(PrimData prim); 62 void PrimFromStorage(PrimData prim);
63 } 63 }
64 64
65 public interface ILocalStorageParcelReceiver 65 public interface ILocalStorageParcelReceiver
66 { 66 {
67 void ParcelFromStorage(ParcelData data); 67 void ParcelFromStorage(ParcelData data);
68 void NoParcelDataFromStorage(); 68 void NoParcelDataFromStorage();
69 } 69 }
70} 70}
71 71
diff --git a/OpenSim/Framework/General/Interfaces/IUserServer.cs b/OpenSim/Framework/General/Interfaces/IUserServer.cs
index b3700d2..ca5816d 100644
--- a/OpenSim/Framework/General/Interfaces/IUserServer.cs
+++ b/OpenSim/Framework/General/Interfaces/IUserServer.cs
@@ -1,39 +1,39 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Inventory; 29using OpenSim.Framework.Inventory;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 public interface IUserServer 33 public interface IUserServer
34 { 34 {
35 AgentInventory RequestAgentsInventory(LLUUID agentID); 35 AgentInventory RequestAgentsInventory(LLUUID agentID);
36 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); 36 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
37 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory); 37 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory);
38 } 38 }
39} 39}
diff --git a/OpenSim/Framework/General/Interfaces/IWorld.cs b/OpenSim/Framework/General/Interfaces/IWorld.cs
index 204c01b..a474636 100644
--- a/OpenSim/Framework/General/Interfaces/IWorld.cs
+++ b/OpenSim/Framework/General/Interfaces/IWorld.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 public interface IWorld 33 public interface IWorld
34 { 34 {
35 void AddNewClient(IClientAPI client, bool child); 35 void AddNewClient(IClientAPI client, bool child);
36 void RemoveClient(LLUUID agentID); 36 void RemoveClient(LLUUID agentID);
37 37
38 RegionInfo RegionInfo { get; } 38 RegionInfo RegionInfo { get; }
39 object SyncRoot { get; } 39 object SyncRoot { get; }
40 uint NextLocalId { get; } 40 uint NextLocalId { get; }
41 } 41 }
42} 42}
diff --git a/OpenSim/Framework/General/NpcClientBase.cs b/OpenSim/Framework/General/NpcClientBase.cs
index 44d6d3c..044431b 100644
--- a/OpenSim/Framework/General/NpcClientBase.cs
+++ b/OpenSim/Framework/General/NpcClientBase.cs
@@ -1,127 +1,127 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using System.Net; 2using System.Net;
3using OpenSim.Framework.Interfaces; 3using OpenSim.Framework.Interfaces;
4using OpenSim.Framework.Types; 4using OpenSim.Framework.Types;
5using OpenSim.Framework.Data; 5using OpenSim.Framework.Data;
6using libsecondlife; 6using libsecondlife;
7using libsecondlife.Packets; 7using libsecondlife.Packets;
8 8
9 9
10namespace OpenSim.Framework 10namespace OpenSim.Framework
11{ 11{
12 public class NpcClientBase :IClientAPI 12 public class NpcClientBase :IClientAPI
13 { 13 {
14 public event ImprovedInstantMessage OnInstantMessage; 14 public event ImprovedInstantMessage OnInstantMessage;
15 public event ChatFromViewer OnChatFromViewer; 15 public event ChatFromViewer OnChatFromViewer;
16 public event RezObject OnRezObject; 16 public event RezObject OnRezObject;
17 public event ModifyTerrain OnModifyTerrain; 17 public event ModifyTerrain OnModifyTerrain;
18 public event SetAppearance OnSetAppearance; 18 public event SetAppearance OnSetAppearance;
19 public event StartAnim OnStartAnim; 19 public event StartAnim OnStartAnim;
20 public event LinkObjects OnLinkObjects; 20 public event LinkObjects OnLinkObjects;
21 public event RequestMapBlocks OnRequestMapBlocks; 21 public event RequestMapBlocks OnRequestMapBlocks;
22 public event TeleportLocationRequest OnTeleportLocationRequest; 22 public event TeleportLocationRequest OnTeleportLocationRequest;
23 23
24 public event GenericCall4 OnDeRezObject; 24 public event GenericCall4 OnDeRezObject;
25 public event GenericCall OnRegionHandShakeReply; 25 public event GenericCall OnRegionHandShakeReply;
26 public event GenericCall OnRequestWearables; 26 public event GenericCall OnRequestWearables;
27 public event GenericCall2 OnCompleteMovementToRegion; 27 public event GenericCall2 OnCompleteMovementToRegion;
28 public event UpdateAgent OnAgentUpdate; 28 public event UpdateAgent OnAgentUpdate;
29 public event GenericCall OnRequestAvatarsData; 29 public event GenericCall OnRequestAvatarsData;
30 public event AddNewPrim OnAddPrim; 30 public event AddNewPrim OnAddPrim;
31 public event ObjectDuplicate OnObjectDuplicate; 31 public event ObjectDuplicate OnObjectDuplicate;
32 public event UpdateVector OnGrapObject; 32 public event UpdateVector OnGrapObject;
33 public event ObjectSelect OnDeGrapObject; 33 public event ObjectSelect OnDeGrapObject;
34 public event MoveObject OnGrapUpdate; 34 public event MoveObject OnGrapUpdate;
35 35
36 public event UpdateShape OnUpdatePrimShape; 36 public event UpdateShape OnUpdatePrimShape;
37 public event ObjectSelect OnObjectSelect; 37 public event ObjectSelect OnObjectSelect;
38 public event GenericCall7 OnObjectDescription; 38 public event GenericCall7 OnObjectDescription;
39 public event GenericCall7 OnObjectName; 39 public event GenericCall7 OnObjectName;
40 public event UpdatePrimFlags OnUpdatePrimFlags; 40 public event UpdatePrimFlags OnUpdatePrimFlags;
41 public event UpdatePrimTexture OnUpdatePrimTexture; 41 public event UpdatePrimTexture OnUpdatePrimTexture;
42 public event UpdateVector OnUpdatePrimGroupPosition; 42 public event UpdateVector OnUpdatePrimGroupPosition;
43 public event UpdateVector OnUpdatePrimSinglePosition; 43 public event UpdateVector OnUpdatePrimSinglePosition;
44 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 44 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
45 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 45 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
46 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 46 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
47 public event UpdateVector OnUpdatePrimScale; 47 public event UpdateVector OnUpdatePrimScale;
48 public event StatusChange OnChildAgentStatus; 48 public event StatusChange OnChildAgentStatus;
49 public event GenericCall2 OnStopMovement; 49 public event GenericCall2 OnStopMovement;
50 public event NewAvatar OnNewAvatar; 50 public event NewAvatar OnNewAvatar;
51 public event GenericCall6 OnRemoveAvatar; 51 public event GenericCall6 OnRemoveAvatar;
52 52
53 public event UUIDNameRequest OnNameFromUUIDRequest; 53 public event UUIDNameRequest OnNameFromUUIDRequest;
54 54
55 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 55 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
56 public event ParcelDivideRequest OnParcelDivideRequest; 56 public event ParcelDivideRequest OnParcelDivideRequest;
57 public event ParcelJoinRequest OnParcelJoinRequest; 57 public event ParcelJoinRequest OnParcelJoinRequest;
58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
59 public event ParcelSelectObjects OnParcelSelectObjects; 59 public event ParcelSelectObjects OnParcelSelectObjects;
60 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 60 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
61 public event ObjectDeselect OnObjectDeselect; 61 public event ObjectDeselect OnObjectDeselect;
62 62
63 63
64 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 64 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
65 65
66 public virtual LLVector3 StartPos 66 public virtual LLVector3 StartPos
67 { 67 {
68 get { return new LLVector3(); } 68 get { return new LLVector3(); }
69 set { } 69 set { }
70 } 70 }
71 71
72 public virtual LLUUID AgentId 72 public virtual LLUUID AgentId
73 { 73 {
74 get { return LLUUID.Random(); } 74 get { return LLUUID.Random(); }
75 } 75 }
76 76
77 public virtual string FirstName 77 public virtual string FirstName
78 { 78 {
79 get { return ""; } 79 get { return ""; }
80 } 80 }
81 81
82 public virtual string LastName 82 public virtual string LastName
83 { 83 {
84 get { return ""; } 84 get { return ""; }
85 } 85 }
86 86
87 public NpcClientBase() 87 public NpcClientBase()
88 { 88 {
89 } 89 }
90 90
91 public virtual void OutPacket(Packet newPack){} 91 public virtual void OutPacket(Packet newPack){}
92 public virtual void SendWearables(AvatarWearable[] wearables){} 92 public virtual void SendWearables(AvatarWearable[] wearables){}
93 public virtual void SendStartPingCheck(byte seq){} 93 public virtual void SendStartPingCheck(byte seq){}
94 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID){} 94 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID){}
95 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId){} 95 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId){}
96 public virtual void SendRegionHandshake(RegionInfo regionInfo){} 96 public virtual void SendRegionHandshake(RegionInfo regionInfo){}
97 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){} 97 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
98 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){} 98 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
99 public virtual void SendInstantMessage(string message, LLUUID target, string fromName){} 99 public virtual void SendInstantMessage(string message, LLUUID target, string fromName){}
100 public virtual void SendLayerData(float[] map){} 100 public virtual void SendLayerData(float[] map){}
101 public virtual void SendLayerData(int px, int py, float[] map){} 101 public virtual void SendLayerData(int px, int py, float[] map){}
102 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){} 102 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){}
103 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint){} 103 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint){}
104 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } 104 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); }
105 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint){} 105 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint){}
106 public virtual void SendMapBlock(List<MapBlockData> mapBlocks){} 106 public virtual void SendMapBlock(List<MapBlockData> mapBlocks){}
107 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags){} 107 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags){}
108 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags){} 108 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags){}
109 public virtual void SendTeleportCancel(){} 109 public virtual void SendTeleportCancel(){}
110 public virtual void SendTeleportLocationStart(){} 110 public virtual void SendTeleportLocationStart(){}
111 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance){} 111 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance){}
112 112
113 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry){} 113 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry){}
114 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity){} 114 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity){}
115 115
116 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint){} 116 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint){}
117 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags){} 117 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags){}
118 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags){} 118 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags){}
119 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){} 119 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){}
120 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){} 120 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){}
121 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation){} 121 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation){}
122 122
123 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items){} 123 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items){}
124 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item){} 124 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item){}
125 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){} 125 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){}
126 } 126 }
127} 127}
diff --git a/OpenSim/Framework/General/Properties/AssemblyInfo.cs b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
index 004040b..655cffc 100644
--- a/OpenSim/Framework/General/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
@@ -1,31 +1,31 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.FrameWork")] 6[assembly: AssemblyTitle("OpenSim.FrameWork")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.FrameWork")] 10[assembly: AssemblyProduct("OpenSim.FrameWork")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")] 21[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30[assembly: AssemblyVersion("1.0.0.0")] 30[assembly: AssemblyVersion("1.0.0.0")]
31[assembly: AssemblyFileVersion("1.0.0.0")] 31[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/General/RegionCommsListener.cs b/OpenSim/Framework/General/RegionCommsListener.cs
index 4d6b59c..f5b8272 100644
--- a/OpenSim/Framework/General/RegionCommsListener.cs
+++ b/OpenSim/Framework/General/RegionCommsListener.cs
@@ -1,103 +1,103 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Interfaces; 29using OpenSim.Framework.Interfaces;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32using System.Collections.Generic; 32using System.Collections.Generic;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
35{ 35{
36 public class RegionCommsListener :IRegionCommsListener 36 public class RegionCommsListener :IRegionCommsListener
37 { 37 {
38 public event ExpectUserDelegate OnExpectUser; 38 public event ExpectUserDelegate OnExpectUser;
39 public event GenericCall2 OnExpectChildAgent; 39 public event GenericCall2 OnExpectChildAgent;
40 public event AgentCrossing OnAvatarCrossingIntoRegion; 40 public event AgentCrossing OnAvatarCrossingIntoRegion;
41 public event UpdateNeighbours OnNeighboursUpdate; 41 public event UpdateNeighbours OnNeighboursUpdate;
42 42
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 /// <param name="agent"></param> 46 /// <param name="agent"></param>
47 /// <returns></returns> 47 /// <returns></returns>
48 public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) 48 public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
49 { 49 {
50 if(OnExpectUser != null) 50 if(OnExpectUser != null)
51 { 51 {
52 52
53 OnExpectUser(regionHandle, agent); 53 OnExpectUser(regionHandle, agent);
54 return true; 54 return true;
55 } 55 }
56 56
57 return false; 57 return false;
58 } 58 }
59 59
60 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 60 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
61 { 61 {
62 if (OnAvatarCrossingIntoRegion != null) 62 if (OnAvatarCrossingIntoRegion != null)
63 { 63 {
64 OnAvatarCrossingIntoRegion(regionHandle, agentID, position); 64 OnAvatarCrossingIntoRegion(regionHandle, agentID, position);
65 return true; 65 return true;
66 } 66 }
67 return false; 67 return false;
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// 71 ///
72 /// </summary> 72 /// </summary>
73 /// <remarks>TODO: Doesnt take any args??</remarks> 73 /// <remarks>TODO: Doesnt take any args??</remarks>
74 /// <returns></returns> 74 /// <returns></returns>
75 public virtual bool TriggerExpectChildAgent() 75 public virtual bool TriggerExpectChildAgent()
76 { 76 {
77 if (OnExpectChildAgent != null) 77 if (OnExpectChildAgent != null)
78 { 78 {
79 OnExpectChildAgent(); 79 OnExpectChildAgent();
80 return true; 80 return true;
81 } 81 }
82 82
83 return false; 83 return false;
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
87 /// 87 ///
88 /// </summary> 88 /// </summary>
89 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks> 89 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks>
90 /// <param name="neighbours"></param> 90 /// <param name="neighbours"></param>
91 /// <returns></returns> 91 /// <returns></returns>
92 public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours) 92 public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours)
93 { 93 {
94 if (OnNeighboursUpdate != null) 94 if (OnNeighboursUpdate != null)
95 { 95 {
96 OnNeighboursUpdate(neighbours); 96 OnNeighboursUpdate(neighbours);
97 return true; 97 return true;
98 } 98 }
99 99
100 return false; 100 return false;
101 } 101 }
102 } 102 }
103} 103}
diff --git a/OpenSim/Framework/General/Remoting.cs b/OpenSim/Framework/General/Remoting.cs
index df32db2..0e94b90 100644
--- a/OpenSim/Framework/General/Remoting.cs
+++ b/OpenSim/Framework/General/Remoting.cs
@@ -1,135 +1,135 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// NEEDS AUDIT. 35 /// NEEDS AUDIT.
36 /// </summary> 36 /// </summary>
37 /// <remarks> 37 /// <remarks>
38 /// Suggested implementation 38 /// Suggested implementation
39 /// <para>Store two digests for each foreign host. A local copy of the local hash using the local challenge (when issued), and a local copy of the remote hash using the remote challenge.</para> 39 /// <para>Store two digests for each foreign host. A local copy of the local hash using the local challenge (when issued), and a local copy of the remote hash using the remote challenge.</para>
40 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para> 40 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para>
41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para> 41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
42 /// <para>Both hosts should be performing these operations for this to be effective.</para> 42 /// <para>Both hosts should be performing these operations for this to be effective.</para>
43 /// </remarks> 43 /// </remarks>
44 class RemoteDigest 44 class RemoteDigest
45 { 45 {
46 private byte[] currentHash; 46 private byte[] currentHash;
47 private byte[] secret; 47 private byte[] secret;
48 48
49 private SHA512Managed SHA512; 49 private SHA512Managed SHA512;
50 50
51 /// <summary> 51 /// <summary>
52 /// Initialises a new RemoteDigest authentication mechanism 52 /// Initialises a new RemoteDigest authentication mechanism
53 /// </summary> 53 /// </summary>
54 /// <remarks>Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting</remarks> 54 /// <remarks>Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting</remarks>
55 /// <param name="sharedSecret">The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup)</param> 55 /// <param name="sharedSecret">The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup)</param>
56 /// <param name="salt">Binary salt - some common value - to be decided what</param> 56 /// <param name="salt">Binary salt - some common value - to be decided what</param>
57 /// <param name="challenge">The challenge key provided by the third party</param> 57 /// <param name="challenge">The challenge key provided by the third party</param>
58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge) 58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
59 { 59 {
60 SHA512 = new SHA512Managed(); 60 SHA512 = new SHA512Managed();
61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt); 61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt);
62 secret = RFC2898.GetBytes(512); 62 secret = RFC2898.GetBytes(512);
63 ASCIIEncoding ASCII = new ASCIIEncoding(); 63 ASCIIEncoding ASCII = new ASCIIEncoding();
64 64
65 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge))); 65 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge)));
66 } 66 }
67 67
68 /// <summary> 68 /// <summary>
69 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented. 69 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented.
70 /// </summary> 70 /// </summary>
71 /// <param name="data">The incoming data</param> 71 /// <param name="data">The incoming data</param>
72 /// <param name="digest">The remote digest</param> 72 /// <param name="digest">The remote digest</param>
73 /// <returns></returns> 73 /// <returns></returns>
74 public bool Authenticate(byte[] data, byte[] digest) 74 public bool Authenticate(byte[] data, byte[] digest)
75 { 75 {
76 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data)); 76 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
77 if (digest == newHash) 77 if (digest == newHash)
78 { 78 {
79 currentHash = newHash; 79 currentHash = newHash;
80 return true; 80 return true;
81 } 81 }
82 else 82 else
83 { 83 {
84 throw new Exception("Hash comparison failed. Key resync required."); 84 throw new Exception("Hash comparison failed. Key resync required.");
85 } 85 }
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. 89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the 90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
91 /// hashes will get out of sync and throw an exception when validation is attempted. 91 /// hashes will get out of sync and throw an exception when validation is attempted.
92 /// </summary> 92 /// </summary>
93 /// <param name="data">The outgoing data</param> 93 /// <param name="data">The outgoing data</param>
94 /// <returns>The local digest</returns> 94 /// <returns>The local digest</returns>
95 public byte[] Sign(byte[] data) 95 public byte[] Sign(byte[] data)
96 { 96 {
97 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data)); 97 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
98 return currentHash; 98 return currentHash;
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// Generates a new challenge string to be issued to a foreign host. Challenges are 1024-bit (effective strength of less than 512-bits) messages generated using the Crytographic Random Number Generator. 102 /// Generates a new challenge string to be issued to a foreign host. Challenges are 1024-bit (effective strength of less than 512-bits) messages generated using the Crytographic Random Number Generator.
103 /// </summary> 103 /// </summary>
104 /// <returns>A 128-character hexadecimal string containing the challenge.</returns> 104 /// <returns>A 128-character hexadecimal string containing the challenge.</returns>
105 public static string GenerateChallenge() 105 public static string GenerateChallenge()
106 { 106 {
107 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider(); 107 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();
108 byte[] bytes = new byte[64]; 108 byte[] bytes = new byte[64];
109 RNG.GetBytes(bytes); 109 RNG.GetBytes(bytes);
110 110
111 StringBuilder sb = new StringBuilder(bytes.Length * 2); 111 StringBuilder sb = new StringBuilder(bytes.Length * 2);
112 foreach (byte b in bytes) 112 foreach (byte b in bytes)
113 { 113 {
114 sb.AppendFormat("{0:x2}", b); 114 sb.AppendFormat("{0:x2}", b);
115 } 115 }
116 return sb.ToString(); 116 return sb.ToString();
117 } 117 }
118 118
119 /// <summary> 119 /// <summary>
120 /// Helper function, merges two byte arrays 120 /// Helper function, merges two byte arrays
121 /// </summary> 121 /// </summary>
122 /// <remarks>Sourced from MSDN Forum</remarks> 122 /// <remarks>Sourced from MSDN Forum</remarks>
123 /// <param name="a">A</param> 123 /// <param name="a">A</param>
124 /// <param name="b">B</param> 124 /// <param name="b">B</param>
125 /// <returns>C</returns> 125 /// <returns>C</returns>
126 private byte[] AppendArrays(byte[] a, byte[] b) 126 private byte[] AppendArrays(byte[] a, byte[] b)
127 { 127 {
128 byte[] c = new byte[a.Length + b.Length]; 128 byte[] c = new byte[a.Length + b.Length];
129 Buffer.BlockCopy(a, 0, c, 0, a.Length); 129 Buffer.BlockCopy(a, 0, c, 0, a.Length);
130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length); 130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
131 return c; 131 return c;
132 } 132 }
133 133
134 } 134 }
135} 135}
diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs
index ed9ee3c..36bb26d 100644
--- a/OpenSim/Framework/General/Types/AgentCiruitData.cs
+++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs
@@ -1,49 +1,49 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using System; 29using System;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 [Serializable] 33 [Serializable]
34 public class AgentCircuitData 34 public class AgentCircuitData
35 { 35 {
36 public AgentCircuitData() { } 36 public AgentCircuitData() { }
37 public LLUUID AgentID; 37 public LLUUID AgentID;
38 public LLUUID SessionID; 38 public LLUUID SessionID;
39 public LLUUID SecureSessionID; 39 public LLUUID SecureSessionID;
40 public LLVector3 startpos; 40 public LLVector3 startpos;
41 public string firstname; 41 public string firstname;
42 public string lastname; 42 public string lastname;
43 public uint circuitcode; 43 public uint circuitcode;
44 public bool child; 44 public bool child;
45 public LLUUID InventoryFolder; 45 public LLUUID InventoryFolder;
46 public LLUUID BaseFolder; 46 public LLUUID BaseFolder;
47 public string CapsPath = ""; 47 public string CapsPath = "";
48 } 48 }
49} 49}
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs
index 6152b7d..404df0d 100644
--- a/OpenSim/Framework/General/Types/AgentWearable.cs
+++ b/OpenSim/Framework/General/Types/AgentWearable.cs
@@ -1,57 +1,57 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class AvatarWearable 32 public class AvatarWearable
33 { 33 {
34 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); 34 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
35 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); 35 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
36 36
37 public AvatarWearable() 37 public AvatarWearable()
38 { 38 {
39 39
40 } 40 }
41 41
42 public static AvatarWearable[] DefaultWearables 42 public static AvatarWearable[] DefaultWearables
43 { 43 {
44 get 44 get
45 { 45 {
46 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these 46 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
47 for (int i = 0; i < 13; i++) 47 for (int i = 0; i < 13; i++)
48 { 48 {
49 defaultWearables[i] = new AvatarWearable(); 49 defaultWearables[i] = new AvatarWearable();
50 } 50 }
51 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 51 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
52 defaultWearables[0].ItemID = LLUUID.Random(); 52 defaultWearables[0].ItemID = LLUUID.Random();
53 return defaultWearables; 53 return defaultWearables;
54 } 54 }
55 } 55 }
56 } 56 }
57} 57}
diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs
index c203f51..181e1e3 100644
--- a/OpenSim/Framework/General/Types/AssetBase.cs
+++ b/OpenSim/Framework/General/Types/AssetBase.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class AssetBase 32 public class AssetBase
33 { 33 {
34 public byte[] Data; 34 public byte[] Data;
35 public LLUUID FullID; 35 public LLUUID FullID;
36 public sbyte Type; 36 public sbyte Type;
37 public sbyte InvType; 37 public sbyte InvType;
38 public string Name; 38 public string Name;
39 public string Description; 39 public string Description;
40 40
41 public AssetBase() 41 public AssetBase()
42 { 42 {
43 43
44 } 44 }
45 } 45 }
46} 46}
diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs
index 8aa872e..7cec6f6 100644
--- a/OpenSim/Framework/General/Types/AssetLandmark.cs
+++ b/OpenSim/Framework/General/Types/AssetLandmark.cs
@@ -1,59 +1,59 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Text; 28using System.Text;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 public class AssetLandmark : AssetBase 33 public class AssetLandmark : AssetBase
34 { 34 {
35 public int Version; 35 public int Version;
36 public LLVector3 Position; 36 public LLVector3 Position;
37 public LLUUID RegionID; 37 public LLUUID RegionID;
38 38
39 public AssetLandmark(AssetBase a) 39 public AssetLandmark(AssetBase a)
40 { 40 {
41 this.Data = a.Data; 41 this.Data = a.Data;
42 this.FullID = a.FullID; 42 this.FullID = a.FullID;
43 this.Type = a.Type; 43 this.Type = a.Type;
44 this.InvType = a.InvType; 44 this.InvType = a.InvType;
45 this.Name = a.Name; 45 this.Name = a.Name;
46 this.Description = a.Description; 46 this.Description = a.Description;
47 InternData(); 47 InternData();
48 } 48 }
49 49
50 private void InternData() 50 private void InternData()
51 { 51 {
52 string temp = Encoding.UTF8.GetString(Data).Trim(); 52 string temp = Encoding.UTF8.GetString(Data).Trim();
53 string[] parts = temp.Split('\n'); 53 string[] parts = temp.Split('\n');
54 int.TryParse(parts[0].Substring(17, 1), out Version); 54 int.TryParse(parts[0].Substring(17, 1), out Version);
55 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); 55 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID);
56 LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); 56 LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position);
57 } 57 }
58 } 58 }
59} 59}
diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs
index 3681336..d49e9e8 100644
--- a/OpenSim/Framework/General/Types/AssetStorage.cs
+++ b/OpenSim/Framework/General/Types/AssetStorage.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class AssetStorage 32 public class AssetStorage
33 { 33 {
34 34
35 public AssetStorage() { 35 public AssetStorage() {
36 } 36 }
37 37
38 public AssetStorage(LLUUID assetUUID) { 38 public AssetStorage(LLUUID assetUUID) {
39 UUID=assetUUID; 39 UUID=assetUUID;
40 } 40 }
41 41
42 public byte[] Data; 42 public byte[] Data;
43 public sbyte Type; 43 public sbyte Type;
44 public string Name; 44 public string Name;
45 public LLUUID UUID; 45 public LLUUID UUID;
46 } 46 }
47} 47}
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
index 436b109..25b3b18 100644
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -1,93 +1,93 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 public class EstateSettings 33 public class EstateSettings
34 { 34 {
35 //Settings to this island 35 //Settings to this island
36 public float billableFactor = (float)0.0; 36 public float billableFactor = (float)0.0;
37 public uint estateID = 0; 37 public uint estateID = 0;
38 public uint parentEstateID = 0; 38 public uint parentEstateID = 0;
39 39
40 public byte maxAgents = 40; 40 public byte maxAgents = 40;
41 public float objectBonusFactor = (float)1.0; 41 public float objectBonusFactor = (float)1.0;
42 42
43 public int redirectGridX = 0; //?? 43 public int redirectGridX = 0; //??
44 public int redirectGridY = 0; //?? 44 public int redirectGridY = 0; //??
45 public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings 45 public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings
46 public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. 46 public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default.
47 public float sunHour = 0; 47 public float sunHour = 0;
48 48
49 public float terrainRaiseLimit = 0; 49 public float terrainRaiseLimit = 0;
50 public float terrainLowerLimit = 0; 50 public float terrainLowerLimit = 0;
51 51
52 public bool useFixedSun = false; 52 public bool useFixedSun = false;
53 public int pricePerMeter = 1; 53 public int pricePerMeter = 1;
54 54
55 public ushort regionWaterHeight = 20; 55 public ushort regionWaterHeight = 20;
56 public bool regionAllowTerraform = true; 56 public bool regionAllowTerraform = true;
57 57
58 // Region Information 58 // Region Information
59 // Low resolution 'base' textures. No longer used. 59 // Low resolution 'base' textures. No longer used.
60 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default 60 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default
61 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default 61 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default
62 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default 62 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default
63 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default 63 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default
64 64
65 // Higher resolution terrain textures 65 // Higher resolution terrain textures
66 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000"); 66 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000");
67 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000"); 67 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000");
68 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000"); 68 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000");
69 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); 69 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
70 70
71 // First quad - each point is bilinearly interpolated at each meter of terrain 71 // First quad - each point is bilinearly interpolated at each meter of terrain
72 public float terrainStartHeight0 = 10.0f; 72 public float terrainStartHeight0 = 10.0f;
73 public float terrainStartHeight1 = 10.0f; 73 public float terrainStartHeight1 = 10.0f;
74 public float terrainStartHeight2 = 10.0f; 74 public float terrainStartHeight2 = 10.0f;
75 public float terrainStartHeight3 = 10.0f; 75 public float terrainStartHeight3 = 10.0f;
76 76
77 // Second quad - also bilinearly interpolated. 77 // Second quad - also bilinearly interpolated.
78 // Terrain texturing is done that: 78 // Terrain texturing is done that:
79 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] 79 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
80 public float terrainHeightRange0 = 60.0f; //00 80 public float terrainHeightRange0 = 60.0f; //00
81 public float terrainHeightRange1 = 60.0f; //01 81 public float terrainHeightRange1 = 60.0f; //01
82 public float terrainHeightRange2 = 60.0f; //10 82 public float terrainHeightRange2 = 60.0f; //10
83 public float terrainHeightRange3 = 60.0f; //11 83 public float terrainHeightRange3 = 60.0f; //11
84 84
85 // Terrain Default (Must be in F32 Format!) 85 // Terrain Default (Must be in F32 Format!)
86 public string terrainFile = "default.r32"; 86 public string terrainFile = "default.r32";
87 public double terrainMultiplier = 60.0; 87 public double terrainMultiplier = 60.0;
88 public float waterHeight = (float)20.0; 88 public float waterHeight = (float)20.0;
89 89
90 public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region 90 public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region
91 91
92 } 92 }
93} 93}
diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs
index d54c019..3aaf613 100644
--- a/OpenSim/Framework/General/Types/Login.cs
+++ b/OpenSim/Framework/General/Types/Login.cs
@@ -1,49 +1,49 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class Login 32 public class Login
33 { 33 {
34 public string First = "Test"; 34 public string First = "Test";
35 public string Last = "User"; 35 public string Last = "User";
36 public LLUUID Agent; 36 public LLUUID Agent;
37 public LLUUID Session; 37 public LLUUID Session;
38 public LLUUID SecureSession = LLUUID.Zero; 38 public LLUUID SecureSession = LLUUID.Zero;
39 public LLUUID InventoryFolder; 39 public LLUUID InventoryFolder;
40 public LLUUID BaseFolder; 40 public LLUUID BaseFolder;
41 public uint CircuitCode; 41 public uint CircuitCode;
42 public string CapsPath =""; 42 public string CapsPath ="";
43 43
44 public Login() 44 public Login()
45 { 45 {
46 46
47 } 47 }
48 } 48 }
49} 49}
diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs
index fbb3b73..212ce4b 100644
--- a/OpenSim/Framework/General/Types/MapBlockData.cs
+++ b/OpenSim/Framework/General/Types/MapBlockData.cs
@@ -1,23 +1,23 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 public class MapBlockData 6 public class MapBlockData
7 { 7 {
8 public uint Flags; 8 public uint Flags;
9 public ushort X; 9 public ushort X;
10 public ushort Y; 10 public ushort Y;
11 public byte Agents; 11 public byte Agents;
12 public byte Access; 12 public byte Access;
13 public byte WaterHeight; 13 public byte WaterHeight;
14 public LLUUID MapImageId; 14 public LLUUID MapImageId;
15 public String Name; 15 public String Name;
16 public uint RegionFlags; 16 public uint RegionFlags;
17 17
18 public MapBlockData() 18 public MapBlockData()
19 { 19 {
20 20
21 } 21 }
22 } 22 }
23} 23}
diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs
index bb67981..7e83ffc 100644
--- a/OpenSim/Framework/General/Types/NeighbourInfo.cs
+++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Types 28namespace OpenSim.Framework.Types
29{ 29{
30 public class NeighbourInfo 30 public class NeighbourInfo
31 { 31 {
32 public NeighbourInfo() 32 public NeighbourInfo()
33 { 33 {
34 } 34 }
35 35
36 public ulong regionhandle; 36 public ulong regionhandle;
37 public uint RegionLocX; 37 public uint RegionLocX;
38 public uint RegionLocY; 38 public uint RegionLocY;
39 public string sim_ip; 39 public string sim_ip;
40 public uint sim_port; 40 public uint sim_port;
41 } 41 }
42} 42}
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
index 900354c..6259d7b 100644
--- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs
+++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
@@ -1,219 +1,219 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31 31
32namespace OpenSim.Framework.Types 32namespace OpenSim.Framework.Types
33{ 33{
34 public class NetworkServersInfo 34 public class NetworkServersInfo
35 { 35 {
36 public string AssetURL = "http://127.0.0.1:8003/"; 36 public string AssetURL = "http://127.0.0.1:8003/";
37 public string AssetSendKey = ""; 37 public string AssetSendKey = "";
38 38
39 public string GridURL = ""; 39 public string GridURL = "";
40 public string GridSendKey = ""; 40 public string GridSendKey = "";
41 public string GridRecvKey = ""; 41 public string GridRecvKey = "";
42 public string UserURL = ""; 42 public string UserURL = "";
43 public string UserSendKey = ""; 43 public string UserSendKey = "";
44 public string UserRecvKey = ""; 44 public string UserRecvKey = "";
45 public bool isSandbox; 45 public bool isSandbox;
46 46
47 public uint DefaultHomeLocX = 1000; 47 public uint DefaultHomeLocX = 1000;
48 public uint DefaultHomeLocY = 1000; 48 public uint DefaultHomeLocY = 1000;
49 49
50 public int HttpListenerPort = 9000; 50 public int HttpListenerPort = 9000;
51 public int RemotingListenerPort = 8895; 51 public int RemotingListenerPort = 8895;
52 52
53 public void InitConfig(bool sandboxMode, IGenericConfig configData) 53 public void InitConfig(bool sandboxMode, IGenericConfig configData)
54 { 54 {
55 this.isSandbox = sandboxMode; 55 this.isSandbox = sandboxMode;
56 56
57 try 57 try
58 { 58 {
59 string attri = ""; 59 string attri = "";
60 60
61 attri = ""; 61 attri = "";
62 attri = configData.GetAttribute("HttpListenerPort"); 62 attri = configData.GetAttribute("HttpListenerPort");
63 if (attri == "") 63 if (attri == "")
64 { 64 {
65 string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); 65 string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000");
66 configData.SetAttribute("HttpListenerPort", location); 66 configData.SetAttribute("HttpListenerPort", location);
67 this.HttpListenerPort = Convert.ToInt32(location); 67 this.HttpListenerPort = Convert.ToInt32(location);
68 } 68 }
69 else 69 else
70 { 70 {
71 this.HttpListenerPort = Convert.ToInt32(attri); 71 this.HttpListenerPort = Convert.ToInt32(attri);
72 } 72 }
73 73
74 attri = ""; 74 attri = "";
75 attri = configData.GetAttribute("RemotingListenerPort"); 75 attri = configData.GetAttribute("RemotingListenerPort");
76 if (attri == "") 76 if (attri == "")
77 { 77 {
78 string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); 78 string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895");
79 configData.SetAttribute("RemotingListenerPort", location); 79 configData.SetAttribute("RemotingListenerPort", location);
80 this.RemotingListenerPort = Convert.ToInt32(location); 80 this.RemotingListenerPort = Convert.ToInt32(location);
81 } 81 }
82 else 82 else
83 { 83 {
84 this.RemotingListenerPort = Convert.ToInt32(attri); 84 this.RemotingListenerPort = Convert.ToInt32(attri);
85 } 85 }
86 86
87 if (sandboxMode) 87 if (sandboxMode)
88 { 88 {
89 // default home location X 89 // default home location X
90 attri = ""; 90 attri = "";
91 attri = configData.GetAttribute("DefaultLocationX"); 91 attri = configData.GetAttribute("DefaultLocationX");
92 if (attri == "") 92 if (attri == "")
93 { 93 {
94 string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); 94 string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000");
95 configData.SetAttribute("DefaultLocationX", location); 95 configData.SetAttribute("DefaultLocationX", location);
96 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); 96 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location);
97 } 97 }
98 else 98 else
99 { 99 {
100 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri); 100 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri);
101 } 101 }
102 102
103 // default home location Y 103 // default home location Y
104 attri = ""; 104 attri = "";
105 attri = configData.GetAttribute("DefaultLocationY"); 105 attri = configData.GetAttribute("DefaultLocationY");
106 if (attri == "") 106 if (attri == "")
107 { 107 {
108 string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); 108 string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000");
109 configData.SetAttribute("DefaultLocationY", location); 109 configData.SetAttribute("DefaultLocationY", location);
110 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); 110 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location);
111 } 111 }
112 else 112 else
113 { 113 {
114 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); 114 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
115 } 115 }
116 } 116 }
117 if (!isSandbox) 117 if (!isSandbox)
118 { 118 {
119 //Grid Server 119 //Grid Server
120 attri = ""; 120 attri = "";
121 attri = configData.GetAttribute("GridServerURL"); 121 attri = configData.GetAttribute("GridServerURL");
122 if (attri == "") 122 if (attri == "")
123 { 123 {
124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); 124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
125 configData.SetAttribute("GridServerURL", this.GridURL); 125 configData.SetAttribute("GridServerURL", this.GridURL);
126 } 126 }
127 else 127 else
128 { 128 {
129 this.GridURL = attri; 129 this.GridURL = attri;
130 } 130 }
131 131
132 //Grid Send Key 132 //Grid Send Key
133 attri = ""; 133 attri = "";
134 attri = configData.GetAttribute("GridSendKey"); 134 attri = configData.GetAttribute("GridSendKey");
135 if (attri == "") 135 if (attri == "")
136 { 136 {
137 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); 137 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null");
138 configData.SetAttribute("GridSendKey", this.GridSendKey); 138 configData.SetAttribute("GridSendKey", this.GridSendKey);
139 } 139 }
140 else 140 else
141 { 141 {
142 this.GridSendKey = attri; 142 this.GridSendKey = attri;
143 } 143 }
144 144
145 //Grid Receive Key 145 //Grid Receive Key
146 attri = ""; 146 attri = "";
147 attri = configData.GetAttribute("GridRecvKey"); 147 attri = configData.GetAttribute("GridRecvKey");
148 if (attri == "") 148 if (attri == "")
149 { 149 {
150 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); 150 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null");
151 configData.SetAttribute("GridRecvKey", this.GridRecvKey); 151 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
152 } 152 }
153 else 153 else
154 { 154 {
155 this.GridRecvKey = attri; 155 this.GridRecvKey = attri;
156 } 156 }
157 157
158 //Grid Server 158 //Grid Server
159 attri = ""; 159 attri = "";
160 attri = configData.GetAttribute("UserServerURL"); 160 attri = configData.GetAttribute("UserServerURL");
161 if (attri == "") 161 if (attri == "")
162 { 162 {
163 this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); 163 this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/");
164 configData.SetAttribute("UserServerURL", this.UserURL); 164 configData.SetAttribute("UserServerURL", this.UserURL);
165 } 165 }
166 else 166 else
167 { 167 {
168 this.UserURL = attri; 168 this.UserURL = attri;
169 } 169 }
170 170
171 //Grid Send Key 171 //Grid Send Key
172 attri = ""; 172 attri = "";
173 attri = configData.GetAttribute("UserSendKey"); 173 attri = configData.GetAttribute("UserSendKey");
174 if (attri == "") 174 if (attri == "")
175 { 175 {
176 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); 176 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null");
177 configData.SetAttribute("UserSendKey", this.UserSendKey); 177 configData.SetAttribute("UserSendKey", this.UserSendKey);
178 } 178 }
179 else 179 else
180 { 180 {
181 this.UserSendKey = attri; 181 this.UserSendKey = attri;
182 } 182 }
183 183
184 //Grid Receive Key 184 //Grid Receive Key
185 attri = ""; 185 attri = "";
186 attri = configData.GetAttribute("UserRecvKey"); 186 attri = configData.GetAttribute("UserRecvKey");
187 if (attri == "") 187 if (attri == "")
188 { 188 {
189 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); 189 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null");
190 configData.SetAttribute("UserRecvKey", this.UserRecvKey); 190 configData.SetAttribute("UserRecvKey", this.UserRecvKey);
191 } 191 }
192 else 192 else
193 { 193 {
194 this.UserRecvKey = attri; 194 this.UserRecvKey = attri;
195 } 195 }
196 196
197 attri = ""; 197 attri = "";
198 attri = configData.GetAttribute("AssetServerURL"); 198 attri = configData.GetAttribute("AssetServerURL");
199 if (attri == "") 199 if (attri == "")
200 { 200 {
201 this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); 201 this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
202 configData.SetAttribute("AssetServerURL", this.GridURL); 202 configData.SetAttribute("AssetServerURL", this.GridURL);
203 } 203 }
204 else 204 else
205 { 205 {
206 this.AssetURL = attri; 206 this.AssetURL = attri;
207 } 207 }
208 208
209 } 209 }
210 configData.Commit(); 210 configData.Commit();
211 } 211 }
212 catch (Exception e) 212 catch (Exception e)
213 { 213 {
214 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 214 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
215 MainLog.Instance.Warn(e.ToString()); 215 MainLog.Instance.Warn(e.ToString());
216 } 216 }
217 } 217 }
218 } 218 }
219} 219}
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs
index 17de655..5626299 100644
--- a/OpenSim/Framework/General/Types/ParcelData.cs
+++ b/OpenSim/Framework/General/Types/ParcelData.cs
@@ -1,120 +1,120 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 32
33 public class ParcelData 33 public class ParcelData
34 { 34 {
35 public byte[] parcelBitmapByteArray = new byte[512]; 35 public byte[] parcelBitmapByteArray = new byte[512];
36 public string parcelName = "Your Parcel"; 36 public string parcelName = "Your Parcel";
37 public string parcelDesc = ""; 37 public string parcelDesc = "";
38 public LLUUID ownerID = new LLUUID(); 38 public LLUUID ownerID = new LLUUID();
39 public bool isGroupOwned = false; 39 public bool isGroupOwned = false;
40 public LLVector3 AABBMin = new LLVector3(); 40 public LLVector3 AABBMin = new LLVector3();
41 public LLVector3 AABBMax = new LLVector3(); 41 public LLVector3 AABBMax = new LLVector3();
42 public int area = 0; 42 public int area = 0;
43 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned 43 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
44 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID 44 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
45 public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category 45 public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
46 public int claimDate = 0; //Unemplemented 46 public int claimDate = 0; //Unemplemented
47 public int claimPrice = 0; //Unemplemented 47 public int claimPrice = 0; //Unemplemented
48 public LLUUID groupID = new LLUUID(); //Unemplemented 48 public LLUUID groupID = new LLUUID(); //Unemplemented
49 public int groupPrims = 0; 49 public int groupPrims = 0;
50 public int otherPrims = 0; 50 public int otherPrims = 0;
51 public int ownerPrims = 0; 51 public int ownerPrims = 0;
52 public int selectedPrims = 0; 52 public int selectedPrims = 0;
53 public int simwidePrims = 0; 53 public int simwidePrims = 0;
54 public int simwideArea = 0; 54 public int simwideArea = 0;
55 public int salePrice = 0; //Unemeplemented. Parcels price. 55 public int salePrice = 0; //Unemeplemented. Parcels price.
56 public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased; 56 public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased;
57 public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; 57 public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
58 public byte landingType = 0; 58 public byte landingType = 0;
59 public byte mediaAutoScale = 0; 59 public byte mediaAutoScale = 0;
60 public LLUUID mediaID = LLUUID.Zero; 60 public LLUUID mediaID = LLUUID.Zero;
61 public int localID = 0; 61 public int localID = 0;
62 public LLUUID globalID = new LLUUID(); 62 public LLUUID globalID = new LLUUID();
63 63
64 public string mediaURL = ""; 64 public string mediaURL = "";
65 public string musicURL = ""; 65 public string musicURL = "";
66 public float passHours = 0; 66 public float passHours = 0;
67 public int passPrice = 0; 67 public int passPrice = 0;
68 public LLUUID snapshotID = LLUUID.Zero; 68 public LLUUID snapshotID = LLUUID.Zero;
69 public LLVector3 userLocation = new LLVector3(); 69 public LLVector3 userLocation = new LLVector3();
70 public LLVector3 userLookAt = new LLVector3(); 70 public LLVector3 userLookAt = new LLVector3();
71 71
72 public ParcelData() 72 public ParcelData()
73 { 73 {
74 globalID = LLUUID.Random(); 74 globalID = LLUUID.Random();
75 } 75 }
76 76
77 public ParcelData Copy() 77 public ParcelData Copy()
78 { 78 {
79 ParcelData parcelData = new ParcelData(); 79 ParcelData parcelData = new ParcelData();
80 80
81 parcelData.AABBMax = this.AABBMax; 81 parcelData.AABBMax = this.AABBMax;
82 parcelData.AABBMin = this.AABBMin; 82 parcelData.AABBMin = this.AABBMin;
83 parcelData.area = this.area; 83 parcelData.area = this.area;
84 parcelData.auctionID = this.auctionID; 84 parcelData.auctionID = this.auctionID;
85 parcelData.authBuyerID = this.authBuyerID; 85 parcelData.authBuyerID = this.authBuyerID;
86 parcelData.category = this.category; 86 parcelData.category = this.category;
87 parcelData.claimDate = this.claimDate; 87 parcelData.claimDate = this.claimDate;
88 parcelData.claimPrice = this.claimPrice; 88 parcelData.claimPrice = this.claimPrice;
89 parcelData.globalID = this.globalID; 89 parcelData.globalID = this.globalID;
90 parcelData.groupID = this.groupID; 90 parcelData.groupID = this.groupID;
91 parcelData.groupPrims = this.groupPrims; 91 parcelData.groupPrims = this.groupPrims;
92 parcelData.otherPrims = this.otherPrims; 92 parcelData.otherPrims = this.otherPrims;
93 parcelData.ownerPrims = this.ownerPrims; 93 parcelData.ownerPrims = this.ownerPrims;
94 parcelData.selectedPrims = this.selectedPrims; 94 parcelData.selectedPrims = this.selectedPrims;
95 parcelData.isGroupOwned = this.isGroupOwned; 95 parcelData.isGroupOwned = this.isGroupOwned;
96 parcelData.localID = this.localID; 96 parcelData.localID = this.localID;
97 parcelData.landingType = this.landingType; 97 parcelData.landingType = this.landingType;
98 parcelData.mediaAutoScale = this.mediaAutoScale; 98 parcelData.mediaAutoScale = this.mediaAutoScale;
99 parcelData.mediaID = this.mediaID; 99 parcelData.mediaID = this.mediaID;
100 parcelData.mediaURL = this.mediaURL; 100 parcelData.mediaURL = this.mediaURL;
101 parcelData.musicURL = this.musicURL; 101 parcelData.musicURL = this.musicURL;
102 parcelData.ownerID = this.ownerID; 102 parcelData.ownerID = this.ownerID;
103 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone(); 103 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
104 parcelData.parcelDesc = this.parcelDesc; 104 parcelData.parcelDesc = this.parcelDesc;
105 parcelData.parcelFlags = this.parcelFlags; 105 parcelData.parcelFlags = this.parcelFlags;
106 parcelData.parcelName = this.parcelName; 106 parcelData.parcelName = this.parcelName;
107 parcelData.parcelStatus = this.parcelStatus; 107 parcelData.parcelStatus = this.parcelStatus;
108 parcelData.passHours = this.passHours; 108 parcelData.passHours = this.passHours;
109 parcelData.passPrice = this.passPrice; 109 parcelData.passPrice = this.passPrice;
110 parcelData.salePrice = this.salePrice; 110 parcelData.salePrice = this.salePrice;
111 parcelData.snapshotID = this.snapshotID; 111 parcelData.snapshotID = this.snapshotID;
112 parcelData.userLocation = this.userLocation; 112 parcelData.userLocation = this.userLocation;
113 parcelData.userLookAt = this.userLookAt; 113 parcelData.userLookAt = this.userLookAt;
114 114
115 return parcelData; 115 return parcelData;
116 116
117 } 117 }
118 } 118 }
119 119
120} 120}
diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs
index ff81bcd..6b8fa3a 100644
--- a/OpenSim/Framework/General/Types/PrimData.cs
+++ b/OpenSim/Framework/General/Types/PrimData.cs
@@ -1,228 +1,228 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 public class PrimData 33 public class PrimData
34 { 34 {
35 private const uint FULL_MASK_PERMISSIONS = 2147483647; 35 private const uint FULL_MASK_PERMISSIONS = 2147483647;
36 36
37 public LLUUID OwnerID; 37 public LLUUID OwnerID;
38 public byte PCode; 38 public byte PCode;
39 public ushort PathBegin; 39 public ushort PathBegin;
40 public ushort PathEnd; 40 public ushort PathEnd;
41 public byte PathScaleX; 41 public byte PathScaleX;
42 public byte PathScaleY; 42 public byte PathScaleY;
43 public byte PathShearX; 43 public byte PathShearX;
44 public byte PathShearY; 44 public byte PathShearY;
45 public sbyte PathSkew; 45 public sbyte PathSkew;
46 public ushort ProfileBegin; 46 public ushort ProfileBegin;
47 public ushort ProfileEnd; 47 public ushort ProfileEnd;
48 public LLVector3 Scale; 48 public LLVector3 Scale;
49 public byte PathCurve; 49 public byte PathCurve;
50 public byte ProfileCurve; 50 public byte ProfileCurve;
51 public uint ParentID = 0; 51 public uint ParentID = 0;
52 public ushort ProfileHollow; 52 public ushort ProfileHollow;
53 public sbyte PathRadiusOffset; 53 public sbyte PathRadiusOffset;
54 public byte PathRevolutions; 54 public byte PathRevolutions;
55 public sbyte PathTaperX; 55 public sbyte PathTaperX;
56 public sbyte PathTaperY; 56 public sbyte PathTaperY;
57 public sbyte PathTwist; 57 public sbyte PathTwist;
58 public sbyte PathTwistBegin; 58 public sbyte PathTwistBegin;
59 public byte[] TextureEntry; // a LL textureEntry in byte[] format 59 public byte[] TextureEntry; // a LL textureEntry in byte[] format
60 60
61 public Int32 CreationDate; 61 public Int32 CreationDate;
62 public uint OwnerMask = FULL_MASK_PERMISSIONS; 62 public uint OwnerMask = FULL_MASK_PERMISSIONS;
63 public uint NextOwnerMask = FULL_MASK_PERMISSIONS; 63 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
64 public uint GroupMask = FULL_MASK_PERMISSIONS; 64 public uint GroupMask = FULL_MASK_PERMISSIONS;
65 public uint EveryoneMask = FULL_MASK_PERMISSIONS; 65 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
66 public uint BaseMask = FULL_MASK_PERMISSIONS; 66 public uint BaseMask = FULL_MASK_PERMISSIONS;
67 67
68 //following only used during prim storage 68 //following only used during prim storage
69 public LLVector3 Position; 69 public LLVector3 Position;
70 public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0); 70 public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0);
71 public uint LocalID; 71 public uint LocalID;
72 public LLUUID FullID; 72 public LLUUID FullID;
73 73
74 public PrimData() 74 public PrimData()
75 { 75 {
76 76
77 } 77 }
78 78
79 public PrimData(byte[] data) 79 public PrimData(byte[] data)
80 { 80 {
81 int i = 0; 81 int i = 0;
82 82
83 this.OwnerID = new LLUUID(data, i); i += 16; 83 this.OwnerID = new LLUUID(data, i); i += 16;
84 this.PCode = data[i++]; 84 this.PCode = data[i++];
85 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8)); 85 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
86 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8)); 86 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
87 this.PathScaleX = data[i++]; 87 this.PathScaleX = data[i++];
88 this.PathScaleY = data[i++]; 88 this.PathScaleY = data[i++];
89 this.PathShearX = data[i++]; 89 this.PathShearX = data[i++];
90 this.PathShearY = data[i++]; 90 this.PathShearY = data[i++];
91 this.PathSkew = (sbyte)data[i++]; 91 this.PathSkew = (sbyte)data[i++];
92 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8)); 92 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
93 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8)); 93 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
94 this.Scale = new LLVector3(data, i); i += 12; 94 this.Scale = new LLVector3(data, i); i += 12;
95 this.PathCurve = data[i++]; 95 this.PathCurve = data[i++];
96 this.ProfileCurve = data[i++]; 96 this.ProfileCurve = data[i++];
97 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 97 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
98 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8)); 98 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
99 this.PathRadiusOffset = (sbyte)data[i++]; 99 this.PathRadiusOffset = (sbyte)data[i++];
100 this.PathRevolutions = data[i++]; 100 this.PathRevolutions = data[i++];
101 this.PathTaperX = (sbyte)data[i++]; 101 this.PathTaperX = (sbyte)data[i++];
102 this.PathTaperY = (sbyte)data[i++]; 102 this.PathTaperY = (sbyte)data[i++];
103 this.PathTwist = (sbyte)data[i++]; 103 this.PathTwist = (sbyte)data[i++];
104 this.PathTwistBegin = (sbyte)data[i++]; 104 this.PathTwistBegin = (sbyte)data[i++];
105 ushort length = (ushort)(data[i++] + (data[i++] << 8)); 105 ushort length = (ushort)(data[i++] + (data[i++] << 8));
106 this.TextureEntry = new byte[length]; 106 this.TextureEntry = new byte[length];
107 Array.Copy(data, i, TextureEntry, 0, length); i += length; 107 Array.Copy(data, i, TextureEntry, 0, length); i += length;
108 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 108 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
109 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 109 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
110 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 110 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
111 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 111 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
112 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 112 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
113 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 113 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
114 this.Position = new LLVector3(data, i); i += 12; 114 this.Position = new LLVector3(data, i); i += 12;
115 this.Rotation = new LLQuaternion(data, i, true); i += 12; 115 this.Rotation = new LLQuaternion(data, i, true); i += 12;
116 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 116 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
117 this.FullID = new LLUUID(data, i); i += 16; 117 this.FullID = new LLUUID(data, i); i += 16;
118 118
119 } 119 }
120 120
121 public byte[] ToBytes() 121 public byte[] ToBytes()
122 { 122 {
123 int i = 0; 123 int i = 0;
124 byte[] bytes = new byte[126 + TextureEntry.Length]; 124 byte[] bytes = new byte[126 + TextureEntry.Length];
125 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; 125 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
126 bytes[i++] = this.PCode; 126 bytes[i++] = this.PCode;
127 bytes[i++] = (byte)(this.PathBegin % 256); 127 bytes[i++] = (byte)(this.PathBegin % 256);
128 bytes[i++] = (byte)((this.PathBegin >> 8) % 256); 128 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
129 bytes[i++] = (byte)(this.PathEnd % 256); 129 bytes[i++] = (byte)(this.PathEnd % 256);
130 bytes[i++] = (byte)((this.PathEnd >> 8) % 256); 130 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
131 bytes[i++] = this.PathScaleX; 131 bytes[i++] = this.PathScaleX;
132 bytes[i++] = this.PathScaleY; 132 bytes[i++] = this.PathScaleY;
133 bytes[i++] = this.PathShearX; 133 bytes[i++] = this.PathShearX;
134 bytes[i++] = this.PathShearY; 134 bytes[i++] = this.PathShearY;
135 bytes[i++] = (byte)this.PathSkew; 135 bytes[i++] = (byte)this.PathSkew;
136 bytes[i++] = (byte)(this.ProfileBegin % 256); 136 bytes[i++] = (byte)(this.ProfileBegin % 256);
137 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256); 137 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
138 bytes[i++] = (byte)(this.ProfileEnd % 256); 138 bytes[i++] = (byte)(this.ProfileEnd % 256);
139 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256); 139 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
140 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; 140 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
141 bytes[i++] = this.PathCurve; 141 bytes[i++] = this.PathCurve;
142 bytes[i++] = this.ProfileCurve; 142 bytes[i++] = this.ProfileCurve;
143 bytes[i++] = (byte)(ParentID % 256); 143 bytes[i++] = (byte)(ParentID % 256);
144 bytes[i++] = (byte)((ParentID >> 8) % 256); 144 bytes[i++] = (byte)((ParentID >> 8) % 256);
145 bytes[i++] = (byte)((ParentID >> 16) % 256); 145 bytes[i++] = (byte)((ParentID >> 16) % 256);
146 bytes[i++] = (byte)((ParentID >> 24) % 256); 146 bytes[i++] = (byte)((ParentID >> 24) % 256);
147 bytes[i++] = (byte)(this.ProfileHollow % 256); 147 bytes[i++] = (byte)(this.ProfileHollow % 256);
148 bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256); 148 bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256);
149 bytes[i++] = ((byte)this.PathRadiusOffset); 149 bytes[i++] = ((byte)this.PathRadiusOffset);
150 bytes[i++] = this.PathRevolutions; 150 bytes[i++] = this.PathRevolutions;
151 bytes[i++] = ((byte)this.PathTaperX); 151 bytes[i++] = ((byte)this.PathTaperX);
152 bytes[i++] = ((byte)this.PathTaperY); 152 bytes[i++] = ((byte)this.PathTaperY);
153 bytes[i++] = ((byte)this.PathTwist); 153 bytes[i++] = ((byte)this.PathTwist);
154 bytes[i++] = ((byte)this.PathTwistBegin); 154 bytes[i++] = ((byte)this.PathTwistBegin);
155 bytes[i++] = (byte)(TextureEntry.Length % 256); 155 bytes[i++] = (byte)(TextureEntry.Length % 256);
156 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256); 156 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256);
157 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length; 157 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length;
158 bytes[i++] = (byte)(this.CreationDate % 256); 158 bytes[i++] = (byte)(this.CreationDate % 256);
159 bytes[i++] = (byte)((this.CreationDate >> 8) % 256); 159 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
160 bytes[i++] = (byte)((this.CreationDate >> 16) % 256); 160 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
161 bytes[i++] = (byte)((this.CreationDate >> 24) % 256); 161 bytes[i++] = (byte)((this.CreationDate >> 24) % 256);
162 bytes[i++] = (byte)(this.OwnerMask % 256); 162 bytes[i++] = (byte)(this.OwnerMask % 256);
163 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256); 163 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256);
164 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256); 164 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256);
165 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256); 165 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256);
166 bytes[i++] = (byte)(this.NextOwnerMask % 256); 166 bytes[i++] = (byte)(this.NextOwnerMask % 256);
167 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256); 167 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256);
168 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256); 168 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256);
169 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256); 169 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256);
170 bytes[i++] = (byte)(this.GroupMask % 256); 170 bytes[i++] = (byte)(this.GroupMask % 256);
171 bytes[i++] = (byte)((this.GroupMask >> 8) % 256); 171 bytes[i++] = (byte)((this.GroupMask >> 8) % 256);
172 bytes[i++] = (byte)((this.GroupMask >> 16) % 256); 172 bytes[i++] = (byte)((this.GroupMask >> 16) % 256);
173 bytes[i++] = (byte)((this.GroupMask >> 24) % 256); 173 bytes[i++] = (byte)((this.GroupMask >> 24) % 256);
174 bytes[i++] = (byte)(this.EveryoneMask % 256); 174 bytes[i++] = (byte)(this.EveryoneMask % 256);
175 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256); 175 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256);
176 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256); 176 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256);
177 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256); 177 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256);
178 bytes[i++] = (byte)(this.BaseMask % 256); 178 bytes[i++] = (byte)(this.BaseMask % 256);
179 bytes[i++] = (byte)((this.BaseMask >> 8) % 256); 179 bytes[i++] = (byte)((this.BaseMask >> 8) % 256);
180 bytes[i++] = (byte)((this.BaseMask >> 16) % 256); 180 bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
181 bytes[i++] = (byte)((this.BaseMask >> 24) % 256); 181 bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
182 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; 182 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
183 if (this.Rotation == new LLQuaternion(0, 0, 0, 0)) 183 if (this.Rotation == new LLQuaternion(0, 0, 0, 0))
184 { 184 {
185 this.Rotation = new LLQuaternion(0, 1, 0, 0); 185 this.Rotation = new LLQuaternion(0, 1, 0, 0);
186 } 186 }
187 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; 187 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
188 bytes[i++] = (byte)(this.LocalID % 256); 188 bytes[i++] = (byte)(this.LocalID % 256);
189 bytes[i++] = (byte)((this.LocalID >> 8) % 256); 189 bytes[i++] = (byte)((this.LocalID >> 8) % 256);
190 bytes[i++] = (byte)((this.LocalID >> 16) % 256); 190 bytes[i++] = (byte)((this.LocalID >> 16) % 256);
191 bytes[i++] = (byte)((this.LocalID >> 24) % 256); 191 bytes[i++] = (byte)((this.LocalID >> 24) % 256);
192 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16; 192 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16;
193 193
194 return bytes; 194 return bytes;
195 } 195 }
196 196
197 public static PrimData DefaultCube() 197 public static PrimData DefaultCube()
198 { 198 {
199 PrimData primData = new PrimData(); 199 PrimData primData = new PrimData();
200 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 200 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
201 primData.FullID = LLUUID.Random(); 201 primData.FullID = LLUUID.Random();
202 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 202 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
203 primData.Rotation = new LLQuaternion(0, 0, 0, 1); 203 primData.Rotation = new LLQuaternion(0, 0, 0, 1);
204 primData.PCode = 9; 204 primData.PCode = 9;
205 primData.ParentID = 0; 205 primData.ParentID = 0;
206 primData.PathBegin = 0; 206 primData.PathBegin = 0;
207 primData.PathEnd = 0; 207 primData.PathEnd = 0;
208 primData.PathScaleX = 0; 208 primData.PathScaleX = 0;
209 primData.PathScaleY = 0; 209 primData.PathScaleY = 0;
210 primData.PathShearX = 0; 210 primData.PathShearX = 0;
211 primData.PathShearY = 0; 211 primData.PathShearY = 0;
212 primData.PathSkew = 0; 212 primData.PathSkew = 0;
213 primData.ProfileBegin = 0; 213 primData.ProfileBegin = 0;
214 primData.ProfileEnd = 0; 214 primData.ProfileEnd = 0;
215 primData.PathCurve = 16; 215 primData.PathCurve = 16;
216 primData.ProfileCurve = 1; 216 primData.ProfileCurve = 1;
217 primData.ProfileHollow = 0; 217 primData.ProfileHollow = 0;
218 primData.PathRadiusOffset = 0; 218 primData.PathRadiusOffset = 0;
219 primData.PathRevolutions = 0; 219 primData.PathRevolutions = 0;
220 primData.PathTaperX = 0; 220 primData.PathTaperX = 0;
221 primData.PathTaperY = 0; 221 primData.PathTaperY = 0;
222 primData.PathTwist = 0; 222 primData.PathTwist = 0;
223 primData.PathTwistBegin = 0; 223 primData.PathTwistBegin = 0;
224 224
225 return primData; 225 return primData;
226 } 226 }
227 } 227 }
228} 228}
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index a085a44..e058c07 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -1,109 +1,109 @@
1using libsecondlife; 1using libsecondlife;
2using libsecondlife.Packets; 2using libsecondlife.Packets;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 public enum ShapeType 6 public enum ShapeType
7 { 7 {
8 Box, 8 Box,
9 Sphere, 9 Sphere,
10 Ring, 10 Ring,
11 Tube, 11 Tube,
12 Torus, 12 Torus,
13 Prism, 13 Prism,
14 Scuplted, 14 Scuplted,
15 Cylinder, 15 Cylinder,
16 Foliage, 16 Foliage,
17 Unknown 17 Unknown
18 } 18 }
19 19
20 public class PrimitiveBaseShape 20 public class PrimitiveBaseShape
21 { 21 {
22 private ShapeType type = ShapeType.Unknown; 22 private ShapeType type = ShapeType.Unknown;
23 23
24 public byte PCode; 24 public byte PCode;
25 public ushort PathBegin; 25 public ushort PathBegin;
26 public ushort PathEnd; 26 public ushort PathEnd;
27 public byte PathScaleX; 27 public byte PathScaleX;
28 public byte PathScaleY; 28 public byte PathScaleY;
29 public byte PathShearX; 29 public byte PathShearX;
30 public byte PathShearY; 30 public byte PathShearY;
31 public sbyte PathSkew; 31 public sbyte PathSkew;
32 public ushort ProfileBegin; 32 public ushort ProfileBegin;
33 public ushort ProfileEnd; 33 public ushort ProfileEnd;
34 public LLVector3 Scale; 34 public LLVector3 Scale;
35 public byte PathCurve; 35 public byte PathCurve;
36 public byte ProfileCurve; 36 public byte ProfileCurve;
37 public ushort ProfileHollow; 37 public ushort ProfileHollow;
38 public sbyte PathRadiusOffset; 38 public sbyte PathRadiusOffset;
39 public byte PathRevolutions; 39 public byte PathRevolutions;
40 public sbyte PathTaperX; 40 public sbyte PathTaperX;
41 public sbyte PathTaperY; 41 public sbyte PathTaperY;
42 public sbyte PathTwist; 42 public sbyte PathTwist;
43 public sbyte PathTwistBegin; 43 public sbyte PathTwistBegin;
44 public byte[] TextureEntry; // a LL textureEntry in byte[] format 44 public byte[] TextureEntry; // a LL textureEntry in byte[] format
45 45
46 public ShapeType PrimType 46 public ShapeType PrimType
47 { 47 {
48 get 48 get
49 { 49 {
50 return this.type; 50 return this.type;
51 } 51 }
52 } 52 }
53 53
54 public LLVector3 PrimScale 54 public LLVector3 PrimScale
55 { 55 {
56 get 56 get
57 { 57 {
58 return this.Scale; 58 return this.Scale;
59 } 59 }
60 } 60 }
61 61
62 public PrimitiveBaseShape() 62 public PrimitiveBaseShape()
63 { 63 {
64 64
65 } 65 }
66 66
67 //void returns need to change of course 67 //void returns need to change of course
68 public void GetMesh() 68 public void GetMesh()
69 { 69 {
70 70
71 } 71 }
72 72
73 public PrimitiveBaseShape Copy() 73 public PrimitiveBaseShape Copy()
74 { 74 {
75 return (PrimitiveBaseShape) this.MemberwiseClone(); 75 return (PrimitiveBaseShape) this.MemberwiseClone();
76 } 76 }
77 77
78 public static PrimitiveBaseShape DefaultBox() 78 public static PrimitiveBaseShape DefaultBox()
79 { 79 {
80 PrimitiveBaseShape primShape = new PrimitiveBaseShape(); 80 PrimitiveBaseShape primShape = new PrimitiveBaseShape();
81 81
82 primShape.type = ShapeType.Box; 82 primShape.type = ShapeType.Box;
83 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 83 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
84 primShape.PCode = 9; 84 primShape.PCode = 9;
85 primShape.PathBegin = 0; 85 primShape.PathBegin = 0;
86 primShape.PathEnd = 0; 86 primShape.PathEnd = 0;
87 primShape.PathScaleX = 0; 87 primShape.PathScaleX = 0;
88 primShape.PathScaleY = 0; 88 primShape.PathScaleY = 0;
89 primShape.PathShearX = 0; 89 primShape.PathShearX = 0;
90 primShape.PathShearY = 0; 90 primShape.PathShearY = 0;
91 primShape.PathSkew = 0; 91 primShape.PathSkew = 0;
92 primShape.ProfileBegin = 0; 92 primShape.ProfileBegin = 0;
93 primShape.ProfileEnd = 0; 93 primShape.ProfileEnd = 0;
94 primShape.PathCurve = 16; 94 primShape.PathCurve = 16;
95 primShape.ProfileCurve = 1; 95 primShape.ProfileCurve = 1;
96 primShape.ProfileHollow = 0; 96 primShape.ProfileHollow = 0;
97 primShape.PathRadiusOffset = 0; 97 primShape.PathRadiusOffset = 0;
98 primShape.PathRevolutions = 0; 98 primShape.PathRevolutions = 0;
99 primShape.PathTaperX = 0; 99 primShape.PathTaperX = 0;
100 primShape.PathTaperY = 0; 100 primShape.PathTaperY = 0;
101 primShape.PathTwist = 0; 101 primShape.PathTwist = 0;
102 primShape.PathTwistBegin = 0; 102 primShape.PathTwistBegin = 0;
103 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); 103 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
104 primShape.TextureEntry = ntex.ToBytes(); 104 primShape.TextureEntry = ntex.ToBytes();
105 105
106 return primShape; 106 return primShape;
107 } 107 }
108 } 108 }
109} 109}
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs
index 4a055ad..d90acc6 100644
--- a/OpenSim/Framework/General/Types/RegionHandle.cs
+++ b/OpenSim/Framework/General/Types/RegionHandle.cs
@@ -1,121 +1,121 @@
1using System; 1using System;
2using System.Net; 2using System.Net;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 /// <summary> 6 /// <summary>
7 /// A class for manipulating RegionHandle coordinates 7 /// A class for manipulating RegionHandle coordinates
8 /// </summary> 8 /// </summary>
9 class RegionHandle 9 class RegionHandle
10 { 10 {
11 private UInt64 handle; 11 private UInt64 handle;
12 12
13 /// <summary> 13 /// <summary>
14 /// Initialises a new grid-aware RegionHandle 14 /// Initialises a new grid-aware RegionHandle
15 /// </summary> 15 /// </summary>
16 /// <param name="ip">IP Address of the Grid Server for this region</param> 16 /// <param name="ip">IP Address of the Grid Server for this region</param>
17 /// <param name="x">Grid X Coordinate</param> 17 /// <param name="x">Grid X Coordinate</param>
18 /// <param name="y">Grid Y Coordinate</param> 18 /// <param name="y">Grid Y Coordinate</param>
19 public RegionHandle(string ip, short x, short y) 19 public RegionHandle(string ip, short x, short y)
20 { 20 {
21 IPAddress addr = IPAddress.Parse(ip); 21 IPAddress addr = IPAddress.Parse(ip);
22 22
23 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) 23 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
24 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); 24 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address");
25 25
26 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); 26 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0);
27 27
28 // Split the IP address in half 28 // Split the IP address in half
29 short a = (short)((baseHandle << 16) & 0xFFFF); 29 short a = (short)((baseHandle << 16) & 0xFFFF);
30 short b = (short)((baseHandle << 0) & 0xFFFF); 30 short b = (short)((baseHandle << 0) & 0xFFFF);
31 31
32 // Raise the bounds a little 32 // Raise the bounds a little
33 uint nx = (uint)x; 33 uint nx = (uint)x;
34 uint ny = (uint)y; 34 uint ny = (uint)y;
35 35
36 // Multiply grid coords to get region coords 36 // Multiply grid coords to get region coords
37 nx *= 256; 37 nx *= 256;
38 ny *= 256; 38 ny *= 256;
39 39
40 // Stuff the IP address in too 40 // Stuff the IP address in too
41 nx = (uint)a << 16; 41 nx = (uint)a << 16;
42 ny = (uint)b << 16; 42 ny = (uint)b << 16;
43 43
44 handle = ((UInt64)nx << 32) | (uint)ny; 44 handle = ((UInt64)nx << 32) | (uint)ny;
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
48 /// Initialises a new RegionHandle that is not inter-grid aware 48 /// Initialises a new RegionHandle that is not inter-grid aware
49 /// </summary> 49 /// </summary>
50 /// <param name="x">Grid X Coordinate</param> 50 /// <param name="x">Grid X Coordinate</param>
51 /// <param name="y">Grid Y Coordinate</param> 51 /// <param name="y">Grid Y Coordinate</param>
52 public RegionHandle(uint x, uint y) 52 public RegionHandle(uint x, uint y)
53 { 53 {
54 handle = ((x * 256) << 32) | (y * 256); 54 handle = ((x * 256) << 32) | (y * 256);
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// Initialises a new RegionHandle from an existing value 58 /// Initialises a new RegionHandle from an existing value
59 /// </summary> 59 /// </summary>
60 /// <param name="Region">A U64 RegionHandle</param> 60 /// <param name="Region">A U64 RegionHandle</param>
61 public RegionHandle(UInt64 Region) 61 public RegionHandle(UInt64 Region)
62 { 62 {
63 handle = Region; 63 handle = Region;
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. 67 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy.
68 /// </summary> 68 /// </summary>
69 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> 69 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks>
70 /// <returns>Region Handle including IP Address encoding</returns> 70 /// <returns>Region Handle including IP Address encoding</returns>
71 public UInt64 getTeleportHandle() 71 public UInt64 getTeleportHandle()
72 { 72 {
73 return handle; 73 return handle;
74 } 74 }
75 75
76 /// <summary> 76 /// <summary>
77 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. 77 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds.
78 /// </summary> 78 /// </summary>
79 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> 79 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns>
80 public UInt64 getNeighbourHandle() 80 public UInt64 getNeighbourHandle()
81 { 81 {
82 UInt64 mask = 0x0000FFFF0000FFFF; 82 UInt64 mask = 0x0000FFFF0000FFFF;
83 83
84 return handle | mask; 84 return handle | mask;
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle 88 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle
89 /// </summary> 89 /// </summary>
90 /// <returns>Grid Server IP Address</returns> 90 /// <returns>Grid Server IP Address</returns>
91 public IPAddress getGridIP() 91 public IPAddress getGridIP()
92 { 92 {
93 uint a = (uint)((handle >> 16) & 0xFFFF); 93 uint a = (uint)((handle >> 16) & 0xFFFF);
94 uint b = (uint)((handle >> 48) & 0xFFFF); 94 uint b = (uint)((handle >> 48) & 0xFFFF);
95 95
96 return new IPAddress((long)(a << 16) | (long)b); 96 return new IPAddress((long)(a << 16) | (long)b);
97 } 97 }
98 98
99 /// <summary> 99 /// <summary>
100 /// Returns the X Coordinate from a Grid-Encoded RegionHandle 100 /// Returns the X Coordinate from a Grid-Encoded RegionHandle
101 /// </summary> 101 /// </summary>
102 /// <returns>X Coordinate</returns> 102 /// <returns>X Coordinate</returns>
103 public uint getGridX() 103 public uint getGridX()
104 { 104 {
105 uint x = (uint)((handle >> 32) & 0xFFFF); 105 uint x = (uint)((handle >> 32) & 0xFFFF);
106 106
107 return x; 107 return x;
108 } 108 }
109 109
110 /// <summary> 110 /// <summary>
111 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle 111 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle
112 /// </summary> 112 /// </summary>
113 /// <returns>Y Coordinate</returns> 113 /// <returns>Y Coordinate</returns>
114 public uint getGridY() 114 public uint getGridY()
115 { 115 {
116 uint y = (uint)((handle >> 0) & 0xFFFF); 116 uint y = (uint)((handle >> 0) & 0xFFFF);
117 117
118 return y; 118 return y;
119 } 119 }
120 } 120 }
121} 121}
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index cfc0925..a216b52 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -1,342 +1,342 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Globalization; 29using System.Globalization;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36 36
37namespace OpenSim.Framework.Types 37namespace OpenSim.Framework.Types
38{ 38{
39 public class RegionInfo 39 public class RegionInfo
40 { 40 {
41 public LLUUID SimUUID = new LLUUID(); 41 public LLUUID SimUUID = new LLUUID();
42 public string RegionName = ""; 42 public string RegionName = "";
43 43
44 private IPEndPoint m_internalEndPoint; 44 private IPEndPoint m_internalEndPoint;
45 public IPEndPoint InternalEndPoint 45 public IPEndPoint InternalEndPoint
46 { 46 {
47 get 47 get
48 { 48 {
49 return m_internalEndPoint; 49 return m_internalEndPoint;
50 } 50 }
51 } 51 }
52 52
53 public IPEndPoint ExternalEndPoint 53 public IPEndPoint ExternalEndPoint
54 { 54 {
55 get 55 get
56 { 56 {
57 // Old one defaults to IPv6 57 // Old one defaults to IPv6
58 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); 58 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
59 59
60 // New method favors IPv4 60 // New method favors IPv4
61 IPAddress ia = null; 61 IPAddress ia = null;
62 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) 62 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
63 { 63 {
64 if (ia == null) 64 if (ia == null)
65 ia = Adr; 65 ia = Adr;
66 66
67 if (Adr.AddressFamily == AddressFamily.InterNetwork) 67 if (Adr.AddressFamily == AddressFamily.InterNetwork)
68 { 68 {
69 ia = Adr; 69 ia = Adr;
70 break; 70 break;
71 } 71 }
72 72
73 } 73 }
74 74
75 return new IPEndPoint(ia, m_internalEndPoint.Port); 75 return new IPEndPoint(ia, m_internalEndPoint.Port);
76 } 76 }
77 } 77 }
78 78
79 private string m_externalHostName; 79 private string m_externalHostName;
80 public string ExternalHostName 80 public string ExternalHostName
81 { 81 {
82 get 82 get
83 { 83 {
84 return m_externalHostName; 84 return m_externalHostName;
85 } 85 }
86 } 86 }
87 87
88 private uint? m_regionLocX; 88 private uint? m_regionLocX;
89 public uint RegionLocX 89 public uint RegionLocX
90 { 90 {
91 get 91 get
92 { 92 {
93 return m_regionLocX.Value; 93 return m_regionLocX.Value;
94 } 94 }
95 } 95 }
96 96
97 private uint? m_regionLocY; 97 private uint? m_regionLocY;
98 public uint RegionLocY 98 public uint RegionLocY
99 { 99 {
100 get 100 get
101 { 101 {
102 return m_regionLocY.Value; 102 return m_regionLocY.Value;
103 } 103 }
104 } 104 }
105 105
106 private ulong? m_regionHandle; 106 private ulong? m_regionHandle;
107 public ulong RegionHandle 107 public ulong RegionHandle
108 { 108 {
109 get 109 get
110 { 110 {
111 if (!m_regionHandle.HasValue) 111 if (!m_regionHandle.HasValue)
112 { 112 {
113 m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); 113 m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
114 } 114 }
115 115
116 return m_regionHandle.Value; 116 return m_regionHandle.Value;
117 } 117 }
118 } 118 }
119 119
120 // Only used for remote regions , ie ones not in the current instance 120 // Only used for remote regions , ie ones not in the current instance
121 private uint m_remotingPort; 121 private uint m_remotingPort;
122 public uint RemotingPort 122 public uint RemotingPort
123 { 123 {
124 get 124 get
125 { 125 {
126 return m_remotingPort; 126 return m_remotingPort;
127 } 127 }
128 set 128 set
129 { 129 {
130 m_remotingPort = value; 130 m_remotingPort = value;
131 } 131 }
132 } 132 }
133 public string RemotingAddress; 133 public string RemotingAddress;
134 134
135 public string DataStore = ""; 135 public string DataStore = "";
136 public bool isSandbox = false; 136 public bool isSandbox = false;
137 137
138 public LLUUID MasterAvatarAssignedUUID = new LLUUID(); 138 public LLUUID MasterAvatarAssignedUUID = new LLUUID();
139 public string MasterAvatarFirstName = ""; 139 public string MasterAvatarFirstName = "";
140 public string MasterAvatarLastName = ""; 140 public string MasterAvatarLastName = "";
141 public string MasterAvatarSandboxPassword = ""; 141 public string MasterAvatarSandboxPassword = "";
142 142
143 public EstateSettings estateSettings; 143 public EstateSettings estateSettings;
144 144
145 public RegionInfo() 145 public RegionInfo()
146 { 146 {
147 estateSettings = new EstateSettings(); 147 estateSettings = new EstateSettings();
148 } 148 }
149 149
150 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 150 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
151 : this() 151 : this()
152 { 152 {
153 m_regionLocX = regionLocX; 153 m_regionLocX = regionLocX;
154 m_regionLocY = regionLocY; 154 m_regionLocY = regionLocY;
155 155
156 m_internalEndPoint = internalEndPoint; 156 m_internalEndPoint = internalEndPoint;
157 m_externalHostName = externalUri; 157 m_externalHostName = externalUri;
158 } 158 }
159 159
160 public void InitConfig(bool sandboxMode, IGenericConfig configData) 160 public void InitConfig(bool sandboxMode, IGenericConfig configData)
161 { 161 {
162 this.isSandbox = sandboxMode; 162 this.isSandbox = sandboxMode;
163 try 163 try
164 { 164 {
165 string attri = ""; 165 string attri = "";
166 166
167 // Sim UUID 167 // Sim UUID
168 string simId = configData.GetAttribute("SimUUID"); 168 string simId = configData.GetAttribute("SimUUID");
169 if (String.IsNullOrEmpty( simId )) 169 if (String.IsNullOrEmpty( simId ))
170 { 170 {
171 this.SimUUID = LLUUID.Random(); 171 this.SimUUID = LLUUID.Random();
172 } 172 }
173 else 173 else
174 { 174 {
175 this.SimUUID = new LLUUID(simId); 175 this.SimUUID = new LLUUID(simId);
176 } 176 }
177 configData.SetAttribute("SimUUID", this.SimUUID.ToString()); 177 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
178 178
179 this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name"); 179 this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name");
180 180
181 //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X"); 181 //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X");
182 182
183 attri = ""; 183 attri = "";
184 attri = configData.GetAttribute("SimLocationX"); 184 attri = configData.GetAttribute("SimLocationX");
185 if (attri == "") 185 if (attri == "")
186 { 186 {
187 string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); 187 string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000");
188 configData.SetAttribute("SimLocationX", location); 188 configData.SetAttribute("SimLocationX", location);
189 m_regionLocX = (uint)Convert.ToUInt32(location); 189 m_regionLocX = (uint)Convert.ToUInt32(location);
190 } 190 }
191 else 191 else
192 { 192 {
193 m_regionLocX = (uint)Convert.ToUInt32(attri); 193 m_regionLocX = (uint)Convert.ToUInt32(attri);
194 } 194 }
195 // Sim/Grid location Y 195 // Sim/Grid location Y
196 attri = ""; 196 attri = "";
197 attri = configData.GetAttribute("SimLocationY"); 197 attri = configData.GetAttribute("SimLocationY");
198 if (attri == "") 198 if (attri == "")
199 { 199 {
200 string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); 200 string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000");
201 configData.SetAttribute("SimLocationY", location); 201 configData.SetAttribute("SimLocationY", location);
202 m_regionLocY = (uint)Convert.ToUInt32(location); 202 m_regionLocY = (uint)Convert.ToUInt32(location);
203 } 203 }
204 else 204 else
205 { 205 {
206 m_regionLocY = (uint)Convert.ToUInt32(attri); 206 m_regionLocY = (uint)Convert.ToUInt32(attri);
207 } 207 }
208 208
209 m_regionHandle = null; 209 m_regionHandle = null;
210 210
211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage"); 211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage");
212 212
213 IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections"); 213 IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections");
214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); 214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
215 m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); 215 m_internalEndPoint = new IPEndPoint(internalAddress, internalPort);
216 216
217 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name"); 217 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name");
218 218
219 estateSettings.terrainFile = 219 estateSettings.terrainFile =
220 GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File"); 220 GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File");
221 221
222 attri = ""; 222 attri = "";
223 attri = configData.GetAttribute("TerrainMultiplier"); 223 attri = configData.GetAttribute("TerrainMultiplier");
224 if (attri == "") 224 if (attri == "")
225 { 225 {
226 string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); 226 string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0");
227 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); 227 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture);
228 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); 228 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString());
229 } 229 }
230 else 230 else
231 { 231 {
232 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri); 232 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri);
233 } 233 }
234 234
235 attri = ""; 235 attri = "";
236 attri = configData.GetAttribute("MasterAvatarFirstName"); 236 attri = configData.GetAttribute("MasterAvatarFirstName");
237 if (attri == "") 237 if (attri == "")
238 { 238 {
239 this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); 239 this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test");
240 240
241 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); 241 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName);
242 } 242 }
243 else 243 else
244 { 244 {
245 this.MasterAvatarFirstName = attri; 245 this.MasterAvatarFirstName = attri;
246 } 246 }
247 247
248 attri = ""; 248 attri = "";
249 attri = configData.GetAttribute("MasterAvatarLastName"); 249 attri = configData.GetAttribute("MasterAvatarLastName");
250 if (attri == "") 250 if (attri == "")
251 { 251 {
252 this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); 252 this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User");
253 253
254 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); 254 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName);
255 } 255 }
256 else 256 else
257 { 257 {
258 this.MasterAvatarLastName = attri; 258 this.MasterAvatarLastName = attri;
259 } 259 }
260 260
261 if (isSandbox) //Sandbox Mode Specific Settings 261 if (isSandbox) //Sandbox Mode Specific Settings
262 { 262 {
263 attri = ""; 263 attri = "";
264 attri = configData.GetAttribute("MasterAvatarSandboxPassword"); 264 attri = configData.GetAttribute("MasterAvatarSandboxPassword");
265 if (attri == "") 265 if (attri == "")
266 { 266 {
267 this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); 267 this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test");
268 268
269 //Should I store this? 269 //Should I store this?
270 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); 270 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword);
271 } 271 }
272 else 272 else
273 { 273 {
274 this.MasterAvatarSandboxPassword = attri; 274 this.MasterAvatarSandboxPassword = attri;
275 } 275 }
276 } 276 }
277 277
278 configData.Commit(); 278 configData.Commit();
279 } 279 }
280 catch (Exception e) 280 catch (Exception e)
281 { 281 {
282 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 282 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
283 MainLog.Instance.Warn(e.ToString()); 283 MainLog.Instance.Warn(e.ToString());
284 } 284 }
285 285
286 MainLog.Instance.Verbose("Sim settings loaded:"); 286 MainLog.Instance.Verbose("Sim settings loaded:");
287 MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); 287 MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated());
288 MainLog.Instance.Verbose("Name: " + this.RegionName); 288 MainLog.Instance.Verbose("Name: " + this.RegionName);
289 MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); 289 MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
290 MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); 290 MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString());
291 MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); 291 MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() );
292 MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); 292 MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString());
293 293
294 } 294 }
295 295
296 private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4) 296 private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4)
297 { 297 {
298 throw new Exception("The method or operation is not implemented."); 298 throw new Exception("The method or operation is not implemented.");
299 } 299 }
300 300
301 private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 301 private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
302 { 302 {
303 string s = configData.GetAttribute(attrName); 303 string s = configData.GetAttribute(attrName);
304 304
305 if (String.IsNullOrEmpty( s )) 305 if (String.IsNullOrEmpty( s ))
306 { 306 {
307 s = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 307 s = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
308 configData.SetAttribute(attrName, s ); 308 configData.SetAttribute(attrName, s );
309 } 309 }
310 return s; 310 return s;
311 } 311 }
312 312
313 private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 313 private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
314 { 314 {
315 string addressStr = configData.GetAttribute(attrName); 315 string addressStr = configData.GetAttribute(attrName);
316 316
317 IPAddress address; 317 IPAddress address;
318 318
319 if (!IPAddress.TryParse(addressStr, out address)) 319 if (!IPAddress.TryParse(addressStr, out address))
320 { 320 {
321 address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue); 321 address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue);
322 configData.SetAttribute(attrName, address.ToString()); 322 configData.SetAttribute(attrName, address.ToString());
323 } 323 }
324 return address; 324 return address;
325 } 325 }
326 326
327 private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 327 private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
328 { 328 {
329 string portStr = configData.GetAttribute(attrName); 329 string portStr = configData.GetAttribute(attrName);
330 330
331 int port; 331 int port;
332 332
333 if (!int.TryParse(portStr, out port)) 333 if (!int.TryParse(portStr, out port))
334 { 334 {
335 port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue); 335 port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue);
336 configData.SetAttribute(attrName, port.ToString()); 336 configData.SetAttribute(attrName, port.ToString());
337 } 337 }
338 338
339 return port; 339 return port;
340 } 340 }
341 } 341 }
342} 342}
diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs
index 9cde18e..9e9654d 100644
--- a/OpenSim/Framework/General/Types/UUID.cs
+++ b/OpenSim/Framework/General/Types/UUID.cs
@@ -1,127 +1,127 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 class UUID 6 class UUID
7 { 7 {
8 public LLUUID llUUID; 8 public LLUUID llUUID;
9 9
10 public UUID(string uuid) 10 public UUID(string uuid)
11 { 11 {
12 llUUID = new LLUUID(uuid); 12 llUUID = new LLUUID(uuid);
13 } 13 }
14 14
15 public UUID(byte[] uuid) 15 public UUID(byte[] uuid)
16 { 16 {
17 llUUID = new LLUUID(uuid, 0); 17 llUUID = new LLUUID(uuid, 0);
18 } 18 }
19 19
20 public UUID(byte[] uuid, int offset) 20 public UUID(byte[] uuid, int offset)
21 { 21 {
22 llUUID = new LLUUID(uuid, offset); 22 llUUID = new LLUUID(uuid, offset);
23 } 23 }
24 24
25 public UUID() 25 public UUID()
26 { 26 {
27 llUUID = LLUUID.Zero; 27 llUUID = LLUUID.Zero;
28 } 28 }
29 29
30 public UUID(ulong uuid) 30 public UUID(ulong uuid)
31 { 31 {
32 llUUID = new LLUUID(uuid); 32 llUUID = new LLUUID(uuid);
33 } 33 }
34 34
35 public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) 35 public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth)
36 { 36 {
37 byte[] uuid = new byte[16]; 37 byte[] uuid = new byte[16];
38 38
39 byte[] n = BitConverter.GetBytes(first); 39 byte[] n = BitConverter.GetBytes(first);
40 n.CopyTo(uuid, 0); 40 n.CopyTo(uuid, 0);
41 n = BitConverter.GetBytes(second); 41 n = BitConverter.GetBytes(second);
42 n.CopyTo(uuid, 4); 42 n.CopyTo(uuid, 4);
43 n = BitConverter.GetBytes(third); 43 n = BitConverter.GetBytes(third);
44 n.CopyTo(uuid, 8); 44 n.CopyTo(uuid, 8);
45 n = BitConverter.GetBytes(fourth); 45 n = BitConverter.GetBytes(fourth);
46 n.CopyTo(uuid, 12); 46 n.CopyTo(uuid, 12);
47 47
48 llUUID = new LLUUID(uuid,0); 48 llUUID = new LLUUID(uuid,0);
49 } 49 }
50 50
51 public override string ToString() 51 public override string ToString()
52 { 52 {
53 return llUUID.ToString(); 53 return llUUID.ToString();
54 } 54 }
55 55
56 public string ToStringHyphenated() 56 public string ToStringHyphenated()
57 { 57 {
58 return llUUID.ToStringHyphenated(); 58 return llUUID.ToStringHyphenated();
59 } 59 }
60 60
61 public byte[] GetBytes() 61 public byte[] GetBytes()
62 { 62 {
63 return llUUID.GetBytes(); 63 return llUUID.GetBytes();
64 } 64 }
65 65
66 public UInt32[] GetInts() 66 public UInt32[] GetInts()
67 { 67 {
68 UInt32[] ints = new UInt32[4]; 68 UInt32[] ints = new UInt32[4];
69 ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); 69 ints[0] = BitConverter.ToUInt32(llUUID.Data, 0);
70 ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); 70 ints[1] = BitConverter.ToUInt32(llUUID.Data, 4);
71 ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); 71 ints[2] = BitConverter.ToUInt32(llUUID.Data, 8);
72 ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); 72 ints[3] = BitConverter.ToUInt32(llUUID.Data, 12);
73 73
74 return ints; 74 return ints;
75 } 75 }
76 76
77 public LLUUID GetLLUUID() 77 public LLUUID GetLLUUID()
78 { 78 {
79 return llUUID; 79 return llUUID;
80 } 80 }
81 81
82 public uint CRC() 82 public uint CRC()
83 { 83 {
84 return llUUID.CRC(); 84 return llUUID.CRC();
85 } 85 }
86 86
87 public override int GetHashCode() 87 public override int GetHashCode()
88 { 88 {
89 return llUUID.GetHashCode(); 89 return llUUID.GetHashCode();
90 } 90 }
91 91
92 public void Combine(UUID other) 92 public void Combine(UUID other)
93 { 93 {
94 llUUID.Combine(other.GetLLUUID()); 94 llUUID.Combine(other.GetLLUUID());
95 } 95 }
96 96
97 public void Combine(LLUUID other) 97 public void Combine(LLUUID other)
98 { 98 {
99 llUUID.Combine(other); 99 llUUID.Combine(other);
100 } 100 }
101 101
102 public override bool Equals(Object other) 102 public override bool Equals(Object other)
103 { 103 {
104 return llUUID.Equals(other); 104 return llUUID.Equals(other);
105 } 105 }
106 106
107 public static bool operator ==(UUID a, UUID b) 107 public static bool operator ==(UUID a, UUID b)
108 { 108 {
109 return a.llUUID.Equals(b.GetLLUUID()); 109 return a.llUUID.Equals(b.GetLLUUID());
110 } 110 }
111 111
112 public static bool operator !=(UUID a, UUID b) 112 public static bool operator !=(UUID a, UUID b)
113 { 113 {
114 return !a.llUUID.Equals(b.GetLLUUID()); 114 return !a.llUUID.Equals(b.GetLLUUID());
115 } 115 }
116 116
117 public static bool operator ==(UUID a, LLUUID b) 117 public static bool operator ==(UUID a, LLUUID b)
118 { 118 {
119 return a.Equals(b); 119 return a.Equals(b);
120 } 120 }
121 121
122 public static bool operator !=(UUID a, LLUUID b) 122 public static bool operator !=(UUID a, LLUUID b)
123 { 123 {
124 return !a.Equals(b); 124 return !a.Equals(b);
125 } 125 }
126 } 126 }
127} 127}
diff --git a/OpenSim/Framework/General/UserProfile.cs b/OpenSim/Framework/General/UserProfile.cs
index 243208a..ec5a485 100644
--- a/OpenSim/Framework/General/UserProfile.cs
+++ b/OpenSim/Framework/General/UserProfile.cs
@@ -1,87 +1,87 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework.Inventory; 31using OpenSim.Framework.Inventory;
32 32
33namespace OpenSim.Framework.User 33namespace OpenSim.Framework.User
34{ 34{
35 public class UserProfile 35 public class UserProfile
36 { 36 {
37 37
38 public string firstname; 38 public string firstname;
39 public string lastname; 39 public string lastname;
40 public ulong homeregionhandle; 40 public ulong homeregionhandle;
41 public LLVector3 homepos; 41 public LLVector3 homepos;
42 public LLVector3 homelookat; 42 public LLVector3 homelookat;
43 43
44 public bool IsGridGod = false; 44 public bool IsGridGod = false;
45 public bool IsLocal = true; // will be used in future for visitors from foreign grids 45 public bool IsLocal = true; // will be used in future for visitors from foreign grids
46 public string AssetURL; 46 public string AssetURL;
47 public string MD5passwd; 47 public string MD5passwd;
48 48
49 public LLUUID CurrentSessionID; 49 public LLUUID CurrentSessionID;
50 public LLUUID CurrentSecureSessionID; 50 public LLUUID CurrentSecureSessionID;
51 public LLUUID UUID; 51 public LLUUID UUID;
52 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes 52 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes
53 53
54 public AgentInventory Inventory; 54 public AgentInventory Inventory;
55 55
56 public UserProfile() 56 public UserProfile()
57 { 57 {
58 Circuits = new Dictionary<LLUUID, uint>(); 58 Circuits = new Dictionary<LLUUID, uint>();
59 Inventory = new AgentInventory(); 59 Inventory = new AgentInventory();
60 homeregionhandle = Helpers.UIntsToLong((1000 * 256), (1000 * 256)); 60 homeregionhandle = Helpers.UIntsToLong((1000 * 256), (1000 * 256));
61 homepos = new LLVector3(); 61 homepos = new LLVector3();
62 homelookat = new LLVector3(); 62 homelookat = new LLVector3();
63 } 63 }
64 64
65 public void InitSessionData() 65 public void InitSessionData()
66 { 66 {
67 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); 67 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
68 68
69 byte[] randDataS = new byte[16]; 69 byte[] randDataS = new byte[16];
70 byte[] randDataSS = new byte[16]; 70 byte[] randDataSS = new byte[16];
71 71
72 rand.GetBytes(randDataS); 72 rand.GetBytes(randDataS);
73 rand.GetBytes(randDataSS); 73 rand.GetBytes(randDataSS);
74 74
75 CurrentSecureSessionID = new LLUUID(randDataSS,0); 75 CurrentSecureSessionID = new LLUUID(randDataSS,0);
76 CurrentSessionID = new LLUUID(randDataS,0); 76 CurrentSessionID = new LLUUID(randDataS,0);
77 77
78 } 78 }
79 79
80 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID) 80 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
81 { 81 {
82 if (this.Circuits.ContainsKey(regionUUID) == false) 82 if (this.Circuits.ContainsKey(regionUUID) == false)
83 this.Circuits.Add(regionUUID, circuitCode); 83 this.Circuits.Add(regionUUID, circuitCode);
84 } 84 }
85 85
86 } 86 }
87} 87}
diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
index 13e3af2..3333ced 100644
--- a/OpenSim/Framework/General/Util.cs
+++ b/OpenSim/Framework/General/Util.cs
@@ -1,184 +1,184 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using libsecondlife;
32 32
33namespace OpenSim.Framework.Utilities 33namespace OpenSim.Framework.Utilities
34{ 34{
35 public class Util 35 public class Util
36 { 36 {
37 private static Random randomClass = new Random(); 37 private static Random randomClass = new Random();
38 private static uint nextXferID = 5000; 38 private static uint nextXferID = 5000;
39 private static object XferLock = new object(); 39 private static object XferLock = new object();
40 40
41 public static ulong UIntsToLong(uint X, uint Y) 41 public static ulong UIntsToLong(uint X, uint Y)
42 { 42 {
43 return Helpers.UIntsToLong(X, Y); 43 return Helpers.UIntsToLong(X, Y);
44 } 44 }
45 45
46 public static Random RandomClass 46 public static Random RandomClass
47 { 47 {
48 get 48 get
49 { 49 {
50 return randomClass; 50 return randomClass;
51 } 51 }
52 } 52 }
53 53
54 public static uint GetNextXferID() 54 public static uint GetNextXferID()
55 { 55 {
56 uint id = 0; 56 uint id = 0;
57 lock(XferLock) 57 lock(XferLock)
58 { 58 {
59 id = nextXferID; 59 id = nextXferID;
60 nextXferID++; 60 nextXferID++;
61 } 61 }
62 return id; 62 return id;
63 } 63 }
64 64
65 public static int UnixTimeSinceEpoch() 65 public static int UnixTimeSinceEpoch()
66 { 66 {
67 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); 67 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
68 int timestamp = (int)t.TotalSeconds; 68 int timestamp = (int)t.TotalSeconds;
69 return timestamp; 69 return timestamp;
70 } 70 }
71 71
72 public static string Md5Hash(string pass) 72 public static string Md5Hash(string pass)
73 { 73 {
74 MD5 md5 = MD5CryptoServiceProvider.Create(); 74 MD5 md5 = MD5CryptoServiceProvider.Create();
75 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass)); 75 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass));
76 StringBuilder sb = new StringBuilder(); 76 StringBuilder sb = new StringBuilder();
77 for (int i = 0; i < dataMd5.Length; i++) 77 for (int i = 0; i < dataMd5.Length; i++)
78 sb.AppendFormat("{0:x2}", dataMd5[i]); 78 sb.AppendFormat("{0:x2}", dataMd5[i]);
79 return sb.ToString(); 79 return sb.ToString();
80 } 80 }
81 81
82 public static string GetRandomCapsPath() 82 public static string GetRandomCapsPath()
83 { 83 {
84 LLUUID caps = LLUUID.Random(); 84 LLUUID caps = LLUUID.Random();
85 string capsPath = caps.ToStringHyphenated(); 85 string capsPath = caps.ToStringHyphenated();
86 capsPath = capsPath.Remove(capsPath.Length - 4, 4); 86 capsPath = capsPath.Remove(capsPath.Length - 4, 4);
87 return capsPath; 87 return capsPath;
88 } 88 }
89 89
90 //public static int fast_distance2d(int x, int y) 90 //public static int fast_distance2d(int x, int y)
91 //{ 91 //{
92 // x = System.Math.Abs(x); 92 // x = System.Math.Abs(x);
93 // y = System.Math.Abs(y); 93 // y = System.Math.Abs(y);
94 94
95 // int min = System.Math.Min(x, y); 95 // int min = System.Math.Min(x, y);
96 96
97 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); 97 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
98 //} 98 //}
99 99
100 public static string FieldToString(byte[] bytes) 100 public static string FieldToString(byte[] bytes)
101 { 101 {
102 return FieldToString(bytes, String.Empty); 102 return FieldToString(bytes, String.Empty);
103 } 103 }
104 104
105 /// <summary> 105 /// <summary>
106 /// Convert a variable length field (byte array) to a string, with a 106 /// Convert a variable length field (byte array) to a string, with a
107 /// field name prepended to each line of the output 107 /// field name prepended to each line of the output
108 /// </summary> 108 /// </summary>
109 /// <remarks>If the byte array has unprintable characters in it, a 109 /// <remarks>If the byte array has unprintable characters in it, a
110 /// hex dump will be put in the string instead</remarks> 110 /// hex dump will be put in the string instead</remarks>
111 /// <param name="bytes">The byte array to convert to a string</param> 111 /// <param name="bytes">The byte array to convert to a string</param>
112 /// <param name="fieldName">A field name to prepend to each line of output</param> 112 /// <param name="fieldName">A field name to prepend to each line of output</param>
113 /// <returns>An ASCII string or a string containing a hex dump, minus 113 /// <returns>An ASCII string or a string containing a hex dump, minus
114 /// the null terminator</returns> 114 /// the null terminator</returns>
115 public static string FieldToString(byte[] bytes, string fieldName) 115 public static string FieldToString(byte[] bytes, string fieldName)
116 { 116 {
117 // Check for a common case 117 // Check for a common case
118 if (bytes.Length == 0) return String.Empty; 118 if (bytes.Length == 0) return String.Empty;
119 119
120 StringBuilder output = new StringBuilder(); 120 StringBuilder output = new StringBuilder();
121 bool printable = true; 121 bool printable = true;
122 122
123 for (int i = 0; i < bytes.Length; ++i) 123 for (int i = 0; i < bytes.Length; ++i)
124 { 124 {
125 // Check if there are any unprintable characters in the array 125 // Check if there are any unprintable characters in the array
126 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09 126 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
127 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00) 127 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
128 { 128 {
129 printable = false; 129 printable = false;
130 break; 130 break;
131 } 131 }
132 } 132 }
133 133
134 if (printable) 134 if (printable)
135 { 135 {
136 if (fieldName.Length > 0) 136 if (fieldName.Length > 0)
137 { 137 {
138 output.Append(fieldName); 138 output.Append(fieldName);
139 output.Append(": "); 139 output.Append(": ");
140 } 140 }
141 141
142 if (bytes[bytes.Length - 1] == 0x00) 142 if (bytes[bytes.Length - 1] == 0x00)
143 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1)); 143 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
144 else 144 else
145 output.Append(UTF8Encoding.UTF8.GetString(bytes)); 145 output.Append(UTF8Encoding.UTF8.GetString(bytes));
146 } 146 }
147 else 147 else
148 { 148 {
149 for (int i = 0; i < bytes.Length; i += 16) 149 for (int i = 0; i < bytes.Length; i += 16)
150 { 150 {
151 if (i != 0) 151 if (i != 0)
152 output.Append(Environment.NewLine); 152 output.Append(Environment.NewLine);
153 if (fieldName.Length > 0) 153 if (fieldName.Length > 0)
154 { 154 {
155 output.Append(fieldName); 155 output.Append(fieldName);
156 output.Append(": "); 156 output.Append(": ");
157 } 157 }
158 158
159 for (int j = 0; j < 16; j++) 159 for (int j = 0; j < 16; j++)
160 { 160 {
161 if ((i + j) < bytes.Length) 161 if ((i + j) < bytes.Length)
162 output.Append(String.Format("{0:X2} ", bytes[i + j])); 162 output.Append(String.Format("{0:X2} ", bytes[i + j]));
163 else 163 else
164 output.Append(" "); 164 output.Append(" ");
165 } 165 }
166 166
167 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++) 167 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
168 { 168 {
169 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E) 169 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
170 output.Append((char)bytes[i + j]); 170 output.Append((char)bytes[i + j]);
171 else 171 else
172 output.Append("."); 172 output.Append(".");
173 } 173 }
174 } 174 }
175 } 175 }
176 176
177 return output.ToString(); 177 return output.ToString();
178 } 178 }
179 public Util() 179 public Util()
180 { 180 {
181 181
182 } 182 }
183 } 183 }
184} 184}
diff --git a/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs
index fcffd67..28779ee 100644
--- a/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.GenericConfig")] 6[assembly: AssemblyTitle("OpenSim.GenericConfig")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.GenericConfig")] 10[assembly: AssemblyProduct("OpenSim.GenericConfig")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("285a3047-f165-46c8-8767-b51428738a09")] 21[assembly: Guid("285a3047-f165-46c8-8767-b51428738a09")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs
index 7fa085d..2ed8d28 100644
--- a/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs
+++ b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs
@@ -1,122 +1,122 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Xml; 30using System.Xml;
31using OpenSim.Framework.Interfaces; 31using OpenSim.Framework.Interfaces;
32 32
33namespace OpenSim.GenericConfig 33namespace OpenSim.GenericConfig
34{ 34{
35 public class XmlConfig : IGenericConfig 35 public class XmlConfig : IGenericConfig
36 { 36 {
37 private XmlDocument doc; 37 private XmlDocument doc;
38 private XmlNode rootNode; 38 private XmlNode rootNode;
39 private XmlNode configNode; 39 private XmlNode configNode;
40 private string fileName; 40 private string fileName;
41 private bool createdFile = false; 41 private bool createdFile = false;
42 42
43 public XmlConfig(string filename) 43 public XmlConfig(string filename)
44 { 44 {
45 fileName = filename; 45 fileName = filename;
46 } 46 }
47 47
48 public void LoadData() 48 public void LoadData()
49 { 49 {
50 doc = new XmlDocument(); 50 doc = new XmlDocument();
51 51
52 if (File.Exists(fileName)) 52 if (File.Exists(fileName))
53 { 53 {
54 XmlTextReader reader = new XmlTextReader(fileName); 54 XmlTextReader reader = new XmlTextReader(fileName);
55 reader.WhitespaceHandling = WhitespaceHandling.None; 55 reader.WhitespaceHandling = WhitespaceHandling.None;
56 doc.Load(reader); 56 doc.Load(reader);
57 reader.Close(); 57 reader.Close();
58 } 58 }
59 else 59 else
60 { 60 {
61 createdFile = true; 61 createdFile = true;
62 rootNode = doc.CreateNode(XmlNodeType.Element, "Root", ""); 62 rootNode = doc.CreateNode(XmlNodeType.Element, "Root", "");
63 doc.AppendChild(rootNode); 63 doc.AppendChild(rootNode);
64 configNode = doc.CreateNode(XmlNodeType.Element, "Config", ""); 64 configNode = doc.CreateNode(XmlNodeType.Element, "Config", "");
65 rootNode.AppendChild(configNode); 65 rootNode.AppendChild(configNode);
66 } 66 }
67 67
68 68
69 rootNode = doc.FirstChild; 69 rootNode = doc.FirstChild;
70 if (rootNode.Name != "Root") 70 if (rootNode.Name != "Root")
71 throw new Exception("Error: Invalid .xml File. Missing <Root>"); 71 throw new Exception("Error: Invalid .xml File. Missing <Root>");
72 72
73 configNode = rootNode.FirstChild; 73 configNode = rootNode.FirstChild;
74 if (configNode.Name != "Config") 74 if (configNode.Name != "Config")
75 throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>"); 75 throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
76 76
77 if (createdFile) 77 if (createdFile)
78 { 78 {
79 this.Commit(); 79 this.Commit();
80 } 80 }
81 } 81 }
82 82
83 public string GetAttribute(string attributeName) 83 public string GetAttribute(string attributeName)
84 { 84 {
85 string result = ""; 85 string result = "";
86 if (configNode.Attributes[attributeName] != null) 86 if (configNode.Attributes[attributeName] != null)
87 { 87 {
88 result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value; 88 result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value;
89 } 89 }
90 return result; 90 return result;
91 } 91 }
92 92
93 public bool SetAttribute(string attributeName, string attributeValue) 93 public bool SetAttribute(string attributeName, string attributeValue)
94 { 94 {
95 if (configNode.Attributes[attributeName] != null) 95 if (configNode.Attributes[attributeName] != null)
96 { 96 {
97 ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue; 97 ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
98 } 98 }
99 else 99 else
100 { 100 {
101 XmlAttribute attri; 101 XmlAttribute attri;
102 attri = doc.CreateAttribute(attributeName); 102 attri = doc.CreateAttribute(attributeName);
103 attri.Value = attributeValue; 103 attri.Value = attributeValue;
104 configNode.Attributes.Append(attri); 104 configNode.Attributes.Append(attri);
105 } 105 }
106 return true; 106 return true;
107 } 107 }
108 108
109 public void Commit() 109 public void Commit()
110 { 110 {
111 doc.Save(fileName); 111 doc.Save(fileName);
112 } 112 }
113 113
114 public void Close() 114 public void Close()
115 { 115 {
116 configNode = null; 116 configNode = null;
117 rootNode = null; 117 rootNode = null;
118 doc = null; 118 doc = null;
119 } 119 }
120 120
121 } 121 }
122} 122}
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index f790477..4b3b3de 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -1,224 +1,224 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.IO; 31using System.IO;
32using System.Net; 32using System.Net;
33using System.Text; 33using System.Text;
34using System.Text.RegularExpressions; 34using System.Text.RegularExpressions;
35using System.Threading; 35using System.Threading;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
38 38
39namespace OpenSim.Framework.Servers 39namespace OpenSim.Framework.Servers
40{ 40{
41 public class BaseHttpServer 41 public class BaseHttpServer
42 { 42 {
43 protected Thread m_workerThread; 43 protected Thread m_workerThread;
44 protected HttpListener m_httpListener; 44 protected HttpListener m_httpListener;
45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
46 protected Dictionary<string, IStreamHandler> m_streamHandlers = new Dictionary<string, IStreamHandler>(); 46 protected Dictionary<string, IStreamHandler> m_streamHandlers = new Dictionary<string, IStreamHandler>();
47 protected int m_port; 47 protected int m_port;
48 protected bool m_firstcaps = true; 48 protected bool m_firstcaps = true;
49 49
50 public BaseHttpServer(int port) 50 public BaseHttpServer(int port)
51 { 51 {
52 m_port = port; 52 m_port = port;
53 } 53 }
54 54
55 public void AddStreamHandler( IStreamHandler handler) 55 public void AddStreamHandler( IStreamHandler handler)
56 { 56 {
57 string httpMethod = handler.HttpMethod; 57 string httpMethod = handler.HttpMethod;
58 string path = handler.Path; 58 string path = handler.Path;
59 59
60 string handlerKey = GetHandlerKey(httpMethod, path); 60 string handlerKey = GetHandlerKey(httpMethod, path);
61 m_streamHandlers.Add(handlerKey, handler); 61 m_streamHandlers.Add(handlerKey, handler);
62 } 62 }
63 63
64 private static string GetHandlerKey(string httpMethod, string path) 64 private static string GetHandlerKey(string httpMethod, string path)
65 { 65 {
66 return httpMethod + ":" + path; 66 return httpMethod + ":" + path;
67 } 67 }
68 68
69 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) 69 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
70 { 70 {
71 if (!this.m_rpcHandlers.ContainsKey(method)) 71 if (!this.m_rpcHandlers.ContainsKey(method))
72 { 72 {
73 this.m_rpcHandlers.Add(method, handler); 73 this.m_rpcHandlers.Add(method, handler);
74 return true; 74 return true;
75 } 75 }
76 76
77 //must already have a handler for that path so return false 77 //must already have a handler for that path so return false
78 return false; 78 return false;
79 } 79 }
80 80
81 81
82 public virtual void HandleRequest(Object stateinfo) 82 public virtual void HandleRequest(Object stateinfo)
83 { 83 {
84 HttpListenerContext context = (HttpListenerContext)stateinfo; 84 HttpListenerContext context = (HttpListenerContext)stateinfo;
85 85
86 HttpListenerRequest request = context.Request; 86 HttpListenerRequest request = context.Request;
87 HttpListenerResponse response = context.Response; 87 HttpListenerResponse response = context.Response;
88 88
89 response.KeepAlive = false; 89 response.KeepAlive = false;
90 response.SendChunked = false; 90 response.SendChunked = false;
91 91
92 string path = request.RawUrl; 92 string path = request.RawUrl;
93 string handlerKey = GetHandlerKey( request.HttpMethod, path ); 93 string handlerKey = GetHandlerKey( request.HttpMethod, path );
94 94
95 IStreamHandler streamHandler; 95 IStreamHandler streamHandler;
96 96
97 if (TryGetStreamHandler( handlerKey, out streamHandler)) 97 if (TryGetStreamHandler( handlerKey, out streamHandler))
98 { 98 {
99 byte[] buffer = streamHandler.Handle(path, request.InputStream); 99 byte[] buffer = streamHandler.Handle(path, request.InputStream);
100 request.InputStream.Close(); 100 request.InputStream.Close();
101 101
102 response.ContentType = streamHandler.ContentType; 102 response.ContentType = streamHandler.ContentType;
103 response.ContentLength64 = buffer.LongLength; 103 response.ContentLength64 = buffer.LongLength;
104 response.OutputStream.Write(buffer, 0, buffer.Length); 104 response.OutputStream.Write(buffer, 0, buffer.Length);
105 response.OutputStream.Close(); 105 response.OutputStream.Close();
106 } 106 }
107 else 107 else
108 { 108 {
109 HandleXmlRpcRequests(request, response); 109 HandleXmlRpcRequests(request, response);
110 } 110 }
111 } 111 }
112 112
113 private bool TryGetStreamHandler(string handlerKey, out IStreamHandler streamHandler) 113 private bool TryGetStreamHandler(string handlerKey, out IStreamHandler streamHandler)
114 { 114 {
115 string bestMatch = null; 115 string bestMatch = null;
116 116
117 foreach (string pattern in m_streamHandlers.Keys) 117 foreach (string pattern in m_streamHandlers.Keys)
118 { 118 {
119 if (handlerKey.StartsWith(pattern)) 119 if (handlerKey.StartsWith(pattern))
120 { 120 {
121 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) 121 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length)
122 { 122 {
123 bestMatch = pattern; 123 bestMatch = pattern;
124 } 124 }
125 } 125 }
126 } 126 }
127 127
128 if (String.IsNullOrEmpty(bestMatch)) 128 if (String.IsNullOrEmpty(bestMatch))
129 { 129 {
130 streamHandler = null; 130 streamHandler = null;
131 return false; 131 return false;
132 } 132 }
133 else 133 else
134 { 134 {
135 streamHandler = m_streamHandlers[bestMatch]; 135 streamHandler = m_streamHandlers[bestMatch];
136 return true; 136 return true;
137 } 137 }
138 } 138 }
139 139
140 private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response) 140 private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response)
141 { 141 {
142 Stream requestStream = request.InputStream; 142 Stream requestStream = request.InputStream;
143 143
144 Encoding encoding = Encoding.UTF8; 144 Encoding encoding = Encoding.UTF8;
145 StreamReader reader = new StreamReader(requestStream, encoding); 145 StreamReader reader = new StreamReader(requestStream, encoding);
146 146
147 string requestBody = reader.ReadToEnd(); 147 string requestBody = reader.ReadToEnd();
148 reader.Close(); 148 reader.Close();
149 requestStream.Close(); 149 requestStream.Close();
150 150
151 XmlRpcRequest xmlRprcRequest = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody); 151 XmlRpcRequest xmlRprcRequest = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
152 152
153 string methodName = xmlRprcRequest.MethodName; 153 string methodName = xmlRprcRequest.MethodName;
154 154
155 XmlRpcResponse xmlRpcResponse; 155 XmlRpcResponse xmlRpcResponse;
156 156
157 XmlRpcMethod method; 157 XmlRpcMethod method;
158 if (this.m_rpcHandlers.TryGetValue(methodName, out method)) 158 if (this.m_rpcHandlers.TryGetValue(methodName, out method))
159 { 159 {
160 xmlRpcResponse = method(xmlRprcRequest); 160 xmlRpcResponse = method(xmlRprcRequest);
161 } 161 }
162 else 162 else
163 { 163 {
164 xmlRpcResponse = new XmlRpcResponse(); 164 xmlRpcResponse = new XmlRpcResponse();
165 Hashtable unknownMethodError = new Hashtable(); 165 Hashtable unknownMethodError = new Hashtable();
166 unknownMethodError["reason"] = "XmlRequest"; ; 166 unknownMethodError["reason"] = "XmlRequest"; ;
167 unknownMethodError["message"] = "Unknown Rpc Request ["+methodName+"]"; 167 unknownMethodError["message"] = "Unknown Rpc Request ["+methodName+"]";
168 unknownMethodError["login"] = "false"; 168 unknownMethodError["login"] = "false";
169 xmlRpcResponse.Value = unknownMethodError; 169 xmlRpcResponse.Value = unknownMethodError;
170 } 170 }
171 171
172 response.AddHeader("Content-type", "text/xml"); 172 response.AddHeader("Content-type", "text/xml");
173 173
174 string responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); 174 string responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
175 175
176 byte[] buffer = Encoding.UTF8.GetBytes(responseString); 176 byte[] buffer = Encoding.UTF8.GetBytes(responseString);
177 177
178 response.SendChunked = false; 178 response.SendChunked = false;
179 response.ContentLength64 = buffer.Length; 179 response.ContentLength64 = buffer.Length;
180 response.ContentEncoding = Encoding.UTF8; 180 response.ContentEncoding = Encoding.UTF8;
181 181
182 response.OutputStream.Write(buffer, 0, buffer.Length); 182 response.OutputStream.Write(buffer, 0, buffer.Length);
183 response.OutputStream.Close(); 183 response.OutputStream.Close();
184 } 184 }
185 185
186 public void Start() 186 public void Start()
187 { 187 {
188 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); 188 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server");
189 189
190 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 190 m_workerThread = new Thread(new ThreadStart(StartHTTP));
191 m_workerThread.IsBackground = true; 191 m_workerThread.IsBackground = true;
192 m_workerThread.Start(); 192 m_workerThread.Start();
193 } 193 }
194 194
195 private void StartHTTP() 195 private void StartHTTP()
196 { 196 {
197 try 197 try
198 { 198 {
199 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); 199 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
200 m_httpListener = new HttpListener(); 200 m_httpListener = new HttpListener();
201 201
202 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 202 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
203 m_httpListener.Start(); 203 m_httpListener.Start();
204 204
205 HttpListenerContext context; 205 HttpListenerContext context;
206 while (true) 206 while (true)
207 { 207 {
208 context = m_httpListener.GetContext(); 208 context = m_httpListener.GetContext();
209 ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context); 209 ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
210 } 210 }
211 } 211 }
212 catch (Exception e) 212 catch (Exception e)
213 { 213 {
214 MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); 214 MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message);
215 } 215 }
216 } 216 }
217 217
218 218
219 public void RemoveStreamHandler(string httpMethod, string path) 219 public void RemoveStreamHandler(string httpMethod, string path)
220 { 220 {
221 m_streamHandlers.Remove(GetHandlerKey(httpMethod, path)); 221 m_streamHandlers.Remove(GetHandlerKey(httpMethod, path));
222 } 222 }
223 } 223 }
224} 224}
diff --git a/OpenSim/Framework/Servers/BaseStreamHandler.cs b/OpenSim/Framework/Servers/BaseStreamHandler.cs
index 0d9c674..0c714e6 100644
--- a/OpenSim/Framework/Servers/BaseStreamHandler.cs
+++ b/OpenSim/Framework/Servers/BaseStreamHandler.cs
@@ -1,40 +1,40 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.IO; 4using System.IO;
5 5
6namespace OpenSim.Framework.Servers 6namespace OpenSim.Framework.Servers
7{ 7{
8 public abstract class BaseStreamHandler : IStreamHandler 8 public abstract class BaseStreamHandler : IStreamHandler
9 { 9 {
10 virtual public string ContentType 10 virtual public string ContentType
11 { 11 {
12 get { return "application/xml"; } 12 get { return "application/xml"; }
13 } 13 }
14 14
15 private string m_httpMethod; 15 private string m_httpMethod;
16 virtual public string HttpMethod 16 virtual public string HttpMethod
17 { 17 {
18 get { return m_httpMethod; } 18 get { return m_httpMethod; }
19 } 19 }
20 20
21 private string m_path; 21 private string m_path;
22 virtual public string Path 22 virtual public string Path
23 { 23 {
24 get { return m_path; } 24 get { return m_path; }
25 } 25 }
26 26
27 protected string GetParam( string path ) 27 protected string GetParam( string path )
28 { 28 {
29 return path.Substring( m_path.Length ); 29 return path.Substring( m_path.Length );
30 } 30 }
31 31
32 public abstract byte[] Handle(string path, Stream request); 32 public abstract byte[] Handle(string path, Stream request);
33 33
34 protected BaseStreamHandler(string httpMethod, string path) 34 protected BaseStreamHandler(string httpMethod, string path)
35 { 35 {
36 m_httpMethod = httpMethod; 36 m_httpMethod = httpMethod;
37 m_path = path; 37 m_path = path;
38 } 38 }
39 } 39 }
40} 40}
diff --git a/OpenSim/Framework/Servers/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
index 7d4e4ce..6e512f6 100644
--- a/OpenSim/Framework/Servers/BinaryStreamHandler.cs
+++ b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
@@ -1,49 +1,49 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.IO; 4using System.IO;
5 5
6namespace OpenSim.Framework.Servers 6namespace OpenSim.Framework.Servers
7{ 7{
8 public delegate string BinaryMethod(byte[] data, string path, string param); 8 public delegate string BinaryMethod(byte[] data, string path, string param);
9 9
10 public class BinaryStreamHandler : BaseStreamHandler 10 public class BinaryStreamHandler : BaseStreamHandler
11 { 11 {
12 BinaryMethod m_method; 12 BinaryMethod m_method;
13 13
14 override public byte[] Handle(string path, Stream request) 14 override public byte[] Handle(string path, Stream request)
15 { 15 {
16 byte[] data = ReadFully(request); 16 byte[] data = ReadFully(request);
17 string param = GetParam(path); 17 string param = GetParam(path);
18 string responseString = m_method(data, path, param); 18 string responseString = m_method(data, path, param);
19 19
20 return Encoding.UTF8.GetBytes(responseString); 20 return Encoding.UTF8.GetBytes(responseString);
21 } 21 }
22 22
23 public BinaryStreamHandler(string httpMethod, string path, BinaryMethod binaryMethod) 23 public BinaryStreamHandler(string httpMethod, string path, BinaryMethod binaryMethod)
24 : base(httpMethod, path) 24 : base(httpMethod, path)
25 { 25 {
26 m_method = binaryMethod; 26 m_method = binaryMethod;
27 } 27 }
28 28
29 private byte[] ReadFully(Stream stream) 29 private byte[] ReadFully(Stream stream)
30 { 30 {
31 byte[] buffer = new byte[32768]; 31 byte[] buffer = new byte[32768];
32 using (MemoryStream ms = new MemoryStream()) 32 using (MemoryStream ms = new MemoryStream())
33 { 33 {
34 while (true) 34 while (true)
35 { 35 {
36 int read = stream.Read(buffer, 0, buffer.Length); 36 int read = stream.Read(buffer, 0, buffer.Length);
37 37
38 if (read <= 0) 38 if (read <= 0)
39 { 39 {
40 return ms.ToArray(); 40 return ms.ToArray();
41 } 41 }
42 42
43 ms.Write(buffer, 0, read); 43 ms.Write(buffer, 0, read);
44 } 44 }
45 } 45 }
46 } 46 }
47 } 47 }
48 48
49} 49}
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
index 89ec095..b1fa5cd 100644
--- a/OpenSim/Framework/Servers/CheckSumServer.cs
+++ b/OpenSim/Framework/Servers/CheckSumServer.cs
@@ -1,127 +1,127 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Servers 28namespace OpenSim.Framework.Servers
29{/* 29{/*
30 public class CheckSumServer : UDPServerBase 30 public class CheckSumServer : UDPServerBase
31 { 31 {
32 //protected ConsoleBase m_log; 32 //protected ConsoleBase m_log;
33 33
34 public CheckSumServer(int port) 34 public CheckSumServer(int port)
35 : base(port) 35 : base(port)
36 { 36 {
37 } 37 }
38 38
39 protected override void OnReceivedData(IAsyncResult result) 39 protected override void OnReceivedData(IAsyncResult result)
40 { 40 {
41 ipeSender = new IPEndPoint(IPAddress.Any, 0); 41 ipeSender = new IPEndPoint(IPAddress.Any, 0);
42 epSender = (EndPoint)ipeSender; 42 epSender = (EndPoint)ipeSender;
43 Packet packet = null; 43 Packet packet = null;
44 int numBytes = Server.EndReceiveFrom(result, ref epSender); 44 int numBytes = Server.EndReceiveFrom(result, ref epSender);
45 int packetEnd = numBytes - 1; 45 int packetEnd = numBytes - 1;
46 46
47 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 47 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
48 48
49 if (packet.Type == PacketType.SecuredTemplateChecksumRequest) 49 if (packet.Type == PacketType.SecuredTemplateChecksumRequest)
50 { 50 {
51 SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet; 51 SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet;
52 TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket(); 52 TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket();
53 checkreply.DataBlock.Checksum = 3220703154;//180572585; 53 checkreply.DataBlock.Checksum = 3220703154;//180572585;
54 checkreply.DataBlock.Flags = 0; 54 checkreply.DataBlock.Flags = 0;
55 checkreply.DataBlock.MajorVersion = 1; 55 checkreply.DataBlock.MajorVersion = 1;
56 checkreply.DataBlock.MinorVersion = 15; 56 checkreply.DataBlock.MinorVersion = 15;
57 checkreply.DataBlock.PatchVersion = 0; 57 checkreply.DataBlock.PatchVersion = 0;
58 checkreply.DataBlock.ServerVersion = 0; 58 checkreply.DataBlock.ServerVersion = 0;
59 checkreply.TokenBlock.Token = checksum.TokenBlock.Token; 59 checkreply.TokenBlock.Token = checksum.TokenBlock.Token;
60 this.SendPacket(checkreply, epSender); 60 this.SendPacket(checkreply, epSender);
61 61
62 /* 62 /*
63 //if we wanted to echo the the checksum/ version from the client (so that any client worked) 63 //if we wanted to echo the the checksum/ version from the client (so that any client worked)
64 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket(); 64 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket();
65 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token; 65 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
66 this.SendPacket(checkrequest, epSender); 66 this.SendPacket(checkrequest, epSender);
67 67
68 } 68 }
69 else if (packet.Type == PacketType.TemplateChecksumReply) 69 else if (packet.Type == PacketType.TemplateChecksumReply)
70 { 70 {
71 //echo back the client checksum reply (Hegemon's method) 71 //echo back the client checksum reply (Hegemon's method)
72 TemplateChecksumReplyPacket checksum2 = (TemplateChecksumReplyPacket)packet; 72 TemplateChecksumReplyPacket checksum2 = (TemplateChecksumReplyPacket)packet;
73 TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket(); 73 TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket();
74 checkreply2.DataBlock.Checksum = checksum2.DataBlock.Checksum; 74 checkreply2.DataBlock.Checksum = checksum2.DataBlock.Checksum;
75 checkreply2.DataBlock.Flags = checksum2.DataBlock.Flags; 75 checkreply2.DataBlock.Flags = checksum2.DataBlock.Flags;
76 checkreply2.DataBlock.MajorVersion = checksum2.DataBlock.MajorVersion; 76 checkreply2.DataBlock.MajorVersion = checksum2.DataBlock.MajorVersion;
77 checkreply2.DataBlock.MinorVersion = checksum2.DataBlock.MinorVersion; 77 checkreply2.DataBlock.MinorVersion = checksum2.DataBlock.MinorVersion;
78 checkreply2.DataBlock.PatchVersion = checksum2.DataBlock.PatchVersion; 78 checkreply2.DataBlock.PatchVersion = checksum2.DataBlock.PatchVersion;
79 checkreply2.DataBlock.ServerVersion = checksum2.DataBlock.ServerVersion; 79 checkreply2.DataBlock.ServerVersion = checksum2.DataBlock.ServerVersion;
80 checkreply2.TokenBlock.Token = checksum2.TokenBlock.Token; 80 checkreply2.TokenBlock.Token = checksum2.TokenBlock.Token;
81 this.SendPacket(checkreply2, epSender); 81 this.SendPacket(checkreply2, epSender);
82 } 82 }
83 else 83 else
84 { 84 {
85 } 85 }
86 86
87 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 87 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
88 } 88 }
89 89
90 private void SendPacket(Packet Pack, EndPoint endp) 90 private void SendPacket(Packet Pack, EndPoint endp)
91 { 91 {
92 if (!Pack.Header.Resent) 92 if (!Pack.Header.Resent)
93 { 93 {
94 Pack.Header.Sequence = 1; 94 Pack.Header.Sequence = 1;
95 } 95 }
96 96
97 byte[] ZeroOutBuffer = new byte[4096]; 97 byte[] ZeroOutBuffer = new byte[4096];
98 byte[] sendbuffer; 98 byte[] sendbuffer;
99 sendbuffer = Pack.ToBytes(); 99 sendbuffer = Pack.ToBytes();
100 100
101 try 101 try
102 { 102 {
103 if (Pack.Header.Zerocoded) 103 if (Pack.Header.Zerocoded)
104 { 104 {
105 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); 105 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
106 this.SendPackTo(ZeroOutBuffer, packetsize, SocketFlags.None, endp); 106 this.SendPackTo(ZeroOutBuffer, packetsize, SocketFlags.None, endp);
107 } 107 }
108 else 108 else
109 { 109 {
110 this.SendPackTo(sendbuffer, sendbuffer.Length, SocketFlags.None, endp); 110 this.SendPackTo(sendbuffer, sendbuffer.Length, SocketFlags.None, endp);
111 } 111 }
112 } 112 }
113 catch (Exception) 113 catch (Exception)
114 { 114 {
115 OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection "); 115 OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
116 116
117 } 117 }
118 } 118 }
119 119
120 private void SendPackTo(byte[] buffer, int size, SocketFlags flags, EndPoint endp) 120 private void SendPackTo(byte[] buffer, int size, SocketFlags flags, EndPoint endp)
121 { 121 {
122 this.Server.SendTo(buffer, size, flags, endp); 122 this.Server.SendTo(buffer, size, flags, endp);
123 } 123 }
124 * } 124 * }
125 */ 125 */
126 126
127} \ No newline at end of file 127} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/IStreamHandler.cs b/OpenSim/Framework/Servers/IStreamHandler.cs
index 6cab40d..8858c99 100644
--- a/OpenSim/Framework/Servers/IStreamHandler.cs
+++ b/OpenSim/Framework/Servers/IStreamHandler.cs
@@ -1,22 +1,22 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.IO; 4using System.IO;
5 5
6namespace OpenSim.Framework.Servers 6namespace OpenSim.Framework.Servers
7{ 7{
8 public interface IStreamHandler 8 public interface IStreamHandler
9 { 9 {
10 // Handle request stream, return byte array 10 // Handle request stream, return byte array
11 byte[] Handle(string path, Stream request ); 11 byte[] Handle(string path, Stream request );
12 12
13 // Return response content type 13 // Return response content type
14 string ContentType { get; } 14 string ContentType { get; }
15 15
16 // Return required http method 16 // Return required http method
17 string HttpMethod { get;} 17 string HttpMethod { get;}
18 18
19 // Return path 19 // Return path
20 string Path { get; } 20 string Path { get; }
21 } 21 }
22} 22}
diff --git a/OpenSim/Framework/Servers/RestMethod.cs b/OpenSim/Framework/Servers/RestMethod.cs
index c6cb230..0c2624b 100644
--- a/OpenSim/Framework/Servers/RestMethod.cs
+++ b/OpenSim/Framework/Servers/RestMethod.cs
@@ -1,31 +1,31 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Servers 28namespace OpenSim.Framework.Servers
29{ 29{
30 public delegate string RestMethod( string request, string path, string param ); 30 public delegate string RestMethod( string request, string path, string param );
31} 31}
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs
index 1b3b41c..6753a06 100644
--- a/OpenSim/Framework/Servers/RestStreamHandler.cs
+++ b/OpenSim/Framework/Servers/RestStreamHandler.cs
@@ -1,31 +1,31 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.IO; 4using System.IO;
5 5
6namespace OpenSim.Framework.Servers 6namespace OpenSim.Framework.Servers
7{ 7{
8 public class RestStreamHandler : BaseStreamHandler 8 public class RestStreamHandler : BaseStreamHandler
9 { 9 {
10 RestMethod m_restMethod; 10 RestMethod m_restMethod;
11 11
12 override public byte[] Handle(string path, Stream request ) 12 override public byte[] Handle(string path, Stream request )
13 { 13 {
14 Encoding encoding = Encoding.UTF8; 14 Encoding encoding = Encoding.UTF8;
15 StreamReader streamReader = new StreamReader(request, encoding); 15 StreamReader streamReader = new StreamReader(request, encoding);
16 16
17 string requestBody = streamReader.ReadToEnd(); 17 string requestBody = streamReader.ReadToEnd();
18 streamReader.Close(); 18 streamReader.Close();
19 19
20 string param = GetParam(path); 20 string param = GetParam(path);
21 string responseString = m_restMethod(requestBody, path, param ); 21 string responseString = m_restMethod(requestBody, path, param );
22 22
23 return Encoding.UTF8.GetBytes(responseString); 23 return Encoding.UTF8.GetBytes(responseString);
24 } 24 }
25 25
26 public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base( httpMethod, path ) 26 public RestStreamHandler(string httpMethod, string path, RestMethod restMethod) : base( httpMethod, path )
27 { 27 {
28 m_restMethod = restMethod; 28 m_restMethod = restMethod;
29 } 29 }
30 } 30 }
31} 31}
diff --git a/OpenSim/Framework/Servers/UDPServerBase.cs b/OpenSim/Framework/Servers/UDPServerBase.cs
index 508eb9d..8113207 100644
--- a/OpenSim/Framework/Servers/UDPServerBase.cs
+++ b/OpenSim/Framework/Servers/UDPServerBase.cs
@@ -1,87 +1,87 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Net; 29using System.Net;
30using System.Net.Sockets; 30using System.Net.Sockets;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32 32
33namespace OpenSim.Framework.Servers 33namespace OpenSim.Framework.Servers
34{ 34{
35 public class UDPServerBase 35 public class UDPServerBase
36 { 36 {
37 public Socket Server; 37 public Socket Server;
38 protected IPEndPoint ServerIncoming; 38 protected IPEndPoint ServerIncoming;
39 protected byte[] RecvBuffer = new byte[4096]; 39 protected byte[] RecvBuffer = new byte[4096];
40 protected byte[] ZeroBuffer = new byte[8192]; 40 protected byte[] ZeroBuffer = new byte[8192];
41 protected IPEndPoint ipeSender; 41 protected IPEndPoint ipeSender;
42 protected EndPoint epSender; 42 protected EndPoint epSender;
43 protected AsyncCallback ReceivedData; 43 protected AsyncCallback ReceivedData;
44 protected int listenPort; 44 protected int listenPort;
45 45
46 public UDPServerBase(int port) 46 public UDPServerBase(int port)
47 { 47 {
48 listenPort = port; 48 listenPort = port;
49 } 49 }
50 50
51 protected virtual void OnReceivedData(IAsyncResult result) 51 protected virtual void OnReceivedData(IAsyncResult result)
52 { 52 {
53 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 53 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
54 epSender = (EndPoint)ipeSender; 54 epSender = (EndPoint)ipeSender;
55 Packet packet = null; 55 Packet packet = null;
56 int numBytes = Server.EndReceiveFrom(result, ref epSender); 56 int numBytes = Server.EndReceiveFrom(result, ref epSender);
57 int packetEnd = numBytes - 1; 57 int packetEnd = numBytes - 1;
58 58
59 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 59 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
60 60
61 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 61 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
62 } 62 }
63 63
64 protected virtual void AddNewClient(Packet packet) 64 protected virtual void AddNewClient(Packet packet)
65 { 65 {
66 } 66 }
67 67
68 public virtual void ServerListener() 68 public virtual void ServerListener()
69 { 69 {
70 70
71 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); 71 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort);
72 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 72 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
73 Server.Bind(ServerIncoming); 73 Server.Bind(ServerIncoming);
74 74
75 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 75 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
76 epSender = (EndPoint)ipeSender; 76 epSender = (EndPoint)ipeSender;
77 ReceivedData = new AsyncCallback(this.OnReceivedData); 77 ReceivedData = new AsyncCallback(this.OnReceivedData);
78 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 78 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
79 } 79 }
80 80
81 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 81 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
82 { 82 {
83 83
84 } 84 }
85 } 85 }
86} 86}
87 87
diff --git a/OpenSim/Framework/Servers/XmlRpcMethod.cs b/OpenSim/Framework/Servers/XmlRpcMethod.cs
index b76ac51..b8abecf 100644
--- a/OpenSim/Framework/Servers/XmlRpcMethod.cs
+++ b/OpenSim/Framework/Servers/XmlRpcMethod.cs
@@ -1,33 +1,33 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using Nwc.XmlRpc; 28using Nwc.XmlRpc;
29 29
30namespace OpenSim.Framework.Servers 30namespace OpenSim.Framework.Servers
31{ 31{
32 public delegate XmlRpcResponse XmlRpcMethod( XmlRpcRequest request ); 32 public delegate XmlRpcResponse XmlRpcMethod( XmlRpcRequest request );
33} 33}
diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs
index abcbd48..d3dfd5b 100644
--- a/OpenSim/Framework/UserManager/LoginResponse.cs
+++ b/OpenSim/Framework/UserManager/LoginResponse.cs
@@ -1,643 +1,643 @@
1using System; 1using System;
2using System.Collections; 2using System.Collections;
3using libsecondlife; 3using libsecondlife;
4using Nwc.XmlRpc; 4using Nwc.XmlRpc;
5using OpenSim.Framework.Console; 5using OpenSim.Framework.Console;
6 6
7namespace OpenSim.Framework.UserManagement 7namespace OpenSim.Framework.UserManagement
8{ 8{
9 9
10 /// <summary> 10 /// <summary>
11 /// A temp class to handle login response. 11 /// A temp class to handle login response.
12 /// Should make use of UserProfileManager where possible. 12 /// Should make use of UserProfileManager where possible.
13 /// </summary> 13 /// </summary>
14 14
15 public class LoginResponse 15 public class LoginResponse
16 { 16 {
17 private Hashtable loginFlagsHash; 17 private Hashtable loginFlagsHash;
18 private Hashtable globalTexturesHash; 18 private Hashtable globalTexturesHash;
19 private Hashtable loginError; 19 private Hashtable loginError;
20 private Hashtable eventCategoriesHash; 20 private Hashtable eventCategoriesHash;
21 private Hashtable uiConfigHash; 21 private Hashtable uiConfigHash;
22 private Hashtable classifiedCategoriesHash; 22 private Hashtable classifiedCategoriesHash;
23 23
24 private ArrayList loginFlags; 24 private ArrayList loginFlags;
25 private ArrayList globalTextures; 25 private ArrayList globalTextures;
26 private ArrayList eventCategories; 26 private ArrayList eventCategories;
27 private ArrayList uiConfig; 27 private ArrayList uiConfig;
28 private ArrayList classifiedCategories; 28 private ArrayList classifiedCategories;
29 private ArrayList inventoryRoot; 29 private ArrayList inventoryRoot;
30 private ArrayList initialOutfit; 30 private ArrayList initialOutfit;
31 private ArrayList agentInventory; 31 private ArrayList agentInventory;
32 32
33 private UserInfo userProfile; 33 private UserInfo userProfile;
34 34
35 private LLUUID agentID; 35 private LLUUID agentID;
36 private LLUUID sessionID; 36 private LLUUID sessionID;
37 private LLUUID secureSessionID; 37 private LLUUID secureSessionID;
38 38
39 // Login Flags 39 // Login Flags
40 private string dst; 40 private string dst;
41 private string stipendSinceLogin; 41 private string stipendSinceLogin;
42 private string gendered; 42 private string gendered;
43 private string everLoggedIn; 43 private string everLoggedIn;
44 private string login; 44 private string login;
45 private int simPort; 45 private int simPort;
46 private string simAddress; 46 private string simAddress;
47 private string agentAccess; 47 private string agentAccess;
48 private Int32 circuitCode; 48 private Int32 circuitCode;
49 private uint regionX; 49 private uint regionX;
50 private uint regionY; 50 private uint regionY;
51 51
52 // Login 52 // Login
53 private string firstname; 53 private string firstname;
54 private string lastname; 54 private string lastname;
55 55
56 // Global Textures 56 // Global Textures
57 private string sunTexture; 57 private string sunTexture;
58 private string cloudTexture; 58 private string cloudTexture;
59 private string moonTexture; 59 private string moonTexture;
60 60
61 // Error Flags 61 // Error Flags
62 private string errorReason; 62 private string errorReason;
63 private string errorMessage; 63 private string errorMessage;
64 64
65 // Response 65 // Response
66 private XmlRpcResponse xmlRpcResponse; 66 private XmlRpcResponse xmlRpcResponse;
67 private XmlRpcResponse defaultXmlRpcResponse; 67 private XmlRpcResponse defaultXmlRpcResponse;
68 68
69 private string welcomeMessage; 69 private string welcomeMessage;
70 private string startLocation; 70 private string startLocation;
71 private string allowFirstLife; 71 private string allowFirstLife;
72 private string home; 72 private string home;
73 private string seedCapability; 73 private string seedCapability;
74 private string lookAt; 74 private string lookAt;
75 75
76 public LoginResponse() 76 public LoginResponse()
77 { 77 {
78 this.loginFlags = new ArrayList(); 78 this.loginFlags = new ArrayList();
79 this.globalTextures = new ArrayList(); 79 this.globalTextures = new ArrayList();
80 this.eventCategories = new ArrayList(); 80 this.eventCategories = new ArrayList();
81 this.uiConfig = new ArrayList(); 81 this.uiConfig = new ArrayList();
82 this.classifiedCategories = new ArrayList(); 82 this.classifiedCategories = new ArrayList();
83 83
84 this.loginError = new Hashtable(); 84 this.loginError = new Hashtable();
85 this.eventCategoriesHash = new Hashtable(); 85 this.eventCategoriesHash = new Hashtable();
86 this.classifiedCategoriesHash = new Hashtable(); 86 this.classifiedCategoriesHash = new Hashtable();
87 this.uiConfigHash = new Hashtable(); 87 this.uiConfigHash = new Hashtable();
88 88
89 this.defaultXmlRpcResponse = new XmlRpcResponse(); 89 this.defaultXmlRpcResponse = new XmlRpcResponse();
90 this.userProfile = new UserInfo(); 90 this.userProfile = new UserInfo();
91 this.inventoryRoot = new ArrayList(); 91 this.inventoryRoot = new ArrayList();
92 this.initialOutfit = new ArrayList(); 92 this.initialOutfit = new ArrayList();
93 this.agentInventory = new ArrayList(); 93 this.agentInventory = new ArrayList();
94 94
95 this.xmlRpcResponse = new XmlRpcResponse(); 95 this.xmlRpcResponse = new XmlRpcResponse();
96 this.defaultXmlRpcResponse = new XmlRpcResponse(); 96 this.defaultXmlRpcResponse = new XmlRpcResponse();
97 97
98 this.SetDefaultValues(); 98 this.SetDefaultValues();
99 } // LoginServer 99 } // LoginServer
100 100
101 public void SetDefaultValues() 101 public void SetDefaultValues()
102 { 102 {
103 this.DST = "N"; 103 this.DST = "N";
104 this.StipendSinceLogin = "N"; 104 this.StipendSinceLogin = "N";
105 this.Gendered = "Y"; 105 this.Gendered = "Y";
106 this.EverLoggedIn = "Y"; 106 this.EverLoggedIn = "Y";
107 this.login = "false"; 107 this.login = "false";
108 this.firstname = "Test"; 108 this.firstname = "Test";
109 this.lastname = "User"; 109 this.lastname = "User";
110 this.agentAccess = "M"; 110 this.agentAccess = "M";
111 this.startLocation = "last"; 111 this.startLocation = "last";
112 this.allowFirstLife = "Y"; 112 this.allowFirstLife = "Y";
113 113
114 this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271"; 114 this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271";
115 this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; 115 this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
116 this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621"; 116 this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
117 117
118 this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock."; 118 this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock.";
119 this.ErrorReason = "key"; 119 this.ErrorReason = "key";
120 this.welcomeMessage = "Welcome to OpenSim!"; 120 this.welcomeMessage = "Welcome to OpenSim!";
121 this.seedCapability = ""; 121 this.seedCapability = "";
122 this.home = "{'region_handle':[r" + (1000 * 256).ToString() + ",r" + (1000 * 256).ToString() + "], 'position':[r" + this.userProfile.homepos.X.ToString() + ",r" + this.userProfile.homepos.Y.ToString() + ",r" + this.userProfile.homepos.Z.ToString() + "], 'look_at':[r" + this.userProfile.homelookat.X.ToString() + ",r" + this.userProfile.homelookat.Y.ToString() + ",r" + this.userProfile.homelookat.Z.ToString() + "]}"; 122 this.home = "{'region_handle':[r" + (1000 * 256).ToString() + ",r" + (1000 * 256).ToString() + "], 'position':[r" + this.userProfile.homepos.X.ToString() + ",r" + this.userProfile.homepos.Y.ToString() + ",r" + this.userProfile.homepos.Z.ToString() + "], 'look_at':[r" + this.userProfile.homelookat.X.ToString() + ",r" + this.userProfile.homelookat.Y.ToString() + ",r" + this.userProfile.homelookat.Z.ToString() + "]}";
123 this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; 123 this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]";
124 this.RegionX = (uint)255232; 124 this.RegionX = (uint)255232;
125 this.RegionY = (uint)254976; 125 this.RegionY = (uint)254976;
126 126
127 // Classifieds; 127 // Classifieds;
128 this.AddClassifiedCategory((Int32)1, "Shopping"); 128 this.AddClassifiedCategory((Int32)1, "Shopping");
129 this.AddClassifiedCategory((Int32)2, "Land Rental"); 129 this.AddClassifiedCategory((Int32)2, "Land Rental");
130 this.AddClassifiedCategory((Int32)3, "Property Rental"); 130 this.AddClassifiedCategory((Int32)3, "Property Rental");
131 this.AddClassifiedCategory((Int32)4, "Special Attraction"); 131 this.AddClassifiedCategory((Int32)4, "Special Attraction");
132 this.AddClassifiedCategory((Int32)5, "New Products"); 132 this.AddClassifiedCategory((Int32)5, "New Products");
133 this.AddClassifiedCategory((Int32)6, "Employment"); 133 this.AddClassifiedCategory((Int32)6, "Employment");
134 this.AddClassifiedCategory((Int32)7, "Wanted"); 134 this.AddClassifiedCategory((Int32)7, "Wanted");
135 this.AddClassifiedCategory((Int32)8, "Service"); 135 this.AddClassifiedCategory((Int32)8, "Service");
136 this.AddClassifiedCategory((Int32)9, "Personal"); 136 this.AddClassifiedCategory((Int32)9, "Personal");
137 137
138 138
139 this.SessionID = LLUUID.Random(); 139 this.SessionID = LLUUID.Random();
140 this.SecureSessionID = LLUUID.Random(); 140 this.SecureSessionID = LLUUID.Random();
141 this.AgentID = LLUUID.Random(); 141 this.AgentID = LLUUID.Random();
142 142
143 Hashtable InitialOutfitHash = new Hashtable(); 143 Hashtable InitialOutfitHash = new Hashtable();
144 InitialOutfitHash["folder_name"] = "Nightclub Female"; 144 InitialOutfitHash["folder_name"] = "Nightclub Female";
145 InitialOutfitHash["gender"] = "female"; 145 InitialOutfitHash["gender"] = "female";
146 this.initialOutfit.Add(InitialOutfitHash); 146 this.initialOutfit.Add(InitialOutfitHash);
147 147
148 148
149 } // SetDefaultValues 149 } // SetDefaultValues
150 150
151 #region Login Failure Methods 151 #region Login Failure Methods
152 public XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) 152 public XmlRpcResponse GenerateFailureResponse(string reason, string message, string login)
153 { 153 {
154 // Overwrite any default values; 154 // Overwrite any default values;
155 this.xmlRpcResponse = new XmlRpcResponse(); 155 this.xmlRpcResponse = new XmlRpcResponse();
156 156
157 // Ensure Login Failed message/reason; 157 // Ensure Login Failed message/reason;
158 this.ErrorMessage = message; 158 this.ErrorMessage = message;
159 this.ErrorReason = reason; 159 this.ErrorReason = reason;
160 160
161 this.loginError["reason"] = this.ErrorReason; 161 this.loginError["reason"] = this.ErrorReason;
162 this.loginError["message"] = this.ErrorMessage; 162 this.loginError["message"] = this.ErrorMessage;
163 this.loginError["login"] = login; 163 this.loginError["login"] = login;
164 this.xmlRpcResponse.Value = this.loginError; 164 this.xmlRpcResponse.Value = this.loginError;
165 return (this.xmlRpcResponse); 165 return (this.xmlRpcResponse);
166 } // GenerateResponse 166 } // GenerateResponse
167 167
168 public XmlRpcResponse CreateFailedResponse() 168 public XmlRpcResponse CreateFailedResponse()
169 { 169 {
170 return (this.CreateLoginFailedResponse()); 170 return (this.CreateLoginFailedResponse());
171 } // CreateErrorConnectingToGridResponse() 171 } // CreateErrorConnectingToGridResponse()
172 172
173 public XmlRpcResponse CreateLoginFailedResponse() 173 public XmlRpcResponse CreateLoginFailedResponse()
174 { 174 {
175 return (this.GenerateFailureResponse("key", "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", "false")); 175 return (this.GenerateFailureResponse("key", "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", "false"));
176 } // LoginFailedResponse 176 } // LoginFailedResponse
177 177
178 public XmlRpcResponse CreateAlreadyLoggedInResponse() 178 public XmlRpcResponse CreateAlreadyLoggedInResponse()
179 { 179 {
180 return (this.GenerateFailureResponse("presence", "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner", "false")); 180 return (this.GenerateFailureResponse("presence", "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner", "false"));
181 } // CreateAlreadyLoggedInResponse() 181 } // CreateAlreadyLoggedInResponse()
182 182
183 public XmlRpcResponse CreateDeadRegionResponse() 183 public XmlRpcResponse CreateDeadRegionResponse()
184 { 184 {
185 return (this.GenerateFailureResponse("key", "The region you are attempting to log into is not responding. Please select another region and try again.", "false")); 185 return (this.GenerateFailureResponse("key", "The region you are attempting to log into is not responding. Please select another region and try again.", "false"));
186 } 186 }
187 187
188 public XmlRpcResponse CreateGridErrorResponse() 188 public XmlRpcResponse CreateGridErrorResponse()
189 { 189 {
190 return (this.GenerateFailureResponse("key", "Error connecting to grid. Could not percieve credentials from login XML.", "false")); 190 return (this.GenerateFailureResponse("key", "Error connecting to grid. Could not percieve credentials from login XML.", "false"));
191 } 191 }
192 192
193 #endregion 193 #endregion
194 194
195 public XmlRpcResponse ToXmlRpcResponse() 195 public XmlRpcResponse ToXmlRpcResponse()
196 { 196 {
197 try 197 try
198 { 198 {
199 199
200 Hashtable responseData = new Hashtable(); 200 Hashtable responseData = new Hashtable();
201 201
202 this.loginFlagsHash = new Hashtable(); 202 this.loginFlagsHash = new Hashtable();
203 this.loginFlagsHash["daylight_savings"] = this.DST; 203 this.loginFlagsHash["daylight_savings"] = this.DST;
204 this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin; 204 this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin;
205 this.loginFlagsHash["gendered"] = this.Gendered; 205 this.loginFlagsHash["gendered"] = this.Gendered;
206 this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn; 206 this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn;
207 this.loginFlags.Add(this.loginFlagsHash); 207 this.loginFlags.Add(this.loginFlagsHash);
208 208
209 responseData["first_name"] = this.Firstname; 209 responseData["first_name"] = this.Firstname;
210 responseData["last_name"] = this.Lastname; 210 responseData["last_name"] = this.Lastname;
211 responseData["agent_access"] = this.agentAccess; 211 responseData["agent_access"] = this.agentAccess;
212 212
213 this.globalTexturesHash = new Hashtable(); 213 this.globalTexturesHash = new Hashtable();
214 this.globalTexturesHash["sun_texture_id"] = this.SunTexture; 214 this.globalTexturesHash["sun_texture_id"] = this.SunTexture;
215 this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture; 215 this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture;
216 this.globalTexturesHash["moon_texture_id"] = this.MoonTexture; 216 this.globalTexturesHash["moon_texture_id"] = this.MoonTexture;
217 this.globalTextures.Add(this.globalTexturesHash); 217 this.globalTextures.Add(this.globalTexturesHash);
218 this.eventCategories.Add(this.eventCategoriesHash); 218 this.eventCategories.Add(this.eventCategoriesHash);
219 219
220 this.AddToUIConfig("allow_first_life", this.allowFirstLife); 220 this.AddToUIConfig("allow_first_life", this.allowFirstLife);
221 this.uiConfig.Add(this.uiConfigHash); 221 this.uiConfig.Add(this.uiConfigHash);
222 222
223 responseData["sim_port"] =(Int32) this.SimPort; 223 responseData["sim_port"] =(Int32) this.SimPort;
224 responseData["sim_ip"] = this.SimAddress; 224 responseData["sim_ip"] = this.SimAddress;
225 225
226 MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]); 226 MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]);
227 227
228 responseData["agent_id"] = this.AgentID.ToStringHyphenated(); 228 responseData["agent_id"] = this.AgentID.ToStringHyphenated();
229 responseData["session_id"] = this.SessionID.ToStringHyphenated(); 229 responseData["session_id"] = this.SessionID.ToStringHyphenated();
230 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated(); 230 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated();
231 responseData["circuit_code"] = this.CircuitCode; 231 responseData["circuit_code"] = this.CircuitCode;
232 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 232 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
233 responseData["login-flags"] = this.loginFlags; 233 responseData["login-flags"] = this.loginFlags;
234 responseData["global-textures"] = this.globalTextures; 234 responseData["global-textures"] = this.globalTextures;
235 responseData["seed_capability"] = this.seedCapability; 235 responseData["seed_capability"] = this.seedCapability;
236 236
237 responseData["event_categories"] = this.eventCategories; 237 responseData["event_categories"] = this.eventCategories;
238 responseData["event_notifications"] = new ArrayList(); // todo 238 responseData["event_notifications"] = new ArrayList(); // todo
239 responseData["classified_categories"] = this.classifiedCategories; 239 responseData["classified_categories"] = this.classifiedCategories;
240 responseData["ui-config"] = this.uiConfig; 240 responseData["ui-config"] = this.uiConfig;
241 241
242 responseData["inventory-skeleton"] = this.agentInventory; 242 responseData["inventory-skeleton"] = this.agentInventory;
243 responseData["inventory-skel-lib"] = new ArrayList(); // todo 243 responseData["inventory-skel-lib"] = new ArrayList(); // todo
244 responseData["inventory-root"] = this.inventoryRoot; 244 responseData["inventory-root"] = this.inventoryRoot;
245 responseData["gestures"] = new ArrayList(); // todo 245 responseData["gestures"] = new ArrayList(); // todo
246 responseData["inventory-lib-owner"] = new ArrayList(); // todo 246 responseData["inventory-lib-owner"] = new ArrayList(); // todo
247 responseData["initial-outfit"] = this.initialOutfit; 247 responseData["initial-outfit"] = this.initialOutfit;
248 responseData["start_location"] = this.startLocation; 248 responseData["start_location"] = this.startLocation;
249 responseData["seed_capability"] = this.seedCapability; 249 responseData["seed_capability"] = this.seedCapability;
250 responseData["home"] = this.home; 250 responseData["home"] = this.home;
251 responseData["look_at"] = this.lookAt; 251 responseData["look_at"] = this.lookAt;
252 responseData["message"] = this.welcomeMessage; 252 responseData["message"] = this.welcomeMessage;
253 responseData["region_x"] = (Int32)this.RegionX * 256; 253 responseData["region_x"] = (Int32)this.RegionX * 256;
254 responseData["region_y"] = (Int32)this.RegionY * 256; 254 responseData["region_y"] = (Int32)this.RegionY * 256;
255 255
256 //responseData["inventory-lib-root"] = new ArrayList(); // todo 256 //responseData["inventory-lib-root"] = new ArrayList(); // todo
257 //responseData["buddy-list"] = new ArrayList(); // todo 257 //responseData["buddy-list"] = new ArrayList(); // todo
258 258
259 responseData["login"] = "true"; 259 responseData["login"] = "true";
260 this.xmlRpcResponse.Value = responseData; 260 this.xmlRpcResponse.Value = responseData;
261 261
262 return (this.xmlRpcResponse); 262 return (this.xmlRpcResponse);
263 } 263 }
264 catch (Exception e) 264 catch (Exception e)
265 { 265 {
266 MainLog.Instance.WriteLine( 266 MainLog.Instance.WriteLine(
267 LogPriority.LOW, 267 LogPriority.LOW,
268 "LoginResponse: Error creating XML-RPC Response: " + e.Message 268 "LoginResponse: Error creating XML-RPC Response: " + e.Message
269 ); 269 );
270 return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); 270 return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
271 271
272 } 272 }
273 273
274 } // ToXmlRpcResponse 274 } // ToXmlRpcResponse
275 275
276 public void SetEventCategories(string category, string value) 276 public void SetEventCategories(string category, string value)
277 { 277 {
278 this.eventCategoriesHash[category] = value; 278 this.eventCategoriesHash[category] = value;
279 } // SetEventCategories 279 } // SetEventCategories
280 280
281 public void AddToUIConfig(string itemName, string item) 281 public void AddToUIConfig(string itemName, string item)
282 { 282 {
283 this.uiConfigHash[itemName] = item; 283 this.uiConfigHash[itemName] = item;
284 } // SetUIConfig 284 } // SetUIConfig
285 285
286 public void AddClassifiedCategory(Int32 ID, string categoryName) 286 public void AddClassifiedCategory(Int32 ID, string categoryName)
287 { 287 {
288 this.classifiedCategoriesHash["category_name"] = categoryName; 288 this.classifiedCategoriesHash["category_name"] = categoryName;
289 this.classifiedCategoriesHash["category_id"] = ID; 289 this.classifiedCategoriesHash["category_id"] = ID;
290 this.classifiedCategories.Add(this.classifiedCategoriesHash); 290 this.classifiedCategories.Add(this.classifiedCategoriesHash);
291 // this.classifiedCategoriesHash.Clear(); 291 // this.classifiedCategoriesHash.Clear();
292 } // SetClassifiedCategory 292 } // SetClassifiedCategory
293 293
294 #region Properties 294 #region Properties
295 public string Login 295 public string Login
296 { 296 {
297 get 297 get
298 { 298 {
299 return this.login; 299 return this.login;
300 } 300 }
301 set 301 set
302 { 302 {
303 this.login = value; 303 this.login = value;
304 } 304 }
305 } // Login 305 } // Login
306 306
307 public string DST 307 public string DST
308 { 308 {
309 get 309 get
310 { 310 {
311 return this.dst; 311 return this.dst;
312 } 312 }
313 set 313 set
314 { 314 {
315 this.dst = value; 315 this.dst = value;
316 } 316 }
317 } // DST 317 } // DST
318 318
319 public string StipendSinceLogin 319 public string StipendSinceLogin
320 { 320 {
321 get 321 get
322 { 322 {
323 return this.stipendSinceLogin; 323 return this.stipendSinceLogin;
324 } 324 }
325 set 325 set
326 { 326 {
327 this.stipendSinceLogin = value; 327 this.stipendSinceLogin = value;
328 } 328 }
329 } // StipendSinceLogin 329 } // StipendSinceLogin
330 330
331 public string Gendered 331 public string Gendered
332 { 332 {
333 get 333 get
334 { 334 {
335 return this.gendered; 335 return this.gendered;
336 } 336 }
337 set 337 set
338 { 338 {
339 this.gendered = value; 339 this.gendered = value;
340 } 340 }
341 } // Gendered 341 } // Gendered
342 342
343 public string EverLoggedIn 343 public string EverLoggedIn
344 { 344 {
345 get 345 get
346 { 346 {
347 return this.everLoggedIn; 347 return this.everLoggedIn;
348 } 348 }
349 set 349 set
350 { 350 {
351 this.everLoggedIn = value; 351 this.everLoggedIn = value;
352 } 352 }
353 } // EverLoggedIn 353 } // EverLoggedIn
354 354
355 public int SimPort 355 public int SimPort
356 { 356 {
357 get 357 get
358 { 358 {
359 return this.simPort; 359 return this.simPort;
360 } 360 }
361 set 361 set
362 { 362 {
363 this.simPort = value; 363 this.simPort = value;
364 } 364 }
365 } // SimPort 365 } // SimPort
366 366
367 public string SimAddress 367 public string SimAddress
368 { 368 {
369 get 369 get
370 { 370 {
371 return this.simAddress; 371 return this.simAddress;
372 } 372 }
373 set 373 set
374 { 374 {
375 this.simAddress = value; 375 this.simAddress = value;
376 } 376 }
377 } // SimAddress 377 } // SimAddress
378 378
379 public LLUUID AgentID 379 public LLUUID AgentID
380 { 380 {
381 get 381 get
382 { 382 {
383 return this.agentID; 383 return this.agentID;
384 } 384 }
385 set 385 set
386 { 386 {
387 this.agentID = value; 387 this.agentID = value;
388 } 388 }
389 } // AgentID 389 } // AgentID
390 390
391 public LLUUID SessionID 391 public LLUUID SessionID
392 { 392 {
393 get 393 get
394 { 394 {
395 return this.sessionID; 395 return this.sessionID;
396 } 396 }
397 set 397 set
398 { 398 {
399 this.sessionID = value; 399 this.sessionID = value;
400 } 400 }
401 } // SessionID 401 } // SessionID
402 402
403 public LLUUID SecureSessionID 403 public LLUUID SecureSessionID
404 { 404 {
405 get 405 get
406 { 406 {
407 return this.secureSessionID; 407 return this.secureSessionID;
408 } 408 }
409 set 409 set
410 { 410 {
411 this.secureSessionID = value; 411 this.secureSessionID = value;
412 } 412 }
413 } // SecureSessionID 413 } // SecureSessionID
414 414
415 public Int32 CircuitCode 415 public Int32 CircuitCode
416 { 416 {
417 get 417 get
418 { 418 {
419 return this.circuitCode; 419 return this.circuitCode;
420 } 420 }
421 set 421 set
422 { 422 {
423 this.circuitCode = value; 423 this.circuitCode = value;
424 } 424 }
425 } // CircuitCode 425 } // CircuitCode
426 426
427 public uint RegionX 427 public uint RegionX
428 { 428 {
429 get 429 get
430 { 430 {
431 return this.regionX; 431 return this.regionX;
432 } 432 }
433 set 433 set
434 { 434 {
435 this.regionX = value; 435 this.regionX = value;
436 } 436 }
437 } // RegionX 437 } // RegionX
438 438
439 public uint RegionY 439 public uint RegionY
440 { 440 {
441 get 441 get
442 { 442 {
443 return this.regionY; 443 return this.regionY;
444 } 444 }
445 set 445 set
446 { 446 {
447 this.regionY = value; 447 this.regionY = value;
448 } 448 }
449 } // RegionY 449 } // RegionY
450 450
451 public string SunTexture 451 public string SunTexture
452 { 452 {
453 get 453 get
454 { 454 {
455 return this.sunTexture; 455 return this.sunTexture;
456 } 456 }
457 set 457 set
458 { 458 {
459 this.sunTexture = value; 459 this.sunTexture = value;
460 } 460 }
461 } // SunTexture 461 } // SunTexture
462 462
463 public string CloudTexture 463 public string CloudTexture
464 { 464 {
465 get 465 get
466 { 466 {
467 return this.cloudTexture; 467 return this.cloudTexture;
468 } 468 }
469 set 469 set
470 { 470 {
471 this.cloudTexture = value; 471 this.cloudTexture = value;
472 } 472 }
473 } // CloudTexture 473 } // CloudTexture
474 474
475 public string MoonTexture 475 public string MoonTexture
476 { 476 {
477 get 477 get
478 { 478 {
479 return this.moonTexture; 479 return this.moonTexture;
480 } 480 }
481 set 481 set
482 { 482 {
483 this.moonTexture = value; 483 this.moonTexture = value;
484 } 484 }
485 } // MoonTexture 485 } // MoonTexture
486 486
487 public string Firstname 487 public string Firstname
488 { 488 {
489 get 489 get
490 { 490 {
491 return this.firstname; 491 return this.firstname;
492 } 492 }
493 set 493 set
494 { 494 {
495 this.firstname = value; 495 this.firstname = value;
496 } 496 }
497 } // Firstname 497 } // Firstname
498 498
499 public string Lastname 499 public string Lastname
500 { 500 {
501 get 501 get
502 { 502 {
503 return this.lastname; 503 return this.lastname;
504 } 504 }
505 set 505 set
506 { 506 {
507 this.lastname = value; 507 this.lastname = value;
508 } 508 }
509 } // Lastname 509 } // Lastname
510 510
511 public string AgentAccess 511 public string AgentAccess
512 { 512 {
513 get 513 get
514 { 514 {
515 return this.agentAccess; 515 return this.agentAccess;
516 } 516 }
517 set 517 set
518 { 518 {
519 this.agentAccess = value; 519 this.agentAccess = value;
520 } 520 }
521 } 521 }
522 522
523 public string StartLocation 523 public string StartLocation
524 { 524 {
525 get 525 get
526 { 526 {
527 return this.startLocation; 527 return this.startLocation;
528 } 528 }
529 set 529 set
530 { 530 {
531 this.startLocation = value; 531 this.startLocation = value;
532 } 532 }
533 } // StartLocation 533 } // StartLocation
534 534
535 public string LookAt 535 public string LookAt
536 { 536 {
537 get 537 get
538 { 538 {
539 return this.lookAt; 539 return this.lookAt;
540 } 540 }
541 set 541 set
542 { 542 {
543 this.lookAt = value; 543 this.lookAt = value;
544 } 544 }
545 } 545 }
546 546
547 public string SeedCapability 547 public string SeedCapability
548 { 548 {
549 get 549 get
550 { 550 {
551 return this.seedCapability; 551 return this.seedCapability;
552 } 552 }
553 set 553 set
554 { 554 {
555 this.seedCapability = value; 555 this.seedCapability = value;
556 } 556 }
557 } // SeedCapability 557 } // SeedCapability
558 558
559 public string ErrorReason 559 public string ErrorReason
560 { 560 {
561 get 561 get
562 { 562 {
563 return this.errorReason; 563 return this.errorReason;
564 } 564 }
565 set 565 set
566 { 566 {
567 this.errorReason = value; 567 this.errorReason = value;
568 } 568 }
569 } // ErrorReason 569 } // ErrorReason
570 570
571 public string ErrorMessage 571 public string ErrorMessage
572 { 572 {
573 get 573 get
574 { 574 {
575 return this.errorMessage; 575 return this.errorMessage;
576 } 576 }
577 set 577 set
578 { 578 {
579 this.errorMessage = value; 579 this.errorMessage = value;
580 } 580 }
581 } // ErrorMessage 581 } // ErrorMessage
582 582
583 public ArrayList InventoryRoot 583 public ArrayList InventoryRoot
584 { 584 {
585 get 585 get
586 { 586 {
587 return this.inventoryRoot; 587 return this.inventoryRoot;
588 } 588 }
589 set 589 set
590 { 590 {
591 this.inventoryRoot = value; 591 this.inventoryRoot = value;
592 } 592 }
593 } 593 }
594 594
595 public ArrayList InventorySkeleton 595 public ArrayList InventorySkeleton
596 { 596 {
597 get 597 get
598 { 598 {
599 return this.agentInventory; 599 return this.agentInventory;
600 } 600 }
601 set 601 set
602 { 602 {
603 this.agentInventory = value; 603 this.agentInventory = value;
604 } 604 }
605 } 605 }
606 606
607 public string Home 607 public string Home
608 { 608 {
609 get 609 get
610 { 610 {
611 return this.home; 611 return this.home;
612 } 612 }
613 set 613 set
614 { 614 {
615 this.home = value; 615 this.home = value;
616 } 616 }
617 } 617 }
618 618
619 public string Message 619 public string Message
620 { 620 {
621 get 621 get
622 { 622 {
623 return this.welcomeMessage; 623 return this.welcomeMessage;
624 } 624 }
625 set 625 set
626 { 626 {
627 this.welcomeMessage = value; 627 this.welcomeMessage = value;
628 } 628 }
629 } 629 }
630 #endregion 630 #endregion
631 631
632 632
633 public class UserInfo 633 public class UserInfo
634 { 634 {
635 public string firstname; 635 public string firstname;
636 public string lastname; 636 public string lastname;
637 public ulong homeregionhandle; 637 public ulong homeregionhandle;
638 public LLVector3 homepos; 638 public LLVector3 homepos;
639 public LLVector3 homelookat; 639 public LLVector3 homelookat;
640 } 640 }
641 } 641 }
642} 642}
643 643
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs
index 4e688f7..fe45d1b 100644
--- a/OpenSim/Framework/UserManager/UserManagerBase.cs
+++ b/OpenSim/Framework/UserManager/UserManagerBase.cs
@@ -1,631 +1,631 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Security.Cryptography; 32using System.Security.Cryptography;
33using libsecondlife; 33using libsecondlife;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Data; 36using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Inventory; 38using OpenSim.Framework.Inventory;
39using OpenSim.Framework.Utilities; 39using OpenSim.Framework.Utilities;
40 40
41namespace OpenSim.Framework.UserManagement 41namespace OpenSim.Framework.UserManagement
42{ 42{
43 public abstract class UserManagerBase 43 public abstract class UserManagerBase
44 { 44 {
45 public UserConfig _config; 45 public UserConfig _config;
46 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 46 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
47 47
48 /// <summary> 48 /// <summary>
49 /// Adds a new user server plugin - user servers will be requested in the order they were loaded. 49 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
50 /// </summary> 50 /// </summary>
51 /// <param name="FileName">The filename to the user server plugin DLL</param> 51 /// <param name="FileName">The filename to the user server plugin DLL</param>
52 public void AddPlugin(string FileName) 52 public void AddPlugin(string FileName)
53 { 53 {
54 MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName); 54 MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
55 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 55 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
56 56
57 MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 57 MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
58 foreach (Type pluginType in pluginAssembly.GetTypes()) 58 foreach (Type pluginType in pluginAssembly.GetTypes())
59 { 59 {
60 if (!pluginType.IsAbstract) 60 if (!pluginType.IsAbstract)
61 { 61 {
62 Type typeInterface = pluginType.GetInterface("IUserData", true); 62 Type typeInterface = pluginType.GetInterface("IUserData", true);
63 63
64 if (typeInterface != null) 64 if (typeInterface != null)
65 { 65 {
66 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 66 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
67 plug.Initialise(); 67 plug.Initialise();
68 this._plugins.Add(plug.getName(), plug); 68 this._plugins.Add(plug.getName(), plug);
69 MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface"); 69 MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
70 } 70 }
71 71
72 typeInterface = null; 72 typeInterface = null;
73 } 73 }
74 } 74 }
75 75
76 pluginAssembly = null; 76 pluginAssembly = null;
77 } 77 }
78 78
79 #region Get UserProfile 79 #region Get UserProfile
80 /// <summary> 80 /// <summary>
81 /// Loads a user profile from a database by UUID 81 /// Loads a user profile from a database by UUID
82 /// </summary> 82 /// </summary>
83 /// <param name="uuid">The target UUID</param> 83 /// <param name="uuid">The target UUID</param>
84 /// <returns>A user profile</returns> 84 /// <returns>A user profile</returns>
85 public UserProfileData getUserProfile(LLUUID uuid) 85 public UserProfileData getUserProfile(LLUUID uuid)
86 { 86 {
87 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 87 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
88 { 88 {
89 try 89 try
90 { 90 {
91 UserProfileData profile = plugin.Value.getUserByUUID(uuid); 91 UserProfileData profile = plugin.Value.getUserByUUID(uuid);
92 profile.currentAgent = getUserAgent(profile.UUID); 92 profile.currentAgent = getUserAgent(profile.UUID);
93 return profile; 93 return profile;
94 } 94 }
95 catch (Exception e) 95 catch (Exception e)
96 { 96 {
97 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 97 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
98 } 98 }
99 } 99 }
100 100
101 return null; 101 return null;
102 } 102 }
103 103
104 104
105 /// <summary> 105 /// <summary>
106 /// Loads a user profile by name 106 /// Loads a user profile by name
107 /// </summary> 107 /// </summary>
108 /// <param name="name">The target name</param> 108 /// <param name="name">The target name</param>
109 /// <returns>A user profile</returns> 109 /// <returns>A user profile</returns>
110 public UserProfileData getUserProfile(string name) 110 public UserProfileData getUserProfile(string name)
111 { 111 {
112 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 112 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
113 { 113 {
114 try 114 try
115 { 115 {
116 UserProfileData profile = plugin.Value.getUserByName(name); 116 UserProfileData profile = plugin.Value.getUserByName(name);
117 profile.currentAgent = getUserAgent(profile.UUID); 117 profile.currentAgent = getUserAgent(profile.UUID);
118 return profile; 118 return profile;
119 } 119 }
120 catch (Exception e) 120 catch (Exception e)
121 { 121 {
122 System.Console.WriteLine("EEK!"); 122 System.Console.WriteLine("EEK!");
123 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 123 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
124 } 124 }
125 } 125 }
126 126
127 return null; 127 return null;
128 } 128 }
129 129
130 /// <summary> 130 /// <summary>
131 /// Loads a user profile by name 131 /// Loads a user profile by name
132 /// </summary> 132 /// </summary>
133 /// <param name="fname">First name</param> 133 /// <param name="fname">First name</param>
134 /// <param name="lname">Last name</param> 134 /// <param name="lname">Last name</param>
135 /// <returns>A user profile</returns> 135 /// <returns>A user profile</returns>
136 public UserProfileData getUserProfile(string fname, string lname) 136 public UserProfileData getUserProfile(string fname, string lname)
137 { 137 {
138 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 138 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
139 { 139 {
140 try 140 try
141 { 141 {
142 UserProfileData profile = plugin.Value.getUserByName(fname,lname); 142 UserProfileData profile = plugin.Value.getUserByName(fname,lname);
143 143
144 profile.currentAgent = getUserAgent(profile.UUID); 144 profile.currentAgent = getUserAgent(profile.UUID);
145 145
146 return profile; 146 return profile;
147 } 147 }
148 catch (Exception e) 148 catch (Exception e)
149 { 149 {
150 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 150 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
151 } 151 }
152 } 152 }
153 153
154 return null; 154 return null;
155 } 155 }
156 #endregion 156 #endregion
157 157
158 #region Get UserAgent 158 #region Get UserAgent
159 /// <summary> 159 /// <summary>
160 /// Loads a user agent by uuid (not called directly) 160 /// Loads a user agent by uuid (not called directly)
161 /// </summary> 161 /// </summary>
162 /// <param name="uuid">The agents UUID</param> 162 /// <param name="uuid">The agents UUID</param>
163 /// <returns>Agent profiles</returns> 163 /// <returns>Agent profiles</returns>
164 public UserAgentData getUserAgent(LLUUID uuid) 164 public UserAgentData getUserAgent(LLUUID uuid)
165 { 165 {
166 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 166 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
167 { 167 {
168 try 168 try
169 { 169 {
170 return plugin.Value.getAgentByUUID(uuid); 170 return plugin.Value.getAgentByUUID(uuid);
171 } 171 }
172 catch (Exception e) 172 catch (Exception e)
173 { 173 {
174 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 174 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
175 } 175 }
176 } 176 }
177 177
178 return null; 178 return null;
179 } 179 }
180 180
181 /// <summary> 181 /// <summary>
182 /// Loads a user agent by name (not called directly) 182 /// Loads a user agent by name (not called directly)
183 /// </summary> 183 /// </summary>
184 /// <param name="name">The agents name</param> 184 /// <param name="name">The agents name</param>
185 /// <returns>A user agent</returns> 185 /// <returns>A user agent</returns>
186 public UserAgentData getUserAgent(string name) 186 public UserAgentData getUserAgent(string name)
187 { 187 {
188 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 188 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
189 { 189 {
190 try 190 try
191 { 191 {
192 return plugin.Value.getAgentByName(name); 192 return plugin.Value.getAgentByName(name);
193 } 193 }
194 catch (Exception e) 194 catch (Exception e)
195 { 195 {
196 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 196 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
197 } 197 }
198 } 198 }
199 199
200 return null; 200 return null;
201 } 201 }
202 202
203 /// <summary> 203 /// <summary>
204 /// Loads a user agent by name (not called directly) 204 /// Loads a user agent by name (not called directly)
205 /// </summary> 205 /// </summary>
206 /// <param name="fname">The agents firstname</param> 206 /// <param name="fname">The agents firstname</param>
207 /// <param name="lname">The agents lastname</param> 207 /// <param name="lname">The agents lastname</param>
208 /// <returns>A user agent</returns> 208 /// <returns>A user agent</returns>
209 public UserAgentData getUserAgent(string fname, string lname) 209 public UserAgentData getUserAgent(string fname, string lname)
210 { 210 {
211 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 211 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
212 { 212 {
213 try 213 try
214 { 214 {
215 return plugin.Value.getAgentByName(fname,lname); 215 return plugin.Value.getAgentByName(fname,lname);
216 } 216 }
217 catch (Exception e) 217 catch (Exception e)
218 { 218 {
219 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); 219 MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
220 } 220 }
221 } 221 }
222 222
223 return null; 223 return null;
224 } 224 }
225 225
226 #endregion 226 #endregion
227 227
228 #region CreateAgent 228 #region CreateAgent
229 /// <summary> 229 /// <summary>
230 /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB 230 /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
231 /// </summary> 231 /// </summary>
232 /// <param name="profile">The users profile</param> 232 /// <param name="profile">The users profile</param>
233 /// <param name="request">The users loginrequest</param> 233 /// <param name="request">The users loginrequest</param>
234 public void CreateAgent(UserProfileData profile, XmlRpcRequest request) 234 public void CreateAgent(UserProfileData profile, XmlRpcRequest request)
235 { 235 {
236 Hashtable requestData = (Hashtable)request.Params[0]; 236 Hashtable requestData = (Hashtable)request.Params[0];
237 237
238 UserAgentData agent = new UserAgentData(); 238 UserAgentData agent = new UserAgentData();
239 239
240 // User connection 240 // User connection
241 agent.agentOnline = true; 241 agent.agentOnline = true;
242 242
243 // Generate sessions 243 // Generate sessions
244 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); 244 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
245 byte[] randDataS = new byte[16]; 245 byte[] randDataS = new byte[16];
246 byte[] randDataSS = new byte[16]; 246 byte[] randDataSS = new byte[16];
247 rand.GetBytes(randDataS); 247 rand.GetBytes(randDataS);
248 rand.GetBytes(randDataSS); 248 rand.GetBytes(randDataSS);
249 249
250 agent.secureSessionID = new LLUUID(randDataSS, 0); 250 agent.secureSessionID = new LLUUID(randDataSS, 0);
251 agent.sessionID = new LLUUID(randDataS, 0); 251 agent.sessionID = new LLUUID(randDataS, 0);
252 252
253 // Profile UUID 253 // Profile UUID
254 agent.UUID = profile.UUID; 254 agent.UUID = profile.UUID;
255 255
256 // Current position (from Home) 256 // Current position (from Home)
257 agent.currentHandle = profile.homeRegion; 257 agent.currentHandle = profile.homeRegion;
258 agent.currentPos = profile.homeLocation; 258 agent.currentPos = profile.homeLocation;
259 259
260 // If user specified additional start, use that 260 // If user specified additional start, use that
261 if (requestData.ContainsKey("start")) 261 if (requestData.ContainsKey("start"))
262 { 262 {
263 string startLoc = ((string)requestData["start"]).Trim(); 263 string startLoc = ((string)requestData["start"]).Trim();
264 if (!(startLoc == "last" || startLoc == "home")) 264 if (!(startLoc == "last" || startLoc == "home"))
265 { 265 {
266 // Format: uri:Ahern&162&213&34 266 // Format: uri:Ahern&162&213&34
267 try 267 try
268 { 268 {
269 string[] parts = startLoc.Remove(0, 4).Split('&'); 269 string[] parts = startLoc.Remove(0, 4).Split('&');
270 string region = parts[0]; 270 string region = parts[0];
271 271
272 //////////////////////////////////////////////////// 272 ////////////////////////////////////////////////////
273 //SimProfile SimInfo = new SimProfile(); 273 //SimProfile SimInfo = new SimProfile();
274 //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); 274 //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
275 } 275 }
276 catch (Exception) 276 catch (Exception)
277 { 277 {
278 278
279 } 279 }
280 } 280 }
281 } 281 }
282 282
283 // What time did the user login? 283 // What time did the user login?
284 agent.loginTime = Util.UnixTimeSinceEpoch(); 284 agent.loginTime = Util.UnixTimeSinceEpoch();
285 agent.logoutTime = 0; 285 agent.logoutTime = 0;
286 286
287 // Current location 287 // Current location
288 agent.regionID = new LLUUID(); // Fill in later 288 agent.regionID = new LLUUID(); // Fill in later
289 agent.currentRegion = new LLUUID(); // Fill in later 289 agent.currentRegion = new LLUUID(); // Fill in later
290 290
291 profile.currentAgent = agent; 291 profile.currentAgent = agent;
292 } 292 }
293 293
294 /// <summary> 294 /// <summary>
295 /// Saves a target agent to the database 295 /// Saves a target agent to the database
296 /// </summary> 296 /// </summary>
297 /// <param name="profile">The users profile</param> 297 /// <param name="profile">The users profile</param>
298 /// <returns>Successful?</returns> 298 /// <returns>Successful?</returns>
299 public bool CommitAgent(ref UserProfileData profile) 299 public bool CommitAgent(ref UserProfileData profile)
300 { 300 {
301 // Saves the agent to database 301 // Saves the agent to database
302 return true; 302 return true;
303 } 303 }
304 304
305 #endregion 305 #endregion
306 306
307 /// <summary> 307 /// <summary>
308 /// Checks a user against it's password hash 308 /// Checks a user against it's password hash
309 /// </summary> 309 /// </summary>
310 /// <param name="profile">The users profile</param> 310 /// <param name="profile">The users profile</param>
311 /// <param name="password">The supplied password</param> 311 /// <param name="password">The supplied password</param>
312 /// <returns>Authenticated?</returns> 312 /// <returns>Authenticated?</returns>
313 public virtual bool AuthenticateUser(UserProfileData profile, string password) 313 public virtual bool AuthenticateUser(UserProfileData profile, string password)
314 { 314 {
315 MainLog.Instance.Verbose( 315 MainLog.Instance.Verbose(
316 "Authenticating " + profile.username + " " + profile.surname); 316 "Authenticating " + profile.username + " " + profile.surname);
317 317
318 password = password.Remove(0, 3); //remove $1$ 318 password = password.Remove(0, 3); //remove $1$
319 319
320 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 320 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
321 321
322 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); 322 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
323 } 323 }
324 324
325 #region Xml Response 325 #region Xml Response
326 326
327 /// <summary> 327 /// <summary>
328 /// 328 ///
329 /// </summary> 329 /// </summary>
330 /// <param name="firstname"></param> 330 /// <param name="firstname"></param>
331 /// <param name="lastname"></param> 331 /// <param name="lastname"></param>
332 /// <returns></returns> 332 /// <returns></returns>
333 public virtual UserProfileData GetTheUser(string firstname, string lastname) 333 public virtual UserProfileData GetTheUser(string firstname, string lastname)
334 { 334 {
335 return getUserProfile(firstname, lastname); 335 return getUserProfile(firstname, lastname);
336 } 336 }
337 337
338 /// <summary> 338 /// <summary>
339 /// 339 ///
340 /// </summary> 340 /// </summary>
341 /// <returns></returns> 341 /// <returns></returns>
342 public virtual string GetMessage() 342 public virtual string GetMessage()
343 { 343 {
344 return _config.DefaultStartupMsg; 344 return _config.DefaultStartupMsg;
345 } 345 }
346 346
347 /// <summary> 347 /// <summary>
348 /// Customises the login response and fills in missing values. 348 /// Customises the login response and fills in missing values.
349 /// </summary> 349 /// </summary>
350 /// <param name="response">The existing response</param> 350 /// <param name="response">The existing response</param>
351 /// <param name="theUser">The user profile</param> 351 /// <param name="theUser">The user profile</param>
352 public abstract void CustomiseResponse( LoginResponse response, UserProfileData theUser); 352 public abstract void CustomiseResponse( LoginResponse response, UserProfileData theUser);
353 353
354 /// <summary> 354 /// <summary>
355 /// Main user login function 355 /// Main user login function
356 /// </summary> 356 /// </summary>
357 /// <param name="request">The XMLRPC request</param> 357 /// <param name="request">The XMLRPC request</param>
358 /// <returns>The response to send</returns> 358 /// <returns>The response to send</returns>
359 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) 359 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
360 { 360 {
361 361
362 System.Console.WriteLine("Attempting login now..."); 362 System.Console.WriteLine("Attempting login now...");
363 XmlRpcResponse response = new XmlRpcResponse(); 363 XmlRpcResponse response = new XmlRpcResponse();
364 Hashtable requestData = (Hashtable)request.Params[0]; 364 Hashtable requestData = (Hashtable)request.Params[0];
365 365
366 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); 366 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
367 bool GoodLogin = false; 367 bool GoodLogin = false;
368 string firstname = ""; 368 string firstname = "";
369 string lastname = ""; 369 string lastname = "";
370 string passwd = ""; 370 string passwd = "";
371 371
372 UserProfileData userProfile; 372 UserProfileData userProfile;
373 LoginResponse logResponse = new LoginResponse(); 373 LoginResponse logResponse = new LoginResponse();
374 374
375 if (GoodXML) 375 if (GoodXML)
376 { 376 {
377 firstname = (string)requestData["first"]; 377 firstname = (string)requestData["first"];
378 lastname = (string)requestData["last"]; 378 lastname = (string)requestData["last"];
379 passwd = (string)requestData["passwd"]; 379 passwd = (string)requestData["passwd"];
380 380
381 userProfile = GetTheUser(firstname, lastname); 381 userProfile = GetTheUser(firstname, lastname);
382 if (userProfile == null) 382 if (userProfile == null)
383 return logResponse.CreateLoginFailedResponse(); 383 return logResponse.CreateLoginFailedResponse();
384 384
385 GoodLogin = AuthenticateUser(userProfile, passwd); 385 GoodLogin = AuthenticateUser(userProfile, passwd);
386 } 386 }
387 else 387 else
388 { 388 {
389 return logResponse.CreateGridErrorResponse(); 389 return logResponse.CreateGridErrorResponse();
390 } 390 }
391 391
392 if (!GoodLogin) 392 if (!GoodLogin)
393 { 393 {
394 return logResponse.CreateLoginFailedResponse(); 394 return logResponse.CreateLoginFailedResponse();
395 } 395 }
396 else 396 else
397 { 397 {
398 // If we already have a session... 398 // If we already have a session...
399 if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) 399 if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline)
400 { 400 {
401 // Reject the login 401 // Reject the login
402 return logResponse.CreateAlreadyLoggedInResponse(); 402 return logResponse.CreateAlreadyLoggedInResponse();
403 } 403 }
404 // Otherwise... 404 // Otherwise...
405 // Create a new agent session 405 // Create a new agent session
406 CreateAgent( userProfile, request); 406 CreateAgent( userProfile, request);
407 407
408 try 408 try
409 { 409 {
410 410
411 LLUUID AgentID = userProfile.UUID; 411 LLUUID AgentID = userProfile.UUID;
412 412
413 // Inventory Library Section 413 // Inventory Library Section
414 ArrayList AgentInventoryArray = new ArrayList(); 414 ArrayList AgentInventoryArray = new ArrayList();
415 Hashtable TempHash; 415 Hashtable TempHash;
416 416
417 AgentInventory Library = new AgentInventory(); 417 AgentInventory Library = new AgentInventory();
418 Library.CreateRootFolder(AgentID, true); 418 Library.CreateRootFolder(AgentID, true);
419 419
420 foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values) 420 foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values)
421 { 421 {
422 TempHash = new Hashtable(); 422 TempHash = new Hashtable();
423 TempHash["name"] = InvFolder.FolderName; 423 TempHash["name"] = InvFolder.FolderName;
424 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); 424 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
425 TempHash["version"] = (Int32)InvFolder.Version; 425 TempHash["version"] = (Int32)InvFolder.Version;
426 TempHash["type_default"] = (Int32)InvFolder.DefaultType; 426 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
427 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); 427 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
428 AgentInventoryArray.Add(TempHash); 428 AgentInventoryArray.Add(TempHash);
429 } 429 }
430 430
431 Hashtable InventoryRootHash = new Hashtable(); 431 Hashtable InventoryRootHash = new Hashtable();
432 InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated(); 432 InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated();
433 ArrayList InventoryRoot = new ArrayList(); 433 ArrayList InventoryRoot = new ArrayList();
434 InventoryRoot.Add(InventoryRootHash); 434 InventoryRoot.Add(InventoryRootHash);
435 435
436 // Circuit Code 436 // Circuit Code
437 uint circode = (uint)(Util.RandomClass.Next()); 437 uint circode = (uint)(Util.RandomClass.Next());
438 438
439 logResponse.Lastname = userProfile.surname; 439 logResponse.Lastname = userProfile.surname;
440 logResponse.Firstname = userProfile.username; 440 logResponse.Firstname = userProfile.username;
441 logResponse.AgentID = AgentID.ToStringHyphenated(); 441 logResponse.AgentID = AgentID.ToStringHyphenated();
442 logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated(); 442 logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated();
443 logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated(); 443 logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated();
444 logResponse.InventoryRoot = InventoryRoot; 444 logResponse.InventoryRoot = InventoryRoot;
445 logResponse.InventorySkeleton = AgentInventoryArray; 445 logResponse.InventorySkeleton = AgentInventoryArray;
446 logResponse.CircuitCode = (Int32)circode; 446 logResponse.CircuitCode = (Int32)circode;
447 //logResponse.RegionX = 0; //overwritten 447 //logResponse.RegionX = 0; //overwritten
448 //logResponse.RegionY = 0; //overwritten 448 //logResponse.RegionY = 0; //overwritten
449 logResponse.Home = "!!null temporary value {home}!!"; // Overwritten 449 logResponse.Home = "!!null temporary value {home}!!"; // Overwritten
450 //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; 450 //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n";
451 //logResponse.SimAddress = "127.0.0.1"; //overwritten 451 //logResponse.SimAddress = "127.0.0.1"; //overwritten
452 //logResponse.SimPort = 0; //overwritten 452 //logResponse.SimPort = 0; //overwritten
453 logResponse.Message = this.GetMessage(); 453 logResponse.Message = this.GetMessage();
454 454
455 try 455 try
456 { 456 {
457 this.CustomiseResponse( logResponse, userProfile); 457 this.CustomiseResponse( logResponse, userProfile);
458 } 458 }
459 catch (Exception e) 459 catch (Exception e)
460 { 460 {
461 System.Console.WriteLine(e.ToString()); 461 System.Console.WriteLine(e.ToString());
462 return logResponse.CreateDeadRegionResponse(); 462 return logResponse.CreateDeadRegionResponse();
463 //return logResponse.ToXmlRpcResponse(); 463 //return logResponse.ToXmlRpcResponse();
464 } 464 }
465 CommitAgent(ref userProfile); 465 CommitAgent(ref userProfile);
466 return logResponse.ToXmlRpcResponse(); 466 return logResponse.ToXmlRpcResponse();
467 467
468 } 468 }
469 469
470 catch (Exception E) 470 catch (Exception E)
471 { 471 {
472 System.Console.WriteLine(E.ToString()); 472 System.Console.WriteLine(E.ToString());
473 } 473 }
474 //} 474 //}
475 } 475 }
476 return response; 476 return response;
477 477
478 } 478 }
479 479
480 #endregion 480 #endregion
481 481
482 /// <summary> 482 /// <summary>
483 /// Deletes an active agent session 483 /// Deletes an active agent session
484 /// </summary> 484 /// </summary>
485 /// <param name="request">The request</param> 485 /// <param name="request">The request</param>
486 /// <param name="path">The path (eg /bork/narf/test)</param> 486 /// <param name="path">The path (eg /bork/narf/test)</param>
487 /// <param name="param">Parameters sent</param> 487 /// <param name="param">Parameters sent</param>
488 /// <returns>Success "OK" else error</returns> 488 /// <returns>Success "OK" else error</returns>
489 public string RestDeleteUserSessionMethod(string request, string path, string param) 489 public string RestDeleteUserSessionMethod(string request, string path, string param)
490 { 490 {
491 // TODO! Important! 491 // TODO! Important!
492 492
493 return "OK"; 493 return "OK";
494 } 494 }
495 495
496 /// <summary> 496 /// <summary>
497 /// 497 ///
498 /// </summary> 498 /// </summary>
499 /// <param name="user"></param> 499 /// <param name="user"></param>
500 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 500 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
501 { 501 {
502 UserProfileData user = new UserProfileData(); 502 UserProfileData user = new UserProfileData();
503 user.homeLocation = new LLVector3(128, 128, 100); 503 user.homeLocation = new LLVector3(128, 128, 100);
504 user.UUID = LLUUID.Random(); 504 user.UUID = LLUUID.Random();
505 user.username = firstName; 505 user.username = firstName;
506 user.surname = lastName; 506 user.surname = lastName;
507 user.passwordHash = pass; 507 user.passwordHash = pass;
508 user.passwordSalt = ""; 508 user.passwordSalt = "";
509 user.created = Util.UnixTimeSinceEpoch(); 509 user.created = Util.UnixTimeSinceEpoch();
510 user.homeLookAt = new LLVector3(100, 100, 100); 510 user.homeLookAt = new LLVector3(100, 100, 100);
511 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256)); 511 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
512 512
513 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 513 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
514 { 514 {
515 try 515 try
516 { 516 {
517 plugin.Value.addNewUserProfile(user); 517 plugin.Value.addNewUserProfile(user);
518 518
519 } 519 }
520 catch (Exception e) 520 catch (Exception e)
521 { 521 {
522 MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); 522 MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
523 } 523 }
524 } 524 }
525 } 525 }
526 526
527 /// <summary> 527 /// <summary>
528 /// Returns an error message that the user could not be found in the database 528 /// Returns an error message that the user could not be found in the database
529 /// </summary> 529 /// </summary>
530 /// <returns>XML string consisting of a error element containing individual error(s)</returns> 530 /// <returns>XML string consisting of a error element containing individual error(s)</returns>
531 public XmlRpcResponse CreateUnknownUserErrorResponse() 531 public XmlRpcResponse CreateUnknownUserErrorResponse()
532 { 532 {
533 XmlRpcResponse response = new XmlRpcResponse(); 533 XmlRpcResponse response = new XmlRpcResponse();
534 Hashtable responseData = new Hashtable(); 534 Hashtable responseData = new Hashtable();
535 responseData["error_type"] = "unknown_user"; 535 responseData["error_type"] = "unknown_user";
536 responseData["error_desc"] = "The user requested is not in the database"; 536 responseData["error_desc"] = "The user requested is not in the database";
537 537
538 response.Value = responseData; 538 response.Value = responseData;
539 return response; 539 return response;
540 } 540 }
541 541
542 /// <summary> 542 /// <summary>
543 /// Converts a user profile to an XML element which can be returned 543 /// Converts a user profile to an XML element which can be returned
544 /// </summary> 544 /// </summary>
545 /// <param name="profile">The user profile</param> 545 /// <param name="profile">The user profile</param>
546 /// <returns>A string containing an XML Document of the user profile</returns> 546 /// <returns>A string containing an XML Document of the user profile</returns>
547 public XmlRpcResponse ProfileToXmlRPCResponse(UserProfileData profile) 547 public XmlRpcResponse ProfileToXmlRPCResponse(UserProfileData profile)
548 { 548 {
549 XmlRpcResponse response = new XmlRpcResponse(); 549 XmlRpcResponse response = new XmlRpcResponse();
550 Hashtable responseData = new Hashtable(); 550 Hashtable responseData = new Hashtable();
551 551
552 // Account information 552 // Account information
553 responseData["firstname"] = profile.username; 553 responseData["firstname"] = profile.username;
554 responseData["lastname"] = profile.surname; 554 responseData["lastname"] = profile.surname;
555 responseData["uuid"] = profile.UUID.ToStringHyphenated(); 555 responseData["uuid"] = profile.UUID.ToStringHyphenated();
556 // Server Information 556 // Server Information
557 responseData["server_inventory"] = profile.userInventoryURI; 557 responseData["server_inventory"] = profile.userInventoryURI;
558 responseData["server_asset"] = profile.userAssetURI; 558 responseData["server_asset"] = profile.userAssetURI;
559 // Profile Information 559 // Profile Information
560 responseData["profile_about"] = profile.profileAboutText; 560 responseData["profile_about"] = profile.profileAboutText;
561 responseData["profile_firstlife_about"] = profile.profileFirstText; 561 responseData["profile_firstlife_about"] = profile.profileFirstText;
562 responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated(); 562 responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated();
563 responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); 563 responseData["profile_can_do"] = profile.profileCanDoMask.ToString();
564 responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); 564 responseData["profile_want_do"] = profile.profileWantDoMask.ToString();
565 responseData["profile_image"] = profile.profileImage.ToStringHyphenated(); 565 responseData["profile_image"] = profile.profileImage.ToStringHyphenated();
566 responseData["profile_created"] = profile.created.ToString(); 566 responseData["profile_created"] = profile.created.ToString();
567 responseData["profile_lastlogin"] = profile.lastLogin.ToString(); 567 responseData["profile_lastlogin"] = profile.lastLogin.ToString();
568 // Home region information 568 // Home region information
569 responseData["home_coordinates_x"] = profile.homeLocation.X.ToString(); 569 responseData["home_coordinates_x"] = profile.homeLocation.X.ToString();
570 responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString(); 570 responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString();
571 responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString(); 571 responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString();
572 572
573 responseData["home_region"] = profile.homeRegion.ToString(); 573 responseData["home_region"] = profile.homeRegion.ToString();
574 574
575 responseData["home_look_x"] = profile.homeLookAt.X.ToString(); 575 responseData["home_look_x"] = profile.homeLookAt.X.ToString();
576 responseData["home_look_y"] = profile.homeLookAt.Y.ToString(); 576 responseData["home_look_y"] = profile.homeLookAt.Y.ToString();
577 responseData["home_look_z"] = profile.homeLookAt.Z.ToString(); 577 responseData["home_look_z"] = profile.homeLookAt.Z.ToString();
578 response.Value = responseData; 578 response.Value = responseData;
579 579
580 return response; 580 return response;
581 } 581 }
582 582
583 #region XMLRPC User Methods 583 #region XMLRPC User Methods
584 //should most likely move out of here and into the grid's userserver sub class 584 //should most likely move out of here and into the grid's userserver sub class
585 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request) 585 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
586 { 586 {
587 XmlRpcResponse response = new XmlRpcResponse(); 587 XmlRpcResponse response = new XmlRpcResponse();
588 Hashtable requestData = (Hashtable)request.Params[0]; 588 Hashtable requestData = (Hashtable)request.Params[0];
589 UserProfileData userProfile; 589 UserProfileData userProfile;
590 if (requestData.Contains("avatar_name")) 590 if (requestData.Contains("avatar_name"))
591 { 591 {
592 userProfile = getUserProfile((string)requestData["avatar_name"]); 592 userProfile = getUserProfile((string)requestData["avatar_name"]);
593 if (userProfile == null) 593 if (userProfile == null)
594 { 594 {
595 return CreateUnknownUserErrorResponse(); 595 return CreateUnknownUserErrorResponse();
596 } 596 }
597 } 597 }
598 else 598 else
599 { 599 {
600 return CreateUnknownUserErrorResponse(); 600 return CreateUnknownUserErrorResponse();
601 } 601 }
602 602
603 return ProfileToXmlRPCResponse(userProfile); 603 return ProfileToXmlRPCResponse(userProfile);
604 } 604 }
605 605
606 public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request) 606 public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request)
607 { 607 {
608 XmlRpcResponse response = new XmlRpcResponse(); 608 XmlRpcResponse response = new XmlRpcResponse();
609 Hashtable requestData = (Hashtable)request.Params[0]; 609 Hashtable requestData = (Hashtable)request.Params[0];
610 UserProfileData userProfile; 610 UserProfileData userProfile;
611 System.Console.WriteLine("METHOD BY UUID CALLED"); 611 System.Console.WriteLine("METHOD BY UUID CALLED");
612 if (requestData.Contains("avatar_uuid")) 612 if (requestData.Contains("avatar_uuid"))
613 { 613 {
614 userProfile = getUserProfile((LLUUID)requestData["avatar_uuid"]); 614 userProfile = getUserProfile((LLUUID)requestData["avatar_uuid"]);
615 if (userProfile == null) 615 if (userProfile == null)
616 { 616 {
617 return CreateUnknownUserErrorResponse(); 617 return CreateUnknownUserErrorResponse();
618 } 618 }
619 } 619 }
620 else 620 else
621 { 621 {
622 return CreateUnknownUserErrorResponse(); 622 return CreateUnknownUserErrorResponse();
623 } 623 }
624 624
625 625
626 return ProfileToXmlRPCResponse(userProfile); 626 return ProfileToXmlRPCResponse(userProfile);
627 } 627 }
628 #endregion 628 #endregion
629 629
630 } 630 }
631} 631}
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 4126ff4..5093f4d 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -1,406 +1,406 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.IO; 30using System.IO;
31using System.Text; 31using System.Text;
32using Db4objects.Db4o; 32using Db4objects.Db4o;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
37 37
38namespace OpenSim.Grid.AssetServer 38namespace OpenSim.Grid.AssetServer
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// An asset server 41 /// An asset server
42 /// </summary> 42 /// </summary>
43 public class OpenAsset_Main : conscmd_callback 43 public class OpenAsset_Main : conscmd_callback
44 { 44 {
45 private IObjectContainer db; 45 private IObjectContainer db;
46 46
47 public static OpenAsset_Main assetserver; 47 public static OpenAsset_Main assetserver;
48 48
49 private LogBase m_console; 49 private LogBase m_console;
50 50
51 [STAThread] 51 [STAThread]
52 public static void Main(string[] args) 52 public static void Main(string[] args)
53 { 53 {
54 Console.WriteLine("Starting...\n"); 54 Console.WriteLine("Starting...\n");
55 55
56 assetserver = new OpenAsset_Main(); 56 assetserver = new OpenAsset_Main();
57 assetserver.Startup(); 57 assetserver.Startup();
58 58
59 assetserver.Work(); 59 assetserver.Work();
60 } 60 }
61 61
62 private void Work() 62 private void Work()
63 { 63 {
64 m_console.Notice("Enter help for a list of commands"); 64 m_console.Notice("Enter help for a list of commands");
65 65
66 while (true) 66 while (true)
67 { 67 {
68 m_console.MainLogPrompt(); 68 m_console.MainLogPrompt();
69 } 69 }
70 } 70 }
71 71
72 private OpenAsset_Main() 72 private OpenAsset_Main()
73 { 73 {
74 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false); 74 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
75 MainLog.Instance = m_console; 75 MainLog.Instance = m_console;
76 } 76 }
77 77
78 public void Startup() 78 public void Startup()
79 { 79 {
80 m_console.Verbose("Main.cs:Startup() - Setting up asset DB"); 80 m_console.Verbose("Main.cs:Startup() - Setting up asset DB");
81 setupDB(); 81 setupDB();
82 82
83 m_console.Verbose("Main.cs:Startup() - Starting HTTP process"); 83 m_console.Verbose("Main.cs:Startup() - Starting HTTP process");
84 BaseHttpServer httpServer = new BaseHttpServer(8003); 84 BaseHttpServer httpServer = new BaseHttpServer(8003);
85 85
86 httpServer.AddStreamHandler( new GetAssetStreamHandler(this)); 86 httpServer.AddStreamHandler( new GetAssetStreamHandler(this));
87 httpServer.AddStreamHandler(new PostAssetStreamHandler( this )); 87 httpServer.AddStreamHandler(new PostAssetStreamHandler( this ));
88 88
89 //httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod); 89 //httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
90 //httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod); 90 //httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
91 91
92 httpServer.Start(); 92 httpServer.Start();
93 93
94 } 94 }
95 95
96 //public string AssetPostMethod(string requestBody, string path, string param) 96 //public string AssetPostMethod(string requestBody, string path, string param)
97 //{ 97 //{
98 // AssetBase asset = new AssetBase(); 98 // AssetBase asset = new AssetBase();
99 // asset.Name = ""; 99 // asset.Name = "";
100 // asset.FullID = new LLUUID(param); 100 // asset.FullID = new LLUUID(param);
101 // Encoding Windows1252Encoding = Encoding.GetEncoding(1252); 101 // Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
102 // byte[] buffer = Windows1252Encoding.GetBytes(requestBody); 102 // byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
103 // asset.Data = buffer; 103 // asset.Data = buffer;
104 // AssetStorage store = new AssetStorage(); 104 // AssetStorage store = new AssetStorage();
105 // store.Data = asset.Data; 105 // store.Data = asset.Data;
106 // store.Name = asset.Name; 106 // store.Name = asset.Name;
107 // store.UUID = asset.FullID; 107 // store.UUID = asset.FullID;
108 // db.Set(store); 108 // db.Set(store);
109 // db.Commit(); 109 // db.Commit();
110 // return ""; 110 // return "";
111 //} 111 //}
112 112
113 //public string AssetGetMethod(string request, string path, string param) 113 //public string AssetGetMethod(string request, string path, string param)
114 //{ 114 //{
115 // Console.WriteLine("got a request " + param); 115 // Console.WriteLine("got a request " + param);
116 // byte[] assetdata = GetAssetData(new LLUUID(param), false); 116 // byte[] assetdata = GetAssetData(new LLUUID(param), false);
117 // if (assetdata != null) 117 // if (assetdata != null)
118 // { 118 // {
119 // Encoding Windows1252Encoding = Encoding.GetEncoding(1252); 119 // Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
120 // string ret = Windows1252Encoding.GetString(assetdata); 120 // string ret = Windows1252Encoding.GetString(assetdata);
121 // //string ret = System.Text.Encoding.Unicode.GetString(assetdata); 121 // //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
122 122
123 // return ret; 123 // return ret;
124 124
125 // } 125 // }
126 // else 126 // else
127 // { 127 // {
128 // return ""; 128 // return "";
129 // } 129 // }
130 130
131 //} 131 //}
132 132
133 public byte[] GetAssetData(LLUUID assetID, bool isTexture) 133 public byte[] GetAssetData(LLUUID assetID, bool isTexture)
134 { 134 {
135 bool found = false; 135 bool found = false;
136 AssetStorage foundAsset = null; 136 AssetStorage foundAsset = null;
137 137
138 IObjectSet result = db.Get(new AssetStorage(assetID)); 138 IObjectSet result = db.Get(new AssetStorage(assetID));
139 if (result.Count > 0) 139 if (result.Count > 0)
140 { 140 {
141 foundAsset = (AssetStorage)result.Next(); 141 foundAsset = (AssetStorage)result.Next();
142 found = true; 142 found = true;
143 } 143 }
144 144
145 if (found) 145 if (found)
146 { 146 {
147 return foundAsset.Data; 147 return foundAsset.Data;
148 } 148 }
149 else 149 else
150 { 150 {
151 return null; 151 return null;
152 } 152 }
153 } 153 }
154 154
155 public void setupDB() 155 public void setupDB()
156 { 156 {
157 bool yapfile = File.Exists("gridassets.yap"); 157 bool yapfile = File.Exists("gridassets.yap");
158 try 158 try
159 { 159 {
160 db = Db4oFactory.OpenFile("gridassets.yap"); 160 db = Db4oFactory.OpenFile("gridassets.yap");
161 MainLog.Instance.Verbose("Main.cs:setupDB() - creation"); 161 MainLog.Instance.Verbose("Main.cs:setupDB() - creation");
162 } 162 }
163 catch (Exception e) 163 catch (Exception e)
164 { 164 {
165 db.Close(); 165 db.Close();
166 MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); 166 MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured");
167 MainLog.Instance.Warn(e.ToString()); 167 MainLog.Instance.Warn(e.ToString());
168 } 168 }
169 if (!yapfile) 169 if (!yapfile)
170 { 170 {
171 this.LoadDB(); 171 this.LoadDB();
172 } 172 }
173 } 173 }
174 174
175 public void LoadDB() 175 public void LoadDB()
176 { 176 {
177 try 177 try
178 { 178 {
179 179
180 Console.WriteLine("setting up Asset database"); 180 Console.WriteLine("setting up Asset database");
181 181
182 AssetBase Image = new AssetBase(); 182 AssetBase Image = new AssetBase();
183 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); 183 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
184 Image.Name = "Bricks"; 184 Image.Name = "Bricks";
185 this.LoadAsset(Image, true, "bricks.jp2"); 185 this.LoadAsset(Image, true, "bricks.jp2");
186 AssetStorage store = new AssetStorage(); 186 AssetStorage store = new AssetStorage();
187 store.Data = Image.Data; 187 store.Data = Image.Data;
188 store.Name = Image.Name; 188 store.Name = Image.Name;
189 store.UUID = Image.FullID; 189 store.UUID = Image.FullID;
190 db.Set(store); 190 db.Set(store);
191 db.Commit(); 191 db.Commit();
192 192
193 Image = new AssetBase(); 193 Image = new AssetBase();
194 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002"); 194 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
195 Image.Name = "Plywood"; 195 Image.Name = "Plywood";
196 this.LoadAsset(Image, true, "plywood.jp2"); 196 this.LoadAsset(Image, true, "plywood.jp2");
197 store = new AssetStorage(); 197 store = new AssetStorage();
198 store.Data = Image.Data; 198 store.Data = Image.Data;
199 store.Name = Image.Name; 199 store.Name = Image.Name;
200 store.UUID = Image.FullID; 200 store.UUID = Image.FullID;
201 db.Set(store); 201 db.Set(store);
202 db.Commit(); 202 db.Commit();
203 203
204 Image = new AssetBase(); 204 Image = new AssetBase();
205 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003"); 205 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
206 Image.Name = "Rocks"; 206 Image.Name = "Rocks";
207 this.LoadAsset(Image, true, "rocks.jp2"); 207 this.LoadAsset(Image, true, "rocks.jp2");
208 store = new AssetStorage(); 208 store = new AssetStorage();
209 store.Data = Image.Data; 209 store.Data = Image.Data;
210 store.Name = Image.Name; 210 store.Name = Image.Name;
211 store.UUID = Image.FullID; 211 store.UUID = Image.FullID;
212 db.Set(store); 212 db.Set(store);
213 db.Commit(); 213 db.Commit();
214 214
215 Image = new AssetBase(); 215 Image = new AssetBase();
216 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004"); 216 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
217 Image.Name = "Granite"; 217 Image.Name = "Granite";
218 this.LoadAsset(Image, true, "granite.jp2"); 218 this.LoadAsset(Image, true, "granite.jp2");
219 store = new AssetStorage(); 219 store = new AssetStorage();
220 store.Data = Image.Data; 220 store.Data = Image.Data;
221 store.Name = Image.Name; 221 store.Name = Image.Name;
222 store.UUID = Image.FullID; 222 store.UUID = Image.FullID;
223 db.Set(store); 223 db.Set(store);
224 db.Commit(); 224 db.Commit();
225 225
226 Image = new AssetBase(); 226 Image = new AssetBase();
227 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005"); 227 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
228 Image.Name = "Hardwood"; 228 Image.Name = "Hardwood";
229 this.LoadAsset(Image, true, "hardwood.jp2"); 229 this.LoadAsset(Image, true, "hardwood.jp2");
230 store = new AssetStorage(); 230 store = new AssetStorage();
231 store.Data = Image.Data; 231 store.Data = Image.Data;
232 store.Name = Image.Name; 232 store.Name = Image.Name;
233 store.UUID = Image.FullID; 233 store.UUID = Image.FullID;
234 db.Set(store); 234 db.Set(store);
235 db.Commit(); 235 db.Commit();
236 236
237 Image = new AssetBase(); 237 Image = new AssetBase();
238 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005"); 238 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
239 Image.Name = "Prim Base Texture"; 239 Image.Name = "Prim Base Texture";
240 this.LoadAsset(Image, true, "plywood.jp2"); 240 this.LoadAsset(Image, true, "plywood.jp2");
241 store = new AssetStorage(); 241 store = new AssetStorage();
242 store.Data = Image.Data; 242 store.Data = Image.Data;
243 store.Name = Image.Name; 243 store.Name = Image.Name;
244 store.UUID = Image.FullID; 244 store.UUID = Image.FullID;
245 db.Set(store); 245 db.Set(store);
246 db.Commit(); 246 db.Commit();
247 247
248 Image = new AssetBase(); 248 Image = new AssetBase();
249 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 249 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
250 Image.Name = "Shape"; 250 Image.Name = "Shape";
251 this.LoadAsset(Image, false, "base_shape.dat"); 251 this.LoadAsset(Image, false, "base_shape.dat");
252 store = new AssetStorage(); 252 store = new AssetStorage();
253 store.Data = Image.Data; 253 store.Data = Image.Data;
254 store.Name = Image.Name; 254 store.Name = Image.Name;
255 store.UUID = Image.FullID; 255 store.UUID = Image.FullID;
256 db.Set(store); 256 db.Set(store);
257 db.Commit(); 257 db.Commit();
258 } 258 }
259 catch (Exception e) 259 catch (Exception e)
260 { 260 {
261 Console.WriteLine(e.Message); 261 Console.WriteLine(e.Message);
262 } 262 }
263 } 263 }
264 264
265 private void LoadAsset(AssetBase info, bool image, string filename) 265 private void LoadAsset(AssetBase info, bool image, string filename)
266 { 266 {
267 267
268 268
269 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; 269 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
270 string fileName = Path.Combine(dataPath, filename); 270 string fileName = Path.Combine(dataPath, filename);
271 FileInfo fInfo = new FileInfo(fileName); 271 FileInfo fInfo = new FileInfo(fileName);
272 long numBytes = fInfo.Length; 272 long numBytes = fInfo.Length;
273 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); 273 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
274 byte[] idata = new byte[numBytes]; 274 byte[] idata = new byte[numBytes];
275 BinaryReader br = new BinaryReader(fStream); 275 BinaryReader br = new BinaryReader(fStream);
276 idata = br.ReadBytes((int)numBytes); 276 idata = br.ReadBytes((int)numBytes);
277 br.Close(); 277 br.Close();
278 fStream.Close(); 278 fStream.Close();
279 info.Data = idata; 279 info.Data = idata;
280 //info.loaded=true; 280 //info.loaded=true;
281 } 281 }
282 282
283 /*private GridConfig LoadConfigDll(string dllName) 283 /*private GridConfig LoadConfigDll(string dllName)
284 { 284 {
285 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 285 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
286 GridConfig config = null; 286 GridConfig config = null;
287 287
288 foreach (Type pluginType in pluginAssembly.GetTypes()) 288 foreach (Type pluginType in pluginAssembly.GetTypes())
289 { 289 {
290 if (pluginType.IsPublic) 290 if (pluginType.IsPublic)
291 { 291 {
292 if (!pluginType.IsAbstract) 292 if (!pluginType.IsAbstract)
293 { 293 {
294 Type typeInterface = pluginType.GetInterface("IGridConfig", true); 294 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
295 295
296 if (typeInterface != null) 296 if (typeInterface != null)
297 { 297 {
298 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 298 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
299 config = plug.GetConfigObject(); 299 config = plug.GetConfigObject();
300 break; 300 break;
301 } 301 }
302 302
303 typeInterface = null; 303 typeInterface = null;
304 } 304 }
305 } 305 }
306 } 306 }
307 pluginAssembly = null; 307 pluginAssembly = null;
308 return config; 308 return config;
309 }*/ 309 }*/
310 310
311 public void CreateAsset(LLUUID assetId, byte[] assetData) 311 public void CreateAsset(LLUUID assetId, byte[] assetData)
312 { 312 {
313 AssetBase asset = new AssetBase(); 313 AssetBase asset = new AssetBase();
314 asset.Name = ""; 314 asset.Name = "";
315 asset.FullID = assetId; 315 asset.FullID = assetId;
316 asset.Data = assetData; 316 asset.Data = assetData;
317 317
318 AssetStorage store = new AssetStorage(); 318 AssetStorage store = new AssetStorage();
319 store.Data = asset.Data; 319 store.Data = asset.Data;
320 store.Name = asset.Name; 320 store.Name = asset.Name;
321 store.UUID = asset.FullID; 321 store.UUID = asset.FullID;
322 db.Set(store); 322 db.Set(store);
323 db.Commit(); 323 db.Commit();
324 } 324 }
325 325
326 public void RunCmd(string cmd, string[] cmdparams) 326 public void RunCmd(string cmd, string[] cmdparams)
327 { 327 {
328 switch (cmd) 328 switch (cmd)
329 { 329 {
330 case "help": 330 case "help":
331 m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)"); 331 m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)");
332 break; 332 break;
333 333
334 case "shutdown": 334 case "shutdown":
335 m_console.Close(); 335 m_console.Close();
336 Environment.Exit(0); 336 Environment.Exit(0);
337 break; 337 break;
338 } 338 }
339 } 339 }
340 340
341 public void Show(string ShowWhat) 341 public void Show(string ShowWhat)
342 { 342 {
343 } 343 }
344 } 344 }
345 345
346 public class GetAssetStreamHandler : BaseStreamHandler 346 public class GetAssetStreamHandler : BaseStreamHandler
347 { 347 {
348 OpenAsset_Main m_assetManager; 348 OpenAsset_Main m_assetManager;
349 349
350 override public byte[] Handle(string path, Stream request) 350 override public byte[] Handle(string path, Stream request)
351 { 351 {
352 string param = GetParam(path); 352 string param = GetParam(path);
353 353
354 byte[] assetdata = m_assetManager.GetAssetData(new LLUUID(param), false); 354 byte[] assetdata = m_assetManager.GetAssetData(new LLUUID(param), false);
355 if (assetdata != null) 355 if (assetdata != null)
356 { 356 {
357 return assetdata; 357 return assetdata;
358 } 358 }
359 else 359 else
360 { 360 {
361 return new byte[]{}; 361 return new byte[]{};
362 } 362 }
363 } 363 }
364 364
365 public GetAssetStreamHandler(OpenAsset_Main assetManager):base( "/assets/", "GET") 365 public GetAssetStreamHandler(OpenAsset_Main assetManager):base( "/assets/", "GET")
366 { 366 {
367 m_assetManager = assetManager; 367 m_assetManager = assetManager;
368 } 368 }
369 } 369 }
370 370
371 public class PostAssetStreamHandler : BaseStreamHandler 371 public class PostAssetStreamHandler : BaseStreamHandler
372 { 372 {
373 OpenAsset_Main m_assetManager; 373 OpenAsset_Main m_assetManager;
374 374
375 override public byte[] Handle(string path, Stream request) 375 override public byte[] Handle(string path, Stream request)
376 { 376 {
377 string param = GetParam(path); 377 string param = GetParam(path);
378 LLUUID assetId = new LLUUID(param); 378 LLUUID assetId = new LLUUID(param);
379 byte[] txBuffer = new byte[4096]; 379 byte[] txBuffer = new byte[4096];
380 380
381 using( BinaryReader binReader = new BinaryReader( request ) ) 381 using( BinaryReader binReader = new BinaryReader( request ) )
382 { 382 {
383 using (MemoryStream memoryStream = new MemoryStream(4096)) 383 using (MemoryStream memoryStream = new MemoryStream(4096))
384 { 384 {
385 int count; 385 int count;
386 while ((count = binReader.Read(txBuffer, 0, 4096)) > 0) 386 while ((count = binReader.Read(txBuffer, 0, 4096)) > 0)
387 { 387 {
388 memoryStream.Write(txBuffer, 0, count); 388 memoryStream.Write(txBuffer, 0, count);
389 } 389 }
390 390
391 byte[] assetData = memoryStream.ToArray(); 391 byte[] assetData = memoryStream.ToArray();
392 392
393 m_assetManager.CreateAsset(assetId, assetData); 393 m_assetManager.CreateAsset(assetId, assetData);
394 } 394 }
395 } 395 }
396 396
397 return new byte[]{}; 397 return new byte[]{};
398 } 398 }
399 399
400 public PostAssetStreamHandler( OpenAsset_Main assetManager ) 400 public PostAssetStreamHandler( OpenAsset_Main assetManager )
401 : base("/assets/", "POST") 401 : base("/assets/", "POST")
402 { 402 {
403 m_assetManager = assetManager; 403 m_assetManager = assetManager;
404 } 404 }
405 } 405 }
406} 406}
diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
index dc39ce2..f9b48d5 100644
--- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
@@ -1,58 +1,58 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// General Information about an assembly is controlled through the following 30// General Information about an assembly is controlled through the following
31// set of attributes. Change these attribute values to modify the information 31// set of attributes. Change these attribute values to modify the information
32// associated with an assembly. 32// associated with an assembly.
33[assembly: AssemblyTitle("OGS-AssetServer")] 33[assembly: AssemblyTitle("OGS-AssetServer")]
34[assembly: AssemblyDescription("")] 34[assembly: AssemblyDescription("")]
35[assembly: AssemblyConfiguration("")] 35[assembly: AssemblyConfiguration("")]
36[assembly: AssemblyCompany("")] 36[assembly: AssemblyCompany("")]
37[assembly: AssemblyProduct("OGS-AssetServer")] 37[assembly: AssemblyProduct("OGS-AssetServer")]
38[assembly: AssemblyCopyright("Copyright © 2007")] 38[assembly: AssemblyCopyright("Copyright © 2007")]
39[assembly: AssemblyTrademark("")] 39[assembly: AssemblyTrademark("")]
40[assembly: AssemblyCulture("")] 40[assembly: AssemblyCulture("")]
41 41
42// Setting ComVisible to false makes the types in this assembly not visible 42// Setting ComVisible to false makes the types in this assembly not visible
43// to COM components. If you need to access a type in this assembly from 43// to COM components. If you need to access a type in this assembly from
44// COM, set the ComVisible attribute to true on that type. 44// COM, set the ComVisible attribute to true on that type.
45[assembly: ComVisible(false)] 45[assembly: ComVisible(false)]
46 46
47// The following GUID is for the ID of the typelib if this project is exposed to COM 47// The following GUID is for the ID of the typelib if this project is exposed to COM
48[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")] 48[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
49 49
50// Version information for an assembly consists of the following four values: 50// Version information for an assembly consists of the following four values:
51// 51//
52// Major Version 52// Major Version
53// Minor Version 53// Minor Version
54// Build Number 54// Build Number
55// Revision 55// Revision
56// 56//
57[assembly: AssemblyVersion("1.0.0.0")] 57[assembly: AssemblyVersion("1.0.0.0")]
58[assembly: AssemblyFileVersion("1.0.0.0")] 58[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs
index 6c916a2..989df26 100644
--- a/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs
+++ b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs
@@ -1,138 +1,138 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections; 28using System.Collections;
29using libsecondlife; 29using libsecondlife;
30using Nwc.XmlRpc; 30using Nwc.XmlRpc;
31using OpenSim.Framework.Servers; 31using OpenSim.Framework.Servers;
32 32
33namespace OpenSim.Framework.Manager 33namespace OpenSim.Framework.Manager
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// Used to pass messages to the gridserver 36 /// Used to pass messages to the gridserver
37 /// </summary> 37 /// </summary>
38 /// <param name="param">Pass this argument</param> 38 /// <param name="param">Pass this argument</param>
39 public delegate void GridManagerCallback(string param); 39 public delegate void GridManagerCallback(string param);
40 40
41 /// <summary> 41 /// <summary>
42 /// Serverside listener for grid commands 42 /// Serverside listener for grid commands
43 /// </summary> 43 /// </summary>
44 public class GridManagementAgent 44 public class GridManagementAgent
45 { 45 {
46 /// <summary> 46 /// <summary>
47 /// Passes grid server messages 47 /// Passes grid server messages
48 /// </summary> 48 /// </summary>
49 private GridManagerCallback thecallback; 49 private GridManagerCallback thecallback;
50 50
51 /// <summary> 51 /// <summary>
52 /// Security keys 52 /// Security keys
53 /// </summary> 53 /// </summary>
54 private string sendkey; 54 private string sendkey;
55 private string recvkey; 55 private string recvkey;
56 56
57 /// <summary> 57 /// <summary>
58 /// Our component type 58 /// Our component type
59 /// </summary> 59 /// </summary>
60 private string component_type; 60 private string component_type;
61 61
62 /// <summary> 62 /// <summary>
63 /// List of active sessions 63 /// List of active sessions
64 /// </summary> 64 /// </summary>
65 private static ArrayList Sessions; 65 private static ArrayList Sessions;
66 66
67 /// <summary> 67 /// <summary>
68 /// Initialises a new GridManagementAgent 68 /// Initialises a new GridManagementAgent
69 /// </summary> 69 /// </summary>
70 /// <param name="app_httpd">HTTP Daemon for this server</param> 70 /// <param name="app_httpd">HTTP Daemon for this server</param>
71 /// <param name="component_type">What component type are we?</param> 71 /// <param name="component_type">What component type are we?</param>
72 /// <param name="sendkey">Security send key</param> 72 /// <param name="sendkey">Security send key</param>
73 /// <param name="recvkey">Security recieve key</param> 73 /// <param name="recvkey">Security recieve key</param>
74 /// <param name="thecallback">Message callback</param> 74 /// <param name="thecallback">Message callback</param>
75 public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback) 75 public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
76 { 76 {
77 this.sendkey = sendkey; 77 this.sendkey = sendkey;
78 this.recvkey = recvkey; 78 this.recvkey = recvkey;
79 this.component_type = component_type; 79 this.component_type = component_type;
80 this.thecallback = thecallback; 80 this.thecallback = thecallback;
81 Sessions = new ArrayList(); 81 Sessions = new ArrayList();
82 82
83 app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod); 83 app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod);
84 84
85 switch (component_type) 85 switch (component_type)
86 { 86 {
87 case "gridserver": 87 case "gridserver":
88 GridServerManager.sendkey = this.sendkey; 88 GridServerManager.sendkey = this.sendkey;
89 GridServerManager.recvkey = this.recvkey; 89 GridServerManager.recvkey = this.recvkey;
90 GridServerManager.thecallback = thecallback; 90 GridServerManager.thecallback = thecallback;
91 app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod); 91 app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod);
92 break; 92 break;
93 } 93 }
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Checks if a session exists 97 /// Checks if a session exists
98 /// </summary> 98 /// </summary>
99 /// <param name="sessionID">The session ID</param> 99 /// <param name="sessionID">The session ID</param>
100 /// <returns>Exists?</returns> 100 /// <returns>Exists?</returns>
101 public static bool SessionExists(LLUUID sessionID) 101 public static bool SessionExists(LLUUID sessionID)
102 { 102 {
103 return Sessions.Contains(sessionID); 103 return Sessions.Contains(sessionID);
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// Logs a new session to the grid manager 107 /// Logs a new session to the grid manager
108 /// </summary> 108 /// </summary>
109 /// <param name="request">the XMLRPC request</param> 109 /// <param name="request">the XMLRPC request</param>
110 /// <returns>An XMLRPC reply</returns> 110 /// <returns>An XMLRPC reply</returns>
111 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) 111 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
112 { 112 {
113 XmlRpcResponse response = new XmlRpcResponse(); 113 XmlRpcResponse response = new XmlRpcResponse();
114 Hashtable requestData = (Hashtable)request.Params[0]; 114 Hashtable requestData = (Hashtable)request.Params[0];
115 Hashtable responseData = new Hashtable(); 115 Hashtable responseData = new Hashtable();
116 116
117 // TODO: Switch this over to using OpenSim.Framework.Data 117 // TODO: Switch this over to using OpenSim.Framework.Data
118 if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret")) 118 if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret"))
119 { 119 {
120 response.IsFault = false; 120 response.IsFault = false;
121 LLUUID new_session = LLUUID.Random(); 121 LLUUID new_session = LLUUID.Random();
122 Sessions.Add(new_session); 122 Sessions.Add(new_session);
123 responseData["session_id"] = new_session.ToString(); 123 responseData["session_id"] = new_session.ToString();
124 responseData["msg"] = "Login OK"; 124 responseData["msg"] = "Login OK";
125 } 125 }
126 else 126 else
127 { 127 {
128 response.IsFault = true; 128 response.IsFault = true;
129 responseData["error"] = "Invalid username or password"; 129 responseData["error"] = "Invalid username or password";
130 } 130 }
131 131
132 response.Value = responseData; 132 response.Value = responseData;
133 return response; 133 return response;
134 134
135 } 135 }
136 136
137 } 137 }
138} 138}
diff --git a/OpenSim/Grid/Framework.Manager/GridServerManager.cs b/OpenSim/Grid/Framework.Manager/GridServerManager.cs
index 67cd35d..729e42b 100644
--- a/OpenSim/Grid/Framework.Manager/GridServerManager.cs
+++ b/OpenSim/Grid/Framework.Manager/GridServerManager.cs
@@ -1,93 +1,93 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections; 30using System.Collections;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using libsecondlife;
33using Nwc.XmlRpc; 33using Nwc.XmlRpc;
34 34
35namespace OpenSim.Framework.Manager { 35namespace OpenSim.Framework.Manager {
36 36
37 /// <summary> 37 /// <summary>
38 /// A remote management system for the grid server 38 /// A remote management system for the grid server
39 /// </summary> 39 /// </summary>
40 public class GridServerManager 40 public class GridServerManager
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// Triggers events from the grid manager 43 /// Triggers events from the grid manager
44 /// </summary> 44 /// </summary>
45 public static GridManagerCallback thecallback; 45 public static GridManagerCallback thecallback;
46 46
47 /// <summary> 47 /// <summary>
48 /// Security keys 48 /// Security keys
49 /// </summary> 49 /// </summary>
50 public static string sendkey; 50 public static string sendkey;
51 public static string recvkey; 51 public static string recvkey;
52 52
53 /// <summary> 53 /// <summary>
54 /// Disconnects the grid server and shuts it down 54 /// Disconnects the grid server and shuts it down
55 /// </summary> 55 /// </summary>
56 /// <param name="request">XmlRpc Request</param> 56 /// <param name="request">XmlRpc Request</param>
57 /// <returns>An XmlRpc response containing either a "msg" or an "error"</returns> 57 /// <returns>An XmlRpc response containing either a "msg" or an "error"</returns>
58 public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) 58 public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request)
59 { 59 {
60 XmlRpcResponse response = new XmlRpcResponse(); 60 XmlRpcResponse response = new XmlRpcResponse();
61 Hashtable requestData = (Hashtable)request.Params[0]; 61 Hashtable requestData = (Hashtable)request.Params[0];
62 Hashtable responseData = new Hashtable(); 62 Hashtable responseData = new Hashtable();
63 63
64 if(requestData.ContainsKey("session_id")) { 64 if(requestData.ContainsKey("session_id")) {
65 if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) { 65 if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
66 responseData["msg"]="Shutdown command accepted"; 66 responseData["msg"]="Shutdown command accepted";
67 (new Thread(new ThreadStart(ShutdownServer))).Start(); 67 (new Thread(new ThreadStart(ShutdownServer))).Start();
68 } else { 68 } else {
69 response.IsFault=true; 69 response.IsFault=true;
70 responseData["error"]="bad session ID"; 70 responseData["error"]="bad session ID";
71 } 71 }
72 } else { 72 } else {
73 response.IsFault=true; 73 response.IsFault=true;
74 responseData["error"]="no session ID"; 74 responseData["error"]="no session ID";
75 } 75 }
76 76
77 response.Value = responseData; 77 response.Value = responseData;
78 return response; 78 return response;
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// Shuts down the grid server 82 /// Shuts down the grid server
83 /// </summary> 83 /// </summary>
84 public static void ShutdownServer() 84 public static void ShutdownServer()
85 { 85 {
86 Console.WriteLine("Shutting down the grid server - recieved a grid manager request"); 86 Console.WriteLine("Shutting down the grid server - recieved a grid manager request");
87 Console.WriteLine("Terminating in three seconds..."); 87 Console.WriteLine("Terminating in three seconds...");
88 Thread.Sleep(3000); 88 Thread.Sleep(3000);
89 thecallback("shutdown"); 89 thecallback("shutdown");
90 } 90 }
91 } 91 }
92} 92}
93 93
diff --git a/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs
index 39c9e8f..4aa58f8 100644
--- a/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs
+++ b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("GridConfig")] 36[assembly: AssemblyTitle("GridConfig")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("GridConfig")] 40[assembly: AssemblyProduct("GridConfig")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
index 4acf81d..7d7690b 100644
--- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
+++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
@@ -1,160 +1,160 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using Db4objects.Db4o; 29using Db4objects.Db4o;
30using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces; 31using OpenSim.Framework.Interfaces;
32 32
33namespace OpenGrid.Config.GridConfigDb4o 33namespace OpenGrid.Config.GridConfigDb4o
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// A grid configuration interface for returning the DB4o Config Provider 36 /// A grid configuration interface for returning the DB4o Config Provider
37 /// </summary> 37 /// </summary>
38 public class Db40ConfigPlugin: IGridConfig 38 public class Db40ConfigPlugin: IGridConfig
39 { 39 {
40 /// <summary> 40 /// <summary>
41 /// Loads and returns a configuration objeect 41 /// Loads and returns a configuration objeect
42 /// </summary> 42 /// </summary>
43 /// <returns>A grid configuration object</returns> 43 /// <returns>A grid configuration object</returns>
44 public GridConfig GetConfigObject() 44 public GridConfig GetConfigObject()
45 { 45 {
46 MainLog.Instance.Verbose("Loading Db40Config dll"); 46 MainLog.Instance.Verbose("Loading Db40Config dll");
47 return ( new DbGridConfig()); 47 return ( new DbGridConfig());
48 } 48 }
49 } 49 }
50 50
51 /// <summary> 51 /// <summary>
52 /// A DB4o based Gridserver configuration object 52 /// A DB4o based Gridserver configuration object
53 /// </summary> 53 /// </summary>
54 public class DbGridConfig : GridConfig 54 public class DbGridConfig : GridConfig
55 { 55 {
56 /// <summary> 56 /// <summary>
57 /// The DB4o Database 57 /// The DB4o Database
58 /// </summary> 58 /// </summary>
59 private IObjectContainer db; 59 private IObjectContainer db;
60 60
61 /// <summary> 61 /// <summary>
62 /// User configuration for the Grid Config interfaces 62 /// User configuration for the Grid Config interfaces
63 /// </summary> 63 /// </summary>
64 public void LoadDefaults() { 64 public void LoadDefaults() {
65 MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); 65 MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
66 66
67 // About the grid options 67 // About the grid options
68 this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); 68 this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team");
69 69
70 // Asset Options 70 // Asset Options
71 this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); 71 this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
72 this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); 72 this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null");
73 this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); 73 this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null");
74 74
75 // User Server Options 75 // User Server Options
76 this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); 76 this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
77 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); 77 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null");
78 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); 78 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null");
79 79
80 // Region Server Options 80 // Region Server Options
81 this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); 81 this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null");
82 this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); 82 this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null");
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// Initialises a new configuration object 86 /// Initialises a new configuration object
87 /// </summary> 87 /// </summary>
88 public override void InitConfig() { 88 public override void InitConfig() {
89 try { 89 try {
90 // Perform Db4o initialisation 90 // Perform Db4o initialisation
91 db = Db4oFactory.OpenFile("opengrid.yap"); 91 db = Db4oFactory.OpenFile("opengrid.yap");
92 92
93 // Locate the grid configuration object 93 // Locate the grid configuration object
94 IObjectSet result = db.Get(typeof(DbGridConfig)); 94 IObjectSet result = db.Get(typeof(DbGridConfig));
95 // Found? 95 // Found?
96 if(result.Count==1) { 96 if(result.Count==1) {
97 MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); 97 MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
98 foreach (DbGridConfig cfg in result) { 98 foreach (DbGridConfig cfg in result) {
99 // Import each setting into this class 99 // Import each setting into this class
100 // Grid Settings 100 // Grid Settings
101 this.GridOwner=cfg.GridOwner; 101 this.GridOwner=cfg.GridOwner;
102 // Asset Settings 102 // Asset Settings
103 this.DefaultAssetServer=cfg.DefaultAssetServer; 103 this.DefaultAssetServer=cfg.DefaultAssetServer;
104 this.AssetSendKey=cfg.AssetSendKey; 104 this.AssetSendKey=cfg.AssetSendKey;
105 this.AssetRecvKey=cfg.AssetRecvKey; 105 this.AssetRecvKey=cfg.AssetRecvKey;
106 // User Settings 106 // User Settings
107 this.DefaultUserServer=cfg.DefaultUserServer; 107 this.DefaultUserServer=cfg.DefaultUserServer;
108 this.UserSendKey=cfg.UserSendKey; 108 this.UserSendKey=cfg.UserSendKey;
109 this.UserRecvKey=cfg.UserRecvKey; 109 this.UserRecvKey=cfg.UserRecvKey;
110 // Region Settings 110 // Region Settings
111 this.SimSendKey=cfg.SimSendKey; 111 this.SimSendKey=cfg.SimSendKey;
112 this.SimRecvKey=cfg.SimRecvKey; 112 this.SimRecvKey=cfg.SimRecvKey;
113 } 113 }
114 // Create a new configuration object from this class 114 // Create a new configuration object from this class
115 } else { 115 } else {
116 MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); 116 MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
117 117
118 // Load default settings into this class 118 // Load default settings into this class
119 LoadDefaults(); 119 LoadDefaults();
120 120
121 // Saves to the database file... 121 // Saves to the database file...
122 MainLog.Instance.Verbose( "Writing out default settings to local database"); 122 MainLog.Instance.Verbose( "Writing out default settings to local database");
123 db.Set(this); 123 db.Set(this);
124 124
125 // Closes file locks 125 // Closes file locks
126 db.Close(); 126 db.Close();
127 } 127 }
128 } catch(Exception e) { 128 } catch(Exception e) {
129 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 129 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
130 MainLog.Instance.Warn(e.ToString()); 130 MainLog.Instance.Warn(e.ToString());
131 } 131 }
132 132
133 // Grid Settings 133 // Grid Settings
134 MainLog.Instance.Verbose("Grid settings loaded:"); 134 MainLog.Instance.Verbose("Grid settings loaded:");
135 MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); 135 MainLog.Instance.Verbose("Grid owner: " + this.GridOwner);
136 136
137 // Asset Settings 137 // Asset Settings
138 MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); 138 MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer);
139 MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); 139 MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey);
140 MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); 140 MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey);
141 141
142 // User Settings 142 // User Settings
143 MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); 143 MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer);
144 MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); 144 MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey);
145 MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); 145 MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey);
146 146
147 // Region Settings 147 // Region Settings
148 MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); 148 MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey);
149 MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); 149 MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey);
150 } 150 }
151 151
152 /// <summary> 152 /// <summary>
153 /// Closes down the database and releases filesystem locks 153 /// Closes down the database and releases filesystem locks
154 /// </summary> 154 /// </summary>
155 public void Shutdown() { 155 public void Shutdown() {
156 db.Close(); 156 db.Close();
157 } 157 }
158 } 158 }
159 159
160} 160}
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 64b51b4..22bffa0 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -1,710 +1,710 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using libsecondlife; 33using libsecondlife;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Data; 36using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Utilities; 38using OpenSim.Framework.Utilities;
39 39
40namespace OpenSim.Grid.GridServer 40namespace OpenSim.Grid.GridServer
41{ 41{
42 class GridManager 42 class GridManager
43 { 43 {
44 Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); 44 Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>();
45 Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); 45 Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>();
46 46
47 public GridConfig config; 47 public GridConfig config;
48 48
49 /// <summary> 49 /// <summary>
50 /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. 50 /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded.
51 /// </summary> 51 /// </summary>
52 /// <param name="FileName">The filename to the grid server plugin DLL</param> 52 /// <param name="FileName">The filename to the grid server plugin DLL</param>
53 public void AddPlugin(string FileName) 53 public void AddPlugin(string FileName)
54 { 54 {
55 MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); 55 MainLog.Instance.Verbose("Storage: Attempting to load " + FileName);
56 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 56 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
57 57
58 MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 58 MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
59 foreach (Type pluginType in pluginAssembly.GetTypes()) 59 foreach (Type pluginType in pluginAssembly.GetTypes())
60 { 60 {
61 if (!pluginType.IsAbstract) 61 if (!pluginType.IsAbstract)
62 { 62 {
63 // Regions go here 63 // Regions go here
64 Type typeInterface = pluginType.GetInterface("IGridData", true); 64 Type typeInterface = pluginType.GetInterface("IGridData", true);
65 65
66 if (typeInterface != null) 66 if (typeInterface != null)
67 { 67 {
68 IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 68 IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
69 plug.Initialise(); 69 plug.Initialise();
70 this._plugins.Add(plug.getName(), plug); 70 this._plugins.Add(plug.getName(), plug);
71 MainLog.Instance.Verbose("Storage: Added IGridData Interface"); 71 MainLog.Instance.Verbose("Storage: Added IGridData Interface");
72 } 72 }
73 73
74 typeInterface = null; 74 typeInterface = null;
75 75
76 // Logs go here 76 // Logs go here
77 typeInterface = pluginType.GetInterface("ILogData", true); 77 typeInterface = pluginType.GetInterface("ILogData", true);
78 78
79 if (typeInterface != null) 79 if (typeInterface != null)
80 { 80 {
81 ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 81 ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
82 plug.Initialise(); 82 plug.Initialise();
83 this._logplugins.Add(plug.getName(), plug); 83 this._logplugins.Add(plug.getName(), plug);
84 MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); 84 MainLog.Instance.Verbose( "Storage: Added ILogData Interface");
85 } 85 }
86 86
87 typeInterface = null; 87 typeInterface = null;
88 } 88 }
89 } 89 }
90 90
91 pluginAssembly = null; 91 pluginAssembly = null;
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// Logs a piece of information to the database 95 /// Logs a piece of information to the database
96 /// </summary> 96 /// </summary>
97 /// <param name="target">What you were operating on (in grid server, this will likely be the region UUIDs)</param> 97 /// <param name="target">What you were operating on (in grid server, this will likely be the region UUIDs)</param>
98 /// <param name="method">Which method is being called?</param> 98 /// <param name="method">Which method is being called?</param>
99 /// <param name="args">What arguments are being passed?</param> 99 /// <param name="args">What arguments are being passed?</param>
100 /// <param name="priority">How high priority is this? 1 = Max, 6 = Verbose</param> 100 /// <param name="priority">How high priority is this? 1 = Max, 6 = Verbose</param>
101 /// <param name="message">The message to log</param> 101 /// <param name="message">The message to log</param>
102 private void logToDB(string target, string method, string args, int priority, string message) 102 private void logToDB(string target, string method, string args, int priority, string message)
103 { 103 {
104 foreach (KeyValuePair<string, ILogData> kvp in _logplugins) 104 foreach (KeyValuePair<string, ILogData> kvp in _logplugins)
105 { 105 {
106 try 106 try
107 { 107 {
108 kvp.Value.saveLog("Gridserver", target, method, args, priority, message); 108 kvp.Value.saveLog("Gridserver", target, method, args, priority, message);
109 } 109 }
110 catch (Exception) 110 catch (Exception)
111 { 111 {
112 MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); 112 MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key);
113 } 113 }
114 } 114 }
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Returns a region by argument 118 /// Returns a region by argument
119 /// </summary> 119 /// </summary>
120 /// <param name="uuid">A UUID key of the region to return</param> 120 /// <param name="uuid">A UUID key of the region to return</param>
121 /// <returns>A SimProfileData for the region</returns> 121 /// <returns>A SimProfileData for the region</returns>
122 public SimProfileData getRegion(LLUUID uuid) 122 public SimProfileData getRegion(LLUUID uuid)
123 { 123 {
124 foreach(KeyValuePair<string,IGridData> kvp in _plugins) { 124 foreach(KeyValuePair<string,IGridData> kvp in _plugins) {
125 try 125 try
126 { 126 {
127 return kvp.Value.GetProfileByLLUUID(uuid); 127 return kvp.Value.GetProfileByLLUUID(uuid);
128 } 128 }
129 catch (Exception e) 129 catch (Exception e)
130 { 130 {
131 MainLog.Instance.Warn("Message from Storage: " + e.Message); 131 MainLog.Instance.Warn("Message from Storage: " + e.Message);
132 } 132 }
133 } 133 }
134 return null; 134 return null;
135 } 135 }
136 136
137 /// <summary> 137 /// <summary>
138 /// Returns a region by argument 138 /// Returns a region by argument
139 /// </summary> 139 /// </summary>
140 /// <param name="uuid">A regionHandle of the region to return</param> 140 /// <param name="uuid">A regionHandle of the region to return</param>
141 /// <returns>A SimProfileData for the region</returns> 141 /// <returns>A SimProfileData for the region</returns>
142 public SimProfileData getRegion(ulong handle) 142 public SimProfileData getRegion(ulong handle)
143 { 143 {
144 foreach (KeyValuePair<string, IGridData> kvp in _plugins) 144 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
145 { 145 {
146 try 146 try
147 { 147 {
148 return kvp.Value.GetProfileByHandle(handle); 148 return kvp.Value.GetProfileByHandle(handle);
149 } 149 }
150 catch 150 catch
151 { 151 {
152 MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); 152 MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
153 } 153 }
154 } 154 }
155 return null; 155 return null;
156 } 156 }
157 157
158 public Dictionary<ulong, SimProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax) 158 public Dictionary<ulong, SimProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax)
159 { 159 {
160 Dictionary<ulong, SimProfileData> regions = new Dictionary<ulong, SimProfileData>(); 160 Dictionary<ulong, SimProfileData> regions = new Dictionary<ulong, SimProfileData>();
161 161
162 SimProfileData[] neighbours; 162 SimProfileData[] neighbours;
163 163
164 foreach (KeyValuePair<string, IGridData> kvp in _plugins) 164 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
165 { 165 {
166 try 166 try
167 { 167 {
168 neighbours = kvp.Value.GetProfilesInRange(xmin, ymin, xmax, ymax); 168 neighbours = kvp.Value.GetProfilesInRange(xmin, ymin, xmax, ymax);
169 foreach (SimProfileData neighbour in neighbours) 169 foreach (SimProfileData neighbour in neighbours)
170 { 170 {
171 regions[neighbour.regionHandle] = neighbour; 171 regions[neighbour.regionHandle] = neighbour;
172 } 172 }
173 } 173 }
174 catch 174 catch
175 { 175 {
176 MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); 176 MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key);
177 } 177 }
178 } 178 }
179 179
180 return regions; 180 return regions;
181 } 181 }
182 182
183 183
184 184
185 /// <summary> 185 /// <summary>
186 /// Returns a XML String containing a list of the neighbouring regions 186 /// Returns a XML String containing a list of the neighbouring regions
187 /// </summary> 187 /// </summary>
188 /// <param name="reqhandle">The regionhandle for the center sim</param> 188 /// <param name="reqhandle">The regionhandle for the center sim</param>
189 /// <returns>An XML string containing neighbour entities</returns> 189 /// <returns>An XML string containing neighbour entities</returns>
190 public string GetXMLNeighbours(ulong reqhandle) 190 public string GetXMLNeighbours(ulong reqhandle)
191 { 191 {
192 string response = ""; 192 string response = "";
193 SimProfileData central_region = getRegion(reqhandle); 193 SimProfileData central_region = getRegion(reqhandle);
194 SimProfileData neighbour; 194 SimProfileData neighbour;
195 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++) 195 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
196 { 196 {
197 if (getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)) != null) 197 if (getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)) != null)
198 { 198 {
199 neighbour = getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)); 199 neighbour = getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256));
200 response += "<neighbour>"; 200 response += "<neighbour>";
201 response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>"; 201 response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>";
202 response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>"; 202 response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>";
203 response += "<locx>" + neighbour.regionLocX.ToString() + "</locx>"; 203 response += "<locx>" + neighbour.regionLocX.ToString() + "</locx>";
204 response += "<locy>" + neighbour.regionLocY.ToString() + "</locy>"; 204 response += "<locy>" + neighbour.regionLocY.ToString() + "</locy>";
205 response += "<regionhandle>" + neighbour.regionHandle.ToString() + "</regionhandle>"; 205 response += "<regionhandle>" + neighbour.regionHandle.ToString() + "</regionhandle>";
206 response += "</neighbour>"; 206 response += "</neighbour>";
207 207
208 } 208 }
209 } 209 }
210 return response; 210 return response;
211 } 211 }
212 212
213 /// <summary> 213 /// <summary>
214 /// Performed when a region connects to the grid server initially. 214 /// Performed when a region connects to the grid server initially.
215 /// </summary> 215 /// </summary>
216 /// <param name="request">The XMLRPC Request</param> 216 /// <param name="request">The XMLRPC Request</param>
217 /// <returns>Startup parameters</returns> 217 /// <returns>Startup parameters</returns>
218 public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request) 218 public XmlRpcResponse XmlRpcSimulatorLoginMethod(XmlRpcRequest request)
219 { 219 {
220 220
221 XmlRpcResponse response = new XmlRpcResponse(); 221 XmlRpcResponse response = new XmlRpcResponse();
222 Hashtable responseData = new Hashtable(); 222 Hashtable responseData = new Hashtable();
223 response.Value = responseData; 223 response.Value = responseData;
224 224
225 SimProfileData TheSim = null; 225 SimProfileData TheSim = null;
226 Hashtable requestData = (Hashtable)request.Params[0]; 226 Hashtable requestData = (Hashtable)request.Params[0];
227 227
228 if (requestData.ContainsKey("UUID")) 228 if (requestData.ContainsKey("UUID"))
229 { 229 {
230 TheSim = getRegion(new LLUUID((string)requestData["UUID"])); 230 TheSim = getRegion(new LLUUID((string)requestData["UUID"]));
231 231
232 logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID."); 232 logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcSimulatorLoginMethod","", 5,"Region attempting login with UUID.");
233 } 233 }
234 else if (requestData.ContainsKey("region_handle")) 234 else if (requestData.ContainsKey("region_handle"))
235 { 235 {
236 236
237 TheSim = getRegion((ulong)Convert.ToUInt64(requestData["region_handle"])); 237 TheSim = getRegion((ulong)Convert.ToUInt64(requestData["region_handle"]));
238 logToDB((string)requestData["region_handle"], "XmlRpcSimulatorLoginMethod", "", 5, "Region attempting login with regionHandle."); 238 logToDB((string)requestData["region_handle"], "XmlRpcSimulatorLoginMethod", "", 5, "Region attempting login with regionHandle.");
239 } 239 }
240 else 240 else
241 { 241 {
242 responseData["error"] = "No UUID or region_handle passed to grid server - unable to connect you"; 242 responseData["error"] = "No UUID or region_handle passed to grid server - unable to connect you";
243 return response; 243 return response;
244 } 244 }
245 245
246 if (TheSim == null) // Shouldnt this be in the REST Simulator Set method? 246 if (TheSim == null) // Shouldnt this be in the REST Simulator Set method?
247 { 247 {
248 //NEW REGION 248 //NEW REGION
249 TheSim = new SimProfileData(); 249 TheSim = new SimProfileData();
250 250
251 TheSim.regionRecvKey = config.SimRecvKey; 251 TheSim.regionRecvKey = config.SimRecvKey;
252 TheSim.regionSendKey = config.SimSendKey; 252 TheSim.regionSendKey = config.SimSendKey;
253 TheSim.regionSecret = config.SimRecvKey; 253 TheSim.regionSecret = config.SimRecvKey;
254 TheSim.regionDataURI = ""; 254 TheSim.regionDataURI = "";
255 TheSim.regionAssetURI = config.DefaultAssetServer; 255 TheSim.regionAssetURI = config.DefaultAssetServer;
256 TheSim.regionAssetRecvKey = config.AssetRecvKey; 256 TheSim.regionAssetRecvKey = config.AssetRecvKey;
257 TheSim.regionAssetSendKey = config.AssetSendKey; 257 TheSim.regionAssetSendKey = config.AssetSendKey;
258 TheSim.regionUserURI = config.DefaultUserServer; 258 TheSim.regionUserURI = config.DefaultUserServer;
259 TheSim.regionUserSendKey = config.UserSendKey; 259 TheSim.regionUserSendKey = config.UserSendKey;
260 TheSim.regionUserRecvKey = config.UserRecvKey; 260 TheSim.regionUserRecvKey = config.UserRecvKey;
261 261
262 TheSim.serverIP = (string)requestData["sim_ip"]; 262 TheSim.serverIP = (string)requestData["sim_ip"];
263 TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); 263 TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]);
264 TheSim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); 264 TheSim.httpPort = Convert.ToUInt32((string)requestData["http_port"]);
265 TheSim.remotingPort = Convert.ToUInt32((string)requestData["remoting_port"]); 265 TheSim.remotingPort = Convert.ToUInt32((string)requestData["remoting_port"]);
266 TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]); 266 TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]);
267 TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); 267 TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]);
268 TheSim.regionLocZ = 0; 268 TheSim.regionLocZ = 0;
269 TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]); 269 TheSim.regionMapTextureID = new LLUUID((string)requestData["map-image-id"]);
270 270
271 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); 271 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
272 System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.regionHandle); 272 System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.regionHandle);
273 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; 273 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
274 TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/"; 274 TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/";
275 275
276 Console.WriteLine("NEW SIM: " + TheSim.serverURI); 276 Console.WriteLine("NEW SIM: " + TheSim.serverURI);
277 TheSim.regionName = (string)requestData["sim_name"]; 277 TheSim.regionName = (string)requestData["sim_name"];
278 TheSim.UUID = new LLUUID((string)requestData["UUID"]); 278 TheSim.UUID = new LLUUID((string)requestData["UUID"]);
279 279
280 foreach (KeyValuePair<string, IGridData> kvp in _plugins) 280 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
281 { 281 {
282 try 282 try
283 { 283 {
284 DataResponse insertResponse = kvp.Value.AddProfile(TheSim); 284 DataResponse insertResponse = kvp.Value.AddProfile(TheSim);
285 switch(insertResponse) 285 switch(insertResponse)
286 { 286 {
287 case DataResponse.RESPONSE_OK: 287 case DataResponse.RESPONSE_OK:
288 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim creation successful: " + TheSim.regionName); 288 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim creation successful: " + TheSim.regionName);
289 break; 289 break;
290 case DataResponse.RESPONSE_ERROR: 290 case DataResponse.RESPONSE_ERROR:
291 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Error): " + TheSim.regionName); 291 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Error): " + TheSim.regionName);
292 break; 292 break;
293 case DataResponse.RESPONSE_INVALIDCREDENTIALS: 293 case DataResponse.RESPONSE_INVALIDCREDENTIALS:
294 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Invalid Credentials): " + TheSim.regionName); 294 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Invalid Credentials): " + TheSim.regionName);
295 break; 295 break;
296 case DataResponse.RESPONSE_AUTHREQUIRED: 296 case DataResponse.RESPONSE_AUTHREQUIRED:
297 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Authentication Required): " + TheSim.regionName); 297 OpenSim.Framework.Console.MainLog.Instance.Warn("New sim creation failed (Authentication Required): " + TheSim.regionName);
298 break; 298 break;
299 } 299 }
300 300
301 } 301 }
302 catch (Exception e) 302 catch (Exception e)
303 { 303 {
304 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key); 304 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to add region " + TheSim.UUID.ToStringHyphenated() + " via " + kvp.Key);
305 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); 305 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
306 } 306 }
307 } 307 }
308 308
309 309
310 if (getRegion(TheSim.regionHandle) == null) 310 if (getRegion(TheSim.regionHandle) == null)
311 { 311 {
312 responseData["error"] = "Unable to add new region"; 312 responseData["error"] = "Unable to add new region";
313 return response; 313 return response;
314 } 314 }
315 } 315 }
316 316
317 317
318 ArrayList SimNeighboursData = new ArrayList(); 318 ArrayList SimNeighboursData = new ArrayList();
319 319
320 SimProfileData neighbour; 320 SimProfileData neighbour;
321 Hashtable NeighbourBlock; 321 Hashtable NeighbourBlock;
322 322
323 bool fastMode = false; // Only compatible with MySQL right now 323 bool fastMode = false; // Only compatible with MySQL right now
324 324
325 if (fastMode) 325 if (fastMode)
326 { 326 {
327 Dictionary<ulong, SimProfileData> neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1); 327 Dictionary<ulong, SimProfileData> neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1);
328 328
329 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours) 329 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours)
330 { 330 {
331 NeighbourBlock = new Hashtable(); 331 NeighbourBlock = new Hashtable();
332 NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString(); 332 NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString();
333 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString(); 333 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString();
334 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString(); 334 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString();
335 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString(); 335 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString();
336 NeighbourBlock["UUID"] = aSim.Value.UUID.ToString(); 336 NeighbourBlock["UUID"] = aSim.Value.UUID.ToString();
337 337
338 if (aSim.Value.UUID != TheSim.UUID) 338 if (aSim.Value.UUID != TheSim.UUID)
339 SimNeighboursData.Add(NeighbourBlock); 339 SimNeighboursData.Add(NeighbourBlock);
340 } 340 }
341 } 341 }
342 else 342 else
343 { 343 {
344 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++) 344 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
345 { 345 {
346 if (getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)) != null) 346 if (getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)) != null)
347 { 347 {
348 neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)); 348 neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256));
349 349
350 NeighbourBlock = new Hashtable(); 350 NeighbourBlock = new Hashtable();
351 NeighbourBlock["sim_ip"] = neighbour.serverIP; 351 NeighbourBlock["sim_ip"] = neighbour.serverIP;
352 NeighbourBlock["sim_port"] = neighbour.serverPort.ToString(); 352 NeighbourBlock["sim_port"] = neighbour.serverPort.ToString();
353 NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString(); 353 NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString();
354 NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString(); 354 NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString();
355 NeighbourBlock["UUID"] = neighbour.UUID.ToString(); 355 NeighbourBlock["UUID"] = neighbour.UUID.ToString();
356 356
357 if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock); 357 if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
358 } 358 }
359 } 359 }
360 } 360 }
361 361
362 responseData["UUID"] = TheSim.UUID.ToString(); 362 responseData["UUID"] = TheSim.UUID.ToString();
363 responseData["region_locx"] = TheSim.regionLocX.ToString(); 363 responseData["region_locx"] = TheSim.regionLocX.ToString();
364 responseData["region_locy"] = TheSim.regionLocY.ToString(); 364 responseData["region_locy"] = TheSim.regionLocY.ToString();
365 responseData["regionname"] = TheSim.regionName; 365 responseData["regionname"] = TheSim.regionName;
366 responseData["estate_id"] = "1"; 366 responseData["estate_id"] = "1";
367 responseData["neighbours"] = SimNeighboursData; 367 responseData["neighbours"] = SimNeighboursData;
368 368
369 responseData["sim_ip"] = TheSim.serverIP; 369 responseData["sim_ip"] = TheSim.serverIP;
370 responseData["sim_port"] = TheSim.serverPort.ToString(); 370 responseData["sim_port"] = TheSim.serverPort.ToString();
371 responseData["asset_url"] = TheSim.regionAssetURI; 371 responseData["asset_url"] = TheSim.regionAssetURI;
372 responseData["asset_sendkey"] = TheSim.regionAssetSendKey; 372 responseData["asset_sendkey"] = TheSim.regionAssetSendKey;
373 responseData["asset_recvkey"] = TheSim.regionAssetRecvKey; 373 responseData["asset_recvkey"] = TheSim.regionAssetRecvKey;
374 responseData["user_url"] = TheSim.regionUserURI; 374 responseData["user_url"] = TheSim.regionUserURI;
375 responseData["user_sendkey"] = TheSim.regionUserSendKey; 375 responseData["user_sendkey"] = TheSim.regionUserSendKey;
376 responseData["user_recvkey"] = TheSim.regionUserRecvKey; 376 responseData["user_recvkey"] = TheSim.regionUserRecvKey;
377 responseData["authkey"] = TheSim.regionSecret; 377 responseData["authkey"] = TheSim.regionSecret;
378 378
379 // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap) 379 // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap)
380 responseData["data_uri"] = TheSim.regionDataURI; 380 responseData["data_uri"] = TheSim.regionDataURI;
381 381
382 382
383 return response; 383 return response;
384 } 384 }
385 385
386 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request) 386 public XmlRpcResponse XmlRpcSimulatorDataRequestMethod(XmlRpcRequest request)
387 { 387 {
388 Hashtable requestData = (Hashtable)request.Params[0]; 388 Hashtable requestData = (Hashtable)request.Params[0];
389 Hashtable responseData = new Hashtable(); 389 Hashtable responseData = new Hashtable();
390 SimProfileData simData = null; 390 SimProfileData simData = null;
391 if (requestData.ContainsKey("region_UUID")) 391 if (requestData.ContainsKey("region_UUID"))
392 { 392 {
393 simData = getRegion(new LLUUID((string)requestData["region_UUID"])); 393 simData = getRegion(new LLUUID((string)requestData["region_UUID"]));
394 } 394 }
395 else if (requestData.ContainsKey("region_handle")) 395 else if (requestData.ContainsKey("region_handle"))
396 { 396 {
397 Console.WriteLine("requesting data for region " + (string)requestData["region_handle"]); 397 Console.WriteLine("requesting data for region " + (string)requestData["region_handle"]);
398 simData = getRegion(Convert.ToUInt64((string)requestData["region_handle"])); 398 simData = getRegion(Convert.ToUInt64((string)requestData["region_handle"]));
399 } 399 }
400 400
401 if (simData == null) 401 if (simData == null)
402 { 402 {
403 //Sim does not exist 403 //Sim does not exist
404 Console.WriteLine("region not found"); 404 Console.WriteLine("region not found");
405 responseData["error"] = "Sim does not exist"; 405 responseData["error"] = "Sim does not exist";
406 } 406 }
407 else 407 else
408 { 408 {
409 Console.WriteLine("found region"); 409 Console.WriteLine("found region");
410 responseData["sim_ip"] = simData.serverIP; 410 responseData["sim_ip"] = simData.serverIP;
411 responseData["sim_port"] = simData.serverPort.ToString(); 411 responseData["sim_port"] = simData.serverPort.ToString();
412 responseData["http_port"] = simData.httpPort.ToString(); 412 responseData["http_port"] = simData.httpPort.ToString();
413 responseData["remoting_port"] = simData.remotingPort.ToString(); 413 responseData["remoting_port"] = simData.remotingPort.ToString();
414 responseData["region_locx"] = simData.regionLocX.ToString() ; 414 responseData["region_locx"] = simData.regionLocX.ToString() ;
415 responseData["region_locy"] = simData.regionLocY.ToString(); 415 responseData["region_locy"] = simData.regionLocY.ToString();
416 responseData["region_UUID"] = simData.UUID.UUID.ToString(); 416 responseData["region_UUID"] = simData.UUID.UUID.ToString();
417 responseData["region_name"] = simData.regionName; 417 responseData["region_name"] = simData.regionName;
418 } 418 }
419 419
420 XmlRpcResponse response = new XmlRpcResponse(); 420 XmlRpcResponse response = new XmlRpcResponse();
421 response.Value = responseData; 421 response.Value = responseData;
422 return response; 422 return response;
423 } 423 }
424 424
425 public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request) 425 public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request)
426 { 426 {
427 int xmin=980, ymin=980, xmax=1020, ymax=1020; 427 int xmin=980, ymin=980, xmax=1020, ymax=1020;
428 428
429 Hashtable requestData = (Hashtable)request.Params[0]; 429 Hashtable requestData = (Hashtable)request.Params[0];
430 if (requestData.ContainsKey("xmin")) 430 if (requestData.ContainsKey("xmin"))
431 { 431 {
432 xmin = (Int32)requestData["xmin"]; 432 xmin = (Int32)requestData["xmin"];
433 } 433 }
434 if (requestData.ContainsKey("ymin")) 434 if (requestData.ContainsKey("ymin"))
435 { 435 {
436 ymin = (Int32)requestData["ymin"]; 436 ymin = (Int32)requestData["ymin"];
437 } 437 }
438 if (requestData.ContainsKey("xmax")) 438 if (requestData.ContainsKey("xmax"))
439 { 439 {
440 xmax = (Int32)requestData["xmax"]; 440 xmax = (Int32)requestData["xmax"];
441 } 441 }
442 if (requestData.ContainsKey("ymax")) 442 if (requestData.ContainsKey("ymax"))
443 { 443 {
444 ymax = (Int32)requestData["ymax"]; 444 ymax = (Int32)requestData["ymax"];
445 } 445 }
446 446
447 XmlRpcResponse response = new XmlRpcResponse(); 447 XmlRpcResponse response = new XmlRpcResponse();
448 Hashtable responseData = new Hashtable(); 448 Hashtable responseData = new Hashtable();
449 response.Value = responseData; 449 response.Value = responseData;
450 IList simProfileList = new ArrayList(); 450 IList simProfileList = new ArrayList();
451 451
452 bool fastMode = false; // MySQL Only 452 bool fastMode = false; // MySQL Only
453 453
454 if (fastMode) 454 if (fastMode)
455 { 455 {
456 Dictionary<ulong, SimProfileData> neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax); 456 Dictionary<ulong, SimProfileData> neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax);
457 457
458 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours) 458 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours)
459 { 459 {
460 Hashtable simProfileBlock = new Hashtable(); 460 Hashtable simProfileBlock = new Hashtable();
461 simProfileBlock["x"] = aSim.Value.regionLocX.ToString(); 461 simProfileBlock["x"] = aSim.Value.regionLocX.ToString();
462 simProfileBlock["y"] = aSim.Value.regionLocY.ToString(); 462 simProfileBlock["y"] = aSim.Value.regionLocY.ToString();
463 System.Console.WriteLine("send neighbour info for " + aSim.Value.regionLocX.ToString() + " , " + aSim.Value.regionLocY.ToString()); 463 System.Console.WriteLine("send neighbour info for " + aSim.Value.regionLocX.ToString() + " , " + aSim.Value.regionLocY.ToString());
464 simProfileBlock["name"] = aSim.Value.regionName; 464 simProfileBlock["name"] = aSim.Value.regionName;
465 simProfileBlock["access"] = 21; 465 simProfileBlock["access"] = 21;
466 simProfileBlock["region-flags"] = 512; 466 simProfileBlock["region-flags"] = 512;
467 simProfileBlock["water-height"] = 0; 467 simProfileBlock["water-height"] = 0;
468 simProfileBlock["agents"] = 1; 468 simProfileBlock["agents"] = 1;
469 simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString(); 469 simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString();
470 470
471 // For Sugilite compatibility 471 // For Sugilite compatibility
472 simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString(); 472 simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString();
473 simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString(); 473 simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
474 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); 474 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
475 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); 475 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
476 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); 476 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
477 477
478 simProfileList.Add(simProfileBlock); 478 simProfileList.Add(simProfileBlock);
479 } 479 }
480 MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); 480 MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode");
481 } 481 }
482 else 482 else
483 { 483 {
484 SimProfileData simProfile; 484 SimProfileData simProfile;
485 for (int x = xmin; x < xmax+1; x++) 485 for (int x = xmin; x < xmax+1; x++)
486 { 486 {
487 for (int y = ymin; y < ymax+1; y++) 487 for (int y = ymin; y < ymax+1; y++)
488 { 488 {
489 ulong regHandle = Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)); 489 ulong regHandle = Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256));
490 simProfile = getRegion(regHandle); 490 simProfile = getRegion(regHandle);
491 if (simProfile != null) 491 if (simProfile != null)
492 { 492 {
493 Hashtable simProfileBlock = new Hashtable(); 493 Hashtable simProfileBlock = new Hashtable();
494 simProfileBlock["x"] = x; 494 simProfileBlock["x"] = x;
495 simProfileBlock["y"] = y; 495 simProfileBlock["y"] = y;
496 simProfileBlock["name"] = simProfile.regionName; 496 simProfileBlock["name"] = simProfile.regionName;
497 simProfileBlock["access"] = 0; 497 simProfileBlock["access"] = 0;
498 simProfileBlock["region-flags"] = 0; 498 simProfileBlock["region-flags"] = 0;
499 simProfileBlock["water-height"] = 20; 499 simProfileBlock["water-height"] = 20;
500 simProfileBlock["agents"] = 1; 500 simProfileBlock["agents"] = 1;
501 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToStringHyphenated(); 501 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToStringHyphenated();
502 502
503 // For Sugilite compatibility 503 // For Sugilite compatibility
504 simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString(); 504 simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
505 simProfileBlock["sim_ip"] = simProfile.serverIP.ToString(); 505 simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
506 simProfileBlock["sim_port"] = simProfile.serverPort.ToString(); 506 simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
507 simProfileBlock["sim_uri"] = simProfile.serverURI.ToString(); 507 simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
508 simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated(); 508 simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
509 509
510 simProfileList.Add(simProfileBlock); 510 simProfileList.Add(simProfileBlock);
511 } 511 }
512 } 512 }
513 } 513 }
514 MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); 514 MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode");
515 } 515 }
516 516
517 responseData["sim-profiles"] = simProfileList; 517 responseData["sim-profiles"] = simProfileList;
518 518
519 return response; 519 return response;
520 } 520 }
521 521
522 522
523 523
524 /// <summary> 524 /// <summary>
525 /// Performs a REST Get Operation 525 /// Performs a REST Get Operation
526 /// </summary> 526 /// </summary>
527 /// <param name="request"></param> 527 /// <param name="request"></param>
528 /// <param name="path"></param> 528 /// <param name="path"></param>
529 /// <param name="param"></param> 529 /// <param name="param"></param>
530 /// <returns></returns> 530 /// <returns></returns>
531 public string RestGetRegionMethod(string request, string path, string param) 531 public string RestGetRegionMethod(string request, string path, string param)
532 { 532 {
533 return RestGetSimMethod("", "/sims/", param); 533 return RestGetSimMethod("", "/sims/", param);
534 } 534 }
535 535
536 /// <summary> 536 /// <summary>
537 /// Performs a REST Set Operation 537 /// Performs a REST Set Operation
538 /// </summary> 538 /// </summary>
539 /// <param name="request"></param> 539 /// <param name="request"></param>
540 /// <param name="path"></param> 540 /// <param name="path"></param>
541 /// <param name="param"></param> 541 /// <param name="param"></param>
542 /// <returns></returns> 542 /// <returns></returns>
543 public string RestSetRegionMethod(string request, string path, string param) 543 public string RestSetRegionMethod(string request, string path, string param)
544 { 544 {
545 return RestSetSimMethod("", "/sims/", param); 545 return RestSetSimMethod("", "/sims/", param);
546 } 546 }
547 547
548 /// <summary> 548 /// <summary>
549 /// Returns information about a sim via a REST Request 549 /// Returns information about a sim via a REST Request
550 /// </summary> 550 /// </summary>
551 /// <param name="request"></param> 551 /// <param name="request"></param>
552 /// <param name="path"></param> 552 /// <param name="path"></param>
553 /// <param name="param"></param> 553 /// <param name="param"></param>
554 /// <returns>Information about the sim in XML</returns> 554 /// <returns>Information about the sim in XML</returns>
555 public string RestGetSimMethod(string request, string path, string param) 555 public string RestGetSimMethod(string request, string path, string param)
556 { 556 {
557 string respstring = String.Empty; 557 string respstring = String.Empty;
558 558
559 SimProfileData TheSim; 559 SimProfileData TheSim;
560 LLUUID UUID = new LLUUID(param); 560 LLUUID UUID = new LLUUID(param);
561 TheSim = getRegion(UUID); 561 TheSim = getRegion(UUID);
562 562
563 if (!(TheSim == null)) 563 if (!(TheSim == null))
564 { 564 {
565 respstring = "<Root>"; 565 respstring = "<Root>";
566 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>"; 566 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
567 respstring += "<sim>"; 567 respstring += "<sim>";
568 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>"; 568 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
569 respstring += "<regionname>" + TheSim.regionName + "</regionname>"; 569 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
570 respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>"; 570 respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
571 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>"; 571 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
572 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>"; 572 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
573 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>"; 573 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
574 respstring += "<estate_id>1</estate_id>"; 574 respstring += "<estate_id>1</estate_id>";
575 respstring += "</sim>"; 575 respstring += "</sim>";
576 respstring += "</Root>"; 576 respstring += "</Root>";
577 } 577 }
578 578
579 return respstring; 579 return respstring;
580 } 580 }
581 581
582 /// <summary> 582 /// <summary>
583 /// Creates or updates a sim via a REST Method Request 583 /// Creates or updates a sim via a REST Method Request
584 /// BROKEN with SQL Update 584 /// BROKEN with SQL Update
585 /// </summary> 585 /// </summary>
586 /// <param name="request"></param> 586 /// <param name="request"></param>
587 /// <param name="path"></param> 587 /// <param name="path"></param>
588 /// <param name="param"></param> 588 /// <param name="param"></param>
589 /// <returns>"OK" or an error</returns> 589 /// <returns>"OK" or an error</returns>
590 public string RestSetSimMethod(string request, string path, string param) 590 public string RestSetSimMethod(string request, string path, string param)
591 { 591 {
592 Console.WriteLine("Processing region update via REST method"); 592 Console.WriteLine("Processing region update via REST method");
593 SimProfileData TheSim; 593 SimProfileData TheSim;
594 TheSim = getRegion(new LLUUID(param)); 594 TheSim = getRegion(new LLUUID(param));
595 if ((TheSim) == null) 595 if ((TheSim) == null)
596 { 596 {
597 TheSim = new SimProfileData(); 597 TheSim = new SimProfileData();
598 LLUUID UUID = new LLUUID(param); 598 LLUUID UUID = new LLUUID(param);
599 TheSim.UUID = UUID; 599 TheSim.UUID = UUID;
600 TheSim.regionRecvKey = config.SimRecvKey; 600 TheSim.regionRecvKey = config.SimRecvKey;
601 } 601 }
602 602
603 XmlDocument doc = new XmlDocument(); 603 XmlDocument doc = new XmlDocument();
604 doc.LoadXml(request); 604 doc.LoadXml(request);
605 XmlNode rootnode = doc.FirstChild; 605 XmlNode rootnode = doc.FirstChild;
606 XmlNode authkeynode = rootnode.ChildNodes[0]; 606 XmlNode authkeynode = rootnode.ChildNodes[0];
607 if (authkeynode.Name != "authkey") 607 if (authkeynode.Name != "authkey")
608 { 608 {
609 return "ERROR! bad XML - expected authkey tag"; 609 return "ERROR! bad XML - expected authkey tag";
610 } 610 }
611 611
612 XmlNode simnode = rootnode.ChildNodes[1]; 612 XmlNode simnode = rootnode.ChildNodes[1];
613 if (simnode.Name != "sim") 613 if (simnode.Name != "sim")
614 { 614 {
615 return "ERROR! bad XML - expected sim tag"; 615 return "ERROR! bad XML - expected sim tag";
616 } 616 }
617 617
618 //TheSim.regionSendKey = Cfg; 618 //TheSim.regionSendKey = Cfg;
619 TheSim.regionRecvKey = config.SimRecvKey; 619 TheSim.regionRecvKey = config.SimRecvKey;
620 TheSim.regionSendKey = config.SimSendKey; 620 TheSim.regionSendKey = config.SimSendKey;
621 TheSim.regionSecret = config.SimRecvKey; 621 TheSim.regionSecret = config.SimRecvKey;
622 TheSim.regionDataURI = ""; 622 TheSim.regionDataURI = "";
623 TheSim.regionAssetURI = config.DefaultAssetServer; 623 TheSim.regionAssetURI = config.DefaultAssetServer;
624 TheSim.regionAssetRecvKey = config.AssetRecvKey; 624 TheSim.regionAssetRecvKey = config.AssetRecvKey;
625 TheSim.regionAssetSendKey = config.AssetSendKey; 625 TheSim.regionAssetSendKey = config.AssetSendKey;
626 TheSim.regionUserURI = config.DefaultUserServer; 626 TheSim.regionUserURI = config.DefaultUserServer;
627 TheSim.regionUserSendKey = config.UserSendKey; 627 TheSim.regionUserSendKey = config.UserSendKey;
628 TheSim.regionUserRecvKey = config.UserRecvKey; 628 TheSim.regionUserRecvKey = config.UserRecvKey;
629 629
630 630
631 for (int i = 0; i < simnode.ChildNodes.Count; i++) 631 for (int i = 0; i < simnode.ChildNodes.Count; i++)
632 { 632 {
633 switch (simnode.ChildNodes[i].Name) 633 switch (simnode.ChildNodes[i].Name)
634 { 634 {
635 case "regionname": 635 case "regionname":
636 TheSim.regionName = simnode.ChildNodes[i].InnerText; 636 TheSim.regionName = simnode.ChildNodes[i].InnerText;
637 break; 637 break;
638 638
639 case "sim_ip": 639 case "sim_ip":
640 TheSim.serverIP = simnode.ChildNodes[i].InnerText; 640 TheSim.serverIP = simnode.ChildNodes[i].InnerText;
641 break; 641 break;
642 642
643 case "sim_port": 643 case "sim_port":
644 TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText); 644 TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
645 break; 645 break;
646 646
647 case "region_locx": 647 case "region_locx":
648 TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); 648 TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
649 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); 649 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
650 break; 650 break;
651 651
652 case "region_locy": 652 case "region_locy":
653 TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); 653 TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
654 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); 654 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
655 break; 655 break;
656 } 656 }
657 } 657 }
658 658
659 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; 659 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
660 660
661 bool requirePublic = false; 661 bool requirePublic = false;
662 bool requireValid = true; 662 bool requireValid = true;
663 663
664 if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255."))) 664 if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255.")))
665 { 665 {
666 return "ERROR! Servers must register with public addresses."; 666 return "ERROR! Servers must register with public addresses.";
667 } 667 }
668 668
669 if (requireValid && (TheSim.serverIP.StartsWith("0."))) 669 if (requireValid && (TheSim.serverIP.StartsWith("0.")))
670 { 670 {
671 return "ERROR! 0.*.*.* Addresses are invalid, please check your server config and try again"; 671 return "ERROR! 0.*.*.* Addresses are invalid, please check your server config and try again";
672 } 672 }
673 673
674 674
675 try 675 try
676 { 676 {
677 MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); 677 MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
678 foreach (KeyValuePair<string, IGridData> kvp in _plugins) 678 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
679 { 679 {
680 try 680 try
681 { 681 {
682 //Check reservations 682 //Check reservations
683 ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY); 683 ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY);
684 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey)) 684 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey))
685 { 685 {
686 kvp.Value.AddProfile(TheSim); 686 kvp.Value.AddProfile(TheSim);
687 MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); 687 MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
688 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); 688 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
689 } 689 }
690 else 690 else
691 { 691 {
692 MainLog.Instance.Warn("Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); 692 MainLog.Instance.Warn("Unable to update region (RestSetSimMethod): Incorrect reservation auth key.");// Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + ".");
693 return "Unable to update region (RestSetSimMethod): Incorrect auth key."; 693 return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
694 } 694 }
695 } 695 }
696 catch (Exception e) 696 catch (Exception e)
697 { 697 {
698 MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); 698 MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
699 } 699 }
700 } 700 }
701 return "OK"; 701 return "OK";
702 } 702 }
703 catch (Exception e) 703 catch (Exception e)
704 { 704 {
705 return "ERROR! Could not save to database! (" + e.ToString() + ")"; 705 return "ERROR! Could not save to database! (" + e.ToString() + ")";
706 } 706 }
707 } 707 }
708 708
709 } 709 }
710} 710}
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
index dc5e4fa..09aeab5 100644
--- a/OpenSim/Grid/GridServer/Main.cs
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -1,258 +1,258 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.Reflection; 30using System.Reflection;
31using System.Threading; 31using System.Threading;
32using System.Timers; 32using System.Timers;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
36using OpenSim.GenericConfig; 36using OpenSim.GenericConfig;
37using Timer=System.Timers.Timer; 37using Timer=System.Timers.Timer;
38 38
39namespace OpenSim.Grid.GridServer 39namespace OpenSim.Grid.GridServer
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// </summary> 42 /// </summary>
43 public class OpenGrid_Main : conscmd_callback 43 public class OpenGrid_Main : conscmd_callback
44 { 44 {
45 private string ConfigDll = "OpenSim.Grid.GridServer.Config.dll"; 45 private string ConfigDll = "OpenSim.Grid.GridServer.Config.dll";
46 private string GridDll = "OpenSim.Framework.Data.MySQL.dll"; 46 private string GridDll = "OpenSim.Framework.Data.MySQL.dll";
47 public GridConfig Cfg; 47 public GridConfig Cfg;
48 48
49 public static OpenGrid_Main thegrid; 49 public static OpenGrid_Main thegrid;
50 protected IGenericConfig localXMLConfig; 50 protected IGenericConfig localXMLConfig;
51 51
52 public static bool setuponly; 52 public static bool setuponly;
53 53
54 //public LLUUID highestUUID; 54 //public LLUUID highestUUID;
55 55
56 // private SimProfileManager m_simProfileManager; 56 // private SimProfileManager m_simProfileManager;
57 57
58 private GridManager m_gridManager; 58 private GridManager m_gridManager;
59 59
60 private LogBase m_console; 60 private LogBase m_console;
61 61
62 [STAThread] 62 [STAThread]
63 public static void Main(string[] args) 63 public static void Main(string[] args)
64 { 64 {
65 if (args.Length > 0) 65 if (args.Length > 0)
66 { 66 {
67 if (args[0] == "-setuponly") setuponly = true; 67 if (args[0] == "-setuponly") setuponly = true;
68 } 68 }
69 Console.WriteLine("Starting...\n"); 69 Console.WriteLine("Starting...\n");
70 70
71 thegrid = new OpenGrid_Main(); 71 thegrid = new OpenGrid_Main();
72 thegrid.Startup(); 72 thegrid.Startup();
73 73
74 thegrid.Work(); 74 thegrid.Work();
75 } 75 }
76 76
77 private void Work() 77 private void Work()
78 { 78 {
79 m_console.Notice("Enter help for a list of commands\n"); 79 m_console.Notice("Enter help for a list of commands\n");
80 80
81 while (true) 81 while (true)
82 { 82 {
83 m_console.MainLogPrompt(); 83 m_console.MainLogPrompt();
84 } 84 }
85 } 85 }
86 86
87 private OpenGrid_Main() 87 private OpenGrid_Main()
88 { 88 {
89 m_console = new LogBase("opengrid-gridserver-console.log", "OpenGrid", this, false); 89 m_console = new LogBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
90 MainLog.Instance = m_console; 90 MainLog.Instance = m_console;
91 91
92 92
93 } 93 }
94 94
95 public void managercallback(string cmd) 95 public void managercallback(string cmd)
96 { 96 {
97 switch (cmd) 97 switch (cmd)
98 { 98 {
99 case "shutdown": 99 case "shutdown":
100 RunCmd("shutdown", new string[0]); 100 RunCmd("shutdown", new string[0]);
101 break; 101 break;
102 } 102 }
103 } 103 }
104 104
105 105
106 public void Startup() 106 public void Startup()
107 { 107 {
108 this.localXMLConfig = new XmlConfig("GridServerConfig.xml"); 108 this.localXMLConfig = new XmlConfig("GridServerConfig.xml");
109 this.localXMLConfig.LoadData(); 109 this.localXMLConfig.LoadData();
110 this.ConfigDB(this.localXMLConfig); 110 this.ConfigDB(this.localXMLConfig);
111 this.localXMLConfig.Close(); 111 this.localXMLConfig.Close();
112 112
113 m_console.Verbose( "Main.cs:Startup() - Loading configuration"); 113 m_console.Verbose( "Main.cs:Startup() - Loading configuration");
114 Cfg = this.LoadConfigDll(this.ConfigDll); 114 Cfg = this.LoadConfigDll(this.ConfigDll);
115 Cfg.InitConfig(); 115 Cfg.InitConfig();
116 if (setuponly) Environment.Exit(0); 116 if (setuponly) Environment.Exit(0);
117 117
118 m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server"); 118 m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server");
119 m_gridManager = new GridManager(); 119 m_gridManager = new GridManager();
120 m_gridManager.AddPlugin(GridDll); // Made of win 120 m_gridManager.AddPlugin(GridDll); // Made of win
121 m_gridManager.config = Cfg; 121 m_gridManager.config = Cfg;
122 122
123 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); 123 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
124 BaseHttpServer httpServer = new BaseHttpServer(8001); 124 BaseHttpServer httpServer = new BaseHttpServer(8001);
125 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); 125 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
126 126
127 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod); 127 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcSimulatorLoginMethod);
128 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod); 128 httpServer.AddXmlRPCHandler("simulator_data_request", m_gridManager.XmlRpcSimulatorDataRequestMethod);
129 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod); 129 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
130 130
131 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod )); 131 httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", m_gridManager.RestGetSimMethod ));
132 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod )); 132 httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", m_gridManager.RestSetSimMethod ));
133 133
134 httpServer.AddStreamHandler( new RestStreamHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod )); 134 httpServer.AddStreamHandler( new RestStreamHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod ));
135 httpServer.AddStreamHandler( new RestStreamHandler("POST","/regions/", m_gridManager.RestSetRegionMethod )); 135 httpServer.AddStreamHandler( new RestStreamHandler("POST","/regions/", m_gridManager.RestSetRegionMethod ));
136 136
137 //httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod); 137 //httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod);
138 //httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod); 138 //httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
139 //httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod); 139 //httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
140 //httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod); 140 //httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
141 141
142 httpServer.Start(); 142 httpServer.Start();
143 143
144 m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); 144 m_console.Verbose( "Main.cs:Startup() - Starting sim status checker");
145 145
146 Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. 146 Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates.
147 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); 147 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
148 simCheckTimer.Enabled = true; 148 simCheckTimer.Enabled = true;
149 } 149 }
150 150
151 private GridConfig LoadConfigDll(string dllName) 151 private GridConfig LoadConfigDll(string dllName)
152 { 152 {
153 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 153 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
154 GridConfig config = null; 154 GridConfig config = null;
155 155
156 foreach (Type pluginType in pluginAssembly.GetTypes()) 156 foreach (Type pluginType in pluginAssembly.GetTypes())
157 { 157 {
158 if (pluginType.IsPublic) 158 if (pluginType.IsPublic)
159 { 159 {
160 if (!pluginType.IsAbstract) 160 if (!pluginType.IsAbstract)
161 { 161 {
162 Type typeInterface = pluginType.GetInterface("IGridConfig", true); 162 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
163 163
164 if (typeInterface != null) 164 if (typeInterface != null)
165 { 165 {
166 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 166 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
167 config = plug.GetConfigObject(); 167 config = plug.GetConfigObject();
168 break; 168 break;
169 } 169 }
170 170
171 typeInterface = null; 171 typeInterface = null;
172 } 172 }
173 } 173 }
174 } 174 }
175 pluginAssembly = null; 175 pluginAssembly = null;
176 return config; 176 return config;
177 } 177 }
178 178
179 public void CheckSims(object sender, ElapsedEventArgs e) 179 public void CheckSims(object sender, ElapsedEventArgs e)
180 { 180 {
181 /* 181 /*
182 foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) 182 foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
183 { 183 {
184 string SimResponse = ""; 184 string SimResponse = "";
185 try 185 try
186 { 186 {
187 WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/"); 187 WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/");
188 CheckSim.Method = "GET"; 188 CheckSim.Method = "GET";
189 CheckSim.ContentType = "text/plaintext"; 189 CheckSim.ContentType = "text/plaintext";
190 CheckSim.ContentLength = 0; 190 CheckSim.ContentLength = 0;
191 191
192 StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII); 192 StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII);
193 stOut.Write(""); 193 stOut.Write("");
194 stOut.Close(); 194 stOut.Close();
195 195
196 StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream()); 196 StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
197 SimResponse = stIn.ReadToEnd(); 197 SimResponse = stIn.ReadToEnd();
198 stIn.Close(); 198 stIn.Close();
199 } 199 }
200 catch 200 catch
201 { 201 {
202 } 202 }
203 203
204 if (SimResponse == "OK") 204 if (SimResponse == "OK")
205 { 205 {
206 m_simProfileManager.SimProfiles[sim.UUID].online = true; 206 m_simProfileManager.SimProfiles[sim.UUID].online = true;
207 } 207 }
208 else 208 else
209 { 209 {
210 m_simProfileManager.SimProfiles[sim.UUID].online = false; 210 m_simProfileManager.SimProfiles[sim.UUID].online = false;
211 } 211 }
212 } 212 }
213 */ 213 */
214 } 214 }
215 215
216 public void RunCmd(string cmd, string[] cmdparams) 216 public void RunCmd(string cmd, string[] cmdparams)
217 { 217 {
218 switch (cmd) 218 switch (cmd)
219 { 219 {
220 case "help": 220 case "help":
221 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); 221 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
222 break; 222 break;
223 223
224 case "shutdown": 224 case "shutdown":
225 m_console.Close(); 225 m_console.Close();
226 Environment.Exit(0); 226 Environment.Exit(0);
227 break; 227 break;
228 } 228 }
229 } 229 }
230 230
231 public void Show(string ShowWhat) 231 public void Show(string ShowWhat)
232 { 232 {
233 } 233 }
234 234
235 private void ConfigDB(IGenericConfig configData) 235 private void ConfigDB(IGenericConfig configData)
236 { 236 {
237 try 237 try
238 { 238 {
239 string attri = ""; 239 string attri = "";
240 attri = configData.GetAttribute("DataBaseProvider"); 240 attri = configData.GetAttribute("DataBaseProvider");
241 if (attri == "") 241 if (attri == "")
242 { 242 {
243 GridDll = "OpenSim.Framework.Data.DB4o.dll"; 243 GridDll = "OpenSim.Framework.Data.DB4o.dll";
244 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll"); 244 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll");
245 } 245 }
246 else 246 else
247 { 247 {
248 GridDll = attri; 248 GridDll = attri;
249 } 249 }
250 configData.Commit(); 250 configData.Commit();
251 } 251 }
252 catch 252 catch
253 { 253 {
254 254
255 } 255 }
256 } 256 }
257 } 257 }
258} 258}
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
index 62a68a8..1eeac93 100644
--- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
@@ -1,58 +1,58 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// General Information about an assembly is controlled through the following 30// General Information about an assembly is controlled through the following
31// set of attributes. Change these attribute values to modify the information 31// set of attributes. Change these attribute values to modify the information
32// associated with an assembly. 32// associated with an assembly.
33[assembly: AssemblyTitle("OGS-GridServer")] 33[assembly: AssemblyTitle("OGS-GridServer")]
34[assembly: AssemblyDescription("")] 34[assembly: AssemblyDescription("")]
35[assembly: AssemblyConfiguration("")] 35[assembly: AssemblyConfiguration("")]
36[assembly: AssemblyCompany("")] 36[assembly: AssemblyCompany("")]
37[assembly: AssemblyProduct("OGS-GridServer")] 37[assembly: AssemblyProduct("OGS-GridServer")]
38[assembly: AssemblyCopyright("Copyright © 2007")] 38[assembly: AssemblyCopyright("Copyright © 2007")]
39[assembly: AssemblyTrademark("")] 39[assembly: AssemblyTrademark("")]
40[assembly: AssemblyCulture("")] 40[assembly: AssemblyCulture("")]
41 41
42// Setting ComVisible to false makes the types in this assembly not visible 42// Setting ComVisible to false makes the types in this assembly not visible
43// to COM components. If you need to access a type in this assembly from 43// to COM components. If you need to access a type in this assembly from
44// COM, set the ComVisible attribute to true on that type. 44// COM, set the ComVisible attribute to true on that type.
45[assembly: ComVisible(false)] 45[assembly: ComVisible(false)]
46 46
47// The following GUID is for the ID of the typelib if this project is exposed to COM 47// The following GUID is for the ID of the typelib if this project is exposed to COM
48[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")] 48[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
49 49
50// Version information for an assembly consists of the following four values: 50// Version information for an assembly consists of the following four values:
51// 51//
52// Major Version 52// Major Version
53// Minor Version 53// Minor Version
54// Build Number 54// Build Number
55// Revision 55// Revision
56// 56//
57[assembly: AssemblyVersion("1.0.0.0")] 57[assembly: AssemblyVersion("1.0.0.0")]
58[assembly: AssemblyFileVersion("1.0.0.0")] 58[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs
index 9ca9b5e..0685088 100644
--- a/OpenSim/Grid/InventoryServer/InventoryManager.cs
+++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs
@@ -1,125 +1,125 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using OpenGrid.Framework.Data; 32using OpenGrid.Framework.Data;
33using libsecondlife; 33using libsecondlife;
34using System.Reflection; 34using System.Reflection;
35 35
36using System.Xml; 36using System.Xml;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims; 38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory; 39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities; 40using OpenSim.Framework.Utilities;
41 41
42using System.Security.Cryptography; 42using System.Security.Cryptography;
43 43
44namespace OpenGridServices.InventoryServer 44namespace OpenGridServices.InventoryServer
45{ 45{
46 class InventoryManager 46 class InventoryManager
47 { 47 {
48 Dictionary<string, IInventoryData> _plugins = new Dictionary<string, IInventoryData>(); 48 Dictionary<string, IInventoryData> _plugins = new Dictionary<string, IInventoryData>();
49 49
50 /// <summary> 50 /// <summary>
51 /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded. 51 /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
52 /// </summary> 52 /// </summary>
53 /// <param name="FileName">The filename to the inventory server plugin DLL</param> 53 /// <param name="FileName">The filename to the inventory server plugin DLL</param>
54 public void AddPlugin(string FileName) 54 public void AddPlugin(string FileName)
55 { 55 {
56 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Attempting to load " + FileName); 56 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Attempting to load " + FileName);
57 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 57 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
58 58
59 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); 59 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
60 foreach (Type pluginType in pluginAssembly.GetTypes()) 60 foreach (Type pluginType in pluginAssembly.GetTypes())
61 { 61 {
62 if (!pluginType.IsAbstract) 62 if (!pluginType.IsAbstract)
63 { 63 {
64 Type typeInterface = pluginType.GetInterface("IInventoryData", true); 64 Type typeInterface = pluginType.GetInterface("IInventoryData", true);
65 65
66 if (typeInterface != null) 66 if (typeInterface != null)
67 { 67 {
68 IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 68 IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
69 plug.Initialise(); 69 plug.Initialise();
70 this._plugins.Add(plug.getName(), plug); 70 this._plugins.Add(plug.getName(), plug);
71 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Added IUserData Interface"); 71 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Added IUserData Interface");
72 } 72 }
73 73
74 typeInterface = null; 74 typeInterface = null;
75 } 75 }
76 } 76 }
77 77
78 pluginAssembly = null; 78 pluginAssembly = null;
79 } 79 }
80 80
81 public List<InventoryFolderBase> getRootFolders(LLUUID user) 81 public List<InventoryFolderBase> getRootFolders(LLUUID user)
82 { 82 {
83 foreach (KeyValuePair<string, IInventoryData> kvp in _plugins) 83 foreach (KeyValuePair<string, IInventoryData> kvp in _plugins)
84 { 84 {
85 try 85 try
86 { 86 {
87 return kvp.Value.getUserRootFolders(user); 87 return kvp.Value.getUserRootFolders(user);
88 } 88 }
89 catch (Exception e) 89 catch (Exception e)
90 { 90 {
91 OpenSim.Framework.Console.MainConsole.Instance.Notice("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")"); 91 OpenSim.Framework.Console.MainConsole.Instance.Notice("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")");
92 } 92 }
93 } 93 }
94 return null; 94 return null;
95 } 95 }
96 96
97 public XmlRpcResponse XmlRpcInventoryRequest(XmlRpcRequest request) 97 public XmlRpcResponse XmlRpcInventoryRequest(XmlRpcRequest request)
98 { 98 {
99 XmlRpcResponse response = new XmlRpcResponse(); 99 XmlRpcResponse response = new XmlRpcResponse();
100 Hashtable requestData = (Hashtable)request.Params[0]; 100 Hashtable requestData = (Hashtable)request.Params[0];
101 101
102 Hashtable responseData = new Hashtable(); 102 Hashtable responseData = new Hashtable();
103 103
104 // Stuff happens here 104 // Stuff happens here
105 105
106 if (requestData.ContainsKey("Access-type")) 106 if (requestData.ContainsKey("Access-type"))
107 { 107 {
108 if (requestData["access-type"] == "rootfolders") 108 if (requestData["access-type"] == "rootfolders")
109 { 109 {
110// responseData["rootfolders"] = 110// responseData["rootfolders"] =
111 } 111 }
112 } 112 }
113 else 113 else
114 { 114 {
115 responseData["error"] = "No access-type specified."; 115 responseData["error"] = "No access-type specified.";
116 } 116 }
117 117
118 118
119 // Stuff stops happening here 119 // Stuff stops happening here
120 120
121 response.Value = responseData; 121 response.Value = responseData;
122 return response; 122 return response;
123 } 123 }
124 } 124 }
125} 125}
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs
index f479a79..e1276a9 100644
--- a/OpenSim/Grid/InventoryServer/Main.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -1,87 +1,87 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.IO; 32using System.IO;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using libsecondlife;
35using OpenSim.Framework.User; 35using OpenSim.Framework.User;
36using OpenSim.Framework.Sims; 36using OpenSim.Framework.Sims;
37using OpenSim.Framework.Inventory; 37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Interfaces; 38using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Console; 39using OpenSim.Framework.Console;
40using OpenSim.Servers; 40using OpenSim.Servers;
41using OpenSim.Framework.Utilities; 41using OpenSim.Framework.Utilities;
42 42
43namespace OpenGridServices.InventoryServer 43namespace OpenGridServices.InventoryServer
44{ 44{
45 public class OpenInventory_Main : BaseServer, conscmd_callback 45 public class OpenInventory_Main : BaseServer, conscmd_callback
46 { 46 {
47 ConsoleBase m_console; 47 ConsoleBase m_console;
48 InventoryManager m_inventoryManager; 48 InventoryManager m_inventoryManager;
49 49
50 public static void Main(string[] args) 50 public static void Main(string[] args)
51 { 51 {
52 } 52 }
53 53
54 public OpenInventory_Main() 54 public OpenInventory_Main()
55 { 55 {
56 m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false); 56 m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false);
57 MainConsole.Instance = m_console; 57 MainConsole.Instance = m_console;
58 } 58 }
59 59
60 public void Startup() 60 public void Startup()
61 { 61 {
62 MainConsole.Instance.Notice("Initialising inventory manager..."); 62 MainConsole.Instance.Notice("Initialising inventory manager...");
63 m_inventoryManager = new InventoryManager(); 63 m_inventoryManager = new InventoryManager();
64 64
65 MainConsole.Instance.Notice("Starting HTTP server"); 65 MainConsole.Instance.Notice("Starting HTTP server");
66 BaseHttpServer httpServer = new BaseHttpServer(8004); 66 BaseHttpServer httpServer = new BaseHttpServer(8004);
67 67
68 httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest); 68 httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest);
69 //httpServer.AddRestHandler("GET","/rootfolders/",Rest 69 //httpServer.AddRestHandler("GET","/rootfolders/",Rest
70 } 70 }
71 71
72 public void RunCmd(string cmd, string[] cmdparams) 72 public void RunCmd(string cmd, string[] cmdparams)
73 { 73 {
74 switch (cmd) 74 switch (cmd)
75 { 75 {
76 case "shutdown": 76 case "shutdown":
77 m_console.Close(); 77 m_console.Close();
78 Environment.Exit(0); 78 Environment.Exit(0);
79 break; 79 break;
80 } 80 }
81 } 81 }
82 82
83 public void Show(string ShowWhat) 83 public void Show(string ShowWhat)
84 { 84 {
85 } 85 }
86 } 86 }
87} 87}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs
index 83685fc..be47385 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs
@@ -1,33 +1,33 @@
1using System; 1using System;
2using System.Threading; 2using System.Threading;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Text; 4using System.Text;
5 5
6namespace OpenGridServices.Manager 6namespace OpenGridServices.Manager
7{ 7{
8 public class BlockingQueue<T> 8 public class BlockingQueue<T>
9 { 9 {
10 private Queue<T> _queue = new Queue<T>(); 10 private Queue<T> _queue = new Queue<T>();
11 private object _queueSync = new object(); 11 private object _queueSync = new object();
12 12
13 public void Enqueue(T value) 13 public void Enqueue(T value)
14 { 14 {
15 lock (_queueSync) 15 lock (_queueSync)
16 { 16 {
17 _queue.Enqueue(value); 17 _queue.Enqueue(value);
18 Monitor.Pulse(_queueSync); 18 Monitor.Pulse(_queueSync);
19 } 19 }
20 } 20 }
21 21
22 public T Dequeue() 22 public T Dequeue()
23 { 23 {
24 lock (_queueSync) 24 lock (_queueSync)
25 { 25 {
26 if (_queue.Count < 1) 26 if (_queue.Count < 1)
27 Monitor.Wait(_queueSync); 27 Monitor.Wait(_queueSync);
28 28
29 return _queue.Dequeue(); 29 return _queue.Dequeue();
30 } 30 }
31 } 31 }
32 } 32 }
33} 33}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
index 5bf7ff9..5646be4 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
@@ -1,133 +1,133 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5using libsecondlife.Packets; 5using libsecondlife.Packets;
6 6
7namespace OpenSim.Framework.Utilities 7namespace OpenSim.Framework.Utilities
8{ 8{
9 public class Util 9 public class Util
10 { 10 {
11 private static Random randomClass = new Random(); 11 private static Random randomClass = new Random();
12 private static uint nextXferID = 5000; 12 private static uint nextXferID = 5000;
13 private static object XferLock = new object(); 13 private static object XferLock = new object();
14 14
15 public static ulong UIntsToLong(uint X, uint Y) 15 public static ulong UIntsToLong(uint X, uint Y)
16 { 16 {
17 return Helpers.UIntsToLong(X, Y); 17 return Helpers.UIntsToLong(X, Y);
18 } 18 }
19 19
20 public static Random RandomClass 20 public static Random RandomClass
21 { 21 {
22 get 22 get
23 { 23 {
24 return randomClass; 24 return randomClass;
25 } 25 }
26 } 26 }
27 27
28 public static uint GetNextXferID() 28 public static uint GetNextXferID()
29 { 29 {
30 uint id = 0; 30 uint id = 0;
31 lock(XferLock) 31 lock(XferLock)
32 { 32 {
33 id = nextXferID; 33 id = nextXferID;
34 nextXferID++; 34 nextXferID++;
35 } 35 }
36 return id; 36 return id;
37 } 37 }
38 38
39 //public static int fast_distance2d(int x, int y) 39 //public static int fast_distance2d(int x, int y)
40 //{ 40 //{
41 // x = System.Math.Abs(x); 41 // x = System.Math.Abs(x);
42 // y = System.Math.Abs(y); 42 // y = System.Math.Abs(y);
43 43
44 // int min = System.Math.Min(x, y); 44 // int min = System.Math.Min(x, y);
45 45
46 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); 46 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
47 //} 47 //}
48 48
49 public static string FieldToString(byte[] bytes) 49 public static string FieldToString(byte[] bytes)
50 { 50 {
51 return FieldToString(bytes, String.Empty); 51 return FieldToString(bytes, String.Empty);
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// Convert a variable length field (byte array) to a string, with a 55 /// Convert a variable length field (byte array) to a string, with a
56 /// field name prepended to each line of the output 56 /// field name prepended to each line of the output
57 /// </summary> 57 /// </summary>
58 /// <remarks>If the byte array has unprintable characters in it, a 58 /// <remarks>If the byte array has unprintable characters in it, a
59 /// hex dump will be put in the string instead</remarks> 59 /// hex dump will be put in the string instead</remarks>
60 /// <param name="bytes">The byte array to convert to a string</param> 60 /// <param name="bytes">The byte array to convert to a string</param>
61 /// <param name="fieldName">A field name to prepend to each line of output</param> 61 /// <param name="fieldName">A field name to prepend to each line of output</param>
62 /// <returns>An ASCII string or a string containing a hex dump, minus 62 /// <returns>An ASCII string or a string containing a hex dump, minus
63 /// the null terminator</returns> 63 /// the null terminator</returns>
64 public static string FieldToString(byte[] bytes, string fieldName) 64 public static string FieldToString(byte[] bytes, string fieldName)
65 { 65 {
66 // Check for a common case 66 // Check for a common case
67 if (bytes.Length == 0) return String.Empty; 67 if (bytes.Length == 0) return String.Empty;
68 68
69 StringBuilder output = new StringBuilder(); 69 StringBuilder output = new StringBuilder();
70 bool printable = true; 70 bool printable = true;
71 71
72 for (int i = 0; i < bytes.Length; ++i) 72 for (int i = 0; i < bytes.Length; ++i)
73 { 73 {
74 // Check if there are any unprintable characters in the array 74 // Check if there are any unprintable characters in the array
75 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09 75 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
76 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00) 76 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
77 { 77 {
78 printable = false; 78 printable = false;
79 break; 79 break;
80 } 80 }
81 } 81 }
82 82
83 if (printable) 83 if (printable)
84 { 84 {
85 if (fieldName.Length > 0) 85 if (fieldName.Length > 0)
86 { 86 {
87 output.Append(fieldName); 87 output.Append(fieldName);
88 output.Append(": "); 88 output.Append(": ");
89 } 89 }
90 90
91 if (bytes[bytes.Length - 1] == 0x00) 91 if (bytes[bytes.Length - 1] == 0x00)
92 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1)); 92 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
93 else 93 else
94 output.Append(UTF8Encoding.UTF8.GetString(bytes)); 94 output.Append(UTF8Encoding.UTF8.GetString(bytes));
95 } 95 }
96 else 96 else
97 { 97 {
98 for (int i = 0; i < bytes.Length; i += 16) 98 for (int i = 0; i < bytes.Length; i += 16)
99 { 99 {
100 if (i != 0) 100 if (i != 0)
101 output.Append(Environment.NewLine); 101 output.Append(Environment.NewLine);
102 if (fieldName.Length > 0) 102 if (fieldName.Length > 0)
103 { 103 {
104 output.Append(fieldName); 104 output.Append(fieldName);
105 output.Append(": "); 105 output.Append(": ");
106 } 106 }
107 107
108 for (int j = 0; j < 16; j++) 108 for (int j = 0; j < 16; j++)
109 { 109 {
110 if ((i + j) < bytes.Length) 110 if ((i + j) < bytes.Length)
111 output.Append(String.Format("{0:X2} ", bytes[i + j])); 111 output.Append(String.Format("{0:X2} ", bytes[i + j]));
112 else 112 else
113 output.Append(" "); 113 output.Append(" ");
114 } 114 }
115 115
116 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++) 116 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
117 { 117 {
118 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E) 118 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
119 output.Append((char)bytes[i + j]); 119 output.Append((char)bytes[i + j]);
120 else 120 else
121 output.Append("."); 121 output.Append(".");
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 return output.ToString(); 126 return output.ToString();
127 } 127 }
128 public Util() 128 public Util()
129 { 129 {
130 130
131 } 131 }
132 } 132 }
133} 133}
diff --git a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs
index 15298e8..885bada 100644
--- a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs
+++ b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("UserConfig")] 36[assembly: AssemblyTitle("UserConfig")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("UserConfig")] 40[assembly: AssemblyProduct("UserConfig")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
index c7f8255..170f34b 100644
--- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
+++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
@@ -1,95 +1,95 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using Db4objects.Db4o; 29using Db4objects.Db4o;
30using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces; 31using OpenSim.Framework.Interfaces;
32 32
33namespace OpenUser.Config.UserConfigDb4o 33namespace OpenUser.Config.UserConfigDb4o
34{ 34{
35 public class Db4oConfigPlugin: IUserConfig 35 public class Db4oConfigPlugin: IUserConfig
36 { 36 {
37 public UserConfig GetConfigObject() 37 public UserConfig GetConfigObject()
38 { 38 {
39 MainLog.Instance.Verbose("Loading Db40Config dll"); 39 MainLog.Instance.Verbose("Loading Db40Config dll");
40 return ( new DbUserConfig()); 40 return ( new DbUserConfig());
41 } 41 }
42 } 42 }
43 43
44 public class DbUserConfig : UserConfig 44 public class DbUserConfig : UserConfig
45 { 45 {
46 private IObjectContainer db; 46 private IObjectContainer db;
47 47
48 public void LoadDefaults() { 48 public void LoadDefaults() {
49 MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); 49 MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
50 50
51 this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); 51 this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
52 52
53 this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); 53 this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
54 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); 54 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null");
55 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); 55 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
56 } 56 }
57 57
58 public override void InitConfig() { 58 public override void InitConfig() {
59 try { 59 try {
60 db = Db4oFactory.OpenFile("openuser.yap"); 60 db = Db4oFactory.OpenFile("openuser.yap");
61 IObjectSet result = db.Get(typeof(DbUserConfig)); 61 IObjectSet result = db.Get(typeof(DbUserConfig));
62 if(result.Count==1) { 62 if(result.Count==1) {
63 MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); 63 MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
64 foreach (DbUserConfig cfg in result) { 64 foreach (DbUserConfig cfg in result) {
65 this.GridServerURL=cfg.GridServerURL; 65 this.GridServerURL=cfg.GridServerURL;
66 this.GridSendKey=cfg.GridSendKey; 66 this.GridSendKey=cfg.GridSendKey;
67 this.GridRecvKey=cfg.GridRecvKey; 67 this.GridRecvKey=cfg.GridRecvKey;
68 this.DefaultStartupMsg=cfg.DefaultStartupMsg; 68 this.DefaultStartupMsg=cfg.DefaultStartupMsg;
69 } 69 }
70 } else { 70 } else {
71 MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); 71 MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
72 LoadDefaults(); 72 LoadDefaults();
73 MainLog.Instance.Verbose("Writing out default settings to local database"); 73 MainLog.Instance.Verbose("Writing out default settings to local database");
74 db.Set(this); 74 db.Set(this);
75 db.Close(); 75 db.Close();
76 } 76 }
77 } catch(Exception e) { 77 } catch(Exception e) {
78 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 78 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
79 MainLog.Instance.Warn(e.ToString()); 79 MainLog.Instance.Warn(e.ToString());
80 } 80 }
81 81
82 MainLog.Instance.Verbose("User settings loaded:"); 82 MainLog.Instance.Verbose("User settings loaded:");
83 MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); 83 MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
84 MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); 84 MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL);
85 MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); 85 MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
86 MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); 86 MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey);
87 } 87 }
88 88
89 89
90 public void Shutdown() { 90 public void Shutdown() {
91 db.Close(); 91 db.Close();
92 } 92 }
93 } 93 }
94 94
95} 95}
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index c792918..9bdf8d7 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -1,214 +1,214 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
36using OpenSim.Framework.User; 36using OpenSim.Framework.User;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38using OpenSim.GenericConfig; 38using OpenSim.GenericConfig;
39 39
40namespace OpenSim.Grid.UserServer 40namespace OpenSim.Grid.UserServer
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// </summary> 43 /// </summary>
44 public class OpenUser_Main : conscmd_callback 44 public class OpenUser_Main : conscmd_callback
45 { 45 {
46 private string ConfigDll = "OpenSim.Grid.UserServer.Config.dll"; 46 private string ConfigDll = "OpenSim.Grid.UserServer.Config.dll";
47 private string StorageDll = "OpenSim.Framework.Data.MySQL.dll"; 47 private string StorageDll = "OpenSim.Framework.Data.MySQL.dll";
48 private UserConfig Cfg; 48 private UserConfig Cfg;
49 protected IGenericConfig localXMLConfig; 49 protected IGenericConfig localXMLConfig;
50 50
51 public UserManager m_userManager; 51 public UserManager m_userManager;
52 52
53 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>(); 53 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
54 54
55 LogBase m_console; 55 LogBase m_console;
56 56
57 [STAThread] 57 [STAThread]
58 public static void Main(string[] args) 58 public static void Main(string[] args)
59 { 59 {
60 Console.WriteLine("Launching UserServer..."); 60 Console.WriteLine("Launching UserServer...");
61 61
62 OpenUser_Main userserver = new OpenUser_Main(); 62 OpenUser_Main userserver = new OpenUser_Main();
63 63
64 userserver.Startup(); 64 userserver.Startup();
65 userserver.Work(); 65 userserver.Work();
66 } 66 }
67 67
68 private OpenUser_Main() 68 private OpenUser_Main()
69 { 69 {
70 m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false); 70 m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false);
71 MainLog.Instance = m_console; 71 MainLog.Instance = m_console;
72 } 72 }
73 73
74 private void Work() 74 private void Work()
75 { 75 {
76 m_console.Notice("Enter help for a list of commands\n"); 76 m_console.Notice("Enter help for a list of commands\n");
77 77
78 while (true) 78 while (true)
79 { 79 {
80 m_console.MainLogPrompt(); 80 m_console.MainLogPrompt();
81 } 81 }
82 } 82 }
83 83
84 public void Startup() 84 public void Startup()
85 { 85 {
86 this.localXMLConfig = new XmlConfig("UserServerConfig.xml"); 86 this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
87 this.localXMLConfig.LoadData(); 87 this.localXMLConfig.LoadData();
88 this.ConfigDB(this.localXMLConfig); 88 this.ConfigDB(this.localXMLConfig);
89 this.localXMLConfig.Close(); 89 this.localXMLConfig.Close();
90 90
91 MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration"); 91 MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration");
92 Cfg = this.LoadConfigDll(this.ConfigDll); 92 Cfg = this.LoadConfigDll(this.ConfigDll);
93 Cfg.InitConfig(); 93 Cfg.InitConfig();
94 94
95 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); 95 MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection");
96 m_userManager = new UserManager(); 96 m_userManager = new UserManager();
97 m_userManager._config = Cfg; 97 m_userManager._config = Cfg;
98 m_userManager.AddPlugin(StorageDll); 98 m_userManager.AddPlugin(StorageDll);
99 99
100 MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); 100 MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
101 BaseHttpServer httpServer = new BaseHttpServer(8002); 101 BaseHttpServer httpServer = new BaseHttpServer(8002);
102 102
103 httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod); 103 httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
104 104
105 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); 105 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
106 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); 106 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID);
107 107
108 httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod )); 108 httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod ));
109 109
110 httpServer.Start(); 110 httpServer.Start();
111 m_console.Status("Userserver 0.3 - Startup complete"); 111 m_console.Status("Userserver 0.3 - Startup complete");
112 } 112 }
113 113
114 114
115 public void do_create(string what) 115 public void do_create(string what)
116 { 116 {
117 switch (what) 117 switch (what)
118 { 118 {
119 case "user": 119 case "user":
120 string tempfirstname; 120 string tempfirstname;
121 string templastname; 121 string templastname;
122 string tempMD5Passwd; 122 string tempMD5Passwd;
123 uint regX = 1000; 123 uint regX = 1000;
124 uint regY = 1000; 124 uint regY = 1000;
125 125
126 tempfirstname = m_console.CmdPrompt("First name"); 126 tempfirstname = m_console.CmdPrompt("First name");
127 templastname = m_console.CmdPrompt("Last name"); 127 templastname = m_console.CmdPrompt("Last name");
128 tempMD5Passwd = m_console.PasswdPrompt("Password"); 128 tempMD5Passwd = m_console.PasswdPrompt("Password");
129 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); 129 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
130 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); 130 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
131 131
132 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); 132 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
133 133
134 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 134 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
135 break; 135 break;
136 } 136 }
137 } 137 }
138 138
139 public void RunCmd(string cmd, string[] cmdparams) 139 public void RunCmd(string cmd, string[] cmdparams)
140 { 140 {
141 switch (cmd) 141 switch (cmd)
142 { 142 {
143 case "help": 143 case "help":
144 m_console.Notice("create user - create a new user"); 144 m_console.Notice("create user - create a new user");
145 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); 145 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
146 break; 146 break;
147 147
148 case "create": 148 case "create":
149 do_create(cmdparams[0]); 149 do_create(cmdparams[0]);
150 break; 150 break;
151 151
152 case "shutdown": 152 case "shutdown":
153 m_console.Close(); 153 m_console.Close();
154 Environment.Exit(0); 154 Environment.Exit(0);
155 break; 155 break;
156 } 156 }
157 } 157 }
158 158
159 private void ConfigDB(IGenericConfig configData) 159 private void ConfigDB(IGenericConfig configData)
160 { 160 {
161 try 161 try
162 { 162 {
163 string attri = ""; 163 string attri = "";
164 attri = configData.GetAttribute("DataBaseProvider"); 164 attri = configData.GetAttribute("DataBaseProvider");
165 if (attri == "") 165 if (attri == "")
166 { 166 {
167 StorageDll = "OpenSim.Framework.Data.DB4o.dll"; 167 StorageDll = "OpenSim.Framework.Data.DB4o.dll";
168 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll"); 168 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll");
169 } 169 }
170 else 170 else
171 { 171 {
172 StorageDll = attri; 172 StorageDll = attri;
173 } 173 }
174 configData.Commit(); 174 configData.Commit();
175 } 175 }
176 catch 176 catch
177 { 177 {
178 178
179 } 179 }
180 } 180 }
181 181
182 private UserConfig LoadConfigDll(string dllName) 182 private UserConfig LoadConfigDll(string dllName)
183 { 183 {
184 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 184 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
185 UserConfig config = null; 185 UserConfig config = null;
186 186
187 foreach (Type pluginType in pluginAssembly.GetTypes()) 187 foreach (Type pluginType in pluginAssembly.GetTypes())
188 { 188 {
189 if (pluginType.IsPublic) 189 if (pluginType.IsPublic)
190 { 190 {
191 if (!pluginType.IsAbstract) 191 if (!pluginType.IsAbstract)
192 { 192 {
193 Type typeInterface = pluginType.GetInterface("IUserConfig", true); 193 Type typeInterface = pluginType.GetInterface("IUserConfig", true);
194 194
195 if (typeInterface != null) 195 if (typeInterface != null)
196 { 196 {
197 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 197 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
198 config = plug.GetConfigObject(); 198 config = plug.GetConfigObject();
199 break; 199 break;
200 } 200 }
201 201
202 typeInterface = null; 202 typeInterface = null;
203 } 203 }
204 } 204 }
205 } 205 }
206 pluginAssembly = null; 206 pluginAssembly = null;
207 return config; 207 return config;
208 } 208 }
209 209
210 public void Show(string ShowWhat) 210 public void Show(string ShowWhat)
211 { 211 {
212 } 212 }
213 } 213 }
214} 214}
diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
index a0a6f3c..877f02f 100644
--- a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
+++ b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
@@ -1,31 +1,31 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OGS-UserServer")] 6[assembly: AssemblyTitle("OGS-UserServer")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OGS-UserServer")] 10[assembly: AssemblyProduct("OGS-UserServer")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("e266513a-090b-4d38-80f6-8599eef68c8c")] 21[assembly: Guid("e266513a-090b-4d38-80f6-8599eef68c8c")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30[assembly: AssemblyVersion("1.0.0.0")] 30[assembly: AssemblyVersion("1.0.0.0")]
31[assembly: AssemblyFileVersion("1.0.0.0")] 31[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index f5275e2..bb7d673 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -1,100 +1,100 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using Nwc.XmlRpc; 30using Nwc.XmlRpc;
31using OpenSim.Framework.Data; 31using OpenSim.Framework.Data;
32using OpenSim.Framework.UserManagement; 32using OpenSim.Framework.UserManagement;
33using OpenSim.Framework.Utilities; 33using OpenSim.Framework.Utilities;
34 34
35namespace OpenSim.Grid.UserServer 35namespace OpenSim.Grid.UserServer
36{ 36{
37 public class UserManager : UserManagerBase 37 public class UserManager : UserManagerBase
38 { 38 {
39 public UserManager() 39 public UserManager()
40 { 40 {
41 } 41 }
42 42
43 /// <summary> 43 /// <summary>
44 /// Customises the login response and fills in missing values. 44 /// Customises the login response and fills in missing values.
45 /// </summary> 45 /// </summary>
46 /// <param name="response">The existing response</param> 46 /// <param name="response">The existing response</param>
47 /// <param name="theUser">The user profile</param> 47 /// <param name="theUser">The user profile</param>
48 public override void CustomiseResponse( LoginResponse response, UserProfileData theUser) 48 public override void CustomiseResponse( LoginResponse response, UserProfileData theUser)
49 { 49 {
50 // Load information from the gridserver 50 // Load information from the gridserver
51 SimProfileData SimInfo = new SimProfileData(); 51 SimProfileData SimInfo = new SimProfileData();
52 SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); 52 SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
53 53
54 // Customise the response 54 // Customise the response
55 // Home Location 55 // Home Location
56 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + 56 response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " +
57 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 57 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
58 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 58 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
59 59
60 // Destination 60 // Destination
61 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); 61 Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
62 response.SimAddress = SimInfo.serverIP; 62 response.SimAddress = SimInfo.serverIP;
63 response.SimPort = (Int32)SimInfo.serverPort; 63 response.SimPort = (Int32)SimInfo.serverPort;
64 response.RegionX = SimInfo.regionLocX; 64 response.RegionX = SimInfo.regionLocX;
65 response.RegionY = SimInfo.regionLocY; 65 response.RegionY = SimInfo.regionLocY;
66 66
67 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI 67 //Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
68 string capsPath = Util.GetRandomCapsPath(); 68 string capsPath = Util.GetRandomCapsPath();
69 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; 69 response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
70 70
71 // Notify the target of an incoming user 71 // Notify the target of an incoming user
72 Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI+ ")"); 72 Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI+ ")");
73 73
74 // Prepare notification 74 // Prepare notification
75 Hashtable SimParams = new Hashtable(); 75 Hashtable SimParams = new Hashtable();
76 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); 76 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
77 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); 77 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
78 SimParams["firstname"] = theUser.username; 78 SimParams["firstname"] = theUser.username;
79 SimParams["lastname"] = theUser.surname; 79 SimParams["lastname"] = theUser.surname;
80 SimParams["agent_id"] = theUser.UUID.ToString(); 80 SimParams["agent_id"] = theUser.UUID.ToString();
81 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); 81 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
82 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); 82 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
83 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); 83 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
84 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); 84 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
85 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); 85 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
86 SimParams["caps_path"] = capsPath; 86 SimParams["caps_path"] = capsPath;
87 ArrayList SendParams = new ArrayList(); 87 ArrayList SendParams = new ArrayList();
88 SendParams.Add(SimParams); 88 SendParams.Add(SimParams);
89 89
90 // Update agent with target sim 90 // Update agent with target sim
91 theUser.currentAgent.currentRegion = SimInfo.UUID; 91 theUser.currentAgent.currentRegion = SimInfo.UUID;
92 theUser.currentAgent.currentHandle = SimInfo.regionHandle; 92 theUser.currentAgent.currentHandle = SimInfo.regionHandle;
93 93
94 System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); 94 System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
95 // Send 95 // Send
96 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 96 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
97 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 3000); 97 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 3000);
98 } 98 }
99 } 99 }
100} 100}
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 10beaff..666be33 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -1,125 +1,125 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
32namespace OpenSim 32namespace OpenSim
33{ 33{
34 public class Application 34 public class Application
35 { 35 {
36 //could move our main function into OpenSimMain and kill this class 36 //could move our main function into OpenSimMain and kill this class
37 [STAThread] 37 [STAThread]
38 public static void Main(string[] args) 38 public static void Main(string[] args)
39 { 39 {
40 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); 40 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
41 Console.WriteLine("Starting...\n"); 41 Console.WriteLine("Starting...\n");
42 42
43 bool sandBoxMode = false; 43 bool sandBoxMode = false;
44 bool startLoginServer = false; 44 bool startLoginServer = false;
45 string physicsEngine = "basicphysics"; 45 string physicsEngine = "basicphysics";
46 bool allowFlying = false; 46 bool allowFlying = false;
47 bool userAccounts = false; 47 bool userAccounts = false;
48 bool gridLocalAsset = false; 48 bool gridLocalAsset = false;
49 bool useConfigFile = false; 49 bool useConfigFile = false;
50 bool silent = false; 50 bool silent = false;
51 string configFile = "simconfig.xml"; 51 string configFile = "simconfig.xml";
52 52
53 for (int i = 0; i < args.Length; i++) 53 for (int i = 0; i < args.Length; i++)
54 { 54 {
55 if (args[i] == "-sandbox") 55 if (args[i] == "-sandbox")
56 { 56 {
57 sandBoxMode = true; 57 sandBoxMode = true;
58 startLoginServer = true; 58 startLoginServer = true;
59 } 59 }
60 /* 60 /*
61 if (args[i] == "-loginserver") 61 if (args[i] == "-loginserver")
62 { 62 {
63 startLoginServer = true; 63 startLoginServer = true;
64 }*/ 64 }*/
65 if (args[i] == "-accounts") 65 if (args[i] == "-accounts")
66 { 66 {
67 userAccounts = true; 67 userAccounts = true;
68 } 68 }
69 if (args[i] == "-realphysx") 69 if (args[i] == "-realphysx")
70 { 70 {
71 physicsEngine = "RealPhysX"; 71 physicsEngine = "RealPhysX";
72 allowFlying = true; 72 allowFlying = true;
73 } 73 }
74 if (args[i] == "-bulletX") 74 if (args[i] == "-bulletX")
75 { 75 {
76 physicsEngine = "BulletXEngine"; 76 physicsEngine = "BulletXEngine";
77 allowFlying = true; 77 allowFlying = true;
78 } 78 }
79 if (args[i] == "-ode") 79 if (args[i] == "-ode")
80 { 80 {
81 physicsEngine = "OpenDynamicsEngine"; 81 physicsEngine = "OpenDynamicsEngine";
82 allowFlying = true; 82 allowFlying = true;
83 } 83 }
84 if (args[i] == "-localasset") 84 if (args[i] == "-localasset")
85 { 85 {
86 gridLocalAsset = true; 86 gridLocalAsset = true;
87 } 87 }
88 if (args[i] == "-configfile") 88 if (args[i] == "-configfile")
89 { 89 {
90 useConfigFile = true; 90 useConfigFile = true;
91 } 91 }
92 if (args[i] == "-noverbose") 92 if (args[i] == "-noverbose")
93 { 93 {
94 silent = true; 94 silent = true;
95 } 95 }
96 if (args[i] == "-config") 96 if (args[i] == "-config")
97 { 97 {
98 try 98 try
99 { 99 {
100 i++; 100 i++;
101 configFile = args[i]; 101 configFile = args[i];
102 } 102 }
103 catch (Exception e) 103 catch (Exception e)
104 { 104 {
105 Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")"); 105 Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")");
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile); 110 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
111 // OpenSimRoot.Instance.Application = sim; 111 // OpenSimRoot.Instance.Application = sim;
112 sim.m_sandbox = sandBoxMode; 112 sim.m_sandbox = sandBoxMode;
113 sim.user_accounts = userAccounts; 113 sim.user_accounts = userAccounts;
114 sim.gridLocalAsset = gridLocalAsset; 114 sim.gridLocalAsset = gridLocalAsset;
115 ScenePresence.PhysicsEngineFlying = allowFlying; 115 ScenePresence.PhysicsEngineFlying = allowFlying;
116 116
117 sim.StartUp(); 117 sim.StartUp();
118 118
119 while (true) 119 while (true)
120 { 120 {
121 MainLog.Instance.MainLogPrompt(); 121 MainLog.Instance.MainLogPrompt();
122 } 122 }
123 } 123 }
124 } 124 }
125} 125}
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 99164f1..08d7619 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -1,496 +1,496 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.IO; 30using System.IO;
31using libsecondlife; 31using libsecondlife;
32using OpenSim.Assets; 32using OpenSim.Assets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications; 34using OpenSim.Framework.Communications;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Data; 36using OpenSim.Framework.Data;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Types; 39using OpenSim.Framework.Types;
40using OpenSim.GenericConfig; 40using OpenSim.GenericConfig;
41using OpenSim.Physics.Manager; 41using OpenSim.Physics.Manager;
42using OpenSim.Region.Caches; 42using OpenSim.Region.Caches;
43using OpenSim.Region.ClientStack; 43using OpenSim.Region.ClientStack;
44using OpenSim.Region.Communications.Local; 44using OpenSim.Region.Communications.Local;
45using OpenSim.Region.Communications.OGS1; 45using OpenSim.Region.Communications.OGS1;
46using OpenSim.Region.Environment.Scenes; 46using OpenSim.Region.Environment.Scenes;
47using OpenSim.Region.Environment; 47using OpenSim.Region.Environment;
48using System.Text; 48using System.Text;
49 49
50namespace OpenSim 50namespace OpenSim
51{ 51{
52 52
53 public class OpenSimMain : RegionApplicationBase, conscmd_callback 53 public class OpenSimMain : RegionApplicationBase, conscmd_callback
54 { 54 {
55 protected CommunicationsManager commsManager; 55 protected CommunicationsManager commsManager;
56 // private CheckSumServer checkServer; 56 // private CheckSumServer checkServer;
57 57
58 private bool m_silent; 58 private bool m_silent;
59 private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; 59 private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log";
60 60
61 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) 61 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
62 { 62 {
63 this.configFileSetup = useConfigFile; 63 this.configFileSetup = useConfigFile;
64 m_sandbox = sandBoxMode; 64 m_sandbox = sandBoxMode;
65 m_loginserver = startLoginServer; 65 m_loginserver = startLoginServer;
66 m_physicsEngine = physicsEngine; 66 m_physicsEngine = physicsEngine;
67 m_config = configFile; 67 m_config = configFile;
68 m_silent = silent; 68 m_silent = silent;
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Performs initialisation of the world, such as loading configuration from disk. 72 /// Performs initialisation of the world, such as loading configuration from disk.
73 /// </summary> 73 /// </summary>
74 public override void StartUp() 74 public override void StartUp()
75 { 75 {
76 this.serversData = new NetworkServersInfo(); 76 this.serversData = new NetworkServersInfo();
77 77
78 this.localConfig = new XmlConfig(m_config); 78 this.localConfig = new XmlConfig(m_config);
79 this.localConfig.LoadData(); 79 this.localConfig.LoadData();
80 80
81 if (this.configFileSetup) 81 if (this.configFileSetup)
82 { 82 {
83 this.SetupFromConfigFile(this.localConfig); 83 this.SetupFromConfigFile(this.localConfig);
84 } 84 }
85 85
86 m_log = new LogBase(m_logFilename, "Region", this, m_silent); 86 m_log = new LogBase(m_logFilename, "Region", this, m_silent);
87 MainLog.Instance = m_log; 87 MainLog.Instance = m_log;
88 88
89 m_log.Verbose("Main.cs:Startup() - Loading configuration"); 89 m_log.Verbose("Main.cs:Startup() - Loading configuration");
90 this.serversData.InitConfig(this.m_sandbox, this.localConfig); 90 this.serversData.InitConfig(this.m_sandbox, this.localConfig);
91 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change 91 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
92 92
93 ScenePresence.LoadTextureFile("avatar-texture.dat"); 93 ScenePresence.LoadTextureFile("avatar-texture.dat");
94 94
95 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 95 ClientView.TerrainManager = new TerrainManager(new SecondLife());
96 96
97 this.SetupHttpListener(); 97 this.SetupHttpListener();
98 98
99 if (m_sandbox) 99 if (m_sandbox)
100 { 100 {
101 this.SetupLocalGridServers(); 101 this.SetupLocalGridServers();
102 // this.checkServer = new CheckSumServer(12036); 102 // this.checkServer = new CheckSumServer(12036);
103 // this.checkServer.ServerListener(); 103 // this.checkServer.ServerListener();
104 } 104 }
105 else 105 else
106 { 106 {
107 this.SetupRemoteGridServers(); 107 this.SetupRemoteGridServers();
108 } 108 }
109 109
110 startuptime = DateTime.Now; 110 startuptime = DateTime.Now;
111 111
112 this.physManager = new PhysicsManager(); 112 this.physManager = new PhysicsManager();
113 this.physManager.LoadPlugins(); 113 this.physManager.LoadPlugins();
114 114
115 this.SetupScene(); 115 this.SetupScene();
116 116
117 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server"); 117 m_log.Verbose("Main.cs:Startup() - Initialising HTTP server");
118 118
119 //Start http server 119 //Start http server
120 m_log.Verbose("Main.cs:Startup() - Starting HTTP server"); 120 m_log.Verbose("Main.cs:Startup() - Starting HTTP server");
121 httpServer.Start(); 121 httpServer.Start();
122 122
123 // Start UDP servers 123 // Start UDP servers
124 for (int i = 0; i < m_udpServer.Count; i++) 124 for (int i = 0; i < m_udpServer.Count; i++)
125 { 125 {
126 this.m_udpServer[i].ServerListener(); 126 this.m_udpServer[i].ServerListener();
127 } 127 }
128 128
129 } 129 }
130 130
131 # region Setup methods 131 # region Setup methods
132 protected override void SetupLocalGridServers() 132 protected override void SetupLocalGridServers()
133 { 133 {
134 try 134 try
135 { 135 {
136 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); 136 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey);
137 InventoryCache = new InventoryCache(); 137 InventoryCache = new InventoryCache();
138 this.commsManager = new CommunicationsLocal(this.serversData, httpServer); 138 this.commsManager = new CommunicationsLocal(this.serversData, httpServer);
139 } 139 }
140 catch (Exception e) 140 catch (Exception e)
141 { 141 {
142 m_log.Error(e.Message + "\nSorry, could not setup local cache"); 142 m_log.Error(e.Message + "\nSorry, could not setup local cache");
143 Environment.Exit(1); 143 Environment.Exit(1);
144 } 144 }
145 145
146 } 146 }
147 147
148 protected override void SetupRemoteGridServers() 148 protected override void SetupRemoteGridServers()
149 { 149 {
150 try 150 try
151 { 151 {
152 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); 152 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey);
153 InventoryCache = new InventoryCache(); 153 InventoryCache = new InventoryCache();
154 this.commsManager = new CommunicationsOGS1(this.serversData, httpServer); 154 this.commsManager = new CommunicationsOGS1(this.serversData, httpServer);
155 } 155 }
156 catch (Exception e) 156 catch (Exception e)
157 { 157 {
158 m_log.Error(e.Message + "\nSorry, could not setup remote cache"); 158 m_log.Error(e.Message + "\nSorry, could not setup remote cache");
159 Environment.Exit(1); 159 Environment.Exit(1);
160 } 160 }
161 } 161 }
162 162
163 protected override void SetupScene() 163 protected override void SetupScene()
164 { 164 {
165 IGenericConfig regionConfig; 165 IGenericConfig regionConfig;
166 Scene scene; 166 Scene scene;
167 UDPServer udpServer; 167 UDPServer udpServer;
168 RegionInfo regionDat = new RegionInfo(); 168 RegionInfo regionDat = new RegionInfo();
169 AuthenticateSessionsBase authenBase; 169 AuthenticateSessionsBase authenBase;
170 170
171 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); 171 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions");
172 string[] configFiles = Directory.GetFiles(path, "*.xml"); 172 string[] configFiles = Directory.GetFiles(path, "*.xml");
173 173
174 if (configFiles.Length == 0) 174 if (configFiles.Length == 0)
175 { 175 {
176 string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions"); 176 string path2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions");
177 string path3 = Path.Combine(path2, "default.xml"); 177 string path3 = Path.Combine(path2, "default.xml");
178 Console.WriteLine("Creating default region config file"); 178 Console.WriteLine("Creating default region config file");
179 //TODO create default region 179 //TODO create default region
180 IGenericConfig defaultConfig = new XmlConfig(path3); 180 IGenericConfig defaultConfig = new XmlConfig(path3);
181 defaultConfig.LoadData(); 181 defaultConfig.LoadData();
182 defaultConfig.Commit(); 182 defaultConfig.Commit();
183 defaultConfig.Close(); 183 defaultConfig.Close();
184 defaultConfig = null; 184 defaultConfig = null;
185 configFiles = Directory.GetFiles(path, "*.xml"); 185 configFiles = Directory.GetFiles(path, "*.xml");
186 } 186 }
187 187
188 for (int i = 0; i < configFiles.Length; i++) 188 for (int i = 0; i < configFiles.Length; i++)
189 { 189 {
190 regionDat = new RegionInfo(); 190 regionDat = new RegionInfo();
191 if (m_sandbox) 191 if (m_sandbox)
192 { 192 {
193 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); // new AuthenticateSessionsLocal(); 193 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); // new AuthenticateSessionsLocal();
194 this.AuthenticateSessionsHandler.Add(authen); 194 this.AuthenticateSessionsHandler.Add(authen);
195 authenBase = authen; 195 authenBase = authen;
196 } 196 }
197 else 197 else
198 { 198 {
199 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); //new AuthenticateSessionsRemote(); 199 AuthenticateSessionsBase authen = new AuthenticateSessionsBase(); //new AuthenticateSessionsRemote();
200 this.AuthenticateSessionsHandler.Add(authen); 200 this.AuthenticateSessionsHandler.Add(authen);
201 authenBase = authen; 201 authenBase = authen;
202 } 202 }
203 Console.WriteLine("Loading region config file"); 203 Console.WriteLine("Loading region config file");
204 regionConfig = new XmlConfig(configFiles[i]); 204 regionConfig = new XmlConfig(configFiles[i]);
205 regionConfig.LoadData(); 205 regionConfig.LoadData();
206 regionDat.InitConfig(this.m_sandbox, regionConfig); 206 regionDat.InitConfig(this.m_sandbox, regionConfig);
207 regionConfig.Close(); 207 regionConfig.Close();
208 208
209 udpServer = new UDPServer(regionDat.InternalEndPoint.Port, this.AssetCache, this.InventoryCache, this.m_log, authenBase); 209 udpServer = new UDPServer(regionDat.InternalEndPoint.Port, this.AssetCache, this.InventoryCache, this.m_log, authenBase);
210 210
211 m_udpServer.Add(udpServer); 211 m_udpServer.Add(udpServer);
212 this.regionData.Add(regionDat); 212 this.regionData.Add(regionDat);
213 213
214 StorageManager tmpStoreManager = new StorageManager("OpenSim.DataStore.NullStorage.dll", regionDat.DataStore, regionDat.RegionName); 214 StorageManager tmpStoreManager = new StorageManager("OpenSim.DataStore.NullStorage.dll", regionDat.DataStore, regionDat.RegionName);
215 215
216 scene = new Scene( regionDat, authenBase, commsManager, this.AssetCache, tmpStoreManager, httpServer); 216 scene = new Scene( regionDat, authenBase, commsManager, this.AssetCache, tmpStoreManager, httpServer);
217 this.m_localWorld.Add(scene); 217 this.m_localWorld.Add(scene);
218 218
219 udpServer.LocalWorld = scene; 219 udpServer.LocalWorld = scene;
220 220
221 scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 221 scene.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
222 scene.LoadWorldMap(); 222 scene.LoadWorldMap();
223 223
224 m_log.Verbose("Main.cs:Startup() - Starting up messaging system"); 224 m_log.Verbose("Main.cs:Startup() - Starting up messaging system");
225 scene.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); 225 scene.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
226 scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D()); 226 scene.PhysScene.SetTerrain(scene.Terrain.getHeights1D());
227 scene.LoadPrimsFromStorage(); 227 scene.LoadPrimsFromStorage();
228 228
229 //Master Avatar Setup 229 //Master Avatar Setup
230 UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword); 230 UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName, scene.RegionInfo.MasterAvatarSandboxPassword);
231 if (masterAvatar != null) 231 if (masterAvatar != null)
232 { 232 {
233 m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]"); 233 m_log.Notice("Parcels - Found master avatar [" + masterAvatar.UUID.ToStringHyphenated() + "]");
234 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 234 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
235 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager); 235 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager);
236 } 236 }
237 else 237 else
238 { 238 {
239 m_log.Notice("Parcels - No master avatar found, using null."); 239 m_log.Notice("Parcels - No master avatar found, using null.");
240 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; 240 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
241 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager); 241 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager);
242 } 242 }
243 scene.performParcelPrimCountUpdate(); 243 scene.performParcelPrimCountUpdate();
244 scene.StartTimer(); 244 scene.StartTimer();
245 } 245 }
246 } 246 }
247 247
248 private class SimStatusHandler : IStreamHandler 248 private class SimStatusHandler : IStreamHandler
249 { 249 {
250 public byte[] Handle(string path, Stream request) 250 public byte[] Handle(string path, Stream request)
251 { 251 {
252 return Encoding.UTF8.GetBytes("OK"); 252 return Encoding.UTF8.GetBytes("OK");
253 } 253 }
254 254
255 public string ContentType 255 public string ContentType
256 { 256 {
257 get { return "text/plain"; } 257 get { return "text/plain"; }
258 } 258 }
259 259
260 public string HttpMethod 260 public string HttpMethod
261 { 261 {
262 get { return "GET"; } 262 get { return "GET"; }
263 } 263 }
264 264
265 public string Path 265 public string Path
266 { 266 {
267 get { return "/simstatus/"; } 267 get { return "/simstatus/"; }
268 } 268 }
269 } 269 }
270 270
271 protected override void SetupHttpListener() 271 protected override void SetupHttpListener()
272 { 272 {
273 httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort); 273 httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort);
274 274
275 if (!this.m_sandbox) 275 if (!this.m_sandbox)
276 { 276 {
277 httpServer.AddStreamHandler( new SimStatusHandler() ); 277 httpServer.AddStreamHandler( new SimStatusHandler() );
278 } 278 }
279 } 279 }
280 280
281 protected override void ConnectToRemoteGridServer() 281 protected override void ConnectToRemoteGridServer()
282 { 282 {
283 283
284 } 284 }
285 285
286 #endregion 286 #endregion
287 287
288 private void SetupFromConfigFile(IGenericConfig configData) 288 private void SetupFromConfigFile(IGenericConfig configData)
289 { 289 {
290 // Log filename 290 // Log filename
291 string attri = ""; 291 string attri = "";
292 attri = configData.GetAttribute("LogFilename"); 292 attri = configData.GetAttribute("LogFilename");
293 if (String.IsNullOrEmpty(attri)) 293 if (String.IsNullOrEmpty(attri))
294 { 294 {
295 } 295 }
296 else 296 else
297 { 297 {
298 m_logFilename = attri; 298 m_logFilename = attri;
299 } 299 }
300 300
301 // SandBoxMode 301 // SandBoxMode
302 attri = ""; 302 attri = "";
303 attri = configData.GetAttribute("SandBox"); 303 attri = configData.GetAttribute("SandBox");
304 if ((attri == "") || ((attri != "false") && (attri != "true"))) 304 if ((attri == "") || ((attri != "false") && (attri != "true")))
305 { 305 {
306 this.m_sandbox = false; 306 this.m_sandbox = false;
307 configData.SetAttribute("SandBox", "false"); 307 configData.SetAttribute("SandBox", "false");
308 } 308 }
309 else 309 else
310 { 310 {
311 this.m_sandbox = Convert.ToBoolean(attri); 311 this.m_sandbox = Convert.ToBoolean(attri);
312 } 312 }
313 313
314 // LoginServer 314 // LoginServer
315 attri = ""; 315 attri = "";
316 attri = configData.GetAttribute("LoginServer"); 316 attri = configData.GetAttribute("LoginServer");
317 if ((attri == "") || ((attri != "false") && (attri != "true"))) 317 if ((attri == "") || ((attri != "false") && (attri != "true")))
318 { 318 {
319 this.m_loginserver = false; 319 this.m_loginserver = false;
320 configData.SetAttribute("LoginServer", "false"); 320 configData.SetAttribute("LoginServer", "false");
321 } 321 }
322 else 322 else
323 { 323 {
324 this.m_loginserver = Convert.ToBoolean(attri); 324 this.m_loginserver = Convert.ToBoolean(attri);
325 } 325 }
326 326
327 // Sandbox User accounts 327 // Sandbox User accounts
328 attri = ""; 328 attri = "";
329 attri = configData.GetAttribute("UserAccount"); 329 attri = configData.GetAttribute("UserAccount");
330 if ((attri == "") || ((attri != "false") && (attri != "true"))) 330 if ((attri == "") || ((attri != "false") && (attri != "true")))
331 { 331 {
332 this.user_accounts = false; 332 this.user_accounts = false;
333 configData.SetAttribute("UserAccounts", "false"); 333 configData.SetAttribute("UserAccounts", "false");
334 } 334 }
335 else if (attri == "true") 335 else if (attri == "true")
336 { 336 {
337 this.user_accounts = Convert.ToBoolean(attri); 337 this.user_accounts = Convert.ToBoolean(attri);
338 } 338 }
339 339
340 // Grid mode hack to use local asset server 340 // Grid mode hack to use local asset server
341 attri = ""; 341 attri = "";
342 attri = configData.GetAttribute("LocalAssets"); 342 attri = configData.GetAttribute("LocalAssets");
343 if ((attri == "") || ((attri != "false") && (attri != "true"))) 343 if ((attri == "") || ((attri != "false") && (attri != "true")))
344 { 344 {
345 this.gridLocalAsset = false; 345 this.gridLocalAsset = false;
346 configData.SetAttribute("LocalAssets", "false"); 346 configData.SetAttribute("LocalAssets", "false");
347 } 347 }
348 else if (attri == "true") 348 else if (attri == "true")
349 { 349 {
350 this.gridLocalAsset = Convert.ToBoolean(attri); 350 this.gridLocalAsset = Convert.ToBoolean(attri);
351 } 351 }
352 352
353 353
354 attri = ""; 354 attri = "";
355 attri = configData.GetAttribute("PhysicsEngine"); 355 attri = configData.GetAttribute("PhysicsEngine");
356 switch (attri) 356 switch (attri)
357 { 357 {
358 default: 358 default:
359 m_log.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating"); 359 m_log.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
360 Environment.Exit(1); 360 Environment.Exit(1);
361 break; 361 break;
362 362
363 case "": 363 case "":
364 this.m_physicsEngine = "basicphysics"; 364 this.m_physicsEngine = "basicphysics";
365 configData.SetAttribute("PhysicsEngine", "basicphysics"); 365 configData.SetAttribute("PhysicsEngine", "basicphysics");
366 ScenePresence.PhysicsEngineFlying = false; 366 ScenePresence.PhysicsEngineFlying = false;
367 break; 367 break;
368 368
369 case "basicphysics": 369 case "basicphysics":
370 this.m_physicsEngine = "basicphysics"; 370 this.m_physicsEngine = "basicphysics";
371 configData.SetAttribute("PhysicsEngine", "basicphysics"); 371 configData.SetAttribute("PhysicsEngine", "basicphysics");
372 ScenePresence.PhysicsEngineFlying = false; 372 ScenePresence.PhysicsEngineFlying = false;
373 break; 373 break;
374 374
375 case "RealPhysX": 375 case "RealPhysX":
376 this.m_physicsEngine = "RealPhysX"; 376 this.m_physicsEngine = "RealPhysX";
377 ScenePresence.PhysicsEngineFlying = true; 377 ScenePresence.PhysicsEngineFlying = true;
378 break; 378 break;
379 379
380 case "OpenDynamicsEngine": 380 case "OpenDynamicsEngine":
381 this.m_physicsEngine = "OpenDynamicsEngine"; 381 this.m_physicsEngine = "OpenDynamicsEngine";
382 ScenePresence.PhysicsEngineFlying = true; 382 ScenePresence.PhysicsEngineFlying = true;
383 break; 383 break;
384 384
385 case "BulletXEngine": 385 case "BulletXEngine":
386 this.m_physicsEngine = "BulletXEngine"; 386 this.m_physicsEngine = "BulletXEngine";
387 ScenePresence.PhysicsEngineFlying = true; 387 ScenePresence.PhysicsEngineFlying = true;
388 break; 388 break;
389 } 389 }
390 390
391 configData.Commit(); 391 configData.Commit();
392 392
393 } 393 }
394 394
395 /// <summary> 395 /// <summary>
396 /// Performs any last-minute sanity checking and shuts down the region server 396 /// Performs any last-minute sanity checking and shuts down the region server
397 /// </summary> 397 /// </summary>
398 public virtual void Shutdown() 398 public virtual void Shutdown()
399 { 399 {
400 m_log.Verbose("Main.cs:Shutdown() - Closing all threads"); 400 m_log.Verbose("Main.cs:Shutdown() - Closing all threads");
401 m_log.Verbose("Main.cs:Shutdown() - Killing listener thread"); 401 m_log.Verbose("Main.cs:Shutdown() - Killing listener thread");
402 m_log.Verbose("Main.cs:Shutdown() - Killing clients"); 402 m_log.Verbose("Main.cs:Shutdown() - Killing clients");
403 // IMPLEMENT THIS 403 // IMPLEMENT THIS
404 m_log.Verbose("Main.cs:Shutdown() - Closing console and terminating"); 404 m_log.Verbose("Main.cs:Shutdown() - Closing console and terminating");
405 for (int i = 0; i < m_localWorld.Count; i++) 405 for (int i = 0; i < m_localWorld.Count; i++)
406 { 406 {
407 ((Scene)m_localWorld[i]).Close(); 407 ((Scene)m_localWorld[i]).Close();
408 } 408 }
409 m_log.Close(); 409 m_log.Close();
410 Environment.Exit(0); 410 Environment.Exit(0);
411 } 411 }
412 412
413 #region Console Commands 413 #region Console Commands
414 /// <summary> 414 /// <summary>
415 /// Runs commands issued by the server console from the operator 415 /// Runs commands issued by the server console from the operator
416 /// </summary> 416 /// </summary>
417 /// <param name="command">The first argument of the parameter (the command)</param> 417 /// <param name="command">The first argument of the parameter (the command)</param>
418 /// <param name="cmdparams">Additional arguments passed to the command</param> 418 /// <param name="cmdparams">Additional arguments passed to the command</param>
419 public void RunCmd(string command, string[] cmdparams) 419 public void RunCmd(string command, string[] cmdparams)
420 { 420 {
421 switch (command) 421 switch (command)
422 { 422 {
423 case "help": 423 case "help":
424 m_log.Error("show users - show info about connected users"); 424 m_log.Error("show users - show info about connected users");
425 m_log.Error("quit - disconnect all clients and shutdown"); 425 m_log.Error("quit - disconnect all clients and shutdown");
426 break; 426 break;
427 427
428 case "show": 428 case "show":
429 if (cmdparams.Length > 0) 429 if (cmdparams.Length > 0)
430 { 430 {
431 Show(cmdparams[0]); 431 Show(cmdparams[0]);
432 } 432 }
433 break; 433 break;
434 434
435 case "terrain": 435 case "terrain":
436 string result = ""; 436 string result = "";
437 for (int i = 0; i < m_localWorld.Count; i++) 437 for (int i = 0; i < m_localWorld.Count; i++)
438 { 438 {
439 if (!((Scene)m_localWorld[i]).Terrain.RunTerrainCmd(cmdparams, ref result, m_localWorld[i].RegionInfo.RegionName)) 439 if (!((Scene)m_localWorld[i]).Terrain.RunTerrainCmd(cmdparams, ref result, m_localWorld[i].RegionInfo.RegionName))
440 { 440 {
441 m_log.Error(result); 441 m_log.Error(result);
442 } 442 }
443 } 443 }
444 break; 444 break;
445 case "script": 445 case "script":
446 for (int i = 0; i < m_localWorld.Count; i++) 446 for (int i = 0; i < m_localWorld.Count; i++)
447 { 447 {
448 ((Scene)m_localWorld[i]).SendCommandToScripts(cmdparams); 448 ((Scene)m_localWorld[i]).SendCommandToScripts(cmdparams);
449 } 449 }
450 break; 450 break;
451 451
452 case "quit": 452 case "quit":
453 case "shutdown": 453 case "shutdown":
454 Shutdown(); 454 Shutdown();
455 break; 455 break;
456 456
457 default: 457 default:
458 m_log.Error("Unknown command"); 458 m_log.Error("Unknown command");
459 break; 459 break;
460 } 460 }
461 } 461 }
462 462
463 /// <summary> 463 /// <summary>
464 /// Outputs to the console information about the region 464 /// Outputs to the console information about the region
465 /// </summary> 465 /// </summary>
466 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param> 466 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param>
467 public void Show(string ShowWhat) 467 public void Show(string ShowWhat)
468 { 468 {
469 switch (ShowWhat) 469 switch (ShowWhat)
470 { 470 {
471 case "uptime": 471 case "uptime":
472 m_log.Error("OpenSim has been running since " + startuptime.ToString()); 472 m_log.Error("OpenSim has been running since " + startuptime.ToString());
473 m_log.Error("That is " + (DateTime.Now - startuptime).ToString()); 473 m_log.Error("That is " + (DateTime.Now - startuptime).ToString());
474 break; 474 break;
475 case "users": 475 case "users":
476 ScenePresence TempAv; 476 ScenePresence TempAv;
477 m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP", "World")); 477 m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP", "World"));
478 for (int i = 0; i < m_localWorld.Count; i++) 478 for (int i = 0; i < m_localWorld.Count; i++)
479 { 479 {
480 foreach (libsecondlife.LLUUID UUID in ((Scene)m_localWorld[i]).Entities.Keys) 480 foreach (libsecondlife.LLUUID UUID in ((Scene)m_localWorld[i]).Entities.Keys)
481 { 481 {
482 if (((Scene)m_localWorld[i]).Entities[UUID].ToString() == "OpenSim.world.Avatar") 482 if (((Scene)m_localWorld[i]).Entities[UUID].ToString() == "OpenSim.world.Avatar")
483 { 483 {
484 TempAv = (ScenePresence)((Scene)m_localWorld[i]).Entities[UUID]; 484 TempAv = (ScenePresence)((Scene)m_localWorld[i]).Entities[UUID];
485 m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.AgentId, "Unknown", "Unknown"), ((Scene)m_localWorld[i]).RegionInfo.RegionName); 485 m_log.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.AgentId, "Unknown", "Unknown"), ((Scene)m_localWorld[i]).RegionInfo.RegionName);
486 } 486 }
487 } 487 }
488 } 488 }
489 break; 489 break;
490 } 490 }
491 } 491 }
492 #endregion 492 #endregion
493 } 493 }
494 494
495 495
496} 496}
diff --git a/OpenSim/Region/Application/VersionInfo.cs b/OpenSim/Region/Application/VersionInfo.cs
index 2c720a3..6952d24 100644
--- a/OpenSim/Region/Application/VersionInfo.cs
+++ b/OpenSim/Region/Application/VersionInfo.cs
@@ -1,36 +1,36 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim 28namespace OpenSim
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// </summary> 31 /// </summary>
32 public class VersionInfo 32 public class VersionInfo
33 { 33 {
34 public static string Version = "0.3, SVN build "; 34 public static string Version = "0.3, SVN build ";
35 } 35 }
36} 36}
diff --git a/OpenSim/Region/Caches/AssetCache.cs b/OpenSim/Region/Caches/AssetCache.cs
index 453edbe..8deb0a1 100644
--- a/OpenSim/Region/Caches/AssetCache.cs
+++ b/OpenSim/Region/Caches/AssetCache.cs
@@ -1,669 +1,669 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using libsecondlife;
34using libsecondlife.Packets; 34using libsecondlife.Packets;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37 37
38namespace OpenSim.Region.Caches 38namespace OpenSim.Region.Caches
39{ 39{
40 public delegate void DownloadComplete(AssetCache.TextureSender sender); 40 public delegate void DownloadComplete(AssetCache.TextureSender sender);
41 41
42 /// <summary> 42 /// <summary>
43 /// Manages local cache of assets and their sending to viewers. 43 /// Manages local cache of assets and their sending to viewers.
44 /// </summary> 44 /// </summary>
45 public class AssetCache : IAssetReceiver 45 public class AssetCache : IAssetReceiver
46 { 46 {
47 public Dictionary<LLUUID, AssetInfo> Assets; 47 public Dictionary<LLUUID, AssetInfo> Assets;
48 public Dictionary<LLUUID, TextureImage> Textures; 48 public Dictionary<LLUUID, TextureImage> Textures;
49 49
50 public List<AssetRequest> AssetRequests = new List<AssetRequest>(); //assets ready to be sent to viewers 50 public List<AssetRequest> AssetRequests = new List<AssetRequest>(); //assets ready to be sent to viewers
51 public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent 51 public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent
52 52
53 public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server 53 public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server
54 public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server 54 public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server
55 55
56 public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>(); 56 public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>();
57 private IAssetServer _assetServer; 57 private IAssetServer _assetServer;
58 private Thread _assetCacheThread; 58 private Thread _assetCacheThread;
59 private LLUUID[] textureList = new LLUUID[5]; 59 private LLUUID[] textureList = new LLUUID[5];
60 60
61 /// <summary> 61 /// <summary>
62 /// 62 ///
63 /// </summary> 63 /// </summary>
64 public AssetCache(IAssetServer assetServer) 64 public AssetCache(IAssetServer assetServer)
65 { 65 {
66 Console.WriteLine("Creating Asset cache"); 66 Console.WriteLine("Creating Asset cache");
67 _assetServer = assetServer; 67 _assetServer = assetServer;
68 _assetServer.SetReceiver(this); 68 _assetServer.SetReceiver(this);
69 Assets = new Dictionary<LLUUID, AssetInfo>(); 69 Assets = new Dictionary<LLUUID, AssetInfo>();
70 Textures = new Dictionary<LLUUID, TextureImage>(); 70 Textures = new Dictionary<LLUUID, TextureImage>();
71 this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); 71 this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
72 this._assetCacheThread.IsBackground = true; 72 this._assetCacheThread.IsBackground = true;
73 this._assetCacheThread.Start(); 73 this._assetCacheThread.Start();
74 74
75 } 75 }
76 76
77 public AssetCache(string assetServerDLLName, string assetServerURL, string assetServerKey) 77 public AssetCache(string assetServerDLLName, string assetServerURL, string assetServerKey)
78 { 78 {
79 Console.WriteLine("Creating Asset cache"); 79 Console.WriteLine("Creating Asset cache");
80 _assetServer = this.LoadAssetDll(assetServerDLLName); 80 _assetServer = this.LoadAssetDll(assetServerDLLName);
81 _assetServer.SetServerInfo(assetServerURL, assetServerKey); 81 _assetServer.SetServerInfo(assetServerURL, assetServerKey);
82 _assetServer.SetReceiver(this); 82 _assetServer.SetReceiver(this);
83 Assets = new Dictionary<LLUUID, AssetInfo>(); 83 Assets = new Dictionary<LLUUID, AssetInfo>();
84 Textures = new Dictionary<LLUUID, TextureImage>(); 84 Textures = new Dictionary<LLUUID, TextureImage>();
85 this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); 85 this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
86 this._assetCacheThread.IsBackground = true; 86 this._assetCacheThread.IsBackground = true;
87 this._assetCacheThread.Start(); 87 this._assetCacheThread.Start();
88 88
89 } 89 }
90 90
91 /// <summary> 91 /// <summary>
92 /// 92 ///
93 /// </summary> 93 /// </summary>
94 public void RunAssetManager() 94 public void RunAssetManager()
95 { 95 {
96 while (true) 96 while (true)
97 { 97 {
98 try 98 try
99 { 99 {
100 //Console.WriteLine("Asset cache loop"); 100 //Console.WriteLine("Asset cache loop");
101 this.ProcessAssetQueue(); 101 this.ProcessAssetQueue();
102 this.ProcessTextureQueue(); 102 this.ProcessTextureQueue();
103 Thread.Sleep(500); 103 Thread.Sleep(500);
104 } 104 }
105 catch (Exception e) 105 catch (Exception e)
106 { 106 {
107 Console.WriteLine(e.Message); 107 Console.WriteLine(e.Message);
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 public void LoadDefaultTextureSet() 112 public void LoadDefaultTextureSet()
113 { 113 {
114 //hack: so we can give each user a set of textures 114 //hack: so we can give each user a set of textures
115 textureList[0] = new LLUUID("00000000-0000-0000-9999-000000000001"); 115 textureList[0] = new LLUUID("00000000-0000-0000-9999-000000000001");
116 textureList[1] = new LLUUID("00000000-0000-0000-9999-000000000002"); 116 textureList[1] = new LLUUID("00000000-0000-0000-9999-000000000002");
117 textureList[2] = new LLUUID("00000000-0000-0000-9999-000000000003"); 117 textureList[2] = new LLUUID("00000000-0000-0000-9999-000000000003");
118 textureList[3] = new LLUUID("00000000-0000-0000-9999-000000000004"); 118 textureList[3] = new LLUUID("00000000-0000-0000-9999-000000000004");
119 textureList[4] = new LLUUID("00000000-0000-0000-9999-000000000005"); 119 textureList[4] = new LLUUID("00000000-0000-0000-9999-000000000005");
120 120
121 for (int i = 0; i < textureList.Length; i++) 121 for (int i = 0; i < textureList.Length; i++)
122 { 122 {
123 this._assetServer.RequestAsset(textureList[i], true); 123 this._assetServer.RequestAsset(textureList[i], true);
124 } 124 }
125 125
126 } 126 }
127 127
128 public AssetBase[] CreateNewInventorySet(LLUUID agentID) 128 public AssetBase[] CreateNewInventorySet(LLUUID agentID)
129 { 129 {
130 AssetBase[] inventorySet = new AssetBase[this.textureList.Length]; 130 AssetBase[] inventorySet = new AssetBase[this.textureList.Length];
131 for (int i = 0; i < textureList.Length; i++) 131 for (int i = 0; i < textureList.Length; i++)
132 { 132 {
133 if (this.Textures.ContainsKey(textureList[i])) 133 if (this.Textures.ContainsKey(textureList[i]))
134 { 134 {
135 inventorySet[i] = this.CloneImage(agentID, this.Textures[textureList[i]]); 135 inventorySet[i] = this.CloneImage(agentID, this.Textures[textureList[i]]);
136 TextureImage image = new TextureImage(inventorySet[i]); 136 TextureImage image = new TextureImage(inventorySet[i]);
137 this.Textures.Add(image.FullID, image); 137 this.Textures.Add(image.FullID, image);
138 this._assetServer.UploadNewAsset(image); //save the asset to the asset server 138 this._assetServer.UploadNewAsset(image); //save the asset to the asset server
139 } 139 }
140 } 140 }
141 return inventorySet; 141 return inventorySet;
142 } 142 }
143 143
144 public AssetBase GetAsset(LLUUID assetID) 144 public AssetBase GetAsset(LLUUID assetID)
145 { 145 {
146 AssetBase asset = null; 146 AssetBase asset = null;
147 if (this.Textures.ContainsKey(assetID)) 147 if (this.Textures.ContainsKey(assetID))
148 { 148 {
149 asset = this.Textures[assetID]; 149 asset = this.Textures[assetID];
150 } 150 }
151 else if (this.Assets.ContainsKey(assetID)) 151 else if (this.Assets.ContainsKey(assetID))
152 { 152 {
153 asset = this.Assets[assetID]; 153 asset = this.Assets[assetID];
154 } 154 }
155 return asset; 155 return asset;
156 } 156 }
157 157
158 public void AddAsset(AssetBase asset) 158 public void AddAsset(AssetBase asset)
159 { 159 {
160 // Console.WriteLine("adding asset " + asset.FullID.ToStringHyphenated()); 160 // Console.WriteLine("adding asset " + asset.FullID.ToStringHyphenated());
161 if (asset.Type == 0) 161 if (asset.Type == 0)
162 { 162 {
163 //Console.WriteLine("which is a texture"); 163 //Console.WriteLine("which is a texture");
164 if (!this.Textures.ContainsKey(asset.FullID)) 164 if (!this.Textures.ContainsKey(asset.FullID))
165 { //texture 165 { //texture
166 TextureImage textur = new TextureImage(asset); 166 TextureImage textur = new TextureImage(asset);
167 this.Textures.Add(textur.FullID, textur); 167 this.Textures.Add(textur.FullID, textur);
168 this._assetServer.UploadNewAsset(asset); 168 this._assetServer.UploadNewAsset(asset);
169 } 169 }
170 } 170 }
171 else 171 else
172 { 172 {
173 if (!this.Assets.ContainsKey(asset.FullID)) 173 if (!this.Assets.ContainsKey(asset.FullID))
174 { 174 {
175 AssetInfo assetInf = new AssetInfo(asset); 175 AssetInfo assetInf = new AssetInfo(asset);
176 this.Assets.Add(assetInf.FullID, assetInf); 176 this.Assets.Add(assetInf.FullID, assetInf);
177 this._assetServer.UploadNewAsset(asset); 177 this._assetServer.UploadNewAsset(asset);
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 /// <summary> 182 /// <summary>
183 /// 183 ///
184 /// </summary> 184 /// </summary>
185 private void ProcessTextureQueue() 185 private void ProcessTextureQueue()
186 { 186 {
187 if (this.TextureRequests.Count == 0) 187 if (this.TextureRequests.Count == 0)
188 { 188 {
189 //no requests waiting 189 //no requests waiting
190 return; 190 return;
191 } 191 }
192 int num; 192 int num;
193 num = this.TextureRequests.Count; 193 num = this.TextureRequests.Count;
194 194
195 AssetRequest req; 195 AssetRequest req;
196 for (int i = 0; i < num; i++) 196 for (int i = 0; i < num; i++)
197 { 197 {
198 req = (AssetRequest)this.TextureRequests[i]; 198 req = (AssetRequest)this.TextureRequests[i];
199 if (!this.SendingTextures.ContainsKey(req.ImageInfo.FullID)) 199 if (!this.SendingTextures.ContainsKey(req.ImageInfo.FullID))
200 { 200 {
201 TextureSender sender = new TextureSender(req); 201 TextureSender sender = new TextureSender(req);
202 sender.OnComplete += this.TextureSent; 202 sender.OnComplete += this.TextureSent;
203 lock (this.SendingTextures) 203 lock (this.SendingTextures)
204 { 204 {
205 this.SendingTextures.Add(req.ImageInfo.FullID, sender); 205 this.SendingTextures.Add(req.ImageInfo.FullID, sender);
206 } 206 }
207 } 207 }
208 208
209 } 209 }
210 210
211 this.TextureRequests.Clear(); 211 this.TextureRequests.Clear();
212 } 212 }
213 213
214 /// <summary> 214 /// <summary>
215 /// Event handler, called by a TextureSender object to say that texture has been sent 215 /// Event handler, called by a TextureSender object to say that texture has been sent
216 /// </summary> 216 /// </summary>
217 /// <param name="sender"></param> 217 /// <param name="sender"></param>
218 public void TextureSent(TextureSender sender) 218 public void TextureSent(TextureSender sender)
219 { 219 {
220 if (this.SendingTextures.ContainsKey(sender.request.ImageInfo.FullID)) 220 if (this.SendingTextures.ContainsKey(sender.request.ImageInfo.FullID))
221 { 221 {
222 lock (this.SendingTextures) 222 lock (this.SendingTextures)
223 { 223 {
224 this.SendingTextures.Remove(sender.request.ImageInfo.FullID); 224 this.SendingTextures.Remove(sender.request.ImageInfo.FullID);
225 } 225 }
226 } 226 }
227 } 227 }
228 228
229 public void AssetReceived(AssetBase asset, bool IsTexture) 229 public void AssetReceived(AssetBase asset, bool IsTexture)
230 { 230 {
231 if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server 231 if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server
232 { 232 {
233 //check if it is a texture or not 233 //check if it is a texture or not
234 //then add to the correct cache list 234 //then add to the correct cache list
235 //then check for waiting requests for this asset/texture (in the Requested lists) 235 //then check for waiting requests for this asset/texture (in the Requested lists)
236 //and move those requests into the Requests list. 236 //and move those requests into the Requests list.
237 if (IsTexture) 237 if (IsTexture)
238 { 238 {
239 TextureImage image = new TextureImage(asset); 239 TextureImage image = new TextureImage(asset);
240 this.Textures.Add(image.FullID, image); 240 this.Textures.Add(image.FullID, image);
241 if (this.RequestedTextures.ContainsKey(image.FullID)) 241 if (this.RequestedTextures.ContainsKey(image.FullID))
242 { 242 {
243 AssetRequest req = this.RequestedTextures[image.FullID]; 243 AssetRequest req = this.RequestedTextures[image.FullID];
244 req.ImageInfo = image; 244 req.ImageInfo = image;
245 if (image.Data.LongLength > 600) 245 if (image.Data.LongLength > 600)
246 { 246 {
247 //over 600 bytes so split up file 247 //over 600 bytes so split up file
248 req.NumPackets = 1 + (int)(image.Data.Length - 600 + 999) / 1000; 248 req.NumPackets = 1 + (int)(image.Data.Length - 600 + 999) / 1000;
249 } 249 }
250 else 250 else
251 { 251 {
252 req.NumPackets = 1; 252 req.NumPackets = 1;
253 } 253 }
254 this.RequestedTextures.Remove(image.FullID); 254 this.RequestedTextures.Remove(image.FullID);
255 this.TextureRequests.Add(req); 255 this.TextureRequests.Add(req);
256 } 256 }
257 } 257 }
258 else 258 else
259 { 259 {
260 AssetInfo assetInf = new AssetInfo(asset); 260 AssetInfo assetInf = new AssetInfo(asset);
261 this.Assets.Add(assetInf.FullID, assetInf); 261 this.Assets.Add(assetInf.FullID, assetInf);
262 if (this.RequestedAssets.ContainsKey(assetInf.FullID)) 262 if (this.RequestedAssets.ContainsKey(assetInf.FullID))
263 { 263 {
264 AssetRequest req = this.RequestedAssets[assetInf.FullID]; 264 AssetRequest req = this.RequestedAssets[assetInf.FullID];
265 req.AssetInf = assetInf; 265 req.AssetInf = assetInf;
266 if (assetInf.Data.LongLength > 600) 266 if (assetInf.Data.LongLength > 600)
267 { 267 {
268 //over 600 bytes so split up file 268 //over 600 bytes so split up file
269 req.NumPackets = 1 + (int)(assetInf.Data.Length - 600 + 999) / 1000; 269 req.NumPackets = 1 + (int)(assetInf.Data.Length - 600 + 999) / 1000;
270 } 270 }
271 else 271 else
272 { 272 {
273 req.NumPackets = 1; 273 req.NumPackets = 1;
274 } 274 }
275 this.RequestedAssets.Remove(assetInf.FullID); 275 this.RequestedAssets.Remove(assetInf.FullID);
276 this.AssetRequests.Add(req); 276 this.AssetRequests.Add(req);
277 } 277 }
278 } 278 }
279 } 279 }
280 } 280 }
281 281
282 public void AssetNotFound(AssetBase asset) 282 public void AssetNotFound(AssetBase asset)
283 { 283 {
284 //the asset server had no knowledge of requested asset 284 //the asset server had no knowledge of requested asset
285 285
286 } 286 }
287 287
288 #region Assets 288 #region Assets
289 /// <summary> 289 /// <summary>
290 /// 290 ///
291 /// </summary> 291 /// </summary>
292 /// <param name="userInfo"></param> 292 /// <param name="userInfo"></param>
293 /// <param name="transferRequest"></param> 293 /// <param name="transferRequest"></param>
294 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) 294 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
295 { 295 {
296 LLUUID requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); 296 LLUUID requestID = new LLUUID(transferRequest.TransferInfo.Params, 0);
297 //check to see if asset is in local cache, if not we need to request it from asset server. 297 //check to see if asset is in local cache, if not we need to request it from asset server.
298 298
299 if (!this.Assets.ContainsKey(requestID)) 299 if (!this.Assets.ContainsKey(requestID))
300 { 300 {
301 //not found asset 301 //not found asset
302 // so request from asset server 302 // so request from asset server
303 if (!this.RequestedAssets.ContainsKey(requestID)) 303 if (!this.RequestedAssets.ContainsKey(requestID))
304 { 304 {
305 AssetRequest request = new AssetRequest(); 305 AssetRequest request = new AssetRequest();
306 request.RequestUser = userInfo; 306 request.RequestUser = userInfo;
307 request.RequestAssetID = requestID; 307 request.RequestAssetID = requestID;
308 request.TransferRequestID = transferRequest.TransferInfo.TransferID; 308 request.TransferRequestID = transferRequest.TransferInfo.TransferID;
309 this.RequestedAssets.Add(requestID, request); 309 this.RequestedAssets.Add(requestID, request);
310 this._assetServer.RequestAsset(requestID, false); 310 this._assetServer.RequestAsset(requestID, false);
311 } 311 }
312 return; 312 return;
313 } 313 }
314 //it is in our cache 314 //it is in our cache
315 AssetInfo asset = this.Assets[requestID]; 315 AssetInfo asset = this.Assets[requestID];
316 316
317 //work out how many packets it should be sent in 317 //work out how many packets it should be sent in
318 // and add to the AssetRequests list 318 // and add to the AssetRequests list
319 AssetRequest req = new AssetRequest(); 319 AssetRequest req = new AssetRequest();
320 req.RequestUser = userInfo; 320 req.RequestUser = userInfo;
321 req.RequestAssetID = requestID; 321 req.RequestAssetID = requestID;
322 req.TransferRequestID = transferRequest.TransferInfo.TransferID; 322 req.TransferRequestID = transferRequest.TransferInfo.TransferID;
323 req.AssetInf = asset; 323 req.AssetInf = asset;
324 324
325 if (asset.Data.LongLength > 600) 325 if (asset.Data.LongLength > 600)
326 { 326 {
327 //over 600 bytes so split up file 327 //over 600 bytes so split up file
328 req.NumPackets = 1 + (int)(asset.Data.Length - 600 + 999) / 1000; 328 req.NumPackets = 1 + (int)(asset.Data.Length - 600 + 999) / 1000;
329 } 329 }
330 else 330 else
331 { 331 {
332 req.NumPackets = 1; 332 req.NumPackets = 1;
333 } 333 }
334 334
335 this.AssetRequests.Add(req); 335 this.AssetRequests.Add(req);
336 } 336 }
337 337
338 /// <summary> 338 /// <summary>
339 /// 339 ///
340 /// </summary> 340 /// </summary>
341 private void ProcessAssetQueue() 341 private void ProcessAssetQueue()
342 { 342 {
343 if (this.AssetRequests.Count == 0) 343 if (this.AssetRequests.Count == 0)
344 { 344 {
345 //no requests waiting 345 //no requests waiting
346 return; 346 return;
347 } 347 }
348 int num; 348 int num;
349 349
350 if (this.AssetRequests.Count < 5) 350 if (this.AssetRequests.Count < 5)
351 { 351 {
352 //lower than 5 so do all of them 352 //lower than 5 so do all of them
353 num = this.AssetRequests.Count; 353 num = this.AssetRequests.Count;
354 } 354 }
355 else 355 else
356 { 356 {
357 num = 5; 357 num = 5;
358 } 358 }
359 AssetRequest req; 359 AssetRequest req;
360 for (int i = 0; i < num; i++) 360 for (int i = 0; i < num; i++)
361 { 361 {
362 req = (AssetRequest)this.AssetRequests[i]; 362 req = (AssetRequest)this.AssetRequests[i];
363 363
364 TransferInfoPacket Transfer = new TransferInfoPacket(); 364 TransferInfoPacket Transfer = new TransferInfoPacket();
365 Transfer.TransferInfo.ChannelType = 2; 365 Transfer.TransferInfo.ChannelType = 2;
366 Transfer.TransferInfo.Status = 0; 366 Transfer.TransferInfo.Status = 0;
367 Transfer.TransferInfo.TargetType = 0; 367 Transfer.TransferInfo.TargetType = 0;
368 Transfer.TransferInfo.Params = req.RequestAssetID.GetBytes(); 368 Transfer.TransferInfo.Params = req.RequestAssetID.GetBytes();
369 Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; 369 Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
370 Transfer.TransferInfo.TransferID = req.TransferRequestID; 370 Transfer.TransferInfo.TransferID = req.TransferRequestID;
371 req.RequestUser.OutPacket(Transfer); 371 req.RequestUser.OutPacket(Transfer);
372 372
373 if (req.NumPackets == 1) 373 if (req.NumPackets == 1)
374 { 374 {
375 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 375 TransferPacketPacket TransferPacket = new TransferPacketPacket();
376 TransferPacket.TransferData.Packet = 0; 376 TransferPacket.TransferData.Packet = 0;
377 TransferPacket.TransferData.ChannelType = 2; 377 TransferPacket.TransferData.ChannelType = 2;
378 TransferPacket.TransferData.TransferID = req.TransferRequestID; 378 TransferPacket.TransferData.TransferID = req.TransferRequestID;
379 TransferPacket.TransferData.Data = req.AssetInf.Data; 379 TransferPacket.TransferData.Data = req.AssetInf.Data;
380 TransferPacket.TransferData.Status = 1; 380 TransferPacket.TransferData.Status = 1;
381 req.RequestUser.OutPacket(TransferPacket); 381 req.RequestUser.OutPacket(TransferPacket);
382 } 382 }
383 else 383 else
384 { 384 {
385 //more than one packet so split file up , for now it can't be bigger than 2000 bytes 385 //more than one packet so split file up , for now it can't be bigger than 2000 bytes
386 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 386 TransferPacketPacket TransferPacket = new TransferPacketPacket();
387 TransferPacket.TransferData.Packet = 0; 387 TransferPacket.TransferData.Packet = 0;
388 TransferPacket.TransferData.ChannelType = 2; 388 TransferPacket.TransferData.ChannelType = 2;
389 TransferPacket.TransferData.TransferID = req.TransferRequestID; 389 TransferPacket.TransferData.TransferID = req.TransferRequestID;
390 byte[] chunk = new byte[1000]; 390 byte[] chunk = new byte[1000];
391 Array.Copy(req.AssetInf.Data, chunk, 1000); 391 Array.Copy(req.AssetInf.Data, chunk, 1000);
392 TransferPacket.TransferData.Data = chunk; 392 TransferPacket.TransferData.Data = chunk;
393 TransferPacket.TransferData.Status = 0; 393 TransferPacket.TransferData.Status = 0;
394 req.RequestUser.OutPacket(TransferPacket); 394 req.RequestUser.OutPacket(TransferPacket);
395 395
396 TransferPacket = new TransferPacketPacket(); 396 TransferPacket = new TransferPacketPacket();
397 TransferPacket.TransferData.Packet = 1; 397 TransferPacket.TransferData.Packet = 1;
398 TransferPacket.TransferData.ChannelType = 2; 398 TransferPacket.TransferData.ChannelType = 2;
399 TransferPacket.TransferData.TransferID = req.TransferRequestID; 399 TransferPacket.TransferData.TransferID = req.TransferRequestID;
400 byte[] chunk1 = new byte[(req.AssetInf.Data.Length - 1000)]; 400 byte[] chunk1 = new byte[(req.AssetInf.Data.Length - 1000)];
401 Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length); 401 Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length);
402 TransferPacket.TransferData.Data = chunk1; 402 TransferPacket.TransferData.Data = chunk1;
403 TransferPacket.TransferData.Status = 1; 403 TransferPacket.TransferData.Status = 1;
404 req.RequestUser.OutPacket(TransferPacket); 404 req.RequestUser.OutPacket(TransferPacket);
405 } 405 }
406 406
407 } 407 }
408 408
409 //remove requests that have been completed 409 //remove requests that have been completed
410 for (int i = 0; i < num; i++) 410 for (int i = 0; i < num; i++)
411 { 411 {
412 this.AssetRequests.RemoveAt(0); 412 this.AssetRequests.RemoveAt(0);
413 } 413 }
414 414
415 } 415 }
416 416
417 public AssetInfo CloneAsset(LLUUID newOwner, AssetInfo sourceAsset) 417 public AssetInfo CloneAsset(LLUUID newOwner, AssetInfo sourceAsset)
418 { 418 {
419 AssetInfo newAsset = new AssetInfo(); 419 AssetInfo newAsset = new AssetInfo();
420 newAsset.Data = new byte[sourceAsset.Data.Length]; 420 newAsset.Data = new byte[sourceAsset.Data.Length];
421 Array.Copy(sourceAsset.Data, newAsset.Data, sourceAsset.Data.Length); 421 Array.Copy(sourceAsset.Data, newAsset.Data, sourceAsset.Data.Length);
422 newAsset.FullID = LLUUID.Random(); 422 newAsset.FullID = LLUUID.Random();
423 newAsset.Type = sourceAsset.Type; 423 newAsset.Type = sourceAsset.Type;
424 newAsset.InvType = sourceAsset.InvType; 424 newAsset.InvType = sourceAsset.InvType;
425 return (newAsset); 425 return (newAsset);
426 } 426 }
427 #endregion 427 #endregion
428 428
429 #region Textures 429 #region Textures
430 /// <summary> 430 /// <summary>
431 /// 431 ///
432 /// </summary> 432 /// </summary>
433 /// <param name="userInfo"></param> 433 /// <param name="userInfo"></param>
434 /// <param name="imageID"></param> 434 /// <param name="imageID"></param>
435 public void AddTextureRequest(IClientAPI userInfo, LLUUID imageID) 435 public void AddTextureRequest(IClientAPI userInfo, LLUUID imageID)
436 { 436 {
437 //Console.WriteLine("texture request for " + imageID.ToStringHyphenated()); 437 //Console.WriteLine("texture request for " + imageID.ToStringHyphenated());
438 //check to see if texture is in local cache, if not request from asset server 438 //check to see if texture is in local cache, if not request from asset server
439 if (!this.Textures.ContainsKey(imageID)) 439 if (!this.Textures.ContainsKey(imageID))
440 { 440 {
441 if (!this.RequestedTextures.ContainsKey(imageID)) 441 if (!this.RequestedTextures.ContainsKey(imageID))
442 { 442 {
443 //not is cache so request from asset server 443 //not is cache so request from asset server
444 AssetRequest request = new AssetRequest(); 444 AssetRequest request = new AssetRequest();
445 request.RequestUser = userInfo; 445 request.RequestUser = userInfo;
446 request.RequestAssetID = imageID; 446 request.RequestAssetID = imageID;
447 request.IsTextureRequest = true; 447 request.IsTextureRequest = true;
448 this.RequestedTextures.Add(imageID, request); 448 this.RequestedTextures.Add(imageID, request);
449 this._assetServer.RequestAsset(imageID, true); 449 this._assetServer.RequestAsset(imageID, true);
450 } 450 }
451 return; 451 return;
452 } 452 }
453 453
454 //Console.WriteLine("texture already in cache"); 454 //Console.WriteLine("texture already in cache");
455 TextureImage imag = this.Textures[imageID]; 455 TextureImage imag = this.Textures[imageID];
456 AssetRequest req = new AssetRequest(); 456 AssetRequest req = new AssetRequest();
457 req.RequestUser = userInfo; 457 req.RequestUser = userInfo;
458 req.RequestAssetID = imageID; 458 req.RequestAssetID = imageID;
459 req.IsTextureRequest = true; 459 req.IsTextureRequest = true;
460 req.ImageInfo = imag; 460 req.ImageInfo = imag;
461 461
462 if (imag.Data.LongLength > 600) 462 if (imag.Data.LongLength > 600)
463 { 463 {
464 //over 600 bytes so split up file 464 //over 600 bytes so split up file
465 req.NumPackets = 1 + (int)(imag.Data.Length - 600 + 999) / 1000; 465 req.NumPackets = 1 + (int)(imag.Data.Length - 600 + 999) / 1000;
466 } 466 }
467 else 467 else
468 { 468 {
469 req.NumPackets = 1; 469 req.NumPackets = 1;
470 } 470 }
471 this.TextureRequests.Add(req); 471 this.TextureRequests.Add(req);
472 } 472 }
473 473
474 public TextureImage CloneImage(LLUUID newOwner, TextureImage source) 474 public TextureImage CloneImage(LLUUID newOwner, TextureImage source)
475 { 475 {
476 TextureImage newImage = new TextureImage(); 476 TextureImage newImage = new TextureImage();
477 newImage.Data = new byte[source.Data.Length]; 477 newImage.Data = new byte[source.Data.Length];
478 Array.Copy(source.Data, newImage.Data, source.Data.Length); 478 Array.Copy(source.Data, newImage.Data, source.Data.Length);
479 //newImage.filename = source.filename; 479 //newImage.filename = source.filename;
480 newImage.FullID = LLUUID.Random(); 480 newImage.FullID = LLUUID.Random();
481 newImage.Name = source.Name; 481 newImage.Name = source.Name;
482 return (newImage); 482 return (newImage);
483 } 483 }
484 #endregion 484 #endregion
485 485
486 private IAssetServer LoadAssetDll(string dllName) 486 private IAssetServer LoadAssetDll(string dllName)
487 { 487 {
488 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 488 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
489 IAssetServer server = null; 489 IAssetServer server = null;
490 490
491 foreach (Type pluginType in pluginAssembly.GetTypes()) 491 foreach (Type pluginType in pluginAssembly.GetTypes())
492 { 492 {
493 if (pluginType.IsPublic) 493 if (pluginType.IsPublic)
494 { 494 {
495 if (!pluginType.IsAbstract) 495 if (!pluginType.IsAbstract)
496 { 496 {
497 Type typeInterface = pluginType.GetInterface("IAssetPlugin", true); 497 Type typeInterface = pluginType.GetInterface("IAssetPlugin", true);
498 498
499 if (typeInterface != null) 499 if (typeInterface != null)
500 { 500 {
501 IAssetPlugin plug = (IAssetPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 501 IAssetPlugin plug = (IAssetPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
502 server = plug.GetAssetServer(); 502 server = plug.GetAssetServer();
503 break; 503 break;
504 } 504 }
505 505
506 typeInterface = null; 506 typeInterface = null;
507 } 507 }
508 } 508 }
509 } 509 }
510 pluginAssembly = null; 510 pluginAssembly = null;
511 return server; 511 return server;
512 } 512 }
513 513
514 public class AssetRequest 514 public class AssetRequest
515 { 515 {
516 public IClientAPI RequestUser; 516 public IClientAPI RequestUser;
517 public LLUUID RequestAssetID; 517 public LLUUID RequestAssetID;
518 public AssetInfo AssetInf; 518 public AssetInfo AssetInf;
519 public TextureImage ImageInfo; 519 public TextureImage ImageInfo;
520 public LLUUID TransferRequestID; 520 public LLUUID TransferRequestID;
521 public long DataPointer = 0; 521 public long DataPointer = 0;
522 public int NumPackets = 0; 522 public int NumPackets = 0;
523 public int PacketCounter = 0; 523 public int PacketCounter = 0;
524 public bool IsTextureRequest; 524 public bool IsTextureRequest;
525 //public bool AssetInCache; 525 //public bool AssetInCache;
526 //public int TimeRequested; 526 //public int TimeRequested;
527 527
528 public AssetRequest() 528 public AssetRequest()
529 { 529 {
530 530
531 } 531 }
532 } 532 }
533 533
534 public class AssetInfo : AssetBase 534 public class AssetInfo : AssetBase
535 { 535 {
536 public AssetInfo() 536 public AssetInfo()
537 { 537 {
538 538
539 } 539 }
540 540
541 public AssetInfo(AssetBase aBase) 541 public AssetInfo(AssetBase aBase)
542 { 542 {
543 Data = aBase.Data; 543 Data = aBase.Data;
544 FullID = aBase.FullID; 544 FullID = aBase.FullID;
545 Type = aBase.Type; 545 Type = aBase.Type;
546 InvType = aBase.InvType; 546 InvType = aBase.InvType;
547 Name = aBase.Name; 547 Name = aBase.Name;
548 Description = aBase.Description; 548 Description = aBase.Description;
549 } 549 }
550 } 550 }
551 551
552 public class TextureImage : AssetBase 552 public class TextureImage : AssetBase
553 { 553 {
554 public TextureImage() 554 public TextureImage()
555 { 555 {
556 556
557 } 557 }
558 558
559 public TextureImage(AssetBase aBase) 559 public TextureImage(AssetBase aBase)
560 { 560 {
561 Data = aBase.Data; 561 Data = aBase.Data;
562 FullID = aBase.FullID; 562 FullID = aBase.FullID;
563 Type = aBase.Type; 563 Type = aBase.Type;
564 InvType = aBase.InvType; 564 InvType = aBase.InvType;
565 Name = aBase.Name; 565 Name = aBase.Name;
566 Description = aBase.Description; 566 Description = aBase.Description;
567 } 567 }
568 } 568 }
569 569
570 public class TextureSender 570 public class TextureSender
571 { 571 {
572 public AssetRequest request; 572 public AssetRequest request;
573 public event DownloadComplete OnComplete; 573 public event DownloadComplete OnComplete;
574 Thread m_thread; 574 Thread m_thread;
575 public TextureSender(AssetRequest req) 575 public TextureSender(AssetRequest req)
576 { 576 {
577 request = req; 577 request = req;
578 //Console.WriteLine("creating worker thread for texture " + req.ImageInfo.FullID.ToStringHyphenated()); 578 //Console.WriteLine("creating worker thread for texture " + req.ImageInfo.FullID.ToStringHyphenated());
579 //Console.WriteLine("texture data length is " + req.ImageInfo.Data.Length); 579 //Console.WriteLine("texture data length is " + req.ImageInfo.Data.Length);
580 // Console.WriteLine("in " + req.NumPackets + " packets"); 580 // Console.WriteLine("in " + req.NumPackets + " packets");
581 //ThreadPool.QueueUserWorkItem(new WaitCallback(SendTexture), new object()); 581 //ThreadPool.QueueUserWorkItem(new WaitCallback(SendTexture), new object());
582 582
583 //need some sort of custom threadpool here, as using the .net one, overloads it and stops the handling of incoming packets etc 583 //need some sort of custom threadpool here, as using the .net one, overloads it and stops the handling of incoming packets etc
584 //but don't really want to create a thread for every texture download 584 //but don't really want to create a thread for every texture download
585 m_thread = new Thread(new ThreadStart(SendTexture)); 585 m_thread = new Thread(new ThreadStart(SendTexture));
586 m_thread.IsBackground = true; 586 m_thread.IsBackground = true;
587 m_thread.Start(); 587 m_thread.Start();
588 } 588 }
589 589
590 public void SendTexture() 590 public void SendTexture()
591 { 591 {
592 //Console.WriteLine("starting to send sending texture " + request.ImageInfo.FullID.ToStringHyphenated()); 592 //Console.WriteLine("starting to send sending texture " + request.ImageInfo.FullID.ToStringHyphenated());
593 while (request.PacketCounter != request.NumPackets) 593 while (request.PacketCounter != request.NumPackets)
594 { 594 {
595 SendPacket(); 595 SendPacket();
596 Thread.Sleep(500); 596 Thread.Sleep(500);
597 } 597 }
598 598
599 //Console.WriteLine("finished sending texture " + request.ImageInfo.FullID.ToStringHyphenated()); 599 //Console.WriteLine("finished sending texture " + request.ImageInfo.FullID.ToStringHyphenated());
600 if (OnComplete != null) 600 if (OnComplete != null)
601 { 601 {
602 OnComplete(this); 602 OnComplete(this);
603 } 603 }
604 } 604 }
605 605
606 public void SendPacket() 606 public void SendPacket()
607 { 607 {
608 AssetRequest req = request; 608 AssetRequest req = request;
609 // Console.WriteLine("sending " + req.ImageInfo.FullID); 609 // Console.WriteLine("sending " + req.ImageInfo.FullID);
610 610
611 // if (req.ImageInfo.FullID == new LLUUID("00000000-0000-0000-5005-000000000005")) 611 // if (req.ImageInfo.FullID == new LLUUID("00000000-0000-0000-5005-000000000005"))
612 if (req.PacketCounter == 0) 612 if (req.PacketCounter == 0)
613 { 613 {
614 //first time for this request so send imagedata packet 614 //first time for this request so send imagedata packet
615 if (req.NumPackets == 1) 615 if (req.NumPackets == 1)
616 { 616 {
617 //only one packet so send whole file 617 //only one packet so send whole file
618 ImageDataPacket im = new ImageDataPacket(); 618 ImageDataPacket im = new ImageDataPacket();
619 im.ImageID.Packets = 1; 619 im.ImageID.Packets = 1;
620 im.ImageID.ID = req.ImageInfo.FullID; 620 im.ImageID.ID = req.ImageInfo.FullID;
621 im.ImageID.Size = (uint)req.ImageInfo.Data.Length; 621 im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
622 im.ImageData.Data = req.ImageInfo.Data; 622 im.ImageData.Data = req.ImageInfo.Data;
623 im.ImageID.Codec = 2; 623 im.ImageID.Codec = 2;
624 req.RequestUser.OutPacket(im); 624 req.RequestUser.OutPacket(im);
625 req.PacketCounter++; 625 req.PacketCounter++;
626 //req.ImageInfo.l= time; 626 //req.ImageInfo.l= time;
627 //System.Console.WriteLine("sent texture: " + req.ImageInfo.FullID); 627 //System.Console.WriteLine("sent texture: " + req.ImageInfo.FullID);
628 // Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated()); 628 // Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated());
629 } 629 }
630 else 630 else
631 { 631 {
632 //more than one packet so split file up 632 //more than one packet so split file up
633 ImageDataPacket im = new ImageDataPacket(); 633 ImageDataPacket im = new ImageDataPacket();
634 im.ImageID.Packets = (ushort)req.NumPackets; 634 im.ImageID.Packets = (ushort)req.NumPackets;
635 im.ImageID.ID = req.ImageInfo.FullID; 635 im.ImageID.ID = req.ImageInfo.FullID;
636 im.ImageID.Size = (uint)req.ImageInfo.Data.Length; 636 im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
637 im.ImageData.Data = new byte[600]; 637 im.ImageData.Data = new byte[600];
638 Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600); 638 Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600);
639 im.ImageID.Codec = 2; 639 im.ImageID.Codec = 2;
640 req.RequestUser.OutPacket(im); 640 req.RequestUser.OutPacket(im);
641 req.PacketCounter++; 641 req.PacketCounter++;
642 //req.ImageInfo.last_used = time; 642 //req.ImageInfo.last_used = time;
643 //System.Console.WriteLine("sent first packet of texture: 643 //System.Console.WriteLine("sent first packet of texture:
644 // Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated()); 644 // Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated());
645 } 645 }
646 } 646 }
647 else 647 else
648 { 648 {
649 //Console.WriteLine("sending packet" + req.PacketCounter + "for " + req.ImageInfo.FullID.ToStringHyphenated()); 649 //Console.WriteLine("sending packet" + req.PacketCounter + "for " + req.ImageInfo.FullID.ToStringHyphenated());
650 //send imagepacket 650 //send imagepacket
651 //more than one packet so split file up 651 //more than one packet so split file up
652 ImagePacketPacket im = new ImagePacketPacket(); 652 ImagePacketPacket im = new ImagePacketPacket();
653 im.ImageID.Packet = (ushort)req.PacketCounter; 653 im.ImageID.Packet = (ushort)req.PacketCounter;
654 im.ImageID.ID = req.ImageInfo.FullID; 654 im.ImageID.ID = req.ImageInfo.FullID;
655 int size = req.ImageInfo.Data.Length - 600 - 1000 * (req.PacketCounter - 1); 655 int size = req.ImageInfo.Data.Length - 600 - 1000 * (req.PacketCounter - 1);
656 if (size > 1000) size = 1000; 656 if (size > 1000) size = 1000;
657 im.ImageData.Data = new byte[size]; 657 im.ImageData.Data = new byte[size];
658 Array.Copy(req.ImageInfo.Data, 600 + 1000 * (req.PacketCounter - 1), im.ImageData.Data, 0, size); 658 Array.Copy(req.ImageInfo.Data, 600 + 1000 * (req.PacketCounter - 1), im.ImageData.Data, 0, size);
659 req.RequestUser.OutPacket(im); 659 req.RequestUser.OutPacket(im);
660 req.PacketCounter++; 660 req.PacketCounter++;
661 //req.ImageInfo.last_used = time; 661 //req.ImageInfo.last_used = time;
662 //System.Console.WriteLine("sent a packet of texture: "+req.image_info.FullID); 662 //System.Console.WriteLine("sent a packet of texture: "+req.image_info.FullID);
663 } 663 }
664 664
665 } 665 }
666 } 666 }
667 } 667 }
668} 668}
669 669
diff --git a/OpenSim/Region/Caches/Properties/AssemblyInfo.cs b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs
index 8389415..4ba42b9 100644
--- a/OpenSim/Region/Caches/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Region.Caches")] 6[assembly: AssemblyTitle("OpenSim.Region.Caches")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Region.Caches")] 10[assembly: AssemblyProduct("OpenSim.Region.Caches")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("2b15ddbf-0341-49a6-85c0-cece268a4518")] 21[assembly: Guid("2b15ddbf-0341-49a6-85c0-cece268a4518")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Capabilities/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 7acbf8e..d2ef526 100644
--- a/OpenSim/Region/Capabilities/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -1,313 +1,313 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using System.IO; 32using System.IO;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
37using OpenSim.Region.Caches; 37using OpenSim.Region.Caches;
38 38
39namespace OpenSim.Region.Capabilities 39namespace OpenSim.Region.Capabilities
40{ 40{
41 public delegate void UpLoadedTexture(LLUUID assetID, LLUUID inventoryItem, byte[] data); 41 public delegate void UpLoadedTexture(LLUUID assetID, LLUUID inventoryItem, byte[] data);
42 42
43 public class Caps 43 public class Caps
44 { 44 {
45 private string m_httpListenerHostName; 45 private string m_httpListenerHostName;
46 private int m_httpListenPort; 46 private int m_httpListenPort;
47 private string m_capsObjectPath = "00001-"; 47 private string m_capsObjectPath = "00001-";
48 private string m_requestPath = "0000/"; 48 private string m_requestPath = "0000/";
49 private string m_mapLayerPath = "0001/"; 49 private string m_mapLayerPath = "0001/";
50 private string m_newInventory = "0002/"; 50 private string m_newInventory = "0002/";
51 // private string m_requestTexture = "0003/"; 51 // private string m_requestTexture = "0003/";
52 //private string eventQueue = "0100/"; 52 //private string eventQueue = "0100/";
53 private BaseHttpServer httpListener; 53 private BaseHttpServer httpListener;
54 private LLUUID agentID; 54 private LLUUID agentID;
55 private AssetCache assetCache; 55 private AssetCache assetCache;
56 private int eventQueueCount = 1; 56 private int eventQueueCount = 1;
57 private Queue<string> CapsEventQueue = new Queue<string>(); 57 private Queue<string> CapsEventQueue = new Queue<string>();
58 58
59 public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, LLUUID agent) 59 public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, LLUUID agent)
60 { 60 {
61 assetCache = assetCach; 61 assetCache = assetCach;
62 m_capsObjectPath = capsPath; 62 m_capsObjectPath = capsPath;
63 httpListener = httpServer; 63 httpListener = httpServer;
64 m_httpListenerHostName = httpListen; 64 m_httpListenerHostName = httpListen;
65 m_httpListenPort = httpPort; 65 m_httpListenPort = httpPort;
66 agentID = agent; 66 agentID = agent;
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// 70 ///
71 /// </summary> 71 /// </summary>
72 public void RegisterHandlers() 72 public void RegisterHandlers()
73 { 73 {
74 Console.WriteLine("registering CAPS handlers"); 74 Console.WriteLine("registering CAPS handlers");
75 string capsBase = "/CAPS/" + m_capsObjectPath; 75 string capsBase = "/CAPS/" + m_capsObjectPath;
76 76
77 httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer )); 77 httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer ));
78 httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest)); 78 httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest));
79 79
80 AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); 80 AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
81 // AddLegacyCapsHandler( httpListener, eventQueue, ProcessEventQueue); 81 // AddLegacyCapsHandler( httpListener, eventQueue, ProcessEventQueue);
82 // AddLegacyCapsHandler( httpListener, m_requestTexture, RequestTexture); 82 // AddLegacyCapsHandler( httpListener, m_requestTexture, RequestTexture);
83 } 83 }
84 84
85 [Obsolete("Use BaseHttpServer.AddStreamHandler(new LLSDStreamHandler( LLSDMethod delegate )) instead.")] 85 [Obsolete("Use BaseHttpServer.AddStreamHandler(new LLSDStreamHandler( LLSDMethod delegate )) instead.")]
86 private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod) 86 private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod)
87 { 87 {
88 string capsBase = "/CAPS/" + m_capsObjectPath; 88 string capsBase = "/CAPS/" + m_capsObjectPath;
89 httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod)); 89 httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod));
90 } 90 }
91 91
92 /// <summary> 92 /// <summary>
93 /// 93 ///
94 /// </summary> 94 /// </summary>
95 /// <param name="request"></param> 95 /// <param name="request"></param>
96 /// <param name="path"></param> 96 /// <param name="path"></param>
97 /// <param name="param"></param> 97 /// <param name="param"></param>
98 /// <returns></returns> 98 /// <returns></returns>
99 public string CapsRequest(string request, string path, string param) 99 public string CapsRequest(string request, string path, string param)
100 { 100 {
101 // Console.WriteLine("caps request " + request); 101 // Console.WriteLine("caps request " + request);
102 string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities()); 102 string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities());
103 return result; 103 return result;
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// 107 ///
108 /// </summary> 108 /// </summary>
109 /// <returns></returns> 109 /// <returns></returns>
110 protected LLSDCapsDetails GetCapabilities() 110 protected LLSDCapsDetails GetCapabilities()
111 { 111 {
112 LLSDCapsDetails caps = new LLSDCapsDetails(); 112 LLSDCapsDetails caps = new LLSDCapsDetails();
113 string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath; 113 string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
114 caps.MapLayer = capsBaseUrl + m_mapLayerPath; 114 caps.MapLayer = capsBaseUrl + m_mapLayerPath;
115 caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; 115 caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
116 //caps.RequestTextureDownload = capsBaseUrl + m_requestTexture; 116 //caps.RequestTextureDownload = capsBaseUrl + m_requestTexture;
117 // caps.ChatSessionRequest = capsBaseUrl + m_requestTexture; 117 // caps.ChatSessionRequest = capsBaseUrl + m_requestTexture;
118 return caps; 118 return caps;
119 } 119 }
120 120
121 /// <summary> 121 /// <summary>
122 /// 122 ///
123 /// </summary> 123 /// </summary>
124 /// <param name="mapReq"></param> 124 /// <param name="mapReq"></param>
125 /// <returns></returns> 125 /// <returns></returns>
126 public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) 126 public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
127 { 127 {
128 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); 128 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
129 mapResponse.LayerData.Array.Add(this.GetLLSDMapLayerResponse()); 129 mapResponse.LayerData.Array.Add(this.GetLLSDMapLayerResponse());
130 return mapResponse; 130 return mapResponse;
131 } 131 }
132 132
133 /// <summary> 133 /// <summary>
134 /// 134 ///
135 /// </summary> 135 /// </summary>
136 /// <returns></returns> 136 /// <returns></returns>
137 protected LLSDMapLayer GetLLSDMapLayerResponse() 137 protected LLSDMapLayer GetLLSDMapLayerResponse()
138 { 138 {
139 LLSDMapLayer mapLayer = new LLSDMapLayer(); 139 LLSDMapLayer mapLayer = new LLSDMapLayer();
140 mapLayer.Right = 5000; 140 mapLayer.Right = 5000;
141 mapLayer.Top = 5000; 141 mapLayer.Top = 5000;
142 mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); 142 mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
143 return mapLayer; 143 return mapLayer;
144 } 144 }
145 145
146 /// <summary> 146 /// <summary>
147 /// 147 ///
148 /// </summary> 148 /// </summary>
149 /// <param name="request"></param> 149 /// <param name="request"></param>
150 /// <param name="path"></param> 150 /// <param name="path"></param>
151 /// <param name="param"></param> 151 /// <param name="param"></param>
152 /// <returns></returns> 152 /// <returns></returns>
153 public string RequestTexture(string request, string path, string param) 153 public string RequestTexture(string request, string path, string param)
154 { 154 {
155 Console.WriteLine("texture request " + request); 155 Console.WriteLine("texture request " + request);
156 // Needs implementing (added to remove compiler warning) 156 // Needs implementing (added to remove compiler warning)
157 return ""; 157 return "";
158 } 158 }
159 159
160 #region EventQueue (Currently not enabled) 160 #region EventQueue (Currently not enabled)
161 /// <summary> 161 /// <summary>
162 /// 162 ///
163 /// </summary> 163 /// </summary>
164 /// <param name="request"></param> 164 /// <param name="request"></param>
165 /// <param name="path"></param> 165 /// <param name="path"></param>
166 /// <param name="param"></param> 166 /// <param name="param"></param>
167 /// <returns></returns> 167 /// <returns></returns>
168 public string ProcessEventQueue(string request, string path, string param) 168 public string ProcessEventQueue(string request, string path, string param)
169 { 169 {
170 string res = ""; 170 string res = "";
171 171
172 if (this.CapsEventQueue.Count > 0) 172 if (this.CapsEventQueue.Count > 0)
173 { 173 {
174 lock (this.CapsEventQueue) 174 lock (this.CapsEventQueue)
175 { 175 {
176 string item = CapsEventQueue.Dequeue(); 176 string item = CapsEventQueue.Dequeue();
177 res = item; 177 res = item;
178 } 178 }
179 } 179 }
180 else 180 else
181 { 181 {
182 res = this.CreateEmptyEventResponse(); 182 res = this.CreateEmptyEventResponse();
183 } 183 }
184 return res; 184 return res;
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// 188 ///
189 /// </summary> 189 /// </summary>
190 /// <param name="caps"></param> 190 /// <param name="caps"></param>
191 /// <param name="ipAddressPort"></param> 191 /// <param name="ipAddressPort"></param>
192 /// <returns></returns> 192 /// <returns></returns>
193 public string CreateEstablishAgentComms(string caps, string ipAddressPort) 193 public string CreateEstablishAgentComms(string caps, string ipAddressPort)
194 { 194 {
195 LLSDCapEvent eventItem = new LLSDCapEvent(); 195 LLSDCapEvent eventItem = new LLSDCapEvent();
196 eventItem.id = eventQueueCount; 196 eventItem.id = eventQueueCount;
197 //should be creating a EstablishAgentComms item, but there isn't a class for it yet 197 //should be creating a EstablishAgentComms item, but there isn't a class for it yet
198 eventItem.events.Array.Add(new LLSDEmpty()); 198 eventItem.events.Array.Add(new LLSDEmpty());
199 string res = LLSDHelpers.SerialiseLLSDReply(eventItem); 199 string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
200 eventQueueCount++; 200 eventQueueCount++;
201 201
202 this.CapsEventQueue.Enqueue(res); 202 this.CapsEventQueue.Enqueue(res);
203 return res; 203 return res;
204 } 204 }
205 205
206 /// <summary> 206 /// <summary>
207 /// 207 ///
208 /// </summary> 208 /// </summary>
209 /// <returns></returns> 209 /// <returns></returns>
210 public string CreateEmptyEventResponse() 210 public string CreateEmptyEventResponse()
211 { 211 {
212 LLSDCapEvent eventItem = new LLSDCapEvent(); 212 LLSDCapEvent eventItem = new LLSDCapEvent();
213 eventItem.id = eventQueueCount; 213 eventItem.id = eventQueueCount;
214 eventItem.events.Array.Add(new LLSDEmpty()); 214 eventItem.events.Array.Add(new LLSDEmpty());
215 string res = LLSDHelpers.SerialiseLLSDReply(eventItem); 215 string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
216 eventQueueCount++; 216 eventQueueCount++;
217 return res; 217 return res;
218 } 218 }
219 #endregion 219 #endregion
220 220
221 /// <summary> 221 /// <summary>
222 /// 222 ///
223 /// </summary> 223 /// </summary>
224 /// <param name="llsdRequest"></param> 224 /// <param name="llsdRequest"></param>
225 /// <returns></returns> 225 /// <returns></returns>
226 public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) 226 public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest)
227 { 227 {
228 string capsBase = "/CAPS/" + m_capsObjectPath; 228 string capsBase = "/CAPS/" + m_capsObjectPath;
229 LLUUID newAsset = LLUUID.Random(); 229 LLUUID newAsset = LLUUID.Random();
230 LLUUID newInvItem = LLUUID.Random(); 230 LLUUID newInvItem = LLUUID.Random();
231 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); 231 string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
232 232
233 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, capsBase + uploaderPath, this.httpListener); 233 AssetUploader uploader = new AssetUploader(newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
234 httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); 234 httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
235 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath; 235 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
236 236
237 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); 237 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
238 uploadResponse.uploader = uploaderURL; 238 uploadResponse.uploader = uploaderURL;
239 uploadResponse.state = "upload"; 239 uploadResponse.state = "upload";
240 uploader.OnUpLoad += this.UploadCompleteHandler; 240 uploader.OnUpLoad += this.UploadCompleteHandler;
241 return uploadResponse; 241 return uploadResponse;
242 } 242 }
243 243
244 /// <summary> 244 /// <summary>
245 /// 245 ///
246 /// </summary> 246 /// </summary>
247 /// <param name="assetID"></param> 247 /// <param name="assetID"></param>
248 /// <param name="inventoryItem"></param> 248 /// <param name="inventoryItem"></param>
249 /// <param name="data"></param> 249 /// <param name="data"></param>
250 public void UploadCompleteHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) 250 public void UploadCompleteHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data)
251 { 251 {
252 AssetBase asset; 252 AssetBase asset;
253 asset = new AssetBase(); 253 asset = new AssetBase();
254 asset.FullID = assetID; 254 asset.FullID = assetID;
255 asset.Type = 0; 255 asset.Type = 0;
256 asset.InvType = 0; 256 asset.InvType = 0;
257 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000"); 257 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000");
258 asset.Data = data; 258 asset.Data = data;
259 this.assetCache.AddAsset(asset); 259 this.assetCache.AddAsset(asset);
260 } 260 }
261 261
262 public class AssetUploader 262 public class AssetUploader
263 { 263 {
264 public event UpLoadedTexture OnUpLoad; 264 public event UpLoadedTexture OnUpLoad;
265 265
266 private string uploaderPath = ""; 266 private string uploaderPath = "";
267 private LLUUID newAssetID; 267 private LLUUID newAssetID;
268 private LLUUID inventoryItemID; 268 private LLUUID inventoryItemID;
269 private BaseHttpServer httpListener; 269 private BaseHttpServer httpListener;
270 270
271 /// <summary> 271 /// <summary>
272 /// 272 ///
273 /// </summary> 273 /// </summary>
274 /// <param name="assetID"></param> 274 /// <param name="assetID"></param>
275 /// <param name="inventoryItem"></param> 275 /// <param name="inventoryItem"></param>
276 /// <param name="path"></param> 276 /// <param name="path"></param>
277 /// <param name="httpServer"></param> 277 /// <param name="httpServer"></param>
278 public AssetUploader(LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer) 278 public AssetUploader(LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer)
279 { 279 {
280 newAssetID = assetID; 280 newAssetID = assetID;
281 inventoryItemID = inventoryItem; 281 inventoryItemID = inventoryItem;
282 uploaderPath = path; 282 uploaderPath = path;
283 httpListener = httpServer; 283 httpListener = httpServer;
284 } 284 }
285 285
286 /// <summary> 286 /// <summary>
287 /// 287 ///
288 /// </summary> 288 /// </summary>
289 /// <param name="data"></param> 289 /// <param name="data"></param>
290 /// <param name="path"></param> 290 /// <param name="path"></param>
291 /// <param name="param"></param> 291 /// <param name="param"></param>
292 /// <returns></returns> 292 /// <returns></returns>
293 public string uploaderCaps(byte[] data, string path, string param) 293 public string uploaderCaps(byte[] data, string path, string param)
294 { 294 {
295 LLUUID inv = this.inventoryItemID; 295 LLUUID inv = this.inventoryItemID;
296 string res = ""; 296 string res = "";
297 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); 297 LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
298 uploadComplete.new_asset = newAssetID.ToStringHyphenated(); 298 uploadComplete.new_asset = newAssetID.ToStringHyphenated();
299 uploadComplete.new_inventory_item = inv; 299 uploadComplete.new_inventory_item = inv;
300 uploadComplete.state = "complete"; 300 uploadComplete.state = "complete";
301 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); 301 res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
302 302
303 httpListener.RemoveStreamHandler("POST", uploaderPath); 303 httpListener.RemoveStreamHandler("POST", uploaderPath);
304 304
305 if (OnUpLoad != null) 305 if (OnUpLoad != null)
306 { 306 {
307 OnUpLoad(newAssetID, inv, data); 307 OnUpLoad(newAssetID, inv, data);
308 } 308 }
309 return res; 309 return res;
310 } 310 }
311 } 311 }
312 } 312 }
313} 313}
diff --git a/OpenSim/Region/Capabilities/LLSDArray.cs b/OpenSim/Region/Capabilities/LLSDArray.cs
index e04849f..d3e1979 100644
--- a/OpenSim/Region/Capabilities/LLSDArray.cs
+++ b/OpenSim/Region/Capabilities/LLSDArray.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections; 28using System.Collections;
29 29
30namespace OpenSim.Region.Capabilities 30namespace OpenSim.Region.Capabilities
31{ 31{
32 [LLSDType("ARRAY")] 32 [LLSDType("ARRAY")]
33 public class LLSDArray 33 public class LLSDArray
34 { 34 {
35 public ArrayList Array = new ArrayList(); 35 public ArrayList Array = new ArrayList();
36 36
37 public LLSDArray() 37 public LLSDArray()
38 { 38 {
39 39
40 } 40 }
41 } 41 }
42} 42}
diff --git a/OpenSim/Region/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Region/Capabilities/LLSDAssetUploadComplete.cs
index 1b78353..5718b8f 100644
--- a/OpenSim/Region/Capabilities/LLSDAssetUploadComplete.cs
+++ b/OpenSim/Region/Capabilities/LLSDAssetUploadComplete.cs
@@ -1,44 +1,44 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Region.Capabilities 30namespace OpenSim.Region.Capabilities
31{ 31{
32 [LLSDType("MAP")] 32 [LLSDType("MAP")]
33 public class LLSDAssetUploadComplete 33 public class LLSDAssetUploadComplete
34 { 34 {
35 public string new_asset = ""; 35 public string new_asset = "";
36 public LLUUID new_inventory_item = LLUUID.Zero; 36 public LLUUID new_inventory_item = LLUUID.Zero;
37 public string state = ""; 37 public string state = "";
38 38
39 public LLSDAssetUploadComplete() 39 public LLSDAssetUploadComplete()
40 { 40 {
41 41
42 } 42 }
43 } 43 }
44} 44}
diff --git a/OpenSim/Region/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Region/Capabilities/LLSDAssetUploadRequest.cs
index 7ef77cb..0096fb1 100644
--- a/OpenSim/Region/Capabilities/LLSDAssetUploadRequest.cs
+++ b/OpenSim/Region/Capabilities/LLSDAssetUploadRequest.cs
@@ -1,21 +1,21 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using libsecondlife; 4using libsecondlife;
5 5
6namespace OpenSim.Region.Capabilities 6namespace OpenSim.Region.Capabilities
7{ 7{
8 [LLSDMap] 8 [LLSDMap]
9 public class LLSDAssetUploadRequest 9 public class LLSDAssetUploadRequest
10 { 10 {
11 public string asset_type = ""; 11 public string asset_type = "";
12 public string description = ""; 12 public string description = "";
13 public LLUUID folder_id = LLUUID.Zero; 13 public LLUUID folder_id = LLUUID.Zero;
14 public string inventory_type = ""; 14 public string inventory_type = "";
15 public string name = ""; 15 public string name = "";
16 16
17 public LLSDAssetUploadRequest() 17 public LLSDAssetUploadRequest()
18 { 18 {
19 } 19 }
20 } 20 }
21} 21}
diff --git a/OpenSim/Region/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Region/Capabilities/LLSDAssetUploadResponse.cs
index 1a620ae..2a2a5d1 100644
--- a/OpenSim/Region/Capabilities/LLSDAssetUploadResponse.cs
+++ b/OpenSim/Region/Capabilities/LLSDAssetUploadResponse.cs
@@ -1,18 +1,18 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Capabilities 5namespace OpenSim.Region.Capabilities
6{ 6{
7 [LLSDMap] 7 [LLSDMap]
8 public class LLSDAssetUploadResponse 8 public class LLSDAssetUploadResponse
9 { 9 {
10 public string uploader = ""; 10 public string uploader = "";
11 public string state = ""; 11 public string state = "";
12 12
13 public LLSDAssetUploadResponse() 13 public LLSDAssetUploadResponse()
14 { 14 {
15 15
16 } 16 }
17 } 17 }
18} 18}
diff --git a/OpenSim/Region/Capabilities/LLSDCapEvent.cs b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
index 51b4fe0..2c2689b 100644
--- a/OpenSim/Region/Capabilities/LLSDCapEvent.cs
+++ b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
@@ -1,41 +1,41 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Region.Capabilities 28namespace OpenSim.Region.Capabilities
29{ 29{
30 [LLSDType("MAP")] 30 [LLSDType("MAP")]
31 public class LLSDCapEvent 31 public class LLSDCapEvent
32 { 32 {
33 public int id = 0; 33 public int id = 0;
34 public LLSDArray events = new LLSDArray(); 34 public LLSDArray events = new LLSDArray();
35 35
36 public LLSDCapEvent() 36 public LLSDCapEvent()
37 { 37 {
38 38
39 } 39 }
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
index ecb2328..132b8f7 100644
--- a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
+++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
@@ -1,17 +1,17 @@
1namespace OpenSim.Region.Capabilities 1namespace OpenSim.Region.Capabilities
2{ 2{
3 [LLSDType("MAP")] 3 [LLSDType("MAP")]
4 public class LLSDCapsDetails 4 public class LLSDCapsDetails
5 { 5 {
6 public string MapLayer = ""; 6 public string MapLayer = "";
7 public string NewFileAgentInventory = ""; 7 public string NewFileAgentInventory = "";
8 //public string EventQueueGet = ""; 8 //public string EventQueueGet = "";
9 //public string RequestTextureDownload = ""; 9 //public string RequestTextureDownload = "";
10 //public string ChatSessionRequest = ""; 10 //public string ChatSessionRequest = "";
11 11
12 public LLSDCapsDetails() 12 public LLSDCapsDetails()
13 { 13 {
14 14
15 } 15 }
16 } 16 }
17} 17}
diff --git a/OpenSim/Region/Capabilities/LLSDEmpty.cs b/OpenSim/Region/Capabilities/LLSDEmpty.cs
index d79c09e..ca27c9d 100644
--- a/OpenSim/Region/Capabilities/LLSDEmpty.cs
+++ b/OpenSim/Region/Capabilities/LLSDEmpty.cs
@@ -1,38 +1,38 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Region.Capabilities 28namespace OpenSim.Region.Capabilities
29{ 29{
30 [LLSDType("MAP")] 30 [LLSDType("MAP")]
31 public class LLSDEmpty 31 public class LLSDEmpty
32 { 32 {
33 public LLSDEmpty() 33 public LLSDEmpty()
34 { 34 {
35 35
36 } 36 }
37 } 37 }
38} 38}
diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs
index 19ef0c9..efeb9b1 100644
--- a/OpenSim/Region/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs
@@ -1,164 +1,164 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using libsecondlife; 33using libsecondlife;
34 34
35namespace OpenSim.Region.Capabilities 35namespace OpenSim.Region.Capabilities
36{ 36{
37 public class LLSDHelpers 37 public class LLSDHelpers
38 { 38 {
39 public static string SerialiseLLSDReply(object obj) 39 public static string SerialiseLLSDReply(object obj)
40 { 40 {
41 StringWriter sw = new StringWriter(); 41 StringWriter sw = new StringWriter();
42 XmlTextWriter writer = new XmlTextWriter(sw); 42 XmlTextWriter writer = new XmlTextWriter(sw);
43 writer.Formatting = Formatting.None; 43 writer.Formatting = Formatting.None;
44 writer.WriteStartElement(String.Empty, "llsd", String.Empty); 44 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
45 SerializeLLSDType(writer, obj); 45 SerializeLLSDType(writer, obj);
46 writer.WriteEndElement(); 46 writer.WriteEndElement();
47 writer.Close(); 47 writer.Close();
48 return sw.ToString(); 48 return sw.ToString();
49 } 49 }
50 50
51 public static void SerializeLLSDType(XmlTextWriter writer, object obj) 51 public static void SerializeLLSDType(XmlTextWriter writer, object obj)
52 { 52 {
53 Type myType = obj.GetType(); 53 Type myType = obj.GetType();
54 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false); 54 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
55 if (llsdattributes.Length > 0) 55 if (llsdattributes.Length > 0)
56 { 56 {
57 switch (llsdattributes[0].ObjectType) 57 switch (llsdattributes[0].ObjectType)
58 { 58 {
59 case "MAP": 59 case "MAP":
60 writer.WriteStartElement(String.Empty, "map", String.Empty); 60 writer.WriteStartElement(String.Empty, "map", String.Empty);
61 FieldInfo[] fields = myType.GetFields(); 61 FieldInfo[] fields = myType.GetFields();
62 for (int i = 0; i < fields.Length; i++) 62 for (int i = 0; i < fields.Length; i++)
63 { 63 {
64 object fieldValue = fields[i].GetValue(obj); 64 object fieldValue = fields[i].GetValue(obj);
65 LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false); 65 LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false);
66 if (fieldAttributes.Length > 0) 66 if (fieldAttributes.Length > 0)
67 { 67 {
68 writer.WriteStartElement(String.Empty, "key", String.Empty); 68 writer.WriteStartElement(String.Empty, "key", String.Empty);
69 writer.WriteString(fields[i].Name); 69 writer.WriteString(fields[i].Name);
70 writer.WriteEndElement(); 70 writer.WriteEndElement();
71 SerializeLLSDType(writer, fieldValue); 71 SerializeLLSDType(writer, fieldValue);
72 } 72 }
73 else 73 else
74 { 74 {
75 writer.WriteStartElement(String.Empty, "key", String.Empty); 75 writer.WriteStartElement(String.Empty, "key", String.Empty);
76 writer.WriteString(fields[i].Name); 76 writer.WriteString(fields[i].Name);
77 writer.WriteEndElement(); 77 writer.WriteEndElement();
78 LLSD.LLSDWriteOne(writer, fieldValue); 78 LLSD.LLSDWriteOne(writer, fieldValue);
79 } 79 }
80 } 80 }
81 writer.WriteEndElement(); 81 writer.WriteEndElement();
82 break; 82 break;
83 case "ARRAY": 83 case "ARRAY":
84 // LLSDArray arrayObject = obj as LLSDArray; 84 // LLSDArray arrayObject = obj as LLSDArray;
85 // ArrayList a = arrayObject.Array; 85 // ArrayList a = arrayObject.Array;
86 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj); 86 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
87 if (a != null) 87 if (a != null)
88 { 88 {
89 writer.WriteStartElement(String.Empty, "array", String.Empty); 89 writer.WriteStartElement(String.Empty, "array", String.Empty);
90 foreach (object item in a) 90 foreach (object item in a)
91 { 91 {
92 SerializeLLSDType(writer, item); 92 SerializeLLSDType(writer, item);
93 } 93 }
94 writer.WriteEndElement(); 94 writer.WriteEndElement();
95 } 95 }
96 break; 96 break;
97 } 97 }
98 } 98 }
99 else 99 else
100 { 100 {
101 LLSD.LLSDWriteOne(writer, obj); 101 LLSD.LLSDWriteOne(writer, obj);
102 } 102 }
103 } 103 }
104 104
105 public static object DeserialiseLLSDMap(Hashtable llsd, object obj) 105 public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
106 { 106 {
107 Type myType = obj.GetType(); 107 Type myType = obj.GetType();
108 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false); 108 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
109 if (llsdattributes.Length > 0) 109 if (llsdattributes.Length > 0)
110 { 110 {
111 switch (llsdattributes[0].ObjectType) 111 switch (llsdattributes[0].ObjectType)
112 { 112 {
113 case "MAP": 113 case "MAP":
114 IDictionaryEnumerator enumerator = llsd.GetEnumerator(); 114 IDictionaryEnumerator enumerator = llsd.GetEnumerator();
115 while (enumerator.MoveNext()) 115 while (enumerator.MoveNext())
116 { 116 {
117 FieldInfo field = myType.GetField((string)enumerator.Key); 117 FieldInfo field = myType.GetField((string)enumerator.Key);
118 if (field != null) 118 if (field != null)
119 { 119 {
120 if (enumerator.Value is Hashtable) 120 if (enumerator.Value is Hashtable)
121 { 121 {
122 object fieldValue = field.GetValue(obj); 122 object fieldValue = field.GetValue(obj);
123 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); 123 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
124 } 124 }
125 else if (enumerator.Value is ArrayList) 125 else if (enumerator.Value is ArrayList)
126 { 126 {
127 object fieldValue = field.GetValue(obj); 127 object fieldValue = field.GetValue(obj);
128 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); 128 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
129 //TODO 129 //TODO
130 // the LLSD map/array types in the array need to be deserialised 130 // the LLSD map/array types in the array need to be deserialised
131 // but first we need to know the right class to deserialise them into. 131 // but first we need to know the right class to deserialise them into.
132 } 132 }
133 else 133 else
134 { 134 {
135 field.SetValue(obj, enumerator.Value); 135 field.SetValue(obj, enumerator.Value);
136 } 136 }
137 } 137 }
138 } 138 }
139 break; 139 break;
140 } 140 }
141 } 141 }
142 return obj; 142 return obj;
143 } 143 }
144 } 144 }
145 145
146 146
147 147
148 148
149 149
150 150
151 151
152 152
153 153
154 154
155 155
156 156
157 157
158 158
159 159
160 160
161 161
162 162
163 163
164} 164}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayer.cs b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
index 566d0e9..e0c006c 100644
--- a/OpenSim/Region/Capabilities/LLSDMapLayer.cs
+++ b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Region.Capabilities 30namespace OpenSim.Region.Capabilities
31{ 31{
32 [LLSDType("MAP")] 32 [LLSDType("MAP")]
33 public class LLSDMapLayer 33 public class LLSDMapLayer
34 { 34 {
35 public int Left = 0; 35 public int Left = 0;
36 public int Right = 0; 36 public int Right = 0;
37 public int Top = 0; 37 public int Top = 0;
38 public int Bottom = 0; 38 public int Bottom = 0;
39 public LLUUID ImageID = LLUUID.Zero; 39 public LLUUID ImageID = LLUUID.Zero;
40 40
41 public LLSDMapLayer() 41 public LLSDMapLayer()
42 { 42 {
43 43
44 } 44 }
45 } 45 }
46} 46}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
index ce746ae..8b9837b 100644
--- a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
+++ b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
@@ -1,41 +1,41 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Region.Capabilities 28namespace OpenSim.Region.Capabilities
29{ 29{
30 [LLSDType("MAP")] 30 [LLSDType("MAP")]
31 public class LLSDMapLayerResponse 31 public class LLSDMapLayerResponse
32 { 32 {
33 public LLSDMapRequest AgentData = new LLSDMapRequest(); 33 public LLSDMapRequest AgentData = new LLSDMapRequest();
34 public LLSDArray LayerData = new LLSDArray(); 34 public LLSDArray LayerData = new LLSDArray();
35 35
36 public LLSDMapLayerResponse() 36 public LLSDMapLayerResponse()
37 { 37 {
38 38
39 } 39 }
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/Capabilities/LLSDMapRequest.cs b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
index fb739cd..8ac7943 100644
--- a/OpenSim/Region/Capabilities/LLSDMapRequest.cs
+++ b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
@@ -1,13 +1,13 @@
1namespace OpenSim.Region.Capabilities 1namespace OpenSim.Region.Capabilities
2{ 2{
3 [LLSDType("MAP")] 3 [LLSDType("MAP")]
4 public class LLSDMapRequest 4 public class LLSDMapRequest
5 { 5 {
6 public int Flags = 0; 6 public int Flags = 0;
7 7
8 public LLSDMapRequest() 8 public LLSDMapRequest()
9 { 9 {
10 10
11 } 11 }
12 } 12 }
13} 13}
diff --git a/OpenSim/Region/Capabilities/LLSDMethod.cs b/OpenSim/Region/Capabilities/LLSDMethod.cs
index 5f42f44..068d539 100644
--- a/OpenSim/Region/Capabilities/LLSDMethod.cs
+++ b/OpenSim/Region/Capabilities/LLSDMethod.cs
@@ -1,8 +1,8 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Capabilities 5namespace OpenSim.Region.Capabilities
6{ 6{
7 public delegate TResponse LLSDMethod<TRequest, TResponse>(TRequest request); 7 public delegate TResponse LLSDMethod<TRequest, TResponse>(TRequest request);
8} 8}
diff --git a/OpenSim/Region/Capabilities/LLSDStreamHandler.cs b/OpenSim/Region/Capabilities/LLSDStreamHandler.cs
index 7d99b6e..d98e23f 100644
--- a/OpenSim/Region/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Region/Capabilities/LLSDStreamHandler.cs
@@ -1,42 +1,42 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Servers; 4using OpenSim.Framework.Servers;
5using System.IO; 5using System.IO;
6using System.Collections; 6using System.Collections;
7using libsecondlife; 7using libsecondlife;
8 8
9namespace OpenSim.Region.Capabilities 9namespace OpenSim.Region.Capabilities
10{ 10{
11 public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler 11 public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler
12 where TRequest : new() 12 where TRequest : new()
13 { 13 {
14 private LLSDMethod<TRequest, TResponse> m_method; 14 private LLSDMethod<TRequest, TResponse> m_method;
15 15
16 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) 16 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
17 : base(httpMethod, path ) 17 : base(httpMethod, path )
18 { 18 {
19 m_method = method; 19 m_method = method;
20 } 20 }
21 21
22 public override byte[] Handle(string path, Stream request) 22 public override byte[] Handle(string path, Stream request)
23 { 23 {
24 //Encoding encoding = Encoding.UTF8; 24 //Encoding encoding = Encoding.UTF8;
25 //StreamReader streamReader = new StreamReader(request, false); 25 //StreamReader streamReader = new StreamReader(request, false);
26 26
27 //string requestBody = streamReader.ReadToEnd(); 27 //string requestBody = streamReader.ReadToEnd();
28 //streamReader.Close(); 28 //streamReader.Close();
29 29
30 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); 30 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request );
31 TRequest llsdRequest = new TRequest(); 31 TRequest llsdRequest = new TRequest();
32 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 32 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
33 33
34 TResponse response = m_method(llsdRequest); 34 TResponse response = m_method(llsdRequest);
35 35
36 Encoding encoding = new UTF8Encoding(false); 36 Encoding encoding = new UTF8Encoding(false);
37 37
38 return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) ); 38 return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
39 39
40 } 40 }
41 } 41 }
42} 42}
diff --git a/OpenSim/Region/Capabilities/LLSDTest.cs b/OpenSim/Region/Capabilities/LLSDTest.cs
index f23e327..78ccf67 100644
--- a/OpenSim/Region/Capabilities/LLSDTest.cs
+++ b/OpenSim/Region/Capabilities/LLSDTest.cs
@@ -1,41 +1,41 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Region.Capabilities 28namespace OpenSim.Region.Capabilities
29{ 29{
30 [LLSDType("MAP")] 30 [LLSDType("MAP")]
31 public class LLSDTest 31 public class LLSDTest
32 { 32 {
33 public int Test1 = 20; 33 public int Test1 = 20;
34 public int Test2 = 10; 34 public int Test2 = 10;
35 35
36 public LLSDTest() 36 public LLSDTest()
37 { 37 {
38 38
39 } 39 }
40 } 40 }
41} 41}
diff --git a/OpenSim/Region/Capabilities/LLSDType.cs b/OpenSim/Region/Capabilities/LLSDType.cs
index c58a937..04f4d9a 100644
--- a/OpenSim/Region/Capabilities/LLSDType.cs
+++ b/OpenSim/Region/Capabilities/LLSDType.cs
@@ -1,59 +1,59 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29 29
30namespace OpenSim.Region.Capabilities 30namespace OpenSim.Region.Capabilities
31{ 31{
32 [AttributeUsage(AttributeTargets.Class)] 32 [AttributeUsage(AttributeTargets.Class)]
33 public class LLSDType : Attribute 33 public class LLSDType : Attribute
34 { 34 {
35 protected string myType; 35 protected string myType;
36 36
37 public LLSDType(string type) 37 public LLSDType(string type)
38 { 38 {
39 myType = type; 39 myType = type;
40 40
41 } 41 }
42 42
43 public string ObjectType 43 public string ObjectType
44 { 44 {
45 get 45 get
46 { 46 {
47 return myType; 47 return myType;
48 } 48 }
49 } 49 }
50 } 50 }
51 51
52 [AttributeUsage(AttributeTargets.Class)] 52 [AttributeUsage(AttributeTargets.Class)]
53 public class LLSDMap : LLSDType 53 public class LLSDMap : LLSDType
54 { 54 {
55 public LLSDMap() : base( "MAP" ) 55 public LLSDMap() : base( "MAP" )
56 { 56 {
57 } 57 }
58 } 58 }
59} 59}
diff --git a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs
index e2cfa46..1bb6c07 100644
--- a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs
+++ b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs
@@ -1,338 +1,338 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using libsecondlife; 32using libsecondlife;
33using libsecondlife.Packets; 33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Inventory; 35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Region.ClientStack; 37using OpenSim.Region.ClientStack;
38 38
39namespace OpenSim.Assets 39namespace OpenSim.Assets
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// Description of InventoryManager. 42 /// Description of InventoryManager.
43 /// </summary> 43 /// </summary>
44 public class InventoryCache 44 public class InventoryCache
45 { 45 {
46 private Dictionary<LLUUID, AgentInventory> _agentsInventory; 46 private Dictionary<LLUUID, AgentInventory> _agentsInventory;
47 private List<UserServerRequest> _serverRequests; //list of requests made to user server. 47 private List<UserServerRequest> _serverRequests; //list of requests made to user server.
48 private Encoding _enc = Encoding.ASCII; 48 private Encoding _enc = Encoding.ASCII;
49 private const uint FULL_MASK_PERMISSIONS = 2147483647; 49 private const uint FULL_MASK_PERMISSIONS = 2147483647;
50 50
51 public InventoryCache() 51 public InventoryCache()
52 { 52 {
53 _agentsInventory = new Dictionary<LLUUID, AgentInventory>(); 53 _agentsInventory = new Dictionary<LLUUID, AgentInventory>();
54 _serverRequests = new List<UserServerRequest>(); 54 _serverRequests = new List<UserServerRequest>();
55 } 55 }
56 56
57 public void AddNewAgentsInventory(AgentInventory agentInventory) 57 public void AddNewAgentsInventory(AgentInventory agentInventory)
58 { 58 {
59 if (!this._agentsInventory.ContainsKey(agentInventory.AgentID)) 59 if (!this._agentsInventory.ContainsKey(agentInventory.AgentID))
60 { 60 {
61 this._agentsInventory.Add(agentInventory.AgentID, agentInventory); 61 this._agentsInventory.Add(agentInventory.AgentID, agentInventory);
62 } 62 }
63 } 63 }
64 64
65 public AgentInventory FetchAgentsInventory(LLUUID agentID, IUserServer userserver) 65 public AgentInventory FetchAgentsInventory(LLUUID agentID, IUserServer userserver)
66 { 66 {
67 AgentInventory res = null; 67 AgentInventory res = null;
68 if (!this._agentsInventory.ContainsKey(agentID)) 68 if (!this._agentsInventory.ContainsKey(agentID))
69 { 69 {
70 res = userserver.RequestAgentsInventory(agentID); 70 res = userserver.RequestAgentsInventory(agentID);
71 this._agentsInventory.Add(agentID,res); 71 this._agentsInventory.Add(agentID,res);
72 } 72 }
73 return res; 73 return res;
74 } 74 }
75 75
76 public AgentInventory GetAgentsInventory(LLUUID agentID) 76 public AgentInventory GetAgentsInventory(LLUUID agentID)
77 { 77 {
78 if (this._agentsInventory.ContainsKey(agentID)) 78 if (this._agentsInventory.ContainsKey(agentID))
79 { 79 {
80 return this._agentsInventory[agentID]; 80 return this._agentsInventory[agentID];
81 } 81 }
82 82
83 return null; 83 return null;
84 } 84 }
85 85
86 public void ClientLeaving(LLUUID clientID, IUserServer userserver) 86 public void ClientLeaving(LLUUID clientID, IUserServer userserver)
87 { 87 {
88 if (this._agentsInventory.ContainsKey(clientID)) 88 if (this._agentsInventory.ContainsKey(clientID))
89 { 89 {
90 if (userserver != null) 90 if (userserver != null)
91 { 91 {
92 userserver.UpdateAgentsInventory(clientID, this._agentsInventory[clientID]); 92 userserver.UpdateAgentsInventory(clientID, this._agentsInventory[clientID]);
93 } 93 }
94 this._agentsInventory.Remove(clientID); 94 this._agentsInventory.Remove(clientID);
95 } 95 }
96 } 96 }
97 97
98 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID) 98 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID)
99 { 99 {
100 return this.CreateNewInventoryFolder(remoteClient, folderID, 0); 100 return this.CreateNewInventoryFolder(remoteClient, folderID, 0);
101 } 101 }
102 102
103 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type) 103 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type)
104 { 104 {
105 bool res = false; 105 bool res = false;
106 if (folderID != LLUUID.Zero) //don't create a folder with a zero id 106 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
107 { 107 {
108 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 108 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
109 { 109 {
110 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type); 110 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type);
111 } 111 }
112 } 112 }
113 return res; 113 return res;
114 } 114 }
115 115
116 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type, string folderName, LLUUID parent) 116 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type, string folderName, LLUUID parent)
117 { 117 {
118 bool res = false; 118 bool res = false;
119 if (folderID != LLUUID.Zero) //don't create a folder with a zero id 119 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
120 { 120 {
121 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 121 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
122 { 122 {
123 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type, folderName, parent); 123 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type, folderName, parent);
124 } 124 }
125 } 125 }
126 return res; 126 return res;
127 } 127 }
128 128
129 public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset) 129 public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset)
130 { 130 {
131 LLUUID newItem = null; 131 LLUUID newItem = null;
132 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 132 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
133 { 133 {
134 newItem = this._agentsInventory[remoteClient.AgentID].AddToInventory(folderID, asset); 134 newItem = this._agentsInventory[remoteClient.AgentID].AddToInventory(folderID, asset);
135 if (newItem != null) 135 if (newItem != null)
136 { 136 {
137 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[newItem]; 137 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[newItem];
138 this.SendItemUpdateCreate(remoteClient, Item); 138 this.SendItemUpdateCreate(remoteClient, Item);
139 } 139 }
140 } 140 }
141 141
142 return newItem; 142 return newItem;
143 } 143 }
144 public bool DeleteInventoryItem(ClientView remoteClient, LLUUID itemID) 144 public bool DeleteInventoryItem(ClientView remoteClient, LLUUID itemID)
145 { 145 {
146 bool res = false; 146 bool res = false;
147 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 147 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
148 { 148 {
149 res = this._agentsInventory[remoteClient.AgentID].DeleteFromInventory(itemID); 149 res = this._agentsInventory[remoteClient.AgentID].DeleteFromInventory(itemID);
150 if (res) 150 if (res)
151 { 151 {
152 RemoveInventoryItemPacket remove = new RemoveInventoryItemPacket(); 152 RemoveInventoryItemPacket remove = new RemoveInventoryItemPacket();
153 remove.AgentData.AgentID = remoteClient.AgentID; 153 remove.AgentData.AgentID = remoteClient.AgentID;
154 remove.AgentData.SessionID = remoteClient.SessionID; 154 remove.AgentData.SessionID = remoteClient.SessionID;
155 remove.InventoryData = new RemoveInventoryItemPacket.InventoryDataBlock[1]; 155 remove.InventoryData = new RemoveInventoryItemPacket.InventoryDataBlock[1];
156 remove.InventoryData[0] = new RemoveInventoryItemPacket.InventoryDataBlock(); 156 remove.InventoryData[0] = new RemoveInventoryItemPacket.InventoryDataBlock();
157 remove.InventoryData[0].ItemID = itemID; 157 remove.InventoryData[0].ItemID = itemID;
158 remoteClient.OutPacket(remove); 158 remoteClient.OutPacket(remove);
159 } 159 }
160 } 160 }
161 161
162 return res; 162 return res;
163 } 163 }
164 164
165 public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset) 165 public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset)
166 { 166 {
167 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 167 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
168 { 168 {
169 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemAsset(itemID, asset); 169 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemAsset(itemID, asset);
170 if (res) 170 if (res)
171 { 171 {
172 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID]; 172 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID];
173 this.SendItemUpdateCreate(remoteClient, Item); 173 this.SendItemUpdateCreate(remoteClient, Item);
174 } 174 }
175 return res; 175 return res;
176 } 176 }
177 177
178 return false; 178 return false;
179 } 179 }
180 180
181 public bool UpdateInventoryItemDetails(ClientView remoteClient, LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet) 181 public bool UpdateInventoryItemDetails(ClientView remoteClient, LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
182 { 182 {
183 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 183 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
184 { 184 {
185 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemDetails(itemID, packet); 185 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemDetails(itemID, packet);
186 if (res) 186 if (res)
187 { 187 {
188 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID]; 188 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID];
189 this.SendItemUpdateCreate(remoteClient, Item); 189 this.SendItemUpdateCreate(remoteClient, Item);
190 } 190 }
191 return res; 191 return res;
192 } 192 }
193 193
194 return false; 194 return false;
195 } 195 }
196 196
197 public void FetchInventoryDescendents(ClientView userInfo, FetchInventoryDescendentsPacket FetchDescend) 197 public void FetchInventoryDescendents(ClientView userInfo, FetchInventoryDescendentsPacket FetchDescend)
198 { 198 {
199 199
200 if (this._agentsInventory.ContainsKey(userInfo.AgentID)) 200 if (this._agentsInventory.ContainsKey(userInfo.AgentID))
201 { 201 {
202 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID]; 202 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID];
203 if (FetchDescend.InventoryData.FetchItems) 203 if (FetchDescend.InventoryData.FetchItems)
204 { 204 {
205 if (agentInventory.InventoryFolders.ContainsKey(FetchDescend.InventoryData.FolderID)) 205 if (agentInventory.InventoryFolders.ContainsKey(FetchDescend.InventoryData.FolderID))
206 { 206 {
207 InventoryFolder Folder = agentInventory.InventoryFolders[FetchDescend.InventoryData.FolderID]; 207 InventoryFolder Folder = agentInventory.InventoryFolders[FetchDescend.InventoryData.FolderID];
208 InventoryDescendentsPacket Descend = new InventoryDescendentsPacket(); 208 InventoryDescendentsPacket Descend = new InventoryDescendentsPacket();
209 Descend.AgentData.AgentID = userInfo.AgentID; 209 Descend.AgentData.AgentID = userInfo.AgentID;
210 Descend.AgentData.OwnerID = Folder.OwnerID; 210 Descend.AgentData.OwnerID = Folder.OwnerID;
211 Descend.AgentData.FolderID = FetchDescend.InventoryData.FolderID; 211 Descend.AgentData.FolderID = FetchDescend.InventoryData.FolderID;
212 Descend.AgentData.Descendents = Folder.Items.Count; 212 Descend.AgentData.Descendents = Folder.Items.Count;
213 Descend.AgentData.Version = Folder.Items.Count; 213 Descend.AgentData.Version = Folder.Items.Count;
214 214
215 215
216 Descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[Folder.Items.Count]; 216 Descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[Folder.Items.Count];
217 for (int i = 0; i < Folder.Items.Count; i++) 217 for (int i = 0; i < Folder.Items.Count; i++)
218 { 218 {
219 219
220 InventoryItem Item = Folder.Items[i]; 220 InventoryItem Item = Folder.Items[i];
221 Descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); 221 Descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock();
222 Descend.ItemData[i].ItemID = Item.ItemID; 222 Descend.ItemData[i].ItemID = Item.ItemID;
223 Descend.ItemData[i].AssetID = Item.AssetID; 223 Descend.ItemData[i].AssetID = Item.AssetID;
224 Descend.ItemData[i].CreatorID = Item.CreatorID; 224 Descend.ItemData[i].CreatorID = Item.CreatorID;
225 Descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS; 225 Descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS;
226 Descend.ItemData[i].CreationDate = 1000; 226 Descend.ItemData[i].CreationDate = 1000;
227 Descend.ItemData[i].Description = _enc.GetBytes(Item.Description + "\0"); 227 Descend.ItemData[i].Description = _enc.GetBytes(Item.Description + "\0");
228 Descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS; 228 Descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS;
229 Descend.ItemData[i].Flags = 1; 229 Descend.ItemData[i].Flags = 1;
230 Descend.ItemData[i].FolderID = Item.FolderID; 230 Descend.ItemData[i].FolderID = Item.FolderID;
231 Descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 231 Descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
232 Descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS; 232 Descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS;
233 Descend.ItemData[i].InvType = Item.InvType; 233 Descend.ItemData[i].InvType = Item.InvType;
234 Descend.ItemData[i].Name = _enc.GetBytes(Item.Name + "\0"); 234 Descend.ItemData[i].Name = _enc.GetBytes(Item.Name + "\0");
235 Descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS; 235 Descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS;
236 Descend.ItemData[i].OwnerID = Item.OwnerID; 236 Descend.ItemData[i].OwnerID = Item.OwnerID;
237 Descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS; 237 Descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS;
238 Descend.ItemData[i].SalePrice = 100; 238 Descend.ItemData[i].SalePrice = 100;
239 Descend.ItemData[i].SaleType = 0; 239 Descend.ItemData[i].SaleType = 0;
240 Descend.ItemData[i].Type = Item.Type; 240 Descend.ItemData[i].Type = Item.Type;
241 Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 241 Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
242 } 242 }
243 243
244 userInfo.OutPacket(Descend); 244 userInfo.OutPacket(Descend);
245 245
246 } 246 }
247 } 247 }
248 else 248 else
249 { 249 {
250 Console.WriteLine("fetch subfolders"); 250 Console.WriteLine("fetch subfolders");
251 } 251 }
252 } 252 }
253 } 253 }
254 254
255 public void FetchInventory(ClientView userInfo, FetchInventoryPacket FetchItems) 255 public void FetchInventory(ClientView userInfo, FetchInventoryPacket FetchItems)
256 { 256 {
257 if (this._agentsInventory.ContainsKey(userInfo.AgentID)) 257 if (this._agentsInventory.ContainsKey(userInfo.AgentID))
258 { 258 {
259 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID]; 259 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID];
260 260
261 for (int i = 0; i < FetchItems.InventoryData.Length; i++) 261 for (int i = 0; i < FetchItems.InventoryData.Length; i++)
262 { 262 {
263 if (agentInventory.InventoryItems.ContainsKey(FetchItems.InventoryData[i].ItemID)) 263 if (agentInventory.InventoryItems.ContainsKey(FetchItems.InventoryData[i].ItemID))
264 { 264 {
265 InventoryItem Item = agentInventory.InventoryItems[FetchItems.InventoryData[i].ItemID]; 265 InventoryItem Item = agentInventory.InventoryItems[FetchItems.InventoryData[i].ItemID];
266 FetchInventoryReplyPacket InventoryReply = new FetchInventoryReplyPacket(); 266 FetchInventoryReplyPacket InventoryReply = new FetchInventoryReplyPacket();
267 InventoryReply.AgentData.AgentID = userInfo.AgentID; 267 InventoryReply.AgentData.AgentID = userInfo.AgentID;
268 InventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1]; 268 InventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1];
269 InventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); 269 InventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock();
270 InventoryReply.InventoryData[0].ItemID = Item.ItemID; 270 InventoryReply.InventoryData[0].ItemID = Item.ItemID;
271 InventoryReply.InventoryData[0].AssetID = Item.AssetID; 271 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
272 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID; 272 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
273 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS; 273 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
274 InventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 274 InventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
275 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); 275 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
276 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; 276 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
277 InventoryReply.InventoryData[0].Flags = 0; 277 InventoryReply.InventoryData[0].Flags = 0;
278 InventoryReply.InventoryData[0].FolderID = Item.FolderID; 278 InventoryReply.InventoryData[0].FolderID = Item.FolderID;
279 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 279 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
280 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; 280 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
281 InventoryReply.InventoryData[0].InvType = Item.InvType; 281 InventoryReply.InventoryData[0].InvType = Item.InvType;
282 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0"); 282 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0");
283 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS; 283 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
284 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID; 284 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID;
285 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS; 285 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
286 InventoryReply.InventoryData[0].SalePrice = 100; 286 InventoryReply.InventoryData[0].SalePrice = 100;
287 InventoryReply.InventoryData[0].SaleType = 0; 287 InventoryReply.InventoryData[0].SaleType = 0;
288 InventoryReply.InventoryData[0].Type = Item.Type; 288 InventoryReply.InventoryData[0].Type = Item.Type;
289 InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 289 InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
290 userInfo.OutPacket(InventoryReply); 290 userInfo.OutPacket(InventoryReply);
291 } 291 }
292 } 292 }
293 } 293 }
294 } 294 }
295 295
296 private void SendItemUpdateCreate(ClientView remoteClient, InventoryItem Item) 296 private void SendItemUpdateCreate(ClientView remoteClient, InventoryItem Item)
297 { 297 {
298 298
299 UpdateCreateInventoryItemPacket InventoryReply = new UpdateCreateInventoryItemPacket(); 299 UpdateCreateInventoryItemPacket InventoryReply = new UpdateCreateInventoryItemPacket();
300 InventoryReply.AgentData.AgentID = remoteClient.AgentID; 300 InventoryReply.AgentData.AgentID = remoteClient.AgentID;
301 InventoryReply.AgentData.SimApproved = true; 301 InventoryReply.AgentData.SimApproved = true;
302 InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1]; 302 InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1];
303 InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock(); 303 InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
304 InventoryReply.InventoryData[0].ItemID = Item.ItemID; 304 InventoryReply.InventoryData[0].ItemID = Item.ItemID;
305 InventoryReply.InventoryData[0].AssetID = Item.AssetID; 305 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
306 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID; 306 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
307 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS; 307 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
308 InventoryReply.InventoryData[0].CreationDate = 1000; 308 InventoryReply.InventoryData[0].CreationDate = 1000;
309 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); 309 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
310 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; 310 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
311 InventoryReply.InventoryData[0].Flags = 0; 311 InventoryReply.InventoryData[0].Flags = 0;
312 InventoryReply.InventoryData[0].FolderID = Item.FolderID; 312 InventoryReply.InventoryData[0].FolderID = Item.FolderID;
313 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 313 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
314 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; 314 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
315 InventoryReply.InventoryData[0].InvType = Item.InvType; 315 InventoryReply.InventoryData[0].InvType = Item.InvType;
316 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0"); 316 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0");
317 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS; 317 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
318 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID; 318 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID;
319 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS; 319 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
320 InventoryReply.InventoryData[0].SalePrice = 100; 320 InventoryReply.InventoryData[0].SalePrice = 100;
321 InventoryReply.InventoryData[0].SaleType = 0; 321 InventoryReply.InventoryData[0].SaleType = 0;
322 InventoryReply.InventoryData[0].Type = Item.Type; 322 InventoryReply.InventoryData[0].Type = Item.Type;
323 InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 323 InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
324 324
325 remoteClient.OutPacket(InventoryReply); 325 remoteClient.OutPacket(InventoryReply);
326 } 326 }
327 } 327 }
328 328
329 329
330 330
331 public class UserServerRequest 331 public class UserServerRequest
332 { 332 {
333 public UserServerRequest() 333 public UserServerRequest()
334 { 334 {
335 335
336 } 336 }
337 } 337 }
338} 338}
diff --git a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs
index f4e537c..e3ad9d0 100644
--- a/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs
+++ b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs
@@ -1,40 +1,40 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Net.Sockets; 28using System.Net.Sockets;
29 29
30namespace OpenSim.Region.ClientStack 30namespace OpenSim.Region.ClientStack
31{ 31{
32 32
33 public interface ClientStackNetworkHandler 33 public interface ClientStackNetworkHandler
34 { 34 {
35 void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode);// EndPoint packetSender); 35 void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode);// EndPoint packetSender);
36 void RemoveClientCircuit(uint circuitcode); 36 void RemoveClientCircuit(uint circuitcode);
37 void RegisterPacketServer(PacketServer server); 37 void RegisterPacketServer(PacketServer server);
38 } 38 }
39 39
40} 40}
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 33e34c1..2ac1000 100644
--- a/OpenSim/Region/ClientStack/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -1,1180 +1,1180 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Text; 31using System.Text;
32using Axiom.Math; 32using Axiom.Math;
33using libsecondlife; 33using libsecondlife;
34using libsecondlife.Packets; 34using libsecondlife.Packets;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 37using OpenSim.Framework.Types;
38using OpenSim.Framework.Data; 38using OpenSim.Framework.Data;
39 39
40namespace OpenSim.Region.ClientStack 40namespace OpenSim.Region.ClientStack
41{ 41{
42 partial class ClientView 42 partial class ClientView
43 { 43 {
44 public event ImprovedInstantMessage OnInstantMessage; 44 public event ImprovedInstantMessage OnInstantMessage;
45 public event ChatFromViewer OnChatFromViewer; 45 public event ChatFromViewer OnChatFromViewer;
46 public event RezObject OnRezObject; 46 public event RezObject OnRezObject;
47 public event GenericCall4 OnDeRezObject; 47 public event GenericCall4 OnDeRezObject;
48 public event ModifyTerrain OnModifyTerrain; 48 public event ModifyTerrain OnModifyTerrain;
49 public event GenericCall OnRegionHandShakeReply; 49 public event GenericCall OnRegionHandShakeReply;
50 public event GenericCall OnRequestWearables; 50 public event GenericCall OnRequestWearables;
51 public event SetAppearance OnSetAppearance; 51 public event SetAppearance OnSetAppearance;
52 public event GenericCall2 OnCompleteMovementToRegion; 52 public event GenericCall2 OnCompleteMovementToRegion;
53 public event UpdateAgent OnAgentUpdate; 53 public event UpdateAgent OnAgentUpdate;
54 public event StartAnim OnStartAnim; 54 public event StartAnim OnStartAnim;
55 public event GenericCall OnRequestAvatarsData; 55 public event GenericCall OnRequestAvatarsData;
56 public event LinkObjects OnLinkObjects; 56 public event LinkObjects OnLinkObjects;
57 public event UpdateVector OnGrapObject; 57 public event UpdateVector OnGrapObject;
58 public event ObjectSelect OnDeGrapObject; 58 public event ObjectSelect OnDeGrapObject;
59 public event ObjectDuplicate OnObjectDuplicate; 59 public event ObjectDuplicate OnObjectDuplicate;
60 public event MoveObject OnGrapUpdate; 60 public event MoveObject OnGrapUpdate;
61 public event AddNewPrim OnAddPrim; 61 public event AddNewPrim OnAddPrim;
62 public event UpdateShape OnUpdatePrimShape; 62 public event UpdateShape OnUpdatePrimShape;
63 public event ObjectSelect OnObjectSelect; 63 public event ObjectSelect OnObjectSelect;
64 public event ObjectDeselect OnObjectDeselect; 64 public event ObjectDeselect OnObjectDeselect;
65 public event GenericCall7 OnObjectDescription; 65 public event GenericCall7 OnObjectDescription;
66 public event GenericCall7 OnObjectName; 66 public event GenericCall7 OnObjectName;
67 public event UpdatePrimFlags OnUpdatePrimFlags; 67 public event UpdatePrimFlags OnUpdatePrimFlags;
68 public event UpdatePrimTexture OnUpdatePrimTexture; 68 public event UpdatePrimTexture OnUpdatePrimTexture;
69 public event UpdateVector OnUpdatePrimGroupPosition; 69 public event UpdateVector OnUpdatePrimGroupPosition;
70 public event UpdateVector OnUpdatePrimSinglePosition; 70 public event UpdateVector OnUpdatePrimSinglePosition;
71 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 71 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
72 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 72 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
73 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 73 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
74 public event UpdateVector OnUpdatePrimScale; 74 public event UpdateVector OnUpdatePrimScale;
75 public event StatusChange OnChildAgentStatus; 75 public event StatusChange OnChildAgentStatus;
76 public event GenericCall2 OnStopMovement; 76 public event GenericCall2 OnStopMovement;
77 public event NewAvatar OnNewAvatar; 77 public event NewAvatar OnNewAvatar;
78 public event GenericCall6 OnRemoveAvatar; 78 public event GenericCall6 OnRemoveAvatar;
79 public event RequestMapBlocks OnRequestMapBlocks; 79 public event RequestMapBlocks OnRequestMapBlocks;
80 public event TeleportLocationRequest OnTeleportLocationRequest; 80 public event TeleportLocationRequest OnTeleportLocationRequest;
81 81
82 public event UUIDNameRequest OnNameFromUUIDRequest; 82 public event UUIDNameRequest OnNameFromUUIDRequest;
83 83
84 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 84 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
85 public event ParcelDivideRequest OnParcelDivideRequest; 85 public event ParcelDivideRequest OnParcelDivideRequest;
86 public event ParcelJoinRequest OnParcelJoinRequest; 86 public event ParcelJoinRequest OnParcelJoinRequest;
87 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 87 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
88 public event ParcelSelectObjects OnParcelSelectObjects; 88 public event ParcelSelectObjects OnParcelSelectObjects;
89 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 89 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
90 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 90 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
91 91
92 /// <summary> 92 /// <summary>
93 /// 93 ///
94 /// </summary> 94 /// </summary>
95 public LLVector3 StartPos 95 public LLVector3 StartPos
96 { 96 {
97 get 97 get
98 { 98 {
99 return startpos; 99 return startpos;
100 } 100 }
101 set 101 set
102 { 102 {
103 startpos = value; 103 startpos = value;
104 } 104 }
105 } 105 }
106 106
107 /// <summary> 107 /// <summary>
108 /// 108 ///
109 /// </summary> 109 /// </summary>
110 public LLUUID AgentId 110 public LLUUID AgentId
111 { 111 {
112 get 112 get
113 { 113 {
114 return this.AgentID; 114 return this.AgentID;
115 } 115 }
116 } 116 }
117 117
118 /// <summary> 118 /// <summary>
119 /// 119 ///
120 /// </summary> 120 /// </summary>
121 public string FirstName 121 public string FirstName
122 { 122 {
123 get 123 get
124 { 124 {
125 return this.firstName; 125 return this.firstName;
126 } 126 }
127 127
128 } 128 }
129 129
130 /// <summary> 130 /// <summary>
131 /// 131 ///
132 /// </summary> 132 /// </summary>
133 public string LastName 133 public string LastName
134 { 134 {
135 get 135 get
136 { 136 {
137 return this.lastName; 137 return this.lastName;
138 } 138 }
139 } 139 }
140 140
141 #region World/Avatar to Client 141 #region World/Avatar to Client
142 142
143 /// <summary> 143 /// <summary>
144 /// 144 ///
145 /// </summary> 145 /// </summary>
146 /// <param name="regionInfo"></param> 146 /// <param name="regionInfo"></param>
147 public void SendRegionHandshake(RegionInfo regionInfo) 147 public void SendRegionHandshake(RegionInfo regionInfo)
148 { 148 {
149 Encoding _enc = Encoding.ASCII; 149 Encoding _enc = Encoding.ASCII;
150 RegionHandshakePacket handshake = new RegionHandshakePacket(); 150 RegionHandshakePacket handshake = new RegionHandshakePacket();
151 151
152 handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor; 152 handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor;
153 handshake.RegionInfo.IsEstateManager = false; 153 handshake.RegionInfo.IsEstateManager = false;
154 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.estateSettings.terrainHeightRange0; 154 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.estateSettings.terrainHeightRange0;
155 handshake.RegionInfo.TerrainHeightRange01 = regionInfo.estateSettings.terrainHeightRange1; 155 handshake.RegionInfo.TerrainHeightRange01 = regionInfo.estateSettings.terrainHeightRange1;
156 handshake.RegionInfo.TerrainHeightRange10 = regionInfo.estateSettings.terrainHeightRange2; 156 handshake.RegionInfo.TerrainHeightRange10 = regionInfo.estateSettings.terrainHeightRange2;
157 handshake.RegionInfo.TerrainHeightRange11 = regionInfo.estateSettings.terrainHeightRange3; 157 handshake.RegionInfo.TerrainHeightRange11 = regionInfo.estateSettings.terrainHeightRange3;
158 handshake.RegionInfo.TerrainStartHeight00 = regionInfo.estateSettings.terrainStartHeight0; 158 handshake.RegionInfo.TerrainStartHeight00 = regionInfo.estateSettings.terrainStartHeight0;
159 handshake.RegionInfo.TerrainStartHeight01 = regionInfo.estateSettings.terrainStartHeight1; 159 handshake.RegionInfo.TerrainStartHeight01 = regionInfo.estateSettings.terrainStartHeight1;
160 handshake.RegionInfo.TerrainStartHeight10 = regionInfo.estateSettings.terrainStartHeight2; 160 handshake.RegionInfo.TerrainStartHeight10 = regionInfo.estateSettings.terrainStartHeight2;
161 handshake.RegionInfo.TerrainStartHeight11 = regionInfo.estateSettings.terrainStartHeight3; 161 handshake.RegionInfo.TerrainStartHeight11 = regionInfo.estateSettings.terrainStartHeight3;
162 handshake.RegionInfo.SimAccess = (byte)regionInfo.estateSettings.simAccess; 162 handshake.RegionInfo.SimAccess = (byte)regionInfo.estateSettings.simAccess;
163 handshake.RegionInfo.WaterHeight = regionInfo.estateSettings.waterHeight; 163 handshake.RegionInfo.WaterHeight = regionInfo.estateSettings.waterHeight;
164 164
165 165
166 handshake.RegionInfo.RegionFlags = (uint)regionInfo.estateSettings.regionFlags; 166 handshake.RegionInfo.RegionFlags = (uint)regionInfo.estateSettings.regionFlags;
167 167
168 handshake.RegionInfo.SimName = _enc.GetBytes(regionInfo.RegionName + "\0"); 168 handshake.RegionInfo.SimName = _enc.GetBytes(regionInfo.RegionName + "\0");
169 handshake.RegionInfo.SimOwner = regionInfo.MasterAvatarAssignedUUID; 169 handshake.RegionInfo.SimOwner = regionInfo.MasterAvatarAssignedUUID;
170 handshake.RegionInfo.TerrainBase0 = regionInfo.estateSettings.terrainBase0; 170 handshake.RegionInfo.TerrainBase0 = regionInfo.estateSettings.terrainBase0;
171 handshake.RegionInfo.TerrainBase1 = regionInfo.estateSettings.terrainBase1; 171 handshake.RegionInfo.TerrainBase1 = regionInfo.estateSettings.terrainBase1;
172 handshake.RegionInfo.TerrainBase2 = regionInfo.estateSettings.terrainBase2; 172 handshake.RegionInfo.TerrainBase2 = regionInfo.estateSettings.terrainBase2;
173 handshake.RegionInfo.TerrainBase3 = regionInfo.estateSettings.terrainBase3; 173 handshake.RegionInfo.TerrainBase3 = regionInfo.estateSettings.terrainBase3;
174 handshake.RegionInfo.TerrainDetail0 = regionInfo.estateSettings.terrainDetail0; 174 handshake.RegionInfo.TerrainDetail0 = regionInfo.estateSettings.terrainDetail0;
175 handshake.RegionInfo.TerrainDetail1 = regionInfo.estateSettings.terrainDetail1; 175 handshake.RegionInfo.TerrainDetail1 = regionInfo.estateSettings.terrainDetail1;
176 handshake.RegionInfo.TerrainDetail2 = regionInfo.estateSettings.terrainDetail2; 176 handshake.RegionInfo.TerrainDetail2 = regionInfo.estateSettings.terrainDetail2;
177 handshake.RegionInfo.TerrainDetail3 = regionInfo.estateSettings.terrainDetail3; 177 handshake.RegionInfo.TerrainDetail3 = regionInfo.estateSettings.terrainDetail3;
178 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting? 178 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
179 179
180 this.OutPacket(handshake); 180 this.OutPacket(handshake);
181 } 181 }
182 182
183 /// <summary> 183 /// <summary>
184 /// 184 ///
185 /// </summary> 185 /// </summary>
186 /// <param name="regInfo"></param> 186 /// <param name="regInfo"></param>
187 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 187 public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look)
188 { 188 {
189 AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); 189 AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
190 mov.AgentData.SessionID = this.SessionID; 190 mov.AgentData.SessionID = this.SessionID;
191 mov.AgentData.AgentID = this.AgentID; 191 mov.AgentData.AgentID = this.AgentID;
192 mov.Data.RegionHandle = regInfo.RegionHandle; 192 mov.Data.RegionHandle = regInfo.RegionHandle;
193 mov.Data.Timestamp = 1172750370; // TODO - dynamicalise this 193 mov.Data.Timestamp = 1172750370; // TODO - dynamicalise this
194 194
195 if ((pos.X == 0) && (pos.Y == 0) && (pos.Z == 0)) 195 if ((pos.X == 0) && (pos.Y == 0) && (pos.Z == 0))
196 { 196 {
197 mov.Data.Position = this.startpos; 197 mov.Data.Position = this.startpos;
198 } 198 }
199 else 199 else
200 { 200 {
201 mov.Data.Position = pos; 201 mov.Data.Position = pos;
202 } 202 }
203 mov.Data.LookAt = look; 203 mov.Data.LookAt = look;
204 204
205 OutPacket(mov); 205 OutPacket(mov);
206 } 206 }
207 207
208 /// <summary> 208 /// <summary>
209 /// 209 ///
210 /// </summary> 210 /// </summary>
211 /// <param name="message"></param> 211 /// <param name="message"></param>
212 /// <param name="type"></param> 212 /// <param name="type"></param>
213 /// <param name="fromPos"></param> 213 /// <param name="fromPos"></param>
214 /// <param name="fromName"></param> 214 /// <param name="fromName"></param>
215 /// <param name="fromAgentID"></param> 215 /// <param name="fromAgentID"></param>
216 public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) 216 public void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
217 { 217 {
218 SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID); 218 SendChatMessage(Helpers.StringToField(message), type, fromPos, fromName, fromAgentID);
219 } 219 }
220 220
221 /// <summary> 221 /// <summary>
222 /// 222 ///
223 /// </summary> 223 /// </summary>
224 /// <param name="message"></param> 224 /// <param name="message"></param>
225 /// <param name="type"></param> 225 /// <param name="type"></param>
226 /// <param name="fromPos"></param> 226 /// <param name="fromPos"></param>
227 /// <param name="fromName"></param> 227 /// <param name="fromName"></param>
228 /// <param name="fromAgentID"></param> 228 /// <param name="fromAgentID"></param>
229 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) 229 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
230 { 230 {
231 Encoding enc = Encoding.ASCII; 231 Encoding enc = Encoding.ASCII;
232 ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket(); 232 ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket();
233 reply.ChatData.Audible = 1; 233 reply.ChatData.Audible = 1;
234 reply.ChatData.Message = message; 234 reply.ChatData.Message = message;
235 reply.ChatData.ChatType = type; 235 reply.ChatData.ChatType = type;
236 reply.ChatData.SourceType = 1; 236 reply.ChatData.SourceType = 1;
237 reply.ChatData.Position = fromPos; 237 reply.ChatData.Position = fromPos;
238 reply.ChatData.FromName = enc.GetBytes(fromName + "\0"); 238 reply.ChatData.FromName = enc.GetBytes(fromName + "\0");
239 reply.ChatData.OwnerID = fromAgentID; 239 reply.ChatData.OwnerID = fromAgentID;
240 reply.ChatData.SourceID = fromAgentID; 240 reply.ChatData.SourceID = fromAgentID;
241 241
242 this.OutPacket(reply); 242 this.OutPacket(reply);
243 } 243 }
244 244
245 /// <summary> 245 /// <summary>
246 /// 246 ///
247 /// </summary> 247 /// </summary>
248 /// <remarks>TODO</remarks> 248 /// <remarks>TODO</remarks>
249 /// <param name="message"></param> 249 /// <param name="message"></param>
250 /// <param name="target"></param> 250 /// <param name="target"></param>
251 public void SendInstantMessage(string message, LLUUID target, string fromName) 251 public void SendInstantMessage(string message, LLUUID target, string fromName)
252 { 252 {
253 if (message != "typing") 253 if (message != "typing")
254 { 254 {
255 Encoding enc = Encoding.ASCII; 255 Encoding enc = Encoding.ASCII;
256 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); 256 ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket();
257 msg.AgentData.AgentID = this.AgentID; 257 msg.AgentData.AgentID = this.AgentID;
258 msg.AgentData.SessionID = this.SessionID; 258 msg.AgentData.SessionID = this.SessionID;
259 msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0"); 259 msg.MessageBlock.FromAgentName = enc.GetBytes(fromName + " \0");
260 msg.MessageBlock.Dialog = 0; 260 msg.MessageBlock.Dialog = 0;
261 msg.MessageBlock.FromGroup = false; 261 msg.MessageBlock.FromGroup = false;
262 msg.MessageBlock.ID = target.Combine(this.SecureSessionID); 262 msg.MessageBlock.ID = target.Combine(this.SecureSessionID);
263 msg.MessageBlock.Offline = 0; 263 msg.MessageBlock.Offline = 0;
264 msg.MessageBlock.ParentEstateID = 0; 264 msg.MessageBlock.ParentEstateID = 0;
265 msg.MessageBlock.Position = new LLVector3(); 265 msg.MessageBlock.Position = new LLVector3();
266 msg.MessageBlock.RegionID = new LLUUID(); 266 msg.MessageBlock.RegionID = new LLUUID();
267 msg.MessageBlock.Timestamp = 0; 267 msg.MessageBlock.Timestamp = 0;
268 msg.MessageBlock.ToAgentID = target; 268 msg.MessageBlock.ToAgentID = target;
269 msg.MessageBlock.Message = enc.GetBytes(message + "\0"); 269 msg.MessageBlock.Message = enc.GetBytes(message + "\0");
270 msg.MessageBlock.BinaryBucket = new byte[0]; 270 msg.MessageBlock.BinaryBucket = new byte[0];
271 271
272 this.OutPacket(msg); 272 this.OutPacket(msg);
273 } 273 }
274 } 274 }
275 275
276 /// <summary> 276 /// <summary>
277 /// Send the region heightmap to the client 277 /// Send the region heightmap to the client
278 /// </summary> 278 /// </summary>
279 /// <param name="map">heightmap</param> 279 /// <param name="map">heightmap</param>
280 public virtual void SendLayerData(float[] map) 280 public virtual void SendLayerData(float[] map)
281 { 281 {
282 try 282 try
283 { 283 {
284 int[] patches = new int[4]; 284 int[] patches = new int[4];
285 285
286 for (int y = 0; y < 16; y++) 286 for (int y = 0; y < 16; y++)
287 { 287 {
288 for (int x = 0; x < 16; x = x + 4) 288 for (int x = 0; x < 16; x = x + 4)
289 { 289 {
290 patches[0] = x + 0 + y * 16; 290 patches[0] = x + 0 + y * 16;
291 patches[1] = x + 1 + y * 16; 291 patches[1] = x + 1 + y * 16;
292 patches[2] = x + 2 + y * 16; 292 patches[2] = x + 2 + y * 16;
293 patches[3] = x + 3 + y * 16; 293 patches[3] = x + 3 + y * 16;
294 294
295 Packet layerpack = TerrainManager.CreateLandPacket(map, patches); 295 Packet layerpack = TerrainManager.CreateLandPacket(map, patches);
296 OutPacket(layerpack); 296 OutPacket(layerpack);
297 } 297 }
298 } 298 }
299 } 299 }
300 catch (Exception e) 300 catch (Exception e)
301 { 301 {
302 MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString()); 302 MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString());
303 } 303 }
304 } 304 }
305 305
306 /// <summary> 306 /// <summary>
307 /// Sends a specified patch to a client 307 /// Sends a specified patch to a client
308 /// </summary> 308 /// </summary>
309 /// <param name="px">Patch coordinate (x) 0..16</param> 309 /// <param name="px">Patch coordinate (x) 0..16</param>
310 /// <param name="py">Patch coordinate (y) 0..16</param> 310 /// <param name="py">Patch coordinate (y) 0..16</param>
311 /// <param name="map">heightmap</param> 311 /// <param name="map">heightmap</param>
312 public void SendLayerData(int px, int py, float[] map) 312 public void SendLayerData(int px, int py, float[] map)
313 { 313 {
314 try 314 try
315 { 315 {
316 int[] patches = new int[1]; 316 int[] patches = new int[1];
317 int patchx, patchy; 317 int patchx, patchy;
318 patchx = px / 16; 318 patchx = px / 16;
319 patchy = py / 16; 319 patchy = py / 16;
320 320
321 patches[0] = patchx + 0 + patchy * 16; 321 patches[0] = patchx + 0 + patchy * 16;
322 322
323 Packet layerpack = TerrainManager.CreateLandPacket(map, patches); 323 Packet layerpack = TerrainManager.CreateLandPacket(map, patches);
324 OutPacket(layerpack); 324 OutPacket(layerpack);
325 } 325 }
326 catch (Exception e) 326 catch (Exception e)
327 { 327 {
328 MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString()); 328 MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString());
329 } 329 }
330 } 330 }
331 331
332 /// <summary> 332 /// <summary>
333 /// 333 ///
334 /// </summary> 334 /// </summary>
335 /// <param name="neighbourHandle"></param> 335 /// <param name="neighbourHandle"></param>
336 /// <param name="neighbourIP"></param> 336 /// <param name="neighbourIP"></param>
337 /// <param name="neighbourPort"></param> 337 /// <param name="neighbourPort"></param>
338 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint) 338 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint)
339 { 339 {
340 IPAddress neighbourIP = neighbourEndPoint.Address; 340 IPAddress neighbourIP = neighbourEndPoint.Address;
341 ushort neighbourPort = (ushort)neighbourEndPoint.Port; 341 ushort neighbourPort = (ushort)neighbourEndPoint.Port;
342 342
343 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket(); 343 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
344 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock(); 344 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
345 enablesimpacket.SimulatorInfo.Handle = neighbourHandle; 345 enablesimpacket.SimulatorInfo.Handle = neighbourHandle;
346 346
347 byte[] byteIP = neighbourIP.GetAddressBytes(); 347 byte[] byteIP = neighbourIP.GetAddressBytes();
348 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24; 348 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
349 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16; 349 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
350 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8; 350 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
351 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0]; 351 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
352 enablesimpacket.SimulatorInfo.Port = neighbourPort; 352 enablesimpacket.SimulatorInfo.Port = neighbourPort;
353 OutPacket(enablesimpacket); 353 OutPacket(enablesimpacket);
354 } 354 }
355 355
356 /// <summary> 356 /// <summary>
357 /// 357 ///
358 /// </summary> 358 /// </summary>
359 /// <returns></returns> 359 /// <returns></returns>
360 public AgentCircuitData RequestClientInfo() 360 public AgentCircuitData RequestClientInfo()
361 { 361 {
362 AgentCircuitData agentData = new AgentCircuitData(); 362 AgentCircuitData agentData = new AgentCircuitData();
363 agentData.AgentID = this.AgentId; 363 agentData.AgentID = this.AgentId;
364 agentData.SessionID = this.SessionID; 364 agentData.SessionID = this.SessionID;
365 agentData.SecureSessionID = this.SecureSessionID; 365 agentData.SecureSessionID = this.SecureSessionID;
366 agentData.circuitcode = this.CircuitCode; 366 agentData.circuitcode = this.CircuitCode;
367 agentData.child = false; 367 agentData.child = false;
368 agentData.firstname = this.firstName; 368 agentData.firstname = this.firstName;
369 agentData.lastname = this.lastName; 369 agentData.lastname = this.lastName;
370 370
371 return agentData; 371 return agentData;
372 } 372 }
373 373
374 public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint) 374 public void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint externalIPEndPoint)
375 { 375 {
376 LLVector3 look = new LLVector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10); 376 LLVector3 look = new LLVector3(lookAt.X * 10, lookAt.Y * 10, lookAt.Z * 10);
377 377
378 CrossedRegionPacket newSimPack = new CrossedRegionPacket(); 378 CrossedRegionPacket newSimPack = new CrossedRegionPacket();
379 newSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock(); 379 newSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock();
380 newSimPack.AgentData.AgentID = this.AgentID; 380 newSimPack.AgentData.AgentID = this.AgentID;
381 newSimPack.AgentData.SessionID = this.SessionID; 381 newSimPack.AgentData.SessionID = this.SessionID;
382 newSimPack.Info = new CrossedRegionPacket.InfoBlock(); 382 newSimPack.Info = new CrossedRegionPacket.InfoBlock();
383 newSimPack.Info.Position = pos; 383 newSimPack.Info.Position = pos;
384 newSimPack.Info.LookAt = look; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!! 384 newSimPack.Info.LookAt = look; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
385 newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock(); 385 newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock();
386 newSimPack.RegionData.RegionHandle = newRegionHandle; 386 newSimPack.RegionData.RegionHandle = newRegionHandle;
387 byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes(); 387 byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes();
388 newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24; 388 newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24;
389 newSimPack.RegionData.SimIP += (uint)byteIP[2] << 16; 389 newSimPack.RegionData.SimIP += (uint)byteIP[2] << 16;
390 newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8; 390 newSimPack.RegionData.SimIP += (uint)byteIP[1] << 8;
391 newSimPack.RegionData.SimIP += (uint)byteIP[0]; 391 newSimPack.RegionData.SimIP += (uint)byteIP[0];
392 newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port; 392 newSimPack.RegionData.SimPort = (ushort)externalIPEndPoint.Port;
393 newSimPack.RegionData.SeedCapability = new byte[0]; 393 newSimPack.RegionData.SeedCapability = new byte[0];
394 394
395 this.OutPacket(newSimPack); 395 this.OutPacket(newSimPack);
396 //this.DowngradeClient(); 396 //this.DowngradeClient();
397 } 397 }
398 398
399 public void SendMapBlock(List<MapBlockData> mapBlocks) 399 public void SendMapBlock(List<MapBlockData> mapBlocks)
400 { 400 {
401 MapBlockReplyPacket mapReply = new MapBlockReplyPacket(); 401 MapBlockReplyPacket mapReply = new MapBlockReplyPacket();
402 mapReply.AgentData.AgentID = this.AgentID; 402 mapReply.AgentData.AgentID = this.AgentID;
403 mapReply.Data = new MapBlockReplyPacket.DataBlock[mapBlocks.Count]; 403 mapReply.Data = new MapBlockReplyPacket.DataBlock[mapBlocks.Count];
404 mapReply.AgentData.Flags = 0; 404 mapReply.AgentData.Flags = 0;
405 405
406 for (int i = 0; i < mapBlocks.Count; i++) 406 for (int i = 0; i < mapBlocks.Count; i++)
407 { 407 {
408 mapReply.Data[i] = new MapBlockReplyPacket.DataBlock(); 408 mapReply.Data[i] = new MapBlockReplyPacket.DataBlock();
409 mapReply.Data[i].MapImageID = mapBlocks[i].MapImageId; 409 mapReply.Data[i].MapImageID = mapBlocks[i].MapImageId;
410 mapReply.Data[i].X = mapBlocks[i].X; 410 mapReply.Data[i].X = mapBlocks[i].X;
411 mapReply.Data[i].Y = mapBlocks[i].Y; 411 mapReply.Data[i].Y = mapBlocks[i].Y;
412 mapReply.Data[i].WaterHeight = mapBlocks[i].WaterHeight; 412 mapReply.Data[i].WaterHeight = mapBlocks[i].WaterHeight;
413 mapReply.Data[i].Name = Helpers.StringToField(mapBlocks[i].Name); 413 mapReply.Data[i].Name = Helpers.StringToField(mapBlocks[i].Name);
414 mapReply.Data[i].RegionFlags = mapBlocks[i].RegionFlags; 414 mapReply.Data[i].RegionFlags = mapBlocks[i].RegionFlags;
415 mapReply.Data[i].Access = mapBlocks[i].Access; 415 mapReply.Data[i].Access = mapBlocks[i].Access;
416 mapReply.Data[i].Agents = mapBlocks[i].Agents; 416 mapReply.Data[i].Agents = mapBlocks[i].Agents;
417 } 417 }
418 this.OutPacket(mapReply); 418 this.OutPacket(mapReply);
419 } 419 }
420 420
421 public void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) 421 public void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags)
422 { 422 {
423 TeleportLocalPacket tpLocal = new TeleportLocalPacket(); 423 TeleportLocalPacket tpLocal = new TeleportLocalPacket();
424 tpLocal.Info.AgentID = this.AgentID; 424 tpLocal.Info.AgentID = this.AgentID;
425 tpLocal.Info.TeleportFlags = flags; 425 tpLocal.Info.TeleportFlags = flags;
426 tpLocal.Info.LocationID = 2; 426 tpLocal.Info.LocationID = 2;
427 tpLocal.Info.LookAt = lookAt; 427 tpLocal.Info.LookAt = lookAt;
428 tpLocal.Info.Position = position; 428 tpLocal.Info.Position = position;
429 OutPacket(tpLocal); 429 OutPacket(tpLocal);
430 } 430 }
431 431
432 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint newRegionEndPoint, uint locationID, uint flags) 432 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint newRegionEndPoint, uint locationID, uint flags)
433 { 433 {
434 TeleportFinishPacket teleport = new TeleportFinishPacket(); 434 TeleportFinishPacket teleport = new TeleportFinishPacket();
435 teleport.Info.AgentID = this.AgentID; 435 teleport.Info.AgentID = this.AgentID;
436 teleport.Info.RegionHandle = regionHandle; 436 teleport.Info.RegionHandle = regionHandle;
437 teleport.Info.SimAccess = simAccess; 437 teleport.Info.SimAccess = simAccess;
438 teleport.Info.SeedCapability = new byte[0]; 438 teleport.Info.SeedCapability = new byte[0];
439 439
440 IPAddress oIP = newRegionEndPoint.Address; 440 IPAddress oIP = newRegionEndPoint.Address;
441 byte[] byteIP = oIP.GetAddressBytes(); 441 byte[] byteIP = oIP.GetAddressBytes();
442 uint ip = (uint)byteIP[3] << 24; 442 uint ip = (uint)byteIP[3] << 24;
443 ip += (uint)byteIP[2] << 16; 443 ip += (uint)byteIP[2] << 16;
444 ip += (uint)byteIP[1] << 8; 444 ip += (uint)byteIP[1] << 8;
445 ip += (uint)byteIP[0]; 445 ip += (uint)byteIP[0];
446 446
447 teleport.Info.SimIP = ip; 447 teleport.Info.SimIP = ip;
448 teleport.Info.SimPort = (ushort)newRegionEndPoint.Port; 448 teleport.Info.SimPort = (ushort)newRegionEndPoint.Port;
449 teleport.Info.LocationID = 4; 449 teleport.Info.LocationID = 4;
450 teleport.Info.TeleportFlags = 1 << 4; 450 teleport.Info.TeleportFlags = 1 << 4;
451 OutPacket(teleport); 451 OutPacket(teleport);
452 } 452 }
453 453
454 /// <summary> 454 /// <summary>
455 /// 455 ///
456 /// </summary> 456 /// </summary>
457 public void SendTeleportCancel() 457 public void SendTeleportCancel()
458 { 458 {
459 TeleportCancelPacket tpCancel = new TeleportCancelPacket(); 459 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
460 tpCancel.Info.SessionID = this.SessionID; 460 tpCancel.Info.SessionID = this.SessionID;
461 tpCancel.Info.AgentID = this.AgentID; 461 tpCancel.Info.AgentID = this.AgentID;
462 462
463 OutPacket(tpCancel); 463 OutPacket(tpCancel);
464 } 464 }
465 465
466 /// <summary> 466 /// <summary>
467 /// 467 ///
468 /// </summary> 468 /// </summary>
469 public void SendTeleportLocationStart() 469 public void SendTeleportLocationStart()
470 { 470 {
471 TeleportStartPacket tpStart = new TeleportStartPacket(); 471 TeleportStartPacket tpStart = new TeleportStartPacket();
472 tpStart.Info.TeleportFlags = 16; // Teleport via location 472 tpStart.Info.TeleportFlags = 16; // Teleport via location
473 OutPacket(tpStart); 473 OutPacket(tpStart);
474 } 474 }
475 475
476 public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) 476 public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance)
477 { 477 {
478 MoneyBalanceReplyPacket money = new MoneyBalanceReplyPacket(); 478 MoneyBalanceReplyPacket money = new MoneyBalanceReplyPacket();
479 money.MoneyData.AgentID = this.AgentID; 479 money.MoneyData.AgentID = this.AgentID;
480 money.MoneyData.TransactionID = transaction; 480 money.MoneyData.TransactionID = transaction;
481 money.MoneyData.TransactionSuccess = success; 481 money.MoneyData.TransactionSuccess = success;
482 money.MoneyData.Description = description; 482 money.MoneyData.Description = description;
483 money.MoneyData.MoneyBalance = balance; 483 money.MoneyData.MoneyBalance = balance;
484 OutPacket(money); 484 OutPacket(money);
485 } 485 }
486 486
487 public void SendStartPingCheck(byte seq) 487 public void SendStartPingCheck(byte seq)
488 { 488 {
489 StartPingCheckPacket pc = new StartPingCheckPacket(); 489 StartPingCheckPacket pc = new StartPingCheckPacket();
490 pc.PingID.PingID = seq; 490 pc.PingID.PingID = seq;
491 OutPacket(pc); 491 OutPacket(pc);
492 } 492 }
493 493
494 public void SendKillObject(ulong regionHandle, uint avatarLocalID) 494 public void SendKillObject(ulong regionHandle, uint avatarLocalID)
495 { 495 {
496 KillObjectPacket kill = new KillObjectPacket(); 496 KillObjectPacket kill = new KillObjectPacket();
497 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; 497 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
498 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock(); 498 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
499 kill.ObjectData[0].ID = avatarLocalID; 499 kill.ObjectData[0].ID = avatarLocalID;
500 OutPacket(kill); 500 OutPacket(kill);
501 } 501 }
502 502
503 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) 503 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items)
504 { 504 {
505 Encoding enc = Encoding.ASCII; 505 Encoding enc = Encoding.ASCII;
506 uint FULL_MASK_PERMISSIONS = 2147483647; 506 uint FULL_MASK_PERMISSIONS = 2147483647;
507 InventoryDescendentsPacket descend = new InventoryDescendentsPacket(); 507 InventoryDescendentsPacket descend = new InventoryDescendentsPacket();
508 descend.AgentData.AgentID = this.AgentId; 508 descend.AgentData.AgentID = this.AgentId;
509 descend.AgentData.OwnerID = ownerID; 509 descend.AgentData.OwnerID = ownerID;
510 descend.AgentData.FolderID = folderID; 510 descend.AgentData.FolderID = folderID;
511 descend.AgentData.Descendents = items.Count; 511 descend.AgentData.Descendents = items.Count;
512 descend.AgentData.Version = 0; 512 descend.AgentData.Version = 0;
513 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; 513 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count];
514 int i = 0; 514 int i = 0;
515 foreach (InventoryItemBase item in items) 515 foreach (InventoryItemBase item in items)
516 { 516 {
517 descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock(); 517 descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock();
518 descend.ItemData[i].ItemID = item.inventoryID; 518 descend.ItemData[i].ItemID = item.inventoryID;
519 descend.ItemData[i].AssetID = item.assetID; 519 descend.ItemData[i].AssetID = item.assetID;
520 descend.ItemData[i].CreatorID = item.creatorsID; 520 descend.ItemData[i].CreatorID = item.creatorsID;
521 descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS; 521 descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS;
522 descend.ItemData[i].CreationDate = 1000; 522 descend.ItemData[i].CreationDate = 1000;
523 descend.ItemData[i].Description = enc.GetBytes(item.inventoryDescription+ "\0"); 523 descend.ItemData[i].Description = enc.GetBytes(item.inventoryDescription+ "\0");
524 descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS; 524 descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS;
525 descend.ItemData[i].Flags = 1; 525 descend.ItemData[i].Flags = 1;
526 descend.ItemData[i].FolderID = item.parentFolderID; 526 descend.ItemData[i].FolderID = item.parentFolderID;
527 descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 527 descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
528 descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS; 528 descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS;
529 descend.ItemData[i].InvType = (sbyte)item.type; 529 descend.ItemData[i].InvType = (sbyte)item.type;
530 descend.ItemData[i].Name = enc.GetBytes(item.inventoryName+ "\0"); 530 descend.ItemData[i].Name = enc.GetBytes(item.inventoryName+ "\0");
531 descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS; 531 descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS;
532 descend.ItemData[i].OwnerID = item.avatarID; 532 descend.ItemData[i].OwnerID = item.avatarID;
533 descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS; 533 descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS;
534 descend.ItemData[i].SalePrice = 0; 534 descend.ItemData[i].SalePrice = 0;
535 descend.ItemData[i].SaleType = 0; 535 descend.ItemData[i].SaleType = 0;
536 descend.ItemData[i].Type = (sbyte)item.type; 536 descend.ItemData[i].Type = (sbyte)item.type;
537 descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, descend.ItemData[i].InvType, descend.ItemData[i].Type, descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, 100,descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 537 descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, descend.ItemData[i].InvType, descend.ItemData[i].Type, descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, 100,descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
538 538
539 i++; 539 i++;
540 } 540 }
541 541
542 this.OutPacket(descend); 542 this.OutPacket(descend);
543 543
544 } 544 }
545 545
546 public void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item) 546 public void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item)
547 { 547 {
548 Encoding enc = Encoding.ASCII; 548 Encoding enc = Encoding.ASCII;
549 uint FULL_MASK_PERMISSIONS = 2147483647; 549 uint FULL_MASK_PERMISSIONS = 2147483647;
550 FetchInventoryReplyPacket inventoryReply = new FetchInventoryReplyPacket(); 550 FetchInventoryReplyPacket inventoryReply = new FetchInventoryReplyPacket();
551 inventoryReply.AgentData.AgentID = this.AgentId; 551 inventoryReply.AgentData.AgentID = this.AgentId;
552 inventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1]; 552 inventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1];
553 inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock(); 553 inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock();
554 inventoryReply.InventoryData[0].ItemID = item.inventoryID; 554 inventoryReply.InventoryData[0].ItemID = item.inventoryID;
555 inventoryReply.InventoryData[0].AssetID = item.assetID; 555 inventoryReply.InventoryData[0].AssetID = item.assetID;
556 inventoryReply.InventoryData[0].CreatorID = item.creatorsID; 556 inventoryReply.InventoryData[0].CreatorID = item.creatorsID;
557 inventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS; 557 inventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
558 inventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 558 inventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
559 inventoryReply.InventoryData[0].Description = enc.GetBytes(item.inventoryDescription + "\0"); 559 inventoryReply.InventoryData[0].Description = enc.GetBytes(item.inventoryDescription + "\0");
560 inventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; 560 inventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
561 inventoryReply.InventoryData[0].Flags = 0; 561 inventoryReply.InventoryData[0].Flags = 0;
562 inventoryReply.InventoryData[0].FolderID = item.parentFolderID; 562 inventoryReply.InventoryData[0].FolderID = item.parentFolderID;
563 inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 563 inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
564 inventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; 564 inventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
565 inventoryReply.InventoryData[0].InvType = (sbyte)item.type; 565 inventoryReply.InventoryData[0].InvType = (sbyte)item.type;
566 inventoryReply.InventoryData[0].Name = enc.GetBytes(item.inventoryName + "\0"); 566 inventoryReply.InventoryData[0].Name = enc.GetBytes(item.inventoryName + "\0");
567 inventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS; 567 inventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
568 inventoryReply.InventoryData[0].OwnerID = item.avatarID; 568 inventoryReply.InventoryData[0].OwnerID = item.avatarID;
569 inventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS; 569 inventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
570 inventoryReply.InventoryData[0].SalePrice = 0; 570 inventoryReply.InventoryData[0].SalePrice = 0;
571 inventoryReply.InventoryData[0].SaleType = 0; 571 inventoryReply.InventoryData[0].SaleType = 0;
572 inventoryReply.InventoryData[0].Type = (sbyte)item.type; 572 inventoryReply.InventoryData[0].Type = (sbyte)item.type;
573 inventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, inventoryReply.InventoryData[0].GroupID, 100, inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID, inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 573 inventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, inventoryReply.InventoryData[0].GroupID, 100, inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID, inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
574 574
575 this.OutPacket(inventoryReply); 575 this.OutPacket(inventoryReply);
576 } 576 }
577 577
578 #region Appearance/ Wearables Methods 578 #region Appearance/ Wearables Methods
579 579
580 /// <summary> 580 /// <summary>
581 /// 581 ///
582 /// </summary> 582 /// </summary>
583 /// <param name="wearables"></param> 583 /// <param name="wearables"></param>
584 public void SendWearables(AvatarWearable[] wearables) 584 public void SendWearables(AvatarWearable[] wearables)
585 { 585 {
586 AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); 586 AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
587 aw.AgentData.AgentID = this.AgentID; 587 aw.AgentData.AgentID = this.AgentID;
588 aw.AgentData.SerialNum = 0; 588 aw.AgentData.SerialNum = 0;
589 aw.AgentData.SessionID = this.SessionID; 589 aw.AgentData.SessionID = this.SessionID;
590 590
591 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; 591 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
592 AgentWearablesUpdatePacket.WearableDataBlock awb; 592 AgentWearablesUpdatePacket.WearableDataBlock awb;
593 for (int i = 0; i < wearables.Length; i++) 593 for (int i = 0; i < wearables.Length; i++)
594 { 594 {
595 awb = new AgentWearablesUpdatePacket.WearableDataBlock(); 595 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
596 awb.WearableType = (byte)i; 596 awb.WearableType = (byte)i;
597 awb.AssetID = wearables[i].AssetID; 597 awb.AssetID = wearables[i].AssetID;
598 awb.ItemID = wearables[i].ItemID; 598 awb.ItemID = wearables[i].ItemID;
599 aw.WearableData[i] = awb; 599 aw.WearableData[i] = awb;
600 } 600 }
601 601
602 this.OutPacket(aw); 602 this.OutPacket(aw);
603 } 603 }
604 604
605 /// <summary> 605 /// <summary>
606 /// 606 ///
607 /// </summary> 607 /// </summary>
608 /// <param name="agentID"></param> 608 /// <param name="agentID"></param>
609 /// <param name="visualParams"></param> 609 /// <param name="visualParams"></param>
610 /// <param name="textureEntry"></param> 610 /// <param name="textureEntry"></param>
611 public void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) 611 public void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry)
612 { 612 {
613 AvatarAppearancePacket avp = new AvatarAppearancePacket(); 613 AvatarAppearancePacket avp = new AvatarAppearancePacket();
614 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; 614 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
615 avp.ObjectData.TextureEntry = textureEntry; 615 avp.ObjectData.TextureEntry = textureEntry;
616 616
617 AvatarAppearancePacket.VisualParamBlock avblock = null; 617 AvatarAppearancePacket.VisualParamBlock avblock = null;
618 for (int i = 0; i < visualParams.Length; i++) 618 for (int i = 0; i < visualParams.Length; i++)
619 { 619 {
620 avblock = new AvatarAppearancePacket.VisualParamBlock(); 620 avblock = new AvatarAppearancePacket.VisualParamBlock();
621 avblock.ParamValue = visualParams[i]; 621 avblock.ParamValue = visualParams[i];
622 avp.VisualParam[i] = avblock; 622 avp.VisualParam[i] = avblock;
623 } 623 }
624 624
625 avp.Sender.IsTrial = false; 625 avp.Sender.IsTrial = false;
626 avp.Sender.ID = agentID; 626 avp.Sender.ID = agentID;
627 OutPacket(avp); 627 OutPacket(avp);
628 } 628 }
629 629
630 public void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) 630 public void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId)
631 { 631 {
632 AvatarAnimationPacket ani = new AvatarAnimationPacket(); 632 AvatarAnimationPacket ani = new AvatarAnimationPacket();
633 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1]; 633 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
634 ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock(); 634 ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock();
635 ani.AnimationSourceList[0].ObjectID = sourceAgentId; 635 ani.AnimationSourceList[0].ObjectID = sourceAgentId;
636 ani.Sender = new AvatarAnimationPacket.SenderBlock(); 636 ani.Sender = new AvatarAnimationPacket.SenderBlock();
637 ani.Sender.ID = sourceAgentId; 637 ani.Sender.ID = sourceAgentId;
638 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1]; 638 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
639 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock(); 639 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
640 ani.AnimationList[0].AnimID = animID; 640 ani.AnimationList[0].AnimID = animID;
641 ani.AnimationList[0].AnimSequenceID = seq; 641 ani.AnimationList[0].AnimSequenceID = seq;
642 this.OutPacket(ani); 642 this.OutPacket(ani);
643 } 643 }
644 644
645 #endregion 645 #endregion
646 646
647 #region Avatar Packet/data sending Methods 647 #region Avatar Packet/data sending Methods
648 648
649 /// <summary> 649 /// <summary>
650 /// send a objectupdate packet with information about the clients avatar 650 /// send a objectupdate packet with information about the clients avatar
651 /// </summary> 651 /// </summary>
652 /// <param name="regionInfo"></param> 652 /// <param name="regionInfo"></param>
653 /// <param name="firstName"></param> 653 /// <param name="firstName"></param>
654 /// <param name="lastName"></param> 654 /// <param name="lastName"></param>
655 /// <param name="avatarID"></param> 655 /// <param name="avatarID"></param>
656 /// <param name="avatarLocalID"></param> 656 /// <param name="avatarLocalID"></param>
657 /// <param name="Pos"></param> 657 /// <param name="Pos"></param>
658 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) 658 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry)
659 { 659 {
660 ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); 660 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
661 objupdate.RegionData.RegionHandle = regionHandle; 661 objupdate.RegionData.RegionHandle = regionHandle;
662 objupdate.RegionData.TimeDilation = 64096; 662 objupdate.RegionData.TimeDilation = 64096;
663 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 663 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
664 objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry); 664 objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry);
665 665
666 //give this avatar object a local id and assign the user a name 666 //give this avatar object a local id and assign the user a name
667 objupdate.ObjectData[0].ID = avatarLocalID; 667 objupdate.ObjectData[0].ID = avatarLocalID;
668 objupdate.ObjectData[0].FullID = avatarID; 668 objupdate.ObjectData[0].FullID = avatarID;
669 objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName ); 669 objupdate.ObjectData[0].NameValue = Helpers.StringToField("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName );
670 LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z); 670 LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
671 byte[] pb = pos2.GetBytes(); 671 byte[] pb = pos2.GetBytes();
672 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); 672 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
673 673
674 OutPacket(objupdate); 674 OutPacket(objupdate);
675 675
676 } 676 }
677 677
678 /// <summary> 678 /// <summary>
679 /// 679 ///
680 /// </summary> 680 /// </summary>
681 /// <param name="regionHandle"></param> 681 /// <param name="regionHandle"></param>
682 /// <param name="timeDilation"></param> 682 /// <param name="timeDilation"></param>
683 /// <param name="localID"></param> 683 /// <param name="localID"></param>
684 /// <param name="position"></param> 684 /// <param name="position"></param>
685 /// <param name="velocity"></param> 685 /// <param name="velocity"></param>
686 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity) 686 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity)
687 { 687 {
688 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = this.CreateAvatarImprovedBlock(localID, position, velocity); 688 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = this.CreateAvatarImprovedBlock(localID, position, velocity);
689 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); 689 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
690 terse.RegionData.RegionHandle = regionHandle; 690 terse.RegionData.RegionHandle = regionHandle;
691 terse.RegionData.TimeDilation = timeDilation; 691 terse.RegionData.TimeDilation = timeDilation;
692 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; 692 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
693 terse.ObjectData[0] = terseBlock; 693 terse.ObjectData[0] = terseBlock;
694 694
695 this.OutPacket(terse); 695 this.OutPacket(terse);
696 } 696 }
697 697
698 #endregion 698 #endregion
699 699
700 #region Primitive Packet/data Sending Methods 700 #region Primitive Packet/data Sending Methods
701 701
702 /// <summary> 702 /// <summary>
703 /// 703 ///
704 /// </summary> 704 /// </summary>
705 /// <param name="localID"></param> 705 /// <param name="localID"></param>
706 /// <param name="rotation"></param> 706 /// <param name="rotation"></param>
707 /// <param name="attachPoint"></param> 707 /// <param name="attachPoint"></param>
708 public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 708 public void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint)
709 { 709 {
710 ObjectAttachPacket attach = new ObjectAttachPacket(); 710 ObjectAttachPacket attach = new ObjectAttachPacket();
711 attach.AgentData.AgentID = this.AgentID; 711 attach.AgentData.AgentID = this.AgentID;
712 attach.AgentData.SessionID = this.SessionID; 712 attach.AgentData.SessionID = this.SessionID;
713 attach.AgentData.AttachmentPoint = attachPoint; 713 attach.AgentData.AttachmentPoint = attachPoint;
714 attach.ObjectData = new ObjectAttachPacket.ObjectDataBlock[1]; 714 attach.ObjectData = new ObjectAttachPacket.ObjectDataBlock[1];
715 attach.ObjectData[0] = new ObjectAttachPacket.ObjectDataBlock(); 715 attach.ObjectData[0] = new ObjectAttachPacket.ObjectDataBlock();
716 attach.ObjectData[0].ObjectLocalID = localID; 716 attach.ObjectData[0].ObjectLocalID = localID;
717 attach.ObjectData[0].Rotation = rotation; 717 attach.ObjectData[0].Rotation = rotation;
718 718
719 this.OutPacket(attach); 719 this.OutPacket(attach);
720 } 720 }
721 721
722 /// <summary> 722 /// <summary>
723 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive 723 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
724 /// or big changes to a existing primitive. 724 /// or big changes to a existing primitive.
725 /// </summary> 725 /// </summary>
726 /// <param name="regionHandle"></param> 726 /// <param name="regionHandle"></param>
727 /// <param name="timeDilation"></param> 727 /// <param name="timeDilation"></param>
728 /// <param name="localID"></param> 728 /// <param name="localID"></param>
729 /// <param name="primData"></param> 729 /// <param name="primData"></param>
730 /// <param name="pos"></param> 730 /// <param name="pos"></param>
731 /// <param name="rotation"></param> 731 /// <param name="rotation"></param>
732 /// <param name="textureID"></param> 732 /// <param name="textureID"></param>
733 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags) 733 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags)
734 { 734 {
735 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 735 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
736 outPacket.RegionData.RegionHandle = regionHandle; 736 outPacket.RegionData.RegionHandle = regionHandle;
737 outPacket.RegionData.TimeDilation = timeDilation; 737 outPacket.RegionData.TimeDilation = timeDilation;
738 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 738 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
739 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags); 739 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
740 outPacket.ObjectData[0].ID = localID; 740 outPacket.ObjectData[0].ID = localID;
741 outPacket.ObjectData[0].FullID = primData.FullID; 741 outPacket.ObjectData[0].FullID = primData.FullID;
742 byte[] pb = pos.GetBytes(); 742 byte[] pb = pos.GetBytes();
743 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 743 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
744 byte[] rot = rotation.GetBytes(); 744 byte[] rot = rotation.GetBytes();
745 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length); 745 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length);
746 OutPacket(outPacket); 746 OutPacket(outPacket);
747 } 747 }
748 748
749 /// <summary> 749 /// <summary>
750 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive 750 /// Sends a full ObjectUpdatePacket to a client to inform it of a new primitive
751 /// or big changes to a existing primitive. 751 /// or big changes to a existing primitive.
752 /// Uses default rotation 752 /// Uses default rotation
753 /// </summary> 753 /// </summary>
754 /// <param name="primData"></param> 754 /// <param name="primData"></param>
755 /// <param name="pos"></param> 755 /// <param name="pos"></param>
756 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags) 756 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags)
757 { 757 {
758 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 758 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
759 outPacket.RegionData.RegionHandle = regionHandle; 759 outPacket.RegionData.RegionHandle = regionHandle;
760 outPacket.RegionData.TimeDilation = timeDilation; 760 outPacket.RegionData.TimeDilation = timeDilation;
761 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 761 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
762 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags); 762 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
763 outPacket.ObjectData[0].ID = localID; 763 outPacket.ObjectData[0].ID = localID;
764 outPacket.ObjectData[0].FullID = primData.FullID; 764 outPacket.ObjectData[0].FullID = primData.FullID;
765 byte[] pb = pos.GetBytes(); 765 byte[] pb = pos.GetBytes();
766 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 766 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
767 767
768 OutPacket(outPacket); 768 OutPacket(outPacket);
769 } 769 }
770 770
771 771
772 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) 772 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID)
773 { 773 {
774 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 774 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
775 outPacket.RegionData.RegionHandle = regionHandle; 775 outPacket.RegionData.RegionHandle = regionHandle;
776 outPacket.RegionData.TimeDilation = timeDilation; 776 outPacket.RegionData.TimeDilation = timeDilation;
777 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 777 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
778 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); 778 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags);
779 outPacket.ObjectData[0].ID = localID; 779 outPacket.ObjectData[0].ID = localID;
780 outPacket.ObjectData[0].FullID = objectID; 780 outPacket.ObjectData[0].FullID = objectID;
781 outPacket.ObjectData[0].OwnerID = ownerID; 781 outPacket.ObjectData[0].OwnerID = ownerID;
782 outPacket.ObjectData[0].Text = enc.GetBytes(text); 782 outPacket.ObjectData[0].Text = enc.GetBytes(text);
783 outPacket.ObjectData[0].ParentID = parentID; 783 outPacket.ObjectData[0].ParentID = parentID;
784 byte[] pb = pos.GetBytes(); 784 byte[] pb = pos.GetBytes();
785 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 785 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
786 byte[] rot = rotation.GetBytes(); 786 byte[] rot = rotation.GetBytes();
787 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length); 787 Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length);
788 OutPacket(outPacket); 788 OutPacket(outPacket);
789 } 789 }
790 790
791 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) 791 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID)
792 { 792 {
793 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 793 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
794 outPacket.RegionData.RegionHandle = regionHandle; 794 outPacket.RegionData.RegionHandle = regionHandle;
795 outPacket.RegionData.TimeDilation = timeDilation; 795 outPacket.RegionData.TimeDilation = timeDilation;
796 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 796 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
797 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags); 797 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primShape, flags);
798 outPacket.ObjectData[0].ID = localID; 798 outPacket.ObjectData[0].ID = localID;
799 outPacket.ObjectData[0].FullID = objectID; 799 outPacket.ObjectData[0].FullID = objectID;
800 outPacket.ObjectData[0].OwnerID = ownerID; 800 outPacket.ObjectData[0].OwnerID = ownerID;
801 outPacket.ObjectData[0].Text = enc.GetBytes(text); 801 outPacket.ObjectData[0].Text = enc.GetBytes(text);
802 outPacket.ObjectData[0].ParentID = parentID; 802 outPacket.ObjectData[0].ParentID = parentID;
803 byte[] pb = pos.GetBytes(); 803 byte[] pb = pos.GetBytes();
804 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length); 804 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
805 805
806 OutPacket(outPacket); 806 OutPacket(outPacket);
807 } 807 }
808 /// <summary> 808 /// <summary>
809 /// 809 ///
810 /// </summary> 810 /// </summary>
811 /// <param name="regionHandle"></param> 811 /// <param name="regionHandle"></param>
812 /// <param name="timeDilation"></param> 812 /// <param name="timeDilation"></param>
813 /// <param name="localID"></param> 813 /// <param name="localID"></param>
814 /// <param name="position"></param> 814 /// <param name="position"></param>
815 /// <param name="rotation"></param> 815 /// <param name="rotation"></param>
816 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation) 816 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation)
817 { 817 {
818 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); 818 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
819 terse.RegionData.RegionHandle = regionHandle; 819 terse.RegionData.RegionHandle = regionHandle;
820 terse.RegionData.TimeDilation = timeDilation; 820 terse.RegionData.TimeDilation = timeDilation;
821 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; 821 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
822 terse.ObjectData[0] = this.CreatePrimImprovedBlock(localID, position, rotation); 822 terse.ObjectData[0] = this.CreatePrimImprovedBlock(localID, position, rotation);
823 823
824 this.OutPacket(terse); 824 this.OutPacket(terse);
825 } 825 }
826 826
827 #endregion 827 #endregion
828 828
829 #endregion 829 #endregion
830 830
831 #region Helper Methods 831 #region Helper Methods
832 832
833 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, LLVector3 velocity) 833 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateAvatarImprovedBlock(uint localID, LLVector3 pos, LLVector3 velocity)
834 { 834 {
835 byte[] bytes = new byte[60]; 835 byte[] bytes = new byte[60];
836 int i = 0; 836 int i = 0;
837 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); 837 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
838 838
839 dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry; 839 dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry;
840 840
841 uint ID = localID; 841 uint ID = localID;
842 842
843 bytes[i++] = (byte)(ID % 256); 843 bytes[i++] = (byte)(ID % 256);
844 bytes[i++] = (byte)((ID >> 8) % 256); 844 bytes[i++] = (byte)((ID >> 8) % 256);
845 bytes[i++] = (byte)((ID >> 16) % 256); 845 bytes[i++] = (byte)((ID >> 16) % 256);
846 bytes[i++] = (byte)((ID >> 24) % 256); 846 bytes[i++] = (byte)((ID >> 24) % 256);
847 bytes[i++] = 0; 847 bytes[i++] = 0;
848 bytes[i++] = 1; 848 bytes[i++] = 1;
849 i += 14; 849 i += 14;
850 bytes[i++] = 128; 850 bytes[i++] = 128;
851 bytes[i++] = 63; 851 bytes[i++] = 63;
852 852
853 byte[] pb = pos.GetBytes(); 853 byte[] pb = pos.GetBytes();
854 Array.Copy(pb, 0, bytes, i, pb.Length); 854 Array.Copy(pb, 0, bytes, i, pb.Length);
855 i += 12; 855 i += 12;
856 ushort InternVelocityX; 856 ushort InternVelocityX;
857 ushort InternVelocityY; 857 ushort InternVelocityY;
858 ushort InternVelocityZ; 858 ushort InternVelocityZ;
859 Vector3 internDirec = new Vector3(0, 0, 0); 859 Vector3 internDirec = new Vector3(0, 0, 0);
860 860
861 internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z); 861 internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z);
862 862
863 internDirec = internDirec / 128.0f; 863 internDirec = internDirec / 128.0f;
864 internDirec.x += 1; 864 internDirec.x += 1;
865 internDirec.y += 1; 865 internDirec.y += 1;
866 internDirec.z += 1; 866 internDirec.z += 1;
867 867
868 InternVelocityX = (ushort)(32768 * internDirec.x); 868 InternVelocityX = (ushort)(32768 * internDirec.x);
869 InternVelocityY = (ushort)(32768 * internDirec.y); 869 InternVelocityY = (ushort)(32768 * internDirec.y);
870 InternVelocityZ = (ushort)(32768 * internDirec.z); 870 InternVelocityZ = (ushort)(32768 * internDirec.z);
871 871
872 ushort ac = 32767; 872 ushort ac = 32767;
873 bytes[i++] = (byte)(InternVelocityX % 256); 873 bytes[i++] = (byte)(InternVelocityX % 256);
874 bytes[i++] = (byte)((InternVelocityX >> 8) % 256); 874 bytes[i++] = (byte)((InternVelocityX >> 8) % 256);
875 bytes[i++] = (byte)(InternVelocityY % 256); 875 bytes[i++] = (byte)(InternVelocityY % 256);
876 bytes[i++] = (byte)((InternVelocityY >> 8) % 256); 876 bytes[i++] = (byte)((InternVelocityY >> 8) % 256);
877 bytes[i++] = (byte)(InternVelocityZ % 256); 877 bytes[i++] = (byte)(InternVelocityZ % 256);
878 bytes[i++] = (byte)((InternVelocityZ >> 8) % 256); 878 bytes[i++] = (byte)((InternVelocityZ >> 8) % 256);
879 879
880 //accel 880 //accel
881 bytes[i++] = (byte)(ac % 256); 881 bytes[i++] = (byte)(ac % 256);
882 bytes[i++] = (byte)((ac >> 8) % 256); 882 bytes[i++] = (byte)((ac >> 8) % 256);
883 bytes[i++] = (byte)(ac % 256); 883 bytes[i++] = (byte)(ac % 256);
884 bytes[i++] = (byte)((ac >> 8) % 256); 884 bytes[i++] = (byte)((ac >> 8) % 256);
885 bytes[i++] = (byte)(ac % 256); 885 bytes[i++] = (byte)(ac % 256);
886 bytes[i++] = (byte)((ac >> 8) % 256); 886 bytes[i++] = (byte)((ac >> 8) % 256);
887 887
888 //rot 888 //rot
889 bytes[i++] = (byte)(ac % 256); 889 bytes[i++] = (byte)(ac % 256);
890 bytes[i++] = (byte)((ac >> 8) % 256); 890 bytes[i++] = (byte)((ac >> 8) % 256);
891 bytes[i++] = (byte)(ac % 256); 891 bytes[i++] = (byte)(ac % 256);
892 bytes[i++] = (byte)((ac >> 8) % 256); 892 bytes[i++] = (byte)((ac >> 8) % 256);
893 bytes[i++] = (byte)(ac % 256); 893 bytes[i++] = (byte)(ac % 256);
894 bytes[i++] = (byte)((ac >> 8) % 256); 894 bytes[i++] = (byte)((ac >> 8) % 256);
895 bytes[i++] = (byte)(ac % 256); 895 bytes[i++] = (byte)(ac % 256);
896 bytes[i++] = (byte)((ac >> 8) % 256); 896 bytes[i++] = (byte)((ac >> 8) % 256);
897 897
898 //rotation vel 898 //rotation vel
899 bytes[i++] = (byte)(ac % 256); 899 bytes[i++] = (byte)(ac % 256);
900 bytes[i++] = (byte)((ac >> 8) % 256); 900 bytes[i++] = (byte)((ac >> 8) % 256);
901 bytes[i++] = (byte)(ac % 256); 901 bytes[i++] = (byte)(ac % 256);
902 bytes[i++] = (byte)((ac >> 8) % 256); 902 bytes[i++] = (byte)((ac >> 8) % 256);
903 bytes[i++] = (byte)(ac % 256); 903 bytes[i++] = (byte)(ac % 256);
904 bytes[i++] = (byte)((ac >> 8) % 256); 904 bytes[i++] = (byte)((ac >> 8) % 256);
905 905
906 dat.Data = bytes; 906 dat.Data = bytes;
907 return (dat); 907 return (dat);
908 } 908 }
909 909
910 /// <summary> 910 /// <summary>
911 /// 911 ///
912 /// </summary> 912 /// </summary>
913 /// <param name="localID"></param> 913 /// <param name="localID"></param>
914 /// <param name="position"></param> 914 /// <param name="position"></param>
915 /// <param name="rotation"></param> 915 /// <param name="rotation"></param>
916 /// <returns></returns> 916 /// <returns></returns>
917 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, LLVector3 position, LLQuaternion rotation) 917 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, LLVector3 position, LLQuaternion rotation)
918 { 918 {
919 uint ID = localID; 919 uint ID = localID;
920 byte[] bytes = new byte[60]; 920 byte[] bytes = new byte[60];
921 921
922 int i = 0; 922 int i = 0;
923 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); 923 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
924 dat.TextureEntry = new byte[0]; 924 dat.TextureEntry = new byte[0];
925 bytes[i++] = (byte)(ID % 256); 925 bytes[i++] = (byte)(ID % 256);
926 bytes[i++] = (byte)((ID >> 8) % 256); 926 bytes[i++] = (byte)((ID >> 8) % 256);
927 bytes[i++] = (byte)((ID >> 16) % 256); 927 bytes[i++] = (byte)((ID >> 16) % 256);
928 bytes[i++] = (byte)((ID >> 24) % 256); 928 bytes[i++] = (byte)((ID >> 24) % 256);
929 bytes[i++] = 0; 929 bytes[i++] = 0;
930 bytes[i++] = 0; 930 bytes[i++] = 0;
931 931
932 byte[] pb = position.GetBytes(); 932 byte[] pb = position.GetBytes();
933 Array.Copy(pb, 0, bytes, i, pb.Length); 933 Array.Copy(pb, 0, bytes, i, pb.Length);
934 i += 12; 934 i += 12;
935 ushort ac = 32767; 935 ushort ac = 32767;
936 936
937 //vel 937 //vel
938 bytes[i++] = (byte)(ac % 256); 938 bytes[i++] = (byte)(ac % 256);
939 bytes[i++] = (byte)((ac >> 8) % 256); 939 bytes[i++] = (byte)((ac >> 8) % 256);
940 bytes[i++] = (byte)(ac % 256); 940 bytes[i++] = (byte)(ac % 256);
941 bytes[i++] = (byte)((ac >> 8) % 256); 941 bytes[i++] = (byte)((ac >> 8) % 256);
942 bytes[i++] = (byte)(ac % 256); 942 bytes[i++] = (byte)(ac % 256);
943 bytes[i++] = (byte)((ac >> 8) % 256); 943 bytes[i++] = (byte)((ac >> 8) % 256);
944 944
945 //accel 945 //accel
946 bytes[i++] = (byte)(ac % 256); 946 bytes[i++] = (byte)(ac % 256);
947 bytes[i++] = (byte)((ac >> 8) % 256); 947 bytes[i++] = (byte)((ac >> 8) % 256);
948 bytes[i++] = (byte)(ac % 256); 948 bytes[i++] = (byte)(ac % 256);
949 bytes[i++] = (byte)((ac >> 8) % 256); 949 bytes[i++] = (byte)((ac >> 8) % 256);
950 bytes[i++] = (byte)(ac % 256); 950 bytes[i++] = (byte)(ac % 256);
951 bytes[i++] = (byte)((ac >> 8) % 256); 951 bytes[i++] = (byte)((ac >> 8) % 256);
952 952
953 ushort rw, rx, ry, rz; 953 ushort rw, rx, ry, rz;
954 rw = (ushort)(32768 * (rotation.W + 1)); 954 rw = (ushort)(32768 * (rotation.W + 1));
955 rx = (ushort)(32768 * (rotation.X + 1)); 955 rx = (ushort)(32768 * (rotation.X + 1));
956 ry = (ushort)(32768 * (rotation.Y + 1)); 956 ry = (ushort)(32768 * (rotation.Y + 1));
957 rz = (ushort)(32768 * (rotation.Z + 1)); 957 rz = (ushort)(32768 * (rotation.Z + 1));
958 958
959 //rot 959 //rot
960 bytes[i++] = (byte)(rx % 256); 960 bytes[i++] = (byte)(rx % 256);
961 bytes[i++] = (byte)((rx >> 8) % 256); 961 bytes[i++] = (byte)((rx >> 8) % 256);
962 bytes[i++] = (byte)(ry % 256); 962 bytes[i++] = (byte)(ry % 256);
963 bytes[i++] = (byte)((ry >> 8) % 256); 963 bytes[i++] = (byte)((ry >> 8) % 256);
964 bytes[i++] = (byte)(rz % 256); 964 bytes[i++] = (byte)(rz % 256);
965 bytes[i++] = (byte)((rz >> 8) % 256); 965 bytes[i++] = (byte)((rz >> 8) % 256);
966 bytes[i++] = (byte)(rw % 256); 966 bytes[i++] = (byte)(rw % 256);
967 bytes[i++] = (byte)((rw >> 8) % 256); 967 bytes[i++] = (byte)((rw >> 8) % 256);
968 968
969 //rotation vel 969 //rotation vel
970 bytes[i++] = (byte)(ac % 256); 970 bytes[i++] = (byte)(ac % 256);
971 bytes[i++] = (byte)((ac >> 8) % 256); 971 bytes[i++] = (byte)((ac >> 8) % 256);
972 bytes[i++] = (byte)(ac % 256); 972 bytes[i++] = (byte)(ac % 256);
973 bytes[i++] = (byte)((ac >> 8) % 256); 973 bytes[i++] = (byte)((ac >> 8) % 256);
974 bytes[i++] = (byte)(ac % 256); 974 bytes[i++] = (byte)(ac % 256);
975 bytes[i++] = (byte)((ac >> 8) % 256); 975 bytes[i++] = (byte)((ac >> 8) % 256);
976 976
977 dat.Data = bytes; 977 dat.Data = bytes;
978 return dat; 978 return dat;
979 } 979 }
980 980
981 981
982 /// <summary> 982 /// <summary>
983 /// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive) 983 /// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive)
984 /// </summary> 984 /// </summary>
985 /// <param name="primData"></param> 985 /// <param name="primData"></param>
986 /// <returns></returns> 986 /// <returns></returns>
987 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID, uint flags) 987 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID, uint flags)
988 { 988 {
989 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); 989 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
990 this.SetDefaultPrimPacketValues(objupdate); 990 this.SetDefaultPrimPacketValues(objupdate);
991 objupdate.UpdateFlags = flags; 991 objupdate.UpdateFlags = flags;
992 this.SetPrimPacketShapeData(objupdate, primData, textureID); 992 this.SetPrimPacketShapeData(objupdate, primData, textureID);
993 993
994 return objupdate; 994 return objupdate;
995 } 995 }
996 996
997 /// <summary> 997 /// <summary>
998 /// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive) 998 /// Create the ObjectDataBlock for a ObjectUpdatePacket (for a Primitive)
999 /// </summary> 999 /// </summary>
1000 /// <param name="primData"></param> 1000 /// <param name="primData"></param>
1001 /// <returns></returns> 1001 /// <returns></returns>
1002 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimitiveBaseShape primShape, uint flags) 1002 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimitiveBaseShape primShape, uint flags)
1003 { 1003 {
1004 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); 1004 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
1005 this.SetDefaultPrimPacketValues(objupdate); 1005 this.SetDefaultPrimPacketValues(objupdate);
1006 objupdate.UpdateFlags = flags; 1006 objupdate.UpdateFlags = flags;
1007 this.SetPrimPacketShapeData(objupdate, primShape); 1007 this.SetPrimPacketShapeData(objupdate, primShape);
1008 1008
1009 return objupdate; 1009 return objupdate;
1010 } 1010 }
1011 1011
1012 1012
1013 /// <summary> 1013 /// <summary>
1014 /// Copy the data from a PrimData object to a ObjectUpdatePacket 1014 /// Copy the data from a PrimData object to a ObjectUpdatePacket
1015 /// </summary> 1015 /// </summary>
1016 /// <param name="objectData"></param> 1016 /// <param name="objectData"></param>
1017 /// <param name="primData"></param> 1017 /// <param name="primData"></param>
1018 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimData primData, LLUUID textureID) 1018 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimData primData, LLUUID textureID)
1019 { 1019 {
1020 LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID); 1020 LLObject.TextureEntry ntex = new LLObject.TextureEntry(textureID);
1021 objectData.TextureEntry = ntex.ToBytes(); 1021 objectData.TextureEntry = ntex.ToBytes();
1022 objectData.OwnerID = primData.OwnerID; 1022 objectData.OwnerID = primData.OwnerID;
1023 objectData.ParentID = primData.ParentID; 1023 objectData.ParentID = primData.ParentID;
1024 objectData.PCode = primData.PCode; 1024 objectData.PCode = primData.PCode;
1025 objectData.PathBegin = primData.PathBegin; 1025 objectData.PathBegin = primData.PathBegin;
1026 objectData.PathEnd = primData.PathEnd; 1026 objectData.PathEnd = primData.PathEnd;
1027 objectData.PathScaleX = primData.PathScaleX; 1027 objectData.PathScaleX = primData.PathScaleX;
1028 objectData.PathScaleY = primData.PathScaleY; 1028 objectData.PathScaleY = primData.PathScaleY;
1029 objectData.PathShearX = primData.PathShearX; 1029 objectData.PathShearX = primData.PathShearX;
1030 objectData.PathShearY = primData.PathShearY; 1030 objectData.PathShearY = primData.PathShearY;
1031 objectData.PathSkew = primData.PathSkew; 1031 objectData.PathSkew = primData.PathSkew;
1032 objectData.ProfileBegin = primData.ProfileBegin; 1032 objectData.ProfileBegin = primData.ProfileBegin;
1033 objectData.ProfileEnd = primData.ProfileEnd; 1033 objectData.ProfileEnd = primData.ProfileEnd;
1034 objectData.Scale = primData.Scale; 1034 objectData.Scale = primData.Scale;
1035 objectData.PathCurve = primData.PathCurve; 1035 objectData.PathCurve = primData.PathCurve;
1036 objectData.ProfileCurve = primData.ProfileCurve; 1036 objectData.ProfileCurve = primData.ProfileCurve;
1037 objectData.ProfileHollow = primData.ProfileHollow; 1037 objectData.ProfileHollow = primData.ProfileHollow;
1038 objectData.PathRadiusOffset = primData.PathRadiusOffset; 1038 objectData.PathRadiusOffset = primData.PathRadiusOffset;
1039 objectData.PathRevolutions = primData.PathRevolutions; 1039 objectData.PathRevolutions = primData.PathRevolutions;
1040 objectData.PathTaperX = primData.PathTaperX; 1040 objectData.PathTaperX = primData.PathTaperX;
1041 objectData.PathTaperY = primData.PathTaperY; 1041 objectData.PathTaperY = primData.PathTaperY;
1042 objectData.PathTwist = primData.PathTwist; 1042 objectData.PathTwist = primData.PathTwist;
1043 objectData.PathTwistBegin = primData.PathTwistBegin; 1043 objectData.PathTwistBegin = primData.PathTwistBegin;
1044 } 1044 }
1045 1045
1046 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData) 1046 protected void SetPrimPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData, PrimitiveBaseShape primData)
1047 { 1047 {
1048 1048
1049 objectData.TextureEntry = primData.TextureEntry; 1049 objectData.TextureEntry = primData.TextureEntry;
1050 objectData.PCode = primData.PCode; 1050 objectData.PCode = primData.PCode;
1051 objectData.PathBegin = primData.PathBegin; 1051 objectData.PathBegin = primData.PathBegin;
1052 objectData.PathEnd = primData.PathEnd; 1052 objectData.PathEnd = primData.PathEnd;
1053 objectData.PathScaleX = primData.PathScaleX; 1053 objectData.PathScaleX = primData.PathScaleX;
1054 objectData.PathScaleY = primData.PathScaleY; 1054 objectData.PathScaleY = primData.PathScaleY;
1055 objectData.PathShearX = primData.PathShearX; 1055 objectData.PathShearX = primData.PathShearX;
1056 objectData.PathShearY = primData.PathShearY; 1056 objectData.PathShearY = primData.PathShearY;
1057 objectData.PathSkew = primData.PathSkew; 1057 objectData.PathSkew = primData.PathSkew;
1058 objectData.ProfileBegin = primData.ProfileBegin; 1058 objectData.ProfileBegin = primData.ProfileBegin;
1059 objectData.ProfileEnd = primData.ProfileEnd; 1059 objectData.ProfileEnd = primData.ProfileEnd;
1060 objectData.Scale = primData.Scale; 1060 objectData.Scale = primData.Scale;
1061 objectData.PathCurve = primData.PathCurve; 1061 objectData.PathCurve = primData.PathCurve;
1062 objectData.ProfileCurve = primData.ProfileCurve; 1062 objectData.ProfileCurve = primData.ProfileCurve;
1063 objectData.ProfileHollow = primData.ProfileHollow; 1063 objectData.ProfileHollow = primData.ProfileHollow;
1064 objectData.PathRadiusOffset = primData.PathRadiusOffset; 1064 objectData.PathRadiusOffset = primData.PathRadiusOffset;
1065 objectData.PathRevolutions = primData.PathRevolutions; 1065 objectData.PathRevolutions = primData.PathRevolutions;
1066 objectData.PathTaperX = primData.PathTaperX; 1066 objectData.PathTaperX = primData.PathTaperX;
1067 objectData.PathTaperY = primData.PathTaperY; 1067 objectData.PathTaperY = primData.PathTaperY;
1068 objectData.PathTwist = primData.PathTwist; 1068 objectData.PathTwist = primData.PathTwist;
1069 objectData.PathTwistBegin = primData.PathTwistBegin; 1069 objectData.PathTwistBegin = primData.PathTwistBegin;
1070 } 1070 }
1071 1071
1072 /// <summary> 1072 /// <summary>
1073 /// Set some default values in a ObjectUpdatePacket 1073 /// Set some default values in a ObjectUpdatePacket
1074 /// </summary> 1074 /// </summary>
1075 /// <param name="objdata"></param> 1075 /// <param name="objdata"></param>
1076 protected void SetDefaultPrimPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata) 1076 protected void SetDefaultPrimPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
1077 { 1077 {
1078 objdata.PSBlock = new byte[0]; 1078 objdata.PSBlock = new byte[0];
1079 objdata.ExtraParams = new byte[1]; 1079 objdata.ExtraParams = new byte[1];
1080 objdata.MediaURL = new byte[0]; 1080 objdata.MediaURL = new byte[0];
1081 objdata.NameValue = new byte[0]; 1081 objdata.NameValue = new byte[0];
1082 objdata.Text = new byte[0]; 1082 objdata.Text = new byte[0];
1083 objdata.TextColor = new byte[4]; 1083 objdata.TextColor = new byte[4];
1084 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); 1084 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
1085 objdata.JointPivot = new LLVector3(0, 0, 0); 1085 objdata.JointPivot = new LLVector3(0, 0, 0);
1086 objdata.Material = 3; 1086 objdata.Material = 3;
1087 objdata.TextureAnim = new byte[0]; 1087 objdata.TextureAnim = new byte[0];
1088 objdata.Sound = LLUUID.Zero; 1088 objdata.Sound = LLUUID.Zero;
1089 objdata.State = 0; 1089 objdata.State = 0;
1090 objdata.Data = new byte[0]; 1090 objdata.Data = new byte[0];
1091 1091
1092 objdata.ObjectData = new byte[60]; 1092 objdata.ObjectData = new byte[60];
1093 objdata.ObjectData[46] = 128; 1093 objdata.ObjectData[46] = 128;
1094 objdata.ObjectData[47] = 63; 1094 objdata.ObjectData[47] = 63;
1095 } 1095 }
1096 1096
1097 1097
1098 /// <summary> 1098 /// <summary>
1099 /// 1099 ///
1100 /// </summary> 1100 /// </summary>
1101 /// <returns></returns> 1101 /// <returns></returns>
1102 protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry) 1102 protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
1103 { 1103 {
1104 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); 1104 ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
1105 1105
1106 SetDefaultAvatarPacketValues(ref objdata); 1106 SetDefaultAvatarPacketValues(ref objdata);
1107 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); 1107 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
1108 objdata.PathCurve = 16; 1108 objdata.PathCurve = 16;
1109 objdata.ProfileCurve = 1; 1109 objdata.ProfileCurve = 1;
1110 objdata.PathScaleX = 100; 1110 objdata.PathScaleX = 100;
1111 objdata.PathScaleY = 100; 1111 objdata.PathScaleY = 100;
1112 objdata.ParentID = 0; 1112 objdata.ParentID = 0;
1113 objdata.OwnerID = LLUUID.Zero; 1113 objdata.OwnerID = LLUUID.Zero;
1114 objdata.Scale = new LLVector3(1, 1, 1); 1114 objdata.Scale = new LLVector3(1, 1, 1);
1115 objdata.PCode = 47; 1115 objdata.PCode = 47;
1116 if (textureEntry != null) 1116 if (textureEntry != null)
1117 { 1117 {
1118 objdata.TextureEntry = textureEntry; 1118 objdata.TextureEntry = textureEntry;
1119 } 1119 }
1120 Encoding enc = Encoding.ASCII; 1120 Encoding enc = Encoding.ASCII;
1121 LLVector3 pos = new LLVector3(objdata.ObjectData, 16); 1121 LLVector3 pos = new LLVector3(objdata.ObjectData, 16);
1122 pos.X = 100f; 1122 pos.X = 100f;
1123 objdata.ID = 8880000; 1123 objdata.ID = 8880000;
1124 objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0"); 1124 objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0");
1125 LLVector3 pos2 = new LLVector3(100f, 100f, 23f); 1125 LLVector3 pos2 = new LLVector3(100f, 100f, 23f);
1126 //objdata.FullID=user.AgentID; 1126 //objdata.FullID=user.AgentID;
1127 byte[] pb = pos.GetBytes(); 1127 byte[] pb = pos.GetBytes();
1128 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length); 1128 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);
1129 1129
1130 return objdata; 1130 return objdata;
1131 } 1131 }
1132 1132
1133 /// <summary> 1133 /// <summary>
1134 /// 1134 ///
1135 /// </summary> 1135 /// </summary>
1136 /// <param name="objdata"></param> 1136 /// <param name="objdata"></param>
1137 protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata) 1137 protected void SetDefaultAvatarPacketValues(ref ObjectUpdatePacket.ObjectDataBlock objdata)
1138 { 1138 {
1139 objdata.PSBlock = new byte[0]; 1139 objdata.PSBlock = new byte[0];
1140 objdata.ExtraParams = new byte[1]; 1140 objdata.ExtraParams = new byte[1];
1141 objdata.MediaURL = new byte[0]; 1141 objdata.MediaURL = new byte[0];
1142 objdata.NameValue = new byte[0]; 1142 objdata.NameValue = new byte[0];
1143 objdata.Text = new byte[0]; 1143 objdata.Text = new byte[0];
1144 objdata.TextColor = new byte[4]; 1144 objdata.TextColor = new byte[4];
1145 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0); 1145 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
1146 objdata.JointPivot = new LLVector3(0, 0, 0); 1146 objdata.JointPivot = new LLVector3(0, 0, 0);
1147 objdata.Material = 4; 1147 objdata.Material = 4;
1148 objdata.TextureAnim = new byte[0]; 1148 objdata.TextureAnim = new byte[0];
1149 objdata.Sound = LLUUID.Zero; 1149 objdata.Sound = LLUUID.Zero;
1150 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); 1150 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
1151 objdata.TextureEntry = ntex.ToBytes(); 1151 objdata.TextureEntry = ntex.ToBytes();
1152 objdata.State = 0; 1152 objdata.State = 0;
1153 objdata.Data = new byte[0]; 1153 objdata.Data = new byte[0];
1154 1154
1155 objdata.ObjectData = new byte[76]; 1155 objdata.ObjectData = new byte[76];
1156 objdata.ObjectData[15] = 128; 1156 objdata.ObjectData[15] = 128;
1157 objdata.ObjectData[16] = 63; 1157 objdata.ObjectData[16] = 63;
1158 objdata.ObjectData[56] = 128; 1158 objdata.ObjectData[56] = 128;
1159 objdata.ObjectData[61] = 102; 1159 objdata.ObjectData[61] = 102;
1160 objdata.ObjectData[62] = 40; 1160 objdata.ObjectData[62] = 40;
1161 objdata.ObjectData[63] = 61; 1161 objdata.ObjectData[63] = 61;
1162 objdata.ObjectData[64] = 189; 1162 objdata.ObjectData[64] = 189;
1163 } 1163 }
1164 1164
1165 #endregion 1165 #endregion
1166 1166
1167 public void SendNameReply(LLUUID profileId, string firstname, string lastname) 1167 public void SendNameReply(LLUUID profileId, string firstname, string lastname)
1168 { 1168 {
1169 UUIDNameReplyPacket packet = new UUIDNameReplyPacket(); 1169 UUIDNameReplyPacket packet = new UUIDNameReplyPacket();
1170 1170
1171 packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1]; 1171 packet.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[1];
1172 packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock(); 1172 packet.UUIDNameBlock[0] = new UUIDNameReplyPacket.UUIDNameBlockBlock();
1173 packet.UUIDNameBlock[0].ID = profileId; 1173 packet.UUIDNameBlock[0].ID = profileId;
1174 packet.UUIDNameBlock[0].FirstName = Helpers.StringToField( firstname ); 1174 packet.UUIDNameBlock[0].FirstName = Helpers.StringToField( firstname );
1175 packet.UUIDNameBlock[0].LastName = Helpers.StringToField( lastname ); 1175 packet.UUIDNameBlock[0].LastName = Helpers.StringToField( lastname );
1176 1176
1177 OutPacket( packet ); 1177 OutPacket( packet );
1178 } 1178 }
1179 } 1179 }
1180} 1180}
diff --git a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs
index 60cd33a..109f7e6 100644
--- a/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs
+++ b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs
@@ -1,357 +1,357 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Assets; 32using OpenSim.Assets;
33using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36using OpenSim.Region.Caches; 36using OpenSim.Region.Caches;
37 37
38namespace OpenSim.Region.ClientStack 38namespace OpenSim.Region.ClientStack
39{ 39{
40 partial class ClientView 40 partial class ClientView
41 { 41 {
42 public class AgentAssetUpload 42 public class AgentAssetUpload
43 { 43 {
44 private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>(); 44 private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>();
45 private ClientView ourClient; 45 private ClientView ourClient;
46 private AssetCache m_assetCache; 46 private AssetCache m_assetCache;
47 private InventoryCache m_inventoryCache; 47 private InventoryCache m_inventoryCache;
48 48
49 public AgentAssetUpload(ClientView client, AssetCache assetCache, InventoryCache inventoryCache) 49 public AgentAssetUpload(ClientView client, AssetCache assetCache, InventoryCache inventoryCache)
50 { 50 {
51 this.ourClient = client; 51 this.ourClient = client;
52 m_assetCache = assetCache; 52 m_assetCache = assetCache;
53 m_inventoryCache = inventoryCache; 53 m_inventoryCache = inventoryCache;
54 } 54 }
55 55
56 public void AddUpload(LLUUID transactionID, AssetBase asset) 56 public void AddUpload(LLUUID transactionID, AssetBase asset)
57 { 57 {
58 AssetTransaction upload = new AssetTransaction(); 58 AssetTransaction upload = new AssetTransaction();
59 lock (this.transactions) 59 lock (this.transactions)
60 { 60 {
61 upload.Asset = asset; 61 upload.Asset = asset;
62 upload.TransactionID = transactionID; 62 upload.TransactionID = transactionID;
63 this.transactions.Add(transactionID, upload); 63 this.transactions.Add(transactionID, upload);
64 } 64 }
65 if (upload.Asset.Data.Length > 2) 65 if (upload.Asset.Data.Length > 2)
66 { 66 {
67 //is complete 67 //is complete
68 upload.UploadComplete = true; 68 upload.UploadComplete = true;
69 AssetUploadCompletePacket response = new AssetUploadCompletePacket(); 69 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
70 response.AssetBlock.Type = asset.Type; 70 response.AssetBlock.Type = asset.Type;
71 response.AssetBlock.Success = true; 71 response.AssetBlock.Success = true;
72 response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID); 72 response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID);
73 this.ourClient.OutPacket(response); 73 this.ourClient.OutPacket(response);
74 m_assetCache.AddAsset(asset); 74 m_assetCache.AddAsset(asset);
75 } 75 }
76 else 76 else
77 { 77 {
78 upload.UploadComplete = false; 78 upload.UploadComplete = false;
79 upload.XferID = Util.GetNextXferID(); 79 upload.XferID = Util.GetNextXferID();
80 RequestXferPacket xfer = new RequestXferPacket(); 80 RequestXferPacket xfer = new RequestXferPacket();
81 xfer.XferID.ID = upload.XferID; 81 xfer.XferID.ID = upload.XferID;
82 xfer.XferID.VFileType = upload.Asset.Type; 82 xfer.XferID.VFileType = upload.Asset.Type;
83 xfer.XferID.VFileID = transactionID.Combine(this.ourClient.SecureSessionID); 83 xfer.XferID.VFileID = transactionID.Combine(this.ourClient.SecureSessionID);
84 xfer.XferID.FilePath = 0; 84 xfer.XferID.FilePath = 0;
85 xfer.XferID.Filename = new byte[0]; 85 xfer.XferID.Filename = new byte[0];
86 this.ourClient.OutPacket(xfer); 86 this.ourClient.OutPacket(xfer);
87 } 87 }
88 88
89 } 89 }
90 90
91 public AssetBase GetUpload(LLUUID transactionID) 91 public AssetBase GetUpload(LLUUID transactionID)
92 { 92 {
93 if (this.transactions.ContainsKey(transactionID)) 93 if (this.transactions.ContainsKey(transactionID))
94 { 94 {
95 return this.transactions[transactionID].Asset; 95 return this.transactions[transactionID].Asset;
96 } 96 }
97 97
98 return null; 98 return null;
99 } 99 }
100 100
101 public void HandleUploadPacket(AssetUploadRequestPacket pack, LLUUID assetID) 101 public void HandleUploadPacket(AssetUploadRequestPacket pack, LLUUID assetID)
102 { 102 {
103 // Console.Write("asset upload request , type = " + pack.AssetBlock.Type.ToString()); 103 // Console.Write("asset upload request , type = " + pack.AssetBlock.Type.ToString());
104 AssetBase asset = null; 104 AssetBase asset = null;
105 if (pack.AssetBlock.Type == 0) 105 if (pack.AssetBlock.Type == 0)
106 { 106 {
107 107
108 //first packet for transaction 108 //first packet for transaction
109 asset = new AssetBase(); 109 asset = new AssetBase();
110 asset.FullID = assetID; 110 asset.FullID = assetID;
111 asset.Type = pack.AssetBlock.Type; 111 asset.Type = pack.AssetBlock.Type;
112 asset.InvType = asset.Type; 112 asset.InvType = asset.Type;
113 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000"); 113 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000");
114 asset.Data = pack.AssetBlock.AssetData; 114 asset.Data = pack.AssetBlock.AssetData;
115 115
116 116
117 } 117 }
118 else if (pack.AssetBlock.Type == 13 | pack.AssetBlock.Type == 5 | pack.AssetBlock.Type == 7) 118 else if (pack.AssetBlock.Type == 13 | pack.AssetBlock.Type == 5 | pack.AssetBlock.Type == 7)
119 { 119 {
120 120
121 asset = new AssetBase(); 121 asset = new AssetBase();
122 asset.FullID = assetID; 122 asset.FullID = assetID;
123 // Console.WriteLine("skin asset id is " + assetID.ToStringHyphenated()); 123 // Console.WriteLine("skin asset id is " + assetID.ToStringHyphenated());
124 asset.Type = pack.AssetBlock.Type; 124 asset.Type = pack.AssetBlock.Type;
125 asset.InvType = asset.Type; 125 asset.InvType = asset.Type;
126 asset.Name = "NewClothing" + Util.RandomClass.Next(1, 1000).ToString("000"); 126 asset.Name = "NewClothing" + Util.RandomClass.Next(1, 1000).ToString("000");
127 asset.Data = pack.AssetBlock.AssetData; 127 asset.Data = pack.AssetBlock.AssetData;
128 128
129 129
130 } 130 }
131 131
132 if (asset != null) 132 if (asset != null)
133 { 133 {
134 this.AddUpload(pack.AssetBlock.TransactionID, asset); 134 this.AddUpload(pack.AssetBlock.TransactionID, asset);
135 } 135 }
136 else 136 else
137 { 137 {
138 138
139 //currently we don't support this asset type 139 //currently we don't support this asset type
140 //so lets just tell the client that the upload is complete 140 //so lets just tell the client that the upload is complete
141 AssetUploadCompletePacket response = new AssetUploadCompletePacket(); 141 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
142 response.AssetBlock.Type = pack.AssetBlock.Type; 142 response.AssetBlock.Type = pack.AssetBlock.Type;
143 response.AssetBlock.Success = true; 143 response.AssetBlock.Success = true;
144 response.AssetBlock.UUID = pack.AssetBlock.TransactionID.Combine(this.ourClient.SecureSessionID); 144 response.AssetBlock.UUID = pack.AssetBlock.TransactionID.Combine(this.ourClient.SecureSessionID);
145 this.ourClient.OutPacket(response); 145 this.ourClient.OutPacket(response);
146 } 146 }
147 147
148 } 148 }
149 149
150 #region Xfer packet system for larger uploads 150 #region Xfer packet system for larger uploads
151 151
152 public void HandleXferPacket(SendXferPacketPacket xferPacket) 152 public void HandleXferPacket(SendXferPacketPacket xferPacket)
153 { 153 {
154 lock (this.transactions) 154 lock (this.transactions)
155 { 155 {
156 foreach (AssetTransaction trans in this.transactions.Values) 156 foreach (AssetTransaction trans in this.transactions.Values)
157 { 157 {
158 if (trans.XferID == xferPacket.XferID.ID) 158 if (trans.XferID == xferPacket.XferID.ID)
159 { 159 {
160 if (trans.Asset.Data.Length > 1) 160 if (trans.Asset.Data.Length > 1)
161 { 161 {
162 byte[] newArray = new byte[trans.Asset.Data.Length + xferPacket.DataPacket.Data.Length]; 162 byte[] newArray = new byte[trans.Asset.Data.Length + xferPacket.DataPacket.Data.Length];
163 Array.Copy(trans.Asset.Data, 0, newArray, 0, trans.Asset.Data.Length); 163 Array.Copy(trans.Asset.Data, 0, newArray, 0, trans.Asset.Data.Length);
164 Array.Copy(xferPacket.DataPacket.Data, 0, newArray, trans.Asset.Data.Length, xferPacket.DataPacket.Data.Length); 164 Array.Copy(xferPacket.DataPacket.Data, 0, newArray, trans.Asset.Data.Length, xferPacket.DataPacket.Data.Length);
165 trans.Asset.Data = newArray; 165 trans.Asset.Data = newArray;
166 } 166 }
167 else 167 else
168 { 168 {
169 byte[] newArray = new byte[xferPacket.DataPacket.Data.Length - 4]; 169 byte[] newArray = new byte[xferPacket.DataPacket.Data.Length - 4];
170 Array.Copy(xferPacket.DataPacket.Data, 4, newArray, 0, xferPacket.DataPacket.Data.Length - 4); 170 Array.Copy(xferPacket.DataPacket.Data, 4, newArray, 0, xferPacket.DataPacket.Data.Length - 4);
171 trans.Asset.Data = newArray; 171 trans.Asset.Data = newArray;
172 } 172 }
173 173
174 if ((xferPacket.XferID.Packet & 2147483648) != 0) 174 if ((xferPacket.XferID.Packet & 2147483648) != 0)
175 { 175 {
176 //end of transfer 176 //end of transfer
177 trans.UploadComplete = true; 177 trans.UploadComplete = true;
178 AssetUploadCompletePacket response = new AssetUploadCompletePacket(); 178 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
179 response.AssetBlock.Type = trans.Asset.Type; 179 response.AssetBlock.Type = trans.Asset.Type;
180 response.AssetBlock.Success = true; 180 response.AssetBlock.Success = true;
181 response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID); 181 response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID);
182 this.ourClient.OutPacket(response); 182 this.ourClient.OutPacket(response);
183 183
184 m_assetCache.AddAsset(trans.Asset); 184 m_assetCache.AddAsset(trans.Asset);
185 //check if we should add it to inventory 185 //check if we should add it to inventory
186 if (trans.AddToInventory) 186 if (trans.AddToInventory)
187 { 187 {
188 // m_assetCache.AddAsset(trans.Asset); 188 // m_assetCache.AddAsset(trans.Asset);
189 m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); 189 m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset);
190 } 190 }
191 191
192 192
193 } 193 }
194 break; 194 break;
195 } 195 }
196 196
197 } 197 }
198 } 198 }
199 199
200 ConfirmXferPacketPacket confirmXfer = new ConfirmXferPacketPacket(); 200 ConfirmXferPacketPacket confirmXfer = new ConfirmXferPacketPacket();
201 confirmXfer.XferID.ID = xferPacket.XferID.ID; 201 confirmXfer.XferID.ID = xferPacket.XferID.ID;
202 confirmXfer.XferID.Packet = xferPacket.XferID.Packet; 202 confirmXfer.XferID.Packet = xferPacket.XferID.Packet;
203 this.ourClient.OutPacket(confirmXfer); 203 this.ourClient.OutPacket(confirmXfer);
204 } 204 }
205 205
206 #endregion 206 #endregion
207 207
208 public AssetBase AddUploadToAssetCache(LLUUID transactionID) 208 public AssetBase AddUploadToAssetCache(LLUUID transactionID)
209 { 209 {
210 AssetBase asset = null; 210 AssetBase asset = null;
211 if (this.transactions.ContainsKey(transactionID)) 211 if (this.transactions.ContainsKey(transactionID))
212 { 212 {
213 AssetTransaction trans = this.transactions[transactionID]; 213 AssetTransaction trans = this.transactions[transactionID];
214 if (trans.UploadComplete) 214 if (trans.UploadComplete)
215 { 215 {
216 m_assetCache.AddAsset(trans.Asset); 216 m_assetCache.AddAsset(trans.Asset);
217 asset = trans.Asset; 217 asset = trans.Asset;
218 } 218 }
219 } 219 }
220 220
221 return asset; 221 return asset;
222 } 222 }
223 223
224 public void CreateInventoryItem(CreateInventoryItemPacket packet) 224 public void CreateInventoryItem(CreateInventoryItemPacket packet)
225 { 225 {
226 if (this.transactions.ContainsKey(packet.InventoryBlock.TransactionID)) 226 if (this.transactions.ContainsKey(packet.InventoryBlock.TransactionID))
227 { 227 {
228 AssetTransaction trans = this.transactions[packet.InventoryBlock.TransactionID]; 228 AssetTransaction trans = this.transactions[packet.InventoryBlock.TransactionID];
229 trans.Asset.Description = Util.FieldToString(packet.InventoryBlock.Description); 229 trans.Asset.Description = Util.FieldToString(packet.InventoryBlock.Description);
230 trans.Asset.Name = Util.FieldToString(packet.InventoryBlock.Name); 230 trans.Asset.Name = Util.FieldToString(packet.InventoryBlock.Name);
231 trans.Asset.Type = packet.InventoryBlock.Type; 231 trans.Asset.Type = packet.InventoryBlock.Type;
232 trans.Asset.InvType = packet.InventoryBlock.InvType; 232 trans.Asset.InvType = packet.InventoryBlock.InvType;
233 if (trans.UploadComplete) 233 if (trans.UploadComplete)
234 { 234 {
235 //already complete so we can add it to the inventory 235 //already complete so we can add it to the inventory
236 //m_assetCache.AddAsset(trans.Asset); 236 //m_assetCache.AddAsset(trans.Asset);
237 m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset); 237 m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset);
238 } 238 }
239 else 239 else
240 { 240 {
241 trans.AddToInventory = true; 241 trans.AddToInventory = true;
242 trans.InventFolder = packet.InventoryBlock.FolderID; 242 trans.InventFolder = packet.InventoryBlock.FolderID;
243 } 243 }
244 } 244 }
245 } 245 }
246 246
247 private class AssetTransaction 247 private class AssetTransaction
248 { 248 {
249 public uint XferID; 249 public uint XferID;
250 public AssetBase Asset; 250 public AssetBase Asset;
251 public bool AddToInventory; 251 public bool AddToInventory;
252 public LLUUID InventFolder = LLUUID.Zero; 252 public LLUUID InventFolder = LLUUID.Zero;
253 public bool UploadComplete = false; 253 public bool UploadComplete = false;
254 public LLUUID TransactionID = LLUUID.Zero; 254 public LLUUID TransactionID = LLUUID.Zero;
255 255
256 public AssetTransaction() 256 public AssetTransaction()
257 { 257 {
258 258
259 } 259 }
260 } 260 }
261 261
262 //new class , not currently used. 262 //new class , not currently used.
263 public class AssetXferUploader 263 public class AssetXferUploader
264 { 264 {
265 private IClientAPI ourClient; 265 private IClientAPI ourClient;
266 266
267 public bool UploadComplete = false; 267 public bool UploadComplete = false;
268 268
269 public bool AddToInventory; 269 public bool AddToInventory;
270 public LLUUID InventFolder = LLUUID.Zero; 270 public LLUUID InventFolder = LLUUID.Zero;
271 271
272 public uint XferID; 272 public uint XferID;
273 public AssetBase Asset; 273 public AssetBase Asset;
274 public LLUUID TransactionID = LLUUID.Zero; 274 public LLUUID TransactionID = LLUUID.Zero;
275 275
276 276
277 public AssetXferUploader(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data) 277 public AssetXferUploader(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data)
278 { 278 {
279 ourClient = remoteClient; 279 ourClient = remoteClient;
280 Asset = new AssetBase(); 280 Asset = new AssetBase();
281 Asset.FullID = assetID; 281 Asset.FullID = assetID;
282 Asset.InvType = type; 282 Asset.InvType = type;
283 Asset.Type = type; 283 Asset.Type = type;
284 Asset.Data = data; 284 Asset.Data = data;
285 Asset.Name = "blank"; 285 Asset.Name = "blank";
286 Asset.Description = "empty"; 286 Asset.Description = "empty";
287 TransactionID = transaction; 287 TransactionID = transaction;
288 288
289 if (Asset.Data.Length > 2) 289 if (Asset.Data.Length > 2)
290 { 290 {
291 //data block should only have data in it, if there is no more data to be uploaded 291 //data block should only have data in it, if there is no more data to be uploaded
292 this.SendCompleteMessage(); 292 this.SendCompleteMessage();
293 } 293 }
294 else 294 else
295 { 295 {
296 this.ReqestStartXfer(); 296 this.ReqestStartXfer();
297 } 297 }
298 } 298 }
299 299
300 protected void SendCompleteMessage() 300 protected void SendCompleteMessage()
301 { 301 {
302 UploadComplete = true; 302 UploadComplete = true;
303 AssetUploadCompletePacket response = new AssetUploadCompletePacket(); 303 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
304 response.AssetBlock.Type = Asset.Type; 304 response.AssetBlock.Type = Asset.Type;
305 response.AssetBlock.Success = true; 305 response.AssetBlock.Success = true;
306 response.AssetBlock.UUID = Asset.FullID; 306 response.AssetBlock.UUID = Asset.FullID;
307 this.ourClient.OutPacket(response); 307 this.ourClient.OutPacket(response);
308 308
309 //TODO trigger event 309 //TODO trigger event
310 } 310 }
311 311
312 protected void ReqestStartXfer() 312 protected void ReqestStartXfer()
313 { 313 {
314 UploadComplete = false; 314 UploadComplete = false;
315 XferID = Util.GetNextXferID(); 315 XferID = Util.GetNextXferID();
316 RequestXferPacket xfer = new RequestXferPacket(); 316 RequestXferPacket xfer = new RequestXferPacket();
317 xfer.XferID.ID = XferID; 317 xfer.XferID.ID = XferID;
318 xfer.XferID.VFileType = Asset.Type; 318 xfer.XferID.VFileType = Asset.Type;
319 xfer.XferID.VFileID = Asset.FullID; 319 xfer.XferID.VFileID = Asset.FullID;
320 xfer.XferID.FilePath = 0; 320 xfer.XferID.FilePath = 0;
321 xfer.XferID.Filename = new byte[0]; 321 xfer.XferID.Filename = new byte[0];
322 this.ourClient.OutPacket(xfer); 322 this.ourClient.OutPacket(xfer);
323 } 323 }
324 324
325 public void HandleXferPacket(uint xferID, uint packetID, byte[] data) 325 public void HandleXferPacket(uint xferID, uint packetID, byte[] data)
326 { 326 {
327 if (XferID == xferID) 327 if (XferID == xferID)
328 { 328 {
329 if (Asset.Data.Length > 1) 329 if (Asset.Data.Length > 1)
330 { 330 {
331 byte[] newArray = new byte[Asset.Data.Length + data.Length]; 331 byte[] newArray = new byte[Asset.Data.Length + data.Length];
332 Array.Copy(Asset.Data, 0, newArray, 0, Asset.Data.Length); 332 Array.Copy(Asset.Data, 0, newArray, 0, Asset.Data.Length);
333 Array.Copy(data, 0, newArray, Asset.Data.Length, data.Length); 333 Array.Copy(data, 0, newArray, Asset.Data.Length, data.Length);
334 Asset.Data = newArray; 334 Asset.Data = newArray;
335 } 335 }
336 else 336 else
337 { 337 {
338 byte[] newArray = new byte[data.Length - 4]; 338 byte[] newArray = new byte[data.Length - 4];
339 Array.Copy(data, 4, newArray, 0, data.Length - 4); 339 Array.Copy(data, 4, newArray, 0, data.Length - 4);
340 Asset.Data = newArray; 340 Asset.Data = newArray;
341 } 341 }
342 342
343 ConfirmXferPacketPacket confirmXfer = new ConfirmXferPacketPacket(); 343 ConfirmXferPacketPacket confirmXfer = new ConfirmXferPacketPacket();
344 confirmXfer.XferID.ID = xferID; 344 confirmXfer.XferID.ID = xferID;
345 confirmXfer.XferID.Packet = packetID; 345 confirmXfer.XferID.Packet = packetID;
346 this.ourClient.OutPacket(confirmXfer); 346 this.ourClient.OutPacket(confirmXfer);
347 347
348 if ((packetID & 2147483648) != 0) 348 if ((packetID & 2147483648) != 0)
349 { 349 {
350 this.SendCompleteMessage(); 350 this.SendCompleteMessage();
351 } 351 }
352 } 352 }
353 } 353 }
354 } 354 }
355 } 355 }
356 } 356 }
357} 357}
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
index e67807e..27265cf 100644
--- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
@@ -1,236 +1,236 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using libsecondlife.Packets; 29using libsecondlife.Packets;
30using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
31 31
32namespace OpenSim.Region.ClientStack 32namespace OpenSim.Region.ClientStack
33{ 33{
34 public partial class ClientView 34 public partial class ClientView
35 { 35 {
36 protected virtual void RegisterLocalPacketHandlers() 36 protected virtual void RegisterLocalPacketHandlers()
37 { 37 {
38 this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout); 38 this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout);
39 this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached); 39 this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached);
40 this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate); 40 this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate);
41 } 41 }
42 42
43 protected virtual bool Logout(ClientView simClient, Packet packet) 43 protected virtual bool Logout(ClientView simClient, Packet packet)
44 { 44 {
45 MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request"); 45 MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request");
46 //send reply to let the client logout 46 //send reply to let the client logout
47 LogoutReplyPacket logReply = new LogoutReplyPacket(); 47 LogoutReplyPacket logReply = new LogoutReplyPacket();
48 logReply.AgentData.AgentID = this.AgentID; 48 logReply.AgentData.AgentID = this.AgentID;
49 logReply.AgentData.SessionID = this.SessionID; 49 logReply.AgentData.SessionID = this.SessionID;
50 logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1]; 50 logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1];
51 logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock(); 51 logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock();
52 logReply.InventoryData[0].ItemID = LLUUID.Zero; 52 logReply.InventoryData[0].ItemID = LLUUID.Zero;
53 OutPacket(logReply); 53 OutPacket(logReply);
54 // 54 //
55 this.KillClient(); 55 this.KillClient();
56 return true; 56 return true;
57 } 57 }
58 58
59 protected bool AgentTextureCached(ClientView simclient, Packet packet) 59 protected bool AgentTextureCached(ClientView simclient, Packet packet)
60 { 60 {
61 // Console.WriteLine(packet.ToString()); 61 // Console.WriteLine(packet.ToString());
62 AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet; 62 AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet;
63 AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); 63 AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket();
64 cachedresp.AgentData.AgentID = this.AgentID; 64 cachedresp.AgentData.AgentID = this.AgentID;
65 cachedresp.AgentData.SessionID = this.SessionID; 65 cachedresp.AgentData.SessionID = this.SessionID;
66 cachedresp.AgentData.SerialNum = this.cachedtextureserial; 66 cachedresp.AgentData.SerialNum = this.cachedtextureserial;
67 this.cachedtextureserial++; 67 this.cachedtextureserial++;
68 cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length]; 68 cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length];
69 for (int i = 0; i < chechedtex.WearableData.Length; i++) 69 for (int i = 0; i < chechedtex.WearableData.Length; i++)
70 { 70 {
71 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 71 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
72 cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex; 72 cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex;
73 cachedresp.WearableData[i].TextureID = LLUUID.Zero; 73 cachedresp.WearableData[i].TextureID = LLUUID.Zero;
74 cachedresp.WearableData[i].HostName = new byte[0]; 74 cachedresp.WearableData[i].HostName = new byte[0];
75 } 75 }
76 this.OutPacket(cachedresp); 76 this.OutPacket(cachedresp);
77 return true; 77 return true;
78 } 78 }
79 79
80 protected bool MultipleObjUpdate(ClientView simClient, Packet packet) 80 protected bool MultipleObjUpdate(ClientView simClient, Packet packet)
81 { 81 {
82 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet; 82 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
83 //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); 83 //System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
84 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 84 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
85 { 85 {
86 #region position 86 #region position
87 if (multipleupdate.ObjectData[i].Type == 9) //change position 87 if (multipleupdate.ObjectData[i].Type == 9) //change position
88 { 88 {
89 if (OnUpdatePrimGroupPosition != null) 89 if (OnUpdatePrimGroupPosition != null)
90 { 90 {
91 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 91 LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
92 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 92 OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
93 } 93 }
94 94
95 } 95 }
96 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position 96 else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
97 { 97 {
98 if (OnUpdatePrimSinglePosition != null) 98 if (OnUpdatePrimSinglePosition != null)
99 { 99 {
100 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 100 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
101 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 101 // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
102 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 102 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
103 } 103 }
104 } 104 }
105 #endregion position 105 #endregion position
106 #region rotation 106 #region rotation
107 else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab 107 else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab
108 { 108 {
109 if (OnUpdatePrimSingleRotation != null) 109 if (OnUpdatePrimSingleRotation != null)
110 { 110 {
111 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 111 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
112 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 112 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
113 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 113 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
114 } 114 }
115 } 115 }
116 else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse 116 else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse
117 { 117 {
118 if (OnUpdatePrimSingleRotation != null) 118 if (OnUpdatePrimSingleRotation != null)
119 { 119 {
120 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 120 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
121 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 121 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
122 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 122 OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
123 } 123 }
124 } 124 }
125 else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab 125 else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab
126 { 126 {
127 if (OnUpdatePrimGroupRotation != null) 127 if (OnUpdatePrimGroupRotation != null)
128 { 128 {
129 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); 129 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
130 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 130 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
131 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); 131 OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
132 } 132 }
133 } 133 }
134 else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse 134 else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse
135 { 135 {
136 if (OnUpdatePrimGroupMouseRotation != null) 136 if (OnUpdatePrimGroupMouseRotation != null)
137 { 137 {
138 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 138 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
139 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 139 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
140 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 140 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
141 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 141 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
142 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); 142 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
143 } 143 }
144 } 144 }
145 #endregion 145 #endregion
146 #region scale 146 #region scale
147 else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab 147 else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab
148 { 148 {
149 if (OnUpdatePrimScale != null) 149 if (OnUpdatePrimScale != null)
150 { 150 {
151 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 151 LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
152 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 152 //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
153 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 153 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
154 } 154 }
155 } 155 }
156 else if (multipleupdate.ObjectData[i].Type == 29)//group scale from mouse 156 else if (multipleupdate.ObjectData[i].Type == 29)//group scale from mouse
157 { 157 {
158 if (OnUpdatePrimScale != null) 158 if (OnUpdatePrimScale != null)
159 { 159 {
160 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0); 160 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
161 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); 161 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
162 // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 162 // OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
163 } 163 }
164 } 164 }
165 else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab 165 else if (multipleupdate.ObjectData[i].Type == 5)//single prim scale from object tab
166 { 166 {
167 if (OnUpdatePrimScale != null) 167 if (OnUpdatePrimScale != null)
168 { 168 {
169 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 169 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
170 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 170 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
171 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 171 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
172 } 172 }
173 } 173 }
174 else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse 174 else if (multipleupdate.ObjectData[i].Type == 21)//single prim scale from mouse
175 { 175 {
176 if (OnUpdatePrimScale != null) 176 if (OnUpdatePrimScale != null)
177 { 177 {
178 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); 178 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
179 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); 179 // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
180 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); 180 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
181 } 181 }
182 } 182 }
183 #endregion 183 #endregion
184 } 184 }
185 return true; 185 return true;
186 } 186 }
187 187
188 public void RequestMapLayer() 188 public void RequestMapLayer()
189 { 189 {
190 //should be getting the map layer from the grid server 190 //should be getting the map layer from the grid server
191 //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area) 191 //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area)
192 MapLayerReplyPacket mapReply = new MapLayerReplyPacket(); 192 MapLayerReplyPacket mapReply = new MapLayerReplyPacket();
193 mapReply.AgentData.AgentID = this.AgentID; 193 mapReply.AgentData.AgentID = this.AgentID;
194 mapReply.AgentData.Flags = 0; 194 mapReply.AgentData.Flags = 0;
195 mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1]; 195 mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
196 mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock(); 196 mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
197 mapReply.LayerData[0].Bottom = 0; 197 mapReply.LayerData[0].Bottom = 0;
198 mapReply.LayerData[0].Left = 0; 198 mapReply.LayerData[0].Left = 0;
199 mapReply.LayerData[0].Top = 30000; 199 mapReply.LayerData[0].Top = 30000;
200 mapReply.LayerData[0].Right = 30000; 200 mapReply.LayerData[0].Right = 30000;
201 mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006"); 201 mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
202 this.OutPacket(mapReply); 202 this.OutPacket(mapReply);
203 } 203 }
204 204
205 public void RequestMapBlocks(int minX, int minY, int maxX, int maxY) 205 public void RequestMapBlocks(int minX, int minY, int maxX, int maxY)
206 { 206 {
207 /* 207 /*
208 IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); 208 IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
209 MapBlockReplyPacket mbReply = new MapBlockReplyPacket(); 209 MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
210 mbReply.AgentData.AgentID = this.AgentID; 210 mbReply.AgentData.AgentID = this.AgentID;
211 int len; 211 int len;
212 if (simMapProfiles == null) 212 if (simMapProfiles == null)
213 len = 0; 213 len = 0;
214 else 214 else
215 len = simMapProfiles.Count; 215 len = simMapProfiles.Count;
216 216
217 mbReply.Data = new MapBlockReplyPacket.DataBlock[len]; 217 mbReply.Data = new MapBlockReplyPacket.DataBlock[len];
218 int iii; 218 int iii;
219 for (iii = 0; iii < len; iii++) 219 for (iii = 0; iii < len; iii++)
220 { 220 {
221 Hashtable mp = (Hashtable)simMapProfiles[iii]; 221 Hashtable mp = (Hashtable)simMapProfiles[iii];
222 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock(); 222 mbReply.Data[iii] = new MapBlockReplyPacket.DataBlock();
223 mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]); 223 mbReply.Data[iii].Name = System.Text.Encoding.UTF8.GetBytes((string)mp["name"]);
224 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]); 224 mbReply.Data[iii].Access = System.Convert.ToByte(mp["access"]);
225 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]); 225 mbReply.Data[iii].Agents = System.Convert.ToByte(mp["agents"]);
226 mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]); 226 mbReply.Data[iii].MapImageID = new LLUUID((string)mp["map-image-id"]);
227 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]); 227 mbReply.Data[iii].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
228 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]); 228 mbReply.Data[iii].WaterHeight = System.Convert.ToByte(mp["water-height"]);
229 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]); 229 mbReply.Data[iii].X = System.Convert.ToUInt16(mp["x"]);
230 mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]); 230 mbReply.Data[iii].Y = System.Convert.ToUInt16(mp["y"]);
231 } 231 }
232 this.OutPacket(mbReply); 232 this.OutPacket(mbReply);
233 */ 233 */
234 } 234 }
235 } 235 }
236} 236}
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index a8512a7..1f9110c 100644
--- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -1,647 +1,647 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Framework.Inventory; 33using OpenSim.Framework.Inventory;
34using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36 36
37namespace OpenSim.Region.ClientStack 37namespace OpenSim.Region.ClientStack
38{ 38{
39 public partial class ClientView 39 public partial class ClientView
40 { 40 {
41 protected override void ProcessInPacket(Packet Pack) 41 protected override void ProcessInPacket(Packet Pack)
42 { 42 {
43 ack_pack(Pack); 43 ack_pack(Pack);
44 if (debug) 44 if (debug)
45 { 45 {
46 if (Pack.Type != PacketType.AgentUpdate) 46 if (Pack.Type != PacketType.AgentUpdate)
47 { 47 {
48 Console.WriteLine(CircuitCode + ":IN: " + Pack.Type.ToString()); 48 Console.WriteLine(CircuitCode + ":IN: " + Pack.Type.ToString());
49 } 49 }
50 } 50 }
51 51
52 if (this.ProcessPacketMethod(Pack)) 52 if (this.ProcessPacketMethod(Pack))
53 { 53 {
54 //there is a handler registered that handled this packet type 54 //there is a handler registered that handled this packet type
55 return; 55 return;
56 } 56 }
57 else 57 else
58 { 58 {
59 Encoding _enc = Encoding.ASCII; 59 Encoding _enc = Encoding.ASCII;
60 60
61 switch (Pack.Type) 61 switch (Pack.Type)
62 { 62 {
63 case PacketType.ViewerEffect: 63 case PacketType.ViewerEffect:
64 ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; 64 ViewerEffectPacket viewer = (ViewerEffectPacket)Pack;
65 foreach (ClientView client in m_clientThreads.Values) 65 foreach (ClientView client in m_clientThreads.Values)
66 { 66 {
67 if (client.AgentID != this.AgentID) 67 if (client.AgentID != this.AgentID)
68 { 68 {
69 viewer.AgentData.AgentID = client.AgentID; 69 viewer.AgentData.AgentID = client.AgentID;
70 viewer.AgentData.SessionID = client.SessionID; 70 viewer.AgentData.SessionID = client.SessionID;
71 client.OutPacket(viewer); 71 client.OutPacket(viewer);
72 } 72 }
73 } 73 }
74 break; 74 break;
75 75
76 #region World/Avatar 76 #region World/Avatar
77 case PacketType.ChatFromViewer: 77 case PacketType.ChatFromViewer:
78 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; 78 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
79 if (Util.FieldToString(inchatpack.ChatData.Message) == "") 79 if (Util.FieldToString(inchatpack.ChatData.Message) == "")
80 { 80 {
81 //empty message so don't bother with it 81 //empty message so don't bother with it
82 break; 82 break;
83 } 83 }
84 string fromName = ""; //ClientAvatar.firstname + " " + ClientAvatar.lastname; 84 string fromName = ""; //ClientAvatar.firstname + " " + ClientAvatar.lastname;
85 byte[] message = inchatpack.ChatData.Message; 85 byte[] message = inchatpack.ChatData.Message;
86 byte type = inchatpack.ChatData.Type; 86 byte type = inchatpack.ChatData.Type;
87 LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos; 87 LLVector3 fromPos = new LLVector3(); // ClientAvatar.Pos;
88 LLUUID fromAgentID = AgentID; 88 LLUUID fromAgentID = AgentID;
89 if (OnChatFromViewer != null) 89 if (OnChatFromViewer != null)
90 { 90 {
91 this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID); 91 this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID);
92 } 92 }
93 break; 93 break;
94 case PacketType.ImprovedInstantMessage: 94 case PacketType.ImprovedInstantMessage:
95 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; 95 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
96 96
97 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); 97 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
98 string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message); 98 string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message);
99 99
100 if (OnInstantMessage != null) 100 if (OnInstantMessage != null)
101 { 101 {
102 this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.MessageBlock.ToAgentID, 102 this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.MessageBlock.ToAgentID,
103 msgpack.MessageBlock.Timestamp, IMfromName, IMmessage); 103 msgpack.MessageBlock.Timestamp, IMfromName, IMmessage);
104 } 104 }
105 break; 105 break;
106 case PacketType.RezObject: 106 case PacketType.RezObject:
107 RezObjectPacket rezPacket = (RezObjectPacket)Pack; 107 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
108 AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID); 108 AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
109 if (inven != null) 109 if (inven != null)
110 { 110 {
111 if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID)) 111 if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID))
112 { 112 {
113 AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID); 113 AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID);
114 if (asset != null) 114 if (asset != null)
115 { 115 {
116 if (OnRezObject != null) 116 if (OnRezObject != null)
117 { 117 {
118 this.OnRezObject(asset, rezPacket.RezData.RayEnd); 118 this.OnRezObject(asset, rezPacket.RezData.RayEnd);
119 this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID); 119 this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID);
120 } 120 }
121 } 121 }
122 } 122 }
123 } 123 }
124 break; 124 break;
125 case PacketType.DeRezObject: 125 case PacketType.DeRezObject:
126 if (OnDeRezObject != null) 126 if (OnDeRezObject != null)
127 { 127 {
128 OnDeRezObject(Pack, this); 128 OnDeRezObject(Pack, this);
129 } 129 }
130 break; 130 break;
131 case PacketType.ModifyLand: 131 case PacketType.ModifyLand:
132 ModifyLandPacket modify = (ModifyLandPacket)Pack; 132 ModifyLandPacket modify = (ModifyLandPacket)Pack;
133 if (modify.ParcelData.Length > 0) 133 if (modify.ParcelData.Length > 0)
134 { 134 {
135 if (OnModifyTerrain != null) 135 if (OnModifyTerrain != null)
136 { 136 {
137 OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize, 137 OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize,
138 modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West); 138 modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West);
139 } 139 }
140 } 140 }
141 break; 141 break;
142 case PacketType.RegionHandshakeReply: 142 case PacketType.RegionHandshakeReply:
143 if (OnRegionHandShakeReply != null) 143 if (OnRegionHandShakeReply != null)
144 { 144 {
145 OnRegionHandShakeReply(this); 145 OnRegionHandShakeReply(this);
146 } 146 }
147 break; 147 break;
148 case PacketType.AgentWearablesRequest: 148 case PacketType.AgentWearablesRequest:
149 if (OnRequestWearables != null) 149 if (OnRequestWearables != null)
150 { 150 {
151 OnRequestWearables(this); 151 OnRequestWearables(this);
152 } 152 }
153 if (OnRequestAvatarsData != null) 153 if (OnRequestAvatarsData != null)
154 { 154 {
155 OnRequestAvatarsData(this); 155 OnRequestAvatarsData(this);
156 } 156 }
157 break; 157 break;
158 case PacketType.AgentSetAppearance: 158 case PacketType.AgentSetAppearance:
159 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; 159 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
160 if (OnSetAppearance != null) 160 if (OnSetAppearance != null)
161 { 161 {
162 OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam); 162 OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam);
163 } 163 }
164 break; 164 break;
165 case PacketType.CompleteAgentMovement: 165 case PacketType.CompleteAgentMovement:
166 if (OnCompleteMovementToRegion != null) 166 if (OnCompleteMovementToRegion != null)
167 { 167 {
168 OnCompleteMovementToRegion(); 168 OnCompleteMovementToRegion();
169 } 169 }
170 break; 170 break;
171 case PacketType.AgentUpdate: 171 case PacketType.AgentUpdate:
172 if (OnAgentUpdate != null) 172 if (OnAgentUpdate != null)
173 { 173 {
174 AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack; 174 AgentUpdatePacket agenUpdate = (AgentUpdatePacket)Pack;
175 OnAgentUpdate(this, agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotation); 175 OnAgentUpdate(this, agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotation);
176 } 176 }
177 break; 177 break;
178 case PacketType.AgentAnimation: 178 case PacketType.AgentAnimation:
179 if (!m_child) 179 if (!m_child)
180 { 180 {
181 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; 181 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack;
182 for (int i = 0; i < AgentAni.AnimationList.Length; i++) 182 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
183 { 183 {
184 if (AgentAni.AnimationList[i].StartAnim) 184 if (AgentAni.AnimationList[i].StartAnim)
185 { 185 {
186 if (OnStartAnim != null) 186 if (OnStartAnim != null)
187 { 187 {
188 OnStartAnim(AgentAni.AnimationList[i].AnimID, 1); 188 OnStartAnim(AgentAni.AnimationList[i].AnimID, 1);
189 } 189 }
190 } 190 }
191 } 191 }
192 } 192 }
193 break; 193 break;
194 194
195 #endregion 195 #endregion
196 196
197 #region Objects/Prims 197 #region Objects/Prims
198 case PacketType.ObjectLink: 198 case PacketType.ObjectLink:
199 // OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); 199 // OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString());
200 ObjectLinkPacket link = (ObjectLinkPacket)Pack; 200 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
201 uint parentprimid = 0; 201 uint parentprimid = 0;
202 List<uint> childrenprims = new List<uint>(); 202 List<uint> childrenprims = new List<uint>();
203 if (link.ObjectData.Length > 1) 203 if (link.ObjectData.Length > 1)
204 { 204 {
205 parentprimid = link.ObjectData[0].ObjectLocalID; 205 parentprimid = link.ObjectData[0].ObjectLocalID;
206 206
207 for (int i = 1; i < link.ObjectData.Length; i++) 207 for (int i = 1; i < link.ObjectData.Length; i++)
208 { 208 {
209 childrenprims.Add(link.ObjectData[i].ObjectLocalID); 209 childrenprims.Add(link.ObjectData[i].ObjectLocalID);
210 } 210 }
211 } 211 }
212 if (OnLinkObjects != null) 212 if (OnLinkObjects != null)
213 { 213 {
214 OnLinkObjects(parentprimid, childrenprims); 214 OnLinkObjects(parentprimid, childrenprims);
215 } 215 }
216 break; 216 break;
217 case PacketType.ObjectAdd: 217 case PacketType.ObjectAdd:
218 if (OnAddPrim != null) 218 if (OnAddPrim != null)
219 { 219 {
220 ObjectAddPacket addPacket = (ObjectAddPacket) Pack ; 220 ObjectAddPacket addPacket = (ObjectAddPacket) Pack ;
221 221
222 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 222 PrimitiveBaseShape shape = new PrimitiveBaseShape();
223 223
224 shape.PCode = addPacket.ObjectData.PCode; 224 shape.PCode = addPacket.ObjectData.PCode;
225 shape.PathBegin = addPacket.ObjectData.PathBegin; 225 shape.PathBegin = addPacket.ObjectData.PathBegin;
226 shape.PathEnd = addPacket.ObjectData.PathEnd; 226 shape.PathEnd = addPacket.ObjectData.PathEnd;
227 shape.PathScaleX = addPacket.ObjectData.PathScaleX; 227 shape.PathScaleX = addPacket.ObjectData.PathScaleX;
228 shape.PathScaleY = addPacket.ObjectData.PathScaleY; 228 shape.PathScaleY = addPacket.ObjectData.PathScaleY;
229 shape.PathShearX = addPacket.ObjectData.PathShearX; 229 shape.PathShearX = addPacket.ObjectData.PathShearX;
230 shape.PathShearY = addPacket.ObjectData.PathShearY; 230 shape.PathShearY = addPacket.ObjectData.PathShearY;
231 shape.PathSkew = addPacket.ObjectData.PathSkew; 231 shape.PathSkew = addPacket.ObjectData.PathSkew;
232 shape.ProfileBegin = addPacket.ObjectData.ProfileBegin; 232 shape.ProfileBegin = addPacket.ObjectData.ProfileBegin;
233 shape.ProfileEnd = addPacket.ObjectData.ProfileEnd; 233 shape.ProfileEnd = addPacket.ObjectData.ProfileEnd;
234 shape.Scale = addPacket.ObjectData.Scale; 234 shape.Scale = addPacket.ObjectData.Scale;
235 shape.PathCurve = addPacket.ObjectData.PathCurve; 235 shape.PathCurve = addPacket.ObjectData.PathCurve;
236 shape.ProfileCurve = addPacket.ObjectData.ProfileCurve; 236 shape.ProfileCurve = addPacket.ObjectData.ProfileCurve;
237 shape.ProfileHollow = addPacket.ObjectData.ProfileHollow; 237 shape.ProfileHollow = addPacket.ObjectData.ProfileHollow;
238 shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset; 238 shape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
239 shape.PathRevolutions = addPacket.ObjectData.PathRevolutions; 239 shape.PathRevolutions = addPacket.ObjectData.PathRevolutions;
240 shape.PathTaperX = addPacket.ObjectData.PathTaperX; 240 shape.PathTaperX = addPacket.ObjectData.PathTaperX;
241 shape.PathTaperY = addPacket.ObjectData.PathTaperY; 241 shape.PathTaperY = addPacket.ObjectData.PathTaperY;
242 shape.PathTwist = addPacket.ObjectData.PathTwist; 242 shape.PathTwist = addPacket.ObjectData.PathTwist;
243 shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; 243 shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
244 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); 244 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
245 shape.TextureEntry = ntex.ToBytes(); 245 shape.TextureEntry = ntex.ToBytes();
246 246
247 OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape); 247 OnAddPrim(this.AgentId, addPacket.ObjectData.RayEnd, shape);
248 } 248 }
249 break; 249 break;
250 case PacketType.ObjectShape: 250 case PacketType.ObjectShape:
251 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; 251 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
252 for (int i = 0; i < shapePacket.ObjectData.Length; i++) 252 for (int i = 0; i < shapePacket.ObjectData.Length; i++)
253 { 253 {
254 if (OnUpdatePrimShape != null) 254 if (OnUpdatePrimShape != null)
255 { 255 {
256 OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]); 256 OnUpdatePrimShape(shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]);
257 } 257 }
258 } 258 }
259 break; 259 break;
260 case PacketType.ObjectDuplicate: 260 case PacketType.ObjectDuplicate:
261 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; 261 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack;
262 for (int i = 0; i < dupe.ObjectData.Length; i++) 262 for (int i = 0; i < dupe.ObjectData.Length; i++)
263 { 263 {
264 if (OnObjectDuplicate != null) 264 if (OnObjectDuplicate != null)
265 { 265 {
266 OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, dupe.SharedData.DuplicateFlags); 266 OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, dupe.SharedData.DuplicateFlags);
267 } 267 }
268 } 268 }
269 269
270 break; 270 break;
271 271
272 case PacketType.ObjectSelect: 272 case PacketType.ObjectSelect:
273 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; 273 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
274 for (int i = 0; i < incomingselect.ObjectData.Length; i++) 274 for (int i = 0; i < incomingselect.ObjectData.Length; i++)
275 { 275 {
276 if (OnObjectSelect != null) 276 if (OnObjectSelect != null)
277 { 277 {
278 OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this); 278 OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this);
279 } 279 }
280 } 280 }
281 break; 281 break;
282 case PacketType.ObjectDeselect: 282 case PacketType.ObjectDeselect:
283 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; 283 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack;
284 for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) 284 for (int i = 0; i < incomingdeselect.ObjectData.Length; i++)
285 { 285 {
286 if (OnObjectDeselect != null) 286 if (OnObjectDeselect != null)
287 { 287 {
288 OnObjectDeselect(incomingdeselect.ObjectData[i].ObjectLocalID, this); 288 OnObjectDeselect(incomingdeselect.ObjectData[i].ObjectLocalID, this);
289 } 289 }
290 } 290 }
291 break; 291 break;
292 case PacketType.ObjectFlagUpdate: 292 case PacketType.ObjectFlagUpdate:
293 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; 293 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
294 if (OnUpdatePrimFlags != null) 294 if (OnUpdatePrimFlags != null)
295 { 295 {
296 OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this); 296 OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this);
297 } 297 }
298 break; 298 break;
299 case PacketType.ObjectImage: 299 case PacketType.ObjectImage:
300 ObjectImagePacket imagePack = (ObjectImagePacket)Pack; 300 ObjectImagePacket imagePack = (ObjectImagePacket)Pack;
301 for (int i = 0; i < imagePack.ObjectData.Length; i++) 301 for (int i = 0; i < imagePack.ObjectData.Length; i++)
302 { 302 {
303 if (OnUpdatePrimTexture != null) 303 if (OnUpdatePrimTexture != null)
304 { 304 {
305 OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this); 305 OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this);
306 } 306 }
307 } 307 }
308 break; 308 break;
309 case PacketType.ObjectGrab: 309 case PacketType.ObjectGrab:
310 ObjectGrabPacket grap = (ObjectGrabPacket)Pack; 310 ObjectGrabPacket grap = (ObjectGrabPacket)Pack;
311 if (OnGrapObject != null) 311 if (OnGrapObject != null)
312 { 312 {
313 OnGrapObject(grap.ObjectData.LocalID, grap.ObjectData.GrabOffset, this); 313 OnGrapObject(grap.ObjectData.LocalID, grap.ObjectData.GrabOffset, this);
314 } 314 }
315 break; 315 break;
316 case PacketType.ObjectGrabUpdate: 316 case PacketType.ObjectGrabUpdate:
317 ObjectGrabUpdatePacket grapUpdate = (ObjectGrabUpdatePacket)Pack; 317 ObjectGrabUpdatePacket grapUpdate = (ObjectGrabUpdatePacket)Pack;
318 if (OnGrapUpdate != null) 318 if (OnGrapUpdate != null)
319 { 319 {
320 OnGrapUpdate(grapUpdate.ObjectData.ObjectID, grapUpdate.ObjectData.GrabOffsetInitial, grapUpdate.ObjectData.GrabPosition, this); 320 OnGrapUpdate(grapUpdate.ObjectData.ObjectID, grapUpdate.ObjectData.GrabOffsetInitial, grapUpdate.ObjectData.GrabPosition, this);
321 } 321 }
322 break; 322 break;
323 case PacketType.ObjectDeGrab: 323 case PacketType.ObjectDeGrab:
324 ObjectDeGrabPacket deGrap = (ObjectDeGrabPacket)Pack; 324 ObjectDeGrabPacket deGrap = (ObjectDeGrabPacket)Pack;
325 if (OnDeGrapObject != null) 325 if (OnDeGrapObject != null)
326 { 326 {
327 OnDeGrapObject(deGrap.ObjectData.LocalID, this); 327 OnDeGrapObject(deGrap.ObjectData.LocalID, this);
328 } 328 }
329 break; 329 break;
330 case PacketType.ObjectDescription: 330 case PacketType.ObjectDescription:
331 ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; 331 ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack;
332 for (int i = 0; i < objDes.ObjectData.Length; i++) 332 for (int i = 0; i < objDes.ObjectData.Length; i++)
333 { 333 {
334 if (OnObjectDescription != null) 334 if (OnObjectDescription != null)
335 { 335 {
336 OnObjectDescription(objDes.ObjectData[i].LocalID, enc.GetString(objDes.ObjectData[i].Description)); 336 OnObjectDescription(objDes.ObjectData[i].LocalID, enc.GetString(objDes.ObjectData[i].Description));
337 } 337 }
338 } 338 }
339 break; 339 break;
340 case PacketType.ObjectName: 340 case PacketType.ObjectName:
341 ObjectNamePacket objName = (ObjectNamePacket)Pack; 341 ObjectNamePacket objName = (ObjectNamePacket)Pack;
342 for (int i = 0; i < objName.ObjectData.Length; i++) 342 for (int i = 0; i < objName.ObjectData.Length; i++)
343 { 343 {
344 if (OnObjectName != null) 344 if (OnObjectName != null)
345 { 345 {
346 OnObjectName(objName.ObjectData[i].LocalID, enc.GetString(objName.ObjectData[i].Name)); 346 OnObjectName(objName.ObjectData[i].LocalID, enc.GetString(objName.ObjectData[i].Name));
347 } 347 }
348 } 348 }
349 break; 349 break;
350 case PacketType.ObjectPermissions: 350 case PacketType.ObjectPermissions:
351 //Console.WriteLine("permissions set " + Pack.ToString()); 351 //Console.WriteLine("permissions set " + Pack.ToString());
352 break; 352 break;
353 #endregion 353 #endregion
354 354
355 #region Inventory/Asset/Other related packets 355 #region Inventory/Asset/Other related packets
356 case PacketType.RequestImage: 356 case PacketType.RequestImage:
357 RequestImagePacket imageRequest = (RequestImagePacket)Pack; 357 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
358 for (int i = 0; i < imageRequest.RequestImage.Length; i++) 358 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
359 { 359 {
360 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image); 360 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image);
361 } 361 }
362 break; 362 break;
363 case PacketType.TransferRequest: 363 case PacketType.TransferRequest:
364 //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request"); 364 //Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request");
365 TransferRequestPacket transfer = (TransferRequestPacket)Pack; 365 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
366 m_assetCache.AddAssetRequest(this, transfer); 366 m_assetCache.AddAssetRequest(this, transfer);
367 break; 367 break;
368 case PacketType.AssetUploadRequest: 368 case PacketType.AssetUploadRequest:
369 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 369 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
370 this.UploadAssets.HandleUploadPacket(request, request.AssetBlock.TransactionID.Combine(this.SecureSessionID)); 370 this.UploadAssets.HandleUploadPacket(request, request.AssetBlock.TransactionID.Combine(this.SecureSessionID));
371 break; 371 break;
372 case PacketType.RequestXfer: 372 case PacketType.RequestXfer:
373 //Console.WriteLine(Pack.ToString()); 373 //Console.WriteLine(Pack.ToString());
374 break; 374 break;
375 case PacketType.SendXferPacket: 375 case PacketType.SendXferPacket:
376 this.UploadAssets.HandleXferPacket((SendXferPacketPacket)Pack); 376 this.UploadAssets.HandleXferPacket((SendXferPacketPacket)Pack);
377 break; 377 break;
378 case PacketType.CreateInventoryFolder: 378 case PacketType.CreateInventoryFolder:
379 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; 379 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
380 m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Util.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID); 380 m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Util.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
381 //Console.WriteLine(Pack.ToString()); 381 //Console.WriteLine(Pack.ToString());
382 break; 382 break;
383 case PacketType.CreateInventoryItem: 383 case PacketType.CreateInventoryItem:
384 //Console.WriteLine(Pack.ToString()); 384 //Console.WriteLine(Pack.ToString());
385 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; 385 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
386 if (createItem.InventoryBlock.TransactionID != LLUUID.Zero) 386 if (createItem.InventoryBlock.TransactionID != LLUUID.Zero)
387 { 387 {
388 this.UploadAssets.CreateInventoryItem(createItem); 388 this.UploadAssets.CreateInventoryItem(createItem);
389 } 389 }
390 else 390 else
391 { 391 {
392 // Console.Write(Pack.ToString()); 392 // Console.Write(Pack.ToString());
393 this.CreateInventoryItem(createItem); 393 this.CreateInventoryItem(createItem);
394 } 394 }
395 break; 395 break;
396 case PacketType.FetchInventory: 396 case PacketType.FetchInventory:
397 //Console.WriteLine("fetch item packet"); 397 //Console.WriteLine("fetch item packet");
398 FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack; 398 FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack;
399 m_inventoryCache.FetchInventory(this, FetchInventory); 399 m_inventoryCache.FetchInventory(this, FetchInventory);
400 break; 400 break;
401 case PacketType.FetchInventoryDescendents: 401 case PacketType.FetchInventoryDescendents:
402 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; 402 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
403 m_inventoryCache.FetchInventoryDescendents(this, Fetch); 403 m_inventoryCache.FetchInventoryDescendents(this, Fetch);
404 break; 404 break;
405 case PacketType.UpdateInventoryItem: 405 case PacketType.UpdateInventoryItem:
406 UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; 406 UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack;
407 //Console.WriteLine(Pack.ToString()); 407 //Console.WriteLine(Pack.ToString());
408 for (int i = 0; i < update.InventoryData.Length; i++) 408 for (int i = 0; i < update.InventoryData.Length; i++)
409 { 409 {
410 if (update.InventoryData[i].TransactionID != LLUUID.Zero) 410 if (update.InventoryData[i].TransactionID != LLUUID.Zero)
411 { 411 {
412 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); 412 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID));
413 if (asset != null) 413 if (asset != null)
414 { 414 {
415 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); 415 // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache");
416 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 416 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
417 } 417 }
418 else 418 else
419 { 419 {
420 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); 420 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
421 if (asset != null) 421 if (asset != null)
422 { 422 {
423 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache"); 423 //Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache");
424 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); 424 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
425 } 425 }
426 else 426 else
427 { 427 {
428 //Console.WriteLine("trying to update inventory item, but asset is null"); 428 //Console.WriteLine("trying to update inventory item, but asset is null");
429 } 429 }
430 } 430 }
431 } 431 }
432 else 432 else
433 { 433 {
434 m_inventoryCache.UpdateInventoryItemDetails(this, update.InventoryData[i].ItemID, update.InventoryData[i]); ; 434 m_inventoryCache.UpdateInventoryItemDetails(this, update.InventoryData[i].ItemID, update.InventoryData[i]); ;
435 } 435 }
436 } 436 }
437 break; 437 break;
438 case PacketType.RequestTaskInventory: 438 case PacketType.RequestTaskInventory:
439 // Console.WriteLine(Pack.ToString()); 439 // Console.WriteLine(Pack.ToString());
440 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; 440 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
441 ReplyTaskInventoryPacket replytask = new ReplyTaskInventoryPacket(); 441 ReplyTaskInventoryPacket replytask = new ReplyTaskInventoryPacket();
442 //bool foundent = false; 442 //bool foundent = false;
443 /* foreach (Entity ent in m_world.Entities.Values) 443 /* foreach (Entity ent in m_world.Entities.Values)
444 { 444 {
445 if (ent.localid == requesttask.InventoryData.LocalID) 445 if (ent.localid == requesttask.InventoryData.LocalID)
446 { 446 {
447 replytask.InventoryData.TaskID = ent.uuid; 447 replytask.InventoryData.TaskID = ent.uuid;
448 replytask.InventoryData.Serial = 0; 448 replytask.InventoryData.Serial = 0;
449 replytask.InventoryData.Filename = new byte[0]; 449 replytask.InventoryData.Filename = new byte[0];
450 foundent = true; 450 foundent = true;
451 } 451 }
452 } 452 }
453 if (foundent) 453 if (foundent)
454 { 454 {
455 this.OutPacket(replytask); 455 this.OutPacket(replytask);
456 }*/ 456 }*/
457 break; 457 break;
458 case PacketType.UpdateTaskInventory: 458 case PacketType.UpdateTaskInventory:
459 // Console.WriteLine(Pack.ToString()); 459 // Console.WriteLine(Pack.ToString());
460 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; 460 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
461 AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID); 461 AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
462 /*if (myinventory != null) 462 /*if (myinventory != null)
463 { 463 {
464 if (updatetask.UpdateData.Key == 0) 464 if (updatetask.UpdateData.Key == 0)
465 { 465 {
466 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null) 466 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null)
467 { 467 {
468 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7) 468 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7)
469 { 469 {
470 LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID; 470 LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID;
471 AssetBase assBase = this.m_assetCache.GetAsset(noteaid); 471 AssetBase assBase = this.m_assetCache.GetAsset(noteaid);
472 if (assBase != null) 472 if (assBase != null)
473 { 473 {
474 foreach (Entity ent in m_world.Entities.Values) 474 foreach (Entity ent in m_world.Entities.Values)
475 { 475 {
476 if (ent.localid == updatetask.UpdateData.LocalID) 476 if (ent.localid == updatetask.UpdateData.LocalID)
477 { 477 {
478 if (ent is OpenSim.world.Primitive) 478 if (ent is OpenSim.world.Primitive)
479 { 479 {
480 this.m_world.AddScript(ent, Util.FieldToString(assBase.Data)); 480 this.m_world.AddScript(ent, Util.FieldToString(assBase.Data));
481 } 481 }
482 } 482 }
483 } 483 }
484 } 484 }
485 } 485 }
486 } 486 }
487 } 487 }
488 }*/ 488 }*/
489 break; 489 break;
490 case PacketType.MapLayerRequest: 490 case PacketType.MapLayerRequest:
491 this.RequestMapLayer(); 491 this.RequestMapLayer();
492 break; 492 break;
493 case PacketType.MapBlockRequest: 493 case PacketType.MapBlockRequest:
494 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack; 494 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
495 if (OnRequestMapBlocks != null) 495 if (OnRequestMapBlocks != null)
496 { 496 {
497 OnRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY); 497 OnRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
498 } 498 }
499 break; 499 break;
500 case PacketType.TeleportLandmarkRequest: 500 case PacketType.TeleportLandmarkRequest:
501 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 501 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
502 502
503 TeleportStartPacket tpStart = new TeleportStartPacket(); 503 TeleportStartPacket tpStart = new TeleportStartPacket();
504 tpStart.Info.TeleportFlags = 8; // tp via lm 504 tpStart.Info.TeleportFlags = 8; // tp via lm
505 this.OutPacket(tpStart); 505 this.OutPacket(tpStart);
506 506
507 TeleportProgressPacket tpProgress = new TeleportProgressPacket(); 507 TeleportProgressPacket tpProgress = new TeleportProgressPacket();
508 tpProgress.Info.Message = (new ASCIIEncoding()).GetBytes("sending_landmark"); 508 tpProgress.Info.Message = (new ASCIIEncoding()).GetBytes("sending_landmark");
509 tpProgress.Info.TeleportFlags = 8; 509 tpProgress.Info.TeleportFlags = 8;
510 tpProgress.AgentData.AgentID = tpReq.Info.AgentID; 510 tpProgress.AgentData.AgentID = tpReq.Info.AgentID;
511 this.OutPacket(tpProgress); 511 this.OutPacket(tpProgress);
512 512
513 // Fetch landmark 513 // Fetch landmark
514 LLUUID lmid = tpReq.Info.LandmarkID; 514 LLUUID lmid = tpReq.Info.LandmarkID;
515 AssetBase lma = this.m_assetCache.GetAsset(lmid); 515 AssetBase lma = this.m_assetCache.GetAsset(lmid);
516 if (lma != null) 516 if (lma != null)
517 { 517 {
518 AssetLandmark lm = new AssetLandmark(lma); 518 AssetLandmark lm = new AssetLandmark(lma);
519 519
520 if (lm.RegionID == m_world.RegionInfo.SimUUID) 520 if (lm.RegionID == m_world.RegionInfo.SimUUID)
521 { 521 {
522 TeleportLocalPacket tpLocal = new TeleportLocalPacket(); 522 TeleportLocalPacket tpLocal = new TeleportLocalPacket();
523 523
524 tpLocal.Info.AgentID = tpReq.Info.AgentID; 524 tpLocal.Info.AgentID = tpReq.Info.AgentID;
525 tpLocal.Info.TeleportFlags = 8; // Teleport via landmark 525 tpLocal.Info.TeleportFlags = 8; // Teleport via landmark
526 tpLocal.Info.LocationID = 2; 526 tpLocal.Info.LocationID = 2;
527 tpLocal.Info.Position = lm.Position; 527 tpLocal.Info.Position = lm.Position;
528 OutPacket(tpLocal); 528 OutPacket(tpLocal);
529 } 529 }
530 else 530 else
531 { 531 {
532 TeleportCancelPacket tpCancel = new TeleportCancelPacket(); 532 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
533 tpCancel.Info.AgentID = tpReq.Info.AgentID; 533 tpCancel.Info.AgentID = tpReq.Info.AgentID;
534 tpCancel.Info.SessionID = tpReq.Info.SessionID; 534 tpCancel.Info.SessionID = tpReq.Info.SessionID;
535 OutPacket(tpCancel); 535 OutPacket(tpCancel);
536 } 536 }
537 } 537 }
538 else 538 else
539 { 539 {
540 Console.WriteLine("Cancelling Teleport - fetch asset not yet implemented"); 540 Console.WriteLine("Cancelling Teleport - fetch asset not yet implemented");
541 541
542 TeleportCancelPacket tpCancel = new TeleportCancelPacket(); 542 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
543 tpCancel.Info.AgentID = tpReq.Info.AgentID; 543 tpCancel.Info.AgentID = tpReq.Info.AgentID;
544 tpCancel.Info.SessionID = tpReq.Info.SessionID; 544 tpCancel.Info.SessionID = tpReq.Info.SessionID;
545 OutPacket(tpCancel); 545 OutPacket(tpCancel);
546 } 546 }
547 break; 547 break;
548 case PacketType.TeleportLocationRequest: 548 case PacketType.TeleportLocationRequest:
549 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; 549 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
550 // Console.WriteLine(tpLocReq.ToString()); 550 // Console.WriteLine(tpLocReq.ToString());
551 551
552 if (OnTeleportLocationRequest != null) 552 if (OnTeleportLocationRequest != null)
553 { 553 {
554 OnTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, tpLocReq.Info.LookAt, 16); 554 OnTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, tpLocReq.Info.LookAt, 16);
555 } 555 }
556 else 556 else
557 { 557 {
558 //no event handler so cancel request 558 //no event handler so cancel request
559 TeleportCancelPacket tpCancel = new TeleportCancelPacket(); 559 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
560 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID; 560 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID;
561 tpCancel.Info.AgentID = tpLocReq.AgentData.AgentID; 561 tpCancel.Info.AgentID = tpLocReq.AgentData.AgentID;
562 OutPacket(tpCancel); 562 OutPacket(tpCancel);
563 } 563 }
564 break; 564 break;
565 #endregion 565 #endregion
566 566
567 case PacketType.MoneyBalanceRequest: 567 case PacketType.MoneyBalanceRequest:
568 this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000); 568 this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000);
569 break; 569 break;
570 case PacketType.UUIDNameRequest: 570 case PacketType.UUIDNameRequest:
571 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 571 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
572 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock) 572 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
573 { 573 {
574 OnNameFromUUIDRequest(UUIDBlock.ID, this); 574 OnNameFromUUIDRequest(UUIDBlock.ID, this);
575 } 575 }
576 break; 576 break;
577 #region Parcel related packets 577 #region Parcel related packets
578 case PacketType.ParcelPropertiesRequest: 578 case PacketType.ParcelPropertiesRequest:
579 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; 579 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
580 if (OnParcelPropertiesRequest != null) 580 if (OnParcelPropertiesRequest != null)
581 { 581 {
582 OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), (int)Math.Round(propertiesRequest.ParcelData.South), (int)Math.Round(propertiesRequest.ParcelData.East), (int)Math.Round(propertiesRequest.ParcelData.North), propertiesRequest.ParcelData.SequenceID, propertiesRequest.ParcelData.SnapSelection, this); 582 OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), (int)Math.Round(propertiesRequest.ParcelData.South), (int)Math.Round(propertiesRequest.ParcelData.East), (int)Math.Round(propertiesRequest.ParcelData.North), propertiesRequest.ParcelData.SequenceID, propertiesRequest.ParcelData.SnapSelection, this);
583 } 583 }
584 break; 584 break;
585 case PacketType.ParcelDivide: 585 case PacketType.ParcelDivide:
586 ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack; 586 ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack;
587 if (OnParcelDivideRequest != null) 587 if (OnParcelDivideRequest != null)
588 { 588 {
589 OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this); 589 OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this);
590 } 590 }
591 break; 591 break;
592 case PacketType.ParcelJoin: 592 case PacketType.ParcelJoin:
593 ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack; 593 ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack;
594 if (OnParcelJoinRequest != null) 594 if (OnParcelJoinRequest != null)
595 { 595 {
596 OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this); 596 OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this);
597 } 597 }
598 break; 598 break;
599 case PacketType.ParcelPropertiesUpdate: 599 case PacketType.ParcelPropertiesUpdate:
600 ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack; 600 ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack;
601 if (OnParcelPropertiesUpdateRequest != null) 601 if (OnParcelPropertiesUpdateRequest != null)
602 { 602 {
603 OnParcelPropertiesUpdateRequest(updatePacket, this); 603 OnParcelPropertiesUpdateRequest(updatePacket, this);
604 604
605 } 605 }
606 break; 606 break;
607 case PacketType.ParcelSelectObjects: 607 case PacketType.ParcelSelectObjects:
608 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; 608 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack;
609 if (OnParcelSelectObjects != null) 609 if (OnParcelSelectObjects != null)
610 { 610 {
611 OnParcelSelectObjects(selectPacket.ParcelData.LocalID, Convert.ToInt32(selectPacket.ParcelData.ReturnType), this); 611 OnParcelSelectObjects(selectPacket.ParcelData.LocalID, Convert.ToInt32(selectPacket.ParcelData.ReturnType), this);
612 } 612 }
613 break; 613 break;
614 614
615 case PacketType.ParcelObjectOwnersRequest: 615 case PacketType.ParcelObjectOwnersRequest:
616 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; 616 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack;
617 if (OnParcelObjectOwnerRequest != null) 617 if (OnParcelObjectOwnerRequest != null)
618 { 618 {
619 OnParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this); 619 OnParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this);
620 } 620 }
621 break; 621 break;
622 #endregion 622 #endregion
623 623
624 #region Estate Packets 624 #region Estate Packets
625 case PacketType.EstateOwnerMessage: 625 case PacketType.EstateOwnerMessage:
626 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; 626 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
627 if (OnEstateOwnerMessage != null) 627 if (OnEstateOwnerMessage != null)
628 { 628 {
629 OnEstateOwnerMessage(messagePacket, this); 629 OnEstateOwnerMessage(messagePacket, this);
630 } 630 }
631 break; 631 break;
632 #endregion 632 #endregion
633 633
634 #region unimplemented handlers 634 #region unimplemented handlers
635 case PacketType.AgentIsNowWearing: 635 case PacketType.AgentIsNowWearing:
636 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; 636 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
637 //Console.WriteLine(Pack.ToString()); 637 //Console.WriteLine(Pack.ToString());
638 break; 638 break;
639 case PacketType.ObjectScale: 639 case PacketType.ObjectScale:
640 //OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString()); 640 //OpenSim.Framework.Console.MainLog.Instance.Verbose( Pack.ToString());
641 break; 641 break;
642 #endregion 642 #endregion
643 } 643 }
644 } 644 }
645 } 645 }
646 } 646 }
647} 647}
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 0fe3884..9fddc7b 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -1,293 +1,293 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Text; 31using System.Text;
32using System.Threading; 32using System.Threading;
33using System.Timers; 33using System.Timers;
34using libsecondlife; 34using libsecondlife;
35using libsecondlife.Packets; 35using libsecondlife.Packets;
36using OpenSim.Assets; 36using OpenSim.Assets;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Framework.Console; 38using OpenSim.Framework.Console;
39using OpenSim.Framework.Interfaces; 39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Inventory; 40using OpenSim.Framework.Inventory;
41using OpenSim.Framework.Types; 41using OpenSim.Framework.Types;
42using OpenSim.Framework.Utilities; 42using OpenSim.Framework.Utilities;
43using OpenSim.Region.Caches; 43using OpenSim.Region.Caches;
44using Timer=System.Timers.Timer; 44using Timer=System.Timers.Timer;
45 45
46namespace OpenSim.Region.ClientStack 46namespace OpenSim.Region.ClientStack
47{ 47{
48 public delegate bool PacketMethod(ClientView simClient, Packet packet); 48 public delegate bool PacketMethod(ClientView simClient, Packet packet);
49 49
50 /// <summary> 50 /// <summary>
51 /// Handles new client connections 51 /// Handles new client connections
52 /// Constructor takes a single Packet and authenticates everything 52 /// Constructor takes a single Packet and authenticates everything
53 /// </summary> 53 /// </summary>
54 public partial class ClientView : ClientViewBase, IClientAPI 54 public partial class ClientView : ClientViewBase, IClientAPI
55 { 55 {
56 public static TerrainManager TerrainManager; 56 public static TerrainManager TerrainManager;
57 57
58 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients 58 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
59 protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance 59 protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
60 60
61 public LLUUID AgentID; 61 public LLUUID AgentID;
62 public LLUUID SessionID; 62 public LLUUID SessionID;
63 public LLUUID SecureSessionID = LLUUID.Zero; 63 public LLUUID SecureSessionID = LLUUID.Zero;
64 public string firstName; 64 public string firstName;
65 public string lastName; 65 public string lastName;
66 public bool m_child = false; 66 public bool m_child = false;
67 private UseCircuitCodePacket cirpack; 67 private UseCircuitCodePacket cirpack;
68 public Thread ClientThread; 68 public Thread ClientThread;
69 public LLVector3 startpos; 69 public LLVector3 startpos;
70 70
71 private AgentAssetUpload UploadAssets; 71 private AgentAssetUpload UploadAssets;
72 private LLUUID newAssetFolder = LLUUID.Zero; 72 private LLUUID newAssetFolder = LLUUID.Zero;
73 private bool debug = false; 73 private bool debug = false;
74 protected IWorld m_world; 74 protected IWorld m_world;
75 private Dictionary<uint, ClientView> m_clientThreads; 75 private Dictionary<uint, ClientView> m_clientThreads;
76 private AssetCache m_assetCache; 76 private AssetCache m_assetCache;
77 private InventoryCache m_inventoryCache; 77 private InventoryCache m_inventoryCache;
78 private int cachedtextureserial = 0; 78 private int cachedtextureserial = 0;
79 protected AuthenticateSessionsBase m_authenticateSessionsHandler; 79 protected AuthenticateSessionsBase m_authenticateSessionsHandler;
80 private Encoding enc = Encoding.ASCII; 80 private Encoding enc = Encoding.ASCII;
81 // Dead client detection vars 81 // Dead client detection vars
82 private Timer clientPingTimer; 82 private Timer clientPingTimer;
83 private int packetsReceived = 0; 83 private int packetsReceived = 0;
84 private int probesWithNoIngressPackets = 0; 84 private int probesWithNoIngressPackets = 0;
85 private int lastPacketsReceived = 0; 85 private int lastPacketsReceived = 0;
86 86
87 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions ) 87 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions )
88 { 88 {
89 m_world = world; 89 m_world = world;
90 m_clientThreads = clientThreads; 90 m_clientThreads = clientThreads;
91 m_assetCache = assetCache; 91 m_assetCache = assetCache;
92 92
93 m_networkServer = packServer; 93 m_networkServer = packServer;
94 m_inventoryCache = inventoryCache; 94 m_inventoryCache = inventoryCache;
95 m_authenticateSessionsHandler = authenSessions; 95 m_authenticateSessionsHandler = authenSessions;
96 96
97 MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); 97 MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request");
98 cirpack = initialcirpack; 98 cirpack = initialcirpack;
99 userEP = remoteEP; 99 userEP = remoteEP;
100 100
101 this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code); 101 this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code);
102 102
103 PacketQueue = new BlockingQueue<QueItem>(); 103 PacketQueue = new BlockingQueue<QueItem>();
104 104
105 this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); 105 this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
106 AckTimer = new Timer(500); 106 AckTimer = new Timer(500);
107 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); 107 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
108 AckTimer.Start(); 108 AckTimer.Start();
109 109
110 this.RegisterLocalPacketHandlers(); 110 this.RegisterLocalPacketHandlers();
111 111
112 ClientThread = new Thread(new ThreadStart(AuthUser)); 112 ClientThread = new Thread(new ThreadStart(AuthUser));
113 ClientThread.IsBackground = true; 113 ClientThread.IsBackground = true;
114 ClientThread.Start(); 114 ClientThread.Start();
115 } 115 }
116 116
117 # region Client Methods 117 # region Client Methods
118 118
119 public void KillClient() 119 public void KillClient()
120 { 120 {
121 clientPingTimer.Stop(); 121 clientPingTimer.Stop();
122 this.m_inventoryCache.ClientLeaving(this.AgentID, null); 122 this.m_inventoryCache.ClientLeaving(this.AgentID, null);
123 m_world.RemoveClient(this.AgentId); 123 m_world.RemoveClient(this.AgentId);
124 124
125 m_clientThreads.Remove(this.CircuitCode); 125 m_clientThreads.Remove(this.CircuitCode);
126 m_networkServer.RemoveClientCircuit(this.CircuitCode); 126 m_networkServer.RemoveClientCircuit(this.CircuitCode);
127 this.ClientThread.Abort(); 127 this.ClientThread.Abort();
128 } 128 }
129 #endregion 129 #endregion
130 130
131 # region Packet Handling 131 # region Packet Handling
132 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler) 132 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler)
133 { 133 {
134 bool result = false; 134 bool result = false;
135 lock (PacketHandlers) 135 lock (PacketHandlers)
136 { 136 {
137 if (!PacketHandlers.ContainsKey(packetType)) 137 if (!PacketHandlers.ContainsKey(packetType))
138 { 138 {
139 PacketHandlers.Add(packetType, handler); 139 PacketHandlers.Add(packetType, handler);
140 result = true; 140 result = true;
141 } 141 }
142 } 142 }
143 return result; 143 return result;
144 } 144 }
145 145
146 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler) 146 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
147 { 147 {
148 bool result = false; 148 bool result = false;
149 lock (m_packetHandlers) 149 lock (m_packetHandlers)
150 { 150 {
151 if (!m_packetHandlers.ContainsKey(packetType)) 151 if (!m_packetHandlers.ContainsKey(packetType))
152 { 152 {
153 m_packetHandlers.Add(packetType, handler); 153 m_packetHandlers.Add(packetType, handler);
154 result = true; 154 result = true;
155 } 155 }
156 } 156 }
157 return result; 157 return result;
158 } 158 }
159 159
160 protected virtual bool ProcessPacketMethod(Packet packet) 160 protected virtual bool ProcessPacketMethod(Packet packet)
161 { 161 {
162 bool result = false; 162 bool result = false;
163 bool found = false; 163 bool found = false;
164 PacketMethod method; 164 PacketMethod method;
165 if (m_packetHandlers.TryGetValue(packet.Type, out method)) 165 if (m_packetHandlers.TryGetValue(packet.Type, out method))
166 { 166 {
167 //there is a local handler for this packet type 167 //there is a local handler for this packet type
168 result = method(this, packet); 168 result = method(this, packet);
169 } 169 }
170 else 170 else
171 { 171 {
172 //there is not a local handler so see if there is a Global handler 172 //there is not a local handler so see if there is a Global handler
173 lock (PacketHandlers) 173 lock (PacketHandlers)
174 { 174 {
175 found = PacketHandlers.TryGetValue(packet.Type, out method); 175 found = PacketHandlers.TryGetValue(packet.Type, out method);
176 } 176 }
177 if (found) 177 if (found)
178 { 178 {
179 result = method(this, packet); 179 result = method(this, packet);
180 } 180 }
181 } 181 }
182 return result; 182 return result;
183 } 183 }
184 184
185 protected virtual void ClientLoop() 185 protected virtual void ClientLoop()
186 { 186 {
187 MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); 187 MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop");
188 while (true) 188 while (true)
189 { 189 {
190 QueItem nextPacket = PacketQueue.Dequeue(); 190 QueItem nextPacket = PacketQueue.Dequeue();
191 if (nextPacket.Incoming) 191 if (nextPacket.Incoming)
192 { 192 {
193 //is a incoming packet 193 //is a incoming packet
194 if (nextPacket.Packet.Type != PacketType.AgentUpdate) { 194 if (nextPacket.Packet.Type != PacketType.AgentUpdate) {
195 packetsReceived++; 195 packetsReceived++;
196 } 196 }
197 ProcessInPacket(nextPacket.Packet); 197 ProcessInPacket(nextPacket.Packet);
198 } 198 }
199 else 199 else
200 { 200 {
201 //is a out going packet 201 //is a out going packet
202 ProcessOutPacket(nextPacket.Packet); 202 ProcessOutPacket(nextPacket.Packet);
203 } 203 }
204 } 204 }
205 } 205 }
206 # endregion 206 # endregion
207 207
208 protected void CheckClientConnectivity(object sender, ElapsedEventArgs e) 208 protected void CheckClientConnectivity(object sender, ElapsedEventArgs e)
209 { 209 {
210 if (packetsReceived == lastPacketsReceived) { 210 if (packetsReceived == lastPacketsReceived) {
211 probesWithNoIngressPackets++; 211 probesWithNoIngressPackets++;
212 if (probesWithNoIngressPackets > 30) { 212 if (probesWithNoIngressPackets > 30) {
213 this.KillClient(); 213 this.KillClient();
214 } else { 214 } else {
215 // this will normally trigger at least one packet (ping response) 215 // this will normally trigger at least one packet (ping response)
216 SendStartPingCheck(0); 216 SendStartPingCheck(0);
217 } 217 }
218 } else { 218 } else {
219 // Something received in the meantime - we can reset the counters 219 // Something received in the meantime - we can reset the counters
220 probesWithNoIngressPackets = 0; 220 probesWithNoIngressPackets = 0;
221 lastPacketsReceived = packetsReceived; 221 lastPacketsReceived = packetsReceived;
222 } 222 }
223 } 223 }
224 224
225 # region Setup 225 # region Setup
226 226
227 protected virtual void InitNewClient() 227 protected virtual void InitNewClient()
228 { 228 {
229 clientPingTimer = new Timer(1000); 229 clientPingTimer = new Timer(1000);
230 clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); 230 clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
231 clientPingTimer.Enabled = true; 231 clientPingTimer.Enabled = true;
232 232
233 MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); 233 MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
234 this.m_world.AddNewClient(this, false); 234 this.m_world.AddNewClient(this, false);
235 } 235 }
236 236
237 protected virtual void AuthUser() 237 protected virtual void AuthUser()
238 { 238 {
239 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); 239 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code);
240 AuthenticateResponse sessionInfo = this.m_authenticateSessionsHandler.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code); 240 AuthenticateResponse sessionInfo = this.m_authenticateSessionsHandler.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code);
241 if (!sessionInfo.Authorised) 241 if (!sessionInfo.Authorised)
242 { 242 {
243 //session/circuit not authorised 243 //session/circuit not authorised
244 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); 244 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
245 ClientThread.Abort(); 245 ClientThread.Abort();
246 } 246 }
247 else 247 else
248 { 248 {
249 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); 249 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
250 //session is authorised 250 //session is authorised
251 this.AgentID = cirpack.CircuitCode.ID; 251 this.AgentID = cirpack.CircuitCode.ID;
252 this.SessionID = cirpack.CircuitCode.SessionID; 252 this.SessionID = cirpack.CircuitCode.SessionID;
253 this.CircuitCode = cirpack.CircuitCode.Code; 253 this.CircuitCode = cirpack.CircuitCode.Code;
254 this.firstName = sessionInfo.LoginInfo.First; 254 this.firstName = sessionInfo.LoginInfo.First;
255 this.lastName = sessionInfo.LoginInfo.Last; 255 this.lastName = sessionInfo.LoginInfo.Last;
256 256
257 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero) 257 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero)
258 { 258 {
259 this.SecureSessionID = sessionInfo.LoginInfo.SecureSession; 259 this.SecureSessionID = sessionInfo.LoginInfo.SecureSession;
260 } 260 }
261 InitNewClient(); 261 InitNewClient();
262 262
263 ClientLoop(); 263 ClientLoop();
264 } 264 }
265 } 265 }
266 # endregion 266 # endregion
267 267
268 268
269 protected override void KillThread() 269 protected override void KillThread()
270 { 270 {
271 this.ClientThread.Abort(); 271 this.ClientThread.Abort();
272 } 272 }
273 273
274 #region Inventory Creation 274 #region Inventory Creation
275 private void SetupInventory(AuthenticateResponse sessionInfo) 275 private void SetupInventory(AuthenticateResponse sessionInfo)
276 { 276 {
277 277
278 } 278 }
279 private AgentInventory CreateInventory(LLUUID baseFolder) 279 private AgentInventory CreateInventory(LLUUID baseFolder)
280 { 280 {
281 AgentInventory inventory = null; 281 AgentInventory inventory = null;
282 282
283 return inventory; 283 return inventory;
284 } 284 }
285 285
286 private void CreateInventoryItem(CreateInventoryItemPacket packet) 286 private void CreateInventoryItem(CreateInventoryItemPacket packet)
287 { 287 {
288 288
289 } 289 }
290 #endregion 290 #endregion
291 291
292 } 292 }
293} 293}
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs
index cc04bda..597cd7d 100644
--- a/OpenSim/Region/ClientStack/ClientViewBase.cs
+++ b/OpenSim/Region/ClientStack/ClientViewBase.cs
@@ -1,326 +1,326 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using System.Timers; 32using System.Timers;
33using libsecondlife; 33using libsecondlife;
34using libsecondlife.Packets; 34using libsecondlife.Packets;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
37using OpenSim.Region.Environment; 37using OpenSim.Region.Environment;
38 38
39namespace OpenSim.Region.ClientStack 39namespace OpenSim.Region.ClientStack
40{ 40{
41 public class ClientViewBase 41 public class ClientViewBase
42 { 42 {
43 protected BlockingQueue<QueItem> PacketQueue; 43 protected BlockingQueue<QueItem> PacketQueue;
44 protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>(); 44 protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>();
45 protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>(); 45 protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>();
46 46
47 protected Timer AckTimer; 47 protected Timer AckTimer;
48 protected uint Sequence = 0; 48 protected uint Sequence = 0;
49 protected object SequenceLock = new object(); 49 protected object SequenceLock = new object();
50 protected const int MAX_APPENDED_ACKS = 10; 50 protected const int MAX_APPENDED_ACKS = 10;
51 protected const int RESEND_TIMEOUT = 4000; 51 protected const int RESEND_TIMEOUT = 4000;
52 protected const int MAX_SEQUENCE = 0xFFFFFF; 52 protected const int MAX_SEQUENCE = 0xFFFFFF;
53 53
54 public uint CircuitCode; 54 public uint CircuitCode;
55 public EndPoint userEP; 55 public EndPoint userEP;
56 56
57 protected PacketServer m_networkServer; 57 protected PacketServer m_networkServer;
58 58
59 public ClientViewBase() 59 public ClientViewBase()
60 { 60 {
61 61
62 } 62 }
63 63
64 protected virtual void ProcessInPacket(Packet Pack) 64 protected virtual void ProcessInPacket(Packet Pack)
65 { 65 {
66 66
67 } 67 }
68 68
69 protected virtual void ProcessOutPacket(Packet Pack) 69 protected virtual void ProcessOutPacket(Packet Pack)
70 { 70 {
71 // Keep track of when this packet was sent out 71 // Keep track of when this packet was sent out
72 Pack.TickCount = System.Environment.TickCount; 72 Pack.TickCount = System.Environment.TickCount;
73 73
74 // Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString()); 74 // Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString());
75 75
76 if (!Pack.Header.Resent) 76 if (!Pack.Header.Resent)
77 { 77 {
78 // Set the sequence number 78 // Set the sequence number
79 lock (SequenceLock) 79 lock (SequenceLock)
80 { 80 {
81 if (Sequence >= MAX_SEQUENCE) 81 if (Sequence >= MAX_SEQUENCE)
82 Sequence = 1; 82 Sequence = 1;
83 else 83 else
84 Sequence++; 84 Sequence++;
85 Pack.Header.Sequence = Sequence; 85 Pack.Header.Sequence = Sequence;
86 } 86 }
87 87
88 if (Pack.Header.Reliable) //DIRTY HACK 88 if (Pack.Header.Reliable) //DIRTY HACK
89 { 89 {
90 lock (NeedAck) 90 lock (NeedAck)
91 { 91 {
92 if (!NeedAck.ContainsKey(Pack.Header.Sequence)) 92 if (!NeedAck.ContainsKey(Pack.Header.Sequence))
93 { 93 {
94 try 94 try
95 { 95 {
96 NeedAck.Add(Pack.Header.Sequence, Pack); 96 NeedAck.Add(Pack.Header.Sequence, Pack);
97 } 97 }
98 catch (Exception e) // HACKY 98 catch (Exception e) // HACKY
99 { 99 {
100 e.ToString(); 100 e.ToString();
101 // Ignore 101 // Ignore
102 // Seems to throw a exception here occasionally 102 // Seems to throw a exception here occasionally
103 // of 'duplicate key' despite being locked. 103 // of 'duplicate key' despite being locked.
104 // !?!?!? 104 // !?!?!?
105 } 105 }
106 } 106 }
107 else 107 else
108 { 108 {
109 // Client.Log("Attempted to add a duplicate sequence number (" + 109 // Client.Log("Attempted to add a duplicate sequence number (" +
110 // packet.Header.Sequence + ") to the NeedAck dictionary for packet type " + 110 // packet.Header.Sequence + ") to the NeedAck dictionary for packet type " +
111 // packet.Type.ToString(), Helpers.LogLevel.Warning); 111 // packet.Type.ToString(), Helpers.LogLevel.Warning);
112 } 112 }
113 } 113 }
114 114
115 // Don't append ACKs to resent packets, in case that's what was causing the 115 // Don't append ACKs to resent packets, in case that's what was causing the
116 // delivery to fail 116 // delivery to fail
117 if (!Pack.Header.Resent) 117 if (!Pack.Header.Resent)
118 { 118 {
119 // Append any ACKs that need to be sent out to this packet 119 // Append any ACKs that need to be sent out to this packet
120 lock (PendingAcks) 120 lock (PendingAcks)
121 { 121 {
122 if (PendingAcks.Count > 0 && PendingAcks.Count < MAX_APPENDED_ACKS && 122 if (PendingAcks.Count > 0 && PendingAcks.Count < MAX_APPENDED_ACKS &&
123 Pack.Type != PacketType.PacketAck && 123 Pack.Type != PacketType.PacketAck &&
124 Pack.Type != PacketType.LogoutRequest) 124 Pack.Type != PacketType.LogoutRequest)
125 { 125 {
126 Pack.Header.AckList = new uint[PendingAcks.Count]; 126 Pack.Header.AckList = new uint[PendingAcks.Count];
127 int i = 0; 127 int i = 0;
128 128
129 foreach (uint ack in PendingAcks.Values) 129 foreach (uint ack in PendingAcks.Values)
130 { 130 {
131 Pack.Header.AckList[i] = ack; 131 Pack.Header.AckList[i] = ack;
132 i++; 132 i++;
133 } 133 }
134 134
135 PendingAcks.Clear(); 135 PendingAcks.Clear();
136 Pack.Header.AppendedAcks = true; 136 Pack.Header.AppendedAcks = true;
137 } 137 }
138 } 138 }
139 } 139 }
140 } 140 }
141 } 141 }
142 142
143 byte[] ZeroOutBuffer = new byte[4096]; 143 byte[] ZeroOutBuffer = new byte[4096];
144 byte[] sendbuffer; 144 byte[] sendbuffer;
145 sendbuffer = Pack.ToBytes(); 145 sendbuffer = Pack.ToBytes();
146 146
147 try 147 try
148 { 148 {
149 if (Pack.Header.Zerocoded) 149 if (Pack.Header.Zerocoded)
150 { 150 {
151 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); 151 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
152 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP); 152 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP);
153 } 153 }
154 else 154 else
155 { 155 {
156 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP); 156 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP);
157 } 157 }
158 } 158 }
159 catch (Exception) 159 catch (Exception)
160 { 160 {
161 MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread"); 161 MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
162 this.KillThread(); 162 this.KillThread();
163 } 163 }
164 164
165 } 165 }
166 166
167 public virtual void InPacket(Packet NewPack) 167 public virtual void InPacket(Packet NewPack)
168 { 168 {
169 // Handle appended ACKs 169 // Handle appended ACKs
170 if (NewPack.Header.AppendedAcks) 170 if (NewPack.Header.AppendedAcks)
171 { 171 {
172 lock (NeedAck) 172 lock (NeedAck)
173 { 173 {
174 foreach (uint ack in NewPack.Header.AckList) 174 foreach (uint ack in NewPack.Header.AckList)
175 { 175 {
176 NeedAck.Remove(ack); 176 NeedAck.Remove(ack);
177 } 177 }
178 } 178 }
179 } 179 }
180 180
181 // Handle PacketAck packets 181 // Handle PacketAck packets
182 if (NewPack.Type == PacketType.PacketAck) 182 if (NewPack.Type == PacketType.PacketAck)
183 { 183 {
184 PacketAckPacket ackPacket = (PacketAckPacket)NewPack; 184 PacketAckPacket ackPacket = (PacketAckPacket)NewPack;
185 185
186 lock (NeedAck) 186 lock (NeedAck)
187 { 187 {
188 foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) 188 foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets)
189 { 189 {
190 NeedAck.Remove(block.ID); 190 NeedAck.Remove(block.ID);
191 } 191 }
192 } 192 }
193 } 193 }
194 else if ((NewPack.Type == PacketType.StartPingCheck)) 194 else if ((NewPack.Type == PacketType.StartPingCheck))
195 { 195 {
196 //reply to pingcheck 196 //reply to pingcheck
197 StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack; 197 StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack;
198 CompletePingCheckPacket endPing = new CompletePingCheckPacket(); 198 CompletePingCheckPacket endPing = new CompletePingCheckPacket();
199 endPing.PingID.PingID = startPing.PingID.PingID; 199 endPing.PingID.PingID = startPing.PingID.PingID;
200 OutPacket(endPing); 200 OutPacket(endPing);
201 } 201 }
202 else 202 else
203 { 203 {
204 QueItem item = new QueItem(); 204 QueItem item = new QueItem();
205 item.Packet = NewPack; 205 item.Packet = NewPack;
206 item.Incoming = true; 206 item.Incoming = true;
207 this.PacketQueue.Enqueue(item); 207 this.PacketQueue.Enqueue(item);
208 } 208 }
209 209
210 } 210 }
211 211
212 public virtual void OutPacket(Packet NewPack) 212 public virtual void OutPacket(Packet NewPack)
213 { 213 {
214 QueItem item = new QueItem(); 214 QueItem item = new QueItem();
215 item.Packet = NewPack; 215 item.Packet = NewPack;
216 item.Incoming = false; 216 item.Incoming = false;
217 this.PacketQueue.Enqueue(item); 217 this.PacketQueue.Enqueue(item);
218 } 218 }
219 219
220 # region Low Level Packet Methods 220 # region Low Level Packet Methods
221 221
222 protected void ack_pack(Packet Pack) 222 protected void ack_pack(Packet Pack)
223 { 223 {
224 if (Pack.Header.Reliable) 224 if (Pack.Header.Reliable)
225 { 225 {
226 PacketAckPacket ack_it = new PacketAckPacket(); 226 PacketAckPacket ack_it = new PacketAckPacket();
227 ack_it.Packets = new PacketAckPacket.PacketsBlock[1]; 227 ack_it.Packets = new PacketAckPacket.PacketsBlock[1];
228 ack_it.Packets[0] = new PacketAckPacket.PacketsBlock(); 228 ack_it.Packets[0] = new PacketAckPacket.PacketsBlock();
229 ack_it.Packets[0].ID = Pack.Header.Sequence; 229 ack_it.Packets[0].ID = Pack.Header.Sequence;
230 ack_it.Header.Reliable = false; 230 ack_it.Header.Reliable = false;
231 231
232 OutPacket(ack_it); 232 OutPacket(ack_it);
233 233
234 } 234 }
235 /* 235 /*
236 if (Pack.Header.Reliable) 236 if (Pack.Header.Reliable)
237 { 237 {
238 lock (PendingAcks) 238 lock (PendingAcks)
239 { 239 {
240 uint sequence = (uint)Pack.Header.Sequence; 240 uint sequence = (uint)Pack.Header.Sequence;
241 if (!PendingAcks.ContainsKey(sequence)) { PendingAcks[sequence] = sequence; } 241 if (!PendingAcks.ContainsKey(sequence)) { PendingAcks[sequence] = sequence; }
242 } 242 }
243 }*/ 243 }*/
244 } 244 }
245 245
246 protected void ResendUnacked() 246 protected void ResendUnacked()
247 { 247 {
248 int now = System.Environment.TickCount; 248 int now = System.Environment.TickCount;
249 249
250 lock (NeedAck) 250 lock (NeedAck)
251 { 251 {
252 foreach (Packet packet in NeedAck.Values) 252 foreach (Packet packet in NeedAck.Values)
253 { 253 {
254 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) 254 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
255 { 255 {
256 MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " + 256 MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " +
257 (now - packet.TickCount) + "ms have passed"); 257 (now - packet.TickCount) + "ms have passed");
258 258
259 packet.Header.Resent = true; 259 packet.Header.Resent = true;
260 OutPacket(packet); 260 OutPacket(packet);
261 } 261 }
262 } 262 }
263 } 263 }
264 } 264 }
265 265
266 protected void SendAcks() 266 protected void SendAcks()
267 { 267 {
268 lock (PendingAcks) 268 lock (PendingAcks)
269 { 269 {
270 if (PendingAcks.Count > 0) 270 if (PendingAcks.Count > 0)
271 { 271 {
272 if (PendingAcks.Count > 250) 272 if (PendingAcks.Count > 250)
273 { 273 {
274 // FIXME: Handle the odd case where we have too many pending ACKs queued up 274 // FIXME: Handle the odd case where we have too many pending ACKs queued up
275 MainLog.Instance.Verbose( "Too many ACKs queued up!"); 275 MainLog.Instance.Verbose( "Too many ACKs queued up!");
276 return; 276 return;
277 } 277 }
278 278
279 //OpenSim.Framework.Console.MainLog.Instance.WriteLine("Sending PacketAck"); 279 //OpenSim.Framework.Console.MainLog.Instance.WriteLine("Sending PacketAck");
280 280
281 281
282 int i = 0; 282 int i = 0;
283 PacketAckPacket acks = new PacketAckPacket(); 283 PacketAckPacket acks = new PacketAckPacket();
284 acks.Packets = new PacketAckPacket.PacketsBlock[PendingAcks.Count]; 284 acks.Packets = new PacketAckPacket.PacketsBlock[PendingAcks.Count];
285 285
286 foreach (uint ack in PendingAcks.Values) 286 foreach (uint ack in PendingAcks.Values)
287 { 287 {
288 acks.Packets[i] = new PacketAckPacket.PacketsBlock(); 288 acks.Packets[i] = new PacketAckPacket.PacketsBlock();
289 acks.Packets[i].ID = ack; 289 acks.Packets[i].ID = ack;
290 i++; 290 i++;
291 } 291 }
292 292
293 acks.Header.Reliable = false; 293 acks.Header.Reliable = false;
294 OutPacket(acks); 294 OutPacket(acks);
295 295
296 PendingAcks.Clear(); 296 PendingAcks.Clear();
297 } 297 }
298 } 298 }
299 } 299 }
300 300
301 protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea) 301 protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea)
302 { 302 {
303 SendAcks(); 303 SendAcks();
304 ResendUnacked(); 304 ResendUnacked();
305 } 305 }
306 #endregion 306 #endregion
307 307
308 protected virtual void KillThread() 308 protected virtual void KillThread()
309 { 309 {
310 310
311 } 311 }
312 312
313 #region Nested Classes 313 #region Nested Classes
314 314
315 public class QueItem 315 public class QueItem
316 { 316 {
317 public QueItem() 317 public QueItem()
318 { 318 {
319 } 319 }
320 320
321 public Packet Packet; 321 public Packet Packet;
322 public bool Incoming; 322 public bool Incoming;
323 } 323 }
324 #endregion 324 #endregion
325 } 325 }
326} 326}
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index a88c682..466fdde 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -1,184 +1,184 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Net; 29using System.Net;
30using System.Net.Sockets; 30using System.Net.Sockets;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Assets; 32using OpenSim.Assets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Region.Caches; 35using OpenSim.Region.Caches;
36 36
37namespace OpenSim.Region.ClientStack 37namespace OpenSim.Region.ClientStack
38{ 38{
39 public class PacketServer 39 public class PacketServer
40 { 40 {
41 private ClientStackNetworkHandler _networkHandler; 41 private ClientStackNetworkHandler _networkHandler;
42 private IWorld _localWorld; 42 private IWorld _localWorld;
43 public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>(); 43 public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
44 private ClientManager m_clientManager = new ClientManager(); 44 private ClientManager m_clientManager = new ClientManager();
45 public ClientManager ClientManager 45 public ClientManager ClientManager
46 { 46 {
47 get { return m_clientManager; } 47 get { return m_clientManager; }
48 } 48 }
49 49
50 public PacketServer(ClientStackNetworkHandler networkHandler) 50 public PacketServer(ClientStackNetworkHandler networkHandler)
51 { 51 {
52 _networkHandler = networkHandler; 52 _networkHandler = networkHandler;
53 _networkHandler.RegisterPacketServer(this); 53 _networkHandler.RegisterPacketServer(this);
54 } 54 }
55 55
56 public IWorld LocalWorld 56 public IWorld LocalWorld
57 { 57 {
58 set 58 set
59 { 59 {
60 this._localWorld = value; 60 this._localWorld = value;
61 } 61 }
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// 65 ///
66 /// </summary> 66 /// </summary>
67 /// <param name="circuitCode"></param> 67 /// <param name="circuitCode"></param>
68 /// <param name="packet"></param> 68 /// <param name="packet"></param>
69 public virtual void ClientInPacket(uint circuitCode, Packet packet) 69 public virtual void ClientInPacket(uint circuitCode, Packet packet)
70 { 70 {
71 if (this.ClientThreads.ContainsKey(circuitCode)) 71 if (this.ClientThreads.ContainsKey(circuitCode))
72 { 72 {
73 ClientThreads[circuitCode].InPacket(packet); 73 ClientThreads[circuitCode].InPacket(packet);
74 } 74 }
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// 78 ///
79 /// </summary> 79 /// </summary>
80 /// <param name="circuitCode"></param> 80 /// <param name="circuitCode"></param>
81 /// <returns></returns> 81 /// <returns></returns>
82 public virtual bool AddNewCircuitCodeClient(uint circuitCode) 82 public virtual bool AddNewCircuitCodeClient(uint circuitCode)
83 { 83 {
84 return false; 84 return false;
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// 88 ///
89 /// </summary> 89 /// </summary>
90 /// <param name="packet"></param> 90 /// <param name="packet"></param>
91 public virtual void SendPacketToAllClients(Packet packet) 91 public virtual void SendPacketToAllClients(Packet packet)
92 { 92 {
93 93
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// 97 ///
98 /// </summary> 98 /// </summary>
99 /// <param name="packet"></param> 99 /// <param name="packet"></param>
100 /// <param name="simClient"></param> 100 /// <param name="simClient"></param>
101 public virtual void SendPacketToAllExcept(Packet packet, ClientView simClient) 101 public virtual void SendPacketToAllExcept(Packet packet, ClientView simClient)
102 { 102 {
103 103
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// 107 ///
108 /// </summary> 108 /// </summary>
109 /// <param name="packetType"></param> 109 /// <param name="packetType"></param>
110 /// <param name="handler"></param> 110 /// <param name="handler"></param>
111 public virtual void AddClientPacketHandler(PacketType packetType, PacketMethod handler) 111 public virtual void AddClientPacketHandler(PacketType packetType, PacketMethod handler)
112 { 112 {
113 113
114 } 114 }
115 115
116 /// <summary> 116 /// <summary>
117 /// 117 ///
118 /// </summary> 118 /// </summary>
119 public virtual void RegisterClientPacketHandlers() 119 public virtual void RegisterClientPacketHandlers()
120 { 120 {
121 121
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// 125 ///
126 /// </summary> 126 /// </summary>
127 /// <param name="remoteEP"></param> 127 /// <param name="remoteEP"></param>
128 /// <param name="initialcirpack"></param> 128 /// <param name="initialcirpack"></param>
129 /// <param name="clientThreads"></param> 129 /// <param name="clientThreads"></param>
130 /// <param name="world"></param> 130 /// <param name="world"></param>
131 /// <param name="assetCache"></param> 131 /// <param name="assetCache"></param>
132 /// <param name="packServer"></param> 132 /// <param name="packServer"></param>
133 /// <param name="inventoryCache"></param> 133 /// <param name="inventoryCache"></param>
134 /// <param name="authenSessions"></param> 134 /// <param name="authenSessions"></param>
135 /// <returns></returns> 135 /// <returns></returns>
136 protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions) 136 protected virtual ClientView CreateNewClient(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions)
137 { 137 {
138 return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions ); 138 return new ClientView(remoteEP, initialcirpack, clientThreads, world, assetCache, packServer, inventoryCache, authenSessions );
139 } 139 }
140 140
141 /// <summary> 141 /// <summary>
142 /// 142 ///
143 /// </summary> 143 /// </summary>
144 /// <param name="epSender"></param> 144 /// <param name="epSender"></param>
145 /// <param name="useCircuit"></param> 145 /// <param name="useCircuit"></param>
146 /// <param name="assetCache"></param> 146 /// <param name="assetCache"></param>
147 /// <param name="inventoryCache"></param> 147 /// <param name="inventoryCache"></param>
148 /// <param name="authenticateSessionsClass"></param> 148 /// <param name="authenticateSessionsClass"></param>
149 /// <returns></returns> 149 /// <returns></returns>
150 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass) 150 public virtual bool AddNewClient(EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, InventoryCache inventoryCache, AuthenticateSessionsBase authenticateSessionsClass)
151 { 151 {
152 ClientView newuser = 152 ClientView newuser =
153 CreateNewClient(epSender, useCircuit, ClientThreads, _localWorld, assetCache, this, inventoryCache, 153 CreateNewClient(epSender, useCircuit, ClientThreads, _localWorld, assetCache, this, inventoryCache,
154 authenticateSessionsClass); 154 authenticateSessionsClass);
155 155
156 this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); 156 this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
157 this.m_clientManager.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); 157 this.m_clientManager.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser);
158 158
159 return true; 159 return true;
160 } 160 }
161 161
162 /// <summary> 162 /// <summary>
163 /// 163 ///
164 /// </summary> 164 /// </summary>
165 /// <param name="buffer"></param> 165 /// <param name="buffer"></param>
166 /// <param name="size"></param> 166 /// <param name="size"></param>
167 /// <param name="flags"></param> 167 /// <param name="flags"></param>
168 /// <param name="circuitcode"></param> 168 /// <param name="circuitcode"></param>
169 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) 169 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
170 { 170 {
171 this._networkHandler.SendPacketTo(buffer, size, flags, circuitcode); 171 this._networkHandler.SendPacketTo(buffer, size, flags, circuitcode);
172 } 172 }
173 173
174 /// <summary> 174 /// <summary>
175 /// 175 ///
176 /// </summary> 176 /// </summary>
177 /// <param name="circuitcode"></param> 177 /// <param name="circuitcode"></param>
178 public virtual void RemoveClientCircuit(uint circuitcode) 178 public virtual void RemoveClientCircuit(uint circuitcode)
179 { 179 {
180 this._networkHandler.RemoveClientCircuit(circuitcode); 180 this._networkHandler.RemoveClientCircuit(circuitcode);
181 this.m_clientManager.Remove(circuitcode); 181 this.m_clientManager.Remove(circuitcode);
182 } 182 }
183 } 183 }
184} 184}
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 7ae74f8..ed7df17 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -1,118 +1,118 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using OpenSim.Assets; 31using OpenSim.Assets;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Servers; 35using OpenSim.Framework.Servers;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Physics.Manager; 37using OpenSim.Physics.Manager;
38using OpenSim.Region.Caches; 38using OpenSim.Region.Caches;
39using OpenSim.Region.Environment; 39using OpenSim.Region.Environment;
40 40
41namespace OpenSim.Region.ClientStack 41namespace OpenSim.Region.ClientStack
42{ 42{
43 public class RegionApplicationBase 43 public class RegionApplicationBase
44 { 44 {
45 protected IGenericConfig localConfig; 45 protected IGenericConfig localConfig;
46 protected PhysicsManager physManager; 46 protected PhysicsManager physManager;
47 protected AssetCache AssetCache; 47 protected AssetCache AssetCache;
48 protected InventoryCache InventoryCache; 48 protected InventoryCache InventoryCache;
49 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); 49 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
50 protected DateTime startuptime; 50 protected DateTime startuptime;
51 protected NetworkServersInfo serversData; 51 protected NetworkServersInfo serversData;
52 52
53 public string m_physicsEngine; 53 public string m_physicsEngine;
54 public bool m_sandbox = false; 54 public bool m_sandbox = false;
55 public bool m_loginserver; 55 public bool m_loginserver;
56 public bool user_accounts = false; 56 public bool user_accounts = false;
57 public bool gridLocalAsset = false; 57 public bool gridLocalAsset = false;
58 protected bool configFileSetup = false; 58 protected bool configFileSetup = false;
59 public string m_config; 59 public string m_config;
60 60
61 protected List<UDPServer> m_udpServer = new List<UDPServer>(); 61 protected List<UDPServer> m_udpServer = new List<UDPServer>();
62 protected List<RegionInfo> regionData = new List<RegionInfo>(); 62 protected List<RegionInfo> regionData = new List<RegionInfo>();
63 protected List<IWorld> m_localWorld = new List<IWorld>(); 63 protected List<IWorld> m_localWorld = new List<IWorld>();
64 protected BaseHttpServer httpServer; 64 protected BaseHttpServer httpServer;
65 protected List<AuthenticateSessionsBase> AuthenticateSessionsHandler = new List<AuthenticateSessionsBase>(); 65 protected List<AuthenticateSessionsBase> AuthenticateSessionsHandler = new List<AuthenticateSessionsBase>();
66 66
67 protected LogBase m_log; 67 protected LogBase m_log;
68 68
69 public RegionApplicationBase() 69 public RegionApplicationBase()
70 { 70 {
71 71
72 } 72 }
73 73
74 public RegionApplicationBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile) 74 public RegionApplicationBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
75 { 75 {
76 this.configFileSetup = useConfigFile; 76 this.configFileSetup = useConfigFile;
77 m_sandbox = sandBoxMode; 77 m_sandbox = sandBoxMode;
78 m_loginserver = startLoginServer; 78 m_loginserver = startLoginServer;
79 m_physicsEngine = physicsEngine; 79 m_physicsEngine = physicsEngine;
80 m_config = configFile; 80 m_config = configFile;
81 } 81 }
82 82
83 /*protected World m_localWorld; 83 /*protected World m_localWorld;
84 public World LocalWorld 84 public World LocalWorld
85 { 85 {
86 get { return m_localWorld; } 86 get { return m_localWorld; }
87 }*/ 87 }*/
88 88
89 /// <summary> 89 /// <summary>
90 /// Performs initialisation of the world, such as loading configuration from disk. 90 /// Performs initialisation of the world, such as loading configuration from disk.
91 /// </summary> 91 /// </summary>
92 public virtual void StartUp() 92 public virtual void StartUp()
93 { 93 {
94 } 94 }
95 95
96 protected virtual void SetupLocalGridServers() 96 protected virtual void SetupLocalGridServers()
97 { 97 {
98 } 98 }
99 99
100 protected virtual void SetupRemoteGridServers() 100 protected virtual void SetupRemoteGridServers()
101 { 101 {
102 102
103 } 103 }
104 104
105 protected virtual void SetupScene() 105 protected virtual void SetupScene()
106 { 106 {
107 } 107 }
108 108
109 protected virtual void SetupHttpListener() 109 protected virtual void SetupHttpListener()
110 { 110 {
111 } 111 }
112 112
113 protected virtual void ConnectToRemoteGridServer() 113 protected virtual void ConnectToRemoteGridServer()
114 { 114 {
115 115
116 } 116 }
117 } 117 }
118} 118}
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 6eea524..781f96a 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -1,196 +1,196 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Assets; 33using OpenSim.Assets;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
36using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
37using OpenSim.Region.Caches; 37using OpenSim.Region.Caches;
38 38
39namespace OpenSim.Region.ClientStack 39namespace OpenSim.Region.ClientStack
40{ 40{
41 41
42 public class UDPServer : ClientStackNetworkHandler 42 public class UDPServer : ClientStackNetworkHandler
43 { 43 {
44 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); 44 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
45 public Socket Server; 45 public Socket Server;
46 protected IPEndPoint ServerIncoming; 46 protected IPEndPoint ServerIncoming;
47 protected byte[] RecvBuffer = new byte[4096]; 47 protected byte[] RecvBuffer = new byte[4096];
48 protected byte[] ZeroBuffer = new byte[8192]; 48 protected byte[] ZeroBuffer = new byte[8192];
49 protected IPEndPoint ipeSender; 49 protected IPEndPoint ipeSender;
50 protected EndPoint epSender; 50 protected EndPoint epSender;
51 protected AsyncCallback ReceivedData; 51 protected AsyncCallback ReceivedData;
52 protected PacketServer _packetServer; 52 protected PacketServer _packetServer;
53 53
54 protected int listenPort; 54 protected int listenPort;
55 protected IWorld m_localWorld; 55 protected IWorld m_localWorld;
56 protected AssetCache m_assetCache; 56 protected AssetCache m_assetCache;
57 protected InventoryCache m_inventoryCache; 57 protected InventoryCache m_inventoryCache;
58 protected LogBase m_log; 58 protected LogBase m_log;
59 protected AuthenticateSessionsBase m_authenticateSessionsClass; 59 protected AuthenticateSessionsBase m_authenticateSessionsClass;
60 60
61 public PacketServer PacketServer 61 public PacketServer PacketServer
62 { 62 {
63 get 63 get
64 { 64 {
65 return _packetServer; 65 return _packetServer;
66 } 66 }
67 set 67 set
68 { 68 {
69 _packetServer = value; 69 _packetServer = value;
70 } 70 }
71 } 71 }
72 72
73 public IWorld LocalWorld 73 public IWorld LocalWorld
74 { 74 {
75 set 75 set
76 { 76 {
77 this.m_localWorld = value; 77 this.m_localWorld = value;
78 this._packetServer.LocalWorld = this.m_localWorld; 78 this._packetServer.LocalWorld = this.m_localWorld;
79 } 79 }
80 } 80 }
81 81
82 public UDPServer() 82 public UDPServer()
83 { 83 {
84 } 84 }
85 85
86 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, LogBase console, AuthenticateSessionsBase authenticateClass) 86 public UDPServer(int port, AssetCache assetCache, InventoryCache inventoryCache, LogBase console, AuthenticateSessionsBase authenticateClass)
87 { 87 {
88 listenPort = port; 88 listenPort = port;
89 this.m_assetCache = assetCache; 89 this.m_assetCache = assetCache;
90 this.m_inventoryCache = inventoryCache; 90 this.m_inventoryCache = inventoryCache;
91 this.m_log = console; 91 this.m_log = console;
92 this.m_authenticateSessionsClass = authenticateClass; 92 this.m_authenticateSessionsClass = authenticateClass;
93 this.CreatePacketServer(); 93 this.CreatePacketServer();
94 94
95 } 95 }
96 96
97 protected virtual void CreatePacketServer() 97 protected virtual void CreatePacketServer()
98 { 98 {
99 PacketServer packetServer = new PacketServer(this); 99 PacketServer packetServer = new PacketServer(this);
100 } 100 }
101 101
102 protected virtual void OnReceivedData(IAsyncResult result) 102 protected virtual void OnReceivedData(IAsyncResult result)
103 { 103 {
104 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 104 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
105 epSender = (EndPoint)ipeSender; 105 epSender = (EndPoint)ipeSender;
106 Packet packet = null; 106 Packet packet = null;
107 int numBytes = Server.EndReceiveFrom(result, ref epSender); 107 int numBytes = Server.EndReceiveFrom(result, ref epSender);
108 int packetEnd = numBytes - 1; 108 int packetEnd = numBytes - 1;
109 109
110 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 110 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
111 111
112 // do we already have a circuit for this endpoint 112 // do we already have a circuit for this endpoint
113 if (this.clientCircuits.ContainsKey(epSender)) 113 if (this.clientCircuits.ContainsKey(epSender))
114 { 114 {
115 //if so then send packet to the packetserver 115 //if so then send packet to the packetserver
116 this._packetServer.ClientInPacket(this.clientCircuits[epSender], packet); 116 this._packetServer.ClientInPacket(this.clientCircuits[epSender], packet);
117 } 117 }
118 else if (packet.Type == PacketType.UseCircuitCode) 118 else if (packet.Type == PacketType.UseCircuitCode)
119 { 119 {
120 // new client 120 // new client
121 this.AddNewClient(packet); 121 this.AddNewClient(packet);
122 } 122 }
123 else 123 else
124 { // invalid client 124 { // invalid client
125 m_log.Warn("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString()); 125 m_log.Warn("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
126 } 126 }
127 127
128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 128 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
129 } 129 }
130 130
131 protected virtual void AddNewClient(Packet packet) 131 protected virtual void AddNewClient(Packet packet)
132 { 132 {
133 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet; 133 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet;
134 this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code); 134 this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
135 135
136 this.PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_inventoryCache, m_authenticateSessionsClass); 136 this.PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_inventoryCache, m_authenticateSessionsClass);
137 } 137 }
138 138
139 public void ServerListener() 139 public void ServerListener()
140 { 140 {
141 m_log.Status("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort); 141 m_log.Status("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
142 142
143 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); 143 ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort);
144 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 144 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
145 Server.Bind(ServerIncoming); 145 Server.Bind(ServerIncoming);
146 146
147 m_log.Verbose("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 147 m_log.Verbose("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
148 148
149 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 149 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
150 epSender = (EndPoint)ipeSender; 150 epSender = (EndPoint)ipeSender;
151 ReceivedData = new AsyncCallback(this.OnReceivedData); 151 ReceivedData = new AsyncCallback(this.OnReceivedData);
152 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); 152 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
153 153
154 m_log.Verbose("UDPServer.cs:ServerListener() - Listening..."); 154 m_log.Verbose("UDPServer.cs:ServerListener() - Listening...");
155 155
156 } 156 }
157 157
158 public virtual void RegisterPacketServer(PacketServer server) 158 public virtual void RegisterPacketServer(PacketServer server)
159 { 159 {
160 this._packetServer = server; 160 this._packetServer = server;
161 } 161 }
162 162
163 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)//EndPoint packetSender) 163 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)//EndPoint packetSender)
164 { 164 {
165 // find the endpoint for this circuit 165 // find the endpoint for this circuit
166 EndPoint sendto = null; 166 EndPoint sendto = null;
167 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits) 167 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits)
168 { 168 {
169 if (p.Value == circuitcode) 169 if (p.Value == circuitcode)
170 { 170 {
171 sendto = p.Key; 171 sendto = p.Key;
172 break; 172 break;
173 } 173 }
174 } 174 }
175 if (sendto != null) 175 if (sendto != null)
176 { 176 {
177 //we found the endpoint so send the packet to it 177 //we found the endpoint so send the packet to it
178 this.Server.SendTo(buffer, size, flags, sendto); 178 this.Server.SendTo(buffer, size, flags, sendto);
179 } 179 }
180 } 180 }
181 181
182 public virtual void RemoveClientCircuit(uint circuitcode) 182 public virtual void RemoveClientCircuit(uint circuitcode)
183 { 183 {
184 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits) 184 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits)
185 { 185 {
186 if (p.Value == circuitcode) 186 if (p.Value == circuitcode)
187 { 187 {
188 this.clientCircuits.Remove(p.Key); 188 this.clientCircuits.Remove(p.Key);
189 break; 189 break;
190 } 190 }
191 } 191 }
192 } 192 }
193 193
194 194
195 } 195 }
196} \ No newline at end of file 196} \ No newline at end of file
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index c47904d..3ce0cc5 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -1,55 +1,55 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using OpenSim.Framework.Communications; 28using OpenSim.Framework.Communications;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30using OpenSim.Framework.Servers; 30using OpenSim.Framework.Servers;
31 31
32namespace OpenSim.Region.Communications.Local 32namespace OpenSim.Region.Communications.Local
33{ 33{
34 public class CommunicationsLocal : CommunicationsManager 34 public class CommunicationsLocal : CommunicationsManager
35 { 35 {
36 public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); 36 public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
37 public LocalUserServices UserServices; 37 public LocalUserServices UserServices;
38 38
39 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) 39 public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer )
40 : base(serversInfo, httpServer) 40 : base(serversInfo, httpServer)
41 { 41 {
42 UserServices = new LocalUserServices(this, serversInfo); 42 UserServices = new LocalUserServices(this, serversInfo);
43 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); 43 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
44 UserServer = UserServices; 44 UserServer = UserServices;
45 GridServer = SandBoxServices; 45 GridServer = SandBoxServices;
46 InterRegion = SandBoxServices; 46 InterRegion = SandBoxServices;
47 httpServer.AddXmlRPCHandler("login_to_simulator", UserServices.XmlRpcLoginMethod); 47 httpServer.AddXmlRPCHandler("login_to_simulator", UserServices.XmlRpcLoginMethod);
48 } 48 }
49 49
50 internal void InformRegionOfLogin(ulong regionHandle, Login login) 50 internal void InformRegionOfLogin(ulong regionHandle, Login login)
51 { 51 {
52 this.SandBoxServices.AddNewSession(regionHandle, login); 52 this.SandBoxServices.AddNewSession(regionHandle, login);
53 } 53 }
54 } 54 }
55} 55}
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index d0cd991..9322f3b 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -1,206 +1,206 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
32using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
33 33
34namespace OpenSim.Region.Communications.Local 34namespace OpenSim.Region.Communications.Local
35{ 35{
36 36
37 public class LocalBackEndServices : IGridServices, IInterRegionCommunications 37 public class LocalBackEndServices : IGridServices, IInterRegionCommunications
38 { 38 {
39 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); 39 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>();
40 protected Dictionary<ulong, RegionCommsListener> regionHosts = new Dictionary<ulong, RegionCommsListener>(); 40 protected Dictionary<ulong, RegionCommsListener> regionHosts = new Dictionary<ulong, RegionCommsListener>();
41 41
42 public LocalBackEndServices() 42 public LocalBackEndServices()
43 { 43 {
44 44
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
48 /// Register a region method with the BackEnd Services. 48 /// Register a region method with the BackEnd Services.
49 /// </summary> 49 /// </summary>
50 /// <param name="regionInfo"></param> 50 /// <param name="regionInfo"></param>
51 /// <returns></returns> 51 /// <returns></returns>
52 public RegionCommsListener RegisterRegion(RegionInfo regionInfo) 52 public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
53 { 53 {
54 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); 54 //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering");
55 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 55 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
56 { 56 {
57 //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); 57 //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle );
58 this.regions.Add(regionInfo.RegionHandle, regionInfo); 58 this.regions.Add(regionInfo.RegionHandle, regionInfo);
59 RegionCommsListener regionHost = new RegionCommsListener(); 59 RegionCommsListener regionHost = new RegionCommsListener();
60 this.regionHosts.Add(regionInfo.RegionHandle, regionHost); 60 this.regionHosts.Add(regionInfo.RegionHandle, regionHost);
61 61
62 return regionHost; 62 return regionHost;
63 } 63 }
64 64
65 //already in our list of regions so for now lets return null 65 //already in our list of regions so for now lets return null
66 return null; 66 return null;
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// </summary> 70 /// </summary>
71 /// <param name="regionInfo"></param> 71 /// <param name="regionInfo"></param>
72 /// <returns></returns> 72 /// <returns></returns>
73 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 73 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
74 { 74 {
75 // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); 75 // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle);
76 List<RegionInfo> neighbours = new List<RegionInfo>(); 76 List<RegionInfo> neighbours = new List<RegionInfo>();
77 77
78 foreach (RegionInfo reg in this.regions.Values) 78 foreach (RegionInfo reg in this.regions.Values)
79 { 79 {
80 // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); 80 // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY);
81 if (reg.RegionHandle != regionInfo.RegionHandle) 81 if (reg.RegionHandle != regionInfo.RegionHandle)
82 { 82 {
83 //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); 83 //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location");
84 if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2))) 84 if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2)))
85 { 85 {
86 if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2))) 86 if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2)))
87 { 87 {
88 neighbours.Add(reg); 88 neighbours.Add(reg);
89 } 89 }
90 } 90 }
91 } 91 }
92 } 92 }
93 return neighbours; 93 return neighbours;
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// 97 ///
98 /// </summary> 98 /// </summary>
99 /// <param name="regionHandle"></param> 99 /// <param name="regionHandle"></param>
100 /// <returns></returns> 100 /// <returns></returns>
101 public RegionInfo RequestNeighbourInfo(ulong regionHandle) 101 public RegionInfo RequestNeighbourInfo(ulong regionHandle)
102 { 102 {
103 if (this.regions.ContainsKey(regionHandle)) 103 if (this.regions.ContainsKey(regionHandle))
104 { 104 {
105 return this.regions[regionHandle]; 105 return this.regions[regionHandle];
106 } 106 }
107 return null; 107 return null;
108 } 108 }
109 109
110 /// <summary> 110 /// <summary>
111 /// 111 ///
112 /// </summary> 112 /// </summary>
113 /// <param name="minX"></param> 113 /// <param name="minX"></param>
114 /// <param name="minY"></param> 114 /// <param name="minY"></param>
115 /// <param name="maxX"></param> 115 /// <param name="maxX"></param>
116 /// <param name="maxY"></param> 116 /// <param name="maxY"></param>
117 /// <returns></returns> 117 /// <returns></returns>
118 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) 118 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
119 { 119 {
120 List<MapBlockData> mapBlocks = new List<MapBlockData>(); 120 List<MapBlockData> mapBlocks = new List<MapBlockData>();
121 foreach(RegionInfo regInfo in this.regions.Values) 121 foreach(RegionInfo regInfo in this.regions.Values)
122 { 122 {
123 if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY))) 123 if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY)))
124 { 124 {
125 MapBlockData map = new MapBlockData(); 125 MapBlockData map = new MapBlockData();
126 map.Name = regInfo.RegionName; 126 map.Name = regInfo.RegionName;
127 map.X = (ushort)regInfo.RegionLocX; 127 map.X = (ushort)regInfo.RegionLocX;
128 map.Y = (ushort)regInfo.RegionLocY; 128 map.Y = (ushort)regInfo.RegionLocY;
129 map.WaterHeight =(byte) regInfo.estateSettings.waterHeight; 129 map.WaterHeight =(byte) regInfo.estateSettings.waterHeight;
130 map.MapImageId = regInfo.estateSettings.terrainImageID; //new LLUUID("00000000-0000-0000-9999-000000000007"); 130 map.MapImageId = regInfo.estateSettings.terrainImageID; //new LLUUID("00000000-0000-0000-9999-000000000007");
131 map.Agents = 1; 131 map.Agents = 1;
132 map.RegionFlags = 72458694; 132 map.RegionFlags = 72458694;
133 map.Access = 13; 133 map.Access = 13;
134 mapBlocks.Add(map); 134 mapBlocks.Add(map);
135 } 135 }
136 } 136 }
137 return mapBlocks; 137 return mapBlocks;
138 } 138 }
139 139
140 /// <summary> 140 /// <summary>
141 /// </summary> 141 /// </summary>
142 /// <param name="regionHandle"></param> 142 /// <param name="regionHandle"></param>
143 /// <param name="agentData"></param> 143 /// <param name="agentData"></param>
144 /// <returns></returns> 144 /// <returns></returns>
145 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData 145 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
146 { 146 {
147 //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); 147 //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent");
148 if (this.regionHosts.ContainsKey(regionHandle)) 148 if (this.regionHosts.ContainsKey(regionHandle))
149 { 149 {
150 // Console.WriteLine("CommsManager- Informing a region to expect child agent"); 150 // Console.WriteLine("CommsManager- Informing a region to expect child agent");
151 this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); 151 this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData);
152 return true; 152 return true;
153 } 153 }
154 return false; 154 return false;
155 } 155 }
156 156
157 /// <summary> 157 /// <summary>
158 /// 158 ///
159 /// </summary> 159 /// </summary>
160 /// <param name="regionHandle"></param> 160 /// <param name="regionHandle"></param>
161 /// <param name="agentID"></param> 161 /// <param name="agentID"></param>
162 /// <param name="position"></param> 162 /// <param name="position"></param>
163 /// <returns></returns> 163 /// <returns></returns>
164 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 164 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
165 { 165 {
166 if (this.regionHosts.ContainsKey(regionHandle)) 166 if (this.regionHosts.ContainsKey(regionHandle))
167 { 167 {
168 // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing"); 168 // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
169 this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); 169 this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
170 return true; 170 return true;
171 } 171 }
172 return false; 172 return false;
173 } 173 }
174 174
175 /// <summary> 175 /// <summary>
176 /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session 176 /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session
177 /// </summary> 177 /// </summary>
178 /// <param name="regionHandle"></param> 178 /// <param name="regionHandle"></param>
179 /// <param name="loginData"></param> 179 /// <param name="loginData"></param>
180 /// <returns></returns> 180 /// <returns></returns>
181 public bool AddNewSession(ulong regionHandle, Login loginData) 181 public bool AddNewSession(ulong regionHandle, Login loginData)
182 { 182 {
183 AgentCircuitData agent = new AgentCircuitData(); 183 AgentCircuitData agent = new AgentCircuitData();
184 agent.AgentID = loginData.Agent; 184 agent.AgentID = loginData.Agent;
185 agent.firstname = loginData.First; 185 agent.firstname = loginData.First;
186 agent.lastname = loginData.Last; 186 agent.lastname = loginData.Last;
187 agent.SessionID = loginData.Session; 187 agent.SessionID = loginData.Session;
188 agent.SecureSessionID = loginData.SecureSession; 188 agent.SecureSessionID = loginData.SecureSession;
189 agent.circuitcode = loginData.CircuitCode; 189 agent.circuitcode = loginData.CircuitCode;
190 agent.BaseFolder = loginData.BaseFolder; 190 agent.BaseFolder = loginData.BaseFolder;
191 agent.InventoryFolder = loginData.InventoryFolder; 191 agent.InventoryFolder = loginData.InventoryFolder;
192 agent.startpos = new LLVector3(128, 128, 70); 192 agent.startpos = new LLVector3(128, 128, 70);
193 agent.CapsPath = loginData.CapsPath; 193 agent.CapsPath = loginData.CapsPath;
194 194
195 if (this.regionHosts.ContainsKey(regionHandle)) 195 if (this.regionHosts.ContainsKey(regionHandle))
196 { 196 {
197 this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent); 197 this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent);
198 return true; 198 return true;
199 } 199 }
200 200
201 // region not found 201 // region not found
202 return false; 202 return false;
203 } 203 }
204 } 204 }
205} 205}
206 206
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 592b36c..a4cefc4 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -1,142 +1,142 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3using OpenSim.Framework.Communications; 3using OpenSim.Framework.Communications;
4using OpenSim.Framework.Data; 4using OpenSim.Framework.Data;
5using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
6using OpenSim.Framework.UserManagement; 6using OpenSim.Framework.UserManagement;
7using OpenSim.Framework.Utilities; 7using OpenSim.Framework.Utilities;
8 8
9namespace OpenSim.Region.Communications.Local 9namespace OpenSim.Region.Communications.Local
10{ 10{
11 public class LocalUserServices : UserManagerBase, IUserServices 11 public class LocalUserServices : UserManagerBase, IUserServices
12 { 12 {
13 private CommunicationsLocal m_Parent; 13 private CommunicationsLocal m_Parent;
14 14
15 private NetworkServersInfo serversInfo; 15 private NetworkServersInfo serversInfo;
16 private uint defaultHomeX ; 16 private uint defaultHomeX ;
17 private uint defaultHomeY; 17 private uint defaultHomeY;
18 public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversData) 18 public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversData)
19 { 19 {
20 m_Parent = parent; 20 m_Parent = parent;
21 this.serversInfo = serversData; 21 this.serversInfo = serversData;
22 defaultHomeX = this.serversInfo.DefaultHomeLocX; 22 defaultHomeX = this.serversInfo.DefaultHomeLocX;
23 defaultHomeY = this.serversInfo.DefaultHomeLocY; 23 defaultHomeY = this.serversInfo.DefaultHomeLocY;
24 } 24 }
25 25
26 public UserProfileData GetUserProfile(string firstName, string lastName) 26 public UserProfileData GetUserProfile(string firstName, string lastName)
27 { 27 {
28 return GetUserProfile(firstName + " " + lastName); 28 return GetUserProfile(firstName + " " + lastName);
29 } 29 }
30 30
31 public UserProfileData GetUserProfile(string name) 31 public UserProfileData GetUserProfile(string name)
32 { 32 {
33 return this.getUserProfile(name); 33 return this.getUserProfile(name);
34 } 34 }
35 35
36 public UserProfileData GetUserProfile(LLUUID avatarID) 36 public UserProfileData GetUserProfile(LLUUID avatarID)
37 { 37 {
38 return this.getUserProfile(avatarID); 38 return this.getUserProfile(avatarID);
39 } 39 }
40 40
41 /// <summary> 41 /// <summary>
42 /// 42 ///
43 /// </summary> 43 /// </summary>
44 /// <returns></returns> 44 /// <returns></returns>
45 public override string GetMessage() 45 public override string GetMessage()
46 { 46 {
47 return "Welcome to OpenSim"; 47 return "Welcome to OpenSim";
48 } 48 }
49 49
50 public override UserProfileData GetTheUser(string firstname, string lastname) 50 public override UserProfileData GetTheUser(string firstname, string lastname)
51 { 51 {
52 UserProfileData profile = getUserProfile(firstname, lastname); 52 UserProfileData profile = getUserProfile(firstname, lastname);
53 if (profile != null) 53 if (profile != null)
54 { 54 {
55 55
56 return profile; 56 return profile;
57 } 57 }
58 58
59 //no current user account so make one 59 //no current user account so make one
60 Console.WriteLine("No User account found so creating a new one "); 60 Console.WriteLine("No User account found so creating a new one ");
61 this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); 61 this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
62 62
63 profile = getUserProfile(firstname, lastname); 63 profile = getUserProfile(firstname, lastname);
64 64
65 return profile; 65 return profile;
66 } 66 }
67 67
68 public override bool AuthenticateUser(UserProfileData profile, string password) 68 public override bool AuthenticateUser(UserProfileData profile, string password)
69 { 69 {
70 //for now we will accept any password in sandbox mode 70 //for now we will accept any password in sandbox mode
71 Console.WriteLine("authorising user"); 71 Console.WriteLine("authorising user");
72 return true; 72 return true;
73 } 73 }
74 74
75 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) 75 public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
76 { 76 {
77 ulong currentRegion = theUser.currentAgent.currentHandle; 77 ulong currentRegion = theUser.currentAgent.currentHandle;
78 RegionInfo reg = m_Parent.GridServer.RequestNeighbourInfo(currentRegion); 78 RegionInfo reg = m_Parent.GridServer.RequestNeighbourInfo(currentRegion);
79 79
80 if (reg != null) 80 if (reg != null)
81 { 81 {
82 response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + 82 response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " +
83 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 83 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
84 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 84 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
85 string capsPath = Util.GetRandomCapsPath(); 85 string capsPath = Util.GetRandomCapsPath();
86 response.SimAddress = reg.ExternalEndPoint.Address.ToString(); 86 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
87 response.SimPort = (Int32)reg.ExternalEndPoint.Port; 87 response.SimPort = (Int32)reg.ExternalEndPoint.Port;
88 response.RegionX = reg.RegionLocX ; 88 response.RegionX = reg.RegionLocX ;
89 response.RegionY = reg.RegionLocY ; 89 response.RegionY = reg.RegionLocY ;
90 90
91 //following port needs changing as we don't want a http listener for every region (or do we?) 91 //following port needs changing as we don't want a http listener for every region (or do we?)
92 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; 92 response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/";
93 theUser.currentAgent.currentRegion = reg.SimUUID; 93 theUser.currentAgent.currentRegion = reg.SimUUID;
94 theUser.currentAgent.currentHandle = reg.RegionHandle; 94 theUser.currentAgent.currentHandle = reg.RegionHandle;
95 95
96 Login _login = new Login(); 96 Login _login = new Login();
97 //copy data to login object 97 //copy data to login object
98 _login.First = response.Firstname; 98 _login.First = response.Firstname;
99 _login.Last = response.Lastname; 99 _login.Last = response.Lastname;
100 _login.Agent = response.AgentID; 100 _login.Agent = response.AgentID;
101 _login.Session = response.SessionID; 101 _login.Session = response.SessionID;
102 _login.SecureSession = response.SecureSessionID; 102 _login.SecureSession = response.SecureSessionID;
103 _login.CircuitCode = (uint)response.CircuitCode; 103 _login.CircuitCode = (uint)response.CircuitCode;
104 _login.CapsPath = capsPath; 104 _login.CapsPath = capsPath;
105 105
106 m_Parent.InformRegionOfLogin(currentRegion, _login); 106 m_Parent.InformRegionOfLogin(currentRegion, _login);
107 } 107 }
108 else 108 else
109 { 109 {
110 Console.WriteLine("not found region " + currentRegion); 110 Console.WriteLine("not found region " + currentRegion);
111 } 111 }
112 112
113 } 113 }
114 114
115 public UserProfileData SetupMasterUser(string firstName, string lastName) 115 public UserProfileData SetupMasterUser(string firstName, string lastName)
116 { 116 {
117 return SetupMasterUser(firstName, lastName, ""); 117 return SetupMasterUser(firstName, lastName, "");
118 } 118 }
119 119
120 public UserProfileData SetupMasterUser(string firstName, string lastName, string password) 120 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
121 { 121 {
122 UserProfileData profile = getUserProfile(firstName, lastName); 122 UserProfileData profile = getUserProfile(firstName, lastName);
123 if (profile != null) 123 if (profile != null)
124 { 124 {
125 125
126 return profile; 126 return profile;
127 } 127 }
128 128
129 Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); 129 Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
130 this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); 130 this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY);
131 131
132 profile = getUserProfile(firstName, lastName); 132 profile = getUserProfile(firstName, lastName);
133 133
134 if (profile == null) 134 if (profile == null)
135 { 135 {
136 Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here."); 136 Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here.");
137 } 137 }
138 138
139 return profile; 139 return profile;
140 } 140 }
141 } 141 }
142} 142}
diff --git a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs
index 9afb75e..ca64319 100644
--- a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.Region.Communications.Local")] 6[assembly: AssemblyTitle("OpenSim.Region.Communications.Local")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.Region.Communications.Local")] 10[assembly: AssemblyProduct("OpenSim.Region.Communications.Local")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("fb173926-bd0a-4cd0-bb45-185b2f72ddfb")] 21[assembly: Guid("fb173926-bd0a-4cd0-bb45-185b2f72ddfb")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
index cc05845..9df0901 100644
--- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
+++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
@@ -1,18 +1,18 @@
1using OpenSim.Framework.Communications; 1using OpenSim.Framework.Communications;
2using OpenSim.Framework.Types; 2using OpenSim.Framework.Types;
3using OpenSim.Framework.Servers; 3using OpenSim.Framework.Servers;
4 4
5namespace OpenSim.Region.Communications.OGS1 5namespace OpenSim.Region.Communications.OGS1
6{ 6{
7 public class CommunicationsOGS1 : CommunicationsManager 7 public class CommunicationsOGS1 : CommunicationsManager
8 { 8 {
9 9
10 public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer) 10 public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer)
11 { 11 {
12 OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); 12 OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
13 GridServer = gridInterComms; 13 GridServer = gridInterComms;
14 InterRegion = gridInterComms; 14 InterRegion = gridInterComms;
15 UserServer = new OGS1UserServices(this); 15 UserServer = new OGS1UserServices(this);
16 } 16 }
17 } 17 }
18} 18}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index e5a73fd..3cb2889 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -1,431 +1,431 @@
1using System; 1using System;
2using System.Collections; 2using System.Collections;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Net; 4using System.Net;
5using System.Runtime.Remoting; 5using System.Runtime.Remoting;
6using System.Runtime.Remoting.Channels; 6using System.Runtime.Remoting.Channels;
7using System.Runtime.Remoting.Channels.Tcp; 7using System.Runtime.Remoting.Channels.Tcp;
8using libsecondlife; 8using libsecondlife;
9using Nwc.XmlRpc; 9using Nwc.XmlRpc;
10using OpenSim.Framework; 10using OpenSim.Framework;
11using OpenSim.Framework.Communications; 11using OpenSim.Framework.Communications;
12using OpenSim.Framework.Console; 12using OpenSim.Framework.Console;
13using OpenSim.Framework.Servers; 13using OpenSim.Framework.Servers;
14using OpenSim.Framework.Types; 14using OpenSim.Framework.Types;
15 15
16namespace OpenSim.Region.Communications.OGS1 16namespace OpenSim.Region.Communications.OGS1
17{ 17{
18 public class OGS1GridServices : IGridServices, IInterRegionCommunications 18 public class OGS1GridServices : IGridServices, IInterRegionCommunications
19 { 19 {
20 public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); 20 public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>();
21 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); 21 protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>();
22 22
23 public BaseHttpServer httpListener; 23 public BaseHttpServer httpListener;
24 public NetworkServersInfo serversInfo; 24 public NetworkServersInfo serversInfo;
25 public BaseHttpServer httpServer; 25 public BaseHttpServer httpServer;
26 26
27 /// <summary> 27 /// <summary>
28 /// 28 ///
29 /// </summary> 29 /// </summary>
30 /// <param name="servers_info"></param> 30 /// <param name="servers_info"></param>
31 /// <param name="httpServe"></param> 31 /// <param name="httpServe"></param>
32 public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) 32 public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
33 { 33 {
34 serversInfo = servers_info; 34 serversInfo = servers_info;
35 httpServer = httpServe; 35 httpServer = httpServe;
36 httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser); 36 httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser);
37 this.StartRemoting(); 37 this.StartRemoting();
38 } 38 }
39 39
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 /// <param name="regionInfo"></param> 43 /// <param name="regionInfo"></param>
44 /// <returns></returns> 44 /// <returns></returns>
45 public RegionCommsListener RegisterRegion(RegionInfo regionInfo) 45 public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
46 { 46 {
47 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 47 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
48 { 48 {
49 this.regions.Add(regionInfo.RegionHandle, regionInfo); 49 this.regions.Add(regionInfo.RegionHandle, regionInfo);
50 } 50 }
51 51
52 Hashtable GridParams = new Hashtable(); 52 Hashtable GridParams = new Hashtable();
53 // Login / Authentication 53 // Login / Authentication
54 54
55 GridParams["authkey"] = serversInfo.GridSendKey; 55 GridParams["authkey"] = serversInfo.GridSendKey;
56 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); 56 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated();
57 GridParams["sim_ip"] = regionInfo.ExternalHostName; 57 GridParams["sim_ip"] = regionInfo.ExternalHostName;
58 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); 58 GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString();
59 GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); 59 GridParams["region_locx"] = regionInfo.RegionLocX.ToString();
60 GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); 60 GridParams["region_locy"] = regionInfo.RegionLocY.ToString();
61 GridParams["sim_name"] = regionInfo.RegionName; 61 GridParams["sim_name"] = regionInfo.RegionName;
62 GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); 62 GridParams["http_port"] = serversInfo.HttpListenerPort.ToString();
63 GridParams["remoting_port"] = serversInfo.RemotingListenerPort.ToString(); 63 GridParams["remoting_port"] = serversInfo.RemotingListenerPort.ToString();
64 GridParams["map-image-id"] = regionInfo.estateSettings.terrainImageID.ToStringHyphenated(); 64 GridParams["map-image-id"] = regionInfo.estateSettings.terrainImageID.ToStringHyphenated();
65 65
66 // Package into an XMLRPC Request 66 // Package into an XMLRPC Request
67 ArrayList SendParams = new ArrayList(); 67 ArrayList SendParams = new ArrayList();
68 SendParams.Add(GridParams); 68 SendParams.Add(GridParams);
69 69
70 // Send Request 70 // Send Request
71 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); 71 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
72 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); 72 XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000);
73 Hashtable GridRespData = (Hashtable)GridResp.Value; 73 Hashtable GridRespData = (Hashtable)GridResp.Value;
74 74
75 Hashtable griddatahash = GridRespData; 75 Hashtable griddatahash = GridRespData;
76 76
77 // Process Response 77 // Process Response
78 if (GridRespData.ContainsKey("error")) 78 if (GridRespData.ContainsKey("error"))
79 { 79 {
80 string errorstring = (string)GridRespData["error"]; 80 string errorstring = (string)GridRespData["error"];
81 MainLog.Instance.Error("Unable to connect to grid: " + errorstring); 81 MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
82 return null; 82 return null;
83 } 83 }
84 84
85 // Initialise the background listeners 85 // Initialise the background listeners
86 RegionCommsListener regListener = new RegionCommsListener(); 86 RegionCommsListener regListener = new RegionCommsListener();
87 if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) 87 if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
88 { 88 {
89 this.listeners.Add(regionInfo.RegionHandle, regListener); 89 this.listeners.Add(regionInfo.RegionHandle, regListener);
90 } 90 }
91 else 91 else
92 { 92 {
93 listeners[regionInfo.RegionHandle] = regListener; 93 listeners[regionInfo.RegionHandle] = regListener;
94 } 94 }
95 95
96 return regListener; 96 return regListener;
97 } 97 }
98 98
99 /// <summary> 99 /// <summary>
100 /// 100 ///
101 /// </summary> 101 /// </summary>
102 /// <param name="regionInfo"></param> 102 /// <param name="regionInfo"></param>
103 /// <returns></returns> 103 /// <returns></returns>
104 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 104 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
105 { 105 {
106 106
107 Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); 107 Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1);
108 108
109 List<RegionInfo> neighbours = new List<RegionInfo>(); 109 List<RegionInfo> neighbours = new List<RegionInfo>();
110 110
111 foreach (ArrayList a in respData.Values) 111 foreach (ArrayList a in respData.Values)
112 { 112 {
113 foreach (Hashtable n in a) 113 foreach (Hashtable n in a)
114 { 114 {
115 uint regX = Convert.ToUInt32(n["x"]); 115 uint regX = Convert.ToUInt32(n["x"]);
116 uint regY = Convert.ToUInt32(n["y"]); 116 uint regY = Convert.ToUInt32(n["y"]);
117 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) 117 if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY))
118 { 118 {
119 string externalIpStr = (string)n["sim_ip"]; 119 string externalIpStr = (string)n["sim_ip"];
120 uint port = Convert.ToUInt32(n["sim_port"]); 120 uint port = Convert.ToUInt32(n["sim_port"]);
121 string externalUri = (string)n["sim_uri"]; 121 string externalUri = (string)n["sim_uri"];
122 122
123 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); 123 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port);
124 string neighbourExternalUri = externalUri; 124 string neighbourExternalUri = externalUri;
125 RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); 125 RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr);
126 126
127 //OGS1 127 //OGS1
128 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally 128 //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally
129 129
130 neighbour.RegionName = (string)n["name"]; 130 neighbour.RegionName = (string)n["name"];
131 131
132 //OGS1+ 132 //OGS1+
133 neighbour.SimUUID = (string)n["uuid"]; 133 neighbour.SimUUID = (string)n["uuid"];
134 134
135 neighbours.Add(neighbour); 135 neighbours.Add(neighbour);
136 } 136 }
137 } 137 }
138 } 138 }
139 139
140 return neighbours; 140 return neighbours;
141 } 141 }
142 142
143 /// <summary> 143 /// <summary>
144 /// 144 ///
145 /// </summary> 145 /// </summary>
146 /// <param name="regionHandle"></param> 146 /// <param name="regionHandle"></param>
147 /// <returns></returns> 147 /// <returns></returns>
148 public RegionInfo RequestNeighbourInfo(ulong regionHandle) 148 public RegionInfo RequestNeighbourInfo(ulong regionHandle)
149 { 149 {
150 if (this.regions.ContainsKey(regionHandle)) 150 if (this.regions.ContainsKey(regionHandle))
151 { 151 {
152 return this.regions[regionHandle]; 152 return this.regions[regionHandle];
153 } 153 }
154 //TODO not a region in this instance so ask remote grid server 154 //TODO not a region in this instance so ask remote grid server
155 155
156 Hashtable requestData = new Hashtable(); 156 Hashtable requestData = new Hashtable();
157 requestData["region_handle"] = regionHandle.ToString(); 157 requestData["region_handle"] = regionHandle.ToString();
158 requestData["authkey"] = this.serversInfo.GridSendKey; 158 requestData["authkey"] = this.serversInfo.GridSendKey;
159 ArrayList SendParams = new ArrayList(); 159 ArrayList SendParams = new ArrayList();
160 SendParams.Add(requestData); 160 SendParams.Add(requestData);
161 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 161 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
162 XmlRpcResponse GridResp = GridReq.Send(this.serversInfo.GridURL, 3000); 162 XmlRpcResponse GridResp = GridReq.Send(this.serversInfo.GridURL, 3000);
163 163
164 Hashtable responseData = (Hashtable)GridResp.Value; 164 Hashtable responseData = (Hashtable)GridResp.Value;
165 165
166 if (responseData.ContainsKey("error")) 166 if (responseData.ContainsKey("error"))
167 { 167 {
168 Console.WriteLine("error received from grid server" + responseData["error"]); 168 Console.WriteLine("error received from grid server" + responseData["error"]);
169 return null; 169 return null;
170 } 170 }
171 171
172 uint regX = Convert.ToUInt32((string)responseData["region_locx"]); 172 uint regX = Convert.ToUInt32((string)responseData["region_locx"]);
173 uint regY = Convert.ToUInt32((string)responseData["region_locy"]); 173 uint regY = Convert.ToUInt32((string)responseData["region_locy"]);
174 string internalIpStr = (string)responseData["sim_ip"]; 174 string internalIpStr = (string)responseData["sim_ip"];
175 uint port = Convert.ToUInt32(responseData["sim_port"]); 175 uint port = Convert.ToUInt32(responseData["sim_port"]);
176 string externalUri = (string)responseData["sim_uri"]; 176 string externalUri = (string)responseData["sim_uri"];
177 177
178 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); 178 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port);
179 string neighbourExternalUri = externalUri; 179 string neighbourExternalUri = externalUri;
180 RegionInfo regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); 180 RegionInfo regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr);
181 181
182 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 182 regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
183 regionInfo.RemotingAddress = internalIpStr; 183 regionInfo.RemotingAddress = internalIpStr;
184 184
185 regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]); 185 regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]);
186 regionInfo.RegionName = (string)responseData["region_name"]; 186 regionInfo.RegionName = (string)responseData["region_name"];
187 187
188 return regionInfo; 188 return regionInfo;
189 } 189 }
190 190
191 /// <summary> 191 /// <summary>
192 /// 192 ///
193 /// </summary> 193 /// </summary>
194 /// <param name="minX"></param> 194 /// <param name="minX"></param>
195 /// <param name="minY"></param> 195 /// <param name="minY"></param>
196 /// <param name="maxX"></param> 196 /// <param name="maxX"></param>
197 /// <param name="maxY"></param> 197 /// <param name="maxY"></param>
198 /// <returns></returns> 198 /// <returns></returns>
199 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) 199 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
200 { 200 {
201 Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY); 201 Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
202 202
203 List<MapBlockData> neighbours = new List<MapBlockData>(); 203 List<MapBlockData> neighbours = new List<MapBlockData>();
204 204
205 foreach (ArrayList a in respData.Values) 205 foreach (ArrayList a in respData.Values)
206 { 206 {
207 foreach (Hashtable n in a) 207 foreach (Hashtable n in a)
208 { 208 {
209 MapBlockData neighbour = new MapBlockData(); 209 MapBlockData neighbour = new MapBlockData();
210 210
211 neighbour.X = Convert.ToUInt16(n["x"]); 211 neighbour.X = Convert.ToUInt16(n["x"]);
212 neighbour.Y = Convert.ToUInt16(n["y"]); 212 neighbour.Y = Convert.ToUInt16(n["y"]);
213 213
214 neighbour.Name = (string)n["name"]; 214 neighbour.Name = (string)n["name"];
215 neighbour.Access = Convert.ToByte(n["access"]); 215 neighbour.Access = Convert.ToByte(n["access"]);
216 neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]); 216 neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]);
217 neighbour.WaterHeight = Convert.ToByte(n["water-height"]); 217 neighbour.WaterHeight = Convert.ToByte(n["water-height"]);
218 neighbour.MapImageId = new LLUUID((string)n["map-image-id"]); 218 neighbour.MapImageId = new LLUUID((string)n["map-image-id"]);
219 219
220 neighbours.Add(neighbour); 220 neighbours.Add(neighbour);
221 } 221 }
222 } 222 }
223 223
224 return neighbours; 224 return neighbours;
225 } 225 }
226 226
227 /// <summary> 227 /// <summary>
228 /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates 228 /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates
229 /// </summary> 229 /// </summary>
230 /// <remarks>REDUNDANT - OGS1 is to be phased out in favour of OGS2</remarks> 230 /// <remarks>REDUNDANT - OGS1 is to be phased out in favour of OGS2</remarks>
231 /// <param name="minX">Minimum X value</param> 231 /// <param name="minX">Minimum X value</param>
232 /// <param name="minY">Minimum Y value</param> 232 /// <param name="minY">Minimum Y value</param>
233 /// <param name="maxX">Maximum X value</param> 233 /// <param name="maxX">Maximum X value</param>
234 /// <param name="maxY">Maximum Y value</param> 234 /// <param name="maxY">Maximum Y value</param>
235 /// <returns>Hashtable of hashtables containing map data elements</returns> 235 /// <returns>Hashtable of hashtables containing map data elements</returns>
236 private Hashtable MapBlockQuery(int minX, int minY, int maxX, int maxY) 236 private Hashtable MapBlockQuery(int minX, int minY, int maxX, int maxY)
237 { 237 {
238 Hashtable param = new Hashtable(); 238 Hashtable param = new Hashtable();
239 param["xmin"] = minX; 239 param["xmin"] = minX;
240 param["ymin"] = minY; 240 param["ymin"] = minY;
241 param["xmax"] = maxX; 241 param["xmax"] = maxX;
242 param["ymax"] = maxY; 242 param["ymax"] = maxY;
243 IList parameters = new ArrayList(); 243 IList parameters = new ArrayList();
244 parameters.Add(param); 244 parameters.Add(param);
245 XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); 245 XmlRpcRequest req = new XmlRpcRequest("map_block", parameters);
246 XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); 246 XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000);
247 Hashtable respData = (Hashtable)resp.Value; 247 Hashtable respData = (Hashtable)resp.Value;
248 return respData; 248 return respData;
249 } 249 }
250 250
251 // Grid Request Processing 251 // Grid Request Processing
252 /// <summary> 252 /// <summary>
253 /// 253 ///
254 /// </summary> 254 /// </summary>
255 /// <param name="request"></param> 255 /// <param name="request"></param>
256 /// <returns></returns> 256 /// <returns></returns>
257 public XmlRpcResponse ExpectUser(XmlRpcRequest request) 257 public XmlRpcResponse ExpectUser(XmlRpcRequest request)
258 { 258 {
259 Console.WriteLine("Expecting User..."); 259 Console.WriteLine("Expecting User...");
260 Hashtable requestData = (Hashtable)request.Params[0]; 260 Hashtable requestData = (Hashtable)request.Params[0];
261 AgentCircuitData agentData = new AgentCircuitData(); 261 AgentCircuitData agentData = new AgentCircuitData();
262 agentData.SessionID = new LLUUID((string)requestData["session_id"]); 262 agentData.SessionID = new LLUUID((string)requestData["session_id"]);
263 agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); 263 agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]);
264 agentData.firstname = (string)requestData["firstname"]; 264 agentData.firstname = (string)requestData["firstname"];
265 agentData.lastname = (string)requestData["lastname"]; 265 agentData.lastname = (string)requestData["lastname"];
266 agentData.AgentID = new LLUUID((string)requestData["agent_id"]); 266 agentData.AgentID = new LLUUID((string)requestData["agent_id"]);
267 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); 267 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
268 agentData.CapsPath = (string)requestData["caps_path"]; 268 agentData.CapsPath = (string)requestData["caps_path"];
269 269
270 if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) 270 if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
271 { 271 {
272 agentData.child = true; 272 agentData.child = true;
273 } 273 }
274 else 274 else
275 { 275 {
276 agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); 276 agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
277 agentData.child = false; 277 agentData.child = false;
278 278
279 } 279 }
280 280
281 if (listeners.ContainsKey(Convert.ToUInt64((string)requestData["regionhandle"]))) 281 if (listeners.ContainsKey(Convert.ToUInt64((string)requestData["regionhandle"])))
282 { 282 {
283 this.listeners[Convert.ToUInt64((string)requestData["regionhandle"])].TriggerExpectUser(Convert.ToUInt64((string)requestData["regionhandle"]), agentData); 283 this.listeners[Convert.ToUInt64((string)requestData["regionhandle"])].TriggerExpectUser(Convert.ToUInt64((string)requestData["regionhandle"]), agentData);
284 } 284 }
285 else 285 else
286 { 286 {
287 MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString()); 287 MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString());
288 } 288 }
289 289
290 MainLog.Instance.Verbose("ExpectUser() - Welcoming new user..."); 290 MainLog.Instance.Verbose("ExpectUser() - Welcoming new user...");
291 291
292 return new XmlRpcResponse(); 292 return new XmlRpcResponse();
293 } 293 }
294 294
295 #region InterRegion Comms 295 #region InterRegion Comms
296 /// <summary> 296 /// <summary>
297 /// 297 ///
298 /// </summary> 298 /// </summary>
299 private void StartRemoting() 299 private void StartRemoting()
300 { 300 {
301 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); 301 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort);
302 ChannelServices.RegisterChannel(ch, true); 302 ChannelServices.RegisterChannel(ch, true);
303 303
304 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); 304 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton);
305 RemotingConfiguration.RegisterWellKnownServiceType(wellType); 305 RemotingConfiguration.RegisterWellKnownServiceType(wellType);
306 InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; 306 InterRegionSingleton.Instance.OnArrival += this.IncomingArrival;
307 InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; 307 InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent;
308 } 308 }
309 309
310 #region Methods called by regions in this instance 310 #region Methods called by regions in this instance
311 /// <summary> 311 /// <summary>
312 /// 312 ///
313 /// </summary> 313 /// </summary>
314 /// <param name="regionHandle"></param> 314 /// <param name="regionHandle"></param>
315 /// <param name="agentData"></param> 315 /// <param name="agentData"></param>
316 /// <returns></returns> 316 /// <returns></returns>
317 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 317 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
318 { 318 {
319 if (this.listeners.ContainsKey(regionHandle)) 319 if (this.listeners.ContainsKey(regionHandle))
320 { 320 {
321 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); 321 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
322 return true; 322 return true;
323 } 323 }
324 RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); 324 RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
325 if (regInfo != null) 325 if (regInfo != null)
326 { 326 {
327 //don't want to be creating a new link to the remote instance every time like we are here 327 //don't want to be creating a new link to the remote instance every time like we are here
328 bool retValue = false; 328 bool retValue = false;
329 329
330 330
331 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 331 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
332 typeof(OGS1InterRegionRemoting), 332 typeof(OGS1InterRegionRemoting),
333 "tcp://"+ regInfo.RemotingAddress+":"+regInfo.RemotingPort+"/InterRegions"); 333 "tcp://"+ regInfo.RemotingAddress+":"+regInfo.RemotingPort+"/InterRegions");
334 if (remObject != null) 334 if (remObject != null)
335 { 335 {
336 336
337 retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData); 337 retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData);
338 } 338 }
339 else 339 else
340 { 340 {
341 Console.WriteLine("remoting object not found"); 341 Console.WriteLine("remoting object not found");
342 } 342 }
343 remObject = null; 343 remObject = null;
344 344
345 345
346 return retValue; 346 return retValue;
347 } 347 }
348 348
349 return false; 349 return false;
350 } 350 }
351 351
352 /// <summary> 352 /// <summary>
353 /// 353 ///
354 /// </summary> 354 /// </summary>
355 /// <param name="regionHandle"></param> 355 /// <param name="regionHandle"></param>
356 /// <param name="agentID"></param> 356 /// <param name="agentID"></param>
357 /// <param name="position"></param> 357 /// <param name="position"></param>
358 /// <returns></returns> 358 /// <returns></returns>
359 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 359 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
360 { 360 {
361 if (this.listeners.ContainsKey(regionHandle)) 361 if (this.listeners.ContainsKey(regionHandle))
362 { 362 {
363 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); 363 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
364 return true; 364 return true;
365 } 365 }
366 RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); 366 RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
367 if (regInfo != null) 367 if (regInfo != null)
368 { 368 {
369 bool retValue = false; 369 bool retValue = false;
370 370
371 371
372 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( 372 OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject(
373 typeof(OGS1InterRegionRemoting), 373 typeof(OGS1InterRegionRemoting),
374 "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions"); 374 "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
375 if (remObject != null) 375 if (remObject != null)
376 { 376 {
377 377
378 retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position); 378 retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position);
379 } 379 }
380 else 380 else
381 { 381 {
382 Console.WriteLine("remoting object not found"); 382 Console.WriteLine("remoting object not found");
383 } 383 }
384 remObject = null; 384 remObject = null;
385 385
386 386
387 return retValue; 387 return retValue;
388 } 388 }
389 //TODO need to see if we know about where this region is and use .net remoting 389 //TODO need to see if we know about where this region is and use .net remoting
390 // to inform it. 390 // to inform it.
391 return false; 391 return false;
392 } 392 }
393 #endregion 393 #endregion
394 394
395 #region Methods triggered by calls from external instances 395 #region Methods triggered by calls from external instances
396 /// <summary> 396 /// <summary>
397 /// 397 ///
398 /// </summary> 398 /// </summary>
399 /// <param name="regionHandle"></param> 399 /// <param name="regionHandle"></param>
400 /// <param name="agentData"></param> 400 /// <param name="agentData"></param>
401 /// <returns></returns> 401 /// <returns></returns>
402 public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) 402 public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
403 { 403 {
404 if (this.listeners.ContainsKey(regionHandle)) 404 if (this.listeners.ContainsKey(regionHandle))
405 { 405 {
406 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); 406 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
407 return true; 407 return true;
408 } 408 }
409 return false; 409 return false;
410 } 410 }
411 411
412 /// <summary> 412 /// <summary>
413 /// 413 ///
414 /// </summary> 414 /// </summary>
415 /// <param name="regionHandle"></param> 415 /// <param name="regionHandle"></param>
416 /// <param name="agentID"></param> 416 /// <param name="agentID"></param>
417 /// <param name="position"></param> 417 /// <param name="position"></param>
418 /// <returns></returns> 418 /// <returns></returns>
419 public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position) 419 public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position)
420 { 420 {
421 if (this.listeners.ContainsKey(regionHandle)) 421 if (this.listeners.ContainsKey(regionHandle))
422 { 422 {
423 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); 423 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
424 return true; 424 return true;
425 } 425 }
426 return false; 426 return false;
427 } 427 }
428 #endregion 428 #endregion
429 #endregion 429 #endregion
430 } 430 }
431} 431}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
index f514a29..520c593 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -1,69 +1,69 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3using OpenSim.Framework.Types; 3using OpenSim.Framework.Types;
4 4
5namespace OpenSim.Region.Communications.OGS1 5namespace OpenSim.Region.Communications.OGS1
6{ 6{
7 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); 7 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
8 public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position); 8 public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position);
9 9
10 public sealed class InterRegionSingleton 10 public sealed class InterRegionSingleton
11 { 11 {
12 static readonly InterRegionSingleton instance = new InterRegionSingleton(); 12 static readonly InterRegionSingleton instance = new InterRegionSingleton();
13 13
14 public event InformRegionChild OnChildAgent; 14 public event InformRegionChild OnChildAgent;
15 public event ExpectArrival OnArrival; 15 public event ExpectArrival OnArrival;
16 16
17 static InterRegionSingleton() 17 static InterRegionSingleton()
18 { 18 {
19 } 19 }
20 20
21 InterRegionSingleton() 21 InterRegionSingleton()
22 { 22 {
23 } 23 }
24 24
25 public static InterRegionSingleton Instance 25 public static InterRegionSingleton Instance
26 { 26 {
27 get 27 get
28 { 28 {
29 return instance; 29 return instance;
30 } 30 }
31 } 31 }
32 32
33 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 33 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
34 { 34 {
35 if (OnChildAgent != null) 35 if (OnChildAgent != null)
36 { 36 {
37 return OnChildAgent(regionHandle, agentData); 37 return OnChildAgent(regionHandle, agentData);
38 } 38 }
39 return false; 39 return false;
40 } 40 }
41 41
42 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 42 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
43 { 43 {
44 if (OnArrival != null) 44 if (OnArrival != null)
45 { 45 {
46 return OnArrival(regionHandle, agentID, position); 46 return OnArrival(regionHandle, agentID, position);
47 } 47 }
48 return false; 48 return false;
49 } 49 }
50 } 50 }
51 51
52 public class OGS1InterRegionRemoting : MarshalByRefObject 52 public class OGS1InterRegionRemoting : MarshalByRefObject
53 { 53 {
54 54
55 public OGS1InterRegionRemoting() 55 public OGS1InterRegionRemoting()
56 { 56 {
57 } 57 }
58 58
59 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 59 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
60 { 60 {
61 return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData); 61 return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData);
62 } 62 }
63 63
64 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 64 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
65 { 65 {
66 return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position); 66 return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position);
67 } 67 }
68 } 68 }
69} 69}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 46d71c4..0847148 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -1,101 +1,101 @@
1using System; 1using System;
2using System.Collections; 2using System.Collections;
3using libsecondlife; 3using libsecondlife;
4using Nwc.XmlRpc; 4using Nwc.XmlRpc;
5using OpenSim.Framework.Communications; 5using OpenSim.Framework.Communications;
6using OpenSim.Framework.Data; 6using OpenSim.Framework.Data;
7 7
8namespace OpenSim.Region.Communications.OGS1 8namespace OpenSim.Region.Communications.OGS1
9{ 9{
10 public class OGS1UserServices :IUserServices 10 public class OGS1UserServices :IUserServices
11 { 11 {
12 CommunicationsOGS1 m_parent; 12 CommunicationsOGS1 m_parent;
13 public OGS1UserServices(CommunicationsOGS1 parent) 13 public OGS1UserServices(CommunicationsOGS1 parent)
14 { 14 {
15 m_parent = parent; 15 m_parent = parent;
16 } 16 }
17 17
18 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data) 18 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
19 { 19 {
20 if (data.Contains("error_type")) 20 if (data.Contains("error_type"))
21 { 21 {
22 Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]); 22 Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]);
23 return null; 23 return null;
24 } 24 }
25 25
26 UserProfileData userData = new UserProfileData(); 26 UserProfileData userData = new UserProfileData();
27 userData.username = (string)data["firstname"]; 27 userData.username = (string)data["firstname"];
28 userData.surname = (string)data["lastname"]; 28 userData.surname = (string)data["lastname"];
29 userData.UUID = new LLUUID((string)data["uuid"]); 29 userData.UUID = new LLUUID((string)data["uuid"]);
30 userData.userInventoryURI = (string)data["server_inventory"]; 30 userData.userInventoryURI = (string)data["server_inventory"];
31 userData.userAssetURI = (string)data["server_asset"]; 31 userData.userAssetURI = (string)data["server_asset"];
32 userData.profileFirstText = (string)data["profile_firstlife_about"]; 32 userData.profileFirstText = (string)data["profile_firstlife_about"];
33 userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); 33 userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
34 userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); 34 userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
35 userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); 35 userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
36 userData.profileImage = new LLUUID((string)data["profile_image"]); 36 userData.profileImage = new LLUUID((string)data["profile_image"]);
37 userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); 37 userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
38 userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); 38 userData.homeRegion = Convert.ToUInt64((string)data["home_region"]);
39 userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); 39 userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"]));
40 userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); 40 userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"]));
41 41
42 return userData; 42 return userData;
43 } 43 }
44 public UserProfileData GetUserProfile(string firstName, string lastName) 44 public UserProfileData GetUserProfile(string firstName, string lastName)
45 { 45 {
46 return GetUserProfile(firstName + " " + lastName); 46 return GetUserProfile(firstName + " " + lastName);
47 } 47 }
48 public UserProfileData GetUserProfile(string name) 48 public UserProfileData GetUserProfile(string name)
49 { 49 {
50 //try 50 //try
51 //{ 51 //{
52 Hashtable param = new Hashtable(); 52 Hashtable param = new Hashtable();
53 param["avatar_name"] = name; 53 param["avatar_name"] = name;
54 IList parameters = new ArrayList(); 54 IList parameters = new ArrayList();
55 parameters.Add(param); 55 parameters.Add(param);
56 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); 56 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
57 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); 57 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
58 Hashtable respData = (Hashtable)resp.Value; 58 Hashtable respData = (Hashtable)resp.Value;
59 59
60 return ConvertXMLRPCDataToUserProfile(respData); 60 return ConvertXMLRPCDataToUserProfile(respData);
61 //} 61 //}
62 //catch (Exception e) 62 //catch (Exception e)
63 //{ 63 //{
64 // Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message); 64 // Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message);
65 //} 65 //}
66 //return null; 66 //return null;
67 } 67 }
68 public UserProfileData GetUserProfile(LLUUID avatarID) 68 public UserProfileData GetUserProfile(LLUUID avatarID)
69 { 69 {
70 try 70 try
71 { 71 {
72 72
73 Hashtable param = new Hashtable(); 73 Hashtable param = new Hashtable();
74 param["avatar_uuid"] = avatarID.ToString(); 74 param["avatar_uuid"] = avatarID.ToString();
75 IList parameters = new ArrayList(); 75 IList parameters = new ArrayList();
76 parameters.Add(param); 76 parameters.Add(param);
77 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); 77 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
78 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); 78 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
79 Hashtable respData = (Hashtable)resp.Value; 79 Hashtable respData = (Hashtable)resp.Value;
80 80
81 return ConvertXMLRPCDataToUserProfile(respData); 81 return ConvertXMLRPCDataToUserProfile(respData);
82 } 82 }
83 catch (Exception e) 83 catch (Exception e)
84 { 84 {
85 Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message); 85 Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message);
86 } 86 }
87 return null; 87 return null;
88 } 88 }
89 89
90 public UserProfileData SetupMasterUser(string firstName, string lastName) 90 public UserProfileData SetupMasterUser(string firstName, string lastName)
91 { 91 {
92 return SetupMasterUser(firstName, lastName, ""); 92 return SetupMasterUser(firstName, lastName, "");
93 } 93 }
94 94
95 public UserProfileData SetupMasterUser(string firstName, string lastName, string password) 95 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
96 { 96 {
97 UserProfileData profile = GetUserProfile(firstName, lastName); 97 UserProfileData profile = GetUserProfile(firstName, lastName);
98 return profile; 98 return profile;
99 } 99 }
100 } 100 }
101} 101}
diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
index 41f811a..2bebf9f 100644
--- a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenGrid.Framework.Communications.OGS1")] 6[assembly: AssemblyTitle("OpenGrid.Framework.Communications.OGS1")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenGrid.Framework.Communications.OGS1")] 10[assembly: AssemblyProduct("OpenGrid.Framework.Communications.OGS1")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("a8b2b39b-c83b-41e2-b0b5-7ccfc1fddae7")] 21[assembly: Guid("a8b2b39b-c83b-41e2-b0b5-7ccfc1fddae7")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30// You can specify all the values or you can default the Revision and Build Numbers 30// You can specify all the values or you can default the Revision and Build Numbers
31// by using the '*' as shown below: 31// by using the '*' as shown below:
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index de0b040..3742486 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -1,299 +1,299 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using libsecondlife;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
37using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence; 37using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence;
38 38
39 39
40namespace OpenSim.Region.Environment 40namespace OpenSim.Region.Environment
41{ 41{
42 42
43 /// <summary> 43 /// <summary>
44 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings 44 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings
45 /// </summary> 45 /// </summary>
46 public class EstateManager 46 public class EstateManager
47 { 47 {
48 private Scene m_world; 48 private Scene m_world;
49 private RegionInfo m_regInfo; 49 private RegionInfo m_regInfo;
50 50
51 public EstateManager(Scene world,RegionInfo reginfo) 51 public EstateManager(Scene world,RegionInfo reginfo)
52 { 52 {
53 m_world = world; //Estate settings found at world.m_regInfo.estateSettings 53 m_world = world; //Estate settings found at world.m_regInfo.estateSettings
54 m_regInfo = reginfo; 54 m_regInfo = reginfo;
55 } 55 }
56 56
57 private bool convertParamStringToBool(byte[] field) 57 private bool convertParamStringToBool(byte[] field)
58 { 58 {
59 string s = Helpers.FieldToUTF8String(field); 59 string s = Helpers.FieldToUTF8String(field);
60 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") 60 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
61 { 61 {
62 return true; 62 return true;
63 } 63 }
64 return false; 64 return false;
65 } 65 }
66 66
67 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client) 67 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, IClientAPI remote_client)
68 { 68 {
69 if (remote_client.AgentId == m_regInfo.MasterAvatarAssignedUUID) 69 if (remote_client.AgentId == m_regInfo.MasterAvatarAssignedUUID)
70 { 70 {
71 switch (Helpers.FieldToUTF8String(packet.MethodData.Method)) 71 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
72 { 72 {
73 case "getinfo": 73 case "getinfo":
74 this.sendRegionInfoPacketToAll(); 74 this.sendRegionInfoPacketToAll();
75 75
76 break; 76 break;
77 case "setregioninfo": 77 case "setregioninfo":
78 if (packet.ParamList.Length != 9) 78 if (packet.ParamList.Length != 9)
79 { 79 {
80 MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); 80 MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
81 } 81 }
82 else 82 else
83 { 83 {
84 m_regInfo.estateSettings.regionFlags = Simulator.RegionFlags.None; 84 m_regInfo.estateSettings.regionFlags = Simulator.RegionFlags.None;
85 85
86 if (convertParamStringToBool(packet.ParamList[0].Parameter)) 86 if (convertParamStringToBool(packet.ParamList[0].Parameter))
87 { 87 {
88 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockTerraform; 88 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockTerraform;
89 } 89 }
90 90
91 if (convertParamStringToBool(packet.ParamList[1].Parameter)) 91 if (convertParamStringToBool(packet.ParamList[1].Parameter))
92 { 92 {
93 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.NoFly; 93 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.NoFly;
94 } 94 }
95 95
96 if (convertParamStringToBool(packet.ParamList[2].Parameter)) 96 if (convertParamStringToBool(packet.ParamList[2].Parameter))
97 { 97 {
98 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowDamage; 98 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowDamage;
99 } 99 }
100 100
101 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) 101 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false)
102 { 102 {
103 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockLandResell; 103 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.BlockLandResell;
104 } 104 }
105 105
106 106
107 int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter))); 107 int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter)));
108 m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents; 108 m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents;
109 109
110 float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 110 float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
111 m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor; 111 m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor;
112 112
113 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); 113 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter));
114 m_regInfo.estateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel; 114 m_regInfo.estateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel;
115 115
116 116
117 if (convertParamStringToBool(packet.ParamList[7].Parameter)) 117 if (convertParamStringToBool(packet.ParamList[7].Parameter))
118 { 118 {
119 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.RestrictPushObject; 119 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.RestrictPushObject;
120 } 120 }
121 121
122 if (convertParamStringToBool(packet.ParamList[8].Parameter)) 122 if (convertParamStringToBool(packet.ParamList[8].Parameter))
123 { 123 {
124 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowParcelChanges; 124 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | Simulator.RegionFlags.AllowParcelChanges;
125 } 125 }
126 126
127 sendRegionInfoPacketToAll(); 127 sendRegionInfoPacketToAll();
128 128
129 } 129 }
130 break; 130 break;
131 case "texturebase": 131 case "texturebase":
132 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 132 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
133 { 133 {
134 string s = Helpers.FieldToUTF8String(block.Parameter); 134 string s = Helpers.FieldToUTF8String(block.Parameter);
135 string[] splitField = s.Split(' '); 135 string[] splitField = s.Split(' ');
136 if (splitField.Length == 2) 136 if (splitField.Length == 2)
137 { 137 {
138 LLUUID tempUUID = new LLUUID(splitField[1]); 138 LLUUID tempUUID = new LLUUID(splitField[1]);
139 switch (Convert.ToInt16(splitField[0])) 139 switch (Convert.ToInt16(splitField[0]))
140 { 140 {
141 case 0: 141 case 0:
142 m_regInfo.estateSettings.terrainBase0 = tempUUID; 142 m_regInfo.estateSettings.terrainBase0 = tempUUID;
143 break; 143 break;
144 case 1: 144 case 1:
145 m_regInfo.estateSettings.terrainBase1 = tempUUID; 145 m_regInfo.estateSettings.terrainBase1 = tempUUID;
146 break; 146 break;
147 case 2: 147 case 2:
148 m_regInfo.estateSettings.terrainBase2 = tempUUID; 148 m_regInfo.estateSettings.terrainBase2 = tempUUID;
149 break; 149 break;
150 case 3: 150 case 3:
151 m_regInfo.estateSettings.terrainBase3 = tempUUID; 151 m_regInfo.estateSettings.terrainBase3 = tempUUID;
152 break; 152 break;
153 } 153 }
154 } 154 }
155 } 155 }
156 break; 156 break;
157 case "texturedetail": 157 case "texturedetail":
158 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 158 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
159 { 159 {
160 160
161 string s = Helpers.FieldToUTF8String(block.Parameter); 161 string s = Helpers.FieldToUTF8String(block.Parameter);
162 string[] splitField = s.Split(' '); 162 string[] splitField = s.Split(' ');
163 if (splitField.Length == 2) 163 if (splitField.Length == 2)
164 { 164 {
165 LLUUID tempUUID = new LLUUID(splitField[1]); 165 LLUUID tempUUID = new LLUUID(splitField[1]);
166 switch (Convert.ToInt16(splitField[0])) 166 switch (Convert.ToInt16(splitField[0]))
167 { 167 {
168 case 0: 168 case 0:
169 m_regInfo.estateSettings.terrainDetail0 = tempUUID; 169 m_regInfo.estateSettings.terrainDetail0 = tempUUID;
170 break; 170 break;
171 case 1: 171 case 1:
172 m_regInfo.estateSettings.terrainDetail1 = tempUUID; 172 m_regInfo.estateSettings.terrainDetail1 = tempUUID;
173 break; 173 break;
174 case 2: 174 case 2:
175 m_regInfo.estateSettings.terrainDetail2 = tempUUID; 175 m_regInfo.estateSettings.terrainDetail2 = tempUUID;
176 break; 176 break;
177 case 3: 177 case 3:
178 m_regInfo.estateSettings.terrainDetail3 = tempUUID; 178 m_regInfo.estateSettings.terrainDetail3 = tempUUID;
179 break; 179 break;
180 } 180 }
181 } 181 }
182 } 182 }
183 break; 183 break;
184 case "textureheights": 184 case "textureheights":
185 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList) 185 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
186 { 186 {
187 187
188 string s = Helpers.FieldToUTF8String(block.Parameter); 188 string s = Helpers.FieldToUTF8String(block.Parameter);
189 string[] splitField = s.Split(' '); 189 string[] splitField = s.Split(' ');
190 if (splitField.Length == 3) 190 if (splitField.Length == 3)
191 { 191 {
192 192
193 float tempHeightLow = (float)Convert.ToDecimal(splitField[1]); 193 float tempHeightLow = (float)Convert.ToDecimal(splitField[1]);
194 float tempHeightHigh = (float)Convert.ToDecimal(splitField[2]); 194 float tempHeightHigh = (float)Convert.ToDecimal(splitField[2]);
195 195
196 switch (Convert.ToInt16(splitField[0])) 196 switch (Convert.ToInt16(splitField[0]))
197 { 197 {
198 case 0: 198 case 0:
199 m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow; 199 m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow;
200 m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh; 200 m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh;
201 break; 201 break;
202 case 1: 202 case 1:
203 m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow; 203 m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow;
204 m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh; 204 m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh;
205 break; 205 break;
206 case 2: 206 case 2:
207 m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow; 207 m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow;
208 m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh; 208 m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh;
209 break; 209 break;
210 case 3: 210 case 3:
211 m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow; 211 m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow;
212 m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh; 212 m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh;
213 break; 213 break;
214 } 214 }
215 } 215 }
216 } 216 }
217 break; 217 break;
218 case "texturecommit": 218 case "texturecommit":
219 sendRegionHandshakeToAll(); 219 sendRegionHandshakeToAll();
220 break; 220 break;
221 case "setregionterrain": 221 case "setregionterrain":
222 if (packet.ParamList.Length != 9) 222 if (packet.ParamList.Length != 9)
223 { 223 {
224 MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); 224 MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
225 } 225 }
226 else 226 else
227 { 227 {
228 m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter)); 228 m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter));
229 m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter)); 229 m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter));
230 m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); 230 m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter));
231 m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter); 231 m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter);
232 m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 232 m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
233 233
234 sendRegionInfoPacketToAll(); 234 sendRegionInfoPacketToAll();
235 } 235 }
236 break; 236 break;
237 default: 237 default:
238 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 238 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
239 break; 239 break;
240 } 240 }
241 } 241 }
242 } 242 }
243 243
244 public void sendRegionInfoPacketToAll() 244 public void sendRegionInfoPacketToAll()
245 { 245 {
246 List<Avatar> avatars = m_world.RequestAvatarList(); 246 List<Avatar> avatars = m_world.RequestAvatarList();
247 247
248 for (int i = 0; i < avatars.Count; i++) 248 for (int i = 0; i < avatars.Count; i++)
249 { 249 {
250 this.sendRegionInfoPacket(avatars[i].ControllingClient); 250 this.sendRegionInfoPacket(avatars[i].ControllingClient);
251 } 251 }
252 } 252 }
253 253
254 public void sendRegionHandshakeToAll() 254 public void sendRegionHandshakeToAll()
255 { 255 {
256 List<Avatar> avatars = m_world.RequestAvatarList(); 256 List<Avatar> avatars = m_world.RequestAvatarList();
257 257
258 for (int i = 0; i < avatars.Count; i++) 258 for (int i = 0; i < avatars.Count; i++)
259 { 259 {
260 this.sendRegionHandshake(avatars[i].ControllingClient); 260 this.sendRegionHandshake(avatars[i].ControllingClient);
261 } 261 }
262 } 262 }
263 263
264 public void sendRegionInfoPacket(IClientAPI remote_client) 264 public void sendRegionInfoPacket(IClientAPI remote_client)
265 { 265 {
266 Encoding _enc = Encoding.ASCII; 266 Encoding _enc = Encoding.ASCII;
267 267
268 AgentCircuitData circuitData = remote_client.RequestClientInfo(); 268 AgentCircuitData circuitData = remote_client.RequestClientInfo();
269 269
270 RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); 270 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
271 regionInfoPacket.AgentData.AgentID = circuitData.AgentID; 271 regionInfoPacket.AgentData.AgentID = circuitData.AgentID;
272 regionInfoPacket.AgentData.SessionID = circuitData.SessionID; 272 regionInfoPacket.AgentData.SessionID = circuitData.SessionID;
273 regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; 273 regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor;
274 regionInfoPacket.RegionInfo.EstateID = m_regInfo.estateSettings.estateID; 274 regionInfoPacket.RegionInfo.EstateID = m_regInfo.estateSettings.estateID;
275 regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.estateSettings.maxAgents; 275 regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.estateSettings.maxAgents;
276 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.estateSettings.objectBonusFactor; 276 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.estateSettings.objectBonusFactor;
277 regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.estateSettings.parentEstateID; 277 regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.estateSettings.parentEstateID;
278 regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.estateSettings.pricePerMeter; 278 regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.estateSettings.pricePerMeter;
279 regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.estateSettings.redirectGridX; 279 regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.estateSettings.redirectGridX;
280 regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.estateSettings.redirectGridY; 280 regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.estateSettings.redirectGridY;
281 regionInfoPacket.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; 281 regionInfoPacket.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags;
282 regionInfoPacket.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; 282 regionInfoPacket.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess;
283 regionInfoPacket.RegionInfo.SimName = _enc.GetBytes( m_regInfo.RegionName); 283 regionInfoPacket.RegionInfo.SimName = _enc.GetBytes( m_regInfo.RegionName);
284 regionInfoPacket.RegionInfo.SunHour = m_regInfo.estateSettings.sunHour; 284 regionInfoPacket.RegionInfo.SunHour = m_regInfo.estateSettings.sunHour;
285 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.estateSettings.terrainLowerLimit; 285 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.estateSettings.terrainLowerLimit;
286 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.estateSettings.terrainRaiseLimit; 286 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.estateSettings.terrainRaiseLimit;
287 regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.estateSettings.useFixedSun; 287 regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.estateSettings.useFixedSun;
288 regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; 288 regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight;
289 289
290 remote_client.OutPacket(regionInfoPacket); 290 remote_client.OutPacket(regionInfoPacket);
291 } 291 }
292 292
293 public void sendRegionHandshake(IClientAPI remoteClient) 293 public void sendRegionHandshake(IClientAPI remoteClient)
294 { 294 {
295 remoteClient.SendRegionHandshake(m_regInfo); 295 remoteClient.SendRegionHandshake(m_regInfo);
296 } 296 }
297 297
298 } 298 }
299} 299}
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
index c068866..6ee57a5 100644
--- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
+++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs
@@ -1,63 +1,63 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
30 30
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32using OpenSim.Region; 32using OpenSim.Region;
33using OpenSim.Region.Environment; 33using OpenSim.Region.Environment;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35 35
36using System.Collections.Generic; 36using System.Collections.Generic;
37 37
38namespace OpenSim.Region.Interfaces 38namespace OpenSim.Region.Interfaces
39{ 39{
40 public interface IRegionDataStore 40 public interface IRegionDataStore
41 { 41 {
42 /// <summary> 42 /// <summary>
43 /// Initialises the data storage engine 43 /// Initialises the data storage engine
44 /// </summary> 44 /// </summary>
45 /// <param name="filename">The file to save the database to (may not be applicable)</param> 45 /// <param name="filename">The file to save the database to (may not be applicable)</param>
46 /// <param name="dbname">The name of the database to store to (may not be applicable)</param> 46 /// <param name="dbname">The name of the database to store to (may not be applicable)</param>
47 void Initialise(string filename, string dbname); 47 void Initialise(string filename, string dbname);
48 48
49 void StoreObject(SceneObject obj); 49 void StoreObject(SceneObject obj);
50 void RemoveObject(LLUUID uuid); 50 void RemoveObject(LLUUID uuid);
51 51
52 List<SceneObject> LoadObjects(); 52 List<SceneObject> LoadObjects();
53 53
54 void StoreTerrain(double[,] terrain); 54 void StoreTerrain(double[,] terrain);
55 double[,] LoadTerrain(); 55 double[,] LoadTerrain();
56 56
57 void StoreParcel(OpenSim.Region.Environment.Parcel Parcel); 57 void StoreParcel(OpenSim.Region.Environment.Parcel Parcel);
58 void RemoveParcel(uint ID); 58 void RemoveParcel(uint ID);
59 List<OpenSim.Region.Environment.Parcel> LoadParcels(); 59 List<OpenSim.Region.Environment.Parcel> LoadParcels();
60 60
61 void Shutdown(); 61 void Shutdown();
62 } 62 }
63} \ No newline at end of file 63} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs
index 31b9b1d..fbff556 100644
--- a/OpenSim/Region/Environment/ParcelManager.cs
+++ b/OpenSim/Region/Environment/ParcelManager.cs
@@ -1,1206 +1,1206 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence; 35using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence;
36using System.IO; 36using System.IO;
37 37
38namespace OpenSim.Region.Environment 38namespace OpenSim.Region.Environment
39{ 39{
40 40
41 41
42 #region ParcelManager Class 42 #region ParcelManager Class
43 /// <summary> 43 /// <summary>
44 /// Handles Parcel objects and operations requiring information from other Parcel objects (divide, join, etc) 44 /// Handles Parcel objects and operations requiring information from other Parcel objects (divide, join, etc)
45 /// </summary> 45 /// </summary>
46 public class ParcelManager : ILocalStorageParcelReceiver 46 public class ParcelManager : ILocalStorageParcelReceiver
47 { 47 {
48 48
49 #region Constants 49 #region Constants
50 //Parcel types set with flags in ParcelOverlay. 50 //Parcel types set with flags in ParcelOverlay.
51 //Only one of these can be used. 51 //Only one of these can be used.
52 public const byte PARCEL_TYPE_PUBLIC = (byte)0; //Equals 00000000 52 public const byte PARCEL_TYPE_PUBLIC = (byte)0; //Equals 00000000
53 public const byte PARCEL_TYPE_OWNED_BY_OTHER = (byte)1; //Equals 00000001 53 public const byte PARCEL_TYPE_OWNED_BY_OTHER = (byte)1; //Equals 00000001
54 public const byte PARCEL_TYPE_OWNED_BY_GROUP = (byte)2; //Equals 00000010 54 public const byte PARCEL_TYPE_OWNED_BY_GROUP = (byte)2; //Equals 00000010
55 public const byte PARCEL_TYPE_OWNED_BY_REQUESTER = (byte)3; //Equals 00000011 55 public const byte PARCEL_TYPE_OWNED_BY_REQUESTER = (byte)3; //Equals 00000011
56 public const byte PARCEL_TYPE_IS_FOR_SALE = (byte)4; //Equals 00000100 56 public const byte PARCEL_TYPE_IS_FOR_SALE = (byte)4; //Equals 00000100
57 public const byte PARCEL_TYPE_IS_BEING_AUCTIONED = (byte)5; //Equals 00000101 57 public const byte PARCEL_TYPE_IS_BEING_AUCTIONED = (byte)5; //Equals 00000101
58 58
59 59
60 //Flags that when set, a border on the given side will be placed 60 //Flags that when set, a border on the given side will be placed
61 //NOTE: North and East is assumable by the west and south sides (if parcel to east has a west border, then I have an east border; etc) 61 //NOTE: North and East is assumable by the west and south sides (if parcel to east has a west border, then I have an east border; etc)
62 //This took forever to figure out -- jeesh. /blame LL for even having to send these 62 //This took forever to figure out -- jeesh. /blame LL for even having to send these
63 public const byte PARCEL_FLAG_PROPERTY_BORDER_WEST = (byte)64; //Equals 01000000 63 public const byte PARCEL_FLAG_PROPERTY_BORDER_WEST = (byte)64; //Equals 01000000
64 public const byte PARCEL_FLAG_PROPERTY_BORDER_SOUTH = (byte)128; //Equals 10000000 64 public const byte PARCEL_FLAG_PROPERTY_BORDER_SOUTH = (byte)128; //Equals 10000000
65 65
66 //RequestResults (I think these are right, they seem to work): 66 //RequestResults (I think these are right, they seem to work):
67 public const int PARCEL_RESULT_ONE_PARCEL = 0; // The request they made contained only one parcel 67 public const int PARCEL_RESULT_ONE_PARCEL = 0; // The request they made contained only one parcel
68 public const int PARCEL_RESULT_MULTIPLE_PARCELS = 1; // The request they made contained more than one parcel 68 public const int PARCEL_RESULT_MULTIPLE_PARCELS = 1; // The request they made contained more than one parcel
69 69
70 //ParcelSelectObjects 70 //ParcelSelectObjects
71 public const int PARCEL_SELECT_OBJECTS_OWNER = 2; 71 public const int PARCEL_SELECT_OBJECTS_OWNER = 2;
72 public const int PARCEL_SELECT_OBJECTS_GROUP = 4; 72 public const int PARCEL_SELECT_OBJECTS_GROUP = 4;
73 public const int PARCEL_SELECT_OBJECTS_OTHER = 8; 73 public const int PARCEL_SELECT_OBJECTS_OTHER = 8;
74 74
75 75
76 //These are other constants. Yay! 76 //These are other constants. Yay!
77 public const int START_PARCEL_LOCAL_ID = 1; 77 public const int START_PARCEL_LOCAL_ID = 1;
78 #endregion 78 #endregion
79 79
80 #region Member Variables 80 #region Member Variables
81 public Dictionary<int, Parcel> parcelList = new Dictionary<int, Parcel>(); 81 public Dictionary<int, Parcel> parcelList = new Dictionary<int, Parcel>();
82 private int lastParcelLocalID = START_PARCEL_LOCAL_ID - 1; 82 private int lastParcelLocalID = START_PARCEL_LOCAL_ID - 1;
83 private int[,] parcelIDList = new int[64, 64]; 83 private int[,] parcelIDList = new int[64, 64];
84 84
85 /// <summary> 85 /// <summary>
86 /// Set to true when a prim is moved, created, added. Performs a prim count update 86 /// Set to true when a prim is moved, created, added. Performs a prim count update
87 /// </summary> 87 /// </summary>
88 public bool parcelPrimCountTainted = false; 88 public bool parcelPrimCountTainted = false;
89 89
90 private Scene m_world; 90 private Scene m_world;
91 private RegionInfo m_regInfo; 91 private RegionInfo m_regInfo;
92 92
93 #endregion 93 #endregion
94 94
95 #region Constructors 95 #region Constructors
96 public ParcelManager(Scene world, RegionInfo reginfo) 96 public ParcelManager(Scene world, RegionInfo reginfo)
97 { 97 {
98 98
99 m_world = world; 99 m_world = world;
100 m_regInfo = reginfo; 100 m_regInfo = reginfo;
101 parcelIDList.Initialize(); 101 parcelIDList.Initialize();
102 102
103 } 103 }
104 #endregion 104 #endregion
105 105
106 #region Member Functions 106 #region Member Functions
107 107
108 #region Parcel From Storage Functions 108 #region Parcel From Storage Functions
109 public void ParcelFromStorage(ParcelData data) 109 public void ParcelFromStorage(ParcelData data)
110 { 110 {
111 Parcel new_parcel = new Parcel(data.ownerID, data.isGroupOwned, m_world); 111 Parcel new_parcel = new Parcel(data.ownerID, data.isGroupOwned, m_world);
112 new_parcel.parcelData = data.Copy(); 112 new_parcel.parcelData = data.Copy();
113 new_parcel.setParcelBitmapFromByteArray(); 113 new_parcel.setParcelBitmapFromByteArray();
114 addParcel(new_parcel); 114 addParcel(new_parcel);
115 115
116 } 116 }
117 117
118 public void NoParcelDataFromStorage() 118 public void NoParcelDataFromStorage()
119 { 119 {
120 resetSimParcels(); 120 resetSimParcels();
121 } 121 }
122 #endregion 122 #endregion
123 123
124 #region Parcel Add/Remove/Get/Create 124 #region Parcel Add/Remove/Get/Create
125 /// <summary> 125 /// <summary>
126 /// Creates a basic Parcel object without an owner (a zeroed key) 126 /// Creates a basic Parcel object without an owner (a zeroed key)
127 /// </summary> 127 /// </summary>
128 /// <returns></returns> 128 /// <returns></returns>
129 public Parcel createBaseParcel() 129 public Parcel createBaseParcel()
130 { 130 {
131 return new Parcel(new LLUUID(), false, m_world); 131 return new Parcel(new LLUUID(), false, m_world);
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Adds a parcel to the stored list and adds them to the parcelIDList to what they own 135 /// Adds a parcel to the stored list and adds them to the parcelIDList to what they own
136 /// </summary> 136 /// </summary>
137 /// <param name="new_parcel">The parcel being added</param> 137 /// <param name="new_parcel">The parcel being added</param>
138 public Parcel addParcel(Parcel new_parcel) 138 public Parcel addParcel(Parcel new_parcel)
139 { 139 {
140 lastParcelLocalID++; 140 lastParcelLocalID++;
141 new_parcel.parcelData.localID = lastParcelLocalID; 141 new_parcel.parcelData.localID = lastParcelLocalID;
142 parcelList.Add(lastParcelLocalID, new_parcel.Copy()); 142 parcelList.Add(lastParcelLocalID, new_parcel.Copy());
143 143
144 144
145 bool[,] parcelBitmap = new_parcel.getParcelBitmap(); 145 bool[,] parcelBitmap = new_parcel.getParcelBitmap();
146 int x, y; 146 int x, y;
147 for (x = 0; x < 64; x++) 147 for (x = 0; x < 64; x++)
148 { 148 {
149 for (y = 0; y < 64; y++) 149 for (y = 0; y < 64; y++)
150 { 150 {
151 if (parcelBitmap[x, y]) 151 if (parcelBitmap[x, y])
152 { 152 {
153 parcelIDList[x, y] = lastParcelLocalID; 153 parcelIDList[x, y] = lastParcelLocalID;
154 } 154 }
155 } 155 }
156 } 156 }
157 parcelList[lastParcelLocalID].forceUpdateParcelInfo(); 157 parcelList[lastParcelLocalID].forceUpdateParcelInfo();
158 158
159 return new_parcel; 159 return new_parcel;
160 160
161 } 161 }
162 /// <summary> 162 /// <summary>
163 /// Removes a parcel from the list. Will not remove if local_id is still owning an area in parcelIDList 163 /// Removes a parcel from the list. Will not remove if local_id is still owning an area in parcelIDList
164 /// </summary> 164 /// </summary>
165 /// <param name="local_id">Parcel.localID of the parcel to remove.</param> 165 /// <param name="local_id">Parcel.localID of the parcel to remove.</param>
166 public void removeParcel(int local_id) 166 public void removeParcel(int local_id)
167 { 167 {
168 int x, y; 168 int x, y;
169 for (x = 0; x < 64; x++) 169 for (x = 0; x < 64; x++)
170 { 170 {
171 for (y = 0; y < 64; y++) 171 for (y = 0; y < 64; y++)
172 { 172 {
173 if (parcelIDList[x, y] == local_id) 173 if (parcelIDList[x, y] == local_id)
174 { 174 {
175 throw new Exception("Could not remove parcel. Still being used at " + x + ", " + y); 175 throw new Exception("Could not remove parcel. Still being used at " + x + ", " + y);
176 } 176 }
177 } 177 }
178 } 178 }
179 m_world.localStorage.RemoveParcel(parcelList[local_id].parcelData); 179 m_world.localStorage.RemoveParcel(parcelList[local_id].parcelData);
180 parcelList.Remove(local_id); 180 parcelList.Remove(local_id);
181 } 181 }
182 182
183 private void performFinalParcelJoin(Parcel master, Parcel slave) 183 private void performFinalParcelJoin(Parcel master, Parcel slave)
184 { 184 {
185 int x, y; 185 int x, y;
186 bool[,] parcelBitmapSlave = slave.getParcelBitmap(); 186 bool[,] parcelBitmapSlave = slave.getParcelBitmap();
187 for (x = 0; x < 64; x++) 187 for (x = 0; x < 64; x++)
188 { 188 {
189 for (y = 0; y < 64; y++) 189 for (y = 0; y < 64; y++)
190 { 190 {
191 if (parcelBitmapSlave[x, y]) 191 if (parcelBitmapSlave[x, y])
192 { 192 {
193 parcelIDList[x, y] = master.parcelData.localID; 193 parcelIDList[x, y] = master.parcelData.localID;
194 } 194 }
195 } 195 }
196 } 196 }
197 removeParcel(slave.parcelData.localID); 197 removeParcel(slave.parcelData.localID);
198 } 198 }
199 /// <summary> 199 /// <summary>
200 /// Get the parcel at the specified point 200 /// Get the parcel at the specified point
201 /// </summary> 201 /// </summary>
202 /// <param name="x">Value between 0 - 256 on the x axis of the point</param> 202 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
203 /// <param name="y">Value between 0 - 256 on the y axis of the point</param> 203 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
204 /// <returns>Parcel at the point supplied</returns> 204 /// <returns>Parcel at the point supplied</returns>
205 public Parcel getParcel(float x_float, float y_float) 205 public Parcel getParcel(float x_float, float y_float)
206 { 206 {
207 int x = Convert.ToInt32(Math.Floor(Convert.ToDecimal(x_float) / Convert.ToDecimal(4.0))); 207 int x = Convert.ToInt32(Math.Floor(Convert.ToDecimal(x_float) / Convert.ToDecimal(4.0)));
208 int y = Convert.ToInt32(Math.Floor(Convert.ToDecimal(y_float) / Convert.ToDecimal(4.0))); 208 int y = Convert.ToInt32(Math.Floor(Convert.ToDecimal(y_float) / Convert.ToDecimal(4.0)));
209 209
210 if (x > 63 || y > 63 || x < 0 || y < 0) 210 if (x > 63 || y > 63 || x < 0 || y < 0)
211 { 211 {
212 throw new Exception("Error: Parcel not found at point " + x + ", " + y); 212 throw new Exception("Error: Parcel not found at point " + x + ", " + y);
213 } 213 }
214 else 214 else
215 { 215 {
216 // Console.WriteLine("Point (" + x + ", " + y + ") determined from point (" + x_float + ", " + y_float + ")"); 216 // Console.WriteLine("Point (" + x + ", " + y + ") determined from point (" + x_float + ", " + y_float + ")");
217 return parcelList[parcelIDList[x, y]]; 217 return parcelList[parcelIDList[x, y]];
218 } 218 }
219 } 219 }
220 220
221 public Parcel getParcel(int x, int y) 221 public Parcel getParcel(int x, int y)
222 { 222 {
223 if (x > 256 || y > 256 || x < 0 || y < 0) 223 if (x > 256 || y > 256 || x < 0 || y < 0)
224 { 224 {
225 throw new Exception("Error: Parcel not found at point " + x + ", " + y); 225 throw new Exception("Error: Parcel not found at point " + x + ", " + y);
226 } 226 }
227 else 227 else
228 { 228 {
229 return parcelList[parcelIDList[x / 4, y / 4]]; 229 return parcelList[parcelIDList[x / 4, y / 4]];
230 } 230 }
231 } 231 }
232 #endregion 232 #endregion
233 233
234 #region Parcel Modification 234 #region Parcel Modification
235 /// <summary> 235 /// <summary>
236 /// Subdivides a parcel 236 /// Subdivides a parcel
237 /// </summary> 237 /// </summary>
238 /// <param name="start_x">West Point</param> 238 /// <param name="start_x">West Point</param>
239 /// <param name="start_y">South Point</param> 239 /// <param name="start_y">South Point</param>
240 /// <param name="end_x">East Point</param> 240 /// <param name="end_x">East Point</param>
241 /// <param name="end_y">North Point</param> 241 /// <param name="end_y">North Point</param>
242 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param> 242 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param>
243 /// <returns>Returns true if successful</returns> 243 /// <returns>Returns true if successful</returns>
244 private bool subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 244 private bool subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
245 { 245 {
246 246
247 //First, lets loop through the points and make sure they are all in the same parcel 247 //First, lets loop through the points and make sure they are all in the same parcel
248 //Get the parcel at start 248 //Get the parcel at start
249 Parcel startParcel = getParcel(start_x, start_y); 249 Parcel startParcel = getParcel(start_x, start_y);
250 if (startParcel == null) return false; //No such parcel at the beginning 250 if (startParcel == null) return false; //No such parcel at the beginning
251 251
252 //Loop through the points 252 //Loop through the points
253 try 253 try
254 { 254 {
255 int totalX = end_x - start_x; 255 int totalX = end_x - start_x;
256 int totalY = end_y - start_y; 256 int totalY = end_y - start_y;
257 int x, y; 257 int x, y;
258 for (y = 0; y < totalY; y++) 258 for (y = 0; y < totalY; y++)
259 { 259 {
260 for (x = 0; x < totalX; x++) 260 for (x = 0; x < totalX; x++)
261 { 261 {
262 Parcel tempParcel = getParcel(start_x + x, start_y + y); 262 Parcel tempParcel = getParcel(start_x + x, start_y + y);
263 if (tempParcel == null) return false; //No such parcel at that point 263 if (tempParcel == null) return false; //No such parcel at that point
264 if (tempParcel != startParcel) return false; //Subdividing over 2 parcels; no-no 264 if (tempParcel != startParcel) return false; //Subdividing over 2 parcels; no-no
265 } 265 }
266 } 266 }
267 } 267 }
268 catch (Exception) 268 catch (Exception)
269 { 269 {
270 return false; //Exception. For now, lets skip subdivision 270 return false; //Exception. For now, lets skip subdivision
271 } 271 }
272 272
273 //If we are still here, then they are subdividing within one parcel 273 //If we are still here, then they are subdividing within one parcel
274 //Check owner 274 //Check owner
275 if (startParcel.parcelData.ownerID != attempting_user_id) 275 if (startParcel.parcelData.ownerID != attempting_user_id)
276 { 276 {
277 return false; //They cant do this! 277 return false; //They cant do this!
278 } 278 }
279 279
280 //Lets create a new parcel with bitmap activated at that point (keeping the old parcels info) 280 //Lets create a new parcel with bitmap activated at that point (keeping the old parcels info)
281 Parcel newParcel = startParcel.Copy(); 281 Parcel newParcel = startParcel.Copy();
282 newParcel.parcelData.parcelName = "Subdivision of " + newParcel.parcelData.parcelName; 282 newParcel.parcelData.parcelName = "Subdivision of " + newParcel.parcelData.parcelName;
283 newParcel.parcelData.globalID = LLUUID.Random(); 283 newParcel.parcelData.globalID = LLUUID.Random();
284 284
285 newParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(start_x, start_y, end_x, end_y)); 285 newParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(start_x, start_y, end_x, end_y));
286 286
287 //Now, lets set the subdivision area of the original to false 287 //Now, lets set the subdivision area of the original to false
288 int startParcelIndex = startParcel.parcelData.localID; 288 int startParcelIndex = startParcel.parcelData.localID;
289 parcelList[startParcelIndex].setParcelBitmap(Parcel.modifyParcelBitmapSquare(startParcel.getParcelBitmap(), start_x, start_y, end_x, end_y, false)); 289 parcelList[startParcelIndex].setParcelBitmap(Parcel.modifyParcelBitmapSquare(startParcel.getParcelBitmap(), start_x, start_y, end_x, end_y, false));
290 parcelList[startParcelIndex].forceUpdateParcelInfo(); 290 parcelList[startParcelIndex].forceUpdateParcelInfo();
291 291
292 292
293 this.setPrimsTainted(); 293 this.setPrimsTainted();
294 294
295 //Now add the new parcel 295 //Now add the new parcel
296 Parcel result = addParcel(newParcel); 296 Parcel result = addParcel(newParcel);
297 result.sendParcelUpdateToAvatarsOverMe(); 297 result.sendParcelUpdateToAvatarsOverMe();
298 298
299 299
300 300
301 301
302 return true; 302 return true;
303 } 303 }
304 /// <summary> 304 /// <summary>
305 /// Join 2 parcels together 305 /// Join 2 parcels together
306 /// </summary> 306 /// </summary>
307 /// <param name="start_x">x value in first parcel</param> 307 /// <param name="start_x">x value in first parcel</param>
308 /// <param name="start_y">y value in first parcel</param> 308 /// <param name="start_y">y value in first parcel</param>
309 /// <param name="end_x">x value in second parcel</param> 309 /// <param name="end_x">x value in second parcel</param>
310 /// <param name="end_y">y value in second parcel</param> 310 /// <param name="end_y">y value in second parcel</param>
311 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the parcels</param> 311 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the parcels</param>
312 /// <returns>Returns true if successful</returns> 312 /// <returns>Returns true if successful</returns>
313 private bool join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 313 private bool join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
314 { 314 {
315 end_x -= 4; 315 end_x -= 4;
316 end_y -= 4; 316 end_y -= 4;
317 317
318 List<Parcel> selectedParcels = new List<Parcel>(); 318 List<Parcel> selectedParcels = new List<Parcel>();
319 int stepXSelected = 0; 319 int stepXSelected = 0;
320 int stepYSelected = 0; 320 int stepYSelected = 0;
321 for (stepYSelected = start_y; stepYSelected <= end_y; stepYSelected += 4) 321 for (stepYSelected = start_y; stepYSelected <= end_y; stepYSelected += 4)
322 { 322 {
323 for (stepXSelected = start_x; stepXSelected <= end_x; stepXSelected += 4) 323 for (stepXSelected = start_x; stepXSelected <= end_x; stepXSelected += 4)
324 { 324 {
325 Parcel p = getParcel(stepXSelected,stepYSelected); 325 Parcel p = getParcel(stepXSelected,stepYSelected);
326 if (!selectedParcels.Contains(p)) 326 if (!selectedParcels.Contains(p))
327 { 327 {
328 selectedParcels.Add(p); 328 selectedParcels.Add(p);
329 } 329 }
330 } 330 }
331 } 331 }
332 Parcel masterParcel = selectedParcels[0]; 332 Parcel masterParcel = selectedParcels[0];
333 selectedParcels.RemoveAt(0); 333 selectedParcels.RemoveAt(0);
334 334
335 335
336 if (selectedParcels.Count < 1) 336 if (selectedParcels.Count < 1)
337 { 337 {
338 return false; //Only one parcel selected 338 return false; //Only one parcel selected
339 } 339 }
340 if (masterParcel.parcelData.ownerID != attempting_user_id) 340 if (masterParcel.parcelData.ownerID != attempting_user_id)
341 { 341 {
342 return false; //Not the same owner 342 return false; //Not the same owner
343 } 343 }
344 foreach (Parcel p in selectedParcels) 344 foreach (Parcel p in selectedParcels)
345 { 345 {
346 if (p.parcelData.ownerID != masterParcel.parcelData.ownerID) 346 if (p.parcelData.ownerID != masterParcel.parcelData.ownerID)
347 { 347 {
348 return false; //Over multiple users. TODO: make this just ignore this parcel? 348 return false; //Over multiple users. TODO: make this just ignore this parcel?
349 } 349 }
350 } 350 }
351 foreach (Parcel slaveParcel in selectedParcels) 351 foreach (Parcel slaveParcel in selectedParcels)
352 { 352 {
353 parcelList[masterParcel.parcelData.localID].setParcelBitmap(Parcel.mergeParcelBitmaps(masterParcel.getParcelBitmap(), slaveParcel.getParcelBitmap())); 353 parcelList[masterParcel.parcelData.localID].setParcelBitmap(Parcel.mergeParcelBitmaps(masterParcel.getParcelBitmap(), slaveParcel.getParcelBitmap()));
354 performFinalParcelJoin(masterParcel, slaveParcel); 354 performFinalParcelJoin(masterParcel, slaveParcel);
355 } 355 }
356 356
357 357
358 this.setPrimsTainted(); 358 this.setPrimsTainted();
359 359
360 masterParcel.sendParcelUpdateToAvatarsOverMe(); 360 masterParcel.sendParcelUpdateToAvatarsOverMe();
361 361
362 return true; 362 return true;
363 363
364 364
365 365
366 } 366 }
367 #endregion 367 #endregion
368 368
369 #region Parcel Updating 369 #region Parcel Updating
370 /// <summary> 370 /// <summary>
371 /// Where we send the ParcelOverlay packet to the client 371 /// Where we send the ParcelOverlay packet to the client
372 /// </summary> 372 /// </summary>
373 /// <param name="remote_client">The object representing the client</param> 373 /// <param name="remote_client">The object representing the client</param>
374 public void sendParcelOverlay(IClientAPI remote_client) 374 public void sendParcelOverlay(IClientAPI remote_client)
375 { 375 {
376 const int PARCEL_BLOCKS_PER_PACKET = 1024; 376 const int PARCEL_BLOCKS_PER_PACKET = 1024;
377 int x, y = 0; 377 int x, y = 0;
378 byte[] byteArray = new byte[PARCEL_BLOCKS_PER_PACKET]; 378 byte[] byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
379 int byteArrayCount = 0; 379 int byteArrayCount = 0;
380 int sequenceID = 0; 380 int sequenceID = 0;
381 ParcelOverlayPacket packet; 381 ParcelOverlayPacket packet;
382 382
383 for (y = 0; y < 64; y++) 383 for (y = 0; y < 64; y++)
384 { 384 {
385 for (x = 0; x < 64; x++) 385 for (x = 0; x < 64; x++)
386 { 386 {
387 byte tempByte = (byte)0; //This represents the byte for the current 4x4 387 byte tempByte = (byte)0; //This represents the byte for the current 4x4
388 Parcel currentParcelBlock = getParcel(x * 4, y * 4); 388 Parcel currentParcelBlock = getParcel(x * 4, y * 4);
389 389
390 if (currentParcelBlock.parcelData.ownerID == remote_client.AgentId) 390 if (currentParcelBlock.parcelData.ownerID == remote_client.AgentId)
391 { 391 {
392 //Owner Flag 392 //Owner Flag
393 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_REQUESTER); 393 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_REQUESTER);
394 } 394 }
395 else if (currentParcelBlock.parcelData.salePrice > 0 && (currentParcelBlock.parcelData.authBuyerID == LLUUID.Zero || currentParcelBlock.parcelData.authBuyerID == remote_client.AgentId)) 395 else if (currentParcelBlock.parcelData.salePrice > 0 && (currentParcelBlock.parcelData.authBuyerID == LLUUID.Zero || currentParcelBlock.parcelData.authBuyerID == remote_client.AgentId))
396 { 396 {
397 //Sale Flag 397 //Sale Flag
398 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE); 398 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE);
399 } 399 }
400 else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero) 400 else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero)
401 { 401 {
402 //Public Flag 402 //Public Flag
403 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC); 403 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC);
404 } 404 }
405 else 405 else
406 { 406 {
407 //Other Flag 407 //Other Flag
408 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_OTHER); 408 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_OTHER);
409 } 409 }
410 410
411 411
412 //Now for border control 412 //Now for border control
413 if (x == 0) 413 if (x == 0)
414 { 414 {
415 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST); 415 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST);
416 } 416 }
417 else if (getParcel((x - 1) * 4, y * 4) != currentParcelBlock) 417 else if (getParcel((x - 1) * 4, y * 4) != currentParcelBlock)
418 { 418 {
419 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST); 419 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST);
420 } 420 }
421 421
422 if (y == 0) 422 if (y == 0)
423 { 423 {
424 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH); 424 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH);
425 } 425 }
426 else if (getParcel(x * 4, (y - 1) * 4) != currentParcelBlock) 426 else if (getParcel(x * 4, (y - 1) * 4) != currentParcelBlock)
427 { 427 {
428 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH); 428 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH);
429 } 429 }
430 430
431 byteArray[byteArrayCount] = tempByte; 431 byteArray[byteArrayCount] = tempByte;
432 byteArrayCount++; 432 byteArrayCount++;
433 if (byteArrayCount >= PARCEL_BLOCKS_PER_PACKET) 433 if (byteArrayCount >= PARCEL_BLOCKS_PER_PACKET)
434 { 434 {
435 byteArrayCount = 0; 435 byteArrayCount = 0;
436 packet = new ParcelOverlayPacket(); 436 packet = new ParcelOverlayPacket();
437 packet.ParcelData.Data = byteArray; 437 packet.ParcelData.Data = byteArray;
438 packet.ParcelData.SequenceID = sequenceID; 438 packet.ParcelData.SequenceID = sequenceID;
439 remote_client.OutPacket((Packet)packet); 439 remote_client.OutPacket((Packet)packet);
440 sequenceID++; 440 sequenceID++;
441 byteArray = new byte[PARCEL_BLOCKS_PER_PACKET]; 441 byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
442 } 442 }
443 } 443 }
444 } 444 }
445 445
446 446
447 } 447 }
448 448
449 public void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client) 449 public void handleParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client)
450 { 450 {
451 //Get the parcels within the bounds 451 //Get the parcels within the bounds
452 List<Parcel> temp = new List<Parcel>(); 452 List<Parcel> temp = new List<Parcel>();
453 int x, y, i; 453 int x, y, i;
454 int inc_x = end_x - start_x; 454 int inc_x = end_x - start_x;
455 int inc_y = end_y - start_y; 455 int inc_y = end_y - start_y;
456 for (x = 0; x < inc_x; x++) 456 for (x = 0; x < inc_x; x++)
457 { 457 {
458 for (y = 0; y < inc_y; y++) 458 for (y = 0; y < inc_y; y++)
459 { 459 {
460 Parcel currentParcel = getParcel(start_x + x, start_y + y); 460 Parcel currentParcel = getParcel(start_x + x, start_y + y);
461 if (!temp.Contains(currentParcel)) 461 if (!temp.Contains(currentParcel))
462 { 462 {
463 currentParcel.forceUpdateParcelInfo(); 463 currentParcel.forceUpdateParcelInfo();
464 temp.Add(currentParcel); 464 temp.Add(currentParcel);
465 } 465 }
466 } 466 }
467 } 467 }
468 468
469 int requestResult = PARCEL_RESULT_ONE_PARCEL; 469 int requestResult = PARCEL_RESULT_ONE_PARCEL;
470 if (temp.Count > 1) 470 if (temp.Count > 1)
471 { 471 {
472 requestResult = PARCEL_RESULT_MULTIPLE_PARCELS; 472 requestResult = PARCEL_RESULT_MULTIPLE_PARCELS;
473 } 473 }
474 474
475 for (i = 0; i < temp.Count; i++) 475 for (i = 0; i < temp.Count; i++)
476 { 476 {
477 temp[i].sendParcelProperties(sequence_id, snap_selection, requestResult, remote_client); 477 temp[i].sendParcelProperties(sequence_id, snap_selection, requestResult, remote_client);
478 } 478 }
479 479
480 480
481 sendParcelOverlay(remote_client); 481 sendParcelOverlay(remote_client);
482 } 482 }
483 483
484 public void handleParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client) 484 public void handleParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
485 { 485 {
486 if (parcelList.ContainsKey(packet.ParcelData.LocalID)) 486 if (parcelList.ContainsKey(packet.ParcelData.LocalID))
487 { 487 {
488 parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client); 488 parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client);
489 } 489 }
490 } 490 }
491 public void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client) 491 public void handleParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client)
492 { 492 {
493 subdivide(west, south, east, north, remote_client.AgentId); 493 subdivide(west, south, east, north, remote_client.AgentId);
494 } 494 }
495 public void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client) 495 public void handleParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client)
496 { 496 {
497 join(west, south, east, north, remote_client.AgentId); 497 join(west, south, east, north, remote_client.AgentId);
498 498
499 } 499 }
500 500
501 public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) 501 public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client)
502 { 502 {
503 parcelList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); 503 parcelList[local_id].sendForceObjectSelect(local_id, request_type, remote_client);
504 } 504 }
505 505
506 public void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client) 506 public void handleParcelObjectOwnersRequest(int local_id, IClientAPI remote_client)
507 { 507 {
508 parcelList[local_id].sendParcelObjectOwners(remote_client); 508 parcelList[local_id].sendParcelObjectOwners(remote_client);
509 } 509 }
510 #endregion 510 #endregion
511 511
512 /// <summary> 512 /// <summary>
513 /// Resets the sim to the default parcel (full sim parcel owned by the default user) 513 /// Resets the sim to the default parcel (full sim parcel owned by the default user)
514 /// </summary> 514 /// </summary>
515 public void resetSimParcels() 515 public void resetSimParcels()
516 { 516 {
517 //Remove all the parcels in the sim and add a blank, full sim parcel set to public 517 //Remove all the parcels in the sim and add a blank, full sim parcel set to public
518 parcelList.Clear(); 518 parcelList.Clear();
519 lastParcelLocalID = START_PARCEL_LOCAL_ID - 1; 519 lastParcelLocalID = START_PARCEL_LOCAL_ID - 1;
520 parcelIDList.Initialize(); 520 parcelIDList.Initialize();
521 521
522 Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world); 522 Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world);
523 523
524 fullSimParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(0, 0, 256, 256)); 524 fullSimParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(0, 0, 256, 256));
525 fullSimParcel.parcelData.ownerID = m_regInfo.MasterAvatarAssignedUUID; 525 fullSimParcel.parcelData.ownerID = m_regInfo.MasterAvatarAssignedUUID;
526 526
527 addParcel(fullSimParcel); 527 addParcel(fullSimParcel);
528 528
529 } 529 }
530 530
531 531
532 public void handleSignificantClientMovement(IClientAPI remote_client) 532 public void handleSignificantClientMovement(IClientAPI remote_client)
533 { 533 {
534 Avatar clientAvatar = m_world.RequestAvatar(remote_client.AgentId); 534 Avatar clientAvatar = m_world.RequestAvatar(remote_client.AgentId);
535 if (clientAvatar != null) 535 if (clientAvatar != null)
536 { 536 {
537 Parcel over = getParcel(clientAvatar.Pos.X,clientAvatar.Pos.Y); 537 Parcel over = getParcel(clientAvatar.Pos.X,clientAvatar.Pos.Y);
538 if (over != null) 538 if (over != null)
539 { 539 {
540 over.sendParcelProperties(0, false, 0, remote_client); 540 over.sendParcelProperties(0, false, 0, remote_client);
541 } 541 }
542 } 542 }
543 } 543 }
544 544
545 public void resetAllParcelPrimCounts() 545 public void resetAllParcelPrimCounts()
546 { 546 {
547 foreach (Parcel p in parcelList.Values) 547 foreach (Parcel p in parcelList.Values)
548 { 548 {
549 p.resetParcelPrimCounts(); 549 p.resetParcelPrimCounts();
550 } 550 }
551 } 551 }
552 public void setPrimsTainted() 552 public void setPrimsTainted()
553 { 553 {
554 this.parcelPrimCountTainted = true; 554 this.parcelPrimCountTainted = true;
555 } 555 }
556 556
557 public void addPrimToParcelCounts(SceneObject obj) 557 public void addPrimToParcelCounts(SceneObject obj)
558 { 558 {
559 LLVector3 position = obj.Pos; 559 LLVector3 position = obj.Pos;
560 Parcel parcelUnderPrim = getParcel(position.X, position.Y); 560 Parcel parcelUnderPrim = getParcel(position.X, position.Y);
561 if (parcelUnderPrim != null) 561 if (parcelUnderPrim != null)
562 { 562 {
563 parcelUnderPrim.addPrimToCount(obj); 563 parcelUnderPrim.addPrimToCount(obj);
564 } 564 }
565 } 565 }
566 566
567 public void removePrimFromParcelCounts(SceneObject obj) 567 public void removePrimFromParcelCounts(SceneObject obj)
568 { 568 {
569 foreach (Parcel p in parcelList.Values) 569 foreach (Parcel p in parcelList.Values)
570 { 570 {
571 p.removePrimFromCount(obj); 571 p.removePrimFromCount(obj);
572 } 572 }
573 } 573 }
574 574
575 public void finalizeParcelPrimCountUpdate() 575 public void finalizeParcelPrimCountUpdate()
576 { 576 {
577 //Get Simwide prim count for owner 577 //Get Simwide prim count for owner
578 Dictionary<LLUUID, List<Parcel>> parcelOwnersAndParcels = new Dictionary<LLUUID,List<Parcel>>(); 578 Dictionary<LLUUID, List<Parcel>> parcelOwnersAndParcels = new Dictionary<LLUUID,List<Parcel>>();
579 foreach (Parcel p in parcelList.Values) 579 foreach (Parcel p in parcelList.Values)
580 { 580 {
581 if(!parcelOwnersAndParcels.ContainsKey(p.parcelData.ownerID)) 581 if(!parcelOwnersAndParcels.ContainsKey(p.parcelData.ownerID))
582 { 582 {
583 List<Parcel> tempList = new List<Parcel>(); 583 List<Parcel> tempList = new List<Parcel>();
584 tempList.Add(p); 584 tempList.Add(p);
585 parcelOwnersAndParcels.Add(p.parcelData.ownerID,tempList); 585 parcelOwnersAndParcels.Add(p.parcelData.ownerID,tempList);
586 } 586 }
587 else 587 else
588 { 588 {
589 parcelOwnersAndParcels[p.parcelData.ownerID].Add(p); 589 parcelOwnersAndParcels[p.parcelData.ownerID].Add(p);
590 } 590 }
591 } 591 }
592 592
593 foreach (LLUUID owner in parcelOwnersAndParcels.Keys) 593 foreach (LLUUID owner in parcelOwnersAndParcels.Keys)
594 { 594 {
595 int simArea = 0; 595 int simArea = 0;
596 int simPrims = 0; 596 int simPrims = 0;
597 foreach (Parcel p in parcelOwnersAndParcels[owner]) 597 foreach (Parcel p in parcelOwnersAndParcels[owner])
598 { 598 {
599 simArea += p.parcelData.area; 599 simArea += p.parcelData.area;
600 simPrims += p.parcelData.ownerPrims + p.parcelData.otherPrims + p.parcelData.groupPrims + p.parcelData.selectedPrims; 600 simPrims += p.parcelData.ownerPrims + p.parcelData.otherPrims + p.parcelData.groupPrims + p.parcelData.selectedPrims;
601 } 601 }
602 602
603 foreach (Parcel p in parcelOwnersAndParcels[owner]) 603 foreach (Parcel p in parcelOwnersAndParcels[owner])
604 { 604 {
605 p.parcelData.simwideArea = simArea; 605 p.parcelData.simwideArea = simArea;
606 p.parcelData.simwidePrims = simPrims; 606 p.parcelData.simwidePrims = simPrims;
607 } 607 }
608 } 608 }
609 609
610 } 610 }
611 #endregion 611 #endregion
612 } 612 }
613 #endregion 613 #endregion
614 614
615 615
616 #region Parcel Class 616 #region Parcel Class
617 /// <summary> 617 /// <summary>
618 /// Keeps track of a specific parcel's information 618 /// Keeps track of a specific parcel's information
619 /// </summary> 619 /// </summary>
620 public class Parcel 620 public class Parcel
621 { 621 {
622 #region Member Variables 622 #region Member Variables
623 public ParcelData parcelData = new ParcelData(); 623 public ParcelData parcelData = new ParcelData();
624 public List<SceneObject> primsOverMe = new List<SceneObject>(); 624 public List<SceneObject> primsOverMe = new List<SceneObject>();
625 625
626 public Scene m_world; 626 public Scene m_world;
627 627
628 private bool[,] parcelBitmap = new bool[64, 64]; 628 private bool[,] parcelBitmap = new bool[64, 64];
629 629
630 #endregion 630 #endregion
631 631
632 632
633 #region Constructors 633 #region Constructors
634 public Parcel(LLUUID owner_id, bool is_group_owned, Scene world) 634 public Parcel(LLUUID owner_id, bool is_group_owned, Scene world)
635 { 635 {
636 m_world = world; 636 m_world = world;
637 parcelData.ownerID = owner_id; 637 parcelData.ownerID = owner_id;
638 parcelData.isGroupOwned = is_group_owned; 638 parcelData.isGroupOwned = is_group_owned;
639 639
640 } 640 }
641 #endregion 641 #endregion
642 642
643 643
644 #region Member Functions 644 #region Member Functions
645 645
646 #region General Functions 646 #region General Functions
647 /// <summary> 647 /// <summary>
648 /// Checks to see if this parcel contains a point 648 /// Checks to see if this parcel contains a point
649 /// </summary> 649 /// </summary>
650 /// <param name="x"></param> 650 /// <param name="x"></param>
651 /// <param name="y"></param> 651 /// <param name="y"></param>
652 /// <returns>Returns true if the parcel contains the specified point</returns> 652 /// <returns>Returns true if the parcel contains the specified point</returns>
653 public bool containsPoint(int x, int y) 653 public bool containsPoint(int x, int y)
654 { 654 {
655 if (x >= 0 && y >= 0 && x <= 256 && x <= 256) 655 if (x >= 0 && y >= 0 && x <= 256 && x <= 256)
656 { 656 {
657 return (parcelBitmap[x / 4, y / 4] == true); 657 return (parcelBitmap[x / 4, y / 4] == true);
658 } 658 }
659 else 659 else
660 { 660 {
661 return false; 661 return false;
662 } 662 }
663 } 663 }
664 664
665 public Parcel Copy() 665 public Parcel Copy()
666 { 666 {
667 Parcel newParcel = new Parcel(this.parcelData.ownerID, this.parcelData.isGroupOwned, m_world); 667 Parcel newParcel = new Parcel(this.parcelData.ownerID, this.parcelData.isGroupOwned, m_world);
668 668
669 //Place all new variables here! 669 //Place all new variables here!
670 newParcel.parcelBitmap = (bool[,])(this.parcelBitmap.Clone()); 670 newParcel.parcelBitmap = (bool[,])(this.parcelBitmap.Clone());
671 newParcel.parcelData = parcelData.Copy(); 671 newParcel.parcelData = parcelData.Copy();
672 672
673 return newParcel; 673 return newParcel;
674 } 674 }
675 675
676 #endregion 676 #endregion
677 677
678 678
679 #region Packet Request Handling 679 #region Packet Request Handling
680 /// <summary> 680 /// <summary>
681 /// Sends parcel properties as requested 681 /// Sends parcel properties as requested
682 /// </summary> 682 /// </summary>
683 /// <param name="sequence_id">ID sent by client for them to keep track of</param> 683 /// <param name="sequence_id">ID sent by client for them to keep track of</param>
684 /// <param name="snap_selection">Bool sent by client for them to use</param> 684 /// <param name="snap_selection">Bool sent by client for them to use</param>
685 /// <param name="remote_client">Object representing the client</param> 685 /// <param name="remote_client">Object representing the client</param>
686 public void sendParcelProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) 686 public void sendParcelProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client)
687 { 687 {
688 688
689 ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket(); 689 ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket();
690 updatePacket.ParcelData.AABBMax = parcelData.AABBMax; 690 updatePacket.ParcelData.AABBMax = parcelData.AABBMax;
691 updatePacket.ParcelData.AABBMin = parcelData.AABBMin; 691 updatePacket.ParcelData.AABBMin = parcelData.AABBMin;
692 updatePacket.ParcelData.Area = parcelData.area; 692 updatePacket.ParcelData.Area = parcelData.area;
693 updatePacket.ParcelData.AuctionID = parcelData.auctionID; 693 updatePacket.ParcelData.AuctionID = parcelData.auctionID;
694 updatePacket.ParcelData.AuthBuyerID = parcelData.authBuyerID; //unemplemented 694 updatePacket.ParcelData.AuthBuyerID = parcelData.authBuyerID; //unemplemented
695 695
696 updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray; 696 updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray;
697 697
698 updatePacket.ParcelData.Desc = Helpers.StringToField(parcelData.parcelDesc); 698 updatePacket.ParcelData.Desc = Helpers.StringToField(parcelData.parcelDesc);
699 updatePacket.ParcelData.Category = (byte)parcelData.category; 699 updatePacket.ParcelData.Category = (byte)parcelData.category;
700 updatePacket.ParcelData.ClaimDate = parcelData.claimDate; 700 updatePacket.ParcelData.ClaimDate = parcelData.claimDate;
701 updatePacket.ParcelData.ClaimPrice = parcelData.claimPrice; 701 updatePacket.ParcelData.ClaimPrice = parcelData.claimPrice;
702 updatePacket.ParcelData.GroupID = parcelData.groupID; 702 updatePacket.ParcelData.GroupID = parcelData.groupID;
703 updatePacket.ParcelData.GroupPrims = parcelData.groupPrims; 703 updatePacket.ParcelData.GroupPrims = parcelData.groupPrims;
704 updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned; 704 updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned;
705 updatePacket.ParcelData.LandingType = (byte)parcelData.landingType; 705 updatePacket.ParcelData.LandingType = (byte)parcelData.landingType;
706 updatePacket.ParcelData.LocalID = parcelData.localID; 706 updatePacket.ParcelData.LocalID = parcelData.localID;
707 if (parcelData.area > 0) 707 if (parcelData.area > 0)
708 { 708 {
709 updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); 709 updatePacket.ParcelData.MaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.area) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor)));
710 } 710 }
711 else 711 else
712 { 712 {
713 updatePacket.ParcelData.MaxPrims = 0; 713 updatePacket.ParcelData.MaxPrims = 0;
714 } 714 }
715 updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale; 715 updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale;
716 updatePacket.ParcelData.MediaID = parcelData.mediaID; 716 updatePacket.ParcelData.MediaID = parcelData.mediaID;
717 updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL); 717 updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL);
718 updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL); 718 updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL);
719 updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName); 719 updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName);
720 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented 720 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
721 updatePacket.ParcelData.OtherCount = 0; //unemplemented 721 updatePacket.ParcelData.OtherCount = 0; //unemplemented
722 updatePacket.ParcelData.OtherPrims = parcelData.otherPrims; 722 updatePacket.ParcelData.OtherPrims = parcelData.otherPrims;
723 updatePacket.ParcelData.OwnerID = parcelData.ownerID; 723 updatePacket.ParcelData.OwnerID = parcelData.ownerID;
724 updatePacket.ParcelData.OwnerPrims = parcelData.ownerPrims; 724 updatePacket.ParcelData.OwnerPrims = parcelData.ownerPrims;
725 updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags; 725 updatePacket.ParcelData.ParcelFlags = parcelData.parcelFlags;
726 updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor; 726 updatePacket.ParcelData.ParcelPrimBonus = m_world.RegionInfo.estateSettings.objectBonusFactor;
727 updatePacket.ParcelData.PassHours = parcelData.passHours; 727 updatePacket.ParcelData.PassHours = parcelData.passHours;
728 updatePacket.ParcelData.PassPrice = parcelData.passPrice; 728 updatePacket.ParcelData.PassPrice = parcelData.passPrice;
729 updatePacket.ParcelData.PublicCount = 0; //unemplemented 729 updatePacket.ParcelData.PublicCount = 0; //unemplemented
730 updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0); 730 updatePacket.ParcelData.RegionDenyAnonymous = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyAnonymous) > 0);
731 updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0); 731 updatePacket.ParcelData.RegionDenyIdentified = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyIdentified) > 0);
732 updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0); 732 updatePacket.ParcelData.RegionDenyTransacted = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.DenyTransacted) > 0);
733 updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0); 733 updatePacket.ParcelData.RegionPushOverride = (((uint)m_world.RegionInfo.estateSettings.regionFlags & (uint)Simulator.RegionFlags.RestrictPushObject) > 0);
734 updatePacket.ParcelData.RentPrice = 0; 734 updatePacket.ParcelData.RentPrice = 0;
735 updatePacket.ParcelData.RequestResult = request_result; 735 updatePacket.ParcelData.RequestResult = request_result;
736 updatePacket.ParcelData.SalePrice = parcelData.salePrice; 736 updatePacket.ParcelData.SalePrice = parcelData.salePrice;
737 updatePacket.ParcelData.SelectedPrims = parcelData.selectedPrims; 737 updatePacket.ParcelData.SelectedPrims = parcelData.selectedPrims;
738 updatePacket.ParcelData.SelfCount = 0;//unemplemented 738 updatePacket.ParcelData.SelfCount = 0;//unemplemented
739 updatePacket.ParcelData.SequenceID = sequence_id; 739 updatePacket.ParcelData.SequenceID = sequence_id;
740 if (parcelData.simwideArea > 0) 740 if (parcelData.simwideArea > 0)
741 { 741 {
742 updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor))); 742 updatePacket.ParcelData.SimWideMaxPrims = Convert.ToInt32(Math.Round((Convert.ToDecimal(parcelData.simwideArea) / Convert.ToDecimal(65536)) * 15000 * Convert.ToDecimal(m_world.RegionInfo.estateSettings.objectBonusFactor)));
743 } 743 }
744 else 744 else
745 { 745 {
746 updatePacket.ParcelData.SimWideMaxPrims = 0; 746 updatePacket.ParcelData.SimWideMaxPrims = 0;
747 } 747 }
748 updatePacket.ParcelData.SimWideTotalPrims = parcelData.simwidePrims; 748 updatePacket.ParcelData.SimWideTotalPrims = parcelData.simwidePrims;
749 updatePacket.ParcelData.SnapSelection = snap_selection; 749 updatePacket.ParcelData.SnapSelection = snap_selection;
750 updatePacket.ParcelData.SnapshotID = parcelData.snapshotID; 750 updatePacket.ParcelData.SnapshotID = parcelData.snapshotID;
751 updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus; 751 updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus;
752 updatePacket.ParcelData.TotalPrims = parcelData.ownerPrims + parcelData.groupPrims + parcelData.otherPrims + parcelData.selectedPrims; 752 updatePacket.ParcelData.TotalPrims = parcelData.ownerPrims + parcelData.groupPrims + parcelData.otherPrims + parcelData.selectedPrims;
753 updatePacket.ParcelData.UserLocation = parcelData.userLocation; 753 updatePacket.ParcelData.UserLocation = parcelData.userLocation;
754 updatePacket.ParcelData.UserLookAt = parcelData.userLookAt; 754 updatePacket.ParcelData.UserLookAt = parcelData.userLookAt;
755 remote_client.OutPacket((Packet)updatePacket); 755 remote_client.OutPacket((Packet)updatePacket);
756 } 756 }
757 757
758 public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client) 758 public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
759 { 759 {
760 if (remote_client.AgentId == parcelData.ownerID) 760 if (remote_client.AgentId == parcelData.ownerID)
761 { 761 {
762 //Needs later group support 762 //Needs later group support
763 parcelData.authBuyerID = packet.ParcelData.AuthBuyerID; 763 parcelData.authBuyerID = packet.ParcelData.AuthBuyerID;
764 parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category; 764 parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category;
765 parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc); 765 parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc);
766 parcelData.groupID = packet.ParcelData.GroupID; 766 parcelData.groupID = packet.ParcelData.GroupID;
767 parcelData.landingType = packet.ParcelData.LandingType; 767 parcelData.landingType = packet.ParcelData.LandingType;
768 parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale; 768 parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale;
769 parcelData.mediaID = packet.ParcelData.MediaID; 769 parcelData.mediaID = packet.ParcelData.MediaID;
770 parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL); 770 parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL);
771 parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL); 771 parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL);
772 parcelData.parcelName = Helpers.FieldToUTF8String(packet.ParcelData.Name); 772 parcelData.parcelName = Helpers.FieldToUTF8String(packet.ParcelData.Name);
773 parcelData.parcelFlags = packet.ParcelData.ParcelFlags; 773 parcelData.parcelFlags = packet.ParcelData.ParcelFlags;
774 parcelData.passHours = packet.ParcelData.PassHours; 774 parcelData.passHours = packet.ParcelData.PassHours;
775 parcelData.passPrice = packet.ParcelData.PassPrice; 775 parcelData.passPrice = packet.ParcelData.PassPrice;
776 parcelData.salePrice = packet.ParcelData.SalePrice; 776 parcelData.salePrice = packet.ParcelData.SalePrice;
777 parcelData.snapshotID = packet.ParcelData.SnapshotID; 777 parcelData.snapshotID = packet.ParcelData.SnapshotID;
778 parcelData.userLocation = packet.ParcelData.UserLocation; 778 parcelData.userLocation = packet.ParcelData.UserLocation;
779 parcelData.userLookAt = packet.ParcelData.UserLookAt; 779 parcelData.userLookAt = packet.ParcelData.UserLookAt;
780 sendParcelUpdateToAvatarsOverMe(); 780 sendParcelUpdateToAvatarsOverMe();
781 781
782 782
783 } 783 }
784 } 784 }
785 785
786 public void sendParcelUpdateToAvatarsOverMe() 786 public void sendParcelUpdateToAvatarsOverMe()
787 { 787 {
788 List<Avatar> avatars = m_world.RequestAvatarList(); 788 List<Avatar> avatars = m_world.RequestAvatarList();
789 for (int i = 0; i < avatars.Count; i++) 789 for (int i = 0; i < avatars.Count; i++)
790 { 790 {
791 Parcel over = m_world.ParcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y)); 791 Parcel over = m_world.ParcelManager.getParcel((int)Math.Round(avatars[i].Pos.X), (int)Math.Round(avatars[i].Pos.Y));
792 if (over.parcelData.localID == this.parcelData.localID) 792 if (over.parcelData.localID == this.parcelData.localID)
793 { 793 {
794 sendParcelProperties(0, false, 0, avatars[i].ControllingClient); 794 sendParcelProperties(0, false, 0, avatars[i].ControllingClient);
795 } 795 }
796 } 796 }
797 } 797 }
798 #endregion 798 #endregion
799 799
800 800
801 #region Update Functions 801 #region Update Functions
802 /// <summary> 802 /// <summary>
803 /// Updates the AABBMin and AABBMax values after area/shape modification of parcel 803 /// Updates the AABBMin and AABBMax values after area/shape modification of parcel
804 /// </summary> 804 /// </summary>
805 private void updateAABBAndAreaValues() 805 private void updateAABBAndAreaValues()
806 { 806 {
807 int min_x = 64; 807 int min_x = 64;
808 int min_y = 64; 808 int min_y = 64;
809 int max_x = 0; 809 int max_x = 0;
810 int max_y = 0; 810 int max_y = 0;
811 int tempArea = 0; 811 int tempArea = 0;
812 int x, y; 812 int x, y;
813 for (x = 0; x < 64; x++) 813 for (x = 0; x < 64; x++)
814 { 814 {
815 for (y = 0; y < 64; y++) 815 for (y = 0; y < 64; y++)
816 { 816 {
817 if (parcelBitmap[x, y] == true) 817 if (parcelBitmap[x, y] == true)
818 { 818 {
819 if (min_x > x) min_x = x; 819 if (min_x > x) min_x = x;
820 if (min_y > y) min_y = y; 820 if (min_y > y) min_y = y;
821 if (max_x < x) max_x = x; 821 if (max_x < x) max_x = x;
822 if (max_y < y) max_y = y; 822 if (max_y < y) max_y = y;
823 tempArea += 16; //16sqm parcel 823 tempArea += 16; //16sqm parcel
824 } 824 }
825 } 825 }
826 } 826 }
827 parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.get((min_x * 4), (min_y * 4))); 827 parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.get((min_x * 4), (min_y * 4)));
828 parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.get((max_x * 4), (max_y * 4))); 828 parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.get((max_x * 4), (max_y * 4)));
829 parcelData.area = tempArea; 829 parcelData.area = tempArea;
830 } 830 }
831 831
832 public void updateParcelBitmapByteArray() 832 public void updateParcelBitmapByteArray()
833 { 833 {
834 parcelData.parcelBitmapByteArray = convertParcelBitmapToBytes(); 834 parcelData.parcelBitmapByteArray = convertParcelBitmapToBytes();
835 } 835 }
836 836
837 /// <summary> 837 /// <summary>
838 /// Update all settings in parcel such as area, bitmap byte array, etc 838 /// Update all settings in parcel such as area, bitmap byte array, etc
839 /// </summary> 839 /// </summary>
840 public void forceUpdateParcelInfo() 840 public void forceUpdateParcelInfo()
841 { 841 {
842 this.updateAABBAndAreaValues(); 842 this.updateAABBAndAreaValues();
843 this.updateParcelBitmapByteArray(); 843 this.updateParcelBitmapByteArray();
844 } 844 }
845 845
846 public void setParcelBitmapFromByteArray() 846 public void setParcelBitmapFromByteArray()
847 { 847 {
848 parcelBitmap = convertBytesToParcelBitmap(); 848 parcelBitmap = convertBytesToParcelBitmap();
849 } 849 }
850 #endregion 850 #endregion
851 851
852 852
853 #region Parcel Bitmap Functions 853 #region Parcel Bitmap Functions
854 /// <summary> 854 /// <summary>
855 /// Sets the parcel's bitmap manually 855 /// Sets the parcel's bitmap manually
856 /// </summary> 856 /// </summary>
857 /// <param name="bitmap">64x64 block representing where this parcel is on a map</param> 857 /// <param name="bitmap">64x64 block representing where this parcel is on a map</param>
858 public void setParcelBitmap(bool[,] bitmap) 858 public void setParcelBitmap(bool[,] bitmap)
859 { 859 {
860 if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2) 860 if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2)
861 { 861 {
862 //Throw an exception - The bitmap is not 64x64 862 //Throw an exception - The bitmap is not 64x64
863 throw new Exception("Error: Invalid Parcel Bitmap"); 863 throw new Exception("Error: Invalid Parcel Bitmap");
864 } 864 }
865 else 865 else
866 { 866 {
867 //Valid: Lets set it 867 //Valid: Lets set it
868 parcelBitmap = bitmap; 868 parcelBitmap = bitmap;
869 forceUpdateParcelInfo(); 869 forceUpdateParcelInfo();
870 870
871 } 871 }
872 } 872 }
873 /// <summary> 873 /// <summary>
874 /// Gets the parcels bitmap manually 874 /// Gets the parcels bitmap manually
875 /// </summary> 875 /// </summary>
876 /// <returns></returns> 876 /// <returns></returns>
877 public bool[,] getParcelBitmap() 877 public bool[,] getParcelBitmap()
878 { 878 {
879 return parcelBitmap; 879 return parcelBitmap;
880 } 880 }
881 /// <summary> 881 /// <summary>
882 /// Converts the parcel bitmap to a packet friendly byte array 882 /// Converts the parcel bitmap to a packet friendly byte array
883 /// </summary> 883 /// </summary>
884 /// <returns></returns> 884 /// <returns></returns>
885 private byte[] convertParcelBitmapToBytes() 885 private byte[] convertParcelBitmapToBytes()
886 { 886 {
887 byte[] tempConvertArr = new byte[512]; 887 byte[] tempConvertArr = new byte[512];
888 byte tempByte = 0; 888 byte tempByte = 0;
889 int x, y, i, byteNum = 0; 889 int x, y, i, byteNum = 0;
890 i = 0; 890 i = 0;
891 for (y = 0; y < 64; y++) 891 for (y = 0; y < 64; y++)
892 { 892 {
893 for (x = 0; x < 64; x++) 893 for (x = 0; x < 64; x++)
894 { 894 {
895 tempByte = Convert.ToByte(tempByte | Convert.ToByte(parcelBitmap[x, y]) << (i++ % 8)); 895 tempByte = Convert.ToByte(tempByte | Convert.ToByte(parcelBitmap[x, y]) << (i++ % 8));
896 if (i % 8 == 0) 896 if (i % 8 == 0)
897 { 897 {
898 tempConvertArr[byteNum] = tempByte; 898 tempConvertArr[byteNum] = tempByte;
899 tempByte = (byte)0; 899 tempByte = (byte)0;
900 i = 0; 900 i = 0;
901 byteNum++; 901 byteNum++;
902 } 902 }
903 } 903 }
904 } 904 }
905 return tempConvertArr; 905 return tempConvertArr;
906 } 906 }
907 907
908 private bool[,] convertBytesToParcelBitmap() 908 private bool[,] convertBytesToParcelBitmap()
909 { 909 {
910 bool[,] tempConvertMap = new bool[64, 64]; 910 bool[,] tempConvertMap = new bool[64, 64];
911 tempConvertMap.Initialize(); 911 tempConvertMap.Initialize();
912 byte tempByte = 0; 912 byte tempByte = 0;
913 int x = 0, y = 0, i = 0, bitNum = 0; 913 int x = 0, y = 0, i = 0, bitNum = 0;
914 for (i = 0; i < 512; i++) 914 for (i = 0; i < 512; i++)
915 { 915 {
916 tempByte = parcelData.parcelBitmapByteArray[i]; 916 tempByte = parcelData.parcelBitmapByteArray[i];
917 for (bitNum = 0; bitNum < 8; bitNum++) 917 for (bitNum = 0; bitNum < 8; bitNum++)
918 { 918 {
919 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1); 919 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1);
920 tempConvertMap[x, y] = bit; 920 tempConvertMap[x, y] = bit;
921 x++; 921 x++;
922 if (x > 63) 922 if (x > 63)
923 { 923 {
924 x = 0; 924 x = 0;
925 y++; 925 y++;
926 } 926 }
927 927
928 } 928 }
929 929
930 } 930 }
931 return tempConvertMap; 931 return tempConvertMap;
932 } 932 }
933 /// <summary> 933 /// <summary>
934 /// Full sim parcel creation 934 /// Full sim parcel creation
935 /// </summary> 935 /// </summary>
936 /// <returns></returns> 936 /// <returns></returns>
937 public static bool[,] basicFullRegionParcelBitmap() 937 public static bool[,] basicFullRegionParcelBitmap()
938 { 938 {
939 return getSquareParcelBitmap(0, 0, 256, 256); 939 return getSquareParcelBitmap(0, 0, 256, 256);
940 } 940 }
941 941
942 /// <summary> 942 /// <summary>
943 /// Used to modify the bitmap between the x and y points. Points use 64 scale 943 /// Used to modify the bitmap between the x and y points. Points use 64 scale
944 /// </summary> 944 /// </summary>
945 /// <param name="start_x"></param> 945 /// <param name="start_x"></param>
946 /// <param name="start_y"></param> 946 /// <param name="start_y"></param>
947 /// <param name="end_x"></param> 947 /// <param name="end_x"></param>
948 /// <param name="end_y"></param> 948 /// <param name="end_y"></param>
949 /// <returns></returns> 949 /// <returns></returns>
950 public static bool[,] getSquareParcelBitmap(int start_x, int start_y, int end_x, int end_y) 950 public static bool[,] getSquareParcelBitmap(int start_x, int start_y, int end_x, int end_y)
951 { 951 {
952 952
953 bool[,] tempBitmap = new bool[64, 64]; 953 bool[,] tempBitmap = new bool[64, 64];
954 tempBitmap.Initialize(); 954 tempBitmap.Initialize();
955 955
956 tempBitmap = modifyParcelBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true); 956 tempBitmap = modifyParcelBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
957 return tempBitmap; 957 return tempBitmap;
958 } 958 }
959 959
960 /// <summary> 960 /// <summary>
961 /// Change a parcel's bitmap at within a square and set those points to a specific value 961 /// Change a parcel's bitmap at within a square and set those points to a specific value
962 /// </summary> 962 /// </summary>
963 /// <param name="parcel_bitmap"></param> 963 /// <param name="parcel_bitmap"></param>
964 /// <param name="start_x"></param> 964 /// <param name="start_x"></param>
965 /// <param name="start_y"></param> 965 /// <param name="start_y"></param>
966 /// <param name="end_x"></param> 966 /// <param name="end_x"></param>
967 /// <param name="end_y"></param> 967 /// <param name="end_y"></param>
968 /// <param name="set_value"></param> 968 /// <param name="set_value"></param>
969 /// <returns></returns> 969 /// <returns></returns>
970 public static bool[,] modifyParcelBitmapSquare(bool[,] parcel_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value) 970 public static bool[,] modifyParcelBitmapSquare(bool[,] parcel_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value)
971 { 971 {
972 if (parcel_bitmap.GetLength(0) != 64 || parcel_bitmap.GetLength(1) != 64 || parcel_bitmap.Rank != 2) 972 if (parcel_bitmap.GetLength(0) != 64 || parcel_bitmap.GetLength(1) != 64 || parcel_bitmap.Rank != 2)
973 { 973 {
974 //Throw an exception - The bitmap is not 64x64 974 //Throw an exception - The bitmap is not 64x64
975 throw new Exception("Error: Invalid Parcel Bitmap in modifyParcelBitmapSquare()"); 975 throw new Exception("Error: Invalid Parcel Bitmap in modifyParcelBitmapSquare()");
976 } 976 }
977 977
978 int x, y; 978 int x, y;
979 for (y = 0; y < 64; y++) 979 for (y = 0; y < 64; y++)
980 { 980 {
981 for (x = 0; x < 64; x++) 981 for (x = 0; x < 64; x++)
982 { 982 {
983 if (x >= start_x / 4 && x < end_x / 4 983 if (x >= start_x / 4 && x < end_x / 4
984 && y >= start_y / 4 && y < end_y / 4) 984 && y >= start_y / 4 && y < end_y / 4)
985 { 985 {
986 parcel_bitmap[x, y] = set_value; 986 parcel_bitmap[x, y] = set_value;
987 } 987 }
988 } 988 }
989 } 989 }
990 return parcel_bitmap; 990 return parcel_bitmap;
991 } 991 }
992 /// <summary> 992 /// <summary>
993 /// Join the true values of 2 bitmaps together 993 /// Join the true values of 2 bitmaps together
994 /// </summary> 994 /// </summary>
995 /// <param name="bitmap_base"></param> 995 /// <param name="bitmap_base"></param>
996 /// <param name="bitmap_add"></param> 996 /// <param name="bitmap_add"></param>
997 /// <returns></returns> 997 /// <returns></returns>
998 public static bool[,] mergeParcelBitmaps(bool[,] bitmap_base, bool[,] bitmap_add) 998 public static bool[,] mergeParcelBitmaps(bool[,] bitmap_base, bool[,] bitmap_add)
999 { 999 {
1000 if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2) 1000 if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2)
1001 { 1001 {
1002 //Throw an exception - The bitmap is not 64x64 1002 //Throw an exception - The bitmap is not 64x64
1003 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_base in mergeParcelBitmaps"); 1003 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_base in mergeParcelBitmaps");
1004 } 1004 }
1005 if (bitmap_add.GetLength(0) != 64 || bitmap_add.GetLength(1) != 64 || bitmap_add.Rank != 2) 1005 if (bitmap_add.GetLength(0) != 64 || bitmap_add.GetLength(1) != 64 || bitmap_add.Rank != 2)
1006 { 1006 {
1007 //Throw an exception - The bitmap is not 64x64 1007 //Throw an exception - The bitmap is not 64x64
1008 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeParcelBitmaps"); 1008 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeParcelBitmaps");
1009 1009
1010 } 1010 }
1011 1011
1012 int x, y; 1012 int x, y;
1013 for (y = 0; y < 64; y++) 1013 for (y = 0; y < 64; y++)
1014 { 1014 {
1015 for (x = 0; x < 64; x++) 1015 for (x = 0; x < 64; x++)
1016 { 1016 {
1017 if (bitmap_add[x, y]) 1017 if (bitmap_add[x, y])
1018 { 1018 {
1019 bitmap_base[x, y] = true; 1019 bitmap_base[x, y] = true;
1020 } 1020 }
1021 } 1021 }
1022 } 1022 }
1023 return bitmap_base; 1023 return bitmap_base;
1024 } 1024 }
1025 #endregion 1025 #endregion
1026 1026
1027 #region Object Select and Object Owner Listing 1027 #region Object Select and Object Owner Listing
1028 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) 1028 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client)
1029 { 1029 {
1030 List<uint> resultLocalIDs = new List<uint>(); 1030 List<uint> resultLocalIDs = new List<uint>();
1031 foreach (SceneObject obj in primsOverMe) 1031 foreach (SceneObject obj in primsOverMe)
1032 { 1032 {
1033 if (obj.rootLocalID > 0) 1033 if (obj.rootLocalID > 0)
1034 { 1034 {
1035 if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.parcelData.ownerID) 1035 if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.parcelData.ownerID)
1036 { 1036 {
1037 resultLocalIDs.Add(obj.rootLocalID); 1037 resultLocalIDs.Add(obj.rootLocalID);
1038 } 1038 }
1039 else if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! 1039 else if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support!
1040 { 1040 {
1041 1041
1042 } 1042 }
1043 else if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId) 1043 else if (request_type == ParcelManager.PARCEL_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId)
1044 { 1044 {
1045 resultLocalIDs.Add(obj.rootLocalID); 1045 resultLocalIDs.Add(obj.rootLocalID);
1046 } 1046 }
1047 } 1047 }
1048 } 1048 }
1049 1049
1050 1050
1051 bool firstCall = true; 1051 bool firstCall = true;
1052 int MAX_OBJECTS_PER_PACKET = 251; 1052 int MAX_OBJECTS_PER_PACKET = 251;
1053 ForceObjectSelectPacket pack = new ForceObjectSelectPacket(); 1053 ForceObjectSelectPacket pack = new ForceObjectSelectPacket();
1054 ForceObjectSelectPacket.DataBlock[] data; 1054 ForceObjectSelectPacket.DataBlock[] data;
1055 while (resultLocalIDs.Count > 0) 1055 while (resultLocalIDs.Count > 0)
1056 { 1056 {
1057 if (firstCall) 1057 if (firstCall)
1058 { 1058 {
1059 pack._Header.ResetList = true; 1059 pack._Header.ResetList = true;
1060 firstCall = false; 1060 firstCall = false;
1061 } 1061 }
1062 else 1062 else
1063 { 1063 {
1064 pack._Header.ResetList = false; 1064 pack._Header.ResetList = false;
1065 } 1065 }
1066 1066
1067 if (resultLocalIDs.Count > MAX_OBJECTS_PER_PACKET) 1067 if (resultLocalIDs.Count > MAX_OBJECTS_PER_PACKET)
1068 { 1068 {
1069 data = new ForceObjectSelectPacket.DataBlock[MAX_OBJECTS_PER_PACKET]; 1069 data = new ForceObjectSelectPacket.DataBlock[MAX_OBJECTS_PER_PACKET];
1070 } 1070 }
1071 else 1071 else
1072 { 1072 {
1073 data = new ForceObjectSelectPacket.DataBlock[resultLocalIDs.Count]; 1073 data = new ForceObjectSelectPacket.DataBlock[resultLocalIDs.Count];
1074 } 1074 }
1075 1075
1076 int i; 1076 int i;
1077 for (i = 0; i < MAX_OBJECTS_PER_PACKET && resultLocalIDs.Count > 0; i++) 1077 for (i = 0; i < MAX_OBJECTS_PER_PACKET && resultLocalIDs.Count > 0; i++)
1078 { 1078 {
1079 data[i] = new ForceObjectSelectPacket.DataBlock(); 1079 data[i] = new ForceObjectSelectPacket.DataBlock();
1080 data[i].LocalID = Convert.ToUInt32(resultLocalIDs[0]); 1080 data[i].LocalID = Convert.ToUInt32(resultLocalIDs[0]);
1081 resultLocalIDs.RemoveAt(0); 1081 resultLocalIDs.RemoveAt(0);
1082 } 1082 }
1083 pack.Data = data; 1083 pack.Data = data;
1084 remote_client.OutPacket((Packet)pack); 1084 remote_client.OutPacket((Packet)pack);
1085 } 1085 }
1086 1086
1087 } 1087 }
1088 public void sendParcelObjectOwners(IClientAPI remote_client) 1088 public void sendParcelObjectOwners(IClientAPI remote_client)
1089 { 1089 {
1090 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID,int>(); 1090 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID,int>();
1091 foreach(SceneObject obj in primsOverMe) 1091 foreach(SceneObject obj in primsOverMe)
1092 { 1092 {
1093 if(!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID)) 1093 if(!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID))
1094 { 1094 {
1095 ownersAndCount.Add(obj.rootPrimitive.OwnerID,0); 1095 ownersAndCount.Add(obj.rootPrimitive.OwnerID,0);
1096 } 1096 }
1097 ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount; 1097 ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount;
1098 } 1098 }
1099 if (ownersAndCount.Count > 0) 1099 if (ownersAndCount.Count > 0)
1100 { 1100 {
1101 1101
1102 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32]; 1102 ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32];
1103 1103
1104 if(ownersAndCount.Count < 32) 1104 if(ownersAndCount.Count < 32)
1105 { 1105 {
1106 dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[ownersAndCount.Count]; 1106 dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[ownersAndCount.Count];
1107 } 1107 }
1108 1108
1109 1109
1110 int num = 0; 1110 int num = 0;
1111 foreach (LLUUID owner in ownersAndCount.Keys) 1111 foreach (LLUUID owner in ownersAndCount.Keys)
1112 { 1112 {
1113 dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock(); 1113 dataBlock[num] = new ParcelObjectOwnersReplyPacket.DataBlock();
1114 dataBlock[num].Count = ownersAndCount[owner]; 1114 dataBlock[num].Count = ownersAndCount[owner];
1115 dataBlock[num].IsGroupOwned = false; //TODO: fix me when group support is added 1115 dataBlock[num].IsGroupOwned = false; //TODO: fix me when group support is added
1116 dataBlock[num].OnlineStatus = true; //TODO: fix me later 1116 dataBlock[num].OnlineStatus = true; //TODO: fix me later
1117 dataBlock[num].OwnerID = owner; 1117 dataBlock[num].OwnerID = owner;
1118 1118
1119 num++; 1119 num++;
1120 } 1120 }
1121 1121
1122 ParcelObjectOwnersReplyPacket pack = new ParcelObjectOwnersReplyPacket(); 1122 ParcelObjectOwnersReplyPacket pack = new ParcelObjectOwnersReplyPacket();
1123 pack.Data = dataBlock; 1123 pack.Data = dataBlock;
1124 remote_client.OutPacket(pack); 1124 remote_client.OutPacket(pack);
1125 } 1125 }
1126 } 1126 }
1127 #endregion 1127 #endregion
1128 1128
1129 #region Object Returning 1129 #region Object Returning
1130 public void returnObject(SceneObject obj) 1130 public void returnObject(SceneObject obj)
1131 { 1131 {
1132 } 1132 }
1133 public void returnParcelObjects(int type, LLUUID owner) 1133 public void returnParcelObjects(int type, LLUUID owner)
1134 { 1134 {
1135 1135
1136 } 1136 }
1137 #endregion 1137 #endregion
1138 1138
1139 #region Object Adding/Removing from Parcel 1139 #region Object Adding/Removing from Parcel
1140 public void resetParcelPrimCounts() 1140 public void resetParcelPrimCounts()
1141 { 1141 {
1142 parcelData.groupPrims = 0; 1142 parcelData.groupPrims = 0;
1143 parcelData.ownerPrims = 0; 1143 parcelData.ownerPrims = 0;
1144 parcelData.otherPrims = 0; 1144 parcelData.otherPrims = 0;
1145 parcelData.selectedPrims = 0; 1145 parcelData.selectedPrims = 0;
1146 primsOverMe.Clear(); 1146 primsOverMe.Clear();
1147 } 1147 }
1148 1148
1149 public void addPrimToCount(SceneObject obj) 1149 public void addPrimToCount(SceneObject obj)
1150 { 1150 {
1151 LLUUID prim_owner = obj.rootPrimitive.OwnerID; 1151 LLUUID prim_owner = obj.rootPrimitive.OwnerID;
1152 int prim_count = obj.primCount; 1152 int prim_count = obj.primCount;
1153 1153
1154 if (obj.isSelected) 1154 if (obj.isSelected)
1155 { 1155 {
1156 parcelData.selectedPrims += prim_count; 1156 parcelData.selectedPrims += prim_count;
1157 } 1157 }
1158 else 1158 else
1159 { 1159 {
1160 if (prim_owner == parcelData.ownerID) 1160 if (prim_owner == parcelData.ownerID)
1161 { 1161 {
1162 parcelData.ownerPrims += prim_count; 1162 parcelData.ownerPrims += prim_count;
1163 } 1163 }
1164 else 1164 else
1165 { 1165 {
1166 parcelData.otherPrims += prim_count; 1166 parcelData.otherPrims += prim_count;
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 primsOverMe.Add(obj); 1170 primsOverMe.Add(obj);
1171 1171
1172 } 1172 }
1173 1173
1174 public void removePrimFromCount(SceneObject obj) 1174 public void removePrimFromCount(SceneObject obj)
1175 { 1175 {
1176 if (primsOverMe.Contains(obj)) 1176 if (primsOverMe.Contains(obj))
1177 { 1177 {
1178 LLUUID prim_owner = obj.rootPrimitive.OwnerID; 1178 LLUUID prim_owner = obj.rootPrimitive.OwnerID;
1179 int prim_count = obj.primCount; 1179 int prim_count = obj.primCount;
1180 1180
1181 if (prim_owner == parcelData.ownerID) 1181 if (prim_owner == parcelData.ownerID)
1182 { 1182 {
1183 parcelData.ownerPrims -= prim_count; 1183 parcelData.ownerPrims -= prim_count;
1184 } 1184 }
1185 else if (prim_owner == parcelData.groupID) 1185 else if (prim_owner == parcelData.groupID)
1186 { 1186 {
1187 parcelData.groupPrims -= prim_count; 1187 parcelData.groupPrims -= prim_count;
1188 } 1188 }
1189 else 1189 else
1190 { 1190 {
1191 parcelData.otherPrims -= prim_count; 1191 parcelData.otherPrims -= prim_count;
1192 } 1192 }
1193 1193
1194 primsOverMe.Remove(obj); 1194 primsOverMe.Remove(obj);
1195 } 1195 }
1196 } 1196 }
1197 #endregion 1197 #endregion
1198 1198
1199 #endregion 1199 #endregion
1200 1200
1201 1201
1202 } 1202 }
1203 #endregion 1203 #endregion
1204 1204
1205 1205
1206} 1206}
diff --git a/OpenSim/Region/Environment/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs
index cd67e97..35fbf45 100644
--- a/OpenSim/Region/Environment/RegionManager.cs
+++ b/OpenSim/Region/Environment/RegionManager.cs
@@ -1,29 +1,29 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using OpenSim.Framework.Communications; 3using OpenSim.Framework.Communications;
4using OpenSim.Framework.Servers; 4using OpenSim.Framework.Servers;
5using OpenSim.Region.Capabilities; 5using OpenSim.Region.Capabilities;
6using OpenSim.Region.Environment.Scenes; 6using OpenSim.Region.Environment.Scenes;
7 7
8namespace OpenSim.Region.Environment 8namespace OpenSim.Region.Environment
9{ 9{
10 public class RegionManager //needs renaming , but first we need to rename the namespace 10 public class RegionManager //needs renaming , but first we need to rename the namespace
11 { 11 {
12 protected AuthenticateSessionsBase authenticateHandler; 12 protected AuthenticateSessionsBase authenticateHandler;
13 protected RegionCommsListener regionCommsHost; 13 protected RegionCommsListener regionCommsHost;
14 protected CommunicationsManager commsManager; 14 protected CommunicationsManager commsManager;
15 protected List<Caps> capsHandlers = new List<Caps>(); 15 protected List<Caps> capsHandlers = new List<Caps>();
16 protected BaseHttpServer httpListener; 16 protected BaseHttpServer httpListener;
17 17
18 protected Scene m_Scene; 18 protected Scene m_Scene;
19 19
20 public ParcelManager parcelManager; 20 public ParcelManager parcelManager;
21 public EstateManager estateManager; 21 public EstateManager estateManager;
22 22
23 public RegionManager() 23 public RegionManager()
24 { 24 {
25 25
26 } 26 }
27 27
28 } 28 }
29} 29}
diff --git a/OpenSim/Region/Environment/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs
index 084c9ab..2456a4e 100644
--- a/OpenSim/Region/Environment/Scenes/Entity.cs
+++ b/OpenSim/Region/Environment/Scenes/Entity.cs
@@ -1,115 +1,115 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31 31
32namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
33{ 33{
34 public abstract class Entity :EntityBase //this class (Entity) will be phased out 34 public abstract class Entity :EntityBase //this class (Entity) will be phased out
35 { 35 {
36 protected PhysicsActor _physActor; 36 protected PhysicsActor _physActor;
37 37
38 /// <summary> 38 /// <summary>
39 /// 39 ///
40 /// </summary> 40 /// </summary>
41 public override LLVector3 Pos 41 public override LLVector3 Pos
42 { 42 {
43 get 43 get
44 { 44 {
45 if (this._physActor != null) 45 if (this._physActor != null)
46 { 46 {
47 m_pos.X = _physActor.Position.X; 47 m_pos.X = _physActor.Position.X;
48 m_pos.Y = _physActor.Position.Y; 48 m_pos.Y = _physActor.Position.Y;
49 m_pos.Z = _physActor.Position.Z; 49 m_pos.Z = _physActor.Position.Z;
50 } 50 }
51 51
52 return m_pos; 52 return m_pos;
53 } 53 }
54 set 54 set
55 { 55 {
56 if (this._physActor != null) 56 if (this._physActor != null)
57 { 57 {
58 try 58 try
59 { 59 {
60 lock (this.m_world.SyncRoot) 60 lock (this.m_world.SyncRoot)
61 { 61 {
62 62
63 this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z); 63 this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
64 } 64 }
65 } 65 }
66 catch (Exception e) 66 catch (Exception e)
67 { 67 {
68 Console.WriteLine(e.Message); 68 Console.WriteLine(e.Message);
69 } 69 }
70 } 70 }
71 71
72 m_pos = value; 72 m_pos = value;
73 } 73 }
74 } 74 }
75 75
76 76
77 /// <summary> 77 /// <summary>
78 /// 78 ///
79 /// </summary> 79 /// </summary>
80 public override LLVector3 Velocity 80 public override LLVector3 Velocity
81 { 81 {
82 get 82 get
83 { 83 {
84 if (this._physActor != null) 84 if (this._physActor != null)
85 { 85 {
86 m_velocity.X = _physActor.Velocity.X; 86 m_velocity.X = _physActor.Velocity.X;
87 m_velocity.Y = _physActor.Velocity.Y; 87 m_velocity.Y = _physActor.Velocity.Y;
88 m_velocity.Z = _physActor.Velocity.Z; 88 m_velocity.Z = _physActor.Velocity.Z;
89 } 89 }
90 90
91 return m_velocity; 91 return m_velocity;
92 } 92 }
93 set 93 set
94 { 94 {
95 if (this._physActor != null) 95 if (this._physActor != null)
96 { 96 {
97 try 97 try
98 { 98 {
99 lock (this.m_world.SyncRoot) 99 lock (this.m_world.SyncRoot)
100 { 100 {
101 101
102 this._physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); 102 this._physActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
103 } 103 }
104 } 104 }
105 catch (Exception e) 105 catch (Exception e)
106 { 106 {
107 Console.WriteLine(e.Message); 107 Console.WriteLine(e.Message);
108 } 108 }
109 } 109 }
110 110
111 m_velocity = value; 111 m_velocity = value;
112 } 112 }
113 } 113 }
114 } 114 }
115} 115}
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs
index 65a0395..04cf595 100644
--- a/OpenSim/Region/Environment/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs
@@ -1,142 +1,142 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using Axiom.Math; 2using Axiom.Math;
3using libsecondlife; 3using libsecondlife;
4 4
5namespace OpenSim.Region.Environment.Scenes 5namespace OpenSim.Region.Environment.Scenes
6{ 6{
7 public abstract class EntityBase 7 public abstract class EntityBase
8 { 8 {
9 public LLUUID uuid; 9 public LLUUID uuid;
10 10
11 protected List<EntityBase> children; 11 protected List<EntityBase> children;
12 12
13 protected Scene m_world; 13 protected Scene m_world;
14 protected string m_name; 14 protected string m_name;
15 15
16 /// <summary> 16 /// <summary>
17 /// 17 ///
18 /// </summary> 18 /// </summary>
19 public virtual string Name 19 public virtual string Name
20 { 20 {
21 get { return m_name; } 21 get { return m_name; }
22 set { m_name = value; } 22 set { m_name = value; }
23 } 23 }
24 24
25 protected LLVector3 m_pos; 25 protected LLVector3 m_pos;
26 /// <summary> 26 /// <summary>
27 /// 27 ///
28 /// </summary> 28 /// </summary>
29 public virtual LLVector3 Pos 29 public virtual LLVector3 Pos
30 { 30 {
31 get 31 get
32 { 32 {
33 return m_pos; 33 return m_pos;
34 } 34 }
35 set 35 set
36 { 36 {
37 m_pos = value; 37 m_pos = value;
38 } 38 }
39 } 39 }
40 40
41 public LLVector3 m_velocity; 41 public LLVector3 m_velocity;
42 42
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 public virtual LLVector3 Velocity 46 public virtual LLVector3 Velocity
47 { 47 {
48 get 48 get
49 { 49 {
50 return m_velocity; 50 return m_velocity;
51 } 51 }
52 set 52 set
53 { 53 {
54 m_velocity = value; 54 m_velocity = value;
55 } 55 }
56 } 56 }
57 57
58 protected Quaternion m_rotation = new Quaternion(0,0,1,0); 58 protected Quaternion m_rotation = new Quaternion(0,0,1,0);
59 59
60 public virtual Quaternion Rotation 60 public virtual Quaternion Rotation
61 { 61 {
62 get 62 get
63 { 63 {
64 return m_rotation; 64 return m_rotation;
65 } 65 }
66 set 66 set
67 { 67 {
68 m_rotation = value; 68 m_rotation = value;
69 } 69 }
70 } 70 }
71 71
72 protected uint m_localId; 72 protected uint m_localId;
73 73
74 public uint LocalId 74 public uint LocalId
75 { 75 {
76 get { return m_localId; } 76 get { return m_localId; }
77 set { m_localId = value; } 77 set { m_localId = value; }
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Creates a new Entity (should not occur on it's own) 81 /// Creates a new Entity (should not occur on it's own)
82 /// </summary> 82 /// </summary>
83 public EntityBase() 83 public EntityBase()
84 { 84 {
85 uuid = new LLUUID(); 85 uuid = new LLUUID();
86 86
87 m_pos = new LLVector3(); 87 m_pos = new LLVector3();
88 m_velocity = new LLVector3(); 88 m_velocity = new LLVector3();
89 Rotation = new Quaternion(); 89 Rotation = new Quaternion();
90 m_name = "(basic entity)"; 90 m_name = "(basic entity)";
91 children = new List<EntityBase>(); 91 children = new List<EntityBase>();
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
95 /// 95 ///
96 /// </summary> 96 /// </summary>
97 public virtual void updateMovement() 97 public virtual void updateMovement()
98 { 98 {
99 foreach (EntityBase child in children) 99 foreach (EntityBase child in children)
100 { 100 {
101 child.updateMovement(); 101 child.updateMovement();
102 } 102 }
103 } 103 }
104 104
105 /// <summary> 105 /// <summary>
106 /// Performs any updates that need to be done at each frame. This function is overridable from it's children. 106 /// Performs any updates that need to be done at each frame. This function is overridable from it's children.
107 /// </summary> 107 /// </summary>
108 public virtual void update() 108 public virtual void update()
109 { 109 {
110 // Do any per-frame updates needed that are applicable to every type of entity 110 // Do any per-frame updates needed that are applicable to every type of entity
111 foreach (EntityBase child in children) 111 foreach (EntityBase child in children)
112 { 112 {
113 child.update(); 113 child.update();
114 } 114 }
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Called at a set interval to inform entities that they should back themsleves up to the DB 118 /// Called at a set interval to inform entities that they should back themsleves up to the DB
119 /// </summary> 119 /// </summary>
120 public virtual void BackUp() 120 public virtual void BackUp()
121 { 121 {
122 122
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// Copies the entity 126 /// Copies the entity
127 /// </summary> 127 /// </summary>
128 /// <returns></returns> 128 /// <returns></returns>
129 public virtual EntityBase Copy() 129 public virtual EntityBase Copy()
130 { 130 {
131 return (EntityBase)this.MemberwiseClone(); 131 return (EntityBase)this.MemberwiseClone();
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Infoms the entity that the land (heightmap) has changed 135 /// Infoms the entity that the land (heightmap) has changed
136 /// </summary> 136 /// </summary>
137 public virtual void LandRenegerated() 137 public virtual void LandRenegerated()
138 { 138 {
139 139
140 } 140 }
141 } 141 }
142} 142}
diff --git a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
index 7c3a033..8551b70 100644
--- a/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
+++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
@@ -1,14 +1,14 @@
1using libsecondlife; 1using libsecondlife;
2using libsecondlife.Packets; 2using libsecondlife.Packets;
3using OpenSim.Framework.Interfaces; 3using OpenSim.Framework.Interfaces;
4 4
5namespace OpenSim.Region.Environment.Scenes 5namespace OpenSim.Region.Environment.Scenes
6{ 6{
7 public interface IScenePresenceBody 7 public interface IScenePresenceBody
8 { 8 {
9 void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); 9 void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
10 void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); 10 void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
11 void SendOurAppearance(IClientAPI OurClient); 11 void SendOurAppearance(IClientAPI OurClient);
12 void SendAppearanceToOtherAgent(ScenePresence avatarInfo); 12 void SendAppearanceToOtherAgent(ScenePresence avatarInfo);
13 } 13 }
14} 14}
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 0e5b083..b413758 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -1,648 +1,648 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using Axiom.Math; 3using Axiom.Math;
4using libsecondlife; 4using libsecondlife;
5using libsecondlife.Packets; 5using libsecondlife.Packets;
6using OpenSim.Framework.Interfaces; 6using OpenSim.Framework.Interfaces;
7using OpenSim.Framework.Inventory; 7using OpenSim.Framework.Inventory;
8using OpenSim.Framework.Types; 8using OpenSim.Framework.Types;
9 9
10namespace OpenSim.Region.Environment.Scenes 10namespace OpenSim.Region.Environment.Scenes
11{ 11{
12 public delegate void PrimCountTaintedDelegate(); 12 public delegate void PrimCountTaintedDelegate();
13 13
14 public class Primitive : EntityBase 14 public class Primitive : EntityBase
15 { 15 {
16 private const uint FULL_MASK_PERMISSIONS = 2147483647; 16 private const uint FULL_MASK_PERMISSIONS = 2147483647;
17 17
18 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); 18 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
19 private ulong m_regionHandle; 19 private ulong m_regionHandle;
20 private byte updateFlag = 0; 20 private byte updateFlag = 0;
21 private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128; 21 private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
22 22
23 private Dictionary<LLUUID, InventoryItem> inventoryItems; 23 private Dictionary<LLUUID, InventoryItem> inventoryItems;
24 24
25 private string m_description = ""; 25 private string m_description = "";
26 26
27 public string SitName = ""; 27 public string SitName = "";
28 public string TouchName = ""; 28 public string TouchName = "";
29 public string Text = ""; 29 public string Text = "";
30 30
31 public LLUUID CreatorID; 31 public LLUUID CreatorID;
32 public LLUUID OwnerID; 32 public LLUUID OwnerID;
33 public LLUUID LastOwnerID; 33 public LLUUID LastOwnerID;
34 public Int32 CreationDate; 34 public Int32 CreationDate;
35 35
36 public uint ParentID = 0; 36 public uint ParentID = 0;
37 37
38 public uint OwnerMask = FULL_MASK_PERMISSIONS; 38 public uint OwnerMask = FULL_MASK_PERMISSIONS;
39 public uint NextOwnerMask = FULL_MASK_PERMISSIONS; 39 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
40 public uint GroupMask = FULL_MASK_PERMISSIONS; 40 public uint GroupMask = FULL_MASK_PERMISSIONS;
41 public uint EveryoneMask = FULL_MASK_PERMISSIONS; 41 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
42 public uint BaseMask = FULL_MASK_PERMISSIONS; 42 public uint BaseMask = FULL_MASK_PERMISSIONS;
43 43
44 private PrimitiveBaseShape m_Shape; 44 private PrimitiveBaseShape m_Shape;
45 45
46 public SceneObject m_RootParent; 46 public SceneObject m_RootParent;
47 public bool m_isRootPrim; 47 public bool m_isRootPrim;
48 public EntityBase m_Parent; 48 public EntityBase m_Parent;
49 49
50 private EventManager m_eventManager; 50 private EventManager m_eventManager;
51 51
52 public event PrimCountTaintedDelegate OnPrimCountTainted; 52 public event PrimCountTaintedDelegate OnPrimCountTainted;
53 53
54 #region Properties 54 #region Properties
55 /// <summary> 55 /// <summary>
56 /// If rootprim, will return world position 56 /// If rootprim, will return world position
57 /// otherwise will return local offset from rootprim 57 /// otherwise will return local offset from rootprim
58 /// </summary> 58 /// </summary>
59 public override LLVector3 Pos 59 public override LLVector3 Pos
60 { 60 {
61 get 61 get
62 { 62 {
63 if (m_isRootPrim) 63 if (m_isRootPrim)
64 { 64 {
65 //if we are rootprim then our offset should be zero 65 //if we are rootprim then our offset should be zero
66 return this.m_pos + m_Parent.Pos; 66 return this.m_pos + m_Parent.Pos;
67 } 67 }
68 else 68 else
69 { 69 {
70 return this.m_pos; 70 return this.m_pos;
71 } 71 }
72 } 72 }
73 set 73 set
74 { 74 {
75 if (m_isRootPrim) 75 if (m_isRootPrim)
76 { 76 {
77 m_Parent.Pos = value; 77 m_Parent.Pos = value;
78 } 78 }
79 this.m_pos = value - m_Parent.Pos; 79 this.m_pos = value - m_Parent.Pos;
80 } 80 }
81 81
82 } 82 }
83 83
84 public PrimitiveBaseShape Shape 84 public PrimitiveBaseShape Shape
85 { 85 {
86 get 86 get
87 { 87 {
88 return this.m_Shape; 88 return this.m_Shape;
89 } 89 }
90 } 90 }
91 91
92 public LLVector3 WorldPos 92 public LLVector3 WorldPos
93 { 93 {
94 get 94 get
95 { 95 {
96 if (!this.m_isRootPrim) 96 if (!this.m_isRootPrim)
97 { 97 {
98 Primitive parentPrim = (Primitive)this.m_Parent; 98 Primitive parentPrim = (Primitive)this.m_Parent;
99 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); 99 Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z);
100 offsetPos = parentPrim.Rotation * offsetPos; 100 offsetPos = parentPrim.Rotation * offsetPos;
101 return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z); 101 return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z);
102 } 102 }
103 else 103 else
104 { 104 {
105 return this.Pos; 105 return this.Pos;
106 } 106 }
107 } 107 }
108 } 108 }
109 109
110 public string Description 110 public string Description
111 { 111 {
112 get 112 get
113 { 113 {
114 return this.m_description; 114 return this.m_description;
115 } 115 }
116 set 116 set
117 { 117 {
118 this.m_description = value; 118 this.m_description = value;
119 } 119 }
120 } 120 }
121 121
122 public LLVector3 Scale 122 public LLVector3 Scale
123 { 123 {
124 set 124 set
125 { 125 {
126 this.m_Shape.Scale = value; 126 this.m_Shape.Scale = value;
127 } 127 }
128 get 128 get
129 { 129 {
130 return this.m_Shape.Scale; 130 return this.m_Shape.Scale;
131 } 131 }
132 } 132 }
133 #endregion 133 #endregion
134 134
135 #region Constructors 135 #region Constructors
136 /// <summary> 136 /// <summary>
137 /// 137 ///
138 /// </summary> 138 /// </summary>
139 /// <param name="regionHandle"></param> 139 /// <param name="regionHandle"></param>
140 /// <param name="world"></param> 140 /// <param name="world"></param>
141 /// <param name="addPacket"></param> 141 /// <param name="addPacket"></param>
142 /// <param name="ownerID"></param> 142 /// <param name="ownerID"></param>
143 /// <param name="localID"></param> 143 /// <param name="localID"></param>
144 /// <param name="isRoot"></param> 144 /// <param name="isRoot"></param>
145 /// <param name="parent"></param> 145 /// <param name="parent"></param>
146 /// <param name="rootObject"></param> 146 /// <param name="rootObject"></param>
147 public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) 147 public Primitive(ulong regionHandle, Scene world, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos)
148 { 148 {
149 149
150 m_regionHandle = regionHandle; 150 m_regionHandle = regionHandle;
151 m_world = world; 151 m_world = world;
152 inventoryItems = new Dictionary<LLUUID, InventoryItem>(); 152 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
153 this.m_Parent = parent; 153 this.m_Parent = parent;
154 this.m_isRootPrim = isRoot; 154 this.m_isRootPrim = isRoot;
155 this.m_RootParent = rootObject; 155 this.m_RootParent = rootObject;
156 this.CreateFromShape(ownerID, localID, pos, shape); 156 this.CreateFromShape(ownerID, localID, pos, shape);
157 this.Rotation = Axiom.Math.Quaternion.Identity; 157 this.Rotation = Axiom.Math.Quaternion.Identity;
158 158
159 m_world.AcknowledgeNewPrim(this); 159 m_world.AcknowledgeNewPrim(this);
160 160
161 this.OnPrimCountTainted(); 161 this.OnPrimCountTainted();
162 } 162 }
163 163
164 /// <summary> 164 /// <summary>
165 /// 165 ///
166 /// </summary> 166 /// </summary>
167 /// <remarks>Empty constructor for duplication</remarks> 167 /// <remarks>Empty constructor for duplication</remarks>
168 public Primitive() 168 public Primitive()
169 { 169 {
170 170
171 } 171 }
172 172
173 #endregion 173 #endregion
174 174
175 #region Destructors 175 #region Destructors
176 176
177 ~Primitive() 177 ~Primitive()
178 { 178 {
179 this.OnPrimCountTainted(); 179 this.OnPrimCountTainted();
180 } 180 }
181 #endregion 181 #endregion
182 182
183 #region Duplication 183 #region Duplication
184 184
185 public Primitive Copy(EntityBase parent, SceneObject rootParent) 185 public Primitive Copy(EntityBase parent, SceneObject rootParent)
186 { 186 {
187 Primitive dupe = (Primitive)this.MemberwiseClone(); 187 Primitive dupe = (Primitive)this.MemberwiseClone();
188 188
189 dupe.m_Parent = parent; 189 dupe.m_Parent = parent;
190 dupe.m_RootParent = rootParent; 190 dupe.m_RootParent = rootParent;
191 191
192 // TODO: Copy this properly. 192 // TODO: Copy this properly.
193 dupe.inventoryItems = this.inventoryItems; 193 dupe.inventoryItems = this.inventoryItems;
194 dupe.children = new List<EntityBase>(); 194 dupe.children = new List<EntityBase>();
195 dupe.m_Shape = this.m_Shape.Copy(); 195 dupe.m_Shape = this.m_Shape.Copy();
196 dupe.m_regionHandle = this.m_regionHandle; 196 dupe.m_regionHandle = this.m_regionHandle;
197 dupe.m_world = this.m_world; 197 dupe.m_world = this.m_world;
198 198
199 uint newLocalID = this.m_world.PrimIDAllocate(); 199 uint newLocalID = this.m_world.PrimIDAllocate();
200 dupe.uuid = LLUUID.Random(); 200 dupe.uuid = LLUUID.Random();
201 dupe.LocalId = newLocalID; 201 dupe.LocalId = newLocalID;
202 202
203 if (parent is SceneObject) 203 if (parent is SceneObject)
204 { 204 {
205 dupe.m_isRootPrim = true; 205 dupe.m_isRootPrim = true;
206 dupe.ParentID = 0; 206 dupe.ParentID = 0;
207 } 207 }
208 else 208 else
209 { 209 {
210 dupe.m_isRootPrim = false; 210 dupe.m_isRootPrim = false;
211 dupe.ParentID = ((Primitive)parent).LocalId; 211 dupe.ParentID = ((Primitive)parent).LocalId;
212 } 212 }
213 213
214 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); 214 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z);
215 dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); 215 dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
216 dupe.m_pos = new LLVector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); 216 dupe.m_pos = new LLVector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z);
217 217
218 rootParent.AddChildToList(dupe); 218 rootParent.AddChildToList(dupe);
219 this.m_world.AcknowledgeNewPrim(dupe); 219 this.m_world.AcknowledgeNewPrim(dupe);
220 dupe.TriggerOnPrimCountTainted(); 220 dupe.TriggerOnPrimCountTainted();
221 221
222 foreach (Primitive prim in this.children) 222 foreach (Primitive prim in this.children)
223 { 223 {
224 Primitive primClone = prim.Copy(dupe, rootParent); 224 Primitive primClone = prim.Copy(dupe, rootParent);
225 dupe.children.Add(primClone); 225 dupe.children.Add(primClone);
226 } 226 }
227 227
228 return dupe; 228 return dupe;
229 } 229 }
230 230
231 #endregion 231 #endregion
232 232
233 #region Override from EntityBase 233 #region Override from EntityBase
234 /// <summary> 234 /// <summary>
235 /// 235 ///
236 /// </summary> 236 /// </summary>
237 public override void update() 237 public override void update()
238 { 238 {
239 if (this.updateFlag == 1) // is a new prim just been created/reloaded or has major changes 239 if (this.updateFlag == 1) // is a new prim just been created/reloaded or has major changes
240 { 240 {
241 this.SendFullUpdateToAllClients(); 241 this.SendFullUpdateToAllClients();
242 this.updateFlag = 0; 242 this.updateFlag = 0;
243 } 243 }
244 if (this.updateFlag == 2) //some change has been made so update the clients 244 if (this.updateFlag == 2) //some change has been made so update the clients
245 { 245 {
246 this.SendTerseUpdateToALLClients(); 246 this.SendTerseUpdateToALLClients();
247 this.updateFlag = 0; 247 this.updateFlag = 0;
248 } 248 }
249 249
250 foreach (EntityBase child in children) 250 foreach (EntityBase child in children)
251 { 251 {
252 child.update(); 252 child.update();
253 } 253 }
254 } 254 }
255 #endregion 255 #endregion
256 256
257 #region Setup 257 #region Setup
258 /// <summary> 258 /// <summary>
259 /// 259 ///
260 /// </summary> 260 /// </summary>
261 /// <param name="addPacket"></param> 261 /// <param name="addPacket"></param>
262 /// <param name="ownerID"></param> 262 /// <param name="ownerID"></param>
263 /// <param name="localID"></param> 263 /// <param name="localID"></param>
264 public void CreateFromShape(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) 264 public void CreateFromShape(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
265 { 265 {
266 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 266 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
267 this.OwnerID = ownerID; 267 this.OwnerID = ownerID;
268 this.CreatorID = this.OwnerID; 268 this.CreatorID = this.OwnerID;
269 this.LastOwnerID = LLUUID.Zero; 269 this.LastOwnerID = LLUUID.Zero;
270 this.Pos = pos; 270 this.Pos = pos;
271 this.uuid = LLUUID.Random(); 271 this.uuid = LLUUID.Random();
272 this.m_localId = (uint)(localID); 272 this.m_localId = (uint)(localID);
273 273
274 this.m_Shape = shape; 274 this.m_Shape = shape;
275 this.updateFlag = 1; 275 this.updateFlag = 1;
276 } 276 }
277 277
278 #endregion 278 #endregion
279 279
280 #region Linking / unlinking 280 #region Linking / unlinking
281 /// <summary> 281 /// <summary>
282 /// 282 ///
283 /// </summary> 283 /// </summary>
284 /// <param name="linkObject"></param> 284 /// <param name="linkObject"></param>
285 public void AddNewChildren(SceneObject linkObject) 285 public void AddNewChildren(SceneObject linkObject)
286 { 286 {
287 // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")"); 287 // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")");
288 //TODO check permissions 288 //TODO check permissions
289 this.children.Add(linkObject.rootPrimitive); 289 this.children.Add(linkObject.rootPrimitive);
290 linkObject.rootPrimitive.SetNewParent(this, this.m_RootParent); 290 linkObject.rootPrimitive.SetNewParent(this, this.m_RootParent);
291 291
292 this.m_world.DeleteEntity(linkObject.rootUUID); 292 this.m_world.DeleteEntity(linkObject.rootUUID);
293 linkObject.DeleteAllChildren(); 293 linkObject.DeleteAllChildren();
294 294
295 this.OnPrimCountTainted(); 295 this.OnPrimCountTainted();
296 } 296 }
297 297
298 /// <summary> 298 /// <summary>
299 /// 299 ///
300 /// </summary> 300 /// </summary>
301 /// <param name="newParent"></param> 301 /// <param name="newParent"></param>
302 /// <param name="rootParent"></param> 302 /// <param name="rootParent"></param>
303 public void SetNewParent(Primitive newParent, SceneObject rootParent) 303 public void SetNewParent(Primitive newParent, SceneObject rootParent)
304 { 304 {
305 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 305 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
306 this.m_isRootPrim = false; 306 this.m_isRootPrim = false;
307 this.m_Parent = newParent; 307 this.m_Parent = newParent;
308 this.ParentID = newParent.LocalId; 308 this.ParentID = newParent.LocalId;
309 this.m_RootParent = rootParent; 309 this.m_RootParent = rootParent;
310 this.m_RootParent.AddChildToList(this); 310 this.m_RootParent.AddChildToList(this);
311 this.Pos = oldPos; 311 this.Pos = oldPos;
312 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); 312 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
313 axPos = this.m_Parent.Rotation.Inverse() * axPos; 313 axPos = this.m_Parent.Rotation.Inverse() * axPos;
314 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 314 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
315 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); 315 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
316 this.Rotation = this.m_Parent.Rotation.Inverse() * this.Rotation; 316 this.Rotation = this.m_Parent.Rotation.Inverse() * this.Rotation;
317 this.updateFlag = 1; 317 this.updateFlag = 1;
318 318
319 foreach (Primitive child in children) 319 foreach (Primitive child in children)
320 { 320 {
321 child.SetRootParent(rootParent, newParent, oldPos, oldRot); 321 child.SetRootParent(rootParent, newParent, oldPos, oldRot);
322 } 322 }
323 children.Clear(); 323 children.Clear();
324 324
325 325
326 } 326 }
327 327
328 /// <summary> 328 /// <summary>
329 /// 329 ///
330 /// </summary> 330 /// </summary>
331 /// <param name="newRoot"></param> 331 /// <param name="newRoot"></param>
332 public void SetRootParent(SceneObject newRoot , Primitive newParent, LLVector3 oldParentPosition, Axiom.Math.Quaternion oldParentRotation) 332 public void SetRootParent(SceneObject newRoot , Primitive newParent, LLVector3 oldParentPosition, Axiom.Math.Quaternion oldParentRotation)
333 { 333 {
334 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 334 LLVector3 oldPos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
335 Axiom.Math.Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z); 335 Axiom.Math.Vector3 axOldPos = new Vector3(oldPos.X, oldPos.Y, oldPos.Z);
336 axOldPos = oldParentRotation * axOldPos; 336 axOldPos = oldParentRotation * axOldPos;
337 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); 337 oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z);
338 oldPos += oldParentPosition; 338 oldPos += oldParentPosition;
339 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); 339 Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
340 this.m_isRootPrim = false; 340 this.m_isRootPrim = false;
341 this.m_Parent = newParent; 341 this.m_Parent = newParent;
342 this.ParentID = newParent.LocalId; 342 this.ParentID = newParent.LocalId;
343 newParent.AddToChildrenList(this); 343 newParent.AddToChildrenList(this);
344 this.m_RootParent = newRoot; 344 this.m_RootParent = newRoot;
345 this.m_RootParent.AddChildToList(this); 345 this.m_RootParent.AddChildToList(this);
346 this.Pos = oldPos; 346 this.Pos = oldPos;
347 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); 347 Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z);
348 axPos = this.m_Parent.Rotation.Inverse() * axPos; 348 axPos = this.m_Parent.Rotation.Inverse() * axPos;
349 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 349 this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
350 this.Rotation = oldParentRotation * this.Rotation; 350 this.Rotation = oldParentRotation * this.Rotation;
351 this.Rotation = this.m_Parent.Rotation.Inverse()* this.Rotation ; 351 this.Rotation = this.m_Parent.Rotation.Inverse()* this.Rotation ;
352 this.updateFlag = 1; 352 this.updateFlag = 1;
353 foreach (Primitive child in children) 353 foreach (Primitive child in children)
354 { 354 {
355 child.SetRootParent(newRoot, newParent, oldPos, oldRot); 355 child.SetRootParent(newRoot, newParent, oldPos, oldRot);
356 } 356 }
357 children.Clear(); 357 children.Clear();
358 } 358 }
359 359
360 /// <summary> 360 /// <summary>
361 /// 361 ///
362 /// </summary> 362 /// </summary>
363 /// <param name="offset"></param> 363 /// <param name="offset"></param>
364 public void AddOffsetToChildren(LLVector3 offset) 364 public void AddOffsetToChildren(LLVector3 offset)
365 { 365 {
366 foreach (Primitive prim in this.children) 366 foreach (Primitive prim in this.children)
367 { 367 {
368 prim.m_pos += offset; 368 prim.m_pos += offset;
369 prim.updateFlag = 2; 369 prim.updateFlag = 2;
370 } 370 }
371 this.OnPrimCountTainted(); 371 this.OnPrimCountTainted();
372 } 372 }
373 373
374 /// <summary> 374 /// <summary>
375 /// 375 ///
376 /// </summary> 376 /// </summary>
377 /// <param name="prim"></param> 377 /// <param name="prim"></param>
378 public void AddToChildrenList(Primitive prim) 378 public void AddToChildrenList(Primitive prim)
379 { 379 {
380 this.children.Add(prim); 380 this.children.Add(prim);
381 } 381 }
382 #endregion 382 #endregion
383 383
384 #region Resizing/Scale 384 #region Resizing/Scale
385 /// <summary> 385 /// <summary>
386 /// 386 ///
387 /// </summary> 387 /// </summary>
388 /// <param name="scale"></param> 388 /// <param name="scale"></param>
389 public void ResizeGoup(LLVector3 scale) 389 public void ResizeGoup(LLVector3 scale)
390 { 390 {
391 LLVector3 offset = (scale - this.m_Shape.Scale); 391 LLVector3 offset = (scale - this.m_Shape.Scale);
392 offset.X /= 2; 392 offset.X /= 2;
393 offset.Y /= 2; 393 offset.Y /= 2;
394 offset.Z /= 2; 394 offset.Z /= 2;
395 if (this.m_isRootPrim) 395 if (this.m_isRootPrim)
396 { 396 {
397 this.m_Parent.Pos += offset; 397 this.m_Parent.Pos += offset;
398 } 398 }
399 else 399 else
400 { 400 {
401 this.m_pos += offset; 401 this.m_pos += offset;
402 } 402 }
403 403
404 this.AddOffsetToChildren(new LLVector3(-offset.X, -offset.Y, -offset.Z)); 404 this.AddOffsetToChildren(new LLVector3(-offset.X, -offset.Y, -offset.Z));
405 this.m_Shape.Scale = scale; 405 this.m_Shape.Scale = scale;
406 406
407 this.updateFlag = 1; 407 this.updateFlag = 1;
408 } 408 }
409 #endregion 409 #endregion
410 410
411 #region Position 411 #region Position
412 /// <summary> 412 /// <summary>
413 /// 413 ///
414 /// </summary> 414 /// </summary>
415 /// <param name="pos"></param> 415 /// <param name="pos"></param>
416 public void UpdateGroupPosition(LLVector3 pos) 416 public void UpdateGroupPosition(LLVector3 pos)
417 { 417 {
418 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 418 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
419 419
420 this.Pos = newPos; 420 this.Pos = newPos;
421 this.updateFlag = 2; 421 this.updateFlag = 2;
422 422
423 this.OnPrimCountTainted(); 423 this.OnPrimCountTainted();
424 } 424 }
425 425
426 /// <summary> 426 /// <summary>
427 /// 427 ///
428 /// </summary> 428 /// </summary>
429 /// <param name="pos"></param> 429 /// <param name="pos"></param>
430 public void UpdateSinglePosition(LLVector3 pos) 430 public void UpdateSinglePosition(LLVector3 pos)
431 { 431 {
432 // Console.WriteLine("updating single prim position"); 432 // Console.WriteLine("updating single prim position");
433 if (this.m_isRootPrim) 433 if (this.m_isRootPrim)
434 { 434 {
435 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 435 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
436 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); 436 LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z);
437 LLVector3 diff = oldPos - newPos; 437 LLVector3 diff = oldPos - newPos;
438 Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); 438 Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
439 axDiff = this.Rotation.Inverse() * axDiff; 439 axDiff = this.Rotation.Inverse() * axDiff;
440 diff.X = axDiff.x; 440 diff.X = axDiff.x;
441 diff.Y = axDiff.y; 441 diff.Y = axDiff.y;
442 diff.Z = axDiff.z; 442 diff.Z = axDiff.z;
443 this.Pos = newPos; 443 this.Pos = newPos;
444 444
445 foreach (Primitive prim in this.children) 445 foreach (Primitive prim in this.children)
446 { 446 {
447 prim.m_pos += diff; 447 prim.m_pos += diff;
448 prim.updateFlag = 2; 448 prim.updateFlag = 2;
449 } 449 }
450 this.updateFlag = 2; 450 this.updateFlag = 2;
451 } 451 }
452 else 452 else
453 { 453 {
454 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 454 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
455 this.m_pos = newPos; 455 this.m_pos = newPos;
456 this.updateFlag = 2; 456 this.updateFlag = 2;
457 } 457 }
458 458
459 459
460 } 460 }
461 461
462 #endregion 462 #endregion
463 463
464 #region Rotation 464 #region Rotation
465 /// <summary> 465 /// <summary>
466 /// 466 ///
467 /// </summary> 467 /// </summary>
468 /// <param name="rot"></param> 468 /// <param name="rot"></param>
469 public void UpdateGroupRotation(LLQuaternion rot) 469 public void UpdateGroupRotation(LLQuaternion rot)
470 { 470 {
471 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 471 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
472 this.updateFlag = 2; 472 this.updateFlag = 2;
473 473
474 } 474 }
475 475
476 /// <summary> 476 /// <summary>
477 /// 477 ///
478 /// </summary> 478 /// </summary>
479 /// <param name="pos"></param> 479 /// <param name="pos"></param>
480 /// <param name="rot"></param> 480 /// <param name="rot"></param>
481 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) 481 public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot)
482 { 482 {
483 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 483 this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
484 this.Pos = pos; 484 this.Pos = pos;
485 this.updateFlag = 2; 485 this.updateFlag = 2;
486 } 486 }
487 487
488 /// <summary> 488 /// <summary>
489 /// 489 ///
490 /// </summary> 490 /// </summary>
491 /// <param name="rot"></param> 491 /// <param name="rot"></param>
492 public void UpdateSingleRotation(LLQuaternion rot) 492 public void UpdateSingleRotation(LLQuaternion rot)
493 { 493 {
494 //Console.WriteLine("updating single prim rotation"); 494 //Console.WriteLine("updating single prim rotation");
495 Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); 495 Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
496 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); 496 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
497 this.Rotation = axRot; 497 this.Rotation = axRot;
498 foreach (Primitive prim in this.children) 498 foreach (Primitive prim in this.children)
499 { 499 {
500 Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); 500 Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z);
501 axPos = oldParentRot * axPos; 501 axPos = oldParentRot * axPos;
502 axPos = axRot.Inverse() * axPos; 502 axPos = axRot.Inverse() * axPos;
503 prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); 503 prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z);
504 prim.Rotation = oldParentRot * prim.Rotation ; 504 prim.Rotation = oldParentRot * prim.Rotation ;
505 prim.Rotation = axRot.Inverse()* prim.Rotation; 505 prim.Rotation = axRot.Inverse()* prim.Rotation;
506 prim.updateFlag = 2; 506 prim.updateFlag = 2;
507 } 507 }
508 this.updateFlag = 2; 508 this.updateFlag = 2;
509 } 509 }
510 #endregion 510 #endregion
511 511
512 #region Shape 512 #region Shape
513 /// <summary> 513 /// <summary>
514 /// 514 ///
515 /// </summary> 515 /// </summary>
516 /// <param name="shapeBlock"></param> 516 /// <param name="shapeBlock"></param>
517 public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock) 517 public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
518 { 518 {
519 this.m_Shape.PathBegin = shapeBlock.PathBegin; 519 this.m_Shape.PathBegin = shapeBlock.PathBegin;
520 this.m_Shape.PathEnd = shapeBlock.PathEnd; 520 this.m_Shape.PathEnd = shapeBlock.PathEnd;
521 this.m_Shape.PathScaleX = shapeBlock.PathScaleX; 521 this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
522 this.m_Shape.PathScaleY = shapeBlock.PathScaleY; 522 this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
523 this.m_Shape.PathShearX = shapeBlock.PathShearX; 523 this.m_Shape.PathShearX = shapeBlock.PathShearX;
524 this.m_Shape.PathShearY = shapeBlock.PathShearY; 524 this.m_Shape.PathShearY = shapeBlock.PathShearY;
525 this.m_Shape.PathSkew = shapeBlock.PathSkew; 525 this.m_Shape.PathSkew = shapeBlock.PathSkew;
526 this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin; 526 this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
527 this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd; 527 this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
528 this.m_Shape.PathCurve = shapeBlock.PathCurve; 528 this.m_Shape.PathCurve = shapeBlock.PathCurve;
529 this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve; 529 this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
530 this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow; 530 this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
531 this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset; 531 this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
532 this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions; 532 this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
533 this.m_Shape.PathTaperX = shapeBlock.PathTaperX; 533 this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
534 this.m_Shape.PathTaperY = shapeBlock.PathTaperY; 534 this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
535 this.m_Shape.PathTwist = shapeBlock.PathTwist; 535 this.m_Shape.PathTwist = shapeBlock.PathTwist;
536 this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin; 536 this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
537 this.updateFlag = 1; 537 this.updateFlag = 1;
538 } 538 }
539 #endregion 539 #endregion
540 540
541 #region Texture 541 #region Texture
542 /// <summary> 542 /// <summary>
543 /// 543 ///
544 /// </summary> 544 /// </summary>
545 /// <param name="textureEntry"></param> 545 /// <param name="textureEntry"></param>
546 public void UpdateTextureEntry(byte[] textureEntry) 546 public void UpdateTextureEntry(byte[] textureEntry)
547 { 547 {
548 this.m_Shape.TextureEntry = textureEntry; 548 this.m_Shape.TextureEntry = textureEntry;
549 this.updateFlag = 1; 549 this.updateFlag = 1;
550 } 550 }
551 #endregion 551 #endregion
552 552
553 #region Client Update Methods 553 #region Client Update Methods
554 554
555 /// <summary> 555 /// <summary>
556 /// 556 ///
557 /// </summary> 557 /// </summary>
558 /// <param name="remoteClient"></param> 558 /// <param name="remoteClient"></param>
559 public void SendFullUpdateForAllChildren(IClientAPI remoteClient) 559 public void SendFullUpdateForAllChildren(IClientAPI remoteClient)
560 { 560 {
561 this.SendFullUpdateToClient(remoteClient); 561 this.SendFullUpdateToClient(remoteClient);
562 for (int i = 0; i < this.children.Count; i++) 562 for (int i = 0; i < this.children.Count; i++)
563 { 563 {
564 if (this.children[i] is Primitive) 564 if (this.children[i] is Primitive)
565 { 565 {
566 ((Primitive)this.children[i]).SendFullUpdateForAllChildren(remoteClient); 566 ((Primitive)this.children[i]).SendFullUpdateForAllChildren(remoteClient);
567 } 567 }
568 } 568 }
569 } 569 }
570 570
571 /// <summary> 571 /// <summary>
572 /// 572 ///
573 /// </summary> 573 /// </summary>
574 /// <param name="remoteClient"></param> 574 /// <param name="remoteClient"></param>
575 public void SendFullUpdateToClient(IClientAPI remoteClient) 575 public void SendFullUpdateToClient(IClientAPI remoteClient)
576 { 576 {
577 LLVector3 lPos; 577 LLVector3 lPos;
578 lPos = this.Pos; 578 lPos = this.Pos;
579 LLQuaternion lRot; 579 LLQuaternion lRot;
580 lRot = new LLQuaternion(this.Rotation.x, this.Rotation.y, this.Rotation.z, this.Rotation.w); 580 lRot = new LLQuaternion(this.Rotation.x, this.Rotation.y, this.Rotation.z, this.Rotation.w);
581 581
582 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID); 582 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID);
583 } 583 }
584 584
585 /// <summary> 585 /// <summary>
586 /// 586 ///
587 /// </summary> 587 /// </summary>
588 public void SendFullUpdateToAllClients() 588 public void SendFullUpdateToAllClients()
589 { 589 {
590 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 590 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
591 for (int i = 0; i < avatars.Count; i++) 591 for (int i = 0; i < avatars.Count; i++)
592 { 592 {
593 this.SendFullUpdateToClient(avatars[i].ControllingClient); 593 this.SendFullUpdateToClient(avatars[i].ControllingClient);
594 } 594 }
595 } 595 }
596 596
597 /// <summary> 597 /// <summary>
598 /// 598 ///
599 /// </summary> 599 /// </summary>
600 /// <param name="remoteClient"></param> 600 /// <param name="remoteClient"></param>
601 public void SendTerseUpdateForAllChildren(IClientAPI remoteClient) 601 public void SendTerseUpdateForAllChildren(IClientAPI remoteClient)
602 { 602 {
603 this.SendTerseUpdateToClient(remoteClient); 603 this.SendTerseUpdateToClient(remoteClient);
604 for (int i = 0; i < this.children.Count; i++) 604 for (int i = 0; i < this.children.Count; i++)
605 { 605 {
606 if (this.children[i] is Primitive) 606 if (this.children[i] is Primitive)
607 { 607 {
608 ((Primitive)this.children[i]).SendTerseUpdateForAllChildren(remoteClient); 608 ((Primitive)this.children[i]).SendTerseUpdateForAllChildren(remoteClient);
609 } 609 }
610 } 610 }
611 } 611 }
612 612
613 /// <summary> 613 /// <summary>
614 /// 614 ///
615 /// </summary> 615 /// </summary>
616 /// <param name="RemoteClient"></param> 616 /// <param name="RemoteClient"></param>
617 public void SendTerseUpdateToClient(IClientAPI RemoteClient) 617 public void SendTerseUpdateToClient(IClientAPI RemoteClient)
618 { 618 {
619 LLVector3 lPos; 619 LLVector3 lPos;
620 Quaternion lRot; 620 Quaternion lRot;
621 621
622 lPos = this.Pos; 622 lPos = this.Pos;
623 lRot = this.Rotation; 623 lRot = this.Rotation;
624 624
625 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); 625 LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w);
626 RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); 626 RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot);
627 } 627 }
628 628
629 /// <summary> 629 /// <summary>
630 /// 630 ///
631 /// </summary> 631 /// </summary>
632 public void SendTerseUpdateToALLClients() 632 public void SendTerseUpdateToALLClients()
633 { 633 {
634 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 634 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
635 for (int i = 0; i < avatars.Count; i++) 635 for (int i = 0; i < avatars.Count; i++)
636 { 636 {
637 this.SendTerseUpdateToClient(avatars[i].ControllingClient); 637 this.SendTerseUpdateToClient(avatars[i].ControllingClient);
638 } 638 }
639 } 639 }
640 640
641 #endregion 641 #endregion
642 642
643 public void TriggerOnPrimCountTainted() 643 public void TriggerOnPrimCountTainted()
644 { 644 {
645 this.OnPrimCountTainted(); 645 this.OnPrimCountTainted();
646 } 646 }
647 } 647 }
648} 648}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 347625a..e37d105 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -1,618 +1,618 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34 34
35namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
36{ 36{
37 public partial class Scene 37 public partial class Scene
38 { 38 {
39 /// <summary> 39 /// <summary>
40 /// Modifies terrain using the specified information 40 /// Modifies terrain using the specified information
41 /// </summary> 41 /// </summary>
42 /// <param name="height">The height at which the user started modifying the terrain</param> 42 /// <param name="height">The height at which the user started modifying the terrain</param>
43 /// <param name="seconds">The number of seconds the modify button was pressed</param> 43 /// <param name="seconds">The number of seconds the modify button was pressed</param>
44 /// <param name="brushsize">The size of the brush used</param> 44 /// <param name="brushsize">The size of the brush used</param>
45 /// <param name="action">The action to be performed</param> 45 /// <param name="action">The action to be performed</param>
46 /// <param name="north">Distance from the north border where the cursor is located</param> 46 /// <param name="north">Distance from the north border where the cursor is located</param>
47 /// <param name="west">Distance from the west border where the cursor is located</param> 47 /// <param name="west">Distance from the west border where the cursor is located</param>
48 public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west) 48 public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west)
49 { 49 {
50 // Shiny. 50 // Shiny.
51 double size = (double)(1 << brushsize); 51 double size = (double)(1 << brushsize);
52 52
53 switch (action) 53 switch (action)
54 { 54 {
55 case 0: 55 case 0:
56 // flatten terrain 56 // flatten terrain
57 Terrain.flatten(north, west, size, (double)seconds / 100.0); 57 Terrain.flatten(north, west, size, (double)seconds / 100.0);
58 RegenerateTerrain(true, (int)north, (int)west); 58 RegenerateTerrain(true, (int)north, (int)west);
59 break; 59 break;
60 case 1: 60 case 1:
61 // raise terrain 61 // raise terrain
62 Terrain.raise(north, west, size, (double)seconds / 100.0); 62 Terrain.raise(north, west, size, (double)seconds / 100.0);
63 RegenerateTerrain(true, (int)north, (int)west); 63 RegenerateTerrain(true, (int)north, (int)west);
64 break; 64 break;
65 case 2: 65 case 2:
66 //lower terrain 66 //lower terrain
67 Terrain.lower(north, west, size, (double)seconds / 100.0); 67 Terrain.lower(north, west, size, (double)seconds / 100.0);
68 RegenerateTerrain(true, (int)north, (int)west); 68 RegenerateTerrain(true, (int)north, (int)west);
69 break; 69 break;
70 case 3: 70 case 3:
71 // smooth terrain 71 // smooth terrain
72 Terrain.smooth(north, west, size, (double)seconds / 100.0); 72 Terrain.smooth(north, west, size, (double)seconds / 100.0);
73 RegenerateTerrain(true, (int)north, (int)west); 73 RegenerateTerrain(true, (int)north, (int)west);
74 break; 74 break;
75 case 4: 75 case 4:
76 // noise 76 // noise
77 Terrain.noise(north, west, size, (double)seconds / 100.0); 77 Terrain.noise(north, west, size, (double)seconds / 100.0);
78 RegenerateTerrain(true, (int)north, (int)west); 78 RegenerateTerrain(true, (int)north, (int)west);
79 break; 79 break;
80 case 5: 80 case 5:
81 // revert 81 // revert
82 Terrain.revert(north, west, size, (double)seconds / 100.0); 82 Terrain.revert(north, west, size, (double)seconds / 100.0);
83 RegenerateTerrain(true, (int)north, (int)west); 83 RegenerateTerrain(true, (int)north, (int)west);
84 break; 84 break;
85 85
86 // CLIENT EXTENSIONS GO HERE 86 // CLIENT EXTENSIONS GO HERE
87 case 128: 87 case 128:
88 // erode-thermal 88 // erode-thermal
89 break; 89 break;
90 case 129: 90 case 129:
91 // erode-aerobic 91 // erode-aerobic
92 break; 92 break;
93 case 130: 93 case 130:
94 // erode-hydraulic 94 // erode-hydraulic
95 break; 95 break;
96 } 96 }
97 return; 97 return;
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// 101 ///
102 /// </summary> 102 /// </summary>
103 /// <remarks>Inefficient. TODO: Fixme</remarks> 103 /// <remarks>Inefficient. TODO: Fixme</remarks>
104 /// <param name="fromAgentID"></param> 104 /// <param name="fromAgentID"></param>
105 /// <param name="toAgentID"></param> 105 /// <param name="toAgentID"></param>
106 /// <param name="timestamp"></param> 106 /// <param name="timestamp"></param>
107 /// <param name="fromAgentName"></param> 107 /// <param name="fromAgentName"></param>
108 /// <param name="message"></param> 108 /// <param name="message"></param>
109 public void InstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message) 109 public void InstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message)
110 { 110 {
111 if (this.Avatars.ContainsKey(toAgentID)) 111 if (this.Avatars.ContainsKey(toAgentID))
112 { 112 {
113 if (this.Avatars.ContainsKey(fromAgentID)) 113 if (this.Avatars.ContainsKey(fromAgentID))
114 { 114 {
115 // Local sim message 115 // Local sim message
116 ScenePresence fromAvatar = this.Avatars[fromAgentID]; 116 ScenePresence fromAvatar = this.Avatars[fromAgentID];
117 ScenePresence toAvatar = this.Avatars[toAgentID]; 117 ScenePresence toAvatar = this.Avatars[toAgentID];
118 string fromName = fromAvatar.firstname + " " + fromAvatar.lastname; 118 string fromName = fromAvatar.firstname + " " + fromAvatar.lastname;
119 toAvatar.ControllingClient.SendInstantMessage(message, toAgentID, fromName); 119 toAvatar.ControllingClient.SendInstantMessage(message, toAgentID, fromName);
120 } 120 }
121 else 121 else
122 { 122 {
123 // Message came from a user outside the sim, ignore? 123 // Message came from a user outside the sim, ignore?
124 } 124 }
125 } 125 }
126 else 126 else
127 { 127 {
128 // Grid message 128 // Grid message
129 } 129 }
130 } 130 }
131 131
132 /// <summary> 132 /// <summary>
133 /// 133 ///
134 /// </summary> 134 /// </summary>
135 /// <param name="message"></param> 135 /// <param name="message"></param>
136 /// <param name="type"></param> 136 /// <param name="type"></param>
137 /// <param name="fromPos"></param> 137 /// <param name="fromPos"></param>
138 /// <param name="fromName"></param> 138 /// <param name="fromName"></param>
139 /// <param name="fromAgentID"></param> 139 /// <param name="fromAgentID"></param>
140 public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) 140 public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
141 { 141 {
142 ScenePresence avatar = null; 142 ScenePresence avatar = null;
143 if (this.Avatars.ContainsKey(fromAgentID)) 143 if (this.Avatars.ContainsKey(fromAgentID))
144 { 144 {
145 avatar = this.Avatars[fromAgentID]; 145 avatar = this.Avatars[fromAgentID];
146 fromPos = avatar.Pos; 146 fromPos = avatar.Pos;
147 fromName = avatar.firstname + " " + avatar.lastname; 147 fromName = avatar.firstname + " " + avatar.lastname;
148 avatar = null; 148 avatar = null;
149 } 149 }
150 150
151 this.ForEachScenePresence(delegate(ScenePresence presence) 151 this.ForEachScenePresence(delegate(ScenePresence presence)
152 { 152 {
153 int dis = -1000; 153 int dis = -1000;
154 if (this.Avatars.ContainsKey(presence.ControllingClient.AgentId)) 154 if (this.Avatars.ContainsKey(presence.ControllingClient.AgentId))
155 { 155 {
156 avatar = this.Avatars[presence.ControllingClient.AgentId]; 156 avatar = this.Avatars[presence.ControllingClient.AgentId];
157 dis = (int)avatar.Pos.GetDistanceTo(fromPos); 157 dis = (int)avatar.Pos.GetDistanceTo(fromPos);
158 } 158 }
159 159
160 switch (type) 160 switch (type)
161 { 161 {
162 case 0: // Whisper 162 case 0: // Whisper
163 if ((dis < 10) && (dis > -10)) 163 if ((dis < 10) && (dis > -10))
164 { 164 {
165 //should change so the message is sent through the avatar rather than direct to the ClientView 165 //should change so the message is sent through the avatar rather than direct to the ClientView
166 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName, 166 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName,
167 fromAgentID); 167 fromAgentID);
168 } 168 }
169 break; 169 break;
170 case 1: // Say 170 case 1: // Say
171 if ((dis < 30) && (dis > -30)) 171 if ((dis < 30) && (dis > -30))
172 { 172 {
173 //Console.WriteLine("sending chat"); 173 //Console.WriteLine("sending chat");
174 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName, 174 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName,
175 fromAgentID); 175 fromAgentID);
176 } 176 }
177 break; 177 break;
178 case 2: // Shout 178 case 2: // Shout
179 if ((dis < 100) && (dis > -100)) 179 if ((dis < 100) && (dis > -100))
180 { 180 {
181 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName, 181 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName,
182 fromAgentID); 182 fromAgentID);
183 } 183 }
184 break; 184 break;
185 185
186 case 0xff: // Broadcast 186 case 0xff: // Broadcast
187 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName, 187 presence.ControllingClient.SendChatMessage(message, type, fromPos, fromName,
188 fromAgentID); 188 fromAgentID);
189 break; 189 break;
190 } 190 }
191 }); 191 });
192 } 192 }
193 193
194 /// <summary> 194 /// <summary>
195 /// 195 ///
196 /// </summary> 196 /// </summary>
197 /// <param name="primAsset"></param> 197 /// <param name="primAsset"></param>
198 /// <param name="pos"></param> 198 /// <param name="pos"></param>
199 public void RezObject(AssetBase primAsset, LLVector3 pos) 199 public void RezObject(AssetBase primAsset, LLVector3 pos)
200 { 200 {
201 201
202 } 202 }
203 203
204 /// <summary> 204 /// <summary>
205 /// 205 ///
206 /// </summary> 206 /// </summary>
207 /// <param name="packet"></param> 207 /// <param name="packet"></param>
208 /// <param name="simClient"></param> 208 /// <param name="simClient"></param>
209 public void DeRezObject(Packet packet, IClientAPI simClient) 209 public void DeRezObject(Packet packet, IClientAPI simClient)
210 { 210 {
211 211
212 } 212 }
213 213
214 /// <summary> 214 /// <summary>
215 /// 215 ///
216 /// </summary> 216 /// </summary>
217 /// <param name="remoteClient"></param> 217 /// <param name="remoteClient"></param>
218 public void SendAvatarsToClient(IClientAPI remoteClient) 218 public void SendAvatarsToClient(IClientAPI remoteClient)
219 { 219 {
220 220
221 } 221 }
222 222
223 /// <summary> 223 /// <summary>
224 /// 224 ///
225 /// </summary> 225 /// </summary>
226 /// <param name="originalPrim"></param> 226 /// <param name="originalPrim"></param>
227 /// <param name="offset"></param> 227 /// <param name="offset"></param>
228 /// <param name="flags"></param> 228 /// <param name="flags"></param>
229 public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags) 229 public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags)
230 { 230 {
231 SceneObject originPrim = null; 231 SceneObject originPrim = null;
232 foreach (EntityBase ent in Entities.Values) 232 foreach (EntityBase ent in Entities.Values)
233 { 233 {
234 if (ent is SceneObject) 234 if (ent is SceneObject)
235 { 235 {
236 if (((SceneObject)ent).rootLocalID == originalPrim) 236 if (((SceneObject)ent).rootLocalID == originalPrim)
237 { 237 {
238 originPrim = (SceneObject)ent; 238 originPrim = (SceneObject)ent;
239 break; 239 break;
240 } 240 }
241 } 241 }
242 } 242 }
243 243
244 if (originPrim != null) 244 if (originPrim != null)
245 { 245 {
246 SceneObject copy = originPrim.Copy(); 246 SceneObject copy = originPrim.Copy();
247 copy.Pos = copy.Pos + offset; 247 copy.Pos = copy.Pos + offset;
248 this.Entities.Add(copy.rootUUID, copy); 248 this.Entities.Add(copy.rootUUID, copy);
249 249
250 List<ScenePresence> avatars = this.RequestAvatarList(); 250 List<ScenePresence> avatars = this.RequestAvatarList();
251 for (int i = 0; i < avatars.Count; i++) 251 for (int i = 0; i < avatars.Count; i++)
252 { 252 {
253 copy.SendAllChildPrimsToClient(avatars[i].ControllingClient); 253 copy.SendAllChildPrimsToClient(avatars[i].ControllingClient);
254 } 254 }
255 255
256 } 256 }
257 else 257 else
258 { 258 {
259 OpenSim.Framework.Console.MainLog.Instance.Warn("Attempted to duplicate nonexistant prim"); 259 OpenSim.Framework.Console.MainLog.Instance.Warn("Attempted to duplicate nonexistant prim");
260 } 260 }
261 261
262 } 262 }
263 263
264 /// <summary> 264 /// <summary>
265 /// 265 ///
266 /// </summary> 266 /// </summary>
267 /// <param name="parentPrim"></param> 267 /// <param name="parentPrim"></param>
268 /// <param name="childPrims"></param> 268 /// <param name="childPrims"></param>
269 public void LinkObjects(uint parentPrim, List<uint> childPrims) 269 public void LinkObjects(uint parentPrim, List<uint> childPrims)
270 { 270 {
271 SceneObject parenPrim = null; 271 SceneObject parenPrim = null;
272 foreach (EntityBase ent in Entities.Values) 272 foreach (EntityBase ent in Entities.Values)
273 { 273 {
274 if (ent is SceneObject) 274 if (ent is SceneObject)
275 { 275 {
276 if (((SceneObject)ent).rootLocalID == parentPrim) 276 if (((SceneObject)ent).rootLocalID == parentPrim)
277 { 277 {
278 parenPrim = (SceneObject)ent; 278 parenPrim = (SceneObject)ent;
279 break; 279 break;
280 } 280 }
281 } 281 }
282 } 282 }
283 283
284 List<SceneObject> children = new List<SceneObject>(); 284 List<SceneObject> children = new List<SceneObject>();
285 if (parenPrim != null) 285 if (parenPrim != null)
286 { 286 {
287 for (int i = 0; i < childPrims.Count; i++) 287 for (int i = 0; i < childPrims.Count; i++)
288 { 288 {
289 foreach (EntityBase ent in Entities.Values) 289 foreach (EntityBase ent in Entities.Values)
290 { 290 {
291 if (ent is SceneObject) 291 if (ent is SceneObject)
292 { 292 {
293 if (((SceneObject)ent).rootLocalID == childPrims[i]) 293 if (((SceneObject)ent).rootLocalID == childPrims[i])
294 { 294 {
295 children.Add((SceneObject)ent); 295 children.Add((SceneObject)ent);
296 } 296 }
297 } 297 }
298 } 298 }
299 } 299 }
300 } 300 }
301 301
302 foreach (SceneObject sceneObj in children) 302 foreach (SceneObject sceneObj in children)
303 { 303 {
304 parenPrim.AddNewChildPrims(sceneObj); 304 parenPrim.AddNewChildPrims(sceneObj);
305 } 305 }
306 } 306 }
307 307
308 /// <summary> 308 /// <summary>
309 /// 309 ///
310 /// </summary> 310 /// </summary>
311 /// <param name="primLocalID"></param> 311 /// <param name="primLocalID"></param>
312 /// <param name="shapeBlock"></param> 312 /// <param name="shapeBlock"></param>
313 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) 313 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
314 { 314 {
315 Primitive prim = null; 315 Primitive prim = null;
316 foreach (EntityBase ent in Entities.Values) 316 foreach (EntityBase ent in Entities.Values)
317 { 317 {
318 if (ent is SceneObject) 318 if (ent is SceneObject)
319 { 319 {
320 prim = ((SceneObject)ent).HasChildPrim(primLocalID); 320 prim = ((SceneObject)ent).HasChildPrim(primLocalID);
321 if (prim != null) 321 if (prim != null)
322 { 322 {
323 prim.UpdateShape(shapeBlock); 323 prim.UpdateShape(shapeBlock);
324 break; 324 break;
325 } 325 }
326 } 326 }
327 } 327 }
328 } 328 }
329 329
330 /// <summary> 330 /// <summary>
331 /// 331 ///
332 /// </summary> 332 /// </summary>
333 /// <param name="primLocalID"></param> 333 /// <param name="primLocalID"></param>
334 /// <param name="remoteClient"></param> 334 /// <param name="remoteClient"></param>
335 public void SelectPrim(uint primLocalID, IClientAPI remoteClient) 335 public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
336 { 336 {
337 foreach (EntityBase ent in Entities.Values) 337 foreach (EntityBase ent in Entities.Values)
338 { 338 {
339 if (ent is SceneObject) 339 if (ent is SceneObject)
340 { 340 {
341 if (((SceneObject)ent).rootLocalID == primLocalID) 341 if (((SceneObject)ent).rootLocalID == primLocalID)
342 { 342 {
343 ((SceneObject)ent).GetProperites(remoteClient); 343 ((SceneObject)ent).GetProperites(remoteClient);
344 ((SceneObject)ent).isSelected = true; 344 ((SceneObject)ent).isSelected = true;
345 this.ParcelManager.setPrimsTainted(); 345 this.ParcelManager.setPrimsTainted();
346 break; 346 break;
347 } 347 }
348 } 348 }
349 } 349 }
350 } 350 }
351 351
352 /// <summary> 352 /// <summary>
353 /// 353 ///
354 /// </summary> 354 /// </summary>
355 /// <param name="primLocalID"></param> 355 /// <param name="primLocalID"></param>
356 /// <param name="remoteClient"></param> 356 /// <param name="remoteClient"></param>
357 public void DeselectPrim(uint primLocalID, IClientAPI remoteClient) 357 public void DeselectPrim(uint primLocalID, IClientAPI remoteClient)
358 { 358 {
359 foreach (EntityBase ent in Entities.Values) 359 foreach (EntityBase ent in Entities.Values)
360 { 360 {
361 if (ent is SceneObject) 361 if (ent is SceneObject)
362 { 362 {
363 if (((SceneObject)ent).rootLocalID == primLocalID) 363 if (((SceneObject)ent).rootLocalID == primLocalID)
364 { 364 {
365 ((SceneObject)ent).isSelected = false; 365 ((SceneObject)ent).isSelected = false;
366 this.ParcelManager.setPrimsTainted(); 366 this.ParcelManager.setPrimsTainted();
367 break; 367 break;
368 } 368 }
369 } 369 }
370 } 370 }
371 } 371 }
372 372
373 /// <summary> 373 /// <summary>
374 /// 374 ///
375 /// </summary> 375 /// </summary>
376 /// <param name="primLocalID"></param> 376 /// <param name="primLocalID"></param>
377 /// <param name="description"></param> 377 /// <param name="description"></param>
378 public void PrimDescription(uint primLocalID, string description) 378 public void PrimDescription(uint primLocalID, string description)
379 { 379 {
380 Primitive prim = null; 380 Primitive prim = null;
381 foreach (EntityBase ent in Entities.Values) 381 foreach (EntityBase ent in Entities.Values)
382 { 382 {
383 if (ent is SceneObject) 383 if (ent is SceneObject)
384 { 384 {
385 prim = ((SceneObject)ent).HasChildPrim(primLocalID); 385 prim = ((SceneObject)ent).HasChildPrim(primLocalID);
386 if (prim != null) 386 if (prim != null)
387 { 387 {
388 prim.Description = description; 388 prim.Description = description;
389 break; 389 break;
390 } 390 }
391 } 391 }
392 } 392 }
393 } 393 }
394 394
395 /// <summary> 395 /// <summary>
396 /// 396 ///
397 /// </summary> 397 /// </summary>
398 /// <param name="primLocalID"></param> 398 /// <param name="primLocalID"></param>
399 /// <param name="description"></param> 399 /// <param name="description"></param>
400 public void PrimName(uint primLocalID, string name) 400 public void PrimName(uint primLocalID, string name)
401 { 401 {
402 Primitive prim = null; 402 Primitive prim = null;
403 foreach (EntityBase ent in Entities.Values) 403 foreach (EntityBase ent in Entities.Values)
404 { 404 {
405 if (ent is SceneObject) 405 if (ent is SceneObject)
406 { 406 {
407 prim = ((SceneObject)ent).HasChildPrim(primLocalID); 407 prim = ((SceneObject)ent).HasChildPrim(primLocalID);
408 if (prim != null) 408 if (prim != null)
409 { 409 {
410 prim.Name = name; 410 prim.Name = name;
411 break; 411 break;
412 } 412 }
413 } 413 }
414 } 414 }
415 } 415 }
416 416
417 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 417 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
418 { 418 {
419 Primitive prim = null; 419 Primitive prim = null;
420 foreach (EntityBase ent in Entities.Values) 420 foreach (EntityBase ent in Entities.Values)
421 { 421 {
422 if (ent is SceneObject) 422 if (ent is SceneObject)
423 { 423 {
424 prim = ((SceneObject)ent).HasChildPrim(objectID); 424 prim = ((SceneObject)ent).HasChildPrim(objectID);
425 if (prim != null) 425 if (prim != null)
426 { 426 {
427 ((SceneObject)ent).GrapMovement(offset, pos, remoteClient); 427 ((SceneObject)ent).GrapMovement(offset, pos, remoteClient);
428 break; 428 break;
429 } 429 }
430 } 430 }
431 } 431 }
432 /* 432 /*
433 if (this.Entities.ContainsKey(objectID)) 433 if (this.Entities.ContainsKey(objectID))
434 { 434 {
435 if (this.Entities[objectID] is SceneObject) 435 if (this.Entities[objectID] is SceneObject)
436 { 436 {
437 ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); 437 ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient);
438 } 438 }
439 }*/ 439 }*/
440 } 440 }
441 441
442 /// <summary> 442 /// <summary>
443 /// 443 ///
444 /// </summary> 444 /// </summary>
445 /// <param name="localID"></param> 445 /// <param name="localID"></param>
446 /// <param name="packet"></param> 446 /// <param name="packet"></param>
447 /// <param name="remoteClient"></param> 447 /// <param name="remoteClient"></param>
448 public void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient) 448 public void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient)
449 { 449 {
450 450
451 } 451 }
452 452
453 /// <summary> 453 /// <summary>
454 /// 454 ///
455 /// </summary> 455 /// </summary>
456 /// <param name="localID"></param> 456 /// <param name="localID"></param>
457 /// <param name="texture"></param> 457 /// <param name="texture"></param>
458 /// <param name="remoteClient"></param> 458 /// <param name="remoteClient"></param>
459 public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 459 public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
460 { 460 {
461 Primitive prim = null; 461 Primitive prim = null;
462 foreach (EntityBase ent in Entities.Values) 462 foreach (EntityBase ent in Entities.Values)
463 { 463 {
464 if (ent is SceneObject) 464 if (ent is SceneObject)
465 { 465 {
466 prim = ((SceneObject)ent).HasChildPrim(localID); 466 prim = ((SceneObject)ent).HasChildPrim(localID);
467 if (prim != null) 467 if (prim != null)
468 { 468 {
469 prim.UpdateTextureEntry(texture); 469 prim.UpdateTextureEntry(texture);
470 } 470 }
471 } 471 }
472 } 472 }
473 } 473 }
474 474
475 /// <summary> 475 /// <summary>
476 /// 476 ///
477 /// </summary> 477 /// </summary>
478 /// <param name="localID"></param> 478 /// <param name="localID"></param>
479 /// <param name="pos"></param> 479 /// <param name="pos"></param>
480 /// <param name="remoteClient"></param> 480 /// <param name="remoteClient"></param>
481 public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 481 public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
482 { 482 {
483 Primitive prim = null; 483 Primitive prim = null;
484 foreach (EntityBase ent in Entities.Values) 484 foreach (EntityBase ent in Entities.Values)
485 { 485 {
486 if (ent is SceneObject) 486 if (ent is SceneObject)
487 { 487 {
488 prim = ((SceneObject)ent).HasChildPrim(localID); 488 prim = ((SceneObject)ent).HasChildPrim(localID);
489 if (prim != null) 489 if (prim != null)
490 { 490 {
491 prim.UpdateGroupPosition(pos); 491 prim.UpdateGroupPosition(pos);
492 break; 492 break;
493 } 493 }
494 } 494 }
495 } 495 }
496 } 496 }
497 497
498 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 498 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
499 { 499 {
500 Primitive prim = null; 500 Primitive prim = null;
501 foreach (EntityBase ent in Entities.Values) 501 foreach (EntityBase ent in Entities.Values)
502 { 502 {
503 if (ent is SceneObject) 503 if (ent is SceneObject)
504 { 504 {
505 prim = ((SceneObject)ent).HasChildPrim(localID); 505 prim = ((SceneObject)ent).HasChildPrim(localID);
506 if (prim != null) 506 if (prim != null)
507 { 507 {
508 prim.UpdateSinglePosition(pos); 508 prim.UpdateSinglePosition(pos);
509 break; 509 break;
510 } 510 }
511 } 511 }
512 } 512 }
513 } 513 }
514 514
515 /// <summary> 515 /// <summary>
516 /// 516 ///
517 /// </summary> 517 /// </summary>
518 /// <param name="localID"></param> 518 /// <param name="localID"></param>
519 /// <param name="pos"></param> 519 /// <param name="pos"></param>
520 /// <param name="rot"></param> 520 /// <param name="rot"></param>
521 /// <param name="remoteClient"></param> 521 /// <param name="remoteClient"></param>
522 public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient) 522 public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient)
523 { 523 {
524 Primitive prim = null; 524 Primitive prim = null;
525 foreach (EntityBase ent in Entities.Values) 525 foreach (EntityBase ent in Entities.Values)
526 { 526 {
527 if (ent is SceneObject) 527 if (ent is SceneObject)
528 { 528 {
529 prim = ((SceneObject)ent).HasChildPrim(localID); 529 prim = ((SceneObject)ent).HasChildPrim(localID);
530 if (prim != null) 530 if (prim != null)
531 { 531 {
532 prim.UpdateGroupMouseRotation(pos, rot); 532 prim.UpdateGroupMouseRotation(pos, rot);
533 break; 533 break;
534 } 534 }
535 } 535 }
536 } 536 }
537 } 537 }
538 538
539 /// <summary> 539 /// <summary>
540 /// 540 ///
541 /// </summary> 541 /// </summary>
542 /// <param name="localID"></param> 542 /// <param name="localID"></param>
543 /// <param name="rot"></param> 543 /// <param name="rot"></param>
544 /// <param name="remoteClient"></param> 544 /// <param name="remoteClient"></param>
545 public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 545 public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
546 { 546 {
547 Primitive prim = null; 547 Primitive prim = null;
548 foreach (EntityBase ent in Entities.Values) 548 foreach (EntityBase ent in Entities.Values)
549 { 549 {
550 if (ent is SceneObject) 550 if (ent is SceneObject)
551 { 551 {
552 prim = ((SceneObject)ent).HasChildPrim(localID); 552 prim = ((SceneObject)ent).HasChildPrim(localID);
553 if (prim != null) 553 if (prim != null)
554 { 554 {
555 prim.UpdateGroupRotation(rot); 555 prim.UpdateGroupRotation(rot);
556 break; 556 break;
557 } 557 }
558 } 558 }
559 } 559 }
560 } 560 }
561 561
562 /// <summary> 562 /// <summary>
563 /// 563 ///
564 /// </summary> 564 /// </summary>
565 /// <param name="localID"></param> 565 /// <param name="localID"></param>
566 /// <param name="rot"></param> 566 /// <param name="rot"></param>
567 /// <param name="remoteClient"></param> 567 /// <param name="remoteClient"></param>
568 public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 568 public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
569 { 569 {
570 //Console.WriteLine("trying to update single prim rotation"); 570 //Console.WriteLine("trying to update single prim rotation");
571 Primitive prim = null; 571 Primitive prim = null;
572 foreach (EntityBase ent in Entities.Values) 572 foreach (EntityBase ent in Entities.Values)
573 { 573 {
574 if (ent is SceneObject) 574 if (ent is SceneObject)
575 { 575 {
576 prim = ((SceneObject)ent).HasChildPrim(localID); 576 prim = ((SceneObject)ent).HasChildPrim(localID);
577 if (prim != null) 577 if (prim != null)
578 { 578 {
579 prim.UpdateSingleRotation(rot); 579 prim.UpdateSingleRotation(rot);
580 break; 580 break;
581 } 581 }
582 } 582 }
583 } 583 }
584 } 584 }
585 585
586 /// <summary> 586 /// <summary>
587 /// 587 ///
588 /// </summary> 588 /// </summary>
589 /// <param name="localID"></param> 589 /// <param name="localID"></param>
590 /// <param name="scale"></param> 590 /// <param name="scale"></param>
591 /// <param name="remoteClient"></param> 591 /// <param name="remoteClient"></param>
592 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 592 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
593 { 593 {
594 Primitive prim = null; 594 Primitive prim = null;
595 foreach (EntityBase ent in Entities.Values) 595 foreach (EntityBase ent in Entities.Values)
596 { 596 {
597 if (ent is SceneObject) 597 if (ent is SceneObject)
598 { 598 {
599 prim = ((SceneObject)ent).HasChildPrim(localID); 599 prim = ((SceneObject)ent).HasChildPrim(localID);
600 if (prim != null) 600 if (prim != null)
601 { 601 {
602 prim.ResizeGoup(scale); 602 prim.ResizeGoup(scale);
603 break; 603 break;
604 } 604 }
605 } 605 }
606 } 606 }
607 } 607 }
608 608
609 /// <summary> 609 /// <summary>
610 /// Sends prims to a client 610 /// Sends prims to a client
611 /// </summary> 611 /// </summary>
612 /// <param name="RemoteClient">Client to send to</param> 612 /// <param name="RemoteClient">Client to send to</param>
613 public void GetInitialPrims(IClientAPI RemoteClient) 613 public void GetInitialPrims(IClientAPI RemoteClient)
614 { 614 {
615 615
616 } 616 }
617 } 617 }
618} 618}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1e69c9e..a06d74d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1,919 +1,919 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Threading; 30using System.Threading;
31using System.Timers; 31using System.Timers;
32using libsecondlife; 32using libsecondlife;
33using libsecondlife.Packets; 33using libsecondlife.Packets;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Types; 39using OpenSim.Framework.Types;
40using OpenSim.Physics.Manager; 40using OpenSim.Physics.Manager;
41using OpenSim.Region.Caches; 41using OpenSim.Region.Caches;
42using OpenSim.Region.Interfaces; 42using OpenSim.Region.Interfaces;
43using OpenSim.Region.Scripting; 43using OpenSim.Region.Scripting;
44using OpenSim.Region.Terrain; 44using OpenSim.Region.Terrain;
45using Caps = OpenSim.Region.Capabilities.Caps; 45using Caps = OpenSim.Region.Capabilities.Caps;
46using Timer = System.Timers.Timer; 46using Timer = System.Timers.Timer;
47 47
48namespace OpenSim.Region.Environment.Scenes 48namespace OpenSim.Region.Environment.Scenes
49{ 49{
50 public delegate bool FilterAvatarList(ScenePresence avatar); 50 public delegate bool FilterAvatarList(ScenePresence avatar);
51 public delegate void ForEachScenePresenceDelegate(ScenePresence presence); 51 public delegate void ForEachScenePresenceDelegate(ScenePresence presence);
52 52
53 public partial class Scene : SceneBase, ILocalStorageReceiver 53 public partial class Scene : SceneBase, ILocalStorageReceiver
54 { 54 {
55 protected Timer m_heartbeatTimer = new Timer(); 55 protected Timer m_heartbeatTimer = new Timer();
56 protected Dictionary<LLUUID, ScenePresence> Avatars; 56 protected Dictionary<LLUUID, ScenePresence> Avatars;
57 protected Dictionary<LLUUID, SceneObject> Prims; 57 protected Dictionary<LLUUID, SceneObject> Prims;
58 protected PhysicsScene phyScene; 58 protected PhysicsScene phyScene;
59 protected float timeStep = 0.1f; 59 protected float timeStep = 0.1f;
60 private Random Rand = new Random(); 60 private Random Rand = new Random();
61 private uint _primCount = 702000; 61 private uint _primCount = 702000;
62 private System.Threading.Mutex _primAllocateMutex = new Mutex(false); 62 private System.Threading.Mutex _primAllocateMutex = new Mutex(false);
63 private int storageCount; 63 private int storageCount;
64 private int parcelPrimCheckCount; 64 private int parcelPrimCheckCount;
65 private Mutex updateLock; 65 private Mutex updateLock;
66 66
67 protected AuthenticateSessionsBase authenticateHandler; 67 protected AuthenticateSessionsBase authenticateHandler;
68 protected RegionCommsListener regionCommsHost; 68 protected RegionCommsListener regionCommsHost;
69 protected CommunicationsManager commsManager; 69 protected CommunicationsManager commsManager;
70 protected StorageManager storageManager; 70 protected StorageManager storageManager;
71 71
72 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); 72 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>();
73 protected BaseHttpServer httpListener; 73 protected BaseHttpServer httpListener;
74 74
75 #region Properties 75 #region Properties
76 /// <summary> 76 /// <summary>
77 /// 77 ///
78 /// </summary> 78 /// </summary>
79 public PhysicsScene PhysScene 79 public PhysicsScene PhysScene
80 { 80 {
81 set 81 set
82 { 82 {
83 this.phyScene = value; 83 this.phyScene = value;
84 } 84 }
85 get 85 get
86 { 86 {
87 return (this.phyScene); 87 return (this.phyScene);
88 } 88 }
89 } 89 }
90 90
91 private ParcelManager m_parcelManager; 91 private ParcelManager m_parcelManager;
92 public ParcelManager ParcelManager 92 public ParcelManager ParcelManager
93 { 93 {
94 get { return m_parcelManager; } 94 get { return m_parcelManager; }
95 } 95 }
96 96
97 private EstateManager m_estateManager; 97 private EstateManager m_estateManager;
98 public EstateManager EstateManager 98 public EstateManager EstateManager
99 { 99 {
100 get { return m_estateManager; } 100 get { return m_estateManager; }
101 } 101 }
102 102
103 private EventManager m_eventManager; 103 private EventManager m_eventManager;
104 public EventManager EventManager 104 public EventManager EventManager
105 { 105 {
106 get { return m_eventManager; } 106 get { return m_eventManager; }
107 } 107 }
108 108
109 private ScriptManager m_scriptManager; 109 private ScriptManager m_scriptManager;
110 public ScriptManager ScriptManager 110 public ScriptManager ScriptManager
111 { 111 {
112 get { return m_scriptManager; } 112 get { return m_scriptManager; }
113 } 113 }
114 114
115 public Dictionary<LLUUID, SceneObject> Objects 115 public Dictionary<LLUUID, SceneObject> Objects
116 { 116 {
117 get { return Prims; } 117 get { return Prims; }
118 } 118 }
119 119
120 #endregion 120 #endregion
121 121
122 #region Constructors 122 #region Constructors
123 /// <summary> 123 /// <summary>
124 /// Creates a new World class, and a region to go with it. 124 /// Creates a new World class, and a region to go with it.
125 /// </summary> 125 /// </summary>
126 /// <param name="clientThreads">Dictionary to contain client threads</param> 126 /// <param name="clientThreads">Dictionary to contain client threads</param>
127 /// <param name="regionHandle">Region Handle for this region</param> 127 /// <param name="regionHandle">Region Handle for this region</param>
128 /// <param name="regionName">Region Name for this region</param> 128 /// <param name="regionName">Region Name for this region</param>
129 public Scene(RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer) 129 public Scene(RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer)
130 { 130 {
131 updateLock = new Mutex(false); 131 updateLock = new Mutex(false);
132 this.authenticateHandler = authen; 132 this.authenticateHandler = authen;
133 this.commsManager = commsMan; 133 this.commsManager = commsMan;
134 this.storageManager = storeManager; 134 this.storageManager = storeManager;
135 this.assetCache = assetCach; 135 this.assetCache = assetCach;
136 m_regInfo = regInfo; 136 m_regInfo = regInfo;
137 m_regionHandle = m_regInfo.RegionHandle; 137 m_regionHandle = m_regInfo.RegionHandle;
138 m_regionName = m_regInfo.RegionName; 138 m_regionName = m_regInfo.RegionName;
139 this.m_datastore = m_regInfo.DataStore; 139 this.m_datastore = m_regInfo.DataStore;
140 this.RegisterRegionWithComms(); 140 this.RegisterRegionWithComms();
141 141
142 m_parcelManager = new ParcelManager(this, this.m_regInfo); 142 m_parcelManager = new ParcelManager(this, this.m_regInfo);
143 m_estateManager = new EstateManager(this, this.m_regInfo); 143 m_estateManager = new EstateManager(this, this.m_regInfo);
144 m_scriptManager = new ScriptManager(this); 144 m_scriptManager = new ScriptManager(this);
145 m_eventManager = new EventManager(); 145 m_eventManager = new EventManager();
146 146
147 m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts); 147 m_eventManager.OnParcelPrimCountAdd += new EventManager.OnParcelPrimCountAddDelegate(m_parcelManager.addPrimToParcelCounts);
148 148
149 MainLog.Instance.Verbose("World.cs - creating new entitities instance"); 149 MainLog.Instance.Verbose("World.cs - creating new entitities instance");
150 Entities = new Dictionary<LLUUID, EntityBase>(); 150 Entities = new Dictionary<LLUUID, EntityBase>();
151 Avatars = new Dictionary<LLUUID, ScenePresence>(); 151 Avatars = new Dictionary<LLUUID, ScenePresence>();
152 Prims = new Dictionary<LLUUID, SceneObject>(); 152 Prims = new Dictionary<LLUUID, SceneObject>();
153 153
154 MainLog.Instance.Verbose("World.cs - loading objects from datastore"); 154 MainLog.Instance.Verbose("World.cs - loading objects from datastore");
155 List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects(); 155 List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects();
156 foreach (SceneObject prim in PrimsFromDB) 156 foreach (SceneObject prim in PrimsFromDB)
157 { 157 {
158 AddEntity(prim); 158 AddEntity(prim);
159 } 159 }
160 MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)"); 160 MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)");
161 161
162 162
163 MainLog.Instance.Verbose("World.cs - creating LandMap"); 163 MainLog.Instance.Verbose("World.cs - creating LandMap");
164 Terrain = new TerrainEngine(); 164 Terrain = new TerrainEngine();
165 165
166 ScenePresence.LoadAnims(); 166 ScenePresence.LoadAnims();
167 167
168 this.httpListener = httpServer; 168 this.httpListener = httpServer;
169 } 169 }
170 #endregion 170 #endregion
171 171
172 #region Script Handling Methods 172 #region Script Handling Methods
173 173
174 public void SendCommandToScripts(string[] args) 174 public void SendCommandToScripts(string[] args)
175 { 175 {
176 m_eventManager.TriggerOnScriptConsole(args); 176 m_eventManager.TriggerOnScriptConsole(args);
177 } 177 }
178 178
179 #endregion 179 #endregion
180 180
181 /// <summary> 181 /// <summary>
182 /// 182 ///
183 /// </summary> 183 /// </summary>
184 public void StartTimer() 184 public void StartTimer()
185 { 185 {
186 m_heartbeatTimer.Enabled = true; 186 m_heartbeatTimer.Enabled = true;
187 m_heartbeatTimer.Interval = 100; 187 m_heartbeatTimer.Interval = 100;
188 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat); 188 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
189 } 189 }
190 190
191 191
192 #region Update Methods 192 #region Update Methods
193 193
194 194
195 /// <summary> 195 /// <summary>
196 /// Performs per-frame updates regularly 196 /// Performs per-frame updates regularly
197 /// </summary> 197 /// </summary>
198 /// <param name="sender"></param> 198 /// <param name="sender"></param>
199 /// <param name="e"></param> 199 /// <param name="e"></param>
200 void Heartbeat(object sender, EventArgs e) 200 void Heartbeat(object sender, EventArgs e)
201 { 201 {
202 this.Update(); 202 this.Update();
203 } 203 }
204 204
205 /// <summary> 205 /// <summary>
206 /// Performs per-frame updates on the world, this should be the central world loop 206 /// Performs per-frame updates on the world, this should be the central world loop
207 /// </summary> 207 /// </summary>
208 public override void Update() 208 public override void Update()
209 { 209 {
210 updateLock.WaitOne(); 210 updateLock.WaitOne();
211 try 211 try
212 { 212 {
213 if (this.phyScene.IsThreaded) 213 if (this.phyScene.IsThreaded)
214 { 214 {
215 this.phyScene.GetResults(); 215 this.phyScene.GetResults();
216 216
217 } 217 }
218 218
219 foreach (LLUUID UUID in Entities.Keys) 219 foreach (LLUUID UUID in Entities.Keys)
220 { 220 {
221 Entities[UUID].updateMovement(); 221 Entities[UUID].updateMovement();
222 } 222 }
223 223
224 lock (this.m_syncRoot) 224 lock (this.m_syncRoot)
225 { 225 {
226 this.phyScene.Simulate(timeStep); 226 this.phyScene.Simulate(timeStep);
227 } 227 }
228 228
229 foreach (LLUUID UUID in Entities.Keys) 229 foreach (LLUUID UUID in Entities.Keys)
230 { 230 {
231 Entities[UUID].update(); 231 Entities[UUID].update();
232 } 232 }
233 233
234 // General purpose event manager 234 // General purpose event manager
235 m_eventManager.TriggerOnFrame(); 235 m_eventManager.TriggerOnFrame();
236 236
237 //backup world data 237 //backup world data
238 this.storageCount++; 238 this.storageCount++;
239 if (storageCount > 1200) //set to how often you want to backup 239 if (storageCount > 1200) //set to how often you want to backup
240 { 240 {
241 this.Backup(); 241 this.Backup();
242 storageCount = 0; 242 storageCount = 0;
243 } 243 }
244 244
245 this.parcelPrimCheckCount++; 245 this.parcelPrimCheckCount++;
246 if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims 246 if (this.parcelPrimCheckCount > 50) //check every 5 seconds for tainted prims
247 { 247 {
248 if (m_parcelManager.parcelPrimCountTainted) 248 if (m_parcelManager.parcelPrimCountTainted)
249 { 249 {
250 //Perform parcel update of prim count 250 //Perform parcel update of prim count
251 performParcelPrimCountUpdate(); 251 performParcelPrimCountUpdate();
252 this.parcelPrimCheckCount = 0; 252 this.parcelPrimCheckCount = 0;
253 } 253 }
254 } 254 }
255 255
256 } 256 }
257 catch (Exception e) 257 catch (Exception e)
258 { 258 {
259 MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); 259 MainLog.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString());
260 } 260 }
261 updateLock.ReleaseMutex(); 261 updateLock.ReleaseMutex();
262 262
263 } 263 }
264 264
265 /// <summary> 265 /// <summary>
266 /// 266 ///
267 /// </summary> 267 /// </summary>
268 /// <returns></returns> 268 /// <returns></returns>
269 public bool Backup() 269 public bool Backup()
270 { 270 {
271 EventManager.TriggerOnBackup(this.storageManager.DataStore); 271 EventManager.TriggerOnBackup(this.storageManager.DataStore);
272 return true; 272 return true;
273 } 273 }
274 #endregion 274 #endregion
275 275
276 #region Regenerate Terrain 276 #region Regenerate Terrain
277 277
278 /// <summary> 278 /// <summary>
279 /// Rebuilds the terrain using a procedural algorithm 279 /// Rebuilds the terrain using a procedural algorithm
280 /// </summary> 280 /// </summary>
281 public void RegenerateTerrain() 281 public void RegenerateTerrain()
282 { 282 {
283 try 283 try
284 { 284 {
285 Terrain.hills(); 285 Terrain.hills();
286 286
287 lock (this.m_syncRoot) 287 lock (this.m_syncRoot)
288 { 288 {
289 this.phyScene.SetTerrain(Terrain.getHeights1D()); 289 this.phyScene.SetTerrain(Terrain.getHeights1D());
290 } 290 }
291 291
292 this.storageManager.DataStore.StoreTerrain(Terrain.getHeights2DD()); 292 this.storageManager.DataStore.StoreTerrain(Terrain.getHeights2DD());
293 293
294 this.ForEachScenePresence(delegate(ScenePresence presence) 294 this.ForEachScenePresence(delegate(ScenePresence presence)
295 { 295 {
296 this.SendLayerData(presence.ControllingClient); 296 this.SendLayerData(presence.ControllingClient);
297 }); 297 });
298 298
299 foreach (LLUUID UUID in Entities.Keys) 299 foreach (LLUUID UUID in Entities.Keys)
300 { 300 {
301 Entities[UUID].LandRenegerated(); 301 Entities[UUID].LandRenegerated();
302 } 302 }
303 } 303 }
304 catch (Exception e) 304 catch (Exception e)
305 { 305 {
306 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 306 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
307 } 307 }
308 } 308 }
309 309
310 /// <summary> 310 /// <summary>
311 /// Rebuilds the terrain using a 2D float array 311 /// Rebuilds the terrain using a 2D float array
312 /// </summary> 312 /// </summary>
313 /// <param name="newMap">256,256 float array containing heights</param> 313 /// <param name="newMap">256,256 float array containing heights</param>
314 public void RegenerateTerrain(float[,] newMap) 314 public void RegenerateTerrain(float[,] newMap)
315 { 315 {
316 try 316 try
317 { 317 {
318 this.Terrain.setHeights2D(newMap); 318 this.Terrain.setHeights2D(newMap);
319 lock (this.m_syncRoot) 319 lock (this.m_syncRoot)
320 { 320 {
321 this.phyScene.SetTerrain(this.Terrain.getHeights1D()); 321 this.phyScene.SetTerrain(this.Terrain.getHeights1D());
322 } 322 }
323 this.storageManager.DataStore.StoreTerrain(Terrain.getHeights2DD()); 323 this.storageManager.DataStore.StoreTerrain(Terrain.getHeights2DD());
324 324
325 this.ForEachScenePresence(delegate(ScenePresence presence) 325 this.ForEachScenePresence(delegate(ScenePresence presence)
326 { 326 {
327 this.SendLayerData(presence.ControllingClient); 327 this.SendLayerData(presence.ControllingClient);
328 }); 328 });
329 329
330 foreach (LLUUID UUID in Entities.Keys) 330 foreach (LLUUID UUID in Entities.Keys)
331 { 331 {
332 Entities[UUID].LandRenegerated(); 332 Entities[UUID].LandRenegerated();
333 } 333 }
334 } 334 }
335 catch (Exception e) 335 catch (Exception e)
336 { 336 {
337 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 337 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
338 } 338 }
339 } 339 }
340 340
341 /// <summary> 341 /// <summary>
342 /// Rebuilds the terrain assuming changes occured at a specified point[?] 342 /// Rebuilds the terrain assuming changes occured at a specified point[?]
343 /// </summary> 343 /// </summary>
344 /// <param name="changes">???</param> 344 /// <param name="changes">???</param>
345 /// <param name="pointx">???</param> 345 /// <param name="pointx">???</param>
346 /// <param name="pointy">???</param> 346 /// <param name="pointy">???</param>
347 public void RegenerateTerrain(bool changes, int pointx, int pointy) 347 public void RegenerateTerrain(bool changes, int pointx, int pointy)
348 { 348 {
349 try 349 try
350 { 350 {
351 if (changes) 351 if (changes)
352 { 352 {
353 /* Dont save here, rely on tainting system instead */ 353 /* Dont save here, rely on tainting system instead */
354 354
355 this.ForEachScenePresence(delegate(ScenePresence presence) 355 this.ForEachScenePresence(delegate(ScenePresence presence)
356 { 356 {
357 this.SendLayerData(pointx, pointy, presence.ControllingClient); 357 this.SendLayerData(pointx, pointy, presence.ControllingClient);
358 }); 358 });
359 } 359 }
360 } 360 }
361 catch (Exception e) 361 catch (Exception e)
362 { 362 {
363 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 363 MainLog.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
364 } 364 }
365 } 365 }
366 366
367 #endregion 367 #endregion
368 368
369 #region Load Terrain 369 #region Load Terrain
370 /// <summary> 370 /// <summary>
371 /// Loads the World heightmap 371 /// Loads the World heightmap
372 /// </summary> 372 /// </summary>
373 /// 373 ///
374 public override void LoadWorldMap() 374 public override void LoadWorldMap()
375 { 375 {
376 try 376 try
377 { 377 {
378 double[,] map = this.storageManager.DataStore.LoadTerrain(); 378 double[,] map = this.storageManager.DataStore.LoadTerrain();
379 if (map == null) 379 if (map == null)
380 { 380 {
381 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile)) 381 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile))
382 { 382 {
383 Console.WriteLine("No default terrain, procedurally generating..."); 383 Console.WriteLine("No default terrain, procedurally generating...");
384 this.Terrain.hills(); 384 this.Terrain.hills();
385 385
386 this.storageManager.DataStore.StoreTerrain(this.Terrain.getHeights2DD()); 386 this.storageManager.DataStore.StoreTerrain(this.Terrain.getHeights2DD());
387 } 387 }
388 else 388 else
389 { 389 {
390 try 390 try
391 { 391 {
392 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile); 392 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile);
393 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier; 393 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier;
394 } 394 }
395 catch 395 catch
396 { 396 {
397 Console.WriteLine("Unable to load default terrain, procedurally generating instead..."); 397 Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
398 Terrain.hills(); 398 Terrain.hills();
399 } 399 }
400 this.storageManager.DataStore.StoreTerrain(this.Terrain.getHeights2DD()); 400 this.storageManager.DataStore.StoreTerrain(this.Terrain.getHeights2DD());
401 } 401 }
402 } 402 }
403 else 403 else
404 { 404 {
405 this.Terrain.setHeights2D(map); 405 this.Terrain.setHeights2D(map);
406 } 406 }
407 407
408 CreateTerrainTexture(); 408 CreateTerrainTexture();
409 409
410 } 410 }
411 catch (Exception e) 411 catch (Exception e)
412 { 412 {
413 MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 413 MainLog.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
414 } 414 }
415 } 415 }
416 416
417 /// <summary> 417 /// <summary>
418 /// 418 ///
419 /// </summary> 419 /// </summary>
420 public void CreateTerrainTexture() 420 public void CreateTerrainTexture()
421 { 421 {
422 //create a texture asset of the terrain 422 //create a texture asset of the terrain
423 byte[] data = this.Terrain.exportJpegImage("defaultstripe.png"); 423 byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
424 this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random(); 424 this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
425 AssetBase asset = new AssetBase(); 425 AssetBase asset = new AssetBase();
426 asset.FullID = this.m_regInfo.estateSettings.terrainImageID; 426 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
427 asset.Data = data; 427 asset.Data = data;
428 asset.Name = "terrainImage"; 428 asset.Name = "terrainImage";
429 asset.Type = 0; 429 asset.Type = 0;
430 this.assetCache.AddAsset(asset); 430 this.assetCache.AddAsset(asset);
431 } 431 }
432 #endregion 432 #endregion
433 433
434 #region Primitives Methods 434 #region Primitives Methods
435 435
436 436
437 /// <summary> 437 /// <summary>
438 /// Loads the World's objects 438 /// Loads the World's objects
439 /// </summary> 439 /// </summary>
440 public void LoadPrimsFromStorage() 440 public void LoadPrimsFromStorage()
441 { 441 {
442 try 442 try
443 { 443 {
444 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); 444 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
445 this.localStorage.LoadPrimitives(this); 445 this.localStorage.LoadPrimitives(this);
446 } 446 }
447 catch (Exception e) 447 catch (Exception e)
448 { 448 {
449 MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); 449 MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
450 } 450 }
451 } 451 }
452 452
453 /// <summary> 453 /// <summary>
454 /// Loads a specific object from storage 454 /// Loads a specific object from storage
455 /// </summary> 455 /// </summary>
456 /// <param name="prim">The object to load</param> 456 /// <param name="prim">The object to load</param>
457 public void PrimFromStorage(PrimData prim) 457 public void PrimFromStorage(PrimData prim)
458 { 458 {
459 } 459 }
460 460
461 /// <summary> 461 /// <summary>
462 /// Returns a new unallocated primitive ID 462 /// Returns a new unallocated primitive ID
463 /// </summary> 463 /// </summary>
464 /// <returns>A brand new primitive ID</returns> 464 /// <returns>A brand new primitive ID</returns>
465 public uint PrimIDAllocate() 465 public uint PrimIDAllocate()
466 { 466 {
467 uint myID; 467 uint myID;
468 468
469 _primAllocateMutex.WaitOne(); 469 _primAllocateMutex.WaitOne();
470 ++_primCount; 470 ++_primCount;
471 myID = _primCount; 471 myID = _primCount;
472 _primAllocateMutex.ReleaseMutex(); 472 _primAllocateMutex.ReleaseMutex();
473 473
474 return myID; 474 return myID;
475 } 475 }
476 476
477 /// <summary> 477 /// <summary>
478 /// 478 ///
479 /// </summary> 479 /// </summary>
480 /// <param name="addPacket"></param> 480 /// <param name="addPacket"></param>
481 /// <param name="ownerID"></param> 481 /// <param name="ownerID"></param>
482 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) 482 public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape)
483 { 483 {
484 484
485 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape); 485 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape);
486 AddEntity(sceneOb); 486 AddEntity(sceneOb);
487 } 487 }
488 488
489 public void RemovePrim(uint localID, LLUUID avatar_deleter) 489 public void RemovePrim(uint localID, LLUUID avatar_deleter)
490 { 490 {
491 foreach (EntityBase obj in Entities.Values) 491 foreach (EntityBase obj in Entities.Values)
492 { 492 {
493 if (obj is SceneObject) 493 if (obj is SceneObject)
494 { 494 {
495 if (((SceneObject)obj).LocalId == localID) 495 if (((SceneObject)obj).LocalId == localID)
496 { 496 {
497 RemoveEntity((SceneObject)obj); 497 RemoveEntity((SceneObject)obj);
498 return; 498 return;
499 } 499 }
500 } 500 }
501 } 501 }
502 502
503 } 503 }
504 504
505 public void AddEntity(SceneObject sceneObject) 505 public void AddEntity(SceneObject sceneObject)
506 { 506 {
507 this.Entities.Add(sceneObject.rootUUID, sceneObject); 507 this.Entities.Add(sceneObject.rootUUID, sceneObject);
508 } 508 }
509 509
510 public void RemoveEntity(SceneObject sceneObject) 510 public void RemoveEntity(SceneObject sceneObject)
511 { 511 {
512 if (this.Entities.ContainsKey(sceneObject.rootUUID)) 512 if (this.Entities.ContainsKey(sceneObject.rootUUID))
513 { 513 {
514 m_parcelManager.removePrimFromParcelCounts(sceneObject); 514 m_parcelManager.removePrimFromParcelCounts(sceneObject);
515 this.Entities.Remove(sceneObject.rootUUID); 515 this.Entities.Remove(sceneObject.rootUUID);
516 m_parcelManager.setPrimsTainted(); 516 m_parcelManager.setPrimsTainted();
517 } 517 }
518 } 518 }
519 519
520 /// <summary> 520 /// <summary>
521 /// Called by a prim when it has been created/cloned, so that its events can be subscribed to 521 /// Called by a prim when it has been created/cloned, so that its events can be subscribed to
522 /// </summary> 522 /// </summary>
523 /// <param name="prim"></param> 523 /// <param name="prim"></param>
524 public void AcknowledgeNewPrim(Primitive prim) 524 public void AcknowledgeNewPrim(Primitive prim)
525 { 525 {
526 prim.OnPrimCountTainted += m_parcelManager.setPrimsTainted; 526 prim.OnPrimCountTainted += m_parcelManager.setPrimsTainted;
527 } 527 }
528 #endregion 528 #endregion
529 529
530 #region Add/Remove Avatar Methods 530 #region Add/Remove Avatar Methods
531 531
532 /// <summary> 532 /// <summary>
533 /// 533 ///
534 /// </summary> 534 /// </summary>
535 /// <param name="remoteClient"></param 535 /// <param name="remoteClient"></param
536 /// <param name="agentID"></param> 536 /// <param name="agentID"></param>
537 /// <param name="child"></param> 537 /// <param name="child"></param>
538 public override void AddNewClient(IClientAPI client, bool child) 538 public override void AddNewClient(IClientAPI client, bool child)
539 { 539 {
540 SubscribeToClientEvents(client); 540 SubscribeToClientEvents(client);
541 this.m_estateManager.sendRegionHandshake(client); 541 this.m_estateManager.sendRegionHandshake(client);
542 CreateAndAddScenePresence(client); 542 CreateAndAddScenePresence(client);
543 this.m_parcelManager.sendParcelOverlay(client); 543 this.m_parcelManager.sendParcelOverlay(client);
544 544
545 } 545 }
546 546
547 protected virtual void SubscribeToClientEvents(IClientAPI client) 547 protected virtual void SubscribeToClientEvents(IClientAPI client)
548 { 548 {
549 client.OnRegionHandShakeReply += this.SendLayerData; 549 client.OnRegionHandShakeReply += this.SendLayerData;
550 //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); 550 //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
551 client.OnChatFromViewer += this.SimChat; 551 client.OnChatFromViewer += this.SimChat;
552 client.OnInstantMessage += this.InstantMessage; 552 client.OnInstantMessage += this.InstantMessage;
553 client.OnRequestWearables += this.InformClientOfNeighbours; 553 client.OnRequestWearables += this.InformClientOfNeighbours;
554 client.OnAddPrim += this.AddNewPrim; 554 client.OnAddPrim += this.AddNewPrim;
555 client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition; 555 client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
556 client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition; 556 client.OnUpdatePrimSinglePosition += this.UpdatePrimSinglePosition;
557 client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation; 557 client.OnUpdatePrimGroupRotation += this.UpdatePrimRotation;
558 client.OnUpdatePrimGroupMouseRotation += this.UpdatePrimRotation; 558 client.OnUpdatePrimGroupMouseRotation += this.UpdatePrimRotation;
559 client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation; 559 client.OnUpdatePrimSingleRotation += this.UpdatePrimSingleRotation;
560 client.OnUpdatePrimScale += this.UpdatePrimScale; 560 client.OnUpdatePrimScale += this.UpdatePrimScale;
561 client.OnUpdatePrimShape += this.UpdatePrimShape; 561 client.OnUpdatePrimShape += this.UpdatePrimShape;
562 client.OnRequestMapBlocks += this.RequestMapBlocks; 562 client.OnRequestMapBlocks += this.RequestMapBlocks;
563 client.OnUpdatePrimTexture += this.UpdatePrimTexture; 563 client.OnUpdatePrimTexture += this.UpdatePrimTexture;
564 client.OnTeleportLocationRequest += this.RequestTeleportLocation; 564 client.OnTeleportLocationRequest += this.RequestTeleportLocation;
565 client.OnObjectSelect += this.SelectPrim; 565 client.OnObjectSelect += this.SelectPrim;
566 client.OnObjectDeselect += this.DeselectPrim; 566 client.OnObjectDeselect += this.DeselectPrim;
567 client.OnGrapUpdate += this.MoveObject; 567 client.OnGrapUpdate += this.MoveObject;
568 client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest; 568 client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest;
569 client.OnObjectDescription += this.PrimDescription; 569 client.OnObjectDescription += this.PrimDescription;
570 client.OnObjectName += this.PrimName; 570 client.OnObjectName += this.PrimName;
571 client.OnLinkObjects += this.LinkObjects; 571 client.OnLinkObjects += this.LinkObjects;
572 client.OnObjectDuplicate += this.DuplicateObject; 572 client.OnObjectDuplicate += this.DuplicateObject;
573 573
574 client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_parcelManager.handleParcelPropertiesRequest); 574 client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_parcelManager.handleParcelPropertiesRequest);
575 client.OnParcelDivideRequest += new ParcelDivideRequest(m_parcelManager.handleParcelDivideRequest); 575 client.OnParcelDivideRequest += new ParcelDivideRequest(m_parcelManager.handleParcelDivideRequest);
576 client.OnParcelJoinRequest += new ParcelJoinRequest(m_parcelManager.handleParcelJoinRequest); 576 client.OnParcelJoinRequest += new ParcelJoinRequest(m_parcelManager.handleParcelJoinRequest);
577 client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_parcelManager.handleParcelPropertiesUpdateRequest); 577 client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(m_parcelManager.handleParcelPropertiesUpdateRequest);
578 client.OnParcelSelectObjects += new ParcelSelectObjects(m_parcelManager.handleParcelSelectObjectsRequest); 578 client.OnParcelSelectObjects += new ParcelSelectObjects(m_parcelManager.handleParcelSelectObjectsRequest);
579 client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(m_parcelManager.handleParcelObjectOwnersRequest); 579 client.OnParcelObjectOwnerRequest += new ParcelObjectOwnerRequest(m_parcelManager.handleParcelObjectOwnersRequest);
580 580
581 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 581 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
582 582
583 } 583 }
584 584
585 protected ScenePresence CreateAndAddScenePresence(IClientAPI client) 585 protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
586 { 586 {
587 ScenePresence newAvatar = null; 587 ScenePresence newAvatar = null;
588 588
589 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 589 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
590 newAvatar = new ScenePresence(client, this, this.m_regInfo); 590 newAvatar = new ScenePresence(client, this, this.m_regInfo);
591 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world"); 591 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world");
592 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake "); 592 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake ");
593 593
594 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 594 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
595 lock (this.m_syncRoot) 595 lock (this.m_syncRoot)
596 { 596 {
597 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); 597 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
598 } 598 }
599 599
600 lock (Entities) 600 lock (Entities)
601 { 601 {
602 if (!Entities.ContainsKey(client.AgentId)) 602 if (!Entities.ContainsKey(client.AgentId))
603 { 603 {
604 this.Entities.Add(client.AgentId, newAvatar); 604 this.Entities.Add(client.AgentId, newAvatar);
605 } 605 }
606 else 606 else
607 { 607 {
608 Entities[client.AgentId] = newAvatar; 608 Entities[client.AgentId] = newAvatar;
609 } 609 }
610 } 610 }
611 lock (Avatars) 611 lock (Avatars)
612 { 612 {
613 if (Avatars.ContainsKey(client.AgentId)) 613 if (Avatars.ContainsKey(client.AgentId))
614 { 614 {
615 Avatars[client.AgentId] = newAvatar; 615 Avatars[client.AgentId] = newAvatar;
616 } 616 }
617 else 617 else
618 { 618 {
619 this.Avatars.Add(client.AgentId, newAvatar); 619 this.Avatars.Add(client.AgentId, newAvatar);
620 } 620 }
621 } 621 }
622 newAvatar.OnSignificantClientMovement += m_parcelManager.handleSignificantClientMovement; 622 newAvatar.OnSignificantClientMovement += m_parcelManager.handleSignificantClientMovement;
623 return newAvatar; 623 return newAvatar;
624 } 624 }
625 625
626 626
627 /// <summary> 627 /// <summary>
628 /// 628 ///
629 /// </summary> 629 /// </summary>
630 /// <param name="agentID"></param> 630 /// <param name="agentID"></param>
631 public override void RemoveClient(LLUUID agentID) 631 public override void RemoveClient(LLUUID agentID)
632 { 632 {
633 m_eventManager.TriggerOnRemovePresence(agentID); 633 m_eventManager.TriggerOnRemovePresence(agentID);
634 634
635 ScenePresence avatar = this.RequestAvatar(agentID); 635 ScenePresence avatar = this.RequestAvatar(agentID);
636 636
637 this.ForEachScenePresence( 637 this.ForEachScenePresence(
638 delegate(ScenePresence presence) 638 delegate(ScenePresence presence)
639 { 639 {
640 presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId); 640 presence.ControllingClient.SendKillObject(avatar.RegionHandle, avatar.LocalId);
641 }); 641 });
642 642
643 lock (Avatars) 643 lock (Avatars)
644 { 644 {
645 if (Avatars.ContainsKey(agentID)) 645 if (Avatars.ContainsKey(agentID))
646 { 646 {
647 Avatars.Remove(agentID); 647 Avatars.Remove(agentID);
648 } 648 }
649 } 649 }
650 lock (Entities) 650 lock (Entities)
651 { 651 {
652 if (Entities.ContainsKey(agentID)) 652 if (Entities.ContainsKey(agentID))
653 { 653 {
654 Entities.Remove(agentID); 654 Entities.Remove(agentID);
655 } 655 }
656 } 656 }
657 // TODO: Add the removal from physics ? 657 // TODO: Add the removal from physics ?
658 658
659 659
660 660
661 return; 661 return;
662 } 662 }
663 #endregion 663 #endregion
664 664
665 #region Request Avatars List Methods 665 #region Request Avatars List Methods
666 //The idea is to have a group of method that return a list of avatars meeting some requirement 666 //The idea is to have a group of method that return a list of avatars meeting some requirement
667 // ie it could be all Avatars within a certain range of the calling prim/avatar. 667 // ie it could be all Avatars within a certain range of the calling prim/avatar.
668 668
669 /// <summary> 669 /// <summary>
670 /// Request a List of all Avatars in this World 670 /// Request a List of all Avatars in this World
671 /// </summary> 671 /// </summary>
672 /// <returns></returns> 672 /// <returns></returns>
673 public List<ScenePresence> RequestAvatarList() 673 public List<ScenePresence> RequestAvatarList()
674 { 674 {
675 List<ScenePresence> result = new List<ScenePresence>(); 675 List<ScenePresence> result = new List<ScenePresence>();
676 676
677 foreach (ScenePresence avatar in Avatars.Values) 677 foreach (ScenePresence avatar in Avatars.Values)
678 { 678 {
679 result.Add(avatar); 679 result.Add(avatar);
680 } 680 }
681 681
682 return result; 682 return result;
683 } 683 }
684 684
685 /// <summary> 685 /// <summary>
686 /// Request a filtered list of Avatars in this World 686 /// Request a filtered list of Avatars in this World
687 /// </summary> 687 /// </summary>
688 /// <returns></returns> 688 /// <returns></returns>
689 public List<ScenePresence> RequestAvatarList(FilterAvatarList filter) 689 public List<ScenePresence> RequestAvatarList(FilterAvatarList filter)
690 { 690 {
691 List<ScenePresence> result = new List<ScenePresence>(); 691 List<ScenePresence> result = new List<ScenePresence>();
692 692
693 foreach (ScenePresence avatar in Avatars.Values) 693 foreach (ScenePresence avatar in Avatars.Values)
694 { 694 {
695 if (filter(avatar)) 695 if (filter(avatar))
696 { 696 {
697 result.Add(avatar); 697 result.Add(avatar);
698 } 698 }
699 } 699 }
700 700
701 return result; 701 return result;
702 } 702 }
703 703
704 /// <summary> 704 /// <summary>
705 /// Request a Avatar by UUID 705 /// Request a Avatar by UUID
706 /// </summary> 706 /// </summary>
707 /// <param name="avatarID"></param> 707 /// <param name="avatarID"></param>
708 /// <returns></returns> 708 /// <returns></returns>
709 public ScenePresence RequestAvatar(LLUUID avatarID) 709 public ScenePresence RequestAvatar(LLUUID avatarID)
710 { 710 {
711 if (this.Avatars.ContainsKey(avatarID)) 711 if (this.Avatars.ContainsKey(avatarID))
712 { 712 {
713 return Avatars[avatarID]; 713 return Avatars[avatarID];
714 } 714 }
715 return null; 715 return null;
716 } 716 }
717 717
718 public void ForEachScenePresence(ForEachScenePresenceDelegate whatToDo) 718 public void ForEachScenePresence(ForEachScenePresenceDelegate whatToDo)
719 { 719 {
720 foreach (ScenePresence presence in this.Avatars.Values) 720 foreach (ScenePresence presence in this.Avatars.Values)
721 { 721 {
722 whatToDo(presence); 722 whatToDo(presence);
723 } 723 }
724 } 724 }
725 #endregion 725 #endregion
726 726
727 727
728 /// <summary> 728 /// <summary>
729 /// 729 ///
730 /// </summary> 730 /// </summary>
731 /// <param name="entID"></param> 731 /// <param name="entID"></param>
732 /// <returns></returns> 732 /// <returns></returns>
733 public bool DeleteEntity(LLUUID entID) 733 public bool DeleteEntity(LLUUID entID)
734 { 734 {
735 if (this.Entities.ContainsKey(entID)) 735 if (this.Entities.ContainsKey(entID))
736 { 736 {
737 this.Entities.Remove(entID); 737 this.Entities.Remove(entID);
738 return true; 738 return true;
739 } 739 }
740 return false; 740 return false;
741 } 741 }
742 742
743 public void SendAllSceneObjectsToClient(IClientAPI client) 743 public void SendAllSceneObjectsToClient(IClientAPI client)
744 { 744 {
745 foreach (EntityBase ent in Entities.Values) 745 foreach (EntityBase ent in Entities.Values)
746 { 746 {
747 if (ent is SceneObject) 747 if (ent is SceneObject)
748 { 748 {
749 ((SceneObject)ent).SendAllChildPrimsToClient(client); 749 ((SceneObject)ent).SendAllChildPrimsToClient(client);
750 } 750 }
751 } 751 }
752 } 752 }
753 753
754 #region RegionCommsHost 754 #region RegionCommsHost
755 755
756 /// <summary> 756 /// <summary>
757 /// 757 ///
758 /// </summary> 758 /// </summary>
759 public void RegisterRegionWithComms() 759 public void RegisterRegionWithComms()
760 { 760 {
761 761
762 this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo); 762 this.regionCommsHost = this.commsManager.GridServer.RegisterRegion(this.m_regInfo);
763 if (this.regionCommsHost != null) 763 if (this.regionCommsHost != null)
764 { 764 {
765 this.regionCommsHost.OnExpectUser += this.NewUserConnection; 765 this.regionCommsHost.OnExpectUser += this.NewUserConnection;
766 this.regionCommsHost.OnAvatarCrossingIntoRegion += this.AgentCrossing; 766 this.regionCommsHost.OnAvatarCrossingIntoRegion += this.AgentCrossing;
767 } 767 }
768 } 768 }
769 769
770 /// <summary> 770 /// <summary>
771 /// 771 ///
772 /// </summary> 772 /// </summary>
773 /// <param name="regionHandle"></param> 773 /// <param name="regionHandle"></param>
774 /// <param name="agent"></param> 774 /// <param name="agent"></param>
775 public void NewUserConnection(ulong regionHandle, AgentCircuitData agent) 775 public void NewUserConnection(ulong regionHandle, AgentCircuitData agent)
776 { 776 {
777 // Console.WriteLine("World.cs - add new user connection"); 777 // Console.WriteLine("World.cs - add new user connection");
778 //should just check that its meant for this region 778 //should just check that its meant for this region
779 if (regionHandle == this.m_regInfo.RegionHandle) 779 if (regionHandle == this.m_regInfo.RegionHandle)
780 { 780 {
781 if (agent.CapsPath != "") 781 if (agent.CapsPath != "")
782 { 782 {
783 //Console.WriteLine("new user, so creating caps handler for it"); 783 //Console.WriteLine("new user, so creating caps handler for it");
784 Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.ExternalHostName, this.m_regInfo.ExternalEndPoint.Port, agent.CapsPath, agent.AgentID); 784 Caps cap = new Caps(this.assetCache, httpListener, this.m_regInfo.ExternalHostName, this.m_regInfo.ExternalEndPoint.Port, agent.CapsPath, agent.AgentID);
785 cap.RegisterHandlers(); 785 cap.RegisterHandlers();
786 if (capsHandlers.ContainsKey(agent.AgentID)) 786 if (capsHandlers.ContainsKey(agent.AgentID))
787 { 787 {
788 OpenSim.Framework.Console.MainLog.Instance.Warn("Adding duplicate CAPS entry for user " + agent.AgentID.ToStringHyphenated()); 788 OpenSim.Framework.Console.MainLog.Instance.Warn("Adding duplicate CAPS entry for user " + agent.AgentID.ToStringHyphenated());
789 this.capsHandlers[agent.AgentID] = cap; 789 this.capsHandlers[agent.AgentID] = cap;
790 } 790 }
791 else 791 else
792 { 792 {
793 this.capsHandlers.Add(agent.AgentID, cap); 793 this.capsHandlers.Add(agent.AgentID, cap);
794 } 794 }
795 795
796 } 796 }
797 this.authenticateHandler.AddNewCircuit(agent.circuitcode, agent); 797 this.authenticateHandler.AddNewCircuit(agent.circuitcode, agent);
798 } 798 }
799 } 799 }
800 800
801 public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 801 public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
802 { 802 {
803 if (regionHandle == this.m_regInfo.RegionHandle) 803 if (regionHandle == this.m_regInfo.RegionHandle)
804 { 804 {
805 if (this.Avatars.ContainsKey(agentID)) 805 if (this.Avatars.ContainsKey(agentID))
806 { 806 {
807 this.Avatars[agentID].MakeAvatar(position); 807 this.Avatars[agentID].MakeAvatar(position);
808 } 808 }
809 } 809 }
810 } 810 }
811 811
812 /// <summary> 812 /// <summary>
813 /// 813 ///
814 /// </summary> 814 /// </summary>
815 public void InformClientOfNeighbours(IClientAPI remoteClient) 815 public void InformClientOfNeighbours(IClientAPI remoteClient)
816 { 816 {
817 List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo); 817 List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo);
818 818
819 if (neighbours != null) 819 if (neighbours != null)
820 { 820 {
821 for (int i = 0; i < neighbours.Count; i++) 821 for (int i = 0; i < neighbours.Count; i++)
822 { 822 {
823 AgentCircuitData agent = remoteClient.RequestClientInfo(); 823 AgentCircuitData agent = remoteClient.RequestClientInfo();
824 agent.BaseFolder = LLUUID.Zero; 824 agent.BaseFolder = LLUUID.Zero;
825 agent.InventoryFolder = LLUUID.Zero; 825 agent.InventoryFolder = LLUUID.Zero;
826 agent.startpos = new LLVector3(128, 128, 70); 826 agent.startpos = new LLVector3(128, 128, 70);
827 agent.child = true; 827 agent.child = true;
828 this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent); 828 this.commsManager.InterRegion.InformRegionOfChildAgent(neighbours[i].RegionHandle, agent);
829 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint); 829 remoteClient.InformClientOfNeighbour(neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint);
830 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); 830 //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort);
831 } 831 }
832 } 832 }
833 } 833 }
834 834
835 /// <summary> 835 /// <summary>
836 /// 836 ///
837 /// </summary> 837 /// </summary>
838 /// <param name="regionHandle"></param> 838 /// <param name="regionHandle"></param>
839 /// <returns></returns> 839 /// <returns></returns>
840 public RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) 840 public RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle)
841 { 841 {
842 return this.commsManager.GridServer.RequestNeighbourInfo(regionHandle); 842 return this.commsManager.GridServer.RequestNeighbourInfo(regionHandle);
843 } 843 }
844 844
845 /// <summary> 845 /// <summary>
846 /// 846 ///
847 /// </summary> 847 /// </summary>
848 /// <param name="minX"></param> 848 /// <param name="minX"></param>
849 /// <param name="minY"></param> 849 /// <param name="minY"></param>
850 /// <param name="maxX"></param> 850 /// <param name="maxX"></param>
851 /// <param name="maxY"></param> 851 /// <param name="maxY"></param>
852 public void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY) 852 public void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY)
853 { 853 {
854 List<MapBlockData> mapBlocks; 854 List<MapBlockData> mapBlocks;
855 mapBlocks = this.commsManager.GridServer.RequestNeighbourMapBlocks(minX, minY, maxX, maxY); 855 mapBlocks = this.commsManager.GridServer.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
856 remoteClient.SendMapBlock(mapBlocks); 856 remoteClient.SendMapBlock(mapBlocks);
857 } 857 }
858 858
859 /// <summary> 859 /// <summary>
860 /// 860 ///
861 /// </summary> 861 /// </summary>
862 /// <param name="remoteClient"></param> 862 /// <param name="remoteClient"></param>
863 /// <param name="RegionHandle"></param> 863 /// <param name="RegionHandle"></param>
864 /// <param name="position"></param> 864 /// <param name="position"></param>
865 /// <param name="lookAt"></param> 865 /// <param name="lookAt"></param>
866 /// <param name="flags"></param> 866 /// <param name="flags"></param>
867 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags) 867 public void RequestTeleportLocation(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags)
868 { 868 {
869 if (regionHandle == this.m_regionHandle) 869 if (regionHandle == this.m_regionHandle)
870 { 870 {
871 if (this.Avatars.ContainsKey(remoteClient.AgentId)) 871 if (this.Avatars.ContainsKey(remoteClient.AgentId))
872 { 872 {
873 remoteClient.SendTeleportLocationStart(); 873 remoteClient.SendTeleportLocationStart();
874 remoteClient.SendLocalTeleport(position, lookAt, flags); 874 remoteClient.SendLocalTeleport(position, lookAt, flags);
875 this.Avatars[remoteClient.AgentId].Teleport(position); 875 this.Avatars[remoteClient.AgentId].Teleport(position);
876 } 876 }
877 } 877 }
878 else 878 else
879 { 879 {
880 RegionInfo reg = this.RequestNeighbouringRegionInfo(regionHandle); 880 RegionInfo reg = this.RequestNeighbouringRegionInfo(regionHandle);
881 if (reg != null) 881 if (reg != null)
882 { 882 {
883 remoteClient.SendTeleportLocationStart(); 883 remoteClient.SendTeleportLocationStart();
884 AgentCircuitData agent = remoteClient.RequestClientInfo(); 884 AgentCircuitData agent = remoteClient.RequestClientInfo();
885 agent.BaseFolder = LLUUID.Zero; 885 agent.BaseFolder = LLUUID.Zero;
886 agent.InventoryFolder = LLUUID.Zero; 886 agent.InventoryFolder = LLUUID.Zero;
887 agent.startpos = new LLVector3(128, 128, 70); 887 agent.startpos = new LLVector3(128, 128, 70);
888 agent.child = true; 888 agent.child = true;
889 this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent); 889 this.commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
890 this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position); 890 this.commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
891 891
892 remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4)); 892 remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
893 893
894 } 894 }
895 } 895 }
896 } 896 }
897 897
898 /// <summary> 898 /// <summary>
899 /// 899 ///
900 /// </summary> 900 /// </summary>
901 /// <param name="regionhandle"></param> 901 /// <param name="regionhandle"></param>
902 /// <param name="agentID"></param> 902 /// <param name="agentID"></param>
903 /// <param name="position"></param> 903 /// <param name="position"></param>
904 public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position) 904 public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position)
905 { 905 {
906 return this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position); 906 return this.commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position);
907 } 907 }
908 908
909 public void performParcelPrimCountUpdate() 909 public void performParcelPrimCountUpdate()
910 { 910 {
911 m_parcelManager.resetAllParcelPrimCounts(); 911 m_parcelManager.resetAllParcelPrimCounts();
912 m_eventManager.TriggerParcelPrimCountUpdate(); 912 m_eventManager.TriggerParcelPrimCountUpdate();
913 m_parcelManager.finalizeParcelPrimCountUpdate(); 913 m_parcelManager.finalizeParcelPrimCountUpdate();
914 m_parcelManager.parcelPrimCountTainted = false; 914 m_parcelManager.parcelPrimCountTainted = false;
915 } 915 }
916 #endregion 916 #endregion
917 917
918 } 918 }
919} 919}
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 161a5cf..cbf69ac 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -1,195 +1,195 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using libsecondlife;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
35using OpenSim.Region.Caches; 35using OpenSim.Region.Caches;
36using OpenSim.Region.Terrain; 36using OpenSim.Region.Terrain;
37using OpenSim.Framework; 37using OpenSim.Framework;
38 38
39namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public abstract class SceneBase : IWorld 41 public abstract class SceneBase : IWorld
42 { 42 {
43 public Dictionary<LLUUID, EntityBase> Entities; 43 public Dictionary<LLUUID, EntityBase> Entities;
44 protected ulong m_regionHandle; 44 protected ulong m_regionHandle;
45 protected string m_regionName; 45 protected string m_regionName;
46 protected RegionInfo m_regInfo; 46 protected RegionInfo m_regInfo;
47 47
48 public TerrainEngine Terrain; 48 public TerrainEngine Terrain;
49 49
50 public string m_datastore; 50 public string m_datastore;
51 public ILocalStorage localStorage; 51 public ILocalStorage localStorage;
52 52
53 protected object m_syncRoot = new object(); 53 protected object m_syncRoot = new object();
54 private uint m_nextLocalId = 8880000; 54 private uint m_nextLocalId = 8880000;
55 protected AssetCache assetCache; 55 protected AssetCache assetCache;
56 56
57 #region Update Methods 57 #region Update Methods
58 /// <summary> 58 /// <summary>
59 /// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation) 59 /// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation)
60 /// </summary> 60 /// </summary>
61 public abstract void Update(); 61 public abstract void Update();
62 62
63 #endregion 63 #endregion
64 64
65 #region Terrain Methods 65 #region Terrain Methods
66 66
67 /// <summary> 67 /// <summary>
68 /// Loads the World heightmap 68 /// Loads the World heightmap
69 /// </summary> 69 /// </summary>
70 public abstract void LoadWorldMap(); 70 public abstract void LoadWorldMap();
71 71
72 /// <summary> 72 /// <summary>
73 /// Loads a new storage subsystem from a named library 73 /// Loads a new storage subsystem from a named library
74 /// </summary> 74 /// </summary>
75 /// <param name="dllName">Storage Library</param> 75 /// <param name="dllName">Storage Library</param>
76 /// <returns>Successful or not</returns> 76 /// <returns>Successful or not</returns>
77 public bool LoadStorageDLL(string dllName) 77 public bool LoadStorageDLL(string dllName)
78 { 78 {
79 try 79 try
80 { 80 {
81 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 81 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
82 ILocalStorage store = null; 82 ILocalStorage store = null;
83 83
84 foreach (Type pluginType in pluginAssembly.GetTypes()) 84 foreach (Type pluginType in pluginAssembly.GetTypes())
85 { 85 {
86 if (pluginType.IsPublic) 86 if (pluginType.IsPublic)
87 { 87 {
88 if (!pluginType.IsAbstract) 88 if (!pluginType.IsAbstract)
89 { 89 {
90 Type typeInterface = pluginType.GetInterface("ILocalStorage", true); 90 Type typeInterface = pluginType.GetInterface("ILocalStorage", true);
91 91
92 if (typeInterface != null) 92 if (typeInterface != null)
93 { 93 {
94 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 94 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
95 store = plug; 95 store = plug;
96 96
97 store.Initialise(this.m_datastore); 97 store.Initialise(this.m_datastore);
98 break; 98 break;
99 } 99 }
100 100
101 typeInterface = null; 101 typeInterface = null;
102 } 102 }
103 } 103 }
104 } 104 }
105 pluginAssembly = null; 105 pluginAssembly = null;
106 this.localStorage = store; 106 this.localStorage = store;
107 return (store == null); 107 return (store == null);
108 } 108 }
109 catch (Exception e) 109 catch (Exception e)
110 { 110 {
111 MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); 111 MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
112 return false; 112 return false;
113 } 113 }
114 } 114 }
115 115
116 116
117 /// <summary> 117 /// <summary>
118 /// Send the region heightmap to the client 118 /// Send the region heightmap to the client
119 /// </summary> 119 /// </summary>
120 /// <param name="RemoteClient">Client to send to</param> 120 /// <param name="RemoteClient">Client to send to</param>
121 public virtual void SendLayerData(IClientAPI RemoteClient) 121 public virtual void SendLayerData(IClientAPI RemoteClient)
122 { 122 {
123 RemoteClient.SendLayerData(Terrain.getHeights1D()); 123 RemoteClient.SendLayerData(Terrain.getHeights1D());
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// Sends a specified patch to a client 127 /// Sends a specified patch to a client
128 /// </summary> 128 /// </summary>
129 /// <param name="px">Patch coordinate (x) 0..16</param> 129 /// <param name="px">Patch coordinate (x) 0..16</param>
130 /// <param name="py">Patch coordinate (y) 0..16</param> 130 /// <param name="py">Patch coordinate (y) 0..16</param>
131 /// <param name="RemoteClient">The client to send to</param> 131 /// <param name="RemoteClient">The client to send to</param>
132 public virtual void SendLayerData(int px, int py, IClientAPI RemoteClient) 132 public virtual void SendLayerData(int px, int py, IClientAPI RemoteClient)
133 { 133 {
134 RemoteClient.SendLayerData(px, py, Terrain.getHeights1D()); 134 RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
135 } 135 }
136 136
137 #endregion 137 #endregion
138 138
139 #region Add/Remove Agent/Avatar 139 #region Add/Remove Agent/Avatar
140 /// <summary> 140 /// <summary>
141 /// 141 ///
142 /// </summary> 142 /// </summary>
143 /// <param name="remoteClient"></param> 143 /// <param name="remoteClient"></param>
144 /// <param name="agentID"></param> 144 /// <param name="agentID"></param>
145 /// <param name="child"></param> 145 /// <param name="child"></param>
146 public abstract void AddNewClient(IClientAPI client, bool child); 146 public abstract void AddNewClient(IClientAPI client, bool child);
147 147
148 /// <summary> 148 /// <summary>
149 /// 149 ///
150 /// </summary> 150 /// </summary>
151 /// <param name="agentID"></param> 151 /// <param name="agentID"></param>
152 public abstract void RemoveClient(LLUUID agentID); 152 public abstract void RemoveClient(LLUUID agentID);
153 153
154 #endregion 154 #endregion
155 155
156 /// <summary> 156 /// <summary>
157 /// 157 ///
158 /// </summary> 158 /// </summary>
159 /// <returns></returns> 159 /// <returns></returns>
160 public virtual RegionInfo RegionInfo 160 public virtual RegionInfo RegionInfo
161 { 161 {
162 get { return this.m_regInfo; } 162 get { return this.m_regInfo; }
163 } 163 }
164 164
165 public object SyncRoot 165 public object SyncRoot
166 { 166 {
167 get { return m_syncRoot; } 167 get { return m_syncRoot; }
168 } 168 }
169 169
170 public uint NextLocalId 170 public uint NextLocalId
171 { 171 {
172 get { return m_nextLocalId++; } 172 get { return m_nextLocalId++; }
173 } 173 }
174 174
175 #region Shutdown 175 #region Shutdown
176 /// <summary> 176 /// <summary>
177 /// Tidy before shutdown 177 /// Tidy before shutdown
178 /// </summary> 178 /// </summary>
179 public virtual void Close() 179 public virtual void Close()
180 { 180 {
181 try 181 try
182 { 182 {
183 this.localStorage.ShutDown(); 183 this.localStorage.ShutDown();
184 } 184 }
185 catch (Exception e) 185 catch (Exception e)
186 { 186 {
187 MainLog.Instance.WriteLine(LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); 187 MainLog.Instance.WriteLine(LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString());
188 } 188 }
189 } 189 }
190 190
191 #endregion 191 #endregion
192 192
193 193
194 } 194 }
195} 195}
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 1e4b163..255cbf2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -1,82 +1,82 @@
1using libsecondlife; 1using libsecondlife;
2 2
3namespace OpenSim.Region.Environment.Scenes 3namespace OpenSim.Region.Environment.Scenes
4{ 4{
5 /// <summary> 5 /// <summary>
6 /// A class for triggering remote scene events. 6 /// A class for triggering remote scene events.
7 /// </summary> 7 /// </summary>
8 public class EventManager 8 public class EventManager
9 { 9 {
10 public delegate void OnFrameDelegate(); 10 public delegate void OnFrameDelegate();
11 public event OnFrameDelegate OnFrame; 11 public event OnFrameDelegate OnFrame;
12 12
13 public delegate void OnBackupDelegate(Interfaces.IRegionDataStore datastore); 13 public delegate void OnBackupDelegate(Interfaces.IRegionDataStore datastore);
14 public event OnBackupDelegate OnBackup; 14 public event OnBackupDelegate OnBackup;
15 15
16 public delegate void OnNewPresenceDelegate(ScenePresence presence); 16 public delegate void OnNewPresenceDelegate(ScenePresence presence);
17 public event OnNewPresenceDelegate OnNewPresence; 17 public event OnNewPresenceDelegate OnNewPresence;
18 18
19 public delegate void OnRemovePresenceDelegate(LLUUID uuid); 19 public delegate void OnRemovePresenceDelegate(LLUUID uuid);
20 public event OnRemovePresenceDelegate OnRemovePresence; 20 public event OnRemovePresenceDelegate OnRemovePresence;
21 21
22 public delegate void OnParcelPrimCountUpdateDelegate(); 22 public delegate void OnParcelPrimCountUpdateDelegate();
23 public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; 23 public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate;
24 24
25 public delegate void OnParcelPrimCountAddDelegate(SceneObject obj); 25 public delegate void OnParcelPrimCountAddDelegate(SceneObject obj);
26 public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; 26 public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd;
27 27
28 public delegate void OnScriptConsoleDelegate(string[] args); 28 public delegate void OnScriptConsoleDelegate(string[] args);
29 public event OnScriptConsoleDelegate OnScriptConsole; 29 public event OnScriptConsoleDelegate OnScriptConsole;
30 30
31 public void TriggerOnScriptConsole(string[] args) 31 public void TriggerOnScriptConsole(string[] args)
32 { 32 {
33 if (OnScriptConsole != null) 33 if (OnScriptConsole != null)
34 OnScriptConsole(args); 34 OnScriptConsole(args);
35 } 35 }
36 36
37 public void TriggerOnFrame() 37 public void TriggerOnFrame()
38 { 38 {
39 if (OnFrame != null) 39 if (OnFrame != null)
40 { 40 {
41 OnFrame(); 41 OnFrame();
42 } 42 }
43 } 43 }
44 44
45 public void TriggerOnNewPresence(ScenePresence presence) 45 public void TriggerOnNewPresence(ScenePresence presence)
46 { 46 {
47 if (OnNewPresence != null) 47 if (OnNewPresence != null)
48 OnNewPresence(presence); 48 OnNewPresence(presence);
49 } 49 }
50 50
51 public void TriggerOnRemovePresence(LLUUID uuid) 51 public void TriggerOnRemovePresence(LLUUID uuid)
52 { 52 {
53 if (OnRemovePresence != null) 53 if (OnRemovePresence != null)
54 { 54 {
55 OnRemovePresence(uuid); 55 OnRemovePresence(uuid);
56 } 56 }
57 } 57 }
58 58
59 public void TriggerOnBackup(Interfaces.IRegionDataStore dstore) 59 public void TriggerOnBackup(Interfaces.IRegionDataStore dstore)
60 { 60 {
61 if (OnBackup != null) 61 if (OnBackup != null)
62 { 62 {
63 OnBackup(dstore); 63 OnBackup(dstore);
64 } 64 }
65 } 65 }
66 66
67 public void TriggerParcelPrimCountUpdate() 67 public void TriggerParcelPrimCountUpdate()
68 { 68 {
69 if (OnParcelPrimCountUpdate != null) 69 if (OnParcelPrimCountUpdate != null)
70 { 70 {
71 OnParcelPrimCountUpdate(); 71 OnParcelPrimCountUpdate();
72 } 72 }
73 } 73 }
74 public void TriggerParcelPrimCountAdd(SceneObject obj) 74 public void TriggerParcelPrimCountAdd(SceneObject obj)
75 { 75 {
76 if (OnParcelPrimCountAdd != null) 76 if (OnParcelPrimCountAdd != null)
77 { 77 {
78 OnParcelPrimCountAdd(obj); 78 OnParcelPrimCountAdd(obj);
79 } 79 }
80 } 80 }
81 } 81 }
82} 82}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index e615599..43d41e6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -1,309 +1,309 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Text; 29using System.Text;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34using OpenSim.Physics.Manager; 34using OpenSim.Physics.Manager;
35 35
36namespace OpenSim.Region.Environment.Scenes 36namespace OpenSim.Region.Environment.Scenes
37{ 37{
38 public class SceneObject : EntityBase 38 public class SceneObject : EntityBase
39 { 39 {
40 private Encoding enc = Encoding.ASCII; 40 private Encoding enc = Encoding.ASCII;
41 private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group 41 private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group
42 public Primitive rootPrimitive; 42 public Primitive rootPrimitive;
43 private new Scene m_world; 43 private new Scene m_world;
44 protected ulong m_regionHandle; 44 protected ulong m_regionHandle;
45 45
46 private bool physicsEnabled = false; 46 private bool physicsEnabled = false;
47 private PhysicsScene m_PhysScene; 47 private PhysicsScene m_PhysScene;
48 private PhysicsActor m_PhysActor; 48 private PhysicsActor m_PhysActor;
49 49
50 private EventManager m_eventManager; 50 private EventManager m_eventManager;
51 51
52 public bool isSelected = false; 52 public bool isSelected = false;
53 53
54 public LLUUID rootUUID 54 public LLUUID rootUUID
55 { 55 {
56 get 56 get
57 { 57 {
58 this.uuid = this.rootPrimitive.uuid; 58 this.uuid = this.rootPrimitive.uuid;
59 return this.uuid; 59 return this.uuid;
60 } 60 }
61 } 61 }
62 62
63 public uint rootLocalID 63 public uint rootLocalID
64 { 64 {
65 get 65 get
66 { 66 {
67 this.m_localId = this.rootPrimitive.LocalId; 67 this.m_localId = this.rootPrimitive.LocalId;
68 return this.LocalId; 68 return this.LocalId;
69 } 69 }
70 } 70 }
71 71
72 public int primCount 72 public int primCount
73 { 73 {
74 get 74 get
75 { 75 {
76 return this.ChildPrimitives.Count; 76 return this.ChildPrimitives.Count;
77 } 77 }
78 } 78 }
79 79
80 public Dictionary<LLUUID, Primitive> Children 80 public Dictionary<LLUUID, Primitive> Children
81 { 81 {
82 get 82 get
83 { 83 {
84 return this.ChildPrimitives; 84 return this.ChildPrimitives;
85 } 85 }
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// 89 ///
90 /// </summary> 90 /// </summary>
91 public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) 91 public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
92 { 92 {
93 m_regionHandle = world.RegionInfo.RegionHandle; 93 m_regionHandle = world.RegionInfo.RegionHandle;
94 m_world = world; 94 m_world = world;
95 m_eventManager = eventManager; 95 m_eventManager = eventManager;
96 96
97 this.Pos = pos; 97 this.Pos = pos;
98 this.CreateRootFromShape(ownerID, localID, shape, pos); 98 this.CreateRootFromShape(ownerID, localID, shape, pos);
99 99
100 registerEvents(); 100 registerEvents();
101 101
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// 105 ///
106 /// </summary> 106 /// </summary>
107 /// <remarks>Need a null constructor for duplication</remarks> 107 /// <remarks>Need a null constructor for duplication</remarks>
108 public SceneObject() 108 public SceneObject()
109 { 109 {
110 110
111 } 111 }
112 112
113 public void registerEvents() 113 public void registerEvents()
114 { 114 {
115 m_eventManager.OnBackup += new EventManager.OnBackupDelegate(ProcessBackup); 115 m_eventManager.OnBackup += new EventManager.OnBackupDelegate(ProcessBackup);
116 m_eventManager.OnParcelPrimCountUpdate += new EventManager.OnParcelPrimCountUpdateDelegate(ProcessParcelPrimCountUpdate); 116 m_eventManager.OnParcelPrimCountUpdate += new EventManager.OnParcelPrimCountUpdateDelegate(ProcessParcelPrimCountUpdate);
117 } 117 }
118 118
119 public void unregisterEvents() 119 public void unregisterEvents()
120 { 120 {
121 m_eventManager.OnBackup -= new EventManager.OnBackupDelegate(ProcessBackup); 121 m_eventManager.OnBackup -= new EventManager.OnBackupDelegate(ProcessBackup);
122 m_eventManager.OnParcelPrimCountUpdate -= new EventManager.OnParcelPrimCountUpdateDelegate(ProcessParcelPrimCountUpdate); 122 m_eventManager.OnParcelPrimCountUpdate -= new EventManager.OnParcelPrimCountUpdateDelegate(ProcessParcelPrimCountUpdate);
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// Processes backup 126 /// Processes backup
127 /// </summary> 127 /// </summary>
128 /// <param name="datastore"></param> 128 /// <param name="datastore"></param>
129 public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore) 129 public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore)
130 { 130 {
131 datastore.StoreObject(this); 131 datastore.StoreObject(this);
132 } 132 }
133 133
134 /// <summary> 134 /// <summary>
135 /// Sends my primitive info to the parcel manager for it to keep tally of all of the prims! 135 /// Sends my primitive info to the parcel manager for it to keep tally of all of the prims!
136 /// </summary> 136 /// </summary>
137 private void ProcessParcelPrimCountUpdate() 137 private void ProcessParcelPrimCountUpdate()
138 { 138 {
139 139
140 m_eventManager.TriggerParcelPrimCountAdd(this); 140 m_eventManager.TriggerParcelPrimCountAdd(this);
141 } 141 }
142 142
143 /// <summary> 143 /// <summary>
144 /// 144 ///
145 /// </summary> 145 /// </summary>
146 /// <param name="addPacket"></param> 146 /// <param name="addPacket"></param>
147 /// <param name="agentID"></param> 147 /// <param name="agentID"></param>
148 /// <param name="localID"></param> 148 /// <param name="localID"></param>
149 public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) 149 public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos)
150 { 150 {
151 151
152 this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world, agentID, localID, true, this, this, shape, pos); 152 this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_world, agentID, localID, true, this, this, shape, pos);
153 153
154 this.children.Add(rootPrimitive); 154 this.children.Add(rootPrimitive);
155 this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); 155 this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive);
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// 159 ///
160 /// </summary> 160 /// </summary>
161 /// <param name="data"></param> 161 /// <param name="data"></param>
162 public void CreateFromBytes(byte[] data) 162 public void CreateFromBytes(byte[] data)
163 { 163 {
164 164
165 } 165 }
166 166
167 /// <summary> 167 /// <summary>
168 /// Makes a copy of this SceneObject (and child primitives) 168 /// Makes a copy of this SceneObject (and child primitives)
169 /// </summary> 169 /// </summary>
170 /// <returns>A complete copy of the object</returns> 170 /// <returns>A complete copy of the object</returns>
171 public new SceneObject Copy() 171 public new SceneObject Copy()
172 { 172 {
173 SceneObject dupe = new SceneObject(); 173 SceneObject dupe = new SceneObject();
174 174
175 dupe.m_world = this.m_world; 175 dupe.m_world = this.m_world;
176 dupe.m_eventManager = this.m_eventManager; 176 dupe.m_eventManager = this.m_eventManager;
177 dupe.m_regionHandle = this.m_regionHandle; 177 dupe.m_regionHandle = this.m_regionHandle;
178 Primitive newRoot = this.rootPrimitive.Copy(dupe, dupe); 178 Primitive newRoot = this.rootPrimitive.Copy(dupe, dupe);
179 dupe.rootPrimitive = newRoot; 179 dupe.rootPrimitive = newRoot;
180 dupe.children.Add(dupe.rootPrimitive); 180 dupe.children.Add(dupe.rootPrimitive);
181 dupe.rootPrimitive.Pos = this.Pos; 181 dupe.rootPrimitive.Pos = this.Pos;
182 dupe.Rotation = this.Rotation; 182 dupe.Rotation = this.Rotation;
183 dupe.LocalId = m_world.PrimIDAllocate(); 183 dupe.LocalId = m_world.PrimIDAllocate();
184 184
185 dupe.registerEvents(); 185 dupe.registerEvents();
186 return dupe; 186 return dupe;
187 } 187 }
188 188
189 /// <summary> 189 /// <summary>
190 /// 190 ///
191 /// </summary> 191 /// </summary>
192 public void DeleteAllChildren() 192 public void DeleteAllChildren()
193 { 193 {
194 this.children.Clear(); 194 this.children.Clear();
195 this.ChildPrimitives.Clear(); 195 this.ChildPrimitives.Clear();
196 this.rootPrimitive = null; 196 this.rootPrimitive = null;
197 unregisterEvents(); 197 unregisterEvents();
198 } 198 }
199 199
200 /// <summary> 200 /// <summary>
201 /// 201 ///
202 /// </summary> 202 /// </summary>
203 /// <param name="primObject"></param> 203 /// <param name="primObject"></param>
204 public void AddNewChildPrims(SceneObject primObject) 204 public void AddNewChildPrims(SceneObject primObject)
205 { 205 {
206 this.rootPrimitive.AddNewChildren(primObject); 206 this.rootPrimitive.AddNewChildren(primObject);
207 } 207 }
208 208
209 public void AddChildToList(Primitive prim) 209 public void AddChildToList(Primitive prim)
210 { 210 {
211 if (!this.ChildPrimitives.ContainsKey(prim.uuid)) 211 if (!this.ChildPrimitives.ContainsKey(prim.uuid))
212 { 212 {
213 this.ChildPrimitives.Add(prim.uuid, prim); 213 this.ChildPrimitives.Add(prim.uuid, prim);
214 } 214 }
215 } 215 }
216 /// <summary> 216 /// <summary>
217 /// 217 ///
218 /// </summary> 218 /// </summary>
219 /// <param name="primID"></param> 219 /// <param name="primID"></param>
220 /// <returns></returns> 220 /// <returns></returns>
221 public Primitive HasChildPrim(LLUUID primID) 221 public Primitive HasChildPrim(LLUUID primID)
222 { 222 {
223 if (this.ChildPrimitives.ContainsKey(primID)) 223 if (this.ChildPrimitives.ContainsKey(primID))
224 { 224 {
225 return this.ChildPrimitives[primID]; 225 return this.ChildPrimitives[primID];
226 } 226 }
227 227
228 return null; 228 return null;
229 } 229 }
230 230
231 /// <summary> 231 /// <summary>
232 /// 232 ///
233 /// </summary> 233 /// </summary>
234 /// <param name="localID"></param> 234 /// <param name="localID"></param>
235 /// <returns></returns> 235 /// <returns></returns>
236 public Primitive HasChildPrim(uint localID) 236 public Primitive HasChildPrim(uint localID)
237 { 237 {
238 Primitive returnPrim = null; 238 Primitive returnPrim = null;
239 foreach (Primitive prim in this.ChildPrimitives.Values) 239 foreach (Primitive prim in this.ChildPrimitives.Values)
240 { 240 {
241 if (prim.LocalId == localID) 241 if (prim.LocalId == localID)
242 { 242 {
243 returnPrim = prim; 243 returnPrim = prim;
244 break; 244 break;
245 } 245 }
246 } 246 }
247 return returnPrim; 247 return returnPrim;
248 } 248 }
249 249
250 public void SendAllChildPrimsToClient(IClientAPI client) 250 public void SendAllChildPrimsToClient(IClientAPI client)
251 { 251 {
252 this.rootPrimitive.SendFullUpdateForAllChildren(client); 252 this.rootPrimitive.SendFullUpdateForAllChildren(client);
253 } 253 }
254 254
255 /// <summary> 255 /// <summary>
256 /// 256 ///
257 /// </summary> 257 /// </summary>
258 public override void BackUp() 258 public override void BackUp()
259 { 259 {
260 260
261 } 261 }
262 262
263 /// <summary> 263 /// <summary>
264 /// 264 ///
265 /// </summary> 265 /// </summary>
266 /// <param name="offset"></param> 266 /// <param name="offset"></param>
267 /// <param name="pos"></param> 267 /// <param name="pos"></param>
268 /// <param name="remoteClient"></param> 268 /// <param name="remoteClient"></param>
269 public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 269 public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
270 { 270 {
271 this.rootPrimitive.Pos = pos; 271 this.rootPrimitive.Pos = pos;
272 this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient); 272 this.rootPrimitive.SendTerseUpdateForAllChildren(remoteClient);
273 } 273 }
274 274
275 /// <summary> 275 /// <summary>
276 /// 276 ///
277 /// </summary> 277 /// </summary>
278 /// <param name="client"></param> 278 /// <param name="client"></param>
279 public void GetProperites(IClientAPI client) 279 public void GetProperites(IClientAPI client)
280 { 280 {
281 ObjectPropertiesPacket proper = new ObjectPropertiesPacket(); 281 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
282 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; 282 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
283 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); 283 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
284 proper.ObjectData[0].ItemID = LLUUID.Zero; 284 proper.ObjectData[0].ItemID = LLUUID.Zero;
285 proper.ObjectData[0].CreationDate = (ulong)this.rootPrimitive.CreationDate; 285 proper.ObjectData[0].CreationDate = (ulong)this.rootPrimitive.CreationDate;
286 proper.ObjectData[0].CreatorID = this.rootPrimitive.CreatorID; 286 proper.ObjectData[0].CreatorID = this.rootPrimitive.CreatorID;
287 proper.ObjectData[0].FolderID = LLUUID.Zero; 287 proper.ObjectData[0].FolderID = LLUUID.Zero;
288 proper.ObjectData[0].FromTaskID = LLUUID.Zero; 288 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
289 proper.ObjectData[0].GroupID = LLUUID.Zero; 289 proper.ObjectData[0].GroupID = LLUUID.Zero;
290 proper.ObjectData[0].InventorySerial = 0; 290 proper.ObjectData[0].InventorySerial = 0;
291 proper.ObjectData[0].LastOwnerID = this.rootPrimitive.LastOwnerID; 291 proper.ObjectData[0].LastOwnerID = this.rootPrimitive.LastOwnerID;
292 proper.ObjectData[0].ObjectID = this.rootUUID; 292 proper.ObjectData[0].ObjectID = this.rootUUID;
293 proper.ObjectData[0].OwnerID = this.rootPrimitive.OwnerID; 293 proper.ObjectData[0].OwnerID = this.rootPrimitive.OwnerID;
294 proper.ObjectData[0].TouchName = enc.GetBytes(this.rootPrimitive.TouchName + "\0"); 294 proper.ObjectData[0].TouchName = enc.GetBytes(this.rootPrimitive.TouchName + "\0");
295 proper.ObjectData[0].TextureID = new byte[0]; 295 proper.ObjectData[0].TextureID = new byte[0];
296 proper.ObjectData[0].SitName = enc.GetBytes(this.rootPrimitive.SitName + "\0"); 296 proper.ObjectData[0].SitName = enc.GetBytes(this.rootPrimitive.SitName + "\0");
297 proper.ObjectData[0].Name = enc.GetBytes(this.rootPrimitive.Name + "\0"); 297 proper.ObjectData[0].Name = enc.GetBytes(this.rootPrimitive.Name + "\0");
298 proper.ObjectData[0].Description = enc.GetBytes(this.rootPrimitive.Description + "\0"); 298 proper.ObjectData[0].Description = enc.GetBytes(this.rootPrimitive.Description + "\0");
299 proper.ObjectData[0].OwnerMask = this.rootPrimitive.OwnerMask; 299 proper.ObjectData[0].OwnerMask = this.rootPrimitive.OwnerMask;
300 proper.ObjectData[0].NextOwnerMask = this.rootPrimitive.NextOwnerMask; 300 proper.ObjectData[0].NextOwnerMask = this.rootPrimitive.NextOwnerMask;
301 proper.ObjectData[0].GroupMask = this.rootPrimitive.GroupMask; 301 proper.ObjectData[0].GroupMask = this.rootPrimitive.GroupMask;
302 proper.ObjectData[0].EveryoneMask = this.rootPrimitive.EveryoneMask; 302 proper.ObjectData[0].EveryoneMask = this.rootPrimitive.EveryoneMask;
303 proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask; 303 proper.ObjectData[0].BaseMask = this.rootPrimitive.BaseMask;
304 304
305 client.OutPacket(proper); 305 client.OutPacket(proper);
306 } 306 }
307 307
308 } 308 }
309} 309}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
index d1f75ed..e88ee71 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
@@ -1,74 +1,74 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Xml; 29using System.Xml;
30using libsecondlife; 30using libsecondlife;
31 31
32namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
33{ 33{
34 partial class ScenePresence 34 partial class ScenePresence
35 { 35 {
36 public class AvatarAnimations 36 public class AvatarAnimations
37 { 37 {
38 38
39 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); 39 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
40 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); 40 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
41 41
42 public AvatarAnimations() 42 public AvatarAnimations()
43 { 43 {
44 } 44 }
45 45
46 public void LoadAnims() 46 public void LoadAnims()
47 { 47 {
48 //OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations"); 48 //OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
49 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); 49 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
50 50
51 XmlDocument doc = new XmlDocument(); 51 XmlDocument doc = new XmlDocument();
52 doc.Load(reader); 52 doc.Load(reader);
53 foreach (XmlNode nod in doc.DocumentElement.ChildNodes) 53 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
54 { 54 {
55 55
56 if (nod.Attributes["name"] != null) 56 if (nod.Attributes["name"] != null)
57 { 57 {
58 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText); 58 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
59 } 59 }
60 60
61 } 61 }
62 62
63 reader.Close(); 63 reader.Close();
64 64
65 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 65 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
66 66
67 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID) 67 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID)
68 { 68 {
69 AnimsNames.Add(kp.Value, kp.Key); 69 AnimsNames.Add(kp.Value, kp.Key);
70 } 70 }
71 } 71 }
72 } 72 }
73 } 73 }
74} 74}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
index dbb5d3f..c2599a1 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
@@ -1,85 +1,85 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using libsecondlife.Packets; 29using libsecondlife.Packets;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31 31
32namespace OpenSim.Region.Environment.Scenes 32namespace OpenSim.Region.Environment.Scenes
33{ 33{
34 partial class ScenePresence 34 partial class ScenePresence
35 { 35 {
36 public class Avatar : IScenePresenceBody 36 public class Avatar : IScenePresenceBody
37 { 37 {
38 public Avatar() 38 public Avatar()
39 { 39 {
40 40
41 } 41 }
42 42
43 public void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) 43 public void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation)
44 { 44 {
45 } 45 }
46 46
47 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam) 47 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
48 { 48 {
49 } 49 }
50 50
51 public void SendOurAppearance(IClientAPI OurClient) 51 public void SendOurAppearance(IClientAPI OurClient)
52 { 52 {
53 } 53 }
54 54
55 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo) 55 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo)
56 { 56 {
57 } 57 }
58 } 58 }
59 59
60 public class ChildAgent : IScenePresenceBody //is a ghost 60 public class ChildAgent : IScenePresenceBody //is a ghost
61 { 61 {
62 public ChildAgent() 62 public ChildAgent()
63 { 63 {
64 64
65 } 65 }
66 66
67 public void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) 67 public void processMovement(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation)
68 { 68 {
69 } 69 }
70 70
71 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam) 71 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
72 { 72 {
73 } 73 }
74 74
75 public void SendOurAppearance(IClientAPI OurClient) 75 public void SendOurAppearance(IClientAPI OurClient)
76 { 76 {
77 } 77 }
78 78
79 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo) 79 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo)
80 { 80 {
81 } 81 }
82 } 82 }
83 } 83 }
84 84
85} 85}
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index b619b59..ae49d9f 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1,623 +1,623 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using Axiom.Math; 31using Axiom.Math;
32using libsecondlife; 32using libsecondlife;
33using libsecondlife.Packets; 33using libsecondlife.Packets;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Physics.Manager; 37using OpenSim.Physics.Manager;
38 38
39namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public partial class ScenePresence : Entity 41 public partial class ScenePresence : Entity
42 { 42 {
43 public static bool PhysicsEngineFlying = false; 43 public static bool PhysicsEngineFlying = false;
44 public static AvatarAnimations Animations; 44 public static AvatarAnimations Animations;
45 public static byte[] DefaultTexture; 45 public static byte[] DefaultTexture;
46 public string firstname; 46 public string firstname;
47 public string lastname; 47 public string lastname;
48 public IClientAPI ControllingClient; 48 public IClientAPI ControllingClient;
49 public LLUUID current_anim; 49 public LLUUID current_anim;
50 public int anim_seq; 50 public int anim_seq;
51 private bool updateflag = false; 51 private bool updateflag = false;
52 private byte movementflag = 0; 52 private byte movementflag = 0;
53 private List<NewForce> forcesList = new List<NewForce>(); 53 private List<NewForce> forcesList = new List<NewForce>();
54 private short _updateCount = 0; 54 private short _updateCount = 0;
55 private Quaternion bodyRot; 55 private Quaternion bodyRot;
56 private LLObject.TextureEntry avatarAppearanceTexture = null; 56 private LLObject.TextureEntry avatarAppearanceTexture = null;
57 private byte[] visualParams; 57 private byte[] visualParams;
58 private AvatarWearable[] Wearables; 58 private AvatarWearable[] Wearables;
59 private ulong m_regionHandle; 59 private ulong m_regionHandle;
60 60
61 public bool childAgent = false; 61 public bool childAgent = false;
62 public bool IsRestrictedToRegion = false; 62 public bool IsRestrictedToRegion = false;
63 63
64 private bool newForce = false; 64 private bool newForce = false;
65 private bool newAvatar = false; 65 private bool newAvatar = false;
66 private IScenePresenceBody m_body; 66 private IScenePresenceBody m_body;
67 67
68 protected RegionInfo m_regionInfo; 68 protected RegionInfo m_regionInfo;
69 69
70 private Vector3[] Dir_Vectors = new Vector3[6]; 70 private Vector3[] Dir_Vectors = new Vector3[6];
71 private enum Dir_ControlFlags 71 private enum Dir_ControlFlags
72 { 72 {
73 DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS, 73 DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS,
74 DIR_CONTROL_FLAG_BACK = MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG, 74 DIR_CONTROL_FLAG_BACK = MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG,
75 DIR_CONTROL_FLAG_LEFT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_POS, 75 DIR_CONTROL_FLAG_LEFT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_POS,
76 DIR_CONTROL_FLAG_RIGHT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_NEG, 76 DIR_CONTROL_FLAG_RIGHT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_NEG,
77 DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS, 77 DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
78 DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG 78 DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
79 } 79 }
80 /// <summary> 80 /// <summary>
81 /// Position at which a significant movement was made 81 /// Position at which a significant movement was made
82 /// </summary> 82 /// </summary>
83 private LLVector3 posLastSignificantMove = new LLVector3(); 83 private LLVector3 posLastSignificantMove = new LLVector3();
84 84
85 public delegate void SignificantClientMovement(IClientAPI remote_client); 85 public delegate void SignificantClientMovement(IClientAPI remote_client);
86 public event SignificantClientMovement OnSignificantClientMovement; 86 public event SignificantClientMovement OnSignificantClientMovement;
87 87
88 #region Properties 88 #region Properties
89 /// <summary> 89 /// <summary>
90 /// 90 ///
91 /// </summary> 91 /// </summary>
92 public PhysicsActor PhysActor 92 public PhysicsActor PhysActor
93 { 93 {
94 set 94 set
95 { 95 {
96 this._physActor = value; 96 this._physActor = value;
97 } 97 }
98 get 98 get
99 { 99 {
100 return _physActor; 100 return _physActor;
101 } 101 }
102 } 102 }
103 103
104 public ulong RegionHandle 104 public ulong RegionHandle
105 { 105 {
106 get { return m_regionHandle; } 106 get { return m_regionHandle; }
107 } 107 }
108 108
109 #endregion 109 #endregion
110 110
111 #region Constructor(s) 111 #region Constructor(s)
112 /// <summary> 112 /// <summary>
113 /// 113 ///
114 /// </summary> 114 /// </summary>
115 /// <param name="theClient"></param> 115 /// <param name="theClient"></param>
116 /// <param name="world"></param> 116 /// <param name="world"></param>
117 /// <param name="clientThreads"></param> 117 /// <param name="clientThreads"></param>
118 /// <param name="regionDat"></param> 118 /// <param name="regionDat"></param>
119 public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo) 119 public ScenePresence(IClientAPI theClient, Scene world, RegionInfo reginfo)
120 { 120 {
121 121
122 m_world = world; 122 m_world = world;
123 this.uuid = theClient.AgentId; 123 this.uuid = theClient.AgentId;
124 124
125 m_regionInfo = reginfo; 125 m_regionInfo = reginfo;
126 m_regionHandle = reginfo.RegionHandle; 126 m_regionHandle = reginfo.RegionHandle;
127 MainLog.Instance.Verbose("Avatar.cs "); 127 MainLog.Instance.Verbose("Avatar.cs ");
128 ControllingClient = theClient; 128 ControllingClient = theClient;
129 this.firstname = ControllingClient.FirstName; 129 this.firstname = ControllingClient.FirstName;
130 this.lastname = ControllingClient.LastName; 130 this.lastname = ControllingClient.LastName;
131 m_localId = m_world.NextLocalId; 131 m_localId = m_world.NextLocalId;
132 Pos = ControllingClient.StartPos; 132 Pos = ControllingClient.StartPos;
133 visualParams = new byte[218]; 133 visualParams = new byte[218];
134 for (int i = 0; i < 218; i++) 134 for (int i = 0; i < 218; i++)
135 { 135 {
136 visualParams[i] = 100; 136 visualParams[i] = 100;
137 } 137 }
138 138
139 Wearables = AvatarWearable.DefaultWearables; 139 Wearables = AvatarWearable.DefaultWearables;
140 Animations = new ScenePresence.AvatarAnimations(); 140 Animations = new ScenePresence.AvatarAnimations();
141 Animations.LoadAnims(); 141 Animations.LoadAnims();
142 142
143 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); 143 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
144 144
145 //register for events 145 //register for events
146 ControllingClient.OnRequestWearables += this.SendOurAppearance; 146 ControllingClient.OnRequestWearables += this.SendOurAppearance;
147 //ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance); 147 //ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance);
148 ControllingClient.OnCompleteMovementToRegion += this.CompleteMovement; 148 ControllingClient.OnCompleteMovementToRegion += this.CompleteMovement;
149 ControllingClient.OnCompleteMovementToRegion += this.SendInitialData; 149 ControllingClient.OnCompleteMovementToRegion += this.SendInitialData;
150 ControllingClient.OnAgentUpdate += this.HandleAgentUpdate; 150 ControllingClient.OnAgentUpdate += this.HandleAgentUpdate;
151 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); 151 // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
152 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 152 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
153 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 153 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
154 154
155 Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD 155 Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD
156 Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK 156 Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK
157 Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT 157 Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT
158 Dir_Vectors[3] = new Vector3(0, -1, 0); //RIGHT 158 Dir_Vectors[3] = new Vector3(0, -1, 0); //RIGHT
159 Dir_Vectors[4] = new Vector3(0, 0, 1); //UP 159 Dir_Vectors[4] = new Vector3(0, 0, 1); //UP
160 Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN 160 Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN
161 161
162 } 162 }
163 #endregion 163 #endregion
164 164
165 #region Status Methods 165 #region Status Methods
166 /// <summary> 166 /// <summary>
167 /// Not Used, most likely can be deleted 167 /// Not Used, most likely can be deleted
168 /// </summary> 168 /// </summary>
169 /// <param name="status"></param> 169 /// <param name="status"></param>
170 public void ChildStatusChange(bool status) 170 public void ChildStatusChange(bool status)
171 { 171 {
172 this.childAgent = status; 172 this.childAgent = status;
173 173
174 if (this.childAgent == true) 174 if (this.childAgent == true)
175 { 175 {
176 this.Velocity = new LLVector3(0, 0, 0); 176 this.Velocity = new LLVector3(0, 0, 0);
177 this.Pos = new LLVector3(128, 128, 70); 177 this.Pos = new LLVector3(128, 128, 70);
178 178
179 } 179 }
180 } 180 }
181 181
182 /// <summary> 182 /// <summary>
183 /// 183 ///
184 /// </summary> 184 /// </summary>
185 /// <param name="pos"></param> 185 /// <param name="pos"></param>
186 public void MakeAvatar(LLVector3 pos) 186 public void MakeAvatar(LLVector3 pos)
187 { 187 {
188 //this.childAvatar = false; 188 //this.childAvatar = false;
189 this.Pos = pos; 189 this.Pos = pos;
190 this.newAvatar = true; 190 this.newAvatar = true;
191 this.childAgent = false; 191 this.childAgent = false;
192 } 192 }
193 193
194 protected void MakeChildAgent() 194 protected void MakeChildAgent()
195 { 195 {
196 this.Velocity = new LLVector3(0, 0, 0); 196 this.Velocity = new LLVector3(0, 0, 0);
197 this.Pos = new LLVector3(128, 128, 70); 197 this.Pos = new LLVector3(128, 128, 70);
198 this.childAgent = true; 198 this.childAgent = true;
199 } 199 }
200 200
201 /// <summary> 201 /// <summary>
202 /// 202 ///
203 /// </summary> 203 /// </summary>
204 /// <param name="pos"></param> 204 /// <param name="pos"></param>
205 public void Teleport(LLVector3 pos) 205 public void Teleport(LLVector3 pos)
206 { 206 {
207 this.Pos = pos; 207 this.Pos = pos;
208 this.SendTerseUpdateToALLClients(); 208 this.SendTerseUpdateToALLClients();
209 } 209 }
210 210
211 /// <summary> 211 /// <summary>
212 /// 212 ///
213 /// </summary> 213 /// </summary>
214 public void StopMovement() 214 public void StopMovement()
215 { 215 {
216 216
217 } 217 }
218 #endregion 218 #endregion
219 219
220 #region Event Handlers 220 #region Event Handlers
221 /// <summary> 221 /// <summary>
222 /// 222 ///
223 /// </summary> 223 /// </summary>
224 /// <param name="texture"></param> 224 /// <param name="texture"></param>
225 /// <param name="visualParam"></param> 225 /// <param name="visualParam"></param>
226 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam) 226 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
227 { 227 {
228 228
229 } 229 }
230 230
231 /// <summary> 231 /// <summary>
232 /// Complete Avatar's movement into the region 232 /// Complete Avatar's movement into the region
233 /// </summary> 233 /// </summary>
234 public void CompleteMovement() 234 public void CompleteMovement()
235 { 235 {
236 LLVector3 look = this.Velocity; 236 LLVector3 look = this.Velocity;
237 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 237 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
238 { 238 {
239 look = new LLVector3(0.99f, 0.042f, 0); 239 look = new LLVector3(0.99f, 0.042f, 0);
240 } 240 }
241 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo, Pos, look); 241 this.ControllingClient.MoveAgentIntoRegion(m_regionInfo, Pos, look);
242 if (this.childAgent) 242 if (this.childAgent)
243 { 243 {
244 this.childAgent = false; 244 this.childAgent = false;
245 } 245 }
246 } 246 }
247 247
248 /// <summary> 248 /// <summary>
249 /// 249 ///
250 /// </summary> 250 /// </summary>
251 /// <param name="pack"></param> 251 /// <param name="pack"></param>
252 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) 252 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation)
253 { 253 {
254 int i = 0; 254 int i = 0;
255 bool update_movementflag = false; 255 bool update_movementflag = false;
256 bool update_rotation = false; 256 bool update_rotation = false;
257 bool DCFlagKeyPressed = false; 257 bool DCFlagKeyPressed = false;
258 Vector3 agent_control_v3 = new Vector3(0, 0, 0); 258 Vector3 agent_control_v3 = new Vector3(0, 0, 0);
259 Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 259 Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
260 260
261 this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); 261 this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0);
262 262
263 if (q != this.bodyRot) 263 if (q != this.bodyRot)
264 { 264 {
265 this.bodyRot = q; 265 this.bodyRot = q;
266 update_rotation = true; 266 update_rotation = true;
267 } 267 }
268 foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof(Dir_ControlFlags))) 268 foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof(Dir_ControlFlags)))
269 { 269 {
270 if ((flags & (uint)DCF) != 0) 270 if ((flags & (uint)DCF) != 0)
271 { 271 {
272 DCFlagKeyPressed = true; 272 DCFlagKeyPressed = true;
273 agent_control_v3 += Dir_Vectors[i]; 273 agent_control_v3 += Dir_Vectors[i];
274 if ((movementflag & (uint)DCF) == 0) 274 if ((movementflag & (uint)DCF) == 0)
275 { 275 {
276 movementflag += (byte)(uint)DCF; 276 movementflag += (byte)(uint)DCF;
277 update_movementflag = true; 277 update_movementflag = true;
278 } 278 }
279 } 279 }
280 else 280 else
281 { 281 {
282 if ((movementflag & (uint)DCF) != 0) 282 if ((movementflag & (uint)DCF) != 0)
283 { 283 {
284 movementflag -= (byte)(uint)DCF; 284 movementflag -= (byte)(uint)DCF;
285 update_movementflag = true; 285 update_movementflag = true;
286 286
287 } 287 }
288 } 288 }
289 i++; 289 i++;
290 } 290 }
291 if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) 291 if ((update_movementflag) || (update_rotation && DCFlagKeyPressed))
292 { 292 {
293 this.AddNewMovement(agent_control_v3, q); 293 this.AddNewMovement(agent_control_v3, q);
294 } 294 }
295 UpdateMovementAnimations(update_movementflag); 295 UpdateMovementAnimations(update_movementflag);
296 } 296 }
297 297
298 protected void UpdateMovementAnimations(bool update_movementflag) 298 protected void UpdateMovementAnimations(bool update_movementflag)
299 { 299 {
300 if (update_movementflag) 300 if (update_movementflag)
301 { 301 {
302 if (movementflag != 0) 302 if (movementflag != 0)
303 { 303 {
304 if (this._physActor.Flying) 304 if (this._physActor.Flying)
305 { 305 {
306 this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1); 306 this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1);
307 } 307 }
308 else 308 else
309 { 309 {
310 this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); 310 this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
311 } 311 }
312 } 312 }
313 else 313 else
314 { 314 {
315 this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1); 315 this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1);
316 } 316 }
317 } 317 }
318 318
319 } 319 }
320 320
321 321
322 protected void AddNewMovement(Vector3 vec, Quaternion rotation) 322 protected void AddNewMovement(Vector3 vec, Quaternion rotation)
323 { 323 {
324 NewForce newVelocity = new NewForce(); 324 NewForce newVelocity = new NewForce();
325 Vector3 direc = rotation * vec; 325 Vector3 direc = rotation * vec;
326 direc.Normalize(); 326 direc.Normalize();
327 327
328 direc = direc * ((0.03f) * 128f); 328 direc = direc * ((0.03f) * 128f);
329 if (this._physActor.Flying) 329 if (this._physActor.Flying)
330 direc *= 4; 330 direc *= 4;
331 331
332 newVelocity.X = direc.x; 332 newVelocity.X = direc.x;
333 newVelocity.Y = direc.y; 333 newVelocity.Y = direc.y;
334 newVelocity.Z = direc.z; 334 newVelocity.Z = direc.z;
335 this.forcesList.Add(newVelocity); 335 this.forcesList.Add(newVelocity);
336 } 336 }
337 337
338 #endregion 338 #endregion
339 339
340 #region Overridden Methods 340 #region Overridden Methods
341 /// <summary> 341 /// <summary>
342 /// 342 ///
343 /// </summary> 343 /// </summary>
344 public override void LandRenegerated() 344 public override void LandRenegerated()
345 { 345 {
346 346
347 } 347 }
348 348
349 /// <summary> 349 /// <summary>
350 /// 350 ///
351 /// </summary> 351 /// </summary>
352 public override void update() 352 public override void update()
353 { 353 {
354 if (this.childAgent == false) 354 if (this.childAgent == false)
355 { 355 {
356 if (this.newForce) 356 if (this.newForce)
357 { 357 {
358 this.SendTerseUpdateToALLClients(); 358 this.SendTerseUpdateToALLClients();
359 _updateCount = 0; 359 _updateCount = 0;
360 } 360 }
361 else if (movementflag != 0) 361 else if (movementflag != 0)
362 { 362 {
363 _updateCount++; 363 _updateCount++;
364 if (_updateCount > 3) 364 if (_updateCount > 3)
365 { 365 {
366 this.SendTerseUpdateToALLClients(); 366 this.SendTerseUpdateToALLClients();
367 _updateCount = 0; 367 _updateCount = 0;
368 } 368 }
369 } 369 }
370 370
371 this.CheckForSignificantMovement(); 371 this.CheckForSignificantMovement();
372 this.CheckForBorderCrossing(); 372 this.CheckForBorderCrossing();
373 373
374 } 374 }
375 } 375 }
376 #endregion 376 #endregion
377 377
378 #region Update Client(s) 378 #region Update Client(s)
379 /// <summary> 379 /// <summary>
380 /// 380 ///
381 /// </summary> 381 /// </summary>
382 /// <param name="RemoteClient"></param> 382 /// <param name="RemoteClient"></param>
383 public void SendTerseUpdateToClient(IClientAPI RemoteClient) 383 public void SendTerseUpdateToClient(IClientAPI RemoteClient)
384 { 384 {
385 LLVector3 pos = this.Pos; 385 LLVector3 pos = this.Pos;
386 LLVector3 vel = this.Velocity; 386 LLVector3 vel = this.Velocity;
387 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.LocalId, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z)); 387 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.LocalId, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z));
388 } 388 }
389 389
390 /// <summary> 390 /// <summary>
391 /// 391 ///
392 /// </summary> 392 /// </summary>
393 public void SendTerseUpdateToALLClients() 393 public void SendTerseUpdateToALLClients()
394 { 394 {
395 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 395 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
396 for (int i = 0; i < avatars.Count; i++) 396 for (int i = 0; i < avatars.Count; i++)
397 { 397 {
398 this.SendTerseUpdateToClient(avatars[i].ControllingClient); 398 this.SendTerseUpdateToClient(avatars[i].ControllingClient);
399 } 399 }
400 } 400 }
401 401
402 /// <summary> 402 /// <summary>
403 /// 403 ///
404 /// </summary> 404 /// </summary>
405 /// <param name="remoteAvatar"></param> 405 /// <param name="remoteAvatar"></param>
406 public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar) 406 public void SendFullUpdateToOtherClient(ScenePresence remoteAvatar)
407 { 407 {
408 remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture); 408 remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture);
409 } 409 }
410 410
411 public void SendFullUpdateToALLClients() 411 public void SendFullUpdateToALLClients()
412 { 412 {
413 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 413 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
414 foreach (ScenePresence avatar in this.m_world.RequestAvatarList()) 414 foreach (ScenePresence avatar in this.m_world.RequestAvatarList())
415 { 415 {
416 this.SendFullUpdateToOtherClient(avatar); 416 this.SendFullUpdateToOtherClient(avatar);
417 avatar.SendFullUpdateToOtherClient(this); 417 avatar.SendFullUpdateToOtherClient(this);
418 } 418 }
419 } 419 }
420 420
421 /// <summary> 421 /// <summary>
422 /// 422 ///
423 /// </summary> 423 /// </summary>
424 public void SendInitialData() 424 public void SendInitialData()
425 { 425 {
426 this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture); 426 this.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture);
427 if (this.newAvatar) 427 if (this.newAvatar)
428 { 428 {
429 this.m_world.InformClientOfNeighbours(this.ControllingClient); 429 this.m_world.InformClientOfNeighbours(this.ControllingClient);
430 this.newAvatar = false; 430 this.newAvatar = false;
431 } 431 }
432 } 432 }
433 433
434 /// <summary> 434 /// <summary>
435 /// 435 ///
436 /// </summary> 436 /// </summary>
437 /// <param name="OurClient"></param> 437 /// <param name="OurClient"></param>
438 public void SendOurAppearance(IClientAPI OurClient) 438 public void SendOurAppearance(IClientAPI OurClient)
439 { 439 {
440 this.ControllingClient.SendWearables(this.Wearables); 440 this.ControllingClient.SendWearables(this.Wearables);
441 this.SendFullUpdateToALLClients(); 441 this.SendFullUpdateToALLClients();
442 this.m_world.SendAllSceneObjectsToClient(this.ControllingClient); 442 this.m_world.SendAllSceneObjectsToClient(this.ControllingClient);
443 } 443 }
444 444
445 /// <summary> 445 /// <summary>
446 /// 446 ///
447 /// </summary> 447 /// </summary>
448 /// <param name="avatarInfo"></param> 448 /// <param name="avatarInfo"></param>
449 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo) 449 public void SendAppearanceToOtherAgent(ScenePresence avatarInfo)
450 { 450 {
451 451
452 } 452 }
453 453
454 /// <summary> 454 /// <summary>
455 /// 455 ///
456 /// </summary> 456 /// </summary>
457 /// <param name="animID"></param> 457 /// <param name="animID"></param>
458 /// <param name="seq"></param> 458 /// <param name="seq"></param>
459 public void SendAnimPack(LLUUID animID, int seq) 459 public void SendAnimPack(LLUUID animID, int seq)
460 { 460 {
461 this.current_anim = animID; 461 this.current_anim = animID;
462 this.anim_seq = seq; 462 this.anim_seq = seq;
463 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 463 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
464 for (int i = 0; i < avatars.Count; i++) 464 for (int i = 0; i < avatars.Count; i++)
465 { 465 {
466 avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); 466 avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId);
467 } 467 }
468 } 468 }
469 469
470 /// <summary> 470 /// <summary>
471 /// 471 ///
472 /// </summary> 472 /// </summary>
473 public void SendAnimPack() 473 public void SendAnimPack()
474 { 474 {
475 this.SendAnimPack(this.current_anim, this.anim_seq); 475 this.SendAnimPack(this.current_anim, this.anim_seq);
476 } 476 }
477 #endregion 477 #endregion
478 478
479 #region Significant Movement Method 479 #region Significant Movement Method
480 480
481 protected void CheckForSignificantMovement() 481 protected void CheckForSignificantMovement()
482 { 482 {
483 if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0) 483 if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0)
484 { 484 {
485 this.posLastSignificantMove = this.Pos; 485 this.posLastSignificantMove = this.Pos;
486 if (OnSignificantClientMovement != null) 486 if (OnSignificantClientMovement != null)
487 { 487 {
488 OnSignificantClientMovement(this.ControllingClient); 488 OnSignificantClientMovement(this.ControllingClient);
489 } 489 }
490 } 490 }
491 } 491 }
492 #endregion 492 #endregion
493 #region Border Crossing Methods 493 #region Border Crossing Methods
494 /// <summary> 494 /// <summary>
495 /// 495 ///
496 /// </summary> 496 /// </summary>
497 protected void CheckForBorderCrossing() 497 protected void CheckForBorderCrossing()
498 { 498 {
499 LLVector3 pos2 = this.Pos; 499 LLVector3 pos2 = this.Pos;
500 LLVector3 vel = this.Velocity; 500 LLVector3 vel = this.Velocity;
501 501
502 float timeStep = 0.2f; 502 float timeStep = 0.2f;
503 pos2.X = pos2.X + (vel.X * timeStep); 503 pos2.X = pos2.X + (vel.X * timeStep);
504 pos2.Y = pos2.Y + (vel.Y * timeStep); 504 pos2.Y = pos2.Y + (vel.Y * timeStep);
505 pos2.Z = pos2.Z + (vel.Z * timeStep); 505 pos2.Z = pos2.Z + (vel.Z * timeStep);
506 506
507 if ((pos2.X < 0) || (pos2.X > 256)) 507 if ((pos2.X < 0) || (pos2.X > 256))
508 { 508 {
509 this.CrossToNewRegion(); 509 this.CrossToNewRegion();
510 } 510 }
511 511
512 if ((pos2.Y < 0) || (pos2.Y > 256)) 512 if ((pos2.Y < 0) || (pos2.Y > 256))
513 { 513 {
514 this.CrossToNewRegion(); 514 this.CrossToNewRegion();
515 } 515 }
516 } 516 }
517 517
518 /// <summary> 518 /// <summary>
519 /// 519 ///
520 /// </summary> 520 /// </summary>
521 protected void CrossToNewRegion() 521 protected void CrossToNewRegion()
522 { 522 {
523 LLVector3 pos = this.Pos; 523 LLVector3 pos = this.Pos;
524 LLVector3 newpos = new LLVector3(pos.X, pos.Y, pos.Z); 524 LLVector3 newpos = new LLVector3(pos.X, pos.Y, pos.Z);
525 uint neighbourx = this.m_regionInfo.RegionLocX; 525 uint neighbourx = this.m_regionInfo.RegionLocX;
526 uint neighboury = this.m_regionInfo.RegionLocY; 526 uint neighboury = this.m_regionInfo.RegionLocY;
527 527
528 if (pos.X < 2) 528 if (pos.X < 2)
529 { 529 {
530 neighbourx -= 1; 530 neighbourx -= 1;
531 newpos.X = 254; 531 newpos.X = 254;
532 } 532 }
533 if (pos.X > 253) 533 if (pos.X > 253)
534 { 534 {
535 neighbourx += 1; 535 neighbourx += 1;
536 newpos.X = 1; 536 newpos.X = 1;
537 } 537 }
538 if (pos.Y < 2) 538 if (pos.Y < 2)
539 { 539 {
540 neighboury -= 1; 540 neighboury -= 1;
541 newpos.Y = 254; 541 newpos.Y = 254;
542 } 542 }
543 if (pos.Y > 253) 543 if (pos.Y > 253)
544 { 544 {
545 neighboury += 1; 545 neighboury += 1;
546 newpos.Y = 1; 546 newpos.Y = 1;
547 } 547 }
548 548
549 LLVector3 vel = this.m_velocity; 549 LLVector3 vel = this.m_velocity;
550 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256)); 550 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * 256), (uint)(neighboury * 256));
551 RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle); 551 RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
552 if (neighbourRegion != null) 552 if (neighbourRegion != null)
553 { 553 {
554 bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos); 554 bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos);
555 if (res) 555 if (res)
556 { 556 {
557 this.MakeChildAgent(); 557 this.MakeChildAgent();
558 this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.InternalEndPoint); 558 this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.InternalEndPoint);
559 } 559 }
560 } 560 }
561 } 561 }
562 #endregion 562 #endregion
563 563
564 /// <summary> 564 /// <summary>
565 /// 565 ///
566 /// </summary> 566 /// </summary>
567 public static void LoadAnims() 567 public static void LoadAnims()
568 { 568 {
569 569
570 } 570 }
571 571
572 /// <summary> 572 /// <summary>
573 /// 573 ///
574 /// </summary> 574 /// </summary>
575 public override void updateMovement() 575 public override void updateMovement()
576 { 576 {
577 newForce = false; 577 newForce = false;
578 lock (this.forcesList) 578 lock (this.forcesList)
579 { 579 {
580 if (this.forcesList.Count > 0) 580 if (this.forcesList.Count > 0)
581 { 581 {
582 for (int i = 0; i < this.forcesList.Count; i++) 582 for (int i = 0; i < this.forcesList.Count; i++)
583 { 583 {
584 NewForce force = this.forcesList[i]; 584 NewForce force = this.forcesList[i];
585 585
586 this.updateflag = true; 586 this.updateflag = true;
587 this.Velocity = new LLVector3(force.X, force.Y, force.Z); 587 this.Velocity = new LLVector3(force.X, force.Y, force.Z);
588 this.newForce = true; 588 this.newForce = true;
589 } 589 }
590 for (int i = 0; i < this.forcesList.Count; i++) 590 for (int i = 0; i < this.forcesList.Count; i++)
591 { 591 {
592 this.forcesList.RemoveAt(0); 592 this.forcesList.RemoveAt(0);
593 } 593 }
594 } 594 }
595 } 595 }
596 } 596 }
597 597
598 public static void LoadTextureFile(string name) 598 public static void LoadTextureFile(string name)
599 { 599 {
600 FileInfo fInfo = new FileInfo(name); 600 FileInfo fInfo = new FileInfo(name);
601 long numBytes = fInfo.Length; 601 long numBytes = fInfo.Length;
602 FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read); 602 FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read);
603 BinaryReader br = new BinaryReader(fStream); 603 BinaryReader br = new BinaryReader(fStream);
604 byte[] data1 = br.ReadBytes((int)numBytes); 604 byte[] data1 = br.ReadBytes((int)numBytes);
605 br.Close(); 605 br.Close();
606 fStream.Close(); 606 fStream.Close();
607 DefaultTexture = data1; 607 DefaultTexture = data1;
608 } 608 }
609 609
610 public class NewForce 610 public class NewForce
611 { 611 {
612 public float X; 612 public float X;
613 public float Y; 613 public float Y;
614 public float Z; 614 public float Z;
615 615
616 public NewForce() 616 public NewForce()
617 { 617 {
618 618
619 } 619 }
620 } 620 }
621 } 621 }
622 622
623} 623}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/CSharpScriptEngine.cs
index 1fc576e..b0ccd22 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/CSharpScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/CSharpScriptEngine.cs
@@ -1,102 +1,102 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using Microsoft.CSharp; 31using Microsoft.CSharp;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33 33
34namespace OpenSim.Region.Scripting 34namespace OpenSim.Region.Scripting
35{ 35{
36 public class CSharpScriptEngine : IScriptCompiler 36 public class CSharpScriptEngine : IScriptCompiler
37 { 37 {
38 public string FileExt() 38 public string FileExt()
39 { 39 {
40 return ".cs"; 40 return ".cs";
41 } 41 }
42 42
43 private Dictionary<string,IScript> LoadDotNetScript(CodeDomProvider compiler, string filename) 43 private Dictionary<string,IScript> LoadDotNetScript(CodeDomProvider compiler, string filename)
44 { 44 {
45 CompilerParameters compilerParams = new CompilerParameters(); 45 CompilerParameters compilerParams = new CompilerParameters();
46 CompilerResults compilerResults; 46 CompilerResults compilerResults;
47 compilerParams.GenerateExecutable = false; 47 compilerParams.GenerateExecutable = false;
48 compilerParams.GenerateInMemory = true; 48 compilerParams.GenerateInMemory = true;
49 compilerParams.IncludeDebugInformation = false; 49 compilerParams.IncludeDebugInformation = false;
50 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.dll"); 50 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.dll");
51 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.Environment.dll"); 51 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.Environment.dll");
52 compilerParams.ReferencedAssemblies.Add("OpenSim.Framework.dll"); 52 compilerParams.ReferencedAssemblies.Add("OpenSim.Framework.dll");
53 compilerParams.ReferencedAssemblies.Add("libsecondlife.dll"); 53 compilerParams.ReferencedAssemblies.Add("libsecondlife.dll");
54 compilerParams.ReferencedAssemblies.Add("System.dll"); 54 compilerParams.ReferencedAssemblies.Add("System.dll");
55 55
56 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename); 56 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename);
57 57
58 if (compilerResults.Errors.Count > 0) 58 if (compilerResults.Errors.Count > 0)
59 { 59 {
60 MainLog.Instance.Error("Compile errors"); 60 MainLog.Instance.Error("Compile errors");
61 foreach (CompilerError error in compilerResults.Errors) 61 foreach (CompilerError error in compilerResults.Errors)
62 { 62 {
63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); 63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString());
64 } 64 }
65 } 65 }
66 else 66 else
67 { 67 {
68 Dictionary<string,IScript> scripts = new Dictionary<string,IScript>(); 68 Dictionary<string,IScript> scripts = new Dictionary<string,IScript>();
69 69
70 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes()) 70 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes())
71 { 71 {
72 Type testInterface = pluginType.GetInterface("IScript", true); 72 Type testInterface = pluginType.GetInterface("IScript", true);
73 73
74 if (testInterface != null) 74 if (testInterface != null)
75 { 75 {
76 IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString()); 76 IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
77 77
78 string scriptName = "C#/" + script.getName(); 78 string scriptName = "C#/" + script.getName();
79 Console.WriteLine("Script: " + scriptName + " loaded."); 79 Console.WriteLine("Script: " + scriptName + " loaded.");
80 80
81 if (!scripts.ContainsKey(scriptName)) 81 if (!scripts.ContainsKey(scriptName))
82 { 82 {
83 scripts.Add(scriptName, script); 83 scripts.Add(scriptName, script);
84 } 84 }
85 else 85 else
86 { 86 {
87 scripts[scriptName] = script; 87 scripts[scriptName] = script;
88 } 88 }
89 } 89 }
90 } 90 }
91 return scripts; 91 return scripts;
92 } 92 }
93 return null; 93 return null;
94 } 94 }
95 95
96 public Dictionary<string,IScript> compile(string filename) 96 public Dictionary<string,IScript> compile(string filename)
97 { 97 {
98 CSharpCodeProvider csharpProvider = new CSharpCodeProvider(); 98 CSharpCodeProvider csharpProvider = new CSharpCodeProvider();
99 return LoadDotNetScript(csharpProvider, filename); 99 return LoadDotNetScript(csharpProvider, filename);
100 } 100 }
101 } 101 }
102} 102}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
index d9f1f0a..79d88b1 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs
@@ -1,70 +1,70 @@
1using OpenSim.Framework.Console; 1using OpenSim.Framework.Console;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using OpenSim.Region.Environment; 3using OpenSim.Region.Environment;
4using OpenSim.Region.Environment.Scenes; 4using OpenSim.Region.Environment.Scenes;
5 5
6using System.Collections.Generic; 6using System.Collections.Generic;
7using libsecondlife; 7using libsecondlife;
8 8
9namespace OpenSim.Region.Scripting.Examples 9namespace OpenSim.Region.Scripting.Examples
10{ 10{
11 public class LSLExportScript : IScript 11 public class LSLExportScript : IScript
12 { 12 {
13 ScriptInfo script; 13 ScriptInfo script;
14 14
15 public string getName() 15 public string getName()
16 { 16 {
17 return "LSL Export Script 0.1"; 17 return "LSL Export Script 0.1";
18 } 18 }
19 19
20 public void Initialise(ScriptInfo scriptInfo) 20 public void Initialise(ScriptInfo scriptInfo)
21 { 21 {
22 script = scriptInfo; 22 script = scriptInfo;
23 23
24 script.events.OnScriptConsole += new EventManager.OnScriptConsoleDelegate(ProcessConsoleMsg); 24 script.events.OnScriptConsole += new EventManager.OnScriptConsoleDelegate(ProcessConsoleMsg);
25 } 25 }
26 26
27 void ProcessConsoleMsg(string[] args) 27 void ProcessConsoleMsg(string[] args)
28 { 28 {
29 if (args[0].ToLower() == "lslexport") 29 if (args[0].ToLower() == "lslexport")
30 { 30 {
31 string sequence = ""; 31 string sequence = "";
32 32
33 foreach (KeyValuePair<LLUUID, SceneObject> obj in script.world.Objects) 33 foreach (KeyValuePair<LLUUID, SceneObject> obj in script.world.Objects)
34 { 34 {
35 SceneObject root = obj.Value; 35 SceneObject root = obj.Value;
36 36
37 sequence += "NEWOBJ::" + obj.Key.ToStringHyphenated() + "\n"; 37 sequence += "NEWOBJ::" + obj.Key.ToStringHyphenated() + "\n";
38 38
39 string rootPrim = processPrimitiveToString(root.rootPrimitive); 39 string rootPrim = processPrimitiveToString(root.rootPrimitive);
40 40
41 sequence += "ROOT:" + rootPrim; 41 sequence += "ROOT:" + rootPrim;
42 42
43 foreach (KeyValuePair<LLUUID, OpenSim.Region.Environment.Scenes.Primitive> prim in root.Children) 43 foreach (KeyValuePair<LLUUID, OpenSim.Region.Environment.Scenes.Primitive> prim in root.Children)
44 { 44 {
45 string child = processPrimitiveToString(prim.Value); 45 string child = processPrimitiveToString(prim.Value);
46 sequence += "CHILD:" + child; 46 sequence += "CHILD:" + child;
47 } 47 }
48 } 48 }
49 49
50 System.Console.WriteLine(sequence); 50 System.Console.WriteLine(sequence);
51 } 51 }
52 } 52 }
53 53
54 string processPrimitiveToString(OpenSim.Region.Environment.Scenes.Primitive prim) 54 string processPrimitiveToString(OpenSim.Region.Environment.Scenes.Primitive prim)
55 { 55 {
56 string desc = prim.Description; 56 string desc = prim.Description;
57 string name = prim.Name; 57 string name = prim.Name;
58 LLVector3 pos = prim.Pos; 58 LLVector3 pos = prim.Pos;
59 LLVector3 rot = new LLVector3(); 59 LLVector3 rot = new LLVector3();
60 LLVector3 scale = prim.Scale; 60 LLVector3 scale = prim.Scale;
61 LLVector3 rootPos = prim.WorldPos; 61 LLVector3 rootPos = prim.WorldPos;
62 62
63 string setPrimParams = ""; 63 string setPrimParams = "";
64 64
65 setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n"; 65 setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
66 66
67 return setPrimParams; 67 return setPrimParams;
68 } 68 }
69 } 69 }
70} \ No newline at end of file 70} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine/JScriptEngine.cs
index 0833e7a..af4f8b4 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine/JScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine/JScriptEngine.cs
@@ -1,102 +1,102 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using Microsoft.JScript; 31using Microsoft.JScript;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33 33
34namespace OpenSim.Region.Scripting 34namespace OpenSim.Region.Scripting
35{ 35{
36 public class JScriptEngine : IScriptCompiler 36 public class JScriptEngine : IScriptCompiler
37 { 37 {
38 public string FileExt() 38 public string FileExt()
39 { 39 {
40 return ".js"; 40 return ".js";
41 } 41 }
42 42
43 private Dictionary<string, IScript> LoadDotNetScript(CodeDomProvider compiler, string filename) 43 private Dictionary<string, IScript> LoadDotNetScript(CodeDomProvider compiler, string filename)
44 { 44 {
45 CompilerParameters compilerParams = new CompilerParameters(); 45 CompilerParameters compilerParams = new CompilerParameters();
46 CompilerResults compilerResults; 46 CompilerResults compilerResults;
47 compilerParams.GenerateExecutable = false; 47 compilerParams.GenerateExecutable = false;
48 compilerParams.GenerateInMemory = true; 48 compilerParams.GenerateInMemory = true;
49 compilerParams.IncludeDebugInformation = false; 49 compilerParams.IncludeDebugInformation = false;
50 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.dll"); 50 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.dll");
51 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.Environment.dll"); 51 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.Environment.dll");
52 compilerParams.ReferencedAssemblies.Add("OpenSim.Framework.dll"); 52 compilerParams.ReferencedAssemblies.Add("OpenSim.Framework.dll");
53 compilerParams.ReferencedAssemblies.Add("libsecondlife.dll"); 53 compilerParams.ReferencedAssemblies.Add("libsecondlife.dll");
54 compilerParams.ReferencedAssemblies.Add("System.dll"); 54 compilerParams.ReferencedAssemblies.Add("System.dll");
55 55
56 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename); 56 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename);
57 57
58 if (compilerResults.Errors.Count > 0) 58 if (compilerResults.Errors.Count > 0)
59 { 59 {
60 MainLog.Instance.Error("Compile errors"); 60 MainLog.Instance.Error("Compile errors");
61 foreach (CompilerError error in compilerResults.Errors) 61 foreach (CompilerError error in compilerResults.Errors)
62 { 62 {
63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); 63 MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString());
64 } 64 }
65 } 65 }
66 else 66 else
67 { 67 {
68 Dictionary<string, IScript> scripts = new Dictionary<string, IScript>(); 68 Dictionary<string, IScript> scripts = new Dictionary<string, IScript>();
69 69
70 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes()) 70 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes())
71 { 71 {
72 Type testInterface = pluginType.GetInterface("IScript", true); 72 Type testInterface = pluginType.GetInterface("IScript", true);
73 73
74 if (testInterface != null) 74 if (testInterface != null)
75 { 75 {
76 IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString()); 76 IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
77 77
78 string scriptName = "JS.NET/" + script.getName(); 78 string scriptName = "JS.NET/" + script.getName();
79 Console.WriteLine("Script: " + scriptName + " loaded."); 79 Console.WriteLine("Script: " + scriptName + " loaded.");
80 80
81 if (!scripts.ContainsKey(scriptName)) 81 if (!scripts.ContainsKey(scriptName))
82 { 82 {
83 scripts.Add(scriptName, script); 83 scripts.Add(scriptName, script);
84 } 84 }
85 else 85 else
86 { 86 {
87 scripts[scriptName] = script; 87 scripts[scriptName] = script;
88 } 88 }
89 } 89 }
90 } 90 }
91 return scripts; 91 return scripts;
92 } 92 }
93 return null; 93 return null;
94 } 94 }
95 95
96 public Dictionary<string, IScript> compile(string filename) 96 public Dictionary<string, IScript> compile(string filename)
97 { 97 {
98 JScriptCodeProvider jscriptProvider = new JScriptCodeProvider(); 98 JScriptCodeProvider jscriptProvider = new JScriptCodeProvider();
99 return LoadDotNetScript(jscriptProvider, filename); 99 return LoadDotNetScript(jscriptProvider, filename);
100 } 100 }
101 } 101 }
102} 102}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassInstance.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassInstance.cs
index 0b1cf41..ca729b4 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassInstance.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassInstance.cs
@@ -1,45 +1,45 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32 32
33namespace OpenSim.Region.Scripting.EmbeddedJVM 33namespace OpenSim.Region.Scripting.EmbeddedJVM
34{ 34{
35 public class ClassInstance : Object 35 public class ClassInstance : Object
36 { 36 {
37 public int size; 37 public int size;
38 public Dictionary<string, BaseType> Fields = new Dictionary<string, BaseType>(); 38 public Dictionary<string, BaseType> Fields = new Dictionary<string, BaseType>();
39 39
40 public ClassInstance() 40 public ClassInstance()
41 { 41 {
42 42
43 } 43 }
44 } 44 }
45} 45}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassRecord.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassRecord.cs
index f821f52..f151b7e 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassRecord.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/ClassRecord.cs
@@ -1,503 +1,503 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text; 31using System.Text;
32using OpenSim.Region.Scripting.EmbeddedJVM.Types; 32using OpenSim.Region.Scripting.EmbeddedJVM.Types;
33 33
34namespace OpenSim.Region.Scripting.EmbeddedJVM 34namespace OpenSim.Region.Scripting.EmbeddedJVM
35{ 35{
36 public class ClassRecord 36 public class ClassRecord
37 { 37 {
38 private ushort _majorVersion; 38 private ushort _majorVersion;
39 private ushort _minorVersion; 39 private ushort _minorVersion;
40 private ushort _constantPoolCount; 40 private ushort _constantPoolCount;
41 private ushort _accessFlags; 41 private ushort _accessFlags;
42 private ushort _thisClass; 42 private ushort _thisClass;
43 private ushort _supperClass; 43 private ushort _supperClass;
44 private ushort _interfaceCount; 44 private ushort _interfaceCount;
45 private ushort _fieldCount; 45 private ushort _fieldCount;
46 private ushort _methodCount; 46 private ushort _methodCount;
47 //private ushort _attributeCount; 47 //private ushort _attributeCount;
48 //private string _name; 48 //private string _name;
49 public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>(); 49 public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>();
50 public PoolClass mClass; 50 public PoolClass mClass;
51 51
52 public List<PoolItem> _constantsPool = new List<PoolItem>(); 52 public List<PoolItem> _constantsPool = new List<PoolItem>();
53 private List<MethodInfo> _methodsList = new List<MethodInfo>(); 53 private List<MethodInfo> _methodsList = new List<MethodInfo>();
54 private List<FieldInfo> _fieldList = new List<FieldInfo>(); 54 private List<FieldInfo> _fieldList = new List<FieldInfo>();
55 55
56 public ClassRecord() 56 public ClassRecord()
57 { 57 {
58 58
59 } 59 }
60 60
61 public ClassInstance CreateNewInstance() 61 public ClassInstance CreateNewInstance()
62 { 62 {
63 return new ClassInstance(); 63 return new ClassInstance();
64 } 64 }
65 65
66 public void LoadClassFromFile(string fileName) 66 public void LoadClassFromFile(string fileName)
67 { 67 {
68 Console.WriteLine("loading script " + fileName); 68 Console.WriteLine("loading script " + fileName);
69 FileStream fs = File.OpenRead(fileName); 69 FileStream fs = File.OpenRead(fileName);
70 this.LoadClassFromBytes(ReadFully(fs)); 70 this.LoadClassFromBytes(ReadFully(fs));
71 fs.Close(); 71 fs.Close();
72 } 72 }
73 73
74 public void LoadClassFromBytes(byte[] data) 74 public void LoadClassFromBytes(byte[] data)
75 { 75 {
76 int i = 0; 76 int i = 0;
77 i += 4; 77 i += 4;
78 _minorVersion = (ushort)((data[i++] << 8) + data[i++] ); 78 _minorVersion = (ushort)((data[i++] << 8) + data[i++] );
79 _majorVersion = (ushort)((data[i++] << 8) + data[i++] ); 79 _majorVersion = (ushort)((data[i++] << 8) + data[i++] );
80 _constantPoolCount = (ushort)((data[i++] << 8) + data[i++] ); 80 _constantPoolCount = (ushort)((data[i++] << 8) + data[i++] );
81 // Console.WriteLine("there should be " + _constantPoolCount + " items in the pool"); 81 // Console.WriteLine("there should be " + _constantPoolCount + " items in the pool");
82 for (int count = 0; count < _constantPoolCount -1 ; count++) 82 for (int count = 0; count < _constantPoolCount -1 ; count++)
83 { 83 {
84 //read in the constant pool 84 //read in the constant pool
85 byte pooltype = data[i++]; 85 byte pooltype = data[i++];
86 //Console.WriteLine("#" +count +": new constant type = " +pooltype); 86 //Console.WriteLine("#" +count +": new constant type = " +pooltype);
87 //Console.WriteLine("start position is: " + i); 87 //Console.WriteLine("start position is: " + i);
88 switch (pooltype) 88 switch (pooltype)
89 { 89 {
90 case 1: //Utf8 90 case 1: //Utf8
91 ushort uLength = (ushort)((data[i++] << 8) + data[i++] ); 91 ushort uLength = (ushort)((data[i++] << 8) + data[i++] );
92 92
93 // Console.WriteLine("new utf8 type, length is " + uLength); 93 // Console.WriteLine("new utf8 type, length is " + uLength);
94 PoolUtf8 utf8 = new PoolUtf8(); 94 PoolUtf8 utf8 = new PoolUtf8();
95 utf8.readValue(data, ref i, uLength); 95 utf8.readValue(data, ref i, uLength);
96 this._constantsPool.Add(utf8); 96 this._constantsPool.Add(utf8);
97 break; 97 break;
98 case 3: //Int 98 case 3: //Int
99 break; 99 break;
100 case 7: //Class 100 case 7: //Class
101 PoolClass pClass = new PoolClass(this); 101 PoolClass pClass = new PoolClass(this);
102 pClass.readValue(data, ref i); 102 pClass.readValue(data, ref i);
103 this._constantsPool.Add(pClass); 103 this._constantsPool.Add(pClass);
104 break; 104 break;
105 case 10: //Method 105 case 10: //Method
106 PoolMethodRef pMeth = new PoolMethodRef(this); 106 PoolMethodRef pMeth = new PoolMethodRef(this);
107 pMeth.readValue(data, ref i); 107 pMeth.readValue(data, ref i);
108 this._constantsPool.Add(pMeth); 108 this._constantsPool.Add(pMeth);
109 break; 109 break;
110 case 12: //NamedType 110 case 12: //NamedType
111 PoolNamedType pNamed = new PoolNamedType(this); 111 PoolNamedType pNamed = new PoolNamedType(this);
112 pNamed.readValue(data, ref i); 112 pNamed.readValue(data, ref i);
113 this._constantsPool.Add(pNamed); 113 this._constantsPool.Add(pNamed);
114 break; 114 break;
115 } 115 }
116 } 116 }
117 117
118 _accessFlags = (ushort)((data[i++] << 8) + data[i++] ); 118 _accessFlags = (ushort)((data[i++] << 8) + data[i++] );
119 _thisClass = (ushort)((data[i++] << 8) + data[i++] ); 119 _thisClass = (ushort)((data[i++] << 8) + data[i++] );
120 _supperClass = (ushort)((data[i++] << 8) + data[i++] ); 120 _supperClass = (ushort)((data[i++] << 8) + data[i++] );
121 121
122 if (this._constantsPool[this._thisClass - 1] is PoolClass) 122 if (this._constantsPool[this._thisClass - 1] is PoolClass)
123 { 123 {
124 this.mClass = ((PoolClass)this._constantsPool[this._thisClass - 1]); 124 this.mClass = ((PoolClass)this._constantsPool[this._thisClass - 1]);
125 } 125 }
126 126
127 _interfaceCount = (ushort)((data[i++] << 8) + data[i++]); 127 _interfaceCount = (ushort)((data[i++] << 8) + data[i++]);
128 //should now read in the info for each interface 128 //should now read in the info for each interface
129 _fieldCount = (ushort)((data[i++] << 8) + data[i++]); 129 _fieldCount = (ushort)((data[i++] << 8) + data[i++]);
130 //should now read in the info for each field 130 //should now read in the info for each field
131 _methodCount = (ushort)((data[i++] << 8) + data[i++]); 131 _methodCount = (ushort)((data[i++] << 8) + data[i++]);
132 for (int count = 0; count < _methodCount; count++) 132 for (int count = 0; count < _methodCount; count++)
133 { 133 {
134 MethodInfo methInf = new MethodInfo(this); 134 MethodInfo methInf = new MethodInfo(this);
135 methInf.ReadData(data, ref i); 135 methInf.ReadData(data, ref i);
136 this._methodsList.Add(methInf); 136 this._methodsList.Add(methInf);
137 } 137 }
138 } 138 }
139 139
140 public void AddMethodsToMemory(MethodMemory memory) 140 public void AddMethodsToMemory(MethodMemory memory)
141 { 141 {
142 for (int count = 0; count < _methodCount; count++) 142 for (int count = 0; count < _methodCount; count++)
143 { 143 {
144 this._methodsList[count].AddMethodCode(memory); 144 this._methodsList[count].AddMethodCode(memory);
145 } 145 }
146 } 146 }
147 147
148 public bool StartMethod(Thread thread, string methodName) 148 public bool StartMethod(Thread thread, string methodName)
149 { 149 {
150 for (int count = 0; count < _methodCount; count++) 150 for (int count = 0; count < _methodCount; count++)
151 { 151 {
152 if (this._constantsPool[this._methodsList[count].NameIndex-1] is PoolUtf8) 152 if (this._constantsPool[this._methodsList[count].NameIndex-1] is PoolUtf8)
153 { 153 {
154 if (((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex-1]).Value == methodName) 154 if (((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex-1]).Value == methodName)
155 { 155 {
156 //Console.WriteLine("found method: " + ((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex - 1]).Value); 156 //Console.WriteLine("found method: " + ((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex - 1]).Value);
157 thread.SetPC(this._methodsList[count].CodePointer); 157 thread.SetPC(this._methodsList[count].CodePointer);
158 return true; 158 return true;
159 } 159 }
160 } 160 }
161 } 161 }
162 return false; 162 return false;
163 } 163 }
164 164
165 public void PrintToConsole() 165 public void PrintToConsole()
166 { 166 {
167 Console.WriteLine("Class File:"); 167 Console.WriteLine("Class File:");
168 Console.WriteLine("Major version: " + _majorVersion); 168 Console.WriteLine("Major version: " + _majorVersion);
169 Console.WriteLine("Minor version: " + _minorVersion); 169 Console.WriteLine("Minor version: " + _minorVersion);
170 Console.WriteLine("Pool size: " + _constantPoolCount); 170 Console.WriteLine("Pool size: " + _constantPoolCount);
171 171
172 for (int i = 0; i < _constantsPool.Count; i++) 172 for (int i = 0; i < _constantsPool.Count; i++)
173 { 173 {
174 this._constantsPool[i].Print(); 174 this._constantsPool[i].Print();
175 } 175 }
176 176
177 Console.WriteLine("Access flags: " + _accessFlags); 177 Console.WriteLine("Access flags: " + _accessFlags);
178 Console.WriteLine("This class: " + _thisClass ); 178 Console.WriteLine("This class: " + _thisClass );
179 Console.WriteLine("Super class: " + _supperClass); 179 Console.WriteLine("Super class: " + _supperClass);
180 180
181 for (int count = 0; count < _methodCount; count++) 181 for (int count = 0; count < _methodCount; count++)
182 { 182 {
183 Console.WriteLine(); 183 Console.WriteLine();
184 this._methodsList[count].Print(); 184 this._methodsList[count].Print();
185 } 185 }
186 186
187 Console.WriteLine("class name is " + this.mClass.Name.Value); 187 Console.WriteLine("class name is " + this.mClass.Name.Value);
188 } 188 }
189 189
190 public static byte[] ReadFully(Stream stream) 190 public static byte[] ReadFully(Stream stream)
191 { 191 {
192 byte[] buffer = new byte[1024]; 192 byte[] buffer = new byte[1024];
193 using (MemoryStream ms = new MemoryStream()) 193 using (MemoryStream ms = new MemoryStream())
194 { 194 {
195 while (true) 195 while (true)
196 { 196 {
197 int read = stream.Read(buffer, 0, buffer.Length); 197 int read = stream.Read(buffer, 0, buffer.Length);
198 if (read <= 0) 198 if (read <= 0)
199 return ms.ToArray(); 199 return ms.ToArray();
200 ms.Write(buffer, 0, read); 200 ms.Write(buffer, 0, read);
201 } 201 }
202 } 202 }
203 } 203 }
204 204
205 #region nested classes 205 #region nested classes
206 public class PoolItem 206 public class PoolItem
207 { 207 {
208 public virtual void Print() 208 public virtual void Print()
209 { 209 {
210 210
211 } 211 }
212 } 212 }
213 213
214 public class PoolUtf8 : PoolItem 214 public class PoolUtf8 : PoolItem
215 { 215 {
216 public string Value = ""; 216 public string Value = "";
217 217
218 public void readValue(byte[] data,ref int pointer , int length) 218 public void readValue(byte[] data,ref int pointer , int length)
219 { 219 {
220 for (int i = 0; i < length; i++) 220 for (int i = 0; i < length; i++)
221 { 221 {
222 int a =(int) data[pointer++]; 222 int a =(int) data[pointer++];
223 if ((a & 0x80) == 0) 223 if ((a & 0x80) == 0)
224 { 224 {
225 Value = Value + (char)a; 225 Value = Value + (char)a;
226 } 226 }
227 else if ((a & 0x20) == 0) 227 else if ((a & 0x20) == 0)
228 { 228 {
229 int b = (int) data[pointer++]; 229 int b = (int) data[pointer++];
230 Value = Value + (char)(((a & 0x1f) << 6) + (b & 0x3f)); 230 Value = Value + (char)(((a & 0x1f) << 6) + (b & 0x3f));
231 } 231 }
232 else 232 else
233 { 233 {
234 int b = (int)data[pointer++]; 234 int b = (int)data[pointer++];
235 int c = (int)data[pointer++]; 235 int c = (int)data[pointer++];
236 Value = Value + (char)(((a & 0xf) << 12) + ((b & 0x3f) << 6) + (c & 0x3f)); 236 Value = Value + (char)(((a & 0xf) << 12) + ((b & 0x3f) << 6) + (c & 0x3f));
237 } 237 }
238 } 238 }
239 } 239 }
240 240
241 public override void Print() 241 public override void Print()
242 { 242 {
243 Console.WriteLine("Utf8 type: " + Value); 243 Console.WriteLine("Utf8 type: " + Value);
244 } 244 }
245 } 245 }
246 246
247 private class PoolInt : PoolItem 247 private class PoolInt : PoolItem
248 { 248 {
249 249
250 } 250 }
251 251
252 public class PoolClass : PoolItem 252 public class PoolClass : PoolItem
253 { 253 {
254 //public string name = ""; 254 //public string name = "";
255 public ushort namePointer = 0; 255 public ushort namePointer = 0;
256 private ClassRecord parent; 256 private ClassRecord parent;
257 public PoolUtf8 Name; 257 public PoolUtf8 Name;
258 258
259 public PoolClass(ClassRecord paren) 259 public PoolClass(ClassRecord paren)
260 { 260 {
261 parent = paren; 261 parent = paren;
262 } 262 }
263 263
264 public void readValue(byte[] data, ref int pointer) 264 public void readValue(byte[] data, ref int pointer)
265 { 265 {
266 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] ); 266 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
267 } 267 }
268 268
269 public override void Print() 269 public override void Print()
270 { 270 {
271 this.Name = ((PoolUtf8)this.parent._constantsPool[namePointer - 1]); 271 this.Name = ((PoolUtf8)this.parent._constantsPool[namePointer - 1]);
272 Console.Write("Class type: " + namePointer); 272 Console.Write("Class type: " + namePointer);
273 Console.WriteLine(" // " + ((PoolUtf8)this.parent._constantsPool[namePointer - 1]).Value); 273 Console.WriteLine(" // " + ((PoolUtf8)this.parent._constantsPool[namePointer - 1]).Value);
274 274
275 } 275 }
276 } 276 }
277 277
278 public class PoolMethodRef : PoolItem 278 public class PoolMethodRef : PoolItem
279 { 279 {
280 public ushort classPointer = 0; 280 public ushort classPointer = 0;
281 public ushort nameTypePointer = 0; 281 public ushort nameTypePointer = 0;
282 public PoolNamedType mNameType; 282 public PoolNamedType mNameType;
283 public PoolClass mClass; 283 public PoolClass mClass;
284 private ClassRecord parent; 284 private ClassRecord parent;
285 285
286 public PoolMethodRef(ClassRecord paren) 286 public PoolMethodRef(ClassRecord paren)
287 { 287 {
288 parent = paren; 288 parent = paren;
289 } 289 }
290 290
291 public void readValue(byte[] data, ref int pointer) 291 public void readValue(byte[] data, ref int pointer)
292 { 292 {
293 classPointer = (ushort)((data[pointer++] << 8) + data[pointer++]); 293 classPointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
294 nameTypePointer = (ushort)((data[pointer++] << 8) + data[pointer++]); 294 nameTypePointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
295 } 295 }
296 296
297 public override void Print() 297 public override void Print()
298 { 298 {
299 this.mNameType = ((PoolNamedType)this.parent._constantsPool[nameTypePointer - 1]); 299 this.mNameType = ((PoolNamedType)this.parent._constantsPool[nameTypePointer - 1]);
300 this.mClass = ((PoolClass)this.parent._constantsPool[classPointer - 1]); 300 this.mClass = ((PoolClass)this.parent._constantsPool[classPointer - 1]);
301 Console.WriteLine("MethodRef type: " + classPointer + " , " + nameTypePointer); 301 Console.WriteLine("MethodRef type: " + classPointer + " , " + nameTypePointer);
302 } 302 }
303 } 303 }
304 304
305 public class PoolNamedType : PoolItem 305 public class PoolNamedType : PoolItem
306 { 306 {
307 public ushort namePointer = 0; 307 public ushort namePointer = 0;
308 public ushort typePointer = 0; 308 public ushort typePointer = 0;
309 private ClassRecord parent; 309 private ClassRecord parent;
310 public PoolUtf8 Name; 310 public PoolUtf8 Name;
311 public PoolUtf8 Type; 311 public PoolUtf8 Type;
312 312
313 public PoolNamedType(ClassRecord paren) 313 public PoolNamedType(ClassRecord paren)
314 { 314 {
315 parent = paren; 315 parent = paren;
316 } 316 }
317 317
318 public void readValue(byte[] data, ref int pointer) 318 public void readValue(byte[] data, ref int pointer)
319 { 319 {
320 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] ); 320 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
321 typePointer = (ushort)((data[pointer++] << 8) + data[pointer++] ); 321 typePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
322 } 322 }
323 323
324 public override void Print() 324 public override void Print()
325 { 325 {
326 Name = ((PoolUtf8)this.parent._constantsPool[namePointer-1]); 326 Name = ((PoolUtf8)this.parent._constantsPool[namePointer-1]);
327 Type = ((PoolUtf8)this.parent._constantsPool[typePointer-1]); 327 Type = ((PoolUtf8)this.parent._constantsPool[typePointer-1]);
328 Console.Write("Named type: " + namePointer + " , " + typePointer ); 328 Console.Write("Named type: " + namePointer + " , " + typePointer );
329 Console.WriteLine(" // "+ ((PoolUtf8)this.parent._constantsPool[namePointer-1]).Value); 329 Console.WriteLine(" // "+ ((PoolUtf8)this.parent._constantsPool[namePointer-1]).Value);
330 } 330 }
331 } 331 }
332 332
333 //*********************** 333 //***********************
334 public class MethodInfo 334 public class MethodInfo
335 { 335 {
336 public ushort AccessFlags = 0; 336 public ushort AccessFlags = 0;
337 public ushort NameIndex = 0; 337 public ushort NameIndex = 0;
338 public string Name = ""; 338 public string Name = "";
339 public ushort DescriptorIndex = 0; 339 public ushort DescriptorIndex = 0;
340 public ushort AttributeCount = 0; 340 public ushort AttributeCount = 0;
341 public List<MethodAttribute> Attributes = new List<MethodAttribute>(); 341 public List<MethodAttribute> Attributes = new List<MethodAttribute>();
342 private ClassRecord parent; 342 private ClassRecord parent;
343 public int CodePointer = 0; 343 public int CodePointer = 0;
344 344
345 public MethodInfo(ClassRecord paren) 345 public MethodInfo(ClassRecord paren)
346 { 346 {
347 parent = paren; 347 parent = paren;
348 } 348 }
349 349
350 public void AddMethodCode(MethodMemory memory) 350 public void AddMethodCode(MethodMemory memory)
351 { 351 {
352 Array.Copy(this.Attributes[0].Code, 0, memory.MethodBuffer, memory.NextMethodPC, this.Attributes[0].Code.Length); 352 Array.Copy(this.Attributes[0].Code, 0, memory.MethodBuffer, memory.NextMethodPC, this.Attributes[0].Code.Length);
353 memory.Methodcount++; 353 memory.Methodcount++;
354 this.CodePointer = memory.NextMethodPC; 354 this.CodePointer = memory.NextMethodPC;
355 memory.NextMethodPC += this.Attributes[0].Code.Length; 355 memory.NextMethodPC += this.Attributes[0].Code.Length;
356 } 356 }
357 357
358 public void ReadData(byte[] data, ref int pointer) 358 public void ReadData(byte[] data, ref int pointer)
359 { 359 {
360 AccessFlags = (ushort)((data[pointer++] << 8) + data[pointer++]); 360 AccessFlags = (ushort)((data[pointer++] << 8) + data[pointer++]);
361 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]); 361 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
362 DescriptorIndex = (ushort)((data[pointer++] << 8) + data[pointer++]); 362 DescriptorIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
363 AttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]); 363 AttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
364 for(int i =0; i< AttributeCount; i++) 364 for(int i =0; i< AttributeCount; i++)
365 { 365 {
366 MethodAttribute attri = new MethodAttribute(this.parent); 366 MethodAttribute attri = new MethodAttribute(this.parent);
367 attri.ReadData(data, ref pointer); 367 attri.ReadData(data, ref pointer);
368 this.Attributes.Add(attri); 368 this.Attributes.Add(attri);
369 } 369 }
370 } 370 }
371 371
372 public void Print() 372 public void Print()
373 { 373 {
374 Console.WriteLine("Method Info Struct: "); 374 Console.WriteLine("Method Info Struct: ");
375 Console.WriteLine("AccessFlags: " + AccessFlags); 375 Console.WriteLine("AccessFlags: " + AccessFlags);
376 Console.WriteLine("NameIndex: " + NameIndex +" // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value); 376 Console.WriteLine("NameIndex: " + NameIndex +" // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
377 Console.WriteLine("DescriptorIndex: " + DescriptorIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[DescriptorIndex-1]).Value); 377 Console.WriteLine("DescriptorIndex: " + DescriptorIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[DescriptorIndex-1]).Value);
378 Console.WriteLine("Attribute Count:" + AttributeCount); 378 Console.WriteLine("Attribute Count:" + AttributeCount);
379 for (int i = 0; i < AttributeCount; i++) 379 for (int i = 0; i < AttributeCount; i++)
380 { 380 {
381 this.Attributes[i].Print(); 381 this.Attributes[i].Print();
382 } 382 }
383 } 383 }
384 384
385 public class MethodAttribute 385 public class MethodAttribute
386 { 386 {
387 public ushort NameIndex = 0; 387 public ushort NameIndex = 0;
388 public string Name = ""; 388 public string Name = "";
389 public Int32 Length = 0; 389 public Int32 Length = 0;
390 //for now only support code attribute 390 //for now only support code attribute
391 public ushort MaxStack = 0; 391 public ushort MaxStack = 0;
392 public ushort MaxLocals = 0; 392 public ushort MaxLocals = 0;
393 public Int32 CodeLength = 0; 393 public Int32 CodeLength = 0;
394 public byte[] Code; 394 public byte[] Code;
395 public ushort ExceptionTableLength = 0; 395 public ushort ExceptionTableLength = 0;
396 public ushort SubAttributeCount = 0; 396 public ushort SubAttributeCount = 0;
397 public List<SubAttribute> SubAttributes = new List<SubAttribute>(); 397 public List<SubAttribute> SubAttributes = new List<SubAttribute>();
398 private ClassRecord parent; 398 private ClassRecord parent;
399 399
400 public MethodAttribute(ClassRecord paren) 400 public MethodAttribute(ClassRecord paren)
401 { 401 {
402 parent = paren; 402 parent = paren;
403 } 403 }
404 404
405 public void ReadData(byte[] data, ref int pointer) 405 public void ReadData(byte[] data, ref int pointer)
406 { 406 {
407 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]); 407 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
408 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]); 408 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
409 MaxStack = (ushort)((data[pointer++] << 8) + data[pointer++]); 409 MaxStack = (ushort)((data[pointer++] << 8) + data[pointer++]);
410 MaxLocals = (ushort)((data[pointer++] << 8) + data[pointer++]); 410 MaxLocals = (ushort)((data[pointer++] << 8) + data[pointer++]);
411 CodeLength = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]); 411 CodeLength = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
412 Code = new byte[CodeLength]; 412 Code = new byte[CodeLength];
413 for (int i = 0; i < CodeLength; i++) 413 for (int i = 0; i < CodeLength; i++)
414 { 414 {
415 Code[i] = data[pointer++]; 415 Code[i] = data[pointer++];
416 } 416 }
417 ExceptionTableLength = (ushort)((data[pointer++] << 8) + data[pointer++]); 417 ExceptionTableLength = (ushort)((data[pointer++] << 8) + data[pointer++]);
418 SubAttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]); 418 SubAttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
419 for (int i = 0; i < SubAttributeCount; i++) 419 for (int i = 0; i < SubAttributeCount; i++)
420 { 420 {
421 SubAttribute subAttri = new SubAttribute(this.parent); 421 SubAttribute subAttri = new SubAttribute(this.parent);
422 subAttri.ReadData(data, ref pointer); 422 subAttri.ReadData(data, ref pointer);
423 this.SubAttributes.Add(subAttri); 423 this.SubAttributes.Add(subAttri);
424 } 424 }
425 } 425 }
426 426
427 public void Print() 427 public void Print()
428 { 428 {
429 Console.WriteLine("Method Attribute: "); 429 Console.WriteLine("Method Attribute: ");
430 Console.WriteLine("Name Index: " + NameIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value); 430 Console.WriteLine("Name Index: " + NameIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
431 Console.WriteLine("Length: " + Length); 431 Console.WriteLine("Length: " + Length);
432 Console.WriteLine("MaxStack: " + MaxStack); 432 Console.WriteLine("MaxStack: " + MaxStack);
433 Console.WriteLine("MaxLocals: " + MaxLocals); 433 Console.WriteLine("MaxLocals: " + MaxLocals);
434 Console.WriteLine("CodeLength: " + CodeLength); 434 Console.WriteLine("CodeLength: " + CodeLength);
435 for (int i = 0; i < Code.Length; i++) 435 for (int i = 0; i < Code.Length; i++)
436 { 436 {
437 Console.WriteLine("OpCode #" + i + " is: " + Code[i]); 437 Console.WriteLine("OpCode #" + i + " is: " + Code[i]);
438 } 438 }
439 Console.WriteLine("SubAttributes: " + SubAttributeCount); 439 Console.WriteLine("SubAttributes: " + SubAttributeCount);
440 for (int i = 0; i < SubAttributeCount; i++) 440 for (int i = 0; i < SubAttributeCount; i++)
441 { 441 {
442 this.SubAttributes[i].Print(); 442 this.SubAttributes[i].Print();
443 } 443 }
444 } 444 }
445 445
446 public class SubAttribute 446 public class SubAttribute
447 { 447 {
448 public ushort NameIndex = 0; 448 public ushort NameIndex = 0;
449 public string Name = ""; 449 public string Name = "";
450 public Int32 Length = 0; 450 public Int32 Length = 0;
451 public byte[] Data; 451 public byte[] Data;
452 private ClassRecord parent; 452 private ClassRecord parent;
453 453
454 public SubAttribute(ClassRecord paren) 454 public SubAttribute(ClassRecord paren)
455 { 455 {
456 parent = paren; 456 parent = paren;
457 } 457 }
458 458
459 public void ReadData(byte[] data, ref int pointer) 459 public void ReadData(byte[] data, ref int pointer)
460 { 460 {
461 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]); 461 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
462 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]); 462 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
463 Data = new byte[Length]; 463 Data = new byte[Length];
464 for (int i = 0; i < Length; i++) 464 for (int i = 0; i < Length; i++)
465 { 465 {
466 Data[i] = data[pointer++]; 466 Data[i] = data[pointer++];
467 } 467 }
468 } 468 }
469 469
470 public void Print() 470 public void Print()
471 { 471 {
472 Console.WriteLine("SubAttribute: NameIndex: " + NameIndex + " // " + ((PoolUtf8)this.parent._constantsPool[NameIndex - 1]).Value); 472 Console.WriteLine("SubAttribute: NameIndex: " + NameIndex + " // " + ((PoolUtf8)this.parent._constantsPool[NameIndex - 1]).Value);
473 } 473 }
474 474
475 } 475 }
476 } 476 }
477 477
478 } 478 }
479 private class InterfaceInfo 479 private class InterfaceInfo
480 { 480 {
481 public void ReadData(byte[] data, ref int i) 481 public void ReadData(byte[] data, ref int i)
482 { 482 {
483 483
484 } 484 }
485 } 485 }
486 private class FieldInfo 486 private class FieldInfo
487 { 487 {
488 public void ReadData(byte[] data, ref int i) 488 public void ReadData(byte[] data, ref int i)
489 { 489 {
490 490
491 } 491 }
492 } 492 }
493 private class AttributeInfo 493 private class AttributeInfo
494 { 494 {
495 public void ReadData(byte[] data, ref int i) 495 public void ReadData(byte[] data, ref int i)
496 { 496 {
497 497
498 } 498 }
499 } 499 }
500 #endregion 500 #endregion
501 501
502 } 502 }
503} 503}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Heap.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Heap.cs
index 1a97b7d..c6423fc 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Heap.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Heap.cs
@@ -1,43 +1,43 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 public class Heap 34 public class Heap
35 { 35 {
36 public List<ClassInstance> ClassObjects = new List<ClassInstance>(); 36 public List<ClassInstance> ClassObjects = new List<ClassInstance>();
37 37
38 public Heap() 38 public Heap()
39 { 39 {
40 40
41 } 41 }
42 } 42 }
43} 43}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Logic.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Logic.cs
index ef6b805..56135d3 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Logic.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Logic.cs
@@ -1,427 +1,427 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes; 32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33 33
34namespace OpenSim.Region.Scripting.EmbeddedJVM 34namespace OpenSim.Region.Scripting.EmbeddedJVM
35{ 35{
36 partial class Thread 36 partial class Thread
37 { 37 {
38 private partial class Interpreter 38 private partial class Interpreter
39 { 39 {
40 private bool IsLogicOpCode(byte opcode) 40 private bool IsLogicOpCode(byte opcode)
41 { 41 {
42 bool result = false; 42 bool result = false;
43 switch (opcode) 43 switch (opcode)
44 { 44 {
45 case 2: 45 case 2:
46 Int m_int= new Int(); 46 Int m_int= new Int();
47 m_int.mValue = -1; 47 m_int.mValue = -1;
48 this._mThread.currentFrame.OpStack.Push(m_int); 48 this._mThread.currentFrame.OpStack.Push(m_int);
49 result = true; 49 result = true;
50 break; 50 break;
51 case 3: 51 case 3:
52 m_int= new Int(); 52 m_int= new Int();
53 m_int.mValue = 0; 53 m_int.mValue = 0;
54 this._mThread.currentFrame.OpStack.Push(m_int); 54 this._mThread.currentFrame.OpStack.Push(m_int);
55 result = true; 55 result = true;
56 break; 56 break;
57 case 4: 57 case 4:
58 m_int = new Int(); 58 m_int = new Int();
59 m_int.mValue = 1; 59 m_int.mValue = 1;
60 this._mThread.currentFrame.OpStack.Push(m_int); 60 this._mThread.currentFrame.OpStack.Push(m_int);
61 result = true; 61 result = true;
62 break; 62 break;
63 case 5: 63 case 5:
64 m_int = new Int(); 64 m_int = new Int();
65 m_int.mValue = 2; 65 m_int.mValue = 2;
66 this._mThread.currentFrame.OpStack.Push(m_int); 66 this._mThread.currentFrame.OpStack.Push(m_int);
67 result = true; 67 result = true;
68 break; 68 break;
69 case 6: 69 case 6:
70 m_int = new Int(); 70 m_int = new Int();
71 m_int.mValue = 3; 71 m_int.mValue = 3;
72 this._mThread.currentFrame.OpStack.Push(m_int); 72 this._mThread.currentFrame.OpStack.Push(m_int);
73 break; 73 break;
74 case 7: 74 case 7:
75 m_int = new Int(); 75 m_int = new Int();
76 m_int.mValue = 4; 76 m_int.mValue = 4;
77 this._mThread.currentFrame.OpStack.Push(m_int); 77 this._mThread.currentFrame.OpStack.Push(m_int);
78 result = true; 78 result = true;
79 break; 79 break;
80 case 8: 80 case 8:
81 m_int = new Int(); 81 m_int = new Int();
82 m_int.mValue = 5; 82 m_int.mValue = 5;
83 this._mThread.currentFrame.OpStack.Push(m_int); 83 this._mThread.currentFrame.OpStack.Push(m_int);
84 result = true; 84 result = true;
85 break; 85 break;
86 case 11: 86 case 11:
87 Float m_float = new Float(); 87 Float m_float = new Float();
88 m_float.mValue = 0.0f; 88 m_float.mValue = 0.0f;
89 this._mThread.currentFrame.OpStack.Push(m_float); 89 this._mThread.currentFrame.OpStack.Push(m_float);
90 result = true; 90 result = true;
91 break; 91 break;
92 case 12: 92 case 12:
93 m_float = new Float(); 93 m_float = new Float();
94 m_float.mValue = 1.0f; 94 m_float.mValue = 1.0f;
95 this._mThread.currentFrame.OpStack.Push(m_float); 95 this._mThread.currentFrame.OpStack.Push(m_float);
96 result = true; 96 result = true;
97 break; 97 break;
98 case 13: 98 case 13:
99 m_float = new Float(); 99 m_float = new Float();
100 m_float.mValue = 2.0f; 100 m_float.mValue = 2.0f;
101 this._mThread.currentFrame.OpStack.Push(m_float); 101 this._mThread.currentFrame.OpStack.Push(m_float);
102 result = true; 102 result = true;
103 break; 103 break;
104 case 16: 104 case 16:
105 int pushvalue = (int)GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]; 105 int pushvalue = (int)GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC];
106 Int pushInt = new Int(); 106 Int pushInt = new Int();
107 pushInt.mValue = pushvalue; 107 pushInt.mValue = pushvalue;
108 this._mThread.currentFrame.OpStack.Push(pushInt); 108 this._mThread.currentFrame.OpStack.Push(pushInt);
109 this._mThread.PC++; 109 this._mThread.PC++;
110 result = true; 110 result = true;
111 break; 111 break;
112 case 17: 112 case 17:
113 short pushvalue2 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]); 113 short pushvalue2 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
114 Int pushInt2 = new Int(); 114 Int pushInt2 = new Int();
115 pushInt2.mValue = pushvalue2; 115 pushInt2.mValue = pushvalue2;
116 this._mThread.currentFrame.OpStack.Push(pushInt2); 116 this._mThread.currentFrame.OpStack.Push(pushInt2);
117 this._mThread.PC += 2; 117 this._mThread.PC += 2;
118 result = true; 118 result = true;
119 break; 119 break;
120 case 23: 120 case 23:
121 short findex1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC])); 121 short findex1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]));
122 Float fload = new Float(); 122 Float fload = new Float();
123 if (this._mThread.currentFrame.LocalVariables[findex1] != null) 123 if (this._mThread.currentFrame.LocalVariables[findex1] != null)
124 { 124 {
125 if (this._mThread.currentFrame.LocalVariables[findex1] is Float) 125 if (this._mThread.currentFrame.LocalVariables[findex1] is Float)
126 { 126 {
127 fload.mValue = ((Float)this._mThread.currentFrame.LocalVariables[findex1]).mValue; 127 fload.mValue = ((Float)this._mThread.currentFrame.LocalVariables[findex1]).mValue;
128 this._mThread.currentFrame.OpStack.Push(fload); 128 this._mThread.currentFrame.OpStack.Push(fload);
129 } 129 }
130 } 130 }
131 this._mThread.PC++; 131 this._mThread.PC++;
132 result = true; 132 result = true;
133 break; 133 break;
134 case 26: 134 case 26:
135 if (this._mThread.currentFrame.LocalVariables[0] != null) 135 if (this._mThread.currentFrame.LocalVariables[0] != null)
136 { 136 {
137 if (this._mThread.currentFrame.LocalVariables[0] is Int) 137 if (this._mThread.currentFrame.LocalVariables[0] is Int)
138 { 138 {
139 Int newInt = new Int(); 139 Int newInt = new Int();
140 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[0]).mValue; 140 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[0]).mValue;
141 this._mThread.currentFrame.OpStack.Push(newInt); 141 this._mThread.currentFrame.OpStack.Push(newInt);
142 } 142 }
143 } 143 }
144 result = true; 144 result = true;
145 break; 145 break;
146 case 27: 146 case 27:
147 if (this._mThread.currentFrame.LocalVariables[1] != null) 147 if (this._mThread.currentFrame.LocalVariables[1] != null)
148 { 148 {
149 if (this._mThread.currentFrame.LocalVariables[1] is Int) 149 if (this._mThread.currentFrame.LocalVariables[1] is Int)
150 { 150 {
151 Int newInt = new Int(); 151 Int newInt = new Int();
152 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[1]).mValue; 152 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[1]).mValue;
153 this._mThread.currentFrame.OpStack.Push(newInt); 153 this._mThread.currentFrame.OpStack.Push(newInt);
154 } 154 }
155 } 155 }
156 result = true; 156 result = true;
157 break; 157 break;
158 case 34: 158 case 34:
159 if (this._mThread.currentFrame.LocalVariables[0] != null) 159 if (this._mThread.currentFrame.LocalVariables[0] != null)
160 { 160 {
161 if (this._mThread.currentFrame.LocalVariables[0] is Float) 161 if (this._mThread.currentFrame.LocalVariables[0] is Float)
162 { 162 {
163 Float newfloat = new Float(); 163 Float newfloat = new Float();
164 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[0]).mValue; 164 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[0]).mValue;
165 this._mThread.currentFrame.OpStack.Push(newfloat); 165 this._mThread.currentFrame.OpStack.Push(newfloat);
166 } 166 }
167 } 167 }
168 result = true; 168 result = true;
169 break; 169 break;
170 case 35: 170 case 35:
171 if (this._mThread.currentFrame.LocalVariables[1] != null) 171 if (this._mThread.currentFrame.LocalVariables[1] != null)
172 { 172 {
173 if (this._mThread.currentFrame.LocalVariables[1] is Float) 173 if (this._mThread.currentFrame.LocalVariables[1] is Float)
174 { 174 {
175 Float newfloat = new Float(); 175 Float newfloat = new Float();
176 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[1]).mValue; 176 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[1]).mValue;
177 this._mThread.currentFrame.OpStack.Push(newfloat); 177 this._mThread.currentFrame.OpStack.Push(newfloat);
178 } 178 }
179 } 179 }
180 result = true; 180 result = true;
181 break; 181 break;
182 case 36: 182 case 36:
183 if (this._mThread.currentFrame.LocalVariables[2] != null) 183 if (this._mThread.currentFrame.LocalVariables[2] != null)
184 { 184 {
185 if (this._mThread.currentFrame.LocalVariables[2] is Float) 185 if (this._mThread.currentFrame.LocalVariables[2] is Float)
186 { 186 {
187 Float newfloat = new Float(); 187 Float newfloat = new Float();
188 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[2]).mValue; 188 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[2]).mValue;
189 this._mThread.currentFrame.OpStack.Push(newfloat); 189 this._mThread.currentFrame.OpStack.Push(newfloat);
190 } 190 }
191 } 191 }
192 result = true; 192 result = true;
193 break; 193 break;
194 case 37: 194 case 37:
195 if (this._mThread.currentFrame.LocalVariables[3] != null) 195 if (this._mThread.currentFrame.LocalVariables[3] != null)
196 { 196 {
197 if (this._mThread.currentFrame.LocalVariables[3] is Float) 197 if (this._mThread.currentFrame.LocalVariables[3] is Float)
198 { 198 {
199 Float newfloat = new Float(); 199 Float newfloat = new Float();
200 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[3]).mValue; 200 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[3]).mValue;
201 this._mThread.currentFrame.OpStack.Push(newfloat); 201 this._mThread.currentFrame.OpStack.Push(newfloat);
202 } 202 }
203 } 203 }
204 result = true; 204 result = true;
205 break; 205 break;
206 case 56: 206 case 56:
207 short findex = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] )); 207 short findex = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] ));
208 BaseType fstor = this._mThread.currentFrame.OpStack.Pop(); 208 BaseType fstor = this._mThread.currentFrame.OpStack.Pop();
209 if (fstor is Float) 209 if (fstor is Float)
210 { 210 {
211 this._mThread.currentFrame.LocalVariables[findex] = (Float)fstor; 211 this._mThread.currentFrame.LocalVariables[findex] = (Float)fstor;
212 } 212 }
213 this._mThread.PC++; 213 this._mThread.PC++;
214 result = true; 214 result = true;
215 break; 215 break;
216 case 59: 216 case 59:
217 BaseType baset = this._mThread.currentFrame.OpStack.Pop(); 217 BaseType baset = this._mThread.currentFrame.OpStack.Pop();
218 if (baset is Int) 218 if (baset is Int)
219 { 219 {
220 this._mThread.currentFrame.LocalVariables[0] = (Int)baset; 220 this._mThread.currentFrame.LocalVariables[0] = (Int)baset;
221 } 221 }
222 result = true; 222 result = true;
223 break; 223 break;
224 case 60: 224 case 60:
225 baset = this._mThread.currentFrame.OpStack.Pop(); 225 baset = this._mThread.currentFrame.OpStack.Pop();
226 if (baset is Int) 226 if (baset is Int)
227 { 227 {
228 this._mThread.currentFrame.LocalVariables[1] = (Int)baset; 228 this._mThread.currentFrame.LocalVariables[1] = (Int)baset;
229 } 229 }
230 result = true; 230 result = true;
231 break; 231 break;
232 case 67: 232 case 67:
233 baset = this._mThread.currentFrame.OpStack.Pop(); 233 baset = this._mThread.currentFrame.OpStack.Pop();
234 if (baset is Float) 234 if (baset is Float)
235 { 235 {
236 this._mThread.currentFrame.LocalVariables[0] = (Float)baset; 236 this._mThread.currentFrame.LocalVariables[0] = (Float)baset;
237 } 237 }
238 result = true; 238 result = true;
239 break; 239 break;
240 case 68: 240 case 68:
241 baset = this._mThread.currentFrame.OpStack.Pop(); 241 baset = this._mThread.currentFrame.OpStack.Pop();
242 if (baset is Float) 242 if (baset is Float)
243 { 243 {
244 this._mThread.currentFrame.LocalVariables[1] = (Float)baset; 244 this._mThread.currentFrame.LocalVariables[1] = (Float)baset;
245 } 245 }
246 result = true; 246 result = true;
247 break; 247 break;
248 case 69: 248 case 69:
249 baset = this._mThread.currentFrame.OpStack.Pop(); 249 baset = this._mThread.currentFrame.OpStack.Pop();
250 if (baset is Float) 250 if (baset is Float)
251 { 251 {
252 this._mThread.currentFrame.LocalVariables[2] = (Float)baset; 252 this._mThread.currentFrame.LocalVariables[2] = (Float)baset;
253 } 253 }
254 result = true; 254 result = true;
255 break; 255 break;
256 case 70: 256 case 70:
257 baset = this._mThread.currentFrame.OpStack.Pop(); 257 baset = this._mThread.currentFrame.OpStack.Pop();
258 if (baset is Float) 258 if (baset is Float)
259 { 259 {
260 this._mThread.currentFrame.LocalVariables[3] = (Float)baset; 260 this._mThread.currentFrame.LocalVariables[3] = (Float)baset;
261 } 261 }
262 result = true; 262 result = true;
263 break; 263 break;
264 case 87: 264 case 87:
265 this._mThread.currentFrame.OpStack.Pop(); 265 this._mThread.currentFrame.OpStack.Pop();
266 result = true; 266 result = true;
267 break; 267 break;
268 case 98: 268 case 98:
269 BaseType bf2 = this._mThread.currentFrame.OpStack.Pop(); 269 BaseType bf2 = this._mThread.currentFrame.OpStack.Pop();
270 BaseType bf1 = this._mThread.currentFrame.OpStack.Pop(); 270 BaseType bf1 = this._mThread.currentFrame.OpStack.Pop();
271 if (bf1 is Float && bf2 is Float) 271 if (bf1 is Float && bf2 is Float)
272 { 272 {
273 Float nflt = new Float(); 273 Float nflt = new Float();
274 nflt.mValue = ((Float)bf1).mValue + ((Float)bf2).mValue; 274 nflt.mValue = ((Float)bf1).mValue + ((Float)bf2).mValue;
275 this._mThread.currentFrame.OpStack.Push(nflt); 275 this._mThread.currentFrame.OpStack.Push(nflt);
276 } 276 }
277 result = true; 277 result = true;
278 break; 278 break;
279 case 102: 279 case 102:
280 BaseType bsf2 = this._mThread.currentFrame.OpStack.Pop(); 280 BaseType bsf2 = this._mThread.currentFrame.OpStack.Pop();
281 BaseType bsf1 = this._mThread.currentFrame.OpStack.Pop(); 281 BaseType bsf1 = this._mThread.currentFrame.OpStack.Pop();
282 if (bsf1 is Float && bsf2 is Float) 282 if (bsf1 is Float && bsf2 is Float)
283 { 283 {
284 Float resf = new Float(); 284 Float resf = new Float();
285 resf.mValue = ((Float)bsf1).mValue - ((Float)bsf2).mValue; 285 resf.mValue = ((Float)bsf1).mValue - ((Float)bsf2).mValue;
286 this._mThread.currentFrame.OpStack.Push(resf); 286 this._mThread.currentFrame.OpStack.Push(resf);
287 } 287 }
288 result = true; 288 result = true;
289 break; 289 break;
290 case 104: //check the order of the two values off the stack is correct 290 case 104: //check the order of the two values off the stack is correct
291 BaseType bs2 = this._mThread.currentFrame.OpStack.Pop(); 291 BaseType bs2 = this._mThread.currentFrame.OpStack.Pop();
292 BaseType bs1 = this._mThread.currentFrame.OpStack.Pop(); 292 BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
293 if (bs1 is Int && bs2 is Int) 293 if (bs1 is Int && bs2 is Int)
294 { 294 {
295 Int nInt = new Int(); 295 Int nInt = new Int();
296 nInt.mValue = ((Int)bs1).mValue * ((Int)bs2).mValue; 296 nInt.mValue = ((Int)bs1).mValue * ((Int)bs2).mValue;
297 this._mThread.currentFrame.OpStack.Push(nInt); 297 this._mThread.currentFrame.OpStack.Push(nInt);
298 } 298 }
299 result = true; 299 result = true;
300 break; 300 break;
301 case 132: 301 case 132:
302 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] != null) 302 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] != null)
303 { 303 {
304 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] is Int) 304 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] is Int)
305 { 305 {
306 ((Int)this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]]).mValue += (sbyte) GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]; 306 ((Int)this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]]).mValue += (sbyte) GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1];
307 } 307 }
308 } 308 }
309 this._mThread.PC += 2; 309 this._mThread.PC += 2;
310 result = true; 310 result = true;
311 break; 311 break;
312 case 139: 312 case 139:
313 BaseType conv1 = this._mThread.currentFrame.OpStack.Pop(); 313 BaseType conv1 = this._mThread.currentFrame.OpStack.Pop();
314 if (conv1 is Float) 314 if (conv1 is Float)
315 { 315 {
316 Int newconv = new Int(); 316 Int newconv = new Int();
317 newconv.mValue = (int)((Float)conv1).mValue; 317 newconv.mValue = (int)((Float)conv1).mValue;
318 this._mThread.currentFrame.OpStack.Push(newconv); 318 this._mThread.currentFrame.OpStack.Push(newconv);
319 } 319 }
320 result = true; 320 result = true;
321 break; 321 break;
322 case 149: 322 case 149:
323 BaseType flcom2 = this._mThread.currentFrame.OpStack.Pop(); 323 BaseType flcom2 = this._mThread.currentFrame.OpStack.Pop();
324 BaseType flcom1 = this._mThread.currentFrame.OpStack.Pop(); 324 BaseType flcom1 = this._mThread.currentFrame.OpStack.Pop();
325 if (flcom1 is Float && flcom2 is Float) 325 if (flcom1 is Float && flcom2 is Float)
326 { 326 {
327 Int compres = new Int(); 327 Int compres = new Int();
328 if (((Float)flcom1).mValue < ((Float)flcom2).mValue) 328 if (((Float)flcom1).mValue < ((Float)flcom2).mValue)
329 { 329 {
330 compres.mValue = -1; 330 compres.mValue = -1;
331 } 331 }
332 else if (((Float)flcom1).mValue > ((Float)flcom2).mValue) 332 else if (((Float)flcom1).mValue > ((Float)flcom2).mValue)
333 { 333 {
334 compres.mValue = 1; 334 compres.mValue = 1;
335 } 335 }
336 else 336 else
337 { 337 {
338 compres.mValue = 0; 338 compres.mValue = 0;
339 } 339 }
340 this._mThread.currentFrame.OpStack.Push(compres); 340 this._mThread.currentFrame.OpStack.Push(compres);
341 } 341 }
342 result = true; 342 result = true;
343 break; 343 break;
344 case 158: 344 case 158:
345 short compareoffset1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]); 345 short compareoffset1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
346 BaseType comp1 = this._mThread.currentFrame.OpStack.Pop(); 346 BaseType comp1 = this._mThread.currentFrame.OpStack.Pop();
347 if (comp1 is Int) 347 if (comp1 is Int)
348 { 348 {
349 if (((Int)comp1).mValue <= 0) 349 if (((Int)comp1).mValue <= 0)
350 { 350 {
351 this._mThread.PC += -1 + compareoffset1; 351 this._mThread.PC += -1 + compareoffset1;
352 } 352 }
353 else 353 else
354 { 354 {
355 this._mThread.PC += 2; 355 this._mThread.PC += 2;
356 } 356 }
357 } 357 }
358 else 358 else
359 { 359 {
360 this._mThread.PC += 2; 360 this._mThread.PC += 2;
361 } 361 }
362 result = true; 362 result = true;
363 break; 363 break;
364 case 162: 364 case 162:
365 short compareoffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]); 365 short compareoffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
366 BaseType bc2 = this._mThread.currentFrame.OpStack.Pop(); 366 BaseType bc2 = this._mThread.currentFrame.OpStack.Pop();
367 BaseType bc1 = this._mThread.currentFrame.OpStack.Pop(); 367 BaseType bc1 = this._mThread.currentFrame.OpStack.Pop();
368 if (bc1 is Int && bc2 is Int) 368 if (bc1 is Int && bc2 is Int)
369 { 369 {
370 //Console.WriteLine("comparing " + ((Int)bc1).mValue + " and " + ((Int)bc2).mValue); 370 //Console.WriteLine("comparing " + ((Int)bc1).mValue + " and " + ((Int)bc2).mValue);
371 if (((Int)bc1).mValue >= ((Int)bc2).mValue) 371 if (((Int)bc1).mValue >= ((Int)bc2).mValue)
372 { 372 {
373 // Console.WriteLine("branch compare true , offset is " +compareoffset); 373 // Console.WriteLine("branch compare true , offset is " +compareoffset);
374 // Console.WriteLine("current PC is " + this._mThread.PC); 374 // Console.WriteLine("current PC is " + this._mThread.PC);
375 this._mThread.PC += -1 + compareoffset; 375 this._mThread.PC += -1 + compareoffset;
376 //Console.WriteLine("new PC is " + this._mThread.PC); 376 //Console.WriteLine("new PC is " + this._mThread.PC);
377 } 377 }
378 else 378 else
379 { 379 {
380 //Console.WriteLine("branch compare false"); 380 //Console.WriteLine("branch compare false");
381 this._mThread.PC += 2; 381 this._mThread.PC += 2;
382 } 382 }
383 } 383 }
384 else 384 else
385 { 385 {
386 this._mThread.PC += 2; 386 this._mThread.PC += 2;
387 } 387 }
388 result = true; 388 result = true;
389 break; 389 break;
390 case 164: 390 case 164:
391 short compareloffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]); 391 short compareloffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
392 BaseType bcl2 = this._mThread.currentFrame.OpStack.Pop(); 392 BaseType bcl2 = this._mThread.currentFrame.OpStack.Pop();
393 BaseType bcl1 = this._mThread.currentFrame.OpStack.Pop(); 393 BaseType bcl1 = this._mThread.currentFrame.OpStack.Pop();
394 if (bcl1 is Int && bcl2 is Int) 394 if (bcl1 is Int && bcl2 is Int)
395 { 395 {
396 //Console.WriteLine("comparing " + ((Int)bcl1).mValue + " and " + ((Int)bcl2).mValue); 396 //Console.WriteLine("comparing " + ((Int)bcl1).mValue + " and " + ((Int)bcl2).mValue);
397 if (((Int)bcl1).mValue <= ((Int)bcl2).mValue) 397 if (((Int)bcl1).mValue <= ((Int)bcl2).mValue)
398 { 398 {
399 // Console.WriteLine("branch compare true , offset is " + compareloffset); 399 // Console.WriteLine("branch compare true , offset is " + compareloffset);
400 // Console.WriteLine("current PC is " + this._mThread.PC); 400 // Console.WriteLine("current PC is " + this._mThread.PC);
401 this._mThread.PC += -1 + compareloffset; 401 this._mThread.PC += -1 + compareloffset;
402 // Console.WriteLine("new PC is " + this._mThread.PC); 402 // Console.WriteLine("new PC is " + this._mThread.PC);
403 } 403 }
404 else 404 else
405 { 405 {
406 //Console.WriteLine("branch compare false"); 406 //Console.WriteLine("branch compare false");
407 this._mThread.PC += 2; 407 this._mThread.PC += 2;
408 } 408 }
409 } 409 }
410 else 410 else
411 { 411 {
412 this._mThread.PC += 2; 412 this._mThread.PC += 2;
413 } 413 }
414 result = true; 414 result = true;
415 break; 415 break;
416 case 167: 416 case 167:
417 short offset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]); 417 short offset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
418 this._mThread.PC += -1 + offset; 418 this._mThread.PC += -1 + offset;
419 result = true; 419 result = true;
420 break; 420 break;
421 } 421 }
422 422
423 return result; 423 return result;
424 } 424 }
425 } 425 }
426 } 426 }
427} 427}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Methods.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Methods.cs
index e2e2b7c..6b85fcc 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Methods.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Methods.cs
@@ -1,96 +1,96 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes; 32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36 36
37namespace OpenSim.Region.Scripting.EmbeddedJVM 37namespace OpenSim.Region.Scripting.EmbeddedJVM
38{ 38{
39 partial class Thread 39 partial class Thread
40 { 40 {
41 private partial class Interpreter 41 private partial class Interpreter
42 { 42 {
43 private bool IsMethodOpCode(byte opcode) 43 private bool IsMethodOpCode(byte opcode)
44 { 44 {
45 bool result = false; 45 bool result = false;
46 switch (opcode) 46 switch (opcode)
47 { 47 {
48 case 184: 48 case 184:
49 short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]); 49 short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
50 if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef) 50 if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef)
51 { 51 {
52 string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value; 52 string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value;
53 string typeparam = ""; 53 string typeparam = "";
54 string typereturn = ""; 54 string typereturn = "";
55 int firstbrak = 0; 55 int firstbrak = 0;
56 int secondbrak = 0; 56 int secondbrak = 0;
57 firstbrak = typ.LastIndexOf('('); 57 firstbrak = typ.LastIndexOf('(');
58 secondbrak = typ.LastIndexOf(')'); 58 secondbrak = typ.LastIndexOf(')');
59 typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1); 59 typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1);
60 typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1); 60 typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1);
61 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value) 61 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value)
62 { 62 {
63 //calling a method in this class 63 //calling a method in this class
64 if (typeparam.Length == 0) 64 if (typeparam.Length == 0)
65 { 65 {
66 this._mThread.JumpToStaticVoidMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, (this._mThread.PC + 2)); 66 this._mThread.JumpToStaticVoidMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, (this._mThread.PC + 2));
67 } 67 }
68 else 68 else
69 { 69 {
70 this._mThread.JumpToStaticParamMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, typeparam, (this._mThread.PC + 2)); 70 this._mThread.JumpToStaticParamMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, typeparam, (this._mThread.PC + 2));
71 } 71 }
72 } 72 }
73 else 73 else
74 { 74 {
75 //calling a method of a different class 75 //calling a method of a different class
76 76
77 // OpenSimAPI Class 77 // OpenSimAPI Class
78 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == "OpenSimAPI") 78 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == "OpenSimAPI")
79 { 79 {
80 this._mThread.scriptInfo.api.CallMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, null); 80 this._mThread.scriptInfo.api.CallMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, null);
81 } 81 }
82 } 82 }
83 } 83 }
84 else 84 else
85 { 85 {
86 this._mThread.PC += 2; 86 this._mThread.PC += 2;
87 } 87 }
88 result = true; 88 result = true;
89 break; 89 break;
90 } 90 }
91 91
92 return result; 92 return result;
93 } 93 }
94 } 94 }
95 } 95 }
96} 96}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Return.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Return.cs
index 6444776..3c18a11 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Return.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.Return.cs
@@ -1,40 +1,40 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 partial class Thread 34 partial class Thread
35 { 35 {
36 private partial class Interpreter 36 private partial class Interpreter
37 { 37 {
38 } 38 }
39 } 39 }
40} 40}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.cs
index d44f315..9961cbd 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Interpreter.cs
@@ -1,135 +1,135 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes; 32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33 33
34namespace OpenSim.Region.Scripting.EmbeddedJVM 34namespace OpenSim.Region.Scripting.EmbeddedJVM
35{ 35{
36 partial class Thread 36 partial class Thread
37 { 37 {
38 private partial class Interpreter 38 private partial class Interpreter
39 { 39 {
40 private Thread _mThread; 40 private Thread _mThread;
41 41
42 public Interpreter(Thread parentThread) 42 public Interpreter(Thread parentThread)
43 { 43 {
44 _mThread = parentThread; 44 _mThread = parentThread;
45 } 45 }
46 46
47 public bool Excute() 47 public bool Excute()
48 { 48 {
49 bool run = true; 49 bool run = true;
50 byte currentOpCode = GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC++]; 50 byte currentOpCode = GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC++];
51 // Console.WriteLine("opCode is: " + currentOpCode); 51 // Console.WriteLine("opCode is: " + currentOpCode);
52 bool handled = false; 52 bool handled = false;
53 53
54 handled = this.IsLogicOpCode(currentOpCode); 54 handled = this.IsLogicOpCode(currentOpCode);
55 if (!handled) 55 if (!handled)
56 { 56 {
57 handled = this.IsMethodOpCode(currentOpCode); 57 handled = this.IsMethodOpCode(currentOpCode);
58 } 58 }
59 if (!handled) 59 if (!handled)
60 { 60 {
61 if (currentOpCode == 172) 61 if (currentOpCode == 172)
62 { 62 {
63 if (this._mThread.stack.StackFrames.Count > 1) 63 if (this._mThread.stack.StackFrames.Count > 1)
64 { 64 {
65 Console.WriteLine("returning int from function"); 65 Console.WriteLine("returning int from function");
66 int retPC1 = this._mThread.currentFrame.ReturnPC; 66 int retPC1 = this._mThread.currentFrame.ReturnPC;
67 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop(); 67 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
68 this._mThread.stack.StackFrames.Pop(); 68 this._mThread.stack.StackFrames.Pop();
69 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek(); 69 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
70 this._mThread.PC = retPC1; 70 this._mThread.PC = retPC1;
71 if (bas1 is Int) 71 if (bas1 is Int)
72 { 72 {
73 this._mThread.currentFrame.OpStack.Push((Int)bas1); 73 this._mThread.currentFrame.OpStack.Push((Int)bas1);
74 } 74 }
75 } 75 }
76 else 76 else
77 { 77 {
78 // Console.WriteLine("No parent function so ending program"); 78 // Console.WriteLine("No parent function so ending program");
79 this._mThread.stack.StackFrames.Pop(); 79 this._mThread.stack.StackFrames.Pop();
80 run = false; 80 run = false;
81 } 81 }
82 handled = true; 82 handled = true;
83 } 83 }
84 if (currentOpCode == 174) 84 if (currentOpCode == 174)
85 { 85 {
86 if (this._mThread.stack.StackFrames.Count > 1) 86 if (this._mThread.stack.StackFrames.Count > 1)
87 { 87 {
88 Console.WriteLine("returning float from function"); 88 Console.WriteLine("returning float from function");
89 int retPC1 = this._mThread.currentFrame.ReturnPC; 89 int retPC1 = this._mThread.currentFrame.ReturnPC;
90 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop(); 90 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
91 this._mThread.stack.StackFrames.Pop(); 91 this._mThread.stack.StackFrames.Pop();
92 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek(); 92 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
93 this._mThread.PC = retPC1; 93 this._mThread.PC = retPC1;
94 if (bas1 is Float) 94 if (bas1 is Float)
95 { 95 {
96 this._mThread.currentFrame.OpStack.Push((Float)bas1); 96 this._mThread.currentFrame.OpStack.Push((Float)bas1);
97 } 97 }
98 } 98 }
99 else 99 else
100 { 100 {
101 // Console.WriteLine("No parent function so ending program"); 101 // Console.WriteLine("No parent function so ending program");
102 this._mThread.stack.StackFrames.Pop(); 102 this._mThread.stack.StackFrames.Pop();
103 run = false; 103 run = false;
104 } 104 }
105 handled = true; 105 handled = true;
106 } 106 }
107 if (currentOpCode == 177) 107 if (currentOpCode == 177)
108 { 108 {
109 if (this._mThread.stack.StackFrames.Count > 1) 109 if (this._mThread.stack.StackFrames.Count > 1)
110 { 110 {
111 Console.WriteLine("returning from function"); 111 Console.WriteLine("returning from function");
112 int retPC = this._mThread.currentFrame.ReturnPC; 112 int retPC = this._mThread.currentFrame.ReturnPC;
113 this._mThread.stack.StackFrames.Pop(); 113 this._mThread.stack.StackFrames.Pop();
114 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek(); 114 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
115 this._mThread.PC = retPC; 115 this._mThread.PC = retPC;
116 } 116 }
117 else 117 else
118 { 118 {
119 // Console.WriteLine("No parent function so ending program"); 119 // Console.WriteLine("No parent function so ending program");
120 this._mThread.stack.StackFrames.Pop(); 120 this._mThread.stack.StackFrames.Pop();
121 run = false; 121 run = false;
122 } 122 }
123 handled = true; 123 handled = true;
124 } 124 }
125 } 125 }
126 if (!handled) 126 if (!handled)
127 { 127 {
128 Console.WriteLine("opcode " + currentOpCode + " not been handled "); 128 Console.WriteLine("opcode " + currentOpCode + " not been handled ");
129 } 129 }
130 return run; 130 return run;
131 131
132 } 132 }
133 } 133 }
134 } 134 }
135} 135}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MainMemory.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MainMemory.cs
index addb6ff..7174975 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MainMemory.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MainMemory.cs
@@ -1,45 +1,45 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 public class MainMemory 34 public class MainMemory
35 { 35 {
36 public Heap HeapArea; 36 public Heap HeapArea;
37 public MethodMemory MethodArea; 37 public MethodMemory MethodArea;
38 38
39 public MainMemory() 39 public MainMemory()
40 { 40 {
41 MethodArea = new MethodMemory(); 41 MethodArea = new MethodMemory();
42 HeapArea = new Heap(); 42 HeapArea = new Heap();
43 } 43 }
44 } 44 }
45} 45}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MethodMemory.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MethodMemory.cs
index 7d69e91..5f29091 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MethodMemory.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/MethodMemory.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 public class MethodMemory 34 public class MethodMemory
35 { 35 {
36 public byte[] MethodBuffer; 36 public byte[] MethodBuffer;
37 public List<ClassRecord> Classes = new List<ClassRecord>(); 37 public List<ClassRecord> Classes = new List<ClassRecord>();
38 public int NextMethodPC = 0; 38 public int NextMethodPC = 0;
39 public int Methodcount = 0; 39 public int Methodcount = 0;
40 40
41 public MethodMemory() 41 public MethodMemory()
42 { 42 {
43 MethodBuffer = new byte[20000]; 43 MethodBuffer = new byte[20000];
44 } 44 }
45 } 45 }
46} 46}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Object.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Object.cs
index 6a0a1a4..8acb2bd 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Object.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Object.cs
@@ -1,37 +1,37 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 public class Object 34 public class Object
35 { 35 {
36 } 36 }
37} 37}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Stack.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Stack.cs
index 74f0a7f..7c12678 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Stack.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Stack.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Region.Scripting.EmbeddedJVM 32namespace OpenSim.Region.Scripting.EmbeddedJVM
33{ 33{
34 public class Stack 34 public class Stack
35 { 35 {
36 public Stack<StackFrame> StackFrames = new Stack<StackFrame>(); 36 public Stack<StackFrame> StackFrames = new Stack<StackFrame>();
37 37
38 public Stack() 38 public Stack()
39 { 39 {
40 } 40 }
41 } 41 }
42} 42}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/StackFrame.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/StackFrame.cs
index 1072395..76257b8 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/StackFrame.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/StackFrame.cs
@@ -1,49 +1,49 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32 32
33namespace OpenSim.Region.Scripting.EmbeddedJVM 33namespace OpenSim.Region.Scripting.EmbeddedJVM
34{ 34{
35 public class StackFrame 35 public class StackFrame
36 { 36 {
37 public BaseType[] LocalVariables; 37 public BaseType[] LocalVariables;
38 public Stack<BaseType> OpStack = new Stack<BaseType>(); 38 public Stack<BaseType> OpStack = new Stack<BaseType>();
39 39
40 public int ReturnPC = 0; 40 public int ReturnPC = 0;
41 public ClassRecord CallingClass = null; 41 public ClassRecord CallingClass = null;
42 42
43 public StackFrame() 43 public StackFrame()
44 { 44 {
45 LocalVariables = new BaseType[20]; 45 LocalVariables = new BaseType[20];
46 } 46 }
47 47
48 } 48 }
49} 49}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Thread.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Thread.cs
index 59f3042..eda2640 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Thread.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JVM/Thread.cs
@@ -1,119 +1,119 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Region.Scripting.EmbeddedJVM.Types; 31using OpenSim.Region.Scripting.EmbeddedJVM.Types;
32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes; 32using OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36using OpenSim.Region.Scripting; 36using OpenSim.Region.Scripting;
37 37
38namespace OpenSim.Region.Scripting.EmbeddedJVM 38namespace OpenSim.Region.Scripting.EmbeddedJVM
39{ 39{
40 public partial class Thread 40 public partial class Thread
41 { 41 {
42 // Is this smart? 42 // Is this smart?
43 public static MainMemory GlobalMemory; 43 public static MainMemory GlobalMemory;
44 public static Scene World; 44 public static Scene World;
45 private int PC = 0; 45 private int PC = 0;
46 private Stack stack; 46 private Stack stack;
47 private Interpreter mInterpreter; 47 private Interpreter mInterpreter;
48 public ClassRecord currentClass; 48 public ClassRecord currentClass;
49 public ClassInstance currentInstance; 49 public ClassInstance currentInstance;
50 private StackFrame currentFrame; 50 private StackFrame currentFrame;
51 public int excutionCounter = 0; 51 public int excutionCounter = 0;
52 public bool running = false; 52 public bool running = false;
53 53
54 public ScriptInfo scriptInfo; 54 public ScriptInfo scriptInfo;
55 55
56 public Thread() 56 public Thread()
57 { 57 {
58 this.mInterpreter = new Interpreter(this); 58 this.mInterpreter = new Interpreter(this);
59 this.stack = new Stack(); 59 this.stack = new Stack();
60 } 60 }
61 61
62 public void SetPC(int methodpointer) 62 public void SetPC(int methodpointer)
63 { 63 {
64 //Console.WriteLine("Thread PC has been set to " + methodpointer); 64 //Console.WriteLine("Thread PC has been set to " + methodpointer);
65 PC = methodpointer; 65 PC = methodpointer;
66 } 66 }
67 67
68 public void StartMethod(ClassRecord rec, string methName) 68 public void StartMethod(ClassRecord rec, string methName)
69 { 69 {
70 currentFrame = new StackFrame(); 70 currentFrame = new StackFrame();
71 this.stack.StackFrames.Push(currentFrame); 71 this.stack.StackFrames.Push(currentFrame);
72 this.currentClass = rec; 72 this.currentClass = rec;
73 currentClass.StartMethod(this, methName); 73 currentClass.StartMethod(this, methName);
74 } 74 }
75 75
76 public void StartMethod( string methName) 76 public void StartMethod( string methName)
77 { 77 {
78 currentFrame = new StackFrame(); 78 currentFrame = new StackFrame();
79 this.stack.StackFrames.Push(currentFrame); 79 this.stack.StackFrames.Push(currentFrame);
80 currentClass.StartMethod(this, methName); 80 currentClass.StartMethod(this, methName);
81 } 81 }
82 82
83 public void JumpToStaticVoidMethod(string methName, int returnPC) 83 public void JumpToStaticVoidMethod(string methName, int returnPC)
84 { 84 {
85 currentFrame = new StackFrame(); 85 currentFrame = new StackFrame();
86 currentFrame.ReturnPC = returnPC; 86 currentFrame.ReturnPC = returnPC;
87 this.stack.StackFrames.Push(currentFrame); 87 this.stack.StackFrames.Push(currentFrame);
88 currentClass.StartMethod(this, methName); 88 currentClass.StartMethod(this, methName);
89 } 89 }
90 90
91 public void JumpToStaticParamMethod(string methName, string param, int returnPC) 91 public void JumpToStaticParamMethod(string methName, string param, int returnPC)
92 { 92 {
93 if (param == "I") 93 if (param == "I")
94 { 94 {
95 BaseType bs1 = currentFrame.OpStack.Pop(); 95 BaseType bs1 = currentFrame.OpStack.Pop();
96 currentFrame = new StackFrame(); 96 currentFrame = new StackFrame();
97 currentFrame.ReturnPC = returnPC; 97 currentFrame.ReturnPC = returnPC;
98 this.stack.StackFrames.Push(currentFrame); 98 this.stack.StackFrames.Push(currentFrame);
99 currentFrame.LocalVariables[0] = ((Int)bs1); 99 currentFrame.LocalVariables[0] = ((Int)bs1);
100 currentClass.StartMethod(this, methName); 100 currentClass.StartMethod(this, methName);
101 } 101 }
102 if (param == "F") 102 if (param == "F")
103 { 103 {
104 104
105 } 105 }
106 } 106 }
107 107
108 public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC) 108 public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC)
109 { 109 {
110 110
111 } 111 }
112 112
113 public bool Excute() 113 public bool Excute()
114 { 114 {
115 excutionCounter++; 115 excutionCounter++;
116 return this.mInterpreter.Excute(); 116 return this.mInterpreter.Excute();
117 } 117 }
118 } 118 }
119} 119}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JavaEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JavaEngine.cs
index a884e2b..58cdf49 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JavaEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/JavaEngine.cs
@@ -1,29 +1,29 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Region.Scripting; 5using OpenSim.Region.Scripting;
6using OpenSim.Region.Scripting.EmbeddedJVM; 6using OpenSim.Region.Scripting.EmbeddedJVM;
7 7
8namespace OpenSim.Region.Scripting 8namespace OpenSim.Region.Scripting
9{ 9{
10 public class JavaEngine : IScriptCompiler 10 public class JavaEngine : IScriptCompiler
11 { 11 {
12 public string FileExt() 12 public string FileExt()
13 { 13 {
14 return ".java"; 14 return ".java";
15 } 15 }
16 16
17 public Dictionary<string, IScript> compile(string filename) 17 public Dictionary<string, IScript> compile(string filename)
18 { 18 {
19 JVMScript script = new JVMScript(); 19 JVMScript script = new JVMScript();
20 Dictionary<string, IScript> returns = new Dictionary<string, IScript>(); 20 Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
21 21
22 script.LoadScript(filename); 22 script.LoadScript(filename);
23 23
24 returns.Add(filename, script); 24 returns.Add(filename, script);
25 25
26 return returns; 26 return returns;
27 } 27 }
28 } 28 }
29} 29}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/OpenSimJVM.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/OpenSimJVM.cs
index 8b38951..78c6f67 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/OpenSimJVM.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/OpenSimJVM.cs
@@ -1,170 +1,170 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using System.IO; 31using System.IO;
32using System.Threading; 32using System.Threading;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36using OpenSim.Region.Scripting; 36using OpenSim.Region.Scripting;
37using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
38 38
39namespace OpenSim.Region.Scripting.EmbeddedJVM 39namespace OpenSim.Region.Scripting.EmbeddedJVM
40{ 40{
41 public class JVMScript : IScript 41 public class JVMScript : IScript
42 { 42 {
43 private List<Thread> _threads = new List<Thread>(); 43 private List<Thread> _threads = new List<Thread>();
44 private BlockingQueue<CompileInfo> CompileScripts = new BlockingQueue<CompileInfo>(); 44 private BlockingQueue<CompileInfo> CompileScripts = new BlockingQueue<CompileInfo>();
45 private MainMemory _mainMemory; 45 private MainMemory _mainMemory;
46 46
47 ScriptInfo scriptInfo; 47 ScriptInfo scriptInfo;
48 48
49 public void Initialise(ScriptInfo info) 49 public void Initialise(ScriptInfo info)
50 { 50 {
51 scriptInfo = info; 51 scriptInfo = info;
52 52
53 _mainMemory = new MainMemory(); 53 _mainMemory = new MainMemory();
54 Thread.GlobalMemory = this._mainMemory; 54 Thread.GlobalMemory = this._mainMemory;
55 Thread.World = info.world; 55 Thread.World = info.world;
56 CompileScript(); 56 CompileScript();
57 57
58 scriptInfo.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); 58 scriptInfo.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame);
59 scriptInfo.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); 59 scriptInfo.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
60 } 60 }
61 61
62 void events_OnNewPresence(ScenePresence presence) 62 void events_OnNewPresence(ScenePresence presence)
63 { 63 {
64 for (int i = 0; i < this._threads.Count; i++) 64 for (int i = 0; i < this._threads.Count; i++)
65 { 65 {
66 if (!this._threads[i].running) 66 if (!this._threads[i].running)
67 { 67 {
68 this._threads[i].StartMethod("OnNewPresence"); 68 this._threads[i].StartMethod("OnNewPresence");
69 bool run = true; 69 bool run = true;
70 while (run) 70 while (run)
71 { 71 {
72 run = this._threads[i].Excute(); 72 run = this._threads[i].Excute();
73 } 73 }
74 } 74 }
75 } 75 }
76 } 76 }
77 77
78 void events_OnFrame() 78 void events_OnFrame()
79 { 79 {
80 for (int i = 0; i < this._threads.Count; i++) 80 for (int i = 0; i < this._threads.Count; i++)
81 { 81 {
82 if (!this._threads[i].running) 82 if (!this._threads[i].running)
83 { 83 {
84 this._threads[i].StartMethod("OnFrame"); 84 this._threads[i].StartMethod("OnFrame");
85 bool run = true; 85 bool run = true;
86 while (run) 86 while (run)
87 { 87 {
88 run = this._threads[i].Excute(); 88 run = this._threads[i].Excute();
89 } 89 }
90 } 90 }
91 } 91 }
92 } 92 }
93 93
94 public string getName() 94 public string getName()
95 { 95 {
96 return "JVM Scripting Engine"; 96 return "JVM Scripting Engine";
97 } 97 }
98 98
99 public void LoadScript(string script) 99 public void LoadScript(string script)
100 { 100 {
101 Console.WriteLine("OpenSimJVM - loading new script: " + script); 101 Console.WriteLine("OpenSimJVM - loading new script: " + script);
102 CompileInfo comp = new CompileInfo(); 102 CompileInfo comp = new CompileInfo();
103 comp.script = script; 103 comp.script = script;
104 comp.scriptName = script; 104 comp.scriptName = script;
105 this.CompileScripts.Enqueue(comp); 105 this.CompileScripts.Enqueue(comp);
106 } 106 }
107 107
108 public void CompileScript() 108 public void CompileScript()
109 { 109 {
110 CompileInfo comp = this.CompileScripts.Dequeue(); 110 CompileInfo comp = this.CompileScripts.Dequeue();
111 string script = comp.script; 111 string script = comp.script;
112 string scriptName = comp.scriptName; 112 string scriptName = comp.scriptName;
113 try 113 try
114 { 114 {
115 //need to compile the script into a java class file 115 //need to compile the script into a java class file
116 116
117 //first save it to a java source file 117 //first save it to a java source file
118 TextWriter tw = new StreamWriter(scriptName + ".java"); 118 TextWriter tw = new StreamWriter(scriptName + ".java");
119 tw.WriteLine(script); 119 tw.WriteLine(script);
120 tw.Close(); 120 tw.Close();
121 121
122 //now compile 122 //now compile
123 System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("javac.exe", "*.java"); 123 System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("javac.exe", "*.java");
124 // psi.RedirectStandardOutput = true; 124 // psi.RedirectStandardOutput = true;
125 psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; 125 psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
126 psi.UseShellExecute = false; 126 psi.UseShellExecute = false;
127 127
128 System.Diagnostics.Process javacomp; 128 System.Diagnostics.Process javacomp;
129 javacomp = System.Diagnostics.Process.Start(psi); 129 javacomp = System.Diagnostics.Process.Start(psi);
130 javacomp.WaitForExit(); 130 javacomp.WaitForExit();
131 131
132 132
133 //now load in class file 133 //now load in class file
134 ClassRecord class1 = new ClassRecord(); 134 ClassRecord class1 = new ClassRecord();
135 class1.LoadClassFromFile(scriptName + ".class"); 135 class1.LoadClassFromFile(scriptName + ".class");
136 class1.PrintToConsole(); 136 class1.PrintToConsole();
137 //Console.WriteLine(); 137 //Console.WriteLine();
138 this._mainMemory.MethodArea.Classes.Add(class1); 138 this._mainMemory.MethodArea.Classes.Add(class1);
139 class1.AddMethodsToMemory(this._mainMemory.MethodArea); 139 class1.AddMethodsToMemory(this._mainMemory.MethodArea);
140 140
141 Thread newThread = new Thread(); 141 Thread newThread = new Thread();
142 this._threads.Add(newThread); 142 this._threads.Add(newThread);
143 newThread.currentClass = class1; 143 newThread.currentClass = class1;
144 newThread.scriptInfo = scriptInfo; 144 newThread.scriptInfo = scriptInfo;
145 145
146 //now delete the created files 146 //now delete the created files
147 System.IO.File.Delete(scriptName + ".java"); 147 System.IO.File.Delete(scriptName + ".java");
148 System.IO.File.Delete(scriptName + ".class"); 148 System.IO.File.Delete(scriptName + ".class");
149 //this.OnFrame(); 149 //this.OnFrame();
150 } 150 }
151 catch (Exception e) 151 catch (Exception e)
152 { 152 {
153 Console.WriteLine("exception"); 153 Console.WriteLine("exception");
154 Console.WriteLine(e.StackTrace); 154 Console.WriteLine(e.StackTrace);
155 Console.WriteLine(e.Message); 155 Console.WriteLine(e.Message);
156 } 156 }
157 } 157 }
158 158
159 private class CompileInfo 159 private class CompileInfo
160 { 160 {
161 public string script; 161 public string script;
162 public string scriptName; 162 public string scriptName;
163 163
164 public CompileInfo() 164 public CompileInfo()
165 { 165 {
166 166
167 } 167 }
168 } 168 }
169 } 169 }
170} 170}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ArrayReference.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ArrayReference.cs
index 40e2e22..0c4d623 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ArrayReference.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ArrayReference.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types
6{ 6{
7 public class ArrayReference :BaseType 7 public class ArrayReference :BaseType
8 { 8 {
9 } 9 }
10} 10}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/BaseType.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/BaseType.cs
index 4ee1720..7fc0a4f 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/BaseType.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/BaseType.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types
6{ 6{
7 public class BaseType : Object 7 public class BaseType : Object
8 { 8 {
9 } 9 }
10} 10}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ObjectReference.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ObjectReference.cs
index 75d8e41..7718765 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ObjectReference.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/ObjectReference.cs
@@ -1,16 +1,16 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types
6{ 6{
7 public class ObjectReference : BaseType 7 public class ObjectReference : BaseType
8 { 8 {
9 public ushort Reference; 9 public ushort Reference;
10 10
11 public ObjectReference() 11 public ObjectReference()
12 { 12 {
13 13
14 } 14 }
15 } 15 }
16} 16}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Byte.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Byte.cs
index f5446dc..5a7b780 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Byte.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Byte.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{ 6{
7 public class Byte : BaseType 7 public class Byte : BaseType
8 { 8 {
9 } 9 }
10} 10}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Char.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Char.cs
index 89824b4..c87ee8f 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Char.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Char.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{ 6{
7 public class Char : BaseType 7 public class Char : BaseType
8 { 8 {
9 } 9 }
10} 10}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Float.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Float.cs
index 2638c20..982e748 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Float.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Float.cs
@@ -1,16 +1,16 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{ 6{
7 public class Float : BaseType 7 public class Float : BaseType
8 { 8 {
9 public float mValue = 0; 9 public float mValue = 0;
10 10
11 public Float() 11 public Float()
12 { 12 {
13 13
14 } 14 }
15 } 15 }
16} 16}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Int.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Int.cs
index 0155e72..073a9b3 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Int.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Types/PrimitiveTypes/Int.cs
@@ -1,16 +1,16 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes 5namespace OpenSim.Region.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{ 6{
7 public class Int : BaseType 7 public class Int : BaseType
8 { 8 {
9 public int mValue = 0; 9 public int mValue = 0;
10 10
11 public Int() 11 public Int()
12 { 12 {
13 13
14 } 14 }
15 } 15 }
16} 16}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/Engine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/Engine.cs
index 8b957d3..012a00e 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/Engine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/Engine.cs
@@ -1,140 +1,140 @@
1using System; 1using System;
2using System.Reflection; 2using System.Reflection;
3using System.Reflection.Emit; 3using System.Reflection.Emit;
4using System.Threading; 4using System.Threading;
5 5
6using OpenSim.Region.Scripting; 6using OpenSim.Region.Scripting;
7 7
8namespace OpenSim.ScriptEngines.LSL 8namespace OpenSim.ScriptEngines.LSL
9{ 9{
10 10
11 11
12 public class Engine 12 public class Engine
13 { 13 {
14 public void Start(ScriptInfo WorldAPI) 14 public void Start(ScriptInfo WorldAPI)
15 { 15 {
16 16
17 17
18 18
19 // Create Assembly Name 19 // Create Assembly Name
20 AssemblyName asmName = new AssemblyName(); 20 AssemblyName asmName = new AssemblyName();
21 asmName.Name = "TestAssembly"; 21 asmName.Name = "TestAssembly";
22 22
23 // Create Assembly 23 // Create Assembly
24 AssemblyBuilder asmBuilder = 24 AssemblyBuilder asmBuilder =
25 Thread.GetDomain().DefineDynamicAssembly 25 Thread.GetDomain().DefineDynamicAssembly
26 (asmName, AssemblyBuilderAccess.RunAndSave); 26 (asmName, AssemblyBuilderAccess.RunAndSave);
27 27
28 // Create a module (and save to disk) 28 // Create a module (and save to disk)
29 ModuleBuilder modBuilder = asmBuilder.DefineDynamicModule 29 ModuleBuilder modBuilder = asmBuilder.DefineDynamicModule
30 (asmName.Name, asmName.Name + ".dll"); 30 (asmName.Name, asmName.Name + ".dll");
31 31
32 // Create a Class (/Type) 32 // Create a Class (/Type)
33 TypeBuilder typeBuilder = modBuilder.DefineType( 33 TypeBuilder typeBuilder = modBuilder.DefineType(
34 "MyClass", 34 "MyClass",
35 TypeAttributes.Public, 35 TypeAttributes.Public,
36 typeof(object), 36 typeof(object),
37 new Type[] { typeof(LSL_CLRInterface.LSLScript) }); 37 new Type[] { typeof(LSL_CLRInterface.LSLScript) });
38 38
39 39
40 40
41 /* 41 /*
42 * Generate the IL itself 42 * Generate the IL itself
43 */ 43 */
44 44
45 GenerateIL(WorldAPI, typeBuilder); 45 GenerateIL(WorldAPI, typeBuilder);
46 46
47 47
48 /* 48 /*
49 * Done generating, create a type and run it. 49 * Done generating, create a type and run it.
50 */ 50 */
51 51
52 // Create type object for the class (after defining fields and methods) 52 // Create type object for the class (after defining fields and methods)
53 Type type = typeBuilder.CreateType(); 53 Type type = typeBuilder.CreateType();
54 54
55 asmBuilder.Save("TestAssembly.dll"); 55 asmBuilder.Save("TestAssembly.dll");
56 56
57 // Create an instance we can play with 57 // Create an instance we can play with
58 //LSLScript hello = (LSLScript)Activator.CreateInstance(type); 58 //LSLScript hello = (LSLScript)Activator.CreateInstance(type);
59 LSL_CLRInterface.LSLScript MyScript = (LSL_CLRInterface.LSLScript)Activator.CreateInstance(type); 59 LSL_CLRInterface.LSLScript MyScript = (LSL_CLRInterface.LSLScript)Activator.CreateInstance(type);
60 60
61 // Play with it 61 // Play with it
62 MyScript.event_state_entry("Test"); 62 MyScript.event_state_entry("Test");
63 } 63 }
64 64
65 private void GenerateIL(ScriptInfo WorldAPI, TypeBuilder typeBuilder) 65 private void GenerateIL(ScriptInfo WorldAPI, TypeBuilder typeBuilder)
66 { 66 {
67 67
68 68
69 // For debug 69 // For debug
70 LSO_Parser LSOP = new LSO_Parser(); 70 LSO_Parser LSOP = new LSO_Parser();
71 LSOP.ParseFile("LSO\\CloseToDefault.lso", WorldAPI, ref typeBuilder); 71 LSOP.ParseFile("LSO\\CloseToDefault.lso", WorldAPI, ref typeBuilder);
72 return; 72 return;
73 73
74 74
75 // Override a Method / Function 75 // Override a Method / Function
76 MethodBuilder methodBuilder = typeBuilder.DefineMethod("event_state_entry", 76 MethodBuilder methodBuilder = typeBuilder.DefineMethod("event_state_entry",
77 MethodAttributes.Private | MethodAttributes.Virtual, 77 MethodAttributes.Private | MethodAttributes.Virtual,
78 typeof(void), 78 typeof(void),
79 new Type[] { typeof(object) }); 79 new Type[] { typeof(object) });
80 80
81 typeBuilder.DefineMethodOverride(methodBuilder, 81 typeBuilder.DefineMethodOverride(methodBuilder,
82 typeof(LSL_CLRInterface.LSLScript).GetMethod("event_state_entry")); 82 typeof(LSL_CLRInterface.LSLScript).GetMethod("event_state_entry"));
83 83
84 // Create the IL generator 84 // Create the IL generator
85 ILGenerator il = methodBuilder.GetILGenerator(); 85 ILGenerator il = methodBuilder.GetILGenerator();
86 86
87 87
88 /* 88 /*
89 * TRY 89 * TRY
90 */ 90 */
91 il.BeginExceptionBlock(); 91 il.BeginExceptionBlock();
92 92
93 // Push "Hello World!" string to stack 93 // Push "Hello World!" string to stack
94 il.Emit(OpCodes.Ldstr, "Hello World!"); 94 il.Emit(OpCodes.Ldstr, "Hello World!");
95 95
96 // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!"); 96 // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!");
97 il.Emit(OpCodes.Call, typeof(Console).GetMethod 97 il.Emit(OpCodes.Call, typeof(Console).GetMethod
98 ("WriteLine", new Type[] { typeof(string) })); 98 ("WriteLine", new Type[] { typeof(string) }));
99 99
100 //il.EmitCall(OpCodes.Callvirt 100 //il.EmitCall(OpCodes.Callvirt
101 //il.Emit(OpCodes.Call, typeof(WorldAPI).GetMethod 101 //il.Emit(OpCodes.Call, typeof(WorldAPI).GetMethod
102 //("TestFunction")); 102 //("TestFunction"));
103 103
104 104
105 //il.ThrowException(typeof(NotSupportedException)); 105 //il.ThrowException(typeof(NotSupportedException));
106 106
107 107
108 /* 108 /*
109 * CATCH 109 * CATCH
110 */ 110 */
111 il.BeginCatchBlock(typeof(Exception)); 111 il.BeginCatchBlock(typeof(Exception));
112 112
113 // Push "Hello World!" string to stack 113 // Push "Hello World!" string to stack
114 il.Emit(OpCodes.Ldstr, "Something went wrong: "); 114 il.Emit(OpCodes.Ldstr, "Something went wrong: ");
115 115
116 //call void [mscorlib]System.Console::WriteLine(string) 116 //call void [mscorlib]System.Console::WriteLine(string)
117 il.Emit(OpCodes.Call, typeof(Console).GetMethod 117 il.Emit(OpCodes.Call, typeof(Console).GetMethod
118 ("Write", new Type[] { typeof(string) })); 118 ("Write", new Type[] { typeof(string) }));
119 119
120 //callvirt instance string [mscorlib]System.Exception::get_Message() 120 //callvirt instance string [mscorlib]System.Exception::get_Message()
121 il.Emit(OpCodes.Callvirt, typeof(Exception).GetMethod 121 il.Emit(OpCodes.Callvirt, typeof(Exception).GetMethod
122 ("get_Message")); 122 ("get_Message"));
123 123
124 //call void [mscorlib]System.Console::WriteLine(string) 124 //call void [mscorlib]System.Console::WriteLine(string)
125 il.Emit(OpCodes.Call, typeof(Console).GetMethod 125 il.Emit(OpCodes.Call, typeof(Console).GetMethod
126 ("WriteLine", new Type[] { typeof(string) })); 126 ("WriteLine", new Type[] { typeof(string) }));
127 127
128 /* 128 /*
129 * END TRY 129 * END TRY
130 */ 130 */
131 il.EndExceptionBlock(); 131 il.EndExceptionBlock();
132 132
133 133
134 // Push "Return from current method, with return value if present" to stack 134 // Push "Return from current method, with return value if present" to stack
135 il.Emit(OpCodes.Ret); 135 il.Emit(OpCodes.Ret);
136 136
137 137
138 } 138 }
139 } 139 }
140} 140}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSL_CLRInterface.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSL_CLRInterface.cs
index dc612ff..57bbf11 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSL_CLRInterface.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSL_CLRInterface.cs
@@ -1,51 +1,51 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.ScriptEngines.LSL 5namespace OpenSim.ScriptEngines.LSL
6{ 6{
7 public class LSL_CLRInterface 7 public class LSL_CLRInterface
8 { 8 {
9 public interface LSLScript 9 public interface LSLScript
10 { 10 {
11 //public virtual void Run(object arg) 11 //public virtual void Run(object arg)
12 //{ 12 //{
13 //} 13 //}
14 //void Run(object arg); 14 //void Run(object arg);
15 15
16 void event_state_entry(object arg); 16 void event_state_entry(object arg);
17 //void event_state_exit(); 17 //void event_state_exit();
18 void event_touch_start(object arg); 18 void event_touch_start(object arg);
19 //void event_touch(); 19 //void event_touch();
20 //void event_touch_end(); 20 //void event_touch_end();
21 //void event_collision_start(); 21 //void event_collision_start();
22 //void event_collision(); 22 //void event_collision();
23 //void event_collision_end(); 23 //void event_collision_end();
24 //void event_land_collision_start(); 24 //void event_land_collision_start();
25 //void event_land_collision(); 25 //void event_land_collision();
26 //void event_land_collision_end(); 26 //void event_land_collision_end();
27 //void event_timer(); 27 //void event_timer();
28 //void event_listen(); 28 //void event_listen();
29 //void event_on_rez(); 29 //void event_on_rez();
30 //void event_sensor(); 30 //void event_sensor();
31 //void event_no_sensor(); 31 //void event_no_sensor();
32 //void event_control(); 32 //void event_control();
33 //void event_money(); 33 //void event_money();
34 //void event_email(); 34 //void event_email();
35 //void event_at_target(); 35 //void event_at_target();
36 //void event_not_at_target(); 36 //void event_not_at_target();
37 //void event_at_rot_target(); 37 //void event_at_rot_target();
38 //void event_not_at_rot_target(); 38 //void event_not_at_rot_target();
39 //void event_run_time_permissions(); 39 //void event_run_time_permissions();
40 //void event_changed(); 40 //void event_changed();
41 //void event_attach(); 41 //void event_attach();
42 //void event_dataserver(); 42 //void event_dataserver();
43 //void event_link_message(); 43 //void event_link_message();
44 //void event_moving_start(); 44 //void event_moving_start();
45 //void event_moving_end(); 45 //void event_moving_end();
46 //void event_object_rez(); 46 //void event_object_rez();
47 //void event_remote_data(); 47 //void event_remote_data();
48 //void event_http_response(); 48 //void event_http_response();
49 } 49 }
50 } 50 }
51} 51}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Enums.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Enums.cs
index edeccdd..b45abe0 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Enums.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Enums.cs
@@ -1,485 +1,485 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.ScriptEngines.LSL 5namespace OpenSim.ScriptEngines.LSL
6{ 6{
7 static class LSO_Enums 7 static class LSO_Enums
8 { 8 {
9 9
10 public enum Variable_Type_Codes 10 public enum Variable_Type_Codes
11 { 11 {
12 Void = 0, 12 Void = 0,
13 Integer = 1, 13 Integer = 1,
14 Float = 2, 14 Float = 2,
15 String = 3, 15 String = 3,
16 Key = 4, 16 Key = 4,
17 Vector = 5, 17 Vector = 5,
18 Rotation = 6, 18 Rotation = 6,
19 List = 7 19 List = 7
20 } 20 }
21 public enum Event_Mask_Values 21 public enum Event_Mask_Values
22 { 22 {
23 state_entry = 0, 23 state_entry = 0,
24 state_exit = 1, 24 state_exit = 1,
25 touch_start = 2, 25 touch_start = 2,
26 touch = 3, 26 touch = 3,
27 touch_end = 4, 27 touch_end = 4,
28 collision_start = 5, 28 collision_start = 5,
29 collision = 6, 29 collision = 6,
30 collision_end = 7, 30 collision_end = 7,
31 land_collision_start = 8, 31 land_collision_start = 8,
32 land_collision = 9, 32 land_collision = 9,
33 land_collision_end = 10, 33 land_collision_end = 10,
34 timer = 11, 34 timer = 11,
35 listen = 12, 35 listen = 12,
36 on_rez = 13, 36 on_rez = 13,
37 sensor = 14, 37 sensor = 14,
38 no_sensor = 15, 38 no_sensor = 15,
39 control = 16, 39 control = 16,
40 money = 17, 40 money = 17,
41 email = 18, 41 email = 18,
42 at_target = 19, 42 at_target = 19,
43 not_at_target = 20, 43 not_at_target = 20,
44 at_rot_target = 21, 44 at_rot_target = 21,
45 not_at_rot_target = 22, 45 not_at_rot_target = 22,
46 run_time_permissions = 23, 46 run_time_permissions = 23,
47 changed = 24, 47 changed = 24,
48 attach = 25, 48 attach = 25,
49 dataserver = 26, 49 dataserver = 26,
50 link_message = 27, 50 link_message = 27,
51 moving_start = 28, 51 moving_start = 28,
52 moving_end = 29, 52 moving_end = 29,
53 object_rez = 30, 53 object_rez = 30,
54 remote_data = 31, 54 remote_data = 31,
55 http_response = 32 55 http_response = 32
56 } 56 }
57 public enum Operation_Table 57 public enum Operation_Table
58 { 58 {
59 NOOP = 0x0, 59 NOOP = 0x0,
60 POP = 0x1, 60 POP = 0x1,
61 POPS = 0x2, 61 POPS = 0x2,
62 POPL = 0x3, 62 POPL = 0x3,
63 POPV = 0x4, 63 POPV = 0x4,
64 POPQ = 0x5, 64 POPQ = 0x5,
65 POPARG = 0x6, 65 POPARG = 0x6,
66 POPIP = 0x7, 66 POPIP = 0x7,
67 POPBP = 0x8, 67 POPBP = 0x8,
68 POPSP = 0x9, 68 POPSP = 0x9,
69 POPSLR = 0xa, 69 POPSLR = 0xa,
70 DUP = 0x20, 70 DUP = 0x20,
71 DUPS = 0x21, 71 DUPS = 0x21,
72 DUPL = 0x22, 72 DUPL = 0x22,
73 DUPV = 0x23, 73 DUPV = 0x23,
74 DUPQ = 0x24, 74 DUPQ = 0x24,
75 STORE = 0x30, 75 STORE = 0x30,
76 STORES = 0x31, 76 STORES = 0x31,
77 STOREL = 0x32, 77 STOREL = 0x32,
78 STOREV = 0x33, 78 STOREV = 0x33,
79 STOREQ = 0x34, 79 STOREQ = 0x34,
80 STOREG = 0x35, 80 STOREG = 0x35,
81 STOREGS = 0x36, 81 STOREGS = 0x36,
82 STOREGL = 0x37, 82 STOREGL = 0x37,
83 STOREGV = 0x38, 83 STOREGV = 0x38,
84 STOREGQ = 0x39, 84 STOREGQ = 0x39,
85 LOADP = 0x3a, 85 LOADP = 0x3a,
86 LOADSP = 0x3b, 86 LOADSP = 0x3b,
87 LOADLP = 0x3c, 87 LOADLP = 0x3c,
88 LOADVP = 0x3d, 88 LOADVP = 0x3d,
89 LOADQP = 0x3e, 89 LOADQP = 0x3e,
90 LOADGP = 0x3f, 90 LOADGP = 0x3f,
91 LOADGSP = 0x40, 91 LOADGSP = 0x40,
92 LOADGLP = 0x41, 92 LOADGLP = 0x41,
93 LOADGVP = 0x42, 93 LOADGVP = 0x42,
94 LOADGQP = 0x43, 94 LOADGQP = 0x43,
95 PUSH = 0x50, 95 PUSH = 0x50,
96 PUSHS = 0x51, 96 PUSHS = 0x51,
97 PUSHL = 0x52, 97 PUSHL = 0x52,
98 PUSHV = 0x53, 98 PUSHV = 0x53,
99 PUSHQ = 0x54, 99 PUSHQ = 0x54,
100 PUSHG = 0x55, 100 PUSHG = 0x55,
101 PUSHGS = 0x56, 101 PUSHGS = 0x56,
102 PUSHGL = 0x57, 102 PUSHGL = 0x57,
103 PUSHGV = 0x58, 103 PUSHGV = 0x58,
104 PUSHGQ = 0x59, 104 PUSHGQ = 0x59,
105 PUSHIP = 0x5a, 105 PUSHIP = 0x5a,
106 PUSHBP = 0x5b, 106 PUSHBP = 0x5b,
107 PUSHSP = 0x5c, 107 PUSHSP = 0x5c,
108 PUSHARGB = 0x5d, 108 PUSHARGB = 0x5d,
109 PUSHARGI = 0x5e, 109 PUSHARGI = 0x5e,
110 PUSHARGF = 0x5f, 110 PUSHARGF = 0x5f,
111 PUSHARGS = 0x60, 111 PUSHARGS = 0x60,
112 PUSHARGV = 0x61, 112 PUSHARGV = 0x61,
113 PUSHARGQ = 0x62, 113 PUSHARGQ = 0x62,
114 PUSHE = 0x63, 114 PUSHE = 0x63,
115 PUSHEV = 0x64, 115 PUSHEV = 0x64,
116 PUSHEQ = 0x65, 116 PUSHEQ = 0x65,
117 PUSHARGE = 0x66, 117 PUSHARGE = 0x66,
118 ADD = 0x70, 118 ADD = 0x70,
119 SUB = 0x71, 119 SUB = 0x71,
120 MUL = 0x72, 120 MUL = 0x72,
121 DIV = 0x73, 121 DIV = 0x73,
122 MOD = 0x74, 122 MOD = 0x74,
123 EQ = 0x75, 123 EQ = 0x75,
124 NEQ = 0x76, 124 NEQ = 0x76,
125 LEQ = 0x77, 125 LEQ = 0x77,
126 GEQ = 0x78, 126 GEQ = 0x78,
127 LESS = 0x79, 127 LESS = 0x79,
128 GREATER = 0x7a, 128 GREATER = 0x7a,
129 BITAND = 0x7b, 129 BITAND = 0x7b,
130 BITOR = 0x7c, 130 BITOR = 0x7c,
131 BITXOR = 0x7d, 131 BITXOR = 0x7d,
132 BOOLAND = 0x7e, 132 BOOLAND = 0x7e,
133 BOOLOR = 0x7f, 133 BOOLOR = 0x7f,
134 NEG = 0x80, 134 NEG = 0x80,
135 BITNOT = 0x81, 135 BITNOT = 0x81,
136 BOOLNOT = 0x82, 136 BOOLNOT = 0x82,
137 JUMP = 0x90, 137 JUMP = 0x90,
138 JUMPIF = 0x91, 138 JUMPIF = 0x91,
139 JUMPNIF = 0x92, 139 JUMPNIF = 0x92,
140 STATE = 0x93, 140 STATE = 0x93,
141 CALL = 0x94, 141 CALL = 0x94,
142 RETURN = 0x95, 142 RETURN = 0x95,
143 CAST = 0xa0, 143 CAST = 0xa0,
144 STACKTOS = 0xb0, 144 STACKTOS = 0xb0,
145 STACKTOL = 0xb1, 145 STACKTOL = 0xb1,
146 PRINT = 0xc0, 146 PRINT = 0xc0,
147 CALLLIB = 0xd0, 147 CALLLIB = 0xd0,
148 CALLLIB_TWO_BYTE = 0xd1, 148 CALLLIB_TWO_BYTE = 0xd1,
149 SHL = 0xe0, 149 SHL = 0xe0,
150 SHR = 0xe1 150 SHR = 0xe1
151 } 151 }
152 public enum BuiltIn_Functions 152 public enum BuiltIn_Functions
153 { 153 {
154 llSin = 0, 154 llSin = 0,
155 llCos = 1, 155 llCos = 1,
156 llTan = 2, 156 llTan = 2,
157 llAtan2 = 3, 157 llAtan2 = 3,
158 llSqrt = 4, 158 llSqrt = 4,
159 llPow = 5, 159 llPow = 5,
160 llAbs = 6, 160 llAbs = 6,
161 llFabs = 7, 161 llFabs = 7,
162 llFrand = 8, 162 llFrand = 8,
163 llFloor = 9, 163 llFloor = 9,
164 llCeil = 10, 164 llCeil = 10,
165 llRound = 11, 165 llRound = 11,
166 llVecMag = 12, 166 llVecMag = 12,
167 llVecNorm = 13, 167 llVecNorm = 13,
168 llVecDist = 14, 168 llVecDist = 14,
169 llRot2Euler = 15, 169 llRot2Euler = 15,
170 llEuler2Rot = 16, 170 llEuler2Rot = 16,
171 llAxes2Rot = 17, 171 llAxes2Rot = 17,
172 llRot2Fwd = 18, 172 llRot2Fwd = 18,
173 llRot2Left = 19, 173 llRot2Left = 19,
174 llRot2Up = 20, 174 llRot2Up = 20,
175 llRotBetween = 21, 175 llRotBetween = 21,
176 llWhisper = 22, 176 llWhisper = 22,
177 llSay = 23, 177 llSay = 23,
178 llShout = 24, 178 llShout = 24,
179 llListen = 25, 179 llListen = 25,
180 llListenControl = 26, 180 llListenControl = 26,
181 llListenRemove = 27, 181 llListenRemove = 27,
182 llSensor = 28, 182 llSensor = 28,
183 llSensorRepeat = 29, 183 llSensorRepeat = 29,
184 llSensorRemove = 30, 184 llSensorRemove = 30,
185 llDetectedName = 31, 185 llDetectedName = 31,
186 llDetectedKey = 32, 186 llDetectedKey = 32,
187 llDetectedOwner = 33, 187 llDetectedOwner = 33,
188 llDetectedType = 34, 188 llDetectedType = 34,
189 llDetectedPos = 35, 189 llDetectedPos = 35,
190 llDetectedVel = 36, 190 llDetectedVel = 36,
191 llDetectedGrab = 37, 191 llDetectedGrab = 37,
192 llDetectedRot = 38, 192 llDetectedRot = 38,
193 llDetectedGroup = 39, 193 llDetectedGroup = 39,
194 llDetectedLinkNumber = 40, 194 llDetectedLinkNumber = 40,
195 llDie = 41, 195 llDie = 41,
196 llGround = 42, 196 llGround = 42,
197 llCloud = 43, 197 llCloud = 43,
198 llWind = 44, 198 llWind = 44,
199 llSetStatus = 45, 199 llSetStatus = 45,
200 llGetStatus = 46, 200 llGetStatus = 46,
201 llSetScale = 47, 201 llSetScale = 47,
202 llGetScale = 48, 202 llGetScale = 48,
203 llSetColor = 49, 203 llSetColor = 49,
204 llGetAlpha = 50, 204 llGetAlpha = 50,
205 llSetAlpha = 51, 205 llSetAlpha = 51,
206 llGetColor = 52, 206 llGetColor = 52,
207 llSetTexture = 53, 207 llSetTexture = 53,
208 llScaleTexture = 54, 208 llScaleTexture = 54,
209 llOffsetTexture = 55, 209 llOffsetTexture = 55,
210 llRotateTexture = 56, 210 llRotateTexture = 56,
211 llGetTexture = 57, 211 llGetTexture = 57,
212 llSetPos = 58, 212 llSetPos = 58,
213 llGetPos = 59, 213 llGetPos = 59,
214 llGetLocalPos = 60, 214 llGetLocalPos = 60,
215 llSetRot = 61, 215 llSetRot = 61,
216 llGetRot = 62, 216 llGetRot = 62,
217 llGetLocalRot = 63, 217 llGetLocalRot = 63,
218 llSetForce = 64, 218 llSetForce = 64,
219 llGetForce = 65, 219 llGetForce = 65,
220 llTarget = 66, 220 llTarget = 66,
221 llTargetRemove = 67, 221 llTargetRemove = 67,
222 llRotTarget = 68, 222 llRotTarget = 68,
223 llRotTargetRemove = 69, 223 llRotTargetRemove = 69,
224 llMoveToTarget = 70, 224 llMoveToTarget = 70,
225 llStopMoveToTarget = 71, 225 llStopMoveToTarget = 71,
226 llApplyImpulse = 72, 226 llApplyImpulse = 72,
227 llApplyRotationalImpulse = 73, 227 llApplyRotationalImpulse = 73,
228 llSetTorque = 74, 228 llSetTorque = 74,
229 llGetTorque = 75, 229 llGetTorque = 75,
230 llSetForceAndTorque = 76, 230 llSetForceAndTorque = 76,
231 llGetVel = 77, 231 llGetVel = 77,
232 llGetAccel = 78, 232 llGetAccel = 78,
233 llGetOmega = 79, 233 llGetOmega = 79,
234 llGetTimeOfDay = 80, 234 llGetTimeOfDay = 80,
235 llGetWallclock = 81, 235 llGetWallclock = 81,
236 llGetTime = 82, 236 llGetTime = 82,
237 llResetTime = 83, 237 llResetTime = 83,
238 llGetAndResetTime = 84, 238 llGetAndResetTime = 84,
239 llSound = 85, 239 llSound = 85,
240 llPlaySound = 86, 240 llPlaySound = 86,
241 llLoopSound = 87, 241 llLoopSound = 87,
242 llLoopSoundMaster = 88, 242 llLoopSoundMaster = 88,
243 llLoopSoundSlave = 89, 243 llLoopSoundSlave = 89,
244 llPlaySoundSlave = 90, 244 llPlaySoundSlave = 90,
245 llTriggerSound = 91, 245 llTriggerSound = 91,
246 llStopSound = 92, 246 llStopSound = 92,
247 llPreloadSound = 93, 247 llPreloadSound = 93,
248 llGetSubString = 94, 248 llGetSubString = 94,
249 llDeleteSubString = 95, 249 llDeleteSubString = 95,
250 llInsertString = 96, 250 llInsertString = 96,
251 llToUpper = 97, 251 llToUpper = 97,
252 llToLower = 98, 252 llToLower = 98,
253 llGiveMoney = 99, 253 llGiveMoney = 99,
254 llMakeExplosion = 100, 254 llMakeExplosion = 100,
255 llMakeFountain = 101, 255 llMakeFountain = 101,
256 llMakeSmoke = 102, 256 llMakeSmoke = 102,
257 llMakeFire = 103, 257 llMakeFire = 103,
258 llRezObject = 104, 258 llRezObject = 104,
259 llLookAt = 105, 259 llLookAt = 105,
260 llStopLookAt = 106, 260 llStopLookAt = 106,
261 llSetTimerEvent = 107, 261 llSetTimerEvent = 107,
262 llSleep = 108, 262 llSleep = 108,
263 llGetMass = 109, 263 llGetMass = 109,
264 llCollisionFilter = 110, 264 llCollisionFilter = 110,
265 llTakeControls = 111, 265 llTakeControls = 111,
266 llReleaseControls = 112, 266 llReleaseControls = 112,
267 llAttachToAvatar = 113, 267 llAttachToAvatar = 113,
268 llDetachFromAvatar = 114, 268 llDetachFromAvatar = 114,
269 llTakeCamera = 115, 269 llTakeCamera = 115,
270 llReleaseCamera = 116, 270 llReleaseCamera = 116,
271 llGetOwner = 117, 271 llGetOwner = 117,
272 llInstantMessage = 118, 272 llInstantMessage = 118,
273 llEmail = 119, 273 llEmail = 119,
274 llGetNextEmail = 120, 274 llGetNextEmail = 120,
275 llGetKey = 121, 275 llGetKey = 121,
276 llSetBuoyancy = 122, 276 llSetBuoyancy = 122,
277 llSetHoverHeight = 123, 277 llSetHoverHeight = 123,
278 llStopHover = 124, 278 llStopHover = 124,
279 llMinEventDelay = 125, 279 llMinEventDelay = 125,
280 llSoundPreload = 126, 280 llSoundPreload = 126,
281 llRotLookAt = 127, 281 llRotLookAt = 127,
282 llStringLength = 128, 282 llStringLength = 128,
283 llStartAnimation = 129, 283 llStartAnimation = 129,
284 llStopAnimation = 130, 284 llStopAnimation = 130,
285 llPointAt = 131, 285 llPointAt = 131,
286 llStopPointAt = 132, 286 llStopPointAt = 132,
287 llTargetOmega = 133, 287 llTargetOmega = 133,
288 llGetStartParameter = 134, 288 llGetStartParameter = 134,
289 llGodLikeRezObject = 135, 289 llGodLikeRezObject = 135,
290 llRequestPermissions = 136, 290 llRequestPermissions = 136,
291 llGetPermissionsKey = 137, 291 llGetPermissionsKey = 137,
292 llGetPermissions = 138, 292 llGetPermissions = 138,
293 llGetLinkNumber = 139, 293 llGetLinkNumber = 139,
294 llSetLinkColor = 140, 294 llSetLinkColor = 140,
295 llCreateLink = 141, 295 llCreateLink = 141,
296 llBreakLink = 142, 296 llBreakLink = 142,
297 llBreakAllLinks = 143, 297 llBreakAllLinks = 143,
298 llGetLinkKey = 144, 298 llGetLinkKey = 144,
299 llGetLinkName = 145, 299 llGetLinkName = 145,
300 llGetInventoryNumber = 146, 300 llGetInventoryNumber = 146,
301 llGetInventoryName = 147, 301 llGetInventoryName = 147,
302 llSetScriptState = 148, 302 llSetScriptState = 148,
303 llGetEnergy = 149, 303 llGetEnergy = 149,
304 llGiveInventory = 150, 304 llGiveInventory = 150,
305 llRemoveInventory = 151, 305 llRemoveInventory = 151,
306 llSetText = 152, 306 llSetText = 152,
307 llWater = 153, 307 llWater = 153,
308 llPassTouches = 154, 308 llPassTouches = 154,
309 llRequestAgentData = 155, 309 llRequestAgentData = 155,
310 llRequestInventoryData = 156, 310 llRequestInventoryData = 156,
311 llSetDamage = 157, 311 llSetDamage = 157,
312 llTeleportAgentHome = 158, 312 llTeleportAgentHome = 158,
313 llModifyLand = 159, 313 llModifyLand = 159,
314 llCollisionSound = 160, 314 llCollisionSound = 160,
315 llCollisionSprite = 161, 315 llCollisionSprite = 161,
316 llGetAnimation = 162, 316 llGetAnimation = 162,
317 llResetScript = 163, 317 llResetScript = 163,
318 llMessageLinked = 164, 318 llMessageLinked = 164,
319 llPushObject = 165, 319 llPushObject = 165,
320 llPassCollisions = 166, 320 llPassCollisions = 166,
321 llGetScriptName = 167, 321 llGetScriptName = 167,
322 llGetNumberOfSides = 168, 322 llGetNumberOfSides = 168,
323 llAxisAngle2Rot = 169, 323 llAxisAngle2Rot = 169,
324 llRot2Axis = 170, 324 llRot2Axis = 170,
325 llRot2Angle = 171, 325 llRot2Angle = 171,
326 llAcos = 172, 326 llAcos = 172,
327 llAsin = 173, 327 llAsin = 173,
328 llAngleBetween = 174, 328 llAngleBetween = 174,
329 llGetInventoryKey = 175, 329 llGetInventoryKey = 175,
330 llAllowInventoryDrop = 176, 330 llAllowInventoryDrop = 176,
331 llGetSunDirection = 177, 331 llGetSunDirection = 177,
332 llGetTextureOffset = 178, 332 llGetTextureOffset = 178,
333 llGetTextureScale = 179, 333 llGetTextureScale = 179,
334 llGetTextureRot = 180, 334 llGetTextureRot = 180,
335 llSubStringIndex = 181, 335 llSubStringIndex = 181,
336 llGetOwnerKey = 182, 336 llGetOwnerKey = 182,
337 llGetCenterOfMass = 183, 337 llGetCenterOfMass = 183,
338 llListSort = 184, 338 llListSort = 184,
339 llGetListLength = 185, 339 llGetListLength = 185,
340 llList2Integer = 186, 340 llList2Integer = 186,
341 llList2Float = 187, 341 llList2Float = 187,
342 llList2String = 188, 342 llList2String = 188,
343 llList2Key = 189, 343 llList2Key = 189,
344 llList2Vector = 190, 344 llList2Vector = 190,
345 llList2Rot = 191, 345 llList2Rot = 191,
346 llList2List = 192, 346 llList2List = 192,
347 llDeleteSubList = 193, 347 llDeleteSubList = 193,
348 llGetListEntryType = 194, 348 llGetListEntryType = 194,
349 llList2CSV = 195, 349 llList2CSV = 195,
350 llCSV2List = 196, 350 llCSV2List = 196,
351 llListRandomize = 197, 351 llListRandomize = 197,
352 llList2ListStrided = 198, 352 llList2ListStrided = 198,
353 llGetRegionCorner = 199, 353 llGetRegionCorner = 199,
354 llListInsertList = 200, 354 llListInsertList = 200,
355 llListFindList = 201, 355 llListFindList = 201,
356 llGetObjectName = 202, 356 llGetObjectName = 202,
357 llSetObjectName = 203, 357 llSetObjectName = 203,
358 llGetDate = 204, 358 llGetDate = 204,
359 llEdgeOfWorld = 205, 359 llEdgeOfWorld = 205,
360 llGetAgentInfo = 206, 360 llGetAgentInfo = 206,
361 llAdjustSoundVolume = 207, 361 llAdjustSoundVolume = 207,
362 llSetSoundQueueing = 208, 362 llSetSoundQueueing = 208,
363 llSetSoundRadius = 209, 363 llSetSoundRadius = 209,
364 llKey2Name = 210, 364 llKey2Name = 210,
365 llSetTextureAnim = 211, 365 llSetTextureAnim = 211,
366 llTriggerSoundLimited = 212, 366 llTriggerSoundLimited = 212,
367 llEjectFromLand = 213, 367 llEjectFromLand = 213,
368 llParseString2List = 214, 368 llParseString2List = 214,
369 llOverMyLand = 215, 369 llOverMyLand = 215,
370 llGetLandOwnerAt = 216, 370 llGetLandOwnerAt = 216,
371 llGetNotecardLine = 217, 371 llGetNotecardLine = 217,
372 llGetAgentSize = 218, 372 llGetAgentSize = 218,
373 llSameGroup = 219, 373 llSameGroup = 219,
374 llUnSit = 220, 374 llUnSit = 220,
375 llGroundSlope = 221, 375 llGroundSlope = 221,
376 llGroundNormal = 222, 376 llGroundNormal = 222,
377 llGroundContour = 223, 377 llGroundContour = 223,
378 llGetAttached = 224, 378 llGetAttached = 224,
379 llGetFreeMemory = 225, 379 llGetFreeMemory = 225,
380 llGetRegionName = 226, 380 llGetRegionName = 226,
381 llGetRegionTimeDilation = 227, 381 llGetRegionTimeDilation = 227,
382 llGetRegionFPS = 228, 382 llGetRegionFPS = 228,
383 llParticleSystem = 229, 383 llParticleSystem = 229,
384 llGroundRepel = 230, 384 llGroundRepel = 230,
385 llGiveInventoryList = 231, 385 llGiveInventoryList = 231,
386 llSetVehicleType = 232, 386 llSetVehicleType = 232,
387 llSetVehicleFloatParam = 233, 387 llSetVehicleFloatParam = 233,
388 llSetVehicleVectorParam = 234, 388 llSetVehicleVectorParam = 234,
389 llSetVehicleRotationParam = 235, 389 llSetVehicleRotationParam = 235,
390 llSetVehicleFlags = 236, 390 llSetVehicleFlags = 236,
391 llRemoveVehicleFlags = 237, 391 llRemoveVehicleFlags = 237,
392 llSitTarget = 238, 392 llSitTarget = 238,
393 llAvatarOnSitTarget = 239, 393 llAvatarOnSitTarget = 239,
394 llAddToLandPassList = 240, 394 llAddToLandPassList = 240,
395 llSetTouchText = 241, 395 llSetTouchText = 241,
396 llSetSitText = 242, 396 llSetSitText = 242,
397 llSetCameraEyeOffset = 243, 397 llSetCameraEyeOffset = 243,
398 llSetCameraAtOffset = 244, 398 llSetCameraAtOffset = 244,
399 llDumpList2String = 245, 399 llDumpList2String = 245,
400 llScriptDanger = 246, 400 llScriptDanger = 246,
401 llDialog = 247, 401 llDialog = 247,
402 llVolumeDetect = 248, 402 llVolumeDetect = 248,
403 llResetOtherScript = 249, 403 llResetOtherScript = 249,
404 llGetScriptState = 250, 404 llGetScriptState = 250,
405 llRemoteLoadScript = 251, 405 llRemoteLoadScript = 251,
406 llSetRemoteScriptAccessPin = 252, 406 llSetRemoteScriptAccessPin = 252,
407 llRemoteLoadScriptPin = 253, 407 llRemoteLoadScriptPin = 253,
408 llOpenRemoteDataChannel = 254, 408 llOpenRemoteDataChannel = 254,
409 llSendRemoteData = 255, 409 llSendRemoteData = 255,
410 llRemoteDataReply = 256, 410 llRemoteDataReply = 256,
411 llCloseRemoteDataChannel = 257, 411 llCloseRemoteDataChannel = 257,
412 llMD5String = 258, 412 llMD5String = 258,
413 llSetPrimitiveParams = 259, 413 llSetPrimitiveParams = 259,
414 llStringToBase64 = 260, 414 llStringToBase64 = 260,
415 llBase64ToString = 261, 415 llBase64ToString = 261,
416 llXorBase64Strings = 262, 416 llXorBase64Strings = 262,
417 llRemoteDataSetRegion = 263, 417 llRemoteDataSetRegion = 263,
418 llLog10 = 264, 418 llLog10 = 264,
419 llLog = 265, 419 llLog = 265,
420 llGetAnimationList = 266, 420 llGetAnimationList = 266,
421 llSetParcelMusicURL = 267, 421 llSetParcelMusicURL = 267,
422 llGetRootPosition = 268, 422 llGetRootPosition = 268,
423 llGetRootRotation = 269, 423 llGetRootRotation = 269,
424 llGetObjectDesc = 270, 424 llGetObjectDesc = 270,
425 llSetObjectDesc = 271, 425 llSetObjectDesc = 271,
426 llGetCreator = 272, 426 llGetCreator = 272,
427 llGetTimestamp = 273, 427 llGetTimestamp = 273,
428 llSetLinkAlpha = 274, 428 llSetLinkAlpha = 274,
429 llGetNumberOfPrims = 275, 429 llGetNumberOfPrims = 275,
430 llGetNumberOfNotecardLines = 276, 430 llGetNumberOfNotecardLines = 276,
431 llGetBoundingBox = 277, 431 llGetBoundingBox = 277,
432 llGetGeometricCenter = 278, 432 llGetGeometricCenter = 278,
433 llGetPrimitiveParams = 279, 433 llGetPrimitiveParams = 279,
434 llIntegerToBase64 = 280, 434 llIntegerToBase64 = 280,
435 llBase64ToInteger = 281, 435 llBase64ToInteger = 281,
436 llGetGMTclock = 282, 436 llGetGMTclock = 282,
437 llGetSimulatorHostname = 283, 437 llGetSimulatorHostname = 283,
438 llSetLocalRot = 284, 438 llSetLocalRot = 284,
439 llParseStringKeepNulls = 285, 439 llParseStringKeepNulls = 285,
440 llRezAtRoot = 286, 440 llRezAtRoot = 286,
441 llGetObjectPermMask = 287, 441 llGetObjectPermMask = 287,
442 llSetObjectPermMask = 288, 442 llSetObjectPermMask = 288,
443 llGetInventoryPermMask = 289, 443 llGetInventoryPermMask = 289,
444 llSetInventoryPermMask = 290, 444 llSetInventoryPermMask = 290,
445 llGetInventoryCreator = 291, 445 llGetInventoryCreator = 291,
446 llOwnerSay = 292, 446 llOwnerSay = 292,
447 llRequestSimulatorData = 293, 447 llRequestSimulatorData = 293,
448 llForceMouselook = 294, 448 llForceMouselook = 294,
449 llGetObjectMass = 295, 449 llGetObjectMass = 295,
450 llListReplaceList = 296, 450 llListReplaceList = 296,
451 llLoadURL = 297, 451 llLoadURL = 297,
452 llParcelMediaCommandList = 298, 452 llParcelMediaCommandList = 298,
453 llParcelMediaQuery = 299, 453 llParcelMediaQuery = 299,
454 llModPow = 300, 454 llModPow = 300,
455 llGetInventoryType = 301, 455 llGetInventoryType = 301,
456 llSetPayPrice = 302, 456 llSetPayPrice = 302,
457 llGetCameraPos = 303, 457 llGetCameraPos = 303,
458 llGetCameraRot = 304, 458 llGetCameraRot = 304,
459 llSetPrimURL = 305, 459 llSetPrimURL = 305,
460 llRefreshPrimURL = 306, 460 llRefreshPrimURL = 306,
461 llEscapeURL = 307, 461 llEscapeURL = 307,
462 llUnescapeURL = 308, 462 llUnescapeURL = 308,
463 llMapDestination = 309, 463 llMapDestination = 309,
464 llAddToLandBanList = 310, 464 llAddToLandBanList = 310,
465 llRemoveFromLandPassList = 311, 465 llRemoveFromLandPassList = 311,
466 llRemoveFromLandBanList = 312, 466 llRemoveFromLandBanList = 312,
467 llSetCameraParams = 313, 467 llSetCameraParams = 313,
468 llClearCameraParams = 314, 468 llClearCameraParams = 314,
469 llListStatistics = 315, 469 llListStatistics = 315,
470 llGetUnixTime = 316, 470 llGetUnixTime = 316,
471 llGetParcelFlags = 317, 471 llGetParcelFlags = 317,
472 llGetRegionFlags = 318, 472 llGetRegionFlags = 318,
473 llXorBase64StringsCorrect = 319, 473 llXorBase64StringsCorrect = 319,
474 llHTTPRequest = 320, 474 llHTTPRequest = 320,
475 llResetLandBanList = 321, 475 llResetLandBanList = 321,
476 llResetLandPassList = 322, 476 llResetLandPassList = 322,
477 llGetParcelPrimCount = 323, 477 llGetParcelPrimCount = 323,
478 llGetParcelPrimOwners = 324, 478 llGetParcelPrimOwners = 324,
479 llGetObjectPrimCount = 325, 479 llGetObjectPrimCount = 325,
480 llGetParcelMaxPrims = 326, 480 llGetParcelMaxPrims = 326,
481 llGetParcelDetails = 327 481 llGetParcelDetails = 327
482 } 482 }
483 483
484 } 484 }
485} 485}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Parser.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Parser.cs
index 2da1189..ebe4465 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Parser.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Parser.cs
@@ -1,608 +1,608 @@
1 using System; 1 using System;
2 using System.Collections.Generic; 2 using System.Collections.Generic;
3 using System.Text; 3 using System.Text;
4 using System.IO; 4 using System.IO;
5 using System.Reflection; 5 using System.Reflection;
6 using System.Reflection.Emit; 6 using System.Reflection.Emit;
7using OpenSim.Region.Scripting; 7using OpenSim.Region.Scripting;
8 8
9 namespace OpenSim.ScriptEngines.LSL 9 namespace OpenSim.ScriptEngines.LSL
10 { 10 {
11 class LSO_Parser 11 class LSO_Parser
12 { 12 {
13 private bool Debug = true; 13 private bool Debug = true;
14 private FileStream fs; 14 private FileStream fs;
15 private BinaryReader br; 15 private BinaryReader br;
16 private LSO_Struct.Header myHeader; 16 private LSO_Struct.Header myHeader;
17 17
18 private TypeBuilder typeBuilder; 18 private TypeBuilder typeBuilder;
19 private ScriptInfo WorldAPI; 19 private ScriptInfo WorldAPI;
20 20
21 /// <summary> 21 /// <summary>
22 /// Parse LSO file. 22 /// Parse LSO file.
23 /// Reads LSO ByteCode into memory structures. 23 /// Reads LSO ByteCode into memory structures.
24 /// TODO: What else does it do? 24 /// TODO: What else does it do?
25 /// </summary> 25 /// </summary>
26 /// <param name="FileName">FileName of LSO ByteCode file</param> 26 /// <param name="FileName">FileName of LSO ByteCode file</param>
27 public void ParseFile(string FileName, ScriptInfo _WorldAPI, ref TypeBuilder _typeBuilder) 27 public void ParseFile(string FileName, ScriptInfo _WorldAPI, ref TypeBuilder _typeBuilder)
28 { 28 {
29 typeBuilder = _typeBuilder; 29 typeBuilder = _typeBuilder;
30 WorldAPI = _WorldAPI; 30 WorldAPI = _WorldAPI;
31 // Open 31 // Open
32 SendToDebug("Opening filename: " + FileName); 32 SendToDebug("Opening filename: " + FileName);
33 fs = File.Open(FileName, FileMode.Open, FileAccess.Read, FileShare.Read); 33 fs = File.Open(FileName, FileMode.Open, FileAccess.Read, FileShare.Read);
34 br = new BinaryReader(fs, Encoding.BigEndianUnicode); 34 br = new BinaryReader(fs, Encoding.BigEndianUnicode);
35 35
36 36
37 // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack. 37 // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack.
38 38
39 39
40 // HEADER BLOCK 40 // HEADER BLOCK
41 SendToDebug("Reading HEADER BLOCK at: 0"); 41 SendToDebug("Reading HEADER BLOCK at: 0");
42 fs.Seek(0, SeekOrigin.Begin); 42 fs.Seek(0, SeekOrigin.Begin);
43 myHeader = new LSO_Struct.Header(); 43 myHeader = new LSO_Struct.Header();
44 myHeader.TM = BitConverter.ToUInt32(br_read(4), 0); 44 myHeader.TM = BitConverter.ToUInt32(br_read(4), 0);
45 myHeader.IP = BitConverter.ToUInt32(br_read(4), 0); 45 myHeader.IP = BitConverter.ToUInt32(br_read(4), 0);
46 myHeader.VN = BitConverter.ToUInt32(br_read(4), 0); 46 myHeader.VN = BitConverter.ToUInt32(br_read(4), 0);
47 myHeader.BP = BitConverter.ToUInt32(br_read(4), 0); 47 myHeader.BP = BitConverter.ToUInt32(br_read(4), 0);
48 myHeader.SP = BitConverter.ToUInt32(br_read(4), 0); 48 myHeader.SP = BitConverter.ToUInt32(br_read(4), 0);
49 myHeader.HR = BitConverter.ToUInt32(br_read(4), 0); 49 myHeader.HR = BitConverter.ToUInt32(br_read(4), 0);
50 myHeader.HP = BitConverter.ToUInt32(br_read(4), 0); 50 myHeader.HP = BitConverter.ToUInt32(br_read(4), 0);
51 myHeader.CS = BitConverter.ToUInt32(br_read(4), 0); 51 myHeader.CS = BitConverter.ToUInt32(br_read(4), 0);
52 myHeader.NS = BitConverter.ToUInt32(br_read(4), 0); 52 myHeader.NS = BitConverter.ToUInt32(br_read(4), 0);
53 myHeader.CE = BitConverter.ToUInt32(br_read(4), 0); 53 myHeader.CE = BitConverter.ToUInt32(br_read(4), 0);
54 myHeader.IE = BitConverter.ToUInt32(br_read(4), 0); 54 myHeader.IE = BitConverter.ToUInt32(br_read(4), 0);
55 myHeader.ER = BitConverter.ToUInt32(br_read(4), 0); 55 myHeader.ER = BitConverter.ToUInt32(br_read(4), 0);
56 myHeader.FR = BitConverter.ToUInt32(br_read(4), 0); 56 myHeader.FR = BitConverter.ToUInt32(br_read(4), 0);
57 myHeader.SLR = BitConverter.ToUInt32(br_read(4), 0); 57 myHeader.SLR = BitConverter.ToUInt32(br_read(4), 0);
58 myHeader.GVR = BitConverter.ToUInt32(br_read(4), 0); 58 myHeader.GVR = BitConverter.ToUInt32(br_read(4), 0);
59 myHeader.GFR = BitConverter.ToUInt32(br_read(4), 0); 59 myHeader.GFR = BitConverter.ToUInt32(br_read(4), 0);
60 myHeader.PR = BitConverter.ToUInt32(br_read(4), 0); 60 myHeader.PR = BitConverter.ToUInt32(br_read(4), 0);
61 myHeader.ESR = BitConverter.ToUInt32(br_read(4), 0); 61 myHeader.ESR = BitConverter.ToUInt32(br_read(4), 0);
62 myHeader.SR = BitConverter.ToUInt32(br_read(4), 0); 62 myHeader.SR = BitConverter.ToUInt32(br_read(4), 0);
63 myHeader.NCE = BitConverter.ToUInt64(br_read(8), 0); 63 myHeader.NCE = BitConverter.ToUInt64(br_read(8), 0);
64 myHeader.NIE = BitConverter.ToUInt64(br_read(8), 0); 64 myHeader.NIE = BitConverter.ToUInt64(br_read(8), 0);
65 myHeader.NER = BitConverter.ToUInt64(br_read(8), 0); 65 myHeader.NER = BitConverter.ToUInt64(br_read(8), 0);
66 66
67 // Print Header Block to debug 67 // Print Header Block to debug
68 SendToDebug("TM - Top of memory (size): " + myHeader.TM); 68 SendToDebug("TM - Top of memory (size): " + myHeader.TM);
69 SendToDebug("IP - Instruction Pointer (0=not running): " + myHeader.IP); 69 SendToDebug("IP - Instruction Pointer (0=not running): " + myHeader.IP);
70 SendToDebug("VN - Version number: " + myHeader.VN); 70 SendToDebug("VN - Version number: " + myHeader.VN);
71 SendToDebug("BP - Local Frame Pointer: " + myHeader.BP); 71 SendToDebug("BP - Local Frame Pointer: " + myHeader.BP);
72 SendToDebug("SP - Stack Pointer: " + myHeader.SP); 72 SendToDebug("SP - Stack Pointer: " + myHeader.SP);
73 SendToDebug("HR - Heap Register: " + myHeader.HR); 73 SendToDebug("HR - Heap Register: " + myHeader.HR);
74 SendToDebug("HP - Heap Pointer: " + myHeader.HP); 74 SendToDebug("HP - Heap Pointer: " + myHeader.HP);
75 SendToDebug("CS - Current State: " + myHeader.CS); 75 SendToDebug("CS - Current State: " + myHeader.CS);
76 SendToDebug("NS - Next State: " + myHeader.NS); 76 SendToDebug("NS - Next State: " + myHeader.NS);
77 SendToDebug("CE - Current Events: " + myHeader.CE); 77 SendToDebug("CE - Current Events: " + myHeader.CE);
78 SendToDebug("IE - In Event: " + myHeader.IE); 78 SendToDebug("IE - In Event: " + myHeader.IE);
79 SendToDebug("ER - Event Register: " + myHeader.ER); 79 SendToDebug("ER - Event Register: " + myHeader.ER);
80 SendToDebug("FR - Fault Register: " + myHeader.FR); 80 SendToDebug("FR - Fault Register: " + myHeader.FR);
81 SendToDebug("SLR - Sleep Register: " + myHeader.SLR); 81 SendToDebug("SLR - Sleep Register: " + myHeader.SLR);
82 SendToDebug("GVR - Global Variable Register: " + myHeader.GVR); 82 SendToDebug("GVR - Global Variable Register: " + myHeader.GVR);
83 SendToDebug("GFR - Global Function Register: " + myHeader.GFR); 83 SendToDebug("GFR - Global Function Register: " + myHeader.GFR);
84 SendToDebug("PR - Parameter Register: " + myHeader.PR); 84 SendToDebug("PR - Parameter Register: " + myHeader.PR);
85 SendToDebug("ESR - Energy Supply Register: " + myHeader.ESR); 85 SendToDebug("ESR - Energy Supply Register: " + myHeader.ESR);
86 SendToDebug("SR - State Register: " + myHeader.SR); 86 SendToDebug("SR - State Register: " + myHeader.SR);
87 SendToDebug("NCE - 64-bit Current Events: " + myHeader.NCE); 87 SendToDebug("NCE - 64-bit Current Events: " + myHeader.NCE);
88 SendToDebug("NIE - 64-bit In Events: " + myHeader.NIE); 88 SendToDebug("NIE - 64-bit In Events: " + myHeader.NIE);
89 SendToDebug("NER - 64-bit Event Register: " + myHeader.NER); 89 SendToDebug("NER - 64-bit Event Register: " + myHeader.NER);
90 SendToDebug("Read position when exiting HEADER BLOCK: " + fs.Position); 90 SendToDebug("Read position when exiting HEADER BLOCK: " + fs.Position);
91 91
92 // STATIC BLOCK 92 // STATIC BLOCK
93 SendToDebug("Reading STATIC BLOCK at: " + myHeader.GVR); 93 SendToDebug("Reading STATIC BLOCK at: " + myHeader.GVR);
94 fs.Seek(myHeader.GVR, SeekOrigin.Begin); 94 fs.Seek(myHeader.GVR, SeekOrigin.Begin);
95 int StaticBlockCount = 0; 95 int StaticBlockCount = 0;
96 // Read function blocks until we hit GFR 96 // Read function blocks until we hit GFR
97 while (fs.Position < myHeader.GFR) 97 while (fs.Position < myHeader.GFR)
98 { 98 {
99 StaticBlockCount++; 99 StaticBlockCount++;
100 SendToDebug("Reading Static Block " + StaticBlockCount + " at: " + fs.Position); 100 SendToDebug("Reading Static Block " + StaticBlockCount + " at: " + fs.Position);
101 //fs.Seek(myHeader.GVR, SeekOrigin.Begin); 101 //fs.Seek(myHeader.GVR, SeekOrigin.Begin);
102 LSO_Struct.StaticBlock myStaticBlock = new LSO_Struct.StaticBlock(); 102 LSO_Struct.StaticBlock myStaticBlock = new LSO_Struct.StaticBlock();
103 myStaticBlock.Static_Chunk_Header_Size = BitConverter.ToUInt32(br_read(4), 0); 103 myStaticBlock.Static_Chunk_Header_Size = BitConverter.ToUInt32(br_read(4), 0);
104 myStaticBlock.ObjectType = br_read(1)[0]; 104 myStaticBlock.ObjectType = br_read(1)[0];
105 SendToDebug("Static Block ObjectType: " + ((LSO_Enums.Variable_Type_Codes)myStaticBlock.ObjectType).ToString()); 105 SendToDebug("Static Block ObjectType: " + ((LSO_Enums.Variable_Type_Codes)myStaticBlock.ObjectType).ToString());
106 myStaticBlock.Unknown = br_read(1)[0]; 106 myStaticBlock.Unknown = br_read(1)[0];
107 // Size of datatype varies 107 // Size of datatype varies
108 if (myStaticBlock.ObjectType != 0) 108 if (myStaticBlock.ObjectType != 0)
109 myStaticBlock.BlockVariable = br_read(getObjectSize(myStaticBlock.ObjectType)); 109 myStaticBlock.BlockVariable = br_read(getObjectSize(myStaticBlock.ObjectType));
110 } 110 }
111 SendToDebug("Number of Static Blocks read: " + StaticBlockCount); 111 SendToDebug("Number of Static Blocks read: " + StaticBlockCount);
112 112
113 113
114 // FUNCTION BLOCK 114 // FUNCTION BLOCK
115 // Always right after STATIC BLOCK 115 // Always right after STATIC BLOCK
116 LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock(); 116 LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock();
117 if (myHeader.GFR == myHeader.SR) 117 if (myHeader.GFR == myHeader.SR)
118 { 118 {
119 // If GFR and SR are at same position then there is no fuction block 119 // If GFR and SR are at same position then there is no fuction block
120 SendToDebug("No FUNCTION BLOCK found"); 120 SendToDebug("No FUNCTION BLOCK found");
121 } else { 121 } else {
122 SendToDebug("Reading FUNCTION BLOCK at: " + myHeader.GFR); 122 SendToDebug("Reading FUNCTION BLOCK at: " + myHeader.GFR);
123 fs.Seek(myHeader.GFR, SeekOrigin.Begin); 123 fs.Seek(myHeader.GFR, SeekOrigin.Begin);
124 myFunctionBlock.FunctionCount = BitConverter.ToUInt32(br_read(4), 0); 124 myFunctionBlock.FunctionCount = BitConverter.ToUInt32(br_read(4), 0);
125 SendToDebug("Number of functions in Fuction Block: " + myFunctionBlock.FunctionCount); 125 SendToDebug("Number of functions in Fuction Block: " + myFunctionBlock.FunctionCount);
126 if (myFunctionBlock.FunctionCount > 0) 126 if (myFunctionBlock.FunctionCount > 0)
127 { 127 {
128 myFunctionBlock.CodeChunkPointer = new UInt32[myFunctionBlock.FunctionCount]; 128 myFunctionBlock.CodeChunkPointer = new UInt32[myFunctionBlock.FunctionCount];
129 for (int i = 0; i < myFunctionBlock.FunctionCount; i++) 129 for (int i = 0; i < myFunctionBlock.FunctionCount; i++)
130 { 130 {
131 SendToDebug("Reading function " + i + " at: " + fs.Position); 131 SendToDebug("Reading function " + i + " at: " + fs.Position);
132 // TODO: ADD TO FUNCTION LIST (How do we identify it later?) 132 // TODO: ADD TO FUNCTION LIST (How do we identify it later?)
133 // Note! Absolute position 133 // Note! Absolute position
134 myFunctionBlock.CodeChunkPointer[i] = BitConverter.ToUInt32(br_read(4), 0) + myHeader.GFR; 134 myFunctionBlock.CodeChunkPointer[i] = BitConverter.ToUInt32(br_read(4), 0) + myHeader.GFR;
135 SendToDebug("Fuction " + i + " code chunk position: " + myFunctionBlock.CodeChunkPointer[i]); 135 SendToDebug("Fuction " + i + " code chunk position: " + myFunctionBlock.CodeChunkPointer[i]);
136 } 136 }
137 } 137 }
138 } 138 }
139 139
140 140
141 // STATE FRAME BLOCK 141 // STATE FRAME BLOCK
142 // Always right after FUNCTION BLOCK 142 // Always right after FUNCTION BLOCK
143 SendToDebug("Reading STATE BLOCK at: " + myHeader.SR); 143 SendToDebug("Reading STATE BLOCK at: " + myHeader.SR);
144 fs.Seek(myHeader.SR, SeekOrigin.Begin); 144 fs.Seek(myHeader.SR, SeekOrigin.Begin);
145 LSO_Struct.StateFrameBlock myStateFrameBlock = new LSO_Struct.StateFrameBlock(); 145 LSO_Struct.StateFrameBlock myStateFrameBlock = new LSO_Struct.StateFrameBlock();
146 myStateFrameBlock.StateCount = BitConverter.ToUInt32(br_read(4), 0); 146 myStateFrameBlock.StateCount = BitConverter.ToUInt32(br_read(4), 0);
147 if (myStateFrameBlock.StateCount > 0) 147 if (myStateFrameBlock.StateCount > 0)
148 { 148 {
149 // Initialize array 149 // Initialize array
150 myStateFrameBlock.StatePointer = new LSO_Struct.StatePointerBlock[myStateFrameBlock.StateCount]; 150 myStateFrameBlock.StatePointer = new LSO_Struct.StatePointerBlock[myStateFrameBlock.StateCount];
151 for (int i = 0; i < myStateFrameBlock.StateCount; i++) 151 for (int i = 0; i < myStateFrameBlock.StateCount; i++)
152 { 152 {
153 SendToDebug("Reading STATE POINTER BLOCK " + (i+1) + " at: " + fs.Position); 153 SendToDebug("Reading STATE POINTER BLOCK " + (i+1) + " at: " + fs.Position);
154 // Position is relative to state frame 154 // Position is relative to state frame
155 myStateFrameBlock.StatePointer[i].Location = myHeader.SR + BitConverter.ToUInt32(br_read(4), 0); 155 myStateFrameBlock.StatePointer[i].Location = myHeader.SR + BitConverter.ToUInt32(br_read(4), 0);
156 myStateFrameBlock.StatePointer[i].EventMask = new System.Collections.BitArray(br_read(8)); 156 myStateFrameBlock.StatePointer[i].EventMask = new System.Collections.BitArray(br_read(8));
157 SendToDebug("Pointer: " + myStateFrameBlock.StatePointer[i].Location); 157 SendToDebug("Pointer: " + myStateFrameBlock.StatePointer[i].Location);
158 SendToDebug("Total potential EventMask bits: " + myStateFrameBlock.StatePointer[i].EventMask.Count); 158 SendToDebug("Total potential EventMask bits: " + myStateFrameBlock.StatePointer[i].EventMask.Count);
159 159
160 //// Read STATE BLOCK 160 //// Read STATE BLOCK
161 //long CurPos = fs.Position; 161 //long CurPos = fs.Position;
162 //fs.Seek(CurPos, SeekOrigin.Begin); 162 //fs.Seek(CurPos, SeekOrigin.Begin);
163 163
164 } 164 }
165 } 165 }
166 166
167 167
168 // STATE BLOCK 168 // STATE BLOCK
169 // For each StateFrameBlock there is one StateBlock with multiple event handlers 169 // For each StateFrameBlock there is one StateBlock with multiple event handlers
170 170
171 if (myStateFrameBlock.StateCount > 0) 171 if (myStateFrameBlock.StateCount > 0)
172 { 172 {
173 // Go through all State Frame Pointers found 173 // Go through all State Frame Pointers found
174 for (int i = 0; i < myStateFrameBlock.StateCount; i++) 174 for (int i = 0; i < myStateFrameBlock.StateCount; i++)
175 { 175 {
176 176
177 fs.Seek(myStateFrameBlock.StatePointer[i].Location, SeekOrigin.Begin); 177 fs.Seek(myStateFrameBlock.StatePointer[i].Location, SeekOrigin.Begin);
178 SendToDebug("Reading STATE BLOCK " + (i + 1) + " at: " + fs.Position); 178 SendToDebug("Reading STATE BLOCK " + (i + 1) + " at: " + fs.Position);
179 179
180 // READ: STATE BLOCK HEADER 180 // READ: STATE BLOCK HEADER
181 myStateFrameBlock.StatePointer[i].StateBlock = new LSO_Struct.StateBlock(); 181 myStateFrameBlock.StatePointer[i].StateBlock = new LSO_Struct.StateBlock();
182 myStateFrameBlock.StatePointer[i].StateBlock.StartPos = (UInt32)fs.Position; // Note 182 myStateFrameBlock.StatePointer[i].StateBlock.StartPos = (UInt32)fs.Position; // Note
183 myStateFrameBlock.StatePointer[i].StateBlock.HeaderSize = BitConverter.ToUInt32(br_read(4), 0); 183 myStateFrameBlock.StatePointer[i].StateBlock.HeaderSize = BitConverter.ToUInt32(br_read(4), 0);
184 myStateFrameBlock.StatePointer[i].StateBlock.Unknown = br_read(1)[0]; 184 myStateFrameBlock.StatePointer[i].StateBlock.Unknown = br_read(1)[0];
185 myStateFrameBlock.StatePointer[i].StateBlock.EndPos = (UInt32)fs.Position; // Note 185 myStateFrameBlock.StatePointer[i].StateBlock.EndPos = (UInt32)fs.Position; // Note
186 SendToDebug("State block Start Pos: " + myStateFrameBlock.StatePointer[i].StateBlock.StartPos); 186 SendToDebug("State block Start Pos: " + myStateFrameBlock.StatePointer[i].StateBlock.StartPos);
187 SendToDebug("State block Header Size: " + myStateFrameBlock.StatePointer[i].StateBlock.HeaderSize); 187 SendToDebug("State block Header Size: " + myStateFrameBlock.StatePointer[i].StateBlock.HeaderSize);
188 SendToDebug("State block Header End Pos: " + myStateFrameBlock.StatePointer[i].StateBlock.EndPos); 188 SendToDebug("State block Header End Pos: " + myStateFrameBlock.StatePointer[i].StateBlock.EndPos);
189 189
190 // We need to count number of bits flagged in EventMask? 190 // We need to count number of bits flagged in EventMask?
191 191
192 192
193 // for each bit in myStateFrameBlock.StatePointer[i].EventMask 193 // for each bit in myStateFrameBlock.StatePointer[i].EventMask
194 194
195 // ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE 195 // ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE
196 //TODO: Create event hooks 196 //TODO: Create event hooks
197 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers = new LSO_Struct.StateBlockHandler[myStateFrameBlock.StatePointer[i].EventMask.Count - 1]; 197 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers = new LSO_Struct.StateBlockHandler[myStateFrameBlock.StatePointer[i].EventMask.Count - 1];
198 for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) 198 for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++)
199 { 199 {
200 200
201 if (myStateFrameBlock.StatePointer[i].EventMask.Get(ii) == true) 201 if (myStateFrameBlock.StatePointer[i].EventMask.Get(ii) == true)
202 { 202 {
203 // We got an event 203 // We got an event
204 // READ: STATE BLOCK HANDLER 204 // READ: STATE BLOCK HANDLER
205 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER matching EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") at: " + fs.Position); 205 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER matching EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") at: " + fs.Position);
206 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer = myStateFrameBlock.StatePointer[i].StateBlock.EndPos + BitConverter.ToUInt32(br_read(4), 0); 206 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer = myStateFrameBlock.StatePointer[i].StateBlock.EndPos + BitConverter.ToUInt32(br_read(4), 0);
207 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CallFrameSize = BitConverter.ToUInt32(br_read(4), 0); 207 myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CallFrameSize = BitConverter.ToUInt32(br_read(4), 0);
208 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") Code Chunk Pointer: " + myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer); 208 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") Code Chunk Pointer: " + myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer);
209 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") Call Frame Size: " + myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CallFrameSize ); 209 SendToDebug("Reading STATE BLOCK " + (i + 1) + " HANDLER EVENT MASK " + ii + " (" + ((LSO_Enums.Event_Mask_Values)ii).ToString() + ") Call Frame Size: " + myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CallFrameSize );
210 } 210 }
211 } 211 }
212 } 212 }
213 } 213 }
214 214
215 215
216 216
217 217
218 //// READ FUNCTION CODE CHUNKS 218 //// READ FUNCTION CODE CHUNKS
219 //// Functions + Function start pos (GFR) 219 //// Functions + Function start pos (GFR)
220 //// TODO: Somehow be able to identify and reference this 220 //// TODO: Somehow be able to identify and reference this
221 //LSO_Struct.CodeChunk[] myFunctionCodeChunk; 221 //LSO_Struct.CodeChunk[] myFunctionCodeChunk;
222 //if (myFunctionBlock.FunctionCount > 0) 222 //if (myFunctionBlock.FunctionCount > 0)
223 //{ 223 //{
224 // myFunctionCodeChunk = new LSO_Struct.CodeChunk[myFunctionBlock.FunctionCount]; 224 // myFunctionCodeChunk = new LSO_Struct.CodeChunk[myFunctionBlock.FunctionCount];
225 // for (int i = 0; i < myFunctionBlock.FunctionCount; i++) 225 // for (int i = 0; i < myFunctionBlock.FunctionCount; i++)
226 // { 226 // {
227 // SendToDebug("Reading Function Code Chunk " + i); 227 // SendToDebug("Reading Function Code Chunk " + i);
228 // myFunctionCodeChunk[i] = GetCodeChunk((UInt32)myFunctionBlock.CodeChunkPointer[i]); 228 // myFunctionCodeChunk[i] = GetCodeChunk((UInt32)myFunctionBlock.CodeChunkPointer[i]);
229 // } 229 // }
230 230
231 //} 231 //}
232 // READ EVENT CODE CHUNKS 232 // READ EVENT CODE CHUNKS
233 LSO_Struct.CodeChunk[] myEventCodeChunk; 233 LSO_Struct.CodeChunk[] myEventCodeChunk;
234 if (myStateFrameBlock.StateCount > 0) 234 if (myStateFrameBlock.StateCount > 0)
235 { 235 {
236 myEventCodeChunk = new LSO_Struct.CodeChunk[myStateFrameBlock.StateCount]; 236 myEventCodeChunk = new LSO_Struct.CodeChunk[myStateFrameBlock.StateCount];
237 for (int i = 0; i < myStateFrameBlock.StateCount; i++) 237 for (int i = 0; i < myStateFrameBlock.StateCount; i++)
238 { 238 {
239 // TODO: Somehow organize events and functions so they can be found again, 239 // TODO: Somehow organize events and functions so they can be found again,
240 // two level search ain't no good 240 // two level search ain't no good
241 for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++) 241 for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++)
242 { 242 {
243 243
244 244
245 if (myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer > 0) 245 if (myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer > 0)
246 { 246 {
247 SendToDebug("Reading Event Code Chunk state " + i + ", event " + (LSO_Enums.Event_Mask_Values)ii); 247 SendToDebug("Reading Event Code Chunk state " + i + ", event " + (LSO_Enums.Event_Mask_Values)ii);
248 248
249 249
250 // Override a Method / Function 250 // Override a Method / Function
251 string eventname = "event_" + (LSO_Enums.Event_Mask_Values)ii; 251 string eventname = "event_" + (LSO_Enums.Event_Mask_Values)ii;
252 SendToDebug("CLR:" + eventname + ":MethodBuilder methodBuilder = typeBuilder.DefineMethod..."); 252 SendToDebug("CLR:" + eventname + ":MethodBuilder methodBuilder = typeBuilder.DefineMethod...");
253 MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname, 253 MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname,
254 MethodAttributes.Private | MethodAttributes.Virtual, 254 MethodAttributes.Private | MethodAttributes.Virtual,
255 typeof(void), 255 typeof(void),
256 new Type[] { typeof(object) }); 256 new Type[] { typeof(object) });
257 257
258 SendToDebug("CLR:" + eventname + ":typeBuilder.DefineMethodOverride(methodBuilder..."); 258 SendToDebug("CLR:" + eventname + ":typeBuilder.DefineMethodOverride(methodBuilder...");
259 typeBuilder.DefineMethodOverride(methodBuilder, 259 typeBuilder.DefineMethodOverride(methodBuilder,
260 typeof(LSL_CLRInterface.LSLScript).GetMethod(eventname)); 260 typeof(LSL_CLRInterface.LSLScript).GetMethod(eventname));
261 261
262 // Create the IL generator 262 // Create the IL generator
263 263
264 SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();"); 264 SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();");
265 ILGenerator il = methodBuilder.GetILGenerator(); 265 ILGenerator il = methodBuilder.GetILGenerator();
266 266
267 267
268 LSO_Struct.CodeChunk myECC = 268 LSO_Struct.CodeChunk myECC =
269 GetCodeChunk(myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer, il, eventname); 269 GetCodeChunk(myStateFrameBlock.StatePointer[i].StateBlock.StateBlockHandlers[ii].CodeChunkPointer, il, eventname);
270 } 270 }
271 271
272 } 272 }
273 } 273 }
274 274
275 } 275 }
276 276
277 277
278 // Close 278 // Close
279 br.Close(); 279 br.Close();
280 fs.Close(); 280 fs.Close();
281 281
282 } 282 }
283 283
284 private LSO_Struct.HeapBlock GetHeap(UInt32 pos) 284 private LSO_Struct.HeapBlock GetHeap(UInt32 pos)
285 { 285 {
286 // HEAP BLOCK 286 // HEAP BLOCK
287 // TODO:? Special read for strings/keys (null terminated) and lists (pointers to other HEAP entries) 287 // TODO:? Special read for strings/keys (null terminated) and lists (pointers to other HEAP entries)
288 SendToDebug("Reading HEAP BLOCK at: " + pos); 288 SendToDebug("Reading HEAP BLOCK at: " + pos);
289 fs.Seek(pos, SeekOrigin.Begin); 289 fs.Seek(pos, SeekOrigin.Begin);
290 290
291 LSO_Struct.HeapBlock myHeapBlock = new LSO_Struct.HeapBlock(); 291 LSO_Struct.HeapBlock myHeapBlock = new LSO_Struct.HeapBlock();
292 myHeapBlock.DataBlockSize = BitConverter.ToUInt32(br_read(4), 0); 292 myHeapBlock.DataBlockSize = BitConverter.ToUInt32(br_read(4), 0);
293 myHeapBlock.ObjectType = br_read(1)[0]; 293 myHeapBlock.ObjectType = br_read(1)[0];
294 myHeapBlock.ReferenceCount = BitConverter.ToUInt16(br_read(2), 0); 294 myHeapBlock.ReferenceCount = BitConverter.ToUInt16(br_read(2), 0);
295 myHeapBlock.Data = br_read(getObjectSize(myHeapBlock.ObjectType)); 295 myHeapBlock.Data = br_read(getObjectSize(myHeapBlock.ObjectType));
296 296
297 SendToDebug("Heap Block Data Block Size: " + myHeapBlock.DataBlockSize); 297 SendToDebug("Heap Block Data Block Size: " + myHeapBlock.DataBlockSize);
298 SendToDebug("Heap Block ObjectType: " + ((LSO_Enums.Variable_Type_Codes)myHeapBlock.ObjectType).ToString()); 298 SendToDebug("Heap Block ObjectType: " + ((LSO_Enums.Variable_Type_Codes)myHeapBlock.ObjectType).ToString());
299 SendToDebug("Heap Block Reference Count: " + myHeapBlock.ReferenceCount); 299 SendToDebug("Heap Block Reference Count: " + myHeapBlock.ReferenceCount);
300 300
301 return myHeapBlock; 301 return myHeapBlock;
302 } 302 }
303 303
304 304
305 305
306 private byte[] br_read(int len) 306 private byte[] br_read(int len)
307 { 307 {
308 if (len <= 0) 308 if (len <= 0)
309 return null; 309 return null;
310 310
311 try 311 try
312 { 312 {
313 byte[] bytes = new byte[len]; 313 byte[] bytes = new byte[len];
314 for (int i = len - 1; i > -1; i--) 314 for (int i = len - 1; i > -1; i--)
315 bytes[i] = br.ReadByte(); 315 bytes[i] = br.ReadByte();
316 return bytes; 316 return bytes;
317 } 317 }
318 catch (Exception e) 318 catch (Exception e)
319 { 319 {
320 SendToDebug("Exception: " + e.ToString()); 320 SendToDebug("Exception: " + e.ToString());
321 throw (e); 321 throw (e);
322 } 322 }
323 } 323 }
324 //private byte[] br_read_smallendian(int len) 324 //private byte[] br_read_smallendian(int len)
325 //{ 325 //{
326 // byte[] bytes = new byte[len]; 326 // byte[] bytes = new byte[len];
327 // br.Read(bytes,0, len); 327 // br.Read(bytes,0, len);
328 // return bytes; 328 // return bytes;
329 //} 329 //}
330 330
331 private int getObjectSize(byte ObjectType) 331 private int getObjectSize(byte ObjectType)
332 { 332 {
333 switch (ObjectType) 333 switch (ObjectType)
334 { 334 {
335 case 1: 335 case 1:
336 case 2: 336 case 2:
337 case 3: 337 case 3:
338 case 4: 338 case 4:
339 case 7: 339 case 7:
340 return 4; 340 return 4;
341 case 5: 341 case 5:
342 return 12; 342 return 12;
343 case 6: 343 case 6:
344 return 16; 344 return 16;
345 default: 345 default:
346 return 0; 346 return 0;
347 } 347 }
348 } 348 }
349 private void SendToDebug(string Message) 349 private void SendToDebug(string Message)
350 { 350 {
351 if (Debug == true) 351 if (Debug == true)
352 Console.WriteLine("Debug: " + Message); 352 Console.WriteLine("Debug: " + Message);
353 } 353 }
354 354
355 355
356 private string Read_String() 356 private string Read_String()
357 { 357 {
358 string ret = ""; 358 string ret = "";
359 byte reader = br_read(1)[0]; 359 byte reader = br_read(1)[0];
360 while (reader != 0x000) 360 while (reader != 0x000)
361 { 361 {
362 ret += (char)reader; 362 ret += (char)reader;
363 reader = br_read(1)[0]; 363 reader = br_read(1)[0];
364 } 364 }
365 return ret; 365 return ret;
366 } 366 }
367 367
368 /// <summary> 368 /// <summary>
369 /// Reads a code chunk into structure and returns it. 369 /// Reads a code chunk into structure and returns it.
370 /// </summary> 370 /// </summary>
371 /// <param name="pos">Absolute position in file. REMEMBER TO ADD myHeader.GFR!</param> 371 /// <param name="pos">Absolute position in file. REMEMBER TO ADD myHeader.GFR!</param>
372 /// <returns></returns> 372 /// <returns></returns>
373 private LSO_Struct.CodeChunk GetCodeChunk(UInt32 pos, ILGenerator il, string eventname) 373 private LSO_Struct.CodeChunk GetCodeChunk(UInt32 pos, ILGenerator il, string eventname)
374 { 374 {
375 375
376 /* 376 /*
377 * CLR TRY 377 * CLR TRY
378 */ 378 */
379 //SendToDebug("CLR:" + eventname + ":il.BeginExceptionBlock()"); 379 //SendToDebug("CLR:" + eventname + ":il.BeginExceptionBlock()");
380 il.BeginExceptionBlock(); 380 il.BeginExceptionBlock();
381 381
382 // Push "Hello World!" string to stack 382 // Push "Hello World!" string to stack
383 //SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Ldstr..."); 383 //SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Ldstr...");
384 il.Emit(OpCodes.Ldstr, "Starting CLR dynamic execution of: " + eventname); 384 il.Emit(OpCodes.Ldstr, "Starting CLR dynamic execution of: " + eventname);
385 385
386 // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!"); 386 // Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!");
387 //SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); 387 //SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call...");
388 il.Emit(OpCodes.Call, typeof(Console).GetMethod 388 il.Emit(OpCodes.Call, typeof(Console).GetMethod
389 ("WriteLine", new Type[] { typeof(string) })); 389 ("WriteLine", new Type[] { typeof(string) }));
390 390
391 391
392 LSO_Struct.CodeChunk myCodeChunk = new LSO_Struct.CodeChunk(); 392 LSO_Struct.CodeChunk myCodeChunk = new LSO_Struct.CodeChunk();
393 393
394 SendToDebug("Reading Function Code Chunk at: " + pos); 394 SendToDebug("Reading Function Code Chunk at: " + pos);
395 fs.Seek(pos, SeekOrigin.Begin); 395 fs.Seek(pos, SeekOrigin.Begin);
396 myCodeChunk.CodeChunkHeaderSize = BitConverter.ToUInt32(br_read(4), 0); 396 myCodeChunk.CodeChunkHeaderSize = BitConverter.ToUInt32(br_read(4), 0);
397 SendToDebug("CodeChunk Header Size: " + myCodeChunk.CodeChunkHeaderSize ); 397 SendToDebug("CodeChunk Header Size: " + myCodeChunk.CodeChunkHeaderSize );
398 // Read until null 398 // Read until null
399 myCodeChunk.Comment = Read_String(); 399 myCodeChunk.Comment = Read_String();
400 SendToDebug("Function comment: " + myCodeChunk.Comment); 400 SendToDebug("Function comment: " + myCodeChunk.Comment);
401 myCodeChunk.ReturnType = br_read(1)[0]; 401 myCodeChunk.ReturnType = br_read(1)[0];
402 SendToDebug("Return type: " + (LSO_Enums.Variable_Type_Codes)myCodeChunk.ReturnType); 402 SendToDebug("Return type: " + (LSO_Enums.Variable_Type_Codes)myCodeChunk.ReturnType);
403 // TODO: How to determine number of codechunks -- does this method work? 403 // TODO: How to determine number of codechunks -- does this method work?
404 myCodeChunk.CodeChunkArguments = new System.Collections.Generic.List<LSO_Struct.CodeChunkArgument>(); 404 myCodeChunk.CodeChunkArguments = new System.Collections.Generic.List<LSO_Struct.CodeChunkArgument>();
405 byte reader = br_read(1)[0]; 405 byte reader = br_read(1)[0];
406 reader = br_read(1)[0]; 406 reader = br_read(1)[0];
407 int ccount = 0; 407 int ccount = 0;
408 while (reader != 0x000) 408 while (reader != 0x000)
409 { 409 {
410 ccount++; 410 ccount++;
411 SendToDebug("Reading Code Chunk Argument " + ccount); 411 SendToDebug("Reading Code Chunk Argument " + ccount);
412 LSO_Struct.CodeChunkArgument CCA = new LSO_Struct.CodeChunkArgument(); 412 LSO_Struct.CodeChunkArgument CCA = new LSO_Struct.CodeChunkArgument();
413 CCA.FunctionReturnType = reader; 413 CCA.FunctionReturnType = reader;
414 reader = br_read(1)[0]; 414 reader = br_read(1)[0];
415 CCA.NullString = reader; 415 CCA.NullString = reader;
416 myCodeChunk.CodeChunkArguments.Add(CCA); 416 myCodeChunk.CodeChunkArguments.Add(CCA);
417 SendToDebug("Code Chunk Argument " + ccount + " return type: " + (LSO_Enums.Variable_Type_Codes)CCA.FunctionReturnType); 417 SendToDebug("Code Chunk Argument " + ccount + " return type: " + (LSO_Enums.Variable_Type_Codes)CCA.FunctionReturnType);
418 } 418 }
419 // End marker is 0x000 419 // End marker is 0x000
420 myCodeChunk.EndMarker = reader; 420 myCodeChunk.EndMarker = reader;
421 // TODO: How to read and identify following code 421 // TODO: How to read and identify following code
422 // TODO: Code is read until a return of some sort is found 422 // TODO: Code is read until a return of some sort is found
423 bool FoundRet = false; 423 bool FoundRet = false;
424 while (FoundRet == false) 424 while (FoundRet == false)
425 { 425 {
426 //reader = br_read(1)[0]; 426 //reader = br_read(1)[0];
427 //UInt16 opcode = BitConverter.ToUInt16(br_read(1),0); 427 //UInt16 opcode = BitConverter.ToUInt16(br_read(1),0);
428 UInt16 opcode = br_read(1)[0]; 428 UInt16 opcode = br_read(1)[0];
429 //long rPos = fs.Position; 429 //long rPos = fs.Position;
430 SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString()); 430 SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString());
431 switch (opcode) 431 switch (opcode)
432 { 432 {
433 // LONG 433 // LONG
434 case (UInt16)LSO_Enums.Operation_Table.POPARG: 434 case (UInt16)LSO_Enums.Operation_Table.POPARG:
435 case (UInt16)LSO_Enums.Operation_Table.STORE: 435 case (UInt16)LSO_Enums.Operation_Table.STORE:
436 case (UInt16)LSO_Enums.Operation_Table.STORES: 436 case (UInt16)LSO_Enums.Operation_Table.STORES:
437 case (UInt16)LSO_Enums.Operation_Table.STOREL: 437 case (UInt16)LSO_Enums.Operation_Table.STOREL:
438 case (UInt16)LSO_Enums.Operation_Table.STOREV: 438 case (UInt16)LSO_Enums.Operation_Table.STOREV:
439 case (UInt16)LSO_Enums.Operation_Table.STOREQ: 439 case (UInt16)LSO_Enums.Operation_Table.STOREQ:
440 case (UInt16)LSO_Enums.Operation_Table.STOREG: 440 case (UInt16)LSO_Enums.Operation_Table.STOREG:
441 case (UInt16)LSO_Enums.Operation_Table.STOREGS: 441 case (UInt16)LSO_Enums.Operation_Table.STOREGS:
442 case (UInt16)LSO_Enums.Operation_Table.STOREGL: 442 case (UInt16)LSO_Enums.Operation_Table.STOREGL:
443 case (UInt16)LSO_Enums.Operation_Table.STOREGV: 443 case (UInt16)LSO_Enums.Operation_Table.STOREGV:
444 case (UInt16)LSO_Enums.Operation_Table.STOREGQ: 444 case (UInt16)LSO_Enums.Operation_Table.STOREGQ:
445 case (UInt16)LSO_Enums.Operation_Table.LOADP: 445 case (UInt16)LSO_Enums.Operation_Table.LOADP:
446 case (UInt16)LSO_Enums.Operation_Table.LOADSP: 446 case (UInt16)LSO_Enums.Operation_Table.LOADSP:
447 case (UInt16)LSO_Enums.Operation_Table.LOADLP: 447 case (UInt16)LSO_Enums.Operation_Table.LOADLP:
448 case (UInt16)LSO_Enums.Operation_Table.LOADVP: 448 case (UInt16)LSO_Enums.Operation_Table.LOADVP:
449 case (UInt16)LSO_Enums.Operation_Table.LOADQP: 449 case (UInt16)LSO_Enums.Operation_Table.LOADQP:
450 case (UInt16)LSO_Enums.Operation_Table.PUSH: 450 case (UInt16)LSO_Enums.Operation_Table.PUSH:
451 case (UInt16)LSO_Enums.Operation_Table.PUSHS: 451 case (UInt16)LSO_Enums.Operation_Table.PUSHS:
452 case (UInt16)LSO_Enums.Operation_Table.PUSHL: 452 case (UInt16)LSO_Enums.Operation_Table.PUSHL:
453 case (UInt16)LSO_Enums.Operation_Table.PUSHV: 453 case (UInt16)LSO_Enums.Operation_Table.PUSHV:
454 case (UInt16)LSO_Enums.Operation_Table.PUSHQ: 454 case (UInt16)LSO_Enums.Operation_Table.PUSHQ:
455 case (UInt16)LSO_Enums.Operation_Table.PUSHG: 455 case (UInt16)LSO_Enums.Operation_Table.PUSHG:
456 case (UInt16)LSO_Enums.Operation_Table.PUSHGS: 456 case (UInt16)LSO_Enums.Operation_Table.PUSHGS:
457 case (UInt16)LSO_Enums.Operation_Table.PUSHGL: 457 case (UInt16)LSO_Enums.Operation_Table.PUSHGL:
458 case (UInt16)LSO_Enums.Operation_Table.PUSHGV: 458 case (UInt16)LSO_Enums.Operation_Table.PUSHGV:
459 case (UInt16)LSO_Enums.Operation_Table.PUSHGQ: 459 case (UInt16)LSO_Enums.Operation_Table.PUSHGQ:
460 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 460 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
461 break; 461 break;
462 // BYTE 462 // BYTE
463 case (UInt16)LSO_Enums.Operation_Table.PUSHARGB: 463 case (UInt16)LSO_Enums.Operation_Table.PUSHARGB:
464 SendToDebug("Param1: " + br_read(1)[0]); 464 SendToDebug("Param1: " + br_read(1)[0]);
465 break; 465 break;
466 // INTEGER 466 // INTEGER
467 case (UInt16)LSO_Enums.Operation_Table.PUSHARGI: 467 case (UInt16)LSO_Enums.Operation_Table.PUSHARGI:
468 // TODO: What is size of integer? 468 // TODO: What is size of integer?
469 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 469 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
470 break; 470 break;
471 // FLOAT 471 // FLOAT
472 case (UInt16)LSO_Enums.Operation_Table.PUSHARGF: 472 case (UInt16)LSO_Enums.Operation_Table.PUSHARGF:
473 // TODO: What is size of float? 473 // TODO: What is size of float?
474 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 474 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
475 break; 475 break;
476 // STRING 476 // STRING
477 case (UInt16)LSO_Enums.Operation_Table.PUSHARGS: 477 case (UInt16)LSO_Enums.Operation_Table.PUSHARGS:
478 string s = Read_String(); 478 string s = Read_String();
479 SendToDebug("Param1: " + s); 479 SendToDebug("Param1: " + s);
480 il.Emit(OpCodes.Ldstr, s); 480 il.Emit(OpCodes.Ldstr, s);
481 break; 481 break;
482 // VECTOR z,y,x 482 // VECTOR z,y,x
483 case (UInt16)LSO_Enums.Operation_Table.PUSHARGV: 483 case (UInt16)LSO_Enums.Operation_Table.PUSHARGV:
484 SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4),0)); 484 SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4),0));
485 SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4),0)); 485 SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4),0));
486 SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4),0)); 486 SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4),0));
487 break; 487 break;
488 // ROTATION s,z,y,x 488 // ROTATION s,z,y,x
489 case (UInt16)LSO_Enums.Operation_Table.PUSHARGQ: 489 case (UInt16)LSO_Enums.Operation_Table.PUSHARGQ:
490 SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4),0)); 490 SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4),0));
491 SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4),0)); 491 SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4),0));
492 SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4),0)); 492 SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4),0));
493 SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4),0)); 493 SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4),0));
494 break; 494 break;
495 // LONG 495 // LONG
496 case (UInt16)LSO_Enums.Operation_Table.PUSHARGE: 496 case (UInt16)LSO_Enums.Operation_Table.PUSHARGE:
497 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 497 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
498 break; 498 break;
499 // BYTE 499 // BYTE
500 case (UInt16)LSO_Enums.Operation_Table.ADD: 500 case (UInt16)LSO_Enums.Operation_Table.ADD:
501 case (UInt16)LSO_Enums.Operation_Table.SUB: 501 case (UInt16)LSO_Enums.Operation_Table.SUB:
502 case (UInt16)LSO_Enums.Operation_Table.MUL: 502 case (UInt16)LSO_Enums.Operation_Table.MUL:
503 case (UInt16)LSO_Enums.Operation_Table.DIV: 503 case (UInt16)LSO_Enums.Operation_Table.DIV:
504 case (UInt16)LSO_Enums.Operation_Table.MOD: 504 case (UInt16)LSO_Enums.Operation_Table.MOD:
505 case (UInt16)LSO_Enums.Operation_Table.EQ: 505 case (UInt16)LSO_Enums.Operation_Table.EQ:
506 case (UInt16)LSO_Enums.Operation_Table.NEQ: 506 case (UInt16)LSO_Enums.Operation_Table.NEQ:
507 case (UInt16)LSO_Enums.Operation_Table.LEQ: 507 case (UInt16)LSO_Enums.Operation_Table.LEQ:
508 case (UInt16)LSO_Enums.Operation_Table.GEQ: 508 case (UInt16)LSO_Enums.Operation_Table.GEQ:
509 case (UInt16)LSO_Enums.Operation_Table.LESS: 509 case (UInt16)LSO_Enums.Operation_Table.LESS:
510 case (UInt16)LSO_Enums.Operation_Table.GREATER: 510 case (UInt16)LSO_Enums.Operation_Table.GREATER:
511 case (UInt16)LSO_Enums.Operation_Table.BOOLOR: 511 case (UInt16)LSO_Enums.Operation_Table.BOOLOR:
512 SendToDebug("Param1: " + br_read(1)[0]); 512 SendToDebug("Param1: " + br_read(1)[0]);
513 break; 513 break;
514 // LONG 514 // LONG
515 case (UInt16)LSO_Enums.Operation_Table.JUMP: 515 case (UInt16)LSO_Enums.Operation_Table.JUMP:
516 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 516 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
517 break; 517 break;
518 // BYTE, LONG 518 // BYTE, LONG
519 case (UInt16)LSO_Enums.Operation_Table.JUMPIF: 519 case (UInt16)LSO_Enums.Operation_Table.JUMPIF:
520 case (UInt16)LSO_Enums.Operation_Table.JUMPNIF: 520 case (UInt16)LSO_Enums.Operation_Table.JUMPNIF:
521 SendToDebug("Param1: " + br_read(1)[0]); 521 SendToDebug("Param1: " + br_read(1)[0]);
522 SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4),0)); 522 SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4),0));
523 break; 523 break;
524 // LONG 524 // LONG
525 case (UInt16)LSO_Enums.Operation_Table.STATE: 525 case (UInt16)LSO_Enums.Operation_Table.STATE:
526 case (UInt16)LSO_Enums.Operation_Table.CALL: 526 case (UInt16)LSO_Enums.Operation_Table.CALL:
527 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 527 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
528 break; 528 break;
529 // BYTE 529 // BYTE
530 case (UInt16)LSO_Enums.Operation_Table.CAST: 530 case (UInt16)LSO_Enums.Operation_Table.CAST:
531 SendToDebug("Param1: " + br_read(1)[0]); 531 SendToDebug("Param1: " + br_read(1)[0]);
532 break; 532 break;
533 // LONG 533 // LONG
534 case (UInt16)LSO_Enums.Operation_Table.STACKTOS: 534 case (UInt16)LSO_Enums.Operation_Table.STACKTOS:
535 case (UInt16)LSO_Enums.Operation_Table.STACKTOL: 535 case (UInt16)LSO_Enums.Operation_Table.STACKTOL:
536 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0)); 536 SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4),0));
537 break; 537 break;
538 // BYTE 538 // BYTE
539 case (UInt16)LSO_Enums.Operation_Table.PRINT: 539 case (UInt16)LSO_Enums.Operation_Table.PRINT:
540 case (UInt16)LSO_Enums.Operation_Table.CALLLIB: 540 case (UInt16)LSO_Enums.Operation_Table.CALLLIB:
541 SendToDebug("Param1: " + br_read(1)[0]); 541 SendToDebug("Param1: " + br_read(1)[0]);
542 break; 542 break;
543 // SHORT 543 // SHORT
544 case (UInt16)LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE: 544 case (UInt16)LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE:
545 // TODO: What is size of short? 545 // TODO: What is size of short?
546 UInt16 _i = BitConverter.ToUInt16(br_read(2), 0); 546 UInt16 _i = BitConverter.ToUInt16(br_read(2), 0);
547 SendToDebug("Param1: " + _i); 547 SendToDebug("Param1: " + _i);
548 switch (_i) 548 switch (_i)
549 { 549 {
550 case (UInt16)LSO_Enums.BuiltIn_Functions.llSay: 550 case (UInt16)LSO_Enums.BuiltIn_Functions.llSay:
551 il.Emit(OpCodes.Call, typeof(Console).GetMethod 551 il.Emit(OpCodes.Call, typeof(Console).GetMethod
552 ("WriteLine", new Type[] { typeof(string) })); 552 ("WriteLine", new Type[] { typeof(string) }));
553 break; 553 break;
554 } 554 }
555 break; 555 break;
556 556
557 557
558 // RETURN 558 // RETURN
559 case (UInt16)LSO_Enums.Operation_Table.RETURN: 559 case (UInt16)LSO_Enums.Operation_Table.RETURN:
560 SendToDebug("Last OPCODE was return command. Code chunk execution complete."); 560 SendToDebug("Last OPCODE was return command. Code chunk execution complete.");
561 FoundRet = true; 561 FoundRet = true;
562 break; 562 break;
563 } 563 }
564 //fs.Seek(rPos, SeekOrigin.Begin); 564 //fs.Seek(rPos, SeekOrigin.Begin);
565 565
566 } 566 }
567 567
568 568
569 /* 569 /*
570 * CATCH 570 * CATCH
571 */ 571 */
572 SendToDebug("CLR:" + eventname + ":il.BeginCatchBlock(typeof(Exception));"); 572 SendToDebug("CLR:" + eventname + ":il.BeginCatchBlock(typeof(Exception));");
573 il.BeginCatchBlock(typeof(Exception)); 573 il.BeginCatchBlock(typeof(Exception));
574 574
575 // Push "Hello World!" string to stack 575 // Push "Hello World!" string to stack
576 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Ldstr..."); 576 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Ldstr...");
577 il.Emit(OpCodes.Ldstr, "Execption executing dynamic CLR function " + eventname + ": "); 577 il.Emit(OpCodes.Ldstr, "Execption executing dynamic CLR function " + eventname + ": ");
578 578
579 //call void [mscorlib]System.Console::WriteLine(string) 579 //call void [mscorlib]System.Console::WriteLine(string)
580 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); 580 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call...");
581 il.Emit(OpCodes.Call, typeof(Console).GetMethod 581 il.Emit(OpCodes.Call, typeof(Console).GetMethod
582 ("Write", new Type[] { typeof(string) })); 582 ("Write", new Type[] { typeof(string) }));
583 583
584 //callvirt instance string [mscorlib]System.Exception::get_Message() 584 //callvirt instance string [mscorlib]System.Exception::get_Message()
585 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Callvirt..."); 585 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Callvirt...");
586 il.Emit(OpCodes.Callvirt, typeof(Exception).GetMethod 586 il.Emit(OpCodes.Callvirt, typeof(Exception).GetMethod
587 ("get_Message")); 587 ("get_Message"));
588 588
589 //call void [mscorlib]System.Console::WriteLine(string) 589 //call void [mscorlib]System.Console::WriteLine(string)
590 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call..."); 590 SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call...");
591 il.Emit(OpCodes.Call, typeof(Console).GetMethod 591 il.Emit(OpCodes.Call, typeof(Console).GetMethod
592 ("WriteLine", new Type[] { typeof(string) })); 592 ("WriteLine", new Type[] { typeof(string) }));
593 593
594 /* 594 /*
595 * CLR END TRY 595 * CLR END TRY
596 */ 596 */
597 //SendToDebug("CLR:" + eventname + ":il.EndExceptionBlock();"); 597 //SendToDebug("CLR:" + eventname + ":il.EndExceptionBlock();");
598 il.EndExceptionBlock(); 598 il.EndExceptionBlock();
599 // Push "Return from current method, with return value if present" to stack 599 // Push "Return from current method, with return value if present" to stack
600 il.Emit(OpCodes.Ret); 600 il.Emit(OpCodes.Ret);
601 601
602 602
603 603
604 return myCodeChunk; 604 return myCodeChunk;
605 605
606 } 606 }
607 } 607 }
608} 608}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Struct.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Struct.cs
index 3b91e9f..66c6c5e 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Struct.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/LSLEngine/LSLHandler/LSO_Struct.cs
@@ -1,105 +1,105 @@
1 1
2using System; 2using System;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Text; 4using System.Text;
5 5
6namespace OpenSim.ScriptEngines.LSL 6namespace OpenSim.ScriptEngines.LSL
7{ 7{
8 static class LSO_Struct 8 static class LSO_Struct
9 { 9 {
10 10
11 public struct Header 11 public struct Header
12 { 12 {
13 public UInt32 TM; 13 public UInt32 TM;
14 public UInt32 IP; 14 public UInt32 IP;
15 public UInt32 VN; 15 public UInt32 VN;
16 public UInt32 BP; 16 public UInt32 BP;
17 public UInt32 SP; 17 public UInt32 SP;
18 public UInt32 HR; 18 public UInt32 HR;
19 public UInt32 HP; 19 public UInt32 HP;
20 public UInt32 CS; 20 public UInt32 CS;
21 public UInt32 NS; 21 public UInt32 NS;
22 public UInt32 CE; 22 public UInt32 CE;
23 public UInt32 IE; 23 public UInt32 IE;
24 public UInt32 ER; 24 public UInt32 ER;
25 public UInt32 FR; 25 public UInt32 FR;
26 public UInt32 SLR; 26 public UInt32 SLR;
27 public UInt32 GVR; 27 public UInt32 GVR;
28 public UInt32 GFR; 28 public UInt32 GFR;
29 public UInt32 PR; 29 public UInt32 PR;
30 public UInt32 ESR; 30 public UInt32 ESR;
31 public UInt32 SR; 31 public UInt32 SR;
32 public UInt64 NCE; 32 public UInt64 NCE;
33 public UInt64 NIE; 33 public UInt64 NIE;
34 public UInt64 NER; 34 public UInt64 NER;
35 } 35 }
36 36
37 public struct StaticBlock 37 public struct StaticBlock
38 { 38 {
39 public UInt32 Static_Chunk_Header_Size; 39 public UInt32 Static_Chunk_Header_Size;
40 public byte ObjectType; 40 public byte ObjectType;
41 public byte Unknown; 41 public byte Unknown;
42 public byte[] BlockVariable; 42 public byte[] BlockVariable;
43 } 43 }
44 /* Not actually a structure 44 /* Not actually a structure
45 public struct StaticBlockVariable 45 public struct StaticBlockVariable
46 { 46 {
47 public UInt32 Integer1; 47 public UInt32 Integer1;
48 public UInt32 Float1; 48 public UInt32 Float1;
49 public UInt32 HeapPointer_String; 49 public UInt32 HeapPointer_String;
50 public UInt32 HeapPointer_Key; 50 public UInt32 HeapPointer_Key;
51 public byte[] Vector_12; 51 public byte[] Vector_12;
52 public byte[] Rotation_16; 52 public byte[] Rotation_16;
53 public UInt32 Pointer_List_Structure; 53 public UInt32 Pointer_List_Structure;
54 } */ 54 } */
55 public struct HeapBlock 55 public struct HeapBlock
56 { 56 {
57 public UInt32 DataBlockSize; 57 public UInt32 DataBlockSize;
58 public byte ObjectType; 58 public byte ObjectType;
59 public UInt16 ReferenceCount; 59 public UInt16 ReferenceCount;
60 public byte[] Data; 60 public byte[] Data;
61 } 61 }
62 public struct StateFrameBlock 62 public struct StateFrameBlock
63 { 63 {
64 public UInt32 StateCount; 64 public UInt32 StateCount;
65 public StatePointerBlock[] StatePointer; 65 public StatePointerBlock[] StatePointer;
66 } 66 }
67 public struct StatePointerBlock 67 public struct StatePointerBlock
68 { 68 {
69 public UInt32 Location; 69 public UInt32 Location;
70 public System.Collections.BitArray EventMask; 70 public System.Collections.BitArray EventMask;
71 public StateBlock StateBlock; 71 public StateBlock StateBlock;
72 } 72 }
73 public struct StateBlock 73 public struct StateBlock
74 { 74 {
75 public UInt32 StartPos; 75 public UInt32 StartPos;
76 public UInt32 EndPos; 76 public UInt32 EndPos;
77 public UInt32 HeaderSize; 77 public UInt32 HeaderSize;
78 public byte Unknown; 78 public byte Unknown;
79 public StateBlockHandler[] StateBlockHandlers; 79 public StateBlockHandler[] StateBlockHandlers;
80 } 80 }
81 public struct StateBlockHandler 81 public struct StateBlockHandler
82 { 82 {
83 public UInt32 CodeChunkPointer; 83 public UInt32 CodeChunkPointer;
84 public UInt32 CallFrameSize; 84 public UInt32 CallFrameSize;
85 } 85 }
86 public struct FunctionBlock 86 public struct FunctionBlock
87 { 87 {
88 public UInt32 FunctionCount; 88 public UInt32 FunctionCount;
89 public UInt32[] CodeChunkPointer; 89 public UInt32[] CodeChunkPointer;
90 } 90 }
91 public struct CodeChunk 91 public struct CodeChunk
92 { 92 {
93 public UInt32 CodeChunkHeaderSize; 93 public UInt32 CodeChunkHeaderSize;
94 public string Comment; 94 public string Comment;
95 public System.Collections.Generic.List<CodeChunkArgument> CodeChunkArguments; 95 public System.Collections.Generic.List<CodeChunkArgument> CodeChunkArguments;
96 public byte EndMarker; 96 public byte EndMarker;
97 public byte ReturnType; 97 public byte ReturnType;
98 } 98 }
99 public struct CodeChunkArgument 99 public struct CodeChunkArgument
100 { 100 {
101 public byte FunctionReturnType; 101 public byte FunctionReturnType;
102 public byte NullString; 102 public byte NullString;
103 } 103 }
104 } 104 }
105} 105}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
index 99d7d04..40825c0 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Script.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
@@ -1,64 +1,64 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using OpenSim.Region.Environment.Scenes; 28using OpenSim.Region.Environment.Scenes;
29 29
30namespace OpenSim.Region.Scripting 30namespace OpenSim.Region.Scripting
31{ 31{
32 public interface IScript 32 public interface IScript
33 { 33 {
34 void Initialise(ScriptInfo scriptInfo); 34 void Initialise(ScriptInfo scriptInfo);
35 string getName(); 35 string getName();
36 } 36 }
37 37
38 public class TestScript : IScript 38 public class TestScript : IScript
39 { 39 {
40 ScriptInfo script; 40 ScriptInfo script;
41 41
42 public string getName() 42 public string getName()
43 { 43 {
44 return "TestScript 0.1"; 44 return "TestScript 0.1";
45 } 45 }
46 46
47 public void Initialise(ScriptInfo scriptInfo) 47 public void Initialise(ScriptInfo scriptInfo)
48 { 48 {
49 script = scriptInfo; 49 script = scriptInfo;
50 script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame); 50 script.events.OnFrame += new EventManager.OnFrameDelegate(events_OnFrame);
51 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); 51 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
52 } 52 }
53 53
54 void events_OnNewPresence(ScenePresence presence) 54 void events_OnNewPresence(ScenePresence presence)
55 { 55 {
56 script.logger.Verbose("Hello " + presence.firstname.ToString() + "!"); 56 script.logger.Verbose("Hello " + presence.firstname.ToString() + "!");
57 } 57 }
58 58
59 void events_OnFrame() 59 void events_OnFrame()
60 { 60 {
61 //script.logger.Verbose("Hello World!"); 61 //script.logger.Verbose("Hello World!");
62 } 62 }
63 } 63 }
64} 64}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
index a8f6aa5..b4f6a05 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
@@ -1,32 +1,32 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using Key = libsecondlife.LLUUID; 4using Key = libsecondlife.LLUUID;
5using Rotation = libsecondlife.LLQuaternion; 5using Rotation = libsecondlife.LLQuaternion;
6using Vector = libsecondlife.LLVector3; 6using Vector = libsecondlife.LLVector3;
7using LSLList = System.Collections.Generic.List<string>; 7using LSLList = System.Collections.Generic.List<string>;
8 8
9 9
10using OpenSim.Region.Environment.Scenes; 10using OpenSim.Region.Environment.Scenes;
11 11
12namespace OpenSim.Region.Scripting 12namespace OpenSim.Region.Scripting
13{ 13{
14 // This class is to be used for engines which may not be able to access the Scene directly. 14 // This class is to be used for engines which may not be able to access the Scene directly.
15 // Scene access is preffered, but obviously not possible on some non-.NET languages. 15 // Scene access is preffered, but obviously not possible on some non-.NET languages.
16 public class ScriptAPI 16 public class ScriptAPI
17 { 17 {
18 Scene scene; 18 Scene scene;
19 ScriptInterpretedAPI interpretedAPI; 19 ScriptInterpretedAPI interpretedAPI;
20 20
21 public ScriptAPI(Scene world) 21 public ScriptAPI(Scene world)
22 { 22 {
23 scene = world; 23 scene = world;
24 interpretedAPI = new ScriptInterpretedAPI(); 24 interpretedAPI = new ScriptInterpretedAPI();
25 } 25 }
26 26
27 public Object CallMethod(String method, Object[] args) 27 public Object CallMethod(String method, Object[] args)
28 { 28 {
29 return null; 29 return null;
30 } 30 }
31 } 31 }
32} 32}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
index c3be22a..4a6086c 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
@@ -1,58 +1,58 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using OpenSim.Framework.Console; 28using OpenSim.Framework.Console;
29using OpenSim.Region.Environment.Scenes; 29using OpenSim.Region.Environment.Scenes;
30 30
31namespace OpenSim.Region.Scripting 31namespace OpenSim.Region.Scripting
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Class which provides access to the world 34 /// Class which provides access to the world
35 /// </summary> 35 /// </summary>
36 public class ScriptInfo 36 public class ScriptInfo
37 { 37 {
38 // Reference to world.eventsManager provided for convenience 38 // Reference to world.eventsManager provided for convenience
39 public EventManager events; 39 public EventManager events;
40 40
41 // The main world 41 // The main world
42 public Scene world; 42 public Scene world;
43 43
44 // The console 44 // The console
45 public LogBase logger; 45 public LogBase logger;
46 46
47 // API Access 47 // API Access
48 public ScriptAPI api; 48 public ScriptAPI api;
49 49
50 public ScriptInfo(Scene scene) 50 public ScriptInfo(Scene scene)
51 { 51 {
52 world = scene; 52 world = scene;
53 events = world.EventManager; 53 events = world.EventManager;
54 logger = MainLog.Instance; 54 logger = MainLog.Instance;
55 api = new ScriptAPI(scene); 55 api = new ScriptAPI(scene);
56 } 56 }
57 } 57 }
58} 58}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
index 085d97e..b4a6019 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs
@@ -1,206 +1,206 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using Key = libsecondlife.LLUUID; 4using Key = libsecondlife.LLUUID;
5using Rotation = libsecondlife.LLQuaternion; 5using Rotation = libsecondlife.LLQuaternion;
6using Vector = libsecondlife.LLVector3; 6using Vector = libsecondlife.LLVector3;
7using LSLList = System.Collections.Generic.List<string>; 7using LSLList = System.Collections.Generic.List<string>;
8 8
9using OpenSim.Region.Environment.Scenes; 9using OpenSim.Region.Environment.Scenes;
10 10
11namespace OpenSim.Region.Scripting 11namespace OpenSim.Region.Scripting
12{ 12{
13 /// <summary> 13 /// <summary>
14 /// A class inteded to act as an API for LSL-styled interpreted languages 14 /// A class inteded to act as an API for LSL-styled interpreted languages
15 /// </summary> 15 /// </summary>
16 /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> 16 /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks>
17 class ScriptInterpretedAPI 17 class ScriptInterpretedAPI
18 { 18 {
19 public int osAbs(int val) 19 public int osAbs(int val)
20 { 20 {
21 return Math.Abs(val); 21 return Math.Abs(val);
22 } 22 }
23 23
24 public float osAcos(float val) 24 public float osAcos(float val)
25 { 25 {
26 return (float)Math.Acos(val); 26 return (float)Math.Acos(val);
27 } 27 }
28 28
29 [Obsolete("Unimplemented")] 29 [Obsolete("Unimplemented")]
30 public void osAddToLandPassList(Key avatar, float hours) 30 public void osAddToLandPassList(Key avatar, float hours)
31 { 31 {
32 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); 32 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)");
33 return; 33 return;
34 } 34 }
35 35
36 [Obsolete("Unimplemented")] 36 [Obsolete("Unimplemented")]
37 public void osAdjustSoundVolume(float volume) 37 public void osAdjustSoundVolume(float volume)
38 { 38 {
39 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAdjustSoundVolume(float volume)"); 39 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAdjustSoundVolume(float volume)");
40 return; 40 return;
41 } 41 }
42 42
43 [Obsolete("Unimplemented")] 43 [Obsolete("Unimplemented")]
44 public void osAllowInventoryDrop(int add) 44 public void osAllowInventoryDrop(int add)
45 { 45 {
46 return; 46 return;
47 } 47 }
48 48
49 [Obsolete("Unimplemented")] 49 [Obsolete("Unimplemented")]
50 public float osAngleBetween(Rotation a, Rotation b) 50 public float osAngleBetween(Rotation a, Rotation b)
51 { 51 {
52 Axiom.Math.Quaternion axA = new Axiom.Math.Quaternion(a.W, a.X, a.Y, a.Z); 52 Axiom.Math.Quaternion axA = new Axiom.Math.Quaternion(a.W, a.X, a.Y, a.Z);
53 Axiom.Math.Quaternion axB = new Axiom.Math.Quaternion(b.W, b.X, b.Y, b.Z); 53 Axiom.Math.Quaternion axB = new Axiom.Math.Quaternion(b.W, b.X, b.Y, b.Z);
54 54
55 return 0; 55 return 0;
56 } 56 }
57 57
58 [Obsolete("Unimplemented")] 58 [Obsolete("Unimplemented")]
59 public void osApplyImpulse(Vector force, int local) 59 public void osApplyImpulse(Vector force, int local)
60 { 60 {
61 return; 61 return;
62 } 62 }
63 63
64 [Obsolete("Unimplemented")] 64 [Obsolete("Unimplemented")]
65 public void osApplyRotationalImpulse(Vector force, int local) 65 public void osApplyRotationalImpulse(Vector force, int local)
66 { 66 {
67 return; 67 return;
68 } 68 }
69 69
70 public float osAsin(float val) 70 public float osAsin(float val)
71 { 71 {
72 return (float)Math.Asin(val); 72 return (float)Math.Asin(val);
73 } 73 }
74 74
75 public float osAtan2(float x, float y) 75 public float osAtan2(float x, float y)
76 { 76 {
77 return (float)Math.Atan2(x, y); 77 return (float)Math.Atan2(x, y);
78 } 78 }
79 79
80 [Obsolete("Unimplemented")] 80 [Obsolete("Unimplemented")]
81 public void osAttachToAvatar(Key avatar, int attachmentPoint) 81 public void osAttachToAvatar(Key avatar, int attachmentPoint)
82 { 82 {
83 return; 83 return;
84 } 84 }
85 85
86 [Obsolete("Unimplemented")] 86 [Obsolete("Unimplemented")]
87 public Key osAvatarOnSitTarget() 87 public Key osAvatarOnSitTarget()
88 { 88 {
89 return Key.Zero; 89 return Key.Zero;
90 } 90 }
91 91
92 public Rotation osAxes2Rot(Vector fwd, Vector left, Vector up) 92 public Rotation osAxes2Rot(Vector fwd, Vector left, Vector up)
93 { 93 {
94 Axiom.Math.Quaternion axQ = new Axiom.Math.Quaternion(); 94 Axiom.Math.Quaternion axQ = new Axiom.Math.Quaternion();
95 Axiom.Math.Vector3 axFwd = new Axiom.Math.Vector3(fwd.X, fwd.Y, fwd.Z); 95 Axiom.Math.Vector3 axFwd = new Axiom.Math.Vector3(fwd.X, fwd.Y, fwd.Z);
96 Axiom.Math.Vector3 axLeft = new Axiom.Math.Vector3(left.X, left.Y, left.Z); 96 Axiom.Math.Vector3 axLeft = new Axiom.Math.Vector3(left.X, left.Y, left.Z);
97 Axiom.Math.Vector3 axUp = new Axiom.Math.Vector3(up.X, up.Y, up.Z); 97 Axiom.Math.Vector3 axUp = new Axiom.Math.Vector3(up.X, up.Y, up.Z);
98 98
99 axQ.FromAxes(axFwd, axLeft, axUp); 99 axQ.FromAxes(axFwd, axLeft, axUp);
100 100
101 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w); 101 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w);
102 } 102 }
103 103
104 public Rotation osAxisAngle2Rot(Vector axis, float angle) 104 public Rotation osAxisAngle2Rot(Vector axis, float angle)
105 { 105 {
106 Axiom.Math.Quaternion axQ = Axiom.Math.Quaternion.FromAngleAxis(angle, new Axiom.Math.Vector3(axis.X, axis.Y, axis.Z)); 106 Axiom.Math.Quaternion axQ = Axiom.Math.Quaternion.FromAngleAxis(angle, new Axiom.Math.Vector3(axis.X, axis.Y, axis.Z));
107 107
108 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w); 108 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w);
109 } 109 }
110 110
111 public string osBase64ToString(string str) 111 public string osBase64ToString(string str)
112 { 112 {
113 Encoding enc = System.Text.Encoding.UTF8; 113 Encoding enc = System.Text.Encoding.UTF8;
114 return enc.GetString(Convert.FromBase64String(str)); 114 return enc.GetString(Convert.FromBase64String(str));
115 } 115 }
116 116
117 [Obsolete("Unimplemented")] 117 [Obsolete("Unimplemented")]
118 public void osBreakAllLinks() 118 public void osBreakAllLinks()
119 { 119 {
120 return; 120 return;
121 } 121 }
122 122
123 [Obsolete("Unimplemented")] 123 [Obsolete("Unimplemented")]
124 public void osBreakLink() 124 public void osBreakLink()
125 { 125 {
126 return; 126 return;
127 } 127 }
128 128
129 public LSLList osCSV2List(string src) 129 public LSLList osCSV2List(string src)
130 { 130 {
131 LSLList retVal = new LSLList(); 131 LSLList retVal = new LSLList();
132 retVal.AddRange(src.Split(',')); 132 retVal.AddRange(src.Split(','));
133 133
134 return retVal; 134 return retVal;
135 } 135 }
136 136
137 public int osCeil(float val) 137 public int osCeil(float val)
138 { 138 {
139 return (int)Math.Ceiling(val); 139 return (int)Math.Ceiling(val);
140 } 140 }
141 141
142 [Obsolete("Unimplemented")] 142 [Obsolete("Unimplemented")]
143 public void osCloseRemoteDataChannel(Key channel) 143 public void osCloseRemoteDataChannel(Key channel)
144 { 144 {
145 return; 145 return;
146 } 146 }
147 147
148 [Obsolete("Unimplemented")] 148 [Obsolete("Unimplemented")]
149 public float osCloud(Vector offset) 149 public float osCloud(Vector offset)
150 { 150 {
151 return 0.0f; 151 return 0.0f;
152 } 152 }
153 153
154 [Obsolete("Unimplemented")] 154 [Obsolete("Unimplemented")]
155 public void osCollisionFilter(string name, Key id, int accept) 155 public void osCollisionFilter(string name, Key id, int accept)
156 { 156 {
157 return; 157 return;
158 } 158 }
159 159
160 [Obsolete("Unimplemented")] 160 [Obsolete("Unimplemented")]
161 public void osCollisionSprite(string impact_sprite) 161 public void osCollisionSprite(string impact_sprite)
162 { 162 {
163 return; 163 return;
164 } 164 }
165 165
166 public float osCos(float theta) 166 public float osCos(float theta)
167 { 167 {
168 return (float)Math.Cos(theta); 168 return (float)Math.Cos(theta);
169 } 169 }
170 170
171 [Obsolete("Unimplemented")] 171 [Obsolete("Unimplemented")]
172 public void osCreateLink(Key target, int parent) 172 public void osCreateLink(Key target, int parent)
173 { 173 {
174 return; 174 return;
175 } 175 }
176 176
177 [Obsolete("Partially Unimplemented")] 177 [Obsolete("Partially Unimplemented")]
178 public LSLList osDeleteSubList(LSLList src, int start, int end) 178 public LSLList osDeleteSubList(LSLList src, int start, int end)
179 { 179 {
180 if (start < 0 || end < 0) 180 if (start < 0 || end < 0)
181 { 181 {
182 throw new Exception("Unsupported at this time."); 182 throw new Exception("Unsupported at this time.");
183 } 183 }
184 184
185 src.RemoveRange(start, start - end + 1); 185 src.RemoveRange(start, start - end + 1);
186 return src; 186 return src;
187 } 187 }
188 188
189 [Obsolete("Partially Unimplemented")] 189 [Obsolete("Partially Unimplemented")]
190 public string osDeleteSubString(string src, int start, int end) 190 public string osDeleteSubString(string src, int start, int end)
191 { 191 {
192 if (start < 0 || end < 0) 192 if (start < 0 || end < 0)
193 { 193 {
194 throw new Exception("Unsupported at this time."); 194 throw new Exception("Unsupported at this time.");
195 } 195 }
196 196
197 return src.Remove(start, start - end + 1); 197 return src.Remove(start, start - end + 1);
198 } 198 }
199 199
200 [Obsolete("Unimplemented")] 200 [Obsolete("Unimplemented")]
201 public void osDetachFromAvatar(Key avatar) 201 public void osDetachFromAvatar(Key avatar)
202 { 202 {
203 return; 203 return;
204 } 204 }
205 } 205 }
206} 206}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedEvents.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedEvents.cs
index 7743186..d6456a6 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedEvents.cs
@@ -1,16 +1,16 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Region.Environment.Scenes; 4using OpenSim.Region.Environment.Scenes;
5using libsecondlife; 5using libsecondlife;
6using Key = libsecondlife.LLUUID; 6using Key = libsecondlife.LLUUID;
7 7
8namespace OpenSim.Region.Scripting 8namespace OpenSim.Region.Scripting
9{ 9{
10 10
11 public class ScriptInterpretedEvents 11 public class ScriptInterpretedEvents
12 { 12 {
13 public delegate void OnTouchStartDelegate(Key user); 13 public delegate void OnTouchStartDelegate(Key user);
14 public event OnTouchStartDelegate OnTouchStart; 14 public event OnTouchStartDelegate OnTouchStart;
15 } 15 }
16} 16}
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
index 7a08735..27e831b 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
@@ -1,107 +1,107 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
32namespace OpenSim.Region.Scripting 32namespace OpenSim.Region.Scripting
33{ 33{
34 public class ScriptManager 34 public class ScriptManager
35 { 35 {
36 List<IScript> scripts = new List<IScript>(); 36 List<IScript> scripts = new List<IScript>();
37 Scene scene; 37 Scene scene;
38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); 38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>();
39 39
40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) 40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts)
41 { 41 {
42 foreach (KeyValuePair<string, IScript> script in compiledscripts) 42 foreach (KeyValuePair<string, IScript> script in compiledscripts)
43 { 43 {
44 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. 44 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
45 MainLog.Instance.Verbose("Loading " + script.Key); 45 MainLog.Instance.Verbose("Loading " + script.Key);
46 script.Value.Initialise(scriptInfo); 46 script.Value.Initialise(scriptInfo);
47 scripts.Add(script.Value); 47 scripts.Add(script.Value);
48 } 48 }
49 MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); 49 MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)");
50 } 50 }
51 51
52 public ScriptManager(Scene world) 52 public ScriptManager(Scene world)
53 { 53 {
54 scene = world; 54 scene = world;
55 55
56 // Default Engines 56 // Default Engines
57 CSharpScriptEngine csharpCompiler = new CSharpScriptEngine(); 57 CSharpScriptEngine csharpCompiler = new CSharpScriptEngine();
58 compilers.Add(csharpCompiler.FileExt(),csharpCompiler); 58 compilers.Add(csharpCompiler.FileExt(),csharpCompiler);
59 59
60 JScriptEngine jscriptCompiler = new JScriptEngine(); 60 JScriptEngine jscriptCompiler = new JScriptEngine();
61 compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); 61 compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler);
62 62
63 JavaEngine javaCompiler = new JavaEngine(); 63 JavaEngine javaCompiler = new JavaEngine();
64 compilers.Add(javaCompiler.FileExt(), javaCompiler); 64 compilers.Add(javaCompiler.FileExt(), javaCompiler);
65 } 65 }
66 66
67 public void Compile(string filename) 67 public void Compile(string filename)
68 { 68 {
69 foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers) 69 foreach (KeyValuePair<string, IScriptCompiler> compiler in compilers)
70 { 70 {
71 if (filename.EndsWith(compiler.Key)) 71 if (filename.EndsWith(compiler.Key))
72 { 72 {
73 LoadFromCompiler(compiler.Value.compile(filename)); 73 LoadFromCompiler(compiler.Value.compile(filename));
74 break; 74 break;
75 } 75 }
76 } 76 }
77 } 77 }
78 78
79 public void RunScriptCmd(string[] args) 79 public void RunScriptCmd(string[] args)
80 { 80 {
81 switch (args[0]) 81 switch (args[0])
82 { 82 {
83 case "load": 83 case "load":
84 Compile(args[1]); 84 Compile(args[1]);
85 break; 85 break;
86 86
87 default: 87 default:
88 MainLog.Instance.Error("Unknown script command"); 88 MainLog.Instance.Error("Unknown script command");
89 break; 89 break;
90 } 90 }
91 } 91 }
92 92
93 public void AddPreCompiledScript(IScript script) 93 public void AddPreCompiledScript(IScript script)
94 { 94 {
95 MainLog.Instance.Verbose("Loading script " + script.getName()); 95 MainLog.Instance.Verbose("Loading script " + script.getName());
96 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. 96 ScriptInfo scriptInfo = new ScriptInfo(scene); // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
97 script.Initialise(scriptInfo); 97 script.Initialise(scriptInfo);
98 scripts.Add(script); 98 scripts.Add(script);
99 } 99 }
100 } 100 }
101 101
102 interface IScriptCompiler 102 interface IScriptCompiler
103 { 103 {
104 Dictionary<string,IScript> compile(string filename); 104 Dictionary<string,IScript> compile(string filename);
105 string FileExt(); 105 string FileExt();
106 } 106 }
107} 107}
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs
index 8f8ac97..fb12c4d 100644
--- a/OpenSim/Region/Environment/StorageManager.cs
+++ b/OpenSim/Region/Environment/StorageManager.cs
@@ -1,60 +1,60 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Framework; 5using OpenSim.Framework;
6using OpenSim.Framework.Communications; 6using OpenSim.Framework.Communications;
7using OpenSim.Framework.Servers; 7using OpenSim.Framework.Servers;
8using OpenSim.Region.Capabilities; 8using OpenSim.Region.Capabilities;
9using OpenSim.Region.Environment.Scenes; 9using OpenSim.Region.Environment.Scenes;
10using OpenSim.Region.Interfaces; 10using OpenSim.Region.Interfaces;
11 11
12using System.Reflection; 12using System.Reflection;
13 13
14namespace OpenSim.Region.Environment 14namespace OpenSim.Region.Environment
15{ 15{
16 public class StorageManager 16 public class StorageManager
17 { 17 {
18 private IRegionDataStore m_dataStore; 18 private IRegionDataStore m_dataStore;
19 19
20 public IRegionDataStore DataStore 20 public IRegionDataStore DataStore
21 { 21 {
22 get 22 get
23 { 23 {
24 return m_dataStore; 24 return m_dataStore;
25 } 25 }
26 } 26 }
27 27
28 public StorageManager(IRegionDataStore storage) 28 public StorageManager(IRegionDataStore storage)
29 { 29 {
30 m_dataStore = storage; 30 m_dataStore = storage;
31 } 31 }
32 32
33 public StorageManager(string dllName, string dataStoreFile, string dataStoreDB) 33 public StorageManager(string dllName, string dataStoreFile, string dataStoreDB)
34 { 34 {
35 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 35 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
36 36
37 foreach (Type pluginType in pluginAssembly.GetTypes()) 37 foreach (Type pluginType in pluginAssembly.GetTypes())
38 { 38 {
39 if (pluginType.IsPublic) 39 if (pluginType.IsPublic)
40 { 40 {
41 Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); 41 Type typeInterface = pluginType.GetInterface("IRegionDataStore", true);
42 42
43 if (typeInterface != null) 43 if (typeInterface != null)
44 { 44 {
45 IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 45 IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
46 plug.Initialise(dataStoreFile, dataStoreDB); 46 plug.Initialise(dataStoreFile, dataStoreDB);
47 47
48 m_dataStore = plug; 48 m_dataStore = plug;
49 } 49 }
50 50
51 typeInterface = null; 51 typeInterface = null;
52 } 52 }
53 } 53 }
54 54
55 pluginAssembly = null; 55 pluginAssembly = null;
56 56
57 //TODO: Add checking and warning to make sure it initialised. 57 //TODO: Add checking and warning to make sure it initialised.
58 } 58 }
59 } 59 }
60} 60}
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 7e6b1af..28c9b9a 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -1,184 +1,184 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using System.Net; 2using System.Net;
3using System.Timers; 3using System.Timers;
4using System; 4using System;
5using System.Text; 5using System.Text;
6 6
7using libsecondlife; 7using libsecondlife;
8using libsecondlife.Packets; 8using libsecondlife.Packets;
9 9
10using OpenSim.Framework; 10using OpenSim.Framework;
11using OpenSim.Framework.Interfaces; 11using OpenSim.Framework.Interfaces;
12using OpenSim.Framework.Types; 12using OpenSim.Framework.Types;
13using OpenSim.Framework.Data; 13using OpenSim.Framework.Data;
14using OpenSim.Framework.Utilities; 14using OpenSim.Framework.Utilities;
15 15
16namespace SimpleApp 16namespace SimpleApp
17{ 17{
18 public class MyNpcCharacter : IClientAPI 18 public class MyNpcCharacter : IClientAPI
19 { 19 {
20 private uint movementFlag = 0; 20 private uint movementFlag = 0;
21 private short flyState = 0; 21 private short flyState = 0;
22 private LLQuaternion bodyDirection = LLQuaternion.Identity; 22 private LLQuaternion bodyDirection = LLQuaternion.Identity;
23 private short count = 0; 23 private short count = 0;
24 24
25 public event ImprovedInstantMessage OnInstantMessage; 25 public event ImprovedInstantMessage OnInstantMessage;
26 public event ChatFromViewer OnChatFromViewer; 26 public event ChatFromViewer OnChatFromViewer;
27 public event RezObject OnRezObject; 27 public event RezObject OnRezObject;
28 public event ModifyTerrain OnModifyTerrain; 28 public event ModifyTerrain OnModifyTerrain;
29 public event SetAppearance OnSetAppearance; 29 public event SetAppearance OnSetAppearance;
30 public event StartAnim OnStartAnim; 30 public event StartAnim OnStartAnim;
31 public event LinkObjects OnLinkObjects; 31 public event LinkObjects OnLinkObjects;
32 public event RequestMapBlocks OnRequestMapBlocks; 32 public event RequestMapBlocks OnRequestMapBlocks;
33 public event TeleportLocationRequest OnTeleportLocationRequest; 33 public event TeleportLocationRequest OnTeleportLocationRequest;
34 34
35 public event GenericCall4 OnDeRezObject; 35 public event GenericCall4 OnDeRezObject;
36 public event GenericCall OnRegionHandShakeReply; 36 public event GenericCall OnRegionHandShakeReply;
37 public event GenericCall OnRequestWearables; 37 public event GenericCall OnRequestWearables;
38 public event GenericCall2 OnCompleteMovementToRegion; 38 public event GenericCall2 OnCompleteMovementToRegion;
39 public event UpdateAgent OnAgentUpdate; 39 public event UpdateAgent OnAgentUpdate;
40 public event GenericCall OnRequestAvatarsData; 40 public event GenericCall OnRequestAvatarsData;
41 public event AddNewPrim OnAddPrim; 41 public event AddNewPrim OnAddPrim;
42 public event ObjectDuplicate OnObjectDuplicate; 42 public event ObjectDuplicate OnObjectDuplicate;
43 public event UpdateVector OnGrapObject; 43 public event UpdateVector OnGrapObject;
44 public event ObjectSelect OnDeGrapObject; 44 public event ObjectSelect OnDeGrapObject;
45 public event MoveObject OnGrapUpdate; 45 public event MoveObject OnGrapUpdate;
46 46
47 public event UpdateShape OnUpdatePrimShape; 47 public event UpdateShape OnUpdatePrimShape;
48 public event ObjectSelect OnObjectSelect; 48 public event ObjectSelect OnObjectSelect;
49 public event GenericCall7 OnObjectDescription; 49 public event GenericCall7 OnObjectDescription;
50 public event GenericCall7 OnObjectName; 50 public event GenericCall7 OnObjectName;
51 public event UpdatePrimFlags OnUpdatePrimFlags; 51 public event UpdatePrimFlags OnUpdatePrimFlags;
52 public event UpdatePrimTexture OnUpdatePrimTexture; 52 public event UpdatePrimTexture OnUpdatePrimTexture;
53 public event UpdateVector OnUpdatePrimGroupPosition; 53 public event UpdateVector OnUpdatePrimGroupPosition;
54 public event UpdateVector OnUpdatePrimSinglePosition; 54 public event UpdateVector OnUpdatePrimSinglePosition;
55 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 55 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
56 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 56 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
57 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 57 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
58 public event UpdateVector OnUpdatePrimScale; 58 public event UpdateVector OnUpdatePrimScale;
59 public event StatusChange OnChildAgentStatus; 59 public event StatusChange OnChildAgentStatus;
60 public event GenericCall2 OnStopMovement; 60 public event GenericCall2 OnStopMovement;
61 public event NewAvatar OnNewAvatar; 61 public event NewAvatar OnNewAvatar;
62 public event GenericCall6 OnRemoveAvatar; 62 public event GenericCall6 OnRemoveAvatar;
63 63
64 public event UUIDNameRequest OnNameFromUUIDRequest; 64 public event UUIDNameRequest OnNameFromUUIDRequest;
65 65
66 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 66 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
67 public event ParcelDivideRequest OnParcelDivideRequest; 67 public event ParcelDivideRequest OnParcelDivideRequest;
68 public event ParcelJoinRequest OnParcelJoinRequest; 68 public event ParcelJoinRequest OnParcelJoinRequest;
69 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 69 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
70 70
71 public event ParcelSelectObjects OnParcelSelectObjects; 71 public event ParcelSelectObjects OnParcelSelectObjects;
72 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 72 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
73 public event ObjectDeselect OnObjectDeselect; 73 public event ObjectDeselect OnObjectDeselect;
74 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 74 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
75 75
76 private LLUUID myID = LLUUID.Random(); 76 private LLUUID myID = LLUUID.Random();
77 public MyNpcCharacter() 77 public MyNpcCharacter()
78 { 78 {
79 79
80 } 80 }
81 81
82 public virtual LLVector3 StartPos 82 public virtual LLVector3 StartPos
83 { 83 {
84 get { return new LLVector3(128, 100, 2); } 84 get { return new LLVector3(128, 100, 2); }
85 set { } 85 set { }
86 } 86 }
87 87
88 public virtual LLUUID AgentId 88 public virtual LLUUID AgentId
89 { 89 {
90 get { return myID; } 90 get { return myID; }
91 } 91 }
92 92
93 public virtual string FirstName 93 public virtual string FirstName
94 { 94 {
95 get { return "Annoying"; } 95 get { return "Annoying"; }
96 } 96 }
97 97
98 public virtual string LastName 98 public virtual string LastName
99 { 99 {
100 get { return "NPC"; } 100 get { return "NPC"; }
101 } 101 }
102 102
103 public virtual void OutPacket(Packet newPack) { } 103 public virtual void OutPacket(Packet newPack) { }
104 public virtual void SendWearables(AvatarWearable[] wearables) { } 104 public virtual void SendWearables(AvatarWearable[] wearables) { }
105 public virtual void SendStartPingCheck(byte seq) { } 105 public virtual void SendStartPingCheck(byte seq) { }
106 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID) { } 106 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID) { }
107 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) { } 107 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId) { }
108 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { } 108 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { }
109 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { } 109 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) { }
110 public virtual void SendInstantMessage(string message, LLUUID target, string fromName) { } 110 public virtual void SendInstantMessage(string message, LLUUID target, string fromName) { }
111 public virtual void SendLayerData(float[] map) { } 111 public virtual void SendLayerData(float[] map) { }
112 public virtual void SendLayerData(int px, int py, float[] map) { } 112 public virtual void SendLayerData(int px, int py, float[] map) { }
113 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { } 113 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { }
114 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { } 114 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { }
115 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } 115 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); }
116 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint) { } 116 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint) { }
117 public virtual void SendMapBlock(List<MapBlockData> mapBlocks) { } 117 public virtual void SendMapBlock(List<MapBlockData> mapBlocks) { }
118 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) { } 118 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) { }
119 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags) { } 119 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags) { }
120 public virtual void SendTeleportCancel() { } 120 public virtual void SendTeleportCancel() { }
121 public virtual void SendTeleportLocationStart() { } 121 public virtual void SendTeleportLocationStart() { }
122 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) { } 122 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) { }
123 123
124 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) { } 124 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry) { }
125 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity) { } 125 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity) { }
126 126
127 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) { } 127 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) { }
128 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags) { } 128 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags) { }
129 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags) { } 129 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags) { }
130 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) { } 130 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) { }
131 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) { } 131 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID) { }
132 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation) { } 132 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation) { }
133 133
134 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) { } 134 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) { }
135 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item) { } 135 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item) { }
136 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) { } 136 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) { }
137 137
138 public virtual void SendRegionHandshake(RegionInfo regionInfo) 138 public virtual void SendRegionHandshake(RegionInfo regionInfo)
139 { 139 {
140 this.OnRegionHandShakeReply(this); 140 this.OnRegionHandShakeReply(this);
141 this.OnCompleteMovementToRegion(); 141 this.OnCompleteMovementToRegion();
142 this.StartMovement(); 142 this.StartMovement();
143 } 143 }
144 144
145 public void StartMovement() 145 public void StartMovement()
146 { 146 {
147 Timer timer = new Timer(); 147 Timer timer = new Timer();
148 timer.Enabled = true; 148 timer.Enabled = true;
149 timer.Interval = 500; 149 timer.Interval = 500;
150 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat); 150 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
151 } 151 }
152 152
153 public void Heartbeat(object sender, EventArgs e) 153 public void Heartbeat(object sender, EventArgs e)
154 { 154 {
155 Encoding enc = Encoding.ASCII; 155 Encoding enc = Encoding.ASCII;
156 156
157 this.OnAgentUpdate(this, movementFlag, bodyDirection); 157 this.OnAgentUpdate(this, movementFlag, bodyDirection);
158 158
159 if (this.flyState == 0) 159 if (this.flyState == 0)
160 { 160 {
161 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG; 161 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG;
162 flyState = 1; 162 flyState = 1;
163 } 163 }
164 else if (this.flyState == 1) 164 else if (this.flyState == 1)
165 { 165 {
166 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS; 166 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY | (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS;
167 flyState = 2; 167 flyState = 2;
168 } 168 }
169 else 169 else
170 { 170 {
171 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY; 171 movementFlag = (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY;
172 flyState = 0; 172 flyState = 0;
173 } 173 }
174 174
175 if (count >= 40) 175 if (count >= 40)
176 { 176 {
177 this.OnChatFromViewer(enc.GetBytes("Kind of quiet around here, isn't it! \0"), 2, new LLVector3(128, 128, 26), this.FirstName + " " + this.LastName, this.AgentId); 177 this.OnChatFromViewer(enc.GetBytes("Kind of quiet around here, isn't it! \0"), 2, new LLVector3(128, 128, 26), this.FirstName + " " + this.LastName, this.AgentId);
178 count = -1; 178 count = -1;
179 } 179 }
180 180
181 count++; 181 count++;
182 } 182 }
183 } 183 }
184} 184}
diff --git a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
index aab52cc..f5c6a0f 100644
--- a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
@@ -1,40 +1,40 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Region.Environment.Scenes; 4using OpenSim.Region.Environment.Scenes;
5using libsecondlife; 5using libsecondlife;
6using OpenSim.Framework.Types; 6using OpenSim.Framework.Types;
7using System.Timers; 7using System.Timers;
8using System.Diagnostics; 8using System.Diagnostics;
9 9
10namespace SimpleApp 10namespace SimpleApp
11{ 11{
12 public class MySceneObject : SceneObject 12 public class MySceneObject : SceneObject
13 { 13 {
14 private PerformanceCounter m_counter; 14 private PerformanceCounter m_counter;
15 15
16 public MySceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) 16 public MySceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
17 : base(world, eventManager, ownerID, localID, pos, shape ) 17 : base(world, eventManager, ownerID, localID, pos, shape )
18 { 18 {
19 String objectName = "Processor"; 19 String objectName = "Processor";
20 String counterName = "% Processor Time"; 20 String counterName = "% Processor Time";
21 String instanceName = "_Total"; 21 String instanceName = "_Total";
22 22
23 m_counter = new PerformanceCounter(objectName, counterName, instanceName); 23 m_counter = new PerformanceCounter(objectName, counterName, instanceName);
24 24
25 Timer timer = new Timer(); 25 Timer timer = new Timer();
26 timer.Enabled = true; 26 timer.Enabled = true;
27 timer.Interval = 100; 27 timer.Interval = 100;
28 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat); 28 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
29 29
30 } 30 }
31 31
32 public void Heartbeat(object sender, EventArgs e) 32 public void Heartbeat(object sender, EventArgs e)
33 { 33 {
34 float cpu = m_counter.NextValue() / 40f; 34 float cpu = m_counter.NextValue() / 40f;
35 LLVector3 size = new LLVector3(cpu, cpu, cpu); 35 LLVector3 size = new LLVector3(cpu, cpu, cpu);
36 rootPrimitive.ResizeGoup( size ); 36 rootPrimitive.ResizeGoup( size );
37 update(); 37 update();
38 } 38 }
39 } 39 }
40} 40}
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index 29b255b..4fe3c7a 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -1,97 +1,97 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using libsecondlife; 2using libsecondlife;
3using OpenSim.Framework; 3using OpenSim.Framework;
4using OpenSim.Framework.Communications; 4using OpenSim.Framework.Communications;
5using OpenSim.Framework.Interfaces; 5using OpenSim.Framework.Interfaces;
6using OpenSim.Framework.Servers; 6using OpenSim.Framework.Servers;
7using OpenSim.Framework.Types; 7using OpenSim.Framework.Types;
8using OpenSim.Region.Caches; 8using OpenSim.Region.Caches;
9using OpenSim.Region.Environment.Scenes; 9using OpenSim.Region.Environment.Scenes;
10using OpenSim.Region.Terrain; 10using OpenSim.Region.Terrain;
11using OpenSim.Region.Environment; 11using OpenSim.Region.Environment;
12 12
13using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence; 13using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence;
14 14
15namespace SimpleApp 15namespace SimpleApp
16{ 16{
17 public class MyWorld : Scene 17 public class MyWorld : Scene
18 { 18 {
19 private List<ScenePresence> m_avatars; 19 private List<ScenePresence> m_avatars;
20 20
21 public MyWorld( RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer) 21 public MyWorld( RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, StorageManager storeMan, BaseHttpServer httpServer)
22 : base( regionInfo, authen, commsMan, assetCach, storeMan, httpServer) 22 : base( regionInfo, authen, commsMan, assetCach, storeMan, httpServer)
23 { 23 {
24 m_avatars = new List<Avatar>(); 24 m_avatars = new List<Avatar>();
25 } 25 }
26 26
27 public override void LoadWorldMap() 27 public override void LoadWorldMap()
28 { 28 {
29 float[] map = new float[65536]; 29 float[] map = new float[65536];
30 30
31 for (int i = 0; i < 65536; i++) 31 for (int i = 0; i < 65536; i++)
32 { 32 {
33 int x = i % 256; 33 int x = i % 256;
34 int y = i / 256; 34 int y = i / 256;
35 35
36 map[i] = 25f; 36 map[i] = 25f;
37 } 37 }
38 38
39 this.Terrain.setHeights1D(map); 39 this.Terrain.setHeights1D(map);
40 this.CreateTerrainTexture(); 40 this.CreateTerrainTexture();
41 } 41 }
42 42
43 #region IWorld Members 43 #region IWorld Members
44 44
45 override public void AddNewClient(IClientAPI client, bool child) 45 override public void AddNewClient(IClientAPI client, bool child)
46 { 46 {
47 LLVector3 pos = new LLVector3(128, 128, 128); 47 LLVector3 pos = new LLVector3(128, 128, 128);
48 48
49 client.OnRegionHandShakeReply += SendLayerData; 49 client.OnRegionHandShakeReply += SendLayerData;
50 /*client.OnChatFromViewer += 50 /*client.OnChatFromViewer +=
51 delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) 51 delegate(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
52 { 52 {
53 // Echo it (so you know what you typed) 53 // Echo it (so you know what you typed)
54 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID); 54 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
55 client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero ); 55 client.SendChatMessage("Ready.", 1, pos, "System", LLUUID.Zero );
56 }; 56 };
57 */ 57 */
58 client.OnChatFromViewer += this.SimChat; 58 client.OnChatFromViewer += this.SimChat;
59 client.OnAddPrim += AddNewPrim; 59 client.OnAddPrim += AddNewPrim;
60 client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition; 60 client.OnUpdatePrimGroupPosition += this.UpdatePrimPosition;
61 client.OnRequestMapBlocks += this.RequestMapBlocks; 61 client.OnRequestMapBlocks += this.RequestMapBlocks;
62 client.OnTeleportLocationRequest += this.RequestTeleportLocation; 62 client.OnTeleportLocationRequest += this.RequestTeleportLocation;
63 client.OnGrapUpdate += this.MoveObject; 63 client.OnGrapUpdate += this.MoveObject;
64 client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest; 64 client.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest;
65 65
66 client.OnCompleteMovementToRegion += delegate() 66 client.OnCompleteMovementToRegion += delegate()
67 { 67 {
68 client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero ); 68 client.SendChatMessage("Welcome to My World.", 1, pos, "System", LLUUID.Zero );
69 }; 69 };
70 70
71 client.SendRegionHandshake(m_regInfo); 71 client.SendRegionHandshake(m_regInfo);
72 72
73 ScenePresence avatar = CreateAndAddScenePresence(client); 73 ScenePresence avatar = CreateAndAddScenePresence(client);
74 avatar.Pos = new LLVector3(128, 128, 26); 74 avatar.Pos = new LLVector3(128, 128, 26);
75 } 75 }
76 76
77 public override void Update() 77 public override void Update()
78 { 78 {
79 foreach (LLUUID UUID in Entities.Keys) 79 foreach (LLUUID UUID in Entities.Keys)
80 { 80 {
81 Entities[UUID].updateMovement(); 81 Entities[UUID].updateMovement();
82 } 82 }
83 83
84 lock (this.m_syncRoot) 84 lock (this.m_syncRoot)
85 { 85 {
86 this.phyScene.Simulate(timeStep); 86 this.phyScene.Simulate(timeStep);
87 } 87 }
88 88
89 foreach (LLUUID UUID in Entities.Keys) 89 foreach (LLUUID UUID in Entities.Keys)
90 { 90 {
91 Entities[UUID].update(); 91 Entities[UUID].update();
92 } 92 }
93 } 93 }
94 94
95 #endregion 95 #endregion
96 } 96 }
97} 97}
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index c3edf0c..f82bdcb 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -1,126 +1,126 @@
1using System; 1using System;
2using System.Net; 2using System.Net;
3using libsecondlife; 3using libsecondlife;
4using OpenSim.Assets; 4using OpenSim.Assets;
5using OpenSim.Framework; 5using OpenSim.Framework;
6using OpenSim.Framework.Console; 6using OpenSim.Framework.Console;
7using OpenSim.Framework.Interfaces; 7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Servers; 8using OpenSim.Framework.Servers;
9using OpenSim.Framework.Types; 9using OpenSim.Framework.Types;
10using OpenSim.Physics.Manager; 10using OpenSim.Physics.Manager;
11using OpenSim.Region.Caches; 11using OpenSim.Region.Caches;
12using OpenSim.Region.Capabilities; 12using OpenSim.Region.Capabilities;
13using OpenSim.Region.ClientStack; 13using OpenSim.Region.ClientStack;
14using OpenSim.Region.Communications.Local; 14using OpenSim.Region.Communications.Local;
15using OpenSim.Region.GridInterfaces.Local; 15using OpenSim.Region.GridInterfaces.Local;
16using System.Timers; 16using System.Timers;
17using OpenSim.Region.Environment.Scenes; 17using OpenSim.Region.Environment.Scenes;
18using OpenSim.Framework.Data; 18using OpenSim.Framework.Data;
19 19
20namespace SimpleApp 20namespace SimpleApp
21{ 21{
22 class Program : conscmd_callback 22 class Program : conscmd_callback
23 { 23 {
24 private LogBase m_log; 24 private LogBase m_log;
25 AuthenticateSessionsBase m_circuitManager; 25 AuthenticateSessionsBase m_circuitManager;
26 uint m_localId; 26 uint m_localId;
27 public MyWorld world; 27 public MyWorld world;
28 private SceneObject m_sceneObject; 28 private SceneObject m_sceneObject;
29 public MyNpcCharacter m_character; 29 public MyNpcCharacter m_character;
30 30
31 private void Run() 31 private void Run()
32 { 32 {
33 m_log = new LogBase(null, "SimpleApp", this, false); 33 m_log = new LogBase(null, "SimpleApp", this, false);
34 MainLog.Instance = m_log; 34 MainLog.Instance = m_log;
35 35
36 // CheckSumServer checksumServer = new CheckSumServer(12036); 36 // CheckSumServer checksumServer = new CheckSumServer(12036);
37 // checksumServer.ServerListener(); 37 // checksumServer.ServerListener();
38 38
39 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); 39 IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
40 40
41 m_circuitManager = new AuthenticateSessionsBase(); 41 m_circuitManager = new AuthenticateSessionsBase();
42 42
43 InventoryCache inventoryCache = new InventoryCache(); 43 InventoryCache inventoryCache = new InventoryCache();
44 44
45 LocalAssetServer assetServer = new LocalAssetServer(); 45 LocalAssetServer assetServer = new LocalAssetServer();
46 assetServer.SetServerInfo("http://127.0.0.1:8003/", ""); 46 assetServer.SetServerInfo("http://127.0.0.1:8003/", "");
47 47
48 AssetCache assetCache = new AssetCache(assetServer); 48 AssetCache assetCache = new AssetCache(assetServer);
49 49
50 ScenePresence.LoadTextureFile("avatar-texture.dat"); 50 ScenePresence.LoadTextureFile("avatar-texture.dat");
51 ScenePresence.PhysicsEngineFlying = true; 51 ScenePresence.PhysicsEngineFlying = true;
52 52
53 PhysicsManager physManager = new PhysicsManager(); 53 PhysicsManager physManager = new PhysicsManager();
54 physManager.LoadPlugins(); 54 physManager.LoadPlugins();
55 55
56 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager); 56 UDPServer udpServer = new UDPServer(internalEndPoint.Port, assetCache, inventoryCache, m_log, m_circuitManager);
57 PacketServer packetServer = new PacketServer(udpServer); 57 PacketServer packetServer = new PacketServer(udpServer);
58 58
59 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 59 ClientView.TerrainManager = new TerrainManager(new SecondLife());
60 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port); 60 BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port);
61 61
62 NetworkServersInfo serverInfo = new NetworkServersInfo(); 62 NetworkServersInfo serverInfo = new NetworkServersInfo();
63 CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer); 63 CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer);
64 64
65 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "127.0.0.1"); 65 RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "127.0.0.1");
66 66
67 OpenSim.Region.Environment.StorageManager storeMan = new OpenSim.Region.Environment.StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp"); 67 OpenSim.Region.Environment.StorageManager storeMan = new OpenSim.Region.Environment.StorageManager("OpenSim.DataStore.NullStorage.dll", "simpleapp.yap", "simpleapp");
68 68
69 world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, httpServer); 69 world = new MyWorld( regionInfo, m_circuitManager, communicationsManager, assetCache, storeMan, httpServer);
70 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null; 70 world.PhysScene = physManager.GetPhysicsScene("basicphysics"); //PhysicsScene.Null;
71 71
72 world.LoadWorldMap(); 72 world.LoadWorldMap();
73 world.PhysScene.SetTerrain(world.Terrain.getHeights1D()); 73 world.PhysScene.SetTerrain(world.Terrain.getHeights1D());
74 world.performParcelPrimCountUpdate(); 74 world.performParcelPrimCountUpdate();
75 75
76 udpServer.LocalWorld = world; 76 udpServer.LocalWorld = world;
77 77
78 httpServer.Start(); 78 httpServer.Start();
79 udpServer.ServerListener(); 79 udpServer.ServerListener();
80 80
81 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test"); 81 UserProfileData masterAvatar = communicationsManager.UserServer.SetupMasterUser("Test", "User", "test");
82 if (masterAvatar != null) 82 if (masterAvatar != null)
83 { 83 {
84 world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; 84 world.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
85 world.ParcelManager.NoParcelDataFromStorage(); 85 world.ParcelManager.NoParcelDataFromStorage();
86 } 86 }
87 87
88 world.StartTimer(); 88 world.StartTimer();
89 89
90 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox(); 90 PrimitiveBaseShape shape = PrimitiveBaseShape.DefaultBox();
91 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 91 shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
92 LLVector3 pos = new LLVector3(138, 129, 27); 92 LLVector3 pos = new LLVector3(138, 129, 27);
93 93
94 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape); 94 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape);
95 world.AddEntity(m_sceneObject); 95 world.AddEntity(m_sceneObject);
96 96
97 m_character = new MyNpcCharacter(); 97 m_character = new MyNpcCharacter();
98 world.AddNewClient(m_character, false); 98 world.AddNewClient(m_character, false);
99 99
100 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); 100 m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit.");
101 m_log.ReadLine(); 101 m_log.ReadLine();
102 102
103 } 103 }
104 104
105 #region conscmd_callback Members 105 #region conscmd_callback Members
106 106
107 public void RunCmd(string cmd, string[] cmdparams) 107 public void RunCmd(string cmd, string[] cmdparams)
108 { 108 {
109 throw new Exception("The method or operation is not implemented."); 109 throw new Exception("The method or operation is not implemented.");
110 } 110 }
111 111
112 public void Show(string ShowWhat) 112 public void Show(string ShowWhat)
113 { 113 {
114 throw new Exception("The method or operation is not implemented."); 114 throw new Exception("The method or operation is not implemented.");
115 } 115 }
116 116
117 #endregion 117 #endregion
118 118
119 static void Main(string[] args) 119 static void Main(string[] args)
120 { 120 {
121 Program app = new Program(); 121 Program app = new Program();
122 122
123 app.Run(); 123 app.Run();
124 } 124 }
125 } 125 }
126} 126}
diff --git a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs
index 3b0de8a..2250613 100644
--- a/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs
@@ -1,31 +1,31 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("SimpleApp")] 6[assembly: AssemblyTitle("SimpleApp")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("Playahead AB")] 9[assembly: AssemblyCompany("Playahead AB")]
10[assembly: AssemblyProduct("SimpleApp")] 10[assembly: AssemblyProduct("SimpleApp")]
11[assembly: AssemblyCopyright("Copyright © Playahead AB 2007")] 11[assembly: AssemblyCopyright("Copyright © Playahead AB 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("a5cfa45f-5acf-4b2e-9c50-1dd1fd7608ee")] 21[assembly: Guid("a5cfa45f-5acf-4b2e-9c50-1dd1fd7608ee")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30[assembly: AssemblyVersion("1.0.0.0")] 30[assembly: AssemblyVersion("1.0.0.0")]
31[assembly: AssemblyFileVersion("1.0.0.0")] 31[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs
index b5fc1ef..61adf80 100644
--- a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs
+++ b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("LocalGridServers")] 36[assembly: AssemblyTitle("LocalGridServers")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("LocalGridServers")] 40[assembly: AssemblyProduct("LocalGridServers")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
index 1023820..f3d7a2c 100644
--- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
+++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
@@ -1,311 +1,311 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Threading; 30using System.Threading;
31using Db4objects.Db4o; 31using Db4objects.Db4o;
32using Db4objects.Db4o.Query; 32using Db4objects.Db4o.Query;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38 38
39namespace OpenSim.Region.GridInterfaces.Local 39namespace OpenSim.Region.GridInterfaces.Local
40{ 40{
41 public class LocalAssetPlugin : IAssetPlugin 41 public class LocalAssetPlugin : IAssetPlugin
42 { 42 {
43 public LocalAssetPlugin() 43 public LocalAssetPlugin()
44 { 44 {
45 45
46 } 46 }
47 47
48 public IAssetServer GetAssetServer() 48 public IAssetServer GetAssetServer()
49 { 49 {
50 return (new LocalAssetServer()); 50 return (new LocalAssetServer());
51 } 51 }
52 } 52 }
53 53
54 public class LocalAssetServer : IAssetServer 54 public class LocalAssetServer : IAssetServer
55 { 55 {
56 private IAssetReceiver _receiver; 56 private IAssetReceiver _receiver;
57 private BlockingQueue<ARequest> _assetRequests; 57 private BlockingQueue<ARequest> _assetRequests;
58 private IObjectContainer db; 58 private IObjectContainer db;
59 private Thread _localAssetServerThread; 59 private Thread _localAssetServerThread;
60 60
61 public LocalAssetServer() 61 public LocalAssetServer()
62 { 62 {
63 bool yapfile; 63 bool yapfile;
64 this._assetRequests = new BlockingQueue<ARequest>(); 64 this._assetRequests = new BlockingQueue<ARequest>();
65 yapfile = File.Exists("regionassets.yap"); 65 yapfile = File.Exists("regionassets.yap");
66 66
67 MainLog.Instance.Verbose( "Local Asset Server class created"); 67 MainLog.Instance.Verbose( "Local Asset Server class created");
68 try 68 try
69 { 69 {
70 db = Db4oFactory.OpenFile("regionassets.yap"); 70 db = Db4oFactory.OpenFile("regionassets.yap");
71 MainLog.Instance.Verbose( "Db4 Asset database creation"); 71 MainLog.Instance.Verbose( "Db4 Asset database creation");
72 } 72 }
73 catch (Exception e) 73 catch (Exception e)
74 { 74 {
75 db.Close(); 75 db.Close();
76 MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); 76 MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured");
77 MainLog.Instance.Warn(e.ToString()); 77 MainLog.Instance.Warn(e.ToString());
78 } 78 }
79 if (!yapfile) 79 if (!yapfile)
80 { 80 {
81 this.SetUpAssetDatabase(); 81 this.SetUpAssetDatabase();
82 } 82 }
83 this._localAssetServerThread = new Thread(new ThreadStart(RunRequests)); 83 this._localAssetServerThread = new Thread(new ThreadStart(RunRequests));
84 this._localAssetServerThread.IsBackground = true; 84 this._localAssetServerThread.IsBackground = true;
85 this._localAssetServerThread.Start(); 85 this._localAssetServerThread.Start();
86 86
87 } 87 }
88 88
89 public void SetReceiver(IAssetReceiver receiver) 89 public void SetReceiver(IAssetReceiver receiver)
90 { 90 {
91 this._receiver = receiver; 91 this._receiver = receiver;
92 } 92 }
93 93
94 public void RequestAsset(LLUUID assetID, bool isTexture) 94 public void RequestAsset(LLUUID assetID, bool isTexture)
95 { 95 {
96 ARequest req = new ARequest(); 96 ARequest req = new ARequest();
97 req.AssetID = assetID; 97 req.AssetID = assetID;
98 req.IsTexture = isTexture; 98 req.IsTexture = isTexture;
99 this._assetRequests.Enqueue(req); 99 this._assetRequests.Enqueue(req);
100 } 100 }
101 101
102 public void UpdateAsset(AssetBase asset) 102 public void UpdateAsset(AssetBase asset)
103 { 103 {
104 104
105 } 105 }
106 106
107 public void UploadNewAsset(AssetBase asset) 107 public void UploadNewAsset(AssetBase asset)
108 { 108 {
109 AssetStorage store = new AssetStorage(); 109 AssetStorage store = new AssetStorage();
110 store.Data = asset.Data; 110 store.Data = asset.Data;
111 store.Name = asset.Name; 111 store.Name = asset.Name;
112 store.UUID = asset.FullID; 112 store.UUID = asset.FullID;
113 db.Set(store); 113 db.Set(store);
114 db.Commit(); 114 db.Commit();
115 } 115 }
116 116
117 public void SetServerInfo(string ServerUrl, string ServerKey) 117 public void SetServerInfo(string ServerUrl, string ServerKey)
118 { 118 {
119 119
120 } 120 }
121 public void Close() 121 public void Close()
122 { 122 {
123 if (db != null) 123 if (db != null)
124 { 124 {
125 MainLog.Instance.Verbose( "Closing local asset server database"); 125 MainLog.Instance.Verbose( "Closing local asset server database");
126 db.Close(); 126 db.Close();
127 } 127 }
128 } 128 }
129 129
130 private void RunRequests() 130 private void RunRequests()
131 { 131 {
132 while (true) 132 while (true)
133 { 133 {
134 byte[] idata = null; 134 byte[] idata = null;
135 bool found = false; 135 bool found = false;
136 AssetStorage foundAsset = null; 136 AssetStorage foundAsset = null;
137 ARequest req = this._assetRequests.Dequeue(); 137 ARequest req = this._assetRequests.Dequeue();
138 IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID)); 138 IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID));
139 if (result.Count > 0) 139 if (result.Count > 0)
140 { 140 {
141 foundAsset = (AssetStorage)result.Next(); 141 foundAsset = (AssetStorage)result.Next();
142 found = true; 142 found = true;
143 } 143 }
144 144
145 AssetBase asset = new AssetBase(); 145 AssetBase asset = new AssetBase();
146 if (found) 146 if (found)
147 { 147 {
148 asset.FullID = foundAsset.UUID; 148 asset.FullID = foundAsset.UUID;
149 asset.Type = foundAsset.Type; 149 asset.Type = foundAsset.Type;
150 asset.InvType = foundAsset.Type; 150 asset.InvType = foundAsset.Type;
151 asset.Name = foundAsset.Name; 151 asset.Name = foundAsset.Name;
152 idata = foundAsset.Data; 152 idata = foundAsset.Data;
153 } 153 }
154 else 154 else
155 { 155 {
156 asset.FullID = LLUUID.Zero; 156 asset.FullID = LLUUID.Zero;
157 } 157 }
158 asset.Data = idata; 158 asset.Data = idata;
159 _receiver.AssetReceived(asset, req.IsTexture); 159 _receiver.AssetReceived(asset, req.IsTexture);
160 } 160 }
161 161
162 } 162 }
163 163
164 private void SetUpAssetDatabase() 164 private void SetUpAssetDatabase()
165 { 165 {
166 try 166 try
167 { 167 {
168 168
169 MainLog.Instance.Verbose( "Setting up asset database"); 169 MainLog.Instance.Verbose( "Setting up asset database");
170 170
171 AssetBase Image = new AssetBase(); 171 AssetBase Image = new AssetBase();
172 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); 172 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
173 Image.Name = "Bricks"; 173 Image.Name = "Bricks";
174 this.LoadAsset(Image, true, "bricks.jp2"); 174 this.LoadAsset(Image, true, "bricks.jp2");
175 AssetStorage store = new AssetStorage(); 175 AssetStorage store = new AssetStorage();
176 store.Data = Image.Data; 176 store.Data = Image.Data;
177 store.Name = Image.Name; 177 store.Name = Image.Name;
178 store.UUID = Image.FullID; 178 store.UUID = Image.FullID;
179 db.Set(store); 179 db.Set(store);
180 db.Commit(); 180 db.Commit();
181 181
182 Image = new AssetBase(); 182 Image = new AssetBase();
183 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002"); 183 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
184 Image.Name = "Plywood"; 184 Image.Name = "Plywood";
185 this.LoadAsset(Image, true, "plywood.jp2"); 185 this.LoadAsset(Image, true, "plywood.jp2");
186 store = new AssetStorage(); 186 store = new AssetStorage();
187 store.Data = Image.Data; 187 store.Data = Image.Data;
188 store.Name = Image.Name; 188 store.Name = Image.Name;
189 store.UUID = Image.FullID; 189 store.UUID = Image.FullID;
190 db.Set(store); 190 db.Set(store);
191 db.Commit(); 191 db.Commit();
192 192
193 Image = new AssetBase(); 193 Image = new AssetBase();
194 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003"); 194 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
195 Image.Name = "Rocks"; 195 Image.Name = "Rocks";
196 this.LoadAsset(Image, true, "rocks.jp2"); 196 this.LoadAsset(Image, true, "rocks.jp2");
197 store = new AssetStorage(); 197 store = new AssetStorage();
198 store.Data = Image.Data; 198 store.Data = Image.Data;
199 store.Name = Image.Name; 199 store.Name = Image.Name;
200 store.UUID = Image.FullID; 200 store.UUID = Image.FullID;
201 db.Set(store); 201 db.Set(store);
202 db.Commit(); 202 db.Commit();
203 203
204 Image = new AssetBase(); 204 Image = new AssetBase();
205 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004"); 205 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
206 Image.Name = "Granite"; 206 Image.Name = "Granite";
207 this.LoadAsset(Image, true, "granite.jp2"); 207 this.LoadAsset(Image, true, "granite.jp2");
208 store = new AssetStorage(); 208 store = new AssetStorage();
209 store.Data = Image.Data; 209 store.Data = Image.Data;
210 store.Name = Image.Name; 210 store.Name = Image.Name;
211 store.UUID = Image.FullID; 211 store.UUID = Image.FullID;
212 db.Set(store); 212 db.Set(store);
213 db.Commit(); 213 db.Commit();
214 214
215 Image = new AssetBase(); 215 Image = new AssetBase();
216 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005"); 216 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
217 Image.Name = "Hardwood"; 217 Image.Name = "Hardwood";
218 this.LoadAsset(Image, true, "hardwood.jp2"); 218 this.LoadAsset(Image, true, "hardwood.jp2");
219 store = new AssetStorage(); 219 store = new AssetStorage();
220 store.Data = Image.Data; 220 store.Data = Image.Data;
221 store.Name = Image.Name; 221 store.Name = Image.Name;
222 store.UUID = Image.FullID; 222 store.UUID = Image.FullID;
223 db.Set(store); 223 db.Set(store);
224 db.Commit(); 224 db.Commit();
225 225
226 Image = new AssetBase(); 226 Image = new AssetBase();
227 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005"); 227 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
228 Image.Name = "Prim Base Texture"; 228 Image.Name = "Prim Base Texture";
229 this.LoadAsset(Image, true, "plywood.jp2"); 229 this.LoadAsset(Image, true, "plywood.jp2");
230 store = new AssetStorage(); 230 store = new AssetStorage();
231 store.Data = Image.Data; 231 store.Data = Image.Data;
232 store.Name = Image.Name; 232 store.Name = Image.Name;
233 store.UUID = Image.FullID; 233 store.UUID = Image.FullID;
234 db.Set(store); 234 db.Set(store);
235 db.Commit(); 235 db.Commit();
236 236
237 Image = new AssetBase(); 237 Image = new AssetBase();
238 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000006"); 238 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000006");
239 Image.Name = "Map Base Texture"; 239 Image.Name = "Map Base Texture";
240 this.LoadAsset(Image, true, "map_base.jp2"); 240 this.LoadAsset(Image, true, "map_base.jp2");
241 store = new AssetStorage(); 241 store = new AssetStorage();
242 store.Data = Image.Data; 242 store.Data = Image.Data;
243 store.Name = Image.Name; 243 store.Name = Image.Name;
244 store.UUID = Image.FullID; 244 store.UUID = Image.FullID;
245 db.Set(store); 245 db.Set(store);
246 db.Commit(); 246 db.Commit();
247 247
248 Image = new AssetBase(); 248 Image = new AssetBase();
249 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000007"); 249 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000007");
250 Image.Name = "Map Texture"; 250 Image.Name = "Map Texture";
251 this.LoadAsset(Image, true, "map1.jp2"); 251 this.LoadAsset(Image, true, "map1.jp2");
252 store = new AssetStorage(); 252 store = new AssetStorage();
253 store.Data = Image.Data; 253 store.Data = Image.Data;
254 store.Name = Image.Name; 254 store.Name = Image.Name;
255 store.UUID = Image.FullID; 255 store.UUID = Image.FullID;
256 db.Set(store); 256 db.Set(store);
257 db.Commit(); 257 db.Commit();
258 258
259 Image = new AssetBase(); 259 Image = new AssetBase();
260 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 260 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
261 Image.Name = "Shape"; 261 Image.Name = "Shape";
262 this.LoadAsset(Image, false, "base_shape.dat"); 262 this.LoadAsset(Image, false, "base_shape.dat");
263 store = new AssetStorage(); 263 store = new AssetStorage();
264 store.Data = Image.Data; 264 store.Data = Image.Data;
265 store.Name = Image.Name; 265 store.Name = Image.Name;
266 store.UUID = Image.FullID; 266 store.UUID = Image.FullID;
267 db.Set(store); 267 db.Set(store);
268 db.Commit(); 268 db.Commit();
269 } 269 }
270 catch (Exception e) 270 catch (Exception e)
271 { 271 {
272 Console.WriteLine("exception loading default assets into database"); 272 Console.WriteLine("exception loading default assets into database");
273 Console.WriteLine(e.Message); 273 Console.WriteLine(e.Message);
274 } 274 }
275 275
276 } 276 }
277 277
278 private void LoadAsset(AssetBase info, bool image, string filename) 278 private void LoadAsset(AssetBase info, bool image, string filename)
279 { 279 {
280 //should request Asset from storage manager 280 //should request Asset from storage manager
281 //but for now read from file 281 //but for now read from file
282 282
283 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; 283 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
284 string fileName = Path.Combine(dataPath, filename); 284 string fileName = Path.Combine(dataPath, filename);
285 FileInfo fInfo = new FileInfo(fileName); 285 FileInfo fInfo = new FileInfo(fileName);
286 long numBytes = fInfo.Length; 286 long numBytes = fInfo.Length;
287 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); 287 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
288 byte[] idata = new byte[numBytes]; 288 byte[] idata = new byte[numBytes];
289 BinaryReader br = new BinaryReader(fStream); 289 BinaryReader br = new BinaryReader(fStream);
290 idata = br.ReadBytes((int)numBytes); 290 idata = br.ReadBytes((int)numBytes);
291 br.Close(); 291 br.Close();
292 fStream.Close(); 292 fStream.Close();
293 info.Data = idata; 293 info.Data = idata;
294 //info.loaded=true; 294 //info.loaded=true;
295 } 295 }
296 } 296 }
297 public class AssetUUIDQuery : Predicate 297 public class AssetUUIDQuery : Predicate
298 { 298 {
299 private LLUUID _findID; 299 private LLUUID _findID;
300 300
301 public AssetUUIDQuery(LLUUID find) 301 public AssetUUIDQuery(LLUUID find)
302 { 302 {
303 _findID = find; 303 _findID = find;
304 } 304 }
305 public bool Match(AssetStorage asset) 305 public bool Match(AssetStorage asset)
306 { 306 {
307 return (asset.UUID == _findID); 307 return (asset.UUID == _findID);
308 } 308 }
309 } 309 }
310 310
311} 311}
diff --git a/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs
index 1e15c5e..a658f2f 100644
--- a/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs
+++ b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("RemoteGridServers")] 36[assembly: AssemblyTitle("RemoteGridServers")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("RemoteGridServers")] 40[assembly: AssemblyProduct("RemoteGridServers")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs
index 8643736..f81bb8d 100644
--- a/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs
+++ b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs
@@ -1,133 +1,133 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.IO; 28using System.IO;
29using System.Net; 29using System.Net;
30using System.Text; 30using System.Text;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
37 37
38namespace OpenSim.Region.GridInterfaces.Remote 38namespace OpenSim.Region.GridInterfaces.Remote
39{ 39{
40 public class RemoteAssetServer : IAssetServer 40 public class RemoteAssetServer : IAssetServer
41 { 41 {
42 private IAssetReceiver _receiver; 42 private IAssetReceiver _receiver;
43 private BlockingQueue<ARequest> _assetRequests; 43 private BlockingQueue<ARequest> _assetRequests;
44 private Thread _remoteAssetServerThread; 44 private Thread _remoteAssetServerThread;
45 private string AssetServerUrl; 45 private string AssetServerUrl;
46 private string AssetSendKey; 46 private string AssetSendKey;
47 47
48 public RemoteAssetServer() 48 public RemoteAssetServer()
49 { 49 {
50 this._assetRequests = new BlockingQueue<ARequest>(); 50 this._assetRequests = new BlockingQueue<ARequest>();
51 this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests)); 51 this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests));
52 this._remoteAssetServerThread.IsBackground = true; 52 this._remoteAssetServerThread.IsBackground = true;
53 this._remoteAssetServerThread.Start(); 53 this._remoteAssetServerThread.Start();
54 MainLog.Instance.Verbose("Remote Asset Server class created"); 54 MainLog.Instance.Verbose("Remote Asset Server class created");
55 } 55 }
56 56
57 public void SetReceiver(IAssetReceiver receiver) 57 public void SetReceiver(IAssetReceiver receiver)
58 { 58 {
59 this._receiver = receiver; 59 this._receiver = receiver;
60 } 60 }
61 61
62 public void RequestAsset(LLUUID assetID, bool isTexture) 62 public void RequestAsset(LLUUID assetID, bool isTexture)
63 { 63 {
64 ARequest req = new ARequest(); 64 ARequest req = new ARequest();
65 req.AssetID = assetID; 65 req.AssetID = assetID;
66 req.IsTexture = isTexture; 66 req.IsTexture = isTexture;
67 this._assetRequests.Enqueue(req); 67 this._assetRequests.Enqueue(req);
68 } 68 }
69 69
70 public void UpdateAsset(AssetBase asset) 70 public void UpdateAsset(AssetBase asset)
71 { 71 {
72 72
73 } 73 }
74 74
75 public void UploadNewAsset(AssetBase asset) 75 public void UploadNewAsset(AssetBase asset)
76 { 76 {
77 Encoding Windows1252Encoding = Encoding.GetEncoding(1252); 77 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
78 string ret = Windows1252Encoding.GetString(asset.Data); 78 string ret = Windows1252Encoding.GetString(asset.Data);
79 byte[] buffer = Windows1252Encoding.GetBytes(ret); 79 byte[] buffer = Windows1252Encoding.GetBytes(ret);
80 WebClient client = new WebClient(); 80 WebClient client = new WebClient();
81 client.UploadData(this.AssetServerUrl + "assets/" + asset.FullID, buffer); 81 client.UploadData(this.AssetServerUrl + "assets/" + asset.FullID, buffer);
82 82
83 } 83 }
84 84
85 public void SetServerInfo(string ServerUrl, string ServerKey) 85 public void SetServerInfo(string ServerUrl, string ServerKey)
86 { 86 {
87 this.AssetServerUrl = ServerUrl; 87 this.AssetServerUrl = ServerUrl;
88 this.AssetSendKey = ServerKey; 88 this.AssetSendKey = ServerKey;
89 } 89 }
90 90
91 private void RunRequests() 91 private void RunRequests()
92 { 92 {
93 while (true) 93 while (true)
94 { 94 {
95 //we need to add support for the asset server not knowing about a requested asset 95 //we need to add support for the asset server not knowing about a requested asset
96 // 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM 96 // 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM
97 ARequest req = this._assetRequests.Dequeue(); 97 ARequest req = this._assetRequests.Dequeue();
98 LLUUID assetID = req.AssetID; 98 LLUUID assetID = req.AssetID;
99 // OpenSim.Framework.Console.MainLog.Instance.Verbose(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID); 99 // OpenSim.Framework.Console.MainLog.Instance.Verbose(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
100 WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID); 100 WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID);
101 WebResponse AssetResponse = AssetLoad.GetResponse(); 101 WebResponse AssetResponse = AssetLoad.GetResponse();
102 byte[] idata = new byte[(int)AssetResponse.ContentLength]; 102 byte[] idata = new byte[(int)AssetResponse.ContentLength];
103 BinaryReader br = new BinaryReader(AssetResponse.GetResponseStream()); 103 BinaryReader br = new BinaryReader(AssetResponse.GetResponseStream());
104 idata = br.ReadBytes((int)AssetResponse.ContentLength); 104 idata = br.ReadBytes((int)AssetResponse.ContentLength);
105 br.Close(); 105 br.Close();
106 106
107 AssetBase asset = new AssetBase(); 107 AssetBase asset = new AssetBase();
108 asset.FullID = assetID; 108 asset.FullID = assetID;
109 asset.Data = idata; 109 asset.Data = idata;
110 _receiver.AssetReceived(asset, req.IsTexture); 110 _receiver.AssetReceived(asset, req.IsTexture);
111 } 111 }
112 } 112 }
113 113
114 public void Close() 114 public void Close()
115 { 115 {
116 116
117 } 117 }
118 } 118 }
119 119
120 public class RemoteAssetPlugin : IAssetPlugin 120 public class RemoteAssetPlugin : IAssetPlugin
121 { 121 {
122 public RemoteAssetPlugin() 122 public RemoteAssetPlugin()
123 { 123 {
124 124
125 } 125 }
126 126
127 public IAssetServer GetAssetServer() 127 public IAssetServer GetAssetServer()
128 { 128 {
129 return (new RemoteAssetServer()); 129 return (new RemoteAssetServer());
130 } 130 }
131 } 131 }
132 132
133} 133}
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
index ce567a9..ecf8e68 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("PhysXplugin")] 36[assembly: AssemblyTitle("PhysXplugin")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("PhysXplugin")] 40[assembly: AssemblyProduct("PhysXplugin")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index f133045..ec406f1 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -1,301 +1,301 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using Axiom.Math; 29using Axiom.Math;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31 31
32namespace OpenSim.Region.Physics.BasicPhysicsPlugin 32namespace OpenSim.Region.Physics.BasicPhysicsPlugin
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// Will be the PhysX plugin but for now will be a very basic physics engine 35 /// Will be the PhysX plugin but for now will be a very basic physics engine
36 /// </summary> 36 /// </summary>
37 public class BasicPhysicsPlugin : IPhysicsPlugin 37 public class BasicPhysicsPlugin : IPhysicsPlugin
38 { 38 {
39 private BasicScene _mScene; 39 private BasicScene _mScene;
40 40
41 public BasicPhysicsPlugin() 41 public BasicPhysicsPlugin()
42 { 42 {
43 43
44 } 44 }
45 45
46 public bool Init() 46 public bool Init()
47 { 47 {
48 return true; 48 return true;
49 } 49 }
50 50
51 public PhysicsScene GetScene() 51 public PhysicsScene GetScene()
52 { 52 {
53 return new BasicScene(); 53 return new BasicScene();
54 } 54 }
55 55
56 public string GetName() 56 public string GetName()
57 { 57 {
58 return("basicphysics"); 58 return("basicphysics");
59 } 59 }
60 60
61 public void Dispose() 61 public void Dispose()
62 { 62 {
63 63
64 } 64 }
65 } 65 }
66 66
67 public class BasicScene :PhysicsScene 67 public class BasicScene :PhysicsScene
68 { 68 {
69 private List<BasicActor> _actors = new List<BasicActor>(); 69 private List<BasicActor> _actors = new List<BasicActor>();
70 private float[] _heightMap; 70 private float[] _heightMap;
71 71
72 public BasicScene() 72 public BasicScene()
73 { 73 {
74 74
75 } 75 }
76 76
77 public override PhysicsActor AddAvatar(PhysicsVector position) 77 public override PhysicsActor AddAvatar(PhysicsVector position)
78 { 78 {
79 BasicActor act = new BasicActor(); 79 BasicActor act = new BasicActor();
80 act.Position = position; 80 act.Position = position;
81 _actors.Add(act); 81 _actors.Add(act);
82 return act; 82 return act;
83 } 83 }
84 84
85 public override void RemoveAvatar(PhysicsActor actor) 85 public override void RemoveAvatar(PhysicsActor actor)
86 { 86 {
87 BasicActor act = (BasicActor)actor; 87 BasicActor act = (BasicActor)actor;
88 if(_actors.Contains(act)) 88 if(_actors.Contains(act))
89 { 89 {
90 _actors.Remove(act); 90 _actors.Remove(act);
91 } 91 }
92 92
93 } 93 }
94 94
95 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 95 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
96 { 96 {
97 return null; 97 return null;
98 } 98 }
99 99
100 public override void Simulate(float timeStep) 100 public override void Simulate(float timeStep)
101 { 101 {
102 foreach (BasicActor actor in _actors) 102 foreach (BasicActor actor in _actors)
103 { 103 {
104 if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) 104 if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256))
105 { 105 {
106 float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; 106 float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f;
107 actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); 107 actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep);
108 actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); 108 actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep);
109 if (actor.Flying) 109 if (actor.Flying)
110 { 110 {
111 if (actor.Position.Z + (actor.Velocity.Z * timeStep) < 111 if (actor.Position.Z + (actor.Velocity.Z * timeStep) <
112 _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) 112 _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2)
113 { 113 {
114 actor.Position.Z = height; 114 actor.Position.Z = height;
115 actor.Velocity.Z = 0; 115 actor.Velocity.Z = 0;
116 } 116 }
117 else 117 else
118 { 118 {
119 actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); 119 actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep);
120 } 120 }
121 } 121 }
122 else 122 else
123 { 123 {
124 actor.Position.Z = height; 124 actor.Position.Z = height;
125 actor.Velocity.Z = 0; 125 actor.Velocity.Z = 0;
126 } 126 }
127 } 127 }
128 else 128 else
129 { 129 {
130 if (actor.Position.Y < 0) 130 if (actor.Position.Y < 0)
131 { 131 {
132 actor.Position.Y = 0; 132 actor.Position.Y = 0;
133 } 133 }
134 else if (actor.Position.Y > 256) 134 else if (actor.Position.Y > 256)
135 { 135 {
136 actor.Position.Y = 256; 136 actor.Position.Y = 256;
137 } 137 }
138 138
139 if (actor.Position.X < 0) 139 if (actor.Position.X < 0)
140 { 140 {
141 actor.Position.X = 0; 141 actor.Position.X = 0;
142 } 142 }
143 if (actor.Position.X > 256) 143 if (actor.Position.X > 256)
144 { 144 {
145 actor.Position.X = 256; 145 actor.Position.X = 256;
146 } 146 }
147 } 147 }
148 //} 148 //}
149 149
150 150
151 151
152 // This code needs sorting out - border crossings etc 152 // This code needs sorting out - border crossings etc
153/* if(actor.Position.X<0) 153/* if(actor.Position.X<0)
154 { 154 {
155 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); 155 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
156 actor.Position.X = 0; 156 actor.Position.X = 0;
157 actor.Velocity.X = 0; 157 actor.Velocity.X = 0;
158 } 158 }
159 if(actor.Position.Y < 0) 159 if(actor.Position.Y < 0)
160 { 160 {
161 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); 161 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
162 actor.Position.Y = 0; 162 actor.Position.Y = 0;
163 actor.Velocity.Y = 0; 163 actor.Velocity.Y = 0;
164 } 164 }
165 if(actor.Position.X > 255) 165 if(actor.Position.X > 255)
166 { 166 {
167 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); 167 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
168 actor.Position.X = 255; 168 actor.Position.X = 255;
169 actor.Velocity.X = 0; 169 actor.Velocity.X = 0;
170 } 170 }
171 if(actor.Position.Y > 255) 171 if(actor.Position.Y > 255)
172 { 172 {
173 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); 173 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
174 actor.Position.Y = 255; 174 actor.Position.Y = 255;
175 actor.Velocity.X = 0; 175 actor.Velocity.X = 0;
176 }*/ 176 }*/
177 } 177 }
178 } 178 }
179 179
180 public override void GetResults() 180 public override void GetResults()
181 { 181 {
182 182
183 } 183 }
184 184
185 public override bool IsThreaded 185 public override bool IsThreaded
186 { 186 {
187 get 187 get
188 { 188 {
189 return(false); // for now we won't be multithreaded 189 return(false); // for now we won't be multithreaded
190 } 190 }
191 } 191 }
192 192
193 public override void SetTerrain(float[] heightMap) 193 public override void SetTerrain(float[] heightMap)
194 { 194 {
195 this._heightMap = heightMap; 195 this._heightMap = heightMap;
196 } 196 }
197 197
198 public override void DeleteTerrain() 198 public override void DeleteTerrain()
199 { 199 {
200 200
201 } 201 }
202 } 202 }
203 203
204 public class BasicActor : PhysicsActor 204 public class BasicActor : PhysicsActor
205 { 205 {
206 private PhysicsVector _position; 206 private PhysicsVector _position;
207 private PhysicsVector _velocity; 207 private PhysicsVector _velocity;
208 private PhysicsVector _acceleration; 208 private PhysicsVector _acceleration;
209 private bool flying; 209 private bool flying;
210 public BasicActor() 210 public BasicActor()
211 { 211 {
212 _velocity = new PhysicsVector(); 212 _velocity = new PhysicsVector();
213 _position = new PhysicsVector(); 213 _position = new PhysicsVector();
214 _acceleration = new PhysicsVector(); 214 _acceleration = new PhysicsVector();
215 } 215 }
216 216
217 public override bool Flying 217 public override bool Flying
218 { 218 {
219 get 219 get
220 { 220 {
221 return flying; 221 return flying;
222 } 222 }
223 set 223 set
224 { 224 {
225 flying= value; 225 flying= value;
226 } 226 }
227 } 227 }
228 228
229 public override PhysicsVector Position 229 public override PhysicsVector Position
230 { 230 {
231 get 231 get
232 { 232 {
233 return _position; 233 return _position;
234 } 234 }
235 set 235 set
236 { 236 {
237 _position = value; 237 _position = value;
238 } 238 }
239 } 239 }
240 240
241 public override PhysicsVector Velocity 241 public override PhysicsVector Velocity
242 { 242 {
243 get 243 get
244 { 244 {
245 return _velocity; 245 return _velocity;
246 } 246 }
247 set 247 set
248 { 248 {
249 _velocity = value; 249 _velocity = value;
250 } 250 }
251 } 251 }
252 252
253 public override Quaternion Orientation 253 public override Quaternion Orientation
254 { 254 {
255 get 255 get
256 { 256 {
257 return Quaternion.Identity; 257 return Quaternion.Identity;
258 } 258 }
259 set 259 set
260 { 260 {
261 261
262 } 262 }
263 } 263 }
264 264
265 public override PhysicsVector Acceleration 265 public override PhysicsVector Acceleration
266 { 266 {
267 get 267 get
268 { 268 {
269 return _acceleration; 269 return _acceleration;
270 } 270 }
271 271
272 } 272 }
273 273
274 public override bool Kinematic 274 public override bool Kinematic
275 { 275 {
276 get 276 get
277 { 277 {
278 return true; 278 return true;
279 } 279 }
280 set 280 set
281 { 281 {
282 282
283 } 283 }
284 } 284 }
285 public void SetAcceleration (PhysicsVector accel) 285 public void SetAcceleration (PhysicsVector accel)
286 { 286 {
287 this._acceleration = accel; 287 this._acceleration = accel;
288 } 288 }
289 289
290 public override void AddForce(PhysicsVector force) 290 public override void AddForce(PhysicsVector force)
291 { 291 {
292 292
293 } 293 }
294 294
295 public override void SetMomentum(PhysicsVector momentum) 295 public override void SetMomentum(PhysicsVector momentum)
296 { 296 {
297 297
298 } 298 }
299 } 299 }
300 300
301} 301}
diff --git a/OpenSim/Region/Physics/BulletXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BulletXPlugin/AssemblyInfo.cs
index bda35f7..42ccdff 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("BulletXPlugin")] 36[assembly: AssemblyTitle("BulletXPlugin")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("BulletXPlugin")] 40[assembly: AssemblyProduct("BulletXPlugin")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.0.0")] 56[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index 1ca5efe..383dbc0 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -1,534 +1,534 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28#region References 28#region References
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using OpenSim.Physics.Manager; 31using OpenSim.Physics.Manager;
32using Axiom.Math; 32using Axiom.Math;
33//Specific References for BulletXPlugin 33//Specific References for BulletXPlugin
34using MonoXnaCompactMaths; 34using MonoXnaCompactMaths;
35using XnaDevRu.BulletX; 35using XnaDevRu.BulletX;
36using XnaDevRu.BulletX.Dynamics; 36using XnaDevRu.BulletX.Dynamics;
37#endregion 37#endregion
38 38
39namespace OpenSim.Region.Physics.BulletXPlugin 39namespace OpenSim.Region.Physics.BulletXPlugin
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// This Class converts objects and types for BulletX 42 /// This Class converts objects and types for BulletX
43 /// </summary> 43 /// </summary>
44 public class BulletXConversions 44 public class BulletXConversions
45 { 45 {
46 public static MonoXnaCompactMaths.Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) 46 public static MonoXnaCompactMaths.Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector)
47 { 47 {
48 return new MonoXnaCompactMaths.Vector3(physicsVector.X, physicsVector.Y, physicsVector.Z); 48 return new MonoXnaCompactMaths.Vector3(physicsVector.X, physicsVector.Y, physicsVector.Z);
49 } 49 }
50 public static void PhysicsVectorToXnaVector3(PhysicsVector physicsVector, out MonoXnaCompactMaths.Vector3 XnaVector3) 50 public static void PhysicsVectorToXnaVector3(PhysicsVector physicsVector, out MonoXnaCompactMaths.Vector3 XnaVector3)
51 { 51 {
52 XnaVector3.X = physicsVector.X; 52 XnaVector3.X = physicsVector.X;
53 XnaVector3.Y = physicsVector.Y; 53 XnaVector3.Y = physicsVector.Y;
54 XnaVector3.Z = physicsVector.Z; 54 XnaVector3.Z = physicsVector.Z;
55 } 55 }
56 public static PhysicsVector XnaVector3ToPhysicsVector(MonoXnaCompactMaths.Vector3 xnaVector3) 56 public static PhysicsVector XnaVector3ToPhysicsVector(MonoXnaCompactMaths.Vector3 xnaVector3)
57 { 57 {
58 return new PhysicsVector(xnaVector3.X, xnaVector3.Y, xnaVector3.Z); 58 return new PhysicsVector(xnaVector3.X, xnaVector3.Y, xnaVector3.Z);
59 } 59 }
60 /*public static void XnaVector3ToPhysicsVector(MonoXnaCompactMaths.Vector3 xnaVector3, out PhysicsVector physicsVector) 60 /*public static void XnaVector3ToPhysicsVector(MonoXnaCompactMaths.Vector3 xnaVector3, out PhysicsVector physicsVector)
61 { 61 {
62 xnaVector3.X = physicsVector.X; 62 xnaVector3.X = physicsVector.X;
63 xnaVector3.Y = physicsVector.Y; 63 xnaVector3.Y = physicsVector.Y;
64 xnaVector3.Z = physicsVector.Z; 64 xnaVector3.Z = physicsVector.Z;
65 }*/ 65 }*/
66 #region Axiom and Xna 66 #region Axiom and Xna
67 ///// <summary> 67 ///// <summary>
68 ///// BTW maybe some conversions will be a simply converion that it doesn't require this class, but i don't know 68 ///// BTW maybe some conversions will be a simply converion that it doesn't require this class, but i don't know
69 ///// </summary> 69 ///// </summary>
70 ///// <param name="AxiomVector3"></param> 70 ///// <param name="AxiomVector3"></param>
71 ///// <returns></returns> 71 ///// <returns></returns>
72 //public static MonoXnaCompactMaths.Vector3 Vector3AxiomToXna(Axiom.Math.Vector3 AxiomVector3) 72 //public static MonoXnaCompactMaths.Vector3 Vector3AxiomToXna(Axiom.Math.Vector3 AxiomVector3)
73 //{ 73 //{
74 // return new MonoXnaCompactMaths.Vector3(AxiomVector3.x, AxiomVector3.y, AxiomVector3.z); 74 // return new MonoXnaCompactMaths.Vector3(AxiomVector3.x, AxiomVector3.y, AxiomVector3.z);
75 //} 75 //}
76 #endregion 76 #endregion
77 } 77 }
78 /// <summary> 78 /// <summary>
79 /// PhysicsPlugin Class for BulletX 79 /// PhysicsPlugin Class for BulletX
80 /// </summary> 80 /// </summary>
81 public class BulletXPlugin : IPhysicsPlugin 81 public class BulletXPlugin : IPhysicsPlugin
82 { 82 {
83 private BulletXScene _mScene; 83 private BulletXScene _mScene;
84 84
85 public BulletXPlugin() 85 public BulletXPlugin()
86 { 86 {
87 } 87 }
88 public bool Init() 88 public bool Init()
89 { 89 {
90 return true; 90 return true;
91 } 91 }
92 public PhysicsScene GetScene() 92 public PhysicsScene GetScene()
93 { 93 {
94 if (_mScene == null) 94 if (_mScene == null)
95 { 95 {
96 _mScene = new BulletXScene(); 96 _mScene = new BulletXScene();
97 } 97 }
98 return (_mScene); 98 return (_mScene);
99 } 99 }
100 public string GetName() 100 public string GetName()
101 { 101 {
102 return ("BulletXEngine"); 102 return ("BulletXEngine");
103 } 103 }
104 public void Dispose() 104 public void Dispose()
105 { 105 {
106 } 106 }
107 } 107 }
108 /// <summary> 108 /// <summary>
109 /// PhysicsScene Class for BulletX 109 /// PhysicsScene Class for BulletX
110 /// </summary> 110 /// </summary>
111 public class BulletXScene : PhysicsScene 111 public class BulletXScene : PhysicsScene
112 { 112 {
113 public DiscreteDynamicsWorld ddWorld; 113 public DiscreteDynamicsWorld ddWorld;
114 private CollisionDispatcher cDispatcher; 114 private CollisionDispatcher cDispatcher;
115 private OverlappingPairCache opCache; 115 private OverlappingPairCache opCache;
116 private SequentialImpulseConstraintSolver sicSolver; 116 private SequentialImpulseConstraintSolver sicSolver;
117 117
118 private const int minXY = 0; 118 private const int minXY = 0;
119 private const int minZ = 0; 119 private const int minZ = 0;
120 private const int maxXY = 256; 120 private const int maxXY = 256;
121 private const int maxZ = 4096; 121 private const int maxZ = 4096;
122 private const int maxHandles = 32766; //Why? I don't know 122 private const int maxHandles = 32766; //Why? I don't know
123 private static float gravity = 9.8f; 123 private static float gravity = 9.8f;
124 private static float heightLevel0 = 77.0f; 124 private static float heightLevel0 = 77.0f;
125 private static float heightLevel1 = 200.0f; 125 private static float heightLevel1 = 200.0f;
126 private static float lowGravityFactor = 0.2f; 126 private static float lowGravityFactor = 0.2f;
127 127
128 private float[] _heightmap; 128 private float[] _heightmap;
129 private List<BulletXCharacter> _characters = new List<BulletXCharacter>(); 129 private List<BulletXCharacter> _characters = new List<BulletXCharacter>();
130 130
131 public static float Gravity { get { return gravity; } } 131 public static float Gravity { get { return gravity; } }
132 public static float HeightLevel0 { get { return heightLevel0; } } 132 public static float HeightLevel0 { get { return heightLevel0; } }
133 public static float HeightLevel1 { get { return heightLevel1; } } 133 public static float HeightLevel1 { get { return heightLevel1; } }
134 public static float LowGravityFactor { get { return lowGravityFactor; } } 134 public static float LowGravityFactor { get { return lowGravityFactor; } }
135 135
136 public BulletXScene() 136 public BulletXScene()
137 { 137 {
138 cDispatcher = new CollisionDispatcher(); 138 cDispatcher = new CollisionDispatcher();
139 MonoXnaCompactMaths.Vector3 worldMinDim = new MonoXnaCompactMaths.Vector3((float)minXY, (float)minXY, (float)minZ); 139 MonoXnaCompactMaths.Vector3 worldMinDim = new MonoXnaCompactMaths.Vector3((float)minXY, (float)minXY, (float)minZ);
140 MonoXnaCompactMaths.Vector3 worldMaxDim = new MonoXnaCompactMaths.Vector3((float)maxXY, (float)maxXY, (float)maxZ); 140 MonoXnaCompactMaths.Vector3 worldMaxDim = new MonoXnaCompactMaths.Vector3((float)maxXY, (float)maxXY, (float)maxZ);
141 opCache = new AxisSweep3(worldMinDim, worldMaxDim, maxHandles); 141 opCache = new AxisSweep3(worldMinDim, worldMaxDim, maxHandles);
142 sicSolver = new SequentialImpulseConstraintSolver(); 142 sicSolver = new SequentialImpulseConstraintSolver();
143 143
144 ddWorld = new DiscreteDynamicsWorld(cDispatcher, opCache, sicSolver); 144 ddWorld = new DiscreteDynamicsWorld(cDispatcher, opCache, sicSolver);
145 ddWorld.Gravity = new MonoXnaCompactMaths.Vector3(0, 0, -gravity); 145 ddWorld.Gravity = new MonoXnaCompactMaths.Vector3(0, 0, -gravity);
146 146
147 this._heightmap = new float[65536]; 147 this._heightmap = new float[65536];
148 } 148 }
149 149
150 public override PhysicsActor AddAvatar(PhysicsVector position) 150 public override PhysicsActor AddAvatar(PhysicsVector position)
151 { 151 {
152 PhysicsVector pos = new PhysicsVector(); 152 PhysicsVector pos = new PhysicsVector();
153 pos.X = position.X; 153 pos.X = position.X;
154 pos.Y = position.Y; 154 pos.Y = position.Y;
155 pos.Z = position.Z + 20; 155 pos.Z = position.Z + 20;
156 BulletXCharacter newAv = new BulletXCharacter(this, pos); 156 BulletXCharacter newAv = new BulletXCharacter(this, pos);
157 this._characters.Add(newAv); 157 this._characters.Add(newAv);
158 return newAv; 158 return newAv;
159 } 159 }
160 160
161 public override void RemoveAvatar(PhysicsActor actor) 161 public override void RemoveAvatar(PhysicsActor actor)
162 { 162 {
163 163
164 } 164 }
165 165
166 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 166 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
167 { 167 {
168 PhysicsVector pos = new PhysicsVector(); 168 PhysicsVector pos = new PhysicsVector();
169 pos.X = position.X; 169 pos.X = position.X;
170 pos.Y = position.Y; 170 pos.Y = position.Y;
171 pos.Z = position.Z; 171 pos.Z = position.Z;
172 PhysicsVector siz = new PhysicsVector(); 172 PhysicsVector siz = new PhysicsVector();
173 siz.X = size.X; 173 siz.X = size.X;
174 siz.Y = size.Y; 174 siz.Y = size.Y;
175 siz.Z = size.Z; 175 siz.Z = size.Z;
176 return new BulletXPrim(); 176 return new BulletXPrim();
177 } 177 }
178 178
179 public override void Simulate(float timeStep) 179 public override void Simulate(float timeStep)
180 { 180 {
181 foreach (BulletXCharacter actor in _characters) 181 foreach (BulletXCharacter actor in _characters)
182 { 182 {
183 actor.Move(timeStep); 183 actor.Move(timeStep);
184 184
185 } 185 }
186 ddWorld.StepSimulation(timeStep, 0, timeStep); 186 ddWorld.StepSimulation(timeStep, 0, timeStep);
187 foreach (BulletXCharacter actor in _characters) 187 foreach (BulletXCharacter actor in _characters)
188 { 188 {
189 actor.ValidateHeight(this._heightmap[ 189 actor.ValidateHeight(this._heightmap[
190 (int)Math.Round(actor.RigidBodyHorizontalPosition.x) * 256 190 (int)Math.Round(actor.RigidBodyHorizontalPosition.x) * 256
191 + (int)Math.Round(actor.RigidBodyHorizontalPosition.y)]); 191 + (int)Math.Round(actor.RigidBodyHorizontalPosition.y)]);
192 } 192 }
193 foreach (BulletXCharacter actor in _characters) 193 foreach (BulletXCharacter actor in _characters)
194 { 194 {
195 actor.UpdatePosition(); 195 actor.UpdatePosition();
196 } 196 }
197 197
198 } 198 }
199 199
200 public override void GetResults() 200 public override void GetResults()
201 { 201 {
202 202
203 } 203 }
204 204
205 public override bool IsThreaded 205 public override bool IsThreaded
206 { 206 {
207 get 207 get
208 { 208 {
209 return (false); // for now we won't be multithreaded 209 return (false); // for now we won't be multithreaded
210 } 210 }
211 } 211 }
212 212
213 public override void SetTerrain(float[] heightMap) 213 public override void SetTerrain(float[] heightMap)
214 { 214 {
215 //As the same as ODE, heightmap (x,y) must be swapped for BulletX 215 //As the same as ODE, heightmap (x,y) must be swapped for BulletX
216 for (int i = 0; i < 65536; i++) 216 for (int i = 0; i < 65536; i++)
217 { 217 {
218 // this._heightmap[i] = (double)heightMap[i]; 218 // this._heightmap[i] = (double)heightMap[i];
219 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...) 219 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...)
220 int x = i & 0xff; 220 int x = i & 0xff;
221 int y = i >> 8; 221 int y = i >> 8;
222 this._heightmap[i] = heightMap[x * 256 + y]; 222 this._heightmap[i] = heightMap[x * 256 + y];
223 } 223 }
224 } 224 }
225 225
226 public override void DeleteTerrain() 226 public override void DeleteTerrain()
227 { 227 {
228 228
229 } 229 }
230 } 230 }
231 /// <summary> 231 /// <summary>
232 /// PhysicsActor Character Class for BulletX 232 /// PhysicsActor Character Class for BulletX
233 /// </summary> 233 /// </summary>
234 public class BulletXCharacter : PhysicsActor 234 public class BulletXCharacter : PhysicsActor
235 { 235 {
236 private PhysicsVector _position; 236 private PhysicsVector _position;
237 private PhysicsVector _velocity; 237 private PhysicsVector _velocity;
238 private PhysicsVector _acceleration; 238 private PhysicsVector _acceleration;
239 private bool flying; 239 private bool flying;
240 private RigidBody rigidBody; 240 private RigidBody rigidBody;
241 public Axiom.Math.Vector2 RigidBodyHorizontalPosition 241 public Axiom.Math.Vector2 RigidBodyHorizontalPosition
242 { 242 {
243 get 243 get
244 { 244 {
245 return new Axiom.Math.Vector2(this.rigidBody.CenterOfMassPosition.X, this.rigidBody.CenterOfMassPosition.Y); 245 return new Axiom.Math.Vector2(this.rigidBody.CenterOfMassPosition.X, this.rigidBody.CenterOfMassPosition.Y);
246 } 246 }
247 } 247 }
248 public BulletXCharacter(BulletXScene parent_scene, PhysicsVector pos) 248 public BulletXCharacter(BulletXScene parent_scene, PhysicsVector pos)
249 { 249 {
250 _velocity = new PhysicsVector(); 250 _velocity = new PhysicsVector();
251 _position = pos; 251 _position = pos;
252 _acceleration = new PhysicsVector(); 252 _acceleration = new PhysicsVector();
253 float _mass = 50.0f; //This depends of avatar's dimensions 253 float _mass = 50.0f; //This depends of avatar's dimensions
254 Matrix _startTransform = Matrix.Identity; 254 Matrix _startTransform = Matrix.Identity;
255 _startTransform.Translation = BulletXConversions.PhysicsVectorToXnaVector3(pos); 255 _startTransform.Translation = BulletXConversions.PhysicsVectorToXnaVector3(pos);
256 Matrix _centerOfMassOffset = Matrix.Identity; 256 Matrix _centerOfMassOffset = Matrix.Identity;
257 CollisionShape _collisionShape = new BoxShape(new MonoXnaCompactMaths.Vector3(0.5f, 0.5f, 1.60f)); 257 CollisionShape _collisionShape = new BoxShape(new MonoXnaCompactMaths.Vector3(0.5f, 0.5f, 1.60f));
258 DefaultMotionState _motionState = new DefaultMotionState(_startTransform, _centerOfMassOffset); 258 DefaultMotionState _motionState = new DefaultMotionState(_startTransform, _centerOfMassOffset);
259 MonoXnaCompactMaths.Vector3 _localInertia = new MonoXnaCompactMaths.Vector3(); 259 MonoXnaCompactMaths.Vector3 _localInertia = new MonoXnaCompactMaths.Vector3();
260 _collisionShape.CalculateLocalInertia(_mass, out _localInertia); //Always when mass > 0 260 _collisionShape.CalculateLocalInertia(_mass, out _localInertia); //Always when mass > 0
261 261
262 //The next values might change 262 //The next values might change
263 float _linearDamping = 0.0f; 263 float _linearDamping = 0.0f;
264 float _angularDamping = 0.0f; 264 float _angularDamping = 0.0f;
265 float _friction = 0.5f; 265 float _friction = 0.5f;
266 float _restitution = 0.0f; 266 float _restitution = 0.0f;
267 267
268 rigidBody = new RigidBody(_mass, _motionState, _collisionShape, _localInertia, _linearDamping, _angularDamping, _friction, _restitution); 268 rigidBody = new RigidBody(_mass, _motionState, _collisionShape, _localInertia, _linearDamping, _angularDamping, _friction, _restitution);
269 rigidBody.ActivationState = ActivationState.DisableDeactivation; 269 rigidBody.ActivationState = ActivationState.DisableDeactivation;
270 270
271 parent_scene.ddWorld.AddRigidBody(rigidBody); 271 parent_scene.ddWorld.AddRigidBody(rigidBody);
272 } 272 }
273 273
274 public override bool Flying 274 public override bool Flying
275 { 275 {
276 get 276 get
277 { 277 {
278 return flying; 278 return flying;
279 } 279 }
280 set 280 set
281 { 281 {
282 flying = value; 282 flying = value;
283 } 283 }
284 } 284 }
285 285
286 public override PhysicsVector Position 286 public override PhysicsVector Position
287 { 287 {
288 get 288 get
289 { 289 {
290 return _position; 290 return _position;
291 } 291 }
292 set 292 set
293 { 293 {
294 _position = value; 294 _position = value;
295 } 295 }
296 } 296 }
297 297
298 public override PhysicsVector Velocity 298 public override PhysicsVector Velocity
299 { 299 {
300 get 300 get
301 { 301 {
302 return _velocity; 302 return _velocity;
303 } 303 }
304 set 304 set
305 { 305 {
306 _velocity = value; 306 _velocity = value;
307 } 307 }
308 } 308 }
309 309
310 public override bool Kinematic 310 public override bool Kinematic
311 { 311 {
312 get 312 get
313 { 313 {
314 return false; 314 return false;
315 } 315 }
316 set 316 set
317 { 317 {
318 318
319 } 319 }
320 } 320 }
321 321
322 public override Axiom.Math.Quaternion Orientation 322 public override Axiom.Math.Quaternion Orientation
323 { 323 {
324 get 324 get
325 { 325 {
326 return Axiom.Math.Quaternion.Identity; 326 return Axiom.Math.Quaternion.Identity;
327 } 327 }
328 set 328 set
329 { 329 {
330 330
331 } 331 }
332 } 332 }
333 333
334 public override PhysicsVector Acceleration 334 public override PhysicsVector Acceleration
335 { 335 {
336 get 336 get
337 { 337 {
338 return _acceleration; 338 return _acceleration;
339 } 339 }
340 340
341 } 341 }
342 public void SetAcceleration(PhysicsVector accel) 342 public void SetAcceleration(PhysicsVector accel)
343 { 343 {
344 this._acceleration = accel; 344 this._acceleration = accel;
345 } 345 }
346 346
347 public override void AddForce(PhysicsVector force) 347 public override void AddForce(PhysicsVector force)
348 { 348 {
349 349
350 } 350 }
351 351
352 public override void SetMomentum(PhysicsVector momentum) 352 public override void SetMomentum(PhysicsVector momentum)
353 { 353 {
354 354
355 } 355 }
356 356
357 public void Move(float timeStep) 357 public void Move(float timeStep)
358 { 358 {
359 MonoXnaCompactMaths.Vector3 vec = new MonoXnaCompactMaths.Vector3(); 359 MonoXnaCompactMaths.Vector3 vec = new MonoXnaCompactMaths.Vector3();
360 //if (this._velocity.X == 0.0f) 360 //if (this._velocity.X == 0.0f)
361 // vec.X = this.rigidBody.LinearVelocity.X; //current velocity 361 // vec.X = this.rigidBody.LinearVelocity.X; //current velocity
362 //else 362 //else
363 vec.X = this._velocity.X; //overrides current velocity 363 vec.X = this._velocity.X; //overrides current velocity
364 364
365 //if (this._velocity.Y == 0.0f) 365 //if (this._velocity.Y == 0.0f)
366 // vec.Y = this.rigidBody.LinearVelocity.Y; //current velocity 366 // vec.Y = this.rigidBody.LinearVelocity.Y; //current velocity
367 //else 367 //else
368 vec.Y = this._velocity.Y; //overrides current velocity 368 vec.Y = this._velocity.Y; //overrides current velocity
369 369
370 float nextZVelocity; 370 float nextZVelocity;
371 //if (this._velocity.Z == 0.0f) 371 //if (this._velocity.Z == 0.0f)
372 // nextZVelocity = this.rigidBody.LinearVelocity.Z; //current velocity 372 // nextZVelocity = this.rigidBody.LinearVelocity.Z; //current velocity
373 //else 373 //else
374 nextZVelocity = this._velocity.Z; //overrides current velocity 374 nextZVelocity = this._velocity.Z; //overrides current velocity
375 375
376 if (flying) 376 if (flying)
377 { 377 {
378 //Antigravity with movement 378 //Antigravity with movement
379 if (this._position.Z <= BulletXScene.HeightLevel0) 379 if (this._position.Z <= BulletXScene.HeightLevel0)
380 { 380 {
381 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep; 381 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep;
382 } 382 }
383 //Lowgravity with movement 383 //Lowgravity with movement
384 else if((this._position.Z > BulletXScene.HeightLevel0) 384 else if((this._position.Z > BulletXScene.HeightLevel0)
385 && (this._position.Z <= BulletXScene.HeightLevel1)) 385 && (this._position.Z <= BulletXScene.HeightLevel1))
386 { 386 {
387 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor); 387 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor);
388 } 388 }
389 //Lowgravity with... 389 //Lowgravity with...
390 else if (this._position.Z > BulletXScene.HeightLevel1) 390 else if (this._position.Z > BulletXScene.HeightLevel1)
391 { 391 {
392 if(nextZVelocity > 0) //no movement 392 if(nextZVelocity > 0) //no movement
393 vec.Z = BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor); 393 vec.Z = BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor);
394 else 394 else
395 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor); 395 vec.Z = nextZVelocity + BulletXScene.Gravity * timeStep * (1.0f - BulletXScene.LowGravityFactor);
396 396
397 } 397 }
398 } 398 }
399 else 399 else
400 { 400 {
401 vec.Z = nextZVelocity; 401 vec.Z = nextZVelocity;
402 } 402 }
403 rigidBody.LinearVelocity = vec; 403 rigidBody.LinearVelocity = vec;
404 } 404 }
405 405
406 public void UpdatePosition() 406 public void UpdatePosition()
407 { 407 {
408 this._position = BulletXConversions.XnaVector3ToPhysicsVector(rigidBody.CenterOfMassPosition); 408 this._position = BulletXConversions.XnaVector3ToPhysicsVector(rigidBody.CenterOfMassPosition);
409 } 409 }
410 410
411 //This validation is very basic 411 //This validation is very basic
412 internal void ValidateHeight(float heighmapPositionValue) 412 internal void ValidateHeight(float heighmapPositionValue)
413 { 413 {
414 if (rigidBody.CenterOfMassPosition.Z < heighmapPositionValue) 414 if (rigidBody.CenterOfMassPosition.Z < heighmapPositionValue)
415 { 415 {
416 Matrix m = rigidBody.WorldTransform; 416 Matrix m = rigidBody.WorldTransform;
417 MonoXnaCompactMaths.Vector3 v3 = m.Translation; 417 MonoXnaCompactMaths.Vector3 v3 = m.Translation;
418 v3.Z = heighmapPositionValue; 418 v3.Z = heighmapPositionValue;
419 m.Translation = v3; 419 m.Translation = v3;
420 rigidBody.WorldTransform = m; 420 rigidBody.WorldTransform = m;
421 } 421 }
422 } 422 }
423 } 423 }
424 /// <summary> 424 /// <summary>
425 /// PhysicsActor Prim Class for BulletX 425 /// PhysicsActor Prim Class for BulletX
426 /// </summary> 426 /// </summary>
427 public class BulletXPrim : PhysicsActor 427 public class BulletXPrim : PhysicsActor
428 { 428 {
429 private PhysicsVector _position; 429 private PhysicsVector _position;
430 private PhysicsVector _velocity; 430 private PhysicsVector _velocity;
431 private PhysicsVector _acceleration; 431 private PhysicsVector _acceleration;
432 432
433 public BulletXPrim() 433 public BulletXPrim()
434 { 434 {
435 _velocity = new PhysicsVector(); 435 _velocity = new PhysicsVector();
436 _position = new PhysicsVector(); 436 _position = new PhysicsVector();
437 _acceleration = new PhysicsVector(); 437 _acceleration = new PhysicsVector();
438 } 438 }
439 public override bool Flying 439 public override bool Flying
440 { 440 {
441 get 441 get
442 { 442 {
443 return false; //no flying prims for you 443 return false; //no flying prims for you
444 } 444 }
445 set 445 set
446 { 446 {
447 447
448 } 448 }
449 } 449 }
450 public override PhysicsVector Position 450 public override PhysicsVector Position
451 { 451 {
452 get 452 get
453 { 453 {
454 PhysicsVector pos = new PhysicsVector(); 454 PhysicsVector pos = new PhysicsVector();
455 // PhysicsVector vec = this._prim.Position; 455 // PhysicsVector vec = this._prim.Position;
456 //pos.X = vec.X; 456 //pos.X = vec.X;
457 //pos.Y = vec.Y; 457 //pos.Y = vec.Y;
458 //pos.Z = vec.Z; 458 //pos.Z = vec.Z;
459 return pos; 459 return pos;
460 460
461 } 461 }
462 set 462 set
463 { 463 {
464 /*PhysicsVector vec = value; 464 /*PhysicsVector vec = value;
465 PhysicsVector pos = new PhysicsVector(); 465 PhysicsVector pos = new PhysicsVector();
466 pos.X = vec.X; 466 pos.X = vec.X;
467 pos.Y = vec.Y; 467 pos.Y = vec.Y;
468 pos.Z = vec.Z; 468 pos.Z = vec.Z;
469 this._prim.Position = pos;*/ 469 this._prim.Position = pos;*/
470 } 470 }
471 } 471 }
472 472
473 public override PhysicsVector Velocity 473 public override PhysicsVector Velocity
474 { 474 {
475 get 475 get
476 { 476 {
477 return _velocity; 477 return _velocity;
478 } 478 }
479 set 479 set
480 { 480 {
481 _velocity = value; 481 _velocity = value;
482 } 482 }
483 } 483 }
484 484
485 public override bool Kinematic 485 public override bool Kinematic
486 { 486 {
487 get 487 get
488 { 488 {
489 return false; 489 return false;
490 //return this._prim.Kinematic; 490 //return this._prim.Kinematic;
491 } 491 }
492 set 492 set
493 { 493 {
494 //this._prim.Kinematic = value; 494 //this._prim.Kinematic = value;
495 } 495 }
496 } 496 }
497 497
498 public override Axiom.Math.Quaternion Orientation 498 public override Axiom.Math.Quaternion Orientation
499 { 499 {
500 get 500 get
501 { 501 {
502 Axiom.Math.Quaternion res = new Axiom.Math.Quaternion(); 502 Axiom.Math.Quaternion res = new Axiom.Math.Quaternion();
503 return res; 503 return res;
504 } 504 }
505 set 505 set
506 { 506 {
507 507
508 } 508 }
509 } 509 }
510 510
511 public override PhysicsVector Acceleration 511 public override PhysicsVector Acceleration
512 { 512 {
513 get 513 get
514 { 514 {
515 return _acceleration; 515 return _acceleration;
516 } 516 }
517 517
518 } 518 }
519 public void SetAcceleration(PhysicsVector accel) 519 public void SetAcceleration(PhysicsVector accel)
520 { 520 {
521 this._acceleration = accel; 521 this._acceleration = accel;
522 } 522 }
523 523
524 public override void AddForce(PhysicsVector force) 524 public override void AddForce(PhysicsVector force)
525 { 525 {
526 526
527 } 527 }
528 528
529 public override void SetMomentum(PhysicsVector momentum) 529 public override void SetMomentum(PhysicsVector momentum)
530 { 530 {
531 531
532 } 532 }
533 } 533 }
534} 534}
diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
index 9415db9..27b467f 100644
--- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("PhysicsManager")] 36[assembly: AssemblyTitle("PhysicsManager")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("PhysicsManager")] 40[assembly: AssemblyProduct("PhysicsManager")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index da3b560..2c2c8dd 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -1,167 +1,167 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using Axiom.Math; 28using Axiom.Math;
29 29
30namespace OpenSim.Physics.Manager 30namespace OpenSim.Physics.Manager
31{ 31{
32 public delegate void PositionUpdate(PhysicsVector position); 32 public delegate void PositionUpdate(PhysicsVector position);
33 public delegate void VelocityUpdate(PhysicsVector velocity); 33 public delegate void VelocityUpdate(PhysicsVector velocity);
34 public delegate void OrientationUpdate(Quaternion orientation); 34 public delegate void OrientationUpdate(Quaternion orientation);
35 35
36 public abstract class PhysicsActor 36 public abstract class PhysicsActor
37 { 37 {
38 public event PositionUpdate OnPositionUpdate; 38 public event PositionUpdate OnPositionUpdate;
39 public event VelocityUpdate OnVelocityUpdate; 39 public event VelocityUpdate OnVelocityUpdate;
40 public event OrientationUpdate OnOrientationUpdate; 40 public event OrientationUpdate OnOrientationUpdate;
41 41
42 public static PhysicsActor Null 42 public static PhysicsActor Null
43 { 43 {
44 get 44 get
45 { 45 {
46 return new NullPhysicsActor(); 46 return new NullPhysicsActor();
47 } 47 }
48 } 48 }
49 49
50 public abstract PhysicsVector Position 50 public abstract PhysicsVector Position
51 { 51 {
52 get; 52 get;
53 set; 53 set;
54 } 54 }
55 55
56 public abstract PhysicsVector Velocity 56 public abstract PhysicsVector Velocity
57 { 57 {
58 get; 58 get;
59 set; 59 set;
60 } 60 }
61 61
62 public abstract PhysicsVector Acceleration 62 public abstract PhysicsVector Acceleration
63 { 63 {
64 get; 64 get;
65 } 65 }
66 66
67 public abstract Quaternion Orientation 67 public abstract Quaternion Orientation
68 { 68 {
69 get; 69 get;
70 set; 70 set;
71 } 71 }
72 72
73 public abstract bool Flying 73 public abstract bool Flying
74 { 74 {
75 get; 75 get;
76 set; 76 set;
77 } 77 }
78 78
79 public abstract bool Kinematic 79 public abstract bool Kinematic
80 { 80 {
81 get; 81 get;
82 set; 82 set;
83 } 83 }
84 84
85 public abstract void AddForce(PhysicsVector force); 85 public abstract void AddForce(PhysicsVector force);
86 86
87 public abstract void SetMomentum(PhysicsVector momentum); 87 public abstract void SetMomentum(PhysicsVector momentum);
88 } 88 }
89 89
90 public class NullPhysicsActor : PhysicsActor 90 public class NullPhysicsActor : PhysicsActor
91 { 91 {
92 public override PhysicsVector Position 92 public override PhysicsVector Position
93 { 93 {
94 get 94 get
95 { 95 {
96 return PhysicsVector.Zero; 96 return PhysicsVector.Zero;
97 } 97 }
98 set 98 set
99 { 99 {
100 return; 100 return;
101 } 101 }
102 } 102 }
103 103
104 public override PhysicsVector Velocity 104 public override PhysicsVector Velocity
105 { 105 {
106 get 106 get
107 { 107 {
108 return PhysicsVector.Zero; 108 return PhysicsVector.Zero;
109 } 109 }
110 set 110 set
111 { 111 {
112 return; 112 return;
113 } 113 }
114 } 114 }
115 115
116 public override Quaternion Orientation 116 public override Quaternion Orientation
117 { 117 {
118 get 118 get
119 { 119 {
120 return Quaternion.Identity; 120 return Quaternion.Identity;
121 } 121 }
122 set 122 set
123 { 123 {
124 124
125 } 125 }
126 } 126 }
127 127
128 public override PhysicsVector Acceleration 128 public override PhysicsVector Acceleration
129 { 129 {
130 get { return PhysicsVector.Zero; } 130 get { return PhysicsVector.Zero; }
131 } 131 }
132 132
133 public override bool Flying 133 public override bool Flying
134 { 134 {
135 get 135 get
136 { 136 {
137 return false; 137 return false;
138 } 138 }
139 set 139 set
140 { 140 {
141 return; 141 return;
142 } 142 }
143 } 143 }
144 144
145 public override bool Kinematic 145 public override bool Kinematic
146 { 146 {
147 get 147 get
148 { 148 {
149 return true; 149 return true;
150 } 150 }
151 set 151 set
152 { 152 {
153 return; 153 return;
154 } 154 }
155 } 155 }
156 156
157 public override void AddForce(PhysicsVector force) 157 public override void AddForce(PhysicsVector force)
158 { 158 {
159 return; 159 return;
160 } 160 }
161 161
162 public override void SetMomentum(PhysicsVector momentum) 162 public override void SetMomentum(PhysicsVector momentum)
163 { 163 {
164 return; 164 return;
165 } 165 }
166 } 166 }
167} 167}
diff --git a/OpenSim/Region/Physics/Manager/PhysicsManager.cs b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
index 265bce6..7c475e7 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
@@ -1,115 +1,115 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33 33
34namespace OpenSim.Physics.Manager 34namespace OpenSim.Physics.Manager
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// Description of MyClass. 37 /// Description of MyClass.
38 /// </summary> 38 /// </summary>
39 public class PhysicsManager 39 public class PhysicsManager
40 { 40 {
41 private Dictionary<string, IPhysicsPlugin> _plugins=new Dictionary<string, IPhysicsPlugin>(); 41 private Dictionary<string, IPhysicsPlugin> _plugins=new Dictionary<string, IPhysicsPlugin>();
42 42
43 public PhysicsManager() 43 public PhysicsManager()
44 { 44 {
45 45
46 } 46 }
47 47
48 public PhysicsScene GetPhysicsScene(string engineName) 48 public PhysicsScene GetPhysicsScene(string engineName)
49 { 49 {
50 if (String.IsNullOrEmpty(engineName)) 50 if (String.IsNullOrEmpty(engineName))
51 { 51 {
52 return PhysicsScene.Null; 52 return PhysicsScene.Null;
53 } 53 }
54 54
55 if(_plugins.ContainsKey(engineName)) 55 if(_plugins.ContainsKey(engineName))
56 { 56 {
57 MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); 57 MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName);
58 return _plugins[engineName].GetScene(); 58 return _plugins[engineName].GetScene();
59 } 59 }
60 else 60 else
61 { 61 {
62 MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); 62 MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName);
63 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); 63 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName));
64 } 64 }
65 } 65 }
66 66
67 public void LoadPlugins() 67 public void LoadPlugins()
68 { 68 {
69 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ,"Physics"); 69 string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ,"Physics");
70 string[] pluginFiles = Directory.GetFiles(path, "*.dll"); 70 string[] pluginFiles = Directory.GetFiles(path, "*.dll");
71 71
72 72
73 for(int i= 0; i<pluginFiles.Length; i++) 73 for(int i= 0; i<pluginFiles.Length; i++)
74 { 74 {
75 this.AddPlugin(pluginFiles[i]); 75 this.AddPlugin(pluginFiles[i]);
76 } 76 }
77 } 77 }
78 78
79 private void AddPlugin(string FileName) 79 private void AddPlugin(string FileName)
80 { 80 {
81 Assembly pluginAssembly = Assembly.LoadFrom(FileName); 81 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
82 82
83 foreach (Type pluginType in pluginAssembly.GetTypes()) 83 foreach (Type pluginType in pluginAssembly.GetTypes())
84 { 84 {
85 if (pluginType.IsPublic) 85 if (pluginType.IsPublic)
86 { 86 {
87 if (!pluginType.IsAbstract) 87 if (!pluginType.IsAbstract)
88 { 88 {
89 Type typeInterface = pluginType.GetInterface("IPhysicsPlugin", true); 89 Type typeInterface = pluginType.GetInterface("IPhysicsPlugin", true);
90 90
91 if (typeInterface != null) 91 if (typeInterface != null)
92 { 92 {
93 IPhysicsPlugin plug = (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 93 IPhysicsPlugin plug = (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
94 plug.Init(); 94 plug.Init();
95 this._plugins.Add(plug.GetName(),plug); 95 this._plugins.Add(plug.GetName(),plug);
96 96
97 } 97 }
98 98
99 typeInterface = null; 99 typeInterface = null;
100 } 100 }
101 } 101 }
102 } 102 }
103 103
104 pluginAssembly = null; 104 pluginAssembly = null;
105 } 105 }
106 } 106 }
107 107
108 public interface IPhysicsPlugin 108 public interface IPhysicsPlugin
109 { 109 {
110 bool Init(); 110 bool Init();
111 PhysicsScene GetScene(); 111 PhysicsScene GetScene();
112 string GetName(); 112 string GetName();
113 void Dispose(); 113 void Dispose();
114 } 114 }
115} 115}
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index d44da00..fb6358a 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -1,110 +1,110 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using OpenSim.Framework.Console; 28using OpenSim.Framework.Console;
29 29
30namespace OpenSim.Physics.Manager 30namespace OpenSim.Physics.Manager
31{ 31{
32 public abstract class PhysicsScene 32 public abstract class PhysicsScene
33 { 33 {
34 public static PhysicsScene Null 34 public static PhysicsScene Null
35 { 35 {
36 get 36 get
37 { 37 {
38 return new NullPhysicsScene(); 38 return new NullPhysicsScene();
39 } 39 }
40 } 40 }
41 41
42 public abstract PhysicsActor AddAvatar(PhysicsVector position); 42 public abstract PhysicsActor AddAvatar(PhysicsVector position);
43 43
44 public abstract void RemoveAvatar(PhysicsActor actor); 44 public abstract void RemoveAvatar(PhysicsActor actor);
45 45
46 public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size); 46 public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size);
47 47
48 public abstract void Simulate(float timeStep); 48 public abstract void Simulate(float timeStep);
49 49
50 public abstract void GetResults(); 50 public abstract void GetResults();
51 51
52 public abstract void SetTerrain(float[] heightMap); 52 public abstract void SetTerrain(float[] heightMap);
53 53
54 public abstract void DeleteTerrain(); 54 public abstract void DeleteTerrain();
55 55
56 public abstract bool IsThreaded 56 public abstract bool IsThreaded
57 { 57 {
58 get; 58 get;
59 } 59 }
60 60
61 private class NullPhysicsScene : PhysicsScene 61 private class NullPhysicsScene : PhysicsScene
62 { 62 {
63 private static int m_workIndicator; 63 private static int m_workIndicator;
64 64
65 public override PhysicsActor AddAvatar(PhysicsVector position) 65 public override PhysicsActor AddAvatar(PhysicsVector position)
66 { 66 {
67 MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); 67 MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
68 return PhysicsActor.Null; 68 return PhysicsActor.Null;
69 } 69 }
70 70
71 public override void RemoveAvatar(PhysicsActor actor) 71 public override void RemoveAvatar(PhysicsActor actor)
72 { 72 {
73 73
74 } 74 }
75 75
76 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 76 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
77 { 77 {
78 MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); 78 MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size);
79 return PhysicsActor.Null; 79 return PhysicsActor.Null;
80 } 80 }
81 81
82 public override void Simulate(float timeStep) 82 public override void Simulate(float timeStep)
83 { 83 {
84 m_workIndicator = (m_workIndicator + 1) % 10; 84 m_workIndicator = (m_workIndicator + 1) % 10;
85 85
86 //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString()); 86 //OpenSim.Framework.Console.MainLog.Instance.SetStatus(m_workIndicator.ToString());
87 } 87 }
88 88
89 public override void GetResults() 89 public override void GetResults()
90 { 90 {
91 MainLog.Instance.Verbose("NullPhysicsScene : GetResults()"); 91 MainLog.Instance.Verbose("NullPhysicsScene : GetResults()");
92 } 92 }
93 93
94 public override void SetTerrain(float[] heightMap) 94 public override void SetTerrain(float[] heightMap)
95 { 95 {
96 MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); 96 MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
97 } 97 }
98 98
99 public override void DeleteTerrain() 99 public override void DeleteTerrain()
100 { 100 {
101 101
102 } 102 }
103 103
104 public override bool IsThreaded 104 public override bool IsThreaded
105 { 105 {
106 get { return false; } 106 get { return false; }
107 } 107 }
108 } 108 }
109 } 109 }
110} 110}
diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
index e75f29b..2cbca25 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
@@ -1,55 +1,55 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Physics.Manager 28namespace OpenSim.Physics.Manager
29{ 29{
30 public class PhysicsVector 30 public class PhysicsVector
31 { 31 {
32 public float X; 32 public float X;
33 public float Y; 33 public float Y;
34 public float Z; 34 public float Z;
35 35
36 public PhysicsVector() 36 public PhysicsVector()
37 { 37 {
38 38
39 } 39 }
40 40
41 public PhysicsVector(float x, float y, float z) 41 public PhysicsVector(float x, float y, float z)
42 { 42 {
43 X = x; 43 X = x;
44 Y = y; 44 Y = y;
45 Z = z; 45 Z = z;
46 } 46 }
47 47
48 public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f); 48 public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f);
49 49
50 public override string ToString() 50 public override string ToString()
51 { 51 {
52 return "<" + this.X + "," + this.Y + "," + this.Z + ">"; 52 return "<" + this.X + "," + this.Y + "," + this.Z + ">";
53 } 53 }
54 } 54 }
55} 55}
diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
index ee10430..662b75a 100644
--- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("RealPhysXplugin")] 36[assembly: AssemblyTitle("RealPhysXplugin")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("RealPhysXplugin")] 40[assembly: AssemblyProduct("RealPhysXplugin")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 2780188..486fa9e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1,457 +1,457 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Axiom.Math; 30using Axiom.Math;
31using Ode.NET; 31using Ode.NET;
32using OpenSim.Physics.Manager; 32using OpenSim.Physics.Manager;
33 33
34namespace OpenSim.Region.Physics.OdePlugin 34namespace OpenSim.Region.Physics.OdePlugin
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// ODE plugin 37 /// ODE plugin
38 /// </summary> 38 /// </summary>
39 public class OdePlugin : IPhysicsPlugin 39 public class OdePlugin : IPhysicsPlugin
40 { 40 {
41 private OdeScene _mScene; 41 private OdeScene _mScene;
42 42
43 public OdePlugin() 43 public OdePlugin()
44 { 44 {
45 45
46 } 46 }
47 47
48 public bool Init() 48 public bool Init()
49 { 49 {
50 return true; 50 return true;
51 } 51 }
52 52
53 public PhysicsScene GetScene() 53 public PhysicsScene GetScene()
54 { 54 {
55 if (_mScene == null) 55 if (_mScene == null)
56 { 56 {
57 _mScene = new OdeScene(); 57 _mScene = new OdeScene();
58 } 58 }
59 return (_mScene); 59 return (_mScene);
60 } 60 }
61 61
62 public string GetName() 62 public string GetName()
63 { 63 {
64 return ("OpenDynamicsEngine"); 64 return ("OpenDynamicsEngine");
65 } 65 }
66 66
67 public void Dispose() 67 public void Dispose()
68 { 68 {
69 69
70 } 70 }
71 } 71 }
72 72
73 public class OdeScene : PhysicsScene 73 public class OdeScene : PhysicsScene
74 { 74 {
75 static public IntPtr world; 75 static public IntPtr world;
76 static public IntPtr space; 76 static public IntPtr space;
77 static private IntPtr contactgroup; 77 static private IntPtr contactgroup;
78 static private IntPtr LandGeom; 78 static private IntPtr LandGeom;
79 //static private IntPtr Land; 79 //static private IntPtr Land;
80 private double[] _heightmap; 80 private double[] _heightmap;
81 static private d.NearCallback nearCallback = near; 81 static private d.NearCallback nearCallback = near;
82 private List<OdeCharacter> _characters = new List<OdeCharacter>(); 82 private List<OdeCharacter> _characters = new List<OdeCharacter>();
83 private static d.ContactGeom[] contacts = new d.ContactGeom[30]; 83 private static d.ContactGeom[] contacts = new d.ContactGeom[30];
84 private static d.Contact contact; 84 private static d.Contact contact;
85 85
86 public OdeScene() 86 public OdeScene()
87 { 87 {
88 contact.surface.mode = d.ContactFlags.Bounce | d.ContactFlags.SoftCFM; 88 contact.surface.mode = d.ContactFlags.Bounce | d.ContactFlags.SoftCFM;
89 contact.surface.mu = d.Infinity; 89 contact.surface.mu = d.Infinity;
90 contact.surface.mu2 = 0.0f; 90 contact.surface.mu2 = 0.0f;
91 contact.surface.bounce = 0.1f; 91 contact.surface.bounce = 0.1f;
92 contact.surface.bounce_vel = 0.1f; 92 contact.surface.bounce_vel = 0.1f;
93 contact.surface.soft_cfm = 0.01f; 93 contact.surface.soft_cfm = 0.01f;
94 94
95 world = d.WorldCreate(); 95 world = d.WorldCreate();
96 space = d.HashSpaceCreate(IntPtr.Zero); 96 space = d.HashSpaceCreate(IntPtr.Zero);
97 contactgroup = d.JointGroupCreate(0); 97 contactgroup = d.JointGroupCreate(0);
98 d.WorldSetGravity(world, 0.0f, 0.0f, -0.5f); 98 d.WorldSetGravity(world, 0.0f, 0.0f, -0.5f);
99 //d.WorldSetCFM(world, 1e-5f); 99 //d.WorldSetCFM(world, 1e-5f);
100 d.WorldSetAutoDisableFlag(world, false); 100 d.WorldSetAutoDisableFlag(world, false);
101 d.WorldSetContactSurfaceLayer(world, 0.001f); 101 d.WorldSetContactSurfaceLayer(world, 0.001f);
102 // d.CreatePlane(space, 0, 0, 1, 0); 102 // d.CreatePlane(space, 0, 0, 1, 0);
103 this._heightmap = new double[65536]; 103 this._heightmap = new double[65536];
104 } 104 }
105 105
106 // This function blatantly ripped off from BoxStack.cs 106 // This function blatantly ripped off from BoxStack.cs
107 static private void near(IntPtr space, IntPtr g1, IntPtr g2) 107 static private void near(IntPtr space, IntPtr g1, IntPtr g2)
108 { 108 {
109 IntPtr b1 = d.GeomGetBody(g1); 109 IntPtr b1 = d.GeomGetBody(g1);
110 IntPtr b2 = d.GeomGetBody(g2); 110 IntPtr b2 = d.GeomGetBody(g2);
111 if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) 111 if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact))
112 return; 112 return;
113 113
114 int count = d.Collide(g1, g2, 500, contacts, d.ContactGeom.SizeOf); 114 int count = d.Collide(g1, g2, 500, contacts, d.ContactGeom.SizeOf);
115 for (int i = 0; i < count; ++i) 115 for (int i = 0; i < count; ++i)
116 { 116 {
117 contact.geom = contacts[i]; 117 contact.geom = contacts[i];
118 IntPtr joint = d.JointCreateContact(world, contactgroup, ref contact); 118 IntPtr joint = d.JointCreateContact(world, contactgroup, ref contact);
119 d.JointAttach(joint, b1, b2); 119 d.JointAttach(joint, b1, b2);
120 } 120 }
121 121
122 } 122 }
123 123
124 public override PhysicsActor AddAvatar(PhysicsVector position) 124 public override PhysicsActor AddAvatar(PhysicsVector position)
125 { 125 {
126 PhysicsVector pos = new PhysicsVector(); 126 PhysicsVector pos = new PhysicsVector();
127 pos.X = position.X; 127 pos.X = position.X;
128 pos.Y = position.Y; 128 pos.Y = position.Y;
129 pos.Z = position.Z + 20; 129 pos.Z = position.Z + 20;
130 OdeCharacter newAv = new OdeCharacter(this, pos); 130 OdeCharacter newAv = new OdeCharacter(this, pos);
131 this._characters.Add(newAv); 131 this._characters.Add(newAv);
132 return newAv; 132 return newAv;
133 } 133 }
134 134
135 public override void RemoveAvatar(PhysicsActor actor) 135 public override void RemoveAvatar(PhysicsActor actor)
136 { 136 {
137 137
138 } 138 }
139 139
140 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 140 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
141 { 141 {
142 PhysicsVector pos = new PhysicsVector(); 142 PhysicsVector pos = new PhysicsVector();
143 pos.X = position.X; 143 pos.X = position.X;
144 pos.Y = position.Y; 144 pos.Y = position.Y;
145 pos.Z = position.Z; 145 pos.Z = position.Z;
146 PhysicsVector siz = new PhysicsVector(); 146 PhysicsVector siz = new PhysicsVector();
147 siz.X = size.X; 147 siz.X = size.X;
148 siz.Y = size.Y; 148 siz.Y = size.Y;
149 siz.Z = size.Z; 149 siz.Z = size.Z;
150 return new OdePrim(); 150 return new OdePrim();
151 } 151 }
152 152
153 public override void Simulate(float timeStep) 153 public override void Simulate(float timeStep)
154 { 154 {
155 foreach (OdeCharacter actor in _characters) 155 foreach (OdeCharacter actor in _characters)
156 { 156 {
157 actor.Move(timeStep * 5f); 157 actor.Move(timeStep * 5f);
158 } 158 }
159 d.SpaceCollide(space, IntPtr.Zero, nearCallback); 159 d.SpaceCollide(space, IntPtr.Zero, nearCallback);
160 d.WorldQuickStep(world, timeStep * 5f); 160 d.WorldQuickStep(world, timeStep * 5f);
161 d.JointGroupEmpty(contactgroup); 161 d.JointGroupEmpty(contactgroup);
162 foreach (OdeCharacter actor in _characters) 162 foreach (OdeCharacter actor in _characters)
163 { 163 {
164 actor.UpdatePosition(); 164 actor.UpdatePosition();
165 } 165 }
166 166
167 } 167 }
168 168
169 public override void GetResults() 169 public override void GetResults()
170 { 170 {
171 171
172 } 172 }
173 173
174 public override bool IsThreaded 174 public override bool IsThreaded
175 { 175 {
176 get 176 get
177 { 177 {
178 return (false); // for now we won't be multithreaded 178 return (false); // for now we won't be multithreaded
179 } 179 }
180 } 180 }
181 181
182 public override void SetTerrain(float[] heightMap) 182 public override void SetTerrain(float[] heightMap)
183 { 183 {
184 for (int i = 0; i < 65536; i++) 184 for (int i = 0; i < 65536; i++)
185 { 185 {
186 // this._heightmap[i] = (double)heightMap[i]; 186 // this._heightmap[i] = (double)heightMap[i];
187 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...) 187 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...)
188 int x = i & 0xff; 188 int x = i & 0xff;
189 int y = i >> 8; 189 int y = i >> 8;
190 this._heightmap[i] = (double)heightMap[x * 256 + y]; 190 this._heightmap[i] = (double)heightMap[x * 256 + y];
191 } 191 }
192 IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); 192 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
193 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0); 193 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0);
194 d.GeomHeightfieldDataSetBounds(HeightmapData, 256, 256); 194 d.GeomHeightfieldDataSetBounds(HeightmapData, 256, 256);
195 LandGeom = d.CreateHeightfield(space, HeightmapData, 1); 195 LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
196 d.Matrix3 R = new d.Matrix3(); 196 d.Matrix3 R = new d.Matrix3();
197 197
198 Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0)); 198 Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0));
199 Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0)); 199 Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0));
200 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); 200 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
201 201
202 q1 = q1 * q2; 202 q1 = q1 * q2;
203 //q1 = q1 * q3; 203 //q1 = q1 * q3;
204 Vector3 v3 = new Vector3(); 204 Vector3 v3 = new Vector3();
205 float angle = 0; 205 float angle = 0;
206 q1.ToAngleAxis(ref angle, ref v3); 206 q1.ToAngleAxis(ref angle, ref v3);
207 207
208 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle); 208 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle);
209 d.GeomSetRotation(LandGeom, ref R); 209 d.GeomSetRotation(LandGeom, ref R);
210 d.GeomSetPosition(LandGeom, 128, 128, 0); 210 d.GeomSetPosition(LandGeom, 128, 128, 0);
211 } 211 }
212 212
213 public override void DeleteTerrain() 213 public override void DeleteTerrain()
214 { 214 {
215 215
216 } 216 }
217 } 217 }
218 218
219 public class OdeCharacter : PhysicsActor 219 public class OdeCharacter : PhysicsActor
220 { 220 {
221 private PhysicsVector _position; 221 private PhysicsVector _position;
222 private PhysicsVector _velocity; 222 private PhysicsVector _velocity;
223 private PhysicsVector _acceleration; 223 private PhysicsVector _acceleration;
224 private bool flying; 224 private bool flying;
225 //private float gravityAccel; 225 //private float gravityAccel;
226 private IntPtr BoundingCapsule; 226 private IntPtr BoundingCapsule;
227 IntPtr capsule_geom; 227 IntPtr capsule_geom;
228 d.Mass capsule_mass; 228 d.Mass capsule_mass;
229 229
230 public OdeCharacter(OdeScene parent_scene, PhysicsVector pos) 230 public OdeCharacter(OdeScene parent_scene, PhysicsVector pos)
231 { 231 {
232 _velocity = new PhysicsVector(); 232 _velocity = new PhysicsVector();
233 _position = pos; 233 _position = pos;
234 _acceleration = new PhysicsVector(); 234 _acceleration = new PhysicsVector();
235 d.MassSetCapsule(out capsule_mass, 5.0f, 3, 0.5f, 2f); 235 d.MassSetCapsule(out capsule_mass, 5.0f, 3, 0.5f, 2f);
236 capsule_geom = d.CreateCapsule(OdeScene.space, 0.5f, 2f); 236 capsule_geom = d.CreateCapsule(OdeScene.space, 0.5f, 2f);
237 this.BoundingCapsule = d.BodyCreate(OdeScene.world); 237 this.BoundingCapsule = d.BodyCreate(OdeScene.world);
238 d.BodySetMass(BoundingCapsule, ref capsule_mass); 238 d.BodySetMass(BoundingCapsule, ref capsule_mass);
239 d.BodySetPosition(BoundingCapsule, pos.X, pos.Y, pos.Z); 239 d.BodySetPosition(BoundingCapsule, pos.X, pos.Y, pos.Z);
240 d.GeomSetBody(capsule_geom, BoundingCapsule); 240 d.GeomSetBody(capsule_geom, BoundingCapsule);
241 } 241 }
242 242
243 public override bool Flying 243 public override bool Flying
244 { 244 {
245 get 245 get
246 { 246 {
247 return flying; 247 return flying;
248 } 248 }
249 set 249 set
250 { 250 {
251 flying = value; 251 flying = value;
252 } 252 }
253 } 253 }
254 254
255 public override PhysicsVector Position 255 public override PhysicsVector Position
256 { 256 {
257 get 257 get
258 { 258 {
259 return _position; 259 return _position;
260 } 260 }
261 set 261 set
262 { 262 {
263 _position = value; 263 _position = value;
264 } 264 }
265 } 265 }
266 266
267 public override PhysicsVector Velocity 267 public override PhysicsVector Velocity
268 { 268 {
269 get 269 get
270 { 270 {
271 return _velocity; 271 return _velocity;
272 } 272 }
273 set 273 set
274 { 274 {
275 _velocity = value; 275 _velocity = value;
276 } 276 }
277 } 277 }
278 278
279 public override bool Kinematic 279 public override bool Kinematic
280 { 280 {
281 get 281 get
282 { 282 {
283 return false; 283 return false;
284 } 284 }
285 set 285 set
286 { 286 {
287 287
288 } 288 }
289 } 289 }
290 290
291 public override Quaternion Orientation 291 public override Quaternion Orientation
292 { 292 {
293 get 293 get
294 { 294 {
295 return Quaternion.Identity; 295 return Quaternion.Identity;
296 } 296 }
297 set 297 set
298 { 298 {
299 299
300 } 300 }
301 } 301 }
302 302
303 public override PhysicsVector Acceleration 303 public override PhysicsVector Acceleration
304 { 304 {
305 get 305 get
306 { 306 {
307 return _acceleration; 307 return _acceleration;
308 } 308 }
309 309
310 } 310 }
311 public void SetAcceleration(PhysicsVector accel) 311 public void SetAcceleration(PhysicsVector accel)
312 { 312 {
313 this._acceleration = accel; 313 this._acceleration = accel;
314 } 314 }
315 315
316 public override void AddForce(PhysicsVector force) 316 public override void AddForce(PhysicsVector force)
317 { 317 {
318 318
319 } 319 }
320 320
321 public override void SetMomentum(PhysicsVector momentum) 321 public override void SetMomentum(PhysicsVector momentum)
322 { 322 {
323 323
324 } 324 }
325 325
326 public void Move(float timeStep) 326 public void Move(float timeStep)
327 { 327 {
328 PhysicsVector vec = new PhysicsVector(); 328 PhysicsVector vec = new PhysicsVector();
329 vec.X = this._velocity.X * timeStep; 329 vec.X = this._velocity.X * timeStep;
330 vec.Y = this._velocity.Y * timeStep; 330 vec.Y = this._velocity.Y * timeStep;
331 if (flying) 331 if (flying)
332 { 332 {
333 vec.Z = (this._velocity.Z + 0.5f) * timeStep; 333 vec.Z = (this._velocity.Z + 0.5f) * timeStep;
334 } 334 }
335 d.BodySetLinearVel(this.BoundingCapsule, vec.X, vec.Y, vec.Z); 335 d.BodySetLinearVel(this.BoundingCapsule, vec.X, vec.Y, vec.Z);
336 } 336 }
337 337
338 public void UpdatePosition() 338 public void UpdatePosition()
339 { 339 {
340 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule); 340 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule);
341 this._position.X = vec.X; 341 this._position.X = vec.X;
342 this._position.Y = vec.Y; 342 this._position.Y = vec.Y;
343 this._position.Z = vec.Z+1.0f; 343 this._position.Z = vec.Z+1.0f;
344 } 344 }
345 } 345 }
346 346
347 public class OdePrim : PhysicsActor 347 public class OdePrim : PhysicsActor
348 { 348 {
349 private PhysicsVector _position; 349 private PhysicsVector _position;
350 private PhysicsVector _velocity; 350 private PhysicsVector _velocity;
351 private PhysicsVector _acceleration; 351 private PhysicsVector _acceleration;
352 352
353 public OdePrim() 353 public OdePrim()
354 { 354 {
355 _velocity = new PhysicsVector(); 355 _velocity = new PhysicsVector();
356 _position = new PhysicsVector(); 356 _position = new PhysicsVector();
357 _acceleration = new PhysicsVector(); 357 _acceleration = new PhysicsVector();
358 } 358 }
359 public override bool Flying 359 public override bool Flying
360 { 360 {
361 get 361 get
362 { 362 {
363 return false; //no flying prims for you 363 return false; //no flying prims for you
364 } 364 }
365 set 365 set
366 { 366 {
367 367
368 } 368 }
369 } 369 }
370 public override PhysicsVector Position 370 public override PhysicsVector Position
371 { 371 {
372 get 372 get
373 { 373 {
374 PhysicsVector pos = new PhysicsVector(); 374 PhysicsVector pos = new PhysicsVector();
375 // PhysicsVector vec = this._prim.Position; 375 // PhysicsVector vec = this._prim.Position;
376 //pos.X = vec.X; 376 //pos.X = vec.X;
377 //pos.Y = vec.Y; 377 //pos.Y = vec.Y;
378 //pos.Z = vec.Z; 378 //pos.Z = vec.Z;
379 return pos; 379 return pos;
380 380
381 } 381 }
382 set 382 set
383 { 383 {
384 /*PhysicsVector vec = value; 384 /*PhysicsVector vec = value;
385 PhysicsVector pos = new PhysicsVector(); 385 PhysicsVector pos = new PhysicsVector();
386 pos.X = vec.X; 386 pos.X = vec.X;
387 pos.Y = vec.Y; 387 pos.Y = vec.Y;
388 pos.Z = vec.Z; 388 pos.Z = vec.Z;
389 this._prim.Position = pos;*/ 389 this._prim.Position = pos;*/
390 } 390 }
391 } 391 }
392 392
393 public override PhysicsVector Velocity 393 public override PhysicsVector Velocity
394 { 394 {
395 get 395 get
396 { 396 {
397 return _velocity; 397 return _velocity;
398 } 398 }
399 set 399 set
400 { 400 {
401 _velocity = value; 401 _velocity = value;
402 } 402 }
403 } 403 }
404 404
405 public override bool Kinematic 405 public override bool Kinematic
406 { 406 {
407 get 407 get
408 { 408 {
409 return false; 409 return false;
410 //return this._prim.Kinematic; 410 //return this._prim.Kinematic;
411 } 411 }
412 set 412 set
413 { 413 {
414 //this._prim.Kinematic = value; 414 //this._prim.Kinematic = value;
415 } 415 }
416 } 416 }
417 417
418 public override Quaternion Orientation 418 public override Quaternion Orientation
419 { 419 {
420 get 420 get
421 { 421 {
422 Quaternion res = new Quaternion(); 422 Quaternion res = new Quaternion();
423 return res; 423 return res;
424 } 424 }
425 set 425 set
426 { 426 {
427 427
428 } 428 }
429 } 429 }
430 430
431 public override PhysicsVector Acceleration 431 public override PhysicsVector Acceleration
432 { 432 {
433 get 433 get
434 { 434 {
435 return _acceleration; 435 return _acceleration;
436 } 436 }
437 437
438 } 438 }
439 public void SetAcceleration(PhysicsVector accel) 439 public void SetAcceleration(PhysicsVector accel)
440 { 440 {
441 this._acceleration = accel; 441 this._acceleration = accel;
442 } 442 }
443 443
444 public override void AddForce(PhysicsVector force) 444 public override void AddForce(PhysicsVector force)
445 { 445 {
446 446
447 } 447 }
448 448
449 public override void SetMomentum(PhysicsVector momentum) 449 public override void SetMomentum(PhysicsVector momentum)
450 { 450 {
451 451
452 } 452 }
453 453
454 454
455 } 455 }
456 456
457} 457}
diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
index ee10430..662b75a 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("RealPhysXplugin")] 36[assembly: AssemblyTitle("RealPhysXplugin")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("RealPhysXplugin")] 40[assembly: AssemblyProduct("RealPhysXplugin")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index 4c82549..111d436 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -1,425 +1,425 @@
1/*/* 1/*/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31using PhysXWrapper; 31using PhysXWrapper;
32using Quaternion=Axiom.Math.Quaternion; 32using Quaternion=Axiom.Math.Quaternion;
33 33
34namespace OpenSim.Region.Physics.PhysXPlugin 34namespace OpenSim.Region.Physics.PhysXPlugin
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// Will be the PhysX plugin but for now will be a very basic physics engine 37 /// Will be the PhysX plugin but for now will be a very basic physics engine
38 /// </summary> 38 /// </summary>
39 public class PhysXPlugin : IPhysicsPlugin 39 public class PhysXPlugin : IPhysicsPlugin
40 { 40 {
41 private PhysXScene _mScene; 41 private PhysXScene _mScene;
42 42
43 public PhysXPlugin() 43 public PhysXPlugin()
44 { 44 {
45 45
46 } 46 }
47 47
48 public bool Init() 48 public bool Init()
49 { 49 {
50 return true; 50 return true;
51 } 51 }
52 52
53 public PhysicsScene GetScene() 53 public PhysicsScene GetScene()
54 { 54 {
55 if(_mScene == null) 55 if(_mScene == null)
56 { 56 {
57 _mScene = new PhysXScene(); 57 _mScene = new PhysXScene();
58 } 58 }
59 return(_mScene); 59 return(_mScene);
60 } 60 }
61 61
62 public string GetName() 62 public string GetName()
63 { 63 {
64 return("RealPhysX"); 64 return("RealPhysX");
65 } 65 }
66 66
67 public void Dispose() 67 public void Dispose()
68 { 68 {
69 69
70 } 70 }
71 } 71 }
72 72
73 public class PhysXScene :PhysicsScene 73 public class PhysXScene :PhysicsScene
74 { 74 {
75 private List<PhysXCharacter> _characters = new List<PhysXCharacter>(); 75 private List<PhysXCharacter> _characters = new List<PhysXCharacter>();
76 private List<PhysXPrim> _prims = new List<PhysXPrim>(); 76 private List<PhysXPrim> _prims = new List<PhysXPrim>();
77 private float[] _heightMap = null; 77 private float[] _heightMap = null;
78 private NxPhysicsSDK mySdk; 78 private NxPhysicsSDK mySdk;
79 private NxScene scene; 79 private NxScene scene;
80 80
81 public PhysXScene() 81 public PhysXScene()
82 { 82 {
83 mySdk = NxPhysicsSDK.CreateSDK(); 83 mySdk = NxPhysicsSDK.CreateSDK();
84 Console.WriteLine("Sdk created - now creating scene"); 84 Console.WriteLine("Sdk created - now creating scene");
85 scene = mySdk.CreateScene(); 85 scene = mySdk.CreateScene();
86 86
87 } 87 }
88 88
89 public override PhysicsActor AddAvatar(PhysicsVector position) 89 public override PhysicsActor AddAvatar(PhysicsVector position)
90 { 90 {
91 Vec3 pos = new Vec3(); 91 Vec3 pos = new Vec3();
92 pos.X = position.X; 92 pos.X = position.X;
93 pos.Y = position.Y; 93 pos.Y = position.Y;
94 pos.Z = position.Z; 94 pos.Z = position.Z;
95 PhysXCharacter act = new PhysXCharacter( scene.AddCharacter(pos)); 95 PhysXCharacter act = new PhysXCharacter( scene.AddCharacter(pos));
96 act.Position = position; 96 act.Position = position;
97 _characters.Add(act); 97 _characters.Add(act);
98 return act; 98 return act;
99 } 99 }
100 100
101 public override void RemoveAvatar(PhysicsActor actor) 101 public override void RemoveAvatar(PhysicsActor actor)
102 { 102 {
103 103
104 } 104 }
105 105
106 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) 106 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
107 { 107 {
108 Vec3 pos = new Vec3(); 108 Vec3 pos = new Vec3();
109 pos.X = position.X; 109 pos.X = position.X;
110 pos.Y = position.Y; 110 pos.Y = position.Y;
111 pos.Z = position.Z; 111 pos.Z = position.Z;
112 Vec3 siz = new Vec3(); 112 Vec3 siz = new Vec3();
113 siz.X = size.X; 113 siz.X = size.X;
114 siz.Y = size.Y; 114 siz.Y = size.Y;
115 siz.Z = size.Z; 115 siz.Z = size.Z;
116 PhysXPrim act = new PhysXPrim( scene.AddNewBox(pos, siz)); 116 PhysXPrim act = new PhysXPrim( scene.AddNewBox(pos, siz));
117 _prims.Add(act); 117 _prims.Add(act);
118 return act; 118 return act;
119 } 119 }
120 public override void Simulate(float timeStep) 120 public override void Simulate(float timeStep)
121 { 121 {
122 try 122 try
123 { 123 {
124 foreach (PhysXCharacter actor in _characters) 124 foreach (PhysXCharacter actor in _characters)
125 { 125 {
126 actor.Move(timeStep); 126 actor.Move(timeStep);
127 } 127 }
128 scene.Simulate(timeStep); 128 scene.Simulate(timeStep);
129 scene.FetchResults(); 129 scene.FetchResults();
130 scene.UpdateControllers(); 130 scene.UpdateControllers();
131 131
132 foreach (PhysXCharacter actor in _characters) 132 foreach (PhysXCharacter actor in _characters)
133 { 133 {
134 actor.UpdatePosition(); 134 actor.UpdatePosition();
135 } 135 }
136 } 136 }
137 catch (Exception e) 137 catch (Exception e)
138 { 138 {
139 Console.WriteLine(e.Message); 139 Console.WriteLine(e.Message);
140 } 140 }
141 141
142 } 142 }
143 143
144 public override void GetResults() 144 public override void GetResults()
145 { 145 {
146 146
147 } 147 }
148 148
149 public override bool IsThreaded 149 public override bool IsThreaded
150 { 150 {
151 get 151 get
152 { 152 {
153 return(false); // for now we won't be multithreaded 153 return(false); // for now we won't be multithreaded
154 } 154 }
155 } 155 }
156 156
157 public override void SetTerrain(float[] heightMap) 157 public override void SetTerrain(float[] heightMap)
158 { 158 {
159 if (this._heightMap != null) 159 if (this._heightMap != null)
160 { 160 {
161 Console.WriteLine("PhysX - deleting old terrain"); 161 Console.WriteLine("PhysX - deleting old terrain");
162 this.scene.DeleteTerrain(); 162 this.scene.DeleteTerrain();
163 } 163 }
164 this._heightMap = heightMap; 164 this._heightMap = heightMap;
165 this.scene.AddTerrain(heightMap); 165 this.scene.AddTerrain(heightMap);
166 } 166 }
167 167
168 public override void DeleteTerrain() 168 public override void DeleteTerrain()
169 { 169 {
170 this.scene.DeleteTerrain(); 170 this.scene.DeleteTerrain();
171 } 171 }
172 } 172 }
173 173
174 public class PhysXCharacter : PhysicsActor 174 public class PhysXCharacter : PhysicsActor
175 { 175 {
176 private PhysicsVector _position; 176 private PhysicsVector _position;
177 private PhysicsVector _velocity; 177 private PhysicsVector _velocity;
178 private PhysicsVector _acceleration; 178 private PhysicsVector _acceleration;
179 private NxCharacter _character; 179 private NxCharacter _character;
180 private bool flying; 180 private bool flying;
181 private float gravityAccel; 181 private float gravityAccel;
182 182
183 public PhysXCharacter(NxCharacter character) 183 public PhysXCharacter(NxCharacter character)
184 { 184 {
185 _velocity = new PhysicsVector(); 185 _velocity = new PhysicsVector();
186 _position = new PhysicsVector(); 186 _position = new PhysicsVector();
187 _acceleration = new PhysicsVector(); 187 _acceleration = new PhysicsVector();
188 _character = character; 188 _character = character;
189 } 189 }
190 190
191 public override bool Flying 191 public override bool Flying
192 { 192 {
193 get 193 get
194 { 194 {
195 return flying; 195 return flying;
196 } 196 }
197 set 197 set
198 { 198 {
199 flying = value; 199 flying = value;
200 } 200 }
201 } 201 }
202 202
203 public override PhysicsVector Position 203 public override PhysicsVector Position
204 { 204 {
205 get 205 get
206 { 206 {
207 return _position; 207 return _position;
208 } 208 }
209 set 209 set
210 { 210 {
211 _position = value; 211 _position = value;
212 Vec3 ps = new Vec3(); 212 Vec3 ps = new Vec3();
213 ps.X = value.X; 213 ps.X = value.X;
214 ps.Y = value.Y; 214 ps.Y = value.Y;
215 ps.Z = value.Z; 215 ps.Z = value.Z;
216 this._character.Position = ps; 216 this._character.Position = ps;
217 } 217 }
218 } 218 }
219 219
220 public override PhysicsVector Velocity 220 public override PhysicsVector Velocity
221 { 221 {
222 get 222 get
223 { 223 {
224 return _velocity; 224 return _velocity;
225 } 225 }
226 set 226 set
227 { 227 {
228 _velocity = value; 228 _velocity = value;
229 } 229 }
230 } 230 }
231 231
232 public override bool Kinematic 232 public override bool Kinematic
233 { 233 {
234 get 234 get
235 { 235 {
236 return false; 236 return false;
237 } 237 }
238 set 238 set
239 { 239 {
240 240
241 } 241 }
242 } 242 }
243 243
244 public override Quaternion Orientation 244 public override Quaternion Orientation
245 { 245 {
246 get 246 get
247 { 247 {
248 return Quaternion.Identity; 248 return Quaternion.Identity;
249 } 249 }
250 set 250 set
251 { 251 {
252 252
253 } 253 }
254 } 254 }
255 255
256 public override PhysicsVector Acceleration 256 public override PhysicsVector Acceleration
257 { 257 {
258 get 258 get
259 { 259 {
260 return _acceleration; 260 return _acceleration;
261 } 261 }
262 262
263 } 263 }
264 public void SetAcceleration (PhysicsVector accel) 264 public void SetAcceleration (PhysicsVector accel)
265 { 265 {
266 this._acceleration = accel; 266 this._acceleration = accel;
267 } 267 }
268 268
269 public override void AddForce(PhysicsVector force) 269 public override void AddForce(PhysicsVector force)
270 { 270 {
271 271
272 } 272 }
273 273
274 public override void SetMomentum(PhysicsVector momentum) 274 public override void SetMomentum(PhysicsVector momentum)
275 { 275 {
276 276
277 } 277 }
278 278
279 public void Move(float timeStep) 279 public void Move(float timeStep)
280 { 280 {
281 Vec3 vec = new Vec3(); 281 Vec3 vec = new Vec3();
282 vec.X = this._velocity.X * timeStep; 282 vec.X = this._velocity.X * timeStep;
283 vec.Y = this._velocity.Y * timeStep; 283 vec.Y = this._velocity.Y * timeStep;
284 if(flying) 284 if(flying)
285 { 285 {
286 vec.Z = ( this._velocity.Z) * timeStep; 286 vec.Z = ( this._velocity.Z) * timeStep;
287 } 287 }
288 else 288 else
289 { 289 {
290 gravityAccel+= -9.8f; 290 gravityAccel+= -9.8f;
291 vec.Z = (gravityAccel + this._velocity.Z) * timeStep; 291 vec.Z = (gravityAccel + this._velocity.Z) * timeStep;
292 } 292 }
293 int res = this._character.Move(vec); 293 int res = this._character.Move(vec);
294 if(res == 1) 294 if(res == 1)
295 { 295 {
296 gravityAccel = 0; 296 gravityAccel = 0;
297 } 297 }
298 } 298 }
299 299
300 public void UpdatePosition() 300 public void UpdatePosition()
301 { 301 {
302 Vec3 vec = this._character.Position; 302 Vec3 vec = this._character.Position;
303 this._position.X = vec.X; 303 this._position.X = vec.X;
304 this._position.Y = vec.Y; 304 this._position.Y = vec.Y;
305 this._position.Z = vec.Z; 305 this._position.Z = vec.Z;
306 } 306 }
307 } 307 }
308 308
309 public class PhysXPrim : PhysicsActor 309 public class PhysXPrim : PhysicsActor
310 { 310 {
311 private PhysicsVector _position; 311 private PhysicsVector _position;
312 private PhysicsVector _velocity; 312 private PhysicsVector _velocity;
313 private PhysicsVector _acceleration; 313 private PhysicsVector _acceleration;
314 private NxActor _prim; 314 private NxActor _prim;
315 315
316 public PhysXPrim(NxActor prim) 316 public PhysXPrim(NxActor prim)
317 { 317 {
318 _velocity = new PhysicsVector(); 318 _velocity = new PhysicsVector();
319 _position = new PhysicsVector(); 319 _position = new PhysicsVector();
320 _acceleration = new PhysicsVector(); 320 _acceleration = new PhysicsVector();
321 _prim = prim; 321 _prim = prim;
322 } 322 }
323 public override bool Flying 323 public override bool Flying
324 { 324 {
325 get 325 get
326 { 326 {
327 return false; //no flying prims for you 327 return false; //no flying prims for you
328 } 328 }
329 set 329 set
330 { 330 {
331 331
332 } 332 }
333 } 333 }
334 public override PhysicsVector Position 334 public override PhysicsVector Position
335 { 335 {
336 get 336 get
337 { 337 {
338 PhysicsVector pos = new PhysicsVector(); 338 PhysicsVector pos = new PhysicsVector();
339 Vec3 vec = this._prim.Position; 339 Vec3 vec = this._prim.Position;
340 pos.X = vec.X; 340 pos.X = vec.X;
341 pos.Y = vec.Y; 341 pos.Y = vec.Y;
342 pos.Z = vec.Z; 342 pos.Z = vec.Z;
343 return pos; 343 return pos;
344 344
345 } 345 }
346 set 346 set
347 { 347 {
348 PhysicsVector vec = value; 348 PhysicsVector vec = value;
349 Vec3 pos = new Vec3(); 349 Vec3 pos = new Vec3();
350 pos.X = vec.X; 350 pos.X = vec.X;
351 pos.Y = vec.Y; 351 pos.Y = vec.Y;
352 pos.Z = vec.Z; 352 pos.Z = vec.Z;
353 this._prim.Position = pos; 353 this._prim.Position = pos;
354 } 354 }
355 } 355 }
356 356
357 public override PhysicsVector Velocity 357 public override PhysicsVector Velocity
358 { 358 {
359 get 359 get
360 { 360 {
361 return _velocity; 361 return _velocity;
362 } 362 }
363 set 363 set
364 { 364 {
365 _velocity = value; 365 _velocity = value;
366 } 366 }
367 } 367 }
368 368
369 public override bool Kinematic 369 public override bool Kinematic
370 { 370 {
371 get 371 get
372 { 372 {
373 return this._prim.Kinematic; 373 return this._prim.Kinematic;
374 } 374 }
375 set 375 set
376 { 376 {
377 this._prim.Kinematic = value; 377 this._prim.Kinematic = value;
378 } 378 }
379 } 379 }
380 380
381 public override Quaternion Orientation 381 public override Quaternion Orientation
382 { 382 {
383 get 383 get
384 { 384 {
385 Quaternion res = new Quaternion(); 385 Quaternion res = new Quaternion();
386 PhysXWrapper.Quaternion quat = this._prim.GetOrientation(); 386 PhysXWrapper.Quaternion quat = this._prim.GetOrientation();
387 res.w = quat.W; 387 res.w = quat.W;
388 res.x = quat.X; 388 res.x = quat.X;
389 res.y = quat.Y; 389 res.y = quat.Y;
390 res.z = quat.Z; 390 res.z = quat.Z;
391 return res; 391 return res;
392 } 392 }
393 set 393 set
394 { 394 {
395 395
396 } 396 }
397 } 397 }
398 398
399 public override PhysicsVector Acceleration 399 public override PhysicsVector Acceleration
400 { 400 {
401 get 401 get
402 { 402 {
403 return _acceleration; 403 return _acceleration;
404 } 404 }
405 405
406 } 406 }
407 public void SetAcceleration (PhysicsVector accel) 407 public void SetAcceleration (PhysicsVector accel)
408 { 408 {
409 this._acceleration = accel; 409 this._acceleration = accel;
410 } 410 }
411 411
412 public override void AddForce(PhysicsVector force) 412 public override void AddForce(PhysicsVector force)
413 { 413 {
414 414
415 } 415 }
416 416
417 public override void SetMomentum(PhysicsVector momentum) 417 public override void SetMomentum(PhysicsVector momentum)
418 { 418 {
419 419
420 } 420 }
421 421
422 422
423 } 423 }
424 424
425} 425}
diff --git a/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs b/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs
index f5da4c0..d6debed 100644
--- a/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs
@@ -1,35 +1,35 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Scripting")] 8[assembly: AssemblyTitle("OpenSim.Scripting")]
9[assembly: AssemblyDescription("")] 9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Scripting")] 12[assembly: AssemblyProduct("OpenSim.Scripting")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
22// The following GUID is for the ID of the typelib if this project is exposed to COM 22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("61eae1ad-82aa-4c77-8bc5-b5a8c9522b18")] 23[assembly: Guid("61eae1ad-82aa-4c77-8bc5-b5a8c9522b18")]
24 24
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32// You can specify all the values or you can default the Revision and Build Numbers 32// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below: 33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")] 34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")] 35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Scripting/Script.cs b/OpenSim/Region/Scripting/Script.cs
index 0f4af00..0551ea0 100644
--- a/OpenSim/Region/Scripting/Script.cs
+++ b/OpenSim/Region/Scripting/Script.cs
@@ -1,32 +1,32 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Framework.Console; 5using OpenSim.Framework.Console;
6using OpenSim.Framework; 6using OpenSim.Framework;
7using OpenSim.Region; 7using OpenSim.Region;
8using OpenSim.Region.Scenes; 8using OpenSim.Region.Scenes;
9 9
10namespace OpenSim.Scripting 10namespace OpenSim.Scripting
11{ 11{
12 public interface IScript 12 public interface IScript
13 { 13 {
14 void Initialise(ScriptInfo scriptInfo); 14 void Initialise(ScriptInfo scriptInfo);
15 } 15 }
16 16
17 public class TestScript : IScript 17 public class TestScript : IScript
18 { 18 {
19 ScriptInfo script; 19 ScriptInfo script;
20 20
21 public void Initialise(ScriptInfo scriptInfo) 21 public void Initialise(ScriptInfo scriptInfo)
22 { 22 {
23 script = scriptInfo; 23 script = scriptInfo;
24 script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame); 24 script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame);
25 } 25 }
26 26
27 void events_OnFrame() 27 void events_OnFrame()
28 { 28 {
29 script.logger.Verbose("Hello World!"); 29 script.logger.Verbose("Hello World!");
30 } 30 }
31 } 31 }
32} 32}
diff --git a/OpenSim/Region/Scripting/ScriptAccess.cs b/OpenSim/Region/Scripting/ScriptAccess.cs
index a9fede5..ce814a4 100644
--- a/OpenSim/Region/Scripting/ScriptAccess.cs
+++ b/OpenSim/Region/Scripting/ScriptAccess.cs
@@ -1,31 +1,31 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Region.Scenes; 5using OpenSim.Region.Scenes;
6using OpenSim.Framework.Console; 6using OpenSim.Framework.Console;
7 7
8namespace OpenSim.Scripting 8namespace OpenSim.Scripting
9{ 9{
10 /// <summary> 10 /// <summary>
11 /// Class which provides access to the world 11 /// Class which provides access to the world
12 /// </summary> 12 /// </summary>
13 public class ScriptInfo 13 public class ScriptInfo
14 { 14 {
15 // Reference to world.eventsManager provided for convenience 15 // Reference to world.eventsManager provided for convenience
16 public EventManager events; 16 public EventManager events;
17 17
18 // The main world 18 // The main world
19 public Scene world; 19 public Scene world;
20 20
21 // The console 21 // The console
22 public LogBase logger; 22 public LogBase logger;
23 23
24 public ScriptInfo(Scene scene) 24 public ScriptInfo(Scene scene)
25 { 25 {
26 world = scene; 26 world = scene;
27 events = world.eventManager; 27 events = world.eventManager;
28 logger = OpenSim.Framework.Console.MainLog.Instance; 28 logger = OpenSim.Framework.Console.MainLog.Instance;
29 } 29 }
30 } 30 }
31} 31}
diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
index 39ba6e4..0a88594 100644
--- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
@@ -1,112 +1,112 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29// BDB Support 29// BDB Support
30// Apparently broken on Mono 30// Apparently broken on Mono
31 31
32using BerkeleyDb; 32using BerkeleyDb;
33using libsecondlife; 33using libsecondlife;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36 36
37namespace OpenSim.Region.Storage.LocalStorageBDB 37namespace OpenSim.Region.Storage.LocalStorageBDB
38{ 38{
39 public class BDBLocalStorage : ILocalStorage 39 public class BDBLocalStorage : ILocalStorage
40 { 40 {
41 const string simDbName = "localsim.db"; 41 const string simDbName = "localsim.db";
42 42
43 DbHash sim; 43 DbHash sim;
44 Db DB; 44 Db DB;
45 //BEFormatter formatter; 45 //BEFormatter formatter;
46 46
47 public BDBLocalStorage() 47 public BDBLocalStorage()
48 { 48 {
49 DB = new Db(DbCreateFlags.None); 49 DB = new Db(DbCreateFlags.None);
50 sim = (DbHash)DB.Open(null, simDbName, null, DbType.Hash, Db.OpenFlags.Create, 0); 50 sim = (DbHash)DB.Open(null, simDbName, null, DbType.Hash, Db.OpenFlags.Create, 0);
51 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); 51 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0);
52 } 52 }
53 53
54 public void Initialise(string file) 54 public void Initialise(string file)
55 { 55 {
56 // Blank 56 // Blank
57 } 57 }
58 58
59 public void StorePrim(PrimData prim) 59 public void StorePrim(PrimData prim)
60 { 60 {
61 DbEntry key = new DbEntry(); 61 DbEntry key = new DbEntry();
62 DbEntry data = new DbEntry(); 62 DbEntry data = new DbEntry();
63 lock (sim) 63 lock (sim)
64 { 64 {
65 sim.PutUnique(null, ref key, ref data, DbFile.WriteFlags.AutoCommit); 65 sim.PutUnique(null, ref key, ref data, DbFile.WriteFlags.AutoCommit);
66 } 66 }
67 } 67 }
68 public void RemovePrim(LLUUID primID) 68 public void RemovePrim(LLUUID primID)
69 { 69 {
70 70
71 } 71 }
72 public void LoadPrimitives(ILocalStorageReceiver receiver) 72 public void LoadPrimitives(ILocalStorageReceiver receiver)
73 { 73 {
74 74
75 } 75 }
76 public float[] LoadWorld() 76 public float[] LoadWorld()
77 { 77 {
78 return new float[65536]; 78 return new float[65536];
79 } 79 }
80 public void SaveMap(float[] heightmap) 80 public void SaveMap(float[] heightmap)
81 { 81 {
82 82
83 } 83 }
84 84
85 public void SaveParcels(ParcelData[] parcel_data) 85 public void SaveParcels(ParcelData[] parcel_data)
86 { 86 {
87 } 87 }
88 88
89 public void SaveParcel(ParcelData parcel) 89 public void SaveParcel(ParcelData parcel)
90 { 90 {
91 } 91 }
92 92
93 public void RemoveParcel(ParcelData parcel) 93 public void RemoveParcel(ParcelData parcel)
94 { 94 {
95 } 95 }
96 96
97 public void RemoveAllParcels() 97 public void RemoveAllParcels()
98 { 98 {
99 } 99 }
100 100
101 public void LoadParcels(ILocalStorageParcelReceiver recv) 101 public void LoadParcels(ILocalStorageParcelReceiver recv)
102 { 102 {
103 recv.NoParcelDataFromStorage(); 103 recv.NoParcelDataFromStorage();
104 } 104 }
105 105
106 public void ShutDown() 106 public void ShutDown()
107 { 107 {
108 sim.GetDb().Close(); 108 sim.GetDb().Close();
109 DB.Close(); 109 DB.Close();
110 } 110 }
111 } 111 }
112} \ No newline at end of file 112} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
index 4463ac9..a3aac18 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
@@ -1,56 +1,56 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// Information about this assembly is defined by the following 30// Information about this assembly is defined by the following
31// attributes. 31// attributes.
32// 32//
33// change them to the information which is associated with the assembly 33// change them to the information which is associated with the assembly
34// you compile. 34// you compile.
35 35
36[assembly: AssemblyTitle("Db4LocalStorage")] 36[assembly: AssemblyTitle("Db4LocalStorage")]
37[assembly: AssemblyDescription("")] 37[assembly: AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 38[assembly: AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 39[assembly: AssemblyCompany("")]
40[assembly: AssemblyProduct("Db4LocalStorage")] 40[assembly: AssemblyProduct("Db4LocalStorage")]
41[assembly: AssemblyCopyright("")] 41[assembly: AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 42[assembly: AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 43[assembly: AssemblyCulture("")]
44 44
45// This sets the default COM visibility of types in the assembly to invisible. 45// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 46// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 47[assembly: ComVisible(false)]
48 48
49// The assembly version has following format : 49// The assembly version has following format :
50// 50//
51// Major.Minor.Build.Revision 51// Major.Minor.Build.Revision
52// 52//
53// You can specify all values by your own or you can build default build and revision 53// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 54// numbers with the '*' character (the default):
55 55
56[assembly: AssemblyVersion("1.0.*")] 56[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 8214bc8..8d9f473 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -1,267 +1,267 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using Db4objects.Db4o; 29using Db4objects.Db4o;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework.Console; 31using OpenSim.Framework.Console;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 33using OpenSim.Framework.Types;
34 34
35namespace OpenSim.Region.Storage.LocalStorageDb4o 35namespace OpenSim.Region.Storage.LocalStorageDb4o
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// 38 ///
39 /// </summary> 39 /// </summary>
40 public class Db4LocalStorage : ILocalStorage 40 public class Db4LocalStorage : ILocalStorage
41 { 41 {
42 private IObjectContainer db; 42 private IObjectContainer db;
43 private string datastore; 43 private string datastore;
44 44
45 public Db4LocalStorage() 45 public Db4LocalStorage()
46 { 46 {
47 47
48 } 48 }
49 49
50 public void Initialise(string dfile) 50 public void Initialise(string dfile)
51 { 51 {
52 MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile); 52 MainLog.Instance.Warn("Db4LocalStorage Opening " + dfile);
53 datastore = dfile; 53 datastore = dfile;
54 try 54 try
55 { 55 {
56 db = Db4oFactory.OpenFile(datastore); 56 db = Db4oFactory.OpenFile(datastore);
57 MainLog.Instance.Verbose("Db4LocalStorage creation"); 57 MainLog.Instance.Verbose("Db4LocalStorage creation");
58 } 58 }
59 catch (Exception e) 59 catch (Exception e)
60 { 60 {
61 db.Close(); 61 db.Close();
62 MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured"); 62 MainLog.Instance.Warn("Db4LocalStorage :Constructor - Exception occured");
63 MainLog.Instance.Warn(e.ToString()); 63 MainLog.Instance.Warn(e.ToString());
64 } 64 }
65 } 65 }
66 66
67 public void StorePrim(PrimData prim) 67 public void StorePrim(PrimData prim)
68 { 68 {
69 IObjectSet result = db.Query(new UUIDPrimQuery(prim.FullID)); 69 IObjectSet result = db.Query(new UUIDPrimQuery(prim.FullID));
70 if (result.Count > 0) 70 if (result.Count > 0)
71 { 71 {
72 //prim already in storage 72 //prim already in storage
73 //so update it 73 //so update it
74 PrimData found = (PrimData)result.Next(); 74 PrimData found = (PrimData)result.Next();
75 found.PathBegin = prim.PathBegin; 75 found.PathBegin = prim.PathBegin;
76 found.PathCurve = prim.PathCurve; 76 found.PathCurve = prim.PathCurve;
77 found.PathEnd = prim.PathEnd; 77 found.PathEnd = prim.PathEnd;
78 found.PathRadiusOffset = prim.PathRadiusOffset; 78 found.PathRadiusOffset = prim.PathRadiusOffset;
79 found.PathRevolutions = prim.PathRevolutions; 79 found.PathRevolutions = prim.PathRevolutions;
80 found.PathScaleX = prim.PathScaleX; 80 found.PathScaleX = prim.PathScaleX;
81 found.PathScaleY = prim.PathScaleY; 81 found.PathScaleY = prim.PathScaleY;
82 found.PathShearX = prim.PathShearX; 82 found.PathShearX = prim.PathShearX;
83 found.PathShearY = prim.PathShearY; 83 found.PathShearY = prim.PathShearY;
84 found.PathSkew = prim.PathSkew; 84 found.PathSkew = prim.PathSkew;
85 found.PathTaperX = prim.PathTaperX; 85 found.PathTaperX = prim.PathTaperX;
86 found.PathTaperY = prim.PathTaperY; 86 found.PathTaperY = prim.PathTaperY;
87 found.PathTwist = prim.PathTwist; 87 found.PathTwist = prim.PathTwist;
88 found.PathTwistBegin = prim.PathTwistBegin; 88 found.PathTwistBegin = prim.PathTwistBegin;
89 found.PCode = prim.PCode; 89 found.PCode = prim.PCode;
90 found.ProfileBegin = prim.ProfileBegin; 90 found.ProfileBegin = prim.ProfileBegin;
91 found.ProfileCurve = prim.ProfileCurve; 91 found.ProfileCurve = prim.ProfileCurve;
92 found.ProfileEnd = prim.ProfileEnd; 92 found.ProfileEnd = prim.ProfileEnd;
93 found.ProfileHollow = prim.ProfileHollow; 93 found.ProfileHollow = prim.ProfileHollow;
94 found.Position = prim.Position; 94 found.Position = prim.Position;
95 found.Rotation = prim.Rotation; 95 found.Rotation = prim.Rotation;
96 found.TextureEntry = prim.TextureEntry; 96 found.TextureEntry = prim.TextureEntry;
97 db.Set(found); 97 db.Set(found);
98 db.Commit(); 98 db.Commit();
99 } 99 }
100 else 100 else
101 { 101 {
102 //not in storage 102 //not in storage
103 db.Set(prim); 103 db.Set(prim);
104 db.Commit(); 104 db.Commit();
105 } 105 }
106 } 106 }
107 107
108 public void RemovePrim(LLUUID primID) 108 public void RemovePrim(LLUUID primID)
109 { 109 {
110 IObjectSet result = db.Query(new UUIDPrimQuery(primID)); 110 IObjectSet result = db.Query(new UUIDPrimQuery(primID));
111 if (result.Count > 0) 111 if (result.Count > 0)
112 { 112 {
113 PrimData found = (PrimData)result.Next(); 113 PrimData found = (PrimData)result.Next();
114 db.Delete(found); 114 db.Delete(found);
115 } 115 }
116 } 116 }
117 117
118 118
119 public void LoadPrimitives(ILocalStorageReceiver receiver) 119 public void LoadPrimitives(ILocalStorageReceiver receiver)
120 { 120 {
121 IObjectSet result = db.Get(typeof(PrimData)); 121 IObjectSet result = db.Get(typeof(PrimData));
122 MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count); 122 MainLog.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is " + result.Count);
123 foreach (PrimData prim in result) 123 foreach (PrimData prim in result)
124 { 124 {
125 receiver.PrimFromStorage(prim); 125 receiver.PrimFromStorage(prim);
126 } 126 }
127 } 127 }
128 128
129 public float[] LoadWorld() 129 public float[] LoadWorld()
130 { 130 {
131 MainLog.Instance.Verbose("LoadWorld() - Loading world...."); 131 MainLog.Instance.Verbose("LoadWorld() - Loading world....");
132 float[] heightmap = null; 132 float[] heightmap = null;
133 MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB"); 133 MainLog.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB");
134 IObjectSet world_result = db.Get(typeof(MapStorage)); 134 IObjectSet world_result = db.Get(typeof(MapStorage));
135 if (world_result.Count > 0) 135 if (world_result.Count > 0)
136 { 136 {
137 MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading"); 137 MainLog.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading");
138 MapStorage map = (MapStorage)world_result.Next(); 138 MapStorage map = (MapStorage)world_result.Next();
139 //blank.LandMap = map.Map; 139 //blank.LandMap = map.Map;
140 heightmap = map.Map; 140 heightmap = map.Map;
141 } 141 }
142 return heightmap; 142 return heightmap;
143 } 143 }
144 144
145 public void SaveMap(float[] heightmap) 145 public void SaveMap(float[] heightmap)
146 { 146 {
147 IObjectSet world_result = db.Get(typeof(MapStorage)); 147 IObjectSet world_result = db.Get(typeof(MapStorage));
148 if (world_result.Count > 0) 148 if (world_result.Count > 0)
149 { 149 {
150 MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database"); 150 MainLog.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database");
151 MapStorage map = (MapStorage)world_result.Next(); 151 MapStorage map = (MapStorage)world_result.Next();
152 db.Delete(map); 152 db.Delete(map);
153 } 153 }
154 MapStorage map1 = new MapStorage(); 154 MapStorage map1 = new MapStorage();
155 map1.Map = heightmap; //OpenSim_Main.local_world.LandMap; 155 map1.Map = heightmap; //OpenSim_Main.local_world.LandMap;
156 db.Set(map1); 156 db.Set(map1);
157 db.Commit(); 157 db.Commit();
158 } 158 }
159 159
160 public void SaveParcel(ParcelData parcel) 160 public void SaveParcel(ParcelData parcel)
161 { 161 {
162 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); 162 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
163 if (result.Count > 0) 163 if (result.Count > 0)
164 { 164 {
165 //Old Parcel 165 //Old Parcel
166 ParcelData updateParcel = (ParcelData)result.Next(); 166 ParcelData updateParcel = (ParcelData)result.Next();
167 updateParcel.AABBMax = parcel.AABBMax; 167 updateParcel.AABBMax = parcel.AABBMax;
168 updateParcel.AABBMin = parcel.AABBMin; 168 updateParcel.AABBMin = parcel.AABBMin;
169 updateParcel.area = parcel.area; 169 updateParcel.area = parcel.area;
170 updateParcel.auctionID = parcel.auctionID; 170 updateParcel.auctionID = parcel.auctionID;
171 updateParcel.authBuyerID = parcel.authBuyerID; 171 updateParcel.authBuyerID = parcel.authBuyerID;
172 updateParcel.category = parcel.category; 172 updateParcel.category = parcel.category;
173 updateParcel.claimDate = parcel.claimDate; 173 updateParcel.claimDate = parcel.claimDate;
174 updateParcel.claimPrice = parcel.claimPrice; 174 updateParcel.claimPrice = parcel.claimPrice;
175 updateParcel.groupID = parcel.groupID; 175 updateParcel.groupID = parcel.groupID;
176 updateParcel.groupPrims = parcel.groupPrims; 176 updateParcel.groupPrims = parcel.groupPrims;
177 updateParcel.isGroupOwned = parcel.isGroupOwned; 177 updateParcel.isGroupOwned = parcel.isGroupOwned;
178 updateParcel.landingType = parcel.landingType; 178 updateParcel.landingType = parcel.landingType;
179 updateParcel.mediaAutoScale = parcel.mediaAutoScale; 179 updateParcel.mediaAutoScale = parcel.mediaAutoScale;
180 updateParcel.mediaID = parcel.mediaID; 180 updateParcel.mediaID = parcel.mediaID;
181 updateParcel.mediaURL = parcel.mediaURL; 181 updateParcel.mediaURL = parcel.mediaURL;
182 updateParcel.musicURL = parcel.musicURL; 182 updateParcel.musicURL = parcel.musicURL;
183 updateParcel.localID = parcel.localID; 183 updateParcel.localID = parcel.localID;
184 updateParcel.ownerID = parcel.ownerID; 184 updateParcel.ownerID = parcel.ownerID;
185 updateParcel.passHours = parcel.passHours; 185 updateParcel.passHours = parcel.passHours;
186 updateParcel.passPrice = parcel.passPrice; 186 updateParcel.passPrice = parcel.passPrice;
187 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone(); 187 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone();
188 updateParcel.parcelDesc = parcel.parcelDesc; 188 updateParcel.parcelDesc = parcel.parcelDesc;
189 updateParcel.parcelFlags = parcel.parcelFlags; 189 updateParcel.parcelFlags = parcel.parcelFlags;
190 updateParcel.parcelName = parcel.parcelName; 190 updateParcel.parcelName = parcel.parcelName;
191 updateParcel.parcelStatus = parcel.parcelStatus; 191 updateParcel.parcelStatus = parcel.parcelStatus;
192 updateParcel.salePrice = parcel.salePrice; 192 updateParcel.salePrice = parcel.salePrice;
193 updateParcel.snapshotID = parcel.snapshotID; 193 updateParcel.snapshotID = parcel.snapshotID;
194 updateParcel.userLocation = parcel.userLocation; 194 updateParcel.userLocation = parcel.userLocation;
195 updateParcel.userLookAt = parcel.userLookAt; 195 updateParcel.userLookAt = parcel.userLookAt;
196 196
197 db.Set(updateParcel); 197 db.Set(updateParcel);
198 } 198 }
199 else 199 else
200 { 200 {
201 db.Set(parcel); 201 db.Set(parcel);
202 } 202 }
203 db.Commit(); 203 db.Commit();
204 } 204 }
205 205
206 public void SaveParcels(ParcelData[] parcel_data) 206 public void SaveParcels(ParcelData[] parcel_data)
207 { 207 {
208 MainLog.Instance.Notice("Parcel Backup: Saving Parcels..."); 208 MainLog.Instance.Notice("Parcel Backup: Saving Parcels...");
209 int i; 209 int i;
210 for (i = 0; i < parcel_data.GetLength(0); i++) 210 for (i = 0; i < parcel_data.GetLength(0); i++)
211 { 211 {
212 212
213 SaveParcel(parcel_data[i]); 213 SaveParcel(parcel_data[i]);
214 214
215 } 215 }
216 MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete"); 216 MainLog.Instance.Notice("Parcel Backup: Parcel Save Complete");
217 } 217 }
218 218
219 public void RemoveParcel(ParcelData parcel) 219 public void RemoveParcel(ParcelData parcel)
220 { 220 {
221 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID)); 221 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
222 if (result.Count > 0) 222 if (result.Count > 0)
223 { 223 {
224 db.Delete(result[0]); 224 db.Delete(result[0]);
225 } 225 }
226 db.Commit(); 226 db.Commit();
227 } 227 }
228 public void RemoveAllParcels() 228 public void RemoveAllParcels()
229 { 229 {
230 MainLog.Instance.Notice("Parcel Backup: Removing all parcels..."); 230 MainLog.Instance.Notice("Parcel Backup: Removing all parcels...");
231 IObjectSet result = db.Get(typeof(ParcelData)); 231 IObjectSet result = db.Get(typeof(ParcelData));
232 if (result.Count > 0) 232 if (result.Count > 0)
233 { 233 {
234 foreach (ParcelData parcelData in result) 234 foreach (ParcelData parcelData in result)
235 { 235 {
236 RemoveParcel(parcelData); 236 RemoveParcel(parcelData);
237 } 237 }
238 } 238 }
239 } 239 }
240 240
241 public void LoadParcels(ILocalStorageParcelReceiver recv) 241 public void LoadParcels(ILocalStorageParcelReceiver recv)
242 { 242 {
243 MainLog.Instance.Notice("Parcel Backup: Loading Parcels..."); 243 MainLog.Instance.Notice("Parcel Backup: Loading Parcels...");
244 IObjectSet result = db.Get(typeof(ParcelData)); 244 IObjectSet result = db.Get(typeof(ParcelData));
245 if (result.Count > 0) 245 if (result.Count > 0)
246 { 246 {
247 MainLog.Instance.Notice("Parcel Backup: Parcels exist in database."); 247 MainLog.Instance.Notice("Parcel Backup: Parcels exist in database.");
248 foreach (ParcelData parcelData in result) 248 foreach (ParcelData parcelData in result)
249 { 249 {
250 250
251 recv.ParcelFromStorage(parcelData); 251 recv.ParcelFromStorage(parcelData);
252 } 252 }
253 } 253 }
254 else 254 else
255 { 255 {
256 MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel."); 256 MainLog.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel.");
257 recv.NoParcelDataFromStorage(); 257 recv.NoParcelDataFromStorage();
258 } 258 }
259 MainLog.Instance.Notice("Parcel Backup: Parcels Restored"); 259 MainLog.Instance.Notice("Parcel Backup: Parcels Restored");
260 } 260 }
261 public void ShutDown() 261 public void ShutDown()
262 { 262 {
263 db.Commit(); 263 db.Commit();
264 db.Close(); 264 db.Close();
265 } 265 }
266 } 266 }
267} \ No newline at end of file 267} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
index ec82d02..3a5dd19 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
@@ -1,39 +1,39 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28namespace OpenSim.Region.Storage.LocalStorageDb4o 28namespace OpenSim.Region.Storage.LocalStorageDb4o
29{ 29{
30 public class MapStorage 30 public class MapStorage
31 { 31 {
32 public float[] Map; 32 public float[] Map;
33 33
34 public MapStorage() 34 public MapStorage()
35 { 35 {
36 36
37 } 37 }
38 } 38 }
39} \ No newline at end of file 39} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
index 6e6768c..debaa88 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using Db4objects.Db4o.Query; 28using Db4objects.Db4o.Query;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Region.Storage.LocalStorageDb4o 32namespace OpenSim.Region.Storage.LocalStorageDb4o
33{ 33{
34 public class UUIDParcelQuery : Predicate 34 public class UUIDParcelQuery : Predicate
35 { 35 {
36 private LLUUID globalIDSearch; 36 private LLUUID globalIDSearch;
37 37
38 public UUIDParcelQuery(LLUUID find) 38 public UUIDParcelQuery(LLUUID find)
39 { 39 {
40 globalIDSearch = find; 40 globalIDSearch = find;
41 } 41 }
42 public bool Match(ParcelData parcel) 42 public bool Match(ParcelData parcel)
43 { 43 {
44 return (parcel.globalID == globalIDSearch); 44 return (parcel.globalID == globalIDSearch);
45 } 45 }
46 } 46 }
47} 47}
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
index eb309cb..d5077ff 100644
--- a/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using Db4objects.Db4o.Query; 28using Db4objects.Db4o.Query;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Region.Storage.LocalStorageDb4o 32namespace OpenSim.Region.Storage.LocalStorageDb4o
33{ 33{
34 public class UUIDPrimQuery : Predicate 34 public class UUIDPrimQuery : Predicate
35 { 35 {
36 private LLUUID _findID; 36 private LLUUID _findID;
37 37
38 public UUIDPrimQuery(LLUUID find) 38 public UUIDPrimQuery(LLUUID find)
39 { 39 {
40 _findID = find; 40 _findID = find;
41 } 41 }
42 public bool Match(PrimData prim) 42 public bool Match(PrimData prim)
43 { 43 {
44 return (prim.FullID == _findID); 44 return (prim.FullID == _findID);
45 } 45 }
46 } 46 }
47} 47}
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
index 7bc1cc5..6bbaf0f 100644
--- a/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
@@ -1,60 +1,60 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// General Information about an assembly is controlled through the following 30// General Information about an assembly is controlled through the following
31// set of attributes. Change these attribute values to modify the information 31// set of attributes. Change these attribute values to modify the information
32// associated with an assembly. 32// associated with an assembly.
33[assembly: AssemblyTitle("OpenSim.Region.Storage.LocalStorageSQLite")] 33[assembly: AssemblyTitle("OpenSim.Region.Storage.LocalStorageSQLite")]
34[assembly: AssemblyDescription("")] 34[assembly: AssemblyDescription("")]
35[assembly: AssemblyConfiguration("")] 35[assembly: AssemblyConfiguration("")]
36[assembly: AssemblyCompany("")] 36[assembly: AssemblyCompany("")]
37[assembly: AssemblyProduct("OpenSim.Region.Storage.LocalStorageSQLite")] 37[assembly: AssemblyProduct("OpenSim.Region.Storage.LocalStorageSQLite")]
38[assembly: AssemblyCopyright("Copyright © 2007")] 38[assembly: AssemblyCopyright("Copyright © 2007")]
39[assembly: AssemblyTrademark("")] 39[assembly: AssemblyTrademark("")]
40[assembly: AssemblyCulture("")] 40[assembly: AssemblyCulture("")]
41 41
42// Setting ComVisible to false makes the types in this assembly not visible 42// Setting ComVisible to false makes the types in this assembly not visible
43// to COM components. If you need to access a type in this assembly from 43// to COM components. If you need to access a type in this assembly from
44// COM, set the ComVisible attribute to true on that type. 44// COM, set the ComVisible attribute to true on that type.
45[assembly: ComVisible(false)] 45[assembly: ComVisible(false)]
46 46
47// The following GUID is for the ID of the typelib if this project is exposed to COM 47// The following GUID is for the ID of the typelib if this project is exposed to COM
48[assembly: Guid("ecd6e0c1-7909-413e-9e3f-659678ac3bc3")] 48[assembly: Guid("ecd6e0c1-7909-413e-9e3f-659678ac3bc3")]
49 49
50// Version information for an assembly consists of the following four values: 50// Version information for an assembly consists of the following four values:
51// 51//
52// Major Version 52// Major Version
53// Minor Version 53// Minor Version
54// Build Number 54// Build Number
55// Revision 55// Revision
56// 56//
57// You can specify all the values or you can default the Revision and Build Numbers 57// You can specify all the values or you can default the Revision and Build Numbers
58// by using the '*' as shown below: 58// by using the '*' as shown below:
59[assembly: AssemblyVersion("1.0.0.0")] 59[assembly: AssemblyVersion("1.0.0.0")]
60[assembly: AssemblyFileVersion("1.0.0.0")] 60[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
index 9900a98..599ff6c 100644
--- a/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
@@ -1,198 +1,198 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29// SQLite Support 29// SQLite Support
30// A bad idea, but the IRC people told me to! 30// A bad idea, but the IRC people told me to!
31 31
32using System; 32using System;
33using System.Data; 33using System.Data;
34using System.Data.SQLite; 34using System.Data.SQLite;
35using libsecondlife; 35using libsecondlife;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types; 38using OpenSim.Framework.Types;
39 39
40namespace OpenSim.Region.Storage.LocalStorageSQLite 40namespace OpenSim.Region.Storage.LocalStorageSQLite
41{ 41{
42 public class SQLiteLocalStorage : ILocalStorage 42 public class SQLiteLocalStorage : ILocalStorage
43 { 43 {
44 IDbConnection db; 44 IDbConnection db;
45 45
46 public SQLiteLocalStorage() 46 public SQLiteLocalStorage()
47 { 47 {
48 try 48 try
49 { 49 {
50 string connectionstring = "URI=file:localsim.sdb"; 50 string connectionstring = "URI=file:localsim.sdb";
51 db = (IDbConnection)new SQLiteConnection(connectionstring); 51 db = (IDbConnection)new SQLiteConnection(connectionstring);
52 db.Open(); 52 db.Open();
53 } 53 }
54 catch (Exception e) 54 catch (Exception e)
55 { 55 {
56 db.Close(); 56 db.Close();
57 MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured"); 57 MainLog.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured");
58 MainLog.Instance.Warn(e.ToString()); 58 MainLog.Instance.Warn(e.ToString());
59 } 59 }
60 } 60 }
61 61
62 public void Initialise(string file) 62 public void Initialise(string file)
63 { 63 {
64 // Blank 64 // Blank
65 } 65 }
66 66
67 public void StorePrim(PrimData prim) 67 public void StorePrim(PrimData prim)
68 { 68 {
69 IDbCommand cmd = db.CreateCommand(); 69 IDbCommand cmd = db.CreateCommand();
70 70
71 //SECURITY WARNING: 71 //SECURITY WARNING:
72 // These parameters wont produce SQL injections since they are all integer based, however. 72 // These parameters wont produce SQL injections since they are all integer based, however.
73 // if inserting strings such as name or description, you will need to use appropriate 73 // if inserting strings such as name or description, you will need to use appropriate
74 // measures to prevent SQL injection (although the value of SQL injection in this is limited). 74 // measures to prevent SQL injection (although the value of SQL injection in this is limited).
75 75
76 string sql = "REPLACE INTO prim (OwnerID,PCode,PathBegin,PathEnd,PathScaleX,PathScaleY,PathShearX,PathShearY,PathSkew,ProfileBegin,ProfileEnd,Scale,PathCurve,ProfileCurve,ParentID,ProfileHollow,PathRadiusOffset,PathRevolutions,PathTaperX,PathTaperY,PathTwist,PathTwistBegin,Texture,CreationDate,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,Position,Rotation,LocalID,FullID) "; 76 string sql = "REPLACE INTO prim (OwnerID,PCode,PathBegin,PathEnd,PathScaleX,PathScaleY,PathShearX,PathShearY,PathSkew,ProfileBegin,ProfileEnd,Scale,PathCurve,ProfileCurve,ParentID,ProfileHollow,PathRadiusOffset,PathRevolutions,PathTaperX,PathTaperY,PathTwist,PathTwistBegin,Texture,CreationDate,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,Position,Rotation,LocalID,FullID) ";
77 sql += "VALUES ("; 77 sql += "VALUES (";
78 sql += "\"" + prim.OwnerID.ToStringHyphenated() + "\","; // KILL ME NOW! 78 sql += "\"" + prim.OwnerID.ToStringHyphenated() + "\","; // KILL ME NOW!
79 sql += "\"" + prim.PCode.ToString() + "\","; 79 sql += "\"" + prim.PCode.ToString() + "\",";
80 sql += "\"" + prim.PathBegin.ToString() + "\","; 80 sql += "\"" + prim.PathBegin.ToString() + "\",";
81 sql += "\"" + prim.PathEnd.ToString() + "\","; 81 sql += "\"" + prim.PathEnd.ToString() + "\",";
82 sql += "\"" + prim.PathScaleX.ToString() + "\","; 82 sql += "\"" + prim.PathScaleX.ToString() + "\",";
83 sql += "\"" + prim.PathScaleY.ToString() + "\","; 83 sql += "\"" + prim.PathScaleY.ToString() + "\",";
84 sql += "\"" + prim.PathShearX.ToString() + "\","; 84 sql += "\"" + prim.PathShearX.ToString() + "\",";
85 sql += "\"" + prim.PathShearY.ToString() + "\","; 85 sql += "\"" + prim.PathShearY.ToString() + "\",";
86 sql += "\"" + prim.PathSkew.ToString() + "\","; 86 sql += "\"" + prim.PathSkew.ToString() + "\",";
87 sql += "\"" + prim.ProfileBegin.ToString() + "\","; 87 sql += "\"" + prim.ProfileBegin.ToString() + "\",";
88 sql += "\"" + prim.ProfileEnd.ToString() + "\","; 88 sql += "\"" + prim.ProfileEnd.ToString() + "\",";
89 sql += "\"" + prim.Scale.ToString() + "\","; 89 sql += "\"" + prim.Scale.ToString() + "\",";
90 sql += "\"" + prim.PathCurve.ToString() + "\","; 90 sql += "\"" + prim.PathCurve.ToString() + "\",";
91 sql += "\"" + prim.ProfileCurve.ToString() + "\","; 91 sql += "\"" + prim.ProfileCurve.ToString() + "\",";
92 sql += "\"" + prim.ParentID.ToString() + "\","; 92 sql += "\"" + prim.ParentID.ToString() + "\",";
93 sql += "\"" + prim.ProfileHollow.ToString() + "\","; 93 sql += "\"" + prim.ProfileHollow.ToString() + "\",";
94 sql += "\"" + prim.PathRadiusOffset.ToString() + "\","; 94 sql += "\"" + prim.PathRadiusOffset.ToString() + "\",";
95 sql += "\"" + prim.PathRevolutions.ToString() + "\","; 95 sql += "\"" + prim.PathRevolutions.ToString() + "\",";
96 sql += "\"" + prim.PathTaperX.ToString() + "\","; 96 sql += "\"" + prim.PathTaperX.ToString() + "\",";
97 sql += "\"" + prim.PathTaperY.ToString() + "\","; 97 sql += "\"" + prim.PathTaperY.ToString() + "\",";
98 sql += "\"" + prim.PathTwist.ToString() + "\","; 98 sql += "\"" + prim.PathTwist.ToString() + "\",";
99 sql += "\"" + prim.PathTwistBegin.ToString() + "\","; 99 sql += "\"" + prim.PathTwistBegin.ToString() + "\",";
100 sql += "\"" + prim.TextureEntry.ToString() + "\","; 100 sql += "\"" + prim.TextureEntry.ToString() + "\",";
101 sql += "\"" + prim.CreationDate.ToString() + "\","; 101 sql += "\"" + prim.CreationDate.ToString() + "\",";
102 sql += "\"" + prim.OwnerMask.ToString() + "\","; 102 sql += "\"" + prim.OwnerMask.ToString() + "\",";
103 sql += "\"" + prim.NextOwnerMask.ToString() + "\","; 103 sql += "\"" + prim.NextOwnerMask.ToString() + "\",";
104 sql += "\"" + prim.GroupMask.ToString() + "\","; 104 sql += "\"" + prim.GroupMask.ToString() + "\",";
105 sql += "\"" + prim.EveryoneMask.ToString() + "\","; 105 sql += "\"" + prim.EveryoneMask.ToString() + "\",";
106 sql += "\"" + prim.BaseMask.ToString() + "\","; 106 sql += "\"" + prim.BaseMask.ToString() + "\",";
107 sql += "\"" + prim.Position.ToString() + "\","; 107 sql += "\"" + prim.Position.ToString() + "\",";
108 sql += "\"" + prim.Rotation.ToString() + "\","; 108 sql += "\"" + prim.Rotation.ToString() + "\",";
109 sql += "\"" + prim.LocalID.ToString() + "\","; 109 sql += "\"" + prim.LocalID.ToString() + "\",";
110 sql += "\"" + prim.FullID.ToString() + "\")"; 110 sql += "\"" + prim.FullID.ToString() + "\")";
111 111
112 cmd.CommandText = sql; 112 cmd.CommandText = sql;
113 113
114 try 114 try
115 { 115 {
116 cmd.ExecuteNonQuery(); 116 cmd.ExecuteNonQuery();
117 } 117 }
118 catch (Exception e) 118 catch (Exception e)
119 { 119 {
120 MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured"); 120 MainLog.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured");
121 MainLog.Instance.Warn(e.ToString()); 121 MainLog.Instance.Warn(e.ToString());
122 } 122 }
123 123
124 cmd.Dispose(); 124 cmd.Dispose();
125 cmd = null; 125 cmd = null;
126 } 126 }
127 127
128 public void RemovePrim(LLUUID primID) 128 public void RemovePrim(LLUUID primID)
129 { 129 {
130 IDbCommand cmd = db.CreateCommand(); 130 IDbCommand cmd = db.CreateCommand();
131 131
132 //SECURITY WARNING: 132 //SECURITY WARNING:
133 // These parameters wont produce SQL injections since they are all integer based, however. 133 // These parameters wont produce SQL injections since they are all integer based, however.
134 // if inserting strings such as name or description, you will need to use appropriate 134 // if inserting strings such as name or description, you will need to use appropriate
135 // measures to prevent SQL injection (although the value of SQL injection in this is limited). 135 // measures to prevent SQL injection (although the value of SQL injection in this is limited).
136 136
137 string sql = "DELETE FROM prim WHERE FullID = \"" + primID.ToStringHyphenated() + "\""; 137 string sql = "DELETE FROM prim WHERE FullID = \"" + primID.ToStringHyphenated() + "\"";
138 138
139 cmd.CommandText = sql; 139 cmd.CommandText = sql;
140 140
141 try 141 try
142 { 142 {
143 cmd.ExecuteNonQuery(); 143 cmd.ExecuteNonQuery();
144 } 144 }
145 catch (Exception e) 145 catch (Exception e)
146 { 146 {
147 MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured"); 147 MainLog.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured");
148 MainLog.Instance.Warn(e.ToString()); 148 MainLog.Instance.Warn(e.ToString());
149 } 149 }
150 150
151 cmd.Dispose(); 151 cmd.Dispose();
152 cmd = null; 152 cmd = null;
153 } 153 }
154 154
155 public void LoadPrimitives(ILocalStorageReceiver receiver) 155 public void LoadPrimitives(ILocalStorageReceiver receiver)
156 { 156 {
157 157
158 } 158 }
159 159
160 public float[] LoadWorld() 160 public float[] LoadWorld()
161 { 161 {
162 return new float[65536]; 162 return new float[65536];
163 } 163 }
164 164
165 public void SaveMap(float[] heightmap) 165 public void SaveMap(float[] heightmap)
166 { 166 {
167 167
168 } 168 }
169 169
170 public void SaveParcels(ParcelData[] parcel_manager) 170 public void SaveParcels(ParcelData[] parcel_manager)
171 { 171 {
172 172
173 } 173 }
174 174
175 public void SaveParcel(ParcelData parcel) 175 public void SaveParcel(ParcelData parcel)
176 { 176 {
177 } 177 }
178 178
179 public void RemoveParcel(ParcelData parcel) 179 public void RemoveParcel(ParcelData parcel)
180 { 180 {
181 } 181 }
182 182
183 public void RemoveAllParcels() 183 public void RemoveAllParcels()
184 { 184 {
185 } 185 }
186 186
187 public void LoadParcels(ILocalStorageParcelReceiver recv) 187 public void LoadParcels(ILocalStorageParcelReceiver recv)
188 { 188 {
189 recv.NoParcelDataFromStorage(); 189 recv.NoParcelDataFromStorage();
190 } 190 }
191 191
192 public void ShutDown() 192 public void ShutDown()
193 { 193 {
194 db.Close(); 194 db.Close();
195 db = null; 195 db = null;
196 } 196 }
197 } 197 }
198} \ No newline at end of file 198} \ No newline at end of file
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
index 7c8bd07..3ce0967 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs
@@ -1,65 +1,66 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5using OpenSim.Region.Environment.Scenes; 5using OpenSim.Region.Environment.Scenes;
6using OpenSim.Region.Environment; 6using OpenSim.Region.Environment;
7using OpenSim.Region.Interfaces; 7using OpenSim.Region.Interfaces;
8using OpenSim.Framework.Console; 8using OpenSim.Framework.Console;
9using libsecondlife; 9using libsecondlife;
10 10
11namespace OpenSim.DataStore.NullStorage 11namespace OpenSim.DataStore.NullStorage
12{ 12{
13 public class NullDataStore : IRegionDataStore 13 public class NullDataStore : IRegionDataStore
14 { 14 {
15 public void Initialise(string dbfile, string dbname) 15
16 { 16 public void Initialise(string dbfile, string dbname)
17 return; 17 {
18 } 18 return;
19 19 }
20 public void StoreObject(SceneObject obj) 20
21 { 21 public void StoreObject(SceneObject obj)
22 22 {
23 } 23
24 24 }
25 public void RemoveObject(LLUUID obj) 25
26 { 26 public void RemoveObject(LLUUID obj)
27 27 {
28 } 28
29 29 }
30 public List<SceneObject> LoadObjects() 30
31 { 31 public List<SceneObject> LoadObjects()
32 return new List<SceneObject>(); 32 {
33 } 33 return new List<SceneObject>();
34 34 }
35 public void StoreTerrain(double[,] ter) 35
36 { 36 public void StoreTerrain(double[,] ter)
37 37 {
38 } 38
39 39 }
40 public double[,] LoadTerrain() 40
41 { 41 public double[,] LoadTerrain()
42 return null; 42 {
43 } 43 return null;
44 44 }
45 public void RemoveParcel(uint id) 45
46 { 46 public void RemoveParcel(uint id)
47 47 {
48 } 48
49 49 }
50 public void StoreParcel(OpenSim.Region.Environment.Parcel parcel) 50
51 { 51 public void StoreParcel(OpenSim.Region.Environment.Parcel parcel)
52 52 {
53 } 53
54 54 }
55 public List<OpenSim.Region.Environment.Parcel> LoadParcels() 55
56 { 56 public List<OpenSim.Region.Environment.Parcel> LoadParcels()
57 return new List<OpenSim.Region.Environment.Parcel>(); 57 {
58 } 58 return new List<OpenSim.Region.Environment.Parcel>();
59 59 }
60 public void Shutdown() 60
61 { 61 public void Shutdown()
62 62 {
63 } 63
64 } 64 }
65} 65 }
66}
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/Properties/AssemblyInfo.cs
index c0bd46d..fd86315 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/Properties/AssemblyInfo.cs
@@ -1,35 +1,35 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.DataStore.NullStorage")] 8[assembly: AssemblyTitle("OpenSim.DataStore.NullStorage")]
9[assembly: AssemblyDescription("")] 9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.DataStore.NullStorage")] 12[assembly: AssemblyProduct("OpenSim.DataStore.NullStorage")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
22// The following GUID is for the ID of the typelib if this project is exposed to COM 22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("b4a1656d-de22-4080-a970-fd8166acbf16")] 23[assembly: Guid("b4a1656d-de22-4080-a970-fd8166acbf16")]
24 24
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
32// You can specify all the values or you can default the Revision and Build Numbers 32// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below: 33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")] 34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")] 35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
index 9c721d1..c523cd6 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
@@ -1,60 +1,60 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30// General Information about an assembly is controlled through the following 30// General Information about an assembly is controlled through the following
31// set of attributes. Change these attribute values to modify the information 31// set of attributes. Change these attribute values to modify the information
32// associated with an assembly. 32// associated with an assembly.
33[assembly: AssemblyTitle("OpenSim.Region.Terrain.BasicTerrain")] 33[assembly: AssemblyTitle("OpenSim.Region.Terrain.BasicTerrain")]
34[assembly: AssemblyDescription("")] 34[assembly: AssemblyDescription("")]
35[assembly: AssemblyConfiguration("")] 35[assembly: AssemblyConfiguration("")]
36[assembly: AssemblyCompany("")] 36[assembly: AssemblyCompany("")]
37[assembly: AssemblyProduct("OpenSim.Region.Terrain.BasicTerrain")] 37[assembly: AssemblyProduct("OpenSim.Region.Terrain.BasicTerrain")]
38[assembly: AssemblyCopyright("Copyright © 2007")] 38[assembly: AssemblyCopyright("Copyright © 2007")]
39[assembly: AssemblyTrademark("")] 39[assembly: AssemblyTrademark("")]
40[assembly: AssemblyCulture("")] 40[assembly: AssemblyCulture("")]
41 41
42// Setting ComVisible to false makes the types in this assembly not visible 42// Setting ComVisible to false makes the types in this assembly not visible
43// to COM components. If you need to access a type in this assembly from 43// to COM components. If you need to access a type in this assembly from
44// COM, set the ComVisible attribute to true on that type. 44// COM, set the ComVisible attribute to true on that type.
45[assembly: ComVisible(false)] 45[assembly: ComVisible(false)]
46 46
47// The following GUID is for the ID of the typelib if this project is exposed to COM 47// The following GUID is for the ID of the typelib if this project is exposed to COM
48[assembly: Guid("3263f5b5-0a41-4ed5-91a2-9baaaeecc849")] 48[assembly: Guid("3263f5b5-0a41-4ed5-91a2-9baaaeecc849")]
49 49
50// Version information for an assembly consists of the following four values: 50// Version information for an assembly consists of the following four values:
51// 51//
52// Major Version 52// Major Version
53// Minor Version 53// Minor Version
54// Build Number 54// Build Number
55// Revision 55// Revision
56// 56//
57// You can specify all the values or you can default the Revision and Build Numbers 57// You can specify all the values or you can default the Revision and Build Numbers
58// by using the '*' as shown below: 58// by using the '*' as shown below:
59[assembly: AssemblyVersion("1.0.0.0")] 59[assembly: AssemblyVersion("1.0.0.0")]
60[assembly: AssemblyFileVersion("1.0.0.0")] 60[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index f017e44..6f3afea 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -1,954 +1,954 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using System.IO; 32using System.IO;
33using libTerrain; 33using libTerrain;
34using OpenJPEGNet; 34using OpenJPEGNet;
35 35
36namespace OpenSim.Region.Terrain 36namespace OpenSim.Region.Terrain
37{ 37{
38 public class TerrainCommand 38 public class TerrainCommand
39 { 39 {
40 public virtual bool run(string[] cmdargs, ref string output) 40 public virtual bool run(string[] cmdargs, ref string output)
41 { 41 {
42 return false; 42 return false;
43 } 43 }
44 44
45 public string args; 45 public string args;
46 public string help; 46 public string help;
47 } 47 }
48 48
49 public class TerrainEngine 49 public class TerrainEngine
50 { 50 {
51 /// <summary> 51 /// <summary>
52 /// Plugin library for scripts 52 /// Plugin library for scripts
53 /// </summary> 53 /// </summary>
54 public FilterHost customFilters = new FilterHost(); 54 public FilterHost customFilters = new FilterHost();
55 55
56 /// <summary> 56 /// <summary>
57 /// A [normally] 256x256 heightmap 57 /// A [normally] 256x256 heightmap
58 /// </summary> 58 /// </summary>
59 public Channel heightmap; 59 public Channel heightmap;
60 60
61 /// <summary> 61 /// <summary>
62 /// A copy of heightmap at the last save point (for reverting) 62 /// A copy of heightmap at the last save point (for reverting)
63 /// </summary> 63 /// </summary>
64 public Channel revertmap; 64 public Channel revertmap;
65 65
66 /// <summary> 66 /// <summary>
67 /// Water heightmap (needs clientside mods to work) 67 /// Water heightmap (needs clientside mods to work)
68 /// </summary> 68 /// </summary>
69 public Channel watermap; 69 public Channel watermap;
70 70
71 /// <summary> 71 /// <summary>
72 /// Whether or not the terrain has been modified since it was last saved and sent to the Physics engine. 72 /// Whether or not the terrain has been modified since it was last saved and sent to the Physics engine.
73 /// Counts the number of modifications since the last save. (0 = Untainted) 73 /// Counts the number of modifications since the last save. (0 = Untainted)
74 /// </summary> 74 /// </summary>
75 public int tainted; 75 public int tainted;
76 76
77 int w, h; 77 int w, h;
78 78
79 /// <summary> 79 /// <summary>
80 /// Generate a new TerrainEngine instance and creates a new heightmap 80 /// Generate a new TerrainEngine instance and creates a new heightmap
81 /// </summary> 81 /// </summary>
82 public TerrainEngine() 82 public TerrainEngine()
83 { 83 {
84 w = 256; 84 w = 256;
85 h = 256; 85 h = 256;
86 heightmap = new Channel(w, h); 86 heightmap = new Channel(w, h);
87 87
88 tainted++; 88 tainted++;
89 } 89 }
90 90
91 /// <summary> 91 /// <summary>
92 /// Converts the heightmap to a 65536 value 1D floating point array 92 /// Converts the heightmap to a 65536 value 1D floating point array
93 /// </summary> 93 /// </summary>
94 /// <returns>A float[65536] array containing the heightmap</returns> 94 /// <returns>A float[65536] array containing the heightmap</returns>
95 public float[] getHeights1D() 95 public float[] getHeights1D()
96 { 96 {
97 float[] heights = new float[w * h]; 97 float[] heights = new float[w * h];
98 int i; 98 int i;
99 99
100 for (i = 0; i < w * h; i++) 100 for (i = 0; i < w * h; i++)
101 { 101 {
102 heights[i] = (float)heightmap.map[i / w, i % w]; 102 heights[i] = (float)heightmap.map[i / w, i % w];
103 } 103 }
104 104
105 return heights; 105 return heights;
106 } 106 }
107 107
108 /// <summary> 108 /// <summary>
109 /// Converts the heightmap to a 256x256 value 2D floating point array. 109 /// Converts the heightmap to a 256x256 value 2D floating point array.
110 /// </summary> 110 /// </summary>
111 /// <returns>An array of 256,256 values containing the heightmap</returns> 111 /// <returns>An array of 256,256 values containing the heightmap</returns>
112 public float[,] getHeights2D() 112 public float[,] getHeights2D()
113 { 113 {
114 float[,] heights = new float[w, h]; 114 float[,] heights = new float[w, h];
115 int x, y; 115 int x, y;
116 for (x = 0; x < w; x++) 116 for (x = 0; x < w; x++)
117 { 117 {
118 for (y = 0; y < h; y++) 118 for (y = 0; y < h; y++)
119 { 119 {
120 heights[x, y] = (float)heightmap.map[x, y]; 120 heights[x, y] = (float)heightmap.map[x, y];
121 } 121 }
122 } 122 }
123 return heights; 123 return heights;
124 } 124 }
125 125
126 /// <summary> 126 /// <summary>
127 /// Converts the heightmap to a 256x256 value 2D floating point array. Double precision version. 127 /// Converts the heightmap to a 256x256 value 2D floating point array. Double precision version.
128 /// </summary> 128 /// </summary>
129 /// <returns>An array of 256,256 values containing the heightmap</returns> 129 /// <returns>An array of 256,256 values containing the heightmap</returns>
130 public double[,] getHeights2DD() 130 public double[,] getHeights2DD()
131 { 131 {
132 return heightmap.map; 132 return heightmap.map;
133 } 133 }
134 134
135 /// <summary> 135 /// <summary>
136 /// Imports a 1D floating point array into the 2D heightmap array 136 /// Imports a 1D floating point array into the 2D heightmap array
137 /// </summary> 137 /// </summary>
138 /// <param name="heights">The array to import (must have 65536 members)</param> 138 /// <param name="heights">The array to import (must have 65536 members)</param>
139 public void setHeights1D(float[] heights) 139 public void setHeights1D(float[] heights)
140 { 140 {
141 int i; 141 int i;
142 for (i = 0; i < w * h; i++) 142 for (i = 0; i < w * h; i++)
143 { 143 {
144 heightmap.map[i / w, i % w] = heights[i]; 144 heightmap.map[i / w, i % w] = heights[i];
145 } 145 }
146 146
147 tainted++; 147 tainted++;
148 } 148 }
149 149
150 /// <summary> 150 /// <summary>
151 /// Loads a 2D array of values into the heightmap 151 /// Loads a 2D array of values into the heightmap
152 /// </summary> 152 /// </summary>
153 /// <param name="heights">An array of 256,256 float values</param> 153 /// <param name="heights">An array of 256,256 float values</param>
154 public void setHeights2D(float[,] heights) 154 public void setHeights2D(float[,] heights)
155 { 155 {
156 int x, y; 156 int x, y;
157 for (x = 0; x < w; x++) 157 for (x = 0; x < w; x++)
158 { 158 {
159 for (y = 0; y < h; y++) 159 for (y = 0; y < h; y++)
160 { 160 {
161 heightmap.set(x, y, (double)heights[x, y]); 161 heightmap.set(x, y, (double)heights[x, y]);
162 } 162 }
163 } 163 }
164 tainted++; 164 tainted++;
165 } 165 }
166 166
167 /// <summary> 167 /// <summary>
168 /// Loads a 2D array of values into the heightmap (Double Precision Version) 168 /// Loads a 2D array of values into the heightmap (Double Precision Version)
169 /// </summary> 169 /// </summary>
170 /// <param name="heights">An array of 256,256 float values</param> 170 /// <param name="heights">An array of 256,256 float values</param>
171 public void setHeights2D(double[,] heights) 171 public void setHeights2D(double[,] heights)
172 { 172 {
173 int x, y; 173 int x, y;
174 for (x = 0; x < w; x++) 174 for (x = 0; x < w; x++)
175 { 175 {
176 for (y = 0; y < h; y++) 176 for (y = 0; y < h; y++)
177 { 177 {
178 heightmap.set(x, y, heights[x, y]); 178 heightmap.set(x, y, heights[x, y]);
179 } 179 }
180 } 180 }
181 tainted++; 181 tainted++;
182 } 182 }
183 183
184 /// <summary> 184 /// <summary>
185 /// Swaps the two heightmap buffers (the 'revert map' and the heightmap) 185 /// Swaps the two heightmap buffers (the 'revert map' and the heightmap)
186 /// </summary> 186 /// </summary>
187 public void swapRevertMaps() 187 public void swapRevertMaps()
188 { 188 {
189 Channel backup = heightmap.copy(); 189 Channel backup = heightmap.copy();
190 heightmap = revertmap; 190 heightmap = revertmap;
191 revertmap = backup; 191 revertmap = backup;
192 } 192 }
193 193
194 /// <summary> 194 /// <summary>
195 /// Saves the current heightmap into the revertmap 195 /// Saves the current heightmap into the revertmap
196 /// </summary> 196 /// </summary>
197 public void saveRevertMap() 197 public void saveRevertMap()
198 { 198 {
199 revertmap = heightmap.copy(); 199 revertmap = heightmap.copy();
200 } 200 }
201 201
202 /// <summary> 202 /// <summary>
203 /// Processes a terrain-specific command 203 /// Processes a terrain-specific command
204 /// </summary> 204 /// </summary>
205 /// <param name="args">Commandline arguments (space seperated)</param> 205 /// <param name="args">Commandline arguments (space seperated)</param>
206 /// <param name="resultText">Reference that returns error or help text if returning false</param> 206 /// <param name="resultText">Reference that returns error or help text if returning false</param>
207 /// <returns>If the operation was successful (if not, the error is placed into resultText)</returns> 207 /// <returns>If the operation was successful (if not, the error is placed into resultText)</returns>
208 public bool RunTerrainCmd(string[] args, ref string resultText, string simName) 208 public bool RunTerrainCmd(string[] args, ref string resultText, string simName)
209 { 209 {
210 string command = args[0]; 210 string command = args[0];
211 211
212 try 212 try
213 { 213 {
214 214
215 switch (command) 215 switch (command)
216 { 216 {
217 case "help": 217 case "help":
218 resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n"; 218 resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n";
219 resultText += "terrain voronoi <points> <blocksize> - generates a worley fractal with X points per block"; 219 resultText += "terrain voronoi <points> <blocksize> - generates a worley fractal with X points per block";
220 resultText += "terrain seed <seed> - sets the random seed value to <seed>\n"; 220 resultText += "terrain seed <seed> - sets the random seed value to <seed>\n";
221 resultText += "terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n"; 221 resultText += "terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n";
222 resultText += "terrain save <type> <filename> - saves a terrain to disk, type can be 'F32', 'F64', 'PNG', 'RAW' or 'HIRAW'\n"; 222 resultText += "terrain save <type> <filename> - saves a terrain to disk, type can be 'F32', 'F64', 'PNG', 'RAW' or 'HIRAW'\n";
223 resultText += "terrain save grdmap <filename> <gradient map> - creates a PNG snapshot of the region using a named gradient map\n"; 223 resultText += "terrain save grdmap <filename> <gradient map> - creates a PNG snapshot of the region using a named gradient map\n";
224 resultText += "terrain rescale <min> <max> - rescales a terrain to be between <min> and <max> meters high\n"; 224 resultText += "terrain rescale <min> <max> - rescales a terrain to be between <min> and <max> meters high\n";
225 resultText += "terrain erode aerobic <windspeed> <pickupmin> <dropmin> <carry> <rounds> <lowest>\n"; 225 resultText += "terrain erode aerobic <windspeed> <pickupmin> <dropmin> <carry> <rounds> <lowest>\n";
226 resultText += "terrain erode thermal <talus> <rounds> <carry>\n"; 226 resultText += "terrain erode thermal <talus> <rounds> <carry>\n";
227 resultText += "terrain multiply <val> - multiplies a terrain by <val>\n"; 227 resultText += "terrain multiply <val> - multiplies a terrain by <val>\n";
228 resultText += "terrain revert - reverts the terrain to the stored original\n"; 228 resultText += "terrain revert - reverts the terrain to the stored original\n";
229 resultText += "terrain bake - saves the current terrain into the revert map\n"; 229 resultText += "terrain bake - saves the current terrain into the revert map\n";
230 resultText += "terrain csfilter <filename.cs> - loads a new filter from the specified .cs file\n"; 230 resultText += "terrain csfilter <filename.cs> - loads a new filter from the specified .cs file\n";
231 resultText += "terrain jsfilter <filename.js> - loads a new filter from the specified .js file\n"; 231 resultText += "terrain jsfilter <filename.js> - loads a new filter from the specified .js file\n";
232 foreach (KeyValuePair<string, ITerrainFilter> filter in customFilters.filters) 232 foreach (KeyValuePair<string, ITerrainFilter> filter in customFilters.filters)
233 { 233 {
234 resultText += filter.Value.Help(); 234 resultText += filter.Value.Help();
235 } 235 }
236 236
237 return false; 237 return false;
238 238
239 case "revert": 239 case "revert":
240 swapRevertMaps(); 240 swapRevertMaps();
241 saveRevertMap(); 241 saveRevertMap();
242 break; 242 break;
243 243
244 case "bake": 244 case "bake":
245 saveRevertMap(); 245 saveRevertMap();
246 break; 246 break;
247 247
248 case "seed": 248 case "seed":
249 setSeed(Convert.ToInt32(args[1])); 249 setSeed(Convert.ToInt32(args[1]));
250 break; 250 break;
251 251
252 case "erode": 252 case "erode":
253 return consoleErosion(args, ref resultText); 253 return consoleErosion(args, ref resultText);
254 254
255 case "voronoi": 255 case "voronoi":
256 double[] c = new double[2]; 256 double[] c = new double[2];
257 c[0] = -1; 257 c[0] = -1;
258 c[1] = 1; 258 c[1] = 1;
259 heightmap.voronoiDiagram(Convert.ToInt32(args[1]), Convert.ToInt32(args[2]), c); 259 heightmap.voronoiDiagram(Convert.ToInt32(args[1]), Convert.ToInt32(args[2]), c);
260 break; 260 break;
261 261
262 case "hills": 262 case "hills":
263 return consoleHills(args, ref resultText); 263 return consoleHills(args, ref resultText);
264 264
265 case "regenerate": 265 case "regenerate":
266 hills(); 266 hills();
267 break; 267 break;
268 268
269 case "rescale": 269 case "rescale":
270 setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2])); 270 setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2]));
271 break; 271 break;
272 272
273 case "multiply": 273 case "multiply":
274 heightmap *= Convert.ToDouble(args[1]); 274 heightmap *= Convert.ToDouble(args[1]);
275 break; 275 break;
276 276
277 case "load": 277 case "load":
278 args[2].Replace("%name%", simName); 278 args[2].Replace("%name%", simName);
279 switch (args[1].ToLower()) 279 switch (args[1].ToLower())
280 { 280 {
281 case "f32": 281 case "f32":
282 loadFromFileF32(args[2]); 282 loadFromFileF32(args[2]);
283 break; 283 break;
284 284
285 case "f64": 285 case "f64":
286 loadFromFileF64(args[2]); 286 loadFromFileF64(args[2]);
287 break; 287 break;
288 288
289 case "raw": 289 case "raw":
290 loadFromFileSLRAW(args[2]); 290 loadFromFileSLRAW(args[2]);
291 break; 291 break;
292 292
293 case "img": 293 case "img":
294 heightmap.loadImage(args[2]); 294 heightmap.loadImage(args[2]);
295 return false; 295 return false;
296 296
297 default: 297 default:
298 resultText = "Unknown image or data format"; 298 resultText = "Unknown image or data format";
299 return false; 299 return false;
300 } 300 }
301 break; 301 break;
302 302
303 case "save": 303 case "save":
304 args[2].Replace("%name%", simName); 304 args[2].Replace("%name%", simName);
305 switch (args[1].ToLower()) 305 switch (args[1].ToLower())
306 { 306 {
307 case "f32": 307 case "f32":
308 writeToFileF32(args[2]); 308 writeToFileF32(args[2]);
309 break; 309 break;
310 310
311 case "f64": 311 case "f64":
312 writeToFileF64(args[2]); 312 writeToFileF64(args[2]);
313 break; 313 break;
314 314
315 case "grdmap": 315 case "grdmap":
316 exportImage(args[2], args[3]); 316 exportImage(args[2], args[3]);
317 break; 317 break;
318 318
319 case "png": 319 case "png":
320 heightmap.saveImage(args[2]); 320 heightmap.saveImage(args[2]);
321 break; 321 break;
322 322
323 case "raw": 323 case "raw":
324 writeToFileRAW(args[2]); 324 writeToFileRAW(args[2]);
325 break; 325 break;
326 326
327 case "hiraw": 327 case "hiraw":
328 writeToFileHiRAW(args[2]); 328 writeToFileHiRAW(args[2]);
329 break; 329 break;
330 330
331 default: 331 default:
332 resultText = "Unknown image or data format"; 332 resultText = "Unknown image or data format";
333 return false; 333 return false;
334 } 334 }
335 break; 335 break;
336 336
337 case "csfilter": 337 case "csfilter":
338 customFilters.LoadFilterCSharp(args[1]); 338 customFilters.LoadFilterCSharp(args[1]);
339 break; 339 break;
340 case "jsfilter": 340 case "jsfilter":
341 customFilters.LoadFilterJScript(args[1]); 341 customFilters.LoadFilterJScript(args[1]);
342 break; 342 break;
343 343
344 default: 344 default:
345 // Run any custom registered filters 345 // Run any custom registered filters
346 if (customFilters.filters.ContainsKey(command)) 346 if (customFilters.filters.ContainsKey(command))
347 { 347 {
348 customFilters.filters[command].Filter(heightmap, args); 348 customFilters.filters[command].Filter(heightmap, args);
349 break; 349 break;
350 } 350 }
351 else 351 else
352 { 352 {
353 resultText = "Unknown terrain command"; 353 resultText = "Unknown terrain command";
354 return false; 354 return false;
355 } 355 }
356 } 356 }
357 return true; 357 return true;
358 } 358 }
359 catch (Exception e) 359 catch (Exception e)
360 { 360 {
361 resultText = "Error running terrain command: " + e.ToString(); 361 resultText = "Error running terrain command: " + e.ToString();
362 return false; 362 return false;
363 } 363 }
364 } 364 }
365 365
366 private bool consoleErosion(string[] args, ref string resultText) 366 private bool consoleErosion(string[] args, ref string resultText)
367 { 367 {
368 switch (args[1].ToLower()) 368 switch (args[1].ToLower())
369 { 369 {
370 case "aerobic": 370 case "aerobic":
371 // WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest 371 // WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest
372 heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7])); 372 heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7]));
373 break; 373 break;
374 case "thermal": 374 case "thermal":
375 heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4])); 375 heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4]));
376 break; 376 break;
377 default: 377 default:
378 resultText = "Unknown erosion type"; 378 resultText = "Unknown erosion type";
379 return false; 379 return false;
380 } 380 }
381 return true; 381 return true;
382 } 382 }
383 383
384 private bool consoleHills(string[] args, ref string resultText) 384 private bool consoleHills(string[] args, ref string resultText)
385 { 385 {
386 int count; 386 int count;
387 double sizeMin; 387 double sizeMin;
388 double sizeRange; 388 double sizeRange;
389 bool island; 389 bool island;
390 bool additive; 390 bool additive;
391 bool noisy; 391 bool noisy;
392 392
393 if (args.GetLength(0) > 2) 393 if (args.GetLength(0) > 2)
394 { 394 {
395 count = Convert.ToInt32(args[2]); 395 count = Convert.ToInt32(args[2]);
396 sizeMin = Convert.ToDouble(args[3]); 396 sizeMin = Convert.ToDouble(args[3]);
397 sizeRange = Convert.ToDouble(args[4]); 397 sizeRange = Convert.ToDouble(args[4]);
398 island = Convert.ToBoolean(args[5]); 398 island = Convert.ToBoolean(args[5]);
399 additive = Convert.ToBoolean(args[6]); 399 additive = Convert.ToBoolean(args[6]);
400 noisy = Convert.ToBoolean(args[7]); 400 noisy = Convert.ToBoolean(args[7]);
401 } 401 }
402 else 402 else
403 { 403 {
404 count = 200; 404 count = 200;
405 sizeMin = 20; 405 sizeMin = 20;
406 sizeRange = 40; 406 sizeRange = 40;
407 island = true; 407 island = true;
408 additive = true; 408 additive = true;
409 noisy = false; 409 noisy = false;
410 } 410 }
411 411
412 switch (args[1].ToLower()) 412 switch (args[1].ToLower())
413 { 413 {
414 case "blocks": 414 case "blocks":
415 heightmap.hillsBlocks(count, sizeMin, sizeRange, island, additive, noisy); 415 heightmap.hillsBlocks(count, sizeMin, sizeRange, island, additive, noisy);
416 break; 416 break;
417 case "cones": 417 case "cones":
418 heightmap.hillsCones(count, sizeMin, sizeRange, island, additive, noisy); 418 heightmap.hillsCones(count, sizeMin, sizeRange, island, additive, noisy);
419 break; 419 break;
420 case "spheres": 420 case "spheres":
421 heightmap.hillsSpheres(count, sizeMin, sizeRange, island, additive, noisy); 421 heightmap.hillsSpheres(count, sizeMin, sizeRange, island, additive, noisy);
422 break; 422 break;
423 case "squared": 423 case "squared":
424 heightmap.hillsSquared(count, sizeMin, sizeRange, island, additive, noisy); 424 heightmap.hillsSquared(count, sizeMin, sizeRange, island, additive, noisy);
425 break; 425 break;
426 default: 426 default:
427 resultText = "Unknown hills type"; 427 resultText = "Unknown hills type";
428 return false; 428 return false;
429 } 429 }
430 return true; 430 return true;
431 } 431 }
432 432
433 /// <summary> 433 /// <summary>
434 /// Renormalises the array between min and max 434 /// Renormalises the array between min and max
435 /// </summary> 435 /// </summary>
436 /// <param name="min">Minimum value of the new array</param> 436 /// <param name="min">Minimum value of the new array</param>
437 /// <param name="max">Maximum value of the new array</param> 437 /// <param name="max">Maximum value of the new array</param>
438 public void setRange(float min, float max) 438 public void setRange(float min, float max)
439 { 439 {
440 heightmap.normalise((double)min, (double)max); 440 heightmap.normalise((double)min, (double)max);
441 tainted++; 441 tainted++;
442 } 442 }
443 443
444 /// <summary> 444 /// <summary>
445 /// Loads a file consisting of 256x256 doubles and imports it as an array into the map. 445 /// Loads a file consisting of 256x256 doubles and imports it as an array into the map.
446 /// </summary> 446 /// </summary>
447 /// <remarks>TODO: Move this to libTerrain itself</remarks> 447 /// <remarks>TODO: Move this to libTerrain itself</remarks>
448 /// <param name="filename">The filename of the double array to import</param> 448 /// <param name="filename">The filename of the double array to import</param>
449 public void loadFromFileF64(string filename) 449 public void loadFromFileF64(string filename)
450 { 450 {
451 FileInfo file = new FileInfo(filename); 451 FileInfo file = new FileInfo(filename);
452 FileStream s = file.Open(FileMode.Open, FileAccess.Read); 452 FileStream s = file.Open(FileMode.Open, FileAccess.Read);
453 BinaryReader bs = new BinaryReader(s); 453 BinaryReader bs = new BinaryReader(s);
454 int x, y; 454 int x, y;
455 for (x = 0; x < w; x++) 455 for (x = 0; x < w; x++)
456 { 456 {
457 for (y = 0; y < h; y++) 457 for (y = 0; y < h; y++)
458 { 458 {
459 heightmap.map[x, y] = bs.ReadDouble(); 459 heightmap.map[x, y] = bs.ReadDouble();
460 } 460 }
461 } 461 }
462 462
463 bs.Close(); 463 bs.Close();
464 s.Close(); 464 s.Close();
465 465
466 tainted++; 466 tainted++;
467 } 467 }
468 468
469 /// <summary> 469 /// <summary>
470 /// Loads a file consisting of 256x256 floats and imports it as an array into the map. 470 /// Loads a file consisting of 256x256 floats and imports it as an array into the map.
471 /// </summary> 471 /// </summary>
472 /// <remarks>TODO: Move this to libTerrain itself</remarks> 472 /// <remarks>TODO: Move this to libTerrain itself</remarks>
473 /// <param name="filename">The filename of the float array to import</param> 473 /// <param name="filename">The filename of the float array to import</param>
474 public void loadFromFileF32(string filename) 474 public void loadFromFileF32(string filename)
475 { 475 {
476 FileInfo file = new FileInfo(filename); 476 FileInfo file = new FileInfo(filename);
477 FileStream s = file.Open(FileMode.Open, FileAccess.Read); 477 FileStream s = file.Open(FileMode.Open, FileAccess.Read);
478 BinaryReader bs = new BinaryReader(s); 478 BinaryReader bs = new BinaryReader(s);
479 int x, y; 479 int x, y;
480 for (x = 0; x < w; x++) 480 for (x = 0; x < w; x++)
481 { 481 {
482 for (y = 0; y < h; y++) 482 for (y = 0; y < h; y++)
483 { 483 {
484 heightmap.map[x, y] = (double)bs.ReadSingle(); 484 heightmap.map[x, y] = (double)bs.ReadSingle();
485 } 485 }
486 } 486 }
487 487
488 bs.Close(); 488 bs.Close();
489 s.Close(); 489 s.Close();
490 490
491 tainted++; 491 tainted++;
492 } 492 }
493 493
494 /// <summary> 494 /// <summary>
495 /// Loads a file formatted in the SL .RAW Format used on the main grid 495 /// Loads a file formatted in the SL .RAW Format used on the main grid
496 /// </summary> 496 /// </summary>
497 /// <remarks>This file format stinks and is best avoided.</remarks> 497 /// <remarks>This file format stinks and is best avoided.</remarks>
498 /// <param name="filename">A path to the .RAW format</param> 498 /// <param name="filename">A path to the .RAW format</param>
499 public void loadFromFileSLRAW(string filename) 499 public void loadFromFileSLRAW(string filename)
500 { 500 {
501 FileInfo file = new FileInfo(filename); 501 FileInfo file = new FileInfo(filename);
502 FileStream s = file.Open(FileMode.Open, FileAccess.Read); 502 FileStream s = file.Open(FileMode.Open, FileAccess.Read);
503 BinaryReader bs = new BinaryReader(s); 503 BinaryReader bs = new BinaryReader(s);
504 int x, y; 504 int x, y;
505 for (x = 0; x < w; x++) 505 for (x = 0; x < w; x++)
506 { 506 {
507 for (y = 0; y < h; y++) 507 for (y = 0; y < h; y++)
508 { 508 {
509 heightmap.map[x, y] = (double)bs.ReadByte() * ((double)bs.ReadByte() / 127.0); 509 heightmap.map[x, y] = (double)bs.ReadByte() * ((double)bs.ReadByte() / 127.0);
510 bs.ReadBytes(11); // Advance the stream to next bytes. 510 bs.ReadBytes(11); // Advance the stream to next bytes.
511 } 511 }
512 } 512 }
513 513
514 bs.Close(); 514 bs.Close();
515 s.Close(); 515 s.Close();
516 516
517 tainted++; 517 tainted++;
518 } 518 }
519 519
520 /// <summary> 520 /// <summary>
521 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry double[] array. 521 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry double[] array.
522 /// </summary> 522 /// </summary>
523 /// <param name="filename">The desired output filename</param> 523 /// <param name="filename">The desired output filename</param>
524 public void writeToFileF64(string filename) 524 public void writeToFileF64(string filename)
525 { 525 {
526 FileInfo file = new FileInfo(filename); 526 FileInfo file = new FileInfo(filename);
527 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); 527 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
528 BinaryWriter bs = new BinaryWriter(s); 528 BinaryWriter bs = new BinaryWriter(s);
529 529
530 int x, y; 530 int x, y;
531 for (x = 0; x < w; x++) 531 for (x = 0; x < w; x++)
532 { 532 {
533 for (y = 0; y < h; y++) 533 for (y = 0; y < h; y++)
534 { 534 {
535 bs.Write(heightmap.get(x, y)); 535 bs.Write(heightmap.get(x, y));
536 } 536 }
537 } 537 }
538 538
539 bs.Close(); 539 bs.Close();
540 s.Close(); 540 s.Close();
541 } 541 }
542 542
543 /// <summary> 543 /// <summary>
544 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry float[] array 544 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry float[] array
545 /// </summary> 545 /// </summary>
546 /// <param name="filename">The desired output filename</param> 546 /// <param name="filename">The desired output filename</param>
547 public void writeToFileF32(string filename) 547 public void writeToFileF32(string filename)
548 { 548 {
549 FileInfo file = new FileInfo(filename); 549 FileInfo file = new FileInfo(filename);
550 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); 550 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
551 BinaryWriter bs = new BinaryWriter(s); 551 BinaryWriter bs = new BinaryWriter(s);
552 552
553 int x, y; 553 int x, y;
554 for (x = 0; x < w; x++) 554 for (x = 0; x < w; x++)
555 { 555 {
556 for (y = 0; y < h; y++) 556 for (y = 0; y < h; y++)
557 { 557 {
558 bs.Write((float)heightmap.get(x, y)); 558 bs.Write((float)heightmap.get(x, y));
559 } 559 }
560 } 560 }
561 561
562 bs.Close(); 562 bs.Close();
563 s.Close(); 563 s.Close();
564 } 564 }
565 565
566 /// <summary> 566 /// <summary>
567 /// A very fast LL-RAW file output mechanism - lower precision mechanism but wont take 5 minutes to run either. 567 /// A very fast LL-RAW file output mechanism - lower precision mechanism but wont take 5 minutes to run either.
568 /// (is also editable in an image application) 568 /// (is also editable in an image application)
569 /// </summary> 569 /// </summary>
570 /// <param name="filename">Filename to write to</param> 570 /// <param name="filename">Filename to write to</param>
571 public void writeToFileRAW(string filename) 571 public void writeToFileRAW(string filename)
572 { 572 {
573 FileInfo file = new FileInfo(filename); 573 FileInfo file = new FileInfo(filename);
574 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); 574 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
575 BinaryWriter bs = new BinaryWriter(s); 575 BinaryWriter bs = new BinaryWriter(s);
576 576
577 int x, y; 577 int x, y;
578 578
579 // Used for the 'green' channel. 579 // Used for the 'green' channel.
580 byte avgMultiplier = (byte)heightmap.avg(); 580 byte avgMultiplier = (byte)heightmap.avg();
581 byte backupMultiplier = (byte)revertmap.avg(); 581 byte backupMultiplier = (byte)revertmap.avg();
582 582
583 // Limit the multiplier so it can represent points >64m. 583 // Limit the multiplier so it can represent points >64m.
584 if (avgMultiplier > 196) 584 if (avgMultiplier > 196)
585 avgMultiplier = 196; 585 avgMultiplier = 196;
586 if(backupMultiplier > 196) 586 if(backupMultiplier > 196)
587 backupMultiplier = 196; 587 backupMultiplier = 196;
588 // Make sure it's at least one to prevent a div by zero 588 // Make sure it's at least one to prevent a div by zero
589 if (avgMultiplier < 1) 589 if (avgMultiplier < 1)
590 avgMultiplier = 1; 590 avgMultiplier = 1;
591 if(backupMultiplier < 1) 591 if(backupMultiplier < 1)
592 backupMultiplier = 1; 592 backupMultiplier = 1;
593 593
594 for (x = 0; x < w; x++) 594 for (x = 0; x < w; x++)
595 { 595 {
596 for (y = 0; y < h; y++) 596 for (y = 0; y < h; y++)
597 { 597 {
598 byte red = (byte)(heightmap.get(x, y) / ((double)avgMultiplier / 128.0)); 598 byte red = (byte)(heightmap.get(x, y) / ((double)avgMultiplier / 128.0));
599 byte green = avgMultiplier; 599 byte green = avgMultiplier;
600 byte blue = (byte)watermap.get(x, y); 600 byte blue = (byte)watermap.get(x, y);
601 byte alpha1 = 0; // Land Parcels 601 byte alpha1 = 0; // Land Parcels
602 byte alpha2 = 0; // For Sale Land 602 byte alpha2 = 0; // For Sale Land
603 byte alpha3 = 0; // Public Edit Object 603 byte alpha3 = 0; // Public Edit Object
604 byte alpha4 = 0; // Public Edit Land 604 byte alpha4 = 0; // Public Edit Land
605 byte alpha5 = 255; // Safe Land 605 byte alpha5 = 255; // Safe Land
606 byte alpha6 = 255; // Flying Allowed 606 byte alpha6 = 255; // Flying Allowed
607 byte alpha7 = 255; // Create Landmark 607 byte alpha7 = 255; // Create Landmark
608 byte alpha8 = 255; // Outside Scripts 608 byte alpha8 = 255; // Outside Scripts
609 byte alpha9 = (byte)(revertmap.get(x, y) / ((double)backupMultiplier / 128.0)); 609 byte alpha9 = (byte)(revertmap.get(x, y) / ((double)backupMultiplier / 128.0));
610 byte alpha10 = backupMultiplier; 610 byte alpha10 = backupMultiplier;
611 611
612 bs.Write(red); 612 bs.Write(red);
613 bs.Write(green); 613 bs.Write(green);
614 bs.Write(blue); 614 bs.Write(blue);
615 bs.Write(alpha1); 615 bs.Write(alpha1);
616 bs.Write(alpha2); 616 bs.Write(alpha2);
617 bs.Write(alpha3); 617 bs.Write(alpha3);
618 bs.Write(alpha4); 618 bs.Write(alpha4);
619 bs.Write(alpha5); 619 bs.Write(alpha5);
620 bs.Write(alpha6); 620 bs.Write(alpha6);
621 bs.Write(alpha7); 621 bs.Write(alpha7);
622 bs.Write(alpha8); 622 bs.Write(alpha8);
623 bs.Write(alpha9); 623 bs.Write(alpha9);
624 bs.Write(alpha10); 624 bs.Write(alpha10);
625 } 625 }
626 } 626 }
627 bs.Close(); 627 bs.Close();
628 s.Close(); 628 s.Close();
629 } 629 }
630 630
631 /// <summary> 631 /// <summary>
632 /// Outputs to a LL compatible RAW in the most efficient manner possible 632 /// Outputs to a LL compatible RAW in the most efficient manner possible
633 /// </summary> 633 /// </summary>
634 /// <remarks>Does not calculate the revert map</remarks> 634 /// <remarks>Does not calculate the revert map</remarks>
635 /// <param name="filename">The filename to output to</param> 635 /// <param name="filename">The filename to output to</param>
636 public void writeToFileHiRAW(string filename) 636 public void writeToFileHiRAW(string filename)
637 { 637 {
638 FileInfo file = new FileInfo(filename); 638 FileInfo file = new FileInfo(filename);
639 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write); 639 FileStream s = file.Open(FileMode.CreateNew, FileAccess.Write);
640 BinaryWriter bs = new BinaryWriter(s); 640 BinaryWriter bs = new BinaryWriter(s);
641 641
642 // Generate a smegging big lookup table to speed the operation up (it needs it) 642 // Generate a smegging big lookup table to speed the operation up (it needs it)
643 double[] lookupTable = new double[65536]; 643 double[] lookupTable = new double[65536];
644 int i, j, x, y; 644 int i, j, x, y;
645 for (i = 0; i < 256; i++) 645 for (i = 0; i < 256; i++)
646 { 646 {
647 for (j = 0; j < 256; j++) 647 for (j = 0; j < 256; j++)
648 { 648 {
649 lookupTable[i + (j * 256)] = ((double)i * ((double)j / 127.0)); 649 lookupTable[i + (j * 256)] = ((double)i * ((double)j / 127.0));
650 } 650 }
651 } 651 }
652 652
653 // Output the calculated raw 653 // Output the calculated raw
654 for (x = 0; x < w; x++) 654 for (x = 0; x < w; x++)
655 { 655 {
656 for (y = 0; y < h; y++) 656 for (y = 0; y < h; y++)
657 { 657 {
658 double t = heightmap.get(x, y); 658 double t = heightmap.get(x, y);
659 double min = double.MaxValue; 659 double min = double.MaxValue;
660 int index = 0; 660 int index = 0;
661 661
662 for (i = 0; i < 65536; i++) 662 for (i = 0; i < 65536; i++)
663 { 663 {
664 if (Math.Abs(t - lookupTable[i]) < min) 664 if (Math.Abs(t - lookupTable[i]) < min)
665 { 665 {
666 min = Math.Abs(t - lookupTable[i]); 666 min = Math.Abs(t - lookupTable[i]);
667 index = i; 667 index = i;
668 } 668 }
669 } 669 }
670 670
671 byte red = (byte)(index & 0xFF); 671 byte red = (byte)(index & 0xFF);
672 byte green = (byte)((index >> 8) & 0xFF); 672 byte green = (byte)((index >> 8) & 0xFF);
673 byte blue = (byte)watermap.get(x, y); 673 byte blue = (byte)watermap.get(x, y);
674 byte alpha1 = 0; // Land Parcels 674 byte alpha1 = 0; // Land Parcels
675 byte alpha2 = 0; // For Sale Land 675 byte alpha2 = 0; // For Sale Land
676 byte alpha3 = 0; // Public Edit Object 676 byte alpha3 = 0; // Public Edit Object
677 byte alpha4 = 0; // Public Edit Land 677 byte alpha4 = 0; // Public Edit Land
678 byte alpha5 = 255; // Safe Land 678 byte alpha5 = 255; // Safe Land
679 byte alpha6 = 255; // Flying Allowed 679 byte alpha6 = 255; // Flying Allowed
680 byte alpha7 = 255; // Create Landmark 680 byte alpha7 = 255; // Create Landmark
681 byte alpha8 = 255; // Outside Scripts 681 byte alpha8 = 255; // Outside Scripts
682 byte alpha9 = red; 682 byte alpha9 = red;
683 byte alpha10 = green; 683 byte alpha10 = green;
684 684
685 bs.Write(red); 685 bs.Write(red);
686 bs.Write(green); 686 bs.Write(green);
687 bs.Write(blue); 687 bs.Write(blue);
688 bs.Write(alpha1); 688 bs.Write(alpha1);
689 bs.Write(alpha2); 689 bs.Write(alpha2);
690 bs.Write(alpha3); 690 bs.Write(alpha3);
691 bs.Write(alpha4); 691 bs.Write(alpha4);
692 bs.Write(alpha5); 692 bs.Write(alpha5);
693 bs.Write(alpha6); 693 bs.Write(alpha6);
694 bs.Write(alpha7); 694 bs.Write(alpha7);
695 bs.Write(alpha8); 695 bs.Write(alpha8);
696 bs.Write(alpha9); 696 bs.Write(alpha9);
697 bs.Write(alpha10); 697 bs.Write(alpha10);
698 } 698 }
699 } 699 }
700 700
701 bs.Close(); 701 bs.Close();
702 s.Close(); 702 s.Close();
703 } 703 }
704 704
705 /// <summary> 705 /// <summary>
706 /// Sets the random seed to be used by procedural functions which involve random numbers. 706 /// Sets the random seed to be used by procedural functions which involve random numbers.
707 /// </summary> 707 /// </summary>
708 /// <param name="val">The desired seed</param> 708 /// <param name="val">The desired seed</param>
709 public void setSeed(int val) 709 public void setSeed(int val)
710 { 710 {
711 heightmap.seed = val; 711 heightmap.seed = val;
712 } 712 }
713 713
714 /// <summary> 714 /// <summary>
715 /// Raises land in a sphere around the specified coordinates 715 /// Raises land in a sphere around the specified coordinates
716 /// </summary> 716 /// </summary>
717 /// <param name="rx">Center of the sphere on the X axis</param> 717 /// <param name="rx">Center of the sphere on the X axis</param>
718 /// <param name="ry">Center of the sphere on the Y axis</param> 718 /// <param name="ry">Center of the sphere on the Y axis</param>
719 /// <param name="size">The radius of the sphere</param> 719 /// <param name="size">The radius of the sphere</param>
720 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param> 720 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param>
721 public void raise(double rx, double ry, double size, double amount) 721 public void raise(double rx, double ry, double size, double amount)
722 { 722 {
723 lock (heightmap) 723 lock (heightmap)
724 { 724 {
725 heightmap.raise(rx, ry, size, amount); 725 heightmap.raise(rx, ry, size, amount);
726 } 726 }
727 727
728 tainted++; 728 tainted++;
729 } 729 }
730 730
731 /// <summary> 731 /// <summary>
732 /// Lowers the land in a sphere around the specified coordinates 732 /// Lowers the land in a sphere around the specified coordinates
733 /// </summary> 733 /// </summary>
734 /// <param name="rx">The center of the sphere at the X axis</param> 734 /// <param name="rx">The center of the sphere at the X axis</param>
735 /// <param name="ry">The center of the sphere at the Y axis</param> 735 /// <param name="ry">The center of the sphere at the Y axis</param>
736 /// <param name="size">The radius of the sphere in meters</param> 736 /// <param name="size">The radius of the sphere in meters</param>
737 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param> 737 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param>
738 public void lower(double rx, double ry, double size, double amount) 738 public void lower(double rx, double ry, double size, double amount)
739 { 739 {
740 lock (heightmap) 740 lock (heightmap)
741 { 741 {
742 heightmap.lower(rx, ry, size, amount); 742 heightmap.lower(rx, ry, size, amount);
743 } 743 }
744 744
745 tainted++; 745 tainted++;
746 } 746 }
747 747
748 /// <summary> 748 /// <summary>
749 /// Flattens the land under the brush of specified coordinates (spherical mask) 749 /// Flattens the land under the brush of specified coordinates (spherical mask)
750 /// </summary> 750 /// </summary>
751 /// <param name="rx">Center of sphere</param> 751 /// <param name="rx">Center of sphere</param>
752 /// <param name="ry">Center of sphere</param> 752 /// <param name="ry">Center of sphere</param>
753 /// <param name="size">Radius of the sphere</param> 753 /// <param name="size">Radius of the sphere</param>
754 /// <param name="amount">Thickness of the mask (0..2 recommended)</param> 754 /// <param name="amount">Thickness of the mask (0..2 recommended)</param>
755 public void flatten(double rx, double ry, double size, double amount) 755 public void flatten(double rx, double ry, double size, double amount)
756 { 756 {
757 lock (heightmap) 757 lock (heightmap)
758 { 758 {
759 heightmap.flatten(rx, ry, size, amount); 759 heightmap.flatten(rx, ry, size, amount);
760 } 760 }
761 761
762 tainted++; 762 tainted++;
763 } 763 }
764 764
765 /// <summary> 765 /// <summary>
766 /// Creates noise within the specified bounds 766 /// Creates noise within the specified bounds
767 /// </summary> 767 /// </summary>
768 /// <param name="rx">Center of the bounding sphere</param> 768 /// <param name="rx">Center of the bounding sphere</param>
769 /// <param name="ry">Center of the bounding sphere</param> 769 /// <param name="ry">Center of the bounding sphere</param>
770 /// <param name="size">The radius of the sphere</param> 770 /// <param name="size">The radius of the sphere</param>
771 /// <param name="amount">Strength of the mask (0..2) recommended</param> 771 /// <param name="amount">Strength of the mask (0..2) recommended</param>
772 public void noise(double rx, double ry, double size, double amount) 772 public void noise(double rx, double ry, double size, double amount)
773 { 773 {
774 lock (heightmap) 774 lock (heightmap)
775 { 775 {
776 Channel smoothed = new Channel(); 776 Channel smoothed = new Channel();
777 smoothed.noise(); 777 smoothed.noise();
778 778
779 Channel mask = new Channel(); 779 Channel mask = new Channel();
780 mask.raise(rx, ry, size, amount); 780 mask.raise(rx, ry, size, amount);
781 781
782 heightmap.blend(smoothed, mask); 782 heightmap.blend(smoothed, mask);
783 } 783 }
784 784
785 tainted++; 785 tainted++;
786 } 786 }
787 787
788 /// <summary> 788 /// <summary>
789 /// Reverts land within the specified bounds 789 /// Reverts land within the specified bounds
790 /// </summary> 790 /// </summary>
791 /// <param name="rx">Center of the bounding sphere</param> 791 /// <param name="rx">Center of the bounding sphere</param>
792 /// <param name="ry">Center of the bounding sphere</param> 792 /// <param name="ry">Center of the bounding sphere</param>
793 /// <param name="size">The radius of the sphere</param> 793 /// <param name="size">The radius of the sphere</param>
794 /// <param name="amount">Strength of the mask (0..2) recommended</param> 794 /// <param name="amount">Strength of the mask (0..2) recommended</param>
795 public void revert(double rx, double ry, double size, double amount) 795 public void revert(double rx, double ry, double size, double amount)
796 { 796 {
797 lock (heightmap) 797 lock (heightmap)
798 { 798 {
799 Channel mask = new Channel(); 799 Channel mask = new Channel();
800 mask.raise(rx, ry, size, amount); 800 mask.raise(rx, ry, size, amount);
801 801
802 heightmap.blend(revertmap, mask); 802 heightmap.blend(revertmap, mask);
803 } 803 }
804 804
805 tainted++; 805 tainted++;
806 } 806 }
807 807
808 /// <summary> 808 /// <summary>
809 /// Smooths land under the brush of specified coordinates (spherical mask) 809 /// Smooths land under the brush of specified coordinates (spherical mask)
810 /// </summary> 810 /// </summary>
811 /// <param name="rx">Center of the sphere</param> 811 /// <param name="rx">Center of the sphere</param>
812 /// <param name="ry">Center of the sphere</param> 812 /// <param name="ry">Center of the sphere</param>
813 /// <param name="size">Radius of the sphere</param> 813 /// <param name="size">Radius of the sphere</param>
814 /// <param name="amount">Thickness of the mask (0..2 recommended)</param> 814 /// <param name="amount">Thickness of the mask (0..2 recommended)</param>
815 public void smooth(double rx, double ry, double size, double amount) 815 public void smooth(double rx, double ry, double size, double amount)
816 { 816 {
817 lock (heightmap) 817 lock (heightmap)
818 { 818 {
819 Channel smoothed = heightmap.copy(); 819 Channel smoothed = heightmap.copy();
820 smoothed.smooth(amount); 820 smoothed.smooth(amount);
821 821
822 Channel mask = new Channel(); 822 Channel mask = new Channel();
823 mask.raise(rx,ry,size,amount); 823 mask.raise(rx,ry,size,amount);
824 824
825 heightmap.blend(smoothed, mask); 825 heightmap.blend(smoothed, mask);
826 } 826 }
827 827
828 tainted++; 828 tainted++;
829 } 829 }
830 830
831 /// <summary> 831 /// <summary>
832 /// Generates a simple set of hills in the shape of an island 832 /// Generates a simple set of hills in the shape of an island
833 /// </summary> 833 /// </summary>
834 public void hills() 834 public void hills()
835 { 835 {
836 lock (heightmap) 836 lock (heightmap)
837 { 837 {
838 heightmap.hillsSpheres(200, 20, 40, true, true, false); 838 heightmap.hillsSpheres(200, 20, 40, true, true, false);
839 heightmap.normalise(); 839 heightmap.normalise();
840 heightmap *= 60.0; // Raise to 60m 840 heightmap *= 60.0; // Raise to 60m
841 } 841 }
842 842
843 tainted++; 843 tainted++;
844 } 844 }
845 845
846 /// <summary> 846 /// <summary>
847 /// Wrapper to heightmap.get() 847 /// Wrapper to heightmap.get()
848 /// </summary> 848 /// </summary>
849 /// <param name="x">X coord</param> 849 /// <param name="x">X coord</param>
850 /// <param name="y">Y coord</param> 850 /// <param name="y">Y coord</param>
851 /// <returns>Height at specified coordinates</returns> 851 /// <returns>Height at specified coordinates</returns>
852 public double get(int x, int y) 852 public double get(int x, int y)
853 { 853 {
854 return heightmap.get(x, y); 854 return heightmap.get(x, y);
855 } 855 }
856 856
857 /// <summary> 857 /// <summary>
858 /// Multiplies the heightfield by val 858 /// Multiplies the heightfield by val
859 /// </summary> 859 /// </summary>
860 /// <param name="meep">The heightfield</param> 860 /// <param name="meep">The heightfield</param>
861 /// <param name="val">The multiplier</param> 861 /// <param name="val">The multiplier</param>
862 /// <returns></returns> 862 /// <returns></returns>
863 public static TerrainEngine operator *(TerrainEngine meep, Double val) 863 public static TerrainEngine operator *(TerrainEngine meep, Double val)
864 { 864 {
865 meep.heightmap *= val; 865 meep.heightmap *= val;
866 meep.tainted++; 866 meep.tainted++;
867 return meep; 867 return meep;
868 } 868 }
869 869
870 /// <summary> 870 /// <summary>
871 /// Exports the current heightmap to a PNG file 871 /// Exports the current heightmap to a PNG file
872 /// </summary> 872 /// </summary>
873 /// <param name="filename">The destination filename for the image</param> 873 /// <param name="filename">The destination filename for the image</param>
874 /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> 874 /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param>
875 public void exportImage(string filename, string gradientmap) 875 public void exportImage(string filename, string gradientmap)
876 { 876 {
877 try 877 try
878 { 878 {
879 Bitmap gradientmapLd = new Bitmap(gradientmap); 879 Bitmap gradientmapLd = new Bitmap(gradientmap);
880 880
881 int pallete = gradientmapLd.Height; 881 int pallete = gradientmapLd.Height;
882 882
883 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h); 883 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h);
884 Color[] colours = new Color[pallete]; 884 Color[] colours = new Color[pallete];
885 885
886 for (int i = 0; i < pallete; i++) 886 for (int i = 0; i < pallete; i++)
887 { 887 {
888 colours[i] = gradientmapLd.GetPixel(0, i); 888 colours[i] = gradientmapLd.GetPixel(0, i);
889 } 889 }
890 890
891 Channel copy = heightmap.copy(); 891 Channel copy = heightmap.copy();
892 for (int x = 0; x < copy.w; x++) 892 for (int x = 0; x < copy.w; x++)
893 { 893 {
894 for (int y = 0; y < copy.h; y++) 894 for (int y = 0; y < copy.h; y++)
895 { 895 {
896 // 512 is the largest possible height before colours clamp 896 // 512 is the largest possible height before colours clamp
897 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete); 897 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete);
898 bmp.SetPixel(x, y, colours[colorindex]); 898 bmp.SetPixel(x, y, colours[colorindex]);
899 } 899 }
900 } 900 }
901 901
902 bmp.Save(filename, ImageFormat.Png); 902 bmp.Save(filename, ImageFormat.Png);
903 } 903 }
904 catch (Exception e) 904 catch (Exception e)
905 { 905 {
906 Console.WriteLine("Failed generating terrain map: " + e.ToString()); 906 Console.WriteLine("Failed generating terrain map: " + e.ToString());
907 } 907 }
908 } 908 }
909 909
910 /// <summary> 910 /// <summary>
911 /// Exports the current heightmap in Jpeg2000 format to a byte[] 911 /// Exports the current heightmap in Jpeg2000 format to a byte[]
912 /// </summary> 912 /// </summary>
913 /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> 913 /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param>
914 public byte[] exportJpegImage(string gradientmap) 914 public byte[] exportJpegImage(string gradientmap)
915 { 915 {
916 byte[] imageData = null; 916 byte[] imageData = null;
917 try 917 try
918 { 918 {
919 Bitmap gradientmapLd = new Bitmap(gradientmap); 919 Bitmap gradientmapLd = new Bitmap(gradientmap);
920 920
921 int pallete = gradientmapLd.Height; 921 int pallete = gradientmapLd.Height;
922 922
923 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h); 923 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h);
924 Color[] colours = new Color[pallete]; 924 Color[] colours = new Color[pallete];
925 925
926 for (int i = 0; i < pallete; i++) 926 for (int i = 0; i < pallete; i++)
927 { 927 {
928 colours[i] = gradientmapLd.GetPixel(0, i); 928 colours[i] = gradientmapLd.GetPixel(0, i);
929 } 929 }
930 930
931 Channel copy = heightmap.copy(); 931 Channel copy = heightmap.copy();
932 for (int x = 0; x < copy.w; x++) 932 for (int x = 0; x < copy.w; x++)
933 { 933 {
934 for (int y = 0; y < copy.h; y++) 934 for (int y = 0; y < copy.h; y++)
935 { 935 {
936 // 512 is the largest possible height before colours clamp 936 // 512 is the largest possible height before colours clamp
937 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.h - y, x) / 512.0), 0.0) * pallete); 937 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.h - y, x) / 512.0), 0.0) * pallete);
938 bmp.SetPixel(x, y, colours[colorindex]); 938 bmp.SetPixel(x, y, colours[colorindex]);
939 } 939 }
940 } 940 }
941 941
942 //bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png); 942 //bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
943 imageData = OpenJPEG.EncodeFromImage(bmp, true ); 943 imageData = OpenJPEG.EncodeFromImage(bmp, true );
944 944
945 } 945 }
946 catch (Exception e) 946 catch (Exception e)
947 { 947 {
948 Console.WriteLine("Failed generating terrain map: " + e.ToString()); 948 Console.WriteLine("Failed generating terrain map: " + e.ToString());
949 } 949 }
950 950
951 return imageData; 951 return imageData;
952 } 952 }
953 } 953 }
954} \ No newline at end of file 954} \ No newline at end of file
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
index a38be07..a80ac85 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
@@ -1,126 +1,126 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.CodeDom.Compiler; 29using System.CodeDom.Compiler;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libTerrain; 31using libTerrain;
32using Microsoft.CSharp; 32using Microsoft.CSharp;
33using Microsoft.JScript; 33using Microsoft.JScript;
34 34
35namespace OpenSim.Region.Terrain 35namespace OpenSim.Region.Terrain
36{ 36{
37 public interface ITerrainFilter 37 public interface ITerrainFilter
38 { 38 {
39 void Filter(Channel heightmap, string[] args); 39 void Filter(Channel heightmap, string[] args);
40 string Register(); 40 string Register();
41 string Help(); 41 string Help();
42 } 42 }
43 43
44 public class TestFilter : ITerrainFilter 44 public class TestFilter : ITerrainFilter
45 { 45 {
46 public void Filter(Channel heightmap, string[] args) 46 public void Filter(Channel heightmap, string[] args)
47 { 47 {
48 Console.WriteLine("Hello world"); 48 Console.WriteLine("Hello world");
49 } 49 }
50 50
51 public string Register() 51 public string Register()
52 { 52 {
53 return "demofilter"; 53 return "demofilter";
54 } 54 }
55 55
56 public string Help() 56 public string Help()
57 { 57 {
58 return "demofilter - Does nothing"; 58 return "demofilter - Does nothing";
59 } 59 }
60 } 60 }
61 61
62 public class FilterHost 62 public class FilterHost
63 { 63 {
64 public Dictionary<string, ITerrainFilter> filters = new Dictionary<string, ITerrainFilter>(); 64 public Dictionary<string, ITerrainFilter> filters = new Dictionary<string, ITerrainFilter>();
65 65
66 private void LoadFilter(CodeDomProvider compiler, string filename) 66 private void LoadFilter(CodeDomProvider compiler, string filename)
67 { 67 {
68 CompilerParameters compilerParams = new CompilerParameters(); 68 CompilerParameters compilerParams = new CompilerParameters();
69 CompilerResults compilerResults; 69 CompilerResults compilerResults;
70 compilerParams.GenerateExecutable = false; 70 compilerParams.GenerateExecutable = false;
71 compilerParams.GenerateInMemory = true; 71 compilerParams.GenerateInMemory = true;
72 compilerParams.IncludeDebugInformation = false; 72 compilerParams.IncludeDebugInformation = false;
73 compilerParams.ReferencedAssemblies.Add("libTerrain-BSD.dll"); 73 compilerParams.ReferencedAssemblies.Add("libTerrain-BSD.dll");
74 compilerParams.ReferencedAssemblies.Add("OpenSim.Terrain.BasicTerrain.dll"); 74 compilerParams.ReferencedAssemblies.Add("OpenSim.Terrain.BasicTerrain.dll");
75 compilerParams.ReferencedAssemblies.Add("System.dll"); 75 compilerParams.ReferencedAssemblies.Add("System.dll");
76 76
77 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename); 77 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename);
78 78
79 if (compilerResults.Errors.Count > 0) 79 if (compilerResults.Errors.Count > 0)
80 { 80 {
81 Console.WriteLine("Compile errors:"); 81 Console.WriteLine("Compile errors:");
82 foreach (CompilerError error in compilerResults.Errors) 82 foreach (CompilerError error in compilerResults.Errors)
83 { 83 {
84 Console.WriteLine(error.Line.ToString() + ": " + error.ErrorText.ToString()); 84 Console.WriteLine(error.Line.ToString() + ": " + error.ErrorText.ToString());
85 } 85 }
86 } 86 }
87 else 87 else
88 { 88 {
89 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes()) 89 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes())
90 { 90 {
91 Type testInterface = pluginType.GetInterface("ITerrainFilter",true); 91 Type testInterface = pluginType.GetInterface("ITerrainFilter",true);
92 92
93 if (testInterface != null) 93 if (testInterface != null)
94 { 94 {
95 ITerrainFilter filter = (ITerrainFilter)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString()); 95 ITerrainFilter filter = (ITerrainFilter)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
96 96
97 string filterName = filter.Register(); 97 string filterName = filter.Register();
98 Console.WriteLine("Plugin: " + filterName + " loaded."); 98 Console.WriteLine("Plugin: " + filterName + " loaded.");
99 99
100 if (!filters.ContainsKey(filterName)) 100 if (!filters.ContainsKey(filterName))
101 { 101 {
102 filters.Add(filterName, filter); 102 filters.Add(filterName, filter);
103 } 103 }
104 else 104 else
105 { 105 {
106 filters[filterName] = filter; 106 filters[filterName] = filter;
107 } 107 }
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 } 112 }
113 113
114 public void LoadFilterCSharp(string filename) 114 public void LoadFilterCSharp(string filename)
115 { 115 {
116 CSharpCodeProvider compiler = new CSharpCodeProvider(); 116 CSharpCodeProvider compiler = new CSharpCodeProvider();
117 LoadFilter(compiler, filename); 117 LoadFilter(compiler, filename);
118 } 118 }
119 119
120 public void LoadFilterJScript(string filename) 120 public void LoadFilterJScript(string filename)
121 { 121 {
122 JScriptCodeProvider compiler = new JScriptCodeProvider(); 122 JScriptCodeProvider compiler = new JScriptCodeProvider();
123 LoadFilter(compiler, filename); 123 LoadFilter(compiler, filename);
124 } 124 }
125 } 125 }
126} 126}
diff --git a/Prebuild/README b/Prebuild/README
index eca6be1..4341e42 100644
--- a/Prebuild/README
+++ b/Prebuild/README
@@ -1,230 +1,230 @@
1Prebuild Instructions 1Prebuild Instructions
2 2
3Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt. 3Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt.
4 4
5_________________________________________________________________________________ 5_________________________________________________________________________________
6Overview 6Overview
7 7
8Prebuild can be either be run from the command line to generate the project and make files or you can execute the included batch (*.bat) and Unix Shell script (*.sh) files. 8Prebuild can be either be run from the command line to generate the project and make files or you can execute the included batch (*.bat) and Unix Shell script (*.sh) files.
9The Prebuild file 9The Prebuild file
10 10
11_________________________________________________________________________________ 11_________________________________________________________________________________
12The currently supported developement tools and their associated batch and shell script files. 12The currently supported developement tools and their associated batch and shell script files.
13 13
14Visual Studio .NET 2005 (VS2005.bat) 14Visual Studio .NET 2005 (VS2005.bat)
15Visual Studio .NET 2003 (VS2003.bat) 15Visual Studio .NET 2003 (VS2003.bat)
16Visual Studio .NET 2002 (VS2002.bat) 16Visual Studio .NET 2002 (VS2002.bat)
17SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ 17SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
18SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ 18SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
19MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/ 19MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/
20NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/ 20NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/
21Autotools (autotools.bat and autotools.sh) http://www.gnu.org. Only partial support 21Autotools (autotools.bat and autotools.sh) http://www.gnu.org. Only partial support
22 22
23Notes: 23Notes:
24A Unix Shell script is provided for MonoDevelop, as this is more appropriate than a windows batch file. 24A Unix Shell script is provided for MonoDevelop, as this is more appropriate than a windows batch file.
25Visual Studio .NET 2005 and the Visual Express IDE's can import solutions from older versions of Visual Studio .NET. 25Visual Studio .NET 2005 and the Visual Express IDE's can import solutions from older versions of Visual Studio .NET.
26Makefiles are not currently supported. 26Makefiles are not currently supported.
27 27
28_________________________________________________________________________________ 28_________________________________________________________________________________
29Command Line Syntax: 29Command Line Syntax:
30 30
31Example: 31Example:
32>Prebuild /target vs2003 32>Prebuild /target vs2003
33 33
34This will generate the project files for Visual Studio.NET 2003 and place the redirect the log to a file named PrebuildLog.txt in the parent directory 34This will generate the project files for Visual Studio.NET 2003 and place the redirect the log to a file named PrebuildLog.txt in the parent directory
35 35
36 36
37The syntax structure is as below, where commandParameter is optional depending on the command and you can provide several option-value pairs. 37The syntax structure is as below, where commandParameter is optional depending on the command and you can provide several option-value pairs.
38Note: The '>' signified the command line, do not actually enter this manually 38Note: The '>' signified the command line, do not actually enter this manually
39 39
40>Prebuild /<option> <commandParameter> 40>Prebuild /<option> <commandParameter>
41 41
42>Prebuild /target vs2003 /pause 42>Prebuild /target vs2003 /pause
43 43
44>Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml 44>Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml
45 45
46>Prebuild /target sharpdev /log 46>Prebuild /target sharpdev /log
47 47
48>Prebuild /removedir obj|bin 48>Prebuild /removedir obj|bin
49 49
50>Prebuild /target vs2003 /allowedgroups Group1|Group2 50>Prebuild /target vs2003 /allowedgroups Group1|Group2
51 51
52>Prebuild /clean 52>Prebuild /clean
53 53
54>Prebuild /clean /yes 54>Prebuild /clean /yes
55 55
56>Prebuild /clean vs2003 56>Prebuild /clean vs2003
57 57
58_________________________________________________________________________________ 58_________________________________________________________________________________
59Command Line Options: 59Command Line Options:
60 60
61/usage - Shows the help information on how to use Prebuild and what the different options are and what they do 61/usage - Shows the help information on how to use Prebuild and what the different options are and what they do
62 62
63/clean - The project files generated for the target type specified as a parameter for this option will be deleted. If no value is specified or if 'all' is specified, then project files for all the target types will be deleted. 63/clean - The project files generated for the target type specified as a parameter for this option will be deleted. If no value is specified or if 'all' is specified, then project files for all the target types will be deleted.
64 64
65/target - Specified the name of the development tool for which project or make files will be generated. Possible parameter values include: vs2003, vs2002, sharpdev 65/target - Specified the name of the development tool for which project or make files will be generated. Possible parameter values include: vs2003, vs2002, sharpdev
66 66
67/file - Specifies the name of the XML which defines what files are to be referenced by the generated project files as well as configures the options for them. If not specified, prebuild.xml will be used as the default. 67/file - Specifies the name of the XML which defines what files are to be referenced by the generated project files as well as configures the options for them. If not specified, prebuild.xml will be used as the default.
68 68
69/log - Specified the log file that should be written to for build errors. If this option is not specified, no log file is generated, but if just no value is specified, then the defaul filename will be used for the log (Prebuild.log). 69/log - Specified the log file that should be written to for build errors. If this option is not specified, no log file is generated, but if just no value is specified, then the defaul filename will be used for the log (Prebuild.log).
70 70
71/ppo - Preprocesses the xml file to test for syntax errors or problems but doesn't generate the files 71/ppo - Preprocesses the xml file to test for syntax errors or problems but doesn't generate the files
72 72
73/pause - Shows the console until you press a key so that you can view the messages written while performing the specified actions. 73/pause - Shows the console until you press a key so that you can view the messages written while performing the specified actions.
74This allows you to check if an errors occurred and - if so - what it was. 74This allows you to check if an errors occurred and - if so - what it was.
75 75
76/showtargets - Shows a list of all the targets that can be specified as values for the /clean and /target commands. 76/showtargets - Shows a list of all the targets that can be specified as values for the /clean and /target commands.
77 77
78/allowedgroups - This is followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags 78/allowedgroups - This is followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags
79 79
80/removedir - This is followed by a pipe-delimited list of directory names that will be deleted while recursivly searching the directory of the prebuild application and its child directories (eg. use obj|bin to delete all output and temporary directories before file releases) 80/removedir - This is followed by a pipe-delimited list of directory names that will be deleted while recursivly searching the directory of the prebuild application and its child directories (eg. use obj|bin to delete all output and temporary directories before file releases)
81 81
82/yes - Answer yes to any warnings (e.g. when cleaning all projects). 82/yes - Answer yes to any warnings (e.g. when cleaning all projects).
83 83
84_________________________________________________________________________________ 84_________________________________________________________________________________
85Example Batch Files and Shell Scripts 85Example Batch Files and Shell Scripts
86 86
87NOTE: Common batch and shell script files are included with Prebuild source and file releases. 87NOTE: Common batch and shell script files are included with Prebuild source and file releases.
88______________________________ 88______________________________
89MonoDevelop 89MonoDevelop
90 90
91#!/bin/sh 91#!/bin/sh
92# Generates a combine (.cmbx) and a set of project files (.prjx) 92# Generates a combine (.cmbx) and a set of project files (.prjx)
93# for MonoDevelop, a Mono port of SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx) 93# for MonoDevelop, a Mono port of SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
94./Prebuild /target sharpdev /pause 94./Prebuild /target sharpdev /pause
95 95
96______________________________ 96______________________________
97Visual Studio .NET 2003 97Visual Studio .NET 2003
98 98
99@rem Generates a solution (.sln) and a set of project files (.csproj) 99@rem Generates a solution (.sln) and a set of project files (.csproj)
100@rem for Microsoft Visual Studio .NET 2002 100@rem for Microsoft Visual Studio .NET 2002
101Prebuild /target vs2003 /pause 101Prebuild /target vs2003 /pause
102 102
103Notes: 103Notes:
104Text after lines that start with @rem are comments and are not evaluated 104Text after lines that start with @rem are comments and are not evaluated
105You can also place pause on the last line instead of specifing the /pause command. 105You can also place pause on the last line instead of specifing the /pause command.
106 106
107________________________________________________________________________________ 107________________________________________________________________________________
108Example XML Configuration File 108Example XML Configuration File
109 109
110Note: 110Note:
111XML Comments (<!-- Comment -->) are used to markup the prebuild.xml file with notes 111XML Comments (<!-- Comment -->) are used to markup the prebuild.xml file with notes
112The below file may be out-of-date, however the RealmForge Prebuild file serves as an up-to-date and extensive example. 112The below file may be out-of-date, however the RealmForge Prebuild file serves as an up-to-date and extensive example.
113It can be viewed using Tigris.org's WebSVN (http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml) by just clicking on the "view file" link for the latest revision. 113It can be viewed using Tigris.org's WebSVN (http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml) by just clicking on the "view file" link for the latest revision.
114 114
115_________________________________ 115_________________________________
116 116
117<?xml version="1.0" encoding="utf-8"?> 117<?xml version="1.0" encoding="utf-8"?>
118 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.3 schema, you can find the XSD schema file at the url specified in the xmlns attribute. --> 118 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.3 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
119<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> 119<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
120 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)--> 120 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
121 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.--> 121 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
122 <Configuration name="Debug"> 122 <Configuration name="Debug">
123 <Options> 123 <Options>
124 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 --> 124 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
125 <?if OS = "Win32" ?> 125 <?if OS = "Win32" ?>
126 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> 126 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
127 <?else ?> 127 <?else ?>
128 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> 128 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
129 <?endif ?> 129 <?endif ?>
130 <OptimizeCode>false</OptimizeCode> 130 <OptimizeCode>false</OptimizeCode>
131 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 131 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
132 <AllowUnsafe>false</AllowUnsafe> 132 <AllowUnsafe>false</AllowUnsafe>
133 <WarningLevel>4</WarningLevel> 133 <WarningLevel>4</WarningLevel>
134 <!-The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).--> 134 <!-The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
135 135
136 <WarningsAsErrors>false</WarningsAsErrors> 136 <WarningsAsErrors>false</WarningsAsErrors>
137 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 137 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
138 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)--> 138 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
139 139
140 <OutputPath>..\bin</OutputPath> 140 <OutputPath>..\bin</OutputPath>
141 <DebugInformation>true</DebugInformation> 141 <DebugInformation>true</DebugInformation>
142 <RegisterComInterop>false</RegisterComInterop> 142 <RegisterComInterop>false</RegisterComInterop>
143 <IncrementalBuild>true</IncrementalBuild> 143 <IncrementalBuild>true</IncrementalBuild>
144 <BaseAddress>285212672</BaseAddress> 144 <BaseAddress>285212672</BaseAddress>
145 <FileAlignment>4096</FileAlignment> 145 <FileAlignment>4096</FileAlignment>
146 <NoStdLib>false</NoStdLib> 146 <NoStdLib>false</NoStdLib>
147 <XmlDocFile>Docs.xml</XmlDocFile> 147 <XmlDocFile>Docs.xml</XmlDocFile>
148 </Options> 148 </Options>
149 </Configuration> 149 </Configuration>
150 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files --> 150 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
151 <Options> 151 <Options>
152 <CompilerDefines>TRACE</CompilerDefines> 152 <CompilerDefines>TRACE</CompilerDefines>
153 <OptimizeCode>true</OptimizeCode> 153 <OptimizeCode>true</OptimizeCode>
154 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 154 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
155 <AllowUnsafe>false</AllowUnsafe> 155 <AllowUnsafe>false</AllowUnsafe>
156 <WarningLevel>4</WarningLevel> 156 <WarningLevel>4</WarningLevel>
157 <WarningsAsErrors>false</WarningsAsErrors> 157 <WarningsAsErrors>false</WarningsAsErrors>
158 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 158 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
159 <OutputPath>..\bin</OutputPath> 159 <OutputPath>..\bin</OutputPath>
160 <DebugInformation>false</DebugInformation> 160 <DebugInformation>false</DebugInformation>
161 <RegisterComInterop>false</RegisterComInterop> 161 <RegisterComInterop>false</RegisterComInterop>
162 <IncrementalBuild>true</IncrementalBuild> 162 <IncrementalBuild>true</IncrementalBuild>
163 <BaseAddress>285212672</BaseAddress> 163 <BaseAddress>285212672</BaseAddress>
164 <FileAlignment>4096</FileAlignment> 164 <FileAlignment>4096</FileAlignment>
165 <NoStdLib>false</NoStdLib> 165 <NoStdLib>false</NoStdLib>
166 <GenerateXmlDocFile>true</GenerateXmlDocFile> 166 <GenerateXmlDocFile>true</GenerateXmlDocFile>
167 <XmlDocFile>Docs.xml</XmlDocFile> 167 <XmlDocFile>Docs.xml</XmlDocFile>
168 </Options> 168 </Options>
169 </Configuration> 169 </Configuration>
170 170
171 <!-- One of the projects that is included in the Solution --> 171 <!-- One of the projects that is included in the Solution -->
172 <Project name="RealmForge.Utility" Language="VisualBasic" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> 172 <Project name="RealmForge.Utility" Language="VisualBasic" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
173 <Configuration name="Debug"> 173 <Configuration name="Debug">
174 <Options> 174 <Options>
175 <OutputPath>..\bin\lib\Utility</OutputPath> 175 <OutputPath>..\bin\lib\Utility</OutputPath>
176 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 176 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
177 </Options> 177 </Options>
178 </Configuration> 178 </Configuration>
179 <Configuration name="Release"> 179 <Configuration name="Release">
180 <Options> 180 <Options>
181 <OutputPath>..\bin\lib\Utility</OutputPath> 181 <OutputPath>..\bin\lib\Utility</OutputPath>
182 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 182 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
183 </Options> 183 </Options>
184 </Configuration> 184 </Configuration>
185 <ReferencePath>../bin</ReferencePath> 185 <ReferencePath>../bin</ReferencePath>
186 <Reference name="System"/> 186 <Reference name="System"/>
187 <Reference name="System.Data"/> 187 <Reference name="System.Data"/>
188 <Reference name="System.Drawing"/> 188 <Reference name="System.Drawing"/>
189 <Reference name="System.Xml"/> 189 <Reference name="System.Xml"/>
190 <Reference name="System.Runtime.Serialization.Formatters.Soap"/> 190 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
191 <Reference name="ICSharpCode.SharpZipLib"/> 191 <Reference name="ICSharpCode.SharpZipLib"/>
192 <Files> 192 <Files>
193 <Match path="." pattern="*.vb" recurse="true"/> 193 <Match path="." pattern="*.vb" recurse="true"/>
194 </Files> 194 </Files>
195 </Project> 195 </Project>
196 196
197 <!-- Another projects that is included in the Solution --> 197 <!-- Another projects that is included in the Solution -->
198 <Project name="DemoGame" Language="C#" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> 198 <Project name="DemoGame" Language="C#" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
199 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path --> 199 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
200 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started--> 200 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
201 201
202 <Configuration name="Debug"> 202 <Configuration name="Debug">
203 <Options> 203 <Options>
204 <OutputPath>..\bin</OutputPath> 204 <OutputPath>..\bin</OutputPath>
205 <XmlDocFile>DemoGame.xml</XmlDocFile> 205 <XmlDocFile>DemoGame.xml</XmlDocFile>
206 </Options> 206 </Options>
207 </Configuration> 207 </Configuration>
208 <Configuration name="Release"> 208 <Configuration name="Release">
209 <Options> 209 <Options>
210 <OutputPath>..\bin</OutputPath> 210 <OutputPath>..\bin</OutputPath>
211 <XmlDocFile>DemoGame.xml</XmlDocFile> 211 <XmlDocFile>DemoGame.xml</XmlDocFile>
212 </Options> 212 </Options>
213 </Configuration> 213 </Configuration>
214 <ReferencePath>../bin</ReferencePath> 214 <ReferencePath>../bin</ReferencePath>
215 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced--> 215 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
216 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced --> 216 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
217 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly--> 217 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
218 <Files> 218 <Files>
219 <Match path="." pattern="*.cs" recurse="true"/> 219 <Match path="." pattern="*.cs" recurse="true"/>
220 <Match path="." pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/> 220 <Match path="." pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
221 <Match path="." pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/> 221 <Match path="." pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
222 222
223 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.--> 223 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
224 <!--EmbeddedResource, Content, and Compile are valid buildAction's--> 224 <!--EmbeddedResource, Content, and Compile are valid buildAction's-->
225 </Files> 225 </Files>
226 </Project> 226 </Project>
227 227
228 </Solution> 228 </Solution>
229</Prebuild> 229</Prebuild>
230 230
diff --git a/Prebuild/doc/prebuild-example1.xml b/Prebuild/doc/prebuild-example1.xml
index ea6f455..a2cee42 100644
--- a/Prebuild/doc/prebuild-example1.xml
+++ b/Prebuild/doc/prebuild-example1.xml
@@ -1,300 +1,300 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> 2<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
3 <Solution name="RealmForge"> 3 <Solution name="RealmForge">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
6 <CompilerDefines>TRACE;DEBUG</CompilerDefines> 6 <CompilerDefines>TRACE;DEBUG</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode> 7 <OptimizeCode>false</OptimizeCode>
8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
9 <AllowUnsafe>false</AllowUnsafe> 9 <AllowUnsafe>false</AllowUnsafe>
10 <WarningLevel>4</WarningLevel> 10 <WarningLevel>4</WarningLevel>
11 <WarningsAsErrors>false</WarningsAsErrors> 11 <WarningsAsErrors>false</WarningsAsErrors>
12 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 12 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
13 <OutputPath>..\bin</OutputPath> 13 <OutputPath>..\bin</OutputPath>
14 <DebugInformation>true</DebugInformation> 14 <DebugInformation>true</DebugInformation>
15 <RegisterComInterop>false</RegisterComInterop> 15 <RegisterComInterop>false</RegisterComInterop>
16 <IncrementalBuild>true</IncrementalBuild> 16 <IncrementalBuild>true</IncrementalBuild>
17 <BaseAddress>285212672</BaseAddress> 17 <BaseAddress>285212672</BaseAddress>
18 <FileAlignment>4096</FileAlignment> 18 <FileAlignment>4096</FileAlignment>
19 <NoStdLib>false</NoStdLib> 19 <NoStdLib>false</NoStdLib>
20 <XmlDocFile>Docs.xml</XmlDocFile> 20 <XmlDocFile>Docs.xml</XmlDocFile>
21 </Options> 21 </Options>
22 </Configuration> 22 </Configuration>
23 <Configuration name="Release"> 23 <Configuration name="Release">
24 <Options> 24 <Options>
25 <CompilerDefines>TRACE</CompilerDefines> 25 <CompilerDefines>TRACE</CompilerDefines>
26 <OptimizeCode>true</OptimizeCode> 26 <OptimizeCode>true</OptimizeCode>
27 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 27 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
28 <AllowUnsafe>false</AllowUnsafe> 28 <AllowUnsafe>false</AllowUnsafe>
29 <WarningLevel>4</WarningLevel> 29 <WarningLevel>4</WarningLevel>
30 <WarningsAsErrors>false</WarningsAsErrors> 30 <WarningsAsErrors>false</WarningsAsErrors>
31 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 31 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
32 <OutputPath>..\bin</OutputPath> 32 <OutputPath>..\bin</OutputPath>
33 <DebugInformation>false</DebugInformation> 33 <DebugInformation>false</DebugInformation>
34 <RegisterComInterop>false</RegisterComInterop> 34 <RegisterComInterop>false</RegisterComInterop>
35 <IncrementalBuild>true</IncrementalBuild> 35 <IncrementalBuild>true</IncrementalBuild>
36 <BaseAddress>285212672</BaseAddress> 36 <BaseAddress>285212672</BaseAddress>
37 <FileAlignment>4096</FileAlignment> 37 <FileAlignment>4096</FileAlignment>
38 <NoStdLib>false</NoStdLib> 38 <NoStdLib>false</NoStdLib>
39 <XmlDocFile>Docs.xml</XmlDocFile> 39 <XmlDocFile>Docs.xml</XmlDocFile>
40 </Options> 40 </Options>
41 </Configuration> 41 </Configuration>
42 42
43 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> 43 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
44 <Configuration name="Debug"> 44 <Configuration name="Debug">
45 <Options> 45 <Options>
46 <OutputPath>..\bin\lib\Utility</OutputPath> 46 <OutputPath>..\bin\lib\Utility</OutputPath>
47 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 47 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
48 </Options> 48 </Options>
49 </Configuration> 49 </Configuration>
50 <Configuration name="Release"> 50 <Configuration name="Release">
51 <Options> 51 <Options>
52 <OutputPath>..\bin\lib\Utility</OutputPath> 52 <OutputPath>..\bin\lib\Utility</OutputPath>
53 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 53 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
54 </Options> 54 </Options>
55 </Configuration> 55 </Configuration>
56 <ReferencePath>../bin</ReferencePath> 56 <ReferencePath>../bin</ReferencePath>
57 <Reference name="System"/> 57 <Reference name="System"/>
58 <Reference name="System.Data"/> 58 <Reference name="System.Data"/>
59 <Reference name="System.Drawing"/> 59 <Reference name="System.Drawing"/>
60 <Reference name="System.Xml"/> 60 <Reference name="System.Xml"/>
61 <Reference name="System.Runtime.Serialization.Formatters.Soap"/> 61 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
62 <Reference name="ICSharpCode.SharpZipLib"/> 62 <Reference name="ICSharpCode.SharpZipLib"/>
63 <Files> 63 <Files>
64 <Match pattern="*.cs" recurse="true"/> 64 <Match pattern="*.cs" recurse="true"/>
65 </Files> 65 </Files>
66 </Project> 66 </Project>
67 67
68 <Project name="RealmForge.Framework" path="Framework" type="Library" assemblyName="RealmForge.Framework" rootNamespace="RealmForge"> 68 <Project name="RealmForge.Framework" path="Framework" type="Library" assemblyName="RealmForge.Framework" rootNamespace="RealmForge">
69 <Configuration name="Debug"> 69 <Configuration name="Debug">
70 <Options> 70 <Options>
71 <OutputPath>..\bin\lib\Framework</OutputPath> 71 <OutputPath>..\bin\lib\Framework</OutputPath>
72 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile> 72 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
73 </Options> 73 </Options>
74 </Configuration> 74 </Configuration>
75 <Configuration name="Release"> 75 <Configuration name="Release">
76 <Options> 76 <Options>
77 <OutputPath>..\bin\lib\Framework</OutputPath> 77 <OutputPath>..\bin\lib\Framework</OutputPath>
78 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile> 78 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
79 </Options> 79 </Options>
80 </Configuration> 80 </Configuration>
81 <ReferencePath>../bin</ReferencePath> 81 <ReferencePath>../bin</ReferencePath>
82 <Reference name="System"/> 82 <Reference name="System"/>
83 <Reference name="System.Data"/> 83 <Reference name="System.Data"/>
84 <Reference name="System.Xml"/> 84 <Reference name="System.Xml"/>
85 <Reference name="System.Windows.Forms"/> 85 <Reference name="System.Windows.Forms"/>
86 <Reference name="System.Drawing"/> 86 <Reference name="System.Drawing"/>
87 <Reference name="Axiom.MathLib"/> 87 <Reference name="Axiom.MathLib"/>
88 <Reference name="RealmForge.Utility"/> 88 <Reference name="RealmForge.Utility"/>
89 <Reference name="Tao.OpenAl"/> 89 <Reference name="Tao.OpenAl"/>
90 <Reference name="ICSharpCode.SharpZipLib"/> 90 <Reference name="ICSharpCode.SharpZipLib"/>
91 <Reference name="csogg"/> 91 <Reference name="csogg"/>
92 <Reference name="csvorbis"/> 92 <Reference name="csvorbis"/>
93 <Files> 93 <Files>
94 <Match pattern="*.cs" recurse="true"/> 94 <Match pattern="*.cs" recurse="true"/>
95 <Match pattern="*.txt" recurse="true"/> 95 <Match pattern="*.txt" recurse="true"/>
96 </Files> 96 </Files>
97 </Project> 97 </Project>
98 98
99 <Project name="RealmForge.Genres" path="Genres" type="Library" assemblyName="RealmForge.Genres" rootNamespace="RealmForge"> 99 <Project name="RealmForge.Genres" path="Genres" type="Library" assemblyName="RealmForge.Genres" rootNamespace="RealmForge">
100 <Configuration name="Debug"> 100 <Configuration name="Debug">
101 <Options> 101 <Options>
102 <OutputPath>..\bin\lib\Genres</OutputPath> 102 <OutputPath>..\bin\lib\Genres</OutputPath>
103 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile> 103 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
104 </Options> 104 </Options>
105 </Configuration> 105 </Configuration>
106 <Configuration name="Release"> 106 <Configuration name="Release">
107 <Options> 107 <Options>
108 <OutputPath>..\bin\lib\Genres</OutputPath> 108 <OutputPath>..\bin\lib\Genres</OutputPath>
109 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile> 109 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
110 </Options> 110 </Options>
111 </Configuration> 111 </Configuration>
112 <ReferencePath>../bin</ReferencePath> 112 <ReferencePath>../bin</ReferencePath>
113 <Reference name="System"/> 113 <Reference name="System"/>
114 <Reference name="System.Data"/> 114 <Reference name="System.Data"/>
115 <Reference name="System.Xml"/> 115 <Reference name="System.Xml"/>
116 <Reference name="System.Windows.Forms"/> 116 <Reference name="System.Windows.Forms"/>
117 <Reference name="System.Drawing"/> 117 <Reference name="System.Drawing"/>
118 <Reference name="Axiom.MathLib"/> 118 <Reference name="Axiom.MathLib"/>
119 <Reference name="RealmForge.Utility"/> 119 <Reference name="RealmForge.Utility"/>
120 <Reference name="RealmForge.Framework"/> 120 <Reference name="RealmForge.Framework"/>
121 <Files> 121 <Files>
122 <Match pattern="*.cs" recurse="true"/> 122 <Match pattern="*.cs" recurse="true"/>
123 </Files> 123 </Files>
124 </Project> 124 </Project>
125 125
126 <Project name="RealmForge.UI.Forms" path="Forms" type="Library" assemblyName="RealmForge.UI.Forms" rootNamespace="RealmForge"> 126 <Project name="RealmForge.UI.Forms" path="Forms" type="Library" assemblyName="RealmForge.UI.Forms" rootNamespace="RealmForge">
127 <Configuration name="Debug"> 127 <Configuration name="Debug">
128 <Options> 128 <Options>
129 <OutputPath>..\bin\lib\Forms</OutputPath> 129 <OutputPath>..\bin\lib\Forms</OutputPath>
130 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile> 130 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
131 <AllowUnsafe>true</AllowUnsafe> 131 <AllowUnsafe>true</AllowUnsafe>
132 </Options> 132 </Options>
133 </Configuration> 133 </Configuration>
134 <Configuration name="Release"> 134 <Configuration name="Release">
135 <Options> 135 <Options>
136 <OutputPath>..\bin\lib\Forms</OutputPath> 136 <OutputPath>..\bin\lib\Forms</OutputPath>
137 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile> 137 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
138 <AllowUnsafe>true</AllowUnsafe> 138 <AllowUnsafe>true</AllowUnsafe>
139 </Options> 139 </Options>
140 </Configuration> 140 </Configuration>
141 <ReferencePath>../bin</ReferencePath> 141 <ReferencePath>../bin</ReferencePath>
142 <Reference name="System"/> 142 <Reference name="System"/>
143 <Reference name="System.Drawing"/> 143 <Reference name="System.Drawing"/>
144 <Reference name="System.Data"/> 144 <Reference name="System.Data"/>
145 <Reference name="System.Design"/> 145 <Reference name="System.Design"/>
146 <Reference name="System.Windows.Forms"/> 146 <Reference name="System.Windows.Forms"/>
147 <Reference name="System.Xml"/> 147 <Reference name="System.Xml"/>
148 <Reference name="Axiom.MathLib"/> 148 <Reference name="Axiom.MathLib"/>
149 <Reference name="wx.NET"/> 149 <Reference name="wx.NET"/>
150 <Reference name="RealmForge.Framework"/> 150 <Reference name="RealmForge.Framework"/>
151 <Reference name="RealmForge.Utility"/> 151 <Reference name="RealmForge.Utility"/>
152 <Files> 152 <Files>
153 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionIDE.bmp</File> 153 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionIDE.bmp</File>
154 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionPlain.bmp</File> 154 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionPlain.bmp</File>
155 <File buildAction="EmbeddedResource">IDE\Resources\ImagesMenuControl.bmp</File> 155 <File buildAction="EmbeddedResource">IDE\Resources\ImagesMenuControl.bmp</File>
156 <File buildAction="EmbeddedResource">IDE\Resources\ImagesPopupMenu.bmp</File> 156 <File buildAction="EmbeddedResource">IDE\Resources\ImagesPopupMenu.bmp</File>
157 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabbedGroups.bmp</File> 157 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabbedGroups.bmp</File>
158 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabControl.bmp</File> 158 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabControl.bmp</File>
159 <File buildAction="EmbeddedResource">IDE\Resources\LibraryIcon.ico</File> 159 <File buildAction="EmbeddedResource">IDE\Resources\LibraryIcon.ico</File>
160 <File buildAction="EmbeddedResource">IDE\Resources\TabbedInvalid.cur</File> 160 <File buildAction="EmbeddedResource">IDE\Resources\TabbedInvalid.cur</File>
161 <File buildAction="EmbeddedResource">IDE\Resources\TabbedValid.cur</File> 161 <File buildAction="EmbeddedResource">IDE\Resources\TabbedValid.cur</File>
162 <File buildAction="EmbeddedResource">IDE\Resources\WizardPicture.bmp</File> 162 <File buildAction="EmbeddedResource">IDE\Resources\WizardPicture.bmp</File>
163 <File buildAction="EmbeddedResource">Controls\Trees\tv_minus.bmp</File> 163 <File buildAction="EmbeddedResource">Controls\Trees\tv_minus.bmp</File>
164 <File buildAction="EmbeddedResource">Controls\Trees\tv_plus.bmp</File> 164 <File buildAction="EmbeddedResource">Controls\Trees\tv_plus.bmp</File>
165 <File buildAction="EmbeddedResource">Controls\Trees\treeview.bmp</File> 165 <File buildAction="EmbeddedResource">Controls\Trees\treeview.bmp</File>
166 <File buildAction="EmbeddedResource">Controls\Trees\listview.bmp</File> 166 <File buildAction="EmbeddedResource">Controls\Trees\listview.bmp</File>
167 <File buildAction="EmbeddedResource">IDE\Menus\MenuControl.bmp</File> 167 <File buildAction="EmbeddedResource">IDE\Menus\MenuControl.bmp</File>
168 <File buildAction="EmbeddedResource">IDE\Controls\InertButton.bmp</File> 168 <File buildAction="EmbeddedResource">IDE\Controls\InertButton.bmp</File>
169 <File buildAction="EmbeddedResource">IDE\Controls\TabbedGroups.bmp</File> 169 <File buildAction="EmbeddedResource">IDE\Controls\TabbedGroups.bmp</File>
170 <File buildAction="EmbeddedResource">IDE\Controls\TabCOntrol.bmp</File> 170 <File buildAction="EmbeddedResource">IDE\Controls\TabCOntrol.bmp</File>
171 <File buildAction="EmbeddedResource">IDE\Controls\WizardControl.bmp</File> 171 <File buildAction="EmbeddedResource">IDE\Controls\WizardControl.bmp</File>
172 <File buildAction="EmbeddedResource">Forms\IDETest.resx</File> 172 <File buildAction="EmbeddedResource">Forms\IDETest.resx</File>
173 <File buildAction="EmbeddedResource">Forms\IDEWindow.resx</File> 173 <File buildAction="EmbeddedResource">Forms\IDEWindow.resx</File>
174 <File buildAction="EmbeddedResource">Forms\Launcher.resx</File> 174 <File buildAction="EmbeddedResource">Forms\Launcher.resx</File>
175 <File buildAction="EmbeddedResource">Forms\MainRenderFrame.resx</File> 175 <File buildAction="EmbeddedResource">Forms\MainRenderFrame.resx</File>
176 <Match pattern="*.cs" recurse="true"/> 176 <Match pattern="*.cs" recurse="true"/>
177 </Files> 177 </Files>
178 </Project> 178 </Project>
179 179
180 <Project name="RealmForge.RAGE" path="RAGE" type="Library" assemblyName="RealmForge.RAGE" rootNamespace="RealmForge"> 180 <Project name="RealmForge.RAGE" path="RAGE" type="Library" assemblyName="RealmForge.RAGE" rootNamespace="RealmForge">
181 <Configuration name="Debug"> 181 <Configuration name="Debug">
182 <Options> 182 <Options>
183 <OutputPath>..\bin\lib\RAGE</OutputPath> 183 <OutputPath>..\bin\lib\RAGE</OutputPath>
184 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile> 184 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
185 </Options> 185 </Options>
186 </Configuration> 186 </Configuration>
187 <Configuration name="Release"> 187 <Configuration name="Release">
188 <Options> 188 <Options>
189 <OutputPath>..\bin\lib\RAGE</OutputPath> 189 <OutputPath>..\bin\lib\RAGE</OutputPath>
190 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile> 190 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
191 </Options> 191 </Options>
192 </Configuration> 192 </Configuration>
193 <ReferencePath>../bin</ReferencePath> 193 <ReferencePath>../bin</ReferencePath>
194 <ReferencePath>../bin</ReferencePath> 194 <ReferencePath>../bin</ReferencePath>
195 <Reference name="System"/> 195 <Reference name="System"/>
196 <Reference name="System.XML"/> 196 <Reference name="System.XML"/>
197 <Reference name="System.Windows.Forms"/> 197 <Reference name="System.Windows.Forms"/>
198 <Reference name="System.Drawing"/> 198 <Reference name="System.Drawing"/>
199 <Reference name="Axiom.Plugins.CgProgramManager"/> 199 <Reference name="Axiom.Plugins.CgProgramManager"/>
200 <Reference name="Axiom.Engine"/> 200 <Reference name="Axiom.Engine"/>
201 <Reference name="Axiom.MathLib"/> 201 <Reference name="Axiom.MathLib"/>
202 <Reference name="Axiom.Plugins.ParticleFX"/> 202 <Reference name="Axiom.Plugins.ParticleFX"/>
203 <Reference name="Axiom.Platforms.Win32"/> 203 <Reference name="Axiom.Platforms.Win32"/>
204 <Reference name="Axiom.RenderSystems.DirectX9"/> 204 <Reference name="Axiom.RenderSystems.DirectX9"/>
205 <Reference localCopy="false" name="Axiom.RenderSystems.OpenGL"/> 205 <Reference localCopy="false" name="Axiom.RenderSystems.OpenGL"/>
206 <Reference name="Axiom.SceneManagers.Octree"/> 206 <Reference name="Axiom.SceneManagers.Octree"/>
207 <Reference name="ICSharpCode.SharpZipLib"/> 207 <Reference name="ICSharpCode.SharpZipLib"/>
208 <Reference name="System.Data"/> 208 <Reference name="System.Data"/>
209 <Reference name="RealmForge.Framework"/> 209 <Reference name="RealmForge.Framework"/>
210 <Reference name="RealmForge.Utility"/> 210 <Reference name="RealmForge.Utility"/>
211 <Reference name="ode"/> 211 <Reference name="ode"/>
212 <Files> 212 <Files>
213 <Match pattern="*.cs" recurse="true"/> 213 <Match pattern="*.cs" recurse="true"/>
214 </Files> 214 </Files>
215 </Project> 215 </Project>
216 216
217 217
218 <Project name="RealmForge.ScriptLibrary" path="ScriptLibrary" type="Library" assemblyName="RealmForge.ScriptLibrary" rootNamespace="RSL"> 218 <Project name="RealmForge.ScriptLibrary" path="ScriptLibrary" type="Library" assemblyName="RealmForge.ScriptLibrary" rootNamespace="RSL">
219 <Configuration name="Debug"> 219 <Configuration name="Debug">
220 <Options> 220 <Options>
221 <OutputPath>..\bin\ScriptLibrary</OutputPath> 221 <OutputPath>..\bin\ScriptLibrary</OutputPath>
222 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile> 222 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
223 </Options> 223 </Options>
224 </Configuration> 224 </Configuration>
225 <Configuration name="Release"> 225 <Configuration name="Release">
226 <Options> 226 <Options>
227 <OutputPath>..\bin\ScriptLibrary</OutputPath> 227 <OutputPath>..\bin\ScriptLibrary</OutputPath>
228 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile> 228 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
229 </Options> 229 </Options>
230 </Configuration> 230 </Configuration>
231 <ReferencePath>../bin</ReferencePath> 231 <ReferencePath>../bin</ReferencePath>
232 <Reference name="System"/> 232 <Reference name="System"/>
233 <Reference name="System.XML"/> 233 <Reference name="System.XML"/>
234 <Reference name="System.Windows.Forms"/> 234 <Reference name="System.Windows.Forms"/>
235 <Reference name="System.Drawing"/> 235 <Reference name="System.Drawing"/>
236 <Reference name="Axiom.MathLib"/> 236 <Reference name="Axiom.MathLib"/>
237 <Reference name="wx.NET"/> 237 <Reference name="wx.NET"/>
238 <Reference name="RealmForge.UI.Forms"/> 238 <Reference name="RealmForge.UI.Forms"/>
239 <Reference name="RealmForge.RAGE"/> 239 <Reference name="RealmForge.RAGE"/>
240 <Reference name="RealmForge.Framework"/> 240 <Reference name="RealmForge.Framework"/>
241 <Reference name="RealmForge.Utility"/> 241 <Reference name="RealmForge.Utility"/>
242 <Files> 242 <Files>
243 <Match pattern="*.cs" recurse="true"/> 243 <Match pattern="*.cs" recurse="true"/>
244 </Files> 244 </Files>
245 </Project> 245 </Project>
246 246
247 247
248 <Project name="Updater" path="Updater" type="WinExe" icon="..\bin\Updater.ico" assemblyName="Updater" rootNamespace="RealmForge"> 248 <Project name="Updater" path="Updater" type="WinExe" icon="..\bin\Updater.ico" assemblyName="Updater" rootNamespace="RealmForge">
249 <Configuration name="Debug"> 249 <Configuration name="Debug">
250 <Options> 250 <Options>
251 <OutputPath>..\bin\lib\Updater</OutputPath> 251 <OutputPath>..\bin\lib\Updater</OutputPath>
252 <XmlDocFile>Updater.xml</XmlDocFile> 252 <XmlDocFile>Updater.xml</XmlDocFile>
253 </Options> 253 </Options>
254 </Configuration> 254 </Configuration>
255 <Configuration name="Release"> 255 <Configuration name="Release">
256 <Options> 256 <Options>
257 <OutputPath>..\bin\lib\Updater</OutputPath> 257 <OutputPath>..\bin\lib\Updater</OutputPath>
258 <XmlDocFile>Updater.xml</XmlDocFile> 258 <XmlDocFile>Updater.xml</XmlDocFile>
259 </Options> 259 </Options>
260 </Configuration> 260 </Configuration>
261 <ReferencePath>../bin</ReferencePath> 261 <ReferencePath>../bin</ReferencePath>
262 <Reference name="System"/> 262 <Reference name="System"/>
263 <Reference name="RealmForge.UI.Forms"/> 263 <Reference name="RealmForge.UI.Forms"/>
264 <Reference name="RealmForge.Framework"/> 264 <Reference name="RealmForge.Framework"/>
265 <Reference name="RealmForge.Utility"/> 265 <Reference name="RealmForge.Utility"/>
266 <Files> 266 <Files>
267 <Match pattern="*.cs" recurse="true"/> 267 <Match pattern="*.cs" recurse="true"/>
268 </Files> 268 </Files>
269 </Project> 269 </Project>
270 270
271 271
272 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> 272 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
273 <Configuration name="Debug"> 273 <Configuration name="Debug">
274 <Options> 274 <Options>
275 <OutputPath>..\bin</OutputPath> 275 <OutputPath>..\bin</OutputPath>
276 <XmlDocFile>DemoGame.xml</XmlDocFile> 276 <XmlDocFile>DemoGame.xml</XmlDocFile>
277 </Options> 277 </Options>
278 </Configuration> 278 </Configuration>
279 <Configuration name="Release"> 279 <Configuration name="Release">
280 <Options> 280 <Options>
281 <OutputPath>..\bin</OutputPath> 281 <OutputPath>..\bin</OutputPath>
282 <XmlDocFile>DemoGame.xml</XmlDocFile> 282 <XmlDocFile>DemoGame.xml</XmlDocFile>
283 </Options> 283 </Options>
284 </Configuration> 284 </Configuration>
285 <ReferencePath>../bin</ReferencePath> 285 <ReferencePath>../bin</ReferencePath>
286 <Reference name="System"/> 286 <Reference name="System"/>
287 <Reference name="RealmForge.UI.Forms"/> 287 <Reference name="RealmForge.UI.Forms"/>
288 <Reference name="RealmForge.ScriptLibrary"/> 288 <Reference name="RealmForge.ScriptLibrary"/>
289 <Reference name="RealmForge.RAGE"/> 289 <Reference name="RealmForge.RAGE"/>
290 <Reference name="RealmForge.Framework"/> 290 <Reference name="RealmForge.Framework"/>
291 <Reference name="RealmForge.Utility"/> 291 <Reference name="RealmForge.Utility"/>
292 <Files> 292 <Files>
293 <Match pattern="*.cs" recurse="true"/> 293 <Match pattern="*.cs" recurse="true"/>
294 </Files> 294 </Files>
295 </Project> 295 </Project>
296 296
297 </Solution> 297 </Solution>
298</Prebuild> 298</Prebuild>
299 299
300 300
diff --git a/Prebuild/doc/prebuild-example2.xml b/Prebuild/doc/prebuild-example2.xml
index 02276f6..bd23c4f 100644
--- a/Prebuild/doc/prebuild-example2.xml
+++ b/Prebuild/doc/prebuild-example2.xml
@@ -1,72 +1,72 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> 2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
3 <Solution name="Prebuild"> 3 <Solution name="Prebuild">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
6 <?if OS = "Win32" ?> 6 <?if OS = "Win32" ?>
7 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines> 7 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
8 <?else ?> 8 <?else ?>
9 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> 9 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
10 <?endif ?> 10 <?endif ?>
11 <OptimizeCode>false</OptimizeCode> 11 <OptimizeCode>false</OptimizeCode>
12 <OutputPath>bin\Debug</OutputPath> 12 <OutputPath>bin\Debug</OutputPath>
13 <DebugInformation>true</DebugInformation> 13 <DebugInformation>true</DebugInformation>
14 <SuppressWarnings>1595</SuppressWarnings> 14 <SuppressWarnings>1595</SuppressWarnings>
15 </Options> 15 </Options>
16 </Configuration> 16 </Configuration>
17 <Configuration name="Release"> 17 <Configuration name="Release">
18 <Options> 18 <Options>
19 <?if OS = "Win32" ?> 19 <?if OS = "Win32" ?>
20 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines> 20 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
21 <?else ?> 21 <?else ?>
22 <CompilerDefines>TRACE;POSIX</CompilerDefines> 22 <CompilerDefines>TRACE;POSIX</CompilerDefines>
23 <?endif ?> 23 <?endif ?>
24 <OutputPath>bin\Release</OutputPath> 24 <OutputPath>bin\Release</OutputPath>
25 <OptimizeCode>true</OptimizeCode> 25 <OptimizeCode>true</OptimizeCode>
26 <DebugInformation>false</DebugInformation> 26 <DebugInformation>false</DebugInformation>
27 <SuppressWarnings>1595</SuppressWarnings> 27 <SuppressWarnings>1595</SuppressWarnings>
28 </Options> 28 </Options>
29 </Configuration> 29 </Configuration>
30 <Files> 30 <Files>
31 <File>prebuild.xml</File> 31 <File>prebuild.xml</File>
32 <Match path="doc" pattern="*.txt"/> 32 <Match path="doc" pattern="*.txt"/>
33 </Files> 33 </Files>
34 <Project name="Prebuild" path="src" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> 34 <Project name="Prebuild" path="src" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
35 <Configuration name="Debug"> 35 <Configuration name="Debug">
36 <Options> 36 <Options>
37 <?if OS = "Win32" ?> 37 <?if OS = "Win32" ?>
38 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines> 38 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
39 <?else ?> 39 <?else ?>
40 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> 40 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
41 <?endif ?> 41 <?endif ?>
42 <OptimizeCode>false</OptimizeCode> 42 <OptimizeCode>false</OptimizeCode>
43 <OutputPath>bin\Debug</OutputPath> 43 <OutputPath>bin\Debug</OutputPath>
44 <DebugInformation>true</DebugInformation> 44 <DebugInformation>true</DebugInformation>
45 <XmlDocFile>Prebuild.xml</XmlDocFile> 45 <XmlDocFile>Prebuild.xml</XmlDocFile>
46 <SuppressWarnings>1595</SuppressWarnings> 46 <SuppressWarnings>1595</SuppressWarnings>
47 </Options> 47 </Options>
48 </Configuration> 48 </Configuration>
49 <Configuration name="Release"> 49 <Configuration name="Release">
50 <Options> 50 <Options>
51 <?if OS = "Win32" ?> 51 <?if OS = "Win32" ?>
52 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines> 52 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
53 <?else ?> 53 <?else ?>
54 <CompilerDefines>TRACE;POSIX</CompilerDefines> 54 <CompilerDefines>TRACE;POSIX</CompilerDefines>
55 <?endif ?> 55 <?endif ?>
56 <OutputPath>bin\Release</OutputPath> 56 <OutputPath>bin\Release</OutputPath>
57 <OptimizeCode>true</OptimizeCode> 57 <OptimizeCode>true</OptimizeCode>
58 <DebugInformation>false</DebugInformation> 58 <DebugInformation>false</DebugInformation>
59 <XmlDocFile>Prebuild.xml</XmlDocFile> 59 <XmlDocFile>Prebuild.xml</XmlDocFile>
60 <SuppressWarnings>1595</SuppressWarnings> 60 <SuppressWarnings>1595</SuppressWarnings>
61 </Options> 61 </Options>
62 </Configuration> 62 </Configuration>
63 <Reference name="System.Xml" /> 63 <Reference name="System.Xml" />
64 <Reference name="System" /> 64 <Reference name="System" />
65 <Files> 65 <Files>
66 <Match pattern="App.ico" buildAction="EmbeddedResource"/> 66 <Match pattern="App.ico" buildAction="EmbeddedResource"/>
67 <Match path="data" pattern="prebuild-1.6.xsd" buildAction="EmbeddedResource"/> 67 <Match path="data" pattern="prebuild-1.6.xsd" buildAction="EmbeddedResource"/>
68 <Match pattern="*.cs" recurse="true"/> 68 <Match pattern="*.cs" recurse="true"/>
69 </Files> 69 </Files>
70 </Project> 70 </Project>
71 </Solution> 71 </Solution>
72</Prebuild> 72</Prebuild>
diff --git a/Prebuild/doc/prebuild-example3.xml b/Prebuild/doc/prebuild-example3.xml
index 1ba38f7..0111562 100644
--- a/Prebuild/doc/prebuild-example3.xml
+++ b/Prebuild/doc/prebuild-example3.xml
@@ -1,113 +1,113 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.6 schema, you can find the XSD schema file at the url specified in the xmlns attribute. --> 2 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.6 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
3 <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> 3 <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
4 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)--> 4 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
5 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.--> 5 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
6 <Configuration name="Debug"> 6 <Configuration name="Debug">
7 <Options> 7 <Options>
8 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 --> 8 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
9 <?if OS = "Win32" ?> 9 <?if OS = "Win32" ?>
10 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> 10 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
11 <?else ?> 11 <?else ?>
12 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> 12 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
13 <?endif ?> 13 <?endif ?>
14 <OptimizeCode>false</OptimizeCode> 14 <OptimizeCode>false</OptimizeCode>
15 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 15 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
16 <AllowUnsafe>false</AllowUnsafe> 16 <AllowUnsafe>false</AllowUnsafe>
17 <WarningLevel>4</WarningLevel> 17 <WarningLevel>4</WarningLevel>
18 <!--The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).--> 18 <!--The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
19 19
20 <WarningsAsErrors>false</WarningsAsErrors> 20 <WarningsAsErrors>false</WarningsAsErrors>
21 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 21 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
22 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)--> 22 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
23 23
24 <OutputPath>..\bin</OutputPath> 24 <OutputPath>..\bin</OutputPath>
25 <DebugInformation>true</DebugInformation> 25 <DebugInformation>true</DebugInformation>
26 <RegisterComInterop>false</RegisterComInterop> 26 <RegisterComInterop>false</RegisterComInterop>
27 <IncrementalBuild>true</IncrementalBuild> 27 <IncrementalBuild>true</IncrementalBuild>
28 <BaseAddress>285212672</BaseAddress> 28 <BaseAddress>285212672</BaseAddress>
29 <FileAlignment>4096</FileAlignment> 29 <FileAlignment>4096</FileAlignment>
30 <NoStdLib>false</NoStdLib> 30 <NoStdLib>false</NoStdLib>
31 <XmlDocFile>Docs.xml</XmlDocFile> 31 <XmlDocFile>Docs.xml</XmlDocFile>
32 </Options> 32 </Options>
33 </Configuration> 33 </Configuration>
34 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files --> 34 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
35 <Options> 35 <Options>
36 <CompilerDefines>TRACE</CompilerDefines> 36 <CompilerDefines>TRACE</CompilerDefines>
37 <OptimizeCode>true</OptimizeCode> 37 <OptimizeCode>true</OptimizeCode>
38 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 38 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
39 <AllowUnsafe>false</AllowUnsafe> 39 <AllowUnsafe>false</AllowUnsafe>
40 <WarningLevel>4</WarningLevel> 40 <WarningLevel>4</WarningLevel>
41 <WarningsAsErrors>false</WarningsAsErrors> 41 <WarningsAsErrors>false</WarningsAsErrors>
42 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> 42 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
43 <OutputPath>..\bin</OutputPath> 43 <OutputPath>..\bin</OutputPath>
44 <DebugInformation>false</DebugInformation> 44 <DebugInformation>false</DebugInformation>
45 <RegisterComInterop>false</RegisterComInterop> 45 <RegisterComInterop>false</RegisterComInterop>
46 <IncrementalBuild>true</IncrementalBuild> 46 <IncrementalBuild>true</IncrementalBuild>
47 <BaseAddress>285212672</BaseAddress> 47 <BaseAddress>285212672</BaseAddress>
48 <FileAlignment>4096</FileAlignment> 48 <FileAlignment>4096</FileAlignment>
49 <NoStdLib>false</NoStdLib> 49 <NoStdLib>false</NoStdLib>
50 <XmlDocFile>Docs.xml</XmlDocFile> 50 <XmlDocFile>Docs.xml</XmlDocFile>
51 </Options> 51 </Options>
52 </Configuration> 52 </Configuration>
53 53
54 <!-- One of the projects that is included in the Solution --> 54 <!-- One of the projects that is included in the Solution -->
55 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> 55 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
56 <Configuration name="Debug"> 56 <Configuration name="Debug">
57 <Options> 57 <Options>
58 <OutputPath>..\bin\lib\Utility</OutputPath> 58 <OutputPath>..\bin\lib\Utility</OutputPath>
59 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 59 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
60 </Options> 60 </Options>
61 </Configuration> 61 </Configuration>
62 <Configuration name="Release"> 62 <Configuration name="Release">
63 <Options> 63 <Options>
64 <OutputPath>..\bin\lib\Utility</OutputPath> 64 <OutputPath>..\bin\lib\Utility</OutputPath>
65 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> 65 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
66 </Options> 66 </Options>
67 </Configuration> 67 </Configuration>
68 <ReferencePath>../bin</ReferencePath> 68 <ReferencePath>../bin</ReferencePath>
69 <Reference name="System"/> 69 <Reference name="System"/>
70 <Reference name="System.Data"/> 70 <Reference name="System.Data"/>
71 <Reference name="System.Drawing"/> 71 <Reference name="System.Drawing"/>
72 <Reference name="System.Xml"/> 72 <Reference name="System.Xml"/>
73 <Reference name="System.Runtime.Serialization.Formatters.Soap"/> 73 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
74 <Reference name="ICSharpCode.SharpZipLib"/> 74 <Reference name="ICSharpCode.SharpZipLib"/>
75 <Files> 75 <Files>
76 <Match pattern="*.cs" recurse="true"/> 76 <Match pattern="*.cs" recurse="true"/>
77 </Files> 77 </Files>
78 </Project> 78 </Project>
79 79
80 <!-- Another projects that is included in the Solution --> 80 <!-- Another projects that is included in the Solution -->
81 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> 81 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
82 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path --> 82 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
83 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started--> 83 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
84 84
85 <Configuration name="Debug"> 85 <Configuration name="Debug">
86 <Options> 86 <Options>
87 <OutputPath>..\bin</OutputPath> 87 <OutputPath>..\bin</OutputPath>
88 <XmlDocFile>DemoGame.xml</XmlDocFile> 88 <XmlDocFile>DemoGame.xml</XmlDocFile>
89 </Options> 89 </Options>
90 </Configuration> 90 </Configuration>
91 <Configuration name="Release"> 91 <Configuration name="Release">
92 <Options> 92 <Options>
93 <OutputPath>..\bin</OutputPath> 93 <OutputPath>..\bin</OutputPath>
94 <XmlDocFile>DemoGame.xml</XmlDocFile> 94 <XmlDocFile>DemoGame.xml</XmlDocFile>
95 </Options> 95 </Options>
96 </Configuration> 96 </Configuration>
97 <ReferencePath>../bin</ReferencePath> 97 <ReferencePath>../bin</ReferencePath>
98 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced--> 98 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
99 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced --> 99 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
100 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly--> 100 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
101 <Files> 101 <Files>
102 <!-- path defaults to . or the directory that prebuild.exe resides in --> 102 <!-- path defaults to . or the directory that prebuild.exe resides in -->
103 <Match path="." pattern="*.cs" recurse="true"/> 103 <Match path="." pattern="*.cs" recurse="true"/>
104 <Match pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/> 104 <Match pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
105 <Match pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/> 105 <Match pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
106 106
107 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.--> 107 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
108 <!--EmbeddedResource, Content, and Compile are valid buildAction's--> 108 <!--EmbeddedResource, Content, and Compile are valid buildAction's-->
109 </Files> 109 </Files>
110 </Project> 110 </Project>
111 111
112 </Solution> 112 </Solution>
113</Prebuild> 113</Prebuild>
diff --git a/Prebuild/doc/prebuild-example4.xml b/Prebuild/doc/prebuild-example4.xml
index c6c223f..e5861b8 100644
--- a/Prebuild/doc/prebuild-example4.xml
+++ b/Prebuild/doc/prebuild-example4.xml
@@ -1,715 +1,715 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6"> 2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6">
3 <Solution name="SdlDotNet"> 3 <Solution name="SdlDotNet">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
6 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 6 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode> 7 <OptimizeCode>false</OptimizeCode>
8 <AllowUnsafe>false</AllowUnsafe> 8 <AllowUnsafe>false</AllowUnsafe>
9 <OutputPath>bin\Debug</OutputPath> 9 <OutputPath>bin\Debug</OutputPath>
10 <DebugInformation>true</DebugInformation> 10 <DebugInformation>true</DebugInformation>
11 <WarningLevel>4</WarningLevel> 11 <WarningLevel>4</WarningLevel>
12 <SuppressWarnings>1595</SuppressWarnings> 12 <SuppressWarnings>1595</SuppressWarnings>
13 </Options> 13 </Options>
14 </Configuration> 14 </Configuration>
15 <Configuration name="Release"> 15 <Configuration name="Release">
16 <Options> 16 <Options>
17 <CompilerDefines>TRACE</CompilerDefines> 17 <CompilerDefines>TRACE</CompilerDefines>
18 <OptimizeCode>true</OptimizeCode> 18 <OptimizeCode>true</OptimizeCode>
19 <AllowUnsafe>false</AllowUnsafe> 19 <AllowUnsafe>false</AllowUnsafe>
20 <OutputPath>bin\Release</OutputPath> 20 <OutputPath>bin\Release</OutputPath>
21 <DebugInformation>false</DebugInformation> 21 <DebugInformation>false</DebugInformation>
22 <WarningLevel>1</WarningLevel> 22 <WarningLevel>1</WarningLevel>
23 <SuppressWarnings>1595</SuppressWarnings> 23 <SuppressWarnings>1595</SuppressWarnings>
24 </Options> 24 </Options>
25 </Configuration> 25 </Configuration>
26 <Files> 26 <Files>
27 <File buildAction="Content">SdlDotNet.build</File> 27 <File buildAction="Content">SdlDotNet.build</File>
28 <File buildAction="Content">prebuild.xml</File> 28 <File buildAction="Content">prebuild.xml</File>
29 </Files> 29 </Files>
30 <Project name="SdlDotNet" path="src" language="C#" type="Library" assemblyName="SdlDotNet" rootNamespace="SdlDotNet"> 30 <Project name="SdlDotNet" path="src" language="C#" type="Library" assemblyName="SdlDotNet" rootNamespace="SdlDotNet">
31 <Configuration name="Debug"> 31 <Configuration name="Debug">
32 <Options> 32 <Options>
33 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 33 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
34 <OptimizeCode>false</OptimizeCode> 34 <OptimizeCode>false</OptimizeCode>
35 <AllowUnsafe>false</AllowUnsafe> 35 <AllowUnsafe>false</AllowUnsafe>
36 <OutputPath>bin\Debug</OutputPath> 36 <OutputPath>bin\Debug</OutputPath>
37 <DebugInformation>true</DebugInformation> 37 <DebugInformation>true</DebugInformation>
38 <XmlDocFile>SdlDotNet.xml</XmlDocFile> 38 <XmlDocFile>SdlDotNet.xml</XmlDocFile>
39 <WarningLevel>4</WarningLevel> 39 <WarningLevel>4</WarningLevel>
40 <SuppressWarnings>1595</SuppressWarnings> 40 <SuppressWarnings>1595</SuppressWarnings>
41 </Options> 41 </Options>
42 </Configuration> 42 </Configuration>
43 <Configuration name="Release"> 43 <Configuration name="Release">
44 <Options> 44 <Options>
45 <CompilerDefines>TRACE</CompilerDefines> 45 <CompilerDefines>TRACE</CompilerDefines>
46 <OptimizeCode>true</OptimizeCode> 46 <OptimizeCode>true</OptimizeCode>
47 <AllowUnsafe>false</AllowUnsafe> 47 <AllowUnsafe>false</AllowUnsafe>
48 <OutputPath>bin\Release</OutputPath> 48 <OutputPath>bin\Release</OutputPath>
49 <XmlDocFile>SdlDotNet.xml</XmlDocFile> 49 <XmlDocFile>SdlDotNet.xml</XmlDocFile>
50 <DebugInformation>false</DebugInformation> 50 <DebugInformation>false</DebugInformation>
51 <WarningLevel>1</WarningLevel> 51 <WarningLevel>1</WarningLevel>
52 <SuppressWarnings>1595</SuppressWarnings> 52 <SuppressWarnings>1595</SuppressWarnings>
53 </Options> 53 </Options>
54 </Configuration> 54 </Configuration>
55 <Reference name="System" /> 55 <Reference name="System" />
56 <Reference name="System.Windows.Forms" /> 56 <Reference name="System.Windows.Forms" />
57 <Reference name="System.Drawing" /> 57 <Reference name="System.Drawing" />
58 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/> 58 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
59 <Files> 59 <Files>
60 <Match path="." pattern="SurfaceControl.cs" subType="Component" recurse="true"/> 60 <Match path="." pattern="SurfaceControl.cs" subType="Component" recurse="true"/>
61 <Match path="." pattern="*.bmp" buildAction="EmbeddedResource" recurse="true"/> 61 <Match path="." pattern="*.bmp" buildAction="EmbeddedResource" recurse="true"/>
62 <Match path="." pattern="*.cs" recurse="true"> 62 <Match path="." pattern="*.cs" recurse="true">
63 <Exclude name="SurfaceControl.cs"/> 63 <Exclude name="SurfaceControl.cs"/>
64 </Match> 64 </Match>
65 </Files> 65 </Files>
66 </Project> 66 </Project>
67 <Project name="Rectangles" path="examples\\Rectangles" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Rectangles.Rectangles" assemblyName="Rectangles" rootNamespace="SdlDotNet.Examples.Rectangles" icon="App.ico"> 67 <Project name="Rectangles" path="examples\\Rectangles" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Rectangles.Rectangles" assemblyName="Rectangles" rootNamespace="SdlDotNet.Examples.Rectangles" icon="App.ico">
68 <Configuration name="Debug"> 68 <Configuration name="Debug">
69 <Options> 69 <Options>
70 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 70 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
71 <OptimizeCode>false</OptimizeCode> 71 <OptimizeCode>false</OptimizeCode>
72 <AllowUnsafe>false</AllowUnsafe> 72 <AllowUnsafe>false</AllowUnsafe>
73 <OutputPath>bin\Debug</OutputPath> 73 <OutputPath>bin\Debug</OutputPath>
74 <DebugInformation>true</DebugInformation> 74 <DebugInformation>true</DebugInformation>
75 <XmlDocFile>Rectangles.xml</XmlDocFile> 75 <XmlDocFile>Rectangles.xml</XmlDocFile>
76 <WarningLevel>4</WarningLevel> 76 <WarningLevel>4</WarningLevel>
77 <SuppressWarnings>1595</SuppressWarnings> 77 <SuppressWarnings>1595</SuppressWarnings>
78 </Options> 78 </Options>
79 </Configuration> 79 </Configuration>
80 <Configuration name="Release"> 80 <Configuration name="Release">
81 <Options> 81 <Options>
82 <CompilerDefines>TRACE</CompilerDefines> 82 <CompilerDefines>TRACE</CompilerDefines>
83 <OptimizeCode>true</OptimizeCode> 83 <OptimizeCode>true</OptimizeCode>
84 <AllowUnsafe>false</AllowUnsafe> 84 <AllowUnsafe>false</AllowUnsafe>
85 <OutputPath>bin\Release</OutputPath> 85 <OutputPath>bin\Release</OutputPath>
86 <DebugInformation>false</DebugInformation> 86 <DebugInformation>false</DebugInformation>
87 <XmlDocFile>Rectangles.xml</XmlDocFile> 87 <XmlDocFile>Rectangles.xml</XmlDocFile>
88 <WarningLevel>1</WarningLevel> 88 <WarningLevel>1</WarningLevel>
89 <SuppressWarnings>1595</SuppressWarnings> 89 <SuppressWarnings>1595</SuppressWarnings>
90 </Options> 90 </Options>
91 </Configuration> 91 </Configuration>
92 <Reference name="System" /> 92 <Reference name="System" />
93 <Reference name="System.Drawing" /> 93 <Reference name="System.Drawing" />
94 <Reference name="SdlDotNet" localCopy="true"/> 94 <Reference name="SdlDotNet" localCopy="true"/>
95 <Files> 95 <Files>
96 <File buildAction="EmbeddedResource">App.ico</File> 96 <File buildAction="EmbeddedResource">App.ico</File>
97 <Match path="." pattern="*.cs" recurse="true"/> 97 <Match path="." pattern="*.cs" recurse="true"/>
98 </Files> 98 </Files>
99 </Project> 99 </Project>
100 <Project name="Gears" path="examples\\Gears" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Gears.Gears" assemblyName="Gears" rootNamespace="SdlDotNet.Examples.Gears" icon="App.ico"> 100 <Project name="Gears" path="examples\\Gears" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Gears.Gears" assemblyName="Gears" rootNamespace="SdlDotNet.Examples.Gears" icon="App.ico">
101 <Configuration name="Debug"> 101 <Configuration name="Debug">
102 <Options> 102 <Options>
103 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 103 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
104 <OptimizeCode>false</OptimizeCode> 104 <OptimizeCode>false</OptimizeCode>
105 <AllowUnsafe>false</AllowUnsafe> 105 <AllowUnsafe>false</AllowUnsafe>
106 <OutputPath>bin\Debug</OutputPath> 106 <OutputPath>bin\Debug</OutputPath>
107 <DebugInformation>true</DebugInformation> 107 <DebugInformation>true</DebugInformation>
108 <XmlDocFile>Gears.xml</XmlDocFile> 108 <XmlDocFile>Gears.xml</XmlDocFile>
109 <WarningLevel>4</WarningLevel> 109 <WarningLevel>4</WarningLevel>
110 <SuppressWarnings>1595</SuppressWarnings> 110 <SuppressWarnings>1595</SuppressWarnings>
111 </Options> 111 </Options>
112 </Configuration> 112 </Configuration>
113 <Configuration name="Release"> 113 <Configuration name="Release">
114 <Options> 114 <Options>
115 <CompilerDefines>TRACE</CompilerDefines> 115 <CompilerDefines>TRACE</CompilerDefines>
116 <OptimizeCode>true</OptimizeCode> 116 <OptimizeCode>true</OptimizeCode>
117 <AllowUnsafe>false</AllowUnsafe> 117 <AllowUnsafe>false</AllowUnsafe>
118 <OutputPath>bin\Release</OutputPath> 118 <OutputPath>bin\Release</OutputPath>
119 <DebugInformation>false</DebugInformation> 119 <DebugInformation>false</DebugInformation>
120 <XmlDocFile>Gears.xml</XmlDocFile> 120 <XmlDocFile>Gears.xml</XmlDocFile>
121 <WarningLevel>1</WarningLevel> 121 <WarningLevel>1</WarningLevel>
122 <SuppressWarnings>1595</SuppressWarnings> 122 <SuppressWarnings>1595</SuppressWarnings>
123 </Options> 123 </Options>
124 </Configuration> 124 </Configuration>
125 <Reference name="System" /> 125 <Reference name="System" />
126 <Reference name="System.Drawing" /> 126 <Reference name="System.Drawing" />
127 <Reference name="SdlDotNet" localCopy="true"/> 127 <Reference name="SdlDotNet" localCopy="true"/>
128 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> 128 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
129 <Files> 129 <Files>
130 <File buildAction="EmbeddedResource">App.ico</File> 130 <File buildAction="EmbeddedResource">App.ico</File>
131 <Match path="." pattern="*.cs" recurse="true"/> 131 <Match path="." pattern="*.cs" recurse="true"/>
132 </Files> 132 </Files>
133 </Project> 133 </Project>
134 <Project name="CDPlayer" path="examples\\CDPlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.CDPlayer.CDPlayer" assemblyName="CDPlayer" rootNamespace="SdlDotNet.Examples.CDPlayer" icon="App.ico"> 134 <Project name="CDPlayer" path="examples\\CDPlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.CDPlayer.CDPlayer" assemblyName="CDPlayer" rootNamespace="SdlDotNet.Examples.CDPlayer" icon="App.ico">
135 <Configuration name="Debug"> 135 <Configuration name="Debug">
136 <Options> 136 <Options>
137 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 137 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
138 <OptimizeCode>false</OptimizeCode> 138 <OptimizeCode>false</OptimizeCode>
139 <AllowUnsafe>false</AllowUnsafe> 139 <AllowUnsafe>false</AllowUnsafe>
140 <OutputPath>bin\Debug</OutputPath> 140 <OutputPath>bin\Debug</OutputPath>
141 <DebugInformation>true</DebugInformation> 141 <DebugInformation>true</DebugInformation>
142 <XmlDocFile>CDPlayer.xml</XmlDocFile> 142 <XmlDocFile>CDPlayer.xml</XmlDocFile>
143 <WarningLevel>4</WarningLevel> 143 <WarningLevel>4</WarningLevel>
144 <SuppressWarnings>1595</SuppressWarnings> 144 <SuppressWarnings>1595</SuppressWarnings>
145 </Options> 145 </Options>
146 </Configuration> 146 </Configuration>
147 <Configuration name="Release"> 147 <Configuration name="Release">
148 <Options> 148 <Options>
149 <CompilerDefines>TRACE</CompilerDefines> 149 <CompilerDefines>TRACE</CompilerDefines>
150 <OptimizeCode>true</OptimizeCode> 150 <OptimizeCode>true</OptimizeCode>
151 <AllowUnsafe>false</AllowUnsafe> 151 <AllowUnsafe>false</AllowUnsafe>
152 <OutputPath>bin\Release</OutputPath> 152 <OutputPath>bin\Release</OutputPath>
153 <DebugInformation>false</DebugInformation> 153 <DebugInformation>false</DebugInformation>
154 <XmlDocFile>CDPlayer.xml</XmlDocFile> 154 <XmlDocFile>CDPlayer.xml</XmlDocFile>
155 <WarningLevel>1</WarningLevel> 155 <WarningLevel>1</WarningLevel>
156 <SuppressWarnings>1595</SuppressWarnings> 156 <SuppressWarnings>1595</SuppressWarnings>
157 </Options> 157 </Options>
158 </Configuration> 158 </Configuration>
159 <Reference name="System" /> 159 <Reference name="System" />
160 <Reference name="System.Drawing" /> 160 <Reference name="System.Drawing" />
161 <Reference name="System.Windows.Forms" /> 161 <Reference name="System.Windows.Forms" />
162 <Reference name="SdlDotNet" localCopy="true"/> 162 <Reference name="SdlDotNet" localCopy="true"/>
163 <Files> 163 <Files>
164 <File buildAction="EmbeddedResource">App.ico</File> 164 <File buildAction="EmbeddedResource">App.ico</File>
165 <File subType="Form">CDPlayer.cs</File> 165 <File subType="Form">CDPlayer.cs</File>
166 <Match path="." pattern="*.cs" recurse="true"> 166 <Match path="." pattern="*.cs" recurse="true">
167 <Exclude name="CDPlayer.cs"/> 167 <Exclude name="CDPlayer.cs"/>
168 </Match> 168 </Match>
169 </Files> 169 </Files>
170 </Project> 170 </Project>
171 <Project name="MoviePlayer" path="examples\\MoviePlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.MoviePlayer.MoviePlayer" assemblyName="MoviePlayer" rootNamespace="SdlDotNet.Examples.MoviePlayer" icon="App.ico"> 171 <Project name="MoviePlayer" path="examples\\MoviePlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.MoviePlayer.MoviePlayer" assemblyName="MoviePlayer" rootNamespace="SdlDotNet.Examples.MoviePlayer" icon="App.ico">
172 <Configuration name="Debug"> 172 <Configuration name="Debug">
173 <Options> 173 <Options>
174 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 174 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
175 <OptimizeCode>false</OptimizeCode> 175 <OptimizeCode>false</OptimizeCode>
176 <AllowUnsafe>false</AllowUnsafe> 176 <AllowUnsafe>false</AllowUnsafe>
177 <OutputPath>bin\Debug</OutputPath> 177 <OutputPath>bin\Debug</OutputPath>
178 <DebugInformation>true</DebugInformation> 178 <DebugInformation>true</DebugInformation>
179 <XmlDocFile>MoviePlayer.xml</XmlDocFile> 179 <XmlDocFile>MoviePlayer.xml</XmlDocFile>
180 <WarningLevel>4</WarningLevel> 180 <WarningLevel>4</WarningLevel>
181 <SuppressWarnings>1595</SuppressWarnings> 181 <SuppressWarnings>1595</SuppressWarnings>
182 </Options> 182 </Options>
183 </Configuration> 183 </Configuration>
184 <Configuration name="Release"> 184 <Configuration name="Release">
185 <Options> 185 <Options>
186 <CompilerDefines>TRACE</CompilerDefines> 186 <CompilerDefines>TRACE</CompilerDefines>
187 <OptimizeCode>true</OptimizeCode> 187 <OptimizeCode>true</OptimizeCode>
188 <AllowUnsafe>false</AllowUnsafe> 188 <AllowUnsafe>false</AllowUnsafe>
189 <OutputPath>bin\Release</OutputPath> 189 <OutputPath>bin\Release</OutputPath>
190 <DebugInformation>false</DebugInformation> 190 <DebugInformation>false</DebugInformation>
191 <XmlDocFile>MoviePlayer.xml</XmlDocFile> 191 <XmlDocFile>MoviePlayer.xml</XmlDocFile>
192 <WarningLevel>1</WarningLevel> 192 <WarningLevel>1</WarningLevel>
193 <SuppressWarnings>1595</SuppressWarnings> 193 <SuppressWarnings>1595</SuppressWarnings>
194 </Options> 194 </Options>
195 </Configuration> 195 </Configuration>
196 <Reference name="System" /> 196 <Reference name="System" />
197 <Reference name="System.Drawing" /> 197 <Reference name="System.Drawing" />
198 <Reference name="SdlDotNet" localCopy="true"/> 198 <Reference name="SdlDotNet" localCopy="true"/>
199 <Files> 199 <Files>
200 <File buildAction="EmbeddedResource">App.ico</File> 200 <File buildAction="EmbeddedResource">App.ico</File>
201 <Match path="." pattern="*.cs" recurse="true"/> 201 <Match path="." pattern="*.cs" recurse="true"/>
202 </Files> 202 </Files>
203 </Project> 203 </Project>
204 <Project name="SimpleGame" path="examples\\SimpleGame" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SimpleGame.GameMain" assemblyName="SimpleGame" rootNamespace="SdlDotNet.Examples.SimpleGame" icon="App.ico"> 204 <Project name="SimpleGame" path="examples\\SimpleGame" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SimpleGame.GameMain" assemblyName="SimpleGame" rootNamespace="SdlDotNet.Examples.SimpleGame" icon="App.ico">
205 <Configuration name="Debug"> 205 <Configuration name="Debug">
206 <Options> 206 <Options>
207 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 207 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
208 <OptimizeCode>false</OptimizeCode> 208 <OptimizeCode>false</OptimizeCode>
209 <AllowUnsafe>false</AllowUnsafe> 209 <AllowUnsafe>false</AllowUnsafe>
210 <OutputPath>bin\Debug</OutputPath> 210 <OutputPath>bin\Debug</OutputPath>
211 <DebugInformation>true</DebugInformation> 211 <DebugInformation>true</DebugInformation>
212 <XmlDocFile>SimpleGame.xml</XmlDocFile> 212 <XmlDocFile>SimpleGame.xml</XmlDocFile>
213 <WarningLevel>4</WarningLevel> 213 <WarningLevel>4</WarningLevel>
214 <SuppressWarnings>1595</SuppressWarnings> 214 <SuppressWarnings>1595</SuppressWarnings>
215 </Options> 215 </Options>
216 </Configuration> 216 </Configuration>
217 <Configuration name="Release"> 217 <Configuration name="Release">
218 <Options> 218 <Options>
219 <CompilerDefines>TRACE</CompilerDefines> 219 <CompilerDefines>TRACE</CompilerDefines>
220 <OptimizeCode>true</OptimizeCode> 220 <OptimizeCode>true</OptimizeCode>
221 <AllowUnsafe>false</AllowUnsafe> 221 <AllowUnsafe>false</AllowUnsafe>
222 <OutputPath>bin\Release</OutputPath> 222 <OutputPath>bin\Release</OutputPath>
223 <DebugInformation>false</DebugInformation> 223 <DebugInformation>false</DebugInformation>
224 <XmlDocFile>SimpleGame.xml</XmlDocFile> 224 <XmlDocFile>SimpleGame.xml</XmlDocFile>
225 <WarningLevel>1</WarningLevel> 225 <WarningLevel>1</WarningLevel>
226 <SuppressWarnings>1595</SuppressWarnings> 226 <SuppressWarnings>1595</SuppressWarnings>
227 </Options> 227 </Options>
228 </Configuration> 228 </Configuration>
229 <Reference name="System" /> 229 <Reference name="System" />
230 <Reference name="System.Drawing" /> 230 <Reference name="System.Drawing" />
231 <Reference name="SdlDotNet" localCopy="true"/> 231 <Reference name="SdlDotNet" localCopy="true"/>
232 <Files> 232 <Files>
233 <File buildAction="EmbeddedResource">App.ico</File> 233 <File buildAction="EmbeddedResource">App.ico</File>
234 <Match path="." pattern="*.cs" recurse="true"/> 234 <Match path="." pattern="*.cs" recurse="true"/>
235 </Files> 235 </Files>
236 </Project> 236 </Project>
237 <Project name="BombRun" path="examples\\BombRun" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BombRun.BombRun" assemblyName="BombRun" rootNamespace="SdlDotNet.Examples.BombRun" icon="App.ico"> 237 <Project name="BombRun" path="examples\\BombRun" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BombRun.BombRun" assemblyName="BombRun" rootNamespace="SdlDotNet.Examples.BombRun" icon="App.ico">
238 <Configuration name="Debug"> 238 <Configuration name="Debug">
239 <Options> 239 <Options>
240 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 240 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
241 <OptimizeCode>false</OptimizeCode> 241 <OptimizeCode>false</OptimizeCode>
242 <AllowUnsafe>false</AllowUnsafe> 242 <AllowUnsafe>false</AllowUnsafe>
243 <OutputPath>bin\Debug</OutputPath> 243 <OutputPath>bin\Debug</OutputPath>
244 <DebugInformation>true</DebugInformation> 244 <DebugInformation>true</DebugInformation>
245 <XmlDocFile>BombRun.xml</XmlDocFile> 245 <XmlDocFile>BombRun.xml</XmlDocFile>
246 <WarningLevel>4</WarningLevel> 246 <WarningLevel>4</WarningLevel>
247 <SuppressWarnings>1595</SuppressWarnings> 247 <SuppressWarnings>1595</SuppressWarnings>
248 </Options> 248 </Options>
249 </Configuration> 249 </Configuration>
250 <Configuration name="Release"> 250 <Configuration name="Release">
251 <Options> 251 <Options>
252 <CompilerDefines>TRACE</CompilerDefines> 252 <CompilerDefines>TRACE</CompilerDefines>
253 <OptimizeCode>true</OptimizeCode> 253 <OptimizeCode>true</OptimizeCode>
254 <AllowUnsafe>false</AllowUnsafe> 254 <AllowUnsafe>false</AllowUnsafe>
255 <OutputPath>bin\Release</OutputPath> 255 <OutputPath>bin\Release</OutputPath>
256 <DebugInformation>false</DebugInformation> 256 <DebugInformation>false</DebugInformation>
257 <XmlDocFile>BombRun.xml</XmlDocFile> 257 <XmlDocFile>BombRun.xml</XmlDocFile>
258 <WarningLevel>1</WarningLevel> 258 <WarningLevel>1</WarningLevel>
259 <SuppressWarnings>1595</SuppressWarnings> 259 <SuppressWarnings>1595</SuppressWarnings>
260 </Options> 260 </Options>
261 </Configuration> 261 </Configuration>
262 <Reference name="System" /> 262 <Reference name="System" />
263 <Reference name="System.Drawing" /> 263 <Reference name="System.Drawing" />
264 <Reference name="SdlDotNet" localCopy="true"/> 264 <Reference name="SdlDotNet" localCopy="true"/>
265 <Files> 265 <Files>
266 <File buildAction="EmbeddedResource">App.ico</File> 266 <File buildAction="EmbeddedResource">App.ico</File>
267 <Match path="." pattern="*.cs" recurse="true"/> 267 <Match path="." pattern="*.cs" recurse="true"/>
268 </Files> 268 </Files>
269 </Project> 269 </Project>
270 <Project name="SnowDemo" path="examples\\SnowDemo" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SnowDemo.SnowDemo" assemblyName="SnowDemo" rootNamespace="SdlDotNet.Examples.SnowDemo" icon="App.ico"> 270 <Project name="SnowDemo" path="examples\\SnowDemo" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SnowDemo.SnowDemo" assemblyName="SnowDemo" rootNamespace="SdlDotNet.Examples.SnowDemo" icon="App.ico">
271 <Configuration name="Debug"> 271 <Configuration name="Debug">
272 <Options> 272 <Options>
273 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 273 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
274 <OptimizeCode>false</OptimizeCode> 274 <OptimizeCode>false</OptimizeCode>
275 <AllowUnsafe>false</AllowUnsafe> 275 <AllowUnsafe>false</AllowUnsafe>
276 <OutputPath>bin\Debug</OutputPath> 276 <OutputPath>bin\Debug</OutputPath>
277 <DebugInformation>true</DebugInformation> 277 <DebugInformation>true</DebugInformation>
278 <XmlDocFile>SnowDemo.xml</XmlDocFile> 278 <XmlDocFile>SnowDemo.xml</XmlDocFile>
279 <WarningLevel>4</WarningLevel> 279 <WarningLevel>4</WarningLevel>
280 <SuppressWarnings>1595</SuppressWarnings> 280 <SuppressWarnings>1595</SuppressWarnings>
281 </Options> 281 </Options>
282 </Configuration> 282 </Configuration>
283 <Configuration name="Release"> 283 <Configuration name="Release">
284 <Options> 284 <Options>
285 <CompilerDefines>TRACE</CompilerDefines> 285 <CompilerDefines>TRACE</CompilerDefines>
286 <OptimizeCode>true</OptimizeCode> 286 <OptimizeCode>true</OptimizeCode>
287 <AllowUnsafe>false</AllowUnsafe> 287 <AllowUnsafe>false</AllowUnsafe>
288 <OutputPath>bin\Release</OutputPath> 288 <OutputPath>bin\Release</OutputPath>
289 <DebugInformation>false</DebugInformation> 289 <DebugInformation>false</DebugInformation>
290 <XmlDocFile>SnowDemo.xml</XmlDocFile> 290 <XmlDocFile>SnowDemo.xml</XmlDocFile>
291 <WarningLevel>1</WarningLevel> 291 <WarningLevel>1</WarningLevel>
292 <SuppressWarnings>1595</SuppressWarnings> 292 <SuppressWarnings>1595</SuppressWarnings>
293 </Options> 293 </Options>
294 </Configuration> 294 </Configuration>
295 <Reference name="System" /> 295 <Reference name="System" />
296 <Reference name="System.Drawing" /> 296 <Reference name="System.Drawing" />
297 <Reference name="SdlDotNet" localCopy="true"/> 297 <Reference name="SdlDotNet" localCopy="true"/>
298 <Files> 298 <Files>
299 <File buildAction="EmbeddedResource">App.ico</File> 299 <File buildAction="EmbeddedResource">App.ico</File>
300 <Match path="." pattern="*.cs" recurse="true"/> 300 <Match path="." pattern="*.cs" recurse="true"/>
301 </Files> 301 </Files>
302 </Project> 302 </Project>
303 <Project name="BounceSprites" path="examples\\BounceSprites" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BounceSprites.BounceSprites" assemblyName="BounceSprites" rootNamespace="SdlDotNet.Examples.BounceSprites" icon="App.ico"> 303 <Project name="BounceSprites" path="examples\\BounceSprites" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BounceSprites.BounceSprites" assemblyName="BounceSprites" rootNamespace="SdlDotNet.Examples.BounceSprites" icon="App.ico">
304 <Configuration name="Debug"> 304 <Configuration name="Debug">
305 <Options> 305 <Options>
306 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 306 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
307 <OptimizeCode>false</OptimizeCode> 307 <OptimizeCode>false</OptimizeCode>
308 <AllowUnsafe>false</AllowUnsafe> 308 <AllowUnsafe>false</AllowUnsafe>
309 <OutputPath>bin\Debug</OutputPath> 309 <OutputPath>bin\Debug</OutputPath>
310 <DebugInformation>true</DebugInformation> 310 <DebugInformation>true</DebugInformation>
311 <XmlDocFile>BounceSprites.xml</XmlDocFile> 311 <XmlDocFile>BounceSprites.xml</XmlDocFile>
312 <WarningLevel>4</WarningLevel> 312 <WarningLevel>4</WarningLevel>
313 <SuppressWarnings>1595</SuppressWarnings> 313 <SuppressWarnings>1595</SuppressWarnings>
314 </Options> 314 </Options>
315 </Configuration> 315 </Configuration>
316 <Configuration name="Release"> 316 <Configuration name="Release">
317 <Options> 317 <Options>
318 <CompilerDefines>TRACE</CompilerDefines> 318 <CompilerDefines>TRACE</CompilerDefines>
319 <OptimizeCode>true</OptimizeCode> 319 <OptimizeCode>true</OptimizeCode>
320 <AllowUnsafe>false</AllowUnsafe> 320 <AllowUnsafe>false</AllowUnsafe>
321 <OutputPath>bin\Release</OutputPath> 321 <OutputPath>bin\Release</OutputPath>
322 <DebugInformation>false</DebugInformation> 322 <DebugInformation>false</DebugInformation>
323 <XmlDocFile>BounceSprites.xml</XmlDocFile> 323 <XmlDocFile>BounceSprites.xml</XmlDocFile>
324 <WarningLevel>1</WarningLevel> 324 <WarningLevel>1</WarningLevel>
325 <SuppressWarnings>1595</SuppressWarnings> 325 <SuppressWarnings>1595</SuppressWarnings>
326 </Options> 326 </Options>
327 </Configuration> 327 </Configuration>
328 <Reference name="System" /> 328 <Reference name="System" />
329 <Reference name="System.Drawing" /> 329 <Reference name="System.Drawing" />
330 <Reference name="SdlDotNet" localCopy="true"/> 330 <Reference name="SdlDotNet" localCopy="true"/>
331 <Files> 331 <Files>
332 <File buildAction="EmbeddedResource">App.ico</File> 332 <File buildAction="EmbeddedResource">App.ico</File>
333 <Match path="." pattern="*.cs" recurse="true"/> 333 <Match path="." pattern="*.cs" recurse="true"/>
334 </Files> 334 </Files>
335 </Project> 335 </Project>
336 <Project name="Triad" path="examples\\Triad" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Triad.MainObject" assemblyName="Triad" rootNamespace="SdlDotNet.Examples.Triad" icon="App.ico"> 336 <Project name="Triad" path="examples\\Triad" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Triad.MainObject" assemblyName="Triad" rootNamespace="SdlDotNet.Examples.Triad" icon="App.ico">
337 <Configuration name="Debug"> 337 <Configuration name="Debug">
338 <Options> 338 <Options>
339 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 339 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
340 <OptimizeCode>false</OptimizeCode> 340 <OptimizeCode>false</OptimizeCode>
341 <AllowUnsafe>false</AllowUnsafe> 341 <AllowUnsafe>false</AllowUnsafe>
342 <OutputPath>bin\Debug</OutputPath> 342 <OutputPath>bin\Debug</OutputPath>
343 <DebugInformation>true</DebugInformation> 343 <DebugInformation>true</DebugInformation>
344 <XmlDocFile>Triad.xml</XmlDocFile> 344 <XmlDocFile>Triad.xml</XmlDocFile>
345 <WarningLevel>4</WarningLevel> 345 <WarningLevel>4</WarningLevel>
346 <SuppressWarnings>1595</SuppressWarnings> 346 <SuppressWarnings>1595</SuppressWarnings>
347 </Options> 347 </Options>
348 </Configuration> 348 </Configuration>
349 <Configuration name="Release"> 349 <Configuration name="Release">
350 <Options> 350 <Options>
351 <CompilerDefines>TRACE</CompilerDefines> 351 <CompilerDefines>TRACE</CompilerDefines>
352 <OptimizeCode>true</OptimizeCode> 352 <OptimizeCode>true</OptimizeCode>
353 <AllowUnsafe>false</AllowUnsafe> 353 <AllowUnsafe>false</AllowUnsafe>
354 <OutputPath>bin\Release</OutputPath> 354 <OutputPath>bin\Release</OutputPath>
355 <DebugInformation>false</DebugInformation> 355 <DebugInformation>false</DebugInformation>
356 <XmlDocFile>Triad.xml</XmlDocFile> 356 <XmlDocFile>Triad.xml</XmlDocFile>
357 <WarningLevel>1</WarningLevel> 357 <WarningLevel>1</WarningLevel>
358 <SuppressWarnings>1595</SuppressWarnings> 358 <SuppressWarnings>1595</SuppressWarnings>
359 </Options> 359 </Options>
360 </Configuration> 360 </Configuration>
361 <Reference name="System" /> 361 <Reference name="System" />
362 <Reference name="System.Drawing" /> 362 <Reference name="System.Drawing" />
363 <Reference name="SdlDotNet" localCopy="true"/> 363 <Reference name="SdlDotNet" localCopy="true"/>
364 <Reference name="nunit.framework" localCopy="true" path="..\\..\\lib"/> 364 <Reference name="nunit.framework" localCopy="true" path="..\\..\\lib"/>
365 <Files> 365 <Files>
366 <File buildAction="EmbeddedResource">App.ico</File> 366 <File buildAction="EmbeddedResource">App.ico</File>
367 <Match path="." pattern="*.cs" recurse="true"/> 367 <Match path="." pattern="*.cs" recurse="true"/>
368 </Files> 368 </Files>
369 </Project> 369 </Project>
370 <Project name="GuiExample" path="examples\\GuiExample" language="C#" type="Library" assemblyName="GuiExample" rootNamespace="SdlDotNet.Examples.GuiExample"> 370 <Project name="GuiExample" path="examples\\GuiExample" language="C#" type="Library" assemblyName="GuiExample" rootNamespace="SdlDotNet.Examples.GuiExample">
371 <Configuration name="Debug"> 371 <Configuration name="Debug">
372 <Options> 372 <Options>
373 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 373 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
374 <OptimizeCode>false</OptimizeCode> 374 <OptimizeCode>false</OptimizeCode>
375 <AllowUnsafe>false</AllowUnsafe> 375 <AllowUnsafe>false</AllowUnsafe>
376 <OutputPath>bin\Debug</OutputPath> 376 <OutputPath>bin\Debug</OutputPath>
377 <DebugInformation>true</DebugInformation> 377 <DebugInformation>true</DebugInformation>
378 <XmlDocFile>GuiExample.xml</XmlDocFile> 378 <XmlDocFile>GuiExample.xml</XmlDocFile>
379 <WarningLevel>4</WarningLevel> 379 <WarningLevel>4</WarningLevel>
380 <SuppressWarnings>1595</SuppressWarnings> 380 <SuppressWarnings>1595</SuppressWarnings>
381 </Options> 381 </Options>
382 </Configuration> 382 </Configuration>
383 <Configuration name="Release"> 383 <Configuration name="Release">
384 <Options> 384 <Options>
385 <CompilerDefines>TRACE</CompilerDefines> 385 <CompilerDefines>TRACE</CompilerDefines>
386 <OptimizeCode>true</OptimizeCode> 386 <OptimizeCode>true</OptimizeCode>
387 <AllowUnsafe>false</AllowUnsafe> 387 <AllowUnsafe>false</AllowUnsafe>
388 <OutputPath>bin\Release</OutputPath> 388 <OutputPath>bin\Release</OutputPath>
389 <DebugInformation>false</DebugInformation> 389 <DebugInformation>false</DebugInformation>
390 <XmlDocFile>GuiExample.xml</XmlDocFile> 390 <XmlDocFile>GuiExample.xml</XmlDocFile>
391 <WarningLevel>1</WarningLevel> 391 <WarningLevel>1</WarningLevel>
392 <SuppressWarnings>1595</SuppressWarnings> 392 <SuppressWarnings>1595</SuppressWarnings>
393 </Options> 393 </Options>
394 </Configuration> 394 </Configuration>
395 <Reference name="System" /> 395 <Reference name="System" />
396 <Reference name="System.Drawing" /> 396 <Reference name="System.Drawing" />
397 <Reference name="SdlDotNet" localCopy="true"/> 397 <Reference name="SdlDotNet" localCopy="true"/>
398 <Files> 398 <Files>
399 <Match path="." pattern="*.cs" recurse="true"/> 399 <Match path="." pattern="*.cs" recurse="true"/>
400 </Files> 400 </Files>
401 </Project> 401 </Project>
402 <Project name="SpriteGuiDemos" path="examples\\SpriteGuiDemos" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SpriteGuiDemos.SdlDemo" assemblyName="SpriteGuiDemo" rootNamespace="SdlDotNet.Examples.SpriteGuiDemos" icon="App.ico"> 402 <Project name="SpriteGuiDemos" path="examples\\SpriteGuiDemos" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SpriteGuiDemos.SdlDemo" assemblyName="SpriteGuiDemo" rootNamespace="SdlDotNet.Examples.SpriteGuiDemos" icon="App.ico">
403 <Configuration name="Debug"> 403 <Configuration name="Debug">
404 <Options> 404 <Options>
405 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 405 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
406 <OptimizeCode>false</OptimizeCode> 406 <OptimizeCode>false</OptimizeCode>
407 <AllowUnsafe>false</AllowUnsafe> 407 <AllowUnsafe>false</AllowUnsafe>
408 <OutputPath>bin\Debug</OutputPath> 408 <OutputPath>bin\Debug</OutputPath>
409 <DebugInformation>true</DebugInformation> 409 <DebugInformation>true</DebugInformation>
410 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile> 410 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
411 <WarningLevel>4</WarningLevel> 411 <WarningLevel>4</WarningLevel>
412 <SuppressWarnings>1595</SuppressWarnings> 412 <SuppressWarnings>1595</SuppressWarnings>
413 </Options> 413 </Options>
414 </Configuration> 414 </Configuration>
415 <Configuration name="Release"> 415 <Configuration name="Release">
416 <Options> 416 <Options>
417 <CompilerDefines>TRACE</CompilerDefines> 417 <CompilerDefines>TRACE</CompilerDefines>
418 <OptimizeCode>true</OptimizeCode> 418 <OptimizeCode>true</OptimizeCode>
419 <AllowUnsafe>false</AllowUnsafe> 419 <AllowUnsafe>false</AllowUnsafe>
420 <OutputPath>bin\Release</OutputPath> 420 <OutputPath>bin\Release</OutputPath>
421 <DebugInformation>false</DebugInformation> 421 <DebugInformation>false</DebugInformation>
422 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile> 422 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
423 <WarningLevel>1</WarningLevel> 423 <WarningLevel>1</WarningLevel>
424 <SuppressWarnings>1595</SuppressWarnings> 424 <SuppressWarnings>1595</SuppressWarnings>
425 </Options> 425 </Options>
426 </Configuration> 426 </Configuration>
427 <Reference name="System" /> 427 <Reference name="System" />
428 <Reference name="System.Drawing" /> 428 <Reference name="System.Drawing" />
429 <Reference name="SdlDotNet" localCopy="true"/> 429 <Reference name="SdlDotNet" localCopy="true"/>
430 <Reference name="GuiExample" localCopy="true"/> 430 <Reference name="GuiExample" localCopy="true"/>
431 <Files> 431 <Files>
432 <File buildAction="EmbeddedResource">App.ico</File> 432 <File buildAction="EmbeddedResource">App.ico</File>
433 <Match path="." pattern="*.cs" recurse="true"/> 433 <Match path="." pattern="*.cs" recurse="true"/>
434 </Files> 434 </Files>
435 </Project> 435 </Project>
436 <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SdlDotNet.Tests" rootNamespace="SdlDotNet.Tests"> 436 <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SdlDotNet.Tests" rootNamespace="SdlDotNet.Tests">
437 <Configuration name="Debug"> 437 <Configuration name="Debug">
438 <Options> 438 <Options>
439 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 439 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
440 <OptimizeCode>false</OptimizeCode> 440 <OptimizeCode>false</OptimizeCode>
441 <AllowUnsafe>false</AllowUnsafe> 441 <AllowUnsafe>false</AllowUnsafe>
442 <OutputPath>bin\Debug</OutputPath> 442 <OutputPath>bin\Debug</OutputPath>
443 <DebugInformation>true</DebugInformation> 443 <DebugInformation>true</DebugInformation>
444 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile> 444 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
445 <WarningLevel>4</WarningLevel> 445 <WarningLevel>4</WarningLevel>
446 <SuppressWarnings>1595</SuppressWarnings> 446 <SuppressWarnings>1595</SuppressWarnings>
447 </Options> 447 </Options>
448 </Configuration> 448 </Configuration>
449 <Configuration name="Release"> 449 <Configuration name="Release">
450 <Options> 450 <Options>
451 <CompilerDefines>TRACE</CompilerDefines> 451 <CompilerDefines>TRACE</CompilerDefines>
452 <OptimizeCode>true</OptimizeCode> 452 <OptimizeCode>true</OptimizeCode>
453 <AllowUnsafe>false</AllowUnsafe> 453 <AllowUnsafe>false</AllowUnsafe>
454 <OutputPath>bin\Release</OutputPath> 454 <OutputPath>bin\Release</OutputPath>
455 <DebugInformation>false</DebugInformation> 455 <DebugInformation>false</DebugInformation>
456 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile> 456 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
457 <WarningLevel>1</WarningLevel> 457 <WarningLevel>1</WarningLevel>
458 <SuppressWarnings>1595</SuppressWarnings> 458 <SuppressWarnings>1595</SuppressWarnings>
459 </Options> 459 </Options>
460 </Configuration> 460 </Configuration>
461 <Reference name="System" /> 461 <Reference name="System" />
462 <Reference name="System.Drawing" /> 462 <Reference name="System.Drawing" />
463 <Reference name="SdlDotNet" localCopy="true"/> 463 <Reference name="SdlDotNet" localCopy="true"/>
464 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/> 464 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
465 <Reference name="GuiExample" localCopy="true"/> 465 <Reference name="GuiExample" localCopy="true"/>
466 <Reference name="nunit.framework" localCopy="true" path="..\\lib"/> 466 <Reference name="nunit.framework" localCopy="true" path="..\\lib"/>
467 <Files> 467 <Files>
468 <Match path="." pattern="*.cs" recurse="true"/> 468 <Match path="." pattern="*.cs" recurse="true"/>
469 </Files> 469 </Files>
470 </Project> 470 </Project>
471 <Project name="AudioExample" path="examples\\AudioExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.AudioExample.AudioExample" assemblyName="AudioExample" rootNamespace="SdlDotNet.Examples.AudioExample" icon="App.ico"> 471 <Project name="AudioExample" path="examples\\AudioExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.AudioExample.AudioExample" assemblyName="AudioExample" rootNamespace="SdlDotNet.Examples.AudioExample" icon="App.ico">
472 <Configuration name="Debug"> 472 <Configuration name="Debug">
473 <Options> 473 <Options>
474 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 474 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
475 <OptimizeCode>false</OptimizeCode> 475 <OptimizeCode>false</OptimizeCode>
476 <AllowUnsafe>false</AllowUnsafe> 476 <AllowUnsafe>false</AllowUnsafe>
477 <OutputPath>bin\Debug</OutputPath> 477 <OutputPath>bin\Debug</OutputPath>
478 <DebugInformation>true</DebugInformation> 478 <DebugInformation>true</DebugInformation>
479 <XmlDocFile>AudioExample.xml</XmlDocFile> 479 <XmlDocFile>AudioExample.xml</XmlDocFile>
480 <WarningLevel>4</WarningLevel> 480 <WarningLevel>4</WarningLevel>
481 <SuppressWarnings>1595</SuppressWarnings> 481 <SuppressWarnings>1595</SuppressWarnings>
482 </Options> 482 </Options>
483 </Configuration> 483 </Configuration>
484 <Configuration name="Release"> 484 <Configuration name="Release">
485 <Options> 485 <Options>
486 <CompilerDefines>TRACE</CompilerDefines> 486 <CompilerDefines>TRACE</CompilerDefines>
487 <OptimizeCode>true</OptimizeCode> 487 <OptimizeCode>true</OptimizeCode>
488 <AllowUnsafe>false</AllowUnsafe> 488 <AllowUnsafe>false</AllowUnsafe>
489 <OutputPath>bin\Release</OutputPath> 489 <OutputPath>bin\Release</OutputPath>
490 <DebugInformation>false</DebugInformation> 490 <DebugInformation>false</DebugInformation>
491 <XmlDocFile>AudioExample.xml</XmlDocFile> 491 <XmlDocFile>AudioExample.xml</XmlDocFile>
492 <WarningLevel>1</WarningLevel> 492 <WarningLevel>1</WarningLevel>
493 <SuppressWarnings>1595</SuppressWarnings> 493 <SuppressWarnings>1595</SuppressWarnings>
494 </Options> 494 </Options>
495 </Configuration> 495 </Configuration>
496 <Reference name="System" /> 496 <Reference name="System" />
497 <Reference name="System.Drawing" /> 497 <Reference name="System.Drawing" />
498 <Reference name="SdlDotNet" localCopy="true"/> 498 <Reference name="SdlDotNet" localCopy="true"/>
499 <Files> 499 <Files>
500 <File buildAction="EmbeddedResource">App.ico</File> 500 <File buildAction="EmbeddedResource">App.ico</File>
501 <Match path="." pattern="*.cs" recurse="true"/> 501 <Match path="." pattern="*.cs" recurse="true"/>
502 </Files> 502 </Files>
503 </Project> 503 </Project>
504 <Project name="SdlDotNet.Particles" path="extras\\Particles" language="C#" type="Library" assemblyName="SdlDotNet.Particles" rootNamespace="SdlDotNet.Particles"> 504 <Project name="SdlDotNet.Particles" path="extras\\Particles" language="C#" type="Library" assemblyName="SdlDotNet.Particles" rootNamespace="SdlDotNet.Particles">
505 <Configuration name="Debug"> 505 <Configuration name="Debug">
506 <Options> 506 <Options>
507 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 507 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
508 <OptimizeCode>false</OptimizeCode> 508 <OptimizeCode>false</OptimizeCode>
509 <AllowUnsafe>false</AllowUnsafe> 509 <AllowUnsafe>false</AllowUnsafe>
510 <OutputPath>bin\Debug</OutputPath> 510 <OutputPath>bin\Debug</OutputPath>
511 <DebugInformation>true</DebugInformation> 511 <DebugInformation>true</DebugInformation>
512 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile> 512 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
513 <WarningLevel>4</WarningLevel> 513 <WarningLevel>4</WarningLevel>
514 <SuppressWarnings>1595</SuppressWarnings> 514 <SuppressWarnings>1595</SuppressWarnings>
515 </Options> 515 </Options>
516 </Configuration> 516 </Configuration>
517 <Configuration name="Release"> 517 <Configuration name="Release">
518 <Options> 518 <Options>
519 <CompilerDefines>TRACE</CompilerDefines> 519 <CompilerDefines>TRACE</CompilerDefines>
520 <OptimizeCode>true</OptimizeCode> 520 <OptimizeCode>true</OptimizeCode>
521 <AllowUnsafe>false</AllowUnsafe> 521 <AllowUnsafe>false</AllowUnsafe>
522 <OutputPath>bin\Release</OutputPath> 522 <OutputPath>bin\Release</OutputPath>
523 <DebugInformation>false</DebugInformation> 523 <DebugInformation>false</DebugInformation>
524 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile> 524 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
525 <WarningLevel>1</WarningLevel> 525 <WarningLevel>1</WarningLevel>
526 <SuppressWarnings>1595</SuppressWarnings> 526 <SuppressWarnings>1595</SuppressWarnings>
527 </Options> 527 </Options>
528 </Configuration> 528 </Configuration>
529 <Reference name="System" /> 529 <Reference name="System" />
530 <Reference name="System.Drawing" /> 530 <Reference name="System.Drawing" />
531 <Reference name="SdlDotNet" localCopy="true"/> 531 <Reference name="SdlDotNet" localCopy="true"/>
532 <Files> 532 <Files>
533 <Match path="." pattern="*.cs" recurse="true"/> 533 <Match path="." pattern="*.cs" recurse="true"/>
534 </Files> 534 </Files>
535 </Project> 535 </Project>
536 <Project name="ParticlesExample" path="examples\\ParticlesExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.ParticlesExample.ParticlesExample" assemblyName="ParticlesExample" rootNamespace="SdlDotNet.Examples.ParticlesExample" icon="App.ico"> 536 <Project name="ParticlesExample" path="examples\\ParticlesExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.ParticlesExample.ParticlesExample" assemblyName="ParticlesExample" rootNamespace="SdlDotNet.Examples.ParticlesExample" icon="App.ico">
537 <Configuration name="Debug"> 537 <Configuration name="Debug">
538 <Options> 538 <Options>
539 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 539 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
540 <OptimizeCode>false</OptimizeCode> 540 <OptimizeCode>false</OptimizeCode>
541 <AllowUnsafe>false</AllowUnsafe> 541 <AllowUnsafe>false</AllowUnsafe>
542 <OutputPath>bin\Debug</OutputPath> 542 <OutputPath>bin\Debug</OutputPath>
543 <DebugInformation>true</DebugInformation> 543 <DebugInformation>true</DebugInformation>
544 <XmlDocFile>ParticlesExample.xml</XmlDocFile> 544 <XmlDocFile>ParticlesExample.xml</XmlDocFile>
545 <WarningLevel>4</WarningLevel> 545 <WarningLevel>4</WarningLevel>
546 <SuppressWarnings>1595</SuppressWarnings> 546 <SuppressWarnings>1595</SuppressWarnings>
547 </Options> 547 </Options>
548 </Configuration> 548 </Configuration>
549 <Configuration name="Release"> 549 <Configuration name="Release">
550 <Options> 550 <Options>
551 <CompilerDefines>TRACE</CompilerDefines> 551 <CompilerDefines>TRACE</CompilerDefines>
552 <OptimizeCode>true</OptimizeCode> 552 <OptimizeCode>true</OptimizeCode>
553 <AllowUnsafe>false</AllowUnsafe> 553 <AllowUnsafe>false</AllowUnsafe>
554 <OutputPath>bin\Release</OutputPath> 554 <OutputPath>bin\Release</OutputPath>
555 <DebugInformation>false</DebugInformation> 555 <DebugInformation>false</DebugInformation>
556 <XmlDocFile>ParticlesExample.xml</XmlDocFile> 556 <XmlDocFile>ParticlesExample.xml</XmlDocFile>
557 <WarningLevel>1</WarningLevel> 557 <WarningLevel>1</WarningLevel>
558 <SuppressWarnings>1595</SuppressWarnings> 558 <SuppressWarnings>1595</SuppressWarnings>
559 </Options> 559 </Options>
560 </Configuration> 560 </Configuration>
561 <Reference name="System" /> 561 <Reference name="System" />
562 <Reference name="System.Drawing" /> 562 <Reference name="System.Drawing" />
563 <Reference name="SdlDotNet" localCopy="true"/> 563 <Reference name="SdlDotNet" localCopy="true"/>
564 <Reference name="SdlDotNet.Particles" localCopy="true"/> 564 <Reference name="SdlDotNet.Particles" localCopy="true"/>
565 <Files> 565 <Files>
566 <File buildAction="EmbeddedResource">App.ico</File> 566 <File buildAction="EmbeddedResource">App.ico</File>
567 <Match path="." pattern="*.cs" recurse="true"/> 567 <Match path="." pattern="*.cs" recurse="true"/>
568 </Files> 568 </Files>
569 </Project> 569 </Project>
570 <!--<Project name="SdlDotNet.Gui" path="extras\\Gui" language="C#" type="Library" assemblyName="SdlDotNet.Gui" rootNamespace="SdlDotNet.Gui"> 570 <!--<Project name="SdlDotNet.Gui" path="extras\\Gui" language="C#" type="Library" assemblyName="SdlDotNet.Gui" rootNamespace="SdlDotNet.Gui">
571 <Configuration name="Debug"> 571 <Configuration name="Debug">
572 <Options> 572 <Options>
573 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 573 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
574 <OptimizeCode>false</OptimizeCode> 574 <OptimizeCode>false</OptimizeCode>
575 <AllowUnsafe>false</AllowUnsafe> 575 <AllowUnsafe>false</AllowUnsafe>
576 <OutputPath>bin\Debug</OutputPath> 576 <OutputPath>bin\Debug</OutputPath>
577 <DebugInformation>true</DebugInformation> 577 <DebugInformation>true</DebugInformation>
578 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile> 578 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
579 <WarningLevel>4</WarningLevel> 579 <WarningLevel>4</WarningLevel>
580 </Options> 580 </Options>
581 </Configuration> 581 </Configuration>
582 <Configuration name="Release"> 582 <Configuration name="Release">
583 <Options> 583 <Options>
584 <CompilerDefines>TRACE</CompilerDefines> 584 <CompilerDefines>TRACE</CompilerDefines>
585 <OptimizeCode>true</OptimizeCode> 585 <OptimizeCode>true</OptimizeCode>
586 <AllowUnsafe>false</AllowUnsafe> 586 <AllowUnsafe>false</AllowUnsafe>
587 <OutputPath>bin\Release</OutputPath> 587 <OutputPath>bin\Release</OutputPath>
588 <DebugInformation>false</DebugInformation> 588 <DebugInformation>false</DebugInformation>
589 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile> 589 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
590 <WarningLevel>1</WarningLevel> 590 <WarningLevel>1</WarningLevel>
591 </Options> 591 </Options>
592 </Configuration> 592 </Configuration>
593 <Reference name="System" /> 593 <Reference name="System" />
594 <Reference name="System.Drawing" /> 594 <Reference name="System.Drawing" />
595 <Reference name="SdlDotNet" localCopy="true"/> 595 <Reference name="SdlDotNet" localCopy="true"/>
596 <Files> 596 <Files>
597 <Match path="." pattern="*.cs" recurse="true"/> 597 <Match path="." pattern="*.cs" recurse="true"/>
598 </Files> 598 </Files>
599 </Project>--> 599 </Project>-->
600 <Project name="NeHe" path="examples\\NeHe" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.NeHe.NeHe" assemblyName="NeHe" rootNamespace="SdlDotNet.Examples.NeHe" icon="App.ico"> 600 <Project name="NeHe" path="examples\\NeHe" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.NeHe.NeHe" assemblyName="NeHe" rootNamespace="SdlDotNet.Examples.NeHe" icon="App.ico">
601 <Configuration name="Debug"> 601 <Configuration name="Debug">
602 <Options> 602 <Options>
603 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 603 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
604 <OptimizeCode>false</OptimizeCode> 604 <OptimizeCode>false</OptimizeCode>
605 <AllowUnsafe>false</AllowUnsafe> 605 <AllowUnsafe>false</AllowUnsafe>
606 <OutputPath>bin\Debug</OutputPath> 606 <OutputPath>bin\Debug</OutputPath>
607 <DebugInformation>true</DebugInformation> 607 <DebugInformation>true</DebugInformation>
608 <XmlDocFile>NeHe.xml</XmlDocFile> 608 <XmlDocFile>NeHe.xml</XmlDocFile>
609 <WarningLevel>4</WarningLevel> 609 <WarningLevel>4</WarningLevel>
610 <SuppressWarnings>1595</SuppressWarnings> 610 <SuppressWarnings>1595</SuppressWarnings>
611 </Options> 611 </Options>
612 </Configuration> 612 </Configuration>
613 <Configuration name="Release"> 613 <Configuration name="Release">
614 <Options> 614 <Options>
615 <CompilerDefines>TRACE</CompilerDefines> 615 <CompilerDefines>TRACE</CompilerDefines>
616 <OptimizeCode>true</OptimizeCode> 616 <OptimizeCode>true</OptimizeCode>
617 <AllowUnsafe>false</AllowUnsafe> 617 <AllowUnsafe>false</AllowUnsafe>
618 <OutputPath>bin\Release</OutputPath> 618 <OutputPath>bin\Release</OutputPath>
619 <DebugInformation>false</DebugInformation> 619 <DebugInformation>false</DebugInformation>
620 <XmlDocFile>NeHe.xml</XmlDocFile> 620 <XmlDocFile>NeHe.xml</XmlDocFile>
621 <WarningLevel>1</WarningLevel> 621 <WarningLevel>1</WarningLevel>
622 <SuppressWarnings>1595</SuppressWarnings> 622 <SuppressWarnings>1595</SuppressWarnings>
623 </Options> 623 </Options>
624 </Configuration> 624 </Configuration>
625 <Reference name="System" /> 625 <Reference name="System" />
626 <Reference name="System.Drawing" /> 626 <Reference name="System.Drawing" />
627 <Reference name="System.Windows.Forms" /> 627 <Reference name="System.Windows.Forms" />
628 <Reference name="SdlDotNet" localCopy="true"/> 628 <Reference name="SdlDotNet" localCopy="true"/>
629 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> 629 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
630 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/> 630 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
631 <Reference name="Tao.Platform.Windows" localCopy="true" path="..\\..\\lib"/> 631 <Reference name="Tao.Platform.Windows" localCopy="true" path="..\\..\\lib"/>
632 <Files> 632 <Files>
633 <File buildAction="EmbeddedResource">App.ico</File> 633 <File buildAction="EmbeddedResource">App.ico</File>
634 <File subType="Form">NeHe.cs</File> 634 <File subType="Form">NeHe.cs</File>
635 <Match path="." pattern="*.cs" recurse="true"> 635 <Match path="." pattern="*.cs" recurse="true">
636 <Exclude name="NeHe.cs"/> 636 <Exclude name="NeHe.cs"/>
637 </Match> 637 </Match>
638 </Files> 638 </Files>
639 </Project> 639 </Project>
640 <Project name="RedBook" path="examples\\RedBook" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.RedBook.RedBook" assemblyName="RedBook" rootNamespace="SdlDotNet.Examples.RedBook" icon="App.ico"> 640 <Project name="RedBook" path="examples\\RedBook" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.RedBook.RedBook" assemblyName="RedBook" rootNamespace="SdlDotNet.Examples.RedBook" icon="App.ico">
641 <Configuration name="Debug"> 641 <Configuration name="Debug">
642 <Options> 642 <Options>
643 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 643 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
644 <OptimizeCode>false</OptimizeCode> 644 <OptimizeCode>false</OptimizeCode>
645 <AllowUnsafe>false</AllowUnsafe> 645 <AllowUnsafe>false</AllowUnsafe>
646 <OutputPath>bin\Debug</OutputPath> 646 <OutputPath>bin\Debug</OutputPath>
647 <DebugInformation>true</DebugInformation> 647 <DebugInformation>true</DebugInformation>
648 <XmlDocFile>RedBook.xml</XmlDocFile> 648 <XmlDocFile>RedBook.xml</XmlDocFile>
649 <WarningLevel>4</WarningLevel> 649 <WarningLevel>4</WarningLevel>
650 <SuppressWarnings>1595</SuppressWarnings> 650 <SuppressWarnings>1595</SuppressWarnings>
651 </Options> 651 </Options>
652 </Configuration> 652 </Configuration>
653 <Configuration name="Release"> 653 <Configuration name="Release">
654 <Options> 654 <Options>
655 <CompilerDefines>TRACE</CompilerDefines> 655 <CompilerDefines>TRACE</CompilerDefines>
656 <OptimizeCode>true</OptimizeCode> 656 <OptimizeCode>true</OptimizeCode>
657 <AllowUnsafe>false</AllowUnsafe> 657 <AllowUnsafe>false</AllowUnsafe>
658 <OutputPath>bin\Release</OutputPath> 658 <OutputPath>bin\Release</OutputPath>
659 <DebugInformation>false</DebugInformation> 659 <DebugInformation>false</DebugInformation>
660 <XmlDocFile>RedBook.xml</XmlDocFile> 660 <XmlDocFile>RedBook.xml</XmlDocFile>
661 <WarningLevel>1</WarningLevel> 661 <WarningLevel>1</WarningLevel>
662 <SuppressWarnings>1595</SuppressWarnings> 662 <SuppressWarnings>1595</SuppressWarnings>
663 </Options> 663 </Options>
664 </Configuration> 664 </Configuration>
665 <Reference name="System" /> 665 <Reference name="System" />
666 <Reference name="System.Drawing" /> 666 <Reference name="System.Drawing" />
667 <Reference name="System.Windows.Forms" /> 667 <Reference name="System.Windows.Forms" />
668 <Reference name="SdlDotNet" localCopy="true"/> 668 <Reference name="SdlDotNet" localCopy="true"/>
669 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/> 669 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
670 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/> 670 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
671 <Reference name="Tao.FreeGlut" localCopy="true" path="..\\..\\lib"/> 671 <Reference name="Tao.FreeGlut" localCopy="true" path="..\\..\\lib"/>
672 <Files> 672 <Files>
673 <File buildAction="EmbeddedResource">App.ico</File> 673 <File buildAction="EmbeddedResource">App.ico</File>
674 <File subType="Form">RedBook.cs</File> 674 <File subType="Form">RedBook.cs</File>
675 <Match path="." pattern="*.cs" recurse="true"> 675 <Match path="." pattern="*.cs" recurse="true">
676 <Exclude name="RedBook.cs" /> 676 <Exclude name="RedBook.cs" />
677 </Match> 677 </Match>
678 </Files> 678 </Files>
679 </Project> 679 </Project>
680 <Project name="PhysFsTest" path="examples\\PhysFsTest" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.PhysFsTest.PhysFsTest" assemblyName="PhysFsTest" rootNamespace="SdlDotNet.Examples.PhysFsTest" icon="App.ico"> 680 <Project name="PhysFsTest" path="examples\\PhysFsTest" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.PhysFsTest.PhysFsTest" assemblyName="PhysFsTest" rootNamespace="SdlDotNet.Examples.PhysFsTest" icon="App.ico">
681 <Configuration name="Debug"> 681 <Configuration name="Debug">
682 <Options> 682 <Options>
683 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 683 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
684 <OptimizeCode>false</OptimizeCode> 684 <OptimizeCode>false</OptimizeCode>
685 <AllowUnsafe>false</AllowUnsafe> 685 <AllowUnsafe>false</AllowUnsafe>
686 <OutputPath>bin\Debug</OutputPath> 686 <OutputPath>bin\Debug</OutputPath>
687 <DebugInformation>true</DebugInformation> 687 <DebugInformation>true</DebugInformation>
688 <XmlDocFile>PhysFsTest.xml</XmlDocFile> 688 <XmlDocFile>PhysFsTest.xml</XmlDocFile>
689 <WarningLevel>4</WarningLevel> 689 <WarningLevel>4</WarningLevel>
690 <SuppressWarnings>1595</SuppressWarnings> 690 <SuppressWarnings>1595</SuppressWarnings>
691 </Options> 691 </Options>
692 </Configuration> 692 </Configuration>
693 <Configuration name="Release"> 693 <Configuration name="Release">
694 <Options> 694 <Options>
695 <CompilerDefines>TRACE</CompilerDefines> 695 <CompilerDefines>TRACE</CompilerDefines>
696 <OptimizeCode>true</OptimizeCode> 696 <OptimizeCode>true</OptimizeCode>
697 <AllowUnsafe>false</AllowUnsafe> 697 <AllowUnsafe>false</AllowUnsafe>
698 <OutputPath>bin\Release</OutputPath> 698 <OutputPath>bin\Release</OutputPath>
699 <DebugInformation>false</DebugInformation> 699 <DebugInformation>false</DebugInformation>
700 <XmlDocFile>PhysFsTest.xml</XmlDocFile> 700 <XmlDocFile>PhysFsTest.xml</XmlDocFile>
701 <WarningLevel>1</WarningLevel> 701 <WarningLevel>1</WarningLevel>
702 <SuppressWarnings>1595</SuppressWarnings> 702 <SuppressWarnings>1595</SuppressWarnings>
703 </Options> 703 </Options>
704 </Configuration> 704 </Configuration>
705 <Reference name="System" /> 705 <Reference name="System" />
706 <Reference name="System.Drawing" /> 706 <Reference name="System.Drawing" />
707 <Reference name="SdlDotNet" localCopy="true"/> 707 <Reference name="SdlDotNet" localCopy="true"/>
708 <Reference name="Tao.PhysFs" localCopy="true" path="..\\..\\lib"/> 708 <Reference name="Tao.PhysFs" localCopy="true" path="..\\..\\lib"/>
709 <Files> 709 <Files>
710 <File buildAction="EmbeddedResource">App.ico</File> 710 <File buildAction="EmbeddedResource">App.ico</File>
711 <Match path="." pattern="*.cs" recurse="true"/> 711 <Match path="." pattern="*.cs" recurse="true"/>
712 </Files> 712 </Files>
713 </Project> 713 </Project>
714 </Solution> 714 </Solution>
715</Prebuild> 715</Prebuild>
diff --git a/Prebuild/scripts/Clean.bat b/Prebuild/scripts/Clean.bat
index 39fa685..806bbe8 100644
--- a/Prebuild/scripts/Clean.bat
+++ b/Prebuild/scripts/Clean.bat
@@ -1,2 +1,2 @@
1cd .. 1cd ..
2Prebuild.exe /clean /yes /removedir obj /file prebuild.xml /build NET_2_0 /pause 2Prebuild.exe /clean /yes /removedir obj /file prebuild.xml /build NET_2_0 /pause
diff --git a/Prebuild/scripts/Help.bat b/Prebuild/scripts/Help.bat
index a7d3db4..7c843c4 100644
--- a/Prebuild/scripts/Help.bat
+++ b/Prebuild/scripts/Help.bat
@@ -1,2 +1,2 @@
1cd .. 1cd ..
2Prebuild.exe /usage /pause \ No newline at end of file 2Prebuild.exe /usage /pause \ No newline at end of file
diff --git a/Prebuild/scripts/MonoDevelop.sh b/Prebuild/scripts/MonoDevelop.sh
index dae3cf4..fbd7669 100644
--- a/Prebuild/scripts/MonoDevelop.sh
+++ b/Prebuild/scripts/MonoDevelop.sh
@@ -1,2 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2prebuild /target monodev /file ../prebuild.xml /build NET_1_1 /pause 2prebuild /target monodev /file ../prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/Prebuild.nsi b/Prebuild/scripts/Prebuild.nsi
index 0c6e2bc..8f9854e 100644
--- a/Prebuild/scripts/Prebuild.nsi
+++ b/Prebuild/scripts/Prebuild.nsi
@@ -1,231 +1,231 @@
1!verbose 3 1!verbose 3
2 2
3!define PRODUCT_NAME "Prebuild" 3!define PRODUCT_NAME "Prebuild"
4!define PRODUCT_VERSION "1.3.1" 4!define PRODUCT_VERSION "1.3.1"
5!define PRODUCT_PUBLISHER "Prebuild" 5!define PRODUCT_PUBLISHER "Prebuild"
6!define PRODUCT_PACKAGE "prebuild" 6!define PRODUCT_PACKAGE "prebuild"
7!define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net" 7!define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net"
8!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild" 8!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild"
9!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild" 9!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild"
10!define PRODUCT_UNINST_ROOT_KEY "HKLM" 10!define PRODUCT_UNINST_ROOT_KEY "HKLM"
11!define PRODUCT_PATH ".." 11!define PRODUCT_PATH ".."
12 12
13;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp" 13;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
14;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH 14;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
15;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp" 15;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
16;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH 16;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
17 17
18BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/" 18BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/"
19SetCompressor lzma 19SetCompressor lzma
20CRCCheck on 20CRCCheck on
21 21
22; File Association defines 22; File Association defines
23;!include "fileassoc.nsh" 23;!include "fileassoc.nsh"
24 24
25; MUI 1.67 compatible ------ 25; MUI 1.67 compatible ------
26!include "MUI.nsh" 26!include "MUI.nsh"
27 27
28; MUI Settings 28; MUI Settings
29!define MUI_ABORTWARNING 29!define MUI_ABORTWARNING
30!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" 30!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
31!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" 31!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
32 32
33;-------------------------------- 33;--------------------------------
34;Variables 34;Variables
35 35
36;-------------------------------- 36;--------------------------------
37;Installer Pages 37;Installer Pages
38 38
39; Welcome page 39; Welcome page
40!insertmacro MUI_PAGE_WELCOME 40!insertmacro MUI_PAGE_WELCOME
41; License page 41; License page
42!insertmacro MUI_PAGE_LICENSE "..\doc\license.txt" 42!insertmacro MUI_PAGE_LICENSE "..\doc\license.txt"
43; Directory page 43; Directory page
44!insertmacro MUI_PAGE_DIRECTORY 44!insertmacro MUI_PAGE_DIRECTORY
45 45
46; Instfiles page 46; Instfiles page
47!insertmacro MUI_PAGE_INSTFILES 47!insertmacro MUI_PAGE_INSTFILES
48 48
49; Finish page 49; Finish page
50!insertmacro MUI_PAGE_FINISH 50!insertmacro MUI_PAGE_FINISH
51 51
52;------------------------------------ 52;------------------------------------
53; Uninstaller pages 53; Uninstaller pages
54!insertmacro MUI_UNPAGE_CONFIRM 54!insertmacro MUI_UNPAGE_CONFIRM
55!insertmacro MUI_UNPAGE_INSTFILES 55!insertmacro MUI_UNPAGE_INSTFILES
56!insertmacro MUI_UNPAGE_FINISH 56!insertmacro MUI_UNPAGE_FINISH
57;------------------------------------ 57;------------------------------------
58 58
59; Language files 59; Language files
60!insertmacro MUI_LANGUAGE "English" 60!insertmacro MUI_LANGUAGE "English"
61 61
62; Reserve files 62; Reserve files
63!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS 63!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
64 64
65; MUI end ------ 65; MUI end ------
66 66
67Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" 67Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
68OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe" 68OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe"
69InstallDir "$PROGRAMFILES\Prebuild" 69InstallDir "$PROGRAMFILES\Prebuild"
70InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" 70InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
71ShowInstDetails show 71ShowInstDetails show
72ShowUnInstDetails show 72ShowUnInstDetails show
73 73
74; .NET Framework check 74; .NET Framework check
75; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp 75; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp
76; Section "Detecting that the .NET Framework 1.1 is installed" 76; Section "Detecting that the .NET Framework 1.1 is installed"
77Function .onInit 77Function .onInit
78 ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install 78 ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install
79 StrCmp $R0 "" 0 CheckPreviousVersion 79 StrCmp $R0 "" 0 CheckPreviousVersion
80 MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation." 80 MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation."
81 Abort 81 Abort
82 82
83 CheckPreviousVersion: 83 CheckPreviousVersion:
84 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" 84 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName"
85 StrCmp $R0 "" CheckOSVersion 0 85 StrCmp $R0 "" CheckOSVersion 0
86 MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation." 86 MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation."
87 Abort 87 Abort
88 88
89 CheckOSVersion: 89 CheckOSVersion:
90 Call IsSupportedWindowsVersion 90 Call IsSupportedWindowsVersion
91 Pop $R0 91 Pop $R0
92 StrCmp $R0 "False" NoAbort 0 92 StrCmp $R0 "False" NoAbort 0
93 MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)." 93 MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)."
94 Abort 94 Abort
95 95
96 NoAbort: 96 NoAbort:
97FunctionEnd 97FunctionEnd
98 98
99Section "Source" SecSource 99Section "Source" SecSource
100 SetOverwrite ifnewer 100 SetOverwrite ifnewer
101 SetOutPath "$INSTDIR\src" 101 SetOutPath "$INSTDIR\src"
102 File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.* 102 File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.*
103 103
104 ;Store installation folder 104 ;Store installation folder
105 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR 105 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
106 106
107SectionEnd 107SectionEnd
108 108
109Section "Runtime" SecRuntime 109Section "Runtime" SecRuntime
110 SetOverwrite ifnewer 110 SetOverwrite ifnewer
111 SetOutPath "$INSTDIR" 111 SetOutPath "$INSTDIR"
112 File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml 112 File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml
113 113
114 ;Store installation folder 114 ;Store installation folder
115 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR 115 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
116 116
117SectionEnd 117SectionEnd
118 118
119Section "Documentation" SecDocs 119Section "Documentation" SecDocs
120 SetOverwrite ifnewer 120 SetOverwrite ifnewer
121 SetOutPath "$INSTDIR\doc" 121 SetOutPath "$INSTDIR\doc"
122 File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.* 122 File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.*
123 123
124 ;Store installation folder 124 ;Store installation folder
125 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR 125 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
126SectionEnd 126SectionEnd
127 127
128Section "Scripts" SecScripts 128Section "Scripts" SecScripts
129 SetOverwrite ifnewer 129 SetOverwrite ifnewer
130 SetOutPath "$INSTDIR\scripts" 130 SetOutPath "$INSTDIR\scripts"
131 File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.* 131 File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.*
132 132
133 ;Store installation folder 133 ;Store installation folder
134 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR 134 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
135SectionEnd 135SectionEnd
136 136
137;Language strings 137;Language strings
138 138
139Section -AdditionalIcons 139Section -AdditionalIcons
140 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" 140 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
141SectionEnd 141SectionEnd
142 142
143Section -Post 143Section -Post
144 WriteUninstaller "$INSTDIR\uninst.exe" 144 WriteUninstaller "$INSTDIR\uninst.exe"
145 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" 145 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
146 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" 146 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
147 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 147 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
148 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 148 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
149 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 149 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
150SectionEnd 150SectionEnd
151 151
152Section Uninstall 152Section Uninstall
153 153
154 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" 154 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
155 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" 155 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
156 RMDir /r "$INSTDIR" 156 RMDir /r "$INSTDIR"
157 157
158SectionEnd 158SectionEnd
159 159
160; GetWindowsVersion, taken from NSIS help, modified for our purposes 160; GetWindowsVersion, taken from NSIS help, modified for our purposes
161Function IsSupportedWindowsVersion 161Function IsSupportedWindowsVersion
162 162
163 Push $R0 163 Push $R0
164 Push $R1 164 Push $R1
165 165
166 ReadRegStr $R0 HKLM \ 166 ReadRegStr $R0 HKLM \
167 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion 167 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
168 168
169 IfErrors 0 lbl_winnt 169 IfErrors 0 lbl_winnt
170 170
171 ; we are not NT 171 ; we are not NT
172 ReadRegStr $R0 HKLM \ 172 ReadRegStr $R0 HKLM \
173 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber 173 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
174 174
175 StrCpy $R1 $R0 1 175 StrCpy $R1 $R0 1
176 StrCmp $R1 '4' 0 lbl_error 176 StrCmp $R1 '4' 0 lbl_error
177 177
178 StrCpy $R1 $R0 3 178 StrCpy $R1 $R0 3
179 179
180 StrCmp $R1 '4.0' lbl_win32_95 180 StrCmp $R1 '4.0' lbl_win32_95
181 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 181 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
182 182
183 lbl_win32_95: 183 lbl_win32_95:
184 StrCpy $R0 'False' 184 StrCpy $R0 'False'
185 Goto lbl_done 185 Goto lbl_done
186 186
187 lbl_win32_98: 187 lbl_win32_98:
188 StrCpy $R0 'False' 188 StrCpy $R0 'False'
189 Goto lbl_done 189 Goto lbl_done
190 190
191 lbl_win32_ME: 191 lbl_win32_ME:
192 StrCpy $R0 'False' 192 StrCpy $R0 'False'
193 Goto lbl_done 193 Goto lbl_done
194 194
195 lbl_winnt: 195 lbl_winnt:
196 196
197 StrCpy $R1 $R0 1 197 StrCpy $R1 $R0 1
198 198
199 StrCmp $R1 '3' lbl_winnt_x 199 StrCmp $R1 '3' lbl_winnt_x
200 StrCmp $R1 '4' lbl_winnt_x 200 StrCmp $R1 '4' lbl_winnt_x
201 201
202 StrCpy $R1 $R0 3 202 StrCpy $R1 $R0 3
203 203
204 StrCmp $R1 '5.0' lbl_winnt_2000 204 StrCmp $R1 '5.0' lbl_winnt_2000
205 StrCmp $R1 '5.1' lbl_winnt_XP 205 StrCmp $R1 '5.1' lbl_winnt_XP
206 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error 206 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
207 207
208 lbl_winnt_x: 208 lbl_winnt_x:
209 StrCpy $R0 'False' 209 StrCpy $R0 'False'
210 Goto lbl_done 210 Goto lbl_done
211 211
212 lbl_winnt_2000: 212 lbl_winnt_2000:
213 Strcpy $R0 'True' 213 Strcpy $R0 'True'
214 Goto lbl_done 214 Goto lbl_done
215 215
216 lbl_winnt_XP: 216 lbl_winnt_XP:
217 Strcpy $R0 'True' 217 Strcpy $R0 'True'
218 Goto lbl_done 218 Goto lbl_done
219 219
220 lbl_winnt_2003: 220 lbl_winnt_2003:
221 Strcpy $R0 'True' 221 Strcpy $R0 'True'
222 Goto lbl_done 222 Goto lbl_done
223 223
224 lbl_error: 224 lbl_error:
225 Strcpy $R0 'False' 225 Strcpy $R0 'False'
226 lbl_done: 226 lbl_done:
227 227
228 Pop $R1 228 Pop $R1
229 Exch $R0 229 Exch $R0
230 230
231FunctionEnd 231FunctionEnd
diff --git a/Prebuild/scripts/SharpDevelop.bat b/Prebuild/scripts/SharpDevelop.bat
index 483d9c9..08fea0b 100644
--- a/Prebuild/scripts/SharpDevelop.bat
+++ b/Prebuild/scripts/SharpDevelop.bat
@@ -1,4 +1,4 @@
1@rem Generates a combine (.cmbx) and a set of project files (.prjx) 1@rem Generates a combine (.cmbx) and a set of project files (.prjx)
2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx) 2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
3cd .. 3cd ..
4Prebuild.exe /target sharpdev /file prebuild.xml /build NET_1_1 /pause 4Prebuild.exe /target sharpdev /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/SharpDevelop2.bat b/Prebuild/scripts/SharpDevelop2.bat
index 4ca0272..49120ab 100644
--- a/Prebuild/scripts/SharpDevelop2.bat
+++ b/Prebuild/scripts/SharpDevelop2.bat
@@ -1,4 +1,4 @@
1@rem Generates a combine (.cmbx) and a set of project files (.prjx) 1@rem Generates a combine (.cmbx) and a set of project files (.prjx)
2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx) 2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
3cd .. 3cd ..
4Prebuild.exe /target sharpdev2 /file prebuild.xml /pause 4Prebuild.exe /target sharpdev2 /file prebuild.xml /pause
diff --git a/Prebuild/scripts/VS2002.bat b/Prebuild/scripts/VS2002.bat
index a11740e..dc5b6a7 100644
--- a/Prebuild/scripts/VS2002.bat
+++ b/Prebuild/scripts/VS2002.bat
@@ -1,4 +1,4 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj) 1@rem Generates a solution (.sln) and a set of project files (.csproj)
2@rem for Microsoft Visual Studio .NET 2002 2@rem for Microsoft Visual Studio .NET 2002
3cd .. 3cd ..
4Prebuild.exe /target vs2002 /file prebuild.xml /build NET_1_1 /pause 4Prebuild.exe /target vs2002 /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/VS2003.bat b/Prebuild/scripts/VS2003.bat
index 1be57f8..929a480 100644
--- a/Prebuild/scripts/VS2003.bat
+++ b/Prebuild/scripts/VS2003.bat
@@ -1,4 +1,4 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj) 1@rem Generates a solution (.sln) and a set of project files (.csproj)
2@rem for Microsoft Visual Studio .NET 2002 2@rem for Microsoft Visual Studio .NET 2002
3cd .. 3cd ..
4Prebuild.exe /target vs2003 /file prebuild.xml /build NET_1_1 /pause 4Prebuild.exe /target vs2003 /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/VS2005.bat b/Prebuild/scripts/VS2005.bat
index 86ad3fc..7a7af1d 100644
--- a/Prebuild/scripts/VS2005.bat
+++ b/Prebuild/scripts/VS2005.bat
@@ -1,4 +1,4 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.) 1@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.)
2@rem for Microsoft Visual Studio .NET 2005 2@rem for Microsoft Visual Studio .NET 2005
3cd .. 3cd ..
4Prebuild.exe /target vs2005 /file prebuild.xml /build NET_2_0 /pause 4Prebuild.exe /target vs2005 /file prebuild.xml /build NET_2_0 /pause
diff --git a/Prebuild/scripts/autotools.bat b/Prebuild/scripts/autotools.bat
index 1fd3469..43f9a74 100644
--- a/Prebuild/scripts/autotools.bat
+++ b/Prebuild/scripts/autotools.bat
@@ -1,4 +1,4 @@
1@rem Generates Makefiles 1@rem Generates Makefiles
2@rem for autotools 2@rem for autotools
3cd .. 3cd ..
4Prebuild.exe /target autotools /file prebuild.xml /pause 4Prebuild.exe /target autotools /file prebuild.xml /pause
diff --git a/Prebuild/scripts/nant.bat b/Prebuild/scripts/nant.bat
index 2a6ae60..925467d 100644
--- a/Prebuild/scripts/nant.bat
+++ b/Prebuild/scripts/nant.bat
@@ -1,4 +1,4 @@
1@rem Generates a .build files 1@rem Generates a .build files
2@rem for NAnt 2@rem for NAnt
3cd .. 3cd ..
4Prebuild.exe /target nant /file prebuild.xml /pause 4Prebuild.exe /target nant /file prebuild.xml /pause
diff --git a/Prebuild/scripts/nant.sh b/Prebuild/scripts/nant.sh
index 54a8254..0311971 100644
--- a/Prebuild/scripts/nant.sh
+++ b/Prebuild/scripts/nant.sh
@@ -1,2 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2prebuild /target nant /file ../prebuild.xml /pause 2prebuild /target nant /file ../prebuild.xml /pause
diff --git a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
index dbdaf0b..0786fe5 100644
--- a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
+++ b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
@@ -1,81 +1,81 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections.Specialized; 36using System.Collections.Specialized;
37 37
38namespace Prebuild.Core.Attributes 38namespace Prebuild.Core.Attributes
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] 43 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
44 public sealed class DataNodeAttribute : Attribute 44 public sealed class DataNodeAttribute : Attribute
45 { 45 {
46 #region Fields 46 #region Fields
47 47
48 private string m_Name = "unknown"; 48 private string m_Name = "unknown";
49 49
50 #endregion 50 #endregion
51 51
52 #region Constructors 52 #region Constructors
53 53
54 /// <summary> 54 /// <summary>
55 /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class. 55 /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class.
56 /// </summary> 56 /// </summary>
57 /// <param name="name">The name.</param> 57 /// <param name="name">The name.</param>
58 public DataNodeAttribute(string name) 58 public DataNodeAttribute(string name)
59 { 59 {
60 m_Name = name; 60 m_Name = name;
61 } 61 }
62 62
63 #endregion 63 #endregion
64 64
65 #region Properties 65 #region Properties
66 66
67 /// <summary> 67 /// <summary>
68 /// Gets the name. 68 /// Gets the name.
69 /// </summary> 69 /// </summary>
70 /// <value>The name.</value> 70 /// <value>The name.</value>
71 public string Name 71 public string Name
72 { 72 {
73 get 73 get
74 { 74 {
75 return m_Name; 75 return m_Name;
76 } 76 }
77 } 77 }
78 78
79 #endregion 79 #endregion
80 } 80 }
81} 81}
diff --git a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
index edda56d..a63e840 100644
--- a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
+++ b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
@@ -1,80 +1,80 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37namespace Prebuild.Core.Attributes 37namespace Prebuild.Core.Attributes
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 [AttributeUsage(AttributeTargets.Field)] 42 [AttributeUsage(AttributeTargets.Field)]
43 public sealed class OptionNodeAttribute : Attribute 43 public sealed class OptionNodeAttribute : Attribute
44 { 44 {
45 #region Fields 45 #region Fields
46 46
47 private string m_NodeName; 47 private string m_NodeName;
48 48
49 #endregion 49 #endregion
50 50
51 #region Constructors 51 #region Constructors
52 52
53 /// <summary> 53 /// <summary>
54 /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class. 54 /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class.
55 /// </summary> 55 /// </summary>
56 /// <param name="nodeName">Name of the node.</param> 56 /// <param name="nodeName">Name of the node.</param>
57 public OptionNodeAttribute(string nodeName) 57 public OptionNodeAttribute(string nodeName)
58 { 58 {
59 m_NodeName = nodeName; 59 m_NodeName = nodeName;
60 } 60 }
61 61
62 #endregion 62 #endregion
63 63
64 #region Properties 64 #region Properties
65 65
66 /// <summary> 66 /// <summary>
67 /// Gets the name of the node. 67 /// Gets the name of the node.
68 /// </summary> 68 /// </summary>
69 /// <value>The name of the node.</value> 69 /// <value>The name of the node.</value>
70 public string NodeName 70 public string NodeName
71 { 71 {
72 get 72 get
73 { 73 {
74 return m_NodeName; 74 return m_NodeName;
75 } 75 }
76 } 76 }
77 77
78 #endregion 78 #endregion
79 } 79 }
80} 80}
diff --git a/Prebuild/src/Core/Attributes/TargetAttribute.cs b/Prebuild/src/Core/Attributes/TargetAttribute.cs
index 985f180..8724d69 100644
--- a/Prebuild/src/Core/Attributes/TargetAttribute.cs
+++ b/Prebuild/src/Core/Attributes/TargetAttribute.cs
@@ -1,80 +1,80 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37namespace Prebuild.Core.Attributes 37namespace Prebuild.Core.Attributes
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] 42 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
43 public sealed class TargetAttribute : Attribute 43 public sealed class TargetAttribute : Attribute
44 { 44 {
45 #region Fields 45 #region Fields
46 46
47 private string m_Name; 47 private string m_Name;
48 48
49 #endregion 49 #endregion
50 50
51 #region Constructors 51 #region Constructors
52 52
53 /// <summary> 53 /// <summary>
54 /// Initializes a new instance of the <see cref="TargetAttribute"/> class. 54 /// Initializes a new instance of the <see cref="TargetAttribute"/> class.
55 /// </summary> 55 /// </summary>
56 /// <param name="name">The name.</param> 56 /// <param name="name">The name.</param>
57 public TargetAttribute(string name) 57 public TargetAttribute(string name)
58 { 58 {
59 m_Name = name; 59 m_Name = name;
60 } 60 }
61 61
62 #endregion 62 #endregion
63 63
64 #region Properties 64 #region Properties
65 65
66 /// <summary> 66 /// <summary>
67 /// Gets the name. 67 /// Gets the name.
68 /// </summary> 68 /// </summary>
69 /// <value>The name.</value> 69 /// <value>The name.</value>
70 public string Name 70 public string Name
71 { 71 {
72 get 72 get
73 { 73 {
74 return m_Name; 74 return m_Name;
75 } 75 }
76 } 76 }
77 77
78 #endregion 78 #endregion
79 } 79 }
80} 80}
diff --git a/Prebuild/src/Core/FatalException.cs b/Prebuild/src/Core/FatalException.cs
index 92aad3d..a997c98 100644
--- a/Prebuild/src/Core/FatalException.cs
+++ b/Prebuild/src/Core/FatalException.cs
@@ -1,94 +1,94 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Runtime.Serialization; 36using System.Runtime.Serialization;
37 37
38namespace Prebuild.Core 38namespace Prebuild.Core
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 [Serializable()] 43 [Serializable()]
44 public class FatalException : Exception 44 public class FatalException : Exception
45 { 45 {
46 #region Constructors 46 #region Constructors
47 47
48 48
49 /// <summary> 49 /// <summary>
50 /// Initializes a new instance of the <see cref="FatalException"/> class. 50 /// Initializes a new instance of the <see cref="FatalException"/> class.
51 /// </summary> 51 /// </summary>
52 public FatalException() 52 public FatalException()
53 { 53 {
54 } 54 }
55 55
56 /// <summary> 56 /// <summary>
57 /// Initializes a new instance of the <see cref="FatalException"/> class. 57 /// Initializes a new instance of the <see cref="FatalException"/> class.
58 /// </summary> 58 /// </summary>
59 /// <param name="format">The format.</param> 59 /// <param name="format">The format.</param>
60 /// <param name="args">The args.</param> 60 /// <param name="args">The args.</param>
61 public FatalException(string format, params object[] args) 61 public FatalException(string format, params object[] args)
62 : base(String.Format(format, args)) 62 : base(String.Format(format, args))
63 { 63 {
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Exception with specified string 67 /// Exception with specified string
68 /// </summary> 68 /// </summary>
69 /// <param name="message">Exception message</param> 69 /// <param name="message">Exception message</param>
70 public FatalException(string message): base(message) 70 public FatalException(string message): base(message)
71 { 71 {
72 } 72 }
73 73
74 /// <summary> 74 /// <summary>
75 /// 75 ///
76 /// </summary> 76 /// </summary>
77 /// <param name="message"></param> 77 /// <param name="message"></param>
78 /// <param name="exception"></param> 78 /// <param name="exception"></param>
79 public FatalException(string message, Exception exception) : base(message, exception) 79 public FatalException(string message, Exception exception) : base(message, exception)
80 { 80 {
81 } 81 }
82 82
83 /// <summary> 83 /// <summary>
84 /// 84 ///
85 /// </summary> 85 /// </summary>
86 /// <param name="info"></param> 86 /// <param name="info"></param>
87 /// <param name="context"></param> 87 /// <param name="context"></param>
88 protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context ) 88 protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context )
89 { 89 {
90 } 90 }
91 91
92 #endregion 92 #endregion
93 } 93 }
94} 94}
diff --git a/Prebuild/src/Core/Interfaces/IDataNode.cs b/Prebuild/src/Core/Interfaces/IDataNode.cs
index 0bad97c..2562b1d 100644
--- a/Prebuild/src/Core/Interfaces/IDataNode.cs
+++ b/Prebuild/src/Core/Interfaces/IDataNode.cs
@@ -1,56 +1,56 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Xml; 36using System.Xml;
37 37
38namespace Prebuild.Core.Interfaces 38namespace Prebuild.Core.Interfaces
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 public interface IDataNode 43 public interface IDataNode
44 { 44 {
45 /// <summary> 45 /// <summary>
46 /// Gets or sets the parent. 46 /// Gets or sets the parent.
47 /// </summary> 47 /// </summary>
48 /// <value>The parent.</value> 48 /// <value>The parent.</value>
49 IDataNode Parent { get; set; } 49 IDataNode Parent { get; set; }
50 /// <summary> 50 /// <summary>
51 /// Parses the specified node. 51 /// Parses the specified node.
52 /// </summary> 52 /// </summary>
53 /// <param name="node">The node.</param> 53 /// <param name="node">The node.</param>
54 void Parse(XmlNode node); 54 void Parse(XmlNode node);
55 } 55 }
56} 56}
diff --git a/Prebuild/src/Core/Interfaces/ITarget.cs b/Prebuild/src/Core/Interfaces/ITarget.cs
index dac6cd6..e74ff9a 100644
--- a/Prebuild/src/Core/Interfaces/ITarget.cs
+++ b/Prebuild/src/Core/Interfaces/ITarget.cs
@@ -1,60 +1,60 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37namespace Prebuild.Core.Interfaces 37namespace Prebuild.Core.Interfaces
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 public interface ITarget 42 public interface ITarget
43 { 43 {
44 /// <summary> 44 /// <summary>
45 /// Writes the specified kern. 45 /// Writes the specified kern.
46 /// </summary> 46 /// </summary>
47 /// <param name="kern">The kern.</param> 47 /// <param name="kern">The kern.</param>
48 void Write(Kernel kern); 48 void Write(Kernel kern);
49 /// <summary> 49 /// <summary>
50 /// Cleans the specified kern. 50 /// Cleans the specified kern.
51 /// </summary> 51 /// </summary>
52 /// <param name="kern">The kern.</param> 52 /// <param name="kern">The kern.</param>
53 void Clean(Kernel kern); 53 void Clean(Kernel kern);
54 /// <summary> 54 /// <summary>
55 /// Gets the name. 55 /// Gets the name.
56 /// </summary> 56 /// </summary>
57 /// <value>The name.</value> 57 /// <value>The name.</value>
58 string Name { get; } 58 string Name { get; }
59 } 59 }
60} \ No newline at end of file 60} \ No newline at end of file
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs
index 3117e7c..170d0f5 100644
--- a/Prebuild/src/Core/Kernel.cs
+++ b/Prebuild/src/Core/Kernel.cs
@@ -1,758 +1,758 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: robloach $ 29 * $Author: robloach $
30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $ 30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
31 * $Revision: 165 $ 31 * $Revision: 165 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Diagnostics; 36using System.Diagnostics;
37using System.Collections; 37using System.Collections;
38using System.Collections.Specialized; 38using System.Collections.Specialized;
39using System.IO; 39using System.IO;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42using System.Xml.Schema; 42using System.Xml.Schema;
43using System.Text; 43using System.Text;
44 44
45using Prebuild.Core.Attributes; 45using Prebuild.Core.Attributes;
46using Prebuild.Core.Interfaces; 46using Prebuild.Core.Interfaces;
47using Prebuild.Core.Nodes; 47using Prebuild.Core.Nodes;
48using Prebuild.Core.Parse; 48using Prebuild.Core.Parse;
49using Prebuild.Core.Utilities; 49using Prebuild.Core.Utilities;
50 50
51namespace Prebuild.Core 51namespace Prebuild.Core
52{ 52{
53 /// <summary> 53 /// <summary>
54 /// 54 ///
55 /// </summary> 55 /// </summary>
56 public class Kernel : IDisposable 56 public class Kernel : IDisposable
57 { 57 {
58 #region Inner Classes 58 #region Inner Classes
59 59
60 private struct NodeEntry 60 private struct NodeEntry
61 { 61 {
62 public Type Type; 62 public Type Type;
63 public DataNodeAttribute Attribute; 63 public DataNodeAttribute Attribute;
64 } 64 }
65 65
66 #endregion 66 #endregion
67 67
68 #region Fields 68 #region Fields
69 69
70 private static Kernel m_Instance = new Kernel(); 70 private static Kernel m_Instance = new Kernel();
71 71
72 /// <summary> 72 /// <summary>
73 /// This must match the version of the schema that is embeeded 73 /// This must match the version of the schema that is embeeded
74 /// </summary> 74 /// </summary>
75 private static string m_SchemaVersion = "1.7"; 75 private static string m_SchemaVersion = "1.7";
76 private static string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; 76 private static string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
77 private static string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; 77 private static string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
78 bool disposed; 78 bool disposed;
79 private Version m_Version; 79 private Version m_Version;
80 private string m_Revision = ""; 80 private string m_Revision = "";
81 private CommandLineCollection m_CommandLine; 81 private CommandLineCollection m_CommandLine;
82 private Log m_Log; 82 private Log m_Log;
83 private CurrentDirectory m_CurrentWorkingDirectory; 83 private CurrentDirectory m_CurrentWorkingDirectory;
84 private XmlSchemaCollection m_Schemas; 84 private XmlSchemaCollection m_Schemas;
85 85
86 private Hashtable m_Targets; 86 private Hashtable m_Targets;
87 private Hashtable m_Nodes; 87 private Hashtable m_Nodes;
88 88
89 ArrayList m_Solutions; 89 ArrayList m_Solutions;
90 string m_Target; 90 string m_Target;
91 string m_Clean; 91 string m_Clean;
92 string[] m_RemoveDirectories; 92 string[] m_RemoveDirectories;
93 string m_CurrentFile; 93 string m_CurrentFile;
94 bool m_PauseAfterFinish; 94 bool m_PauseAfterFinish;
95 string[] m_ProjectGroups; 95 string[] m_ProjectGroups;
96 StringCollection m_Refs; 96 StringCollection m_Refs;
97 97
98 98
99 #endregion 99 #endregion
100 100
101 #region Constructors 101 #region Constructors
102 102
103 private Kernel() 103 private Kernel()
104 { 104 {
105 } 105 }
106 106
107 #endregion 107 #endregion
108 108
109 #region Properties 109 #region Properties
110 110
111 /// <summary> 111 /// <summary>
112 /// Gets a value indicating whether [pause after finish]. 112 /// Gets a value indicating whether [pause after finish].
113 /// </summary> 113 /// </summary>
114 /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value> 114 /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value>
115 public bool PauseAfterFinish 115 public bool PauseAfterFinish
116 { 116 {
117 get 117 get
118 { 118 {
119 return m_PauseAfterFinish; 119 return m_PauseAfterFinish;
120 } 120 }
121 } 121 }
122 122
123 /// <summary> 123 /// <summary>
124 /// Gets the instance. 124 /// Gets the instance.
125 /// </summary> 125 /// </summary>
126 /// <value>The instance.</value> 126 /// <value>The instance.</value>
127 public static Kernel Instance 127 public static Kernel Instance
128 { 128 {
129 get 129 get
130 { 130 {
131 return m_Instance; 131 return m_Instance;
132 } 132 }
133 } 133 }
134 134
135 /// <summary> 135 /// <summary>
136 /// Gets the version. 136 /// Gets the version.
137 /// </summary> 137 /// </summary>
138 /// <value>The version.</value> 138 /// <value>The version.</value>
139 public string Version 139 public string Version
140 { 140 {
141 get 141 get
142 { 142 {
143 return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision); 143 return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision);
144 } 144 }
145 } 145 }
146 146
147 /// <summary> 147 /// <summary>
148 /// Gets the command line. 148 /// Gets the command line.
149 /// </summary> 149 /// </summary>
150 /// <value>The command line.</value> 150 /// <value>The command line.</value>
151 public CommandLineCollection CommandLine 151 public CommandLineCollection CommandLine
152 { 152 {
153 get 153 get
154 { 154 {
155 return m_CommandLine; 155 return m_CommandLine;
156 } 156 }
157 } 157 }
158 158
159 /// <summary> 159 /// <summary>
160 /// Gets the targets. 160 /// Gets the targets.
161 /// </summary> 161 /// </summary>
162 /// <value>The targets.</value> 162 /// <value>The targets.</value>
163 public Hashtable Targets 163 public Hashtable Targets
164 { 164 {
165 get 165 get
166 { 166 {
167 return m_Targets; 167 return m_Targets;
168 } 168 }
169 } 169 }
170 170
171 /// <summary> 171 /// <summary>
172 /// Gets the log. 172 /// Gets the log.
173 /// </summary> 173 /// </summary>
174 /// <value>The log.</value> 174 /// <value>The log.</value>
175 public Log Log 175 public Log Log
176 { 176 {
177 get 177 get
178 { 178 {
179 return m_Log; 179 return m_Log;
180 } 180 }
181 } 181 }
182 182
183 /// <summary> 183 /// <summary>
184 /// Gets the current working directory. 184 /// Gets the current working directory.
185 /// </summary> 185 /// </summary>
186 /// <value>The current working directory.</value> 186 /// <value>The current working directory.</value>
187 public CurrentDirectory CurrentWorkingDirectory 187 public CurrentDirectory CurrentWorkingDirectory
188 { 188 {
189 get 189 get
190 { 190 {
191 return m_CurrentWorkingDirectory; 191 return m_CurrentWorkingDirectory;
192 } 192 }
193 } 193 }
194 194
195 /// <summary> 195 /// <summary>
196 /// Gets the solutions. 196 /// Gets the solutions.
197 /// </summary> 197 /// </summary>
198 /// <value>The solutions.</value> 198 /// <value>The solutions.</value>
199 public ArrayList Solutions 199 public ArrayList Solutions
200 { 200 {
201 get 201 get
202 { 202 {
203 return m_Solutions; 203 return m_Solutions;
204 } 204 }
205 } 205 }
206 206
207 #endregion 207 #endregion
208 208
209 #region Private Methods 209 #region Private Methods
210 210
211 private void RemoveDirectories(string rootDir, string[] dirNames) 211 private void RemoveDirectories(string rootDir, string[] dirNames)
212 { 212 {
213 foreach(string dir in Directory.GetDirectories(rootDir)) 213 foreach(string dir in Directory.GetDirectories(rootDir))
214 { 214 {
215 string simpleName = Path.GetFileName(dir); 215 string simpleName = Path.GetFileName(dir);
216 216
217 if(Array.IndexOf(dirNames, simpleName) != -1) 217 if(Array.IndexOf(dirNames, simpleName) != -1)
218 { 218 {
219 //delete if the name matches one of the directory names to delete 219 //delete if the name matches one of the directory names to delete
220 string fullDirPath = Path.GetFullPath(dir); 220 string fullDirPath = Path.GetFullPath(dir);
221 Directory.Delete(fullDirPath,true); 221 Directory.Delete(fullDirPath,true);
222 } 222 }
223 else//not a match, so check children 223 else//not a match, so check children
224 { 224 {
225 RemoveDirectories(dir,dirNames); 225 RemoveDirectories(dir,dirNames);
226 //recurse, checking children for them 226 //recurse, checking children for them
227 } 227 }
228 } 228 }
229 } 229 }
230 230
231// private void RemoveDirectoryMatches(string rootDir, string dirPattern) 231// private void RemoveDirectoryMatches(string rootDir, string dirPattern)
232// { 232// {
233// foreach(string dir in Directory.GetDirectories(rootDir)) 233// foreach(string dir in Directory.GetDirectories(rootDir))
234// { 234// {
235// foreach(string match in Directory.GetDirectories(dir)) 235// foreach(string match in Directory.GetDirectories(dir))
236// {//delete all child directories that match 236// {//delete all child directories that match
237// Directory.Delete(Path.GetFullPath(match),true); 237// Directory.Delete(Path.GetFullPath(match),true);
238// } 238// }
239// //recure through the rest checking for nested matches to delete 239// //recure through the rest checking for nested matches to delete
240// RemoveDirectoryMatches(dir,dirPattern); 240// RemoveDirectoryMatches(dir,dirPattern);
241// } 241// }
242// } 242// }
243 243
244 private void LoadSchema() 244 private void LoadSchema()
245 { 245 {
246 Assembly assembly = this.GetType().Assembly; 246 Assembly assembly = this.GetType().Assembly;
247 Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema); 247 Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema);
248 if(stream == null) 248 if(stream == null)
249 { 249 {
250 //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET 250 //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET
251 stream = assembly.GetManifestResourceStream(m_Schema); 251 stream = assembly.GetManifestResourceStream(m_Schema);
252 if(stream == null) 252 if(stream == null)
253 { 253 {
254 throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema)); 254 throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema));
255 } 255 }
256 } 256 }
257 XmlReader schema = new XmlTextReader(stream); 257 XmlReader schema = new XmlTextReader(stream);
258 258
259 m_Schemas = new XmlSchemaCollection(); 259 m_Schemas = new XmlSchemaCollection();
260 m_Schemas.Add(m_SchemaURI, schema); 260 m_Schemas.Add(m_SchemaURI, schema);
261 } 261 }
262 262
263 private void CacheVersion() 263 private void CacheVersion()
264 { 264 {
265 m_Version = Assembly.GetEntryAssembly().GetName().Version; 265 m_Version = Assembly.GetEntryAssembly().GetName().Version;
266 } 266 }
267 267
268 private void CacheTargets(Assembly assm) 268 private void CacheTargets(Assembly assm)
269 { 269 {
270 foreach(Type t in assm.GetTypes()) 270 foreach(Type t in assm.GetTypes())
271 { 271 {
272 TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget)); 272 TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget));
273 if(ta == null) 273 if(ta == null)
274 { 274 {
275 continue; 275 continue;
276 } 276 }
277 277
278 ITarget target = (ITarget)assm.CreateInstance(t.FullName); 278 ITarget target = (ITarget)assm.CreateInstance(t.FullName);
279 if(target == null) 279 if(target == null)
280 { 280 {
281 throw new MissingMethodException("Could not create ITarget instance"); 281 throw new MissingMethodException("Could not create ITarget instance");
282 } 282 }
283 283
284 m_Targets[ta.Name] = target; 284 m_Targets[ta.Name] = target;
285 } 285 }
286 } 286 }
287 287
288 private void CacheNodeTypes(Assembly assm) 288 private void CacheNodeTypes(Assembly assm)
289 { 289 {
290 foreach(Type t in assm.GetTypes()) 290 foreach(Type t in assm.GetTypes())
291 { 291 {
292 DataNodeAttribute dna = (DataNodeAttribute)Helper.CheckType(t, typeof(DataNodeAttribute), typeof(IDataNode)); 292 DataNodeAttribute dna = (DataNodeAttribute)Helper.CheckType(t, typeof(DataNodeAttribute), typeof(IDataNode));
293 if(dna == null) 293 if(dna == null)
294 { 294 {
295 continue; 295 continue;
296 } 296 }
297 297
298 NodeEntry ne = new NodeEntry(); 298 NodeEntry ne = new NodeEntry();
299 ne.Type = t; 299 ne.Type = t;
300 ne.Attribute = dna; 300 ne.Attribute = dna;
301 m_Nodes[dna.Name] = ne; 301 m_Nodes[dna.Name] = ne;
302 } 302 }
303 } 303 }
304 304
305 private void LogBanner() 305 private void LogBanner()
306 { 306 {
307 m_Log.Write("Prebuild v" + this.Version); 307 m_Log.Write("Prebuild v" + this.Version);
308 m_Log.Write("Copyright (c) Matthew Holmes, Dan Moorehead and David Hudson"); 308 m_Log.Write("Copyright (c) Matthew Holmes, Dan Moorehead and David Hudson");
309 m_Log.Write("See 'prebuild /usage' for help"); 309 m_Log.Write("See 'prebuild /usage' for help");
310 m_Log.Write(); 310 m_Log.Write();
311 } 311 }
312 312
313 private void ProcessFile(string file) 313 private void ProcessFile(string file)
314 { 314 {
315 m_CurrentWorkingDirectory.Push(); 315 m_CurrentWorkingDirectory.Push();
316 316
317 string path = file; 317 string path = file;
318 try 318 try
319 { 319 {
320 try 320 try
321 { 321 {
322 path = Helper.ResolvePath(path); 322 path = Helper.ResolvePath(path);
323 } 323 }
324 catch(ArgumentException) 324 catch(ArgumentException)
325 { 325 {
326 m_Log.Write("Could not open Prebuild file: " + path); 326 m_Log.Write("Could not open Prebuild file: " + path);
327 m_CurrentWorkingDirectory.Pop(); 327 m_CurrentWorkingDirectory.Pop();
328 return; 328 return;
329 } 329 }
330 330
331 m_CurrentFile = path; 331 m_CurrentFile = path;
332 Helper.SetCurrentDir(Path.GetDirectoryName(path)); 332 Helper.SetCurrentDir(Path.GetDirectoryName(path));
333 333
334 334
335 XmlTextReader reader = new XmlTextReader(path); 335 XmlTextReader reader = new XmlTextReader(path);
336 336
337 Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor(); 337 Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor();
338 338
339 //register command line arguments as XML variables 339 //register command line arguments as XML variables
340 IDictionaryEnumerator dict = m_CommandLine.GetEnumerator(); 340 IDictionaryEnumerator dict = m_CommandLine.GetEnumerator();
341 while (dict.MoveNext()) 341 while (dict.MoveNext())
342 { 342 {
343 string name = dict.Key.ToString().Trim(); 343 string name = dict.Key.ToString().Trim();
344 if (name.Length > 0) 344 if (name.Length > 0)
345 pre.RegisterVariable(name, dict.Value.ToString()); 345 pre.RegisterVariable(name, dict.Value.ToString());
346 } 346 }
347 347
348 string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML 348 string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML
349 349
350 350
351 XmlDocument doc = new XmlDocument(); 351 XmlDocument doc = new XmlDocument();
352 try 352 try
353 { 353 {
354 XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); 354 XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
355 355
356 //validate while reading from string into XmlDocument DOM structure in memory 356 //validate while reading from string into XmlDocument DOM structure in memory
357 foreach(XmlSchema schema in m_Schemas) 357 foreach(XmlSchema schema in m_Schemas)
358 { 358 {
359 validator.Schemas.Add(schema); 359 validator.Schemas.Add(schema);
360 } 360 }
361 doc.Load(validator); 361 doc.Load(validator);
362 } 362 }
363 catch(XmlException e) 363 catch(XmlException e)
364 { 364 {
365 throw new XmlException(e.ToString()); 365 throw new XmlException(e.ToString());
366 } 366 }
367 367
368 //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details 368 //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details
369 if(m_CommandLine.WasPassed("ppo")) 369 if(m_CommandLine.WasPassed("ppo"))
370 { 370 {
371 string ppoFile = m_CommandLine["ppo"]; 371 string ppoFile = m_CommandLine["ppo"];
372 if(ppoFile == null || ppoFile.Trim().Length < 1) 372 if(ppoFile == null || ppoFile.Trim().Length < 1)
373 { 373 {
374 ppoFile = "preprocessed.xml"; 374 ppoFile = "preprocessed.xml";
375 } 375 }
376 376
377 StreamWriter writer = null; 377 StreamWriter writer = null;
378 try 378 try
379 { 379 {
380 writer = new StreamWriter(ppoFile); 380 writer = new StreamWriter(ppoFile);
381 writer.Write(xml); 381 writer.Write(xml);
382 } 382 }
383 catch(IOException ex) 383 catch(IOException ex)
384 { 384 {
385 Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message); 385 Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message);
386 } 386 }
387 finally 387 finally
388 { 388 {
389 if(writer != null) 389 if(writer != null)
390 { 390 {
391 writer.Close(); 391 writer.Close();
392 } 392 }
393 } 393 }
394 return; 394 return;
395 } 395 }
396 //start reading the xml config file 396 //start reading the xml config file
397 XmlElement rootNode = doc.DocumentElement; 397 XmlElement rootNode = doc.DocumentElement;
398 //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0"); 398 //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
399 Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false); 399 Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
400 400
401 foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions 401 foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions
402 { 402 {
403 IDataNode dataNode = ParseNode(node, null); 403 IDataNode dataNode = ParseNode(node, null);
404 if(dataNode is ProcessNode) 404 if(dataNode is ProcessNode)
405 { 405 {
406 ProcessNode proc = (ProcessNode)dataNode; 406 ProcessNode proc = (ProcessNode)dataNode;
407 if(proc.IsValid) 407 if(proc.IsValid)
408 { 408 {
409 ProcessFile(proc.Path); 409 ProcessFile(proc.Path);
410 } 410 }
411 } 411 }
412 else if(dataNode is SolutionNode) 412 else if(dataNode is SolutionNode)
413 { 413 {
414 m_Solutions.Add(dataNode); 414 m_Solutions.Add(dataNode);
415 } 415 }
416 } 416 }
417 } 417 }
418 catch(XmlSchemaException xse) 418 catch(XmlSchemaException xse)
419 { 419 {
420 m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}", 420 m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}",
421 xse.LineNumber, path, xse.Message); 421 xse.LineNumber, path, xse.Message);
422 } 422 }
423 finally 423 finally
424 { 424 {
425 m_CurrentWorkingDirectory.Pop(); 425 m_CurrentWorkingDirectory.Pop();
426 } 426 }
427 } 427 }
428 428
429 #endregion 429 #endregion
430 430
431 #region Public Methods 431 #region Public Methods
432 432
433 /// <summary> 433 /// <summary>
434 /// Allows the project. 434 /// Allows the project.
435 /// </summary> 435 /// </summary>
436 /// <param name="projectGroupsFlags">The project groups flags.</param> 436 /// <param name="projectGroupsFlags">The project groups flags.</param>
437 /// <returns></returns> 437 /// <returns></returns>
438 public bool AllowProject(string projectGroupsFlags) 438 public bool AllowProject(string projectGroupsFlags)
439 { 439 {
440 if(m_ProjectGroups != null && m_ProjectGroups.Length > 0) 440 if(m_ProjectGroups != null && m_ProjectGroups.Length > 0)
441 { 441 {
442 if(projectGroupsFlags != null && projectGroupsFlags.Length == 0) 442 if(projectGroupsFlags != null && projectGroupsFlags.Length == 0)
443 { 443 {
444 foreach(string group in projectGroupsFlags.Split('|')) 444 foreach(string group in projectGroupsFlags.Split('|'))
445 { 445 {
446 if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list 446 if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list
447 { 447 {
448 return true; 448 return true;
449 } 449 }
450 } 450 }
451 } 451 }
452 return false;//not included in the list or no groups specified for the project 452 return false;//not included in the list or no groups specified for the project
453 } 453 }
454 return true;//no filter specified in the command line args 454 return true;//no filter specified in the command line args
455 } 455 }
456 456
457 /// <summary> 457 /// <summary>
458 /// Gets the type of the node. 458 /// Gets the type of the node.
459 /// </summary> 459 /// </summary>
460 /// <param name="node">The node.</param> 460 /// <param name="node">The node.</param>
461 /// <returns></returns> 461 /// <returns></returns>
462 public Type GetNodeType(XmlNode node) 462 public Type GetNodeType(XmlNode node)
463 { 463 {
464 if( node == null ) 464 if( node == null )
465 { 465 {
466 throw new ArgumentNullException("node"); 466 throw new ArgumentNullException("node");
467 } 467 }
468 if(!m_Nodes.ContainsKey(node.Name)) 468 if(!m_Nodes.ContainsKey(node.Name))
469 { 469 {
470 return null; 470 return null;
471 } 471 }
472 472
473 NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; 473 NodeEntry ne = (NodeEntry)m_Nodes[node.Name];
474 return ne.Type; 474 return ne.Type;
475 } 475 }
476 476
477 /// <summary> 477 /// <summary>
478 /// 478 ///
479 /// </summary> 479 /// </summary>
480 /// <param name="node"></param> 480 /// <param name="node"></param>
481 /// <param name="parent"></param> 481 /// <param name="parent"></param>
482 /// <returns></returns> 482 /// <returns></returns>
483 public IDataNode ParseNode(XmlNode node, IDataNode parent) 483 public IDataNode ParseNode(XmlNode node, IDataNode parent)
484 { 484 {
485 return ParseNode(node, parent, null); 485 return ParseNode(node, parent, null);
486 } 486 }
487 487
488 //Create an instance of the data node type that is mapped to the name of the xml DOM node 488 //Create an instance of the data node type that is mapped to the name of the xml DOM node
489 /// <summary> 489 /// <summary>
490 /// Parses the node. 490 /// Parses the node.
491 /// </summary> 491 /// </summary>
492 /// <param name="node">The node.</param> 492 /// <param name="node">The node.</param>
493 /// <param name="parent">The parent.</param> 493 /// <param name="parent">The parent.</param>
494 /// <param name="preNode">The pre node.</param> 494 /// <param name="preNode">The pre node.</param>
495 /// <returns></returns> 495 /// <returns></returns>
496 public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode) 496 public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode)
497 { 497 {
498 IDataNode dataNode = null; 498 IDataNode dataNode = null;
499 499
500 try 500 try
501 { 501 {
502 if( node == null ) 502 if( node == null )
503 { 503 {
504 throw new ArgumentNullException("node"); 504 throw new ArgumentNullException("node");
505 } 505 }
506 if(preNode == null) 506 if(preNode == null)
507 { 507 {
508 if(!m_Nodes.ContainsKey(node.Name)) 508 if(!m_Nodes.ContainsKey(node.Name))
509 { 509 {
510 //throw new XmlException("Unknown XML node: " + node.Name); 510 //throw new XmlException("Unknown XML node: " + node.Name);
511 return null; 511 return null;
512 } 512 }
513 513
514 NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; 514 NodeEntry ne = (NodeEntry)m_Nodes[node.Name];
515 Type type = ne.Type; 515 Type type = ne.Type;
516 //DataNodeAttribute dna = ne.Attribute; 516 //DataNodeAttribute dna = ne.Attribute;
517 517
518 dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName); 518 dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName);
519 if(dataNode == null) 519 if(dataNode == null)
520 { 520 {
521 throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName); 521 throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName);
522 } 522 }
523 } 523 }
524 else 524 else
525 dataNode = preNode; 525 dataNode = preNode;
526 526
527 dataNode.Parent = parent; 527 dataNode.Parent = parent;
528 dataNode.Parse(node); 528 dataNode.Parse(node);
529 } 529 }
530 catch(WarningException wex) 530 catch(WarningException wex)
531 { 531 {
532 m_Log.Write(LogType.Warning, wex.Message); 532 m_Log.Write(LogType.Warning, wex.Message);
533 return null; 533 return null;
534 } 534 }
535 catch(FatalException fex) 535 catch(FatalException fex)
536 { 536 {
537 m_Log.WriteException(LogType.Error, fex); 537 m_Log.WriteException(LogType.Error, fex);
538 throw; 538 throw;
539 } 539 }
540 catch(Exception ex) 540 catch(Exception ex)
541 { 541 {
542 m_Log.WriteException(LogType.Error, ex); 542 m_Log.WriteException(LogType.Error, ex);
543 throw; 543 throw;
544 } 544 }
545 545
546 return dataNode; 546 return dataNode;
547 } 547 }
548 548
549 /// <summary> 549 /// <summary>
550 /// Initializes the specified target. 550 /// Initializes the specified target.
551 /// </summary> 551 /// </summary>
552 /// <param name="target">The target.</param> 552 /// <param name="target">The target.</param>
553 /// <param name="args">The args.</param> 553 /// <param name="args">The args.</param>
554 public void Initialize(LogTargets target, string[] args) 554 public void Initialize(LogTargets target, string[] args)
555 { 555 {
556 m_Targets = new Hashtable(); 556 m_Targets = new Hashtable();
557 CacheTargets(this.GetType().Assembly); 557 CacheTargets(this.GetType().Assembly);
558 m_Nodes = new Hashtable(); 558 m_Nodes = new Hashtable();
559 CacheNodeTypes(this.GetType().Assembly); 559 CacheNodeTypes(this.GetType().Assembly);
560 CacheVersion(); 560 CacheVersion();
561 561
562 m_CommandLine = new CommandLineCollection(args); 562 m_CommandLine = new CommandLineCollection(args);
563 563
564 string logFile = null; 564 string logFile = null;
565 if(m_CommandLine.WasPassed("log")) 565 if(m_CommandLine.WasPassed("log"))
566 { 566 {
567 logFile = m_CommandLine["log"]; 567 logFile = m_CommandLine["log"];
568 568
569 if(logFile != null && logFile.Length == 0) 569 if(logFile != null && logFile.Length == 0)
570 { 570 {
571 logFile = "Prebuild.log"; 571 logFile = "Prebuild.log";
572 } 572 }
573 } 573 }
574 else 574 else
575 { 575 {
576 target = target & ~LogTargets.File; //dont output to a file 576 target = target & ~LogTargets.File; //dont output to a file
577 } 577 }
578 578
579 m_Log = new Log(target, logFile); 579 m_Log = new Log(target, logFile);
580 LogBanner(); 580 LogBanner();
581 581
582 m_CurrentWorkingDirectory = new CurrentDirectory(); 582 m_CurrentWorkingDirectory = new CurrentDirectory();
583 583
584 m_Target = m_CommandLine["target"]; 584 m_Target = m_CommandLine["target"];
585 m_Clean = m_CommandLine["clean"]; 585 m_Clean = m_CommandLine["clean"];
586 string removeDirs = m_CommandLine["removedir"]; 586 string removeDirs = m_CommandLine["removedir"];
587 if(removeDirs != null && removeDirs.Length == 0) 587 if(removeDirs != null && removeDirs.Length == 0)
588 { 588 {
589 m_RemoveDirectories = removeDirs.Split('|'); 589 m_RemoveDirectories = removeDirs.Split('|');
590 } 590 }
591 591
592 string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include 592 string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include
593 if(flags != null && flags.Length == 0) 593 if(flags != null && flags.Length == 0)
594 { 594 {
595 m_ProjectGroups = flags.Split('|'); 595 m_ProjectGroups = flags.Split('|');
596 } 596 }
597 m_PauseAfterFinish = m_CommandLine.WasPassed("pause"); 597 m_PauseAfterFinish = m_CommandLine.WasPassed("pause");
598 598
599 LoadSchema(); 599 LoadSchema();
600 600
601 m_Solutions = new ArrayList(); 601 m_Solutions = new ArrayList();
602 m_Refs = new StringCollection(); 602 m_Refs = new StringCollection();
603 } 603 }
604 604
605 /// <summary> 605 /// <summary>
606 /// Processes this instance. 606 /// Processes this instance.
607 /// </summary> 607 /// </summary>
608 public void Process() 608 public void Process()
609 { 609 {
610 bool perfomedOtherTask = false; 610 bool perfomedOtherTask = false;
611 if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0) 611 if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0)
612 { 612 {
613 try 613 try
614 { 614 {
615 RemoveDirectories(".",m_RemoveDirectories); 615 RemoveDirectories(".",m_RemoveDirectories);
616 } 616 }
617 catch(IOException e) 617 catch(IOException e)
618 { 618 {
619 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); 619 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
620 m_Log.WriteException(LogType.Error,e); 620 m_Log.WriteException(LogType.Error,e);
621 } 621 }
622 catch(UnauthorizedAccessException e) 622 catch(UnauthorizedAccessException e)
623 { 623 {
624 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories); 624 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
625 m_Log.WriteException(LogType.Error,e); 625 m_Log.WriteException(LogType.Error,e);
626 } 626 }
627 perfomedOtherTask = true; 627 perfomedOtherTask = true;
628 } 628 }
629 629
630 if(m_Target != null && m_Clean != null) 630 if(m_Target != null && m_Clean != null)
631 { 631 {
632 m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together"); 632 m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together");
633 return; 633 return;
634 } 634 }
635 else if(m_Target == null && m_Clean == null) 635 else if(m_Target == null && m_Clean == null)
636 { 636 {
637 if(perfomedOtherTask) //finished 637 if(perfomedOtherTask) //finished
638 { 638 {
639 return; 639 return;
640 } 640 }
641 m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file"); 641 m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file");
642 return; 642 return;
643 } 643 }
644 644
645 string file = "./prebuild.xml"; 645 string file = "./prebuild.xml";
646 if(m_CommandLine.WasPassed("file")) 646 if(m_CommandLine.WasPassed("file"))
647 { 647 {
648 file = m_CommandLine["file"]; 648 file = m_CommandLine["file"];
649 } 649 }
650 650
651 ProcessFile(file); 651 ProcessFile(file);
652 652
653 string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower()); 653 string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower());
654 bool clean = (m_Target == null); 654 bool clean = (m_Target == null);
655 if(clean && target != null && target.Length == 0) 655 if(clean && target != null && target.Length == 0)
656 { 656 {
657 target = "all"; 657 target = "all";
658 } 658 }
659 if(clean && target == "all")//default to all if no target was specified for clean 659 if(clean && target == "all")//default to all if no target was specified for clean
660 { 660 {
661 //check if they passed yes 661 //check if they passed yes
662 if (!m_CommandLine.WasPassed("yes")) 662 if (!m_CommandLine.WasPassed("yes"))
663 { 663 {
664 Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):"); 664 Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):");
665 string ret = Console.ReadLine(); 665 string ret = Console.ReadLine();
666 if(ret == null) 666 if(ret == null)
667 { 667 {
668 return; 668 return;
669 } 669 }
670 ret = ret.Trim().ToLower(); 670 ret = ret.Trim().ToLower();
671 if((ret.ToLower() != "y" && ret.ToLower() != "yes")) 671 if((ret.ToLower() != "y" && ret.ToLower() != "yes"))
672 { 672 {
673 return; 673 return;
674 } 674 }
675 } 675 }
676 //clean all targets (just cleaning vs2002 target didn't clean nant) 676 //clean all targets (just cleaning vs2002 target didn't clean nant)
677 foreach(ITarget targ in m_Targets.Values) 677 foreach(ITarget targ in m_Targets.Values)
678 { 678 {
679 targ.Clean(this); 679 targ.Clean(this);
680 } 680 }
681 } 681 }
682 else 682 else
683 { 683 {
684 ITarget targ = (ITarget)m_Targets[target]; 684 ITarget targ = (ITarget)m_Targets[target];
685 685
686 if(clean) 686 if(clean)
687 { 687 {
688 targ.Clean(this); 688 targ.Clean(this);
689 } 689 }
690 else 690 else
691 { 691 {
692 targ.Write(this); 692 targ.Write(this);
693 } 693 }
694 } 694 }
695 695
696 m_Log.Flush(); 696 m_Log.Flush();
697 } 697 }
698 698
699 #endregion 699 #endregion
700 700
701 #region IDisposable Members 701 #region IDisposable Members
702 702
703 /// <summary> 703 /// <summary>
704 /// 704 ///
705 /// </summary> 705 /// </summary>
706 public void Dispose() 706 public void Dispose()
707 { 707 {
708 Dispose(true); 708 Dispose(true);
709 GC.SuppressFinalize(this); 709 GC.SuppressFinalize(this);
710 } 710 }
711 711
712 /// <summary> 712 /// <summary>
713 /// Dispose objects 713 /// Dispose objects
714 /// </summary> 714 /// </summary>
715 /// <param name="disposing"> 715 /// <param name="disposing">
716 /// If true, it will dispose close the handle 716 /// If true, it will dispose close the handle
717 /// </param> 717 /// </param>
718 /// <remarks> 718 /// <remarks>
719 /// Will dispose managed and unmanaged resources. 719 /// Will dispose managed and unmanaged resources.
720 /// </remarks> 720 /// </remarks>
721 protected virtual void Dispose(bool disposing) 721 protected virtual void Dispose(bool disposing)
722 { 722 {
723 if (!this.disposed) 723 if (!this.disposed)
724 { 724 {
725 if (disposing) 725 if (disposing)
726 { 726 {
727 if (this.m_Log != null) 727 if (this.m_Log != null)
728 { 728 {
729 this.m_Log.Close(); 729 this.m_Log.Close();
730 this.m_Log = null; 730 this.m_Log = null;
731 } 731 }
732 } 732 }
733 } 733 }
734 this.disposed = true; 734 this.disposed = true;
735 } 735 }
736 736
737 /// <summary> 737 /// <summary>
738 /// 738 ///
739 /// </summary> 739 /// </summary>
740 ~Kernel() 740 ~Kernel()
741 { 741 {
742 this.Dispose(false); 742 this.Dispose(false);
743 } 743 }
744 744
745 /// <summary> 745 /// <summary>
746 /// Closes and destroys this object 746 /// Closes and destroys this object
747 /// </summary> 747 /// </summary>
748 /// <remarks> 748 /// <remarks>
749 /// Same as Dispose(true) 749 /// Same as Dispose(true)
750 /// </remarks> 750 /// </remarks>
751 public void Close() 751 public void Close()
752 { 752 {
753 Dispose(); 753 Dispose();
754 } 754 }
755 755
756 #endregion 756 #endregion
757 } 757 }
758} \ No newline at end of file 758} \ No newline at end of file
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs
index 390794f..d2a5d20 100644
--- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs
+++ b/Prebuild/src/Core/Nodes/ConfigurationNode.cs
@@ -1,187 +1,187 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Xml; 36using System.Xml;
37 37
38using Prebuild.Core.Attributes; 38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces; 39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities; 40using Prebuild.Core.Utilities;
41 41
42namespace Prebuild.Core.Nodes 42namespace Prebuild.Core.Nodes
43{ 43{
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 [DataNode("Configuration")] 47 [DataNode("Configuration")]
48 public class ConfigurationNode : DataNode, ICloneable, IComparable 48 public class ConfigurationNode : DataNode, ICloneable, IComparable
49 { 49 {
50 #region Fields 50 #region Fields
51 51
52 private string m_Name = "unknown"; 52 private string m_Name = "unknown";
53 private OptionsNode m_Options; 53 private OptionsNode m_Options;
54 54
55 #endregion 55 #endregion
56 56
57 #region Constructors 57 #region Constructors
58 58
59 /// <summary> 59 /// <summary>
60 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class. 60 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
61 /// </summary> 61 /// </summary>
62 public ConfigurationNode() 62 public ConfigurationNode()
63 { 63 {
64 m_Options = new OptionsNode(); 64 m_Options = new OptionsNode();
65 } 65 }
66 66
67 #endregion 67 #endregion
68 68
69 #region Properties 69 #region Properties
70 70
71 /// <summary> 71 /// <summary>
72 /// Gets or sets the parent. 72 /// Gets or sets the parent.
73 /// </summary> 73 /// </summary>
74 /// <value>The parent.</value> 74 /// <value>The parent.</value>
75 public override IDataNode Parent 75 public override IDataNode Parent
76 { 76 {
77 get 77 get
78 { 78 {
79 return base.Parent; 79 return base.Parent;
80 } 80 }
81 set 81 set
82 { 82 {
83 base.Parent = value; 83 base.Parent = value;
84 if(base.Parent is SolutionNode) 84 if(base.Parent is SolutionNode)
85 { 85 {
86 SolutionNode node = (SolutionNode)base.Parent; 86 SolutionNode node = (SolutionNode)base.Parent;
87 if(node != null && node.Options != null) 87 if(node != null && node.Options != null)
88 { 88 {
89 node.Options.CopyTo(m_Options); 89 node.Options.CopyTo(m_Options);
90 } 90 }
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 /// <summary> 95 /// <summary>
96 /// Gets the name. 96 /// Gets the name.
97 /// </summary> 97 /// </summary>
98 /// <value>The name.</value> 98 /// <value>The name.</value>
99 public string Name 99 public string Name
100 { 100 {
101 get 101 get
102 { 102 {
103 return m_Name; 103 return m_Name;
104 } 104 }
105 } 105 }
106 106
107 /// <summary> 107 /// <summary>
108 /// Gets or sets the options. 108 /// Gets or sets the options.
109 /// </summary> 109 /// </summary>
110 /// <value>The options.</value> 110 /// <value>The options.</value>
111 public OptionsNode Options 111 public OptionsNode Options
112 { 112 {
113 get 113 get
114 { 114 {
115 return m_Options; 115 return m_Options;
116 } 116 }
117 set 117 set
118 { 118 {
119 m_Options = value; 119 m_Options = value;
120 } 120 }
121 } 121 }
122 122
123 #endregion 123 #endregion
124 124
125 #region Public Methods 125 #region Public Methods
126 126
127 /// <summary> 127 /// <summary>
128 /// Parses the specified node. 128 /// Parses the specified node.
129 /// </summary> 129 /// </summary>
130 /// <param name="node">The node.</param> 130 /// <param name="node">The node.</param>
131 public override void Parse(XmlNode node) 131 public override void Parse(XmlNode node)
132 { 132 {
133 m_Name = Helper.AttributeValue(node, "name", m_Name); 133 m_Name = Helper.AttributeValue(node, "name", m_Name);
134 if( node == null ) 134 if( node == null )
135 { 135 {
136 throw new ArgumentNullException("node"); 136 throw new ArgumentNullException("node");
137 } 137 }
138 foreach(XmlNode child in node.ChildNodes) 138 foreach(XmlNode child in node.ChildNodes)
139 { 139 {
140 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 140 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
141 if(dataNode is OptionsNode) 141 if(dataNode is OptionsNode)
142 { 142 {
143 ((OptionsNode)dataNode).CopyTo(m_Options); 143 ((OptionsNode)dataNode).CopyTo(m_Options);
144 } 144 }
145 } 145 }
146 } 146 }
147 147
148 /// <summary> 148 /// <summary>
149 /// Copies to. 149 /// Copies to.
150 /// </summary> 150 /// </summary>
151 /// <param name="conf">The conf.</param> 151 /// <param name="conf">The conf.</param>
152 public void CopyTo(ConfigurationNode conf) 152 public void CopyTo(ConfigurationNode conf)
153 { 153 {
154 m_Options.CopyTo(conf.m_Options); 154 m_Options.CopyTo(conf.m_Options);
155 } 155 }
156 156
157 #endregion 157 #endregion
158 158
159 #region ICloneable Members 159 #region ICloneable Members
160 160
161 /// <summary> 161 /// <summary>
162 /// Creates a new object that is a copy of the current instance. 162 /// Creates a new object that is a copy of the current instance.
163 /// </summary> 163 /// </summary>
164 /// <returns> 164 /// <returns>
165 /// A new object that is a copy of this instance. 165 /// A new object that is a copy of this instance.
166 /// </returns> 166 /// </returns>
167 public object Clone() 167 public object Clone()
168 { 168 {
169 ConfigurationNode ret = new ConfigurationNode(); 169 ConfigurationNode ret = new ConfigurationNode();
170 ret.m_Name = m_Name; 170 ret.m_Name = m_Name;
171 m_Options.CopyTo(ret.m_Options); 171 m_Options.CopyTo(ret.m_Options);
172 return ret; 172 return ret;
173 } 173 }
174 174
175 #endregion 175 #endregion
176 176
177 #region IComparable Members 177 #region IComparable Members
178 178
179 public int CompareTo(object obj) 179 public int CompareTo(object obj)
180 { 180 {
181 ConfigurationNode that = (ConfigurationNode) obj; 181 ConfigurationNode that = (ConfigurationNode) obj;
182 return this.m_Name.CompareTo(that.m_Name); 182 return this.m_Name.CompareTo(that.m_Name);
183 } 183 }
184 184
185 #endregion 185 #endregion
186 } 186 }
187} 187}
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs
index ef5f7ee..aa05faa 100644
--- a/Prebuild/src/Core/Nodes/DataNode.cs
+++ b/Prebuild/src/Core/Nodes/DataNode.cs
@@ -1,82 +1,82 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Xml; 36using System.Xml;
37 37
38using Prebuild.Core.Attributes; 38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces; 39using Prebuild.Core.Interfaces;
40 40
41namespace Prebuild.Core.Nodes 41namespace Prebuild.Core.Nodes
42{ 42{
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 public class DataNode : IDataNode 46 public class DataNode : IDataNode
47 { 47 {
48 #region Fields 48 #region Fields
49 49
50 private IDataNode parent; 50 private IDataNode parent;
51 51
52 #endregion 52 #endregion
53 53
54 #region IDataNode Members 54 #region IDataNode Members
55 55
56 /// <summary> 56 /// <summary>
57 /// Gets or sets the parent. 57 /// Gets or sets the parent.
58 /// </summary> 58 /// </summary>
59 /// <value>The parent.</value> 59 /// <value>The parent.</value>
60 public virtual IDataNode Parent 60 public virtual IDataNode Parent
61 { 61 {
62 get 62 get
63 { 63 {
64 return parent; 64 return parent;
65 } 65 }
66 set 66 set
67 { 67 {
68 parent = value; 68 parent = value;
69 } 69 }
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// Parses the specified node. 73 /// Parses the specified node.
74 /// </summary> 74 /// </summary>
75 /// <param name="node">The node.</param> 75 /// <param name="node">The node.</param>
76 public virtual void Parse(XmlNode node) 76 public virtual void Parse(XmlNode node)
77 { 77 {
78 } 78 }
79 79
80 #endregion 80 #endregion
81 } 81 }
82} 82}
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs
index bfcebca..905626d 100644
--- a/Prebuild/src/Core/Nodes/ExcludeNode.cs
+++ b/Prebuild/src/Core/Nodes/ExcludeNode.cs
@@ -1,85 +1,85 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $ 30 * $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $
31 * $Revision: 74 $ 31 * $Revision: 74 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Xml; 36using System.Xml;
37 37
38using Prebuild.Core.Attributes; 38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces; 39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities; 40using Prebuild.Core.Utilities;
41 41
42namespace Prebuild.Core.Nodes 42namespace Prebuild.Core.Nodes
43{ 43{
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 [DataNode("Exclude")] 47 [DataNode("Exclude")]
48 public class ExcludeNode : DataNode 48 public class ExcludeNode : DataNode
49 { 49 {
50 #region Fields 50 #region Fields
51 51
52 private string m_Name = "unknown"; 52 private string m_Name = "unknown";
53 53
54 #endregion 54 #endregion
55 55
56 #region Properties 56 #region Properties
57 57
58 /// <summary> 58 /// <summary>
59 /// Gets the name. 59 /// Gets the name.
60 /// </summary> 60 /// </summary>
61 /// <value>The name.</value> 61 /// <value>The name.</value>
62 public string Name 62 public string Name
63 { 63 {
64 get 64 get
65 { 65 {
66 return m_Name; 66 return m_Name;
67 } 67 }
68 } 68 }
69 69
70 #endregion 70 #endregion
71 71
72 #region Public Methods 72 #region Public Methods
73 73
74 /// <summary> 74 /// <summary>
75 /// Parses the specified node. 75 /// Parses the specified node.
76 /// </summary> 76 /// </summary>
77 /// <param name="node">The node.</param> 77 /// <param name="node">The node.</param>
78 public override void Parse(XmlNode node) 78 public override void Parse(XmlNode node)
79 { 79 {
80 m_Name = Helper.AttributeValue(node, "name", m_Name); 80 m_Name = Helper.AttributeValue(node, "name", m_Name);
81 } 81 }
82 82
83 #endregion 83 #endregion
84 } 84 }
85} 85}
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs
index de3b69e..ab0a2a3 100644
--- a/Prebuild/src/Core/Nodes/FileNode.cs
+++ b/Prebuild/src/Core/Nodes/FileNode.cs
@@ -1,238 +1,238 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $ 30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
31 * $Revision: 197 $ 31 * $Revision: 197 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.IO; 36using System.IO;
37using System.Xml; 37using System.Xml;
38 38
39using Prebuild.Core.Attributes; 39using Prebuild.Core.Attributes;
40using Prebuild.Core.Interfaces; 40using Prebuild.Core.Interfaces;
41using Prebuild.Core.Utilities; 41using Prebuild.Core.Utilities;
42 42
43namespace Prebuild.Core.Nodes 43namespace Prebuild.Core.Nodes
44{ 44{
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 public enum BuildAction 48 public enum BuildAction
49 { 49 {
50 /// <summary> 50 /// <summary>
51 /// 51 ///
52 /// </summary> 52 /// </summary>
53 None, 53 None,
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 Compile, 57 Compile,
58 /// <summary> 58 /// <summary>
59 /// 59 ///
60 /// </summary> 60 /// </summary>
61 Content, 61 Content,
62 /// <summary> 62 /// <summary>
63 /// 63 ///
64 /// </summary> 64 /// </summary>
65 EmbeddedResource 65 EmbeddedResource
66 } 66 }
67 67
68 /// <summary> 68 /// <summary>
69 /// 69 ///
70 /// </summary> 70 /// </summary>
71 public enum SubType 71 public enum SubType
72 { 72 {
73 /// <summary> 73 /// <summary>
74 /// 74 ///
75 /// </summary> 75 /// </summary>
76 Code, 76 Code,
77 /// <summary> 77 /// <summary>
78 /// 78 ///
79 /// </summary> 79 /// </summary>
80 Component, 80 Component,
81 /// <summary> 81 /// <summary>
82 /// 82 ///
83 /// </summary> 83 /// </summary>
84 Designer, 84 Designer,
85 /// <summary> 85 /// <summary>
86 /// 86 ///
87 /// </summary> 87 /// </summary>
88 Form, 88 Form,
89 /// <summary> 89 /// <summary>
90 /// 90 ///
91 /// </summary> 91 /// </summary>
92 Settings, 92 Settings,
93 /// <summary> 93 /// <summary>
94 /// 94 ///
95 /// </summary> 95 /// </summary>
96 UserControl 96 UserControl
97 } 97 }
98 98
99 public enum CopyToOutput 99 public enum CopyToOutput
100 { 100 {
101 Never, 101 Never,
102 Always, 102 Always,
103 PreserveNewest 103 PreserveNewest
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// 107 ///
108 /// </summary> 108 /// </summary>
109 [DataNode("File")] 109 [DataNode("File")]
110 public class FileNode : DataNode 110 public class FileNode : DataNode
111 { 111 {
112 #region Fields 112 #region Fields
113 113
114 private string m_Path; 114 private string m_Path;
115 private string m_ResourceName = ""; 115 private string m_ResourceName = "";
116 private BuildAction m_BuildAction = BuildAction.Compile; 116 private BuildAction m_BuildAction = BuildAction.Compile;
117 private bool m_Valid; 117 private bool m_Valid;
118 private SubType m_SubType = SubType.Code; 118 private SubType m_SubType = SubType.Code;
119 private CopyToOutput m_CopyToOutput = CopyToOutput.Never; 119 private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
120 private bool m_Link = false; 120 private bool m_Link = false;
121 121
122 122
123 #endregion 123 #endregion
124 124
125 #region Properties 125 #region Properties
126 126
127 /// <summary> 127 /// <summary>
128 /// 128 ///
129 /// </summary> 129 /// </summary>
130 public string Path 130 public string Path
131 { 131 {
132 get 132 get
133 { 133 {
134 return m_Path; 134 return m_Path;
135 } 135 }
136 } 136 }
137 137
138 /// <summary> 138 /// <summary>
139 /// 139 ///
140 /// </summary> 140 /// </summary>
141 public string ResourceName 141 public string ResourceName
142 { 142 {
143 get 143 get
144 { 144 {
145 return m_ResourceName; 145 return m_ResourceName;
146 } 146 }
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// 150 ///
151 /// </summary> 151 /// </summary>
152 public BuildAction BuildAction 152 public BuildAction BuildAction
153 { 153 {
154 get 154 get
155 { 155 {
156 return m_BuildAction; 156 return m_BuildAction;
157 } 157 }
158 } 158 }
159 159
160 public CopyToOutput CopyToOutput 160 public CopyToOutput CopyToOutput
161 { 161 {
162 get 162 get
163 { 163 {
164 return this.m_CopyToOutput; 164 return this.m_CopyToOutput;
165 } 165 }
166 } 166 }
167 167
168 public bool IsLink 168 public bool IsLink
169 { 169 {
170 get 170 get
171 { 171 {
172 return this.m_Link; 172 return this.m_Link;
173 } 173 }
174 } 174 }
175 175
176 /// <summary> 176 /// <summary>
177 /// 177 ///
178 /// </summary> 178 /// </summary>
179 public SubType SubType 179 public SubType SubType
180 { 180 {
181 get 181 get
182 { 182 {
183 return m_SubType; 183 return m_SubType;
184 } 184 }
185 } 185 }
186 186
187 /// <summary> 187 /// <summary>
188 /// 188 ///
189 /// </summary> 189 /// </summary>
190 public bool IsValid 190 public bool IsValid
191 { 191 {
192 get 192 get
193 { 193 {
194 return m_Valid; 194 return m_Valid;
195 } 195 }
196 } 196 }
197 197
198 #endregion 198 #endregion
199 199
200 #region Public Methods 200 #region Public Methods
201 201
202 /// <summary> 202 /// <summary>
203 /// 203 ///
204 /// </summary> 204 /// </summary>
205 /// <param name="node"></param> 205 /// <param name="node"></param>
206 public override void Parse(XmlNode node) 206 public override void Parse(XmlNode node)
207 { 207 {
208 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), 208 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
209 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString())); 209 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
210 m_SubType = (SubType)Enum.Parse(typeof(SubType), 210 m_SubType = (SubType)Enum.Parse(typeof(SubType),
211 Helper.AttributeValue(node, "subType", m_SubType.ToString())); 211 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
212 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); 212 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
213 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 213 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
214 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); 214 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
215 215
216 if( node == null ) 216 if( node == null )
217 { 217 {
218 throw new ArgumentNullException("node"); 218 throw new ArgumentNullException("node");
219 } 219 }
220 220
221 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 221 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
222 if(m_Path == null) 222 if(m_Path == null)
223 { 223 {
224 m_Path = ""; 224 m_Path = "";
225 } 225 }
226 226
227 m_Path = m_Path.Trim(); 227 m_Path = m_Path.Trim();
228 m_Valid = true; 228 m_Valid = true;
229 if(!File.Exists(m_Path)) 229 if(!File.Exists(m_Path))
230 { 230 {
231 m_Valid = false; 231 m_Valid = false;
232 Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); 232 Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path);
233 } 233 }
234 } 234 }
235 235
236 #endregion 236 #endregion
237 } 237 }
238} 238}
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs
index d31307b..05b2255 100644
--- a/Prebuild/src/Core/Nodes/FilesNode.cs
+++ b/Prebuild/src/Core/Nodes/FilesNode.cs
@@ -1,223 +1,223 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ 30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $ 31 * $Revision: 164 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.Xml; 38using System.Xml;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42 42
43namespace Prebuild.Core.Nodes 43namespace Prebuild.Core.Nodes
44{ 44{
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 [DataNode("Files")] 48 [DataNode("Files")]
49 public class FilesNode : DataNode 49 public class FilesNode : DataNode
50 { 50 {
51 #region Fields 51 #region Fields
52 52
53 private StringCollection m_Files; 53 private StringCollection m_Files;
54 private Hashtable m_BuildActions; 54 private Hashtable m_BuildActions;
55 private Hashtable m_SubTypes; 55 private Hashtable m_SubTypes;
56 private Hashtable m_ResourceNames; 56 private Hashtable m_ResourceNames;
57 private Hashtable m_CopyToOutputs; 57 private Hashtable m_CopyToOutputs;
58 private Hashtable m_Links; 58 private Hashtable m_Links;
59 59
60 60
61 #endregion 61 #endregion
62 62
63 #region Constructors 63 #region Constructors
64 64
65 /// <summary> 65 /// <summary>
66 /// 66 ///
67 /// </summary> 67 /// </summary>
68 public FilesNode() 68 public FilesNode()
69 { 69 {
70 m_Files = new StringCollection(); 70 m_Files = new StringCollection();
71 m_BuildActions = new Hashtable(); 71 m_BuildActions = new Hashtable();
72 m_SubTypes = new Hashtable(); 72 m_SubTypes = new Hashtable();
73 m_ResourceNames = new Hashtable(); 73 m_ResourceNames = new Hashtable();
74 m_CopyToOutputs = new Hashtable(); 74 m_CopyToOutputs = new Hashtable();
75 m_Links = new Hashtable(); 75 m_Links = new Hashtable();
76 } 76 }
77 77
78 #endregion 78 #endregion
79 79
80 #region Properties 80 #region Properties
81 81
82 /// <summary> 82 /// <summary>
83 /// 83 ///
84 /// </summary> 84 /// </summary>
85 public int Count 85 public int Count
86 { 86 {
87 get 87 get
88 { 88 {
89 return m_Files.Count; 89 return m_Files.Count;
90 } 90 }
91 } 91 }
92 92
93 #endregion 93 #endregion
94 94
95 #region Public Methods 95 #region Public Methods
96 96
97 /// <summary> 97 /// <summary>
98 /// 98 ///
99 /// </summary> 99 /// </summary>
100 /// <param name="file"></param> 100 /// <param name="file"></param>
101 /// <returns></returns> 101 /// <returns></returns>
102 public BuildAction GetBuildAction(string file) 102 public BuildAction GetBuildAction(string file)
103 { 103 {
104 if(!m_BuildActions.ContainsKey(file)) 104 if(!m_BuildActions.ContainsKey(file))
105 { 105 {
106 return BuildAction.Compile; 106 return BuildAction.Compile;
107 } 107 }
108 108
109 return (BuildAction)m_BuildActions[file]; 109 return (BuildAction)m_BuildActions[file];
110 } 110 }
111 111
112 public CopyToOutput GetCopyToOutput(string file) 112 public CopyToOutput GetCopyToOutput(string file)
113 { 113 {
114 if (!this.m_CopyToOutputs.ContainsKey(file)) 114 if (!this.m_CopyToOutputs.ContainsKey(file))
115 { 115 {
116 return CopyToOutput.Never; 116 return CopyToOutput.Never;
117 } 117 }
118 return (CopyToOutput) this.m_CopyToOutputs[file]; 118 return (CopyToOutput) this.m_CopyToOutputs[file];
119 } 119 }
120 120
121 public bool GetIsLink(string file) 121 public bool GetIsLink(string file)
122 { 122 {
123 if (!this.m_Links.ContainsKey(file)) 123 if (!this.m_Links.ContainsKey(file))
124 { 124 {
125 return false; 125 return false;
126 } 126 }
127 return (bool) this.m_Links[file]; 127 return (bool) this.m_Links[file];
128 } 128 }
129 129
130 /// <summary> 130 /// <summary>
131 /// 131 ///
132 /// </summary> 132 /// </summary>
133 /// <param name="file"></param> 133 /// <param name="file"></param>
134 /// <returns></returns> 134 /// <returns></returns>
135 public SubType GetSubType(string file) 135 public SubType GetSubType(string file)
136 { 136 {
137 if(!m_SubTypes.ContainsKey(file)) 137 if(!m_SubTypes.ContainsKey(file))
138 { 138 {
139 return SubType.Code; 139 return SubType.Code;
140 } 140 }
141 141
142 return (SubType)m_SubTypes[file]; 142 return (SubType)m_SubTypes[file];
143 } 143 }
144 144
145 /// <summary> 145 /// <summary>
146 /// 146 ///
147 /// </summary> 147 /// </summary>
148 /// <param name="file"></param> 148 /// <param name="file"></param>
149 /// <returns></returns> 149 /// <returns></returns>
150 public string GetResourceName(string file) 150 public string GetResourceName(string file)
151 { 151 {
152 if(!m_ResourceNames.ContainsKey(file)) 152 if(!m_ResourceNames.ContainsKey(file))
153 { 153 {
154 return ""; 154 return "";
155 } 155 }
156 156
157 return (string)m_ResourceNames[file]; 157 return (string)m_ResourceNames[file];
158 } 158 }
159 159
160 /// <summary> 160 /// <summary>
161 /// 161 ///
162 /// </summary> 162 /// </summary>
163 /// <param name="node"></param> 163 /// <param name="node"></param>
164 public override void Parse(XmlNode node) 164 public override void Parse(XmlNode node)
165 { 165 {
166 if( node == null ) 166 if( node == null )
167 { 167 {
168 throw new ArgumentNullException("node"); 168 throw new ArgumentNullException("node");
169 } 169 }
170 foreach(XmlNode child in node.ChildNodes) 170 foreach(XmlNode child in node.ChildNodes)
171 { 171 {
172 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 172 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
173 if(dataNode is FileNode) 173 if(dataNode is FileNode)
174 { 174 {
175 FileNode fileNode = (FileNode)dataNode; 175 FileNode fileNode = (FileNode)dataNode;
176 if(fileNode.IsValid) 176 if(fileNode.IsValid)
177 { 177 {
178 if (!m_Files.Contains(fileNode.Path)) 178 if (!m_Files.Contains(fileNode.Path))
179 { 179 {
180 m_Files.Add(fileNode.Path); 180 m_Files.Add(fileNode.Path);
181 m_BuildActions[fileNode.Path] = fileNode.BuildAction; 181 m_BuildActions[fileNode.Path] = fileNode.BuildAction;
182 m_SubTypes[fileNode.Path] = fileNode.SubType; 182 m_SubTypes[fileNode.Path] = fileNode.SubType;
183 m_ResourceNames[fileNode.Path] = fileNode.ResourceName; 183 m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
184 this.m_Links[fileNode.Path] = fileNode.IsLink; 184 this.m_Links[fileNode.Path] = fileNode.IsLink;
185 this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput; 185 this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput;
186 186
187 } 187 }
188 } 188 }
189 } 189 }
190 else if(dataNode is MatchNode) 190 else if(dataNode is MatchNode)
191 { 191 {
192 foreach(string file in ((MatchNode)dataNode).Files) 192 foreach(string file in ((MatchNode)dataNode).Files)
193 { 193 {
194 if (!m_Files.Contains(file)) 194 if (!m_Files.Contains(file))
195 { 195 {
196 m_Files.Add(file); 196 m_Files.Add(file);
197 m_BuildActions[file] = ((MatchNode)dataNode).BuildAction; 197 m_BuildActions[file] = ((MatchNode)dataNode).BuildAction;
198 m_SubTypes[file] = ((MatchNode)dataNode).SubType; 198 m_SubTypes[file] = ((MatchNode)dataNode).SubType;
199 m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName; 199 m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName;
200 this.m_Links[file] = ((MatchNode) dataNode).IsLink; 200 this.m_Links[file] = ((MatchNode) dataNode).IsLink;
201 this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput; 201 this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput;
202 202
203 } 203 }
204 } 204 }
205 } 205 }
206 } 206 }
207 } 207 }
208 208
209 // TODO: Check in to why StringCollection's enumerator doesn't implement 209 // TODO: Check in to why StringCollection's enumerator doesn't implement
210 // IEnumerator? 210 // IEnumerator?
211 /// <summary> 211 /// <summary>
212 /// 212 ///
213 /// </summary> 213 /// </summary>
214 /// <returns></returns> 214 /// <returns></returns>
215 public StringEnumerator GetEnumerator() 215 public StringEnumerator GetEnumerator()
216 { 216 {
217 return m_Files.GetEnumerator(); 217 return m_Files.GetEnumerator();
218 } 218 }
219 219
220 #endregion 220 #endregion
221 221
222 } 222 }
223} 223}
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs
index e0d2fa8..8d7b467 100644
--- a/Prebuild/src/Core/Nodes/MatchNode.cs
+++ b/Prebuild/src/Core/Nodes/MatchNode.cs
@@ -1,299 +1,299 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ 30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $ 31 * $Revision: 164 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections.Specialized; 36using System.Collections.Specialized;
37using System.IO; 37using System.IO;
38using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
39using System.Xml; 39using System.Xml;
40 40
41using Prebuild.Core.Attributes; 41using Prebuild.Core.Attributes;
42using Prebuild.Core.Interfaces; 42using Prebuild.Core.Interfaces;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild.Core.Nodes 45namespace Prebuild.Core.Nodes
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 [DataNode("Match")] 50 [DataNode("Match")]
51 public class MatchNode : DataNode 51 public class MatchNode : DataNode
52 { 52 {
53 #region Fields 53 #region Fields
54 54
55 private StringCollection m_Files; 55 private StringCollection m_Files;
56 private Regex m_Regex; 56 private Regex m_Regex;
57 private BuildAction m_BuildAction = BuildAction.Compile; 57 private BuildAction m_BuildAction = BuildAction.Compile;
58 private SubType m_SubType = SubType.Code; 58 private SubType m_SubType = SubType.Code;
59 string m_ResourceName = ""; 59 string m_ResourceName = "";
60 private CopyToOutput m_CopyToOutput; 60 private CopyToOutput m_CopyToOutput;
61 private bool m_Link; 61 private bool m_Link;
62 62
63 63
64 #endregion 64 #endregion
65 65
66 #region Constructors 66 #region Constructors
67 67
68 /// <summary> 68 /// <summary>
69 /// 69 ///
70 /// </summary> 70 /// </summary>
71 public MatchNode() 71 public MatchNode()
72 { 72 {
73 m_Files = new StringCollection(); 73 m_Files = new StringCollection();
74 } 74 }
75 75
76 #endregion 76 #endregion
77 77
78 #region Properties 78 #region Properties
79 79
80 /// <summary> 80 /// <summary>
81 /// 81 ///
82 /// </summary> 82 /// </summary>
83 public StringCollection Files 83 public StringCollection Files
84 { 84 {
85 get 85 get
86 { 86 {
87 return m_Files; 87 return m_Files;
88 } 88 }
89 } 89 }
90 90
91 /// <summary> 91 /// <summary>
92 /// 92 ///
93 /// </summary> 93 /// </summary>
94 public BuildAction BuildAction 94 public BuildAction BuildAction
95 { 95 {
96 get 96 get
97 { 97 {
98 return m_BuildAction; 98 return m_BuildAction;
99 } 99 }
100 } 100 }
101 101
102 /// <summary> 102 /// <summary>
103 /// 103 ///
104 /// </summary> 104 /// </summary>
105 public SubType SubType 105 public SubType SubType
106 { 106 {
107 get 107 get
108 { 108 {
109 return m_SubType; 109 return m_SubType;
110 } 110 }
111 } 111 }
112 112
113 public CopyToOutput CopyToOutput 113 public CopyToOutput CopyToOutput
114 { 114 {
115 get 115 get
116 { 116 {
117 return this.m_CopyToOutput; 117 return this.m_CopyToOutput;
118 } 118 }
119 } 119 }
120 120
121 public bool IsLink 121 public bool IsLink
122 { 122 {
123 get 123 get
124 { 124 {
125 return this.m_Link; 125 return this.m_Link;
126 } 126 }
127 } 127 }
128 128
129 /// <summary> 129 /// <summary>
130 /// 130 ///
131 /// </summary> 131 /// </summary>
132 public string ResourceName 132 public string ResourceName
133 { 133 {
134 get 134 get
135 { 135 {
136 return m_ResourceName; 136 return m_ResourceName;
137 } 137 }
138 } 138 }
139 139
140 140
141 #endregion 141 #endregion
142 142
143 #region Private Methods 143 #region Private Methods
144 144
145 /// <summary> 145 /// <summary>
146 /// Recurses the directories. 146 /// Recurses the directories.
147 /// </summary> 147 /// </summary>
148 /// <param name="path">The path.</param> 148 /// <param name="path">The path.</param>
149 /// <param name="pattern">The pattern.</param> 149 /// <param name="pattern">The pattern.</param>
150 /// <param name="recurse">if set to <c>true</c> [recurse].</param> 150 /// <param name="recurse">if set to <c>true</c> [recurse].</param>
151 /// <param name="useRegex">if set to <c>true</c> [use regex].</param> 151 /// <param name="useRegex">if set to <c>true</c> [use regex].</param>
152 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex) 152 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex)
153 { 153 {
154 try 154 try
155 { 155 {
156 string[] files; 156 string[] files;
157 157
158 if(!useRegex) 158 if(!useRegex)
159 { 159 {
160 files = Directory.GetFiles(path, pattern); 160 files = Directory.GetFiles(path, pattern);
161 if(files != null) 161 if(files != null)
162 { 162 {
163 string fileTemp; 163 string fileTemp;
164 foreach (string file in files) 164 foreach (string file in files)
165 { 165 {
166 if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") 166 if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
167 { 167 {
168 fileTemp = file.Substring(2); 168 fileTemp = file.Substring(2);
169 } 169 }
170 else 170 else
171 { 171 {
172 fileTemp = file; 172 fileTemp = file;
173 } 173 }
174 174
175 m_Files.Add(fileTemp); 175 m_Files.Add(fileTemp);
176 } 176 }
177 } 177 }
178 else 178 else
179 { 179 {
180 return; 180 return;
181 } 181 }
182 } 182 }
183 else 183 else
184 { 184 {
185 Match match; 185 Match match;
186 files = Directory.GetFiles(path); 186 files = Directory.GetFiles(path);
187 foreach(string file in files) 187 foreach(string file in files)
188 { 188 {
189 match = m_Regex.Match(file); 189 match = m_Regex.Match(file);
190 if(match.Success) 190 if(match.Success)
191 { 191 {
192 m_Files.Add(file); 192 m_Files.Add(file);
193 } 193 }
194 } 194 }
195 } 195 }
196 196
197 if(recurse) 197 if(recurse)
198 { 198 {
199 string[] dirs = Directory.GetDirectories(path); 199 string[] dirs = Directory.GetDirectories(path);
200 if(dirs != null && dirs.Length > 0) 200 if(dirs != null && dirs.Length > 0)
201 { 201 {
202 foreach(string str in dirs) 202 foreach(string str in dirs)
203 { 203 {
204 RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex); 204 RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex);
205 } 205 }
206 } 206 }
207 } 207 }
208 } 208 }
209 catch(DirectoryNotFoundException) 209 catch(DirectoryNotFoundException)
210 { 210 {
211 return; 211 return;
212 } 212 }
213 catch(ArgumentException) 213 catch(ArgumentException)
214 { 214 {
215 return; 215 return;
216 } 216 }
217 } 217 }
218 218
219 #endregion 219 #endregion
220 220
221 #region Public Methods 221 #region Public Methods
222 222
223 /// <summary> 223 /// <summary>
224 /// 224 ///
225 /// </summary> 225 /// </summary>
226 /// <param name="node"></param> 226 /// <param name="node"></param>
227 public override void Parse(XmlNode node) 227 public override void Parse(XmlNode node)
228 { 228 {
229 if( node == null ) 229 if( node == null )
230 { 230 {
231 throw new ArgumentNullException("node"); 231 throw new ArgumentNullException("node");
232 } 232 }
233 string path = Helper.AttributeValue(node, "path", "."); 233 string path = Helper.AttributeValue(node, "path", ".");
234 string pattern = Helper.AttributeValue(node, "pattern", "*"); 234 string pattern = Helper.AttributeValue(node, "pattern", "*");
235 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false")); 235 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
236 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false")); 236 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
237 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction), 237 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
238 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString())); 238 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
239 m_SubType = (SubType)Enum.Parse(typeof(SubType), 239 m_SubType = (SubType)Enum.Parse(typeof(SubType),
240 Helper.AttributeValue(node, "subType", m_SubType.ToString())); 240 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
241 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); 241 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
242 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); 242 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
243 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 243 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
244 244
245 245
246 if(path != null && path.Length == 0) 246 if(path != null && path.Length == 0)
247 { 247 {
248 path = ".";//use current directory 248 path = ".";//use current directory
249 } 249 }
250 //throw new WarningException("Match must have a 'path' attribute"); 250 //throw new WarningException("Match must have a 'path' attribute");
251 251
252 if(pattern == null) 252 if(pattern == null)
253 { 253 {
254 throw new WarningException("Match must have a 'pattern' attribute"); 254 throw new WarningException("Match must have a 'pattern' attribute");
255 } 255 }
256 256
257 path = Helper.NormalizePath(path); 257 path = Helper.NormalizePath(path);
258 if(!Directory.Exists(path)) 258 if(!Directory.Exists(path))
259 { 259 {
260 throw new WarningException("Match path does not exist: {0}", path); 260 throw new WarningException("Match path does not exist: {0}", path);
261 } 261 }
262 262
263 try 263 try
264 { 264 {
265 if(useRegex) 265 if(useRegex)
266 { 266 {
267 m_Regex = new Regex(pattern); 267 m_Regex = new Regex(pattern);
268 } 268 }
269 } 269 }
270 catch(ArgumentException ex) 270 catch(ArgumentException ex)
271 { 271 {
272 throw new WarningException("Could not compile regex pattern: {0}", ex.Message); 272 throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
273 } 273 }
274 274
275 RecurseDirectories(path, pattern, recurse, useRegex); 275 RecurseDirectories(path, pattern, recurse, useRegex);
276 276
277 foreach(XmlNode child in node.ChildNodes) 277 foreach(XmlNode child in node.ChildNodes)
278 { 278 {
279 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 279 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
280 if(dataNode is ExcludeNode) 280 if(dataNode is ExcludeNode)
281 { 281 {
282 ExcludeNode excludeNode = (ExcludeNode)dataNode; 282 ExcludeNode excludeNode = (ExcludeNode)dataNode;
283 if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name))) 283 if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name)))
284 { 284 {
285 m_Files.Remove(Helper.NormalizePath(excludeNode.Name)); 285 m_Files.Remove(Helper.NormalizePath(excludeNode.Name));
286 } 286 }
287 } 287 }
288 } 288 }
289 289
290 if(m_Files.Count < 1) 290 if(m_Files.Count < 1)
291 { 291 {
292 throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); 292 throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern);
293 } 293 }
294 m_Regex = null; 294 m_Regex = null;
295 } 295 }
296 296
297 #endregion 297 #endregion
298 } 298 }
299} 299}
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs
index b5a2f60..b7a784d 100644
--- a/Prebuild/src/Core/Nodes/OptionsNode.cs
+++ b/Prebuild/src/Core/Nodes/OptionsNode.cs
@@ -1,655 +1,655 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $ 30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
31 * $Revision: 197 $ 31 * $Revision: 197 $
32 */ 32 */
33#endregion 33#endregion
34 34
35 35
36 36
37using System; 37using System;
38using System.Collections; 38using System.Collections;
39using System.Collections.Specialized; 39using System.Collections.Specialized;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42 42
43using Prebuild.Core.Attributes; 43using Prebuild.Core.Attributes;
44using Prebuild.Core.Interfaces; 44using Prebuild.Core.Interfaces;
45using Prebuild.Core.Utilities; 45using Prebuild.Core.Utilities;
46 46
47namespace Prebuild.Core.Nodes 47namespace Prebuild.Core.Nodes
48{ 48{
49 /// <summary> 49 /// <summary>
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 [DataNode("Options")] 52 [DataNode("Options")]
53 public class OptionsNode : DataNode 53 public class OptionsNode : DataNode
54 { 54 {
55 #region Fields 55 #region Fields
56 56
57 private static Hashtable m_OptionFields; 57 private static Hashtable m_OptionFields;
58 58
59 [OptionNode("CompilerDefines")] 59 [OptionNode("CompilerDefines")]
60 private string m_CompilerDefines = ""; 60 private string m_CompilerDefines = "";
61 61
62 /// <summary> 62 /// <summary>
63 /// 63 ///
64 /// </summary> 64 /// </summary>
65 public string CompilerDefines 65 public string CompilerDefines
66 { 66 {
67 get 67 get
68 { 68 {
69 return m_CompilerDefines; 69 return m_CompilerDefines;
70 } 70 }
71 set 71 set
72 { 72 {
73 m_CompilerDefines = value; 73 m_CompilerDefines = value;
74 } 74 }
75 } 75 }
76 76
77 [OptionNode("OptimizeCode")] 77 [OptionNode("OptimizeCode")]
78 private bool m_OptimizeCode; 78 private bool m_OptimizeCode;
79 79
80 /// <summary> 80 /// <summary>
81 /// 81 ///
82 /// </summary> 82 /// </summary>
83 public bool OptimizeCode 83 public bool OptimizeCode
84 { 84 {
85 get 85 get
86 { 86 {
87 return m_OptimizeCode; 87 return m_OptimizeCode;
88 } 88 }
89 set 89 set
90 { 90 {
91 m_OptimizeCode = value; 91 m_OptimizeCode = value;
92 } 92 }
93 } 93 }
94 94
95 [OptionNode("CheckUnderflowOverflow")] 95 [OptionNode("CheckUnderflowOverflow")]
96 private bool m_CheckUnderflowOverflow; 96 private bool m_CheckUnderflowOverflow;
97 97
98 /// <summary> 98 /// <summary>
99 /// 99 ///
100 /// </summary> 100 /// </summary>
101 public bool CheckUnderflowOverflow 101 public bool CheckUnderflowOverflow
102 { 102 {
103 get 103 get
104 { 104 {
105 return m_CheckUnderflowOverflow; 105 return m_CheckUnderflowOverflow;
106 } 106 }
107 set 107 set
108 { 108 {
109 m_CheckUnderflowOverflow = value; 109 m_CheckUnderflowOverflow = value;
110 } 110 }
111 } 111 }
112 112
113 [OptionNode("AllowUnsafe")] 113 [OptionNode("AllowUnsafe")]
114 private bool m_AllowUnsafe; 114 private bool m_AllowUnsafe;
115 115
116 /// <summary> 116 /// <summary>
117 /// 117 ///
118 /// </summary> 118 /// </summary>
119 public bool AllowUnsafe 119 public bool AllowUnsafe
120 { 120 {
121 get 121 get
122 { 122 {
123 return m_AllowUnsafe; 123 return m_AllowUnsafe;
124 } 124 }
125 set 125 set
126 { 126 {
127 m_AllowUnsafe = value; 127 m_AllowUnsafe = value;
128 } 128 }
129 } 129 }
130 130
131 [OptionNode("PreBuildEvent")] 131 [OptionNode("PreBuildEvent")]
132 private string m_PreBuildEvent; 132 private string m_PreBuildEvent;
133 133
134 /// <summary> 134 /// <summary>
135 /// 135 ///
136 /// </summary> 136 /// </summary>
137 public string PreBuildEvent 137 public string PreBuildEvent
138 { 138 {
139 get 139 get
140 { 140 {
141 return m_PreBuildEvent; 141 return m_PreBuildEvent;
142 } 142 }
143 set 143 set
144 { 144 {
145 m_PreBuildEvent = value; 145 m_PreBuildEvent = value;
146 } 146 }
147 } 147 }
148 148
149 [OptionNode("PostBuildEvent")] 149 [OptionNode("PostBuildEvent")]
150 private string m_PostBuildEvent; 150 private string m_PostBuildEvent;
151 151
152 /// <summary> 152 /// <summary>
153 /// 153 ///
154 /// </summary> 154 /// </summary>
155 public string PostBuildEvent 155 public string PostBuildEvent
156 { 156 {
157 get 157 get
158 { 158 {
159 return m_PostBuildEvent; 159 return m_PostBuildEvent;
160 } 160 }
161 set 161 set
162 { 162 {
163 m_PostBuildEvent = value; 163 m_PostBuildEvent = value;
164 } 164 }
165 } 165 }
166 166
167 [OptionNode("PreBuildEventArgs")] 167 [OptionNode("PreBuildEventArgs")]
168 private string m_PreBuildEventArgs; 168 private string m_PreBuildEventArgs;
169 169
170 /// <summary> 170 /// <summary>
171 /// 171 ///
172 /// </summary> 172 /// </summary>
173 public string PreBuildEventArgs 173 public string PreBuildEventArgs
174 { 174 {
175 get 175 get
176 { 176 {
177 return m_PreBuildEventArgs; 177 return m_PreBuildEventArgs;
178 } 178 }
179 set 179 set
180 { 180 {
181 m_PreBuildEventArgs = value; 181 m_PreBuildEventArgs = value;
182 } 182 }
183 } 183 }
184 184
185 [OptionNode("PostBuildEventArgs")] 185 [OptionNode("PostBuildEventArgs")]
186 private string m_PostBuildEventArgs; 186 private string m_PostBuildEventArgs;
187 187
188 /// <summary> 188 /// <summary>
189 /// 189 ///
190 /// </summary> 190 /// </summary>
191 public string PostBuildEventArgs 191 public string PostBuildEventArgs
192 { 192 {
193 get 193 get
194 { 194 {
195 return m_PostBuildEventArgs; 195 return m_PostBuildEventArgs;
196 } 196 }
197 set 197 set
198 { 198 {
199 m_PostBuildEventArgs = value; 199 m_PostBuildEventArgs = value;
200 } 200 }
201 } 201 }
202 202
203 [OptionNode("RunPostBuildEvent")] 203 [OptionNode("RunPostBuildEvent")]
204 private string m_RunPostBuildEvent; 204 private string m_RunPostBuildEvent;
205 205
206 /// <summary> 206 /// <summary>
207 /// 207 ///
208 /// </summary> 208 /// </summary>
209 public string RunPostBuildEvent 209 public string RunPostBuildEvent
210 { 210 {
211 get 211 get
212 { 212 {
213 return m_RunPostBuildEvent; 213 return m_RunPostBuildEvent;
214 } 214 }
215 set 215 set
216 { 216 {
217 m_RunPostBuildEvent = value; 217 m_RunPostBuildEvent = value;
218 } 218 }
219 } 219 }
220 220
221 [OptionNode("RunScript")] 221 [OptionNode("RunScript")]
222 private string m_RunScript; 222 private string m_RunScript;
223 223
224 /// <summary> 224 /// <summary>
225 /// 225 ///
226 /// </summary> 226 /// </summary>
227 public string RunScript 227 public string RunScript
228 { 228 {
229 get 229 get
230 { 230 {
231 return m_RunScript; 231 return m_RunScript;
232 } 232 }
233 set 233 set
234 { 234 {
235 m_RunScript = value; 235 m_RunScript = value;
236 } 236 }
237 } 237 }
238 238
239 [OptionNode("WarningLevel")] 239 [OptionNode("WarningLevel")]
240 private int m_WarningLevel = 4; 240 private int m_WarningLevel = 4;
241 241
242 /// <summary> 242 /// <summary>
243 /// 243 ///
244 /// </summary> 244 /// </summary>
245 public int WarningLevel 245 public int WarningLevel
246 { 246 {
247 get 247 get
248 { 248 {
249 return m_WarningLevel; 249 return m_WarningLevel;
250 } 250 }
251 set 251 set
252 { 252 {
253 m_WarningLevel = value; 253 m_WarningLevel = value;
254 } 254 }
255 } 255 }
256 256
257 [OptionNode("WarningsAsErrors")] 257 [OptionNode("WarningsAsErrors")]
258 private bool m_WarningsAsErrors; 258 private bool m_WarningsAsErrors;
259 259
260 /// <summary> 260 /// <summary>
261 /// 261 ///
262 /// </summary> 262 /// </summary>
263 public bool WarningsAsErrors 263 public bool WarningsAsErrors
264 { 264 {
265 get 265 get
266 { 266 {
267 return m_WarningsAsErrors; 267 return m_WarningsAsErrors;
268 } 268 }
269 set 269 set
270 { 270 {
271 m_WarningsAsErrors = value; 271 m_WarningsAsErrors = value;
272 } 272 }
273 } 273 }
274 274
275 [OptionNode("SuppressWarnings")] 275 [OptionNode("SuppressWarnings")]
276 private string m_SuppressWarnings = ""; 276 private string m_SuppressWarnings = "";
277 277
278 /// <summary> 278 /// <summary>
279 /// 279 ///
280 /// </summary> 280 /// </summary>
281 public string SuppressWarnings 281 public string SuppressWarnings
282 { 282 {
283 get 283 get
284 { 284 {
285 return m_SuppressWarnings; 285 return m_SuppressWarnings;
286 } 286 }
287 set 287 set
288 { 288 {
289 m_SuppressWarnings = value; 289 m_SuppressWarnings = value;
290 } 290 }
291 } 291 }
292 292
293 [OptionNode("OutputPath")] 293 [OptionNode("OutputPath")]
294 private string m_OutputPath = "bin/"; 294 private string m_OutputPath = "bin/";
295 295
296 /// <summary> 296 /// <summary>
297 /// 297 ///
298 /// </summary> 298 /// </summary>
299 public string OutputPath 299 public string OutputPath
300 { 300 {
301 get 301 get
302 { 302 {
303 return m_OutputPath; 303 return m_OutputPath;
304 } 304 }
305 set 305 set
306 { 306 {
307 m_OutputPath = value; 307 m_OutputPath = value;
308 } 308 }
309 } 309 }
310 310
311 [OptionNode("GenerateDocumentation")] 311 [OptionNode("GenerateDocumentation")]
312 private bool m_GenerateDocumentation; 312 private bool m_GenerateDocumentation;
313 313
314 /// <summary> 314 /// <summary>
315 /// 315 ///
316 /// </summary> 316 /// </summary>
317 public bool GenerateDocumentation 317 public bool GenerateDocumentation
318 { 318 {
319 get 319 get
320 { 320 {
321 return m_GenerateDocumentation; 321 return m_GenerateDocumentation;
322 } 322 }
323 set 323 set
324 { 324 {
325 m_GenerateDocumentation = value; 325 m_GenerateDocumentation = value;
326 } 326 }
327 } 327 }
328 328
329 [OptionNode("GenerateXmlDocFile")] 329 [OptionNode("GenerateXmlDocFile")]
330 private bool m_GenerateXmlDocFile; 330 private bool m_GenerateXmlDocFile;
331 331
332 /// <summary> 332 /// <summary>
333 /// 333 ///
334 /// </summary> 334 /// </summary>
335 public bool GenerateXmlDocFile 335 public bool GenerateXmlDocFile
336 { 336 {
337 get 337 get
338 { 338 {
339 return m_GenerateXmlDocFile; 339 return m_GenerateXmlDocFile;
340 } 340 }
341 set 341 set
342 { 342 {
343 m_GenerateXmlDocFile = value; 343 m_GenerateXmlDocFile = value;
344 } 344 }
345 } 345 }
346 346
347 [OptionNode("XmlDocFile")] 347 [OptionNode("XmlDocFile")]
348 private string m_XmlDocFile = ""; 348 private string m_XmlDocFile = "";
349 349
350 /// <summary> 350 /// <summary>
351 /// 351 ///
352 /// </summary> 352 /// </summary>
353 public string XmlDocFile 353 public string XmlDocFile
354 { 354 {
355 get 355 get
356 { 356 {
357 return m_XmlDocFile; 357 return m_XmlDocFile;
358 } 358 }
359 set 359 set
360 { 360 {
361 m_XmlDocFile = value; 361 m_XmlDocFile = value;
362 } 362 }
363 } 363 }
364 364
365 [OptionNode("KeyFile")] 365 [OptionNode("KeyFile")]
366 private string m_KeyFile = ""; 366 private string m_KeyFile = "";
367 367
368 /// <summary> 368 /// <summary>
369 /// 369 ///
370 /// </summary> 370 /// </summary>
371 public string KeyFile 371 public string KeyFile
372 { 372 {
373 get 373 get
374 { 374 {
375 return m_KeyFile; 375 return m_KeyFile;
376 } 376 }
377 set 377 set
378 { 378 {
379 m_KeyFile = value; 379 m_KeyFile = value;
380 } 380 }
381 } 381 }
382 382
383 [OptionNode("DebugInformation")] 383 [OptionNode("DebugInformation")]
384 private bool m_DebugInformation; 384 private bool m_DebugInformation;
385 385
386 /// <summary> 386 /// <summary>
387 /// 387 ///
388 /// </summary> 388 /// </summary>
389 public bool DebugInformation 389 public bool DebugInformation
390 { 390 {
391 get 391 get
392 { 392 {
393 return m_DebugInformation; 393 return m_DebugInformation;
394 } 394 }
395 set 395 set
396 { 396 {
397 m_DebugInformation = value; 397 m_DebugInformation = value;
398 } 398 }
399 } 399 }
400 400
401 [OptionNode("RegisterComInterop")] 401 [OptionNode("RegisterComInterop")]
402 private bool m_RegisterComInterop; 402 private bool m_RegisterComInterop;
403 403
404 /// <summary> 404 /// <summary>
405 /// 405 ///
406 /// </summary> 406 /// </summary>
407 public bool RegisterComInterop 407 public bool RegisterComInterop
408 { 408 {
409 get 409 get
410 { 410 {
411 return m_RegisterComInterop; 411 return m_RegisterComInterop;
412 } 412 }
413 set 413 set
414 { 414 {
415 m_RegisterComInterop = value; 415 m_RegisterComInterop = value;
416 } 416 }
417 } 417 }
418 418
419 [OptionNode("RemoveIntegerChecks")] 419 [OptionNode("RemoveIntegerChecks")]
420 private bool m_RemoveIntegerChecks; 420 private bool m_RemoveIntegerChecks;
421 421
422 /// <summary> 422 /// <summary>
423 /// 423 ///
424 /// </summary> 424 /// </summary>
425 public bool RemoveIntegerChecks 425 public bool RemoveIntegerChecks
426 { 426 {
427 get 427 get
428 { 428 {
429 return m_RemoveIntegerChecks; 429 return m_RemoveIntegerChecks;
430 } 430 }
431 set 431 set
432 { 432 {
433 m_RemoveIntegerChecks = value; 433 m_RemoveIntegerChecks = value;
434 } 434 }
435 } 435 }
436 436
437 [OptionNode("IncrementalBuild")] 437 [OptionNode("IncrementalBuild")]
438 private bool m_IncrementalBuild; 438 private bool m_IncrementalBuild;
439 439
440 /// <summary> 440 /// <summary>
441 /// 441 ///
442 /// </summary> 442 /// </summary>
443 public bool IncrementalBuild 443 public bool IncrementalBuild
444 { 444 {
445 get 445 get
446 { 446 {
447 return m_IncrementalBuild; 447 return m_IncrementalBuild;
448 } 448 }
449 set 449 set
450 { 450 {
451 m_IncrementalBuild = value; 451 m_IncrementalBuild = value;
452 } 452 }
453 } 453 }
454 454
455 [OptionNode("BaseAddress")] 455 [OptionNode("BaseAddress")]
456 private string m_BaseAddress = "285212672"; 456 private string m_BaseAddress = "285212672";
457 457
458 /// <summary> 458 /// <summary>
459 /// 459 ///
460 /// </summary> 460 /// </summary>
461 public string BaseAddress 461 public string BaseAddress
462 { 462 {
463 get 463 get
464 { 464 {
465 return m_BaseAddress; 465 return m_BaseAddress;
466 } 466 }
467 set 467 set
468 { 468 {
469 m_BaseAddress = value; 469 m_BaseAddress = value;
470 } 470 }
471 } 471 }
472 472
473 [OptionNode("FileAlignment")] 473 [OptionNode("FileAlignment")]
474 private int m_FileAlignment = 4096; 474 private int m_FileAlignment = 4096;
475 475
476 /// <summary> 476 /// <summary>
477 /// 477 ///
478 /// </summary> 478 /// </summary>
479 public int FileAlignment 479 public int FileAlignment
480 { 480 {
481 get 481 get
482 { 482 {
483 return m_FileAlignment; 483 return m_FileAlignment;
484 } 484 }
485 set 485 set
486 { 486 {
487 m_FileAlignment = value; 487 m_FileAlignment = value;
488 } 488 }
489 } 489 }
490 490
491 [OptionNode("NoStdLib")] 491 [OptionNode("NoStdLib")]
492 private bool m_NoStdLib; 492 private bool m_NoStdLib;
493 493
494 /// <summary> 494 /// <summary>
495 /// 495 ///
496 /// </summary> 496 /// </summary>
497 public bool NoStdLib 497 public bool NoStdLib
498 { 498 {
499 get 499 get
500 { 500 {
501 return m_NoStdLib; 501 return m_NoStdLib;
502 } 502 }
503 set 503 set
504 { 504 {
505 m_NoStdLib = value; 505 m_NoStdLib = value;
506 } 506 }
507 } 507 }
508 508
509 private StringCollection m_FieldsDefined; 509 private StringCollection m_FieldsDefined;
510 510
511 #endregion 511 #endregion
512 512
513 #region Constructors 513 #region Constructors
514 514
515 /// <summary> 515 /// <summary>
516 /// Initializes the <see cref="OptionsNode"/> class. 516 /// Initializes the <see cref="OptionsNode"/> class.
517 /// </summary> 517 /// </summary>
518 static OptionsNode() 518 static OptionsNode()
519 { 519 {
520 Type t = typeof(OptionsNode); 520 Type t = typeof(OptionsNode);
521 521
522 m_OptionFields = new Hashtable(); 522 m_OptionFields = new Hashtable();
523 foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) 523 foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance))
524 { 524 {
525 object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); 525 object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false);
526 if(attrs == null || attrs.Length < 1) 526 if(attrs == null || attrs.Length < 1)
527 { 527 {
528 continue; 528 continue;
529 } 529 }
530 530
531 OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0]; 531 OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0];
532 m_OptionFields[ona.NodeName] = f; 532 m_OptionFields[ona.NodeName] = f;
533 } 533 }
534 } 534 }
535 535
536 /// <summary> 536 /// <summary>
537 /// Initializes a new instance of the <see cref="OptionsNode"/> class. 537 /// Initializes a new instance of the <see cref="OptionsNode"/> class.
538 /// </summary> 538 /// </summary>
539 public OptionsNode() 539 public OptionsNode()
540 { 540 {
541 m_FieldsDefined = new StringCollection(); 541 m_FieldsDefined = new StringCollection();
542 } 542 }
543 543
544 #endregion 544 #endregion
545 545
546 #region Properties 546 #region Properties
547 547
548 /// <summary> 548 /// <summary>
549 /// Gets the <see cref="Object"/> at the specified index. 549 /// Gets the <see cref="Object"/> at the specified index.
550 /// </summary> 550 /// </summary>
551 /// <value></value> 551 /// <value></value>
552 public object this[string index] 552 public object this[string index]
553 { 553 {
554 get 554 get
555 { 555 {
556 if(!m_OptionFields.ContainsKey(index)) 556 if(!m_OptionFields.ContainsKey(index))
557 { 557 {
558 return null; 558 return null;
559 } 559 }
560 560
561 FieldInfo f = (FieldInfo)m_OptionFields[index]; 561 FieldInfo f = (FieldInfo)m_OptionFields[index];
562 return f.GetValue(this); 562 return f.GetValue(this);
563 } 563 }
564 } 564 }
565 565
566 /// <summary> 566 /// <summary>
567 /// Gets the <see cref="Object"/> at the specified index. 567 /// Gets the <see cref="Object"/> at the specified index.
568 /// </summary> 568 /// </summary>
569 /// <value></value> 569 /// <value></value>
570 public object this[string index, object defaultValue] 570 public object this[string index, object defaultValue]
571 { 571 {
572 get 572 get
573 { 573 {
574 object valueObject = this[index]; 574 object valueObject = this[index];
575 if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0) 575 if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0)
576 { 576 {
577 return defaultValue; 577 return defaultValue;
578 } 578 }
579 return valueObject; 579 return valueObject;
580 } 580 }
581 } 581 }
582 582
583 583
584 #endregion 584 #endregion
585 585
586 #region Private Methods 586 #region Private Methods
587 587
588 private void FlagDefined(string name) 588 private void FlagDefined(string name)
589 { 589 {
590 if(!m_FieldsDefined.Contains(name)) 590 if(!m_FieldsDefined.Contains(name))
591 { 591 {
592 m_FieldsDefined.Add(name); 592 m_FieldsDefined.Add(name);
593 } 593 }
594 } 594 }
595 595
596 private void SetOption(string nodeName, string val) 596 private void SetOption(string nodeName, string val)
597 { 597 {
598 lock(m_OptionFields) 598 lock(m_OptionFields)
599 { 599 {
600 if(!m_OptionFields.ContainsKey(nodeName)) 600 if(!m_OptionFields.ContainsKey(nodeName))
601 { 601 {
602 return; 602 return;
603 } 603 }
604 604
605 FieldInfo f = (FieldInfo)m_OptionFields[nodeName]; 605 FieldInfo f = (FieldInfo)m_OptionFields[nodeName];
606 f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); 606 f.SetValue(this, Helper.TranslateValue(f.FieldType, val));
607 FlagDefined(f.Name); 607 FlagDefined(f.Name);
608 } 608 }
609 } 609 }
610 610
611 #endregion 611 #endregion
612 612
613 #region Public Methods 613 #region Public Methods
614 614
615 /// <summary> 615 /// <summary>
616 /// Parses the specified node. 616 /// Parses the specified node.
617 /// </summary> 617 /// </summary>
618 /// <param name="node">The node.</param> 618 /// <param name="node">The node.</param>
619 public override void Parse(XmlNode node) 619 public override void Parse(XmlNode node)
620 { 620 {
621 if( node == null ) 621 if( node == null )
622 { 622 {
623 throw new ArgumentNullException("node"); 623 throw new ArgumentNullException("node");
624 } 624 }
625 625
626 foreach(XmlNode child in node.ChildNodes) 626 foreach(XmlNode child in node.ChildNodes)
627 { 627 {
628 SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText)); 628 SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText));
629 } 629 }
630 } 630 }
631 631
632 /// <summary> 632 /// <summary>
633 /// Copies to. 633 /// Copies to.
634 /// </summary> 634 /// </summary>
635 /// <param name="opt">The opt.</param> 635 /// <param name="opt">The opt.</param>
636 public void CopyTo(OptionsNode opt) 636 public void CopyTo(OptionsNode opt)
637 { 637 {
638 if(opt == null) 638 if(opt == null)
639 { 639 {
640 return; 640 return;
641 } 641 }
642 642
643 foreach(FieldInfo f in m_OptionFields.Values) 643 foreach(FieldInfo f in m_OptionFields.Values)
644 { 644 {
645 if(m_FieldsDefined.Contains(f.Name)) 645 if(m_FieldsDefined.Contains(f.Name))
646 { 646 {
647 f.SetValue(opt, f.GetValue(this)); 647 f.SetValue(opt, f.GetValue(this));
648 opt.m_FieldsDefined.Add(f.Name); 648 opt.m_FieldsDefined.Add(f.Name);
649 } 649 }
650 } 650 }
651 } 651 }
652 652
653 #endregion 653 #endregion
654 } 654 }
655} 655}
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs
index f546a4b..5f3dbe6 100644
--- a/Prebuild/src/Core/Nodes/ProcessNode.cs
+++ b/Prebuild/src/Core/Nodes/ProcessNode.cs
@@ -1,119 +1,119 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.Xml; 38using System.Xml;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities; 42using Prebuild.Core.Utilities;
43 43
44namespace Prebuild.Core.Nodes 44namespace Prebuild.Core.Nodes
45{ 45{
46 /// <summary> 46 /// <summary>
47 /// 47 ///
48 /// </summary> 48 /// </summary>
49 [DataNode("Process")] 49 [DataNode("Process")]
50 public class ProcessNode : DataNode 50 public class ProcessNode : DataNode
51 { 51 {
52 #region Fields 52 #region Fields
53 53
54 private string m_Path; 54 private string m_Path;
55 private bool m_IsValid = true; 55 private bool m_IsValid = true;
56 56
57 #endregion 57 #endregion
58 58
59 #region Properties 59 #region Properties
60 60
61 /// <summary> 61 /// <summary>
62 /// Gets the path. 62 /// Gets the path.
63 /// </summary> 63 /// </summary>
64 /// <value>The path.</value> 64 /// <value>The path.</value>
65 public string Path 65 public string Path
66 { 66 {
67 get 67 get
68 { 68 {
69 return m_Path; 69 return m_Path;
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Gets a value indicating whether this instance is valid. 74 /// Gets a value indicating whether this instance is valid.
75 /// </summary> 75 /// </summary>
76 /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value> 76 /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
77 public bool IsValid 77 public bool IsValid
78 { 78 {
79 get 79 get
80 { 80 {
81 return m_IsValid; 81 return m_IsValid;
82 } 82 }
83 } 83 }
84 84
85 #endregion 85 #endregion
86 86
87 #region Public Methods 87 #region Public Methods
88 88
89 /// <summary> 89 /// <summary>
90 /// Parses the specified node. 90 /// Parses the specified node.
91 /// </summary> 91 /// </summary>
92 /// <param name="node">The node.</param> 92 /// <param name="node">The node.</param>
93 public override void Parse(XmlNode node) 93 public override void Parse(XmlNode node)
94 { 94 {
95 if( node == null ) 95 if( node == null )
96 { 96 {
97 throw new ArgumentNullException("node"); 97 throw new ArgumentNullException("node");
98 } 98 }
99 99
100 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 100 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
101 if(m_Path == null) 101 if(m_Path == null)
102 { 102 {
103 m_Path = ""; 103 m_Path = "";
104 } 104 }
105 105
106 try 106 try
107 { 107 {
108 m_Path = Helper.ResolvePath(m_Path); 108 m_Path = Helper.ResolvePath(m_Path);
109 } 109 }
110 catch(ArgumentException) 110 catch(ArgumentException)
111 { 111 {
112 Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path); 112 Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path);
113 m_IsValid = false; 113 m_IsValid = false;
114 } 114 }
115 } 115 }
116 116
117 #endregion 117 #endregion
118 } 118 }
119} 119}
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs
index c56dacc..bddaace 100644
--- a/Prebuild/src/Core/Nodes/ProjectNode.cs
+++ b/Prebuild/src/Core/Nodes/ProjectNode.cs
@@ -1,510 +1,510 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $ 30 * $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $
31 * $Revision: 192 $ 31 * $Revision: 192 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.IO; 37using System.IO;
38using System.Xml; 38using System.Xml;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities; 42using Prebuild.Core.Utilities;
43 43
44namespace Prebuild.Core.Nodes 44namespace Prebuild.Core.Nodes
45{ 45{
46 /// <summary> 46 /// <summary>
47 /// 47 ///
48 /// </summary> 48 /// </summary>
49 public enum ProjectType 49 public enum ProjectType
50 { 50 {
51 /// <summary> 51 /// <summary>
52 /// 52 ///
53 /// </summary> 53 /// </summary>
54 Exe, 54 Exe,
55 /// <summary> 55 /// <summary>
56 /// 56 ///
57 /// </summary> 57 /// </summary>
58 WinExe, 58 WinExe,
59 /// <summary> 59 /// <summary>
60 /// 60 ///
61 /// </summary> 61 /// </summary>
62 Library 62 Library
63 } 63 }
64 64
65 /// <summary> 65 /// <summary>
66 /// 66 ///
67 /// </summary> 67 /// </summary>
68 public enum ClrRuntime 68 public enum ClrRuntime
69 { 69 {
70 /// <summary> 70 /// <summary>
71 /// 71 ///
72 /// </summary> 72 /// </summary>
73 Microsoft, 73 Microsoft,
74 /// <summary> 74 /// <summary>
75 /// 75 ///
76 /// </summary> 76 /// </summary>
77 Mono 77 Mono
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// 81 ///
82 /// </summary> 82 /// </summary>
83 [DataNode("Project")] 83 [DataNode("Project")]
84 public class ProjectNode : DataNode, IComparable 84 public class ProjectNode : DataNode, IComparable
85 { 85 {
86 #region Fields 86 #region Fields
87 87
88 private string m_Name = "unknown"; 88 private string m_Name = "unknown";
89 private string m_Path = ""; 89 private string m_Path = "";
90 private string m_FullPath = ""; 90 private string m_FullPath = "";
91 private string m_AssemblyName; 91 private string m_AssemblyName;
92 private string m_AppIcon = ""; 92 private string m_AppIcon = "";
93 private string m_DesignerFolder = ""; 93 private string m_DesignerFolder = "";
94 private string m_Language = "C#"; 94 private string m_Language = "C#";
95 private ProjectType m_Type = ProjectType.Exe; 95 private ProjectType m_Type = ProjectType.Exe;
96 private ClrRuntime m_Runtime = ClrRuntime.Microsoft; 96 private ClrRuntime m_Runtime = ClrRuntime.Microsoft;
97 private string m_StartupObject = ""; 97 private string m_StartupObject = "";
98 private string m_RootNamespace; 98 private string m_RootNamespace;
99 private string m_FilterGroups = ""; 99 private string m_FilterGroups = "";
100 private Guid m_Guid; 100 private Guid m_Guid;
101 101
102 private Hashtable m_Configurations; 102 private Hashtable m_Configurations;
103 private ArrayList m_ReferencePaths; 103 private ArrayList m_ReferencePaths;
104 private ArrayList m_References; 104 private ArrayList m_References;
105 private FilesNode m_Files; 105 private FilesNode m_Files;
106 106
107 #endregion 107 #endregion
108 108
109 #region Constructors 109 #region Constructors
110 110
111 /// <summary> 111 /// <summary>
112 /// Initializes a new instance of the <see cref="ProjectNode"/> class. 112 /// Initializes a new instance of the <see cref="ProjectNode"/> class.
113 /// </summary> 113 /// </summary>
114 public ProjectNode() 114 public ProjectNode()
115 { 115 {
116 m_Configurations = new Hashtable(); 116 m_Configurations = new Hashtable();
117 m_ReferencePaths = new ArrayList(); 117 m_ReferencePaths = new ArrayList();
118 m_References = new ArrayList(); 118 m_References = new ArrayList();
119 } 119 }
120 120
121 #endregion 121 #endregion
122 122
123 #region Properties 123 #region Properties
124 124
125 /// <summary> 125 /// <summary>
126 /// Gets the name. 126 /// Gets the name.
127 /// </summary> 127 /// </summary>
128 /// <value>The name.</value> 128 /// <value>The name.</value>
129 public string Name 129 public string Name
130 { 130 {
131 get 131 get
132 { 132 {
133 return m_Name; 133 return m_Name;
134 } 134 }
135 } 135 }
136 136
137 /// <summary> 137 /// <summary>
138 /// Gets the path. 138 /// Gets the path.
139 /// </summary> 139 /// </summary>
140 /// <value>The path.</value> 140 /// <value>The path.</value>
141 public string Path 141 public string Path
142 { 142 {
143 get 143 get
144 { 144 {
145 return m_Path; 145 return m_Path;
146 } 146 }
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// Gets the filter groups. 150 /// Gets the filter groups.
151 /// </summary> 151 /// </summary>
152 /// <value>The filter groups.</value> 152 /// <value>The filter groups.</value>
153 public string FilterGroups 153 public string FilterGroups
154 { 154 {
155 get 155 get
156 { 156 {
157 return m_FilterGroups; 157 return m_FilterGroups;
158 } 158 }
159 } 159 }
160 160
161 /// <summary> 161 /// <summary>
162 /// Gets the full path. 162 /// Gets the full path.
163 /// </summary> 163 /// </summary>
164 /// <value>The full path.</value> 164 /// <value>The full path.</value>
165 public string FullPath 165 public string FullPath
166 { 166 {
167 get 167 get
168 { 168 {
169 return m_FullPath; 169 return m_FullPath;
170 } 170 }
171 } 171 }
172 172
173 /// <summary> 173 /// <summary>
174 /// Gets the name of the assembly. 174 /// Gets the name of the assembly.
175 /// </summary> 175 /// </summary>
176 /// <value>The name of the assembly.</value> 176 /// <value>The name of the assembly.</value>
177 public string AssemblyName 177 public string AssemblyName
178 { 178 {
179 get 179 get
180 { 180 {
181 return m_AssemblyName; 181 return m_AssemblyName;
182 } 182 }
183 } 183 }
184 184
185 /// <summary> 185 /// <summary>
186 /// Gets the app icon. 186 /// Gets the app icon.
187 /// </summary> 187 /// </summary>
188 /// <value>The app icon.</value> 188 /// <value>The app icon.</value>
189 public string AppIcon 189 public string AppIcon
190 { 190 {
191 get 191 get
192 { 192 {
193 return m_AppIcon; 193 return m_AppIcon;
194 } 194 }
195 } 195 }
196 196
197 /// <summary> 197 /// <summary>
198 /// 198 ///
199 /// </summary> 199 /// </summary>
200 public string DesignerFolder 200 public string DesignerFolder
201 { 201 {
202 get 202 get
203 { 203 {
204 return m_DesignerFolder; 204 return m_DesignerFolder;
205 } 205 }
206 } 206 }
207 207
208 /// <summary> 208 /// <summary>
209 /// Gets the language. 209 /// Gets the language.
210 /// </summary> 210 /// </summary>
211 /// <value>The language.</value> 211 /// <value>The language.</value>
212 public string Language 212 public string Language
213 { 213 {
214 get 214 get
215 { 215 {
216 return m_Language; 216 return m_Language;
217 } 217 }
218 } 218 }
219 219
220 /// <summary> 220 /// <summary>
221 /// Gets the type. 221 /// Gets the type.
222 /// </summary> 222 /// </summary>
223 /// <value>The type.</value> 223 /// <value>The type.</value>
224 public ProjectType Type 224 public ProjectType Type
225 { 225 {
226 get 226 get
227 { 227 {
228 return m_Type; 228 return m_Type;
229 } 229 }
230 } 230 }
231 231
232 /// <summary> 232 /// <summary>
233 /// Gets the runtime. 233 /// Gets the runtime.
234 /// </summary> 234 /// </summary>
235 /// <value>The runtime.</value> 235 /// <value>The runtime.</value>
236 public ClrRuntime Runtime 236 public ClrRuntime Runtime
237 { 237 {
238 get 238 get
239 { 239 {
240 return m_Runtime; 240 return m_Runtime;
241 } 241 }
242 } 242 }
243 243
244 private bool m_GenerateAssemblyInfoFile = false; 244 private bool m_GenerateAssemblyInfoFile = false;
245 245
246 /// <summary> 246 /// <summary>
247 /// 247 ///
248 /// </summary> 248 /// </summary>
249 public bool GenerateAssemblyInfoFile 249 public bool GenerateAssemblyInfoFile
250 { 250 {
251 get 251 get
252 { 252 {
253 return m_GenerateAssemblyInfoFile; 253 return m_GenerateAssemblyInfoFile;
254 } 254 }
255 set 255 set
256 { 256 {
257 m_GenerateAssemblyInfoFile = value; 257 m_GenerateAssemblyInfoFile = value;
258 } 258 }
259 } 259 }
260 260
261 /// <summary> 261 /// <summary>
262 /// Gets the startup object. 262 /// Gets the startup object.
263 /// </summary> 263 /// </summary>
264 /// <value>The startup object.</value> 264 /// <value>The startup object.</value>
265 public string StartupObject 265 public string StartupObject
266 { 266 {
267 get 267 get
268 { 268 {
269 return m_StartupObject; 269 return m_StartupObject;
270 } 270 }
271 } 271 }
272 272
273 /// <summary> 273 /// <summary>
274 /// Gets the root namespace. 274 /// Gets the root namespace.
275 /// </summary> 275 /// </summary>
276 /// <value>The root namespace.</value> 276 /// <value>The root namespace.</value>
277 public string RootNamespace 277 public string RootNamespace
278 { 278 {
279 get 279 get
280 { 280 {
281 return m_RootNamespace; 281 return m_RootNamespace;
282 } 282 }
283 } 283 }
284 284
285 /// <summary> 285 /// <summary>
286 /// Gets the configurations. 286 /// Gets the configurations.
287 /// </summary> 287 /// </summary>
288 /// <value>The configurations.</value> 288 /// <value>The configurations.</value>
289 public ICollection Configurations 289 public ICollection Configurations
290 { 290 {
291 get 291 get
292 { 292 {
293 ArrayList tmp = new ArrayList( ConfigurationsTable.Values); 293 ArrayList tmp = new ArrayList( ConfigurationsTable.Values);
294 tmp.Sort(); 294 tmp.Sort();
295 return tmp; 295 return tmp;
296 } 296 }
297 } 297 }
298 298
299 /// <summary> 299 /// <summary>
300 /// Gets the configurations table. 300 /// Gets the configurations table.
301 /// </summary> 301 /// </summary>
302 /// <value>The configurations table.</value> 302 /// <value>The configurations table.</value>
303 public Hashtable ConfigurationsTable 303 public Hashtable ConfigurationsTable
304 { 304 {
305 get 305 get
306 { 306 {
307 return m_Configurations; 307 return m_Configurations;
308 } 308 }
309 } 309 }
310 310
311 /// <summary> 311 /// <summary>
312 /// Gets the reference paths. 312 /// Gets the reference paths.
313 /// </summary> 313 /// </summary>
314 /// <value>The reference paths.</value> 314 /// <value>The reference paths.</value>
315 public ArrayList ReferencePaths 315 public ArrayList ReferencePaths
316 { 316 {
317 get 317 get
318 { 318 {
319 ArrayList tmp = new ArrayList(m_ReferencePaths); 319 ArrayList tmp = new ArrayList(m_ReferencePaths);
320 tmp.Sort(); 320 tmp.Sort();
321 return tmp; 321 return tmp;
322 } 322 }
323 } 323 }
324 324
325 /// <summary> 325 /// <summary>
326 /// Gets the references. 326 /// Gets the references.
327 /// </summary> 327 /// </summary>
328 /// <value>The references.</value> 328 /// <value>The references.</value>
329 public ArrayList References 329 public ArrayList References
330 { 330 {
331 get 331 get
332 { 332 {
333 ArrayList tmp = new ArrayList(m_References); 333 ArrayList tmp = new ArrayList(m_References);
334 tmp.Sort(); 334 tmp.Sort();
335 return tmp; 335 return tmp;
336 } 336 }
337 } 337 }
338 338
339 /// <summary> 339 /// <summary>
340 /// Gets the files. 340 /// Gets the files.
341 /// </summary> 341 /// </summary>
342 /// <value>The files.</value> 342 /// <value>The files.</value>
343 public FilesNode Files 343 public FilesNode Files
344 { 344 {
345 get 345 get
346 { 346 {
347 return m_Files; 347 return m_Files;
348 } 348 }
349 } 349 }
350 350
351 /// <summary> 351 /// <summary>
352 /// Gets or sets the parent. 352 /// Gets or sets the parent.
353 /// </summary> 353 /// </summary>
354 /// <value>The parent.</value> 354 /// <value>The parent.</value>
355 public override IDataNode Parent 355 public override IDataNode Parent
356 { 356 {
357 get 357 get
358 { 358 {
359 return base.Parent; 359 return base.Parent;
360 } 360 }
361 set 361 set
362 { 362 {
363 base.Parent = value; 363 base.Parent = value;
364 if(base.Parent is SolutionNode && m_Configurations.Count < 1) 364 if(base.Parent is SolutionNode && m_Configurations.Count < 1)
365 { 365 {
366 SolutionNode parent = (SolutionNode)base.Parent; 366 SolutionNode parent = (SolutionNode)base.Parent;
367 foreach(ConfigurationNode conf in parent.Configurations) 367 foreach(ConfigurationNode conf in parent.Configurations)
368 { 368 {
369 m_Configurations[conf.Name] = conf.Clone(); 369 m_Configurations[conf.Name] = conf.Clone();
370 } 370 }
371 } 371 }
372 } 372 }
373 } 373 }
374 374
375 /// <summary> 375 /// <summary>
376 /// Gets the GUID. 376 /// Gets the GUID.
377 /// </summary> 377 /// </summary>
378 /// <value>The GUID.</value> 378 /// <value>The GUID.</value>
379 public Guid Guid 379 public Guid Guid
380 { 380 {
381 get 381 get
382 { 382 {
383 return m_Guid; 383 return m_Guid;
384 } 384 }
385 } 385 }
386 386
387 #endregion 387 #endregion
388 388
389 #region Private Methods 389 #region Private Methods
390 390
391 private void HandleConfiguration(ConfigurationNode conf) 391 private void HandleConfiguration(ConfigurationNode conf)
392 { 392 {
393 if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, 393 if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first,
394 //so it *may* override changes to the same properties for configurations defines at the project level 394 //so it *may* override changes to the same properties for configurations defines at the project level
395 { 395 {
396 foreach(ConfigurationNode confNode in this.m_Configurations.Values) 396 foreach(ConfigurationNode confNode in this.m_Configurations.Values)
397 { 397 {
398 conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides 398 conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides
399 } 399 }
400 } 400 }
401 if(m_Configurations.ContainsKey(conf.Name)) 401 if(m_Configurations.ContainsKey(conf.Name))
402 { 402 {
403 ConfigurationNode parentConf = (ConfigurationNode)m_Configurations[conf.Name]; 403 ConfigurationNode parentConf = (ConfigurationNode)m_Configurations[conf.Name];
404 conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides 404 conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides
405 } 405 }
406 else 406 else
407 { 407 {
408 m_Configurations[conf.Name] = conf; 408 m_Configurations[conf.Name] = conf;
409 } 409 }
410 } 410 }
411 411
412 #endregion 412 #endregion
413 413
414 #region Public Methods 414 #region Public Methods
415 415
416 /// <summary> 416 /// <summary>
417 /// Parses the specified node. 417 /// Parses the specified node.
418 /// </summary> 418 /// </summary>
419 /// <param name="node">The node.</param> 419 /// <param name="node">The node.</param>
420 public override void Parse(XmlNode node) 420 public override void Parse(XmlNode node)
421 { 421 {
422 m_Name = Helper.AttributeValue(node, "name", m_Name); 422 m_Name = Helper.AttributeValue(node, "name", m_Name);
423 m_Path = Helper.AttributeValue(node, "path", m_Path); 423 m_Path = Helper.AttributeValue(node, "path", m_Path);
424 m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); 424 m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups);
425 m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon); 425 m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
426 m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); 426 m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
427 m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); 427 m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
428 m_Language = Helper.AttributeValue(node, "language", m_Language); 428 m_Language = Helper.AttributeValue(node, "language", m_Language);
429 m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type); 429 m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type);
430 m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime); 430 m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
431 m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); 431 m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
432 m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); 432 m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
433 433
434 int hash = m_Name.GetHashCode(); 434 int hash = m_Name.GetHashCode();
435 435
436 m_Guid = new Guid( hash, 0, 0, 0, 0, 0, 0,0,0,0,0 ); 436 m_Guid = new Guid( hash, 0, 0, 0, 0, 0, 0,0,0,0,0 );
437 437
438 m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); 438 m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
439 439
440 if(m_AssemblyName == null || m_AssemblyName.Length < 1) 440 if(m_AssemblyName == null || m_AssemblyName.Length < 1)
441 { 441 {
442 m_AssemblyName = m_Name; 442 m_AssemblyName = m_Name;
443 } 443 }
444 444
445 if(m_RootNamespace == null || m_RootNamespace.Length < 1) 445 if(m_RootNamespace == null || m_RootNamespace.Length < 1)
446 { 446 {
447 m_RootNamespace = m_Name; 447 m_RootNamespace = m_Name;
448 } 448 }
449 449
450 m_FullPath = m_Path; 450 m_FullPath = m_Path;
451 try 451 try
452 { 452 {
453 m_FullPath = Helper.ResolvePath(m_FullPath); 453 m_FullPath = Helper.ResolvePath(m_FullPath);
454 } 454 }
455 catch 455 catch
456 { 456 {
457 throw new WarningException("Could not resolve Solution path: {0}", m_Path); 457 throw new WarningException("Could not resolve Solution path: {0}", m_Path);
458 } 458 }
459 459
460 Kernel.Instance.CurrentWorkingDirectory.Push(); 460 Kernel.Instance.CurrentWorkingDirectory.Push();
461 try 461 try
462 { 462 {
463 Helper.SetCurrentDir(m_FullPath); 463 Helper.SetCurrentDir(m_FullPath);
464 464
465 if( node == null ) 465 if( node == null )
466 { 466 {
467 throw new ArgumentNullException("node"); 467 throw new ArgumentNullException("node");
468 } 468 }
469 469
470 foreach(XmlNode child in node.ChildNodes) 470 foreach(XmlNode child in node.ChildNodes)
471 { 471 {
472 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 472 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
473 if(dataNode is ConfigurationNode) 473 if(dataNode is ConfigurationNode)
474 { 474 {
475 HandleConfiguration((ConfigurationNode)dataNode); 475 HandleConfiguration((ConfigurationNode)dataNode);
476 } 476 }
477 else if(dataNode is ReferencePathNode) 477 else if(dataNode is ReferencePathNode)
478 { 478 {
479 m_ReferencePaths.Add(dataNode); 479 m_ReferencePaths.Add(dataNode);
480 } 480 }
481 else if(dataNode is ReferenceNode) 481 else if(dataNode is ReferenceNode)
482 { 482 {
483 m_References.Add(dataNode); 483 m_References.Add(dataNode);
484 } 484 }
485 else if(dataNode is FilesNode) 485 else if(dataNode is FilesNode)
486 { 486 {
487 m_Files = (FilesNode)dataNode; 487 m_Files = (FilesNode)dataNode;
488 } 488 }
489 } 489 }
490 } 490 }
491 finally 491 finally
492 { 492 {
493 Kernel.Instance.CurrentWorkingDirectory.Pop(); 493 Kernel.Instance.CurrentWorkingDirectory.Pop();
494 } 494 }
495 } 495 }
496 496
497 497
498 #endregion 498 #endregion
499 499
500 #region IComparable Members 500 #region IComparable Members
501 501
502 public int CompareTo(object obj) 502 public int CompareTo(object obj)
503 { 503 {
504 ProjectNode that = (ProjectNode)obj; 504 ProjectNode that = (ProjectNode)obj;
505 return this.m_Name.CompareTo(that.m_Name); 505 return this.m_Name.CompareTo(that.m_Name);
506 } 506 }
507 507
508 #endregion 508 #endregion
509 } 509 }
510} 510}
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs
index a2880c0..4b8262e 100644
--- a/Prebuild/src/Core/Nodes/ReferenceNode.cs
+++ b/Prebuild/src/Core/Nodes/ReferenceNode.cs
@@ -1,153 +1,153 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-07-25 18:56:49 +0200 (ti, 25 jul 2006) $ 30 * $Date: 2006-07-25 18:56:49 +0200 (ti, 25 jul 2006) $
31 * $Revision: 132 $ 31 * $Revision: 132 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Xml; 36using System.Xml;
37 37
38using Prebuild.Core.Attributes; 38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces; 39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities; 40using Prebuild.Core.Utilities;
41 41
42namespace Prebuild.Core.Nodes 42namespace Prebuild.Core.Nodes
43{ 43{
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 [DataNode("Reference")] 47 [DataNode("Reference")]
48 public class ReferenceNode : DataNode, IComparable 48 public class ReferenceNode : DataNode, IComparable
49 { 49 {
50 #region Fields 50 #region Fields
51 51
52 private string m_Name = "unknown"; 52 private string m_Name = "unknown";
53 private string m_Path; 53 private string m_Path;
54 private string m_LocalCopy; 54 private string m_LocalCopy;
55 private string m_Version; 55 private string m_Version;
56 56
57 #endregion 57 #endregion
58 58
59 #region Properties 59 #region Properties
60 60
61 /// <summary> 61 /// <summary>
62 /// Gets the name. 62 /// Gets the name.
63 /// </summary> 63 /// </summary>
64 /// <value>The name.</value> 64 /// <value>The name.</value>
65 public string Name 65 public string Name
66 { 66 {
67 get 67 get
68 { 68 {
69 return m_Name; 69 return m_Name;
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Gets the path. 74 /// Gets the path.
75 /// </summary> 75 /// </summary>
76 /// <value>The path.</value> 76 /// <value>The path.</value>
77 public string Path 77 public string Path
78 { 78 {
79 get 79 get
80 { 80 {
81 return m_Path; 81 return m_Path;
82 } 82 }
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// Gets a value indicating whether [local copy specified]. 86 /// Gets a value indicating whether [local copy specified].
87 /// </summary> 87 /// </summary>
88 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value> 88 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value>
89 public bool LocalCopySpecified 89 public bool LocalCopySpecified
90 { 90 {
91 get 91 get
92 { 92 {
93 return ( m_LocalCopy != null && m_LocalCopy.Length == 0); 93 return ( m_LocalCopy != null && m_LocalCopy.Length == 0);
94 } 94 }
95 } 95 }
96 96
97 /// <summary> 97 /// <summary>
98 /// Gets a value indicating whether [local copy]. 98 /// Gets a value indicating whether [local copy].
99 /// </summary> 99 /// </summary>
100 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value> 100 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value>
101 public bool LocalCopy 101 public bool LocalCopy
102 { 102 {
103 get 103 get
104 { 104 {
105 if( m_LocalCopy == null) 105 if( m_LocalCopy == null)
106 { 106 {
107 return false; 107 return false;
108 } 108 }
109 return bool.Parse(m_LocalCopy); 109 return bool.Parse(m_LocalCopy);
110 } 110 }
111 } 111 }
112 112
113 /// <summary> 113 /// <summary>
114 /// Gets the version. 114 /// Gets the version.
115 /// </summary> 115 /// </summary>
116 /// <value>The version.</value> 116 /// <value>The version.</value>
117 public string Version 117 public string Version
118 { 118 {
119 get 119 get
120 { 120 {
121 return m_Version; 121 return m_Version;
122 } 122 }
123 } 123 }
124 124
125 #endregion 125 #endregion
126 126
127 #region Public Methods 127 #region Public Methods
128 128
129 /// <summary> 129 /// <summary>
130 /// Parses the specified node. 130 /// Parses the specified node.
131 /// </summary> 131 /// </summary>
132 /// <param name="node">The node.</param> 132 /// <param name="node">The node.</param>
133 public override void Parse(XmlNode node) 133 public override void Parse(XmlNode node)
134 { 134 {
135 m_Name = Helper.AttributeValue(node, "name", m_Name); 135 m_Name = Helper.AttributeValue(node, "name", m_Name);
136 m_Path = Helper.AttributeValue(node, "path", m_Path); 136 m_Path = Helper.AttributeValue(node, "path", m_Path);
137 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy); 137 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy);
138 m_Version = Helper.AttributeValue(node, "version", m_Version); 138 m_Version = Helper.AttributeValue(node, "version", m_Version);
139 } 139 }
140 140
141 #endregion 141 #endregion
142 142
143 #region IComparable Members 143 #region IComparable Members
144 144
145 public int CompareTo(object obj) 145 public int CompareTo(object obj)
146 { 146 {
147 ReferenceNode that = (ReferenceNode)obj; 147 ReferenceNode that = (ReferenceNode)obj;
148 return this.m_Name.CompareTo(that.m_Name); 148 return this.m_Name.CompareTo(that.m_Name);
149 } 149 }
150 150
151 #endregion 151 #endregion
152 } 152 }
153} 153}
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs
index 0563c1b..4c981e7 100644
--- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs
+++ b/Prebuild/src/Core/Nodes/ReferencePathNode.cs
@@ -1,108 +1,108 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.Xml; 38using System.Xml;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities; 42using Prebuild.Core.Utilities;
43 43
44namespace Prebuild.Core.Nodes 44namespace Prebuild.Core.Nodes
45{ 45{
46 /// <summary> 46 /// <summary>
47 /// 47 ///
48 /// </summary> 48 /// </summary>
49 [DataNode("ReferencePath")] 49 [DataNode("ReferencePath")]
50 public class ReferencePathNode : DataNode, IComparable 50 public class ReferencePathNode : DataNode, IComparable
51 { 51 {
52 #region Fields 52 #region Fields
53 53
54 private string m_Path; 54 private string m_Path;
55 55
56 #endregion 56 #endregion
57 57
58 #region Properties 58 #region Properties
59 59
60 /// <summary> 60 /// <summary>
61 /// Gets the path. 61 /// Gets the path.
62 /// </summary> 62 /// </summary>
63 /// <value>The path.</value> 63 /// <value>The path.</value>
64 public string Path 64 public string Path
65 { 65 {
66 get 66 get
67 { 67 {
68 return m_Path; 68 return m_Path;
69 } 69 }
70 } 70 }
71 71
72 #endregion 72 #endregion
73 73
74 #region Public Methods 74 #region Public Methods
75 75
76 /// <summary> 76 /// <summary>
77 /// Parses the specified node. 77 /// Parses the specified node.
78 /// </summary> 78 /// </summary>
79 /// <param name="node">The node.</param> 79 /// <param name="node">The node.</param>
80 public override void Parse(XmlNode node) 80 public override void Parse(XmlNode node)
81 { 81 {
82 if( node == null ) 82 if( node == null )
83 { 83 {
84 throw new ArgumentNullException("node"); 84 throw new ArgumentNullException("node");
85 } 85 }
86 86
87 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText); 87 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
88 if(m_Path == null) 88 if(m_Path == null)
89 { 89 {
90 m_Path = ""; 90 m_Path = "";
91 } 91 }
92 92
93 m_Path = m_Path.Trim(); 93 m_Path = m_Path.Trim();
94 } 94 }
95 95
96 #endregion 96 #endregion
97 97
98 #region IComparable Members 98 #region IComparable Members
99 99
100 public int CompareTo(object obj) 100 public int CompareTo(object obj)
101 { 101 {
102 ReferencePathNode that = (ReferencePathNode)obj; 102 ReferencePathNode that = (ReferencePathNode)obj;
103 return this.m_Path.CompareTo(that.m_Path); 103 return this.m_Path.CompareTo(that.m_Path);
104 } 104 }
105 105
106 #endregion 106 #endregion
107 } 107 }
108} 108}
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs
index c777fa4..bbf867e 100644
--- a/Prebuild/src/Core/Nodes/SolutionNode.cs
+++ b/Prebuild/src/Core/Nodes/SolutionNode.cs
@@ -1,288 +1,288 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-02-28 17:15:42 +0100 (ti, 28 feb 2006) $ 30 * $Date: 2006-02-28 17:15:42 +0100 (ti, 28 feb 2006) $
31 * $Revision: 92 $ 31 * $Revision: 92 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Diagnostics; 37using System.Diagnostics;
38using System.IO; 38using System.IO;
39using System.Xml; 39using System.Xml;
40 40
41using Prebuild.Core.Attributes; 41using Prebuild.Core.Attributes;
42using Prebuild.Core.Interfaces; 42using Prebuild.Core.Interfaces;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild.Core.Nodes 45namespace Prebuild.Core.Nodes
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 [DataNode("Solution")] 50 [DataNode("Solution")]
51 public class SolutionNode : DataNode 51 public class SolutionNode : DataNode
52 { 52 {
53 #region Fields 53 #region Fields
54 54
55 private string m_Name = "unknown"; 55 private string m_Name = "unknown";
56 private string m_Path = ""; 56 private string m_Path = "";
57 private string m_FullPath = ""; 57 private string m_FullPath = "";
58 private string m_ActiveConfig = "Debug"; 58 private string m_ActiveConfig = "Debug";
59 59
60 private OptionsNode m_Options; 60 private OptionsNode m_Options;
61 private FilesNode m_Files; 61 private FilesNode m_Files;
62 private Hashtable m_Configurations; 62 private Hashtable m_Configurations;
63 private Hashtable m_Projects; 63 private Hashtable m_Projects;
64 private ArrayList m_ProjectsOrder; 64 private ArrayList m_ProjectsOrder;
65 65
66 #endregion 66 #endregion
67 67
68 #region Constructors 68 #region Constructors
69 69
70 /// <summary> 70 /// <summary>
71 /// Initializes a new instance of the <see cref="SolutionNode"/> class. 71 /// Initializes a new instance of the <see cref="SolutionNode"/> class.
72 /// </summary> 72 /// </summary>
73 public SolutionNode() 73 public SolutionNode()
74 { 74 {
75 m_Configurations = new Hashtable(); 75 m_Configurations = new Hashtable();
76 m_Projects = new Hashtable(); 76 m_Projects = new Hashtable();
77 m_ProjectsOrder = new ArrayList(); 77 m_ProjectsOrder = new ArrayList();
78 } 78 }
79 79
80 #endregion 80 #endregion
81 81
82 #region Properties 82 #region Properties
83 83
84 /// <summary> 84 /// <summary>
85 /// Gets or sets the active config. 85 /// Gets or sets the active config.
86 /// </summary> 86 /// </summary>
87 /// <value>The active config.</value> 87 /// <value>The active config.</value>
88 public string ActiveConfig 88 public string ActiveConfig
89 { 89 {
90 get 90 get
91 { 91 {
92 return m_ActiveConfig; 92 return m_ActiveConfig;
93 } 93 }
94 set 94 set
95 { 95 {
96 m_ActiveConfig = value; 96 m_ActiveConfig = value;
97 } 97 }
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// Gets the name. 101 /// Gets the name.
102 /// </summary> 102 /// </summary>
103 /// <value>The name.</value> 103 /// <value>The name.</value>
104 public string Name 104 public string Name
105 { 105 {
106 get 106 get
107 { 107 {
108 return m_Name; 108 return m_Name;
109 } 109 }
110 } 110 }
111 111
112 /// <summary> 112 /// <summary>
113 /// Gets the path. 113 /// Gets the path.
114 /// </summary> 114 /// </summary>
115 /// <value>The path.</value> 115 /// <value>The path.</value>
116 public string Path 116 public string Path
117 { 117 {
118 get 118 get
119 { 119 {
120 return m_Path; 120 return m_Path;
121 } 121 }
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// Gets the full path. 125 /// Gets the full path.
126 /// </summary> 126 /// </summary>
127 /// <value>The full path.</value> 127 /// <value>The full path.</value>
128 public string FullPath 128 public string FullPath
129 { 129 {
130 get 130 get
131 { 131 {
132 return m_FullPath; 132 return m_FullPath;
133 } 133 }
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
137 /// Gets the options. 137 /// Gets the options.
138 /// </summary> 138 /// </summary>
139 /// <value>The options.</value> 139 /// <value>The options.</value>
140 public OptionsNode Options 140 public OptionsNode Options
141 { 141 {
142 get 142 get
143 { 143 {
144 return m_Options; 144 return m_Options;
145 } 145 }
146 } 146 }
147 147
148 /// <summary> 148 /// <summary>
149 /// Gets the files. 149 /// Gets the files.
150 /// </summary> 150 /// </summary>
151 /// <value>The files.</value> 151 /// <value>The files.</value>
152 public FilesNode Files 152 public FilesNode Files
153 { 153 {
154 get 154 get
155 { 155 {
156 return m_Files; 156 return m_Files;
157 } 157 }
158 } 158 }
159 159
160 /// <summary> 160 /// <summary>
161 /// Gets the configurations. 161 /// Gets the configurations.
162 /// </summary> 162 /// </summary>
163 /// <value>The configurations.</value> 163 /// <value>The configurations.</value>
164 public ICollection Configurations 164 public ICollection Configurations
165 { 165 {
166 get 166 get
167 { 167 {
168 ArrayList tmp = new ArrayList(ConfigurationsTable.Values); 168 ArrayList tmp = new ArrayList(ConfigurationsTable.Values);
169 tmp.Sort(); 169 tmp.Sort();
170 return tmp; 170 return tmp;
171 } 171 }
172 } 172 }
173 173
174 /// <summary> 174 /// <summary>
175 /// Gets the configurations table. 175 /// Gets the configurations table.
176 /// </summary> 176 /// </summary>
177 /// <value>The configurations table.</value> 177 /// <value>The configurations table.</value>
178 public Hashtable ConfigurationsTable 178 public Hashtable ConfigurationsTable
179 { 179 {
180 get 180 get
181 { 181 {
182 return m_Configurations; 182 return m_Configurations;
183 } 183 }
184 } 184 }
185 185
186 /// <summary> 186 /// <summary>
187 /// Gets the projects. 187 /// Gets the projects.
188 /// </summary> 188 /// </summary>
189 /// <value>The projects.</value> 189 /// <value>The projects.</value>
190 public ICollection Projects 190 public ICollection Projects
191 { 191 {
192 get 192 get
193 { 193 {
194 ArrayList tmp = new ArrayList(m_Projects.Values); 194 ArrayList tmp = new ArrayList(m_Projects.Values);
195 tmp.Sort(); 195 tmp.Sort();
196 return tmp; 196 return tmp;
197 } 197 }
198 } 198 }
199 199
200 /// <summary> 200 /// <summary>
201 /// Gets the projects table. 201 /// Gets the projects table.
202 /// </summary> 202 /// </summary>
203 /// <value>The projects table.</value> 203 /// <value>The projects table.</value>
204 public Hashtable ProjectsTable 204 public Hashtable ProjectsTable
205 { 205 {
206 get 206 get
207 { 207 {
208 return m_Projects; 208 return m_Projects;
209 } 209 }
210 } 210 }
211 211
212 /// <summary> 212 /// <summary>
213 /// Gets the projects table. 213 /// Gets the projects table.
214 /// </summary> 214 /// </summary>
215 /// <value>The projects table.</value> 215 /// <value>The projects table.</value>
216 public ArrayList ProjectsTableOrder 216 public ArrayList ProjectsTableOrder
217 { 217 {
218 get 218 get
219 { 219 {
220 return m_ProjectsOrder; 220 return m_ProjectsOrder;
221 } 221 }
222 } 222 }
223 223
224 #endregion 224 #endregion
225 225
226 #region Public Methods 226 #region Public Methods
227 227
228 /// <summary> 228 /// <summary>
229 /// Parses the specified node. 229 /// Parses the specified node.
230 /// </summary> 230 /// </summary>
231 /// <param name="node">The node.</param> 231 /// <param name="node">The node.</param>
232 public override void Parse(XmlNode node) 232 public override void Parse(XmlNode node)
233 { 233 {
234 m_Name = Helper.AttributeValue(node, "name", m_Name); 234 m_Name = Helper.AttributeValue(node, "name", m_Name);
235 m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig); 235 m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
236 m_Path = Helper.AttributeValue(node, "path", m_Path); 236 m_Path = Helper.AttributeValue(node, "path", m_Path);
237 237
238 m_FullPath = m_Path; 238 m_FullPath = m_Path;
239 try 239 try
240 { 240 {
241 m_FullPath = Helper.ResolvePath(m_FullPath); 241 m_FullPath = Helper.ResolvePath(m_FullPath);
242 } 242 }
243 catch 243 catch
244 { 244 {
245 throw new WarningException("Could not resolve solution path: {0}", m_Path); 245 throw new WarningException("Could not resolve solution path: {0}", m_Path);
246 } 246 }
247 247
248 Kernel.Instance.CurrentWorkingDirectory.Push(); 248 Kernel.Instance.CurrentWorkingDirectory.Push();
249 try 249 try
250 { 250 {
251 Helper.SetCurrentDir(m_FullPath); 251 Helper.SetCurrentDir(m_FullPath);
252 252
253 if( node == null ) 253 if( node == null )
254 { 254 {
255 throw new ArgumentNullException("node"); 255 throw new ArgumentNullException("node");
256 } 256 }
257 257
258 foreach(XmlNode child in node.ChildNodes) 258 foreach(XmlNode child in node.ChildNodes)
259 { 259 {
260 IDataNode dataNode = Kernel.Instance.ParseNode(child, this); 260 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
261 if(dataNode is OptionsNode) 261 if(dataNode is OptionsNode)
262 { 262 {
263 m_Options = (OptionsNode)dataNode; 263 m_Options = (OptionsNode)dataNode;
264 } 264 }
265 else if(dataNode is FilesNode) 265 else if(dataNode is FilesNode)
266 { 266 {
267 m_Files = (FilesNode)dataNode; 267 m_Files = (FilesNode)dataNode;
268 } 268 }
269 else if(dataNode is ConfigurationNode) 269 else if(dataNode is ConfigurationNode)
270 { 270 {
271 m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode; 271 m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode;
272 } 272 }
273 else if(dataNode is ProjectNode) 273 else if(dataNode is ProjectNode)
274 { 274 {
275 m_Projects[((ProjectNode)dataNode).Name] = dataNode; 275 m_Projects[((ProjectNode)dataNode).Name] = dataNode;
276 m_ProjectsOrder.Add(dataNode); 276 m_ProjectsOrder.Add(dataNode);
277 } 277 }
278 } 278 }
279 } 279 }
280 finally 280 finally
281 { 281 {
282 Kernel.Instance.CurrentWorkingDirectory.Pop(); 282 Kernel.Instance.CurrentWorkingDirectory.Pop();
283 } 283 }
284 } 284 }
285 285
286 #endregion 286 #endregion
287 } 287 }
288} 288}
diff --git a/Prebuild/src/Core/Parse/IfContext.cs b/Prebuild/src/Core/Parse/IfContext.cs
index 383049d..6311f47 100644
--- a/Prebuild/src/Core/Parse/IfContext.cs
+++ b/Prebuild/src/Core/Parse/IfContext.cs
@@ -1,163 +1,163 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37namespace Prebuild.Core.Parse 37namespace Prebuild.Core.Parse
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// 40 ///
41 /// </summary> 41 /// </summary>
42 public enum IfState 42 public enum IfState
43 { 43 {
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 None, 47 None,
48 /// <summary> 48 /// <summary>
49 /// 49 ///
50 /// </summary> 50 /// </summary>
51 If, 51 If,
52 /// <summary> 52 /// <summary>
53 /// 53 ///
54 /// </summary> 54 /// </summary>
55 ElseIf, 55 ElseIf,
56 /// <summary> 56 /// <summary>
57 /// 57 ///
58 /// </summary> 58 /// </summary>
59 Else 59 Else
60 } 60 }
61 61
62 /// <summary> 62 /// <summary>
63 /// Summary description for IfContext. 63 /// Summary description for IfContext.
64 /// </summary> 64 /// </summary>
65 // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/) 65 // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/)
66 public class IfContext 66 public class IfContext
67 { 67 {
68 #region Properties 68 #region Properties
69 69
70 bool m_Active; 70 bool m_Active;
71 bool m_Keep; 71 bool m_Keep;
72 bool m_EverKept; 72 bool m_EverKept;
73 IfState m_State = IfState.None; 73 IfState m_State = IfState.None;
74 74
75 #endregion 75 #endregion
76 76
77 #region Constructors 77 #region Constructors
78 78
79 /// <summary> 79 /// <summary>
80 /// Initializes a new instance of the <see cref="IfContext"/> class. 80 /// Initializes a new instance of the <see cref="IfContext"/> class.
81 /// </summary> 81 /// </summary>
82 /// <param name="active">if set to <c>true</c> [active].</param> 82 /// <param name="active">if set to <c>true</c> [active].</param>
83 /// <param name="keep">if set to <c>true</c> [keep].</param> 83 /// <param name="keep">if set to <c>true</c> [keep].</param>
84 /// <param name="state">The state.</param> 84 /// <param name="state">The state.</param>
85 public IfContext(bool active, bool keep, IfState state) 85 public IfContext(bool active, bool keep, IfState state)
86 { 86 {
87 m_Active = active; 87 m_Active = active;
88 m_Keep = keep; 88 m_Keep = keep;
89 m_EverKept = keep; 89 m_EverKept = keep;
90 m_State = state; 90 m_State = state;
91 } 91 }
92 92
93 #endregion 93 #endregion
94 94
95 #region Properties 95 #region Properties
96 96
97 /// <summary> 97 /// <summary>
98 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active. 98 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active.
99 /// </summary> 99 /// </summary>
100 /// <value><c>true</c> if active; otherwise, <c>false</c>.</value> 100 /// <value><c>true</c> if active; otherwise, <c>false</c>.</value>
101 public bool Active 101 public bool Active
102 { 102 {
103 get 103 get
104 { 104 {
105 return m_Active; 105 return m_Active;
106 } 106 }
107 set 107 set
108 { 108 {
109 m_Active = value; 109 m_Active = value;
110 } 110 }
111 } 111 }
112 112
113 /// <summary> 113 /// <summary>
114 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep. 114 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep.
115 /// </summary> 115 /// </summary>
116 /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value> 116 /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value>
117 public bool Keep 117 public bool Keep
118 { 118 {
119 get 119 get
120 { 120 {
121 return m_Keep; 121 return m_Keep;
122 } 122 }
123 set 123 set
124 { 124 {
125 m_Keep = value; 125 m_Keep = value;
126 if(m_Keep) 126 if(m_Keep)
127 { 127 {
128 m_EverKept = true; 128 m_EverKept = true;
129 } 129 }
130 } 130 }
131 } 131 }
132 132
133 /// <summary> 133 /// <summary>
134 /// Gets a value indicating whether [ever kept]. 134 /// Gets a value indicating whether [ever kept].
135 /// </summary> 135 /// </summary>
136 /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value> 136 /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value>
137 public bool EverKept 137 public bool EverKept
138 { 138 {
139 get 139 get
140 { 140 {
141 return m_EverKept; 141 return m_EverKept;
142 } 142 }
143 } 143 }
144 144
145 /// <summary> 145 /// <summary>
146 /// Gets or sets the state. 146 /// Gets or sets the state.
147 /// </summary> 147 /// </summary>
148 /// <value>The state.</value> 148 /// <value>The state.</value>
149 public IfState State 149 public IfState State
150 { 150 {
151 get 151 get
152 { 152 {
153 return m_State; 153 return m_State;
154 } 154 }
155 set 155 set
156 { 156 {
157 m_State = value; 157 m_State = value;
158 } 158 }
159 } 159 }
160 160
161 #endregion 161 #endregion
162 } 162 }
163} 163}
diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs
index 85e92c3..c4e1e61 100644
--- a/Prebuild/src/Core/Parse/Preprocessor.cs
+++ b/Prebuild/src/Core/Parse/Preprocessor.cs
@@ -1,519 +1,519 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-01 19:55:06 +0200 (fr, 01 sep 2006) $ 30 * $Date: 2006-09-01 19:55:06 +0200 (fr, 01 sep 2006) $
31 * $Revision: 147 $ 31 * $Revision: 147 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.IO; 37using System.IO;
38using System.Xml; 38using System.Xml;
39 39
40namespace Prebuild.Core.Parse 40namespace Prebuild.Core.Parse
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// 43 ///
44 /// </summary> 44 /// </summary>
45 public enum OperatorSymbol 45 public enum OperatorSymbol
46 { 46 {
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 None, 50 None,
51 /// <summary> 51 /// <summary>
52 /// 52 ///
53 /// </summary> 53 /// </summary>
54 Equal, 54 Equal,
55 /// <summary> 55 /// <summary>
56 /// 56 ///
57 /// </summary> 57 /// </summary>
58 NotEqual, 58 NotEqual,
59 /// <summary> 59 /// <summary>
60 /// 60 ///
61 /// </summary> 61 /// </summary>
62 LessThan, 62 LessThan,
63 /// <summary> 63 /// <summary>
64 /// 64 ///
65 /// </summary> 65 /// </summary>
66 GreaterThan, 66 GreaterThan,
67 /// <summary> 67 /// <summary>
68 /// 68 ///
69 /// </summary> 69 /// </summary>
70 LessThanEqual, 70 LessThanEqual,
71 /// <summary> 71 /// <summary>
72 /// 72 ///
73 /// </summary> 73 /// </summary>
74 GreaterThanEqual 74 GreaterThanEqual
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// 78 ///
79 /// </summary> 79 /// </summary>
80 public class Preprocessor 80 public class Preprocessor
81 { 81 {
82 #region Fields 82 #region Fields
83 83
84 XmlDocument m_OutDoc; 84 XmlDocument m_OutDoc;
85 Stack m_IfStack; 85 Stack m_IfStack;
86 Hashtable m_Variables; 86 Hashtable m_Variables;
87 87
88 #endregion 88 #endregion
89 89
90 #region Constructors 90 #region Constructors
91 91
92 /// <summary> 92 /// <summary>
93 /// Initializes a new instance of the <see cref="Preprocessor"/> class. 93 /// Initializes a new instance of the <see cref="Preprocessor"/> class.
94 /// </summary> 94 /// </summary>
95 public Preprocessor() 95 public Preprocessor()
96 { 96 {
97 m_OutDoc = new XmlDocument(); 97 m_OutDoc = new XmlDocument();
98 m_IfStack = new Stack(); 98 m_IfStack = new Stack();
99 m_Variables = new Hashtable(); 99 m_Variables = new Hashtable();
100 100
101 RegisterVariable("OS", GetOS()); 101 RegisterVariable("OS", GetOS());
102 RegisterVariable("RuntimeVersion", Environment.Version.Major); 102 RegisterVariable("RuntimeVersion", Environment.Version.Major);
103 RegisterVariable("RuntimeMajor", Environment.Version.Major); 103 RegisterVariable("RuntimeMajor", Environment.Version.Major);
104 RegisterVariable("RuntimeMinor", Environment.Version.Minor); 104 RegisterVariable("RuntimeMinor", Environment.Version.Minor);
105 RegisterVariable("RuntimeRevision", Environment.Version.Revision); 105 RegisterVariable("RuntimeRevision", Environment.Version.Revision);
106 } 106 }
107 107
108 #endregion 108 #endregion
109 109
110 #region Properties 110 #region Properties
111 111
112 /// <summary> 112 /// <summary>
113 /// Gets the processed doc. 113 /// Gets the processed doc.
114 /// </summary> 114 /// </summary>
115 /// <value>The processed doc.</value> 115 /// <value>The processed doc.</value>
116 public XmlDocument ProcessedDoc 116 public XmlDocument ProcessedDoc
117 { 117 {
118 get 118 get
119 { 119 {
120 return m_OutDoc; 120 return m_OutDoc;
121 } 121 }
122 } 122 }
123 123
124 #endregion 124 #endregion
125 125
126 #region Private Methods 126 #region Private Methods
127 127
128 /// <summary> 128 /// <summary>
129 /// Parts of this code were taken from NAnt and is subject to the GPL 129 /// Parts of this code were taken from NAnt and is subject to the GPL
130 /// as per NAnt's license. Thanks to the NAnt guys for this little gem. 130 /// as per NAnt's license. Thanks to the NAnt guys for this little gem.
131 /// </summary> 131 /// </summary>
132 /// <returns></returns> 132 /// <returns></returns>
133 public static string GetOS() 133 public static string GetOS()
134 { 134 {
135 PlatformID platId = Environment.OSVersion.Platform; 135 PlatformID platId = Environment.OSVersion.Platform;
136 if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows) 136 if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows)
137 { 137 {
138 return "Win32"; 138 return "Win32";
139 } 139 }
140 140
141 /* 141 /*
142 * .NET 1.x, under Mono, the UNIX code is 128. Under 142 * .NET 1.x, under Mono, the UNIX code is 128. Under
143 * .NET 2.x, Mono or MS, the UNIX code is 4 143 * .NET 2.x, Mono or MS, the UNIX code is 4
144 */ 144 */
145 if(Environment.Version.Major == 1) 145 if(Environment.Version.Major == 1)
146 { 146 {
147 if((int)platId == 128) 147 if((int)platId == 128)
148 { 148 {
149 return "UNIX"; 149 return "UNIX";
150 } 150 }
151 } 151 }
152 else if((int)platId == 4) 152 else if((int)platId == 4)
153 { 153 {
154 return "UNIX"; 154 return "UNIX";
155 } 155 }
156 156
157 return "Unknown"; 157 return "Unknown";
158 } 158 }
159 159
160 private static bool CompareNum(OperatorSymbol oper, int val1, int val2) 160 private static bool CompareNum(OperatorSymbol oper, int val1, int val2)
161 { 161 {
162 switch(oper) 162 switch(oper)
163 { 163 {
164 case OperatorSymbol.Equal: 164 case OperatorSymbol.Equal:
165 return (val1 == val2); 165 return (val1 == val2);
166 case OperatorSymbol.NotEqual: 166 case OperatorSymbol.NotEqual:
167 return (val1 != val2); 167 return (val1 != val2);
168 case OperatorSymbol.LessThan: 168 case OperatorSymbol.LessThan:
169 return (val1 < val2); 169 return (val1 < val2);
170 case OperatorSymbol.LessThanEqual: 170 case OperatorSymbol.LessThanEqual:
171 return (val1 <= val2); 171 return (val1 <= val2);
172 case OperatorSymbol.GreaterThan: 172 case OperatorSymbol.GreaterThan:
173 return (val1 > val2); 173 return (val1 > val2);
174 case OperatorSymbol.GreaterThanEqual: 174 case OperatorSymbol.GreaterThanEqual:
175 return (val1 >= val2); 175 return (val1 >= val2);
176 } 176 }
177 177
178 throw new WarningException("Unknown operator type"); 178 throw new WarningException("Unknown operator type");
179 } 179 }
180 180
181 private static bool CompareStr(OperatorSymbol oper, string val1, string val2) 181 private static bool CompareStr(OperatorSymbol oper, string val1, string val2)
182 { 182 {
183 switch(oper) 183 switch(oper)
184 { 184 {
185 case OperatorSymbol.Equal: 185 case OperatorSymbol.Equal:
186 return (val1 == val2); 186 return (val1 == val2);
187 case OperatorSymbol.NotEqual: 187 case OperatorSymbol.NotEqual:
188 return (val1 != val2); 188 return (val1 != val2);
189 case OperatorSymbol.LessThan: 189 case OperatorSymbol.LessThan:
190 return (val1.CompareTo(val2) < 0); 190 return (val1.CompareTo(val2) < 0);
191 case OperatorSymbol.LessThanEqual: 191 case OperatorSymbol.LessThanEqual:
192 return (val1.CompareTo(val2) <= 0); 192 return (val1.CompareTo(val2) <= 0);
193 case OperatorSymbol.GreaterThan: 193 case OperatorSymbol.GreaterThan:
194 return (val1.CompareTo(val2) > 0); 194 return (val1.CompareTo(val2) > 0);
195 case OperatorSymbol.GreaterThanEqual: 195 case OperatorSymbol.GreaterThanEqual:
196 return (val1.CompareTo(val2) >= 0); 196 return (val1.CompareTo(val2) >= 0);
197 } 197 }
198 198
199 throw new WarningException("Unknown operator type"); 199 throw new WarningException("Unknown operator type");
200 } 200 }
201 201
202 private static char NextChar(int idx, string str) 202 private static char NextChar(int idx, string str)
203 { 203 {
204 if((idx + 1) >= str.Length) 204 if((idx + 1) >= str.Length)
205 { 205 {
206 return Char.MaxValue; 206 return Char.MaxValue;
207 } 207 }
208 208
209 return str[idx + 1]; 209 return str[idx + 1];
210 } 210 }
211 // Very very simple expression parser. Can only match expressions of the form 211 // Very very simple expression parser. Can only match expressions of the form
212 // <var> <op> <value>: 212 // <var> <op> <value>:
213 // OS = Windows 213 // OS = Windows
214 // OS != Linux 214 // OS != Linux
215 // RuntimeMinor > 0 215 // RuntimeMinor > 0
216 private bool ParseExpression(string exp) 216 private bool ParseExpression(string exp)
217 { 217 {
218 if(exp == null) 218 if(exp == null)
219 { 219 {
220 throw new ArgumentException("Invalid expression, cannot be null"); 220 throw new ArgumentException("Invalid expression, cannot be null");
221 } 221 }
222 222
223 exp = exp.Trim(); 223 exp = exp.Trim();
224 if(exp.Length < 1) 224 if(exp.Length < 1)
225 { 225 {
226 throw new ArgumentException("Invalid expression, cannot be 0 length"); 226 throw new ArgumentException("Invalid expression, cannot be 0 length");
227 } 227 }
228 228
229 string id = ""; 229 string id = "";
230 string str = ""; 230 string str = "";
231 OperatorSymbol oper = OperatorSymbol.None; 231 OperatorSymbol oper = OperatorSymbol.None;
232 bool inStr = false; 232 bool inStr = false;
233 char c; 233 char c;
234 234
235 for(int i = 0; i < exp.Length; i++) 235 for(int i = 0; i < exp.Length; i++)
236 { 236 {
237 c = exp[i]; 237 c = exp[i];
238 if(Char.IsWhiteSpace(c)) 238 if(Char.IsWhiteSpace(c))
239 { 239 {
240 continue; 240 continue;
241 } 241 }
242 242
243 if(Char.IsLetterOrDigit(c) || c == '_') 243 if(Char.IsLetterOrDigit(c) || c == '_')
244 { 244 {
245 if(inStr) 245 if(inStr)
246 { 246 {
247 str += c; 247 str += c;
248 } 248 }
249 else 249 else
250 { 250 {
251 id += c; 251 id += c;
252 } 252 }
253 } 253 }
254 else if(c == '\"') 254 else if(c == '\"')
255 { 255 {
256 inStr = !inStr; 256 inStr = !inStr;
257 if(inStr) 257 if(inStr)
258 { 258 {
259 str = ""; 259 str = "";
260 } 260 }
261 } 261 }
262 else 262 else
263 { 263 {
264 if(inStr) 264 if(inStr)
265 { 265 {
266 str += c; 266 str += c;
267 } 267 }
268 else 268 else
269 { 269 {
270 switch(c) 270 switch(c)
271 { 271 {
272 case '=': 272 case '=':
273 oper = OperatorSymbol.Equal; 273 oper = OperatorSymbol.Equal;
274 break; 274 break;
275 275
276 case '!': 276 case '!':
277 if(NextChar(i, exp) == '=') 277 if(NextChar(i, exp) == '=')
278 { 278 {
279 oper = OperatorSymbol.NotEqual; 279 oper = OperatorSymbol.NotEqual;
280 } 280 }
281 281
282 break; 282 break;
283 283
284 case '<': 284 case '<':
285 if(NextChar(i, exp) == '=') 285 if(NextChar(i, exp) == '=')
286 { 286 {
287 oper = OperatorSymbol.LessThanEqual; 287 oper = OperatorSymbol.LessThanEqual;
288 } 288 }
289 else 289 else
290 { 290 {
291 oper = OperatorSymbol.LessThan; 291 oper = OperatorSymbol.LessThan;
292 } 292 }
293 293
294 break; 294 break;
295 295
296 case '>': 296 case '>':
297 if(NextChar(i, exp) == '=') 297 if(NextChar(i, exp) == '=')
298 { 298 {
299 oper = OperatorSymbol.GreaterThanEqual; 299 oper = OperatorSymbol.GreaterThanEqual;
300 } 300 }
301 else 301 else
302 { 302 {
303 oper = OperatorSymbol.GreaterThan; 303 oper = OperatorSymbol.GreaterThan;
304 } 304 }
305 305
306 break; 306 break;
307 } 307 }
308 } 308 }
309 } 309 }
310 } 310 }
311 311
312 312
313 if(inStr) 313 if(inStr)
314 { 314 {
315 throw new WarningException("Expected end of string in expression"); 315 throw new WarningException("Expected end of string in expression");
316 } 316 }
317 317
318 if(oper == OperatorSymbol.None) 318 if(oper == OperatorSymbol.None)
319 { 319 {
320 throw new WarningException("Expected operator in expression"); 320 throw new WarningException("Expected operator in expression");
321 } 321 }
322 else if(id.Length < 1) 322 else if(id.Length < 1)
323 { 323 {
324 throw new WarningException("Expected identifier in expression"); 324 throw new WarningException("Expected identifier in expression");
325 } 325 }
326 else if(str.Length < 1) 326 else if(str.Length < 1)
327 { 327 {
328 throw new WarningException("Expected value in expression"); 328 throw new WarningException("Expected value in expression");
329 } 329 }
330 330
331 bool ret = false; 331 bool ret = false;
332 try 332 try
333 { 333 {
334 object val = m_Variables[id.ToLower()]; 334 object val = m_Variables[id.ToLower()];
335 if(val == null) 335 if(val == null)
336 { 336 {
337 throw new WarningException("Unknown identifier '{0}'", id); 337 throw new WarningException("Unknown identifier '{0}'", id);
338 } 338 }
339 339
340 int numVal, numVal2; 340 int numVal, numVal2;
341 string strVal, strVal2; 341 string strVal, strVal2;
342 Type t = val.GetType(); 342 Type t = val.GetType();
343 if(t.IsAssignableFrom(typeof(int))) 343 if(t.IsAssignableFrom(typeof(int)))
344 { 344 {
345 numVal = (int)val; 345 numVal = (int)val;
346 numVal2 = Int32.Parse(str); 346 numVal2 = Int32.Parse(str);
347 ret = CompareNum(oper, numVal, numVal2); 347 ret = CompareNum(oper, numVal, numVal2);
348 } 348 }
349 else 349 else
350 { 350 {
351 strVal = val.ToString(); 351 strVal = val.ToString();
352 strVal2 = str; 352 strVal2 = str;
353 ret = CompareStr(oper, strVal, strVal2); 353 ret = CompareStr(oper, strVal, strVal2);
354 } 354 }
355 } 355 }
356 catch(ArgumentException ex) 356 catch(ArgumentException ex)
357 { 357 {
358 ex.ToString(); 358 ex.ToString();
359 throw new WarningException("Invalid value type for system variable '{0}', expected int", id); 359 throw new WarningException("Invalid value type for system variable '{0}', expected int", id);
360 } 360 }
361 361
362 return ret; 362 return ret;
363 } 363 }
364 364
365 #endregion 365 #endregion
366 366
367 #region Public Methods 367 #region Public Methods
368 368
369 /// <summary> 369 /// <summary>
370 /// 370 ///
371 /// </summary> 371 /// </summary>
372 /// <param name="name"></param> 372 /// <param name="name"></param>
373 /// <param name="variableValue"></param> 373 /// <param name="variableValue"></param>
374 public void RegisterVariable(string name, object variableValue) 374 public void RegisterVariable(string name, object variableValue)
375 { 375 {
376 if(name == null || variableValue == null) 376 if(name == null || variableValue == null)
377 { 377 {
378 return; 378 return;
379 } 379 }
380 380
381 m_Variables[name.ToLower()] = variableValue; 381 m_Variables[name.ToLower()] = variableValue;
382 } 382 }
383 383
384 /// <summary> 384 /// <summary>
385 /// Performs validation on the xml source as well as evaluates conditional and flow expresions 385 /// Performs validation on the xml source as well as evaluates conditional and flow expresions
386 /// </summary> 386 /// </summary>
387 /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception> 387 /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception>
388 /// <param name="reader"></param> 388 /// <param name="reader"></param>
389 /// <returns>the output xml </returns> 389 /// <returns>the output xml </returns>
390 public string Process(XmlReader reader) 390 public string Process(XmlReader reader)
391 { 391 {
392 if(reader == null) 392 if(reader == null)
393 { 393 {
394 throw new ArgumentException("Invalid XML reader to pre-process"); 394 throw new ArgumentException("Invalid XML reader to pre-process");
395 } 395 }
396 396
397 IfContext context = new IfContext(true, true, IfState.None); 397 IfContext context = new IfContext(true, true, IfState.None);
398 StringWriter xmlText = new StringWriter(); 398 StringWriter xmlText = new StringWriter();
399 XmlTextWriter writer = new XmlTextWriter(xmlText); 399 XmlTextWriter writer = new XmlTextWriter(xmlText);
400 writer.Formatting = Formatting.Indented; 400 writer.Formatting = Formatting.Indented;
401 while(reader.Read()) 401 while(reader.Read())
402 { 402 {
403 if(reader.NodeType == XmlNodeType.ProcessingInstruction) 403 if(reader.NodeType == XmlNodeType.ProcessingInstruction)
404 { 404 {
405 bool ignore = false; 405 bool ignore = false;
406 switch(reader.LocalName) 406 switch(reader.LocalName)
407 { 407 {
408 case "if": 408 case "if":
409 m_IfStack.Push(context); 409 m_IfStack.Push(context);
410 context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If); 410 context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If);
411 ignore = true; 411 ignore = true;
412 break; 412 break;
413 413
414 case "elseif": 414 case "elseif":
415 if(m_IfStack.Count == 0) 415 if(m_IfStack.Count == 0)
416 { 416 {
417 throw new WarningException("Unexpected 'elseif' outside of 'if'"); 417 throw new WarningException("Unexpected 'elseif' outside of 'if'");
418 } 418 }
419 else if(context.State != IfState.If && context.State != IfState.ElseIf) 419 else if(context.State != IfState.If && context.State != IfState.ElseIf)
420 { 420 {
421 throw new WarningException("Unexpected 'elseif' outside of 'if'"); 421 throw new WarningException("Unexpected 'elseif' outside of 'if'");
422 } 422 }
423 423
424 context.State = IfState.ElseIf; 424 context.State = IfState.ElseIf;
425 if(!context.EverKept) 425 if(!context.EverKept)
426 { 426 {
427 context.Keep = ParseExpression(reader.Value); 427 context.Keep = ParseExpression(reader.Value);
428 } 428 }
429 else 429 else
430 { 430 {
431 context.Keep = false; 431 context.Keep = false;
432 } 432 }
433 433
434 ignore = true; 434 ignore = true;
435 break; 435 break;
436 436
437 case "else": 437 case "else":
438 if(m_IfStack.Count == 0) 438 if(m_IfStack.Count == 0)
439 { 439 {
440 throw new WarningException("Unexpected 'else' outside of 'if'"); 440 throw new WarningException("Unexpected 'else' outside of 'if'");
441 } 441 }
442 else if(context.State != IfState.If && context.State != IfState.ElseIf) 442 else if(context.State != IfState.If && context.State != IfState.ElseIf)
443 { 443 {
444 throw new WarningException("Unexpected 'else' outside of 'if'"); 444 throw new WarningException("Unexpected 'else' outside of 'if'");
445 } 445 }
446 446
447 context.State = IfState.Else; 447 context.State = IfState.Else;
448 context.Keep = !context.EverKept; 448 context.Keep = !context.EverKept;
449 ignore = true; 449 ignore = true;
450 break; 450 break;
451 451
452 case "endif": 452 case "endif":
453 if(m_IfStack.Count == 0) 453 if(m_IfStack.Count == 0)
454 { 454 {
455 throw new WarningException("Unexpected 'endif' outside of 'if'"); 455 throw new WarningException("Unexpected 'endif' outside of 'if'");
456 } 456 }
457 457
458 context = (IfContext)m_IfStack.Pop(); 458 context = (IfContext)m_IfStack.Pop();
459 ignore = true; 459 ignore = true;
460 break; 460 break;
461 } 461 }
462 462
463 if(ignore) 463 if(ignore)
464 { 464 {
465 continue; 465 continue;
466 } 466 }
467 }//end pre-proc instruction 467 }//end pre-proc instruction
468 468
469 if(!context.Active || !context.Keep) 469 if(!context.Active || !context.Keep)
470 { 470 {
471 continue; 471 continue;
472 } 472 }
473 473
474 switch(reader.NodeType) 474 switch(reader.NodeType)
475 { 475 {
476 case XmlNodeType.Element: 476 case XmlNodeType.Element:
477 bool empty = reader.IsEmptyElement; 477 bool empty = reader.IsEmptyElement;
478 writer.WriteStartElement(reader.Name); 478 writer.WriteStartElement(reader.Name);
479 479
480 while (reader.MoveToNextAttribute()) 480 while (reader.MoveToNextAttribute())
481 { 481 {
482 writer.WriteAttributeString(reader.Name, reader.Value); 482 writer.WriteAttributeString(reader.Name, reader.Value);
483 } 483 }
484 484
485 if(empty) 485 if(empty)
486 { 486 {
487 writer.WriteEndElement(); 487 writer.WriteEndElement();
488 } 488 }
489 489
490 break; 490 break;
491 491
492 case XmlNodeType.EndElement: 492 case XmlNodeType.EndElement:
493 writer.WriteEndElement(); 493 writer.WriteEndElement();
494 break; 494 break;
495 495
496 case XmlNodeType.Text: 496 case XmlNodeType.Text:
497 writer.WriteString(reader.Value); 497 writer.WriteString(reader.Value);
498 break; 498 break;
499 499
500 case XmlNodeType.CDATA: 500 case XmlNodeType.CDATA:
501 writer.WriteCData(reader.Value); 501 writer.WriteCData(reader.Value);
502 break; 502 break;
503 503
504 default: 504 default:
505 break; 505 break;
506 } 506 }
507 } 507 }
508 508
509 if(m_IfStack.Count != 0) 509 if(m_IfStack.Count != 0)
510 { 510 {
511 throw new WarningException("Mismatched 'if', 'endif' pair"); 511 throw new WarningException("Mismatched 'if', 'endif' pair");
512 } 512 }
513 513
514 return xmlText.ToString(); 514 return xmlText.ToString();
515 } 515 }
516 516
517 #endregion 517 #endregion
518 } 518 }
519} 519}
diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs
index 2b4a678..cf575e3 100644
--- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs
+++ b/Prebuild/src/Core/Targets/AutotoolsTarget.cs
@@ -1,926 +1,926 @@
1#region BSD License 1#region BSD License
2/* 2/*
3 3
4Copyright (c) 2004 - 2006 4Copyright (c) 2004 - 2006
5Matthew Holmes (matthew@wildfiregames.com), 5Matthew Holmes (matthew@wildfiregames.com),
6Dan Moorehead (dan05a@gmail.com), 6Dan Moorehead (dan05a@gmail.com),
7Dave Hudson (jendave@yahoo.com), 7Dave Hudson (jendave@yahoo.com),
8C.J. Adams-Collier (cjcollier@colliertech.org), 8C.J. Adams-Collier (cjcollier@colliertech.org),
9 9
10Redistribution and use in source and binary forms, with or without 10Redistribution and use in source and binary forms, with or without
11modification, are permitted provided that the following conditions are 11modification, are permitted provided that the following conditions are
12met: 12met:
13 13
14* Redistributions of source code must retain the above copyright 14* Redistributions of source code must retain the above copyright
15notice, this list of conditions and the following disclaimer. 15notice, this list of conditions and the following disclaimer.
16 16
17* Redistributions in binary form must reproduce the above copyright 17* Redistributions in binary form must reproduce the above copyright
18notice, this list of conditions and the following disclaimer in the 18notice, this list of conditions and the following disclaimer in the
19documentation and/or other materials provided with the distribution. 19documentation and/or other materials provided with the distribution.
20 20
21* The name of the author may not be used to endorse or promote 21* The name of the author may not be used to endorse or promote
22products derived from this software without specific prior written 22products derived from this software without specific prior written
23permission. 23permission.
24 24
25THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 25THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 26IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 28DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
29INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 29INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 32HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 33STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
34IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35POSSIBILITY OF SUCH DAMAGE. 35POSSIBILITY OF SUCH DAMAGE.
36 36
37*/ 37*/
38#endregion 38#endregion
39 39
40#region CVS Information 40#region CVS Information
41/* 41/*
42 * $Source$ 42 * $Source$
43 * $Author: jendave $ 43 * $Author: jendave $
44 * $Date: 2006-07-28 22:43:24 -0700 (Fri, 28 Jul 2006) $ 44 * $Date: 2006-07-28 22:43:24 -0700 (Fri, 28 Jul 2006) $
45 * $Revision: 136 $ 45 * $Revision: 136 $
46 */ 46 */
47#endregion 47#endregion
48 48
49using System; 49using System;
50using System.Collections; 50using System.Collections;
51using System.Collections.Specialized; 51using System.Collections.Specialized;
52using System.IO; 52using System.IO;
53using System.Reflection; 53using System.Reflection;
54using System.Text; 54using System.Text;
55using System.Text.RegularExpressions; 55using System.Text.RegularExpressions;
56 56
57using Prebuild.Core.Attributes; 57using Prebuild.Core.Attributes;
58using Prebuild.Core.Interfaces; 58using Prebuild.Core.Interfaces;
59using Prebuild.Core.Nodes; 59using Prebuild.Core.Nodes;
60using Prebuild.Core.Parse; 60using Prebuild.Core.Parse;
61using Prebuild.Core.Utilities; 61using Prebuild.Core.Utilities;
62 62
63namespace Prebuild.Core.Targets 63namespace Prebuild.Core.Targets
64{ 64{
65 /// <summary> 65 /// <summary>
66 /// 66 ///
67 /// </summary> 67 /// </summary>
68 [Target("autotools")] 68 [Target("autotools")]
69 public class AutotoolsTarget : ITarget 69 public class AutotoolsTarget : ITarget
70 { 70 {
71 #region Fields 71 #region Fields
72 72
73 private Kernel m_Kernel; 73 private Kernel m_Kernel;
74 74
75 #endregion 75 #endregion
76 76
77 #region Private Methods 77 #region Private Methods
78 78
79 private static string PrependPath(string path) 79 private static string PrependPath(string path)
80 { 80 {
81 string tmpPath = Helper.NormalizePath(path, '/'); 81 string tmpPath = Helper.NormalizePath(path, '/');
82 Regex regex = new Regex(@"(\w):/(\w+)"); 82 Regex regex = new Regex(@"(\w):/(\w+)");
83 Match match = regex.Match(tmpPath); 83 Match match = regex.Match(tmpPath);
84 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 84 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
85 { 85 {
86 tmpPath = Helper.NormalizePath(tmpPath); 86 tmpPath = Helper.NormalizePath(tmpPath);
87 } 87 }
88 else 88 else
89 { 89 {
90 tmpPath = Helper.NormalizePath("./" + tmpPath); 90 tmpPath = Helper.NormalizePath("./" + tmpPath);
91 } 91 }
92 92
93 return tmpPath; 93 return tmpPath;
94 } 94 }
95 95
96 private static string BuildReference(SolutionNode solution, ReferenceNode refr) 96 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
97 { 97 {
98 string ret = ""; 98 string ret = "";
99 if(solution.ProjectsTable.ContainsKey(refr.Name)) 99 if(solution.ProjectsTable.ContainsKey(refr.Name))
100 { 100 {
101 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; 101 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
102 string fileRef = FindFileReference(refr.Name, project); 102 string fileRef = FindFileReference(refr.Name, project);
103 string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/$(BUILD_DIR)/$(CONFIG)/", refr.Name, "dll"), '/'); 103 string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/$(BUILD_DIR)/$(CONFIG)/", refr.Name, "dll"), '/');
104 ret += finalPath; 104 ret += finalPath;
105 return ret; 105 return ret;
106 } 106 }
107 else 107 else
108 { 108 {
109 ProjectNode project = (ProjectNode)refr.Parent; 109 ProjectNode project = (ProjectNode)refr.Parent;
110 string fileRef = FindFileReference(refr.Name, project); 110 string fileRef = FindFileReference(refr.Name, project);
111 111
112 if(refr.Path != null || fileRef != null) 112 if(refr.Path != null || fileRef != null)
113 { 113 {
114 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef; 114 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef;
115 ret += Path.Combine(project.Path, finalPath); 115 ret += Path.Combine(project.Path, finalPath);
116 return ret; 116 return ret;
117 } 117 }
118 118
119 try 119 try
120 { 120 {
121 //Assembly assem = Assembly.Load(refr.Name); 121 //Assembly assem = Assembly.Load(refr.Name);
122 //if (assem != null) 122 //if (assem != null)
123 //{ 123 //{
124 // int index = refr.Name.IndexOf(","); 124 // int index = refr.Name.IndexOf(",");
125 // if ( index > 0) 125 // if ( index > 0)
126 // { 126 // {
127 // ret += assem.Location; 127 // ret += assem.Location;
128 // //Console.WriteLine("Location1: " + assem.Location); 128 // //Console.WriteLine("Location1: " + assem.Location);
129 // } 129 // }
130 // else 130 // else
131 // { 131 // {
132 // ret += (refr.Name + ".dll"); 132 // ret += (refr.Name + ".dll");
133 // //Console.WriteLine("Location2: " + assem.Location); 133 // //Console.WriteLine("Location2: " + assem.Location);
134 // } 134 // }
135 //} 135 //}
136 //else 136 //else
137 //{ 137 //{
138 int index = refr.Name.IndexOf(","); 138 int index = refr.Name.IndexOf(",");
139 if ( index > 0) 139 if ( index > 0)
140 { 140 {
141 ret += refr.Name.Substring(0, index) + ".dll"; 141 ret += refr.Name.Substring(0, index) + ".dll";
142 //Console.WriteLine("Location3: " + assem.Location); 142 //Console.WriteLine("Location3: " + assem.Location);
143 } 143 }
144 else 144 else
145 { 145 {
146 ret += (refr.Name + ".dll"); 146 ret += (refr.Name + ".dll");
147 //Console.WriteLine("Location4: " + assem.Location); 147 //Console.WriteLine("Location4: " + assem.Location);
148 } 148 }
149 //} 149 //}
150 } 150 }
151 catch (System.NullReferenceException e) 151 catch (System.NullReferenceException e)
152 { 152 {
153 e.ToString(); 153 e.ToString();
154 int index = refr.Name.IndexOf(","); 154 int index = refr.Name.IndexOf(",");
155 if ( index > 0) 155 if ( index > 0)
156 { 156 {
157 ret += refr.Name.Substring(0, index) + ".dll"; 157 ret += refr.Name.Substring(0, index) + ".dll";
158 //Console.WriteLine("Location5: " + assem.Location); 158 //Console.WriteLine("Location5: " + assem.Location);
159 } 159 }
160 else 160 else
161 { 161 {
162 ret += (refr.Name + ".dll"); 162 ret += (refr.Name + ".dll");
163 //Console.WriteLine("Location6: " + assem.Location); 163 //Console.WriteLine("Location6: " + assem.Location);
164 } 164 }
165 } 165 }
166 } 166 }
167 return ret; 167 return ret;
168 } 168 }
169 169
170 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr) 170 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr)
171 { 171 {
172 string ret = ""; 172 string ret = "";
173 if(solution.ProjectsTable.ContainsKey(refr.Name)) 173 if(solution.ProjectsTable.ContainsKey(refr.Name))
174 { 174 {
175 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; 175 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
176 string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/'); 176 string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/');
177 ret += finalPath; 177 ret += finalPath;
178 return ret; 178 return ret;
179 } 179 }
180 else 180 else
181 { 181 {
182 ProjectNode project = (ProjectNode)refr.Parent; 182 ProjectNode project = (ProjectNode)refr.Parent;
183 string fileRef = FindFileReference(refr.Name, project); 183 string fileRef = FindFileReference(refr.Name, project);
184 184
185 185
186 if(refr.Path != null || fileRef != null) 186 if(refr.Path != null || fileRef != null)
187 { 187 {
188 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef; 188 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef;
189 ret += finalPath; 189 ret += finalPath;
190 return ret; 190 return ret;
191 } 191 }
192 192
193 try 193 try
194 { 194 {
195 Assembly assem = Assembly.Load(refr.Name); 195 Assembly assem = Assembly.Load(refr.Name);
196 if (assem != null) 196 if (assem != null)
197 { 197 {
198 ret += ""; 198 ret += "";
199 } 199 }
200 else 200 else
201 { 201 {
202 ret += ""; 202 ret += "";
203 } 203 }
204 } 204 }
205 catch (System.NullReferenceException e) 205 catch (System.NullReferenceException e)
206 { 206 {
207 e.ToString(); 207 e.ToString();
208 ret += ""; 208 ret += "";
209 } 209 }
210 } 210 }
211 return ret; 211 return ret;
212 } 212 }
213 213
214 private static string FindFileReference(string refName, ProjectNode project) 214 private static string FindFileReference(string refName, ProjectNode project)
215 { 215 {
216 foreach(ReferencePathNode refPath in project.ReferencePaths) 216 foreach(ReferencePathNode refPath in project.ReferencePaths)
217 { 217 {
218 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 218 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
219 219
220 if(File.Exists(fullPath)) 220 if(File.Exists(fullPath))
221 { 221 {
222 return fullPath; 222 return fullPath;
223 } 223 }
224 } 224 }
225 225
226 return null; 226 return null;
227 } 227 }
228 228
229 /// <summary> 229 /// <summary>
230 /// Gets the XML doc file. 230 /// Gets the XML doc file.
231 /// </summary> 231 /// </summary>
232 /// <param name="project">The project.</param> 232 /// <param name="project">The project.</param>
233 /// <param name="conf">The conf.</param> 233 /// <param name="conf">The conf.</param>
234 /// <returns></returns> 234 /// <returns></returns>
235 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) 235 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
236 { 236 {
237 if( conf == null ) 237 if( conf == null )
238 { 238 {
239 throw new ArgumentNullException("conf"); 239 throw new ArgumentNullException("conf");
240 } 240 }
241 if( project == null ) 241 if( project == null )
242 { 242 {
243 throw new ArgumentNullException("project"); 243 throw new ArgumentNullException("project");
244 } 244 }
245 string docFile = (string)conf.Options["XmlDocFile"]; 245 string docFile = (string)conf.Options["XmlDocFile"];
246 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 246 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
247 // { 247 // {
248 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; 248 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
249 // } 249 // }
250 return docFile; 250 return docFile;
251 } 251 }
252 252
253 /// <summary> 253 /// <summary>
254 /// Normalizes the path. 254 /// Normalizes the path.
255 /// </summary> 255 /// </summary>
256 /// <param name="path">The path.</param> 256 /// <param name="path">The path.</param>
257 /// <returns></returns> 257 /// <returns></returns>
258 public static string NormalizePath(string path) 258 public static string NormalizePath(string path)
259 { 259 {
260 if(path == null) 260 if(path == null)
261 { 261 {
262 return ""; 262 return "";
263 } 263 }
264 264
265 StringBuilder tmpPath; 265 StringBuilder tmpPath;
266 266
267 if (Core.Parse.Preprocessor.GetOS() == "Win32") 267 if (Core.Parse.Preprocessor.GetOS() == "Win32")
268 { 268 {
269 tmpPath = new StringBuilder(path.Replace('\\', '/')); 269 tmpPath = new StringBuilder(path.Replace('\\', '/'));
270 tmpPath.Replace("/", @"\\"); 270 tmpPath.Replace("/", @"\\");
271 } 271 }
272 else 272 else
273 { 273 {
274 tmpPath = new StringBuilder(path.Replace('\\', '/')); 274 tmpPath = new StringBuilder(path.Replace('\\', '/'));
275 tmpPath = tmpPath.Replace('/', Path.DirectorySeparatorChar); 275 tmpPath = tmpPath.Replace('/', Path.DirectorySeparatorChar);
276 } 276 }
277 return tmpPath.ToString(); 277 return tmpPath.ToString();
278 } 278 }
279 279
280 private void WriteProject(SolutionNode solution, ProjectNode project) 280 private void WriteProject(SolutionNode solution, ProjectNode project)
281 { 281 {
282 string projFile = Helper.MakeFilePath(project.FullPath, "Include", "am"); 282 string projFile = Helper.MakeFilePath(project.FullPath, "Include", "am");
283 StreamWriter ss = new StreamWriter(projFile); 283 StreamWriter ss = new StreamWriter(projFile);
284 ss.NewLine = "\n"; 284 ss.NewLine = "\n";
285 285
286 m_Kernel.CurrentWorkingDirectory.Push(); 286 m_Kernel.CurrentWorkingDirectory.Push();
287 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 287 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
288 288
289 using(ss) 289 using(ss)
290 { 290 {
291 ss.WriteLine(Helper.AssemblyFullName(project.AssemblyName, project.Type) + ":"); 291 ss.WriteLine(Helper.AssemblyFullName(project.AssemblyName, project.Type) + ":");
292 ss.WriteLine("\tmkdir -p " + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/"); 292 ss.WriteLine("\tmkdir -p " + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/");
293 foreach(string file in project.Files) 293 foreach(string file in project.Files)
294 { 294 {
295 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 295 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
296 { 296 {
297 ss.Write("\tresgen "); 297 ss.Write("\tresgen ");
298 ss.Write(Helper.NormalizePath(Path.Combine(project.Path, file.Substring(0, file.LastIndexOf('.')) + ".resx "), '/')); 298 ss.Write(Helper.NormalizePath(Path.Combine(project.Path, file.Substring(0, file.LastIndexOf('.')) + ".resx "), '/'));
299 if (project.Files.GetResourceName(file) != "") 299 if (project.Files.GetResourceName(file) != "")
300 { 300 {
301 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/')); 301 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/'));
302 } 302 }
303 else 303 else
304 { 304 {
305 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/')); 305 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/'));
306 } 306 }
307 } 307 }
308 } 308 }
309 ss.WriteLine("\t$(CSC)\t/out:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " \\"); 309 ss.WriteLine("\t$(CSC)\t/out:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " \\");
310 ss.WriteLine("\t\t/target:" + project.Type.ToString().ToLower() + " \\"); 310 ss.WriteLine("\t\t/target:" + project.Type.ToString().ToLower() + " \\");
311 if (project.References.Count > 0) 311 if (project.References.Count > 0)
312 { 312 {
313 ss.Write("\t\t/reference:"); 313 ss.Write("\t\t/reference:");
314 bool firstref = true; 314 bool firstref = true;
315 foreach(ReferenceNode refr in project.References) 315 foreach(ReferenceNode refr in project.References)
316 { 316 {
317 if (firstref) 317 if (firstref)
318 { 318 {
319 firstref = false; 319 firstref = false;
320 } 320 }
321 else 321 else
322 { 322 {
323 ss.Write(","); 323 ss.Write(",");
324 } 324 }
325 ss.Write("{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(solution.FullPath, BuildReference(solution, refr)), '/')); 325 ss.Write("{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(solution.FullPath, BuildReference(solution, refr)), '/'));
326 } 326 }
327 ss.WriteLine(" \\"); 327 ss.WriteLine(" \\");
328 } 328 }
329 //ss.WriteLine("\t\tProperties/AssemblyInfo.cs \\"); 329 //ss.WriteLine("\t\tProperties/AssemblyInfo.cs \\");
330 330
331 foreach(string file in project.Files) 331 foreach(string file in project.Files)
332 { 332 {
333 switch(project.Files.GetBuildAction(file)) 333 switch(project.Files.GetBuildAction(file))
334 { 334 {
335 case BuildAction.EmbeddedResource: 335 case BuildAction.EmbeddedResource:
336 ss.Write("\t\t/resource:"); 336 ss.Write("\t\t/resource:");
337 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, file), '/') + " \\"); 337 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, file), '/') + " \\");
338 break; 338 break;
339 default: 339 default:
340 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 340 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
341 { 341 {
342 ss.Write("\t\t/resource:"); 342 ss.Write("\t\t/resource:");
343 if (project.Files.GetResourceName(file) != "") 343 if (project.Files.GetResourceName(file) != "")
344 { 344 {
345 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/') + "," + project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources" + " \\"); 345 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/') + "," + project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources" + " \\");
346 } 346 }
347 else 347 else
348 { 348 {
349 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/') + "," + project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources" + " \\"); 349 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/') + "," + project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources" + " \\");
350 } 350 }
351 } 351 }
352 break; 352 break;
353 } 353 }
354 } 354 }
355 355
356 foreach(ConfigurationNode conf in project.Configurations) 356 foreach(ConfigurationNode conf in project.Configurations)
357 { 357 {
358 if (conf.Options.KeyFile !="") 358 if (conf.Options.KeyFile !="")
359 { 359 {
360 ss.WriteLine("\t\t/keyfile:" + Helper.NormalizePath(Path.Combine(project.Path, conf.Options.KeyFile), '/') + " \\"); 360 ss.WriteLine("\t\t/keyfile:" + Helper.NormalizePath(Path.Combine(project.Path, conf.Options.KeyFile), '/') + " \\");
361 break; 361 break;
362 } 362 }
363 } 363 }
364 foreach(ConfigurationNode conf in project.Configurations) 364 foreach(ConfigurationNode conf in project.Configurations)
365 { 365 {
366 if (conf.Options.AllowUnsafe) 366 if (conf.Options.AllowUnsafe)
367 { 367 {
368 ss.WriteLine("\t\t/unsafe \\"); 368 ss.WriteLine("\t\t/unsafe \\");
369 break; 369 break;
370 } 370 }
371 } 371 }
372 if (project.AppIcon != "") 372 if (project.AppIcon != "")
373 { 373 {
374 ss.WriteLine("\t\t/win32icon:" + Helper.NormalizePath(Path.Combine(project.Path, project.AppIcon), '/') + " \\"); 374 ss.WriteLine("\t\t/win32icon:" + Helper.NormalizePath(Path.Combine(project.Path, project.AppIcon), '/') + " \\");
375 } 375 }
376 376
377 foreach(ConfigurationNode conf in project.Configurations) 377 foreach(ConfigurationNode conf in project.Configurations)
378 { 378 {
379 ss.WriteLine("\t\t/define:{0}", conf.Options.CompilerDefines.Replace(';', ',') + " \\"); 379 ss.WriteLine("\t\t/define:{0}", conf.Options.CompilerDefines.Replace(';', ',') + " \\");
380 break; 380 break;
381 } 381 }
382 382
383 foreach(ConfigurationNode conf in project.Configurations) 383 foreach(ConfigurationNode conf in project.Configurations)
384 { 384 {
385 if (GetXmlDocFile(project, conf) !="") 385 if (GetXmlDocFile(project, conf) !="")
386 { 386 {
387 ss.WriteLine("\t\t/doc:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + project.Name + ".xml \\"); 387 ss.WriteLine("\t\t/doc:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + project.Name + ".xml \\");
388 break; 388 break;
389 } 389 }
390 } 390 }
391 foreach(string file in project.Files) 391 foreach(string file in project.Files)
392 { 392 {
393 switch(project.Files.GetBuildAction(file)) 393 switch(project.Files.GetBuildAction(file))
394 { 394 {
395 case BuildAction.Compile: 395 case BuildAction.Compile:
396 ss.WriteLine("\t\t\\"); 396 ss.WriteLine("\t\t\\");
397 ss.Write("\t\t" + NormalizePath(Path.Combine(Helper.MakePathRelativeTo(solution.FullPath, project.Path), file))); 397 ss.Write("\t\t" + NormalizePath(Path.Combine(Helper.MakePathRelativeTo(solution.FullPath, project.Path), file)));
398 break; 398 break;
399 default: 399 default:
400 break; 400 break;
401 } 401 }
402 } 402 }
403 ss.WriteLine(); 403 ss.WriteLine();
404 ss.WriteLine(); 404 ss.WriteLine();
405 405
406 if (project.Type == ProjectType.Library) 406 if (project.Type == ProjectType.Library)
407 { 407 {
408 ss.WriteLine("install-data-local:"); 408 ss.WriteLine("install-data-local:");
409 ss.WriteLine(" echo \"$(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS)\"; \\"); 409 ss.WriteLine(" echo \"$(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS)\"; \\");
410 ss.WriteLine(" $(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS) || exit 1;"); 410 ss.WriteLine(" $(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS) || exit 1;");
411 ss.WriteLine(); 411 ss.WriteLine();
412 ss.WriteLine("uninstall-local:"); 412 ss.WriteLine("uninstall-local:");
413 ss.WriteLine(" echo \"$(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS)\"; \\"); 413 ss.WriteLine(" echo \"$(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS)\"; \\");
414 ss.WriteLine(" $(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS) || exit 1;"); 414 ss.WriteLine(" $(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS) || exit 1;");
415 ss.WriteLine(); 415 ss.WriteLine();
416 } 416 }
417 ss.WriteLine("CLEANFILES = $(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".mdb $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".pdb " + project.AssemblyName + ".xml"); 417 ss.WriteLine("CLEANFILES = $(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".mdb $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".pdb " + project.AssemblyName + ".xml");
418 ss.WriteLine("EXTRA_DIST = \\"); 418 ss.WriteLine("EXTRA_DIST = \\");
419 ss.Write(" $(FILES)"); 419 ss.Write(" $(FILES)");
420 foreach(ConfigurationNode conf in project.Configurations) 420 foreach(ConfigurationNode conf in project.Configurations)
421 { 421 {
422 if (conf.Options.KeyFile != "") 422 if (conf.Options.KeyFile != "")
423 { 423 {
424 ss.Write(" \\"); 424 ss.Write(" \\");
425 ss.WriteLine("\t" + conf.Options.KeyFile); 425 ss.WriteLine("\t" + conf.Options.KeyFile);
426 } 426 }
427 break; 427 break;
428 } 428 }
429 } 429 }
430 m_Kernel.CurrentWorkingDirectory.Pop(); 430 m_Kernel.CurrentWorkingDirectory.Pop();
431 } 431 }
432 bool hasLibrary = false; 432 bool hasLibrary = false;
433 433
434 private void WriteCombine(SolutionNode solution) 434 private void WriteCombine(SolutionNode solution)
435 { 435 {
436 436
437 /* TODO: These vars should be pulled from the prebuild.xml file */ 437 /* TODO: These vars should be pulled from the prebuild.xml file */
438 string releaseVersion = "2.0.0"; 438 string releaseVersion = "2.0.0";
439 string assemblyVersion = "2.1.0.0"; 439 string assemblyVersion = "2.1.0.0";
440 string description = 440 string description =
441 "Tao Framework " + solution.Name + " Binding For .NET"; 441 "Tao Framework " + solution.Name + " Binding For .NET";
442 442
443 hasLibrary = false; 443 hasLibrary = false;
444 m_Kernel.Log.Write("Creating Autotools make files"); 444 m_Kernel.Log.Write("Creating Autotools make files");
445 foreach(ProjectNode project in solution.Projects) 445 foreach(ProjectNode project in solution.Projects)
446 { 446 {
447 if(m_Kernel.AllowProject(project.FilterGroups)) 447 if(m_Kernel.AllowProject(project.FilterGroups))
448 { 448 {
449 m_Kernel.Log.Write("...Creating makefile: {0}", project.Name); 449 m_Kernel.Log.Write("...Creating makefile: {0}", project.Name);
450 WriteProject(solution, project); 450 WriteProject(solution, project);
451 } 451 }
452 } 452 }
453 453
454 m_Kernel.Log.Write(""); 454 m_Kernel.Log.Write("");
455 string combFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am"); 455 string combFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am");
456 StreamWriter ss = new StreamWriter(combFile); 456 StreamWriter ss = new StreamWriter(combFile);
457 ss.NewLine = "\n"; 457 ss.NewLine = "\n";
458 458
459 m_Kernel.CurrentWorkingDirectory.Push(); 459 m_Kernel.CurrentWorkingDirectory.Push();
460 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 460 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
461 461
462 using(ss) 462 using(ss)
463 { 463 {
464 foreach(ProjectNode project in solution.ProjectsTableOrder) 464 foreach(ProjectNode project in solution.ProjectsTableOrder)
465 { 465 {
466 if (project.Type == ProjectType.Library) 466 if (project.Type == ProjectType.Library)
467 { 467 {
468 hasLibrary = true; 468 hasLibrary = true;
469 break; 469 break;
470 } 470 }
471 } 471 }
472 472
473 if (hasLibrary) 473 if (hasLibrary)
474 { 474 {
475 ss.Write("pkgconfig_in_files = "); 475 ss.Write("pkgconfig_in_files = ");
476 foreach(ProjectNode project in solution.ProjectsTableOrder) 476 foreach(ProjectNode project in solution.ProjectsTableOrder)
477 { 477 {
478 if (project.Type == ProjectType.Library) 478 if (project.Type == ProjectType.Library)
479 { 479 {
480 string combFilepc = Helper.MakeFilePath(solution.FullPath, project.Name, "pc.in"); 480 string combFilepc = Helper.MakeFilePath(solution.FullPath, project.Name, "pc.in");
481 ss.Write(" " + project.Name + ".pc.in "); 481 ss.Write(" " + project.Name + ".pc.in ");
482 StreamWriter sspc = new StreamWriter(combFilepc); 482 StreamWriter sspc = new StreamWriter(combFilepc);
483 sspc.NewLine = "\n"; 483 sspc.NewLine = "\n";
484 using(sspc) 484 using(sspc)
485 { 485 {
486 sspc.WriteLine("prefix=@prefix@"); 486 sspc.WriteLine("prefix=@prefix@");
487 sspc.WriteLine("exec_prefix=${prefix}"); 487 sspc.WriteLine("exec_prefix=${prefix}");
488 sspc.WriteLine("libdir=${exec_prefix}/lib"); 488 sspc.WriteLine("libdir=${exec_prefix}/lib");
489 sspc.WriteLine(); 489 sspc.WriteLine();
490 sspc.WriteLine("Name: @PACKAGE_NAME@"); 490 sspc.WriteLine("Name: @PACKAGE_NAME@");
491 sspc.WriteLine("Description: @DESCRIPTION@"); 491 sspc.WriteLine("Description: @DESCRIPTION@");
492 sspc.WriteLine("Version: @ASSEMBLY_VERSION@"); 492 sspc.WriteLine("Version: @ASSEMBLY_VERSION@");
493 sspc.WriteLine("Libs: -r:${libdir}/mono/gac/@PACKAGE_NAME@/@ASSEMBLY_VERSION@__@PUBKEY@/@PACKAGE_NAME@.dll"); 493 sspc.WriteLine("Libs: -r:${libdir}/mono/gac/@PACKAGE_NAME@/@ASSEMBLY_VERSION@__@PUBKEY@/@PACKAGE_NAME@.dll");
494 } 494 }
495 } 495 }
496 } 496 }
497 497
498 ss.WriteLine(); 498 ss.WriteLine();
499 ss.WriteLine("pkgconfigdir=$(prefix)/lib/pkgconfig"); 499 ss.WriteLine("pkgconfigdir=$(prefix)/lib/pkgconfig");
500 ss.WriteLine("pkgconfig_DATA=$(pkgconfig_in_files:.pc.in=.pc)"); 500 ss.WriteLine("pkgconfig_DATA=$(pkgconfig_in_files:.pc.in=.pc)");
501 } 501 }
502 ss.WriteLine(); 502 ss.WriteLine();
503 foreach(ProjectNode project in solution.ProjectsTableOrder) 503 foreach(ProjectNode project in solution.ProjectsTableOrder)
504 { 504 {
505 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 505 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
506 ss.WriteLine("-include x {0}", 506 ss.WriteLine("-include x {0}",
507 Helper.NormalizePath(Helper.MakeFilePath(path, "Include", "am"),'/')); 507 Helper.NormalizePath(Helper.MakeFilePath(path, "Include", "am"),'/'));
508 } 508 }
509 ss.WriteLine(); 509 ss.WriteLine();
510 ss.WriteLine("all: \\"); 510 ss.WriteLine("all: \\");
511 ss.Write("\t"); 511 ss.Write("\t");
512 foreach(ProjectNode project in solution.ProjectsTableOrder) 512 foreach(ProjectNode project in solution.ProjectsTableOrder)
513 { 513 {
514 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 514 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
515 ss.Write(Helper.AssemblyFullName(project.AssemblyName, project.Type) + " "); 515 ss.Write(Helper.AssemblyFullName(project.AssemblyName, project.Type) + " ");
516 516
517 } 517 }
518 ss.WriteLine(); 518 ss.WriteLine();
519 if (hasLibrary) 519 if (hasLibrary)
520 { 520 {
521 ss.WriteLine("EXTRA_DIST = \\"); 521 ss.WriteLine("EXTRA_DIST = \\");
522 ss.WriteLine("\t$(pkgconfig_in_files)"); 522 ss.WriteLine("\t$(pkgconfig_in_files)");
523 } 523 }
524 else 524 else
525 { 525 {
526 ss.WriteLine("EXTRA_DIST = "); 526 ss.WriteLine("EXTRA_DIST = ");
527 } 527 }
528 ss.WriteLine(); 528 ss.WriteLine();
529 ss.WriteLine("DISTCLEANFILES = \\"); 529 ss.WriteLine("DISTCLEANFILES = \\");
530 ss.WriteLine("\tconfigure \\"); 530 ss.WriteLine("\tconfigure \\");
531 ss.WriteLine("\tMakefile.in \\"); 531 ss.WriteLine("\tMakefile.in \\");
532 ss.WriteLine("\taclocal.m4"); 532 ss.WriteLine("\taclocal.m4");
533 } 533 }
534 combFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac"); 534 combFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac");
535 StreamWriter ts = new StreamWriter(combFile); 535 StreamWriter ts = new StreamWriter(combFile);
536 ts.NewLine = "\n"; 536 ts.NewLine = "\n";
537 using(ts) 537 using(ts)
538 { 538 {
539 if (this.hasLibrary) 539 if (this.hasLibrary)
540 { 540 {
541 foreach(ProjectNode project in solution.ProjectsTableOrder) 541 foreach(ProjectNode project in solution.ProjectsTableOrder)
542 { 542 {
543 if (project.Type == ProjectType.Library) 543 if (project.Type == ProjectType.Library)
544 { 544 {
545 ts.WriteLine("AC_INIT(" + project.Name + ".pc.in)"); 545 ts.WriteLine("AC_INIT(" + project.Name + ".pc.in)");
546 break; 546 break;
547 } 547 }
548 } 548 }
549 } 549 }
550 else 550 else
551 { 551 {
552 ts.WriteLine("AC_INIT(Makefile.am)"); 552 ts.WriteLine("AC_INIT(Makefile.am)");
553 } 553 }
554 ts.WriteLine("AC_PREREQ(2.53)"); 554 ts.WriteLine("AC_PREREQ(2.53)");
555 ts.WriteLine("AC_CANONICAL_SYSTEM"); 555 ts.WriteLine("AC_CANONICAL_SYSTEM");
556 556
557 ts.WriteLine("PACKAGE_NAME={0}", solution.Name); 557 ts.WriteLine("PACKAGE_NAME={0}", solution.Name);
558 ts.WriteLine("PACKAGE_VERSION={0}", releaseVersion); 558 ts.WriteLine("PACKAGE_VERSION={0}", releaseVersion);
559 ts.WriteLine("DESCRIPTION=\"{0}\"", description); 559 ts.WriteLine("DESCRIPTION=\"{0}\"", description);
560 ts.WriteLine("AC_SUBST(DESCRIPTION)"); 560 ts.WriteLine("AC_SUBST(DESCRIPTION)");
561 ts.WriteLine("AM_INIT_AUTOMAKE([$PACKAGE_NAME],[$PACKAGE_VERSION],[$DESCRIPTION])"); 561 ts.WriteLine("AM_INIT_AUTOMAKE([$PACKAGE_NAME],[$PACKAGE_VERSION],[$DESCRIPTION])");
562 562
563 ts.WriteLine("ASSEMBLY_VERSION={0}", assemblyVersion); 563 ts.WriteLine("ASSEMBLY_VERSION={0}", assemblyVersion);
564 ts.WriteLine("AC_SUBST(ASSEMBLY_VERSION)"); 564 ts.WriteLine("AC_SUBST(ASSEMBLY_VERSION)");
565 565
566 ts.WriteLine("PUBKEY=`sn -t $PACKAGE_NAME.snk | grep 'Public Key Token' | awk -F: '{print $2}' | sed -e 's/^ //'`"); 566 ts.WriteLine("PUBKEY=`sn -t $PACKAGE_NAME.snk | grep 'Public Key Token' | awk -F: '{print $2}' | sed -e 's/^ //'`");
567 ts.WriteLine("AC_SUBST(PUBKEY)"); 567 ts.WriteLine("AC_SUBST(PUBKEY)");
568 568
569 ts.WriteLine(); 569 ts.WriteLine();
570 ts.WriteLine("AM_MAINTAINER_MODE"); 570 ts.WriteLine("AM_MAINTAINER_MODE");
571 ts.WriteLine(); 571 ts.WriteLine();
572 ts.WriteLine("dnl AC_PROG_INTLTOOL([0.25])"); 572 ts.WriteLine("dnl AC_PROG_INTLTOOL([0.25])");
573 ts.WriteLine(); 573 ts.WriteLine();
574 ts.WriteLine("AC_PROG_INSTALL"); 574 ts.WriteLine("AC_PROG_INSTALL");
575 ts.WriteLine(); 575 ts.WriteLine();
576 ts.WriteLine("MONO_REQUIRED_VERSION=1.1"); 576 ts.WriteLine("MONO_REQUIRED_VERSION=1.1");
577 ts.WriteLine(); 577 ts.WriteLine();
578 ts.WriteLine("AC_MSG_CHECKING([whether we're compiling from CVS])"); 578 ts.WriteLine("AC_MSG_CHECKING([whether we're compiling from CVS])");
579 ts.WriteLine("if test -f \"$srcdir/.cvs_version\" ; then"); 579 ts.WriteLine("if test -f \"$srcdir/.cvs_version\" ; then");
580 ts.WriteLine(" from_cvs=yes"); 580 ts.WriteLine(" from_cvs=yes");
581 ts.WriteLine("else"); 581 ts.WriteLine("else");
582 ts.WriteLine(" if test -f \"$srcdir/.svn\" ; then"); 582 ts.WriteLine(" if test -f \"$srcdir/.svn\" ; then");
583 ts.WriteLine(" from_cvs=yes"); 583 ts.WriteLine(" from_cvs=yes");
584 ts.WriteLine(" else"); 584 ts.WriteLine(" else");
585 ts.WriteLine(" from_cvs=no"); 585 ts.WriteLine(" from_cvs=no");
586 ts.WriteLine(" fi"); 586 ts.WriteLine(" fi");
587 ts.WriteLine("fi"); 587 ts.WriteLine("fi");
588 ts.WriteLine(); 588 ts.WriteLine();
589 ts.WriteLine("AC_MSG_RESULT($from_cvs)"); 589 ts.WriteLine("AC_MSG_RESULT($from_cvs)");
590 ts.WriteLine(); 590 ts.WriteLine();
591 ts.WriteLine("AC_PATH_PROG(MONO, mono)"); 591 ts.WriteLine("AC_PATH_PROG(MONO, mono)");
592 ts.WriteLine("AC_PATH_PROG(GMCS, gmcs)"); 592 ts.WriteLine("AC_PATH_PROG(GMCS, gmcs)");
593 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil)"); 593 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil)");
594 ts.WriteLine(); 594 ts.WriteLine();
595 ts.WriteLine("AC_MSG_CHECKING([for mono])"); 595 ts.WriteLine("AC_MSG_CHECKING([for mono])");
596 ts.WriteLine("dnl if test \"x$MONO\" = \"x\" ; then"); 596 ts.WriteLine("dnl if test \"x$MONO\" = \"x\" ; then");
597 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"mono\" in your PATH])"); 597 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"mono\" in your PATH])");
598 ts.WriteLine("dnl else"); 598 ts.WriteLine("dnl else");
599 ts.WriteLine(" AC_MSG_RESULT([found])"); 599 ts.WriteLine(" AC_MSG_RESULT([found])");
600 ts.WriteLine("dnl fi"); 600 ts.WriteLine("dnl fi");
601 ts.WriteLine(); 601 ts.WriteLine();
602 ts.WriteLine("AC_MSG_CHECKING([for gmcs])"); 602 ts.WriteLine("AC_MSG_CHECKING([for gmcs])");
603 ts.WriteLine("dnl if test \"x$GMCS\" = \"x\" ; then"); 603 ts.WriteLine("dnl if test \"x$GMCS\" = \"x\" ; then");
604 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"gmcs\" in your PATH])"); 604 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"gmcs\" in your PATH])");
605 ts.WriteLine("dnl else"); 605 ts.WriteLine("dnl else");
606 ts.WriteLine(" AC_MSG_RESULT([found])"); 606 ts.WriteLine(" AC_MSG_RESULT([found])");
607 ts.WriteLine("dnl fi"); 607 ts.WriteLine("dnl fi");
608 ts.WriteLine(); 608 ts.WriteLine();
609 //ts.WriteLine("AC_MSG_CHECKING([for gacutil])"); 609 //ts.WriteLine("AC_MSG_CHECKING([for gacutil])");
610 //ts.WriteLine("if test \"x$GACUTIL\" = \"x\" ; then"); 610 //ts.WriteLine("if test \"x$GACUTIL\" = \"x\" ; then");
611 //ts.WriteLine(" AC_MSG_ERROR([Can't find \"gacutil\" in your PATH])"); 611 //ts.WriteLine(" AC_MSG_ERROR([Can't find \"gacutil\" in your PATH])");
612 //ts.WriteLine("else"); 612 //ts.WriteLine("else");
613 //ts.WriteLine(" AC_MSG_RESULT([found])"); 613 //ts.WriteLine(" AC_MSG_RESULT([found])");
614 //ts.WriteLine("fi"); 614 //ts.WriteLine("fi");
615 ts.WriteLine(); 615 ts.WriteLine();
616 ts.WriteLine("AC_SUBST(PATH)"); 616 ts.WriteLine("AC_SUBST(PATH)");
617 ts.WriteLine("AC_SUBST(LD_LIBRARY_PATH)"); 617 ts.WriteLine("AC_SUBST(LD_LIBRARY_PATH)");
618 ts.WriteLine(); 618 ts.WriteLine();
619 ts.WriteLine("dnl CSFLAGS=\"-debug -nowarn:1574\""); 619 ts.WriteLine("dnl CSFLAGS=\"-debug -nowarn:1574\"");
620 ts.WriteLine("CSFLAGS=\"\""); 620 ts.WriteLine("CSFLAGS=\"\"");
621 ts.WriteLine("AC_SUBST(CSFLAGS)"); 621 ts.WriteLine("AC_SUBST(CSFLAGS)");
622 ts.WriteLine(); 622 ts.WriteLine();
623 // ts.WriteLine("AC_MSG_CHECKING(--disable-sdl argument)"); 623 // ts.WriteLine("AC_MSG_CHECKING(--disable-sdl argument)");
624 // ts.WriteLine("AC_ARG_ENABLE(sdl,"); 624 // ts.WriteLine("AC_ARG_ENABLE(sdl,");
625 // ts.WriteLine(" [ --disable-sdl Disable Sdl interface.],"); 625 // ts.WriteLine(" [ --disable-sdl Disable Sdl interface.],");
626 // ts.WriteLine(" [disable_sdl=$disableval],"); 626 // ts.WriteLine(" [disable_sdl=$disableval],");
627 // ts.WriteLine(" [disable_sdl=\"no\"])"); 627 // ts.WriteLine(" [disable_sdl=\"no\"])");
628 // ts.WriteLine("AC_MSG_RESULT($disable_sdl)"); 628 // ts.WriteLine("AC_MSG_RESULT($disable_sdl)");
629 // ts.WriteLine("if test \"$disable_sdl\" = \"yes\"; then"); 629 // ts.WriteLine("if test \"$disable_sdl\" = \"yes\"; then");
630 // ts.WriteLine(" AC_DEFINE(FEAT_SDL)"); 630 // ts.WriteLine(" AC_DEFINE(FEAT_SDL)");
631 // ts.WriteLine("fi"); 631 // ts.WriteLine("fi");
632 ts.WriteLine(); 632 ts.WriteLine();
633 ts.WriteLine("dnl Find pkg-config"); 633 ts.WriteLine("dnl Find pkg-config");
634 ts.WriteLine("AC_PATH_PROG(PKGCONFIG, pkg-config, no)"); 634 ts.WriteLine("AC_PATH_PROG(PKGCONFIG, pkg-config, no)");
635 ts.WriteLine("if test \"x$PKG_CONFIG\" = \"xno\"; then"); 635 ts.WriteLine("if test \"x$PKG_CONFIG\" = \"xno\"; then");
636 ts.WriteLine(" AC_MSG_ERROR([You need to install pkg-config])"); 636 ts.WriteLine(" AC_MSG_ERROR([You need to install pkg-config])");
637 ts.WriteLine("fi"); 637 ts.WriteLine("fi");
638 ts.WriteLine(); 638 ts.WriteLine();
639 ts.WriteLine("PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)"); 639 ts.WriteLine("PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)");
640 ts.WriteLine("BUILD_DIR=\"bin\""); 640 ts.WriteLine("BUILD_DIR=\"bin\"");
641 ts.WriteLine("AC_SUBST(BUILD_DIR)"); 641 ts.WriteLine("AC_SUBST(BUILD_DIR)");
642 ts.WriteLine("CONFIG=\"Release\""); 642 ts.WriteLine("CONFIG=\"Release\"");
643 ts.WriteLine("AC_SUBST(CONFIG)"); 643 ts.WriteLine("AC_SUBST(CONFIG)");
644 ts.WriteLine(); 644 ts.WriteLine();
645 ts.WriteLine("if test \"x$has_mono\" = \"xtrue\"; then"); 645 ts.WriteLine("if test \"x$has_mono\" = \"xtrue\"; then");
646 ts.WriteLine(" AC_PATH_PROG(RUNTIME, mono, no)"); 646 ts.WriteLine(" AC_PATH_PROG(RUNTIME, mono, no)");
647 ts.WriteLine(" AC_PATH_PROG(CSC, gmcs, no)"); 647 ts.WriteLine(" AC_PATH_PROG(CSC, gmcs, no)");
648 ts.WriteLine(" if test `uname -s` = \"Darwin\"; then"); 648 ts.WriteLine(" if test `uname -s` = \"Darwin\"; then");
649 ts.WriteLine(" LIB_PREFIX="); 649 ts.WriteLine(" LIB_PREFIX=");
650 ts.WriteLine(" LIB_SUFFIX=.dylib"); 650 ts.WriteLine(" LIB_SUFFIX=.dylib");
651 ts.WriteLine(" else"); 651 ts.WriteLine(" else");
652 ts.WriteLine(" LIB_PREFIX=.so"); 652 ts.WriteLine(" LIB_PREFIX=.so");
653 ts.WriteLine(" LIB_SUFFIX="); 653 ts.WriteLine(" LIB_SUFFIX=");
654 ts.WriteLine(" fi"); 654 ts.WriteLine(" fi");
655 ts.WriteLine("else"); 655 ts.WriteLine("else");
656 ts.WriteLine(" AC_PATH_PROG(CSC, csc.exe, no)"); 656 ts.WriteLine(" AC_PATH_PROG(CSC, csc.exe, no)");
657 ts.WriteLine(" if test x$CSC = \"xno\"; then"); 657 ts.WriteLine(" if test x$CSC = \"xno\"; then");
658 ts.WriteLine(" AC_MSG_ERROR([You need to install either mono or .Net])"); 658 ts.WriteLine(" AC_MSG_ERROR([You need to install either mono or .Net])");
659 ts.WriteLine(" else"); 659 ts.WriteLine(" else");
660 ts.WriteLine(" RUNTIME="); 660 ts.WriteLine(" RUNTIME=");
661 ts.WriteLine(" LIB_PREFIX="); 661 ts.WriteLine(" LIB_PREFIX=");
662 ts.WriteLine(" LIB_SUFFIX=.dylib"); 662 ts.WriteLine(" LIB_SUFFIX=.dylib");
663 ts.WriteLine(" fi"); 663 ts.WriteLine(" fi");
664 ts.WriteLine("fi"); 664 ts.WriteLine("fi");
665 ts.WriteLine(); 665 ts.WriteLine();
666 ts.WriteLine("AC_SUBST(LIB_PREFIX)"); 666 ts.WriteLine("AC_SUBST(LIB_PREFIX)");
667 ts.WriteLine("AC_SUBST(LIB_SUFFIX)"); 667 ts.WriteLine("AC_SUBST(LIB_SUFFIX)");
668 ts.WriteLine(); 668 ts.WriteLine();
669 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_CFLAGS)"); 669 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_CFLAGS)");
670 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_LIBS)"); 670 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_LIBS)");
671 ts.WriteLine(); 671 ts.WriteLine();
672 ts.WriteLine("dnl Find monodoc"); 672 ts.WriteLine("dnl Find monodoc");
673 ts.WriteLine("MONODOC_REQUIRED_VERSION=1.0"); 673 ts.WriteLine("MONODOC_REQUIRED_VERSION=1.0");
674 ts.WriteLine("AC_SUBST(MONODOC_REQUIRED_VERSION)"); 674 ts.WriteLine("AC_SUBST(MONODOC_REQUIRED_VERSION)");
675 ts.WriteLine("PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)"); 675 ts.WriteLine("PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)");
676 ts.WriteLine(); 676 ts.WriteLine();
677 ts.WriteLine("if test \"x$enable_monodoc\" = \"xyes\"; then"); 677 ts.WriteLine("if test \"x$enable_monodoc\" = \"xyes\"; then");
678 ts.WriteLine(" AC_PATH_PROG(MONODOC, monodoc, no)"); 678 ts.WriteLine(" AC_PATH_PROG(MONODOC, monodoc, no)");
679 ts.WriteLine(" if test x$MONODOC = xno; then"); 679 ts.WriteLine(" if test x$MONODOC = xno; then");
680 ts.WriteLine(" enable_monodoc=no"); 680 ts.WriteLine(" enable_monodoc=no");
681 ts.WriteLine(" fi"); 681 ts.WriteLine(" fi");
682 ts.WriteLine("else"); 682 ts.WriteLine("else");
683 ts.WriteLine(" MONODOC="); 683 ts.WriteLine(" MONODOC=");
684 ts.WriteLine("fi"); 684 ts.WriteLine("fi");
685 ts.WriteLine(); 685 ts.WriteLine();
686 ts.WriteLine("AC_SUBST(MONODOC)"); 686 ts.WriteLine("AC_SUBST(MONODOC)");
687 ts.WriteLine("AM_CONDITIONAL(ENABLE_MONODOC, test \"x$enable_monodoc\" = \"xyes\")"); 687 ts.WriteLine("AM_CONDITIONAL(ENABLE_MONODOC, test \"x$enable_monodoc\" = \"xyes\")");
688 ts.WriteLine(); 688 ts.WriteLine();
689 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil, no)"); 689 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil, no)");
690 ts.WriteLine("if test \"x$GACUTIL\" = \"xno\" ; then"); 690 ts.WriteLine("if test \"x$GACUTIL\" = \"xno\" ; then");
691 ts.WriteLine(" AC_MSG_ERROR([No gacutil tool found])"); 691 ts.WriteLine(" AC_MSG_ERROR([No gacutil tool found])");
692 ts.WriteLine("fi"); 692 ts.WriteLine("fi");
693 ts.WriteLine(); 693 ts.WriteLine();
694 // foreach(ProjectNode project in solution.ProjectsTableOrder) 694 // foreach(ProjectNode project in solution.ProjectsTableOrder)
695 // { 695 // {
696 // if (project.Type == ProjectType.Library) 696 // if (project.Type == ProjectType.Library)
697 // { 697 // {
698 // } 698 // }
699 // } 699 // }
700 ts.WriteLine("GACUTIL_FLAGS='/package $(PACKAGE_NAME) /gacdir $(DESTDIR)$(prefix)'"); 700 ts.WriteLine("GACUTIL_FLAGS='/package $(PACKAGE_NAME) /gacdir $(DESTDIR)$(prefix)'");
701 ts.WriteLine("AC_SUBST(GACUTIL_FLAGS)"); 701 ts.WriteLine("AC_SUBST(GACUTIL_FLAGS)");
702 ts.WriteLine(); 702 ts.WriteLine();
703 ts.WriteLine("winbuild=no"); 703 ts.WriteLine("winbuild=no");
704 ts.WriteLine("case \"$host\" in"); 704 ts.WriteLine("case \"$host\" in");
705 ts.WriteLine(" *-*-mingw*|*-*-cygwin*)"); 705 ts.WriteLine(" *-*-mingw*|*-*-cygwin*)");
706 ts.WriteLine(" winbuild=yes"); 706 ts.WriteLine(" winbuild=yes");
707 ts.WriteLine(" ;;"); 707 ts.WriteLine(" ;;");
708 ts.WriteLine("esac"); 708 ts.WriteLine("esac");
709 ts.WriteLine("AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)"); 709 ts.WriteLine("AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)");
710 ts.WriteLine(); 710 ts.WriteLine();
711 // ts.WriteLine("dnl Check for SDL"); 711 // ts.WriteLine("dnl Check for SDL");
712 // ts.WriteLine(); 712 // ts.WriteLine();
713 // ts.WriteLine("AC_PATH_PROG([SDL_CONFIG], [sdl-config])"); 713 // ts.WriteLine("AC_PATH_PROG([SDL_CONFIG], [sdl-config])");
714 // ts.WriteLine("have_sdl=no"); 714 // ts.WriteLine("have_sdl=no");
715 // ts.WriteLine("if test -n \"${SDL_CONFIG}\"; then"); 715 // ts.WriteLine("if test -n \"${SDL_CONFIG}\"; then");
716 // ts.WriteLine(" have_sdl=yes"); 716 // ts.WriteLine(" have_sdl=yes");
717 // ts.WriteLine(" SDL_CFLAGS=`$SDL_CONFIG --cflags`"); 717 // ts.WriteLine(" SDL_CFLAGS=`$SDL_CONFIG --cflags`");
718 // ts.WriteLine(" SDL_LIBS=`$SDL_CONFIG --libs`"); 718 // ts.WriteLine(" SDL_LIBS=`$SDL_CONFIG --libs`");
719 // ts.WriteLine(" #"); 719 // ts.WriteLine(" #");
720 // ts.WriteLine(" # sdl-config sometimes emits an rpath flag pointing at its library"); 720 // ts.WriteLine(" # sdl-config sometimes emits an rpath flag pointing at its library");
721 // ts.WriteLine(" # installation directory. We don't want this, as it prevents users from"); 721 // ts.WriteLine(" # installation directory. We don't want this, as it prevents users from");
722 // ts.WriteLine(" # linking sdl-viewer against, for example, a locally compiled libGL when a"); 722 // ts.WriteLine(" # linking sdl-viewer against, for example, a locally compiled libGL when a");
723 // ts.WriteLine(" # version of the library also exists in SDL's library installation"); 723 // ts.WriteLine(" # version of the library also exists in SDL's library installation");
724 // ts.WriteLine(" # directory, typically /usr/lib."); 724 // ts.WriteLine(" # directory, typically /usr/lib.");
725 // ts.WriteLine(" #"); 725 // ts.WriteLine(" #");
726 // ts.WriteLine(" SDL_LIBS=`echo $SDL_LIBS | sed 's/-Wl,-rpath,[[^ ]]* //'`"); 726 // ts.WriteLine(" SDL_LIBS=`echo $SDL_LIBS | sed 's/-Wl,-rpath,[[^ ]]* //'`");
727 // ts.WriteLine("fi"); 727 // ts.WriteLine("fi");
728 // ts.WriteLine("AC_SUBST([SDL_CFLAGS])"); 728 // ts.WriteLine("AC_SUBST([SDL_CFLAGS])");
729 // ts.WriteLine("AC_SUBST([SDL_LIBS])"); 729 // ts.WriteLine("AC_SUBST([SDL_LIBS])");
730 ts.WriteLine(); 730 ts.WriteLine();
731 ts.WriteLine("AC_OUTPUT(["); 731 ts.WriteLine("AC_OUTPUT([");
732 ts.WriteLine("Makefile"); 732 ts.WriteLine("Makefile");
733 // TODO: this does not work quite right. 733 // TODO: this does not work quite right.
734 //ts.WriteLine("Properties/AssemblyInfo.cs"); 734 //ts.WriteLine("Properties/AssemblyInfo.cs");
735 foreach(ProjectNode project in solution.ProjectsTableOrder) 735 foreach(ProjectNode project in solution.ProjectsTableOrder)
736 { 736 {
737 if (project.Type == ProjectType.Library) 737 if (project.Type == ProjectType.Library)
738 { 738 {
739 ts.WriteLine(project.Name + ".pc"); 739 ts.WriteLine(project.Name + ".pc");
740 } 740 }
741 // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 741 // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
742 // ts.WriteLine(Helper.NormalizePath(Helper.MakeFilePath(path, "Include"),'/')); 742 // ts.WriteLine(Helper.NormalizePath(Helper.MakeFilePath(path, "Include"),'/'));
743 } 743 }
744 ts.WriteLine("])"); 744 ts.WriteLine("])");
745 ts.WriteLine(); 745 ts.WriteLine();
746 ts.WriteLine("#po/Makefile.in"); 746 ts.WriteLine("#po/Makefile.in");
747 ts.WriteLine(); 747 ts.WriteLine();
748 ts.WriteLine("echo \"---\""); 748 ts.WriteLine("echo \"---\"");
749 ts.WriteLine("echo \"Configuration summary\""); 749 ts.WriteLine("echo \"Configuration summary\"");
750 ts.WriteLine("echo \"\""); 750 ts.WriteLine("echo \"\"");
751 ts.WriteLine("echo \" * Installation prefix: $prefix\""); 751 ts.WriteLine("echo \" * Installation prefix: $prefix\"");
752 ts.WriteLine("echo \" * compiler: $CSC\""); 752 ts.WriteLine("echo \" * compiler: $CSC\"");
753 ts.WriteLine("echo \" * Documentation: $enable_monodoc ($MONODOC)\""); 753 ts.WriteLine("echo \" * Documentation: $enable_monodoc ($MONODOC)\"");
754 ts.WriteLine("echo \" * Package Name: $PACKAGE_NAME\""); 754 ts.WriteLine("echo \" * Package Name: $PACKAGE_NAME\"");
755 ts.WriteLine("echo \" * Version: $PACKAGE_VERSION\""); 755 ts.WriteLine("echo \" * Version: $PACKAGE_VERSION\"");
756 ts.WriteLine("echo \" * Public Key: $PUBKEY\""); 756 ts.WriteLine("echo \" * Public Key: $PUBKEY\"");
757 ts.WriteLine("echo \"\""); 757 ts.WriteLine("echo \"\"");
758 ts.WriteLine("echo \"---\""); 758 ts.WriteLine("echo \"---\"");
759 ts.WriteLine(); 759 ts.WriteLine();
760 } 760 }
761 761
762 ts.NewLine = "\n"; 762 ts.NewLine = "\n";
763 foreach (ProjectNode project in solution.ProjectsTableOrder) 763 foreach (ProjectNode project in solution.ProjectsTableOrder)
764 { 764 {
765 if (project.GenerateAssemblyInfoFile) 765 if (project.GenerateAssemblyInfoFile)
766 { 766 {
767 GenerateAssemblyInfoFile(solution, combFile); 767 GenerateAssemblyInfoFile(solution, combFile);
768 } 768 }
769 } 769 }
770 } 770 }
771 771
772 private static void GenerateAssemblyInfoFile(SolutionNode solution, string combFile) 772 private static void GenerateAssemblyInfoFile(SolutionNode solution, string combFile)
773 { 773 {
774 System.IO.Directory.CreateDirectory(Helper.MakePathRelativeTo(solution.FullPath, "Properties")); 774 System.IO.Directory.CreateDirectory(Helper.MakePathRelativeTo(solution.FullPath, "Properties"));
775 combFile = Helper.MakeFilePath(solution.FullPath + "/Properties/", "AssemblyInfo.cs", "in"); 775 combFile = Helper.MakeFilePath(solution.FullPath + "/Properties/", "AssemblyInfo.cs", "in");
776 StreamWriter ai = new StreamWriter(combFile); 776 StreamWriter ai = new StreamWriter(combFile);
777 777
778 using (ai) 778 using (ai)
779 { 779 {
780 ai.WriteLine("#region License"); 780 ai.WriteLine("#region License");
781 ai.WriteLine("/*"); 781 ai.WriteLine("/*");
782 ai.WriteLine("MIT License"); 782 ai.WriteLine("MIT License");
783 ai.WriteLine("Copyright (c)2003-2006 Tao Framework Team"); 783 ai.WriteLine("Copyright (c)2003-2006 Tao Framework Team");
784 ai.WriteLine("http://www.taoframework.com"); 784 ai.WriteLine("http://www.taoframework.com");
785 ai.WriteLine("All rights reserved."); 785 ai.WriteLine("All rights reserved.");
786 ai.WriteLine(""); 786 ai.WriteLine("");
787 ai.WriteLine("Permission is hereby granted, free of charge, to any person obtaining a copy"); 787 ai.WriteLine("Permission is hereby granted, free of charge, to any person obtaining a copy");
788 ai.WriteLine("of this software and associated documentation files (the \"Software\"), to deal"); 788 ai.WriteLine("of this software and associated documentation files (the \"Software\"), to deal");
789 ai.WriteLine("in the Software without restriction, including without limitation the rights"); 789 ai.WriteLine("in the Software without restriction, including without limitation the rights");
790 ai.WriteLine("to use, copy, modify, merge, publish, distribute, sublicense, and/or sell"); 790 ai.WriteLine("to use, copy, modify, merge, publish, distribute, sublicense, and/or sell");
791 ai.WriteLine("copies of the Software, and to permit persons to whom the Software is"); 791 ai.WriteLine("copies of the Software, and to permit persons to whom the Software is");
792 ai.WriteLine("furnished to do so, subject to the following conditions:"); 792 ai.WriteLine("furnished to do so, subject to the following conditions:");
793 ai.WriteLine(""); 793 ai.WriteLine("");
794 ai.WriteLine("The above copyright notice and this permission notice shall be included in all"); 794 ai.WriteLine("The above copyright notice and this permission notice shall be included in all");
795 ai.WriteLine("copies or substantial portions of the Software."); 795 ai.WriteLine("copies or substantial portions of the Software.");
796 ai.WriteLine(""); 796 ai.WriteLine("");
797 ai.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR"); 797 ai.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR");
798 ai.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"); 798 ai.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
799 ai.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE"); 799 ai.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
800 ai.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER"); 800 ai.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER");
801 ai.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,"); 801 ai.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,");
802 ai.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE"); 802 ai.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE");
803 ai.WriteLine("SOFTWARE."); 803 ai.WriteLine("SOFTWARE.");
804 ai.WriteLine("*/"); 804 ai.WriteLine("*/");
805 ai.WriteLine("#endregion License"); 805 ai.WriteLine("#endregion License");
806 ai.WriteLine(""); 806 ai.WriteLine("");
807 ai.WriteLine("using System;"); 807 ai.WriteLine("using System;");
808 ai.WriteLine("using System.Reflection;"); 808 ai.WriteLine("using System.Reflection;");
809 ai.WriteLine("using System.Runtime.InteropServices;"); 809 ai.WriteLine("using System.Runtime.InteropServices;");
810 ai.WriteLine("using System.Security;"); 810 ai.WriteLine("using System.Security;");
811 ai.WriteLine("using System.Security.Permissions;"); 811 ai.WriteLine("using System.Security.Permissions;");
812 ai.WriteLine(""); 812 ai.WriteLine("");
813 ai.WriteLine("[assembly: AllowPartiallyTrustedCallers]"); 813 ai.WriteLine("[assembly: AllowPartiallyTrustedCallers]");
814 ai.WriteLine("[assembly: AssemblyCompany(\"Tao Framework -- http://www.taoframework.com\")]"); 814 ai.WriteLine("[assembly: AssemblyCompany(\"Tao Framework -- http://www.taoframework.com\")]");
815 ai.WriteLine("[assembly: AssemblyConfiguration(\"Retail\")]"); 815 ai.WriteLine("[assembly: AssemblyConfiguration(\"Retail\")]");
816 ai.WriteLine("[assembly: AssemblyCopyright(\"Copyright (c)2003-2006 Tao Framework Team. All rights reserved.\")]"); 816 ai.WriteLine("[assembly: AssemblyCopyright(\"Copyright (c)2003-2006 Tao Framework Team. All rights reserved.\")]");
817 ai.WriteLine("[assembly: AssemblyCulture(\"\")]"); 817 ai.WriteLine("[assembly: AssemblyCulture(\"\")]");
818 ai.WriteLine("[assembly: AssemblyDefaultAlias(\"@PACKAGE_NAME@\")]"); 818 ai.WriteLine("[assembly: AssemblyDefaultAlias(\"@PACKAGE_NAME@\")]");
819 ai.WriteLine("[assembly: AssemblyDelaySign(false)]"); 819 ai.WriteLine("[assembly: AssemblyDelaySign(false)]");
820 ai.WriteLine("[assembly: AssemblyDescription(\"@DESCRIPTION@\")]"); 820 ai.WriteLine("[assembly: AssemblyDescription(\"@DESCRIPTION@\")]");
821 ai.WriteLine("[assembly: AssemblyFileVersion(\"@ASSEMBLY_VERSION@\")]"); 821 ai.WriteLine("[assembly: AssemblyFileVersion(\"@ASSEMBLY_VERSION@\")]");
822 ai.WriteLine("[assembly: AssemblyInformationalVersion(\"@ASSEMBLY_VERSION@\")]"); 822 ai.WriteLine("[assembly: AssemblyInformationalVersion(\"@ASSEMBLY_VERSION@\")]");
823 ai.WriteLine("[assembly: AssemblyKeyName(\"\")]"); 823 ai.WriteLine("[assembly: AssemblyKeyName(\"\")]");
824 ai.WriteLine("[assembly: AssemblyProduct(\"@PACKAGE_NAME@.dll\")]"); 824 ai.WriteLine("[assembly: AssemblyProduct(\"@PACKAGE_NAME@.dll\")]");
825 ai.WriteLine("[assembly: AssemblyTitle(\"@DESCRIPTION@\")]"); 825 ai.WriteLine("[assembly: AssemblyTitle(\"@DESCRIPTION@\")]");
826 ai.WriteLine("[assembly: AssemblyTrademark(\"Tao Framework -- http://www.taoframework.com\")]"); 826 ai.WriteLine("[assembly: AssemblyTrademark(\"Tao Framework -- http://www.taoframework.com\")]");
827 ai.WriteLine("[assembly: AssemblyVersion(\"@ASSEMBLY_VERSION@\")]"); 827 ai.WriteLine("[assembly: AssemblyVersion(\"@ASSEMBLY_VERSION@\")]");
828 ai.WriteLine("[assembly: CLSCompliant(true)]"); 828 ai.WriteLine("[assembly: CLSCompliant(true)]");
829 ai.WriteLine("[assembly: ComVisible(false)]"); 829 ai.WriteLine("[assembly: ComVisible(false)]");
830 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]"); 830 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]");
831 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]"); 831 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]");
832 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]"); 832 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]");
833 833
834 } 834 }
835 //return combFile; 835 //return combFile;
836 } 836 }
837 837
838 private void CleanProject(ProjectNode project) 838 private void CleanProject(ProjectNode project)
839 { 839 {
840 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 840 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
841 string projectFile = Helper.MakeFilePath(project.FullPath, "Include", "am"); 841 string projectFile = Helper.MakeFilePath(project.FullPath, "Include", "am");
842 Helper.DeleteIfExists(projectFile); 842 Helper.DeleteIfExists(projectFile);
843 } 843 }
844 844
845 private void CleanSolution(SolutionNode solution) 845 private void CleanSolution(SolutionNode solution)
846 { 846 {
847 m_Kernel.Log.Write("Cleaning Autotools make files for", solution.Name); 847 m_Kernel.Log.Write("Cleaning Autotools make files for", solution.Name);
848 848
849 string slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am"); 849 string slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am");
850 Helper.DeleteIfExists(slnFile); 850 Helper.DeleteIfExists(slnFile);
851 851
852 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "in"); 852 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "in");
853 Helper.DeleteIfExists(slnFile); 853 Helper.DeleteIfExists(slnFile);
854 854
855 slnFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac"); 855 slnFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac");
856 Helper.DeleteIfExists(slnFile); 856 Helper.DeleteIfExists(slnFile);
857 857
858 slnFile = Helper.MakeFilePath(solution.FullPath, "configure"); 858 slnFile = Helper.MakeFilePath(solution.FullPath, "configure");
859 Helper.DeleteIfExists(slnFile); 859 Helper.DeleteIfExists(slnFile);
860 860
861 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile"); 861 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile");
862 Helper.DeleteIfExists(slnFile); 862 Helper.DeleteIfExists(slnFile);
863 863
864 foreach(ProjectNode project in solution.Projects) 864 foreach(ProjectNode project in solution.Projects)
865 { 865 {
866 CleanProject(project); 866 CleanProject(project);
867 } 867 }
868 868
869 m_Kernel.Log.Write(""); 869 m_Kernel.Log.Write("");
870 } 870 }
871 871
872 #endregion 872 #endregion
873 873
874 #region ITarget Members 874 #region ITarget Members
875 875
876 /// <summary> 876 /// <summary>
877 /// Writes the specified kern. 877 /// Writes the specified kern.
878 /// </summary> 878 /// </summary>
879 /// <param name="kern">The kern.</param> 879 /// <param name="kern">The kern.</param>
880 public void Write(Kernel kern) 880 public void Write(Kernel kern)
881 { 881 {
882 if( kern == null ) 882 if( kern == null )
883 { 883 {
884 throw new ArgumentNullException("kern"); 884 throw new ArgumentNullException("kern");
885 } 885 }
886 m_Kernel = kern; 886 m_Kernel = kern;
887 foreach(SolutionNode solution in kern.Solutions) 887 foreach(SolutionNode solution in kern.Solutions)
888 { 888 {
889 WriteCombine(solution); 889 WriteCombine(solution);
890 } 890 }
891 m_Kernel = null; 891 m_Kernel = null;
892 } 892 }
893 893
894 /// <summary> 894 /// <summary>
895 /// Cleans the specified kern. 895 /// Cleans the specified kern.
896 /// </summary> 896 /// </summary>
897 /// <param name="kern">The kern.</param> 897 /// <param name="kern">The kern.</param>
898 public virtual void Clean(Kernel kern) 898 public virtual void Clean(Kernel kern)
899 { 899 {
900 if( kern == null ) 900 if( kern == null )
901 { 901 {
902 throw new ArgumentNullException("kern"); 902 throw new ArgumentNullException("kern");
903 } 903 }
904 m_Kernel = kern; 904 m_Kernel = kern;
905 foreach(SolutionNode sol in kern.Solutions) 905 foreach(SolutionNode sol in kern.Solutions)
906 { 906 {
907 CleanSolution(sol); 907 CleanSolution(sol);
908 } 908 }
909 m_Kernel = null; 909 m_Kernel = null;
910 } 910 }
911 911
912 /// <summary> 912 /// <summary>
913 /// Gets the name. 913 /// Gets the name.
914 /// </summary> 914 /// </summary>
915 /// <value>The name.</value> 915 /// <value>The name.</value>
916 public string Name 916 public string Name
917 { 917 {
918 get 918 get
919 { 919 {
920 return "autotools"; 920 return "autotools";
921 } 921 }
922 } 922 }
923 923
924 #endregion 924 #endregion
925 } 925 }
926} 926}
diff --git a/Prebuild/src/Core/Targets/DebugTarget.cs b/Prebuild/src/Core/Targets/DebugTarget.cs
index 6baa623..dc4e666 100644
--- a/Prebuild/src/Core/Targets/DebugTarget.cs
+++ b/Prebuild/src/Core/Targets/DebugTarget.cs
@@ -1,102 +1,102 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ 30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $ 31 * $Revision: 164 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37using Prebuild.Core.Attributes; 37using Prebuild.Core.Attributes;
38using Prebuild.Core.Interfaces; 38using Prebuild.Core.Interfaces;
39using Prebuild.Core.Nodes; 39using Prebuild.Core.Nodes;
40 40
41#if (DEBUG && _DEBUG_TARGET) 41#if (DEBUG && _DEBUG_TARGET)
42namespace Prebuild.Core.Targets 42namespace Prebuild.Core.Targets
43{ 43{
44 [Target("debug")] 44 [Target("debug")]
45 public class DebugTarget : ITarget 45 public class DebugTarget : ITarget
46 { 46 {
47#region Fields 47#region Fields
48 48
49 private Kernel m_Kernel = null; 49 private Kernel m_Kernel = null;
50 50
51#endregion 51#endregion
52 52
53#region ITarget Members 53#region ITarget Members
54 54
55 public void Write() 55 public void Write()
56 { 56 {
57 foreach(SolutionNode s in m_Kernel.Solutions) 57 foreach(SolutionNode s in m_Kernel.Solutions)
58 { 58 {
59 Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path); 59 Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path);
60 foreach(string file in s.Files) 60 foreach(string file in s.Files)
61{ 61{
62 Console.WriteLine("\tFile [ {0} ]", file); 62 Console.WriteLine("\tFile [ {0} ]", file);
63} 63}
64 64
65 foreach(ProjectNode proj in s.Projects) 65 foreach(ProjectNode proj in s.Projects)
66 { 66 {
67 Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language); 67 Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language);
68 foreach(string file in proj.Files) 68 foreach(string file in proj.Files)
69 Console.WriteLine("\t\tFile [ {0} ]", file); 69 Console.WriteLine("\t\tFile [ {0} ]", file);
70 } 70 }
71 } 71 }
72 } 72 }
73 73
74 public void Clean() 74 public void Clean()
75 { 75 {
76 Console.WriteLine("Not implemented"); 76 Console.WriteLine("Not implemented");
77 } 77 }
78 78
79 public string Name 79 public string Name
80 { 80 {
81 get 81 get
82 { 82 {
83 return "debug"; 83 return "debug";
84 } 84 }
85 } 85 }
86 86
87 public Kernel Kernel 87 public Kernel Kernel
88 { 88 {
89 get 89 get
90 { 90 {
91 return m_Kernel; 91 return m_Kernel;
92 } 92 }
93 set 93 set
94 { 94 {
95 m_Kernel = value; 95 m_Kernel = value;
96 } 96 }
97 } 97 }
98 98
99#endregion 99#endregion
100 } 100 }
101} 101}
102#endif 102#endif
diff --git a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
index 8620e4b..7c0a1e2 100644
--- a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
+++ b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
@@ -1,458 +1,458 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-02-13 22:07:07 +0100 (ti, 13 feb 2007) $ 30 * $Date: 2007-02-13 22:07:07 +0100 (ti, 13 feb 2007) $
31 * $Revision: 206 $ 31 * $Revision: 206 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.IO; 38using System.IO;
39using System.Reflection; 39using System.Reflection;
40using System.Text.RegularExpressions; 40using System.Text.RegularExpressions;
41 41
42using Prebuild.Core.Attributes; 42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces; 43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes; 44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities; 45using Prebuild.Core.Utilities;
46 46
47namespace Prebuild.Core.Targets 47namespace Prebuild.Core.Targets
48{ 48{
49 /// <summary> 49 /// <summary>
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 [Target("monodev")] 52 [Target("monodev")]
53 public class MonoDevelopTarget : ITarget 53 public class MonoDevelopTarget : ITarget
54 { 54 {
55 #region Fields 55 #region Fields
56 56
57 private Kernel m_Kernel; 57 private Kernel m_Kernel;
58 58
59 #endregion 59 #endregion
60 60
61 #region Private Methods 61 #region Private Methods
62 62
63 private static string PrependPath(string path) 63 private static string PrependPath(string path)
64 { 64 {
65 string tmpPath = Helper.NormalizePath(path, '/'); 65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)"); 66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath); 67 Match match = regex.Match(tmpPath);
68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 { 69 {
70 tmpPath = Helper.NormalizePath(tmpPath); 70 tmpPath = Helper.NormalizePath(tmpPath);
71 } 71 }
72 else 72 else
73 { 73 {
74 tmpPath = Helper.NormalizePath("./" + tmpPath); 74 tmpPath = Helper.NormalizePath("./" + tmpPath);
75 } 75 }
76 76
77 return tmpPath; 77 return tmpPath;
78 } 78 }
79 79
80 private static string BuildReference(SolutionNode solution, ReferenceNode refr) 80 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
81 { 81 {
82 string ret = "<ProjectReference type=\""; 82 string ret = "<ProjectReference type=\"";
83 if(solution.ProjectsTable.ContainsKey(refr.Name)) 83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 { 84 {
85 ret += "Project\""; 85 ret += "Project\"";
86 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />"; 86 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />";
87 } 87 }
88 else 88 else
89 { 89 {
90 ProjectNode project = (ProjectNode)refr.Parent; 90 ProjectNode project = (ProjectNode)refr.Parent;
91 string fileRef = FindFileReference(refr.Name, project); 91 string fileRef = FindFileReference(refr.Name, project);
92 92
93 if(refr.Path != null || fileRef != null) 93 if(refr.Path != null || fileRef != null)
94 { 94 {
95 ret += "Assembly\" refto=\""; 95 ret += "Assembly\" refto=\"";
96 96
97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; 97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
98 98
99 ret += finalPath; 99 ret += finalPath;
100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
101 return ret; 101 return ret;
102 } 102 }
103 103
104 ret += "Gac\""; 104 ret += "Gac\"";
105 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\""; 105 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\"";
106 ret += " refto=\""; 106 ret += " refto=\"";
107 try 107 try
108 { 108 {
109 //Assembly assem = Assembly.Load(refr.Name); 109 //Assembly assem = Assembly.Load(refr.Name);
110 //ret += assem.FullName; 110 //ret += assem.FullName;
111 ret += refr.Name; 111 ret += refr.Name;
112 } 112 }
113 catch (System.NullReferenceException e) 113 catch (System.NullReferenceException e)
114 { 114 {
115 e.ToString(); 115 e.ToString();
116 ret += refr.Name; 116 ret += refr.Name;
117 } 117 }
118 ret += "\" />"; 118 ret += "\" />";
119 } 119 }
120 120
121 return ret; 121 return ret;
122 } 122 }
123 123
124 private static string FindFileReference(string refName, ProjectNode project) 124 private static string FindFileReference(string refName, ProjectNode project)
125 { 125 {
126 foreach(ReferencePathNode refPath in project.ReferencePaths) 126 foreach(ReferencePathNode refPath in project.ReferencePaths)
127 { 127 {
128 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 128 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
129 129
130 if(File.Exists(fullPath)) 130 if(File.Exists(fullPath))
131 { 131 {
132 return fullPath; 132 return fullPath;
133 } 133 }
134 } 134 }
135 135
136 return null; 136 return null;
137 } 137 }
138 138
139 /// <summary> 139 /// <summary>
140 /// Gets the XML doc file. 140 /// Gets the XML doc file.
141 /// </summary> 141 /// </summary>
142 /// <param name="project">The project.</param> 142 /// <param name="project">The project.</param>
143 /// <param name="conf">The conf.</param> 143 /// <param name="conf">The conf.</param>
144 /// <returns></returns> 144 /// <returns></returns>
145 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) 145 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
146 { 146 {
147 if( conf == null ) 147 if( conf == null )
148 { 148 {
149 throw new ArgumentNullException("conf"); 149 throw new ArgumentNullException("conf");
150 } 150 }
151 if( project == null ) 151 if( project == null )
152 { 152 {
153 throw new ArgumentNullException("project"); 153 throw new ArgumentNullException("project");
154 } 154 }
155 string docFile = (string)conf.Options["XmlDocFile"]; 155 string docFile = (string)conf.Options["XmlDocFile"];
156 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 156 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
157 { 157 {
158 return "False"; 158 return "False";
159 } 159 }
160 return "True"; 160 return "True";
161 } 161 }
162 162
163 private void WriteProject(SolutionNode solution, ProjectNode project) 163 private void WriteProject(SolutionNode solution, ProjectNode project)
164 { 164 {
165 string csComp = "Mcs"; 165 string csComp = "Mcs";
166 string netRuntime = "Mono"; 166 string netRuntime = "Mono";
167 if(project.Runtime == ClrRuntime.Microsoft) 167 if(project.Runtime == ClrRuntime.Microsoft)
168 { 168 {
169 csComp = "Csc"; 169 csComp = "Csc";
170 netRuntime = "MsNet"; 170 netRuntime = "MsNet";
171 } 171 }
172 172
173 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); 173 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
174 StreamWriter ss = new StreamWriter(projFile); 174 StreamWriter ss = new StreamWriter(projFile);
175 175
176 m_Kernel.CurrentWorkingDirectory.Push(); 176 m_Kernel.CurrentWorkingDirectory.Push();
177 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 177 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
178 178
179 using(ss) 179 using(ss)
180 { 180 {
181 ss.WriteLine( 181 ss.WriteLine(
182 "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">", 182 "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">",
183 project.Name, 183 project.Name,
184 project.RootNamespace 184 project.RootNamespace
185 ); 185 );
186 186
187 int count = 0; 187 int count = 0;
188 188
189 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); 189 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
190 190
191 foreach(ConfigurationNode conf in project.Configurations) 191 foreach(ConfigurationNode conf in project.Configurations)
192 { 192 {
193 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name); 193 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name);
194 ss.Write(" <Output"); 194 ss.Write(" <Output");
195 ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString()))); 195 ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString())));
196 ss.Write(" assembly=\"{0}\"", project.AssemblyName); 196 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
197 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); 197 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
198 //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 198 //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
199 //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 199 //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
200 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 200 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
201 { 201 {
202 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 202 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
203 } 203 }
204 else 204 else
205 { 205 {
206 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 206 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
207 } 207 }
208 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 208 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
209 { 209 {
210 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 210 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
211 } 211 }
212 else 212 else
213 { 213 {
214 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 214 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
215 } 215 }
216 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 216 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
217 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 217 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
218 ss.WriteLine(" />"); 218 ss.WriteLine(" />");
219 219
220 ss.Write(" <Build"); 220 ss.Write(" <Build");
221 ss.Write(" debugmode=\"True\""); 221 ss.Write(" debugmode=\"True\"");
222 if (project.Type == ProjectType.WinExe) 222 if (project.Type == ProjectType.WinExe)
223 { 223 {
224 ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString()); 224 ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString());
225 } 225 }
226 else 226 else
227 { 227 {
228 ss.Write(" target=\"{0}\"", project.Type); 228 ss.Write(" target=\"{0}\"", project.Type);
229 } 229 }
230 ss.WriteLine(" />"); 230 ss.WriteLine(" />");
231 231
232 ss.Write(" <Execution"); 232 ss.Write(" <Execution");
233 ss.Write(" runwithwarnings=\"True\""); 233 ss.Write(" runwithwarnings=\"True\"");
234 ss.Write(" consolepause=\"True\""); 234 ss.Write(" consolepause=\"True\"");
235 ss.Write(" runtime=\"{0}\"", netRuntime); 235 ss.Write(" runtime=\"{0}\"", netRuntime);
236 ss.Write(" clr-version=\"Net_2_0\""); 236 ss.Write(" clr-version=\"Net_2_0\"");
237 ss.WriteLine(" />"); 237 ss.WriteLine(" />");
238 238
239 ss.Write(" <CodeGeneration"); 239 ss.Write(" <CodeGeneration");
240 ss.Write(" compiler=\"{0}\"", csComp); 240 ss.Write(" compiler=\"{0}\"", csComp);
241 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); 241 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
242 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); 242 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
243 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); 243 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
244 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); 244 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
245 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); 245 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
246 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); 246 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
247 ss.Write(" mainclass=\"{0}\"", project.StartupObject); 247 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
248 ss.Write(" target=\"{0}\"", project.Type); 248 ss.Write(" target=\"{0}\"", project.Type);
249 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); 249 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
250 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); 250 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
251 ss.Write(" win32Icon=\"{0}\"", project.AppIcon); 251 ss.Write(" win32Icon=\"{0}\"", project.AppIcon);
252 ss.Write(" ctype=\"CSharpCompilerParameters\""); 252 ss.Write(" ctype=\"CSharpCompilerParameters\"");
253 ss.WriteLine(" />"); 253 ss.WriteLine(" />");
254 ss.WriteLine(" </Configuration>"); 254 ss.WriteLine(" </Configuration>");
255 255
256 count++; 256 count++;
257 } 257 }
258 ss.WriteLine(" </Configurations>"); 258 ss.WriteLine(" </Configurations>");
259 259
260 ss.Write(" <DeploymentInformation"); 260 ss.Write(" <DeploymentInformation");
261 ss.Write(" target=\"\""); 261 ss.Write(" target=\"\"");
262 ss.Write(" script=\"\""); 262 ss.Write(" script=\"\"");
263 ss.Write(" strategy=\"File\""); 263 ss.Write(" strategy=\"File\"");
264 ss.WriteLine(">"); 264 ss.WriteLine(">");
265 ss.WriteLine(" <excludeFiles />"); 265 ss.WriteLine(" <excludeFiles />");
266 ss.WriteLine(" </DeploymentInformation>"); 266 ss.WriteLine(" </DeploymentInformation>");
267 267
268 ss.WriteLine(" <Contents>"); 268 ss.WriteLine(" <Contents>");
269 foreach(string file in project.Files) 269 foreach(string file in project.Files)
270 { 270 {
271 string buildAction = "Compile"; 271 string buildAction = "Compile";
272 switch(project.Files.GetBuildAction(file)) 272 switch(project.Files.GetBuildAction(file))
273 { 273 {
274 case BuildAction.None: 274 case BuildAction.None:
275 buildAction = "Nothing"; 275 buildAction = "Nothing";
276 break; 276 break;
277 277
278 case BuildAction.Content: 278 case BuildAction.Content:
279 buildAction = "Exclude"; 279 buildAction = "Exclude";
280 break; 280 break;
281 281
282 case BuildAction.EmbeddedResource: 282 case BuildAction.EmbeddedResource:
283 buildAction = "EmbedAsResource"; 283 buildAction = "EmbedAsResource";
284 break; 284 break;
285 285
286 default: 286 default:
287 buildAction = "Compile"; 287 buildAction = "Compile";
288 break; 288 break;
289 } 289 }
290 290
291 // Sort of a hack, we try and resolve the path and make it relative, if we can. 291 // Sort of a hack, we try and resolve the path and make it relative, if we can.
292 string filePath = PrependPath(file); 292 string filePath = PrependPath(file);
293 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); 293 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
294 } 294 }
295 ss.WriteLine(" </Contents>"); 295 ss.WriteLine(" </Contents>");
296 296
297 ss.WriteLine(" <References>"); 297 ss.WriteLine(" <References>");
298 foreach(ReferenceNode refr in project.References) 298 foreach(ReferenceNode refr in project.References)
299 { 299 {
300 ss.WriteLine(" {0}", BuildReference(solution, refr)); 300 ss.WriteLine(" {0}", BuildReference(solution, refr));
301 } 301 }
302 ss.WriteLine(" </References>"); 302 ss.WriteLine(" </References>");
303 303
304 304
305 ss.WriteLine("</Project>"); 305 ss.WriteLine("</Project>");
306 } 306 }
307 307
308 m_Kernel.CurrentWorkingDirectory.Pop(); 308 m_Kernel.CurrentWorkingDirectory.Pop();
309 } 309 }
310 310
311 private void WriteCombine(SolutionNode solution) 311 private void WriteCombine(SolutionNode solution)
312 { 312 {
313 m_Kernel.Log.Write("Creating MonoDevelop combine and project files"); 313 m_Kernel.Log.Write("Creating MonoDevelop combine and project files");
314 foreach(ProjectNode project in solution.Projects) 314 foreach(ProjectNode project in solution.Projects)
315 { 315 {
316 if(m_Kernel.AllowProject(project.FilterGroups)) 316 if(m_Kernel.AllowProject(project.FilterGroups))
317 { 317 {
318 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 318 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
319 WriteProject(solution, project); 319 WriteProject(solution, project);
320 } 320 }
321 } 321 }
322 322
323 m_Kernel.Log.Write(""); 323 m_Kernel.Log.Write("");
324 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); 324 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
325 StreamWriter ss = new StreamWriter(combFile); 325 StreamWriter ss = new StreamWriter(combFile);
326 326
327 m_Kernel.CurrentWorkingDirectory.Push(); 327 m_Kernel.CurrentWorkingDirectory.Push();
328 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 328 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
329 329
330 int count = 0; 330 int count = 0;
331 331
332 using(ss) 332 using(ss)
333 { 333 {
334 ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name); 334 ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name);
335 335
336 count = 0; 336 count = 0;
337 foreach(ConfigurationNode conf in solution.Configurations) 337 foreach(ConfigurationNode conf in solution.Configurations)
338 { 338 {
339 if(count == 0) 339 if(count == 0)
340 { 340 {
341 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); 341 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
342 } 342 }
343 343
344 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name); 344 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name);
345 foreach(ProjectNode project in solution.Projects) 345 foreach(ProjectNode project in solution.Projects)
346 { 346 {
347 ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name); 347 ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name);
348 } 348 }
349 ss.WriteLine(" </Configuration>"); 349 ss.WriteLine(" </Configuration>");
350 350
351 count++; 351 count++;
352 } 352 }
353 ss.WriteLine(" </Configurations>"); 353 ss.WriteLine(" </Configurations>");
354 354
355 count = 0; 355 count = 0;
356 356
357 foreach(ProjectNode project in solution.Projects) 357 foreach(ProjectNode project in solution.Projects)
358 { 358 {
359 if(count == 0) 359 if(count == 0)
360 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); 360 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
361 361
362 ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name); 362 ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name);
363 count++; 363 count++;
364 } 364 }
365 ss.WriteLine(" </StartMode>"); 365 ss.WriteLine(" </StartMode>");
366 366
367 ss.WriteLine(" <Entries>"); 367 ss.WriteLine(" <Entries>");
368 foreach(ProjectNode project in solution.Projects) 368 foreach(ProjectNode project in solution.Projects)
369 { 369 {
370 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 370 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
371 ss.WriteLine(" <Entry filename=\"{0}\" />", 371 ss.WriteLine(" <Entry filename=\"{0}\" />",
372 Helper.MakeFilePath(path, project.Name, "mdp")); 372 Helper.MakeFilePath(path, project.Name, "mdp"));
373 } 373 }
374 ss.WriteLine(" </Entries>"); 374 ss.WriteLine(" </Entries>");
375 375
376 ss.WriteLine("</Combine>"); 376 ss.WriteLine("</Combine>");
377 } 377 }
378 378
379 m_Kernel.CurrentWorkingDirectory.Pop(); 379 m_Kernel.CurrentWorkingDirectory.Pop();
380 } 380 }
381 381
382 private void CleanProject(ProjectNode project) 382 private void CleanProject(ProjectNode project)
383 { 383 {
384 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 384 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
385 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp"); 385 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
386 Helper.DeleteIfExists(projectFile); 386 Helper.DeleteIfExists(projectFile);
387 } 387 }
388 388
389 private void CleanSolution(SolutionNode solution) 389 private void CleanSolution(SolutionNode solution)
390 { 390 {
391 m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name); 391 m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name);
392 392
393 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds"); 393 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
394 Helper.DeleteIfExists(slnFile); 394 Helper.DeleteIfExists(slnFile);
395 395
396 foreach(ProjectNode project in solution.Projects) 396 foreach(ProjectNode project in solution.Projects)
397 { 397 {
398 CleanProject(project); 398 CleanProject(project);
399 } 399 }
400 400
401 m_Kernel.Log.Write(""); 401 m_Kernel.Log.Write("");
402 } 402 }
403 403
404 #endregion 404 #endregion
405 405
406 #region ITarget Members 406 #region ITarget Members
407 407
408 /// <summary> 408 /// <summary>
409 /// Writes the specified kern. 409 /// Writes the specified kern.
410 /// </summary> 410 /// </summary>
411 /// <param name="kern">The kern.</param> 411 /// <param name="kern">The kern.</param>
412 public void Write(Kernel kern) 412 public void Write(Kernel kern)
413 { 413 {
414 if( kern == null ) 414 if( kern == null )
415 { 415 {
416 throw new ArgumentNullException("kern"); 416 throw new ArgumentNullException("kern");
417 } 417 }
418 m_Kernel = kern; 418 m_Kernel = kern;
419 foreach(SolutionNode solution in kern.Solutions) 419 foreach(SolutionNode solution in kern.Solutions)
420 { 420 {
421 WriteCombine(solution); 421 WriteCombine(solution);
422 } 422 }
423 m_Kernel = null; 423 m_Kernel = null;
424 } 424 }
425 425
426 /// <summary> 426 /// <summary>
427 /// Cleans the specified kern. 427 /// Cleans the specified kern.
428 /// </summary> 428 /// </summary>
429 /// <param name="kern">The kern.</param> 429 /// <param name="kern">The kern.</param>
430 public virtual void Clean(Kernel kern) 430 public virtual void Clean(Kernel kern)
431 { 431 {
432 if( kern == null ) 432 if( kern == null )
433 { 433 {
434 throw new ArgumentNullException("kern"); 434 throw new ArgumentNullException("kern");
435 } 435 }
436 m_Kernel = kern; 436 m_Kernel = kern;
437 foreach(SolutionNode sol in kern.Solutions) 437 foreach(SolutionNode sol in kern.Solutions)
438 { 438 {
439 CleanSolution(sol); 439 CleanSolution(sol);
440 } 440 }
441 m_Kernel = null; 441 m_Kernel = null;
442 } 442 }
443 443
444 /// <summary> 444 /// <summary>
445 /// Gets the name. 445 /// Gets the name.
446 /// </summary> 446 /// </summary>
447 /// <value>The name.</value> 447 /// <value>The name.</value>
448 public string Name 448 public string Name
449 { 449 {
450 get 450 get
451 { 451 {
452 return "sharpdev"; 452 return "sharpdev";
453 } 453 }
454 } 454 }
455 455
456 #endregion 456 #endregion
457 } 457 }
458} 458}
diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs
index 0f0deb2..4669cfd 100644
--- a/Prebuild/src/Core/Targets/NAntTarget.cs
+++ b/Prebuild/src/Core/Targets/NAntTarget.cs
@@ -1,621 +1,621 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $ 30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $ 31 * $Revision: 205 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.IO; 38using System.IO;
39using System.Reflection; 39using System.Reflection;
40using System.Text.RegularExpressions; 40using System.Text.RegularExpressions;
41 41
42using Prebuild.Core.Attributes; 42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces; 43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes; 44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities; 45using Prebuild.Core.Utilities;
46 46
47namespace Prebuild.Core.Targets 47namespace Prebuild.Core.Targets
48{ 48{
49 /// <summary> 49 /// <summary>
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 [Target("nant")] 52 [Target("nant")]
53 public class NAntTarget : ITarget 53 public class NAntTarget : ITarget
54 { 54 {
55 #region Fields 55 #region Fields
56 56
57 private Kernel m_Kernel; 57 private Kernel m_Kernel;
58 58
59 #endregion 59 #endregion
60 60
61 #region Private Methods 61 #region Private Methods
62 62
63 private static string PrependPath(string path) 63 private static string PrependPath(string path)
64 { 64 {
65 string tmpPath = Helper.NormalizePath(path, '/'); 65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)"); 66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath); 67 Match match = regex.Match(tmpPath);
68 //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 68 //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 //{ 69 //{
70 tmpPath = Helper.NormalizePath(tmpPath); 70 tmpPath = Helper.NormalizePath(tmpPath);
71 //} 71 //}
72// else 72// else
73// { 73// {
74// tmpPath = Helper.NormalizePath("./" + tmpPath); 74// tmpPath = Helper.NormalizePath("./" + tmpPath);
75// } 75// }
76 76
77 return tmpPath; 77 return tmpPath;
78 } 78 }
79 79
80 private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr) 80 private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr)
81 { 81 {
82 string ret = ""; 82 string ret = "";
83 if(solution.ProjectsTable.ContainsKey(refr.Name)) 83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 { 84 {
85 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; 85 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
86 86
87 string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + ".dll", '/'); 87 string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + ".dll", '/');
88 88
89 return finalPath; 89 return finalPath;
90 } 90 }
91 else 91 else
92 { 92 {
93 ProjectNode project = (ProjectNode)refr.Parent; 93 ProjectNode project = (ProjectNode)refr.Parent;
94 string fileRef = FindFileReference(refr.Name, project); 94 string fileRef = FindFileReference(refr.Name, project);
95 95
96 if(refr.Path != null || fileRef != null) 96 if(refr.Path != null || fileRef != null)
97 { 97 {
98 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef; 98 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef;
99 ret += finalPath; 99 ret += finalPath;
100 return ret; 100 return ret;
101 } 101 }
102 102
103 try 103 try
104 { 104 {
105 //Assembly assem = Assembly.Load(refr.Name); 105 //Assembly assem = Assembly.Load(refr.Name);
106 //if (assem != null) 106 //if (assem != null)
107 //{ 107 //{
108 //ret += (refr.Name + ".dll"); 108 //ret += (refr.Name + ".dll");
109 //} 109 //}
110 //else 110 //else
111 //{ 111 //{
112 ret += (refr.Name + ".dll"); 112 ret += (refr.Name + ".dll");
113 //} 113 //}
114 } 114 }
115 catch (System.NullReferenceException e) 115 catch (System.NullReferenceException e)
116 { 116 {
117 e.ToString(); 117 e.ToString();
118 ret += refr.Name + ".dll"; 118 ret += refr.Name + ".dll";
119 } 119 }
120 } 120 }
121 return ret; 121 return ret;
122 } 122 }
123 123
124 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr) 124 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr)
125 { 125 {
126 string ret = ""; 126 string ret = "";
127 if(solution.ProjectsTable.ContainsKey(refr.Name)) 127 if(solution.ProjectsTable.ContainsKey(refr.Name))
128 { 128 {
129 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; 129 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
130 string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/'); 130 string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/');
131 131
132 return finalPath; 132 return finalPath;
133 } 133 }
134 else 134 else
135 { 135 {
136 ProjectNode project = (ProjectNode)refr.Parent; 136 ProjectNode project = (ProjectNode)refr.Parent;
137 string fileRef = FindFileReference(refr.Name, project); 137 string fileRef = FindFileReference(refr.Name, project);
138 138
139 if(refr.Path != null || fileRef != null) 139 if(refr.Path != null || fileRef != null)
140 { 140 {
141 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef; 141 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef;
142 ret += finalPath; 142 ret += finalPath;
143 return ret; 143 return ret;
144 } 144 }
145 145
146 try 146 try
147 { 147 {
148 Assembly assem = Assembly.Load(refr.Name); 148 Assembly assem = Assembly.Load(refr.Name);
149 if (assem != null) 149 if (assem != null)
150 { 150 {
151 ret += ""; 151 ret += "";
152 } 152 }
153 else 153 else
154 { 154 {
155 ret += ""; 155 ret += "";
156 } 156 }
157 } 157 }
158 catch (System.NullReferenceException e) 158 catch (System.NullReferenceException e)
159 { 159 {
160 e.ToString(); 160 e.ToString();
161 ret += ""; 161 ret += "";
162 } 162 }
163 } 163 }
164 return ret; 164 return ret;
165 } 165 }
166 166
167 private static string FindFileReference(string refName, ProjectNode project) 167 private static string FindFileReference(string refName, ProjectNode project)
168 { 168 {
169 foreach(ReferencePathNode refPath in project.ReferencePaths) 169 foreach(ReferencePathNode refPath in project.ReferencePaths)
170 { 170 {
171 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 171 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
172 172
173 if(File.Exists(fullPath)) 173 if(File.Exists(fullPath))
174 { 174 {
175 return fullPath; 175 return fullPath;
176 } 176 }
177 } 177 }
178 178
179 return null; 179 return null;
180 } 180 }
181 181
182 /// <summary> 182 /// <summary>
183 /// Gets the XML doc file. 183 /// Gets the XML doc file.
184 /// </summary> 184 /// </summary>
185 /// <param name="project">The project.</param> 185 /// <param name="project">The project.</param>
186 /// <param name="conf">The conf.</param> 186 /// <param name="conf">The conf.</param>
187 /// <returns></returns> 187 /// <returns></returns>
188 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) 188 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
189 { 189 {
190 if( conf == null ) 190 if( conf == null )
191 { 191 {
192 throw new ArgumentNullException("conf"); 192 throw new ArgumentNullException("conf");
193 } 193 }
194 if( project == null ) 194 if( project == null )
195 { 195 {
196 throw new ArgumentNullException("project"); 196 throw new ArgumentNullException("project");
197 } 197 }
198 string docFile = (string)conf.Options["XmlDocFile"]; 198 string docFile = (string)conf.Options["XmlDocFile"];
199 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 199 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
200 // { 200 // {
201 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; 201 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
202 // } 202 // }
203 return docFile; 203 return docFile;
204 } 204 }
205 205
206 private void WriteProject(SolutionNode solution, ProjectNode project) 206 private void WriteProject(SolutionNode solution, ProjectNode project)
207 { 207 {
208 string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); 208 string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
209 StreamWriter ss = new StreamWriter(projFile); 209 StreamWriter ss = new StreamWriter(projFile);
210 210
211 m_Kernel.CurrentWorkingDirectory.Push(); 211 m_Kernel.CurrentWorkingDirectory.Push();
212 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 212 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
213 bool hasDoc = false; 213 bool hasDoc = false;
214 214
215 using(ss) 215 using(ss)
216 { 216 {
217 ss.WriteLine("<?xml version=\"1.0\" ?>"); 217 ss.WriteLine("<?xml version=\"1.0\" ?>");
218 ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name); 218 ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
219 ss.WriteLine(" <target name=\"{0}\">", "build"); 219 ss.WriteLine(" <target name=\"{0}\">", "build");
220 ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); 220 ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
221 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />"); 221 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
222 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">"); 222 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">");
223 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">"); 223 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
224 foreach(ReferenceNode refr in project.References) 224 foreach(ReferenceNode refr in project.References)
225 { 225 {
226 if (refr.LocalCopy) 226 if (refr.LocalCopy)
227 { 227 {
228 ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr))+"\" />", '/')); 228 ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr))+"\" />", '/'));
229 } 229 }
230 } 230 }
231 ss.WriteLine(" </fileset>"); 231 ss.WriteLine(" </fileset>");
232 ss.WriteLine(" </copy>"); 232 ss.WriteLine(" </copy>");
233 ss.Write(" <csc"); 233 ss.Write(" <csc");
234 ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); 234 ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
235 ss.Write(" debug=\"{0}\"", "${build.debug}"); 235 ss.Write(" debug=\"{0}\"", "${build.debug}");
236 foreach(ConfigurationNode conf in project.Configurations) 236 foreach(ConfigurationNode conf in project.Configurations)
237 { 237 {
238 if (conf.Options.KeyFile !="") 238 if (conf.Options.KeyFile !="")
239 { 239 {
240 ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile); 240 ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
241 break; 241 break;
242 } 242 }
243 } 243 }
244 foreach(ConfigurationNode conf in project.Configurations) 244 foreach(ConfigurationNode conf in project.Configurations)
245 { 245 {
246 ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe); 246 ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
247 break; 247 break;
248 } 248 }
249 foreach(ConfigurationNode conf in project.Configurations) 249 foreach(ConfigurationNode conf in project.Configurations)
250 { 250 {
251 ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines); 251 ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
252 break; 252 break;
253 } 253 }
254 foreach(ConfigurationNode conf in project.Configurations) 254 foreach(ConfigurationNode conf in project.Configurations)
255 { 255 {
256 if (GetXmlDocFile(project, conf) !="") 256 if (GetXmlDocFile(project, conf) !="")
257 { 257 {
258 ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf)); 258 ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
259 hasDoc = true; 259 hasDoc = true;
260 } 260 }
261 break; 261 break;
262 } 262 }
263 ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}"); 263 ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
264 if (project.Type == ProjectType.Library) 264 if (project.Type == ProjectType.Library)
265 { 265 {
266 ss.Write(".dll\""); 266 ss.Write(".dll\"");
267 } 267 }
268 else 268 else
269 { 269 {
270 ss.Write(".exe\""); 270 ss.Write(".exe\"");
271 } 271 }
272 if(project.AppIcon != null && project.AppIcon.Length != 0) 272 if(project.AppIcon != null && project.AppIcon.Length != 0)
273 { 273 {
274 ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon,'/')); 274 ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon,'/'));
275 } 275 }
276 ss.WriteLine(">"); 276 ss.WriteLine(">");
277 ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); 277 ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
278 foreach (string file in project.Files) 278 foreach (string file in project.Files)
279 { 279 {
280 switch (project.Files.GetBuildAction(file)) 280 switch (project.Files.GetBuildAction(file))
281 { 281 {
282 case BuildAction.EmbeddedResource: 282 case BuildAction.EmbeddedResource:
283 ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); 283 ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
284 break; 284 break;
285 default: 285 default:
286 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 286 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
287 { 287 {
288 ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 288 ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
289 } 289 }
290 break; 290 break;
291 } 291 }
292 } 292 }
293 //if (project.Files.GetSubType(file).ToString() != "Code") 293 //if (project.Files.GetSubType(file).ToString() != "Code")
294 //{ 294 //{
295 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 295 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
296 296
297 ss.WriteLine(" </resources>"); 297 ss.WriteLine(" </resources>");
298 ss.WriteLine(" <sources failonempty=\"true\">"); 298 ss.WriteLine(" <sources failonempty=\"true\">");
299 foreach(string file in project.Files) 299 foreach(string file in project.Files)
300 { 300 {
301 switch(project.Files.GetBuildAction(file)) 301 switch(project.Files.GetBuildAction(file))
302 { 302 {
303 case BuildAction.Compile: 303 case BuildAction.Compile:
304 ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />"); 304 ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
305 break; 305 break;
306 default: 306 default:
307 break; 307 break;
308 } 308 }
309 } 309 }
310 ss.WriteLine(" </sources>"); 310 ss.WriteLine(" </sources>");
311 ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">"); 311 ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
312 ss.WriteLine(" <lib>"); 312 ss.WriteLine(" <lib>");
313 ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />"); 313 ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
314 ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />"); 314 ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />");
315 ss.WriteLine(" </lib>"); 315 ss.WriteLine(" </lib>");
316 foreach(ReferenceNode refr in project.References) 316 foreach(ReferenceNode refr in project.References)
317 { 317 {
318 string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); 318 string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/');
319 ss.WriteLine(" <include name=\""+ path + "\" />" ); 319 ss.WriteLine(" <include name=\""+ path + "\" />" );
320 } 320 }
321 ss.WriteLine(" </references>"); 321 ss.WriteLine(" </references>");
322 322
323 ss.WriteLine(" </csc>"); 323 ss.WriteLine(" </csc>");
324 324
325 foreach (ConfigurationNode conf in project.Configurations) 325 foreach (ConfigurationNode conf in project.Configurations)
326 { 326 {
327 if (!String.IsNullOrEmpty(conf.Options.OutputPath)) 327 if (!String.IsNullOrEmpty(conf.Options.OutputPath))
328 { 328 {
329 string targetDir = Helper.NormalizePath(conf.Options.OutputPath, '/'); 329 string targetDir = Helper.NormalizePath(conf.Options.OutputPath, '/');
330 330
331 ss.WriteLine(" <echo message=\"Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/" + targetDir + "\" />"); 331 ss.WriteLine(" <echo message=\"Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/" + targetDir + "\" />");
332 332
333 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/" + targetDir + "\"/>"); 333 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/" + targetDir + "\"/>");
334 334
335 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/" + targetDir + "\">"); 335 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/" + targetDir + "\">");
336 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}/${build.dir}/\" >"); 336 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}/${build.dir}/\" >");
337 ss.WriteLine(" <include name=\"*.dll\"/>"); 337 ss.WriteLine(" <include name=\"*.dll\"/>");
338 ss.WriteLine(" <include name=\"*.exe\"/>"); 338 ss.WriteLine(" <include name=\"*.exe\"/>");
339 ss.WriteLine(" </fileset>"); 339 ss.WriteLine(" </fileset>");
340 ss.WriteLine(" </copy>"); 340 ss.WriteLine(" </copy>");
341 break; 341 break;
342 } 342 }
343 } 343 }
344 344
345 ss.WriteLine(" </target>"); 345 ss.WriteLine(" </target>");
346 346
347 ss.WriteLine(" <target name=\"clean\">"); 347 ss.WriteLine(" <target name=\"clean\">");
348 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); 348 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
349 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); 349 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
350 ss.WriteLine(" </target>"); 350 ss.WriteLine(" </target>");
351 351
352 ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">"); 352 ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
353 if (hasDoc) 353 if (hasDoc)
354 { 354 {
355 ss.WriteLine(" <property name=\"doc.target\" value=\"\" />"); 355 ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
356 ss.WriteLine(" <if test=\"${platform::is-unix()}\">"); 356 ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
357 ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />"); 357 ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
358 ss.WriteLine(" </if>"); 358 ss.WriteLine(" </if>");
359 ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">"); 359 ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
360 ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">"); 360 ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
361 ss.Write(" <include name=\"${build.dir}/${project::get-name()}"); 361 ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
362 if (project.Type == ProjectType.Library) 362 if (project.Type == ProjectType.Library)
363 { 363 {
364 ss.WriteLine(".dll\" />"); 364 ss.WriteLine(".dll\" />");
365 } 365 }
366 else 366 else
367 { 367 {
368 ss.WriteLine(".exe\" />"); 368 ss.WriteLine(".exe\" />");
369 } 369 }
370 370
371 ss.WriteLine(" </assemblies>"); 371 ss.WriteLine(" </assemblies>");
372 ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">"); 372 ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
373 ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>"); 373 ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
374 ss.WriteLine(" </summaries>"); 374 ss.WriteLine(" </summaries>");
375 ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">"); 375 ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
376 ss.WriteLine(" <include name=\"${build.dir}\" />"); 376 ss.WriteLine(" <include name=\"${build.dir}\" />");
377 // foreach(ReferenceNode refr in project.References) 377 // foreach(ReferenceNode refr in project.References)
378 // { 378 // {
379 // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); 379 // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
380 // if (path != "") 380 // if (path != "")
381 // { 381 // {
382 // ss.WriteLine(" <include name=\"{0}\" />", path); 382 // ss.WriteLine(" <include name=\"{0}\" />", path);
383 // } 383 // }
384 // } 384 // }
385 ss.WriteLine(" </referencepaths>"); 385 ss.WriteLine(" </referencepaths>");
386 ss.WriteLine(" <documenters>"); 386 ss.WriteLine(" <documenters>");
387 ss.WriteLine(" <documenter name=\"MSDN\">"); 387 ss.WriteLine(" <documenter name=\"MSDN\">");
388 ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />"); 388 ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
389 ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />"); 389 ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
390 ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />"); 390 ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
391 ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />"); 391 ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
392 ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />"); 392 ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
393 ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />"); 393 ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
394 ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />"); 394 ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
395 ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />"); 395 ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
396 ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />"); 396 ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
397 ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />"); 397 ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
398 ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />"); 398 ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
399 ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />"); 399 ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
400 ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />"); 400 ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
401 ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />"); 401 ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
402 ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />"); 402 ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
403 ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />"); 403 ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
404 ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />"); 404 ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
405 ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />"); 405 ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
406 ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />"); 406 ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
407 ss.WriteLine(" </documenter>"); 407 ss.WriteLine(" </documenter>");
408 ss.WriteLine(" </documenters>"); 408 ss.WriteLine(" </documenters>");
409 ss.WriteLine(" </ndoc>"); 409 ss.WriteLine(" </ndoc>");
410 } 410 }
411 ss.WriteLine(" </target>"); 411 ss.WriteLine(" </target>");
412 ss.WriteLine("</project>"); 412 ss.WriteLine("</project>");
413 } 413 }
414 m_Kernel.CurrentWorkingDirectory.Pop(); 414 m_Kernel.CurrentWorkingDirectory.Pop();
415 } 415 }
416 416
417 private void WriteCombine(SolutionNode solution) 417 private void WriteCombine(SolutionNode solution)
418 { 418 {
419 m_Kernel.Log.Write("Creating NAnt build files"); 419 m_Kernel.Log.Write("Creating NAnt build files");
420 foreach(ProjectNode project in solution.Projects) 420 foreach(ProjectNode project in solution.Projects)
421 { 421 {
422 if(m_Kernel.AllowProject(project.FilterGroups)) 422 if(m_Kernel.AllowProject(project.FilterGroups))
423 { 423 {
424 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 424 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
425 WriteProject(solution, project); 425 WriteProject(solution, project);
426 } 426 }
427 } 427 }
428 428
429 m_Kernel.Log.Write(""); 429 m_Kernel.Log.Write("");
430 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); 430 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
431 StreamWriter ss = new StreamWriter(combFile); 431 StreamWriter ss = new StreamWriter(combFile);
432 432
433 m_Kernel.CurrentWorkingDirectory.Push(); 433 m_Kernel.CurrentWorkingDirectory.Push();
434 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 434 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
435 435
436 using(ss) 436 using(ss)
437 { 437 {
438 ss.WriteLine("<?xml version=\"1.0\" ?>"); 438 ss.WriteLine("<?xml version=\"1.0\" ?>");
439 ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name); 439 ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
440 ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>"); 440 ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
441 ss.WriteLine(); 441 ss.WriteLine();
442 442
443 //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />"); 443 //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
444 //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />"); 444 //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
445 ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />"); 445 ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
446 ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />"); 446 ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
447 ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); 447 ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
448 ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); 448 ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
449 449
450 foreach(ConfigurationNode conf in solution.Configurations) 450 foreach(ConfigurationNode conf in solution.Configurations)
451 { 451 {
452 // Set the project.config to a non-debug configuration 452 // Set the project.config to a non-debug configuration
453 if( conf.Options["DebugInformation"].ToString().ToLower() != "true" ) 453 if( conf.Options["DebugInformation"].ToString().ToLower() != "true" )
454 { 454 {
455 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); 455 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
456 } 456 }
457 ss.WriteLine(); 457 ss.WriteLine();
458 ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name); 458 ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name);
459 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); 459 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
460 ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); 460 ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
461 ss.WriteLine(" </target>"); 461 ss.WriteLine(" </target>");
462 ss.WriteLine(); 462 ss.WriteLine();
463 } 463 }
464 464
465 ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">"); 465 ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
466 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />"); 466 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
467 ss.WriteLine(" </target>"); 467 ss.WriteLine(" </target>");
468 ss.WriteLine(); 468 ss.WriteLine();
469 469
470 ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">"); 470 ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
471 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />"); 471 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
472 ss.WriteLine(" </target>"); 472 ss.WriteLine(" </target>");
473 ss.WriteLine(); 473 ss.WriteLine();
474 474
475 ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">"); 475 ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
476 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />"); 476 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
477 ss.WriteLine(" </target>"); 477 ss.WriteLine(" </target>");
478 ss.WriteLine(); 478 ss.WriteLine();
479 479
480 ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">"); 480 ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
481 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />"); 481 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
482 ss.WriteLine(" </target>"); 482 ss.WriteLine(" </target>");
483 ss.WriteLine(); 483 ss.WriteLine();
484 484
485 ss.WriteLine(" <target name=\"init\" description=\"\">"); 485 ss.WriteLine(" <target name=\"init\" description=\"\">");
486 ss.WriteLine(" <call target=\"${project.config}\" />"); 486 ss.WriteLine(" <call target=\"${project.config}\" />");
487 ss.WriteLine(" <sysinfo />"); 487 ss.WriteLine(" <sysinfo />");
488 ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />"); 488 ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
489 ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />"); 489 ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
490 ss.WriteLine(" </target>"); 490 ss.WriteLine(" </target>");
491 ss.WriteLine(); 491 ss.WriteLine();
492 492
493 ss.WriteLine(" <target name=\"clean\" description=\"\">"); 493 ss.WriteLine(" <target name=\"clean\" description=\"\">");
494 ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />"); 494 ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />");
495 //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />"); 495 //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />");
496 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />"); 496 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
497 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); 497 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
498 foreach(ProjectNode project in solution.Projects) 498 foreach(ProjectNode project in solution.Projects)
499 { 499 {
500 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 500 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
501 ss.Write(" <nant buildfile=\"{0}\"", 501 ss.Write(" <nant buildfile=\"{0}\"",
502 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/')); 502 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
503 ss.WriteLine(" target=\"clean\" />"); 503 ss.WriteLine(" target=\"clean\" />");
504 } 504 }
505 ss.WriteLine(" </target>"); 505 ss.WriteLine(" </target>");
506 ss.WriteLine(); 506 ss.WriteLine();
507 507
508 ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">"); 508 ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">");
509 509
510 foreach(ProjectNode project in solution.ProjectsTableOrder) 510 foreach(ProjectNode project in solution.ProjectsTableOrder)
511 { 511 {
512 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 512 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
513 ss.Write(" <nant buildfile=\"{0}\"", 513 ss.Write(" <nant buildfile=\"{0}\"",
514 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/')); 514 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
515 ss.WriteLine(" target=\"build\" />"); 515 ss.WriteLine(" target=\"build\" />");
516 } 516 }
517 ss.WriteLine(" </target>"); 517 ss.WriteLine(" </target>");
518 ss.WriteLine(); 518 ss.WriteLine();
519 519
520 ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />"); 520 ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />");
521 ss.WriteLine(); 521 ss.WriteLine();
522 ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />"); 522 ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />");
523 ss.WriteLine(); 523 ss.WriteLine();
524 //ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />"); 524 //ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />");
525 ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />"); 525 ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />");
526 ss.WriteLine(); 526 ss.WriteLine();
527 527
528 ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">"); 528 ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">");
529 ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />"); 529 ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />");
530 foreach (ProjectNode project in solution.Projects) 530 foreach (ProjectNode project in solution.Projects)
531 { 531 {
532 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 532 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
533 ss.Write(" <nant buildfile=\"{0}\"", 533 ss.Write(" <nant buildfile=\"{0}\"",
534 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/')); 534 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
535 ss.WriteLine(" target=\"doc\" />"); 535 ss.WriteLine(" target=\"doc\" />");
536 } 536 }
537 ss.WriteLine(" </target>"); 537 ss.WriteLine(" </target>");
538 ss.WriteLine(); 538 ss.WriteLine();
539 ss.WriteLine("</project>"); 539 ss.WriteLine("</project>");
540 } 540 }
541 541
542 m_Kernel.CurrentWorkingDirectory.Pop(); 542 m_Kernel.CurrentWorkingDirectory.Pop();
543 } 543 }
544 544
545 private void CleanProject(ProjectNode project) 545 private void CleanProject(ProjectNode project)
546 { 546 {
547 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 547 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
548 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); 548 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
549 Helper.DeleteIfExists(projectFile); 549 Helper.DeleteIfExists(projectFile);
550 } 550 }
551 551
552 private void CleanSolution(SolutionNode solution) 552 private void CleanSolution(SolutionNode solution)
553 { 553 {
554 m_Kernel.Log.Write("Cleaning NAnt build files for", solution.Name); 554 m_Kernel.Log.Write("Cleaning NAnt build files for", solution.Name);
555 555
556 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); 556 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
557 Helper.DeleteIfExists(slnFile); 557 Helper.DeleteIfExists(slnFile);
558 558
559 foreach(ProjectNode project in solution.Projects) 559 foreach(ProjectNode project in solution.Projects)
560 { 560 {
561 CleanProject(project); 561 CleanProject(project);
562 } 562 }
563 563
564 m_Kernel.Log.Write(""); 564 m_Kernel.Log.Write("");
565 } 565 }
566 566
567 #endregion 567 #endregion
568 568
569 #region ITarget Members 569 #region ITarget Members
570 570
571 /// <summary> 571 /// <summary>
572 /// Writes the specified kern. 572 /// Writes the specified kern.
573 /// </summary> 573 /// </summary>
574 /// <param name="kern">The kern.</param> 574 /// <param name="kern">The kern.</param>
575 public void Write(Kernel kern) 575 public void Write(Kernel kern)
576 { 576 {
577 if( kern == null ) 577 if( kern == null )
578 { 578 {
579 throw new ArgumentNullException("kern"); 579 throw new ArgumentNullException("kern");
580 } 580 }
581 m_Kernel = kern; 581 m_Kernel = kern;
582 foreach(SolutionNode solution in kern.Solutions) 582 foreach(SolutionNode solution in kern.Solutions)
583 { 583 {
584 WriteCombine(solution); 584 WriteCombine(solution);
585 } 585 }
586 m_Kernel = null; 586 m_Kernel = null;
587 } 587 }
588 588
589 /// <summary> 589 /// <summary>
590 /// Cleans the specified kern. 590 /// Cleans the specified kern.
591 /// </summary> 591 /// </summary>
592 /// <param name="kern">The kern.</param> 592 /// <param name="kern">The kern.</param>
593 public virtual void Clean(Kernel kern) 593 public virtual void Clean(Kernel kern)
594 { 594 {
595 if( kern == null ) 595 if( kern == null )
596 { 596 {
597 throw new ArgumentNullException("kern"); 597 throw new ArgumentNullException("kern");
598 } 598 }
599 m_Kernel = kern; 599 m_Kernel = kern;
600 foreach(SolutionNode sol in kern.Solutions) 600 foreach(SolutionNode sol in kern.Solutions)
601 { 601 {
602 CleanSolution(sol); 602 CleanSolution(sol);
603 } 603 }
604 m_Kernel = null; 604 m_Kernel = null;
605 } 605 }
606 606
607 /// <summary> 607 /// <summary>
608 /// Gets the name. 608 /// Gets the name.
609 /// </summary> 609 /// </summary>
610 /// <value>The name.</value> 610 /// <value>The name.</value>
611 public string Name 611 public string Name
612 { 612 {
613 get 613 get
614 { 614 {
615 return "nant"; 615 return "nant";
616 } 616 }
617 } 617 }
618 618
619 #endregion 619 #endregion
620 } 620 }
621} 621}
diff --git a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
index bc84b96..7109ceb 100644
--- a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
+++ b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
@@ -1,90 +1,90 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-27 16:49:58 -0800 (Fri, 27 Jan 2006) $ 30 * $Date: 2006-01-27 16:49:58 -0800 (Fri, 27 Jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37using Prebuild.Core.Attributes; 37using Prebuild.Core.Attributes;
38 38
39namespace Prebuild.Core.Targets 39namespace Prebuild.Core.Targets
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// 42 ///
43 /// </summary> 43 /// </summary>
44 [Target("sharpdev2")] 44 [Target("sharpdev2")]
45 public class SharpDevelop2Target : VS2005Target 45 public class SharpDevelop2Target : VS2005Target
46 { 46 {
47 #region Private Methods 47 #region Private Methods
48 private void SetSharpDevelop2() 48 private void SetSharpDevelop2()
49 { 49 {
50 this.VersionName = "SharpDevelop2"; 50 this.VersionName = "SharpDevelop2";
51 } 51 }
52 #endregion 52 #endregion
53 53
54 #region Public Methods 54 #region Public Methods
55 55
56 /// <summary> 56 /// <summary>
57 /// Writes the specified kern. 57 /// Writes the specified kern.
58 /// </summary> 58 /// </summary>
59 /// <param name="kern">The kern.</param> 59 /// <param name="kern">The kern.</param>
60 public override void Write(Kernel kern) 60 public override void Write(Kernel kern)
61 { 61 {
62 SetSharpDevelop2(); 62 SetSharpDevelop2();
63 base.Write(kern); 63 base.Write(kern);
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Cleans the specified kern. 67 /// Cleans the specified kern.
68 /// </summary> 68 /// </summary>
69 /// <param name="kern">The kern.</param> 69 /// <param name="kern">The kern.</param>
70 public override void Clean(Kernel kern) 70 public override void Clean(Kernel kern)
71 { 71 {
72 SetSharpDevelop2(); 72 SetSharpDevelop2();
73 base.Clean(kern); 73 base.Clean(kern);
74 } 74 }
75 75
76 /// <summary> 76 /// <summary>
77 /// Gets the name. 77 /// Gets the name.
78 /// </summary> 78 /// </summary>
79 /// <value>The name.</value> 79 /// <value>The name.</value>
80 public override string Name 80 public override string Name
81 { 81 {
82 get 82 get
83 { 83 {
84 return "sharpdev2"; 84 return "sharpdev2";
85 } 85 }
86 } 86 }
87 87
88 #endregion 88 #endregion
89 } 89 }
90} 90}
diff --git a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
index c725730..ededadb 100644
--- a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
+++ b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
@@ -1,437 +1,437 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $ 30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $ 31 * $Revision: 205 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.IO; 38using System.IO;
39using System.Text.RegularExpressions; 39using System.Text.RegularExpressions;
40using System.Reflection; 40using System.Reflection;
41 41
42using Prebuild.Core.Attributes; 42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces; 43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes; 44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities; 45using Prebuild.Core.Utilities;
46 46
47namespace Prebuild.Core.Targets 47namespace Prebuild.Core.Targets
48{ 48{
49 /// <summary> 49 /// <summary>
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 [Target("sharpdev")] 52 [Target("sharpdev")]
53 public class SharpDevelopTarget : ITarget 53 public class SharpDevelopTarget : ITarget
54 { 54 {
55 #region Fields 55 #region Fields
56 56
57 private Kernel m_Kernel; 57 private Kernel m_Kernel;
58 58
59 #endregion 59 #endregion
60 60
61 #region Private Methods 61 #region Private Methods
62 62
63 private static string PrependPath(string path) 63 private static string PrependPath(string path)
64 { 64 {
65 string tmpPath = Helper.NormalizePath(path, '/'); 65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)"); 66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath); 67 Match match = regex.Match(tmpPath);
68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') 68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 { 69 {
70 tmpPath = Helper.NormalizePath(tmpPath); 70 tmpPath = Helper.NormalizePath(tmpPath);
71 } 71 }
72 else 72 else
73 { 73 {
74 tmpPath = Helper.NormalizePath("./" + tmpPath); 74 tmpPath = Helper.NormalizePath("./" + tmpPath);
75 } 75 }
76 76
77 return tmpPath; 77 return tmpPath;
78 } 78 }
79 79
80 private static string BuildReference(SolutionNode solution, ReferenceNode refr) 80 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
81 { 81 {
82 string ret = "<Reference type=\""; 82 string ret = "<Reference type=\"";
83 if(solution.ProjectsTable.ContainsKey(refr.Name)) 83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 { 84 {
85 ret += "Project\" refto=\"" + refr.Name; 85 ret += "Project\" refto=\"" + refr.Name;
86 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 86 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
87 } 87 }
88 else 88 else
89 { 89 {
90 ProjectNode project = (ProjectNode)refr.Parent; 90 ProjectNode project = (ProjectNode)refr.Parent;
91 string fileRef = FindFileReference(refr.Name, project); 91 string fileRef = FindFileReference(refr.Name, project);
92 92
93 if(refr.Path != null || fileRef != null) 93 if(refr.Path != null || fileRef != null)
94 { 94 {
95 ret += "Assembly\" refto=\""; 95 ret += "Assembly\" refto=\"";
96 96
97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef; 97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
98 98
99 ret += finalPath; 99 ret += finalPath;
100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
101 return ret; 101 return ret;
102 } 102 }
103 103
104 ret += "Gac\" refto=\""; 104 ret += "Gac\" refto=\"";
105 try 105 try
106 { 106 {
107 //Assembly assem = Assembly.Load(refr.Name); 107 //Assembly assem = Assembly.Load(refr.Name);
108 ret += refr.Name;// assem.FullName; 108 ret += refr.Name;// assem.FullName;
109 } 109 }
110 catch (System.NullReferenceException e) 110 catch (System.NullReferenceException e)
111 { 111 {
112 e.ToString(); 112 e.ToString();
113 ret += refr.Name; 113 ret += refr.Name;
114 } 114 }
115 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />"; 115 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
116 } 116 }
117 117
118 return ret; 118 return ret;
119 } 119 }
120 120
121 private static string FindFileReference(string refName, ProjectNode project) 121 private static string FindFileReference(string refName, ProjectNode project)
122 { 122 {
123 foreach(ReferencePathNode refPath in project.ReferencePaths) 123 foreach(ReferencePathNode refPath in project.ReferencePaths)
124 { 124 {
125 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); 125 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
126 126
127 if(File.Exists(fullPath)) 127 if(File.Exists(fullPath))
128 { 128 {
129 return fullPath; 129 return fullPath;
130 } 130 }
131 } 131 }
132 132
133 return null; 133 return null;
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
137 /// Gets the XML doc file. 137 /// Gets the XML doc file.
138 /// </summary> 138 /// </summary>
139 /// <param name="project">The project.</param> 139 /// <param name="project">The project.</param>
140 /// <param name="conf">The conf.</param> 140 /// <param name="conf">The conf.</param>
141 /// <returns></returns> 141 /// <returns></returns>
142 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf) 142 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
143 { 143 {
144 if( conf == null ) 144 if( conf == null )
145 { 145 {
146 throw new ArgumentNullException("conf"); 146 throw new ArgumentNullException("conf");
147 } 147 }
148 if( project == null ) 148 if( project == null )
149 { 149 {
150 throw new ArgumentNullException("project"); 150 throw new ArgumentNullException("project");
151 } 151 }
152 string docFile = (string)conf.Options["XmlDocFile"]; 152 string docFile = (string)conf.Options["XmlDocFile"];
153 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified 153 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
154 { 154 {
155 return "False"; 155 return "False";
156 } 156 }
157 return "True"; 157 return "True";
158 } 158 }
159 159
160 private void WriteProject(SolutionNode solution, ProjectNode project) 160 private void WriteProject(SolutionNode solution, ProjectNode project)
161 { 161 {
162 string csComp = "Csc"; 162 string csComp = "Csc";
163 string netRuntime = "MsNet"; 163 string netRuntime = "MsNet";
164 if(project.Runtime == ClrRuntime.Mono) 164 if(project.Runtime == ClrRuntime.Mono)
165 { 165 {
166 csComp = "Mcs"; 166 csComp = "Mcs";
167 netRuntime = "Mono"; 167 netRuntime = "Mono";
168 } 168 }
169 169
170 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); 170 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
171 StreamWriter ss = new StreamWriter(projFile); 171 StreamWriter ss = new StreamWriter(projFile);
172 172
173 m_Kernel.CurrentWorkingDirectory.Push(); 173 m_Kernel.CurrentWorkingDirectory.Push();
174 Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); 174 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
175 175
176 using(ss) 176 using(ss)
177 { 177 {
178 ss.WriteLine( 178 ss.WriteLine(
179 "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">", 179 "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">",
180 project.Name, 180 project.Name,
181 project.RootNamespace 181 project.RootNamespace
182 ); 182 );
183 183
184 ss.WriteLine(" <Contents>"); 184 ss.WriteLine(" <Contents>");
185 foreach(string file in project.Files) 185 foreach(string file in project.Files)
186 { 186 {
187 string buildAction = "Compile"; 187 string buildAction = "Compile";
188 switch(project.Files.GetBuildAction(file)) 188 switch(project.Files.GetBuildAction(file))
189 { 189 {
190 case BuildAction.None: 190 case BuildAction.None:
191 buildAction = "Nothing"; 191 buildAction = "Nothing";
192 break; 192 break;
193 193
194 case BuildAction.Content: 194 case BuildAction.Content:
195 buildAction = "Exclude"; 195 buildAction = "Exclude";
196 break; 196 break;
197 197
198 case BuildAction.EmbeddedResource: 198 case BuildAction.EmbeddedResource:
199 buildAction = "EmbedAsResource"; 199 buildAction = "EmbedAsResource";
200 break; 200 break;
201 201
202 default: 202 default:
203 buildAction = "Compile"; 203 buildAction = "Compile";
204 break; 204 break;
205 } 205 }
206 206
207 // Sort of a hack, we try and resolve the path and make it relative, if we can. 207 // Sort of a hack, we try and resolve the path and make it relative, if we can.
208 string filePath = PrependPath(file); 208 string filePath = PrependPath(file);
209 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); 209 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
210 } 210 }
211 ss.WriteLine(" </Contents>"); 211 ss.WriteLine(" </Contents>");
212 212
213 ss.WriteLine(" <References>"); 213 ss.WriteLine(" <References>");
214 foreach(ReferenceNode refr in project.References) 214 foreach(ReferenceNode refr in project.References)
215 { 215 {
216 ss.WriteLine(" {0}", BuildReference(solution, refr)); 216 ss.WriteLine(" {0}", BuildReference(solution, refr));
217 } 217 }
218 ss.WriteLine(" </References>"); 218 ss.WriteLine(" </References>");
219 219
220 ss.Write(" <DeploymentInformation"); 220 ss.Write(" <DeploymentInformation");
221 ss.Write(" target=\"\""); 221 ss.Write(" target=\"\"");
222 ss.Write(" script=\"\""); 222 ss.Write(" script=\"\"");
223 ss.Write(" strategy=\"File\""); 223 ss.Write(" strategy=\"File\"");
224 ss.WriteLine(" />"); 224 ss.WriteLine(" />");
225 225
226 int count = 0; 226 int count = 0;
227 227
228 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig); 228 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
229 229
230 foreach(ConfigurationNode conf in project.Configurations) 230 foreach(ConfigurationNode conf in project.Configurations)
231 { 231 {
232 ss.Write(" <Configuration"); 232 ss.Write(" <Configuration");
233 ss.Write(" runwithwarnings=\"True\""); 233 ss.Write(" runwithwarnings=\"True\"");
234 ss.Write(" name=\"{0}\"", conf.Name); 234 ss.Write(" name=\"{0}\"", conf.Name);
235 ss.WriteLine(">"); 235 ss.WriteLine(">");
236 ss.Write(" <CodeGeneration"); 236 ss.Write(" <CodeGeneration");
237 ss.Write(" runtime=\"{0}\"", netRuntime); 237 ss.Write(" runtime=\"{0}\"", netRuntime);
238 ss.Write(" compiler=\"{0}\"", csComp); 238 ss.Write(" compiler=\"{0}\"", csComp);
239 ss.Write(" compilerversion=\"\""); 239 ss.Write(" compilerversion=\"\"");
240 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]); 240 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
241 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]); 241 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
242 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]); 242 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
243 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]); 243 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
244 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]); 244 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
245 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]); 245 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
246 ss.Write(" mainclass=\"{0}\"", project.StartupObject); 246 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
247 ss.Write(" target=\"{0}\"", project.Type); 247 ss.Write(" target=\"{0}\"", project.Type);
248 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]); 248 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
249 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf)); 249 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
250 ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon)); 250 ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon));
251 ss.Write(" noconfig=\"{0}\"", "False"); 251 ss.Write(" noconfig=\"{0}\"", "False");
252 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]); 252 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
253 ss.WriteLine(" />"); 253 ss.WriteLine(" />");
254 254
255 ss.Write(" <Execution"); 255 ss.Write(" <Execution");
256 ss.Write(" commandlineparameters=\"\""); 256 ss.Write(" commandlineparameters=\"\"");
257 ss.Write(" consolepause=\"True\""); 257 ss.Write(" consolepause=\"True\"");
258 ss.WriteLine(" />"); 258 ss.WriteLine(" />");
259 259
260 ss.Write(" <Output"); 260 ss.Write(" <Output");
261 ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString())); 261 ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString()));
262 ss.Write(" assembly=\"{0}\"", project.AssemblyName); 262 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
263 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]); 263 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
264 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 264 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
265 { 265 {
266 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 266 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
267 } 267 }
268 else 268 else
269 { 269 {
270 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]); 270 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
271 } 271 }
272 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 272 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
273 { 273 {
274 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 274 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
275 } 275 }
276 else 276 else
277 { 277 {
278 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]); 278 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
279 } 279 }
280 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 280 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
281 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]); 281 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
282 ss.WriteLine(" />"); 282 ss.WriteLine(" />");
283 ss.WriteLine(" </Configuration>"); 283 ss.WriteLine(" </Configuration>");
284 284
285 count++; 285 count++;
286 } 286 }
287 ss.WriteLine(" </Configurations>"); 287 ss.WriteLine(" </Configurations>");
288 ss.WriteLine("</Project>"); 288 ss.WriteLine("</Project>");
289 } 289 }
290 290
291 m_Kernel.CurrentWorkingDirectory.Pop(); 291 m_Kernel.CurrentWorkingDirectory.Pop();
292 } 292 }
293 293
294 private void WriteCombine(SolutionNode solution) 294 private void WriteCombine(SolutionNode solution)
295 { 295 {
296 m_Kernel.Log.Write("Creating SharpDevelop combine and project files"); 296 m_Kernel.Log.Write("Creating SharpDevelop combine and project files");
297 foreach(ProjectNode project in solution.Projects) 297 foreach(ProjectNode project in solution.Projects)
298 { 298 {
299 if(m_Kernel.AllowProject(project.FilterGroups)) 299 if(m_Kernel.AllowProject(project.FilterGroups))
300 { 300 {
301 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 301 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
302 WriteProject(solution, project); 302 WriteProject(solution, project);
303 } 303 }
304 } 304 }
305 305
306 m_Kernel.Log.Write(""); 306 m_Kernel.Log.Write("");
307 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); 307 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
308 StreamWriter ss = new StreamWriter(combFile); 308 StreamWriter ss = new StreamWriter(combFile);
309 309
310 m_Kernel.CurrentWorkingDirectory.Push(); 310 m_Kernel.CurrentWorkingDirectory.Push();
311 Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); 311 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
312 312
313 using(ss) 313 using(ss)
314 { 314 {
315 ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name); 315 ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name);
316 316
317 int count = 0; 317 int count = 0;
318 foreach(ProjectNode project in solution.Projects) 318 foreach(ProjectNode project in solution.Projects)
319 { 319 {
320 if(count == 0) 320 if(count == 0)
321 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name); 321 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
322 322
323 ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name); 323 ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name);
324 count++; 324 count++;
325 } 325 }
326 ss.WriteLine(" </StartMode>"); 326 ss.WriteLine(" </StartMode>");
327 327
328 ss.WriteLine(" <Entries>"); 328 ss.WriteLine(" <Entries>");
329 foreach(ProjectNode project in solution.Projects) 329 foreach(ProjectNode project in solution.Projects)
330 { 330 {
331 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 331 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
332 ss.WriteLine(" <Entry filename=\"{0}\" />", 332 ss.WriteLine(" <Entry filename=\"{0}\" />",
333 Helper.MakeFilePath(path, project.Name, "prjx")); 333 Helper.MakeFilePath(path, project.Name, "prjx"));
334 } 334 }
335 ss.WriteLine(" </Entries>"); 335 ss.WriteLine(" </Entries>");
336 336
337 count = 0; 337 count = 0;
338 foreach(ConfigurationNode conf in solution.Configurations) 338 foreach(ConfigurationNode conf in solution.Configurations)
339 { 339 {
340 if(count == 0) 340 if(count == 0)
341 { 341 {
342 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name); 342 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
343 } 343 }
344 344
345 ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name); 345 ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name);
346 foreach(ProjectNode project in solution.Projects) 346 foreach(ProjectNode project in solution.Projects)
347 { 347 {
348 ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name); 348 ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name);
349 } 349 }
350 ss.WriteLine(" </Configuration>"); 350 ss.WriteLine(" </Configuration>");
351 351
352 count++; 352 count++;
353 } 353 }
354 ss.WriteLine(" </Configurations>"); 354 ss.WriteLine(" </Configurations>");
355 ss.WriteLine("</Combine>"); 355 ss.WriteLine("</Combine>");
356 } 356 }
357 357
358 m_Kernel.CurrentWorkingDirectory.Pop(); 358 m_Kernel.CurrentWorkingDirectory.Pop();
359 } 359 }
360 360
361 private void CleanProject(ProjectNode project) 361 private void CleanProject(ProjectNode project)
362 { 362 {
363 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 363 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
364 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx"); 364 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
365 Helper.DeleteIfExists(projectFile); 365 Helper.DeleteIfExists(projectFile);
366 } 366 }
367 367
368 private void CleanSolution(SolutionNode solution) 368 private void CleanSolution(SolutionNode solution)
369 { 369 {
370 m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name); 370 m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name);
371 371
372 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx"); 372 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
373 Helper.DeleteIfExists(slnFile); 373 Helper.DeleteIfExists(slnFile);
374 374
375 foreach(ProjectNode project in solution.Projects) 375 foreach(ProjectNode project in solution.Projects)
376 { 376 {
377 CleanProject(project); 377 CleanProject(project);
378 } 378 }
379 379
380 m_Kernel.Log.Write(""); 380 m_Kernel.Log.Write("");
381 } 381 }
382 382
383 #endregion 383 #endregion
384 384
385 #region ITarget Members 385 #region ITarget Members
386 386
387 /// <summary> 387 /// <summary>
388 /// Writes the specified kern. 388 /// Writes the specified kern.
389 /// </summary> 389 /// </summary>
390 /// <param name="kern">The kern.</param> 390 /// <param name="kern">The kern.</param>
391 public void Write(Kernel kern) 391 public void Write(Kernel kern)
392 { 392 {
393 if( kern == null ) 393 if( kern == null )
394 { 394 {
395 throw new ArgumentNullException("kern"); 395 throw new ArgumentNullException("kern");
396 } 396 }
397 m_Kernel = kern; 397 m_Kernel = kern;
398 foreach(SolutionNode solution in kern.Solutions) 398 foreach(SolutionNode solution in kern.Solutions)
399 { 399 {
400 WriteCombine(solution); 400 WriteCombine(solution);
401 } 401 }
402 m_Kernel = null; 402 m_Kernel = null;
403 } 403 }
404 404
405 /// <summary> 405 /// <summary>
406 /// Cleans the specified kern. 406 /// Cleans the specified kern.
407 /// </summary> 407 /// </summary>
408 /// <param name="kern">The kern.</param> 408 /// <param name="kern">The kern.</param>
409 public virtual void Clean(Kernel kern) 409 public virtual void Clean(Kernel kern)
410 { 410 {
411 if( kern == null ) 411 if( kern == null )
412 { 412 {
413 throw new ArgumentNullException("kern"); 413 throw new ArgumentNullException("kern");
414 } 414 }
415 m_Kernel = kern; 415 m_Kernel = kern;
416 foreach(SolutionNode sol in kern.Solutions) 416 foreach(SolutionNode sol in kern.Solutions)
417 { 417 {
418 CleanSolution(sol); 418 CleanSolution(sol);
419 } 419 }
420 m_Kernel = null; 420 m_Kernel = null;
421 } 421 }
422 422
423 /// <summary> 423 /// <summary>
424 /// Gets the name. 424 /// Gets the name.
425 /// </summary> 425 /// </summary>
426 /// <value>The name.</value> 426 /// <value>The name.</value>
427 public string Name 427 public string Name
428 { 428 {
429 get 429 get
430 { 430 {
431 return "sharpdev"; 431 return "sharpdev";
432 } 432 }
433 } 433 }
434 434
435 #endregion 435 #endregion
436 } 436 }
437} 437}
diff --git a/Prebuild/src/Core/Targets/VS2002Target.cs b/Prebuild/src/Core/Targets/VS2002Target.cs
index 66216dc..b380f36 100644
--- a/Prebuild/src/Core/Targets/VS2002Target.cs
+++ b/Prebuild/src/Core/Targets/VS2002Target.cs
@@ -1,96 +1,96 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36 36
37using Prebuild.Core.Attributes; 37using Prebuild.Core.Attributes;
38 38
39namespace Prebuild.Core.Targets 39namespace Prebuild.Core.Targets
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// 42 ///
43 /// </summary> 43 /// </summary>
44 [Target("vs2002")] 44 [Target("vs2002")]
45 public class VS2002Target : VS2003Target 45 public class VS2002Target : VS2003Target
46 { 46 {
47 #region Private Methods 47 #region Private Methods
48 48
49 private void SetVS2002() 49 private void SetVS2002()
50 { 50 {
51 this.SolutionVersion = "7.00"; 51 this.SolutionVersion = "7.00";
52 this.ProductVersion = "7.0.9254"; 52 this.ProductVersion = "7.0.9254";
53 this.SchemaVersion = "1.0"; 53 this.SchemaVersion = "1.0";
54 this.VersionName = "2002"; 54 this.VersionName = "2002";
55 this.Version = VSVersion.VS70; 55 this.Version = VSVersion.VS70;
56 } 56 }
57 57
58 #endregion 58 #endregion
59 59
60 #region Public Methods 60 #region Public Methods
61 61
62 /// <summary> 62 /// <summary>
63 /// Writes the specified kern. 63 /// Writes the specified kern.
64 /// </summary> 64 /// </summary>
65 /// <param name="kern">The kern.</param> 65 /// <param name="kern">The kern.</param>
66 public override void Write(Kernel kern) 66 public override void Write(Kernel kern)
67 { 67 {
68 SetVS2002(); 68 SetVS2002();
69 base.Write(kern); 69 base.Write(kern);
70 } 70 }
71 71
72 /// <summary> 72 /// <summary>
73 /// Cleans the specified kern. 73 /// Cleans the specified kern.
74 /// </summary> 74 /// </summary>
75 /// <param name="kern">The kern.</param> 75 /// <param name="kern">The kern.</param>
76 public override void Clean(Kernel kern) 76 public override void Clean(Kernel kern)
77 { 77 {
78 SetVS2002(); 78 SetVS2002();
79 base.Clean(kern); 79 base.Clean(kern);
80 } 80 }
81 81
82 /// <summary> 82 /// <summary>
83 /// Gets the name. 83 /// Gets the name.
84 /// </summary> 84 /// </summary>
85 /// <value>The name.</value> 85 /// <value>The name.</value>
86 public override string Name 86 public override string Name
87 { 87 {
88 get 88 get
89 { 89 {
90 return "vs2002"; 90 return "vs2002";
91 } 91 }
92 } 92 }
93 93
94 #endregion 94 #endregion
95 } 95 }
96} 96}
diff --git a/Prebuild/src/Core/Targets/VS2003Target.cs b/Prebuild/src/Core/Targets/VS2003Target.cs
index b3236a8..c3ca930 100644
--- a/Prebuild/src/Core/Targets/VS2003Target.cs
+++ b/Prebuild/src/Core/Targets/VS2003Target.cs
@@ -1,633 +1,633 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-29 21:11:40 +0200 (fr, 29 sep 2006) $ 30 * $Date: 2006-09-29 21:11:40 +0200 (fr, 29 sep 2006) $
31 * $Revision: 177 $ 31 * $Revision: 177 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.IO; 38using System.IO;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Nodes; 42using Prebuild.Core.Nodes;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild.Core.Targets 45namespace Prebuild.Core.Targets
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 public enum VSVersion 50 public enum VSVersion
51 { 51 {
52 /// <summary> 52 /// <summary>
53 /// 53 ///
54 /// </summary> 54 /// </summary>
55 VS70, 55 VS70,
56 /// <summary> 56 /// <summary>
57 /// 57 ///
58 /// </summary> 58 /// </summary>
59 VS71, 59 VS71,
60 /// <summary> 60 /// <summary>
61 /// 61 ///
62 /// </summary> 62 /// </summary>
63 VS80 63 VS80
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// 67 ///
68 /// </summary> 68 /// </summary>
69 [Target("vs2003")] 69 [Target("vs2003")]
70 public class VS2003Target : ITarget 70 public class VS2003Target : ITarget
71 { 71 {
72 72
73 #region Fields 73 #region Fields
74 74
75 string solutionVersion = "8.00"; 75 string solutionVersion = "8.00";
76 string productVersion = "7.10.3077"; 76 string productVersion = "7.10.3077";
77 string schemaVersion = "2.0"; 77 string schemaVersion = "2.0";
78 string versionName = "2003"; 78 string versionName = "2003";
79 VSVersion version = VSVersion.VS71; 79 VSVersion version = VSVersion.VS71;
80 80
81 Hashtable m_Tools; 81 Hashtable m_Tools;
82 Kernel m_Kernel; 82 Kernel m_Kernel;
83 83
84 /// <summary> 84 /// <summary>
85 /// Gets or sets the solution version. 85 /// Gets or sets the solution version.
86 /// </summary> 86 /// </summary>
87 /// <value>The solution version.</value> 87 /// <value>The solution version.</value>
88 protected string SolutionVersion 88 protected string SolutionVersion
89 { 89 {
90 get 90 get
91 { 91 {
92 return this.solutionVersion; 92 return this.solutionVersion;
93 } 93 }
94 set 94 set
95 { 95 {
96 this.solutionVersion = value; 96 this.solutionVersion = value;
97 } 97 }
98 } 98 }
99 /// <summary> 99 /// <summary>
100 /// Gets or sets the product version. 100 /// Gets or sets the product version.
101 /// </summary> 101 /// </summary>
102 /// <value>The product version.</value> 102 /// <value>The product version.</value>
103 protected string ProductVersion 103 protected string ProductVersion
104 { 104 {
105 get 105 get
106 { 106 {
107 return this.productVersion; 107 return this.productVersion;
108 } 108 }
109 set 109 set
110 { 110 {
111 this.productVersion = value; 111 this.productVersion = value;
112 } 112 }
113 } 113 }
114 /// <summary> 114 /// <summary>
115 /// Gets or sets the schema version. 115 /// Gets or sets the schema version.
116 /// </summary> 116 /// </summary>
117 /// <value>The schema version.</value> 117 /// <value>The schema version.</value>
118 protected string SchemaVersion 118 protected string SchemaVersion
119 { 119 {
120 get 120 get
121 { 121 {
122 return this.schemaVersion; 122 return this.schemaVersion;
123 } 123 }
124 set 124 set
125 { 125 {
126 this.schemaVersion = value; 126 this.schemaVersion = value;
127 } 127 }
128 } 128 }
129 /// <summary> 129 /// <summary>
130 /// Gets or sets the name of the version. 130 /// Gets or sets the name of the version.
131 /// </summary> 131 /// </summary>
132 /// <value>The name of the version.</value> 132 /// <value>The name of the version.</value>
133 protected string VersionName 133 protected string VersionName
134 { 134 {
135 get 135 get
136 { 136 {
137 return this.versionName; 137 return this.versionName;
138 } 138 }
139 set 139 set
140 { 140 {
141 this.versionName = value; 141 this.versionName = value;
142 } 142 }
143 } 143 }
144 /// <summary> 144 /// <summary>
145 /// Gets or sets the version. 145 /// Gets or sets the version.
146 /// </summary> 146 /// </summary>
147 /// <value>The version.</value> 147 /// <value>The version.</value>
148 protected VSVersion Version 148 protected VSVersion Version
149 { 149 {
150 get 150 get
151 { 151 {
152 return this.version; 152 return this.version;
153 } 153 }
154 set 154 set
155 { 155 {
156 this.version = value; 156 this.version = value;
157 } 157 }
158 } 158 }
159 159
160 #endregion 160 #endregion
161 161
162 #region Constructors 162 #region Constructors
163 163
164 /// <summary> 164 /// <summary>
165 /// Initializes a new instance of the <see cref="VS2003Target"/> class. 165 /// Initializes a new instance of the <see cref="VS2003Target"/> class.
166 /// </summary> 166 /// </summary>
167 public VS2003Target() 167 public VS2003Target()
168 { 168 {
169 m_Tools = new Hashtable(); 169 m_Tools = new Hashtable();
170 170
171 m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP"); 171 m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP");
172 m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic"); 172 m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic");
173 } 173 }
174 174
175 #endregion 175 #endregion
176 176
177 #region Private Methods 177 #region Private Methods
178 178
179 private string MakeRefPath(ProjectNode project) 179 private string MakeRefPath(ProjectNode project)
180 { 180 {
181 string ret = ""; 181 string ret = "";
182 foreach(ReferencePathNode node in project.ReferencePaths) 182 foreach(ReferencePathNode node in project.ReferencePaths)
183 { 183 {
184 try 184 try
185 { 185 {
186 string fullPath = Helper.ResolvePath(node.Path); 186 string fullPath = Helper.ResolvePath(node.Path);
187 if(ret.Length < 1) 187 if(ret.Length < 1)
188 { 188 {
189 ret = fullPath; 189 ret = fullPath;
190 } 190 }
191 else 191 else
192 { 192 {
193 ret += ";" + fullPath; 193 ret += ";" + fullPath;
194 } 194 }
195 } 195 }
196 catch(ArgumentException) 196 catch(ArgumentException)
197 { 197 {
198 m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); 198 m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
199 } 199 }
200 } 200 }
201 201
202 return ret; 202 return ret;
203 } 203 }
204 204
205 private void WriteProject(SolutionNode solution, ProjectNode project) 205 private void WriteProject(SolutionNode solution, ProjectNode project)
206 { 206 {
207 if(!m_Tools.ContainsKey(project.Language)) 207 if(!m_Tools.ContainsKey(project.Language))
208 { 208 {
209 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 209 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
210 } 210 }
211 211
212 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; 212 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
213 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 213 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
214 StreamWriter ps = new StreamWriter(projectFile); 214 StreamWriter ps = new StreamWriter(projectFile);
215 215
216 m_Kernel.CurrentWorkingDirectory.Push(); 216 m_Kernel.CurrentWorkingDirectory.Push();
217 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); 217 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
218 218
219 IEnumerator enumerator; 219 IEnumerator enumerator;
220 //ConfigurationNode scripts; 220 //ConfigurationNode scripts;
221 221
222 using(ps) 222 using(ps)
223 { 223 {
224 ps.WriteLine("<VisualStudioProject>"); 224 ps.WriteLine("<VisualStudioProject>");
225 ps.WriteLine(" <{0}", toolInfo.XmlTag); 225 ps.WriteLine(" <{0}", toolInfo.XmlTag);
226 ps.WriteLine("\t\t\t\tProjectType = \"Local\""); 226 ps.WriteLine("\t\t\t\tProjectType = \"Local\"");
227 ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", this.ProductVersion); 227 ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", this.ProductVersion);
228 ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", this.SchemaVersion); 228 ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", this.SchemaVersion);
229 ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper()); 229 ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper());
230 ps.WriteLine("\t\t>"); 230 ps.WriteLine("\t\t>");
231 231
232 ps.WriteLine("\t\t\t\t<Build>"); 232 ps.WriteLine("\t\t\t\t<Build>");
233 ps.WriteLine(" <Settings"); 233 ps.WriteLine(" <Settings");
234 ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon); 234 ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon);
235 ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\""); 235 ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\"");
236 ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName); 236 ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName);
237 ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\""); 237 ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\"");
238 ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\""); 238 ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\"");
239 ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\""); 239 ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\"");
240 ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\""); 240 ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\"");
241 ps.WriteLine("\t\t\t\t DelaySign = \"false\""); 241 ps.WriteLine("\t\t\t\t DelaySign = \"false\"");
242 242
243 if(this.Version == VSVersion.VS70) 243 if(this.Version == VSVersion.VS70)
244 { 244 {
245 ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\""); 245 ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\"");
246 } 246 }
247 247
248 ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type.ToString()); 248 ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type.ToString());
249 249
250 enumerator = project.Configurations.GetEnumerator(); 250 enumerator = project.Configurations.GetEnumerator();
251 enumerator.Reset(); 251 enumerator.Reset();
252 enumerator.MoveNext(); 252 enumerator.MoveNext();
253 foreach(ConfigurationNode conf in project.Configurations) 253 foreach(ConfigurationNode conf in project.Configurations)
254 { 254 {
255 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) 255 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
256 { 256 {
257 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString())); 257 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
258 } 258 }
259 else 259 else
260 { 260 {
261 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]); 261 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]);
262 } 262 }
263 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0) 263 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
264 { 264 {
265 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString())); 265 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
266 } 266 }
267 else 267 else
268 { 268 {
269 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]); 269 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]);
270 } 270 }
271 if (conf.Options["RunPostBuildEvent"] == null) 271 if (conf.Options["RunPostBuildEvent"] == null)
272 { 272 {
273 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess"); 273 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess");
274 } 274 }
275 else 275 else
276 { 276 {
277 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]); 277 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]);
278 } 278 }
279 break; 279 break;
280 } 280 }
281 281
282 ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace); 282 ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace);
283 ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject); 283 ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject);
284 ps.WriteLine("\t\t >"); 284 ps.WriteLine("\t\t >");
285 285
286 foreach(ConfigurationNode conf in project.Configurations) 286 foreach(ConfigurationNode conf in project.Configurations)
287 { 287 {
288 ps.WriteLine("\t\t\t\t <Config"); 288 ps.WriteLine("\t\t\t\t <Config");
289 ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name); 289 ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name);
290 ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower()); 290 ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower());
291 ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]); 291 ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]);
292 ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower()); 292 ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower());
293 ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\""); 293 ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\"");
294 ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]); 294 ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]);
295 ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name 295 ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name
296 ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower()); 296 ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower());
297 ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]); 297 ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]);
298 ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower()); 298 ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower());
299 299
300 if(this.Version == VSVersion.VS71) 300 if(this.Version == VSVersion.VS71)
301 { 301 {
302 ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower()); 302 ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower());
303 ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower()); 303 ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower());
304 } 304 }
305 305
306 ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower()); 306 ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower());
307 ps.WriteLine(" OutputPath = \"{0}\"", 307 ps.WriteLine(" OutputPath = \"{0}\"",
308 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); 308 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
309 ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower()); 309 ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower());
310 ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower()); 310 ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower());
311 ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower()); 311 ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower());
312 ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]); 312 ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]);
313 ps.WriteLine(" />"); 313 ps.WriteLine(" />");
314 } 314 }
315 315
316 ps.WriteLine(" </Settings>"); 316 ps.WriteLine(" </Settings>");
317 317
318 ps.WriteLine(" <References>"); 318 ps.WriteLine(" <References>");
319 foreach(ReferenceNode refr in project.References) 319 foreach(ReferenceNode refr in project.References)
320 { 320 {
321 ps.WriteLine(" <Reference"); 321 ps.WriteLine(" <Reference");
322 ps.WriteLine(" Name = \"{0}\"", refr.Name); 322 ps.WriteLine(" Name = \"{0}\"", refr.Name);
323 ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name); 323 ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name);
324 324
325 if(solution.ProjectsTable.ContainsKey(refr.Name)) 325 if(solution.ProjectsTable.ContainsKey(refr.Name))
326 { 326 {
327 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; 327 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
328 ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper()); 328 ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper());
329 ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToString().ToUpper()); 329 ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToString().ToUpper());
330 } 330 }
331 else 331 else
332 { 332 {
333 if(refr.Path != null) 333 if(refr.Path != null)
334 { 334 {
335 ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); 335 ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
336 } 336 }
337 337
338 } 338 }
339 339
340 if(refr.LocalCopySpecified) 340 if(refr.LocalCopySpecified)
341 { 341 {
342 ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy); 342 ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy);
343 } 343 }
344 344
345 ps.WriteLine(" />"); 345 ps.WriteLine(" />");
346 } 346 }
347 ps.WriteLine(" </References>"); 347 ps.WriteLine(" </References>");
348 348
349 ps.WriteLine(" </Build>"); 349 ps.WriteLine(" </Build>");
350 ps.WriteLine(" <Files>"); 350 ps.WriteLine(" <Files>");
351 351
352 ps.WriteLine(" <Include>"); 352 ps.WriteLine(" <Include>");
353 353
354 foreach(string file in project.Files) 354 foreach(string file in project.Files)
355 { 355 {
356 string fileName = file.Replace(".\\", ""); 356 string fileName = file.Replace(".\\", "");
357 ps.WriteLine(" <File"); 357 ps.WriteLine(" <File");
358 ps.WriteLine(" RelPath = \"{0}\"", fileName); 358 ps.WriteLine(" RelPath = \"{0}\"", fileName);
359 ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file)); 359 ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file));
360 ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file)); 360 ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file));
361 ps.WriteLine(" />"); 361 ps.WriteLine(" />");
362 362
363 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) 363 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
364 { 364 {
365 ps.WriteLine(" <File"); 365 ps.WriteLine(" <File");
366 ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx"); 366 ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx");
367 int slash = fileName.LastIndexOf('\\'); 367 int slash = fileName.LastIndexOf('\\');
368 if (slash == -1) 368 if (slash == -1)
369 { 369 {
370 ps.WriteLine(" DependentUpon = \"{0}\"", fileName); 370 ps.WriteLine(" DependentUpon = \"{0}\"", fileName);
371 } 371 }
372 else 372 else
373 { 373 {
374 ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1)); 374 ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1));
375 } 375 }
376 ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource"); 376 ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource");
377 ps.WriteLine(" />"); 377 ps.WriteLine(" />");
378 378
379 } 379 }
380 } 380 }
381 ps.WriteLine(" </Include>"); 381 ps.WriteLine(" </Include>");
382 382
383 ps.WriteLine(" </Files>"); 383 ps.WriteLine(" </Files>");
384 ps.WriteLine(" </{0}>", toolInfo.XmlTag); 384 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
385 ps.WriteLine("</VisualStudioProject>"); 385 ps.WriteLine("</VisualStudioProject>");
386 } 386 }
387 387
388 ps = new StreamWriter(projectFile + ".user"); 388 ps = new StreamWriter(projectFile + ".user");
389 using(ps) 389 using(ps)
390 { 390 {
391 ps.WriteLine("<VisualStudioProject>"); 391 ps.WriteLine("<VisualStudioProject>");
392 ps.WriteLine(" <{0}>", toolInfo.XmlTag); 392 ps.WriteLine(" <{0}>", toolInfo.XmlTag);
393 ps.WriteLine(" <Build>"); 393 ps.WriteLine(" <Build>");
394 394
395 ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); 395 ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
396 foreach(ConfigurationNode conf in project.Configurations) 396 foreach(ConfigurationNode conf in project.Configurations)
397 { 397 {
398 ps.WriteLine(" <Config"); 398 ps.WriteLine(" <Config");
399 ps.WriteLine(" Name = \"{0}\"", conf.Name); 399 ps.WriteLine(" Name = \"{0}\"", conf.Name);
400 ps.WriteLine(" />"); 400 ps.WriteLine(" />");
401 } 401 }
402 ps.WriteLine(" </Settings>"); 402 ps.WriteLine(" </Settings>");
403 403
404 ps.WriteLine(" </Build>"); 404 ps.WriteLine(" </Build>");
405 ps.WriteLine(" </{0}>", toolInfo.XmlTag); 405 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
406 ps.WriteLine("</VisualStudioProject>"); 406 ps.WriteLine("</VisualStudioProject>");
407 } 407 }
408 408
409 m_Kernel.CurrentWorkingDirectory.Pop(); 409 m_Kernel.CurrentWorkingDirectory.Pop();
410 } 410 }
411 411
412 /// <summary> 412 /// <summary>
413 /// Gets the XML doc file. 413 /// Gets the XML doc file.
414 /// </summary> 414 /// </summary>
415 /// <param name="project">The project.</param> 415 /// <param name="project">The project.</param>
416 /// <param name="conf">The conf.</param> 416 /// <param name="conf">The conf.</param>
417 /// <returns></returns> 417 /// <returns></returns>
418 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) 418 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
419 { 419 {
420 if( conf == null ) 420 if( conf == null )
421 { 421 {
422 throw new ArgumentNullException("conf"); 422 throw new ArgumentNullException("conf");
423 } 423 }
424 if( project == null ) 424 if( project == null )
425 { 425 {
426 throw new ArgumentNullException("project"); 426 throw new ArgumentNullException("project");
427 } 427 }
428 // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false 428 // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false
429 // { 429 // {
430 // return string.Empty; 430 // return string.Empty;
431 // } 431 // }
432 432
433 //default to "AssemblyName.xml" 433 //default to "AssemblyName.xml"
434 //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; 434 //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
435 //return (string)conf.Options["XmlDocFile", defaultValue]; 435 //return (string)conf.Options["XmlDocFile", defaultValue];
436 436
437 //default to no XmlDocFile file 437 //default to no XmlDocFile file
438 return (string)conf.Options["XmlDocFile", ""]; 438 return (string)conf.Options["XmlDocFile", ""];
439 } 439 }
440 440
441 private void WriteSolution(SolutionNode solution) 441 private void WriteSolution(SolutionNode solution)
442 { 442 {
443 m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", this.VersionName); 443 m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", this.VersionName);
444 444
445 foreach(ProjectNode project in solution.Projects) 445 foreach(ProjectNode project in solution.Projects)
446 { 446 {
447 if(m_Kernel.AllowProject(project.FilterGroups)) 447 if(m_Kernel.AllowProject(project.FilterGroups))
448 { 448 {
449 m_Kernel.Log.Write("...Creating project: {0}", project.Name); 449 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
450 WriteProject(solution, project); 450 WriteProject(solution, project);
451 } 451 }
452 } 452 }
453 453
454 m_Kernel.Log.Write(""); 454 m_Kernel.Log.Write("");
455 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 455 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
456 StreamWriter ss = new StreamWriter(solutionFile); 456 StreamWriter ss = new StreamWriter(solutionFile);
457 457
458 m_Kernel.CurrentWorkingDirectory.Push(); 458 m_Kernel.CurrentWorkingDirectory.Push();
459 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); 459 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
460 460
461 using(ss) 461 using(ss)
462 { 462 {
463 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); 463 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion);
464 foreach(ProjectNode project in solution.Projects) 464 foreach(ProjectNode project in solution.Projects)
465 { 465 {
466 if(!m_Tools.ContainsKey(project.Language)) 466 if(!m_Tools.ContainsKey(project.Language))
467 { 467 {
468 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 468 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
469 } 469 }
470 470
471 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; 471 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
472 472
473 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 473 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
474 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", 474 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
475 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name, 475 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
476 toolInfo.FileExtension), project.Guid.ToString().ToUpper()); 476 toolInfo.FileExtension), project.Guid.ToString().ToUpper());
477 477
478 ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject"); 478 ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject");
479 ss.WriteLine("\tEndProjectSection"); 479 ss.WriteLine("\tEndProjectSection");
480 480
481 ss.WriteLine("EndProject"); 481 ss.WriteLine("EndProject");
482 } 482 }
483 483
484 ss.WriteLine("Global"); 484 ss.WriteLine("Global");
485 485
486 ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution"); 486 ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution");
487 foreach(ConfigurationNode conf in solution.Configurations) 487 foreach(ConfigurationNode conf in solution.Configurations)
488 { 488 {
489 ss.WriteLine("\t\t{0} = {0}", conf.Name); 489 ss.WriteLine("\t\t{0} = {0}", conf.Name);
490 } 490 }
491 ss.WriteLine("\tEndGlobalSection"); 491 ss.WriteLine("\tEndGlobalSection");
492 492
493 ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution"); 493 ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution");
494 foreach(ProjectNode project in solution.Projects) 494 foreach(ProjectNode project in solution.Projects)
495 { 495 {
496 for(int i = 0; i < project.References.Count; i++) 496 for(int i = 0; i < project.References.Count; i++)
497 { 497 {
498 ReferenceNode refr = (ReferenceNode)project.References[i]; 498 ReferenceNode refr = (ReferenceNode)project.References[i];
499 if(solution.ProjectsTable.ContainsKey(refr.Name)) 499 if(solution.ProjectsTable.ContainsKey(refr.Name))
500 { 500 {
501 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; 501 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
502 ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})", 502 ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})",
503 project.Guid.ToString().ToUpper() 503 project.Guid.ToString().ToUpper()
504 , i, 504 , i,
505 refProject.Guid.ToString().ToUpper() 505 refProject.Guid.ToString().ToUpper()
506 ); 506 );
507 } 507 }
508 } 508 }
509 } 509 }
510 ss.WriteLine("\tEndGlobalSection"); 510 ss.WriteLine("\tEndGlobalSection");
511 511
512 ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution"); 512 ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution");
513 foreach(ProjectNode project in solution.Projects) 513 foreach(ProjectNode project in solution.Projects)
514 { 514 {
515 foreach(ConfigurationNode conf in solution.Configurations) 515 foreach(ConfigurationNode conf in solution.Configurations)
516 { 516 {
517 ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET", 517 ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET",
518 project.Guid.ToString().ToUpper(), 518 project.Guid.ToString().ToUpper(),
519 conf.Name); 519 conf.Name);
520 520
521 ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET", 521 ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET",
522 project.Guid.ToString().ToUpper(), 522 project.Guid.ToString().ToUpper(),
523 conf.Name); 523 conf.Name);
524 } 524 }
525 } 525 }
526 ss.WriteLine("\tEndGlobalSection"); 526 ss.WriteLine("\tEndGlobalSection");
527 527
528 if(solution.Files != null) 528 if(solution.Files != null)
529 { 529 {
530 ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution"); 530 ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution");
531 foreach(string file in solution.Files) 531 foreach(string file in solution.Files)
532 { 532 {
533 ss.WriteLine("\t\t{0} = {0}", file); 533 ss.WriteLine("\t\t{0} = {0}", file);
534 } 534 }
535 ss.WriteLine("\tEndGlobalSection"); 535 ss.WriteLine("\tEndGlobalSection");
536 } 536 }
537 537
538 ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution"); 538 ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution");
539 ss.WriteLine("\tEndGlobalSection"); 539 ss.WriteLine("\tEndGlobalSection");
540 ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution"); 540 ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution");
541 ss.WriteLine("\tEndGlobalSection"); 541 ss.WriteLine("\tEndGlobalSection");
542 542
543 ss.WriteLine("EndGlobal"); 543 ss.WriteLine("EndGlobal");
544 } 544 }
545 545
546 m_Kernel.CurrentWorkingDirectory.Pop(); 546 m_Kernel.CurrentWorkingDirectory.Pop();
547 } 547 }
548 548
549 private void CleanProject(ProjectNode project) 549 private void CleanProject(ProjectNode project)
550 { 550 {
551 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); 551 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
552 552
553 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; 553 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
554 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 554 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
555 string userFile = projectFile + ".user"; 555 string userFile = projectFile + ".user";
556 556
557 Helper.DeleteIfExists(projectFile); 557 Helper.DeleteIfExists(projectFile);
558 Helper.DeleteIfExists(userFile); 558 Helper.DeleteIfExists(userFile);
559 } 559 }
560 560
561 private void CleanSolution(SolutionNode solution) 561 private void CleanSolution(SolutionNode solution)
562 { 562 {
563 m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", this.VersionName, solution.Name); 563 m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", this.VersionName, solution.Name);
564 564
565 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 565 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
566 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); 566 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
567 567
568 Helper.DeleteIfExists(slnFile); 568 Helper.DeleteIfExists(slnFile);
569 Helper.DeleteIfExists(suoFile); 569 Helper.DeleteIfExists(suoFile);
570 570
571 foreach(ProjectNode project in solution.Projects) 571 foreach(ProjectNode project in solution.Projects)
572 { 572 {
573 CleanProject(project); 573 CleanProject(project);
574 } 574 }
575 575
576 m_Kernel.Log.Write(""); 576 m_Kernel.Log.Write("");
577 } 577 }
578 578
579 #endregion 579 #endregion
580 580
581 #region ITarget Members 581 #region ITarget Members
582 582
583 /// <summary> 583 /// <summary>
584 /// Writes the specified kern. 584 /// Writes the specified kern.
585 /// </summary> 585 /// </summary>
586 /// <param name="kern">The kern.</param> 586 /// <param name="kern">The kern.</param>
587 public virtual void Write(Kernel kern) 587 public virtual void Write(Kernel kern)
588 { 588 {
589 if( kern == null ) 589 if( kern == null )
590 { 590 {
591 throw new ArgumentNullException("kern"); 591 throw new ArgumentNullException("kern");
592 } 592 }
593 m_Kernel = kern; 593 m_Kernel = kern;
594 foreach(SolutionNode sol in m_Kernel.Solutions) 594 foreach(SolutionNode sol in m_Kernel.Solutions)
595 { 595 {
596 WriteSolution(sol); 596 WriteSolution(sol);
597 } 597 }
598 m_Kernel = null; 598 m_Kernel = null;
599 } 599 }
600 600
601 /// <summary> 601 /// <summary>
602 /// Cleans the specified kern. 602 /// Cleans the specified kern.
603 /// </summary> 603 /// </summary>
604 /// <param name="kern">The kern.</param> 604 /// <param name="kern">The kern.</param>
605 public virtual void Clean(Kernel kern) 605 public virtual void Clean(Kernel kern)
606 { 606 {
607 if( kern == null ) 607 if( kern == null )
608 { 608 {
609 throw new ArgumentNullException("kern"); 609 throw new ArgumentNullException("kern");
610 } 610 }
611 m_Kernel = kern; 611 m_Kernel = kern;
612 foreach(SolutionNode sol in m_Kernel.Solutions) 612 foreach(SolutionNode sol in m_Kernel.Solutions)
613 { 613 {
614 CleanSolution(sol); 614 CleanSolution(sol);
615 } 615 }
616 m_Kernel = null; 616 m_Kernel = null;
617 } 617 }
618 618
619 /// <summary> 619 /// <summary>
620 /// Gets the name. 620 /// Gets the name.
621 /// </summary> 621 /// </summary>
622 /// <value>The name.</value> 622 /// <value>The name.</value>
623 public virtual string Name 623 public virtual string Name
624 { 624 {
625 get 625 get
626 { 626 {
627 return "vs2003"; 627 return "vs2003";
628 } 628 }
629 } 629 }
630 630
631 #endregion 631 #endregion
632 } 632 }
633} 633}
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs
index 23b6116..f01906b 100644
--- a/Prebuild/src/Core/Targets/VS2005Target.cs
+++ b/Prebuild/src/Core/Targets/VS2005Target.cs
@@ -1,883 +1,883 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com) 3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: robloach $ 29 * $Author: robloach $
30 * $Date: 2007-02-27 19:52:34 +0100 (ti, 27 feb 2007) $ 30 * $Date: 2007-02-27 19:52:34 +0100 (ti, 27 feb 2007) $
31 * $Revision: 207 $ 31 * $Revision: 207 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.IO; 38using System.IO;
39 39
40using Prebuild.Core.Attributes; 40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces; 41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Nodes; 42using Prebuild.Core.Nodes;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild.Core.Targets 45namespace Prebuild.Core.Targets
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 public struct ToolInfo 50 public struct ToolInfo
51 { 51 {
52 string name; 52 string name;
53 string guid; 53 string guid;
54 string fileExtension; 54 string fileExtension;
55 string xmlTag; 55 string xmlTag;
56 string importProject; 56 string importProject;
57 57
58 /// <summary> 58 /// <summary>
59 /// Gets or sets the name. 59 /// Gets or sets the name.
60 /// </summary> 60 /// </summary>
61 /// <value>The name.</value> 61 /// <value>The name.</value>
62 public string Name 62 public string Name
63 { 63 {
64 get 64 get
65 { 65 {
66 return name; 66 return name;
67 } 67 }
68 set 68 set
69 { 69 {
70 name = value; 70 name = value;
71 } 71 }
72 } 72 }
73 73
74 /// <summary> 74 /// <summary>
75 /// Gets or sets the GUID. 75 /// Gets or sets the GUID.
76 /// </summary> 76 /// </summary>
77 /// <value>The GUID.</value> 77 /// <value>The GUID.</value>
78 public string Guid 78 public string Guid
79 { 79 {
80 get 80 get
81 { 81 {
82 return guid; 82 return guid;
83 } 83 }
84 set 84 set
85 { 85 {
86 guid = value; 86 guid = value;
87 } 87 }
88 } 88 }
89 89
90 /// <summary> 90 /// <summary>
91 /// Gets or sets the file extension. 91 /// Gets or sets the file extension.
92 /// </summary> 92 /// </summary>
93 /// <value>The file extension.</value> 93 /// <value>The file extension.</value>
94 public string FileExtension 94 public string FileExtension
95 { 95 {
96 get 96 get
97 { 97 {
98 return fileExtension; 98 return fileExtension;
99 } 99 }
100 set 100 set
101 { 101 {
102 fileExtension = value; 102 fileExtension = value;
103 } 103 }
104 } 104 }
105 /// <summary> 105 /// <summary>
106 /// Gets or sets the XML tag. 106 /// Gets or sets the XML tag.
107 /// </summary> 107 /// </summary>
108 /// <value>The XML tag.</value> 108 /// <value>The XML tag.</value>
109 public string XmlTag 109 public string XmlTag
110 { 110 {
111 get 111 get
112 { 112 {
113 return xmlTag; 113 return xmlTag;
114 } 114 }
115 set 115 set
116 { 116 {
117 xmlTag = value; 117 xmlTag = value;
118 } 118 }
119 } 119 }
120 120
121 /// <summary> 121 /// <summary>
122 /// Gets or sets the import project property. 122 /// Gets or sets the import project property.
123 /// </summary> 123 /// </summary>
124 /// <value>The ImportProject tag.</value> 124 /// <value>The ImportProject tag.</value>
125 public string ImportProject 125 public string ImportProject
126 { 126 {
127 get 127 get
128 { 128 {
129 return importProject; 129 return importProject;
130 } 130 }
131 set 131 set
132 { 132 {
133 importProject = value; 133 importProject = value;
134 } 134 }
135 } 135 }
136 136
137 /// <summary> 137 /// <summary>
138 /// Initializes a new instance of the <see cref="ToolInfo"/> class. 138 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
139 /// </summary> 139 /// </summary>
140 /// <param name="name">The name.</param> 140 /// <param name="name">The name.</param>
141 /// <param name="guid">The GUID.</param> 141 /// <param name="guid">The GUID.</param>
142 /// <param name="fileExtension">The file extension.</param> 142 /// <param name="fileExtension">The file extension.</param>
143 /// <param name="xml">The XML.</param> 143 /// <param name="xml">The XML.</param>
144 /// <param name="importProject">The import project.</param> 144 /// <param name="importProject">The import project.</param>
145 public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject) 145 public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject)
146 { 146 {
147 this.name = name; 147 this.name = name;
148 this.guid = guid; 148 this.guid = guid;
149 this.fileExtension = fileExtension; 149 this.fileExtension = fileExtension;
150 this.xmlTag = xml; 150 this.xmlTag = xml;
151 this.importProject = importProject; 151 this.importProject = importProject;
152 } 152 }
153 153
154 /// <summary> 154 /// <summary>
155 /// Initializes a new instance of the <see cref="ToolInfo"/> class. 155 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
156 /// </summary> 156 /// </summary>
157 /// <param name="name">The name.</param> 157 /// <param name="name">The name.</param>
158 /// <param name="guid">The GUID.</param> 158 /// <param name="guid">The GUID.</param>
159 /// <param name="fileExtension">The file extension.</param> 159 /// <param name="fileExtension">The file extension.</param>
160 /// <param name="xml">The XML.</param> 160 /// <param name="xml">The XML.</param>
161 public ToolInfo(string name, string guid, string fileExtension, string xml) 161 public ToolInfo(string name, string guid, string fileExtension, string xml)
162 { 162 {
163 this.name = name; 163 this.name = name;
164 this.guid = guid; 164 this.guid = guid;
165 this.fileExtension = fileExtension; 165 this.fileExtension = fileExtension;
166 this.xmlTag = xml; 166 this.xmlTag = xml;
167 this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets"; 167 this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets";
168 } 168 }
169 169
170 /// <summary> 170 /// <summary>
171 /// Equals operator 171 /// Equals operator
172 /// </summary> 172 /// </summary>
173 /// <param name="obj">ToolInfo to compare</param> 173 /// <param name="obj">ToolInfo to compare</param>
174 /// <returns>true if toolInfos are equal</returns> 174 /// <returns>true if toolInfos are equal</returns>
175 public override bool Equals(object obj) 175 public override bool Equals(object obj)
176 { 176 {
177 if (obj == null) 177 if (obj == null)
178 { 178 {
179 throw new ArgumentNullException("obj"); 179 throw new ArgumentNullException("obj");
180 } 180 }
181 if (obj.GetType() != typeof(ToolInfo)) 181 if (obj.GetType() != typeof(ToolInfo))
182 return false; 182 return false;
183 183
184 ToolInfo c = (ToolInfo)obj; 184 ToolInfo c = (ToolInfo)obj;
185 return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject)); 185 return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject));
186 } 186 }
187 187
188 /// <summary> 188 /// <summary>
189 /// Equals operator 189 /// Equals operator
190 /// </summary> 190 /// </summary>
191 /// <param name="c1">ToolInfo to compare</param> 191 /// <param name="c1">ToolInfo to compare</param>
192 /// <param name="c2">ToolInfo to compare</param> 192 /// <param name="c2">ToolInfo to compare</param>
193 /// <returns>True if toolInfos are equal</returns> 193 /// <returns>True if toolInfos are equal</returns>
194 public static bool operator ==(ToolInfo c1, ToolInfo c2) 194 public static bool operator ==(ToolInfo c1, ToolInfo c2)
195 { 195 {
196 return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag)); 196 return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag));
197 } 197 }
198 198
199 /// <summary> 199 /// <summary>
200 /// Not equals operator 200 /// Not equals operator
201 /// </summary> 201 /// </summary>
202 /// <param name="c1">ToolInfo to compare</param> 202 /// <param name="c1">ToolInfo to compare</param>
203 /// <param name="c2">ToolInfo to compare</param> 203 /// <param name="c2">ToolInfo to compare</param>
204 /// <returns>True if toolInfos are not equal</returns> 204 /// <returns>True if toolInfos are not equal</returns>
205 public static bool operator !=(ToolInfo c1, ToolInfo c2) 205 public static bool operator !=(ToolInfo c1, ToolInfo c2)
206 { 206 {
207 return !(c1 == c2); 207 return !(c1 == c2);
208 } 208 }
209 209
210 /// <summary> 210 /// <summary>
211 /// Hash Code 211 /// Hash Code
212 /// </summary> 212 /// </summary>
213 /// <returns>Hash code</returns> 213 /// <returns>Hash code</returns>
214 public override int GetHashCode() 214 public override int GetHashCode()
215 { 215 {
216 return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode(); 216 return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode();
217 217
218 } 218 }
219 } 219 }
220 220
221 /// <summary> 221 /// <summary>
222 /// 222 ///
223 /// </summary> 223 /// </summary>
224 [Target("vs2005")] 224 [Target("vs2005")]
225 public class VS2005Target : ITarget 225 public class VS2005Target : ITarget
226 { 226 {
227 #region Inner Classes 227 #region Inner Classes
228 228
229 #endregion 229 #endregion
230 230
231 #region Fields 231 #region Fields
232 232
233 string solutionVersion = "9.00"; 233 string solutionVersion = "9.00";
234 string productVersion = "8.0.50727"; 234 string productVersion = "8.0.50727";
235 string schemaVersion = "2.0"; 235 string schemaVersion = "2.0";
236 string versionName = "Visual C# 2005"; 236 string versionName = "Visual C# 2005";
237 VSVersion version = VSVersion.VS80; 237 VSVersion version = VSVersion.VS80;
238 238
239 Hashtable tools; 239 Hashtable tools;
240 Kernel kernel; 240 Kernel kernel;
241 241
242 /// <summary> 242 /// <summary>
243 /// Gets or sets the solution version. 243 /// Gets or sets the solution version.
244 /// </summary> 244 /// </summary>
245 /// <value>The solution version.</value> 245 /// <value>The solution version.</value>
246 protected string SolutionVersion 246 protected string SolutionVersion
247 { 247 {
248 get 248 get
249 { 249 {
250 return this.solutionVersion; 250 return this.solutionVersion;
251 } 251 }
252 set 252 set
253 { 253 {
254 this.solutionVersion = value; 254 this.solutionVersion = value;
255 } 255 }
256 } 256 }
257 /// <summary> 257 /// <summary>
258 /// Gets or sets the product version. 258 /// Gets or sets the product version.
259 /// </summary> 259 /// </summary>
260 /// <value>The product version.</value> 260 /// <value>The product version.</value>
261 protected string ProductVersion 261 protected string ProductVersion
262 { 262 {
263 get 263 get
264 { 264 {
265 return this.productVersion; 265 return this.productVersion;
266 } 266 }
267 set 267 set
268 { 268 {
269 this.productVersion = value; 269 this.productVersion = value;
270 } 270 }
271 } 271 }
272 /// <summary> 272 /// <summary>
273 /// Gets or sets the schema version. 273 /// Gets or sets the schema version.
274 /// </summary> 274 /// </summary>
275 /// <value>The schema version.</value> 275 /// <value>The schema version.</value>
276 protected string SchemaVersion 276 protected string SchemaVersion
277 { 277 {
278 get 278 get
279 { 279 {
280 return this.schemaVersion; 280 return this.schemaVersion;
281 } 281 }
282 set 282 set
283 { 283 {
284 this.schemaVersion = value; 284 this.schemaVersion = value;
285 } 285 }
286 } 286 }
287 /// <summary> 287 /// <summary>
288 /// Gets or sets the name of the version. 288 /// Gets or sets the name of the version.
289 /// </summary> 289 /// </summary>
290 /// <value>The name of the version.</value> 290 /// <value>The name of the version.</value>
291 protected string VersionName 291 protected string VersionName
292 { 292 {
293 get 293 get
294 { 294 {
295 return this.versionName; 295 return this.versionName;
296 } 296 }
297 set 297 set
298 { 298 {
299 this.versionName = value; 299 this.versionName = value;
300 } 300 }
301 } 301 }
302 /// <summary> 302 /// <summary>
303 /// Gets or sets the version. 303 /// Gets or sets the version.
304 /// </summary> 304 /// </summary>
305 /// <value>The version.</value> 305 /// <value>The version.</value>
306 protected VSVersion Version 306 protected VSVersion Version
307 { 307 {
308 get 308 get
309 { 309 {
310 return this.version; 310 return this.version;
311 } 311 }
312 set 312 set
313 { 313 {
314 this.version = value; 314 this.version = value;
315 } 315 }
316 } 316 }
317 317
318 #endregion 318 #endregion
319 319
320 #region Constructors 320 #region Constructors
321 321
322 /// <summary> 322 /// <summary>
323 /// Initializes a new instance of the <see cref="VS2005Target"/> class. 323 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
324 /// </summary> 324 /// </summary>
325 public VS2005Target() 325 public VS2005Target()
326 { 326 {
327 this.tools = new Hashtable(); 327 this.tools = new Hashtable();
328 328
329 this.tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets"); 329 this.tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets");
330 this.tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets"); 330 this.tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets");
331 this.tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets"); 331 this.tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets");
332 } 332 }
333 333
334 #endregion 334 #endregion
335 335
336 #region Private Methods 336 #region Private Methods
337 337
338 private string MakeRefPath(ProjectNode project) 338 private string MakeRefPath(ProjectNode project)
339 { 339 {
340 string ret = ""; 340 string ret = "";
341 foreach (ReferencePathNode node in project.ReferencePaths) 341 foreach (ReferencePathNode node in project.ReferencePaths)
342 { 342 {
343 try 343 try
344 { 344 {
345 string fullPath = Helper.ResolvePath(node.Path); 345 string fullPath = Helper.ResolvePath(node.Path);
346 if (ret.Length < 1) 346 if (ret.Length < 1)
347 { 347 {
348 ret = fullPath; 348 ret = fullPath;
349 } 349 }
350 else 350 else
351 { 351 {
352 ret += ";" + fullPath; 352 ret += ";" + fullPath;
353 } 353 }
354 } 354 }
355 catch (ArgumentException) 355 catch (ArgumentException)
356 { 356 {
357 this.kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); 357 this.kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
358 } 358 }
359 } 359 }
360 360
361 return ret; 361 return ret;
362 } 362 }
363 363
364 private void WriteProject(SolutionNode solution, ProjectNode project) 364 private void WriteProject(SolutionNode solution, ProjectNode project)
365 { 365 {
366 if (!tools.ContainsKey(project.Language)) 366 if (!tools.ContainsKey(project.Language))
367 { 367 {
368 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 368 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
369 } 369 }
370 370
371 ToolInfo toolInfo = (ToolInfo)tools[project.Language]; 371 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
372 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 372 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
373 StreamWriter ps = new StreamWriter(projectFile); 373 StreamWriter ps = new StreamWriter(projectFile);
374 374
375 kernel.CurrentWorkingDirectory.Push(); 375 kernel.CurrentWorkingDirectory.Push();
376 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); 376 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
377 377
378 #region Project File 378 #region Project File
379 using (ps) 379 using (ps)
380 { 380 {
381 ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); 381 ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
382 //ps.WriteLine(" <{0}", toolInfo.XMLTag); 382 //ps.WriteLine(" <{0}", toolInfo.XMLTag);
383 ps.WriteLine(" <PropertyGroup>"); 383 ps.WriteLine(" <PropertyGroup>");
384 ps.WriteLine(" <ProjectType>Local</ProjectType>"); 384 ps.WriteLine(" <ProjectType>Local</ProjectType>");
385 ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", this.ProductVersion); 385 ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", this.ProductVersion);
386 ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", this.SchemaVersion); 386 ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", this.SchemaVersion);
387 ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper()); 387 ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper());
388 388
389 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); 389 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
390 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); 390 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
391 //ps.WriteLine(" <Build>"); 391 //ps.WriteLine(" <Build>");
392 392
393 //ps.WriteLine(" <Settings"); 393 //ps.WriteLine(" <Settings");
394 ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon); 394 ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon);
395 ps.WriteLine(" <AssemblyKeyContainerName>"); 395 ps.WriteLine(" <AssemblyKeyContainerName>");
396 ps.WriteLine(" </AssemblyKeyContainerName>"); 396 ps.WriteLine(" </AssemblyKeyContainerName>");
397 ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName); 397 ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName);
398 foreach (ConfigurationNode conf in project.Configurations) 398 foreach (ConfigurationNode conf in project.Configurations)
399 { 399 {
400 if (conf.Options.KeyFile != "") 400 if (conf.Options.KeyFile != "")
401 { 401 {
402 ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile); 402 ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile);
403 ps.WriteLine(" <SignAssembly>true</SignAssembly>"); 403 ps.WriteLine(" <SignAssembly>true</SignAssembly>");
404 break; 404 break;
405 } 405 }
406 } 406 }
407 ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>"); 407 ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>");
408 ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>"); 408 ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>");
409 ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>"); 409 ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>");
410 ps.WriteLine(" <DelaySign>false</DelaySign>"); 410 ps.WriteLine(" <DelaySign>false</DelaySign>");
411 411
412 //if(m_Version == VSVersion.VS70) 412 //if(m_Version == VSVersion.VS70)
413 // ps.WriteLine(" NoStandardLibraries = \"false\""); 413 // ps.WriteLine(" NoStandardLibraries = \"false\"");
414 414
415 ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type.ToString()); 415 ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type.ToString());
416 ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder); 416 ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder);
417 ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace); 417 ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace);
418 ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject); 418 ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject);
419 //ps.WriteLine(" >"); 419 //ps.WriteLine(" >");
420 ps.WriteLine(" <FileUpgradeFlags>"); 420 ps.WriteLine(" <FileUpgradeFlags>");
421 ps.WriteLine(" </FileUpgradeFlags>"); 421 ps.WriteLine(" </FileUpgradeFlags>");
422 422
423 ps.WriteLine(" </PropertyGroup>"); 423 ps.WriteLine(" </PropertyGroup>");
424 424
425 foreach (ConfigurationNode conf in project.Configurations) 425 foreach (ConfigurationNode conf in project.Configurations)
426 { 426 {
427 ps.Write(" <PropertyGroup "); 427 ps.Write(" <PropertyGroup ");
428 ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \">", conf.Name); 428 ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \">", conf.Name);
429 ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]); 429 ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]);
430 ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]); 430 ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]);
431 ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]); 431 ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]);
432 ps.WriteLine(" <ConfigurationOverrideFile>"); 432 ps.WriteLine(" <ConfigurationOverrideFile>");
433 ps.WriteLine(" </ConfigurationOverrideFile>"); 433 ps.WriteLine(" </ConfigurationOverrideFile>");
434 ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); 434 ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]);
435 ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", conf.Options["XmlDocFile"]); 435 ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", conf.Options["XmlDocFile"]);
436 ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]); 436 ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
437 ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); 437 ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
438 // ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]); 438 // ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]);
439 439
440 // if(m_Version == VSVersion.VS71) 440 // if(m_Version == VSVersion.VS71)
441 // { 441 // {
442 // ps.WriteLine(" NoStdLib = \"{0}\"", conf.Options["NoStdLib"]); 442 // ps.WriteLine(" NoStdLib = \"{0}\"", conf.Options["NoStdLib"]);
443 // ps.WriteLine(" NoWarn = \"{0}\"", conf.Options["SuppressWarnings"]); 443 // ps.WriteLine(" NoWarn = \"{0}\"", conf.Options["SuppressWarnings"]);
444 // } 444 // }
445 445
446 ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]); 446 ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]);
447 ps.WriteLine(" <OutputPath>{0}</OutputPath>", 447 ps.WriteLine(" <OutputPath>{0}</OutputPath>",
448 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); 448 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
449 ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]); 449 ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]);
450 ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]); 450 ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]);
451 ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]); 451 ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]);
452 ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]); 452 ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]);
453 ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]); 453 ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]);
454 ps.WriteLine(" </PropertyGroup>"); 454 ps.WriteLine(" </PropertyGroup>");
455 } 455 }
456 456
457 //ps.WriteLine(" </Settings>"); 457 //ps.WriteLine(" </Settings>");
458 458
459 // Assembly References 459 // Assembly References
460 ps.WriteLine(" <ItemGroup>"); 460 ps.WriteLine(" <ItemGroup>");
461 string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path; 461 string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path;
462 462
463 foreach (ReferenceNode refr in project.References) 463 foreach (ReferenceNode refr in project.References)
464 { 464 {
465 if (!solution.ProjectsTable.ContainsKey(refr.Name)) 465 if (!solution.ProjectsTable.ContainsKey(refr.Name))
466 { 466 {
467 ps.Write(" <Reference"); 467 ps.Write(" <Reference");
468 ps.Write(" Include=\""); 468 ps.Write(" Include=\"");
469 ps.Write(refr.Name); 469 ps.Write(refr.Name);
470 470
471 ps.WriteLine("\" >"); 471 ps.WriteLine("\" >");
472 472
473 string path; 473 string path;
474 474
475 if( refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase )) 475 if( refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase ))
476 { 476 {
477 path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\'); 477 path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\');
478 } 478 }
479 else 479 else
480 { 480 {
481 path = refr.Name + ".dll"; 481 path = refr.Name + ".dll";
482 } 482 }
483 483
484 // TODO: Allow reference to *.exe files 484 // TODO: Allow reference to *.exe files
485 ps.WriteLine(" <HintPath>{0}</HintPath>", path ); 485 ps.WriteLine(" <HintPath>{0}</HintPath>", path );
486 ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); 486 ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy);
487 ps.WriteLine(" </Reference>"); 487 ps.WriteLine(" </Reference>");
488 } 488 }
489 } 489 }
490 ps.WriteLine(" </ItemGroup>"); 490 ps.WriteLine(" </ItemGroup>");
491 491
492 //Project References 492 //Project References
493 ps.WriteLine(" <ItemGroup>"); 493 ps.WriteLine(" <ItemGroup>");
494 foreach (ReferenceNode refr in project.References) 494 foreach (ReferenceNode refr in project.References)
495 { 495 {
496 if (solution.ProjectsTable.ContainsKey(refr.Name)) 496 if (solution.ProjectsTable.ContainsKey(refr.Name))
497 { 497 {
498 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; 498 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
499 // TODO: Allow reference to visual basic projects 499 // TODO: Allow reference to visual basic projects
500 string path = 500 string path =
501 Helper.MakePathRelativeTo(project.FullPath, 501 Helper.MakePathRelativeTo(project.FullPath,
502 Helper.MakeFilePath(refProject.FullPath, refProject.Name, "csproj")); 502 Helper.MakeFilePath(refProject.FullPath, refProject.Name, "csproj"));
503 ps.WriteLine(" <ProjectReference Include=\"{0}\">", path ); 503 ps.WriteLine(" <ProjectReference Include=\"{0}\">", path );
504 //<ProjectReference Include="..\..\RealmForge\Utility\RealmForge.Utility.csproj"> 504 //<ProjectReference Include="..\..\RealmForge\Utility\RealmForge.Utility.csproj">
505 ps.WriteLine(" <Name>{0}</Name>", refProject.Name); 505 ps.WriteLine(" <Name>{0}</Name>", refProject.Name);
506 // <Name>RealmForge.Utility</Name> 506 // <Name>RealmForge.Utility</Name>
507 ps.WriteLine(" <Project>{{{0}}}</Project>", refProject.Guid.ToString().ToUpper()); 507 ps.WriteLine(" <Project>{{{0}}}</Project>", refProject.Guid.ToString().ToUpper());
508 // <Project>{6880D1D3-69EE-461B-B841-5319845B20D3}</Project> 508 // <Project>{6880D1D3-69EE-461B-B841-5319845B20D3}</Project>
509 ps.WriteLine(" <Package>{0}</Package>", toolInfo.Guid.ToString().ToUpper()); 509 ps.WriteLine(" <Package>{0}</Package>", toolInfo.Guid.ToString().ToUpper());
510 // <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 510 // <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
511 ps.WriteLine("\t\t\t<Private>{0}</Private>", refr.LocalCopy); 511 ps.WriteLine("\t\t\t<Private>{0}</Private>", refr.LocalCopy);
512 ps.WriteLine(" </ProjectReference>"); 512 ps.WriteLine(" </ProjectReference>");
513 //</ProjectReference> 513 //</ProjectReference>
514 } 514 }
515 else 515 else
516 { 516 {
517 } 517 }
518 } 518 }
519 ps.WriteLine(" </ItemGroup>"); 519 ps.WriteLine(" </ItemGroup>");
520 520
521 // ps.WriteLine(" </Build>"); 521 // ps.WriteLine(" </Build>");
522 ps.WriteLine(" <ItemGroup>"); 522 ps.WriteLine(" <ItemGroup>");
523 523
524 // ps.WriteLine(" <Include>"); 524 // ps.WriteLine(" <Include>");
525 ArrayList list = new ArrayList(); 525 ArrayList list = new ArrayList();
526 foreach (string file in project.Files) 526 foreach (string file in project.Files)
527 { 527 {
528 // if (file == "Properties\\Bind.Designer.cs") 528 // if (file == "Properties\\Bind.Designer.cs")
529 // { 529 // {
530 // Console.WriteLine("Wait a minute!"); 530 // Console.WriteLine("Wait a minute!");
531 // Console.WriteLine(project.Files.GetSubType(file).ToString()); 531 // Console.WriteLine(project.Files.GetSubType(file).ToString());
532 // } 532 // }
533 533
534 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings && project.Files.GetSubType(file) != SubType.Designer) 534 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings && project.Files.GetSubType(file) != SubType.Designer)
535 { 535 {
536 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 536 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
537 537
538 int slash = file.LastIndexOf('\\'); 538 int slash = file.LastIndexOf('\\');
539 if (slash == -1) 539 if (slash == -1)
540 { 540 {
541 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file); 541 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file);
542 } 542 }
543 else 543 else
544 { 544 {
545 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(slash + 1, file.Length - slash - 1)); 545 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(slash + 1, file.Length - slash - 1));
546 } 546 }
547 ps.WriteLine(" <SubType>Designer</SubType>"); 547 ps.WriteLine(" <SubType>Designer</SubType>");
548 ps.WriteLine(" </EmbeddedResource>"); 548 ps.WriteLine(" </EmbeddedResource>");
549 // 549 //
550 } 550 }
551 551
552 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) == SubType.Designer) 552 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) == SubType.Designer)
553 { 553 {
554 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); 554 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
555 ps.WriteLine(" <SubType>" + project.Files.GetSubType(file) + "</SubType>"); 555 ps.WriteLine(" <SubType>" + project.Files.GetSubType(file) + "</SubType>");
556 ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>"); 556 ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>");
557 ps.WriteLine(" <LastGenOutput>Resources.Designer.cs</LastGenOutput>"); 557 ps.WriteLine(" <LastGenOutput>Resources.Designer.cs</LastGenOutput>");
558 ps.WriteLine(" </EmbeddedResource>"); 558 ps.WriteLine(" </EmbeddedResource>");
559 ps.WriteLine(" <Compile Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"); 559 ps.WriteLine(" <Compile Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs");
560 ps.WriteLine(" <AutoGen>True</AutoGen>"); 560 ps.WriteLine(" <AutoGen>True</AutoGen>");
561 ps.WriteLine(" <DesignTime>True</DesignTime>"); 561 ps.WriteLine(" <DesignTime>True</DesignTime>");
562 ps.WriteLine(" <DependentUpon>Resources.resx</DependentUpon>"); 562 ps.WriteLine(" <DependentUpon>Resources.resx</DependentUpon>");
563 ps.WriteLine(" </Compile>"); 563 ps.WriteLine(" </Compile>");
564 list.Add(file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"); 564 list.Add(file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs");
565 } 565 }
566 if (project.Files.GetSubType(file).ToString() == "Settings") 566 if (project.Files.GetSubType(file).ToString() == "Settings")
567 { 567 {
568 //Console.WriteLine("File: " + file); 568 //Console.WriteLine("File: " + file);
569 //Console.WriteLine("Last index: " + file.LastIndexOf('.')); 569 //Console.WriteLine("Last index: " + file.LastIndexOf('.'));
570 //Console.WriteLine("Length: " + file.Length); 570 //Console.WriteLine("Length: " + file.Length);
571 ps.Write(" <{0} ", project.Files.GetBuildAction(file)); 571 ps.Write(" <{0} ", project.Files.GetBuildAction(file));
572 ps.WriteLine("Include=\"{0}\">", file); 572 ps.WriteLine("Include=\"{0}\">", file);
573 int slash = file.LastIndexOf('\\'); 573 int slash = file.LastIndexOf('\\');
574 string fileName = file.Substring(slash + 1, file.Length - slash - 1); 574 string fileName = file.Substring(slash + 1, file.Length - slash - 1);
575 if (project.Files.GetBuildAction(file) == BuildAction.None) 575 if (project.Files.GetBuildAction(file) == BuildAction.None)
576 { 576 {
577 ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>"); 577 ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>");
578 578
579 //Console.WriteLine("FileName: " + fileName); 579 //Console.WriteLine("FileName: " + fileName);
580 //Console.WriteLine("FileNameMain: " + fileName.Substring(0, fileName.LastIndexOf('.'))); 580 //Console.WriteLine("FileNameMain: " + fileName.Substring(0, fileName.LastIndexOf('.')));
581 //Console.WriteLine("FileNameExt: " + fileName.Substring(fileName.LastIndexOf('.'), fileName.Length - fileName.LastIndexOf('.'))); 581 //Console.WriteLine("FileNameExt: " + fileName.Substring(fileName.LastIndexOf('.'), fileName.Length - fileName.LastIndexOf('.')));
582 if (slash == -1) 582 if (slash == -1)
583 { 583 {
584 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); 584 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
585 } 585 }
586 else 586 else
587 { 587 {
588 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); 588 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
589 } 589 }
590 } 590 }
591 else 591 else
592 { 592 {
593 ps.WriteLine(" <SubType>Code</SubType>"); 593 ps.WriteLine(" <SubType>Code</SubType>");
594 ps.WriteLine(" <AutoGen>True</AutoGen>"); 594 ps.WriteLine(" <AutoGen>True</AutoGen>");
595 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); 595 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
596 string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); 596 string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
597 string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); 597 string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
598 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", fileNameShorter + ".settings"); 598 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", fileNameShorter + ".settings");
599 } 599 }
600 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); 600 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
601 } 601 }
602 else if (project.Files.GetSubType(file) != SubType.Designer) 602 else if (project.Files.GetSubType(file) != SubType.Designer)
603 { 603 {
604 if (!list.Contains(file)) 604 if (!list.Contains(file))
605 { 605 {
606 ps.Write(" <{0} ", project.Files.GetBuildAction(file)); 606 ps.Write(" <{0} ", project.Files.GetBuildAction(file));
607 ps.WriteLine("Include=\"{0}\">", file); 607 ps.WriteLine("Include=\"{0}\">", file);
608 608
609 609
610 if (file.Contains("Designer.cs")) 610 if (file.Contains("Designer.cs"))
611 { 611 {
612 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(0, file.IndexOf(".Designer.cs")) + ".cs"); 612 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(0, file.IndexOf(".Designer.cs")) + ".cs");
613 } 613 }
614 614
615 if (project.Files.GetIsLink(file)) 615 if (project.Files.GetIsLink(file))
616 { 616 {
617 ps.WriteLine(" <Link>{0}</Link>", Path.GetFileName(file)); 617 ps.WriteLine(" <Link>{0}</Link>", Path.GetFileName(file));
618 } 618 }
619 else if (project.Files.GetBuildAction(file) != BuildAction.None) 619 else if (project.Files.GetBuildAction(file) != BuildAction.None)
620 { 620 {
621 if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource) 621 if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource)
622 { 622 {
623 ps.WriteLine(" <SubType>{0}</SubType>", project.Files.GetSubType(file)); 623 ps.WriteLine(" <SubType>{0}</SubType>", project.Files.GetSubType(file));
624 } 624 }
625 } 625 }
626 if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never) 626 if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never)
627 { 627 {
628 ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file)); 628 ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file));
629 } 629 }
630 630
631 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); 631 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
632 } 632 }
633 } 633 }
634 } 634 }
635 // ps.WriteLine(" </Include>"); 635 // ps.WriteLine(" </Include>");
636 636
637 ps.WriteLine(" </ItemGroup>"); 637 ps.WriteLine(" </ItemGroup>");
638 ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />"); 638 ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />");
639 ps.WriteLine(" <PropertyGroup>"); 639 ps.WriteLine(" <PropertyGroup>");
640 ps.WriteLine(" <PreBuildEvent>"); 640 ps.WriteLine(" <PreBuildEvent>");
641 ps.WriteLine(" </PreBuildEvent>"); 641 ps.WriteLine(" </PreBuildEvent>");
642 ps.WriteLine(" <PostBuildEvent>"); 642 ps.WriteLine(" <PostBuildEvent>");
643 ps.WriteLine(" </PostBuildEvent>"); 643 ps.WriteLine(" </PostBuildEvent>");
644 ps.WriteLine(" </PropertyGroup>"); 644 ps.WriteLine(" </PropertyGroup>");
645 // ps.WriteLine(" </{0}>", toolInfo.XMLTag); 645 // ps.WriteLine(" </{0}>", toolInfo.XMLTag);
646 ps.WriteLine("</Project>"); 646 ps.WriteLine("</Project>");
647 } 647 }
648 #endregion 648 #endregion
649 649
650 #region User File 650 #region User File
651 651
652 ps = new StreamWriter(projectFile + ".user"); 652 ps = new StreamWriter(projectFile + ".user");
653 using (ps) 653 using (ps)
654 { 654 {
655 ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); 655 ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
656 //ps.WriteLine( "<VisualStudioProject>" ); 656 //ps.WriteLine( "<VisualStudioProject>" );
657 //ps.WriteLine(" <{0}>", toolInfo.XMLTag); 657 //ps.WriteLine(" <{0}>", toolInfo.XMLTag);
658 //ps.WriteLine(" <Build>"); 658 //ps.WriteLine(" <Build>");
659 ps.WriteLine(" <PropertyGroup>"); 659 ps.WriteLine(" <PropertyGroup>");
660 //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); 660 //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
661 661
662 662
663 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); 663 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
664 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); 664 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
665 665
666 if (projectFile.Contains( "OpenSim.csproj" )) 666 if (projectFile.Contains( "OpenSim.csproj" ))
667 { 667 {
668 ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>"); 668 ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>");
669 } 669 }
670 670
671 ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); 671 ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
672 ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion); 672 ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion);
673 ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); 673 ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
674 ps.WriteLine(" <ProjectTrust>0</ProjectTrust>"); 674 ps.WriteLine(" <ProjectTrust>0</ProjectTrust>");
675 ps.WriteLine(" </PropertyGroup>"); 675 ps.WriteLine(" </PropertyGroup>");
676 foreach (ConfigurationNode conf in project.Configurations) 676 foreach (ConfigurationNode conf in project.Configurations)
677 { 677 {
678 ps.Write(" <PropertyGroup"); 678 ps.Write(" <PropertyGroup");
679 ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name); 679 ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name);
680 ps.WriteLine(" />"); 680 ps.WriteLine(" />");
681 } 681 }
682 682
683 ps.WriteLine("</Project>"); 683 ps.WriteLine("</Project>");
684 } 684 }
685 #endregion 685 #endregion
686 686
687 kernel.CurrentWorkingDirectory.Pop(); 687 kernel.CurrentWorkingDirectory.Pop();
688 } 688 }
689 689
690 private void WriteSolution(SolutionNode solution) 690 private void WriteSolution(SolutionNode solution)
691 { 691 {
692 kernel.Log.Write("Creating {0} solution and project files", this.VersionName); 692 kernel.Log.Write("Creating {0} solution and project files", this.VersionName);
693 693
694 foreach (ProjectNode project in solution.Projects) 694 foreach (ProjectNode project in solution.Projects)
695 { 695 {
696 kernel.Log.Write("...Creating project: {0}", project.Name); 696 kernel.Log.Write("...Creating project: {0}", project.Name);
697 WriteProject(solution, project); 697 WriteProject(solution, project);
698 } 698 }
699 699
700 kernel.Log.Write(""); 700 kernel.Log.Write("");
701 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 701 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
702 StreamWriter ss = new StreamWriter(solutionFile); 702 StreamWriter ss = new StreamWriter(solutionFile);
703 703
704 kernel.CurrentWorkingDirectory.Push(); 704 kernel.CurrentWorkingDirectory.Push();
705 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); 705 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
706 706
707 using (ss) 707 using (ss)
708 { 708 {
709 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); 709 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion);
710 ss.WriteLine("# Visual Studio 2005"); 710 ss.WriteLine("# Visual Studio 2005");
711 foreach (ProjectNode project in solution.Projects) 711 foreach (ProjectNode project in solution.Projects)
712 { 712 {
713 if (!tools.ContainsKey(project.Language)) 713 if (!tools.ContainsKey(project.Language))
714 { 714 {
715 throw new UnknownLanguageException("Unknown .NET language: " + project.Language); 715 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
716 } 716 }
717 717
718 ToolInfo toolInfo = (ToolInfo)tools[project.Language]; 718 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
719 719
720 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); 720 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
721 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", 721 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
722 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name, 722 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
723 toolInfo.FileExtension), project.Guid.ToString().ToUpper()); 723 toolInfo.FileExtension), project.Guid.ToString().ToUpper());
724 724
725 //ss.WriteLine(" ProjectSection(ProjectDependencies) = postProject"); 725 //ss.WriteLine(" ProjectSection(ProjectDependencies) = postProject");
726 //ss.WriteLine(" EndProjectSection"); 726 //ss.WriteLine(" EndProjectSection");
727 727
728 ss.WriteLine("EndProject"); 728 ss.WriteLine("EndProject");
729 } 729 }
730 730
731 if (solution.Files != null) 731 if (solution.Files != null)
732 { 732 {
733 ss.WriteLine("Project(\"{0}\") = \"Solution Items\", \"Solution Items\", \"{1}\"", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", "{468F1D07-AD17-4CC3-ABD0-2CA268E4E1A6}"); 733 ss.WriteLine("Project(\"{0}\") = \"Solution Items\", \"Solution Items\", \"{1}\"", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", "{468F1D07-AD17-4CC3-ABD0-2CA268E4E1A6}");
734 ss.WriteLine("\tProjectSection(SolutionItems) = preProject"); 734 ss.WriteLine("\tProjectSection(SolutionItems) = preProject");
735 foreach (string file in solution.Files) 735 foreach (string file in solution.Files)
736 ss.WriteLine("\t\t{0} = {0}", file); 736 ss.WriteLine("\t\t{0} = {0}", file);
737 ss.WriteLine("\tEndProjectSection"); 737 ss.WriteLine("\tEndProjectSection");
738 ss.WriteLine("EndProject"); 738 ss.WriteLine("EndProject");
739 } 739 }
740 740
741 ss.WriteLine("Global"); 741 ss.WriteLine("Global");
742 742
743 ss.WriteLine(" GlobalSection(SolutionConfigurationPlatforms) = preSolution"); 743 ss.WriteLine(" GlobalSection(SolutionConfigurationPlatforms) = preSolution");
744 foreach (ConfigurationNode conf in solution.Configurations) 744 foreach (ConfigurationNode conf in solution.Configurations)
745 { 745 {
746 ss.WriteLine(" {0}|Any CPU = {0}|Any CPU", conf.Name); 746 ss.WriteLine(" {0}|Any CPU = {0}|Any CPU", conf.Name);
747 } 747 }
748 ss.WriteLine(" EndGlobalSection"); 748 ss.WriteLine(" EndGlobalSection");
749 749
750 if (solution.Projects.Count > 1) 750 if (solution.Projects.Count > 1)
751 { 751 {
752 ss.WriteLine(" GlobalSection(ProjectDependencies) = postSolution"); 752 ss.WriteLine(" GlobalSection(ProjectDependencies) = postSolution");
753 } 753 }
754 foreach (ProjectNode project in solution.Projects) 754 foreach (ProjectNode project in solution.Projects)
755 { 755 {
756 for (int i = 0; i < project.References.Count; i++) 756 for (int i = 0; i < project.References.Count; i++)
757 { 757 {
758 ReferenceNode refr = (ReferenceNode)project.References[i]; 758 ReferenceNode refr = (ReferenceNode)project.References[i];
759 if (solution.ProjectsTable.ContainsKey(refr.Name)) 759 if (solution.ProjectsTable.ContainsKey(refr.Name))
760 { 760 {
761 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; 761 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
762 ss.WriteLine(" ({{{0}}}).{1} = ({{{2}}})", 762 ss.WriteLine(" ({{{0}}}).{1} = ({{{2}}})",
763 project.Guid.ToString().ToUpper() 763 project.Guid.ToString().ToUpper()
764 , i, 764 , i,
765 refProject.Guid.ToString().ToUpper() 765 refProject.Guid.ToString().ToUpper()
766 ); 766 );
767 } 767 }
768 } 768 }
769 } 769 }
770 if (solution.Projects.Count > 1) 770 if (solution.Projects.Count > 1)
771 { 771 {
772 ss.WriteLine(" EndGlobalSection"); 772 ss.WriteLine(" EndGlobalSection");
773 } 773 }
774 ss.WriteLine(" GlobalSection(ProjectConfigurationPlatforms) = postSolution"); 774 ss.WriteLine(" GlobalSection(ProjectConfigurationPlatforms) = postSolution");
775 foreach (ProjectNode project in solution.Projects) 775 foreach (ProjectNode project in solution.Projects)
776 { 776 {
777 foreach (ConfigurationNode conf in solution.Configurations) 777 foreach (ConfigurationNode conf in solution.Configurations)
778 { 778 {
779 ss.WriteLine(" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU", 779 ss.WriteLine(" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU",
780 project.Guid.ToString().ToUpper(), 780 project.Guid.ToString().ToUpper(),
781 conf.Name); 781 conf.Name);
782 782
783 ss.WriteLine(" {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU", 783 ss.WriteLine(" {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU",
784 project.Guid.ToString().ToUpper(), 784 project.Guid.ToString().ToUpper(),
785 conf.Name); 785 conf.Name);
786 } 786 }
787 } 787 }
788 ss.WriteLine(" EndGlobalSection"); 788 ss.WriteLine(" EndGlobalSection");
789 ss.WriteLine(" GlobalSection(SolutionProperties) = preSolution"); 789 ss.WriteLine(" GlobalSection(SolutionProperties) = preSolution");
790 ss.WriteLine(" HideSolutionNode = FALSE"); 790 ss.WriteLine(" HideSolutionNode = FALSE");
791 ss.WriteLine(" EndGlobalSection"); 791 ss.WriteLine(" EndGlobalSection");
792 792
793 ss.WriteLine("EndGlobal"); 793 ss.WriteLine("EndGlobal");
794 } 794 }
795 795
796 kernel.CurrentWorkingDirectory.Pop(); 796 kernel.CurrentWorkingDirectory.Pop();
797 } 797 }
798 798
799 private void CleanProject(ProjectNode project) 799 private void CleanProject(ProjectNode project)
800 { 800 {
801 kernel.Log.Write("...Cleaning project: {0}", project.Name); 801 kernel.Log.Write("...Cleaning project: {0}", project.Name);
802 802
803 ToolInfo toolInfo = (ToolInfo)tools[project.Language]; 803 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
804 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); 804 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
805 string userFile = projectFile + ".user"; 805 string userFile = projectFile + ".user";
806 806
807 Helper.DeleteIfExists(projectFile); 807 Helper.DeleteIfExists(projectFile);
808 Helper.DeleteIfExists(userFile); 808 Helper.DeleteIfExists(userFile);
809 } 809 }
810 810
811 private void CleanSolution(SolutionNode solution) 811 private void CleanSolution(SolutionNode solution)
812 { 812 {
813 kernel.Log.Write("Cleaning {0} solution and project files", this.VersionName, solution.Name); 813 kernel.Log.Write("Cleaning {0} solution and project files", this.VersionName, solution.Name);
814 814
815 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); 815 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
816 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); 816 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
817 817
818 Helper.DeleteIfExists(slnFile); 818 Helper.DeleteIfExists(slnFile);
819 Helper.DeleteIfExists(suoFile); 819 Helper.DeleteIfExists(suoFile);
820 820
821 foreach (ProjectNode project in solution.Projects) 821 foreach (ProjectNode project in solution.Projects)
822 { 822 {
823 CleanProject(project); 823 CleanProject(project);
824 } 824 }
825 825
826 kernel.Log.Write(""); 826 kernel.Log.Write("");
827 } 827 }
828 828
829 #endregion 829 #endregion
830 830
831 #region ITarget Members 831 #region ITarget Members
832 832
833 /// <summary> 833 /// <summary>
834 /// Writes the specified kern. 834 /// Writes the specified kern.
835 /// </summary> 835 /// </summary>
836 /// <param name="kern">The kern.</param> 836 /// <param name="kern">The kern.</param>
837 public virtual void Write(Kernel kern) 837 public virtual void Write(Kernel kern)
838 { 838 {
839 if (kern == null) 839 if (kern == null)
840 { 840 {
841 throw new ArgumentNullException("kern"); 841 throw new ArgumentNullException("kern");
842 } 842 }
843 kernel = kern; 843 kernel = kern;
844 foreach (SolutionNode sol in kernel.Solutions) 844 foreach (SolutionNode sol in kernel.Solutions)
845 { 845 {
846 WriteSolution(sol); 846 WriteSolution(sol);
847 } 847 }
848 kernel = null; 848 kernel = null;
849 } 849 }
850 850
851 /// <summary> 851 /// <summary>
852 /// Cleans the specified kern. 852 /// Cleans the specified kern.
853 /// </summary> 853 /// </summary>
854 /// <param name="kern">The kern.</param> 854 /// <param name="kern">The kern.</param>
855 public virtual void Clean(Kernel kern) 855 public virtual void Clean(Kernel kern)
856 { 856 {
857 if (kern == null) 857 if (kern == null)
858 { 858 {
859 throw new ArgumentNullException("kern"); 859 throw new ArgumentNullException("kern");
860 } 860 }
861 kernel = kern; 861 kernel = kern;
862 foreach (SolutionNode sol in kernel.Solutions) 862 foreach (SolutionNode sol in kernel.Solutions)
863 { 863 {
864 CleanSolution(sol); 864 CleanSolution(sol);
865 } 865 }
866 kernel = null; 866 kernel = null;
867 } 867 }
868 868
869 /// <summary> 869 /// <summary>
870 /// Gets the name. 870 /// Gets the name.
871 /// </summary> 871 /// </summary>
872 /// <value>The name.</value> 872 /// <value>The name.</value>
873 public virtual string Name 873 public virtual string Name
874 { 874 {
875 get 875 get
876 { 876 {
877 return "vs2005"; 877 return "vs2005";
878 } 878 }
879 } 879 }
880 880
881 #endregion 881 #endregion
882 } 882 }
883} 883}
diff --git a/Prebuild/src/Core/UnknownLanguageException.cs b/Prebuild/src/Core/UnknownLanguageException.cs
index cbd1dc1..607b66c 100644
--- a/Prebuild/src/Core/UnknownLanguageException.cs
+++ b/Prebuild/src/Core/UnknownLanguageException.cs
@@ -1,63 +1,63 @@
1/* 1/*
2 * $RCSfile$ 2 * $RCSfile$
3 * Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com) 3 * Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public 6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version. 8 * version 2.1 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details. 13 * Lesser General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20using System; 20using System;
21using System.Runtime.Serialization; 21using System.Runtime.Serialization;
22 22
23namespace Prebuild.Core 23namespace Prebuild.Core
24{ 24{
25 /// <summary> 25 /// <summary>
26 /// </summary> 26 /// </summary>
27 [Serializable()] 27 [Serializable()]
28 public class UnknownLanguageException : Exception 28 public class UnknownLanguageException : Exception
29 { 29 {
30 /// <summary> 30 /// <summary>
31 /// Basic exception. 31 /// Basic exception.
32 /// </summary> 32 /// </summary>
33 public UnknownLanguageException() 33 public UnknownLanguageException()
34 { 34 {
35 } 35 }
36 36
37 /// <summary> 37 /// <summary>
38 /// Exception with specified string 38 /// Exception with specified string
39 /// </summary> 39 /// </summary>
40 /// <param name="message">Exception message</param> 40 /// <param name="message">Exception message</param>
41 public UnknownLanguageException(string message): base(message) 41 public UnknownLanguageException(string message): base(message)
42 { 42 {
43 } 43 }
44 44
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 /// <param name="message"></param> 48 /// <param name="message"></param>
49 /// <param name="exception"></param> 49 /// <param name="exception"></param>
50 public UnknownLanguageException(string message, Exception exception) : base(message, exception) 50 public UnknownLanguageException(string message, Exception exception) : base(message, exception)
51 { 51 {
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 /// <param name="info"></param> 57 /// <param name="info"></param>
58 /// <param name="context"></param> 58 /// <param name="context"></param>
59 protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context ) 59 protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context )
60 { 60 {
61 } 61 }
62 } 62 }
63} 63}
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
index 496731f..62eb18b 100644
--- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs
+++ b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
@@ -1,162 +1,162 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: robloach $ 29 * $Author: robloach $
30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $ 30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
31 * $Revision: 165 $ 31 * $Revision: 165 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Collections.Specialized; 37using System.Collections.Specialized;
38using System.Diagnostics; 38using System.Diagnostics;
39 39
40namespace Prebuild.Core.Utilities 40namespace Prebuild.Core.Utilities
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// The CommandLine class parses and interprets the command-line arguments passed to 43 /// The CommandLine class parses and interprets the command-line arguments passed to
44 /// prebuild. 44 /// prebuild.
45 /// </summary> 45 /// </summary>
46 public class CommandLineCollection 46 public class CommandLineCollection
47 { 47 {
48 #region Fields 48 #region Fields
49 49
50 // The raw OS arguments 50 // The raw OS arguments
51 private string[] m_RawArgs; 51 private string[] m_RawArgs;
52 52
53 // Command-line argument storage 53 // Command-line argument storage
54 private Hashtable m_Arguments; 54 private Hashtable m_Arguments;
55 55
56 #endregion 56 #endregion
57 57
58 #region Constructors 58 #region Constructors
59 59
60 /// <summary> 60 /// <summary>
61 /// Create a new CommandLine instance and set some internal variables. 61 /// Create a new CommandLine instance and set some internal variables.
62 /// </summary> 62 /// </summary>
63 public CommandLineCollection(string[] args) 63 public CommandLineCollection(string[] args)
64 { 64 {
65 m_RawArgs = args; 65 m_RawArgs = args;
66 m_Arguments = new Hashtable(); 66 m_Arguments = new Hashtable();
67 67
68 Parse(); 68 Parse();
69 } 69 }
70 70
71 #endregion 71 #endregion
72 72
73 #region Private Methods 73 #region Private Methods
74 74
75 private void Parse() 75 private void Parse()
76 { 76 {
77 if(m_RawArgs.Length < 1) 77 if(m_RawArgs.Length < 1)
78 return; 78 return;
79 79
80 int idx = 0; 80 int idx = 0;
81 string arg = null, lastArg = null; 81 string arg = null, lastArg = null;
82 82
83 while(idx <m_RawArgs.Length) 83 while(idx <m_RawArgs.Length)
84 { 84 {
85 arg = m_RawArgs[idx]; 85 arg = m_RawArgs[idx];
86 86
87 if(arg.Length > 2 && arg[0] == '/') 87 if(arg.Length > 2 && arg[0] == '/')
88 { 88 {
89 arg = arg.Substring(1); 89 arg = arg.Substring(1);
90 lastArg = arg; 90 lastArg = arg;
91 m_Arguments[arg] = ""; 91 m_Arguments[arg] = "";
92 } 92 }
93 else 93 else
94 { 94 {
95 if(lastArg != null) 95 if(lastArg != null)
96 { 96 {
97 m_Arguments[lastArg] = arg; 97 m_Arguments[lastArg] = arg;
98 lastArg = null; 98 lastArg = null;
99 } 99 }
100 } 100 }
101 101
102 idx++; 102 idx++;
103 } 103 }
104 } 104 }
105 105
106 #endregion 106 #endregion
107 107
108 #region Public Methods 108 #region Public Methods
109 109
110 /// <summary> 110 /// <summary>
111 /// Wases the passed. 111 /// Wases the passed.
112 /// </summary> 112 /// </summary>
113 /// <param name="arg">The arg.</param> 113 /// <param name="arg">The arg.</param>
114 /// <returns></returns> 114 /// <returns></returns>
115 public bool WasPassed(string arg) 115 public bool WasPassed(string arg)
116 { 116 {
117 return (m_Arguments.ContainsKey(arg)); 117 return (m_Arguments.ContainsKey(arg));
118 } 118 }
119 119
120 #endregion 120 #endregion
121 121
122 #region Properties 122 #region Properties
123 123
124 /// <summary> 124 /// <summary>
125 /// Gets the parameter associated with the command line option 125 /// Gets the parameter associated with the command line option
126 /// </summary> 126 /// </summary>
127 /// <remarks>Returns null if option was not specified, 127 /// <remarks>Returns null if option was not specified,
128 /// null string if no parameter was specified, and the value if a parameter was specified</remarks> 128 /// null string if no parameter was specified, and the value if a parameter was specified</remarks>
129 public string this[string index] 129 public string this[string index]
130 { 130 {
131 get 131 get
132 { 132 {
133 if(m_Arguments.ContainsKey(index)) 133 if(m_Arguments.ContainsKey(index))
134 { 134 {
135 return (string)(m_Arguments[index]); 135 return (string)(m_Arguments[index]);
136 } 136 }
137 else 137 else
138 { 138 {
139 return null; 139 return null;
140 } 140 }
141 } 141 }
142 } 142 }
143 143
144 #endregion 144 #endregion
145 145
146 #region IEnumerable Members 146 #region IEnumerable Members
147 147
148 /// <summary> 148 /// <summary>
149 /// Returns an enumerator that can iterate through a collection. 149 /// Returns an enumerator that can iterate through a collection.
150 /// </summary> 150 /// </summary>
151 /// <returns> 151 /// <returns>
152 /// An <see cref="T:System.Collections.IDictionaryEnumerator"/> 152 /// An <see cref="T:System.Collections.IDictionaryEnumerator"/>
153 /// that can be used to iterate through the collection. 153 /// that can be used to iterate through the collection.
154 /// </returns> 154 /// </returns>
155 public IDictionaryEnumerator GetEnumerator() 155 public IDictionaryEnumerator GetEnumerator()
156 { 156 {
157 return m_Arguments.GetEnumerator(); 157 return m_Arguments.GetEnumerator();
158 } 158 }
159 159
160 #endregion 160 #endregion
161 } 161 }
162} 162}
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
index a76d844..ff2d159 100644
--- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs
+++ b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
@@ -1,89 +1,89 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37 37
38namespace Prebuild.Core.Utilities 38namespace Prebuild.Core.Utilities
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 public class CurrentDirectory 43 public class CurrentDirectory
44 { 44 {
45 #region Fields 45 #region Fields
46 46
47 private Stack m_Stack; 47 private Stack m_Stack;
48 48
49 #endregion 49 #endregion
50 50
51 #region Constructors 51 #region Constructors
52 52
53 /// <summary> 53 /// <summary>
54 /// Initializes a new instance of the <see cref="CurrentDirectory"/> class. 54 /// Initializes a new instance of the <see cref="CurrentDirectory"/> class.
55 /// </summary> 55 /// </summary>
56 public CurrentDirectory() 56 public CurrentDirectory()
57 { 57 {
58 m_Stack = new Stack(); 58 m_Stack = new Stack();
59 } 59 }
60 60
61 #endregion 61 #endregion
62 62
63 #region Public Methods 63 #region Public Methods
64 64
65 /// <summary> 65 /// <summary>
66 /// Pushes this instance. 66 /// Pushes this instance.
67 /// </summary> 67 /// </summary>
68 public void Push() 68 public void Push()
69 { 69 {
70 m_Stack.Push(Environment.CurrentDirectory); 70 m_Stack.Push(Environment.CurrentDirectory);
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Pops this instance. 74 /// Pops this instance.
75 /// </summary> 75 /// </summary>
76 public void Pop() 76 public void Pop()
77 { 77 {
78 if(m_Stack.Count < 1) 78 if(m_Stack.Count < 1)
79 { 79 {
80 return; 80 return;
81 } 81 }
82 82
83 string cwd = (string)m_Stack.Pop(); 83 string cwd = (string)m_Stack.Pop();
84 Helper.SetCurrentDir(cwd); 84 Helper.SetCurrentDir(cwd);
85 } 85 }
86 86
87 #endregion 87 #endregion
88 } 88 }
89} 89}
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs
index 33c9618..27b9ccf 100644
--- a/Prebuild/src/Core/Utilities/Helper.cs
+++ b/Prebuild/src/Core/Utilities/Helper.cs
@@ -1,661 +1,661 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $ 30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $ 31 * $Revision: 205 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections; 36using System.Collections;
37using System.Diagnostics; 37using System.Diagnostics;
38using System.IO; 38using System.IO;
39using System.Runtime.InteropServices; 39using System.Runtime.InteropServices;
40using System.Text.RegularExpressions; 40using System.Text.RegularExpressions;
41using System.Collections.Specialized; 41using System.Collections.Specialized;
42using System.Xml; 42using System.Xml;
43using Prebuild.Core.Nodes; 43using Prebuild.Core.Nodes;
44 44
45namespace Prebuild.Core.Utilities 45namespace Prebuild.Core.Utilities
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 public class Helper 50 public class Helper
51 { 51 {
52 #region Fields 52 #region Fields
53 53
54 private static Stack dirStack; 54 private static Stack dirStack;
55 private static Regex varRegex; 55 private static Regex varRegex;
56 static bool checkForOSVariables; 56 static bool checkForOSVariables;
57 57
58 /// <summary> 58 /// <summary>
59 /// 59 ///
60 /// </summary> 60 /// </summary>
61 public static bool CheckForOSVariables 61 public static bool CheckForOSVariables
62 { 62 {
63 get 63 get
64 { 64 {
65 return checkForOSVariables; 65 return checkForOSVariables;
66 } 66 }
67 set 67 set
68 { 68 {
69 checkForOSVariables = value; 69 checkForOSVariables = value;
70 } 70 }
71 } 71 }
72 72
73 #endregion 73 #endregion
74 74
75 #region Constructors 75 #region Constructors
76 76
77 /// <summary> 77 /// <summary>
78 /// Initializes the <see cref="Helper"/> class. 78 /// Initializes the <see cref="Helper"/> class.
79 /// </summary> 79 /// </summary>
80 static Helper() 80 static Helper()
81 { 81 {
82 dirStack = new Stack(); 82 dirStack = new Stack();
83 //m_VarRegex = new Regex(@"\${(?<var>[\w|_]+)}"); 83 //m_VarRegex = new Regex(@"\${(?<var>[\w|_]+)}");
84 } 84 }
85 85
86 #endregion 86 #endregion
87 87
88 #region Properties 88 #region Properties
89 89
90 /// <summary> 90 /// <summary>
91 /// 91 ///
92 /// </summary> 92 /// </summary>
93 public static Stack DirStack 93 public static Stack DirStack
94 { 94 {
95 get 95 get
96 { 96 {
97 return dirStack; 97 return dirStack;
98 } 98 }
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// 102 ///
103 /// </summary> 103 /// </summary>
104 public static Regex VarRegex 104 public static Regex VarRegex
105 { 105 {
106 get 106 get
107 { 107 {
108 return varRegex; 108 return varRegex;
109 } 109 }
110 set 110 set
111 { 111 {
112 varRegex = value; 112 varRegex = value;
113 } 113 }
114 } 114 }
115 115
116 #endregion 116 #endregion
117 117
118 #region Public Methods 118 #region Public Methods
119 119
120 #region String Parsing 120 #region String Parsing
121 #region Inner Classes and Delegates 121 #region Inner Classes and Delegates
122 /// <summary> 122 /// <summary>
123 /// 123 ///
124 /// </summary> 124 /// </summary>
125 public delegate string StringLookup(string key); 125 public delegate string StringLookup(string key);
126 126
127 #endregion 127 #endregion
128 128
129 /// <summary> 129 /// <summary>
130 /// Gets a collection of StringLocationPair objects that represent the matches 130 /// Gets a collection of StringLocationPair objects that represent the matches
131 /// </summary> 131 /// </summary>
132 /// <param name="target">The target.</param> 132 /// <param name="target">The target.</param>
133 /// <param name="beforeGroup">The before group.</param> 133 /// <param name="beforeGroup">The before group.</param>
134 /// <param name="afterGroup">The after group.</param> 134 /// <param name="afterGroup">The after group.</param>
135 /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param> 135 /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param>
136 /// <returns></returns> 136 /// <returns></returns>
137 public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings) 137 public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings)
138 { 138 {
139 if( beforeGroup == null ) 139 if( beforeGroup == null )
140 { 140 {
141 throw new ArgumentNullException("beforeGroup"); 141 throw new ArgumentNullException("beforeGroup");
142 } 142 }
143 if( afterGroup == null ) 143 if( afterGroup == null )
144 { 144 {
145 throw new ArgumentNullException("afterGroup"); 145 throw new ArgumentNullException("afterGroup");
146 } 146 }
147 StringCollection results = new StringCollection(); 147 StringCollection results = new StringCollection();
148 if(target == null || target.Length == 0) 148 if(target == null || target.Length == 0)
149 { 149 {
150 return results; 150 return results;
151 } 151 }
152 152
153 int beforeMod = 0; 153 int beforeMod = 0;
154 int afterMod = 0; 154 int afterMod = 0;
155 if(includeDelimitersInSubstrings) 155 if(includeDelimitersInSubstrings)
156 { 156 {
157 //be sure to not exlude the delims 157 //be sure to not exlude the delims
158 beforeMod = beforeGroup.Length; 158 beforeMod = beforeGroup.Length;
159 afterMod = afterGroup.Length; 159 afterMod = afterGroup.Length;
160 } 160 }
161 int startIndex = 0; 161 int startIndex = 0;
162 while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) { 162 while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) {
163 int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it 163 int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it
164 if(endIndex == -1) 164 if(endIndex == -1)
165 { 165 {
166 break; 166 break;
167 } 167 }
168 int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string 168 int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string
169 string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod, 169 string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod,
170 length - afterMod); 170 length - afterMod);
171 171
172 results.Add(substring); 172 results.Add(substring);
173 //results.Add(new StringLocationPair(substring,startIndex)); 173 //results.Add(new StringLocationPair(substring,startIndex));
174 startIndex = endIndex + 1; 174 startIndex = endIndex + 1;
175 //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization 175 //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization
176 //so start after endIndex 176 //so start after endIndex
177 177
178 } 178 }
179 return results; 179 return results;
180 } 180 }
181 181
182 /// <summary> 182 /// <summary>
183 /// Replaces the groups. 183 /// Replaces the groups.
184 /// </summary> 184 /// </summary>
185 /// <param name="target">The target.</param> 185 /// <param name="target">The target.</param>
186 /// <param name="beforeGroup">The before group.</param> 186 /// <param name="beforeGroup">The before group.</param>
187 /// <param name="afterGroup">The after group.</param> 187 /// <param name="afterGroup">The after group.</param>
188 /// <param name="lookup">The lookup.</param> 188 /// <param name="lookup">The lookup.</param>
189 /// <returns></returns> 189 /// <returns></returns>
190 public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) { 190 public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) {
191 if( target == null ) 191 if( target == null )
192 { 192 {
193 throw new ArgumentNullException("target"); 193 throw new ArgumentNullException("target");
194 } 194 }
195 //int targetLength = target.Length; 195 //int targetLength = target.Length;
196 StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false); 196 StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false);
197 if( lookup == null ) 197 if( lookup == null )
198 { 198 {
199 throw new ArgumentNullException("lookup"); 199 throw new ArgumentNullException("lookup");
200 } 200 }
201 foreach(string substring in strings) 201 foreach(string substring in strings)
202 { 202 {
203 target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) ); 203 target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) );
204 } 204 }
205 return target; 205 return target;
206 } 206 }
207 207
208 /// <summary> 208 /// <summary>
209 /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate 209 /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate
210 /// </summary> 210 /// </summary>
211 /// <param name="target">The target.</param> 211 /// <param name="target">The target.</param>
212 /// <param name="lookup">The lookup.</param> 212 /// <param name="lookup">The lookup.</param>
213 /// <returns></returns> 213 /// <returns></returns>
214 public static string InterpolateForVariables(string target, StringLookup lookup) 214 public static string InterpolateForVariables(string target, StringLookup lookup)
215 { 215 {
216 return ReplaceGroups(target, "${" , "}" , lookup); 216 return ReplaceGroups(target, "${" , "}" , lookup);
217 } 217 }
218 218
219 /// <summary> 219 /// <summary>
220 /// Replaces ${var} statements in a string with the corresonding environment variable with name var 220 /// Replaces ${var} statements in a string with the corresonding environment variable with name var
221 /// </summary> 221 /// </summary>
222 /// <param name="target"></param> 222 /// <param name="target"></param>
223 /// <returns></returns> 223 /// <returns></returns>
224 public static string InterpolateForEnvironmentVariables(string target) 224 public static string InterpolateForEnvironmentVariables(string target)
225 { 225 {
226 return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable)); 226 return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable));
227 } 227 }
228 228
229 #endregion 229 #endregion
230 230
231 /// <summary> 231 /// <summary>
232 /// Translates the value. 232 /// Translates the value.
233 /// </summary> 233 /// </summary>
234 /// <param name="translateType">Type of the translate.</param> 234 /// <param name="translateType">Type of the translate.</param>
235 /// <param name="translationItem">The translation item.</param> 235 /// <param name="translationItem">The translation item.</param>
236 /// <returns></returns> 236 /// <returns></returns>
237 public static object TranslateValue(Type translateType, string translationItem) 237 public static object TranslateValue(Type translateType, string translationItem)
238 { 238 {
239 if(translationItem == null) 239 if(translationItem == null)
240 { 240 {
241 return null; 241 return null;
242 } 242 }
243 243
244 try 244 try
245 { 245 {
246 string lowerVal = translationItem.ToLower(); 246 string lowerVal = translationItem.ToLower();
247 if(translateType == typeof(bool)) 247 if(translateType == typeof(bool))
248 { 248 {
249 return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on"); 249 return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on");
250 } 250 }
251 else if(translateType == typeof(int)) 251 else if(translateType == typeof(int))
252 { 252 {
253 return (Int32.Parse(translationItem)); 253 return (Int32.Parse(translationItem));
254 } 254 }
255 else 255 else
256 { 256 {
257 return translationItem; 257 return translationItem;
258 } 258 }
259 } 259 }
260 catch(FormatException) 260 catch(FormatException)
261 { 261 {
262 return null; 262 return null;
263 } 263 }
264 } 264 }
265 265
266 /// <summary> 266 /// <summary>
267 /// Deletes if exists. 267 /// Deletes if exists.
268 /// </summary> 268 /// </summary>
269 /// <param name="file">The file.</param> 269 /// <param name="file">The file.</param>
270 /// <returns></returns> 270 /// <returns></returns>
271 public static bool DeleteIfExists(string file) 271 public static bool DeleteIfExists(string file)
272 { 272 {
273 string resFile = null; 273 string resFile = null;
274 try 274 try
275 { 275 {
276 resFile = ResolvePath(file); 276 resFile = ResolvePath(file);
277 } 277 }
278 catch(ArgumentException) 278 catch(ArgumentException)
279 { 279 {
280 return false; 280 return false;
281 } 281 }
282 282
283 if(!File.Exists(resFile)) 283 if(!File.Exists(resFile))
284 { 284 {
285 return false; 285 return false;
286 } 286 }
287 287
288 File.Delete(resFile); 288 File.Delete(resFile);
289 return true; 289 return true;
290 } 290 }
291 291
292 // This little gem was taken from the NeL source, thanks guys! 292 // This little gem was taken from the NeL source, thanks guys!
293 /// <summary> 293 /// <summary>
294 /// Makes a relative path 294 /// Makes a relative path
295 /// </summary> 295 /// </summary>
296 /// <param name="startPath">Path to start from</param> 296 /// <param name="startPath">Path to start from</param>
297 /// <param name="endPath">Path to end at</param> 297 /// <param name="endPath">Path to end at</param>
298 /// <returns>Path that will get from startPath to endPath</returns> 298 /// <returns>Path that will get from startPath to endPath</returns>
299 public static string MakePathRelativeTo(string startPath, string endPath) 299 public static string MakePathRelativeTo(string startPath, string endPath)
300 { 300 {
301 string tmp = NormalizePath(startPath, '/'); 301 string tmp = NormalizePath(startPath, '/');
302 string src = NormalizePath(endPath, '/'); 302 string src = NormalizePath(endPath, '/');
303 string prefix = ""; 303 string prefix = "";
304 304
305 while(true) 305 while(true)
306 { 306 {
307 if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0)) 307 if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0))
308 { 308 {
309 string ret; 309 string ret;
310 int size = tmp.Length; 310 int size = tmp.Length;
311 if(size == src.Length) 311 if(size == src.Length)
312 { 312 {
313 return "./"; 313 return "./";
314 } 314 }
315 if ((src.Length > tmp.Length) && src[tmp.Length-1] != '/' && src[tmp.Length-1] != '\\') 315 if ((src.Length > tmp.Length) && src[tmp.Length-1] != '/' && src[tmp.Length-1] != '\\')
316 { 316 {
317 } 317 }
318 else 318 else
319 { 319 {
320 ret = prefix + endPath.Substring(size, endPath.Length - size); 320 ret = prefix + endPath.Substring(size, endPath.Length - size);
321 ret = ret.Trim(); 321 ret = ret.Trim();
322 if(ret[0] == '/' || ret[0] == '\\') 322 if(ret[0] == '/' || ret[0] == '\\')
323 { 323 {
324 ret = "." + ret; 324 ret = "." + ret;
325 } 325 }
326 326
327 return NormalizePath(ret); 327 return NormalizePath(ret);
328 } 328 }
329 329
330 } 330 }
331 331
332 if(tmp.Length < 2) 332 if(tmp.Length < 2)
333 { 333 {
334 break; 334 break;
335 } 335 }
336 336
337 int lastPos = tmp.LastIndexOf('/', tmp.Length - 2); 337 int lastPos = tmp.LastIndexOf('/', tmp.Length - 2);
338 int prevPos = tmp.IndexOf('/'); 338 int prevPos = tmp.IndexOf('/');
339 339
340 if((lastPos == prevPos) || (lastPos == -1)) 340 if((lastPos == prevPos) || (lastPos == -1))
341 { 341 {
342 break; 342 break;
343 } 343 }
344 344
345 tmp = tmp.Substring(0, lastPos + 1); 345 tmp = tmp.Substring(0, lastPos + 1);
346 prefix += "../"; 346 prefix += "../";
347 } 347 }
348 348
349 return endPath; 349 return endPath;
350 } 350 }
351 351
352 /// <summary> 352 /// <summary>
353 /// Resolves the path. 353 /// Resolves the path.
354 /// </summary> 354 /// </summary>
355 /// <param name="path">The path.</param> 355 /// <param name="path">The path.</param>
356 /// <returns></returns> 356 /// <returns></returns>
357 public static string ResolvePath(string path) 357 public static string ResolvePath(string path)
358 { 358 {
359 string tmpPath = NormalizePath(path); 359 string tmpPath = NormalizePath(path);
360 if(tmpPath.Length < 1) 360 if(tmpPath.Length < 1)
361 { 361 {
362 tmpPath = "."; 362 tmpPath = ".";
363 } 363 }
364 364
365 tmpPath = Path.GetFullPath(tmpPath); 365 tmpPath = Path.GetFullPath(tmpPath);
366 if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath)) 366 if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath))
367 { 367 {
368 throw new ArgumentException("Path could not be resolved: " + tmpPath); 368 throw new ArgumentException("Path could not be resolved: " + tmpPath);
369 } 369 }
370 370
371 return tmpPath; 371 return tmpPath;
372 } 372 }
373 373
374 /// <summary> 374 /// <summary>
375 /// Normalizes the path. 375 /// Normalizes the path.
376 /// </summary> 376 /// </summary>
377 /// <param name="path">The path.</param> 377 /// <param name="path">The path.</param>
378 /// <param name="separatorCharacter">The separator character.</param> 378 /// <param name="separatorCharacter">The separator character.</param>
379 /// <returns></returns> 379 /// <returns></returns>
380 public static string NormalizePath(string path, char separatorCharacter) 380 public static string NormalizePath(string path, char separatorCharacter)
381 { 381 {
382 if(path == null || path == "" || path.Length < 1) 382 if(path == null || path == "" || path.Length < 1)
383 { 383 {
384 return ""; 384 return "";
385 } 385 }
386 386
387 string tmpPath = path.Replace('\\', '/'); 387 string tmpPath = path.Replace('\\', '/');
388 tmpPath = tmpPath.Replace('/', separatorCharacter); 388 tmpPath = tmpPath.Replace('/', separatorCharacter);
389 return tmpPath; 389 return tmpPath;
390 } 390 }
391 391
392 /// <summary> 392 /// <summary>
393 /// Normalizes the path. 393 /// Normalizes the path.
394 /// </summary> 394 /// </summary>
395 /// <param name="path">The path.</param> 395 /// <param name="path">The path.</param>
396 /// <returns></returns> 396 /// <returns></returns>
397 public static string NormalizePath(string path) 397 public static string NormalizePath(string path)
398 { 398 {
399 return NormalizePath(path, Path.DirectorySeparatorChar); 399 return NormalizePath(path, Path.DirectorySeparatorChar);
400 } 400 }
401 401
402 /// <summary> 402 /// <summary>
403 /// Ends the path. 403 /// Ends the path.
404 /// </summary> 404 /// </summary>
405 /// <param name="path">The path.</param> 405 /// <param name="path">The path.</param>
406 /// <param name="separatorCharacter">The separator character.</param> 406 /// <param name="separatorCharacter">The separator character.</param>
407 /// <returns></returns> 407 /// <returns></returns>
408 public static string EndPath(string path, char separatorCharacter) 408 public static string EndPath(string path, char separatorCharacter)
409 { 409 {
410 if(path == null || path == "" || path.Length < 1) 410 if(path == null || path == "" || path.Length < 1)
411 { 411 {
412 return ""; 412 return "";
413 } 413 }
414 414
415 if(!path.EndsWith(separatorCharacter.ToString())) 415 if(!path.EndsWith(separatorCharacter.ToString()))
416 { 416 {
417 return (path + separatorCharacter); 417 return (path + separatorCharacter);
418 } 418 }
419 419
420 return path; 420 return path;
421 } 421 }
422 422
423 /// <summary> 423 /// <summary>
424 /// Ends the path. 424 /// Ends the path.
425 /// </summary> 425 /// </summary>
426 /// <param name="path">The path.</param> 426 /// <param name="path">The path.</param>
427 /// <returns></returns> 427 /// <returns></returns>
428 public static string EndPath(string path) 428 public static string EndPath(string path)
429 { 429 {
430 return EndPath(path, Path.DirectorySeparatorChar); 430 return EndPath(path, Path.DirectorySeparatorChar);
431 } 431 }
432 432
433 /// <summary> 433 /// <summary>
434 /// Makes the file path. 434 /// Makes the file path.
435 /// </summary> 435 /// </summary>
436 /// <param name="path">The path.</param> 436 /// <param name="path">The path.</param>
437 /// <param name="name">The name.</param> 437 /// <param name="name">The name.</param>
438 /// <param name="ext">The ext.</param> 438 /// <param name="ext">The ext.</param>
439 /// <returns></returns> 439 /// <returns></returns>
440 public static string MakeFilePath(string path, string name, string ext) 440 public static string MakeFilePath(string path, string name, string ext)
441 { 441 {
442 string ret = EndPath(NormalizePath(path)); 442 string ret = EndPath(NormalizePath(path));
443 443
444 if( name == null ) 444 if( name == null )
445 { 445 {
446 throw new ArgumentNullException("name"); 446 throw new ArgumentNullException("name");
447 } 447 }
448 448
449 ret += name; 449 ret += name;
450 if(!name.EndsWith("." + ext)) 450 if(!name.EndsWith("." + ext))
451 { 451 {
452 ret += "." + ext; 452 ret += "." + ext;
453 } 453 }
454 454
455 //foreach(char c in Path.GetInvalidPathChars()) 455 //foreach(char c in Path.GetInvalidPathChars())
456 //{ 456 //{
457 // ret = ret.Replace(c, '_'); 457 // ret = ret.Replace(c, '_');
458 //} 458 //}
459 459
460 return ret; 460 return ret;
461 } 461 }
462 462
463 /// <summary> 463 /// <summary>
464 /// Makes the file path. 464 /// Makes the file path.
465 /// </summary> 465 /// </summary>
466 /// <param name="path">The path.</param> 466 /// <param name="path">The path.</param>
467 /// <param name="name">The name.</param> 467 /// <param name="name">The name.</param>
468 /// <returns></returns> 468 /// <returns></returns>
469 public static string MakeFilePath(string path, string name) 469 public static string MakeFilePath(string path, string name)
470 { 470 {
471 string ret = EndPath(NormalizePath(path)); 471 string ret = EndPath(NormalizePath(path));
472 472
473 if( name == null ) 473 if( name == null )
474 { 474 {
475 throw new ArgumentNullException("name"); 475 throw new ArgumentNullException("name");
476 } 476 }
477 477
478 ret += name; 478 ret += name;
479 479
480 //foreach (char c in Path.GetInvalidPathChars()) 480 //foreach (char c in Path.GetInvalidPathChars())
481 //{ 481 //{
482 // ret = ret.Replace(c, '_'); 482 // ret = ret.Replace(c, '_');
483 //} 483 //}
484 484
485 return ret; 485 return ret;
486 } 486 }
487 487
488 /// <summary> 488 /// <summary>
489 /// 489 ///
490 /// </summary> 490 /// </summary>
491 /// <param name="path"></param> 491 /// <param name="path"></param>
492 /// <returns></returns> 492 /// <returns></returns>
493 public static string MakeReferencePath(string path) 493 public static string MakeReferencePath(string path)
494 { 494 {
495 string ret = EndPath(NormalizePath(path)); 495 string ret = EndPath(NormalizePath(path));
496 496
497 //foreach (char c in Path.GetInvalidPathChars()) 497 //foreach (char c in Path.GetInvalidPathChars())
498 //{ 498 //{
499 // ret = ret.Replace(c, '_'); 499 // ret = ret.Replace(c, '_');
500 //} 500 //}
501 501
502 return ret; 502 return ret;
503 } 503 }
504 504
505 /// <summary> 505 /// <summary>
506 /// Sets the current dir. 506 /// Sets the current dir.
507 /// </summary> 507 /// </summary>
508 /// <param name="path">The path.</param> 508 /// <param name="path">The path.</param>
509 public static void SetCurrentDir(string path) 509 public static void SetCurrentDir(string path)
510 { 510 {
511 if( path == null ) 511 if( path == null )
512 { 512 {
513 throw new ArgumentNullException("path"); 513 throw new ArgumentNullException("path");
514 } 514 }
515 if(path.Length < 1) 515 if(path.Length < 1)
516 { 516 {
517 return; 517 return;
518 } 518 }
519 519
520 Environment.CurrentDirectory = path; 520 Environment.CurrentDirectory = path;
521 } 521 }
522 522
523 /// <summary> 523 /// <summary>
524 /// Checks the type. 524 /// Checks the type.
525 /// </summary> 525 /// </summary>
526 /// <param name="typeToCheck">The type to check.</param> 526 /// <param name="typeToCheck">The type to check.</param>
527 /// <param name="attr">The attr.</param> 527 /// <param name="attr">The attr.</param>
528 /// <param name="inter">The inter.</param> 528 /// <param name="inter">The inter.</param>
529 /// <returns></returns> 529 /// <returns></returns>
530 public static object CheckType(Type typeToCheck, Type attr, Type inter) 530 public static object CheckType(Type typeToCheck, Type attr, Type inter)
531 { 531 {
532 if(typeToCheck == null || attr == null) 532 if(typeToCheck == null || attr == null)
533 { 533 {
534 return null; 534 return null;
535 } 535 }
536 536
537 object[] attrs = typeToCheck.GetCustomAttributes(attr, false); 537 object[] attrs = typeToCheck.GetCustomAttributes(attr, false);
538 if(attrs == null || attrs.Length < 1) 538 if(attrs == null || attrs.Length < 1)
539 { 539 {
540 return null; 540 return null;
541 } 541 }
542 if( inter == null ) 542 if( inter == null )
543 { 543 {
544 throw new ArgumentNullException("inter"); 544 throw new ArgumentNullException("inter");
545 } 545 }
546 546
547 if(typeToCheck.GetInterface(inter.FullName) == null) 547 if(typeToCheck.GetInterface(inter.FullName) == null)
548 { 548 {
549 return null; 549 return null;
550 } 550 }
551 551
552 return attrs[0]; 552 return attrs[0];
553 } 553 }
554 554
555 /* A bit of overhead for simple group parsing, there are problems with Regex in Mono 555 /* A bit of overhead for simple group parsing, there are problems with Regex in Mono
556 public static string ParseValue(string val) 556 public static string ParseValue(string val)
557 { 557 {
558 if(val == null || val.Length < 1 || !CheckForOSVariables) 558 if(val == null || val.Length < 1 || !CheckForOSVariables)
559 return val; 559 return val;
560 560
561 string tmp = val; 561 string tmp = val;
562 Match m = m_VarRegex.Match(val); 562 Match m = m_VarRegex.Match(val);
563 while(m.Success) 563 while(m.Success)
564 { 564 {
565 if(m.Groups["var"] == null) 565 if(m.Groups["var"] == null)
566 continue; 566 continue;
567 567
568 Capture c = m.Groups["var"].Captures[0]; 568 Capture c = m.Groups["var"].Captures[0];
569 if(c == null) 569 if(c == null)
570 continue; 570 continue;
571 571
572 string var = c.Value; 572 string var = c.Value;
573 string envVal = Environment.GetEnvironmentVariable(var); 573 string envVal = Environment.GetEnvironmentVariable(var);
574 if(envVal == null) 574 if(envVal == null)
575 envVal = ""; 575 envVal = "";
576 576
577 tmp = tmp.Replace("${" + var + "}", envVal); 577 tmp = tmp.Replace("${" + var + "}", envVal);
578 m = m.NextMatch(); 578 m = m.NextMatch();
579 } 579 }
580 580
581 return tmp; 581 return tmp;
582 }*/ 582 }*/
583 583
584 /// <summary> 584 /// <summary>
585 /// Attributes the value. 585 /// Attributes the value.
586 /// </summary> 586 /// </summary>
587 /// <param name="node">The node.</param> 587 /// <param name="node">The node.</param>
588 /// <param name="attr">The attr.</param> 588 /// <param name="attr">The attr.</param>
589 /// <param name="def">The def.</param> 589 /// <param name="def">The def.</param>
590 /// <returns></returns> 590 /// <returns></returns>
591 public static string AttributeValue(XmlNode node, string attr, string def) 591 public static string AttributeValue(XmlNode node, string attr, string def)
592 { 592 {
593 if( node == null ) 593 if( node == null )
594 { 594 {
595 throw new ArgumentNullException("node"); 595 throw new ArgumentNullException("node");
596 } 596 }
597 if(node.Attributes[attr] == null) 597 if(node.Attributes[attr] == null)
598 { 598 {
599 return def; 599 return def;
600 } 600 }
601 string val = node.Attributes[attr].Value; 601 string val = node.Attributes[attr].Value;
602 if(!CheckForOSVariables) 602 if(!CheckForOSVariables)
603 { 603 {
604 return val; 604 return val;
605 } 605 }
606 606
607 return InterpolateForEnvironmentVariables(val); 607 return InterpolateForEnvironmentVariables(val);
608 } 608 }
609 609
610 /// <summary> 610 /// <summary>
611 /// Parses the boolean. 611 /// Parses the boolean.
612 /// </summary> 612 /// </summary>
613 /// <param name="node">The node.</param> 613 /// <param name="node">The node.</param>
614 /// <param name="attr">The attr.</param> 614 /// <param name="attr">The attr.</param>
615 /// <param name="defaultValue">if set to <c>true</c> [default value].</param> 615 /// <param name="defaultValue">if set to <c>true</c> [default value].</param>
616 /// <returns></returns> 616 /// <returns></returns>
617 public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue) 617 public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue)
618 { 618 {
619 if( node == null ) 619 if( node == null )
620 { 620 {
621 throw new ArgumentNullException("node"); 621 throw new ArgumentNullException("node");
622 } 622 }
623 if(node.Attributes[attr] == null) 623 if(node.Attributes[attr] == null)
624 { 624 {
625 return defaultValue; 625 return defaultValue;
626 } 626 }
627 return bool.Parse(node.Attributes[attr].Value); 627 return bool.Parse(node.Attributes[attr].Value);
628 } 628 }
629 629
630 /// <summary> 630 /// <summary>
631 /// Enums the attribute value. 631 /// Enums the attribute value.
632 /// </summary> 632 /// </summary>
633 /// <param name="node">The node.</param> 633 /// <param name="node">The node.</param>
634 /// <param name="attr">The attr.</param> 634 /// <param name="attr">The attr.</param>
635 /// <param name="enumType">Type of the enum.</param> 635 /// <param name="enumType">Type of the enum.</param>
636 /// <param name="def">The def.</param> 636 /// <param name="def">The def.</param>
637 /// <returns></returns> 637 /// <returns></returns>
638 public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def) 638 public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def)
639 { 639 {
640 if( def == null ) 640 if( def == null )
641 { 641 {
642 throw new ArgumentNullException("def"); 642 throw new ArgumentNullException("def");
643 } 643 }
644 string val = AttributeValue(node, attr, def.ToString()); 644 string val = AttributeValue(node, attr, def.ToString());
645 return Enum.Parse(enumType, val, true); 645 return Enum.Parse(enumType, val, true);
646 } 646 }
647 647
648 /// <summary> 648 /// <summary>
649 /// 649 ///
650 /// </summary> 650 /// </summary>
651 /// <param name="assemblyName"></param> 651 /// <param name="assemblyName"></param>
652 /// <param name="projectType"></param> 652 /// <param name="projectType"></param>
653 /// <returns></returns> 653 /// <returns></returns>
654 public static string AssemblyFullName(string assemblyName, ProjectType projectType) 654 public static string AssemblyFullName(string assemblyName, ProjectType projectType)
655 { 655 {
656 return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe"); 656 return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe");
657 } 657 }
658 658
659 #endregion 659 #endregion
660 } 660 }
661} 661}
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs
index da2cc96..2f26557 100644
--- a/Prebuild/src/Core/Utilities/Log.cs
+++ b/Prebuild/src/Core/Utilities/Log.cs
@@ -1,279 +1,279 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.IO; 36using System.IO;
37 37
38namespace Prebuild.Core.Utilities 38namespace Prebuild.Core.Utilities
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 public enum LogType 43 public enum LogType
44 { 44 {
45 /// <summary> 45 /// <summary>
46 /// 46 ///
47 /// </summary> 47 /// </summary>
48 None, 48 None,
49 /// <summary> 49 /// <summary>
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 Info, 52 Info,
53 /// <summary> 53 /// <summary>
54 /// 54 ///
55 /// </summary> 55 /// </summary>
56 Warning, 56 Warning,
57 /// <summary> 57 /// <summary>
58 /// 58 ///
59 /// </summary> 59 /// </summary>
60 Error 60 Error
61 } 61 }
62 62
63 /// <summary> 63 /// <summary>
64 /// 64 ///
65 /// </summary> 65 /// </summary>
66 [Flags] 66 [Flags]
67 public enum LogTargets 67 public enum LogTargets
68 { 68 {
69 /// <summary> 69 /// <summary>
70 /// 70 ///
71 /// </summary> 71 /// </summary>
72 None = 0, 72 None = 0,
73 /// <summary> 73 /// <summary>
74 /// 74 ///
75 /// </summary> 75 /// </summary>
76 Null = 1, 76 Null = 1,
77 /// <summary> 77 /// <summary>
78 /// 78 ///
79 /// </summary> 79 /// </summary>
80 File = 2, 80 File = 2,
81 /// <summary> 81 /// <summary>
82 /// 82 ///
83 /// </summary> 83 /// </summary>
84 Console = 4 84 Console = 4
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Summary description for Log. 88 /// Summary description for Log.
89 /// </summary> 89 /// </summary>
90 public class Log : IDisposable 90 public class Log : IDisposable
91 { 91 {
92 #region Fields 92 #region Fields
93 93
94 private StreamWriter m_Writer; 94 private StreamWriter m_Writer;
95 private LogTargets m_Target = LogTargets.Null; 95 private LogTargets m_Target = LogTargets.Null;
96 bool disposed; 96 bool disposed;
97 97
98 #endregion 98 #endregion
99 99
100 #region Constructors 100 #region Constructors
101 101
102 /// <summary> 102 /// <summary>
103 /// Initializes a new instance of the <see cref="Log"/> class. 103 /// Initializes a new instance of the <see cref="Log"/> class.
104 /// </summary> 104 /// </summary>
105 /// <param name="target">The target.</param> 105 /// <param name="target">The target.</param>
106 /// <param name="fileName">Name of the file.</param> 106 /// <param name="fileName">Name of the file.</param>
107 public Log(LogTargets target, string fileName) 107 public Log(LogTargets target, string fileName)
108 { 108 {
109 m_Target = target; 109 m_Target = target;
110 110
111 if((m_Target & LogTargets.File) != 0) 111 if((m_Target & LogTargets.File) != 0)
112 { 112 {
113 m_Writer = new StreamWriter(fileName, false); 113 m_Writer = new StreamWriter(fileName, false);
114 } 114 }
115 } 115 }
116 116
117 #endregion 117 #endregion
118 118
119 #region Public Methods 119 #region Public Methods
120 120
121 /// <summary> 121 /// <summary>
122 /// Writes this instance. 122 /// Writes this instance.
123 /// </summary> 123 /// </summary>
124 public void Write() 124 public void Write()
125 { 125 {
126 Write(string.Empty); 126 Write(string.Empty);
127 } 127 }
128 128
129 /// <summary> 129 /// <summary>
130 /// Writes the specified MSG. 130 /// Writes the specified MSG.
131 /// </summary> 131 /// </summary>
132 /// <param name="msg">The MSG.</param> 132 /// <param name="msg">The MSG.</param>
133 public void Write(string msg) 133 public void Write(string msg)
134 { 134 {
135 if((m_Target & LogTargets.Null) != 0) 135 if((m_Target & LogTargets.Null) != 0)
136 { 136 {
137 return; 137 return;
138 } 138 }
139 139
140 if((m_Target & LogTargets.Console) != 0) 140 if((m_Target & LogTargets.Console) != 0)
141 { 141 {
142 Console.WriteLine(msg); 142 Console.WriteLine(msg);
143 } 143 }
144 if((m_Target & LogTargets.File) != 0 && m_Writer != null) 144 if((m_Target & LogTargets.File) != 0 && m_Writer != null)
145 { 145 {
146 m_Writer.WriteLine(msg); 146 m_Writer.WriteLine(msg);
147 } 147 }
148 } 148 }
149 149
150 /// <summary> 150 /// <summary>
151 /// Writes the specified format. 151 /// Writes the specified format.
152 /// </summary> 152 /// </summary>
153 /// <param name="format">The format.</param> 153 /// <param name="format">The format.</param>
154 /// <param name="args">The args.</param> 154 /// <param name="args">The args.</param>
155 public void Write(string format, params object[] args) 155 public void Write(string format, params object[] args)
156 { 156 {
157 Write(string.Format(format,args)); 157 Write(string.Format(format,args));
158 } 158 }
159 159
160 /// <summary> 160 /// <summary>
161 /// Writes the specified type. 161 /// Writes the specified type.
162 /// </summary> 162 /// </summary>
163 /// <param name="type">The type.</param> 163 /// <param name="type">The type.</param>
164 /// <param name="format">The format.</param> 164 /// <param name="format">The format.</param>
165 /// <param name="args">The args.</param> 165 /// <param name="args">The args.</param>
166 public void Write(LogType type, string format, params object[] args) 166 public void Write(LogType type, string format, params object[] args)
167 { 167 {
168 if((m_Target & LogTargets.Null) != 0) 168 if((m_Target & LogTargets.Null) != 0)
169 { 169 {
170 return; 170 return;
171 } 171 }
172 172
173 string str = ""; 173 string str = "";
174 switch(type) 174 switch(type)
175 { 175 {
176 case LogType.Info: 176 case LogType.Info:
177 str = "[I] "; 177 str = "[I] ";
178 break; 178 break;
179 case LogType.Warning: 179 case LogType.Warning:
180 str = "[!] "; 180 str = "[!] ";
181 break; 181 break;
182 case LogType.Error: 182 case LogType.Error:
183 str = "[X] "; 183 str = "[X] ";
184 break; 184 break;
185 } 185 }
186 186
187 Write(str + format,args); 187 Write(str + format,args);
188 } 188 }
189 189
190 /// <summary> 190 /// <summary>
191 /// Writes the exception. 191 /// Writes the exception.
192 /// </summary> 192 /// </summary>
193 /// <param name="type">The type.</param> 193 /// <param name="type">The type.</param>
194 /// <param name="ex">The ex.</param> 194 /// <param name="ex">The ex.</param>
195 public void WriteException(LogType type, Exception ex) 195 public void WriteException(LogType type, Exception ex)
196 { 196 {
197 if(ex != null) 197 if(ex != null)
198 { 198 {
199 Write(type, ex.Message); 199 Write(type, ex.Message);
200 //#if DEBUG 200 //#if DEBUG
201 m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name); 201 m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name);
202 m_Writer.WriteLine(ex.StackTrace); 202 m_Writer.WriteLine(ex.StackTrace);
203 m_Writer.WriteLine("]]"); 203 m_Writer.WriteLine("]]");
204 //#endif 204 //#endif
205 } 205 }
206 } 206 }
207 207
208 /// <summary> 208 /// <summary>
209 /// Flushes this instance. 209 /// Flushes this instance.
210 /// </summary> 210 /// </summary>
211 public void Flush() 211 public void Flush()
212 { 212 {
213 if(m_Writer != null) 213 if(m_Writer != null)
214 { 214 {
215 m_Writer.Flush(); 215 m_Writer.Flush();
216 } 216 }
217 } 217 }
218 218
219 #endregion 219 #endregion
220 220
221 #region IDisposable Members 221 #region IDisposable Members
222 222
223 /// <summary> 223 /// <summary>
224 /// Performs application-defined tasks associated with freeing, releasing, or 224 /// Performs application-defined tasks associated with freeing, releasing, or
225 /// resetting unmanaged resources. 225 /// resetting unmanaged resources.
226 /// </summary> 226 /// </summary>
227 public void Dispose() 227 public void Dispose()
228 { 228 {
229 Dispose(true); 229 Dispose(true);
230 GC.SuppressFinalize(this); 230 GC.SuppressFinalize(this);
231 } 231 }
232 232
233 /// <summary> 233 /// <summary>
234 /// Dispose objects 234 /// Dispose objects
235 /// </summary> 235 /// </summary>
236 /// <param name="disposing"> 236 /// <param name="disposing">
237 /// If true, it will dispose close the handle 237 /// If true, it will dispose close the handle
238 /// </param> 238 /// </param>
239 /// <remarks> 239 /// <remarks>
240 /// Will dispose managed and unmanaged resources. 240 /// Will dispose managed and unmanaged resources.
241 /// </remarks> 241 /// </remarks>
242 protected virtual void Dispose(bool disposing) 242 protected virtual void Dispose(bool disposing)
243 { 243 {
244 if (!this.disposed) 244 if (!this.disposed)
245 { 245 {
246 if (disposing) 246 if (disposing)
247 { 247 {
248 if (m_Writer != null) 248 if (m_Writer != null)
249 { 249 {
250 m_Writer.Close(); 250 m_Writer.Close();
251 m_Writer = null; 251 m_Writer = null;
252 } 252 }
253 } 253 }
254 } 254 }
255 this.disposed = true; 255 this.disposed = true;
256 } 256 }
257 257
258 /// <summary> 258 /// <summary>
259 /// 259 ///
260 /// </summary> 260 /// </summary>
261 ~Log() 261 ~Log()
262 { 262 {
263 this.Dispose(false); 263 this.Dispose(false);
264 } 264 }
265 265
266 /// <summary> 266 /// <summary>
267 /// Closes and destroys this object 267 /// Closes and destroys this object
268 /// </summary> 268 /// </summary>
269 /// <remarks> 269 /// <remarks>
270 /// Same as Dispose(true) 270 /// Same as Dispose(true)
271 /// </remarks> 271 /// </remarks>
272 public void Close() 272 public void Close()
273 { 273 {
274 Dispose(); 274 Dispose();
275 } 275 }
276 276
277 #endregion 277 #endregion
278 } 278 }
279} 279}
diff --git a/Prebuild/src/Core/WarningException.cs b/Prebuild/src/Core/WarningException.cs
index a200bdc..ce685cd 100644
--- a/Prebuild/src/Core/WarningException.cs
+++ b/Prebuild/src/Core/WarningException.cs
@@ -1,93 +1,93 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $ 30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $ 31 * $Revision: 71 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Runtime.Serialization; 36using System.Runtime.Serialization;
37 37
38namespace Prebuild.Core 38namespace Prebuild.Core
39{ 39{
40 /// <summary> 40 /// <summary>
41 /// 41 ///
42 /// </summary> 42 /// </summary>
43 [Serializable()] 43 [Serializable()]
44 public class WarningException : Exception 44 public class WarningException : Exception
45 { 45 {
46 #region Constructors 46 #region Constructors
47 47
48 /// <summary> 48 /// <summary>
49 /// 49 ///
50 /// </summary> 50 /// </summary>
51 public WarningException() 51 public WarningException()
52 { 52 {
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 /// 56 ///
57 /// </summary> 57 /// </summary>
58 /// <param name="format"></param> 58 /// <param name="format"></param>
59 /// <param name="args"></param> 59 /// <param name="args"></param>
60 public WarningException(string format, params object[] args) 60 public WarningException(string format, params object[] args)
61 : base(String.Format(format, args)) 61 : base(String.Format(format, args))
62 { 62 {
63 } 63 }
64 64
65 /// <summary> 65 /// <summary>
66 /// Exception with specified string 66 /// Exception with specified string
67 /// </summary> 67 /// </summary>
68 /// <param name="message">Exception message</param> 68 /// <param name="message">Exception message</param>
69 public WarningException(string message): base(message) 69 public WarningException(string message): base(message)
70 { 70 {
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// 74 ///
75 /// </summary> 75 /// </summary>
76 /// <param name="message"></param> 76 /// <param name="message"></param>
77 /// <param name="exception"></param> 77 /// <param name="exception"></param>
78 public WarningException(string message, Exception exception) : base(message, exception) 78 public WarningException(string message, Exception exception) : base(message, exception)
79 { 79 {
80 } 80 }
81 81
82 /// <summary> 82 /// <summary>
83 /// 83 ///
84 /// </summary> 84 /// </summary>
85 /// <param name="info"></param> 85 /// <param name="info"></param>
86 /// <param name="context"></param> 86 /// <param name="context"></param>
87 protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context ) 87 protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context )
88 { 88 {
89 } 89 }
90 90
91 #endregion 91 #endregion
92 } 92 }
93} 93}
diff --git a/Prebuild/src/Prebuild.cs b/Prebuild/src/Prebuild.cs
index 597db68..2d12b53 100644
--- a/Prebuild/src/Prebuild.cs
+++ b/Prebuild/src/Prebuild.cs
@@ -1,165 +1,165 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $ 30 * $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $
31 * $Revision: 168 $ 31 * $Revision: 168 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Collections.Specialized; 36using System.Collections.Specialized;
37using System.IO; 37using System.IO;
38using System.Reflection; 38using System.Reflection;
39using System.Runtime.InteropServices; 39using System.Runtime.InteropServices;
40using System.EnterpriseServices.Internal; 40using System.EnterpriseServices.Internal;
41 41
42using Prebuild.Core; 42using Prebuild.Core;
43using Prebuild.Core.Utilities; 43using Prebuild.Core.Utilities;
44 44
45namespace Prebuild 45namespace Prebuild
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 class Prebuild 50 class Prebuild
51 { 51 {
52 #region Main 52 #region Main
53 53
54 [STAThread] 54 [STAThread]
55 static void Main(string[] args) 55 static void Main(string[] args)
56 { 56 {
57 Kernel kernel = null; 57 Kernel kernel = null;
58 try 58 try
59 { 59 {
60 kernel = Kernel.Instance; 60 kernel = Kernel.Instance;
61 kernel.Initialize(LogTargets.File | LogTargets.Console, args); 61 kernel.Initialize(LogTargets.File | LogTargets.Console, args);
62 bool exit = false; 62 bool exit = false;
63 63
64 if(kernel.CommandLine.WasPassed("usage")) 64 if(kernel.CommandLine.WasPassed("usage"))
65 { 65 {
66 exit = true; 66 exit = true;
67 OutputUsage(); 67 OutputUsage();
68 } 68 }
69 if(kernel.CommandLine.WasPassed("showtargets")) 69 if(kernel.CommandLine.WasPassed("showtargets"))
70 { 70 {
71 exit = true; 71 exit = true;
72 OutputTargets(kernel); 72 OutputTargets(kernel);
73 } 73 }
74 if(kernel.CommandLine.WasPassed("install")) 74 if(kernel.CommandLine.WasPassed("install"))
75 { 75 {
76 exit = true; 76 exit = true;
77 InstallAssembly(kernel); 77 InstallAssembly(kernel);
78 } 78 }
79 if(kernel.CommandLine.WasPassed("remove")) 79 if(kernel.CommandLine.WasPassed("remove"))
80 { 80 {
81 exit = true; 81 exit = true;
82 RemoveAssembly(kernel); 82 RemoveAssembly(kernel);
83 } 83 }
84 84
85 if(!exit) 85 if(!exit)
86 { 86 {
87 kernel.Process(); 87 kernel.Process();
88 } 88 }
89 } 89 }
90 catch(Exception ex) 90 catch(Exception ex)
91 { 91 {
92 Console.WriteLine("Unhandled error: {0}", ex.Message); 92 Console.WriteLine("Unhandled error: {0}", ex.Message);
93 //#if DEBUG 93 //#if DEBUG
94 Console.WriteLine("{0}", ex.StackTrace); 94 Console.WriteLine("{0}", ex.StackTrace);
95 //#endif 95 //#endif
96 } 96 }
97 finally 97 finally
98 { 98 {
99 if(kernel.PauseAfterFinish) 99 if(kernel.PauseAfterFinish)
100 { 100 {
101 Console.WriteLine("\nPress enter to continue..."); 101 Console.WriteLine("\nPress enter to continue...");
102 Console.ReadLine(); 102 Console.ReadLine();
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 #endregion 107 #endregion
108 108
109 #region Private Methods 109 #region Private Methods
110 110
111 private static void InstallAssembly(Kernel kernel) 111 private static void InstallAssembly(Kernel kernel)
112 { 112 {
113 Publish publish = new Publish(); 113 Publish publish = new Publish();
114 string file = kernel.CommandLine["install"]; 114 string file = kernel.CommandLine["install"];
115 //Console.WriteLine(".."+file+".."); 115 //Console.WriteLine(".."+file+"..");
116 publish.GacInstall(file); 116 publish.GacInstall(file);
117 } 117 }
118 118
119 private static void RemoveAssembly(Kernel kernel) 119 private static void RemoveAssembly(Kernel kernel)
120 { 120 {
121 Publish publish = new Publish(); 121 Publish publish = new Publish();
122 string file = kernel.CommandLine["remove"]; 122 string file = kernel.CommandLine["remove"];
123 publish.GacRemove(file); 123 publish.GacRemove(file);
124 } 124 }
125 125
126 private static void OutputUsage() 126 private static void OutputUsage()
127 { 127 {
128 Console.WriteLine("Usage: prebuild /target <target> [options]"); 128 Console.WriteLine("Usage: prebuild /target <target> [options]");
129 Console.WriteLine("Available command-line switches:"); 129 Console.WriteLine("Available command-line switches:");
130 Console.WriteLine(); 130 Console.WriteLine();
131 Console.WriteLine("/target Target for Prebuild"); 131 Console.WriteLine("/target Target for Prebuild");
132 Console.WriteLine("/clean Clean the build files for the given target"); 132 Console.WriteLine("/clean Clean the build files for the given target");
133 Console.WriteLine("/file XML file to process"); 133 Console.WriteLine("/file XML file to process");
134 Console.WriteLine("/log Log file to write to"); 134 Console.WriteLine("/log Log file to write to");
135 Console.WriteLine("/ppo Pre-process the file, but perform no other processing"); 135 Console.WriteLine("/ppo Pre-process the file, but perform no other processing");
136 Console.WriteLine("/pause Pauses the application after execution to view the output"); 136 Console.WriteLine("/pause Pauses the application after execution to view the output");
137 Console.WriteLine("/yes Default to yes to any questions asked"); 137 Console.WriteLine("/yes Default to yes to any questions asked");
138 Console.WriteLine("/install Install assembly into the GAC"); 138 Console.WriteLine("/install Install assembly into the GAC");
139 Console.WriteLine("/remove Remove assembly from the GAC"); 139 Console.WriteLine("/remove Remove assembly from the GAC");
140 Console.WriteLine(); 140 Console.WriteLine();
141 Console.WriteLine("See 'prebuild /showtargets for a list of available targets"); 141 Console.WriteLine("See 'prebuild /showtargets for a list of available targets");
142 Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information"); 142 Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information");
143 Console.WriteLine(); 143 Console.WriteLine();
144 } 144 }
145 145
146 private static void OutputTargets(Kernel kern) 146 private static void OutputTargets(Kernel kern)
147 { 147 {
148 Console.WriteLine("Targets available in Prebuild:"); 148 Console.WriteLine("Targets available in Prebuild:");
149 Console.WriteLine(""); 149 Console.WriteLine("");
150 if(kern.Targets.Keys.Count > 0) 150 if(kern.Targets.Keys.Count > 0)
151 { 151 {
152 string[] targs = new string[kern.Targets.Keys.Count]; 152 string[] targs = new string[kern.Targets.Keys.Count];
153 kern.Targets.Keys.CopyTo(targs, 0); 153 kern.Targets.Keys.CopyTo(targs, 0);
154 Array.Sort(targs); 154 Array.Sort(targs);
155 foreach(string target in targs) 155 foreach(string target in targs)
156 { 156 {
157 Console.WriteLine(target); 157 Console.WriteLine(target);
158 } 158 }
159 } 159 }
160 Console.WriteLine(""); 160 Console.WriteLine("");
161 } 161 }
162 162
163 #endregion 163 #endregion
164 } 164 }
165} 165}
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs
index bfa9829..9f74500 100644
--- a/Prebuild/src/Properties/AssemblyInfo.cs
+++ b/Prebuild/src/Properties/AssemblyInfo.cs
@@ -1,101 +1,101 @@
1#region BSD License 1#region BSD License
2/* 2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) 3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted 5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met: 6provided that the following conditions are met:
7 7
8* Redistributions of source code must retain the above copyright notice, this list of conditions 8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer. 9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the 11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution. 12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software 13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission. 14 without specific prior written permission.
15 15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/ 23*/
24#endregion 24#endregion
25 25
26#region CVS Information 26#region CVS Information
27/* 27/*
28 * $Source$ 28 * $Source$
29 * $Author: jendave $ 29 * $Author: jendave $
30 * $Date: 2007-01-26 19:31:34 +0100 (fr, 26 jan 2007) $ 30 * $Date: 2007-01-26 19:31:34 +0100 (fr, 26 jan 2007) $
31 * $Revision: 203 $ 31 * $Revision: 203 $
32 */ 32 */
33#endregion 33#endregion
34 34
35using System; 35using System;
36using System.Reflection; 36using System.Reflection;
37using System.Runtime.CompilerServices; 37using System.Runtime.CompilerServices;
38using System.Runtime.InteropServices; 38using System.Runtime.InteropServices;
39using System.Security.Permissions; 39using System.Security.Permissions;
40using System.Resources; 40using System.Resources;
41 41
42 42
43// FxCop recommended attributes 43// FxCop recommended attributes
44[assembly: ComVisible(false)] 44[assembly: ComVisible(false)]
45[assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)] 45[assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
46[assembly: CLSCompliant(true)] 46[assembly: CLSCompliant(true)]
47 47
48// 48//
49// General Information about an assembly is controlled through the following 49// General Information about an assembly is controlled through the following
50// set of attributes. Change these attribute values to modify the information 50// set of attributes. Change these attribute values to modify the information
51// associated with an assembly. 51// associated with an assembly.
52// 52//
53[assembly: AssemblyTitle(".NET Prebuild")] 53[assembly: AssemblyTitle(".NET Prebuild")]
54[assembly: AssemblyDescription("A .NET project file build tool")] 54[assembly: AssemblyDescription("A .NET project file build tool")]
55[assembly: AssemblyConfiguration(".NET CLR")] 55[assembly: AssemblyConfiguration(".NET CLR")]
56[assembly: AssemblyCompany("The Prebuild Project")] 56[assembly: AssemblyCompany("The Prebuild Project")]
57[assembly: AssemblyProduct("")] 57[assembly: AssemblyProduct("")]
58[assembly: AssemblyCopyright("Copyright 2004-2006 Matthew Holmes, Dan Moorehead and David Hudson")] 58[assembly: AssemblyCopyright("Copyright 2004-2006 Matthew Holmes, Dan Moorehead and David Hudson")]
59[assembly: AssemblyTrademark("")] 59[assembly: AssemblyTrademark("")]
60[assembly: AssemblyCulture("")] 60[assembly: AssemblyCulture("")]
61[assembly: NeutralResourcesLanguageAttribute("en-US")] 61[assembly: NeutralResourcesLanguageAttribute("en-US")]
62[assembly: AssemblyVersion("2.0.0.*")] 62[assembly: AssemblyVersion("2.0.0.*")]
63 63
64// 64//
65// Version information for an assembly consists of the following four values: 65// Version information for an assembly consists of the following four values:
66// 66//
67// Major Version 67// Major Version
68// Minor Version 68// Minor Version
69// Build Number 69// Build Number
70// Revision 70// Revision
71// 71//
72// You can specify all the values or you can default the Revision and Build Numbers 72// You can specify all the values or you can default the Revision and Build Numbers
73// by using the '*' as shown below: 73// by using the '*' as shown below:
74 74
75// 75//
76// In order to sign your assembly you must specify a key to use. Refer to the 76// In order to sign your assembly you must specify a key to use. Refer to the
77// Microsoft .NET Framework documentation for more information on assembly signing. 77// Microsoft .NET Framework documentation for more information on assembly signing.
78// 78//
79// Use the attributes below to control which key is used for signing. 79// Use the attributes below to control which key is used for signing.
80// 80//
81// Notes: 81// Notes:
82// (*) If no key is specified, the assembly is not signed. 82// (*) If no key is specified, the assembly is not signed.
83// (*) KeyName refers to a key that has been installed in the Crypto Service 83// (*) KeyName refers to a key that has been installed in the Crypto Service
84// Provider (CSP) on your machine. KeyFile refers to a file which contains 84// Provider (CSP) on your machine. KeyFile refers to a file which contains
85// a key. 85// a key.
86// (*) If the KeyFile and the KeyName values are both specified, the 86// (*) If the KeyFile and the KeyName values are both specified, the
87// following processing occurs: 87// following processing occurs:
88// (1) If the KeyName can be found in the CSP, that key is used. 88// (1) If the KeyName can be found in the CSP, that key is used.
89// (2) If the KeyName does not exist and the KeyFile does exist, the key 89// (2) If the KeyName does not exist and the KeyFile does exist, the key
90// in the KeyFile is installed into the CSP and used. 90// in the KeyFile is installed into the CSP and used.
91// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 91// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
92// When specifying the KeyFile, the location of the KeyFile should be 92// When specifying the KeyFile, the location of the KeyFile should be
93// relative to the project output directory which is 93// relative to the project output directory which is
94// %Project Directory%\obj\<configuration>. For example, if your KeyFile is 94// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
95// located in the project directory, you would specify the AssemblyKeyFile 95// located in the project directory, you would specify the AssemblyKeyFile
96// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 96// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
97// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 97// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
98// documentation for more information on this. 98// documentation for more information on this.
99// 99//
100[assembly: AssemblyDelaySign(false)] 100[assembly: AssemblyDelaySign(false)]
101[assembly: AssemblyKeyName("")] 101[assembly: AssemblyKeyName("")]
diff --git a/Prebuild/src/data/dnpb-1.0.xsd b/Prebuild/src/data/dnpb-1.0.xsd
index 45cab86..b9e0e4e 100644
--- a/Prebuild/src/data/dnpb-1.0.xsd
+++ b/Prebuild/src/data/dnpb-1.0.xsd
@@ -1,183 +1,183 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com) 9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com)
10 10
11 Redistribution and use in source and binary forms, with or without modification, are permitted 11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met: 12 provided that the following conditions are met:
13 13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions 14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer. 15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the 17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution. 18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software 19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission. 20 without specific prior written permission.
21 21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation> 29 </xs:documentation>
30 </xs:annotation> 30 </xs:annotation>
31 31
32 <xs:element name="DNPreBuild"> 32 <xs:element name="DNPreBuild">
33 <xs:complexType> 33 <xs:complexType>
34 <xs:sequence> 34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" /> 36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" />
37 </xs:sequence> 37 </xs:sequence>
38 38
39 <xs:attribute name="version" use="required" /> 39 <xs:attribute name="version" use="required" />
40 </xs:complexType> 40 </xs:complexType>
41 </xs:element> 41 </xs:element>
42 42
43 <xs:element name="Process" type="xs:string" /> 43 <xs:element name="Process" type="xs:string" />
44 44
45 <xs:element name="Solution"> 45 <xs:element name="Solution">
46 <xs:complexType> 46 <xs:complexType>
47 <xs:sequence> 47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" /> 48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" /> 50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence> 52 </xs:sequence>
53 53
54 <xs:attribute name="name" type="xs:string" use="required" /> 54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" /> 55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType> 56 </xs:complexType>
57 </xs:element> 57 </xs:element>
58 58
59 <xs:element name="Project"> 59 <xs:element name="Project">
60 <xs:complexType> 60 <xs:complexType>
61 <xs:sequence> 61 <xs:sequence>
62 <xs:element name="Reference" maxOccurs="unbounded"> 62 <xs:element name="Reference" maxOccurs="unbounded">
63 <xs:complexType> 63 <xs:complexType>
64 <xs:attribute name="name" type="xs:string" use="required" /> 64 <xs:attribute name="name" type="xs:string" use="required" />
65 <xs:attribute name="path" type="xs:string" /> 65 <xs:attribute name="path" type="xs:string" />
66 <xs:attribute name="localCopy" type="xs:boolean" /> 66 <xs:attribute name="localCopy" type="xs:boolean" />
67 <xs:attribute name="version" type="xs:string" /> 67 <xs:attribute name="version" type="xs:string" />
68 </xs:complexType> 68 </xs:complexType>
69 </xs:element> 69 </xs:element>
70 70
71 <xs:element ref="Files" /> 71 <xs:element ref="Files" />
72 </xs:sequence> 72 </xs:sequence>
73 73
74 <xs:attribute name="name" type="xs:string" use="required" /> 74 <xs:attribute name="name" type="xs:string" use="required" />
75 <xs:attribute name="path" type="xs:string" default="" /> 75 <xs:attribute name="path" type="xs:string" default="" />
76 76
77 <xs:attribute name="language" default="C#"> 77 <xs:attribute name="language" default="C#">
78 <xs:simpleType> 78 <xs:simpleType>
79 <xs:restriction base="xs:string"> 79 <xs:restriction base="xs:string">
80 <xs:enumeration value="C#" /> 80 <xs:enumeration value="C#" />
81 <xs:enumeration value="VB.NET" /> 81 <xs:enumeration value="VB.NET" />
82 </xs:restriction> 82 </xs:restriction>
83 </xs:simpleType> 83 </xs:simpleType>
84 </xs:attribute> 84 </xs:attribute>
85 85
86 <xs:attribute name="type" default="Exe"> 86 <xs:attribute name="type" default="Exe">
87 <xs:simpleType> 87 <xs:simpleType>
88 <xs:restriction base="xs:string"> 88 <xs:restriction base="xs:string">
89 <xs:enumeration value="Exe" /> 89 <xs:enumeration value="Exe" />
90 <xs:enumeration value="WinExe" /> 90 <xs:enumeration value="WinExe" />
91 <xs:enumeration value="Library" /> 91 <xs:enumeration value="Library" />
92 </xs:restriction> 92 </xs:restriction>
93 </xs:simpleType> 93 </xs:simpleType>
94 </xs:attribute> 94 </xs:attribute>
95 95
96 <xs:attribute name="runtime" default="Microsoft"> 96 <xs:attribute name="runtime" default="Microsoft">
97 <xs:simpleType> 97 <xs:simpleType>
98 <xs:restriction base="xs:string"> 98 <xs:restriction base="xs:string">
99 <xs:enumeration value="Microsoft" /> 99 <xs:enumeration value="Microsoft" />
100 <xs:enumeration value="Mono" /> 100 <xs:enumeration value="Mono" />
101 </xs:restriction> 101 </xs:restriction>
102 </xs:simpleType> 102 </xs:simpleType>
103 </xs:attribute> 103 </xs:attribute>
104 104
105 <xs:attribute name="startupObject" type="xs:string" default="" /> 105 <xs:attribute name="startupObject" type="xs:string" default="" />
106 </xs:complexType> 106 </xs:complexType>
107 </xs:element> 107 </xs:element>
108 108
109 <xs:element name="Configuration"> 109 <xs:element name="Configuration">
110 <xs:complexType> 110 <xs:complexType>
111 <xs:all> 111 <xs:all>
112 <xs:element ref="Options" minOccurs="0" /> 112 <xs:element ref="Options" minOccurs="0" />
113 </xs:all> 113 </xs:all>
114 114
115 <xs:attribute name="name" type="xs:string" use="required" /> 115 <xs:attribute name="name" type="xs:string" use="required" />
116 </xs:complexType> 116 </xs:complexType>
117 </xs:element> 117 </xs:element>
118 118
119 <xs:element name="Options"> 119 <xs:element name="Options">
120 <xs:complexType> 120 <xs:complexType>
121 <xs:sequence> 121 <xs:sequence>
122 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 122 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
123 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 123 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
124 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 124 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
125 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 125 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
126 <xs:element name="WarningLevel" minOccurs="0"> 126 <xs:element name="WarningLevel" minOccurs="0">
127 <xs:simpleType> 127 <xs:simpleType>
128 <xs:restriction base="xs:integer"> 128 <xs:restriction base="xs:integer">
129 <xs:minInclusive value="0" /> 129 <xs:minInclusive value="0" />
130 <xs:maxInclusive value="4"/> 130 <xs:maxInclusive value="4"/>
131 </xs:restriction> 131 </xs:restriction>
132 </xs:simpleType> 132 </xs:simpleType>
133 </xs:element> 133 </xs:element>
134 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 134 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
135 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 135 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
136 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 136 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
137 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 137 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
138 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 138 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
139 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 139 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
140 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 140 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
141 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 141 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
142 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 142 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
143 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 143 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
144 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 144 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
145 </xs:sequence> 145 </xs:sequence>
146 </xs:complexType> 146 </xs:complexType>
147 </xs:element> 147 </xs:element>
148 148
149 <xs:element name="Files"> 149 <xs:element name="Files">
150 <xs:complexType> 150 <xs:complexType>
151 <xs:sequence> 151 <xs:sequence>
152 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 152 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
153 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 153 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
154 </xs:sequence> 154 </xs:sequence>
155 </xs:complexType> 155 </xs:complexType>
156 </xs:element> 156 </xs:element>
157 157
158 <xs:element name="File"> 158 <xs:element name="File">
159 <xs:complexType> 159 <xs:complexType>
160 <xs:simpleContent> 160 <xs:simpleContent>
161 <xs:extension base="xs:string"> 161 <xs:extension base="xs:string">
162 <xs:attribute name="buildAction" default="Compile"> 162 <xs:attribute name="buildAction" default="Compile">
163 <xs:simpleType> 163 <xs:simpleType>
164 <xs:restriction base="xs:string"> 164 <xs:restriction base="xs:string">
165 <xs:enumeration value="Compile" /> 165 <xs:enumeration value="Compile" />
166 <xs:enumeration value="Content" /> 166 <xs:enumeration value="Content" />
167 <xs:enumeration value="EmbeddedResource" /> 167 <xs:enumeration value="EmbeddedResource" />
168 </xs:restriction> 168 </xs:restriction>
169 </xs:simpleType> 169 </xs:simpleType>
170 </xs:attribute> 170 </xs:attribute>
171 </xs:extension> 171 </xs:extension>
172 </xs:simpleContent> 172 </xs:simpleContent>
173 </xs:complexType> 173 </xs:complexType>
174 </xs:element> 174 </xs:element>
175 175
176 <xs:element name="Match"> 176 <xs:element name="Match">
177 <xs:complexType> 177 <xs:complexType>
178 <xs:attribute name="path" type="xs:string" use="required" /> 178 <xs:attribute name="path" type="xs:string" use="required" />
179 <xs:attribute name="pattern" type="xs:string" use="required" /> 179 <xs:attribute name="pattern" type="xs:string" use="required" />
180 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 180 <xs:attribute name="recurse" type="xs:boolean" default="false" />
181 </xs:complexType> 181 </xs:complexType>
182 </xs:element> 182 </xs:element>
183</xs:schema> \ No newline at end of file 183</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.1.xsd b/Prebuild/src/data/dnpb-1.1.xsd
index c402ceb..2c065a3 100644
--- a/Prebuild/src/data/dnpb-1.1.xsd
+++ b/Prebuild/src/data/dnpb-1.1.xsd
@@ -1,184 +1,184 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com) 9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com)
10 10
11 Redistribution and use in source and binary forms, with or without modification, are permitted 11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met: 12 provided that the following conditions are met:
13 13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions 14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer. 15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the 17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution. 18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software 19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission. 20 without specific prior written permission.
21 21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation> 29 </xs:documentation>
30 </xs:annotation> 30 </xs:annotation>
31 31
32 <xs:element name="DNPreBuild"> 32 <xs:element name="DNPreBuild">
33 <xs:complexType> 33 <xs:complexType>
34 <xs:sequence> 34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" /> 36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" />
37 </xs:sequence> 37 </xs:sequence>
38 38
39 <xs:attribute name="version" use="required" /> 39 <xs:attribute name="version" use="required" />
40 </xs:complexType> 40 </xs:complexType>
41 </xs:element> 41 </xs:element>
42 42
43 <xs:element name="Process" type="xs:string" /> 43 <xs:element name="Process" type="xs:string" />
44 44
45 <xs:element name="Solution"> 45 <xs:element name="Solution">
46 <xs:complexType> 46 <xs:complexType>
47 <xs:sequence> 47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" /> 48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" /> 50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence> 52 </xs:sequence>
53 53
54 <xs:attribute name="name" type="xs:string" use="required" /> 54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" /> 55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType> 56 </xs:complexType>
57 </xs:element> 57 </xs:element>
58 58
59 <xs:element name="Project"> 59 <xs:element name="Project">
60 <xs:complexType> 60 <xs:complexType>
61 <xs:sequence> 61 <xs:sequence>
62 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 62 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
63 63
64 <xs:element name="Reference" maxOccurs="unbounded"> 64 <xs:element name="Reference" maxOccurs="unbounded">
65 <xs:complexType> 65 <xs:complexType>
66 <xs:attribute name="name" type="xs:string" use="required" /> 66 <xs:attribute name="name" type="xs:string" use="required" />
67 <xs:attribute name="path" type="xs:string" /> 67 <xs:attribute name="path" type="xs:string" />
68 <xs:attribute name="localCopy" type="xs:boolean" /> 68 <xs:attribute name="localCopy" type="xs:boolean" />
69 <xs:attribute name="version" type="xs:string" /> 69 <xs:attribute name="version" type="xs:string" />
70 </xs:complexType> 70 </xs:complexType>
71 </xs:element> 71 </xs:element>
72 72
73 <xs:element ref="Files" /> 73 <xs:element ref="Files" />
74 </xs:sequence> 74 </xs:sequence>
75 75
76 <xs:attribute name="name" type="xs:string" use="required" /> 76 <xs:attribute name="name" type="xs:string" use="required" />
77 <xs:attribute name="path" type="xs:string" default="" /> 77 <xs:attribute name="path" type="xs:string" default="" />
78 78
79 <xs:attribute name="language" default="C#"> 79 <xs:attribute name="language" default="C#">
80 <xs:simpleType> 80 <xs:simpleType>
81 <xs:restriction base="xs:string"> 81 <xs:restriction base="xs:string">
82 <xs:enumeration value="C#" /> 82 <xs:enumeration value="C#" />
83 <xs:enumeration value="VB.NET" /> 83 <xs:enumeration value="VB.NET" />
84 </xs:restriction> 84 </xs:restriction>
85 </xs:simpleType> 85 </xs:simpleType>
86 </xs:attribute> 86 </xs:attribute>
87 87
88 <xs:attribute name="type" default="Exe"> 88 <xs:attribute name="type" default="Exe">
89 <xs:simpleType> 89 <xs:simpleType>
90 <xs:restriction base="xs:string"> 90 <xs:restriction base="xs:string">
91 <xs:enumeration value="Exe" /> 91 <xs:enumeration value="Exe" />
92 <xs:enumeration value="WinExe" /> 92 <xs:enumeration value="WinExe" />
93 <xs:enumeration value="Library" /> 93 <xs:enumeration value="Library" />
94 </xs:restriction> 94 </xs:restriction>
95 </xs:simpleType> 95 </xs:simpleType>
96 </xs:attribute> 96 </xs:attribute>
97 97
98 <xs:attribute name="runtime" default="Microsoft"> 98 <xs:attribute name="runtime" default="Microsoft">
99 <xs:simpleType> 99 <xs:simpleType>
100 <xs:restriction base="xs:string"> 100 <xs:restriction base="xs:string">
101 <xs:enumeration value="Microsoft" /> 101 <xs:enumeration value="Microsoft" />
102 <xs:enumeration value="Mono" /> 102 <xs:enumeration value="Mono" />
103 </xs:restriction> 103 </xs:restriction>
104 </xs:simpleType> 104 </xs:simpleType>
105 </xs:attribute> 105 </xs:attribute>
106 106
107 <xs:attribute name="startupObject" type="xs:string" default="" /> 107 <xs:attribute name="startupObject" type="xs:string" default="" />
108 </xs:complexType> 108 </xs:complexType>
109 </xs:element> 109 </xs:element>
110 110
111 <xs:element name="Configuration"> 111 <xs:element name="Configuration">
112 <xs:complexType> 112 <xs:complexType>
113 <xs:all> 113 <xs:all>
114 <xs:element ref="Options" minOccurs="0" /> 114 <xs:element ref="Options" minOccurs="0" />
115 </xs:all> 115 </xs:all>
116 116
117 <xs:attribute name="name" type="xs:string" use="required" /> 117 <xs:attribute name="name" type="xs:string" use="required" />
118 </xs:complexType> 118 </xs:complexType>
119 </xs:element> 119 </xs:element>
120 120
121 <xs:element name="Options"> 121 <xs:element name="Options">
122 <xs:complexType> 122 <xs:complexType>
123 <xs:sequence> 123 <xs:sequence>
124 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 124 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
125 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 125 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
126 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 126 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
127 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 127 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
128 <xs:element name="WarningLevel" minOccurs="0"> 128 <xs:element name="WarningLevel" minOccurs="0">
129 <xs:simpleType> 129 <xs:simpleType>
130 <xs:restriction base="xs:integer"> 130 <xs:restriction base="xs:integer">
131 <xs:minInclusive value="0" /> 131 <xs:minInclusive value="0" />
132 <xs:maxInclusive value="4"/> 132 <xs:maxInclusive value="4"/>
133 </xs:restriction> 133 </xs:restriction>
134 </xs:simpleType> 134 </xs:simpleType>
135 </xs:element> 135 </xs:element>
136 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 136 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
137 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 137 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
138 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 138 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
139 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 139 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
140 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 140 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
141 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 141 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
142 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 142 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
143 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 143 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
144 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 144 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
145 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 145 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
146 </xs:sequence> 146 </xs:sequence>
147 </xs:complexType> 147 </xs:complexType>
148 </xs:element> 148 </xs:element>
149 149
150 <xs:element name="Files"> 150 <xs:element name="Files">
151 <xs:complexType> 151 <xs:complexType>
152 <xs:sequence> 152 <xs:sequence>
153 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 153 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
154 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 154 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
155 </xs:sequence> 155 </xs:sequence>
156 </xs:complexType> 156 </xs:complexType>
157 </xs:element> 157 </xs:element>
158 158
159 <xs:element name="File"> 159 <xs:element name="File">
160 <xs:complexType> 160 <xs:complexType>
161 <xs:simpleContent> 161 <xs:simpleContent>
162 <xs:extension base="xs:string"> 162 <xs:extension base="xs:string">
163 <xs:attribute name="buildAction" default="Compile"> 163 <xs:attribute name="buildAction" default="Compile">
164 <xs:simpleType> 164 <xs:simpleType>
165 <xs:restriction base="xs:string"> 165 <xs:restriction base="xs:string">
166 <xs:enumeration value="Compile" /> 166 <xs:enumeration value="Compile" />
167 <xs:enumeration value="Content" /> 167 <xs:enumeration value="Content" />
168 <xs:enumeration value="EmbeddedResource" /> 168 <xs:enumeration value="EmbeddedResource" />
169 </xs:restriction> 169 </xs:restriction>
170 </xs:simpleType> 170 </xs:simpleType>
171 </xs:attribute> 171 </xs:attribute>
172 </xs:extension> 172 </xs:extension>
173 </xs:simpleContent> 173 </xs:simpleContent>
174 </xs:complexType> 174 </xs:complexType>
175 </xs:element> 175 </xs:element>
176 176
177 <xs:element name="Match"> 177 <xs:element name="Match">
178 <xs:complexType> 178 <xs:complexType>
179 <xs:attribute name="path" type="xs:string" use="required" /> 179 <xs:attribute name="path" type="xs:string" use="required" />
180 <xs:attribute name="pattern" type="xs:string" use="required" /> 180 <xs:attribute name="pattern" type="xs:string" use="required" />
181 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 181 <xs:attribute name="recurse" type="xs:boolean" default="false" />
182 </xs:complexType> 182 </xs:complexType>
183 </xs:element> 183 </xs:element>
184</xs:schema> \ No newline at end of file 184</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.2.xsd b/Prebuild/src/data/dnpb-1.2.xsd
index 8004af7..d694ab4 100644
--- a/Prebuild/src/data/dnpb-1.2.xsd
+++ b/Prebuild/src/data/dnpb-1.2.xsd
@@ -1,198 +1,198 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (calefaction _at_ houston _._ rr _._ com) 9 Copyright (c) 2004 Matthew Holmes (calefaction _at_ houston _._ rr _._ com)
10 10
11 Redistribution and use in source and binary forms, with or without modification, are permitted 11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met: 12 provided that the following conditions are met:
13 13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions 14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer. 15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the 17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution. 18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software 19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission. 20 without specific prior written permission.
21 21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation> 29 </xs:documentation>
30 </xs:annotation> 30 </xs:annotation>
31 31
32 <xs:element name="DNPreBuild"> 32 <xs:element name="DNPreBuild">
33 <xs:complexType> 33 <xs:complexType>
34 <xs:sequence> 34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> 36 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
37 </xs:sequence> 37 </xs:sequence>
38 38
39 <xs:attribute name="version" use="required" /> 39 <xs:attribute name="version" use="required" />
40 </xs:complexType> 40 </xs:complexType>
41 </xs:element> 41 </xs:element>
42 42
43 <xs:element name="Process" type="xs:string" /> 43 <xs:element name="Process" type="xs:string" />
44 44
45 <xs:element name="Solution"> 45 <xs:element name="Solution">
46 <xs:complexType> 46 <xs:complexType>
47 <xs:sequence> 47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" /> 48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" /> 50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence> 52 </xs:sequence>
53 53
54 <xs:attribute name="name" type="xs:string" use="required" /> 54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" /> 55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType> 56 </xs:complexType>
57 </xs:element> 57 </xs:element>
58 58
59 <xs:element name="Project"> 59 <xs:element name="Project">
60 <xs:complexType> 60 <xs:complexType>
61 <xs:sequence> 61 <xs:sequence>
62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> 62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
63 63
64 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 64 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
65 65
66 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> 66 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
67 <xs:complexType> 67 <xs:complexType>
68 <xs:attribute name="name" type="xs:string" use="required" /> 68 <xs:attribute name="name" type="xs:string" use="required" />
69 <xs:attribute name="path" type="xs:string" /> 69 <xs:attribute name="path" type="xs:string" />
70 <xs:attribute name="localCopy" type="xs:boolean" /> 70 <xs:attribute name="localCopy" type="xs:boolean" />
71 <xs:attribute name="version" type="xs:string" /> 71 <xs:attribute name="version" type="xs:string" />
72 </xs:complexType> 72 </xs:complexType>
73 </xs:element> 73 </xs:element>
74 74
75 <xs:element ref="Files" /> 75 <xs:element ref="Files" />
76 </xs:sequence> 76 </xs:sequence>
77 77
78 <xs:attribute name="name" type="xs:string" use="required" /> 78 <xs:attribute name="name" type="xs:string" use="required" />
79 <xs:attribute name="path" type="xs:string" default="" /> 79 <xs:attribute name="path" type="xs:string" default="" />
80 80
81 <xs:attribute name="language" default="C#"> 81 <xs:attribute name="language" default="C#">
82 <xs:simpleType> 82 <xs:simpleType>
83 <xs:restriction base="xs:string"> 83 <xs:restriction base="xs:string">
84 <xs:enumeration value="C#" /> 84 <xs:enumeration value="C#" />
85 <xs:enumeration value="VB.NET" /> 85 <xs:enumeration value="VB.NET" />
86 </xs:restriction> 86 </xs:restriction>
87 </xs:simpleType> 87 </xs:simpleType>
88 </xs:attribute> 88 </xs:attribute>
89 89
90 <xs:attribute name="type" default="Exe"> 90 <xs:attribute name="type" default="Exe">
91 <xs:simpleType> 91 <xs:simpleType>
92 <xs:restriction base="xs:string"> 92 <xs:restriction base="xs:string">
93 <xs:enumeration value="Exe" /> 93 <xs:enumeration value="Exe" />
94 <xs:enumeration value="WinExe" /> 94 <xs:enumeration value="WinExe" />
95 <xs:enumeration value="Library" /> 95 <xs:enumeration value="Library" />
96 </xs:restriction> 96 </xs:restriction>
97 </xs:simpleType> 97 </xs:simpleType>
98 </xs:attribute> 98 </xs:attribute>
99 99
100 <xs:attribute name="runtime" default="Microsoft"> 100 <xs:attribute name="runtime" default="Microsoft">
101 <xs:simpleType> 101 <xs:simpleType>
102 <xs:restriction base="xs:string"> 102 <xs:restriction base="xs:string">
103 <xs:enumeration value="Microsoft" /> 103 <xs:enumeration value="Microsoft" />
104 <xs:enumeration value="Mono" /> 104 <xs:enumeration value="Mono" />
105 </xs:restriction> 105 </xs:restriction>
106 </xs:simpleType> 106 </xs:simpleType>
107 </xs:attribute> 107 </xs:attribute>
108 108
109 <xs:attribute name="startupObject" type="xs:string" default="" /> 109 <xs:attribute name="startupObject" type="xs:string" default="" />
110 <xs:attribute name="rootNamespace" type="xs:string" /> 110 <xs:attribute name="rootNamespace" type="xs:string" />
111 <xs:attribute name="assemblyName" type="xs:string" /> 111 <xs:attribute name="assemblyName" type="xs:string" />
112 </xs:complexType> 112 </xs:complexType>
113 </xs:element> 113 </xs:element>
114 114
115 <xs:element name="Configuration"> 115 <xs:element name="Configuration">
116 <xs:complexType> 116 <xs:complexType>
117 <xs:all> 117 <xs:all>
118 <xs:element ref="Options" minOccurs="0" /> 118 <xs:element ref="Options" minOccurs="0" />
119 </xs:all> 119 </xs:all>
120 120
121 <xs:attribute name="name" type="xs:string" use="required" /> 121 <xs:attribute name="name" type="xs:string" use="required" />
122 </xs:complexType> 122 </xs:complexType>
123 </xs:element> 123 </xs:element>
124 124
125 <xs:element name="Options"> 125 <xs:element name="Options">
126 <xs:complexType> 126 <xs:complexType>
127 <xs:all> 127 <xs:all>
128 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 128 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
129 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 129 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
130 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 130 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
131 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 131 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
132 <xs:element name="WarningLevel" minOccurs="0"> 132 <xs:element name="WarningLevel" minOccurs="0">
133 <xs:simpleType> 133 <xs:simpleType>
134 <xs:restriction base="xs:integer"> 134 <xs:restriction base="xs:integer">
135 <xs:minInclusive value="0" /> 135 <xs:minInclusive value="0" />
136 <xs:maxInclusive value="4"/> 136 <xs:maxInclusive value="4"/>
137 </xs:restriction> 137 </xs:restriction>
138 </xs:simpleType> 138 </xs:simpleType>
139 </xs:element> 139 </xs:element>
140 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 140 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
141 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 141 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
142 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 142 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
143 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 143 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
144 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 144 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
145 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 145 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
146 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 146 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
147 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 147 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
148 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 148 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
149 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 149 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
150 </xs:all> 150 </xs:all>
151 </xs:complexType> 151 </xs:complexType>
152 </xs:element> 152 </xs:element>
153 153
154 <xs:element name="Files"> 154 <xs:element name="Files">
155 <xs:complexType> 155 <xs:complexType>
156 <xs:sequence> 156 <xs:sequence>
157 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 157 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
158 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 158 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
159 </xs:sequence> 159 </xs:sequence>
160 </xs:complexType> 160 </xs:complexType>
161 </xs:element> 161 </xs:element>
162 162
163 <xs:element name="File"> 163 <xs:element name="File">
164 <xs:complexType> 164 <xs:complexType>
165 <xs:simpleContent> 165 <xs:simpleContent>
166 <xs:extension base="xs:string"> 166 <xs:extension base="xs:string">
167 <xs:attribute name="buildAction" default="Compile"> 167 <xs:attribute name="buildAction" default="Compile">
168 <xs:simpleType> 168 <xs:simpleType>
169 <xs:restriction base="xs:string"> 169 <xs:restriction base="xs:string">
170 <xs:enumeration value="Compile" /> 170 <xs:enumeration value="Compile" />
171 <xs:enumeration value="Content" /> 171 <xs:enumeration value="Content" />
172 <xs:enumeration value="EmbeddedResource" /> 172 <xs:enumeration value="EmbeddedResource" />
173 </xs:restriction> 173 </xs:restriction>
174 </xs:simpleType> 174 </xs:simpleType>
175 </xs:attribute> 175 </xs:attribute>
176 </xs:extension> 176 </xs:extension>
177 </xs:simpleContent> 177 </xs:simpleContent>
178 </xs:complexType> 178 </xs:complexType>
179 </xs:element> 179 </xs:element>
180 180
181 <xs:element name="Match"> 181 <xs:element name="Match">
182 <xs:complexType> 182 <xs:complexType>
183 <xs:attribute name="path" type="xs:string" use="required" /> 183 <xs:attribute name="path" type="xs:string" use="required" />
184 <xs:attribute name="pattern" type="xs:string" use="required" /> 184 <xs:attribute name="pattern" type="xs:string" use="required" />
185 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 185 <xs:attribute name="recurse" type="xs:boolean" default="false" />
186 <xs:attribute name="useRegex" type="xs:boolean" default="false" /> 186 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
187 <xs:attribute name="buildAction" default="Compile"> 187 <xs:attribute name="buildAction" default="Compile">
188 <xs:simpleType> 188 <xs:simpleType>
189 <xs:restriction base="xs:string"> 189 <xs:restriction base="xs:string">
190 <xs:enumeration value="Compile" /> 190 <xs:enumeration value="Compile" />
191 <xs:enumeration value="Content" /> 191 <xs:enumeration value="Content" />
192 <xs:enumeration value="EmbeddedResource" /> 192 <xs:enumeration value="EmbeddedResource" />
193 </xs:restriction> 193 </xs:restriction>
194 </xs:simpleType> 194 </xs:simpleType>
195 </xs:attribute> 195 </xs:attribute>
196 </xs:complexType> 196 </xs:complexType>
197 </xs:element> 197 </xs:element>
198</xs:schema> \ No newline at end of file 198</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.3.xsd b/Prebuild/src/data/dnpb-1.3.xsd
index 5f8ada1..8f31a54 100644
--- a/Prebuild/src/data/dnpb-1.3.xsd
+++ b/Prebuild/src/data/dnpb-1.3.xsd
@@ -1,206 +1,206 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) 9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10 10
11 .NET Pre-Build is an XML-driven pre-build tool allowing developers to 11 .NET Pre-Build is an XML-driven pre-build tool allowing developers to
12 easily generate project or make files for major IDE's and .NET 12 easily generate project or make files for major IDE's and .NET
13 development tools including: Visual Studio 2003, Visual Studio 2002, 13 development tools including: Visual Studio 2003, Visual Studio 2002,
14 SharpDevelop, MonoDevelop, and NAnt. 14 SharpDevelop, MonoDevelop, and NAnt.
15 15
16 BSD License: 16 BSD License:
17 17
18 Redistribution and use in source and binary forms, with or without modification, are permitted 18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met: 19 provided that the following conditions are met:
20 20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions 21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer. 22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the 24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution. 25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software 26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission. 27 without specific prior written permission.
28 28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation> 36 </xs:documentation>
37 </xs:annotation> 37 </xs:annotation>
38 38
39 <xs:element name="DNPreBuild"> 39 <xs:element name="DNPreBuild">
40 <xs:complexType> 40 <xs:complexType>
41 <xs:sequence> 41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> 43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence> 44 </xs:sequence>
45 45
46 <xs:attribute name="version" use="required" /> 46 <xs:attribute name="version" use="required" />
47 </xs:complexType> 47 </xs:complexType>
48 </xs:element> 48 </xs:element>
49 49
50 <xs:element name="Process" type="xs:string" /> 50 <xs:element name="Process" type="xs:string" />
51 51
52 <xs:element name="Solution"> 52 <xs:element name="Solution">
53 <xs:complexType> 53 <xs:complexType>
54 <xs:sequence> 54 <xs:sequence>
55 <xs:element ref="Options" minOccurs="0" /> 55 <xs:element ref="Options" minOccurs="0" />
56 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 56 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
57 <xs:element ref="Files" minOccurs="0" /> 57 <xs:element ref="Files" minOccurs="0" />
58 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 58 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
59 </xs:sequence> 59 </xs:sequence>
60 60
61 <xs:attribute name="name" type="xs:string" use="required" /> 61 <xs:attribute name="name" type="xs:string" use="required" />
62 <xs:attribute name="path" type="xs:string" default="" /> 62 <xs:attribute name="path" type="xs:string" default="" />
63 </xs:complexType> 63 </xs:complexType>
64 </xs:element> 64 </xs:element>
65 65
66 <xs:element name="Project"> 66 <xs:element name="Project">
67 <xs:complexType> 67 <xs:complexType>
68 <xs:sequence> 68 <xs:sequence>
69 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> 69 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
70 70
71 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 71 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
72 72
73 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> 73 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
74 <xs:complexType> 74 <xs:complexType>
75 <xs:attribute name="name" type="xs:string" use="required" /> 75 <xs:attribute name="name" type="xs:string" use="required" />
76 <xs:attribute name="path" type="xs:string" /> 76 <xs:attribute name="path" type="xs:string" />
77 <xs:attribute name="localCopy" type="xs:boolean" /> 77 <xs:attribute name="localCopy" type="xs:boolean" />
78 <xs:attribute name="version" type="xs:string" /> 78 <xs:attribute name="version" type="xs:string" />
79 </xs:complexType> 79 </xs:complexType>
80 </xs:element> 80 </xs:element>
81 81
82 <xs:element ref="Files" /> 82 <xs:element ref="Files" />
83 </xs:sequence> 83 </xs:sequence>
84 84
85 <xs:attribute name="name" type="xs:string" use="required" /> 85 <xs:attribute name="name" type="xs:string" use="required" />
86 <xs:attribute name="path" type="xs:string" default="" /> 86 <xs:attribute name="path" type="xs:string" default="" />
87 <xs:attribute name="icon" type="xs:string" default="" /> 87 <xs:attribute name="icon" type="xs:string" default="" />
88 88
89 <xs:attribute name="language" default="C#"> 89 <xs:attribute name="language" default="C#">
90 <xs:simpleType> 90 <xs:simpleType>
91 <xs:restriction base="xs:string"> 91 <xs:restriction base="xs:string">
92 <xs:enumeration value="C#" /> 92 <xs:enumeration value="C#" />
93 <xs:enumeration value="VB.NET" /> 93 <xs:enumeration value="VB.NET" />
94 </xs:restriction> 94 </xs:restriction>
95 </xs:simpleType> 95 </xs:simpleType>
96 </xs:attribute> 96 </xs:attribute>
97 97
98 <xs:attribute name="type" default="Exe"> 98 <xs:attribute name="type" default="Exe">
99 <xs:simpleType> 99 <xs:simpleType>
100 <xs:restriction base="xs:string"> 100 <xs:restriction base="xs:string">
101 <xs:enumeration value="Exe" /> 101 <xs:enumeration value="Exe" />
102 <xs:enumeration value="WinExe" /> 102 <xs:enumeration value="WinExe" />
103 <xs:enumeration value="Library" /> 103 <xs:enumeration value="Library" />
104 </xs:restriction> 104 </xs:restriction>
105 </xs:simpleType> 105 </xs:simpleType>
106 </xs:attribute> 106 </xs:attribute>
107 107
108 <xs:attribute name="runtime" default="Microsoft"> 108 <xs:attribute name="runtime" default="Microsoft">
109 <xs:simpleType> 109 <xs:simpleType>
110 <xs:restriction base="xs:string"> 110 <xs:restriction base="xs:string">
111 <xs:enumeration value="Microsoft" /> 111 <xs:enumeration value="Microsoft" />
112 <xs:enumeration value="Mono" /> 112 <xs:enumeration value="Mono" />
113 </xs:restriction> 113 </xs:restriction>
114 </xs:simpleType> 114 </xs:simpleType>
115 </xs:attribute> 115 </xs:attribute>
116 116
117 <xs:attribute name="startupObject" type="xs:string" default="" /> 117 <xs:attribute name="startupObject" type="xs:string" default="" />
118 <xs:attribute name="rootNamespace" type="xs:string" /> 118 <xs:attribute name="rootNamespace" type="xs:string" />
119 <xs:attribute name="assemblyName" type="xs:string" /> 119 <xs:attribute name="assemblyName" type="xs:string" />
120 </xs:complexType> 120 </xs:complexType>
121 </xs:element> 121 </xs:element>
122 122
123 <xs:element name="Configuration"> 123 <xs:element name="Configuration">
124 <xs:complexType> 124 <xs:complexType>
125 <xs:all> 125 <xs:all>
126 <xs:element ref="Options" minOccurs="0" /> 126 <xs:element ref="Options" minOccurs="0" />
127 </xs:all> 127 </xs:all>
128 128
129 <xs:attribute name="name" type="xs:string" use="required" /> 129 <xs:attribute name="name" type="xs:string" use="required" />
130 </xs:complexType> 130 </xs:complexType>
131 </xs:element> 131 </xs:element>
132 132
133 <xs:element name="Options"> 133 <xs:element name="Options">
134 <xs:complexType> 134 <xs:complexType>
135 <xs:all> 135 <xs:all>
136 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 136 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
137 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 137 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
138 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 138 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
139 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 139 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
140 <xs:element name="WarningLevel" minOccurs="0"> 140 <xs:element name="WarningLevel" minOccurs="0">
141 <xs:simpleType> 141 <xs:simpleType>
142 <xs:restriction base="xs:integer"> 142 <xs:restriction base="xs:integer">
143 <xs:minInclusive value="0" /> 143 <xs:minInclusive value="0" />
144 <xs:maxInclusive value="4"/> 144 <xs:maxInclusive value="4"/>
145 </xs:restriction> 145 </xs:restriction>
146 </xs:simpleType> 146 </xs:simpleType>
147 </xs:element> 147 </xs:element>
148 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 148 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
149 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 149 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
150 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 150 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
151 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 151 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
152 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 152 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
153 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 153 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
154 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 154 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
155 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 155 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
156 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 156 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
157 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 157 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
158 </xs:all> 158 </xs:all>
159 </xs:complexType> 159 </xs:complexType>
160 </xs:element> 160 </xs:element>
161 161
162 <xs:element name="Files"> 162 <xs:element name="Files">
163 <xs:complexType> 163 <xs:complexType>
164 <xs:sequence> 164 <xs:sequence>
165 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 165 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
166 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 166 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
167 </xs:sequence> 167 </xs:sequence>
168 </xs:complexType> 168 </xs:complexType>
169 </xs:element> 169 </xs:element>
170 170
171 <xs:element name="File"> 171 <xs:element name="File">
172 <xs:complexType> 172 <xs:complexType>
173 <xs:simpleContent> 173 <xs:simpleContent>
174 <xs:extension base="xs:string"> 174 <xs:extension base="xs:string">
175 <xs:attribute name="buildAction" default="Compile"> 175 <xs:attribute name="buildAction" default="Compile">
176 <xs:simpleType> 176 <xs:simpleType>
177 <xs:restriction base="xs:string"> 177 <xs:restriction base="xs:string">
178 <xs:enumeration value="Compile" /> 178 <xs:enumeration value="Compile" />
179 <xs:enumeration value="Content" /> 179 <xs:enumeration value="Content" />
180 <xs:enumeration value="EmbeddedResource" /> 180 <xs:enumeration value="EmbeddedResource" />
181 </xs:restriction> 181 </xs:restriction>
182 </xs:simpleType> 182 </xs:simpleType>
183 </xs:attribute> 183 </xs:attribute>
184 </xs:extension> 184 </xs:extension>
185 </xs:simpleContent> 185 </xs:simpleContent>
186 </xs:complexType> 186 </xs:complexType>
187 </xs:element> 187 </xs:element>
188 188
189 <xs:element name="Match"> 189 <xs:element name="Match">
190 <xs:complexType> 190 <xs:complexType>
191 <xs:attribute name="path" type="xs:string" /> 191 <xs:attribute name="path" type="xs:string" />
192 <xs:attribute name="pattern" type="xs:string" use="required" /> 192 <xs:attribute name="pattern" type="xs:string" use="required" />
193 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 193 <xs:attribute name="recurse" type="xs:boolean" default="false" />
194 <xs:attribute name="useRegex" type="xs:boolean" default="false" /> 194 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
195 <xs:attribute name="buildAction" default="Compile"> 195 <xs:attribute name="buildAction" default="Compile">
196 <xs:simpleType> 196 <xs:simpleType>
197 <xs:restriction base="xs:string"> 197 <xs:restriction base="xs:string">
198 <xs:enumeration value="Compile" /> 198 <xs:enumeration value="Compile" />
199 <xs:enumeration value="Content" /> 199 <xs:enumeration value="Content" />
200 <xs:enumeration value="EmbeddedResource" /> 200 <xs:enumeration value="EmbeddedResource" />
201 </xs:restriction> 201 </xs:restriction>
202 </xs:simpleType> 202 </xs:simpleType>
203 </xs:attribute> 203 </xs:attribute>
204 </xs:complexType> 204 </xs:complexType>
205 </xs:element> 205 </xs:element>
206</xs:schema> \ No newline at end of file 206</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.4.xsd b/Prebuild/src/data/dnpb-1.4.xsd
index 54f9ac0..1da50fc 100644
--- a/Prebuild/src/data/dnpb-1.4.xsd
+++ b/Prebuild/src/data/dnpb-1.4.xsd
@@ -1,212 +1,212 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) 9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10 10
11 .NET Prebuild is a cross-platform XML-driven pre-build tool which 11 .NET Prebuild is a cross-platform XML-driven pre-build tool which
12 allows developers to easily generate project or make files for major 12 allows developers to easily generate project or make files for major
13 IDE's and .NET development tools including: Visual Studio .NET 2002 and 13 IDE's and .NET development tools including: Visual Studio .NET 2002 and
14 2003, SharpDevelop, MonoDevelop, and NAnt. 14 2003, SharpDevelop, MonoDevelop, and NAnt.
15 15
16 BSD License: 16 BSD License:
17 17
18 Redistribution and use in source and binary forms, with or without modification, are permitted 18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met: 19 provided that the following conditions are met:
20 20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions 21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer. 22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the 24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution. 25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software 26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission. 27 without specific prior written permission.
28 28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation> 36 </xs:documentation>
37 </xs:annotation> 37 </xs:annotation>
38 38
39 <xs:element name="DNPreBuild"> 39 <xs:element name="DNPreBuild">
40 <xs:complexType> 40 <xs:complexType>
41 <xs:sequence> 41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> 43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence> 44 </xs:sequence>
45 45
46 <xs:attribute name="version" /> 46 <xs:attribute name="version" />
47 <xs:attribute name="checkOsVars" /> 47 <xs:attribute name="checkOsVars" />
48 </xs:complexType> 48 </xs:complexType>
49 </xs:element> 49 </xs:element>
50 50
51 <xs:element name="Process" type="xs:string" /> 51 <xs:element name="Process" type="xs:string" />
52 52
53 <xs:element name="Solution"> 53 <xs:element name="Solution">
54 <xs:complexType> 54 <xs:complexType>
55 <xs:sequence> 55 <xs:sequence>
56 <xs:element ref="Options" minOccurs="0" /> 56 <xs:element ref="Options" minOccurs="0" />
57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
58 <xs:element ref="Files" minOccurs="0" /> 58 <xs:element ref="Files" minOccurs="0" />
59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
60 </xs:sequence> 60 </xs:sequence>
61 61
62 <xs:attribute name="name" type="xs:string" use="required" /> 62 <xs:attribute name="name" type="xs:string" use="required" />
63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> 63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
64 <xs:attribute name="path" type="xs:string" default="" /> 64 <xs:attribute name="path" type="xs:string" default="" />
65 </xs:complexType> 65 </xs:complexType>
66 </xs:element> 66 </xs:element>
67 67
68 <xs:element name="Project"> 68 <xs:element name="Project">
69 <xs:complexType> 69 <xs:complexType>
70 <xs:sequence> 70 <xs:sequence>
71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> 71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
72 72
73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
74 74
75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> 75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
76 <xs:complexType> 76 <xs:complexType>
77 <xs:attribute name="name" type="xs:string" use="required" /> 77 <xs:attribute name="name" type="xs:string" use="required" />
78 <xs:attribute name="path" type="xs:string" /> 78 <xs:attribute name="path" type="xs:string" />
79 <xs:attribute name="localCopy" type="xs:boolean" /> 79 <xs:attribute name="localCopy" type="xs:boolean" />
80 <xs:attribute name="version" type="xs:string" /> 80 <xs:attribute name="version" type="xs:string" />
81 </xs:complexType> 81 </xs:complexType>
82 </xs:element> 82 </xs:element>
83 83
84 <xs:element ref="Files" /> 84 <xs:element ref="Files" />
85 </xs:sequence> 85 </xs:sequence>
86 86
87 <xs:attribute name="name" type="xs:string" use="required" /> 87 <xs:attribute name="name" type="xs:string" use="required" />
88 <xs:attribute name="path" type="xs:string" default="" /> 88 <xs:attribute name="path" type="xs:string" default="" />
89 <xs:attribute name="icon" type="xs:string" default="" /> 89 <xs:attribute name="icon" type="xs:string" default="" />
90 90
91 <xs:attribute name="language" default="C#"> 91 <xs:attribute name="language" default="C#">
92 <xs:simpleType> 92 <xs:simpleType>
93 <xs:restriction base="xs:string"> 93 <xs:restriction base="xs:string">
94 <xs:enumeration value="C#" /> 94 <xs:enumeration value="C#" />
95 <xs:enumeration value="VB.NET" /> 95 <xs:enumeration value="VB.NET" />
96 </xs:restriction> 96 </xs:restriction>
97 </xs:simpleType> 97 </xs:simpleType>
98 </xs:attribute> 98 </xs:attribute>
99 99
100 <xs:attribute name="type" default="Exe"> 100 <xs:attribute name="type" default="Exe">
101 <xs:simpleType> 101 <xs:simpleType>
102 <xs:restriction base="xs:string"> 102 <xs:restriction base="xs:string">
103 <xs:enumeration value="Exe" /> 103 <xs:enumeration value="Exe" />
104 <xs:enumeration value="WinExe" /> 104 <xs:enumeration value="WinExe" />
105 <xs:enumeration value="Library" /> 105 <xs:enumeration value="Library" />
106 </xs:restriction> 106 </xs:restriction>
107 </xs:simpleType> 107 </xs:simpleType>
108 </xs:attribute> 108 </xs:attribute>
109 109
110 <xs:attribute name="runtime" default="Microsoft"> 110 <xs:attribute name="runtime" default="Microsoft">
111 <xs:simpleType> 111 <xs:simpleType>
112 <xs:restriction base="xs:string"> 112 <xs:restriction base="xs:string">
113 <xs:enumeration value="Microsoft" /> 113 <xs:enumeration value="Microsoft" />
114 <xs:enumeration value="Mono" /> 114 <xs:enumeration value="Mono" />
115 </xs:restriction> 115 </xs:restriction>
116 </xs:simpleType> 116 </xs:simpleType>
117 </xs:attribute> 117 </xs:attribute>
118 118
119 <xs:attribute name="startupObject" type="xs:string" default="" /> 119 <xs:attribute name="startupObject" type="xs:string" default="" />
120 <xs:attribute name="rootNamespace" type="xs:string" /> 120 <xs:attribute name="rootNamespace" type="xs:string" />
121 <xs:attribute name="assemblyName" type="xs:string" /> 121 <xs:attribute name="assemblyName" type="xs:string" />
122 </xs:complexType> 122 </xs:complexType>
123 </xs:element> 123 </xs:element>
124 124
125 <xs:element name="Configuration"> 125 <xs:element name="Configuration">
126 <xs:complexType> 126 <xs:complexType>
127 <xs:sequence> 127 <xs:sequence>
128 <xs:element ref="Options" minOccurs="0" /> 128 <xs:element ref="Options" minOccurs="0" />
129 </xs:sequence> 129 </xs:sequence>
130 130
131 <xs:attribute name="name" type="xs:string" use="required" /> 131 <xs:attribute name="name" type="xs:string" use="required" />
132 </xs:complexType> 132 </xs:complexType>
133 </xs:element> 133 </xs:element>
134 134
135 <xs:element name="Options"> 135 <xs:element name="Options">
136 <xs:complexType> 136 <xs:complexType>
137 <xs:all> 137 <xs:all>
138 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 138 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
139 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 139 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
140 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 140 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
141 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 141 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
142 <xs:element name="WarningLevel" minOccurs="0"> 142 <xs:element name="WarningLevel" minOccurs="0">
143 <xs:simpleType> 143 <xs:simpleType>
144 <xs:restriction base="xs:integer"> 144 <xs:restriction base="xs:integer">
145 <xs:minInclusive value="0" /> 145 <xs:minInclusive value="0" />
146 <xs:maxInclusive value="4"/> 146 <xs:maxInclusive value="4"/>
147 </xs:restriction> 147 </xs:restriction>
148 </xs:simpleType> 148 </xs:simpleType>
149 </xs:element> 149 </xs:element>
150 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 150 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
151 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 151 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
152 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 152 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
153 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 153 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
154 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 154 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
155 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 155 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
156 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 156 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
157 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 157 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
158 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 158 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
159 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 159 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
160 </xs:all> 160 </xs:all>
161 </xs:complexType> 161 </xs:complexType>
162 </xs:element> 162 </xs:element>
163 163
164 <xs:element name="Files"> 164 <xs:element name="Files">
165 <xs:complexType> 165 <xs:complexType>
166 <xs:sequence> 166 <xs:sequence>
167 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 167 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
168 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 168 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
169 </xs:sequence> 169 </xs:sequence>
170 </xs:complexType> 170 </xs:complexType>
171 </xs:element> 171 </xs:element>
172 172
173 <xs:element name="File"> 173 <xs:element name="File">
174 <xs:complexType> 174 <xs:complexType>
175 <xs:simpleContent> 175 <xs:simpleContent>
176 <xs:extension base="xs:string"> 176 <xs:extension base="xs:string">
177 <xs:attribute name="buildAction" default="Compile"> 177 <xs:attribute name="buildAction" default="Compile">
178 <xs:simpleType> 178 <xs:simpleType>
179 <xs:restriction base="xs:string"> 179 <xs:restriction base="xs:string">
180 <xs:enumeration value="None" /> 180 <xs:enumeration value="None" />
181 <xs:enumeration value="Compile" /> 181 <xs:enumeration value="Compile" />
182 <xs:enumeration value="Content" /> 182 <xs:enumeration value="Content" />
183 <xs:enumeration value="EmbeddedResource" /> 183 <xs:enumeration value="EmbeddedResource" />
184 </xs:restriction> 184 </xs:restriction>
185 </xs:simpleType> 185 </xs:simpleType>
186 </xs:attribute> 186 </xs:attribute>
187 </xs:extension> 187 </xs:extension>
188 </xs:simpleContent> 188 </xs:simpleContent>
189 </xs:complexType> 189 </xs:complexType>
190 </xs:element> 190 </xs:element>
191 191
192 <xs:element name="Match"> 192 <xs:element name="Match">
193 <xs:complexType> 193 <xs:complexType>
194 <xs:attribute name="path" type="xs:string" /> 194 <xs:attribute name="path" type="xs:string" />
195 <xs:attribute name="pattern" type="xs:string" use="required" /> 195 <xs:attribute name="pattern" type="xs:string" use="required" />
196 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 196 <xs:attribute name="recurse" type="xs:boolean" default="false" />
197 <xs:attribute name="useRegex" type="xs:boolean" default="false" /> 197 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
198 <xs:attribute name="buildAction" default="Compile"> 198 <xs:attribute name="buildAction" default="Compile">
199 <xs:simpleType> 199 <xs:simpleType>
200 <xs:restriction base="xs:string"> 200 <xs:restriction base="xs:string">
201 <xs:enumeration value="None" /> 201 <xs:enumeration value="None" />
202 <xs:enumeration value="Compile" /> 202 <xs:enumeration value="Compile" />
203 <xs:enumeration value="Content" /> 203 <xs:enumeration value="Content" />
204 <xs:enumeration value="EmbeddedResource" /> 204 <xs:enumeration value="EmbeddedResource" />
205 </xs:restriction> 205 </xs:restriction>
206 </xs:simpleType> 206 </xs:simpleType>
207 </xs:attribute> 207 </xs:attribute>
208 </xs:complexType> 208 </xs:complexType>
209 </xs:element> 209 </xs:element>
210</xs:schema> 210</xs:schema>
211 211
212 212
diff --git a/Prebuild/src/data/dnpb-1.5.xsd b/Prebuild/src/data/dnpb-1.5.xsd
index 2270e83..e2b21f0 100644
--- a/Prebuild/src/data/dnpb-1.5.xsd
+++ b/Prebuild/src/data/dnpb-1.5.xsd
@@ -1,215 +1,215 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" 2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema" 3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd" 4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd" 5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd"
6> 6>
7 <xs:annotation> 7 <xs:annotation>
8 <xs:documentation> 8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) 9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10 10
11 .NET Prebuild is a cross-platform XML-driven pre-build tool which 11 .NET Prebuild is a cross-platform XML-driven pre-build tool which
12 allows developers to easily generate project or make files for major 12 allows developers to easily generate project or make files for major
13 IDE's and .NET development tools including: Visual Studio .NET 2002 and 13 IDE's and .NET development tools including: Visual Studio .NET 2002 and
14 2003, SharpDevelop, MonoDevelop, and NAnt. 14 2003, SharpDevelop, MonoDevelop, and NAnt.
15 15
16 BSD License: 16 BSD License:
17 17
18 Redistribution and use in source and binary forms, with or without modification, are permitted 18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met: 19 provided that the following conditions are met:
20 20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions 21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer. 22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the 24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution. 25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software 26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission. 27 without specific prior written permission.
28 28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation> 36 </xs:documentation>
37 </xs:annotation> 37 </xs:annotation>
38 38
39 <xs:element name="DNPreBuild"> 39 <xs:element name="DNPreBuild">
40 <xs:complexType> 40 <xs:complexType>
41 <xs:sequence> 41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> 43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence> 44 </xs:sequence>
45 45
46 <xs:attribute name="version" /> 46 <xs:attribute name="version" />
47 <xs:attribute name="checkOsVars" /> 47 <xs:attribute name="checkOsVars" />
48 </xs:complexType> 48 </xs:complexType>
49 </xs:element> 49 </xs:element>
50 50
51 <xs:element name="Process" type="xs:string" /> 51 <xs:element name="Process" type="xs:string" />
52 52
53 <xs:element name="Solution"> 53 <xs:element name="Solution">
54 <xs:complexType> 54 <xs:complexType>
55 <xs:sequence> 55 <xs:sequence>
56 <xs:element ref="Options" minOccurs="0" /> 56 <xs:element ref="Options" minOccurs="0" />
57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
58 <xs:element ref="Files" minOccurs="0" /> 58 <xs:element ref="Files" minOccurs="0" />
59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
60 </xs:sequence> 60 </xs:sequence>
61 61
62 <xs:attribute name="name" type="xs:string" use="required" /> 62 <xs:attribute name="name" type="xs:string" use="required" />
63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> 63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
64 <xs:attribute name="path" type="xs:string" default="" /> 64 <xs:attribute name="path" type="xs:string" default="" />
65 </xs:complexType> 65 </xs:complexType>
66 </xs:element> 66 </xs:element>
67 67
68 <xs:element name="Project"> 68 <xs:element name="Project">
69 <xs:complexType> 69 <xs:complexType>
70 <xs:sequence> 70 <xs:sequence>
71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> 71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
72 72
73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
74 74
75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> 75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
76 <xs:complexType> 76 <xs:complexType>
77 <xs:attribute name="name" type="xs:string" use="required" /> 77 <xs:attribute name="name" type="xs:string" use="required" />
78 <xs:attribute name="path" type="xs:string" /> 78 <xs:attribute name="path" type="xs:string" />
79 <xs:attribute name="localCopy" type="xs:boolean" /> 79 <xs:attribute name="localCopy" type="xs:boolean" />
80 <xs:attribute name="version" type="xs:string" /> 80 <xs:attribute name="version" type="xs:string" />
81 </xs:complexType> 81 </xs:complexType>
82 </xs:element> 82 </xs:element>
83 83
84 <xs:element ref="Files" /> 84 <xs:element ref="Files" />
85 </xs:sequence> 85 </xs:sequence>
86 86
87 <xs:attribute name="name" type="xs:string" use="required" /> 87 <xs:attribute name="name" type="xs:string" use="required" />
88 <xs:attribute name="filterGroups" type="xs:string" default="" /> 88 <xs:attribute name="filterGroups" type="xs:string" default="" />
89 <xs:attribute name="path" type="xs:string" default="" /> 89 <xs:attribute name="path" type="xs:string" default="" />
90 <xs:attribute name="icon" type="xs:string" default="" /> 90 <xs:attribute name="icon" type="xs:string" default="" />
91 91
92 <xs:attribute name="language" default="C#"> 92 <xs:attribute name="language" default="C#">
93 <xs:simpleType> 93 <xs:simpleType>
94 <xs:restriction base="xs:string"> 94 <xs:restriction base="xs:string">
95 <xs:enumeration value="C#" /> 95 <xs:enumeration value="C#" />
96 <xs:enumeration value="VB.NET" /> 96 <xs:enumeration value="VB.NET" />
97 </xs:restriction> 97 </xs:restriction>
98 </xs:simpleType> 98 </xs:simpleType>
99 </xs:attribute> 99 </xs:attribute>
100 100
101 <xs:attribute name="type" default="Exe"> 101 <xs:attribute name="type" default="Exe">
102 <xs:simpleType> 102 <xs:simpleType>
103 <xs:restriction base="xs:string"> 103 <xs:restriction base="xs:string">
104 <xs:enumeration value="Exe" /> 104 <xs:enumeration value="Exe" />
105 <xs:enumeration value="WinExe" /> 105 <xs:enumeration value="WinExe" />
106 <xs:enumeration value="Library" /> 106 <xs:enumeration value="Library" />
107 </xs:restriction> 107 </xs:restriction>
108 </xs:simpleType> 108 </xs:simpleType>
109 </xs:attribute> 109 </xs:attribute>
110 110
111 <xs:attribute name="runtime" default="Microsoft"> 111 <xs:attribute name="runtime" default="Microsoft">
112 <xs:simpleType> 112 <xs:simpleType>
113 <xs:restriction base="xs:string"> 113 <xs:restriction base="xs:string">
114 <xs:enumeration value="Microsoft" /> 114 <xs:enumeration value="Microsoft" />
115 <xs:enumeration value="Mono" /> 115 <xs:enumeration value="Mono" />
116 </xs:restriction> 116 </xs:restriction>
117 </xs:simpleType> 117 </xs:simpleType>
118 </xs:attribute> 118 </xs:attribute>
119 119
120 <xs:attribute name="startupObject" type="xs:string" default="" /> 120 <xs:attribute name="startupObject" type="xs:string" default="" />
121 <xs:attribute name="rootNamespace" type="xs:string" /> 121 <xs:attribute name="rootNamespace" type="xs:string" />
122 <xs:attribute name="assemblyName" type="xs:string" /> 122 <xs:attribute name="assemblyName" type="xs:string" />
123 </xs:complexType> 123 </xs:complexType>
124 </xs:element> 124 </xs:element>
125 125
126 <xs:element name="Configuration"> 126 <xs:element name="Configuration">
127 <xs:complexType> 127 <xs:complexType>
128 <xs:sequence> 128 <xs:sequence>
129 <xs:element ref="Options" minOccurs="0" /> 129 <xs:element ref="Options" minOccurs="0" />
130 </xs:sequence> 130 </xs:sequence>
131 131
132 <xs:attribute name="name" type="xs:string" use="required" /> 132 <xs:attribute name="name" type="xs:string" use="required" />
133 </xs:complexType> 133 </xs:complexType>
134 </xs:element> 134 </xs:element>
135 135
136 <xs:element name="Options"> 136 <xs:element name="Options">
137 <xs:complexType> 137 <xs:complexType>
138 <xs:all> 138 <xs:all>
139 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 139 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
140 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 140 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
141 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 141 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
142 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 142 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
143 <xs:element name="WarningLevel" minOccurs="0"> 143 <xs:element name="WarningLevel" minOccurs="0">
144 <xs:simpleType> 144 <xs:simpleType>
145 <xs:restriction base="xs:integer"> 145 <xs:restriction base="xs:integer">
146 <xs:minInclusive value="0" /> 146 <xs:minInclusive value="0" />
147 <xs:maxInclusive value="4"/> 147 <xs:maxInclusive value="4"/>
148 </xs:restriction> 148 </xs:restriction>
149 </xs:simpleType> 149 </xs:simpleType>
150 </xs:element> 150 </xs:element>
151 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 151 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
152 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" /> 152 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
153 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 153 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
154 <xs:element name="GenerateXmlDocFile" type="xs:boolean" minOccurs="0" /> 154 <xs:element name="GenerateXmlDocFile" type="xs:boolean" minOccurs="0" />
155 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 155 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
156 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 156 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
157 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" /> 157 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
158 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> 158 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
159 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 159 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
160 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 160 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
161 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 161 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
162 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 162 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
163 </xs:all> 163 </xs:all>
164 </xs:complexType> 164 </xs:complexType>
165 </xs:element> 165 </xs:element>
166 166
167 <xs:element name="Files"> 167 <xs:element name="Files">
168 <xs:complexType> 168 <xs:complexType>
169 <xs:sequence> 169 <xs:sequence>
170 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 170 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
171 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 171 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
172 </xs:sequence> 172 </xs:sequence>
173 </xs:complexType> 173 </xs:complexType>
174 </xs:element> 174 </xs:element>
175 175
176 <xs:element name="File"> 176 <xs:element name="File">
177 <xs:complexType> 177 <xs:complexType>
178 <xs:simpleContent> 178 <xs:simpleContent>
179 <xs:extension base="xs:string"> 179 <xs:extension base="xs:string">
180 <xs:attribute name="buildAction" default="Compile"> 180 <xs:attribute name="buildAction" default="Compile">
181 <xs:simpleType> 181 <xs:simpleType>
182 <xs:restriction base="xs:string"> 182 <xs:restriction base="xs:string">
183 <xs:enumeration value="None" /> 183 <xs:enumeration value="None" />
184 <xs:enumeration value="Compile" /> 184 <xs:enumeration value="Compile" />
185 <xs:enumeration value="Content" /> 185 <xs:enumeration value="Content" />
186 <xs:enumeration value="EmbeddedResource" /> 186 <xs:enumeration value="EmbeddedResource" />
187 </xs:restriction> 187 </xs:restriction>
188 </xs:simpleType> 188 </xs:simpleType>
189 </xs:attribute> 189 </xs:attribute>
190 </xs:extension> 190 </xs:extension>
191 </xs:simpleContent> 191 </xs:simpleContent>
192 </xs:complexType> 192 </xs:complexType>
193 </xs:element> 193 </xs:element>
194 194
195 <xs:element name="Match"> 195 <xs:element name="Match">
196 <xs:complexType> 196 <xs:complexType>
197 <xs:attribute name="path" type="xs:string" /> 197 <xs:attribute name="path" type="xs:string" />
198 <xs:attribute name="pattern" type="xs:string" use="required" /> 198 <xs:attribute name="pattern" type="xs:string" use="required" />
199 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 199 <xs:attribute name="recurse" type="xs:boolean" default="false" />
200 <xs:attribute name="useRegex" type="xs:boolean" default="false" /> 200 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
201 <xs:attribute name="buildAction" default="Compile"> 201 <xs:attribute name="buildAction" default="Compile">
202 <xs:simpleType> 202 <xs:simpleType>
203 <xs:restriction base="xs:string"> 203 <xs:restriction base="xs:string">
204 <xs:enumeration value="None" /> 204 <xs:enumeration value="None" />
205 <xs:enumeration value="Compile" /> 205 <xs:enumeration value="Compile" />
206 <xs:enumeration value="Content" /> 206 <xs:enumeration value="Content" />
207 <xs:enumeration value="EmbeddedResource" /> 207 <xs:enumeration value="EmbeddedResource" />
208 </xs:restriction> 208 </xs:restriction>
209 </xs:simpleType> 209 </xs:simpleType>
210 </xs:attribute> 210 </xs:attribute>
211 </xs:complexType> 211 </xs:complexType>
212 </xs:element> 212 </xs:element>
213</xs:schema> 213</xs:schema>
214 214
215 215
diff --git a/Prebuild/src/data/prebuild-1.6.xsd b/Prebuild/src/data/prebuild-1.6.xsd
index f944faf..57ebd2e 100644
--- a/Prebuild/src/data/prebuild-1.6.xsd
+++ b/Prebuild/src/data/prebuild-1.6.xsd
@@ -1,231 +1,231 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" 2<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"
3 xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> 3 xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
4 <xs:annotation> 4 <xs:annotation>
5 <xs:documentation> 5 <xs:documentation>
6 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) 6 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
7 7
8 .NET Prebuild is a cross-platform XML-driven pre-build tool which 8 .NET Prebuild is a cross-platform XML-driven pre-build tool which
9 allows developers to easily generate project or make files for major 9 allows developers to easily generate project or make files for major
10 IDE's and .NET development tools including: Visual Studio .NET 2002 and 10 IDE's and .NET development tools including: Visual Studio .NET 2002 and
11 2003, SharpDevelop, MonoDevelop, and NAnt. 11 2003, SharpDevelop, MonoDevelop, and NAnt.
12 12
13 BSD License: 13 BSD License:
14 14
15 Redistribution and use in source and binary forms, with or without modification, are permitted 15 Redistribution and use in source and binary forms, with or without modification, are permitted
16 provided that the following conditions are met: 16 provided that the following conditions are met:
17 17
18 * Redistributions of source code must retain the above copyright notice, this list of conditions 18 * Redistributions of source code must retain the above copyright notice, this list of conditions
19 and the following disclaimer. 19 and the following disclaimer.
20 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 20 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
21 and the following disclaimer in the documentation and/or other materials provided with the 21 and the following disclaimer in the documentation and/or other materials provided with the
22 distribution. 22 distribution.
23 * The name of the author may not be used to endorse or promote products derived from this software 23 * The name of the author may not be used to endorse or promote products derived from this software
24 without specific prior written permission. 24 without specific prior written permission.
25 25
26 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 26 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
27 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 30 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
31 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 31 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 </xs:documentation> 33 </xs:documentation>
34 </xs:annotation> 34 </xs:annotation>
35 <xs:element name="Prebuild"> 35 <xs:element name="Prebuild">
36 <xs:complexType> 36 <xs:complexType>
37 <xs:sequence> 37 <xs:sequence>
38 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> 38 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
39 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> 39 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
40 </xs:sequence> 40 </xs:sequence>
41 <xs:attribute name="version" /> 41 <xs:attribute name="version" />
42 <xs:attribute name="checkOsVars" /> 42 <xs:attribute name="checkOsVars" />
43 </xs:complexType> 43 </xs:complexType>
44 </xs:element> 44 </xs:element>
45 <xs:element name="Process" type="xs:string" /> 45 <xs:element name="Process" type="xs:string" />
46 <xs:element name="Solution"> 46 <xs:element name="Solution">
47 <xs:complexType> 47 <xs:complexType>
48 <xs:sequence> 48 <xs:sequence>
49 <xs:element ref="Options" minOccurs="0" /> 49 <xs:element ref="Options" minOccurs="0" />
50 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> 50 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
51 <xs:element ref="Files" minOccurs="0" /> 51 <xs:element ref="Files" minOccurs="0" />
52 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" /> 52 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
53 </xs:sequence> 53 </xs:sequence>
54 <xs:attribute name="name" type="xs:string" use="required" /> 54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> 55 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
56 <xs:attribute name="path" type="xs:string" default="" /> 56 <xs:attribute name="path" type="xs:string" default="" />
57 </xs:complexType> 57 </xs:complexType>
58 </xs:element> 58 </xs:element>
59 <xs:element name="Project"> 59 <xs:element name="Project">
60 <xs:complexType> 60 <xs:complexType>
61 <xs:sequence> 61 <xs:sequence>
62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" /> 62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
63 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 63 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
64 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> 64 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
65 <xs:complexType> 65 <xs:complexType>
66 <xs:attribute name="name" type="xs:string" use="required" /> 66 <xs:attribute name="name" type="xs:string" use="required" />
67 <xs:attribute name="path" type="xs:string" /> 67 <xs:attribute name="path" type="xs:string" />
68 <xs:attribute name="localCopy" type="xs:boolean" /> 68 <xs:attribute name="localCopy" type="xs:boolean" />
69 <xs:attribute name="version" type="xs:string" /> 69 <xs:attribute name="version" type="xs:string" />
70 </xs:complexType> 70 </xs:complexType>
71 </xs:element> 71 </xs:element>
72 <xs:element ref="Files" /> 72 <xs:element ref="Files" />
73 </xs:sequence> 73 </xs:sequence>
74 <xs:attribute name="name" type="xs:string" use="required" /> 74 <xs:attribute name="name" type="xs:string" use="required" />
75 <xs:attribute name="filterGroups" type="xs:string" default="" /> 75 <xs:attribute name="filterGroups" type="xs:string" default="" />
76 <xs:attribute name="path" type="xs:string" default="" /> 76 <xs:attribute name="path" type="xs:string" default="" />
77 <xs:attribute name="icon" type="xs:string" default="" /> 77 <xs:attribute name="icon" type="xs:string" default="" />
78 <xs:attribute name="language" default="C#"> 78 <xs:attribute name="language" default="C#">
79 <xs:simpleType> 79 <xs:simpleType>
80 <xs:restriction base="xs:string"> 80 <xs:restriction base="xs:string">
81 <xs:enumeration value="C#" /> 81 <xs:enumeration value="C#" />
82 <xs:enumeration value="VB.NET" /> 82 <xs:enumeration value="VB.NET" />
83 </xs:restriction> 83 </xs:restriction>
84 </xs:simpleType> 84 </xs:simpleType>
85 </xs:attribute> 85 </xs:attribute>
86 <xs:attribute name="type" default="Exe"> 86 <xs:attribute name="type" default="Exe">
87 <xs:simpleType> 87 <xs:simpleType>
88 <xs:restriction base="xs:string"> 88 <xs:restriction base="xs:string">
89 <xs:enumeration value="Exe" /> 89 <xs:enumeration value="Exe" />
90 <xs:enumeration value="WinExe" /> 90 <xs:enumeration value="WinExe" />
91 <xs:enumeration value="Library" /> 91 <xs:enumeration value="Library" />
92 </xs:restriction> 92 </xs:restriction>
93 </xs:simpleType> 93 </xs:simpleType>
94 </xs:attribute> 94 </xs:attribute>
95 <xs:attribute name="runtime" default="Microsoft"> 95 <xs:attribute name="runtime" default="Microsoft">
96 <xs:simpleType> 96 <xs:simpleType>
97 <xs:restriction base="xs:string"> 97 <xs:restriction base="xs:string">
98 <xs:enumeration value="Microsoft" /> 98 <xs:enumeration value="Microsoft" />
99 <xs:enumeration value="Mono" /> 99 <xs:enumeration value="Mono" />
100 </xs:restriction> 100 </xs:restriction>
101 </xs:simpleType> 101 </xs:simpleType>
102 </xs:attribute> 102 </xs:attribute>
103 <xs:attribute name="startupObject" type="xs:string" default="" /> 103 <xs:attribute name="startupObject" type="xs:string" default="" />
104 <xs:attribute name="rootNamespace" type="xs:string" /> 104 <xs:attribute name="rootNamespace" type="xs:string" />
105 <xs:attribute name="assemblyName" type="xs:string" /> 105 <xs:attribute name="assemblyName" type="xs:string" />
106 </xs:complexType> 106 </xs:complexType>
107 </xs:element> 107 </xs:element>
108 <xs:element name="Configuration"> 108 <xs:element name="Configuration">
109 <xs:complexType> 109 <xs:complexType>
110 <xs:sequence> 110 <xs:sequence>
111 <xs:element ref="Options" minOccurs="0" /> 111 <xs:element ref="Options" minOccurs="0" />
112 </xs:sequence> 112 </xs:sequence>
113 <xs:attribute name="name" type="xs:string" use="required" /> 113 <xs:attribute name="name" type="xs:string" use="required" />
114 </xs:complexType> 114 </xs:complexType>
115 </xs:element> 115 </xs:element>
116 <xs:element name="Options"> 116 <xs:element name="Options">
117 <xs:complexType> 117 <xs:complexType>
118 <xs:all> 118 <xs:all>
119 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> 119 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
120 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> 120 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
121 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> 121 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
122 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> 122 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
123 <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> 123 <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
124 <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> 124 <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
125 <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> 125 <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
126 <xs:simpleType> 126 <xs:simpleType>
127 <xs:restriction base="xs:string"> 127 <xs:restriction base="xs:string">
128 <xs:enumeration value="OnBuildSuccess" /> 128 <xs:enumeration value="OnBuildSuccess" />
129 <xs:enumeration value="Always" /> 129 <xs:enumeration value="Always" />
130 <xs:enumeration value="OnOutputUpdated" /> 130 <xs:enumeration value="OnOutputUpdated" />
131 </xs:restriction> 131 </xs:restriction>
132 </xs:simpleType> 132 </xs:simpleType>
133 </xs:element> 133 </xs:element>
134 <xs:element name="RunScript" type="xs:string" minOccurs="0" /> 134 <xs:element name="RunScript" type="xs:string" minOccurs="0" />
135 <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> 135 <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
136 <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> 136 <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
137 <xs:element name="WarningLevel" minOccurs="0"> 137 <xs:element name="WarningLevel" minOccurs="0">
138 <xs:simpleType> 138 <xs:simpleType>
139 <xs:restriction base="xs:integer"> 139 <xs:restriction base="xs:integer">
140 <xs:minInclusive value="0" /> 140 <xs:minInclusive value="0" />
141 <xs:maxInclusive value="4" /> 141 <xs:maxInclusive value="4" />
142 </xs:restriction> 142 </xs:restriction>
143 </xs:simpleType> 143 </xs:simpleType>
144 </xs:element> 144 </xs:element>
145 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> 145 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
146 <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> 146 <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
147 <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> 147 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
148 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> 148 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
149 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> 149 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
150 <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> 150 <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
151 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> 151 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
152 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> 152 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
153 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> 153 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
154 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> 154 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
155 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> 155 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
156 </xs:all> 156 </xs:all>
157 </xs:complexType> 157 </xs:complexType>
158 </xs:element> 158 </xs:element>
159 <xs:element name="Files"> 159 <xs:element name="Files">
160 <xs:complexType> 160 <xs:complexType>
161 <xs:sequence> 161 <xs:sequence>
162 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> 162 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
163 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> 163 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
164 </xs:sequence> 164 </xs:sequence>
165 </xs:complexType> 165 </xs:complexType>
166 </xs:element> 166 </xs:element>
167 <xs:element name="File"> 167 <xs:element name="File">
168 <xs:complexType> 168 <xs:complexType>
169 <xs:simpleContent> 169 <xs:simpleContent>
170 <xs:extension base="xs:string"> 170 <xs:extension base="xs:string">
171 <xs:attribute name="buildAction" default="Compile"> 171 <xs:attribute name="buildAction" default="Compile">
172 <xs:simpleType> 172 <xs:simpleType>
173 <xs:restriction base="xs:string"> 173 <xs:restriction base="xs:string">
174 <xs:enumeration value="None" /> 174 <xs:enumeration value="None" />
175 <xs:enumeration value="Compile" /> 175 <xs:enumeration value="Compile" />
176 <xs:enumeration value="Content" /> 176 <xs:enumeration value="Content" />
177 <xs:enumeration value="EmbeddedResource" /> 177 <xs:enumeration value="EmbeddedResource" />
178 </xs:restriction> 178 </xs:restriction>
179 </xs:simpleType> 179 </xs:simpleType>
180 </xs:attribute> 180 </xs:attribute>
181 <xs:attribute name="subType" default="Code"> 181 <xs:attribute name="subType" default="Code">
182 <xs:simpleType> 182 <xs:simpleType>
183 <xs:restriction base="xs:string"> 183 <xs:restriction base="xs:string">
184 <xs:enumeration value="Code" /> 184 <xs:enumeration value="Code" />
185 <xs:enumeration value="Component" /> 185 <xs:enumeration value="Component" />
186 <xs:enumeration value="Form" /> 186 <xs:enumeration value="Form" />
187 <xs:enumeration value="UserControl" /> 187 <xs:enumeration value="UserControl" />
188 </xs:restriction> 188 </xs:restriction>
189 </xs:simpleType> 189 </xs:simpleType>
190 </xs:attribute> 190 </xs:attribute>
191 </xs:extension> 191 </xs:extension>
192 </xs:simpleContent> 192 </xs:simpleContent>
193 </xs:complexType> 193 </xs:complexType>
194 </xs:element> 194 </xs:element>
195 <xs:element name="Match"> 195 <xs:element name="Match">
196 <xs:complexType> 196 <xs:complexType>
197 <xs:sequence> 197 <xs:sequence>
198 <xs:element ref="Exclude" minOccurs="0" /> 198 <xs:element ref="Exclude" minOccurs="0" />
199 </xs:sequence> 199 </xs:sequence>
200 <xs:attribute name="path" type="xs:string" /> 200 <xs:attribute name="path" type="xs:string" />
201 <xs:attribute name="pattern" type="xs:string" use="required" /> 201 <xs:attribute name="pattern" type="xs:string" use="required" />
202 <xs:attribute name="recurse" type="xs:boolean" default="false" /> 202 <xs:attribute name="recurse" type="xs:boolean" default="false" />
203 <xs:attribute name="useRegex" type="xs:boolean" default="false" /> 203 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
204 <xs:attribute name="buildAction" default="Compile"> 204 <xs:attribute name="buildAction" default="Compile">
205 <xs:simpleType> 205 <xs:simpleType>
206 <xs:restriction base="xs:string"> 206 <xs:restriction base="xs:string">
207 <xs:enumeration value="None" /> 207 <xs:enumeration value="None" />
208 <xs:enumeration value="Compile" /> 208 <xs:enumeration value="Compile" />
209 <xs:enumeration value="Content" /> 209 <xs:enumeration value="Content" />
210 <xs:enumeration value="EmbeddedResource" /> 210 <xs:enumeration value="EmbeddedResource" />
211 </xs:restriction> 211 </xs:restriction>
212 </xs:simpleType> 212 </xs:simpleType>
213 </xs:attribute> 213 </xs:attribute>
214 <xs:attribute name="subType" default="Code"> 214 <xs:attribute name="subType" default="Code">
215 <xs:simpleType> 215 <xs:simpleType>
216 <xs:restriction base="xs:string"> 216 <xs:restriction base="xs:string">
217 <xs:enumeration value="Code" /> 217 <xs:enumeration value="Code" />
218 <xs:enumeration value="Component" /> 218 <xs:enumeration value="Component" />
219 <xs:enumeration value="Form" /> 219 <xs:enumeration value="Form" />
220 <xs:enumeration value="UserControl" /> 220 <xs:enumeration value="UserControl" />
221 </xs:restriction> 221 </xs:restriction>
222 </xs:simpleType> 222 </xs:simpleType>
223 </xs:attribute> 223 </xs:attribute>
224 </xs:complexType> 224 </xs:complexType>
225 </xs:element> 225 </xs:element>
226 <xs:element name="Exclude"> 226 <xs:element name="Exclude">
227 <xs:complexType> 227 <xs:complexType>
228 <xs:attribute name="name" type="xs:string" use="required" /> 228 <xs:attribute name="name" type="xs:string" use="required" />
229 </xs:complexType> 229 </xs:complexType>
230 </xs:element> 230 </xs:element>
231</xs:schema> 231</xs:schema>
diff --git a/ThirdPartyLicenses/Axiom.txt b/ThirdPartyLicenses/Axiom.txt
index af4e9cd..fe97db2 100644
--- a/ThirdPartyLicenses/Axiom.txt
+++ b/ThirdPartyLicenses/Axiom.txt
@@ -1,141 +1,141 @@
1GNU LESSER GENERAL PUBLIC LICENSE 1GNU LESSER GENERAL PUBLIC LICENSE
2Version 2.1, February 1999 2Version 2.1, February 1999
3 3
4 4
5Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5Copyright (C) 1991, 1999 Free Software Foundation, Inc.
659 Temple Place, Suite 330, Boston, MA 02111-1307 USA 659 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7Everyone is permitted to copy and distribute verbatim copies 7Everyone is permitted to copy and distribute verbatim copies
8of this license document, but changing it is not allowed. 8of this license document, but changing it is not allowed.
9 9
10[This is the first released version of the Lesser GPL. It also counts 10[This is the first released version of the Lesser GPL. It also counts
11 as the successor of the GNU Library Public License, version 2, hence 11 as the successor of the GNU Library Public License, version 2, hence
12 the version number 2.1.] 12 the version number 2.1.]
13 13
14Preamble 14Preamble
15The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. 15The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
16 16
17This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. 17This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
18 18
19When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. 19When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
20 20
21To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. 21To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
22 22
23For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. 23For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
24 24
25We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. 25We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
26 26
27To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. 27To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
28 28
29Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. 29Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
30 30
31Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. 31Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
32 32
33When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. 33When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
34 34
35We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. 35We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
36 36
37For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. 37For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
38 38
39In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. 39In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
40 40
41Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. 41Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
42 42
43The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. 43The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
44 44
45 45
46TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 46TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
470. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". 470. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
48 48
49A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. 49A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
50 50
51The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) 51The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
52 52
53"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. 53"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
54 54
55Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 55Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
56 56
571. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. 571. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
58 58
59You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 59You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
60 60
612. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 612. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
62 62
63 63
64a) The modified work must itself be a software library. 64a) The modified work must itself be a software library.
65b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. 65b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
66c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. 66c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
67d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. 67d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
68(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) 68(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
69 69
70These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 70These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
71 71
72Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. 72Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
73 73
74In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 74In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
75 75
763. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. 763. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
77 77
78Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. 78Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
79 79
80This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 80This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
81 81
824. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. 824. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
83 83
84If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 84If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
85 85
865. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. 865. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
87 87
88However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. 88However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
89 89
90When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. 90When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
91 91
92If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) 92If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
93 93
94Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 94Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
95 95
966. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. 966. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
97 97
98You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: 98You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
99 99
100 100
101a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) 101a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
102b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. 102b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
103c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. 103c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
104d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. 104d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
105e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. 105e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
106For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 106For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
107 107
108It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 108It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
109 109
1107. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: 1107. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
111 111
112 112
113a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. 113a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
114b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 114b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
1158. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 1158. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
116 116
1179. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 1179. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
118 118
11910. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11910. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
120 120
12111. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. 12111. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
122 122
123If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. 123If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
124 124
125It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 125It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
126 126
127This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 127This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
128 128
12912. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 12912. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
130 130
13113. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 13113. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
132 132
133Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 133Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
134 134
13514. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 13514. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
136 136
137NO WARRANTY 137NO WARRANTY
138 138
13915. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 13915. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
140 140
14116. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \ No newline at end of file 14116. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \ No newline at end of file
diff --git a/ThirdPartyLicenses/Bullet for Xna (ModifiedBulletX).txt b/ThirdPartyLicenses/Bullet for Xna (ModifiedBulletX).txt
index 127d54f..a8ed924 100644
--- a/ThirdPartyLicenses/Bullet for Xna (ModifiedBulletX).txt
+++ b/ThirdPartyLicenses/Bullet for Xna (ModifiedBulletX).txt
@@ -1,19 +1,19 @@
1 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 1 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
2 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 2 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
3 3
4 This software is provided 'as-is', without any express or implied 4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages 5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software. 6 arising from the use of this software.
7 7
8 Permission is granted to anyone to use this software for any purpose, 8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it 9 including commercial applications, and to alter it and redistribute it
10 freely, subject to the following restrictions: 10 freely, subject to the following restrictions:
11 11
12 1. The origin of this software must not be misrepresented; you must not 12 1. The origin of this software must not be misrepresented; you must not
13 claim that you wrote the original software. If you use this software 13 claim that you wrote the original software. If you use this software
14 in a product, an acknowledgment in the product documentation would be 14 in a product, an acknowledgment in the product documentation would be
15 appreciated but is not required. 15 appreciated but is not required.
16 2. Altered source versions must be plainly marked as such, and must not be 16 2. Altered source versions must be plainly marked as such, and must not be
17 misrepresented as being the original software. 17 misrepresented as being the original software.
18 3. This notice may not be removed or altered from any source distribution. 18 3. This notice may not be removed or altered from any source distribution.
19 \ No newline at end of file 19 \ No newline at end of file
diff --git a/ThirdPartyLicenses/Mono.Xna (MonoXnaCompactMaths).txt b/ThirdPartyLicenses/Mono.Xna (MonoXnaCompactMaths).txt
index 02e92cf..ef324b6 100644
--- a/ThirdPartyLicenses/Mono.Xna (MonoXnaCompactMaths).txt
+++ b/ThirdPartyLicenses/Mono.Xna (MonoXnaCompactMaths).txt
@@ -1,22 +1,22 @@
1MIT License 1MIT License
2Copyright © 2006 The Mono.Xna Team 2Copyright © 2006 The Mono.Xna Team
3 3
4All rights reserved. 4All rights reserved.
5 5
6Permission is hereby granted, free of charge, to any person obtaining a copy 6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to deal 7of this software and associated documentation files (the "Software"), to deal
8in the Software without restriction, including without limitation the rights 8in the Software without restriction, including without limitation the rights
9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10copies of the Software, and to permit persons to whom the Software is 10copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions: 11furnished to do so, subject to the following conditions:
12 12
13The above copyright notice and this permission notice shall be included in all 13The above copyright notice and this permission notice shall be included in all
14copies or substantial portions of the Software. 14copies or substantial portions of the Software.
15 15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22SOFTWARE. \ No newline at end of file 22SOFTWARE. \ No newline at end of file
diff --git a/ThirdPartyLicenses/MySQL.txt b/ThirdPartyLicenses/MySQL.txt
index 6dfe347..1c20b0d 100644
--- a/ThirdPartyLicenses/MySQL.txt
+++ b/ThirdPartyLicenses/MySQL.txt
@@ -1,78 +1,78 @@
1Covered under the MySQL FLOSS Exemption ( http://www.mysql.com/company/legal/licensing/foss-exception.html ) 1Covered under the MySQL FLOSS Exemption ( http://www.mysql.com/company/legal/licensing/foss-exception.html )
2 2
3-------------------------------------------------------------------- 3--------------------------------------------------------------------
4Legal Terms and Conditions 4Legal Terms and Conditions
5 5
6As a special exception to the terms and conditions of version 2.0 of the GPL: 6As a special exception to the terms and conditions of version 2.0 of the GPL:
7 7
8You are free to distribute a Derivative Work that is formed entirely from the Program and one or more works (each, a "FLOSS Work") licensed under one or more of the licenses listed below in section 1, as long as: 8You are free to distribute a Derivative Work that is formed entirely from the Program and one or more works (each, a "FLOSS Work") licensed under one or more of the licenses listed below in section 1, as long as:
9 9
10 1. You obey the GPL in all respects for the Program and the Derivative Work, except for identifiable sections of the Derivative Work which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves, 10 1. You obey the GPL in all respects for the Program and the Derivative Work, except for identifiable sections of the Derivative Work which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves,
11 2. all identifiable sections of the Derivative Work which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves, 11 2. all identifiable sections of the Derivative Work which are not derived from the Program, and which can reasonably be considered independent and separate works in themselves,
12 1. are distributed subject to one of the FLOSS licenses listed below, and 12 1. are distributed subject to one of the FLOSS licenses listed below, and
13 2. the object code or executable form of those sections are accompanied by the complete corresponding machine-readable source code for those sections on the same medium and under the same FLOSS license as the corresponding object code or executable forms of those sections, and 13 2. the object code or executable form of those sections are accompanied by the complete corresponding machine-readable source code for those sections on the same medium and under the same FLOSS license as the corresponding object code or executable forms of those sections, and
14 3. any works which are aggregated with the Program or with a Derivative Work on a volume of a storage or distribution medium in accordance with the GPL, can reasonably be considered independent and separate works in themselves which are not derivatives of either the Program, a Derivative Work or a FLOSS Work. 14 3. any works which are aggregated with the Program or with a Derivative Work on a volume of a storage or distribution medium in accordance with the GPL, can reasonably be considered independent and separate works in themselves which are not derivatives of either the Program, a Derivative Work or a FLOSS Work.
15 15
16If the above conditions are not met, then the Program may only be copied, modified, distributed or used under the terms and conditions of the GPL or another valid licensing option from MySQL AB. 16If the above conditions are not met, then the Program may only be copied, modified, distributed or used under the terms and conditions of the GPL or another valid licensing option from MySQL AB.
17 17
18-------------------------------------------------------------------- 18--------------------------------------------------------------------
19 19
20TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 20TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
21 21
220. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 220. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
23 23
24Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 24Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
25 25
261. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 261. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
27 27
28You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 28You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
29 29
302. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 302. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
31 31
32 a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 32 a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
33 b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 33 b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
34 c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 34 c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
35 35
36These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 36These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
37 37
38Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 38Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
39 39
40In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 40In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
41 41
423. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 423. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
43 43
44 a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 44 a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
45 b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 45 b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
46 c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 46 c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
47 47
48The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 48The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
49 49
50If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 50If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
51 51
524. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 524. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
53 53
545. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 545. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
55 55
566. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 566. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
57 57
587. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 587. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
59 59
60If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 60If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
61 61
62It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 62It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
63 63
64This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 64This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
65 65
668. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 668. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
67 67
689. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 689. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
69 69
70Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 70Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
71 71
7210. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 7210. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
73 73
74NO WARRANTY 74NO WARRANTY
75 75
7611. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 7611. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
77 77
7812. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \ No newline at end of file 7812. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. \ No newline at end of file
diff --git a/ThirdPartyLicenses/ODE.txt b/ThirdPartyLicenses/ODE.txt
index 312976f..53a93db 100644
--- a/ThirdPartyLicenses/ODE.txt
+++ b/ThirdPartyLicenses/ODE.txt
@@ -1,13 +1,13 @@
1Open Dynamics Engine 1Open Dynamics Engine
2Copyright (c) 2001-2004, Russell L. Smith. 2Copyright (c) 2001-2004, Russell L. Smith.
3All rights reserved. 3All rights reserved.
4 4
5Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6 6
7Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8 8
9Redistributions 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. 9Redistributions 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.
10 10
11Neither the names of ODE's copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11Neither the names of ODE's copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12 12
13THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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. \ No newline at end of file 13THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR 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. \ No newline at end of file
diff --git a/ThirdPartyLicenses/OpenJpeg.txt b/ThirdPartyLicenses/OpenJpeg.txt
index 0ad4488..d1e5b6a 100644
--- a/ThirdPartyLicenses/OpenJpeg.txt
+++ b/ThirdPartyLicenses/OpenJpeg.txt
@@ -1,30 +1,30 @@
1/* 1/*
2 * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 2 * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
3 * Copyright (c) 2002-2007, Professor Benoit Macq 3 * Copyright (c) 2002-2007, Professor Benoit Macq
4 * Copyright (c) 2001-2003, David Janssens 4 * Copyright (c) 2001-2003, David Janssens
5 * Copyright (c) 2002-2003, Yannick Verschueren 5 * Copyright (c) 2002-2003, Yannick Verschueren
6 * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe 6 * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
7 * Copyright (c) 2005, Herve Drolon, FreeImage Team 7 * Copyright (c) 2005, Herve Drolon, FreeImage Team
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
18 * 18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ \ No newline at end of file 30 */ \ No newline at end of file
diff --git a/ThirdPartyLicenses/libsl.txt b/ThirdPartyLicenses/libsl.txt
index 9555905..73951dc 100644
--- a/ThirdPartyLicenses/libsl.txt
+++ b/ThirdPartyLicenses/libsl.txt
@@ -1,23 +1,23 @@
1Copyright (c) 2006, Second Life Reverse Engineering Team 1Copyright (c) 2006, Second Life Reverse Engineering Team
2All rights reserved. 2All rights reserved.
3 3
4- Redistribution and use in source and binary forms, with or without 4- Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met: 5 modification, are permitted provided that the following conditions are met:
6 6
7- Redistributions of source code must retain the above copyright notice, this 7- Redistributions of source code must retain the above copyright notice, this
8 list of conditions and the following disclaimer. 8 list of conditions and the following disclaimer.
9- Neither the name of the Second Life Reverse Engineering Team nor the names 9- Neither the name of the Second Life Reverse Engineering Team nor the names
10 of its contributors may be used to endorse or promote products derived from 10 of its contributors may be used to endorse or promote products derived from
11 this software without specific prior written permission. 11 this software without specific prior written permission.
12 12
13THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 13THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 16ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
17LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 17LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 18CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 19SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 20INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file 23POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/bin/TerrainFilters/demofilter.cs b/bin/TerrainFilters/demofilter.cs
index 1fdfc95..4b48571 100644
--- a/bin/TerrainFilters/demofilter.cs
+++ b/bin/TerrainFilters/demofilter.cs
@@ -1,50 +1,50 @@
1using System; 1using System;
2using libTerrain; 2using libTerrain;
3using OpenSim.Terrain; 3using OpenSim.Terrain;
4 4
5/// <summary> 5/// <summary>
6/// A Demonstration Filter 6/// A Demonstration Filter
7/// </summary> 7/// </summary>
8public class DemoFilter : ITerrainFilter 8public class DemoFilter : ITerrainFilter
9{ 9{
10 public void Filter(Channel heightmap, string[] args) 10 public void Filter(Channel heightmap, string[] args)
11 { 11 {
12 Console.WriteLine("Hello world"); 12 Console.WriteLine("Hello world");
13 } 13 }
14 14
15 public string Register() 15 public string Register()
16 { 16 {
17 return "demofilter"; 17 return "demofilter";
18 } 18 }
19 19
20 public string Help() 20 public string Help()
21 { 21 {
22 return "demofilter - Does nothing\n"; 22 return "demofilter - Does nothing\n";
23 } 23 }
24} 24}
25 25
26public class SineFilter : ITerrainFilter 26public class SineFilter : ITerrainFilter
27{ 27{
28 public void Filter(Channel heightmap, string[] args) 28 public void Filter(Channel heightmap, string[] args)
29 { 29 {
30 double max = heightmap.findMax(); 30 double max = heightmap.findMax();
31 31
32 for (int x = 0; x < heightmap.w; x++) 32 for (int x = 0; x < heightmap.w; x++)
33 { 33 {
34 for (int y = 0; y < heightmap.h; y++) 34 for (int y = 0; y < heightmap.h; y++)
35 { 35 {
36 heightmap.set(x,y,((Math.Sin(heightmap.get(x,y) * Convert.ToDouble(args[1])) + 1) / 2) * max); 36 heightmap.set(x,y,((Math.Sin(heightmap.get(x,y) * Convert.ToDouble(args[1])) + 1) / 2) * max);
37 } 37 }
38 } 38 }
39 } 39 }
40 40
41 public string Register() 41 public string Register()
42 { 42 {
43 return "sinefilter"; 43 return "sinefilter";
44 } 44 }
45 45
46 public string Help() 46 public string Help()
47 { 47 {
48 return "sinefilter <theta> - Converts the heightmap to the functional output of a sine wave"; 48 return "sinefilter <theta> - Converts the heightmap to the functional output of a sine wave";
49 } 49 }
50} \ No newline at end of file 50} \ No newline at end of file
diff --git a/bin/data/LICENSE-README-IMPORTANT.txt b/bin/data/LICENSE-README-IMPORTANT.txt
index 3229102..86e401f 100644
--- a/bin/data/LICENSE-README-IMPORTANT.txt
+++ b/bin/data/LICENSE-README-IMPORTANT.txt
@@ -1,5 +1,5 @@
1Not all of the files in this directory are licensed under the BSD license. Some of these files come with the Second Life viewer and are considered licensed under a Creative Commons License. 1Not all of the files in this directory are licensed under the BSD license. Some of these files come with the Second Life viewer and are considered licensed under a Creative Commons License.
2 2
3These files are: 3These files are:
4 4
5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) \ No newline at end of file 5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) \ No newline at end of file
diff --git a/bin/data/avataranimations.xml b/bin/data/avataranimations.xml
index 461613f..8a98c62 100644
--- a/bin/data/avataranimations.xml
+++ b/bin/data/avataranimations.xml
@@ -1,10 +1,10 @@
1<?xml version="1.0" encoding="iso-8859-1"?> 1<?xml version="1.0" encoding="iso-8859-1"?>
2<!-- Copyright(C) 2002-2007 Linden Lab, OpenSim Developers --> 2<!-- Copyright(C) 2002-2007 Linden Lab, OpenSim Developers -->
3<!-- Based on viewerart.ini packaged with the viewer. --> 3<!-- Based on viewerart.ini packaged with the viewer. -->
4<!-- This file is a derivative work of the above while it contains default animation UUIDs --> 4<!-- This file is a derivative work of the above while it contains default animation UUIDs -->
5<!-- Licensed under a creative commons license (By-SA) http://creativecommons.org/licenses/by-sa/2.5/ --> 5<!-- Licensed under a creative commons license (By-SA) http://creativecommons.org/licenses/by-sa/2.5/ -->
6<animations> 6<animations>
7 <animation name="STAND">2408fe9e-df1d-1d7d-f4ff-1384fa7b350f</animation> 7 <animation name="STAND">2408fe9e-df1d-1d7d-f4ff-1384fa7b350f</animation>
8 <animation name="WALK">6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0</animation> 8 <animation name="WALK">6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0</animation>
9 <animation name="FLY">aec4610c-757f-bc4e-c092-c6e9caf18daf</animation> 9 <animation name="FLY">aec4610c-757f-bc4e-c092-c6e9caf18daf</animation>
10</animations> \ No newline at end of file 10</animations> \ No newline at end of file
diff --git a/bin/openjpegnet.dll.config b/bin/openjpegnet.dll.config
index 665b78d..d705199 100644
--- a/bin/openjpegnet.dll.config
+++ b/bin/openjpegnet.dll.config
@@ -1,5 +1,5 @@
1<configuration> 1<configuration>
2 <dllmap os="osx" dll="openjpeg-libsl.dll" target="libopenjpeg-1.1.0.dylib" /> 2 <dllmap os="osx" dll="openjpeg-libsl.dll" target="libopenjpeg-1.1.0.dylib" />
3 <dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-libsl.dll" target="libopenjpeg-1.0.0-x86_64.so" /> 3 <dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-libsl.dll" target="libopenjpeg-1.0.0-x86_64.so" />
4 <dllmap os="!windows,osx" cpu="x86" dll="openjpeg-libsl.dll" target="libopenjpeg-1.0.0.so" /> 4 <dllmap os="!windows,osx" cpu="x86" dll="openjpeg-libsl.dll" target="libopenjpeg-1.0.0.so" />
5</configuration> 5</configuration>
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX.sln b/libraries/ModifiedBulletX/ModifiedBulletX.sln
index 0eccfdd..79ae566 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX.sln
+++ b/libraries/ModifiedBulletX/ModifiedBulletX.sln
@@ -1,42 +1,42 @@
1 1
2Microsoft Visual Studio Solution File, Format Version 9.00 2Microsoft Visual Studio Solution File, Format Version 9.00
3# Visual C# Express 2005 3# Visual C# Express 2005
4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoXnaCompactMaths", "MonoXnaCompactMaths\MonoXnaCompactMaths.csproj", "{121147BC-B06B-406C-84E9-907F268CF0EB}" 4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoXnaCompactMaths", "MonoXnaCompactMaths\MonoXnaCompactMaths.csproj", "{121147BC-B06B-406C-84E9-907F268CF0EB}"
5EndProject 5EndProject
6Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modified.XnaDevRu.BulletX", "ModifiedBulletX\Modified.XnaDevRu.BulletX.csproj", "{44270344-ACA7-4875-B585-81D5C06D0489}" 6Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modified.XnaDevRu.BulletX", "ModifiedBulletX\Modified.XnaDevRu.BulletX.csproj", "{44270344-ACA7-4875-B585-81D5C06D0489}"
7EndProject 7EndProject
8Global 8Global
9 GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 Debug|Any CPU = Debug|Any CPU 10 Debug|Any CPU = Debug|Any CPU
11 Debug|Mixed Platforms = Debug|Mixed Platforms 11 Debug|Mixed Platforms = Debug|Mixed Platforms
12 Debug|x86 = Debug|x86 12 Debug|x86 = Debug|x86
13 Release|Any CPU = Release|Any CPU 13 Release|Any CPU = Release|Any CPU
14 Release|Mixed Platforms = Release|Mixed Platforms 14 Release|Mixed Platforms = Release|Mixed Platforms
15 Release|x86 = Release|x86 15 Release|x86 = Release|x86
16 EndGlobalSection 16 EndGlobalSection
17 GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 20 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
21 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 21 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
22 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|x86.ActiveCfg = Debug|Any CPU 22 {121147BC-B06B-406C-84E9-907F268CF0EB}.Debug|x86.ActiveCfg = Debug|Any CPU
23 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Any CPU.Build.0 = Release|Any CPU 24 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Any CPU.Build.0 = Release|Any CPU
25 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 25 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
26 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Mixed Platforms.Build.0 = Release|Any CPU 26 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
27 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|x86.ActiveCfg = Release|Any CPU 27 {121147BC-B06B-406C-84E9-907F268CF0EB}.Release|x86.ActiveCfg = Release|Any CPU
28 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 30 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
31 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 31 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
32 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|x86.ActiveCfg = Debug|Any CPU 32 {44270344-ACA7-4875-B585-81D5C06D0489}.Debug|x86.ActiveCfg = Debug|Any CPU
33 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Any CPU.ActiveCfg = Release|Any CPU
34 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Any CPU.Build.0 = Release|Any CPU 34 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Any CPU.Build.0 = Release|Any CPU
35 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 35 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
36 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Mixed Platforms.Build.0 = Release|Any CPU 36 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|Mixed Platforms.Build.0 = Release|Any CPU
37 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|x86.ActiveCfg = Release|Any CPU 37 {44270344-ACA7-4875-B585-81D5C06D0489}.Release|x86.ActiveCfg = Release|Any CPU
38 EndGlobalSection 38 EndGlobalSection
39 GlobalSection(SolutionProperties) = preSolution 39 GlobalSection(SolutionProperties) = preSolution
40 HideSolutionNode = FALSE 40 HideSolutionNode = FALSE
41 EndGlobalSection 41 EndGlobalSection
42EndGlobal 42EndGlobal
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/BulletDebug.cs b/libraries/ModifiedBulletX/ModifiedBulletX/BulletDebug.cs
index d0d5845..a4cbfdd 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/BulletDebug.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/BulletDebug.cs
@@ -1,68 +1,68 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using System.Diagnostics; 25using System.Diagnostics;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 internal static class BulletDebug 29 internal static class BulletDebug
30 { 30 {
31 [Conditional("DEBUG")] 31 [Conditional("DEBUG")]
32 public static void Assert(Boolean condition) 32 public static void Assert(Boolean condition)
33 { 33 {
34 //if (!condition) 34 //if (!condition)
35 //{ 35 //{
36 // Throw("No info available"); 36 // Throw("No info available");
37 //} 37 //}
38 Debug.Assert(condition); 38 Debug.Assert(condition);
39 } 39 }
40 40
41 [Conditional("DEBUG")] 41 [Conditional("DEBUG")]
42 public static void Assert(Boolean condition, String message) 42 public static void Assert(Boolean condition, String message)
43 { 43 {
44 //if (!condition) 44 //if (!condition)
45 //{ 45 //{
46 // Throw(message); 46 // Throw(message);
47 //} 47 //}
48 Debug.Assert(condition, message); 48 Debug.Assert(condition, message);
49 } 49 }
50 50
51 [Conditional("DEBUG")] 51 [Conditional("DEBUG")]
52 public static void Assert(Boolean condition, String message, String detailMessage) 52 public static void Assert(Boolean condition, String message, String detailMessage)
53 { 53 {
54 //if (!condition) 54 //if (!condition)
55 //{ 55 //{
56 // Throw(message); 56 // Throw(message);
57 //} 57 //}
58 Debug.Assert(condition, message, detailMessage); 58 Debug.Assert(condition, message, detailMessage);
59 } 59 }
60 60
61 private static void Throw(String message) 61 private static void Throw(String message)
62 { 62 {
63 String msg = String.Format("Assertion Error: {0}", message); 63 String msg = String.Format("Assertion Error: {0}", message);
64 64
65 throw new BulletException(msg); 65 throw new BulletException(msg);
66 } 66 }
67 } 67 }
68} 68}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/AxisSweep3.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/AxisSweep3.cs
index 12692ea..168d947 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/AxisSweep3.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/AxisSweep3.cs
@@ -1,623 +1,623 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class AxisSweep3: OverlappingPairCache 29 public class AxisSweep3: OverlappingPairCache
30 { 30 {
31 Vector3 _worldAabbMin; 31 Vector3 _worldAabbMin;
32 Vector3 _worldAabbMax; 32 Vector3 _worldAabbMax;
33 33
34 Vector3 _quantize; 34 Vector3 _quantize;
35 35
36 int _numHandles; 36 int _numHandles;
37 int _maxHandles; 37 int _maxHandles;
38 38
39 Handle[] _handles; 39 Handle[] _handles;
40 Edge[][] _edges = new Edge[3][]; 40 Edge[][] _edges = new Edge[3][];
41 41
42 ushort _firstFreeHandle; 42 ushort _firstFreeHandle;
43 43
44 int _invalidPair; 44 int _invalidPair;
45 45
46 public AxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles) 46 public AxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles)
47 : base() 47 : base()
48 { 48 {
49 BulletDebug.Assert(maxHandles > 1 && maxHandles < 32767); 49 BulletDebug.Assert(maxHandles > 1 && maxHandles < 32767);
50 50
51 // init bounds 51 // init bounds
52 _worldAabbMin = worldAabbMin; 52 _worldAabbMin = worldAabbMin;
53 _worldAabbMax = worldAabbMax; 53 _worldAabbMax = worldAabbMax;
54 54
55 Vector3 aabbSize = _worldAabbMax - _worldAabbMin; 55 Vector3 aabbSize = _worldAabbMax - _worldAabbMin;
56 _quantize = new Vector3(65535.0f, 65535.0f, 65535.0f) / aabbSize; 56 _quantize = new Vector3(65535.0f, 65535.0f, 65535.0f) / aabbSize;
57 57
58 // allocate handles buffer and put all handles on free list 58 // allocate handles buffer and put all handles on free list
59 _handles = new Handle[maxHandles]; 59 _handles = new Handle[maxHandles];
60 for (int i = 0; i < maxHandles; i++) 60 for (int i = 0; i < maxHandles; i++)
61 _handles[i] = new Handle(); 61 _handles[i] = new Handle();
62 _maxHandles = maxHandles; 62 _maxHandles = maxHandles;
63 _numHandles = 0; 63 _numHandles = 0;
64 64
65 // handle 0 is reserved as the null index, and is also used as the sentinel 65 // handle 0 is reserved as the null index, and is also used as the sentinel
66 _firstFreeHandle = 1; 66 _firstFreeHandle = 1;
67 { 67 {
68 for (int i = _firstFreeHandle; i < maxHandles; i++) 68 for (int i = _firstFreeHandle; i < maxHandles; i++)
69 { 69 {
70 _handles[i].NextFree = (ushort)(i + 1); 70 _handles[i].NextFree = (ushort)(i + 1);
71 } 71 }
72 _handles[maxHandles - 1].NextFree = 0; 72 _handles[maxHandles - 1].NextFree = 0;
73 } 73 }
74 74
75 { 75 {
76 // allocate edge buffers 76 // allocate edge buffers
77 for (int i = 0; i < 3; i++) 77 for (int i = 0; i < 3; i++)
78 { 78 {
79 _edges[i] = new Edge[maxHandles * 2]; 79 _edges[i] = new Edge[maxHandles * 2];
80 for (int j = 0; j < maxHandles * 2; j++) 80 for (int j = 0; j < maxHandles * 2; j++)
81 { 81 {
82 _edges[i][j] = new Edge(); 82 _edges[i][j] = new Edge();
83 } 83 }
84 } 84 }
85 } 85 }
86 //removed overlap management 86 //removed overlap management
87 87
88 // make boundary sentinels 88 // make boundary sentinels
89 89
90 _handles[0].ClientData = 0; 90 _handles[0].ClientData = 0;
91 91
92 for (int axis = 0; axis < 3; axis++) 92 for (int axis = 0; axis < 3; axis++)
93 { 93 {
94 _handles[0].MinEdges[axis] = 0; 94 _handles[0].MinEdges[axis] = 0;
95 _handles[0].MaxEdges[axis] = 1; 95 _handles[0].MaxEdges[axis] = 1;
96 96
97 _edges[axis][0].Position = 0; 97 _edges[axis][0].Position = 0;
98 _edges[axis][0].Handle = 0; 98 _edges[axis][0].Handle = 0;
99 _edges[axis][1].Position = 0xffff; 99 _edges[axis][1].Position = 0xffff;
100 _edges[axis][1].Handle = 0; 100 _edges[axis][1].Handle = 0;
101 } 101 }
102 } 102 }
103 103
104 public ushort AddHandle(Vector3 aabbMin, Vector3 aabbMax, object owner, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask) 104 public ushort AddHandle(Vector3 aabbMin, Vector3 aabbMax, object owner, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask)
105 { 105 {
106 ushort[] min = new ushort[3], max = new ushort[3]; 106 ushort[] min = new ushort[3], max = new ushort[3];
107 Quantize(out min, aabbMin, 0); 107 Quantize(out min, aabbMin, 0);
108 Quantize(out max, aabbMax, 1); 108 Quantize(out max, aabbMax, 1);
109 109
110 ushort handle = AllocateHandle(); 110 ushort handle = AllocateHandle();
111 Handle oHandle = GetHandle(handle); 111 Handle oHandle = GetHandle(handle);
112 112
113 oHandle.HandleID = handle; 113 oHandle.HandleID = handle;
114 oHandle.ClientData = owner; 114 oHandle.ClientData = owner;
115 oHandle.CollisionFilterGroup = collisionFilterGroup; 115 oHandle.CollisionFilterGroup = collisionFilterGroup;
116 oHandle.CollisionFilterMask = collisionFilterMask; 116 oHandle.CollisionFilterMask = collisionFilterMask;
117 117
118 int limit = _numHandles * 2; 118 int limit = _numHandles * 2;
119 119
120 // (Gluk ) 120 // (Gluk )
121 // ( Inside ) 121 // ( Inside )
122 for (int axis = 0; axis < 3; axis++) 122 for (int axis = 0; axis < 3; axis++)
123 { 123 {
124 _handles[0].MaxEdges[axis] += 2; 124 _handles[0].MaxEdges[axis] += 2;
125 125
126 _edges[axis][limit + 1].Position = _edges[axis][limit - 1].Position; 126 _edges[axis][limit + 1].Position = _edges[axis][limit - 1].Position;
127 _edges[axis][limit + 1].Handle = _edges[axis][limit - 1].Handle; 127 _edges[axis][limit + 1].Handle = _edges[axis][limit - 1].Handle;
128 128
129 _edges[axis][limit - 1].Position = min[axis]; 129 _edges[axis][limit - 1].Position = min[axis];
130 _edges[axis][limit - 1].Handle = handle; 130 _edges[axis][limit - 1].Handle = handle;
131 131
132 _edges[axis][limit].Position = max[axis]; 132 _edges[axis][limit].Position = max[axis];
133 _edges[axis][limit].Handle = handle; 133 _edges[axis][limit].Handle = handle;
134 134
135 oHandle.MinEdges[axis] = (ushort)(limit - 1); 135 oHandle.MinEdges[axis] = (ushort)(limit - 1);
136 oHandle.MaxEdges[axis] = (ushort)limit; 136 oHandle.MaxEdges[axis] = (ushort)limit;
137 } 137 }
138 138
139 SortMinDown(0, oHandle.MinEdges[0], false); 139 SortMinDown(0, oHandle.MinEdges[0], false);
140 SortMaxDown(0, oHandle.MaxEdges[0], false); 140 SortMaxDown(0, oHandle.MaxEdges[0], false);
141 SortMinDown(1, oHandle.MinEdges[1], false); 141 SortMinDown(1, oHandle.MinEdges[1], false);
142 SortMaxDown(1, oHandle.MaxEdges[1], false); 142 SortMaxDown(1, oHandle.MaxEdges[1], false);
143 SortMinDown(2, oHandle.MinEdges[2], true); 143 SortMinDown(2, oHandle.MinEdges[2], true);
144 SortMaxDown(2, oHandle.MaxEdges[2], true); 144 SortMaxDown(2, oHandle.MaxEdges[2], true);
145 145
146 return handle; 146 return handle;
147 } 147 }
148 148
149 public void RemoveHandle(ushort handle) 149 public void RemoveHandle(ushort handle)
150 { 150 {
151 Handle pHandle = GetHandle(handle); 151 Handle pHandle = GetHandle(handle);
152 152
153 //explicitly remove the pairs containing the proxy 153 //explicitly remove the pairs containing the proxy
154 //we could do it also in the sortMinUp (passing true) 154 //we could do it also in the sortMinUp (passing true)
155 //todo: compare performance 155 //todo: compare performance
156 RemoveOverlappingPairsContainingProxy(pHandle); 156 RemoveOverlappingPairsContainingProxy(pHandle);
157 157
158 158
159 // compute current limit of edge arrays 159 // compute current limit of edge arrays
160 int limit = _numHandles * 2; 160 int limit = _numHandles * 2;
161 int axis; 161 int axis;
162 162
163 for (axis = 0; axis < 3; axis++) 163 for (axis = 0; axis < 3; axis++)
164 { 164 {
165 _handles[0].MaxEdges[axis] -= 2; 165 _handles[0].MaxEdges[axis] -= 2;
166 } 166 }
167 167
168 // remove the edges by sorting them up to the end of the list 168 // remove the edges by sorting them up to the end of the list
169 for (axis = 0; axis < 3; axis++) 169 for (axis = 0; axis < 3; axis++)
170 { 170 {
171 Edge[] pEdges = _edges[axis]; 171 Edge[] pEdges = _edges[axis];
172 ushort max = pHandle.MaxEdges[axis]; 172 ushort max = pHandle.MaxEdges[axis];
173 pEdges[max].Position = 0xffff; 173 pEdges[max].Position = 0xffff;
174 174
175 SortMaxUp(axis, max, false); 175 SortMaxUp(axis, max, false);
176 176
177 ushort i = pHandle.MinEdges[axis]; 177 ushort i = pHandle.MinEdges[axis];
178 pEdges[i].Position = 0xffff; 178 pEdges[i].Position = 0xffff;
179 179
180 SortMinUp(axis, i, false); 180 SortMinUp(axis, i, false);
181 181
182 pEdges[limit - 1].Handle = 0; 182 pEdges[limit - 1].Handle = 0;
183 pEdges[limit - 1].Position = 0xffff; 183 pEdges[limit - 1].Position = 0xffff;
184 } 184 }
185 185
186 // free the handle 186 // free the handle
187 FreeHandle(handle); 187 FreeHandle(handle);
188 } 188 }
189 189
190 public override void ProcessAllOverlappingPairs(IOverlapCallback callback) 190 public override void ProcessAllOverlappingPairs(IOverlapCallback callback)
191 { 191 {
192 OverlappingPairs.Sort(new Comparison<BroadphasePair>(BroadphasePair.ComparisonSort)); 192 OverlappingPairs.Sort(new Comparison<BroadphasePair>(BroadphasePair.ComparisonSort));
193 193
194 if (_invalidPair != 0) 194 if (_invalidPair != 0)
195 OverlappingPairs.RemoveRange(OverlappingPairs.Count - _invalidPair, _invalidPair); 195 OverlappingPairs.RemoveRange(OverlappingPairs.Count - _invalidPair, _invalidPair);
196 _invalidPair = 0; 196 _invalidPair = 0;
197 197
198 BroadphasePair previousPair = new BroadphasePair(); 198 BroadphasePair previousPair = new BroadphasePair();
199 previousPair.ProxyA = null; 199 previousPair.ProxyA = null;
200 previousPair.ProxyB = null; 200 previousPair.ProxyB = null;
201 previousPair.CollisionAlgorithm = null; 201 previousPair.CollisionAlgorithm = null;
202 202
203 List<BroadphasePair> removal = new List<BroadphasePair>(); 203 List<BroadphasePair> removal = new List<BroadphasePair>();
204 204
205 for (int i = 0; i < OverlappingPairs.Count; i++) 205 for (int i = 0; i < OverlappingPairs.Count; i++)
206 { 206 {
207 bool isDuplicate = (OverlappingPairs[i] == previousPair); 207 bool isDuplicate = (OverlappingPairs[i] == previousPair);
208 previousPair = OverlappingPairs[i]; 208 previousPair = OverlappingPairs[i];
209 bool needsRemoval; 209 bool needsRemoval;
210 if (!isDuplicate) 210 if (!isDuplicate)
211 { 211 {
212 bool hasOverlap = TestOverlap(previousPair.ProxyA, previousPair.ProxyB); 212 bool hasOverlap = TestOverlap(previousPair.ProxyA, previousPair.ProxyB);
213 if (hasOverlap) 213 if (hasOverlap)
214 { 214 {
215 needsRemoval = callback.ProcessOverlap(ref previousPair); 215 needsRemoval = callback.ProcessOverlap(ref previousPair);
216 } 216 }
217 else 217 else
218 { 218 {
219 needsRemoval = true; 219 needsRemoval = true;
220 } 220 }
221 } 221 }
222 else 222 else
223 { 223 {
224 needsRemoval = true; 224 needsRemoval = true;
225 BulletDebug.Assert(previousPair.CollisionAlgorithm == null); 225 BulletDebug.Assert(previousPair.CollisionAlgorithm == null);
226 } 226 }
227 227
228 if (needsRemoval) 228 if (needsRemoval)
229 { 229 {
230 removal.Add(previousPair); 230 removal.Add(previousPair);
231 } 231 }
232 } 232 }
233 233
234 for (int i = 0; i < removal.Count; i++) 234 for (int i = 0; i < removal.Count; i++)
235 { 235 {
236 BroadphasePair pair = removal[i]; 236 BroadphasePair pair = removal[i];
237 CleanOverlappingPair(ref pair); 237 CleanOverlappingPair(ref pair);
238 pair.ProxyA = null; 238 pair.ProxyA = null;
239 pair.ProxyB = null; 239 pair.ProxyB = null;
240 _invalidPair++; 240 _invalidPair++;
241 OverlappingPairCount--; 241 OverlappingPairCount--;
242 } 242 }
243 } 243 }
244 244
245 private bool TestOverlap(BroadphaseProxy proxyA, BroadphaseProxy proxyB) 245 private bool TestOverlap(BroadphaseProxy proxyA, BroadphaseProxy proxyB)
246 { 246 {
247 if (proxyA == null || proxyB == null) 247 if (proxyA == null || proxyB == null)
248 return false; 248 return false;
249 249
250 Handle handleA = proxyA as Handle; 250 Handle handleA = proxyA as Handle;
251 Handle handleB = proxyB as Handle; 251 Handle handleB = proxyB as Handle;
252 252
253 for (int axis = 0; axis < 3; axis++) 253 for (int axis = 0; axis < 3; axis++)
254 { 254 {
255 if (handleA.MaxEdges[axis] < handleB.MinEdges[axis] || 255 if (handleA.MaxEdges[axis] < handleB.MinEdges[axis] ||
256 handleB.MaxEdges[axis] < handleA.MinEdges[axis]) 256 handleB.MaxEdges[axis] < handleA.MinEdges[axis])
257 { 257 {
258 return false; 258 return false;
259 } 259 }
260 } 260 }
261 return true; 261 return true;
262 } 262 }
263 263
264 private bool TestOverlap(int ignoreAxis, Handle pHandleA, Handle pHandleB) 264 private bool TestOverlap(int ignoreAxis, Handle pHandleA, Handle pHandleB)
265 { 265 {
266 for (int axis = 0; axis < 3; axis++) 266 for (int axis = 0; axis < 3; axis++)
267 { 267 {
268 if (axis != ignoreAxis) 268 if (axis != ignoreAxis)
269 { 269 {
270 if (pHandleA.MaxEdges[axis] < pHandleB.MinEdges[axis] || 270 if (pHandleA.MaxEdges[axis] < pHandleB.MinEdges[axis] ||
271 pHandleB.MaxEdges[axis] < pHandleA.MinEdges[axis]) 271 pHandleB.MaxEdges[axis] < pHandleA.MinEdges[axis])
272 { 272 {
273 return false; 273 return false;
274 } 274 }
275 } 275 }
276 } 276 }
277 277
278 return true; 278 return true;
279 } 279 }
280 280
281 private ushort AllocateHandle() 281 private ushort AllocateHandle()
282 { 282 {
283 ushort handle = _firstFreeHandle; 283 ushort handle = _firstFreeHandle;
284 _firstFreeHandle = GetHandle(handle).NextFree; 284 _firstFreeHandle = GetHandle(handle).NextFree;
285 _numHandles++; 285 _numHandles++;
286 286
287 return handle; 287 return handle;
288 } 288 }
289 289
290 private void FreeHandle(ushort handle) 290 private void FreeHandle(ushort handle)
291 { 291 {
292 BulletDebug.Assert(handle > 0 && handle < _maxHandles); 292 BulletDebug.Assert(handle > 0 && handle < _maxHandles);
293 293
294 GetHandle(handle).NextFree = _firstFreeHandle; 294 GetHandle(handle).NextFree = _firstFreeHandle;
295 _firstFreeHandle = handle; 295 _firstFreeHandle = handle;
296 296
297 _numHandles--; 297 _numHandles--;
298 } 298 }
299 299
300 private Handle GetHandle(ushort handle) 300 private Handle GetHandle(ushort handle)
301 { 301 {
302 return _handles[handle]; 302 return _handles[handle];
303 } 303 }
304 304
305 private void UpdateHandle(ushort handle, Vector3 aabbMin, Vector3 aabbMax) 305 private void UpdateHandle(ushort handle, Vector3 aabbMin, Vector3 aabbMax)
306 { 306 {
307 Handle pHandle = GetHandle(handle); 307 Handle pHandle = GetHandle(handle);
308 308
309 // quantize the new bounds 309 // quantize the new bounds
310 ushort[] min = new ushort[3]; 310 ushort[] min = new ushort[3];
311 ushort[] max = new ushort[3]; 311 ushort[] max = new ushort[3];
312 Quantize(out min, aabbMin, 0); 312 Quantize(out min, aabbMin, 0);
313 Quantize(out max, aabbMax, 1); 313 Quantize(out max, aabbMax, 1);
314 314
315 // update changed edges 315 // update changed edges
316 for (int axis = 0; axis < 3; axis++) 316 for (int axis = 0; axis < 3; axis++)
317 { 317 {
318 ushort emin = pHandle.MinEdges[axis]; 318 ushort emin = pHandle.MinEdges[axis];
319 ushort emax = pHandle.MaxEdges[axis]; 319 ushort emax = pHandle.MaxEdges[axis];
320 320
321 int dmin = (int)min[axis] - (int)_edges[axis][emin].Position; 321 int dmin = (int)min[axis] - (int)_edges[axis][emin].Position;
322 int dmax = (int)max[axis] - (int)_edges[axis][emax].Position; 322 int dmax = (int)max[axis] - (int)_edges[axis][emax].Position;
323 323
324 _edges[axis][emin].Position = min[axis]; 324 _edges[axis][emin].Position = min[axis];
325 _edges[axis][emax].Position = max[axis]; 325 _edges[axis][emax].Position = max[axis];
326 326
327 // expand (only adds overlaps) 327 // expand (only adds overlaps)
328 if (dmin < 0) 328 if (dmin < 0)
329 SortMinDown(axis, emin, true); 329 SortMinDown(axis, emin, true);
330 330
331 if (dmax > 0) 331 if (dmax > 0)
332 SortMaxUp(axis, emax, true); 332 SortMaxUp(axis, emax, true);
333 333
334 // shrink (only removes overlaps) 334 // shrink (only removes overlaps)
335 if (dmin > 0) 335 if (dmin > 0)
336 SortMinUp(axis, emin, true); 336 SortMinUp(axis, emin, true);
337 337
338 if (dmax < 0) 338 if (dmax < 0)
339 SortMaxDown(axis, emax, true); 339 SortMaxDown(axis, emax, true);
340 } 340 }
341 } 341 }
342 342
343 private void Quantize(out ushort[] result, Vector3 point, int isMax) 343 private void Quantize(out ushort[] result, Vector3 point, int isMax)
344 { 344 {
345 Vector3 clampedPoint = new Vector3( 345 Vector3 clampedPoint = new Vector3(
346 point.X, 346 point.X,
347 point.Y, 347 point.Y,
348 point.Z 348 point.Z
349 ); 349 );
350 350
351 MathHelper.SetMax(ref clampedPoint, _worldAabbMin); 351 MathHelper.SetMax(ref clampedPoint, _worldAabbMin);
352 MathHelper.SetMin(ref clampedPoint, _worldAabbMax); 352 MathHelper.SetMin(ref clampedPoint, _worldAabbMax);
353 353
354 Vector3 v = (clampedPoint - _worldAabbMin) * _quantize; 354 Vector3 v = (clampedPoint - _worldAabbMin) * _quantize;
355 355
356 result = new ushort[3]; 356 result = new ushort[3];
357 result[0] = (ushort)(((int)v.X & 0xfffe) | isMax); 357 result[0] = (ushort)(((int)v.X & 0xfffe) | isMax);
358 result[1] = (ushort)(((int)v.Y & 0xfffe) | isMax); 358 result[1] = (ushort)(((int)v.Y & 0xfffe) | isMax);
359 result[2] = (ushort)(((int)v.Z & 0xfffe) | isMax); 359 result[2] = (ushort)(((int)v.Z & 0xfffe) | isMax);
360 } 360 }
361 361
362 private void SortMinDown(int axis, ushort edge, bool updateOverlaps) 362 private void SortMinDown(int axis, ushort edge, bool updateOverlaps)
363 { 363 {
364 Edge pEdge = _edges[axis][edge]; 364 Edge pEdge = _edges[axis][edge];
365 Edge pPrev = _edges[axis][edge - 1]; 365 Edge pPrev = _edges[axis][edge - 1];
366 Handle pHandleEdge = GetHandle(pEdge.Handle); 366 Handle pHandleEdge = GetHandle(pEdge.Handle);
367 367
368 while (pEdge.Position < pPrev.Position) 368 while (pEdge.Position < pPrev.Position)
369 { 369 {
370 Handle pHandlePrev = GetHandle(pPrev.Handle); 370 Handle pHandlePrev = GetHandle(pPrev.Handle);
371 371
372 if (pPrev.IsMax()) 372 if (pPrev.IsMax())
373 { 373 {
374 // if previous edge is a maximum check the bounds and add an overlap if necessary 374 // if previous edge is a maximum check the bounds and add an overlap if necessary
375 if (updateOverlaps && TestOverlap(axis, pHandleEdge, pHandlePrev)) 375 if (updateOverlaps && TestOverlap(axis, pHandleEdge, pHandlePrev))
376 { 376 {
377 AddOverlappingPair(pHandleEdge, pHandlePrev); 377 AddOverlappingPair(pHandleEdge, pHandlePrev);
378 } 378 }
379 379
380 // update edge reference in other handle 380 // update edge reference in other handle
381 pHandlePrev.MaxEdges[axis]++; 381 pHandlePrev.MaxEdges[axis]++;
382 } 382 }
383 else 383 else
384 pHandlePrev.MinEdges[axis]++; 384 pHandlePrev.MinEdges[axis]++;
385 385
386 pHandleEdge.MinEdges[axis]--; 386 pHandleEdge.MinEdges[axis]--;
387 387
388 // swap the edges 388 // swap the edges
389 pEdge.Swap(ref pPrev); 389 pEdge.Swap(ref pPrev);
390 390
391 // decrement 391 // decrement
392 edge--; 392 edge--;
393 pEdge = _edges[axis][edge]; 393 pEdge = _edges[axis][edge];
394 pPrev = _edges[axis][edge - 1]; 394 pPrev = _edges[axis][edge - 1];
395 } 395 }
396 } 396 }
397 397
398 private void SortMinUp(int axis, ushort edge, bool updateOverlaps) 398 private void SortMinUp(int axis, ushort edge, bool updateOverlaps)
399 { 399 {
400 Edge pEdge = _edges[axis][edge]; 400 Edge pEdge = _edges[axis][edge];
401 Edge pNext = _edges[axis][edge + 1]; 401 Edge pNext = _edges[axis][edge + 1];
402 Handle pHandleEdge = GetHandle(pEdge.Handle); 402 Handle pHandleEdge = GetHandle(pEdge.Handle);
403 403
404 while ((pNext.Handle != 0) && (pEdge.Position >= pNext.Position)) 404 while ((pNext.Handle != 0) && (pEdge.Position >= pNext.Position))
405 { 405 {
406 Handle pHandleNext = GetHandle(pNext.Handle); 406 Handle pHandleNext = GetHandle(pNext.Handle);
407 407
408 if (pNext.IsMax()) 408 if (pNext.IsMax())
409 { 409 {
410 // if next edge is maximum remove any overlap between the two handles 410 // if next edge is maximum remove any overlap between the two handles
411 if (updateOverlaps) 411 if (updateOverlaps)
412 { 412 {
413 //Handle handle0 = GetHandle(pEdge.Handle); 413 //Handle handle0 = GetHandle(pEdge.Handle);
414 //Handle handle1 = GetHandle(pNext.Handle); 414 //Handle handle1 = GetHandle(pNext.Handle);
415 //BroadphasePair tmpPair = new BroadphasePair(handle0, handle1); 415 //BroadphasePair tmpPair = new BroadphasePair(handle0, handle1);
416 //RemoveOverlappingPair(tmpPair); 416 //RemoveOverlappingPair(tmpPair);
417 } 417 }
418 418
419 // update edge reference in other handle 419 // update edge reference in other handle
420 pHandleNext.MaxEdges[axis]--; 420 pHandleNext.MaxEdges[axis]--;
421 } 421 }
422 else 422 else
423 pHandleNext.MinEdges[axis]--; 423 pHandleNext.MinEdges[axis]--;
424 424
425 pHandleEdge.MinEdges[axis]++; 425 pHandleEdge.MinEdges[axis]++;
426 426
427 // swap the edges 427 // swap the edges
428 pEdge.Swap(ref pNext); 428 pEdge.Swap(ref pNext);
429 429
430 // increment 430 // increment
431 edge++; 431 edge++;
432 pEdge = _edges[axis][edge]; 432 pEdge = _edges[axis][edge];
433 pNext = _edges[axis][edge + 1]; 433 pNext = _edges[axis][edge + 1];
434 } 434 }
435 } 435 }
436 436
437 private void SortMaxDown(int axis, ushort edge, bool updateOverlaps) 437 private void SortMaxDown(int axis, ushort edge, bool updateOverlaps)
438 { 438 {
439 Edge pEdge = _edges[axis][edge]; 439 Edge pEdge = _edges[axis][edge];
440 Edge pPrev = _edges[axis][edge - 1]; 440 Edge pPrev = _edges[axis][edge - 1];
441 Handle pHandleEdge = GetHandle(pEdge.Handle); 441 Handle pHandleEdge = GetHandle(pEdge.Handle);
442 442
443 while (pEdge.Position < pPrev.Position) 443 while (pEdge.Position < pPrev.Position)
444 { 444 {
445 Handle pHandlePrev = GetHandle(pPrev.Handle); 445 Handle pHandlePrev = GetHandle(pPrev.Handle);
446 446
447 if (!pPrev.IsMax()) 447 if (!pPrev.IsMax())
448 { 448 {
449 // if previous edge was a minimum remove any overlap between the two handles 449 // if previous edge was a minimum remove any overlap between the two handles
450 if (updateOverlaps) 450 if (updateOverlaps)
451 { 451 {
452 //this is done during the overlappingpairarray iteration/narrowphase collision 452 //this is done during the overlappingpairarray iteration/narrowphase collision
453 //Handle handle0 = GetHandle(pEdge.Handle); 453 //Handle handle0 = GetHandle(pEdge.Handle);
454 //Handle handle1 = GetHandle(pPrev.Handle); 454 //Handle handle1 = GetHandle(pPrev.Handle);
455 //BroadphasePair pair = FindPair(handle0, handle1); 455 //BroadphasePair pair = FindPair(handle0, handle1);
456 456
457 //if (pair != null) 457 //if (pair != null)
458 //{ 458 //{
459 // RemoveOverlappingPair(pair); 459 // RemoveOverlappingPair(pair);
460 //} 460 //}
461 } 461 }
462 462
463 // update edge reference in other handle 463 // update edge reference in other handle
464 pHandlePrev.MinEdges[axis]++; ; 464 pHandlePrev.MinEdges[axis]++; ;
465 } 465 }
466 else 466 else
467 pHandlePrev.MaxEdges[axis]++; 467 pHandlePrev.MaxEdges[axis]++;
468 468
469 pHandleEdge.MaxEdges[axis]--; 469 pHandleEdge.MaxEdges[axis]--;
470 470
471 // swap the edges 471 // swap the edges
472 pEdge.Swap(ref pPrev); 472 pEdge.Swap(ref pPrev);
473 473
474 // decrement 474 // decrement
475 edge--; 475 edge--;
476 pEdge = _edges[axis][edge]; 476 pEdge = _edges[axis][edge];
477 pPrev = _edges[axis][edge - 1]; 477 pPrev = _edges[axis][edge - 1];
478 } 478 }
479 } 479 }
480 480
481 private void SortMaxUp(int axis, ushort edge, bool updateOverlaps) 481 private void SortMaxUp(int axis, ushort edge, bool updateOverlaps)
482 { 482 {
483 Edge pEdge = _edges[axis][edge]; 483 Edge pEdge = _edges[axis][edge];
484 Edge pNext = _edges[axis][edge + 1]; 484 Edge pNext = _edges[axis][edge + 1];
485 Handle pHandleEdge = GetHandle(pEdge.Handle); 485 Handle pHandleEdge = GetHandle(pEdge.Handle);
486 486
487 while ((pNext.Handle!=0) && (pEdge.Position >= pNext.Position)) 487 while ((pNext.Handle!=0) && (pEdge.Position >= pNext.Position))
488 { 488 {
489 Handle pHandleNext = GetHandle(pNext.Handle); 489 Handle pHandleNext = GetHandle(pNext.Handle);
490 490
491 if (!pNext.IsMax()) 491 if (!pNext.IsMax())
492 { 492 {
493 // if next edge is a minimum check the bounds and add an overlap if necessary 493 // if next edge is a minimum check the bounds and add an overlap if necessary
494 if (updateOverlaps && TestOverlap(axis, pHandleEdge, pHandleNext)) 494 if (updateOverlaps && TestOverlap(axis, pHandleEdge, pHandleNext))
495 { 495 {
496 Handle handle0 = GetHandle(pEdge.Handle); 496 Handle handle0 = GetHandle(pEdge.Handle);
497 Handle handle1 = GetHandle(pNext.Handle); 497 Handle handle1 = GetHandle(pNext.Handle);
498 AddOverlappingPair(handle0, handle1); 498 AddOverlappingPair(handle0, handle1);
499 } 499 }
500 500
501 // update edge reference in other handle 501 // update edge reference in other handle
502 pHandleNext.MinEdges[axis]--; 502 pHandleNext.MinEdges[axis]--;
503 } 503 }
504 else 504 else
505 pHandleNext.MaxEdges[axis]--; 505 pHandleNext.MaxEdges[axis]--;
506 506
507 pHandleEdge.MaxEdges[axis]++; 507 pHandleEdge.MaxEdges[axis]++;
508 508
509 // swap the edges 509 // swap the edges
510 pEdge.Swap(ref pNext); 510 pEdge.Swap(ref pNext);
511 511
512 // increment 512 // increment
513 edge++; 513 edge++;
514 pEdge = _edges[axis][edge]; 514 pEdge = _edges[axis][edge];
515 pNext = _edges[axis][edge + 1]; 515 pNext = _edges[axis][edge + 1];
516 } 516 }
517 } 517 }
518 518
519 #region Abstract 519 #region Abstract
520 520
521 public override void RefreshOverlappingPairs() 521 public override void RefreshOverlappingPairs()
522 { 522 {
523 } 523 }
524 524
525 public override BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask) 525 public override BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask)
526 { 526 {
527 ushort handleId = AddHandle(min, max, userData, collisionFilterGroup, collisionFilterMask); 527 ushort handleId = AddHandle(min, max, userData, collisionFilterGroup, collisionFilterMask);
528 528
529 Handle handle = GetHandle(handleId); 529 Handle handle = GetHandle(handleId);
530 530
531 return handle; 531 return handle;
532 } 532 }
533 533
534 public override void DestroyProxy(BroadphaseProxy proxy) 534 public override void DestroyProxy(BroadphaseProxy proxy)
535 { 535 {
536 Handle handle = proxy as Handle; 536 Handle handle = proxy as Handle;
537 RemoveHandle(handle.HandleID); 537 RemoveHandle(handle.HandleID);
538 } 538 }
539 539
540 public override void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax) 540 public override void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax)
541 { 541 {
542 Handle handle = proxy as Handle; 542 Handle handle = proxy as Handle;
543 UpdateHandle(handle.HandleID, aabbMin, aabbMax); 543 UpdateHandle(handle.HandleID, aabbMin, aabbMax);
544 } 544 }
545 #endregion 545 #endregion
546 } 546 }
547 547
548 public class Edge 548 public class Edge
549 { 549 {
550 ushort position; 550 ushort position;
551 ushort handle; 551 ushort handle;
552 552
553 public ushort Position 553 public ushort Position
554 { 554 {
555 get { return position; } 555 get { return position; }
556 set { position = value; } 556 set { position = value; }
557 } 557 }
558 558
559 public ushort Handle 559 public ushort Handle
560 { 560 {
561 get { return handle; } 561 get { return handle; }
562 set { handle = value; } 562 set { handle = value; }
563 } 563 }
564 564
565 public bool IsMax() 565 public bool IsMax()
566 { 566 {
567 return (position & (ushort)1) == 1; 567 return (position & (ushort)1) == 1;
568 } 568 }
569 569
570 public void Swap(ref Edge e) 570 public void Swap(ref Edge e)
571 { 571 {
572 ushort tmpPosition = this.position; 572 ushort tmpPosition = this.position;
573 ushort tmpHandle = this.handle; 573 ushort tmpHandle = this.handle;
574 this.position = e.position; 574 this.position = e.position;
575 this.handle = e.handle; 575 this.handle = e.handle;
576 e.position = tmpPosition; 576 e.position = tmpPosition;
577 e.handle = tmpHandle; 577 e.handle = tmpHandle;
578 } 578 }
579 } 579 }
580 580
581 public class Handle: BroadphaseProxy 581 public class Handle: BroadphaseProxy
582 { 582 {
583 ushort[] minEdges, maxEdges; 583 ushort[] minEdges, maxEdges;
584 ushort pad; 584 ushort pad;
585 ushort handleID; 585 ushort handleID;
586 586
587 public ushort[] MinEdges 587 public ushort[] MinEdges
588 { 588 {
589 get { return minEdges; } 589 get { return minEdges; }
590 set { minEdges = value; } 590 set { minEdges = value; }
591 } 591 }
592 592
593 public ushort[] MaxEdges 593 public ushort[] MaxEdges
594 { 594 {
595 get { return maxEdges; } 595 get { return maxEdges; }
596 set { maxEdges = value; } 596 set { maxEdges = value; }
597 } 597 }
598 598
599 public ushort HandleID 599 public ushort HandleID
600 { 600 {
601 get { return handleID; } 601 get { return handleID; }
602 set { handleID = value; } 602 set { handleID = value; }
603 } 603 }
604 604
605 public ushort Pad 605 public ushort Pad
606 { 606 {
607 get { return pad; } 607 get { return pad; }
608 set { pad = value; } 608 set { pad = value; }
609 } 609 }
610 610
611 public ushort NextFree 611 public ushort NextFree
612 { 612 {
613 get { return minEdges[0]; } 613 get { return minEdges[0]; }
614 set { minEdges[0] = value;} 614 set { minEdges[0] = value;}
615 } 615 }
616 616
617 public Handle() 617 public Handle()
618 { 618 {
619 minEdges = new ushort[3]; 619 minEdges = new ushort[3];
620 maxEdges = new ushort[3]; 620 maxEdges = new ushort[3];
621 } 621 }
622 } 622 }
623} 623}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseNativeTypes.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseNativeTypes.cs
index dcfd0d8..eb1fd4b 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseNativeTypes.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseNativeTypes.cs
@@ -1,68 +1,68 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 /// Dispatcher uses these types 28 /// Dispatcher uses these types
29 /// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave 29 /// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave
30 /// to facilitate type checking 30 /// to facilitate type checking
31 public enum BroadphaseNativeTypes 31 public enum BroadphaseNativeTypes
32 { 32 {
33 // polyhedral convex shapes 33 // polyhedral convex shapes
34 Box, 34 Box,
35 Triangle, 35 Triangle,
36 Tetrahedral, 36 Tetrahedral,
37 ConvexTriangleMesh, 37 ConvexTriangleMesh,
38 ConvexHull, 38 ConvexHull,
39 //implicit convex shapes 39 //implicit convex shapes
40 ImplicitConvexShapes, 40 ImplicitConvexShapes,
41 Sphere, 41 Sphere,
42 MultiSphere, 42 MultiSphere,
43 Capsule, 43 Capsule,
44 Cone, 44 Cone,
45 Convex, 45 Convex,
46 Cylinder, 46 Cylinder,
47 MinkowskiSum, 47 MinkowskiSum,
48 MinkowskiDifference, 48 MinkowskiDifference,
49 //concave shapes 49 //concave shapes
50 ConcaveShapesStart, 50 ConcaveShapesStart,
51 //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy! 51 //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy!
52 TriangleMesh, 52 TriangleMesh,
53 //used for demo integration FAST/Swift collision library and Bullet 53 //used for demo integration FAST/Swift collision library and Bullet
54 FastConcaveMesh, 54 FastConcaveMesh,
55 //terrain 55 //terrain
56 Terrain, 56 Terrain,
57 //Used for GIMPACT Trimesh integration 57 //Used for GIMPACT Trimesh integration
58 Gimpact, 58 Gimpact,
59 59
60 Empty, 60 Empty,
61 StaticPlane, 61 StaticPlane,
62 ConcaveShapesEnd, 62 ConcaveShapesEnd,
63 63
64 Compound, 64 Compound,
65 65
66 MaxBroadphaseCollisionTypes, 66 MaxBroadphaseCollisionTypes,
67 } 67 }
68} 68}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphasePair.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphasePair.cs
index 2b9e114..eec77ac 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphasePair.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphasePair.cs
@@ -1,113 +1,113 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public class BroadphasePair 28 public class BroadphasePair
29 { 29 {
30 private BroadphaseProxy _proxyA; 30 private BroadphaseProxy _proxyA;
31 private BroadphaseProxy _proxyB; 31 private BroadphaseProxy _proxyB;
32 32
33 private CollisionAlgorithm _algorithm; 33 private CollisionAlgorithm _algorithm;
34 private object _userInfo; 34 private object _userInfo;
35 35
36 public BroadphasePair() 36 public BroadphasePair()
37 { 37 {
38 } 38 }
39 39
40 public BroadphasePair(BroadphasePair other) 40 public BroadphasePair(BroadphasePair other)
41 { 41 {
42 _proxyA = other._proxyA; 42 _proxyA = other._proxyA;
43 _proxyB = other._proxyB; 43 _proxyB = other._proxyB;
44 44
45 _algorithm = other._algorithm; 45 _algorithm = other._algorithm;
46 _userInfo = null; 46 _userInfo = null;
47 } 47 }
48 48
49 public BroadphasePair(BroadphaseProxy proxyA, BroadphaseProxy proxyB) 49 public BroadphasePair(BroadphaseProxy proxyA, BroadphaseProxy proxyB)
50 { 50 {
51 _proxyA = proxyA; 51 _proxyA = proxyA;
52 _proxyB = proxyB; 52 _proxyB = proxyB;
53 53
54 _algorithm = null; 54 _algorithm = null;
55 _userInfo = null; 55 _userInfo = null;
56 } 56 }
57 57
58 public BroadphaseProxy ProxyA { get { return _proxyA; } set { _proxyA = value; } } 58 public BroadphaseProxy ProxyA { get { return _proxyA; } set { _proxyA = value; } }
59 public BroadphaseProxy ProxyB { get { return _proxyB; } set { _proxyB = value; } } 59 public BroadphaseProxy ProxyB { get { return _proxyB; } set { _proxyB = value; } }
60 60
61 public CollisionAlgorithm CollisionAlgorithm { get { return _algorithm; } set { _algorithm = value; } } 61 public CollisionAlgorithm CollisionAlgorithm { get { return _algorithm; } set { _algorithm = value; } }
62 public object UserInfo { get { return _userInfo; } set { _userInfo = value; } } 62 public object UserInfo { get { return _userInfo; } set { _userInfo = value; } }
63 63
64 public override int GetHashCode() 64 public override int GetHashCode()
65 { 65 {
66 return _proxyA.GetHashCode() ^ _proxyB.GetHashCode(); 66 return _proxyA.GetHashCode() ^ _proxyB.GetHashCode();
67 } 67 }
68 68
69 public override bool Equals(object obj) 69 public override bool Equals(object obj)
70 { 70 {
71 if (obj is BroadphasePair) 71 if (obj is BroadphasePair)
72 return this == (BroadphasePair)obj; 72 return this == (BroadphasePair)obj;
73 return false; 73 return false;
74 } 74 }
75 75
76 public static int ComparisonSort(BroadphasePair a, BroadphasePair b) 76 public static int ComparisonSort(BroadphasePair a, BroadphasePair b)
77 { 77 {
78 int aAId = a.ProxyA != null ? a.ProxyA.ComparisonID : -1; 78 int aAId = a.ProxyA != null ? a.ProxyA.ComparisonID : -1;
79 int aBId = a.ProxyB != null ? a.ProxyB.ComparisonID : -1; 79 int aBId = a.ProxyB != null ? a.ProxyB.ComparisonID : -1;
80 int aCId = a.CollisionAlgorithm != null ? a.CollisionAlgorithm.ComparisonID : -1; 80 int aCId = a.CollisionAlgorithm != null ? a.CollisionAlgorithm.ComparisonID : -1;
81 int bAId = b.ProxyA != null ? b.ProxyA.ComparisonID : -1; 81 int bAId = b.ProxyA != null ? b.ProxyA.ComparisonID : -1;
82 int bBId = b.ProxyB != null ? b.ProxyB.ComparisonID : -1; 82 int bBId = b.ProxyB != null ? b.ProxyB.ComparisonID : -1;
83 int bCId = b.CollisionAlgorithm != null ? b.CollisionAlgorithm.ComparisonID : -1; 83 int bCId = b.CollisionAlgorithm != null ? b.CollisionAlgorithm.ComparisonID : -1;
84 84
85 if (aAId > bAId || 85 if (aAId > bAId ||
86 (a.ProxyA == b.ProxyA && aBId > bBId) || 86 (a.ProxyA == b.ProxyA && aBId > bBId) ||
87 (a.ProxyA == b.ProxyA && a.ProxyB == b.ProxyB && aCId > bCId)) 87 (a.ProxyA == b.ProxyA && a.ProxyB == b.ProxyB && aCId > bCId))
88 return -1; 88 return -1;
89 else 89 else
90 return 1; 90 return 1;
91 } 91 }
92 92
93 public static bool operator ==(BroadphasePair a, BroadphasePair b) 93 public static bool operator ==(BroadphasePair a, BroadphasePair b)
94 { 94 {
95 if (object.Equals(a, null) && object.Equals(b, null)) 95 if (object.Equals(a, null) && object.Equals(b, null))
96 return true; 96 return true;
97 if (object.Equals(a, null) || object.Equals(b, null)) 97 if (object.Equals(a, null) || object.Equals(b, null))
98 return false; 98 return false;
99 99
100 return (a.ProxyA == b.ProxyA) && (a.ProxyB == b.ProxyB); 100 return (a.ProxyA == b.ProxyA) && (a.ProxyB == b.ProxyB);
101 } 101 }
102 102
103 public static bool operator !=(BroadphasePair a, BroadphasePair b) 103 public static bool operator !=(BroadphasePair a, BroadphasePair b)
104 { 104 {
105 if (object.Equals(a, null) && object.Equals(b, null)) 105 if (object.Equals(a, null) && object.Equals(b, null))
106 return true; 106 return true;
107 if (object.Equals(a, null) || object.Equals(b, null)) 107 if (object.Equals(a, null) || object.Equals(b, null))
108 return false; 108 return false;
109 109
110 return (a.ProxyA != b.ProxyA) || (a.ProxyB != b.ProxyB); 110 return (a.ProxyA != b.ProxyA) || (a.ProxyB != b.ProxyB);
111 } 111 }
112 } 112 }
113} 113}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseProxy.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseProxy.cs
index aed82d5..0abc613 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseProxy.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/BroadphaseProxy.cs
@@ -1,91 +1,91 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public class BroadphaseProxy 28 public class BroadphaseProxy
29 { 29 {
30 //Usually the client CollisionObject or Rigidbody class 30 //Usually the client CollisionObject or Rigidbody class
31 private object _clientObject; 31 private object _clientObject;
32 private CollisionFilterGroups _collisionFilterGroup; 32 private CollisionFilterGroups _collisionFilterGroup;
33 private CollisionFilterGroups _collisionFilterMask; 33 private CollisionFilterGroups _collisionFilterMask;
34 private readonly int _comparisonID; 34 private readonly int _comparisonID;
35 35
36 private static int _globalCount = 0; 36 private static int _globalCount = 0;
37 37
38 public BroadphaseProxy() 38 public BroadphaseProxy()
39 { 39 {
40 _comparisonID = _globalCount++; 40 _comparisonID = _globalCount++;
41 } 41 }
42 42
43 public BroadphaseProxy(object userData, CollisionFilterGroups collisionFilterGroup, CollisionFilterGroups collisionFilterMask) 43 public BroadphaseProxy(object userData, CollisionFilterGroups collisionFilterGroup, CollisionFilterGroups collisionFilterMask)
44 : this() 44 : this()
45 { 45 {
46 _clientObject = userData; 46 _clientObject = userData;
47 _collisionFilterGroup = collisionFilterGroup; 47 _collisionFilterGroup = collisionFilterGroup;
48 _collisionFilterMask = collisionFilterMask; 48 _collisionFilterMask = collisionFilterMask;
49 } 49 }
50 50
51 public object ClientData { get { return _clientObject; } set { _clientObject = value; } } 51 public object ClientData { get { return _clientObject; } set { _clientObject = value; } }
52 public CollisionFilterGroups CollisionFilterGroup { get { return _collisionFilterGroup; } set { _collisionFilterGroup = value; } } 52 public CollisionFilterGroups CollisionFilterGroup { get { return _collisionFilterGroup; } set { _collisionFilterGroup = value; } }
53 public CollisionFilterGroups CollisionFilterMask { get { return _collisionFilterMask; } set { _collisionFilterMask = value; } } 53 public CollisionFilterGroups CollisionFilterMask { get { return _collisionFilterMask; } set { _collisionFilterMask = value; } }
54 internal int ComparisonID { get { return _comparisonID; } } 54 internal int ComparisonID { get { return _comparisonID; } }
55 55
56 public static bool IsPolyhedral(BroadphaseNativeTypes proxyType) 56 public static bool IsPolyhedral(BroadphaseNativeTypes proxyType)
57 { 57 {
58 return (proxyType < BroadphaseNativeTypes.ImplicitConvexShapes); 58 return (proxyType < BroadphaseNativeTypes.ImplicitConvexShapes);
59 } 59 }
60 60
61 public static bool IsConvex(BroadphaseNativeTypes proxyType) 61 public static bool IsConvex(BroadphaseNativeTypes proxyType)
62 { 62 {
63 return (proxyType < BroadphaseNativeTypes.ConcaveShapesStart); 63 return (proxyType < BroadphaseNativeTypes.ConcaveShapesStart);
64 } 64 }
65 65
66 public static bool IsConcave(BroadphaseNativeTypes proxyType) 66 public static bool IsConcave(BroadphaseNativeTypes proxyType)
67 { 67 {
68 return ((proxyType > BroadphaseNativeTypes.ConcaveShapesStart) && 68 return ((proxyType > BroadphaseNativeTypes.ConcaveShapesStart) &&
69 (proxyType < BroadphaseNativeTypes.ConcaveShapesEnd)); 69 (proxyType < BroadphaseNativeTypes.ConcaveShapesEnd));
70 } 70 }
71 public static bool IsCompound(BroadphaseNativeTypes proxyType) 71 public static bool IsCompound(BroadphaseNativeTypes proxyType)
72 { 72 {
73 return (proxyType == BroadphaseNativeTypes.Compound); 73 return (proxyType == BroadphaseNativeTypes.Compound);
74 } 74 }
75 public static bool IsInfinite(BroadphaseNativeTypes proxyType) 75 public static bool IsInfinite(BroadphaseNativeTypes proxyType)
76 { 76 {
77 return (proxyType == BroadphaseNativeTypes.StaticPlane); 77 return (proxyType == BroadphaseNativeTypes.StaticPlane);
78 } 78 }
79 79
80 //optional filtering to cull potential collisions 80 //optional filtering to cull potential collisions
81 public enum CollisionFilterGroups 81 public enum CollisionFilterGroups
82 { 82 {
83 Default = 1, 83 Default = 1,
84 Static = 2, 84 Static = 2,
85 Kinematic = 4, 85 Kinematic = 4,
86 Debris = 8, 86 Debris = 8,
87 Sensor = 16, 87 Sensor = 16,
88 All = Default | Static | Kinematic | Debris | Sensor, 88 All = Default | Static | Kinematic | Debris | Sensor,
89 } 89 }
90 } 90 }
91} 91}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithm.cs
index 1e59ad8..387340d 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithm.cs
@@ -1,51 +1,51 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 /// <summary> 28 /// <summary>
29 /// CollisionAlgorithm is an collision interface that is compatible with the Broadphase and Dispatcher. 29 /// CollisionAlgorithm is an collision interface that is compatible with the Broadphase and Dispatcher.
30 /// It is persistent over frames 30 /// It is persistent over frames
31 /// </summary> 31 /// </summary>
32 public abstract class CollisionAlgorithm 32 public abstract class CollisionAlgorithm
33 { 33 {
34 private IDispatcher _dispatcher; 34 private IDispatcher _dispatcher;
35 private readonly int _comparisonID = 0; 35 private readonly int _comparisonID = 0;
36 36
37 private static int _globalCount = 0; 37 private static int _globalCount = 0;
38 38
39 public CollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo) 39 public CollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo)
40 { 40 {
41 _comparisonID = _globalCount++; 41 _comparisonID = _globalCount++;
42 _dispatcher = collisionAlgorithmConstructionInfo.Dispatcher; 42 _dispatcher = collisionAlgorithmConstructionInfo.Dispatcher;
43 } 43 }
44 44
45 protected IDispatcher Dispatcher { get { return _dispatcher; } set { _dispatcher = value; } } 45 protected IDispatcher Dispatcher { get { return _dispatcher; } set { _dispatcher = value; } }
46 internal int ComparisonID { get { return _comparisonID; } } 46 internal int ComparisonID { get { return _comparisonID; } }
47 47
48 public abstract void ProcessCollision(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut); 48 public abstract void ProcessCollision(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut);
49 public abstract float CalculateTimeOfImpact(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut); 49 public abstract float CalculateTimeOfImpact(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut);
50 } 50 }
51} 51}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithmConstructionInfo.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithmConstructionInfo.cs
index 381752a..de238b9 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithmConstructionInfo.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/CollisionAlgorithmConstructionInfo.cs
@@ -1,42 +1,42 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public struct CollisionAlgorithmConstructionInfo 28 public struct CollisionAlgorithmConstructionInfo
29 { 29 {
30 private IDispatcher _dispatcher; 30 private IDispatcher _dispatcher;
31 private PersistentManifold _manifold; 31 private PersistentManifold _manifold;
32 32
33 public CollisionAlgorithmConstructionInfo(IDispatcher dispatcher) 33 public CollisionAlgorithmConstructionInfo(IDispatcher dispatcher)
34 { 34 {
35 _dispatcher = dispatcher; 35 _dispatcher = dispatcher;
36 _manifold = null; 36 _manifold = null;
37 } 37 }
38 38
39 public IDispatcher Dispatcher { get { return _dispatcher; } set { _dispatcher = value; } } 39 public IDispatcher Dispatcher { get { return _dispatcher; } set { _dispatcher = value; } }
40 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } } 40 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } }
41 } 41 }
42} 42}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/DispatcherInfo.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/DispatcherInfo.cs
index 8c0367f..cde3221 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/DispatcherInfo.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/DispatcherInfo.cs
@@ -1,54 +1,54 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public enum DispatchFunction 28 public enum DispatchFunction
29 { 29 {
30 Discrete = 1, 30 Discrete = 1,
31 Continuous, 31 Continuous,
32 } 32 }
33 33
34 public class DispatcherInfo 34 public class DispatcherInfo
35 { 35 {
36 private float _timeStep; 36 private float _timeStep;
37 private int _stepCount; 37 private int _stepCount;
38 private DispatchFunction _dispatchFunc = DispatchFunction.Discrete; 38 private DispatchFunction _dispatchFunc = DispatchFunction.Discrete;
39 private float _timeOfImpact = 1; 39 private float _timeOfImpact = 1;
40 private bool _useContinuous; 40 private bool _useContinuous;
41 private bool _enableSatConvex; 41 private bool _enableSatConvex;
42 private bool _enableSpu; 42 private bool _enableSpu;
43 private IDebugDraw _debugDraw; 43 private IDebugDraw _debugDraw;
44 44
45 public float TimeStep { get { return _timeStep; } set { _timeStep = value; } } 45 public float TimeStep { get { return _timeStep; } set { _timeStep = value; } }
46 public int StepCount { get { return _stepCount; } set { _stepCount = value; } } 46 public int StepCount { get { return _stepCount; } set { _stepCount = value; } }
47 public DispatchFunction DispatchFunction { get { return _dispatchFunc; } set { _dispatchFunc = value; } } 47 public DispatchFunction DispatchFunction { get { return _dispatchFunc; } set { _dispatchFunc = value; } }
48 public float TimeOfImpact { get { return _timeOfImpact; } set { _timeOfImpact = value; } } 48 public float TimeOfImpact { get { return _timeOfImpact; } set { _timeOfImpact = value; } }
49 public bool UseContinuous { get { return _useContinuous; } set { _useContinuous = value; } } 49 public bool UseContinuous { get { return _useContinuous; } set { _useContinuous = value; } }
50 public bool EnableSatConvex { get { return _enableSatConvex; } set { _enableSatConvex = value; } } 50 public bool EnableSatConvex { get { return _enableSatConvex; } set { _enableSatConvex = value; } }
51 public bool enableSpu { get { return _enableSpu; } set { _enableSpu = value; } } 51 public bool enableSpu { get { return _enableSpu; } set { _enableSpu = value; } }
52 public IDebugDraw DebugDraw { get { return _debugDraw; } set { _debugDraw = value; } } 52 public IDebugDraw DebugDraw { get { return _debugDraw; } set { _debugDraw = value; } }
53 } 53 }
54} 54}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IBroadphase.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IBroadphase.cs
index 89618af..fddd8af 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IBroadphase.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IBroadphase.cs
@@ -1,36 +1,36 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public interface IBroadphase 29 public interface IBroadphase
30 { 30 {
31 BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask); 31 BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask);
32 void DestroyProxy(BroadphaseProxy proxy); 32 void DestroyProxy(BroadphaseProxy proxy);
33 void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax); 33 void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax);
34 void CleanProxyFromPairs(BroadphaseProxy proxy); 34 void CleanProxyFromPairs(BroadphaseProxy proxy);
35 } 35 }
36} 36}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IDispatcher.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IDispatcher.cs
index 52831b7..7677179 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IDispatcher.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IDispatcher.cs
@@ -1,42 +1,42 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public interface IDispatcher 28 public interface IDispatcher
29 { 29 {
30 CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB, PersistentManifold sharedManifold); 30 CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB, PersistentManifold sharedManifold);
31 CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB); 31 CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB);
32 PersistentManifold GetNewManifold(object bodyA, object bodyB); 32 PersistentManifold GetNewManifold(object bodyA, object bodyB);
33 void ReleaseManifold(PersistentManifold manifold); 33 void ReleaseManifold(PersistentManifold manifold);
34 void ClearManifold(PersistentManifold manifold); 34 void ClearManifold(PersistentManifold manifold);
35 bool NeedsCollision(CollisionObject bodyA, CollisionObject bodyB); 35 bool NeedsCollision(CollisionObject bodyA, CollisionObject bodyB);
36 bool NeedsResponse(CollisionObject bodyA, CollisionObject bodyB); 36 bool NeedsResponse(CollisionObject bodyA, CollisionObject bodyB);
37 void DispatchAllCollisionPairs(OverlappingPairCache pairCache, DispatcherInfo dispatchInfo); 37 void DispatchAllCollisionPairs(OverlappingPairCache pairCache, DispatcherInfo dispatchInfo);
38 PersistentManifold GetManifoldByIndex(int index); 38 PersistentManifold GetManifoldByIndex(int index);
39 39
40 int ManifoldCount { get; } 40 int ManifoldCount { get; }
41 } 41 }
42} 42}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IOverlapCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IOverlapCallback.cs
index 4e128da..2456911 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IOverlapCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/IOverlapCallback.cs
@@ -1,33 +1,33 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public interface IOverlapCallback 28 public interface IOverlapCallback
29 { 29 {
30 //return true for deletion of the pair 30 //return true for deletion of the pair
31 bool ProcessOverlap(ref BroadphasePair pair); 31 bool ProcessOverlap(ref BroadphasePair pair);
32 } 32 }
33} 33}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/OverlappingPairCache.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/OverlappingPairCache.cs
index 165912a..6548560 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/OverlappingPairCache.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/OverlappingPairCache.cs
@@ -1,159 +1,159 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public abstract class OverlappingPairCache : IBroadphase 28 public abstract class OverlappingPairCache : IBroadphase
29 { 29 {
30 private static int _overlappingPairCount = 0; 30 private static int _overlappingPairCount = 0;
31 private List<BroadphasePair> _overlappingPairs = new List<BroadphasePair>(); 31 private List<BroadphasePair> _overlappingPairs = new List<BroadphasePair>();
32 //during the dispatch, check that user doesn't destroy/create proxy 32 //during the dispatch, check that user doesn't destroy/create proxy
33 private bool _blockedForChanges; 33 private bool _blockedForChanges;
34 34
35 public List<BroadphasePair> OverlappingPairs { get { return _overlappingPairs; } set { _overlappingPairs = value; } } 35 public List<BroadphasePair> OverlappingPairs { get { return _overlappingPairs; } set { _overlappingPairs = value; } }
36 public bool BlockedForChanges { get { return _blockedForChanges; } set { _blockedForChanges = value; } } 36 public bool BlockedForChanges { get { return _blockedForChanges; } set { _blockedForChanges = value; } }
37 37
38 public static int OverlappingPairCount { get { return _overlappingPairCount; } set { _overlappingPairCount = value; } } 38 public static int OverlappingPairCount { get { return _overlappingPairCount; } set { _overlappingPairCount = value; } }
39 39
40 public void RemoveOverlappingPair(BroadphasePair pair) 40 public void RemoveOverlappingPair(BroadphasePair pair)
41 { 41 {
42 if (!_overlappingPairs.Contains(pair)) 42 if (!_overlappingPairs.Contains(pair))
43 return; 43 return;
44 44
45 CleanOverlappingPair(ref pair); 45 CleanOverlappingPair(ref pair);
46 _overlappingPairs.Remove(pair); 46 _overlappingPairs.Remove(pair);
47 } 47 }
48 48
49 public void AddOverlappingPair(BroadphaseProxy proxyA, BroadphaseProxy proxyB) 49 public void AddOverlappingPair(BroadphaseProxy proxyA, BroadphaseProxy proxyB)
50 { 50 {
51 //don't add overlap with own 51 //don't add overlap with own
52 bool test = proxyA != proxyB; 52 bool test = proxyA != proxyB;
53 BulletDebug.Assert(proxyA != proxyB); 53 BulletDebug.Assert(proxyA != proxyB);
54 54
55 if (!NeedsBroadphaseCollision(proxyA, proxyB)) 55 if (!NeedsBroadphaseCollision(proxyA, proxyB))
56 return; 56 return;
57 57
58 BroadphasePair pair = new BroadphasePair(proxyA, proxyB); 58 BroadphasePair pair = new BroadphasePair(proxyA, proxyB);
59 _overlappingPairs.Add(pair); 59 _overlappingPairs.Add(pair);
60 _overlappingPairCount++; 60 _overlappingPairCount++;
61 } 61 }
62 62
63 //this FindPair becomes really slow. Either sort the list to speedup the query, or 63 //this FindPair becomes really slow. Either sort the list to speedup the query, or
64 //use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed. 64 //use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed.
65 //we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address) 65 //we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address)
66 //Also we can use a 2D bitmap, which can be useful for a future GPU implementation 66 //Also we can use a 2D bitmap, which can be useful for a future GPU implementation
67 public BroadphasePair FindPair(BroadphaseProxy proxyA, BroadphaseProxy proxyB) 67 public BroadphasePair FindPair(BroadphaseProxy proxyA, BroadphaseProxy proxyB)
68 { 68 {
69 if (!NeedsBroadphaseCollision(proxyA, proxyB)) 69 if (!NeedsBroadphaseCollision(proxyA, proxyB))
70 return null; 70 return null;
71 71
72 BroadphasePair pair = new BroadphasePair(proxyA, proxyB); 72 BroadphasePair pair = new BroadphasePair(proxyA, proxyB);
73 for (int i = 0; i < _overlappingPairs.Count; i++) 73 for (int i = 0; i < _overlappingPairs.Count; i++)
74 { 74 {
75 if (_overlappingPairs[i] == pair) 75 if (_overlappingPairs[i] == pair)
76 { 76 {
77 return _overlappingPairs[i]; 77 return _overlappingPairs[i];
78 } 78 }
79 } 79 }
80 80
81 return null; 81 return null;
82 } 82 }
83 83
84 public void CleanProxyFromPairs(BroadphaseProxy proxy) 84 public void CleanProxyFromPairs(BroadphaseProxy proxy)
85 { 85 {
86 for (int i = 0; i < _overlappingPairs.Count; i++) 86 for (int i = 0; i < _overlappingPairs.Count; i++)
87 { 87 {
88 BroadphasePair pair = _overlappingPairs[i]; 88 BroadphasePair pair = _overlappingPairs[i];
89 if (pair.ProxyA == proxy || 89 if (pair.ProxyA == proxy ||
90 pair.ProxyB == proxy) 90 pair.ProxyB == proxy)
91 { 91 {
92 CleanOverlappingPair(ref pair); 92 CleanOverlappingPair(ref pair);
93 _overlappingPairs[i] = pair; 93 _overlappingPairs[i] = pair;
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98 public void RemoveOverlappingPairsContainingProxy(BroadphaseProxy proxy) 98 public void RemoveOverlappingPairsContainingProxy(BroadphaseProxy proxy)
99 { 99 {
100 for (int i = _overlappingPairs.Count - 1; i >= 0; i--) 100 for (int i = _overlappingPairs.Count - 1; i >= 0; i--)
101 { 101 {
102 BroadphasePair pair = _overlappingPairs[i]; 102 BroadphasePair pair = _overlappingPairs[i];
103 if (pair.ProxyA == proxy || 103 if (pair.ProxyA == proxy ||
104 pair.ProxyB == proxy) 104 pair.ProxyB == proxy)
105 { 105 {
106 RemoveOverlappingPair(pair); 106 RemoveOverlappingPair(pair);
107 i++; 107 i++;
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 public bool NeedsBroadphaseCollision(BroadphaseProxy proxy0, BroadphaseProxy proxy1) 112 public bool NeedsBroadphaseCollision(BroadphaseProxy proxy0, BroadphaseProxy proxy1)
113 { 113 {
114 bool collides = (proxy0.CollisionFilterGroup & proxy1.CollisionFilterMask) != 0; 114 bool collides = (proxy0.CollisionFilterGroup & proxy1.CollisionFilterMask) != 0;
115 collides = collides && ((proxy1.CollisionFilterGroup & proxy0.CollisionFilterMask) != 0); 115 collides = collides && ((proxy1.CollisionFilterGroup & proxy0.CollisionFilterMask) != 0);
116 116
117 return collides; 117 return collides;
118 } 118 }
119 119
120 public virtual void ProcessAllOverlappingPairs(IOverlapCallback callback) 120 public virtual void ProcessAllOverlappingPairs(IOverlapCallback callback)
121 { 121 {
122 List<BroadphasePair> deleting = new List<BroadphasePair>(); 122 List<BroadphasePair> deleting = new List<BroadphasePair>();
123 for (int i = 0; i < _overlappingPairs.Count; i++) 123 for (int i = 0; i < _overlappingPairs.Count; i++)
124 { 124 {
125 BroadphasePair p = _overlappingPairs[i]; 125 BroadphasePair p = _overlappingPairs[i];
126 if (callback.ProcessOverlap(ref p)) 126 if (callback.ProcessOverlap(ref p))
127 { 127 {
128 CleanOverlappingPair(ref p); 128 CleanOverlappingPair(ref p);
129 deleting.Add(p); 129 deleting.Add(p);
130 _overlappingPairCount--; 130 _overlappingPairCount--;
131 } 131 }
132 } 132 }
133 133
134 for (int i = 0; i < deleting.Count; i++) 134 for (int i = 0; i < deleting.Count; i++)
135 _overlappingPairs.Remove(deleting[i]); 135 _overlappingPairs.Remove(deleting[i]);
136 } 136 }
137 137
138 public void CleanOverlappingPair(ref BroadphasePair pair) 138 public void CleanOverlappingPair(ref BroadphasePair pair)
139 { 139 {
140 if (pair.CollisionAlgorithm != null) 140 if (pair.CollisionAlgorithm != null)
141 { 141 {
142 if (pair.CollisionAlgorithm is IDisposable) 142 if (pair.CollisionAlgorithm is IDisposable)
143 (pair.CollisionAlgorithm as IDisposable).Dispose(); 143 (pair.CollisionAlgorithm as IDisposable).Dispose();
144 pair.CollisionAlgorithm = null; 144 pair.CollisionAlgorithm = null;
145 } 145 }
146 } 146 }
147 147
148 public abstract void RefreshOverlappingPairs(); 148 public abstract void RefreshOverlappingPairs();
149 149
150 #region IBroadphase Members 150 #region IBroadphase Members
151 public abstract BroadphaseProxy CreateProxy(MonoXnaCompactMaths.Vector3 min, MonoXnaCompactMaths.Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask); 151 public abstract BroadphaseProxy CreateProxy(MonoXnaCompactMaths.Vector3 min, MonoXnaCompactMaths.Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask);
152 152
153 public abstract void DestroyProxy(BroadphaseProxy proxy); 153 public abstract void DestroyProxy(BroadphaseProxy proxy);
154 154
155 public abstract void SetAabb(BroadphaseProxy proxy, MonoXnaCompactMaths.Vector3 aabbMin, MonoXnaCompactMaths.Vector3 aabbMax); 155 public abstract void SetAabb(BroadphaseProxy proxy, MonoXnaCompactMaths.Vector3 aabbMin, MonoXnaCompactMaths.Vector3 aabbMax);
156 156
157 #endregion 157 #endregion
158 } 158 }
159} 159}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphase.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphase.cs
index 1dc3f34..f37b3f5 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphase.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphase.cs
@@ -1,128 +1,128 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class SimpleBroadphase : OverlappingPairCache 29 public class SimpleBroadphase : OverlappingPairCache
30 { 30 {
31 private int _maxProxies; 31 private int _maxProxies;
32 private List<SimpleBroadphaseProxy> _proxies = new List<SimpleBroadphaseProxy>(); 32 private List<SimpleBroadphaseProxy> _proxies = new List<SimpleBroadphaseProxy>();
33 33
34 public SimpleBroadphase() 34 public SimpleBroadphase()
35 : this(16384) { } 35 : this(16384) { }
36 36
37 public SimpleBroadphase(int maxProxies) 37 public SimpleBroadphase(int maxProxies)
38 : base() 38 : base()
39 { 39 {
40 _maxProxies = maxProxies; 40 _maxProxies = maxProxies;
41 } 41 }
42 42
43 public override BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask) 43 public override BroadphaseProxy CreateProxy(Vector3 min, Vector3 max, BroadphaseNativeTypes shapeType, object userData, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask)
44 { 44 {
45 if (_proxies.Count >= _maxProxies) 45 if (_proxies.Count >= _maxProxies)
46 { 46 {
47 BulletDebug.Assert(false); 47 BulletDebug.Assert(false);
48 return null; //should never happen, but don't let the game crash ;-) 48 return null; //should never happen, but don't let the game crash ;-)
49 } 49 }
50 BulletDebug.Assert(min.X <= max.X && min.Y <= max.Y && min.Z <= max.Z); 50 BulletDebug.Assert(min.X <= max.X && min.Y <= max.Y && min.Z <= max.Z);
51 51
52 SimpleBroadphaseProxy proxy = new SimpleBroadphaseProxy(min, max, shapeType, userData, collisionFilterGroup, collisionFilterMask); 52 SimpleBroadphaseProxy proxy = new SimpleBroadphaseProxy(min, max, shapeType, userData, collisionFilterGroup, collisionFilterMask);
53 _proxies.Add(proxy); 53 _proxies.Add(proxy);
54 54
55 return proxy; 55 return proxy;
56 } 56 }
57 57
58 58
59 public override void DestroyProxy(BroadphaseProxy proxy) 59 public override void DestroyProxy(BroadphaseProxy proxy)
60 { 60 {
61 RemoveOverlappingPairsContainingProxy(proxy); 61 RemoveOverlappingPairsContainingProxy(proxy);
62 _proxies.Remove(proxy as SimpleBroadphaseProxy); 62 _proxies.Remove(proxy as SimpleBroadphaseProxy);
63 } 63 }
64 64
65 public override void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax) 65 public override void SetAabb(BroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax)
66 { 66 {
67 SimpleBroadphaseProxy simpleProxy = GetSimpleProxyFromProxy(proxy); 67 SimpleBroadphaseProxy simpleProxy = GetSimpleProxyFromProxy(proxy);
68 simpleProxy.Minimum = aabbMin; 68 simpleProxy.Minimum = aabbMin;
69 simpleProxy.Maximum = aabbMax; 69 simpleProxy.Maximum = aabbMax;
70 } 70 }
71 71
72 private SimpleBroadphaseProxy GetSimpleProxyFromProxy(BroadphaseProxy proxy) 72 private SimpleBroadphaseProxy GetSimpleProxyFromProxy(BroadphaseProxy proxy)
73 { 73 {
74 return proxy as SimpleBroadphaseProxy; 74 return proxy as SimpleBroadphaseProxy;
75 } 75 }
76 76
77 public override void RefreshOverlappingPairs() 77 public override void RefreshOverlappingPairs()
78 { 78 {
79 for (int i = 0; i < _proxies.Count; i++) 79 for (int i = 0; i < _proxies.Count; i++)
80 { 80 {
81 SimpleBroadphaseProxy proxyA = _proxies[i]; 81 SimpleBroadphaseProxy proxyA = _proxies[i];
82 82
83 for (int j = i + 1; j < _proxies.Count; j++) 83 for (int j = i + 1; j < _proxies.Count; j++)
84 { 84 {
85 SimpleBroadphaseProxy proxyB = _proxies[j]; 85 SimpleBroadphaseProxy proxyB = _proxies[j];
86 86
87 if (AabbOverlap(proxyA, proxyB)) 87 if (AabbOverlap(proxyA, proxyB))
88 { 88 {
89 if (FindPair(proxyA, proxyB) == null) 89 if (FindPair(proxyA, proxyB) == null)
90 { 90 {
91 AddOverlappingPair(proxyA, proxyB); 91 AddOverlappingPair(proxyA, proxyB);
92 } 92 }
93 } 93 }
94 } 94 }
95 } 95 }
96 96
97 CheckOverlapCallback check = new CheckOverlapCallback(); 97 CheckOverlapCallback check = new CheckOverlapCallback();
98 ProcessAllOverlappingPairs(check); 98 ProcessAllOverlappingPairs(check);
99 } 99 }
100 100
101 public static bool AabbOverlap(SimpleBroadphaseProxy proxyA, SimpleBroadphaseProxy proxyB) 101 public static bool AabbOverlap(SimpleBroadphaseProxy proxyA, SimpleBroadphaseProxy proxyB)
102 { 102 {
103 return proxyA.Minimum.X <= proxyB.Maximum.X && proxyB.Minimum.X <= proxyA.Maximum.X && 103 return proxyA.Minimum.X <= proxyB.Maximum.X && proxyB.Minimum.X <= proxyA.Maximum.X &&
104 proxyA.Minimum.Y <= proxyB.Maximum.Y && proxyB.Minimum.Y <= proxyA.Maximum.Y && 104 proxyA.Minimum.Y <= proxyB.Maximum.Y && proxyB.Minimum.Y <= proxyA.Maximum.Y &&
105 proxyA.Minimum.Z <= proxyB.Maximum.Z && proxyB.Minimum.Z <= proxyA.Maximum.Z; 105 proxyA.Minimum.Z <= proxyB.Maximum.Z && proxyB.Minimum.Z <= proxyA.Maximum.Z;
106 } 106 }
107 107
108 private void Validate() 108 private void Validate()
109 { 109 {
110 for (int i = 0; i < _proxies.Count; i++) 110 for (int i = 0; i < _proxies.Count; i++)
111 { 111 {
112 for (int j = i + 1; j < _proxies.Count; j++) 112 for (int j = i + 1; j < _proxies.Count; j++)
113 { 113 {
114 if (_proxies[i] == _proxies[j]) 114 if (_proxies[i] == _proxies[j])
115 throw new BulletException(); 115 throw new BulletException();
116 } 116 }
117 } 117 }
118 } 118 }
119 } 119 }
120 120
121 public class CheckOverlapCallback : IOverlapCallback 121 public class CheckOverlapCallback : IOverlapCallback
122 { 122 {
123 public bool ProcessOverlap(ref BroadphasePair pair) 123 public bool ProcessOverlap(ref BroadphasePair pair)
124 { 124 {
125 return (!SimpleBroadphase.AabbOverlap(pair.ProxyA as SimpleBroadphaseProxy, pair.ProxyB as SimpleBroadphaseProxy)); 125 return (!SimpleBroadphase.AabbOverlap(pair.ProxyA as SimpleBroadphaseProxy, pair.ProxyB as SimpleBroadphaseProxy));
126 } 126 }
127 } 127 }
128} 128}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphaseProxy.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphaseProxy.cs
index f473ef2..cfc2150 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphaseProxy.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/BroadphaseCollision/SimpleBroadphaseProxy.cs
@@ -1,46 +1,46 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class SimpleBroadphaseProxy : BroadphaseProxy 29 public class SimpleBroadphaseProxy : BroadphaseProxy
30 { 30 {
31 private Vector3 _min; 31 private Vector3 _min;
32 private Vector3 _max; 32 private Vector3 _max;
33 33
34 public SimpleBroadphaseProxy() { } 34 public SimpleBroadphaseProxy() { }
35 35
36 public SimpleBroadphaseProxy(Vector3 minPoint, Vector3 maxPoint, BroadphaseNativeTypes shapeType, object userData, CollisionFilterGroups collisionFilterGroup, CollisionFilterGroups collisionFilterMask) 36 public SimpleBroadphaseProxy(Vector3 minPoint, Vector3 maxPoint, BroadphaseNativeTypes shapeType, object userData, CollisionFilterGroups collisionFilterGroup, CollisionFilterGroups collisionFilterMask)
37 : base(userData, collisionFilterGroup, collisionFilterMask) 37 : base(userData, collisionFilterGroup, collisionFilterMask)
38 { 38 {
39 _min = minPoint; 39 _min = minPoint;
40 _max = maxPoint; 40 _max = maxPoint;
41 } 41 }
42 42
43 public Vector3 Minimum { get { return _min; } set { _min = value; } } 43 public Vector3 Minimum { get { return _min; } set { _min = value; } }
44 public Vector3 Maximum { get { return _max; } set { _max = value; } } 44 public Vector3 Maximum { get { return _max; } set { _max = value; } }
45 } 45 }
46} 46}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/BridgeTriangleRaycastCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/BridgeTriangleRaycastCallback.cs
index ba638d1..6bebf93 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/BridgeTriangleRaycastCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/BridgeTriangleRaycastCallback.cs
@@ -1,59 +1,59 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 internal class BridgeTriangleRaycastCallback : TriangleRaycastCallback 29 internal class BridgeTriangleRaycastCallback : TriangleRaycastCallback
30 { 30 {
31 CollisionWorld.RayResultCallback _resultCallback; 31 CollisionWorld.RayResultCallback _resultCallback;
32 CollisionObject _collisionObject; 32 CollisionObject _collisionObject;
33 TriangleMeshShape _triangleMesh; 33 TriangleMeshShape _triangleMesh;
34 34
35 public BridgeTriangleRaycastCallback(Vector3 from, Vector3 to, 35 public BridgeTriangleRaycastCallback(Vector3 from, Vector3 to,
36 CollisionWorld.RayResultCallback resultCallback, CollisionObject collisionObject, TriangleMeshShape triangleMesh) 36 CollisionWorld.RayResultCallback resultCallback, CollisionObject collisionObject, TriangleMeshShape triangleMesh)
37 : base(from, to) 37 : base(from, to)
38 { 38 {
39 _resultCallback = resultCallback; 39 _resultCallback = resultCallback;
40 _collisionObject = collisionObject; 40 _collisionObject = collisionObject;
41 _triangleMesh = triangleMesh; 41 _triangleMesh = triangleMesh;
42 } 42 }
43 43
44 public override float ReportHit(Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex) 44 public override float ReportHit(Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex)
45 { 45 {
46 CollisionWorld.LocalShapeInfo shapeInfo = new CollisionWorld.LocalShapeInfo(); 46 CollisionWorld.LocalShapeInfo shapeInfo = new CollisionWorld.LocalShapeInfo();
47 shapeInfo.ShapePart = partId; 47 shapeInfo.ShapePart = partId;
48 shapeInfo.TriangleIndex = triangleIndex; 48 shapeInfo.TriangleIndex = triangleIndex;
49 49
50 CollisionWorld.LocalRayResult rayResult = new CollisionWorld.LocalRayResult 50 CollisionWorld.LocalRayResult rayResult = new CollisionWorld.LocalRayResult
51 (_collisionObject, 51 (_collisionObject,
52 shapeInfo, 52 shapeInfo,
53 hitNormalLocal, 53 hitNormalLocal,
54 hitFraction); 54 hitFraction);
55 55
56 return _resultCallback.AddSingleResult(rayResult); 56 return _resultCallback.AddSingleResult(rayResult);
57 } 57 }
58 } 58 }
59} 59}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionAlgorithmCreateFunc.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionAlgorithmCreateFunc.cs
index 4e3903b..3bd5601 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionAlgorithmCreateFunc.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionAlgorithmCreateFunc.cs
@@ -1,40 +1,40 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class CollisionAlgorithmCreateFunction 29 public class CollisionAlgorithmCreateFunction
30 { 30 {
31 private bool _swapped; 31 private bool _swapped;
32 32
33 public bool IsSwapped { get { return _swapped; } set { _swapped = value; } } 33 public bool IsSwapped { get { return _swapped; } set { _swapped = value; } }
34 34
35 public virtual CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1) 35 public virtual CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
36 { 36 {
37 return null; 37 return null;
38 } 38 }
39 } 39 }
40} 40}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionDispatcher.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionDispatcher.cs
index 75d35b0..336defd 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionDispatcher.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionDispatcher.cs
@@ -1,280 +1,280 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public delegate void NearCallback(ref BroadphasePair collisionPair, CollisionDispatcher dispatcher, DispatcherInfo dispatchInfo); 29 public delegate void NearCallback(ref BroadphasePair collisionPair, CollisionDispatcher dispatcher, DispatcherInfo dispatchInfo);
30 30
31 public class CollisionDispatcher : IDispatcher 31 public class CollisionDispatcher : IDispatcher
32 { 32 {
33 private List<PersistentManifold> _manifolds = new List<PersistentManifold>(); 33 private List<PersistentManifold> _manifolds = new List<PersistentManifold>();
34 34
35 //private bool _useIslands; 35 //private bool _useIslands;
36 private NearCallback _nearCallback; 36 private NearCallback _nearCallback;
37 37
38 //private ManifoldResult _defaultManifoldResult; 38 //private ManifoldResult _defaultManifoldResult;
39 39
40 private CollisionAlgorithmCreateFunction[,] _doubleDispatch = new CollisionAlgorithmCreateFunction[(int)BroadphaseNativeTypes.MaxBroadphaseCollisionTypes, (int)BroadphaseNativeTypes.MaxBroadphaseCollisionTypes]; 40 private CollisionAlgorithmCreateFunction[,] _doubleDispatch = new CollisionAlgorithmCreateFunction[(int)BroadphaseNativeTypes.MaxBroadphaseCollisionTypes, (int)BroadphaseNativeTypes.MaxBroadphaseCollisionTypes];
41 41
42 //default CreationFunctions, filling the m_doubleDispatch table 42 //default CreationFunctions, filling the m_doubleDispatch table
43 private CollisionAlgorithmCreateFunction _convexConvexCreateFunc; 43 private CollisionAlgorithmCreateFunction _convexConvexCreateFunc;
44 private CollisionAlgorithmCreateFunction _convexConcaveCreateFunc; 44 private CollisionAlgorithmCreateFunction _convexConcaveCreateFunc;
45 private CollisionAlgorithmCreateFunction _swappedConvexConcaveCreateFunc; 45 private CollisionAlgorithmCreateFunction _swappedConvexConcaveCreateFunc;
46 private CollisionAlgorithmCreateFunction _compoundCreateFunc; 46 private CollisionAlgorithmCreateFunction _compoundCreateFunc;
47 private CollisionAlgorithmCreateFunction _swappedCompoundCreateFunc; 47 private CollisionAlgorithmCreateFunction _swappedCompoundCreateFunc;
48 private CollisionAlgorithmCreateFunction _emptyCreateFunc; 48 private CollisionAlgorithmCreateFunction _emptyCreateFunc;
49 49
50 private int _count; 50 private int _count;
51 private static int _manifoldCount = 0; 51 private static int _manifoldCount = 0;
52 52
53 public CollisionDispatcher() 53 public CollisionDispatcher()
54 { 54 {
55 NearCallback = DefaultNearCallback; 55 NearCallback = DefaultNearCallback;
56 //_useIslands = true; 56 //_useIslands = true;
57 //default CreationFunctions, filling the m_doubleDispatch table 57 //default CreationFunctions, filling the m_doubleDispatch table
58 _convexConvexCreateFunc = new ConvexConvexAlgorithm.CreateFunc(); 58 _convexConvexCreateFunc = new ConvexConvexAlgorithm.CreateFunc();
59 _convexConcaveCreateFunc = new ConvexConcaveCollisionAlgorithm.CreateFunc(); 59 _convexConcaveCreateFunc = new ConvexConcaveCollisionAlgorithm.CreateFunc();
60 _swappedConvexConcaveCreateFunc = new ConvexConcaveCollisionAlgorithm.SwappedCreateFunc(); 60 _swappedConvexConcaveCreateFunc = new ConvexConcaveCollisionAlgorithm.SwappedCreateFunc();
61 _compoundCreateFunc = new CompoundCollisionAlgorithm.CreateFunc(); 61 _compoundCreateFunc = new CompoundCollisionAlgorithm.CreateFunc();
62 _swappedCompoundCreateFunc = new CompoundCollisionAlgorithm.SwappedCreateFunc(); 62 _swappedCompoundCreateFunc = new CompoundCollisionAlgorithm.SwappedCreateFunc();
63 _emptyCreateFunc = new EmptyAlgorithm.CreateFunc(); 63 _emptyCreateFunc = new EmptyAlgorithm.CreateFunc();
64 64
65 for (BroadphaseNativeTypes i = BroadphaseNativeTypes.Box; i < BroadphaseNativeTypes.MaxBroadphaseCollisionTypes; i++) 65 for (BroadphaseNativeTypes i = BroadphaseNativeTypes.Box; i < BroadphaseNativeTypes.MaxBroadphaseCollisionTypes; i++)
66 { 66 {
67 for (BroadphaseNativeTypes j = BroadphaseNativeTypes.Box; j < BroadphaseNativeTypes.MaxBroadphaseCollisionTypes; j++) 67 for (BroadphaseNativeTypes j = BroadphaseNativeTypes.Box; j < BroadphaseNativeTypes.MaxBroadphaseCollisionTypes; j++)
68 { 68 {
69 _doubleDispatch[(int)i, (int)j] = FindCreateFunction(i, j); 69 _doubleDispatch[(int)i, (int)j] = FindCreateFunction(i, j);
70 if (_doubleDispatch[(int)i, (int)j] == null) 70 if (_doubleDispatch[(int)i, (int)j] == null)
71 throw new BulletException(); 71 throw new BulletException();
72 } 72 }
73 } 73 }
74 } 74 }
75 75
76 public int Count { get { return _count; } set { _count = value; } } 76 public int Count { get { return _count; } set { _count = value; } }
77 public int ManifoldCount { get { return _manifolds.Count; } } 77 public int ManifoldCount { get { return _manifolds.Count; } }
78 public List<PersistentManifold> Manifolds { get { return _manifolds; } } 78 public List<PersistentManifold> Manifolds { get { return _manifolds; } }
79 79
80 public static int GlobalManifoldCount { get { return _manifoldCount; } set { _manifoldCount = value; } } 80 public static int GlobalManifoldCount { get { return _manifoldCount; } set { _manifoldCount = value; } }
81 81
82 public PersistentManifold GetManifoldByIndex(int index) 82 public PersistentManifold GetManifoldByIndex(int index)
83 { 83 {
84 return _manifolds[index]; 84 return _manifolds[index];
85 } 85 }
86 86
87 //registerCollisionCreateFunc allows registration of custom/alternative collision create functions 87 //registerCollisionCreateFunc allows registration of custom/alternative collision create functions
88 public void RegisterCollisionCreateFunc(BroadphaseNativeTypes proxyTypeA, BroadphaseNativeTypes proxyTypeB, CollisionAlgorithmCreateFunction createFunc) 88 public void RegisterCollisionCreateFunc(BroadphaseNativeTypes proxyTypeA, BroadphaseNativeTypes proxyTypeB, CollisionAlgorithmCreateFunction createFunc)
89 { 89 {
90 _doubleDispatch[(int)proxyTypeA, (int)proxyTypeB] = createFunc; 90 _doubleDispatch[(int)proxyTypeA, (int)proxyTypeB] = createFunc;
91 } 91 }
92 92
93 public virtual PersistentManifold GetNewManifold(object bodyA, object bodyB) 93 public virtual PersistentManifold GetNewManifold(object bodyA, object bodyB)
94 { 94 {
95 _manifoldCount++; 95 _manifoldCount++;
96 96
97 CollisionObject body0 = bodyA as CollisionObject; 97 CollisionObject body0 = bodyA as CollisionObject;
98 CollisionObject body1 = bodyB as CollisionObject; 98 CollisionObject body1 = bodyB as CollisionObject;
99 99
100 PersistentManifold manifold = new PersistentManifold(body0, body1); 100 PersistentManifold manifold = new PersistentManifold(body0, body1);
101 _manifolds.Add(manifold); 101 _manifolds.Add(manifold);
102 102
103 return manifold; 103 return manifold;
104 } 104 }
105 105
106 public virtual void ReleaseManifold(PersistentManifold manifold) 106 public virtual void ReleaseManifold(PersistentManifold manifold)
107 { 107 {
108 _manifoldCount--; 108 _manifoldCount--;
109 109
110 ClearManifold(manifold); 110 ClearManifold(manifold);
111 _manifolds.Remove(manifold); 111 _manifolds.Remove(manifold);
112 } 112 }
113 113
114 114
115 public virtual void ClearManifold(PersistentManifold manifold) 115 public virtual void ClearManifold(PersistentManifold manifold)
116 { 116 {
117 manifold.ClearManifold(); 117 manifold.ClearManifold();
118 } 118 }
119 119
120 public CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB) 120 public CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB)
121 { 121 {
122 return FindAlgorithm(bodyA, bodyB, null); 122 return FindAlgorithm(bodyA, bodyB, null);
123 } 123 }
124 124
125 public CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB, PersistentManifold sharedManifold) 125 public CollisionAlgorithm FindAlgorithm(CollisionObject bodyA, CollisionObject bodyB, PersistentManifold sharedManifold)
126 { 126 {
127 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo = new CollisionAlgorithmConstructionInfo(); 127 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo = new CollisionAlgorithmConstructionInfo();
128 collisionAlgorithmConstructionInfo.Dispatcher = this; 128 collisionAlgorithmConstructionInfo.Dispatcher = this;
129 collisionAlgorithmConstructionInfo.Manifold = sharedManifold; 129 collisionAlgorithmConstructionInfo.Manifold = sharedManifold;
130 CollisionAlgorithm collisionAlgorithm = _doubleDispatch[(int)bodyA.CollisionShape.ShapeType, (int)bodyB.CollisionShape.ShapeType].CreateCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB); 130 CollisionAlgorithm collisionAlgorithm = _doubleDispatch[(int)bodyA.CollisionShape.ShapeType, (int)bodyB.CollisionShape.ShapeType].CreateCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB);
131 return collisionAlgorithm; 131 return collisionAlgorithm;
132 } 132 }
133 133
134 /*public CollisionAlgorithm internalFindAlgorithm(CollisionObject body0, CollisionObject body1) 134 /*public CollisionAlgorithm internalFindAlgorithm(CollisionObject body0, CollisionObject body1)
135 { 135 {
136 return internalFindAlgorithm(body0, body1, null); 136 return internalFindAlgorithm(body0, body1, null);
137 } 137 }
138 138
139 public CollisionAlgorithm internalFindAlgorithm(CollisionObject body0, CollisionObject body1, PersistentManifold sharedManifold) 139 public CollisionAlgorithm internalFindAlgorithm(CollisionObject body0, CollisionObject body1, PersistentManifold sharedManifold)
140 { 140 {
141 m_count++; 141 m_count++;
142 142
143 CollisionAlgorithmConstructionInfo ci = new CollisionAlgorithmConstructionInfo(); 143 CollisionAlgorithmConstructionInfo ci = new CollisionAlgorithmConstructionInfo();
144 ci.m_dispatcher = this; 144 ci.m_dispatcher = this;
145 145
146 if (body0.getCollisionShape().isConvex() && body1.getCollisionShape().isConvex()) 146 if (body0.getCollisionShape().isConvex() && body1.getCollisionShape().isConvex())
147 { 147 {
148 return new ConvexConvexAlgorithm(sharedManifold, ci, body0, body1); 148 return new ConvexConvexAlgorithm(sharedManifold, ci, body0, body1);
149 } 149 }
150 150
151 if (body0.getCollisionShape().isConvex() && body1.getCollisionShape().isConcave()) 151 if (body0.getCollisionShape().isConvex() && body1.getCollisionShape().isConcave())
152 { 152 {
153 return new ConvexConcaveCollisionAlgorithm(ci, body0, body1, false); 153 return new ConvexConcaveCollisionAlgorithm(ci, body0, body1, false);
154 } 154 }
155 155
156 if (body1.getCollisionShape().isConvex() && body0.getCollisionShape().isConcave()) 156 if (body1.getCollisionShape().isConvex() && body0.getCollisionShape().isConcave())
157 { 157 {
158 return new ConvexConcaveCollisionAlgorithm(ci, body0, body1, true); 158 return new ConvexConcaveCollisionAlgorithm(ci, body0, body1, true);
159 } 159 }
160 160
161 if (body0.getCollisionShape().isCompound()) 161 if (body0.getCollisionShape().isCompound())
162 { 162 {
163 return new CompoundCollisionAlgorithm(ci, body0, body1, false); 163 return new CompoundCollisionAlgorithm(ci, body0, body1, false);
164 } 164 }
165 else 165 else
166 { 166 {
167 if (body1.getCollisionShape().isCompound()) 167 if (body1.getCollisionShape().isCompound())
168 { 168 {
169 return new CompoundCollisionAlgorithm(ci, body0, body1, true); 169 return new CompoundCollisionAlgorithm(ci, body0, body1, true);
170 } 170 }
171 } 171 }
172 172
173 //failed to find an algorithm 173 //failed to find an algorithm
174 return new EmptyAlgorithm(ci); 174 return new EmptyAlgorithm(ci);
175 }*/ 175 }*/
176 176
177 public virtual bool NeedsCollision(CollisionObject bodyA, CollisionObject bodyB) 177 public virtual bool NeedsCollision(CollisionObject bodyA, CollisionObject bodyB)
178 { 178 {
179 if (bodyA == null || bodyB == null) 179 if (bodyA == null || bodyB == null)
180 throw new BulletException(); 180 throw new BulletException();
181 181
182 bool needsCollision = true; 182 bool needsCollision = true;
183 183
184 //broadphase filtering already deals with this 184 //broadphase filtering already deals with this
185 /*if ((body0.isStaticObject() || body0.isKinematicObject()) && 185 /*if ((body0.isStaticObject() || body0.isKinematicObject()) &&
186 (body1.isStaticObject() || body1.isKinematicObject())) 186 (body1.isStaticObject() || body1.isKinematicObject()))
187 { 187 {
188 printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n"); 188 printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
189 }*/ 189 }*/
190 190
191 if ((!bodyA.IsActive) && (!bodyB.IsActive)) 191 if ((!bodyA.IsActive) && (!bodyB.IsActive))
192 needsCollision = false; 192 needsCollision = false;
193 193
194 return needsCollision; 194 return needsCollision;
195 } 195 }
196 196
197 public virtual bool NeedsResponse(CollisionObject bodyA, CollisionObject bodyB) 197 public virtual bool NeedsResponse(CollisionObject bodyA, CollisionObject bodyB)
198 { 198 {
199 //here you can do filtering 199 //here you can do filtering
200 bool hasResponse = bodyA.HasContactResponse && bodyB.HasContactResponse; 200 bool hasResponse = bodyA.HasContactResponse && bodyB.HasContactResponse;
201 hasResponse = hasResponse && (!bodyA.IsStaticOrKinematicObject || !bodyB.IsStaticOrKinematicObject); 201 hasResponse = hasResponse && (!bodyA.IsStaticOrKinematicObject || !bodyB.IsStaticOrKinematicObject);
202 return hasResponse; 202 return hasResponse;
203 } 203 }
204 204
205 public virtual void DispatchAllCollisionPairs(OverlappingPairCache pairCache, DispatcherInfo dispatchInfo) 205 public virtual void DispatchAllCollisionPairs(OverlappingPairCache pairCache, DispatcherInfo dispatchInfo)
206 { 206 {
207 CollisionPairCallback collisionCallback = new CollisionPairCallback(dispatchInfo, this); 207 CollisionPairCallback collisionCallback = new CollisionPairCallback(dispatchInfo, this);
208 pairCache.ProcessAllOverlappingPairs(collisionCallback); 208 pairCache.ProcessAllOverlappingPairs(collisionCallback);
209 } 209 }
210 210
211 private CollisionAlgorithmCreateFunction FindCreateFunction(BroadphaseNativeTypes proxyTypeA, BroadphaseNativeTypes proxyTypeB) 211 private CollisionAlgorithmCreateFunction FindCreateFunction(BroadphaseNativeTypes proxyTypeA, BroadphaseNativeTypes proxyTypeB)
212 { 212 {
213 if (BroadphaseProxy.IsConvex(proxyTypeA) && BroadphaseProxy.IsConvex(proxyTypeB)) 213 if (BroadphaseProxy.IsConvex(proxyTypeA) && BroadphaseProxy.IsConvex(proxyTypeB))
214 { 214 {
215 return _convexConvexCreateFunc; 215 return _convexConvexCreateFunc;
216 } 216 }
217 217
218 if (BroadphaseProxy.IsConvex(proxyTypeA) && BroadphaseProxy.IsConcave(proxyTypeB)) 218 if (BroadphaseProxy.IsConvex(proxyTypeA) && BroadphaseProxy.IsConcave(proxyTypeB))
219 { 219 {
220 return _convexConcaveCreateFunc; 220 return _convexConcaveCreateFunc;
221 } 221 }
222 222
223 if (BroadphaseProxy.IsConvex(proxyTypeB) && BroadphaseProxy.IsConcave(proxyTypeA)) 223 if (BroadphaseProxy.IsConvex(proxyTypeB) && BroadphaseProxy.IsConcave(proxyTypeA))
224 { 224 {
225 return _swappedConvexConcaveCreateFunc; 225 return _swappedConvexConcaveCreateFunc;
226 } 226 }
227 227
228 if (BroadphaseProxy.IsCompound(proxyTypeA)) 228 if (BroadphaseProxy.IsCompound(proxyTypeA))
229 { 229 {
230 return _compoundCreateFunc; 230 return _compoundCreateFunc;
231 } 231 }
232 else 232 else
233 { 233 {
234 if (BroadphaseProxy.IsCompound(proxyTypeB)) 234 if (BroadphaseProxy.IsCompound(proxyTypeB))
235 { 235 {
236 return _swappedCompoundCreateFunc; 236 return _swappedCompoundCreateFunc;
237 } 237 }
238 } 238 }
239 239
240 //failed to find an algorithm 240 //failed to find an algorithm
241 return _emptyCreateFunc; 241 return _emptyCreateFunc;
242 } 242 }
243 243
244 public NearCallback NearCallback { get { return _nearCallback; } set { _nearCallback = value; } } 244 public NearCallback NearCallback { get { return _nearCallback; } set { _nearCallback = value; } }
245 245
246 //by default, Bullet will use this near callback 246 //by default, Bullet will use this near callback
247 public static void DefaultNearCallback(ref BroadphasePair collisionPair, CollisionDispatcher dispatcher, DispatcherInfo dispatchInfo) 247 public static void DefaultNearCallback(ref BroadphasePair collisionPair, CollisionDispatcher dispatcher, DispatcherInfo dispatchInfo)
248 { 248 {
249 CollisionObject collisionObjectA = collisionPair.ProxyA.ClientData as CollisionObject; 249 CollisionObject collisionObjectA = collisionPair.ProxyA.ClientData as CollisionObject;
250 CollisionObject collisionObjectB = collisionPair.ProxyB.ClientData as CollisionObject; 250 CollisionObject collisionObjectB = collisionPair.ProxyB.ClientData as CollisionObject;
251 251
252 if (dispatcher.NeedsCollision(collisionObjectA, collisionObjectB)) 252 if (dispatcher.NeedsCollision(collisionObjectA, collisionObjectB))
253 { 253 {
254 //dispatcher will keep algorithms persistent in the collision pair 254 //dispatcher will keep algorithms persistent in the collision pair
255 if (collisionPair.CollisionAlgorithm == null) 255 if (collisionPair.CollisionAlgorithm == null)
256 { 256 {
257 collisionPair.CollisionAlgorithm = dispatcher.FindAlgorithm(collisionObjectA, collisionObjectB); 257 collisionPair.CollisionAlgorithm = dispatcher.FindAlgorithm(collisionObjectA, collisionObjectB);
258 } 258 }
259 259
260 if (collisionPair.CollisionAlgorithm != null) 260 if (collisionPair.CollisionAlgorithm != null)
261 { 261 {
262 ManifoldResult contactPointResult = new ManifoldResult(collisionObjectA, collisionObjectB); 262 ManifoldResult contactPointResult = new ManifoldResult(collisionObjectA, collisionObjectB);
263 263
264 if (dispatchInfo.DispatchFunction == DispatchFunction.Discrete) 264 if (dispatchInfo.DispatchFunction == DispatchFunction.Discrete)
265 { 265 {
266 //discrete collision detection query 266 //discrete collision detection query
267 collisionPair.CollisionAlgorithm.ProcessCollision(collisionObjectA, collisionObjectB, dispatchInfo, contactPointResult); 267 collisionPair.CollisionAlgorithm.ProcessCollision(collisionObjectA, collisionObjectB, dispatchInfo, contactPointResult);
268 } 268 }
269 else 269 else
270 { 270 {
271 //continuous collision detection query, time of impact (toi) 271 //continuous collision detection query, time of impact (toi)
272 float timeOfImpact = collisionPair.CollisionAlgorithm.CalculateTimeOfImpact(collisionObjectA, collisionObjectB, dispatchInfo, contactPointResult); 272 float timeOfImpact = collisionPair.CollisionAlgorithm.CalculateTimeOfImpact(collisionObjectA, collisionObjectB, dispatchInfo, contactPointResult);
273 if (dispatchInfo.TimeOfImpact > timeOfImpact) 273 if (dispatchInfo.TimeOfImpact > timeOfImpact)
274 dispatchInfo.TimeOfImpact = timeOfImpact; 274 dispatchInfo.TimeOfImpact = timeOfImpact;
275 } 275 }
276 } 276 }
277 } 277 }
278 } 278 }
279 } 279 }
280} 280}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionObject.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionObject.cs
index 4e9cf58..3eae564 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionObject.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionObject.cs
@@ -1,163 +1,163 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public enum ActivationState 29 public enum ActivationState
30 { 30 {
31 Nothing = 0, 31 Nothing = 0,
32 Active, 32 Active,
33 IslandSleeping, 33 IslandSleeping,
34 WantsDeactivation, 34 WantsDeactivation,
35 DisableDeactivation, 35 DisableDeactivation,
36 DisableSimulation, 36 DisableSimulation,
37 } 37 }
38 38
39 public enum CollisionOptions 39 public enum CollisionOptions
40 { 40 {
41 StaticObject = 1, 41 StaticObject = 1,
42 KinematicObject = 2, 42 KinematicObject = 2,
43 NoContactResponse = 4, 43 NoContactResponse = 4,
44 CustomMaterialCallback = 8,//this allows per-triangle material (friction/restitution) 44 CustomMaterialCallback = 8,//this allows per-triangle material (friction/restitution)
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
48 /// btCollisionObject can be used to manage collision detection objects. 48 /// btCollisionObject can be used to manage collision detection objects.
49 /// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy. 49 /// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy.
50 /// They can be added to the btCollisionWorld. 50 /// They can be added to the btCollisionWorld.
51 /// </summary> 51 /// </summary>
52 public class CollisionObject 52 public class CollisionObject
53 { 53 {
54 protected Matrix _worldTransform; 54 protected Matrix _worldTransform;
55 private BroadphaseProxy _broadphase; 55 private BroadphaseProxy _broadphase;
56 private CollisionShape _collisionShape; 56 private CollisionShape _collisionShape;
57 57
58 //m_interpolationWorldTransform is used for CCD and interpolation 58 //m_interpolationWorldTransform is used for CCD and interpolation
59 //it can be either previous or future (predicted) transform 59 //it can be either previous or future (predicted) transform
60 private Matrix _interpolationWorldTransform; 60 private Matrix _interpolationWorldTransform;
61 61
62 private CollisionOptions _collisionFlags; 62 private CollisionOptions _collisionFlags;
63 63
64 private int _islandTag; 64 private int _islandTag;
65 private ActivationState _activationState; 65 private ActivationState _activationState;
66 private float _deactivationTime; 66 private float _deactivationTime;
67 67
68 private float _friction; 68 private float _friction;
69 private float _restitution; 69 private float _restitution;
70 70
71 //users can point to their objects, m_userPointer is not used by Bullet 71 //users can point to their objects, m_userPointer is not used by Bullet
72 private object _userData; 72 private object _userData;
73 73
74 //m_internalOwner one is used by optional Bullet high level interface 74 //m_internalOwner one is used by optional Bullet high level interface
75 private object _internalOwner; 75 private object _internalOwner;
76 76
77 //time of impact calculation 77 //time of impact calculation
78 private float _hitFraction; 78 private float _hitFraction;
79 79
80 //Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: 80 //Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
81 private float _ccdSweptSphereRadius; 81 private float _ccdSweptSphereRadius;
82 82
83 // Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionTreshold 83 // Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionTreshold
84 private float _ccdSquareMotionThreshold; 84 private float _ccdSquareMotionThreshold;
85 //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities) 85 //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities)
86 //without destroying the continuous interpolated motion (which uses this interpolation velocities) 86 //without destroying the continuous interpolated motion (which uses this interpolation velocities)
87 private Vector3 _interpolationLinearVelocity; 87 private Vector3 _interpolationLinearVelocity;
88 private Vector3 _interpolationAngularVelocity; 88 private Vector3 _interpolationAngularVelocity;
89 89
90 private int _companionID; 90 private int _companionID;
91 91
92 public CollisionObject() 92 public CollisionObject()
93 { 93 {
94 _activationState = ActivationState.Active; 94 _activationState = ActivationState.Active;
95 _hitFraction = 1; 95 _hitFraction = 1;
96 } 96 }
97 97
98 public bool IsStaticObject { get { return (_collisionFlags & CollisionOptions.StaticObject) != 0; } } 98 public bool IsStaticObject { get { return (_collisionFlags & CollisionOptions.StaticObject) != 0; } }
99 public bool IsKinematicObject { get { return (_collisionFlags & CollisionOptions.KinematicObject) != 0; } } 99 public bool IsKinematicObject { get { return (_collisionFlags & CollisionOptions.KinematicObject) != 0; } }
100 public bool IsStaticOrKinematicObject { get { return (_collisionFlags & (CollisionOptions.KinematicObject | CollisionOptions.StaticObject)) != 0; } } 100 public bool IsStaticOrKinematicObject { get { return (_collisionFlags & (CollisionOptions.KinematicObject | CollisionOptions.StaticObject)) != 0; } }
101 101
102 public bool HasContactResponse { get { return (_collisionFlags & CollisionOptions.NoContactResponse) == 0; } } 102 public bool HasContactResponse { get { return (_collisionFlags & CollisionOptions.NoContactResponse) == 0; } }
103 public bool MergesSimulationIslands 103 public bool MergesSimulationIslands
104 { 104 {
105 get 105 get
106 { 106 {
107 //static objects, kinematic and object without contact response don't merge islands 107 //static objects, kinematic and object without contact response don't merge islands
108 return (_collisionFlags & (CollisionOptions.StaticObject | CollisionOptions.KinematicObject | CollisionOptions.NoContactResponse)) == 0; 108 return (_collisionFlags & (CollisionOptions.StaticObject | CollisionOptions.KinematicObject | CollisionOptions.NoContactResponse)) == 0;
109 } 109 }
110 } 110 }
111 111
112 public ActivationState ActivationState 112 public ActivationState ActivationState
113 { 113 {
114 get { return _activationState; } 114 get { return _activationState; }
115 set 115 set
116 { 116 {
117 if ((_activationState != ActivationState.DisableDeactivation) && (_activationState != ActivationState.DisableSimulation)) 117 if ((_activationState != ActivationState.DisableDeactivation) && (_activationState != ActivationState.DisableSimulation))
118 _activationState = value; 118 _activationState = value;
119 } 119 }
120 } 120 }
121 121
122 public bool IsActive { get { return ((ActivationState != ActivationState.IslandSleeping) && (ActivationState != ActivationState.DisableSimulation)); } } 122 public bool IsActive { get { return ((ActivationState != ActivationState.IslandSleeping) && (ActivationState != ActivationState.DisableSimulation)); } }
123 public float Restitution { get { return _restitution; } set { _restitution = value; } } 123 public float Restitution { get { return _restitution; } set { _restitution = value; } }
124 public float Friction { get { return _friction; } set { _friction = value; } } 124 public float Friction { get { return _friction; } set { _friction = value; } }
125 public CollisionShape CollisionShape { get { return _collisionShape; } set { _collisionShape = value; } } 125 public CollisionShape CollisionShape { get { return _collisionShape; } set { _collisionShape = value; } }
126 public float DeactivationTime { get { return _deactivationTime; } set { _deactivationTime = value; } } 126 public float DeactivationTime { get { return _deactivationTime; } set { _deactivationTime = value; } }
127 public object Owner { get { return _internalOwner; } protected set { _internalOwner = value; } } 127 public object Owner { get { return _internalOwner; } protected set { _internalOwner = value; } }
128 public Matrix WorldTransform { get { return _worldTransform; } set { _worldTransform = value; } } 128 public Matrix WorldTransform { get { return _worldTransform; } set { _worldTransform = value; } }
129 public BroadphaseProxy Broadphase { get { return _broadphase; } set { _broadphase = value; } } 129 public BroadphaseProxy Broadphase { get { return _broadphase; } set { _broadphase = value; } }
130 public Matrix InterpolationWorldTransform { get { return _interpolationWorldTransform; } set { _interpolationWorldTransform = value; } } 130 public Matrix InterpolationWorldTransform { get { return _interpolationWorldTransform; } set { _interpolationWorldTransform = value; } }
131 public Vector3 InterpolationLinearVelocity { get { return _interpolationLinearVelocity; } protected set { _interpolationLinearVelocity = value; } } 131 public Vector3 InterpolationLinearVelocity { get { return _interpolationLinearVelocity; } protected set { _interpolationLinearVelocity = value; } }
132 public Vector3 InterpolationAngularVelocity { get { return _interpolationAngularVelocity; } protected set { _interpolationAngularVelocity = value; } } 132 public Vector3 InterpolationAngularVelocity { get { return _interpolationAngularVelocity; } protected set { _interpolationAngularVelocity = value; } }
133 public int IslandTag { get { return _islandTag; } set { _islandTag = value; } } 133 public int IslandTag { get { return _islandTag; } set { _islandTag = value; } }
134 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } } 134 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } }
135 public CollisionOptions CollisionFlags { get { return _collisionFlags; } set { _collisionFlags = value; } } 135 public CollisionOptions CollisionFlags { get { return _collisionFlags; } set { _collisionFlags = value; } }
136 //Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm 136 //Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm
137 public float CcdSweptSphereRadius { get { return _ccdSweptSphereRadius; } set { _ccdSweptSphereRadius = value; } } 137 public float CcdSweptSphereRadius { get { return _ccdSweptSphereRadius; } set { _ccdSweptSphereRadius = value; } }
138 // Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold 138 // Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold
139 public float CcdSquareMotionThreshold { get { return _ccdSquareMotionThreshold; } set { _ccdSquareMotionThreshold = value; } } 139 public float CcdSquareMotionThreshold { get { return _ccdSquareMotionThreshold; } set { _ccdSquareMotionThreshold = value; } }
140 //users can point to their objects, userPointer is not used by Bullet 140 //users can point to their objects, userPointer is not used by Bullet
141 public object UserData { get { return _userData; } set { _userData = value; } } 141 public object UserData { get { return _userData; } set { _userData = value; } }
142 public int CompanionID { get { return _companionID; } set { _companionID = value; } } 142 public int CompanionID { get { return _companionID; } set { _companionID = value; } }
143 143
144 public void ForceActivationState(ActivationState newState) 144 public void ForceActivationState(ActivationState newState)
145 { 145 {
146 _activationState = newState; 146 _activationState = newState;
147 } 147 }
148 148
149 public void Activate() 149 public void Activate()
150 { 150 {
151 Activate(false); 151 Activate(false);
152 } 152 }
153 153
154 public void Activate(bool forceActivation) 154 public void Activate(bool forceActivation)
155 { 155 {
156 if (forceActivation || (_collisionFlags & (CollisionOptions.StaticObject | CollisionOptions.KinematicObject)) == 0) 156 if (forceActivation || (_collisionFlags & (CollisionOptions.StaticObject | CollisionOptions.KinematicObject)) == 0)
157 { 157 {
158 ActivationState = ActivationState.Active; 158 ActivationState = ActivationState.Active;
159 _deactivationTime = 0; 159 _deactivationTime = 0;
160 } 160 }
161 } 161 }
162 } 162 }
163} 163}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionPairCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionPairCallback.cs
index 7a85731..6ba1c87 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionPairCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionPairCallback.cs
@@ -1,48 +1,48 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class CollisionPairCallback : IOverlapCallback 29 public class CollisionPairCallback : IOverlapCallback
30 { 30 {
31 private DispatcherInfo _dispatchInfo; 31 private DispatcherInfo _dispatchInfo;
32 private CollisionDispatcher _dispatcher; 32 private CollisionDispatcher _dispatcher;
33 33
34 public CollisionPairCallback(DispatcherInfo dispatchInfo, CollisionDispatcher dispatcher) 34 public CollisionPairCallback(DispatcherInfo dispatchInfo, CollisionDispatcher dispatcher)
35 { 35 {
36 _dispatchInfo = dispatchInfo; 36 _dispatchInfo = dispatchInfo;
37 _dispatcher = dispatcher; 37 _dispatcher = dispatcher;
38 } 38 }
39 39
40 #region IOverlapCallback Members 40 #region IOverlapCallback Members
41 public bool ProcessOverlap(ref BroadphasePair pair) 41 public bool ProcessOverlap(ref BroadphasePair pair)
42 { 42 {
43 _dispatcher.NearCallback(ref pair, _dispatcher, _dispatchInfo); 43 _dispatcher.NearCallback(ref pair, _dispatcher, _dispatchInfo);
44 return false; 44 return false;
45 } 45 }
46 #endregion 46 #endregion
47 } 47 }
48} 48}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionWorld.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionWorld.cs
index 968e219..cb520bb 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionWorld.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CollisionWorld.cs
@@ -1,358 +1,358 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class CollisionWorld 29 public class CollisionWorld
30 { 30 {
31 private List<CollisionObject> _collisionObjects = new List<CollisionObject>(); 31 private List<CollisionObject> _collisionObjects = new List<CollisionObject>();
32 private IDispatcher _dispatcher; 32 private IDispatcher _dispatcher;
33 private OverlappingPairCache _broadphasePairCache; 33 private OverlappingPairCache _broadphasePairCache;
34 private bool _ownsDispatcher; 34 private bool _ownsDispatcher;
35 private bool _ownsBroadphasePairCache; 35 private bool _ownsBroadphasePairCache;
36 private DispatcherInfo _dispatchInfo = new DispatcherInfo(); 36 private DispatcherInfo _dispatchInfo = new DispatcherInfo();
37 37
38 /// <summary> 38 /// <summary>
39 /// this constructor doesn't own the dispatcher and paircache/broadphase 39 /// this constructor doesn't own the dispatcher and paircache/broadphase
40 /// </summary> 40 /// </summary>
41 /// <param name="dispatcher"></param> 41 /// <param name="dispatcher"></param>
42 /// <param name="pairCache"></param> 42 /// <param name="pairCache"></param>
43 public CollisionWorld(IDispatcher dispatcher, OverlappingPairCache pairCache) 43 public CollisionWorld(IDispatcher dispatcher, OverlappingPairCache pairCache)
44 { 44 {
45 _dispatcher = dispatcher; 45 _dispatcher = dispatcher;
46 _broadphasePairCache = pairCache; 46 _broadphasePairCache = pairCache;
47 _ownsDispatcher = false; 47 _ownsDispatcher = false;
48 _ownsBroadphasePairCache = false; 48 _ownsBroadphasePairCache = false;
49 } 49 }
50 50
51 public DispatcherInfo DispatchInfo { get { return _dispatchInfo; } protected set { _dispatchInfo = value; } } 51 public DispatcherInfo DispatchInfo { get { return _dispatchInfo; } protected set { _dispatchInfo = value; } }
52 public List<CollisionObject> CollisionObjects { get { return _collisionObjects; } protected set { _collisionObjects = value; } } 52 public List<CollisionObject> CollisionObjects { get { return _collisionObjects; } protected set { _collisionObjects = value; } }
53 public IBroadphase Broadphase { get { return _broadphasePairCache; } } 53 public IBroadphase Broadphase { get { return _broadphasePairCache; } }
54 public OverlappingPairCache BroadphasePairCache { get { return _broadphasePairCache; } protected set { _broadphasePairCache = value; } } 54 public OverlappingPairCache BroadphasePairCache { get { return _broadphasePairCache; } protected set { _broadphasePairCache = value; } }
55 public IDispatcher Dispatcher { get { return _dispatcher; } protected set { _dispatcher = value; } } 55 public IDispatcher Dispatcher { get { return _dispatcher; } protected set { _dispatcher = value; } }
56 public int CollisionObjectsCount { get { return _collisionObjects.Count; } } 56 public int CollisionObjectsCount { get { return _collisionObjects.Count; } }
57 protected bool OwnsDispatcher { get { return _ownsDispatcher; } set { _ownsDispatcher = value; } } 57 protected bool OwnsDispatcher { get { return _ownsDispatcher; } set { _ownsDispatcher = value; } }
58 protected bool OwnsBroadphasePairCache { get { return _ownsBroadphasePairCache; } set { _ownsBroadphasePairCache = value; } } 58 protected bool OwnsBroadphasePairCache { get { return _ownsBroadphasePairCache; } set { _ownsBroadphasePairCache = value; } }
59 59
60 // rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback 60 // rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
61 // This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback. 61 // This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.
62 public void RayTest(Vector3 rayFromWorld, Vector3 rayToWorld, RayResultCallback resultCallback) 62 public void RayTest(Vector3 rayFromWorld, Vector3 rayToWorld, RayResultCallback resultCallback)
63 { 63 {
64 Matrix rayFromTrans, rayToTrans; 64 Matrix rayFromTrans, rayToTrans;
65 65
66 rayFromTrans = Matrix.Identity; 66 rayFromTrans = Matrix.Identity;
67 rayFromTrans.Translation = rayFromWorld; 67 rayFromTrans.Translation = rayFromWorld;
68 68
69 rayToTrans = Matrix.Identity; 69 rayToTrans = Matrix.Identity;
70 rayToTrans.Translation = rayToWorld; 70 rayToTrans.Translation = rayToWorld;
71 71
72 // brute force go over all objects. Once there is a broadphase, use that, or 72 // brute force go over all objects. Once there is a broadphase, use that, or
73 // add a raycast against aabb first. 73 // add a raycast against aabb first.
74 74
75 foreach (CollisionObject collisionObject in _collisionObjects) 75 foreach (CollisionObject collisionObject in _collisionObjects)
76 { 76 {
77 //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); 77 //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
78 Vector3 collisionObjectAabbMin, collisionObjectAabbMax; 78 Vector3 collisionObjectAabbMin, collisionObjectAabbMax;
79 collisionObject.CollisionShape.GetAabb(collisionObject.WorldTransform, out collisionObjectAabbMin, out collisionObjectAabbMax); 79 collisionObject.CollisionShape.GetAabb(collisionObject.WorldTransform, out collisionObjectAabbMin, out collisionObjectAabbMax);
80 80
81 float hitLambda = 1f; //could use resultCallback.m_closestHitFraction, but needs testing 81 float hitLambda = 1f; //could use resultCallback.m_closestHitFraction, but needs testing
82 Vector3 hitNormal = new Vector3(); 82 Vector3 hitNormal = new Vector3();
83 83
84 //if (MathHelper.TestAabbAgainstAabb2(rayAabbMin, rayAabbMax, collisionObjectAabbMin, collisionObjectAabbMax)) 84 //if (MathHelper.TestAabbAgainstAabb2(rayAabbMin, rayAabbMax, collisionObjectAabbMin, collisionObjectAabbMax))
85 if (MathHelper.RayAabb(rayFromWorld, rayToWorld, collisionObjectAabbMin, collisionObjectAabbMax, hitLambda, hitNormal)) 85 if (MathHelper.RayAabb(rayFromWorld, rayToWorld, collisionObjectAabbMin, collisionObjectAabbMax, hitLambda, hitNormal))
86 { 86 {
87 RayTestSingle(rayFromTrans, rayToTrans, 87 RayTestSingle(rayFromTrans, rayToTrans,
88 collisionObject, collisionObject.CollisionShape, 88 collisionObject, collisionObject.CollisionShape,
89 collisionObject.WorldTransform, resultCallback); 89 collisionObject.WorldTransform, resultCallback);
90 90
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 // rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. 95 // rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
96 // In a future implementation, we consider moving the ray test as a virtual method in CollisionShape. 96 // In a future implementation, we consider moving the ray test as a virtual method in CollisionShape.
97 // This allows more customization. 97 // This allows more customization.
98 public static void RayTestSingle(Matrix rayFromTrans, Matrix rayToTrans, 98 public static void RayTestSingle(Matrix rayFromTrans, Matrix rayToTrans,
99 CollisionObject collisionObject, 99 CollisionObject collisionObject,
100 CollisionShape collisionShape, 100 CollisionShape collisionShape,
101 Matrix colObjWorldTransform, 101 Matrix colObjWorldTransform,
102 RayResultCallback resultCallback) 102 RayResultCallback resultCallback)
103 { 103 {
104 SphereShape pointShape=new SphereShape(0.0f); 104 SphereShape pointShape=new SphereShape(0.0f);
105 105
106 if (collisionShape.IsConvex) 106 if (collisionShape.IsConvex)
107 { 107 {
108 CastResult castResult = new CastResult(); 108 CastResult castResult = new CastResult();
109 castResult.Fraction = 1f;//?? 109 castResult.Fraction = 1f;//??
110 110
111 ConvexShape convexShape = collisionShape as ConvexShape; 111 ConvexShape convexShape = collisionShape as ConvexShape;
112 VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver(); 112 VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver();
113 SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, convexShape, simplexSolver); 113 SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, convexShape, simplexSolver);
114 //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver); 114 //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
115 //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0); 115 //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
116 116
117 if (convexCaster.CalcTimeOfImpact(rayFromTrans, rayToTrans, colObjWorldTransform, colObjWorldTransform, castResult)) 117 if (convexCaster.CalcTimeOfImpact(rayFromTrans, rayToTrans, colObjWorldTransform, colObjWorldTransform, castResult))
118 { 118 {
119 //add hit 119 //add hit
120 if (castResult.Normal.LengthSquared() > 0.0001f) 120 if (castResult.Normal.LengthSquared() > 0.0001f)
121 { 121 {
122 castResult.Normal.Normalize(); 122 castResult.Normal.Normalize();
123 if (castResult.Fraction < resultCallback.ClosestHitFraction) 123 if (castResult.Fraction < resultCallback.ClosestHitFraction)
124 { 124 {
125 125
126 CollisionWorld.LocalRayResult localRayResult = new LocalRayResult 126 CollisionWorld.LocalRayResult localRayResult = new LocalRayResult
127 ( 127 (
128 collisionObject, 128 collisionObject,
129 new LocalShapeInfo(), 129 new LocalShapeInfo(),
130 castResult.Normal, 130 castResult.Normal,
131 castResult.Fraction 131 castResult.Fraction
132 ); 132 );
133 133
134 resultCallback.AddSingleResult(localRayResult); 134 resultCallback.AddSingleResult(localRayResult);
135 } 135 }
136 } 136 }
137 } 137 }
138 else 138 else
139 { 139 {
140 if (collisionShape.IsConcave) 140 if (collisionShape.IsConcave)
141 { 141 {
142 142
143 TriangleMeshShape triangleMesh = collisionShape as TriangleMeshShape; 143 TriangleMeshShape triangleMesh = collisionShape as TriangleMeshShape;
144 144
145 Matrix worldTocollisionObject = MathHelper.InvertMatrix(colObjWorldTransform); 145 Matrix worldTocollisionObject = MathHelper.InvertMatrix(colObjWorldTransform);
146 146
147 Vector3 rayFromLocal = Vector3.TransformNormal(rayFromTrans.Translation, worldTocollisionObject); 147 Vector3 rayFromLocal = Vector3.TransformNormal(rayFromTrans.Translation, worldTocollisionObject);
148 Vector3 rayToLocal = Vector3.TransformNormal(rayToTrans.Translation, worldTocollisionObject); 148 Vector3 rayToLocal = Vector3.TransformNormal(rayToTrans.Translation, worldTocollisionObject);
149 149
150 BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh); 150 BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh);
151 rcb.HitFraction = resultCallback.ClosestHitFraction; 151 rcb.HitFraction = resultCallback.ClosestHitFraction;
152 152
153 Vector3 rayAabbMinLocal = rayFromLocal; 153 Vector3 rayAabbMinLocal = rayFromLocal;
154 MathHelper.SetMin(ref rayAabbMinLocal, rayToLocal); 154 MathHelper.SetMin(ref rayAabbMinLocal, rayToLocal);
155 Vector3 rayAabbMaxLocal = rayFromLocal; 155 Vector3 rayAabbMaxLocal = rayFromLocal;
156 MathHelper.SetMax(ref rayAabbMaxLocal, rayToLocal); 156 MathHelper.SetMax(ref rayAabbMaxLocal, rayToLocal);
157 157
158 triangleMesh.ProcessAllTriangles(rcb, rayAabbMinLocal, rayAabbMaxLocal); 158 triangleMesh.ProcessAllTriangles(rcb, rayAabbMinLocal, rayAabbMaxLocal);
159 } 159 }
160 else 160 else
161 { 161 {
162 //todo: use AABB tree or other BVH acceleration structure! 162 //todo: use AABB tree or other BVH acceleration structure!
163 if (collisionShape.IsCompound) 163 if (collisionShape.IsCompound)
164 { 164 {
165 CompoundShape compoundShape = collisionShape as CompoundShape; 165 CompoundShape compoundShape = collisionShape as CompoundShape;
166 for (int i = 0; i < compoundShape.ChildShapeCount; i++) 166 for (int i = 0; i < compoundShape.ChildShapeCount; i++)
167 { 167 {
168 Matrix childTrans = compoundShape.GetChildTransform(i); 168 Matrix childTrans = compoundShape.GetChildTransform(i);
169 CollisionShape childCollisionShape = compoundShape.GetChildShape(i); 169 CollisionShape childCollisionShape = compoundShape.GetChildShape(i);
170 Matrix childWorldTrans = colObjWorldTransform * childTrans; 170 Matrix childWorldTrans = colObjWorldTransform * childTrans;
171 RayTestSingle(rayFromTrans, rayToTrans, 171 RayTestSingle(rayFromTrans, rayToTrans,
172 collisionObject, 172 collisionObject,
173 childCollisionShape, 173 childCollisionShape,
174 childWorldTrans, 174 childWorldTrans,
175 resultCallback); 175 resultCallback);
176 } 176 }
177 } 177 }
178 } 178 }
179 } 179 }
180 } 180 }
181 } 181 }
182 182
183 public void AddCollisionObject(CollisionObject collisionObject, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask) 183 public void AddCollisionObject(CollisionObject collisionObject, BroadphaseProxy.CollisionFilterGroups collisionFilterGroup, BroadphaseProxy.CollisionFilterGroups collisionFilterMask)
184 { 184 {
185 //check that the object isn't already added 185 //check that the object isn't already added
186 if (!_collisionObjects.Contains(collisionObject)) 186 if (!_collisionObjects.Contains(collisionObject))
187 { 187 {
188 _collisionObjects.Add(collisionObject); 188 _collisionObjects.Add(collisionObject);
189 189
190 //calculate new AABB 190 //calculate new AABB
191 Matrix trans = collisionObject.WorldTransform; 191 Matrix trans = collisionObject.WorldTransform;
192 192
193 Vector3 minAabb; 193 Vector3 minAabb;
194 Vector3 maxAabb; 194 Vector3 maxAabb;
195 collisionObject.CollisionShape.GetAabb(trans, out minAabb, out maxAabb); 195 collisionObject.CollisionShape.GetAabb(trans, out minAabb, out maxAabb);
196 196
197 BroadphaseNativeTypes type = collisionObject.CollisionShape.ShapeType; 197 BroadphaseNativeTypes type = collisionObject.CollisionShape.ShapeType;
198 collisionObject.Broadphase = Broadphase.CreateProxy( 198 collisionObject.Broadphase = Broadphase.CreateProxy(
199 minAabb, 199 minAabb,
200 maxAabb, 200 maxAabb,
201 type, 201 type,
202 collisionObject, 202 collisionObject,
203 collisionFilterGroup, 203 collisionFilterGroup,
204 collisionFilterMask 204 collisionFilterMask
205 ); 205 );
206 } 206 }
207 } 207 }
208 208
209 public void AddCollisionObject(CollisionObject collisionObject) 209 public void AddCollisionObject(CollisionObject collisionObject)
210 { 210 {
211 AddCollisionObject(collisionObject, BroadphaseProxy.CollisionFilterGroups.Default, BroadphaseProxy.CollisionFilterGroups.Default); 211 AddCollisionObject(collisionObject, BroadphaseProxy.CollisionFilterGroups.Default, BroadphaseProxy.CollisionFilterGroups.Default);
212 } 212 }
213 213
214 public void RemoveCollisionObject(CollisionObject collisionObject) 214 public void RemoveCollisionObject(CollisionObject collisionObject)
215 { 215 {
216 BroadphaseProxy bp = collisionObject.Broadphase; 216 BroadphaseProxy bp = collisionObject.Broadphase;
217 if (bp != null) 217 if (bp != null)
218 { 218 {
219 // 219 //
220 // only clear the cached algorithms 220 // only clear the cached algorithms
221 // 221 //
222 Broadphase.CleanProxyFromPairs(bp); 222 Broadphase.CleanProxyFromPairs(bp);
223 Broadphase.DestroyProxy(bp); 223 Broadphase.DestroyProxy(bp);
224 collisionObject.Broadphase = null; 224 collisionObject.Broadphase = null;
225 } 225 }
226 226
227 _collisionObjects.Remove(collisionObject); 227 _collisionObjects.Remove(collisionObject);
228 } 228 }
229 229
230 public virtual void PerformDiscreteCollisionDetection() 230 public virtual void PerformDiscreteCollisionDetection()
231 { 231 {
232 DispatcherInfo dispatchInfo = DispatchInfo; 232 DispatcherInfo dispatchInfo = DispatchInfo;
233 //update aabb (of all moved objects) 233 //update aabb (of all moved objects)
234 234
235 Vector3 aabbMin, aabbMax; 235 Vector3 aabbMin, aabbMax;
236 for (int i = 0; i < _collisionObjects.Count; i++) 236 for (int i = 0; i < _collisionObjects.Count; i++)
237 { 237 {
238 _collisionObjects[i].CollisionShape.GetAabb(_collisionObjects[i].WorldTransform, out aabbMin, out aabbMax); 238 _collisionObjects[i].CollisionShape.GetAabb(_collisionObjects[i].WorldTransform, out aabbMin, out aabbMax);
239 _broadphasePairCache.SetAabb(_collisionObjects[i].Broadphase, aabbMin, aabbMax); 239 _broadphasePairCache.SetAabb(_collisionObjects[i].Broadphase, aabbMin, aabbMax);
240 } 240 }
241 241
242 _broadphasePairCache.RefreshOverlappingPairs(); 242 _broadphasePairCache.RefreshOverlappingPairs();
243 243
244 IDispatcher dispatcher = Dispatcher; 244 IDispatcher dispatcher = Dispatcher;
245 if (dispatcher != null) 245 if (dispatcher != null)
246 dispatcher.DispatchAllCollisionPairs(_broadphasePairCache, dispatchInfo); 246 dispatcher.DispatchAllCollisionPairs(_broadphasePairCache, dispatchInfo);
247 } 247 }
248 248
249 public void Dispose(bool disposing) 249 public void Dispose(bool disposing)
250 { 250 {
251 if (disposing) 251 if (disposing)
252 { 252 {
253 //clean up remaining objects 253 //clean up remaining objects
254 foreach (CollisionObject collisionObject in _collisionObjects) 254 foreach (CollisionObject collisionObject in _collisionObjects)
255 { 255 {
256 BroadphaseProxy bp = collisionObject.Broadphase; 256 BroadphaseProxy bp = collisionObject.Broadphase;
257 if (bp != null) 257 if (bp != null)
258 { 258 {
259 // 259 //
260 // only clear the cached algorithms 260 // only clear the cached algorithms
261 // 261 //
262 Broadphase.CleanProxyFromPairs(bp); 262 Broadphase.CleanProxyFromPairs(bp);
263 Broadphase.DestroyProxy(bp); 263 Broadphase.DestroyProxy(bp);
264 } 264 }
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 /// <summary> 269 /// <summary>
270 /// LocalShapeInfo gives extra information for complex shapes 270 /// LocalShapeInfo gives extra information for complex shapes
271 /// Currently, only TriangleMeshShape is available, so it just contains triangleIndex and subpart 271 /// Currently, only TriangleMeshShape is available, so it just contains triangleIndex and subpart
272 /// </summary> 272 /// </summary>
273 public struct LocalShapeInfo 273 public struct LocalShapeInfo
274 { 274 {
275 private int _shapePart; 275 private int _shapePart;
276 private int _triangleIndex; 276 private int _triangleIndex;
277 277
278 public int ShapePart { get { return _shapePart; } set { _shapePart = value; } } 278 public int ShapePart { get { return _shapePart; } set { _shapePart = value; } }
279 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } } 279 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } }
280 } 280 }
281 281
282 public struct LocalRayResult 282 public struct LocalRayResult
283 { 283 {
284 private CollisionObject _collisionObject; 284 private CollisionObject _collisionObject;
285 private LocalShapeInfo _localShapeInfo; 285 private LocalShapeInfo _localShapeInfo;
286 private Vector3 _hitNormalLocal; 286 private Vector3 _hitNormalLocal;
287 private float _hitFraction; 287 private float _hitFraction;
288 288
289 public LocalRayResult(CollisionObject collisionObject, 289 public LocalRayResult(CollisionObject collisionObject,
290 LocalShapeInfo localShapeInfo, 290 LocalShapeInfo localShapeInfo,
291 Vector3 hitNormalLocal, 291 Vector3 hitNormalLocal,
292 float hitFraction) 292 float hitFraction)
293 { 293 {
294 _collisionObject = collisionObject; 294 _collisionObject = collisionObject;
295 _localShapeInfo = localShapeInfo; 295 _localShapeInfo = localShapeInfo;
296 _hitNormalLocal = hitNormalLocal; 296 _hitNormalLocal = hitNormalLocal;
297 _hitFraction = hitFraction; 297 _hitFraction = hitFraction;
298 } 298 }
299 299
300 public CollisionObject CollisionObject { get { return _collisionObject; } set { _collisionObject = value; } } 300 public CollisionObject CollisionObject { get { return _collisionObject; } set { _collisionObject = value; } }
301 public LocalShapeInfo LocalShapeInfo { get { return _localShapeInfo; } set { _localShapeInfo = value; } } 301 public LocalShapeInfo LocalShapeInfo { get { return _localShapeInfo; } set { _localShapeInfo = value; } }
302 public Vector3 HitNormalLocal { get { return _hitNormalLocal; } set { _hitNormalLocal = value; } } 302 public Vector3 HitNormalLocal { get { return _hitNormalLocal; } set { _hitNormalLocal = value; } }
303 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } } 303 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } }
304 } 304 }
305 305
306 /// <summary> 306 /// <summary>
307 /// RayResultCallback is used to report new raycast results 307 /// RayResultCallback is used to report new raycast results
308 /// </summary> 308 /// </summary>
309 public abstract class RayResultCallback 309 public abstract class RayResultCallback
310 { 310 {
311 private float _closestHitFraction; 311 private float _closestHitFraction;
312 312
313 public RayResultCallback() 313 public RayResultCallback()
314 { 314 {
315 _closestHitFraction = 1; 315 _closestHitFraction = 1;
316 } 316 }
317 317
318 public float ClosestHitFraction { get { return _closestHitFraction; } set { _closestHitFraction = value; } } 318 public float ClosestHitFraction { get { return _closestHitFraction; } set { _closestHitFraction = value; } }
319 public bool HasHit { get { return _closestHitFraction < 1; } } 319 public bool HasHit { get { return _closestHitFraction < 1; } }
320 320
321 public abstract float AddSingleResult(LocalRayResult rayResult); 321 public abstract float AddSingleResult(LocalRayResult rayResult);
322 } 322 }
323 323
324 public class ClosestRayResultCallback : RayResultCallback 324 public class ClosestRayResultCallback : RayResultCallback
325 { 325 {
326 private Vector3 _rayFromWorld;//used to calculate hitPointWorld from hitFraction 326 private Vector3 _rayFromWorld;//used to calculate hitPointWorld from hitFraction
327 private Vector3 _rayToWorld; 327 private Vector3 _rayToWorld;
328 328
329 private Vector3 _hitNormalWorld; 329 private Vector3 _hitNormalWorld;
330 private Vector3 _hitPointWorld; 330 private Vector3 _hitPointWorld;
331 private CollisionObject _collisionObject; 331 private CollisionObject _collisionObject;
332 332
333 public ClosestRayResultCallback(Vector3 rayFromWorld, Vector3 rayToWorld) 333 public ClosestRayResultCallback(Vector3 rayFromWorld, Vector3 rayToWorld)
334 { 334 {
335 _rayFromWorld = rayFromWorld; 335 _rayFromWorld = rayFromWorld;
336 _rayToWorld = rayToWorld; 336 _rayToWorld = rayToWorld;
337 _collisionObject = null; 337 _collisionObject = null;
338 } 338 }
339 339
340 public Vector3 RayFromWorld { get { return _rayFromWorld; } set { _rayFromWorld = value; } } 340 public Vector3 RayFromWorld { get { return _rayFromWorld; } set { _rayFromWorld = value; } }
341 public Vector3 RayToWorld { get { return _rayToWorld; } set { _rayToWorld = value; } } 341 public Vector3 RayToWorld { get { return _rayToWorld; } set { _rayToWorld = value; } }
342 public Vector3 HitNormalWorld { get { return _hitNormalWorld; } set { _hitNormalWorld = value; } } 342 public Vector3 HitNormalWorld { get { return _hitNormalWorld; } set { _hitNormalWorld = value; } }
343 public Vector3 HitPointWorld { get { return _hitPointWorld; } set { _hitPointWorld = value; } } 343 public Vector3 HitPointWorld { get { return _hitPointWorld; } set { _hitPointWorld = value; } }
344 public CollisionObject CollisionObject { get { return _collisionObject; } set { _collisionObject = value; } } 344 public CollisionObject CollisionObject { get { return _collisionObject; } set { _collisionObject = value; } }
345 345
346 public override float AddSingleResult(LocalRayResult rayResult) 346 public override float AddSingleResult(LocalRayResult rayResult)
347 { 347 {
348 //caller already does the filter on the m_closestHitFraction 348 //caller already does the filter on the m_closestHitFraction
349 //assert(rayResult.m_hitFraction <= m_closestHitFraction); 349 //assert(rayResult.m_hitFraction <= m_closestHitFraction);
350 ClosestHitFraction = rayResult.HitFraction; 350 ClosestHitFraction = rayResult.HitFraction;
351 _collisionObject = rayResult.CollisionObject; 351 _collisionObject = rayResult.CollisionObject;
352 _hitNormalWorld = Vector3.TransformNormal(rayResult.HitNormalLocal, _collisionObject.WorldTransform); 352 _hitNormalWorld = Vector3.TransformNormal(rayResult.HitNormalLocal, _collisionObject.WorldTransform);
353 MathHelper.SetInterpolate3(_rayFromWorld, _rayToWorld, rayResult.HitFraction, ref _hitPointWorld); 353 MathHelper.SetInterpolate3(_rayFromWorld, _rayToWorld, rayResult.HitFraction, ref _hitPointWorld);
354 return rayResult.HitFraction; 354 return rayResult.HitFraction;
355 } 355 }
356 } 356 }
357 } 357 }
358} 358}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CompoundCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CompoundCollisionAlgorithm.cs
index 3fec7d0..6f2278a 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CompoundCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/CompoundCollisionAlgorithm.cs
@@ -1,157 +1,157 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using System.Diagnostics; 25using System.Diagnostics;
26using MonoXnaCompactMaths; 26using MonoXnaCompactMaths;
27 27
28namespace XnaDevRu.BulletX 28namespace XnaDevRu.BulletX
29{ 29{
30 public class CompoundCollisionAlgorithm : CollisionAlgorithm 30 public class CompoundCollisionAlgorithm : CollisionAlgorithm
31 { 31 {
32 private List<CollisionAlgorithm> _childCollisionAlgorithms; 32 private List<CollisionAlgorithm> _childCollisionAlgorithms;
33 private bool _isSwapped; 33 private bool _isSwapped;
34 34
35 public CompoundCollisionAlgorithm( 35 public CompoundCollisionAlgorithm(
36 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, 36 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo,
37 CollisionObject bodyA, 37 CollisionObject bodyA,
38 CollisionObject bodyB, bool isSwapped) 38 CollisionObject bodyB, bool isSwapped)
39 : base(collisionAlgorithmConstructionInfo) 39 : base(collisionAlgorithmConstructionInfo)
40 { 40 {
41 //Begin 41 //Begin
42 _isSwapped = isSwapped; 42 _isSwapped = isSwapped;
43 43
44 CollisionObject collisionObject = isSwapped ? bodyB : bodyA; 44 CollisionObject collisionObject = isSwapped ? bodyB : bodyA;
45 CollisionObject otherObject = isSwapped ? bodyA : bodyB; 45 CollisionObject otherObject = isSwapped ? bodyA : bodyB;
46 46
47 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound); 47 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound);
48 48
49 CompoundShape compoundShape = collisionObject.CollisionShape as CompoundShape; 49 CompoundShape compoundShape = collisionObject.CollisionShape as CompoundShape;
50 int childrenNumber = compoundShape.ChildShapeCount; 50 int childrenNumber = compoundShape.ChildShapeCount;
51 int index = 0; 51 int index = 0;
52 52
53 _childCollisionAlgorithms = new List<CollisionAlgorithm>(childrenNumber); 53 _childCollisionAlgorithms = new List<CollisionAlgorithm>(childrenNumber);
54 54
55 for (index = 0; index < childrenNumber; index++) 55 for (index = 0; index < childrenNumber; index++)
56 { 56 {
57 CollisionShape childShape = compoundShape.GetChildShape(index); 57 CollisionShape childShape = compoundShape.GetChildShape(index);
58 CollisionShape orgShape = collisionObject.CollisionShape; 58 CollisionShape orgShape = collisionObject.CollisionShape;
59 59
60 collisionObject.CollisionShape = childShape; 60 collisionObject.CollisionShape = childShape;
61 _childCollisionAlgorithms[index] = collisionAlgorithmConstructionInfo.Dispatcher.FindAlgorithm(collisionObject, otherObject); 61 _childCollisionAlgorithms[index] = collisionAlgorithmConstructionInfo.Dispatcher.FindAlgorithm(collisionObject, otherObject);
62 collisionObject.CollisionShape = orgShape; 62 collisionObject.CollisionShape = orgShape;
63 } 63 }
64 } 64 }
65 65
66 public override void ProcessCollision( 66 public override void ProcessCollision(
67 CollisionObject bodyA, 67 CollisionObject bodyA,
68 CollisionObject bodyB, 68 CollisionObject bodyB,
69 DispatcherInfo dispatchInfo, ManifoldResult resultOut) 69 DispatcherInfo dispatchInfo, ManifoldResult resultOut)
70 { 70 {
71 //Begin 71 //Begin
72 72
73 CollisionObject collisionObject = _isSwapped ? bodyB : bodyB; 73 CollisionObject collisionObject = _isSwapped ? bodyB : bodyB;
74 CollisionObject otherObject = _isSwapped ? bodyA : bodyB; 74 CollisionObject otherObject = _isSwapped ? bodyA : bodyB;
75 75
76 //Debug.Assert(collisionObject.getCollisionShape().isCompound()); 76 //Debug.Assert(collisionObject.getCollisionShape().isCompound());
77 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound); 77 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound);
78 78
79 CompoundShape compoundShape = (CompoundShape)collisionObject.CollisionShape; 79 CompoundShape compoundShape = (CompoundShape)collisionObject.CollisionShape;
80 80
81 int childrenNumber = _childCollisionAlgorithms.Count; 81 int childrenNumber = _childCollisionAlgorithms.Count;
82 82
83 for (int i = 0; i < childrenNumber; i++) 83 for (int i = 0; i < childrenNumber; i++)
84 { 84 {
85 CompoundShape childShape = compoundShape.GetChildShape(i) as CompoundShape; 85 CompoundShape childShape = compoundShape.GetChildShape(i) as CompoundShape;
86 86
87 Matrix orgTransform = collisionObject.WorldTransform; 87 Matrix orgTransform = collisionObject.WorldTransform;
88 CollisionShape orgShape = collisionObject.CollisionShape; 88 CollisionShape orgShape = collisionObject.CollisionShape;
89 89
90 Matrix childTransform = compoundShape.GetChildTransform(i); 90 Matrix childTransform = compoundShape.GetChildTransform(i);
91 Matrix newChildWorld = orgTransform * childTransform; 91 Matrix newChildWorld = orgTransform * childTransform;
92 92
93 collisionObject.WorldTransform = newChildWorld; 93 collisionObject.WorldTransform = newChildWorld;
94 collisionObject.CollisionShape = childShape; 94 collisionObject.CollisionShape = childShape;
95 _childCollisionAlgorithms[i].ProcessCollision(collisionObject, otherObject, dispatchInfo, resultOut); 95 _childCollisionAlgorithms[i].ProcessCollision(collisionObject, otherObject, dispatchInfo, resultOut);
96 96
97 collisionObject.CollisionShape = orgShape; 97 collisionObject.CollisionShape = orgShape;
98 collisionObject.WorldTransform = orgTransform; 98 collisionObject.WorldTransform = orgTransform;
99 } 99 }
100 } 100 }
101 101
102 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 102 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
103 { 103 {
104 CollisionObject collisionObject = _isSwapped ? bodyB : bodyA; 104 CollisionObject collisionObject = _isSwapped ? bodyB : bodyA;
105 CollisionObject otherObject = _isSwapped ? bodyA : bodyB; 105 CollisionObject otherObject = _isSwapped ? bodyA : bodyB;
106 106
107 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound); 107 BulletDebug.Assert(collisionObject.CollisionShape.IsCompound);
108 108
109 CompoundShape compoundShape = (CompoundShape)collisionObject.CollisionShape; 109 CompoundShape compoundShape = (CompoundShape)collisionObject.CollisionShape;
110 110
111 float hitFraction = 1.0f; 111 float hitFraction = 1.0f;
112 112
113 for (int i = 0; i < _childCollisionAlgorithms.Count; i++) 113 for (int i = 0; i < _childCollisionAlgorithms.Count; i++)
114 { 114 {
115 CollisionShape childShape = compoundShape.GetChildShape(i); 115 CollisionShape childShape = compoundShape.GetChildShape(i);
116 116
117 Matrix orgTransform = collisionObject.WorldTransform; 117 Matrix orgTransform = collisionObject.WorldTransform;
118 CollisionShape orgShape = collisionObject.CollisionShape; 118 CollisionShape orgShape = collisionObject.CollisionShape;
119 119
120 Matrix childTransform = compoundShape.GetChildTransform(i); 120 Matrix childTransform = compoundShape.GetChildTransform(i);
121 Matrix newChildWorld = orgTransform * childTransform; 121 Matrix newChildWorld = orgTransform * childTransform;
122 collisionObject.WorldTransform = newChildWorld; 122 collisionObject.WorldTransform = newChildWorld;
123 123
124 collisionObject.CollisionShape = childShape; 124 collisionObject.CollisionShape = childShape;
125 float frac = _childCollisionAlgorithms[i].CalculateTimeOfImpact( 125 float frac = _childCollisionAlgorithms[i].CalculateTimeOfImpact(
126 collisionObject, otherObject, dispatchInfo, resultOut 126 collisionObject, otherObject, dispatchInfo, resultOut
127 ); 127 );
128 128
129 if (frac < hitFraction) 129 if (frac < hitFraction)
130 { 130 {
131 hitFraction = frac; 131 hitFraction = frac;
132 } 132 }
133 133
134 collisionObject.CollisionShape = orgShape; 134 collisionObject.CollisionShape = orgShape;
135 collisionObject.WorldTransform = orgTransform; 135 collisionObject.WorldTransform = orgTransform;
136 } 136 }
137 137
138 return hitFraction; 138 return hitFraction;
139 } 139 }
140 140
141 public class CreateFunc : CollisionAlgorithmCreateFunction 141 public class CreateFunc : CollisionAlgorithmCreateFunction
142 { 142 {
143 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 143 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
144 { 144 {
145 return new CompoundCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, false); 145 return new CompoundCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, false);
146 } 146 }
147 }; 147 };
148 148
149 public class SwappedCreateFunc : CollisionAlgorithmCreateFunction 149 public class SwappedCreateFunc : CollisionAlgorithmCreateFunction
150 { 150 {
151 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 151 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
152 { 152 {
153 return new CompoundCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, true); 153 return new CompoundCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, true);
154 } 154 }
155 }; 155 };
156 } 156 }
157} 157}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cs
index c4949f0..39438e4 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cs
@@ -1,189 +1,189 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class ConvexConcaveCollisionAlgorithm : CollisionAlgorithm 29 public class ConvexConcaveCollisionAlgorithm : CollisionAlgorithm
30 { 30 {
31 private bool _isSwapped; 31 private bool _isSwapped;
32 private ConvexTriangleCallback _convexTriangleCallback; 32 private ConvexTriangleCallback _convexTriangleCallback;
33 33
34 public ConvexConcaveCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped) 34 public ConvexConcaveCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped)
35 : base(collisionAlgorithmConstructionInfo) 35 : base(collisionAlgorithmConstructionInfo)
36 { 36 {
37 _isSwapped = isSwapped; 37 _isSwapped = isSwapped;
38 _convexTriangleCallback = new ConvexTriangleCallback(collisionAlgorithmConstructionInfo.Dispatcher, bodyA, bodyB, isSwapped); 38 _convexTriangleCallback = new ConvexTriangleCallback(collisionAlgorithmConstructionInfo.Dispatcher, bodyA, bodyB, isSwapped);
39 } 39 }
40 40
41 public void ClearCache() 41 public void ClearCache()
42 { 42 {
43 _convexTriangleCallback.ClearCache(); 43 _convexTriangleCallback.ClearCache();
44 } 44 }
45 45
46 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 46 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
47 { 47 {
48 CollisionObject convexBody = _isSwapped ? bodyB : bodyA; 48 CollisionObject convexBody = _isSwapped ? bodyB : bodyA;
49 CollisionObject triBody = _isSwapped ? bodyA : bodyB; 49 CollisionObject triBody = _isSwapped ? bodyA : bodyB;
50 50
51 if (triBody.CollisionShape.IsConcave) 51 if (triBody.CollisionShape.IsConcave)
52 { 52 {
53 CollisionObject triOb = triBody; 53 CollisionObject triOb = triBody;
54 ConcaveShape concaveShape = triOb.CollisionShape as ConcaveShape; 54 ConcaveShape concaveShape = triOb.CollisionShape as ConcaveShape;
55 55
56 if (convexBody.CollisionShape.IsConvex) 56 if (convexBody.CollisionShape.IsConvex)
57 { 57 {
58 float collisionMarginTriangle = concaveShape.Margin; 58 float collisionMarginTriangle = concaveShape.Margin;
59 59
60 resultOut.SetPersistentManifold(_convexTriangleCallback.Manifold); 60 resultOut.SetPersistentManifold(_convexTriangleCallback.Manifold);
61 _convexTriangleCallback.SetTimeStepAndCounters(collisionMarginTriangle, dispatchInfo, resultOut); 61 _convexTriangleCallback.SetTimeStepAndCounters(collisionMarginTriangle, dispatchInfo, resultOut);
62 62
63 //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here. 63 //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here.
64 //m_dispatcher->clearManifold(m_btConvexTriangleCallback.m_manifoldPtr); 64 //m_dispatcher->clearManifold(m_btConvexTriangleCallback.m_manifoldPtr);
65 65
66 _convexTriangleCallback.Manifold.SetBodies(convexBody, triBody); 66 _convexTriangleCallback.Manifold.SetBodies(convexBody, triBody);
67 concaveShape.ProcessAllTriangles(_convexTriangleCallback, _convexTriangleCallback.AabbMin, _convexTriangleCallback.AabbMax); 67 concaveShape.ProcessAllTriangles(_convexTriangleCallback, _convexTriangleCallback.AabbMin, _convexTriangleCallback.AabbMax);
68 } 68 }
69 } 69 }
70 } 70 }
71 71
72 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 72 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
73 { 73 {
74 CollisionObject convexbody = _isSwapped ? bodyB : bodyA; 74 CollisionObject convexbody = _isSwapped ? bodyB : bodyA;
75 CollisionObject triBody = _isSwapped ? bodyA : bodyB; 75 CollisionObject triBody = _isSwapped ? bodyA : bodyB;
76 76
77 77
78 //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast) 78 //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast)
79 79
80 //only perform CCD above a certain threshold, this prevents blocking on the long run 80 //only perform CCD above a certain threshold, this prevents blocking on the long run
81 //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame... 81 //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame...
82 float squareMot0 = (convexbody.InterpolationWorldTransform.Translation - convexbody.WorldTransform.Translation).LengthSquared(); 82 float squareMot0 = (convexbody.InterpolationWorldTransform.Translation - convexbody.WorldTransform.Translation).LengthSquared();
83 if (squareMot0 < convexbody.CcdSquareMotionThreshold) 83 if (squareMot0 < convexbody.CcdSquareMotionThreshold)
84 { 84 {
85 return 1; 85 return 1;
86 } 86 }
87 87
88 Matrix triInv = MathHelper.InvertMatrix(triBody.WorldTransform); 88 Matrix triInv = MathHelper.InvertMatrix(triBody.WorldTransform);
89 Matrix convexFromLocal = triInv * convexbody.WorldTransform; 89 Matrix convexFromLocal = triInv * convexbody.WorldTransform;
90 Matrix convexToLocal = triInv * convexbody.InterpolationWorldTransform; 90 Matrix convexToLocal = triInv * convexbody.InterpolationWorldTransform;
91 91
92 if (triBody.CollisionShape.IsConcave) 92 if (triBody.CollisionShape.IsConcave)
93 { 93 {
94 Vector3 rayAabbMin = convexFromLocal.Translation; 94 Vector3 rayAabbMin = convexFromLocal.Translation;
95 MathHelper.SetMin(ref rayAabbMin, convexToLocal.Translation); 95 MathHelper.SetMin(ref rayAabbMin, convexToLocal.Translation);
96 Vector3 rayAabbMax = convexFromLocal.Translation; 96 Vector3 rayAabbMax = convexFromLocal.Translation;
97 MathHelper.SetMax(ref rayAabbMax, convexToLocal.Translation); 97 MathHelper.SetMax(ref rayAabbMax, convexToLocal.Translation);
98 float ccdRadius0 = convexbody.CcdSweptSphereRadius; 98 float ccdRadius0 = convexbody.CcdSweptSphereRadius;
99 rayAabbMin -= new Vector3(ccdRadius0, ccdRadius0, ccdRadius0); 99 rayAabbMin -= new Vector3(ccdRadius0, ccdRadius0, ccdRadius0);
100 rayAabbMax += new Vector3(ccdRadius0, ccdRadius0, ccdRadius0); 100 rayAabbMax += new Vector3(ccdRadius0, ccdRadius0, ccdRadius0);
101 101
102 float curHitFraction = 1f; //is this available? 102 float curHitFraction = 1f; //is this available?
103 LocalTriangleSphereCastCallback raycastCallback = new LocalTriangleSphereCastCallback(convexFromLocal, convexToLocal, 103 LocalTriangleSphereCastCallback raycastCallback = new LocalTriangleSphereCastCallback(convexFromLocal, convexToLocal,
104 convexbody.CcdSweptSphereRadius, curHitFraction); 104 convexbody.CcdSweptSphereRadius, curHitFraction);
105 105
106 raycastCallback.HitFraction = convexbody.HitFraction; 106 raycastCallback.HitFraction = convexbody.HitFraction;
107 107
108 CollisionObject concavebody = triBody; 108 CollisionObject concavebody = triBody;
109 109
110 ConcaveShape triangleMesh = concavebody.CollisionShape as ConcaveShape; 110 ConcaveShape triangleMesh = concavebody.CollisionShape as ConcaveShape;
111 111
112 if (triangleMesh != null) 112 if (triangleMesh != null)
113 { 113 {
114 triangleMesh.ProcessAllTriangles(raycastCallback, rayAabbMin, rayAabbMax); 114 triangleMesh.ProcessAllTriangles(raycastCallback, rayAabbMin, rayAabbMax);
115 } 115 }
116 116
117 if (raycastCallback.HitFraction < convexbody.HitFraction) 117 if (raycastCallback.HitFraction < convexbody.HitFraction)
118 { 118 {
119 convexbody.HitFraction = raycastCallback.HitFraction; 119 convexbody.HitFraction = raycastCallback.HitFraction;
120 return raycastCallback.HitFraction; 120 return raycastCallback.HitFraction;
121 } 121 }
122 } 122 }
123 123
124 return 1; 124 return 1;
125 } 125 }
126 126
127 public class CreateFunc : CollisionAlgorithmCreateFunction 127 public class CreateFunc : CollisionAlgorithmCreateFunction
128 { 128 {
129 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 129 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
130 { 130 {
131 return new ConvexConcaveCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, false); 131 return new ConvexConcaveCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, false);
132 } 132 }
133 } 133 }
134 134
135 public class SwappedCreateFunc : CollisionAlgorithmCreateFunction 135 public class SwappedCreateFunc : CollisionAlgorithmCreateFunction
136 { 136 {
137 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 137 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
138 { 138 {
139 return new ConvexConcaveCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, true); 139 return new ConvexConcaveCollisionAlgorithm(collisionAlgorithmConstructionInfo, bodyA, bodyB, true);
140 } 140 }
141 } 141 }
142 142
143 private class LocalTriangleSphereCastCallback : ITriangleCallback 143 private class LocalTriangleSphereCastCallback : ITriangleCallback
144 { 144 {
145 private Matrix _ccdSphereFromTrans; 145 private Matrix _ccdSphereFromTrans;
146 private Matrix _ccdSphereToTrans; 146 private Matrix _ccdSphereToTrans;
147 private Matrix _meshTransform; 147 private Matrix _meshTransform;
148 148
149 private float _ccdSphereRadius; 149 private float _ccdSphereRadius;
150 private float _hitFraction; 150 private float _hitFraction;
151 151
152 public LocalTriangleSphereCastCallback(Matrix from, Matrix to, float ccdSphereRadius, float hitFraction) 152 public LocalTriangleSphereCastCallback(Matrix from, Matrix to, float ccdSphereRadius, float hitFraction)
153 { 153 {
154 _ccdSphereFromTrans = from; 154 _ccdSphereFromTrans = from;
155 _ccdSphereToTrans = to; 155 _ccdSphereToTrans = to;
156 _ccdSphereRadius = ccdSphereRadius; 156 _ccdSphereRadius = ccdSphereRadius;
157 _hitFraction = hitFraction; 157 _hitFraction = hitFraction;
158 } 158 }
159 159
160 public Matrix CcdSphereFromTrans { get { return _ccdSphereFromTrans; } set { _ccdSphereFromTrans = value; } } 160 public Matrix CcdSphereFromTrans { get { return _ccdSphereFromTrans; } set { _ccdSphereFromTrans = value; } }
161 public Matrix CcdSphereToTrans { get { return _ccdSphereToTrans; } set { _ccdSphereToTrans = value; } } 161 public Matrix CcdSphereToTrans { get { return _ccdSphereToTrans; } set { _ccdSphereToTrans = value; } }
162 public Matrix MeshTransform { get { return _meshTransform; } set { _meshTransform = value; } } 162 public Matrix MeshTransform { get { return _meshTransform; } set { _meshTransform = value; } }
163 public float CcdSphereRadius { get { return _ccdSphereRadius; } set { _ccdSphereRadius = value; } } 163 public float CcdSphereRadius { get { return _ccdSphereRadius; } set { _ccdSphereRadius = value; } }
164 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } } 164 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } }
165 165
166 public void ProcessTriangle(Vector3[] triangle, int partId, int triangleIndex) 166 public void ProcessTriangle(Vector3[] triangle, int partId, int triangleIndex)
167 { 167 {
168 //do a swept sphere for now 168 //do a swept sphere for now
169 Matrix ident = Matrix.Identity; 169 Matrix ident = Matrix.Identity;
170 CastResult castResult = new CastResult(); 170 CastResult castResult = new CastResult();
171 castResult.Fraction = _hitFraction; 171 castResult.Fraction = _hitFraction;
172 SphereShape pointShape = new SphereShape(_ccdSphereRadius); 172 SphereShape pointShape = new SphereShape(_ccdSphereRadius);
173 TriangleShape triShape = new TriangleShape(triangle[0], triangle[1], triangle[2]); 173 TriangleShape triShape = new TriangleShape(triangle[0], triangle[1], triangle[2]);
174 VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver(); 174 VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver();
175 SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, triShape, simplexSolver); 175 SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, triShape, simplexSolver);
176 //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver); 176 //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
177 //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0); 177 //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
178 //local space? 178 //local space?
179 179
180 if (convexCaster.CalcTimeOfImpact(_ccdSphereFromTrans, _ccdSphereToTrans, 180 if (convexCaster.CalcTimeOfImpact(_ccdSphereFromTrans, _ccdSphereToTrans,
181 ident, ident, castResult)) 181 ident, ident, castResult))
182 { 182 {
183 if (_hitFraction > castResult.Fraction) 183 if (_hitFraction > castResult.Fraction)
184 _hitFraction = castResult.Fraction; 184 _hitFraction = castResult.Fraction;
185 } 185 }
186 } 186 }
187 } 187 }
188 } 188 }
189} 189}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConvexCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConvexCollisionAlgorithm.cs
index 8fa4837..01c8fe0 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConvexCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexConvexCollisionAlgorithm.cs
@@ -1,193 +1,193 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public class ConvexConvexAlgorithm : CollisionAlgorithm, IDisposable 28 public class ConvexConvexAlgorithm : CollisionAlgorithm, IDisposable
29 { 29 {
30 private const bool DisableCcd = false; 30 private const bool DisableCcd = false;
31 private GjkPairDetector _gjkPairDetector; 31 private GjkPairDetector _gjkPairDetector;
32 private bool _ownManifold; 32 private bool _ownManifold;
33 private PersistentManifold _manifold; 33 private PersistentManifold _manifold;
34 private bool _lowLevelOfDetail; 34 private bool _lowLevelOfDetail;
35 35
36 public ConvexConvexAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver) 36 public ConvexConvexAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver)
37 : base(collisionAlgorithmConstructionInfo) 37 : base(collisionAlgorithmConstructionInfo)
38 { 38 {
39 _gjkPairDetector = new GjkPairDetector(null, null, simplexSolver, penetrationDepthSolver); 39 _gjkPairDetector = new GjkPairDetector(null, null, simplexSolver, penetrationDepthSolver);
40 _ownManifold = false; 40 _ownManifold = false;
41 _manifold = manifold; 41 _manifold = manifold;
42 _lowLevelOfDetail = false; 42 _lowLevelOfDetail = false;
43 } 43 }
44 44
45 public bool LowLevelOfDetail { get { return _lowLevelOfDetail; } set { _lowLevelOfDetail = value; } } 45 public bool LowLevelOfDetail { get { return _lowLevelOfDetail; } set { _lowLevelOfDetail = value; } }
46 public bool OwnManifold { get { return _ownManifold; } set { _ownManifold = value; } } 46 public bool OwnManifold { get { return _ownManifold; } set { _ownManifold = value; } }
47 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } } 47 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } }
48 48
49 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 49 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
50 { 50 {
51 if (_manifold == null) 51 if (_manifold == null)
52 { 52 {
53 //swapped? 53 //swapped?
54 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB); 54 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB);
55 _ownManifold = true; 55 _ownManifold = true;
56 } 56 }
57 resultOut.SetPersistentManifold(_manifold); 57 resultOut.SetPersistentManifold(_manifold);
58 58
59 ConvexShape min0 = bodyA.CollisionShape as ConvexShape; 59 ConvexShape min0 = bodyA.CollisionShape as ConvexShape;
60 ConvexShape min1 = bodyB.CollisionShape as ConvexShape; 60 ConvexShape min1 = bodyB.CollisionShape as ConvexShape;
61 61
62 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 62 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
63 63
64 //TODO: if (dispatchInfo.m_useContinuous) 64 //TODO: if (dispatchInfo.m_useContinuous)
65 _gjkPairDetector.setMinkowskiA(min0); 65 _gjkPairDetector.setMinkowskiA(min0);
66 _gjkPairDetector.setMinkowskiB(min1); 66 _gjkPairDetector.setMinkowskiB(min1);
67 input.MaximumDistanceSquared = min0.Margin + min1.Margin + PersistentManifold.ContactBreakingThreshold; 67 input.MaximumDistanceSquared = min0.Margin + min1.Margin + PersistentManifold.ContactBreakingThreshold;
68 input.MaximumDistanceSquared *= input.MaximumDistanceSquared; 68 input.MaximumDistanceSquared *= input.MaximumDistanceSquared;
69 69
70 // input.m_maximumDistanceSquared = 1e30f; 70 // input.m_maximumDistanceSquared = 1e30f;
71 71
72 input.TransformA = bodyA.WorldTransform; 72 input.TransformA = bodyA.WorldTransform;
73 input.TransformB = bodyB.WorldTransform; 73 input.TransformB = bodyB.WorldTransform;
74 74
75 _gjkPairDetector.GetClosestPoints(input, resultOut, dispatchInfo.DebugDraw); 75 _gjkPairDetector.GetClosestPoints(input, resultOut, dispatchInfo.DebugDraw);
76 } 76 }
77 77
78 public override float CalculateTimeOfImpact(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 78 public override float CalculateTimeOfImpact(CollisionObject colA, CollisionObject colB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
79 { 79 {
80 //Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold 80 //Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold
81 81
82 //Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold 82 //Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold
83 //col0->m_worldTransform, 83 //col0->m_worldTransform,
84 float resultFraction = 1f; 84 float resultFraction = 1f;
85 85
86 float squareMotA = (colA.InterpolationWorldTransform.Translation - colA.WorldTransform.Translation).LengthSquared(); 86 float squareMotA = (colA.InterpolationWorldTransform.Translation - colA.WorldTransform.Translation).LengthSquared();
87 float squareMotB = (colB.InterpolationWorldTransform.Translation - colB.WorldTransform.Translation).LengthSquared(); 87 float squareMotB = (colB.InterpolationWorldTransform.Translation - colB.WorldTransform.Translation).LengthSquared();
88 88
89 if (squareMotA < colA.CcdSquareMotionThreshold && 89 if (squareMotA < colA.CcdSquareMotionThreshold &&
90 squareMotB < colB.CcdSquareMotionThreshold) 90 squareMotB < colB.CcdSquareMotionThreshold)
91 return resultFraction; 91 return resultFraction;
92 92
93 if (DisableCcd) 93 if (DisableCcd)
94 return 1f; 94 return 1f;
95 95
96 //An adhoc way of testing the Continuous Collision Detection algorithms 96 //An adhoc way of testing the Continuous Collision Detection algorithms
97 //One object is approximated as a sphere, to simplify things 97 //One object is approximated as a sphere, to simplify things
98 //Starting in penetration should report no time of impact 98 //Starting in penetration should report no time of impact
99 //For proper CCD, better accuracy and handling of 'allowed' penetration should be added 99 //For proper CCD, better accuracy and handling of 'allowed' penetration should be added
100 //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies) 100 //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies)
101 101
102 // Convex0 against sphere for Convex1 102 // Convex0 against sphere for Convex1
103 { 103 {
104 ConvexShape convexA = colA.CollisionShape as ConvexShape; 104 ConvexShape convexA = colA.CollisionShape as ConvexShape;
105 105
106 SphereShape sphereB = new SphereShape(colB.CcdSweptSphereRadius); //todo: allow non-zero sphere sizes, for better approximation 106 SphereShape sphereB = new SphereShape(colB.CcdSweptSphereRadius); //todo: allow non-zero sphere sizes, for better approximation
107 CastResult result = new CastResult(); 107 CastResult result = new CastResult();
108 VoronoiSimplexSolver voronoiSimplex = new VoronoiSimplexSolver(); 108 VoronoiSimplexSolver voronoiSimplex = new VoronoiSimplexSolver();
109 //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); 109 //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
110 //Simplification, one object is simplified as a sphere 110 //Simplification, one object is simplified as a sphere
111 GjkConvexCast ccdB = new GjkConvexCast(convexA, sphereB, voronoiSimplex); 111 GjkConvexCast ccdB = new GjkConvexCast(convexA, sphereB, voronoiSimplex);
112 //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); 112 //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
113 if (ccdB.CalcTimeOfImpact(colA.WorldTransform, colA.InterpolationWorldTransform, 113 if (ccdB.CalcTimeOfImpact(colA.WorldTransform, colA.InterpolationWorldTransform,
114 colB.WorldTransform, colB.InterpolationWorldTransform, result)) 114 colB.WorldTransform, colB.InterpolationWorldTransform, result))
115 { 115 {
116 //store result.m_fraction in both bodies 116 //store result.m_fraction in both bodies
117 if (colA.HitFraction > result.Fraction) 117 if (colA.HitFraction > result.Fraction)
118 colA.HitFraction = result.Fraction; 118 colA.HitFraction = result.Fraction;
119 119
120 if (colB.HitFraction > result.Fraction) 120 if (colB.HitFraction > result.Fraction)
121 colB.HitFraction = result.Fraction; 121 colB.HitFraction = result.Fraction;
122 122
123 if (resultFraction > result.Fraction) 123 if (resultFraction > result.Fraction)
124 resultFraction = result.Fraction; 124 resultFraction = result.Fraction;
125 } 125 }
126 } 126 }
127 127
128 // Sphere (for convex0) against Convex1 128 // Sphere (for convex0) against Convex1
129 { 129 {
130 ConvexShape convexB = colB.CollisionShape as ConvexShape; 130 ConvexShape convexB = colB.CollisionShape as ConvexShape;
131 131
132 SphereShape sphereA = new SphereShape(colA.CcdSweptSphereRadius); //todo: allow non-zero sphere sizes, for better approximation 132 SphereShape sphereA = new SphereShape(colA.CcdSweptSphereRadius); //todo: allow non-zero sphere sizes, for better approximation
133 CastResult result = new CastResult(); 133 CastResult result = new CastResult();
134 VoronoiSimplexSolver voronoiSimplex = new VoronoiSimplexSolver(); 134 VoronoiSimplexSolver voronoiSimplex = new VoronoiSimplexSolver();
135 //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); 135 //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
136 ///Simplification, one object is simplified as a sphere 136 ///Simplification, one object is simplified as a sphere
137 GjkConvexCast ccdB = new GjkConvexCast(sphereA, convexB, voronoiSimplex); 137 GjkConvexCast ccdB = new GjkConvexCast(sphereA, convexB, voronoiSimplex);
138 //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); 138 //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
139 if (ccdB.CalcTimeOfImpact(colA.WorldTransform, colA.InterpolationWorldTransform, 139 if (ccdB.CalcTimeOfImpact(colA.WorldTransform, colA.InterpolationWorldTransform,
140 colB.WorldTransform, colB.InterpolationWorldTransform, result)) 140 colB.WorldTransform, colB.InterpolationWorldTransform, result))
141 { 141 {
142 //store result.m_fraction in both bodies 142 //store result.m_fraction in both bodies
143 if (colA.HitFraction > result.Fraction) 143 if (colA.HitFraction > result.Fraction)
144 colA.HitFraction = result.Fraction; 144 colA.HitFraction = result.Fraction;
145 145
146 if (colB.HitFraction > result.Fraction) 146 if (colB.HitFraction > result.Fraction)
147 colB.HitFraction = result.Fraction; 147 colB.HitFraction = result.Fraction;
148 148
149 if (resultFraction > result.Fraction) 149 if (resultFraction > result.Fraction)
150 resultFraction = result.Fraction; 150 resultFraction = result.Fraction;
151 } 151 }
152 } 152 }
153 return resultFraction; 153 return resultFraction;
154 } 154 }
155 155
156 public class CreateFunc : CollisionAlgorithmCreateFunction 156 public class CreateFunc : CollisionAlgorithmCreateFunction
157 { 157 {
158 private IConvexPenetrationDepthSolver _penetrationDepthSolver; 158 private IConvexPenetrationDepthSolver _penetrationDepthSolver;
159 private ISimplexSolver _simplexSolver; 159 private ISimplexSolver _simplexSolver;
160 //private bool _ownsSolvers; 160 //private bool _ownsSolvers;
161 161
162 public CreateFunc() 162 public CreateFunc()
163 { 163 {
164 //_ownsSolvers = true; 164 //_ownsSolvers = true;
165 _simplexSolver = new VoronoiSimplexSolver(); 165 _simplexSolver = new VoronoiSimplexSolver();
166 _penetrationDepthSolver = new GjkEpaPenetrationDepthSolver(); 166 _penetrationDepthSolver = new GjkEpaPenetrationDepthSolver();
167 } 167 }
168 168
169 public CreateFunc(ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver) 169 public CreateFunc(ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver)
170 { 170 {
171 //_ownsSolvers = false; 171 //_ownsSolvers = false;
172 _simplexSolver = simplexSolver; 172 _simplexSolver = simplexSolver;
173 _penetrationDepthSolver = penetrationDepthSolver; 173 _penetrationDepthSolver = penetrationDepthSolver;
174 } 174 }
175 175
176 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 176 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
177 { 177 {
178 return new ConvexConvexAlgorithm(collisionAlgorithmConstructionInfo.Manifold, collisionAlgorithmConstructionInfo, bodyA, bodyB, _simplexSolver, _penetrationDepthSolver); 178 return new ConvexConvexAlgorithm(collisionAlgorithmConstructionInfo.Manifold, collisionAlgorithmConstructionInfo, bodyA, bodyB, _simplexSolver, _penetrationDepthSolver);
179 } 179 }
180 } 180 }
181 181
182 #region IDisposable Members 182 #region IDisposable Members
183 public void Dispose() 183 public void Dispose()
184 { 184 {
185 if (_ownManifold) 185 if (_ownManifold)
186 { 186 {
187 if (_manifold != null) 187 if (_manifold != null)
188 Dispatcher.ReleaseManifold(_manifold); 188 Dispatcher.ReleaseManifold(_manifold);
189 } 189 }
190 } 190 }
191 #endregion 191 #endregion
192 } 192 }
193} 193}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexTriangleCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexTriangleCallback.cs
index 5355817..ba21c72 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexTriangleCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ConvexTriangleCallback.cs
@@ -1,130 +1,130 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class ConvexTriangleCallback : ITriangleCallback, IDisposable 29 public class ConvexTriangleCallback : ITriangleCallback, IDisposable
30 { 30 {
31 private CollisionObject _convexBody; 31 private CollisionObject _convexBody;
32 private CollisionObject _triBody; 32 private CollisionObject _triBody;
33 33
34 private Vector3 _aabbMin; 34 private Vector3 _aabbMin;
35 private Vector3 _aabbMax; 35 private Vector3 _aabbMax;
36 36
37 private ManifoldResult _resultOut; 37 private ManifoldResult _resultOut;
38 38
39 private IDispatcher _dispatcher; 39 private IDispatcher _dispatcher;
40 private DispatcherInfo _dispatchInfo; 40 private DispatcherInfo _dispatchInfo;
41 private float _collisionMarginTriangle; 41 private float _collisionMarginTriangle;
42 42
43 private int _triangleCount; 43 private int _triangleCount;
44 44
45 private PersistentManifold _manifold; 45 private PersistentManifold _manifold;
46 46
47 public ConvexTriangleCallback(IDispatcher dispatcher, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped) 47 public ConvexTriangleCallback(IDispatcher dispatcher, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped)
48 { 48 {
49 _dispatcher = dispatcher; 49 _dispatcher = dispatcher;
50 _dispatchInfo = null; 50 _dispatchInfo = null;
51 _convexBody = isSwapped ? bodyB : bodyA; 51 _convexBody = isSwapped ? bodyB : bodyA;
52 _triBody = isSwapped ? bodyA : bodyB; 52 _triBody = isSwapped ? bodyA : bodyB;
53 53
54 // create the manifold from the dispatcher 'manifold pool' 54 // create the manifold from the dispatcher 'manifold pool'
55 _manifold = _dispatcher.GetNewManifold(_convexBody, _triBody); 55 _manifold = _dispatcher.GetNewManifold(_convexBody, _triBody);
56 ClearCache(); 56 ClearCache();
57 } 57 }
58 58
59 public Vector3 AabbMin { get { return _aabbMin; } } 59 public Vector3 AabbMin { get { return _aabbMin; } }
60 public Vector3 AabbMax { get { return _aabbMax; } } 60 public Vector3 AabbMax { get { return _aabbMax; } }
61 public int TriangleCount { get { return _triangleCount; } set { _triangleCount = value; } } 61 public int TriangleCount { get { return _triangleCount; } set { _triangleCount = value; } }
62 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } } 62 public PersistentManifold Manifold { get { return _manifold; } set { _manifold = value; } }
63 63
64 public void SetTimeStepAndCounters(float collisionMarginTriangle, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 64 public void SetTimeStepAndCounters(float collisionMarginTriangle, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
65 { 65 {
66 _dispatchInfo = dispatchInfo; 66 _dispatchInfo = dispatchInfo;
67 _collisionMarginTriangle = collisionMarginTriangle; 67 _collisionMarginTriangle = collisionMarginTriangle;
68 _resultOut = resultOut; 68 _resultOut = resultOut;
69 69
70 //recalc aabbs 70 //recalc aabbs
71 Matrix convexInTriangleSpace = MathHelper.InvertMatrix(_triBody.WorldTransform) * _convexBody.WorldTransform; 71 Matrix convexInTriangleSpace = MathHelper.InvertMatrix(_triBody.WorldTransform) * _convexBody.WorldTransform;
72 CollisionShape convexShape = _convexBody.CollisionShape; 72 CollisionShape convexShape = _convexBody.CollisionShape;
73 //CollisionShape* triangleShape = static_cast<btCollisionShape*>(triBody->m_collisionShape); 73 //CollisionShape* triangleShape = static_cast<btCollisionShape*>(triBody->m_collisionShape);
74 convexShape.GetAabb(convexInTriangleSpace, out _aabbMin, out _aabbMax); 74 convexShape.GetAabb(convexInTriangleSpace, out _aabbMin, out _aabbMax);
75 float extraMargin = collisionMarginTriangle; 75 float extraMargin = collisionMarginTriangle;
76 Vector3 extra = new Vector3(extraMargin, extraMargin, extraMargin); 76 Vector3 extra = new Vector3(extraMargin, extraMargin, extraMargin);
77 77
78 _aabbMax += extra; 78 _aabbMax += extra;
79 _aabbMin -= extra; 79 _aabbMin -= extra;
80 } 80 }
81 81
82 public void ClearCache() 82 public void ClearCache()
83 { 83 {
84 _dispatcher.ClearManifold(_manifold); 84 _dispatcher.ClearManifold(_manifold);
85 } 85 }
86 86
87 #region ITriangleCallback Members 87 #region ITriangleCallback Members
88 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex) 88 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex)
89 { 89 {
90 //aabb filter is already applied! 90 //aabb filter is already applied!
91 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo = new CollisionAlgorithmConstructionInfo(); 91 CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo = new CollisionAlgorithmConstructionInfo();
92 collisionAlgorithmConstructionInfo.Dispatcher = _dispatcher; 92 collisionAlgorithmConstructionInfo.Dispatcher = _dispatcher;
93 93
94 CollisionObject collisionObject = _triBody; 94 CollisionObject collisionObject = _triBody;
95 95
96 //debug drawing of the overlapping triangles 96 //debug drawing of the overlapping triangles
97 /*if (m_dispatchInfoPtr && m_dispatchInfoPtr.m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0) 97 /*if (m_dispatchInfoPtr && m_dispatchInfoPtr.m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0)
98 { 98 {
99 Vector3 color = new Vector3(255, 255, 0); 99 Vector3 color = new Vector3(255, 255, 0);
100 btTransform & tr = ob->WorldTransform; 100 btTransform & tr = ob->WorldTransform;
101 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]), tr(triangle[1]), color); 101 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]), tr(triangle[1]), color);
102 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]), tr(triangle[2]), color); 102 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]), tr(triangle[2]), color);
103 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]), tr(triangle[0]), color); 103 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]), tr(triangle[0]), color);
104 }*/ 104 }*/
105 105
106 if (_convexBody.CollisionShape.IsConvex) 106 if (_convexBody.CollisionShape.IsConvex)
107 { 107 {
108 TriangleShape triangleShape = new TriangleShape(triangle[0], triangle[1], triangle[2]); 108 TriangleShape triangleShape = new TriangleShape(triangle[0], triangle[1], triangle[2]);
109 triangleShape.Margin=_collisionMarginTriangle; 109 triangleShape.Margin=_collisionMarginTriangle;
110 110
111 CollisionShape tempShape = collisionObject.CollisionShape; 111 CollisionShape tempShape = collisionObject.CollisionShape;
112 collisionObject.CollisionShape = triangleShape; 112 collisionObject.CollisionShape = triangleShape;
113 113
114 CollisionAlgorithm collisionAlgorithm = collisionAlgorithmConstructionInfo.Dispatcher.FindAlgorithm(_convexBody, _triBody, _manifold); 114 CollisionAlgorithm collisionAlgorithm = collisionAlgorithmConstructionInfo.Dispatcher.FindAlgorithm(_convexBody, _triBody, _manifold);
115 115
116 _resultOut.SetShapeIdentifiers(-1, -1, partID, triangleIndex); 116 _resultOut.SetShapeIdentifiers(-1, -1, partID, triangleIndex);
117 collisionAlgorithm.ProcessCollision(_convexBody, _triBody, _dispatchInfo, _resultOut); 117 collisionAlgorithm.ProcessCollision(_convexBody, _triBody, _dispatchInfo, _resultOut);
118 collisionObject.CollisionShape = tempShape; 118 collisionObject.CollisionShape = tempShape;
119 } 119 }
120 } 120 }
121 #endregion 121 #endregion
122 #region IDisposable Members 122 #region IDisposable Members
123 public void Dispose() 123 public void Dispose()
124 { 124 {
125 ClearCache(); 125 ClearCache();
126 _dispatcher.ReleaseManifold(_manifold); 126 _dispatcher.ReleaseManifold(_manifold);
127 } 127 }
128 #endregion 128 #endregion
129 } 129 }
130} 130}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/EmptyAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/EmptyAlgorithm.cs
index 13cb3d9..5995e2c 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/EmptyAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/EmptyAlgorithm.cs
@@ -1,52 +1,52 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 /// <summary> 28 /// <summary>
29 /// EmptyAlgorithm is a stub for unsupported collision pairs. 29 /// EmptyAlgorithm is a stub for unsupported collision pairs.
30 /// The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a search every frame. 30 /// The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a search every frame.
31 /// </summary> 31 /// </summary>
32 public class EmptyAlgorithm : CollisionAlgorithm 32 public class EmptyAlgorithm : CollisionAlgorithm
33 { 33 {
34 public EmptyAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo) 34 public EmptyAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo)
35 : base(collisionAlgorithmConstructionInfo) { } 35 : base(collisionAlgorithmConstructionInfo) { }
36 36
37 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) { } 37 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) { }
38 38
39 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 39 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
40 { 40 {
41 return 1f; 41 return 1f;
42 } 42 }
43 43
44 public class CreateFunc : CollisionAlgorithmCreateFunction 44 public class CreateFunc : CollisionAlgorithmCreateFunction
45 { 45 {
46 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 46 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
47 { 47 {
48 return new EmptyAlgorithm(collisionAlgorithmConstructionInfo); 48 return new EmptyAlgorithm(collisionAlgorithmConstructionInfo);
49 } 49 }
50 }; 50 };
51 } 51 }
52} 52}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ManifoldResult.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ManifoldResult.cs
index 63f37ea..69143a1 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ManifoldResult.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/ManifoldResult.cs
@@ -1,147 +1,147 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public delegate bool ContactAddedCallback(ManifoldPoint contactPoint, CollisionObject collisionObjectA, int partIdA, int indexA, CollisionObject collisionObjectB, int partIdB, int indexB); 29 public delegate bool ContactAddedCallback(ManifoldPoint contactPoint, CollisionObject collisionObjectA, int partIdA, int indexA, CollisionObject collisionObjectB, int partIdB, int indexB);
30 30
31 public class ManifoldResult : DiscreteCollisionDetectorInterface.Result 31 public class ManifoldResult : DiscreteCollisionDetectorInterface.Result
32 { 32 {
33 private PersistentManifold _manifold; 33 private PersistentManifold _manifold;
34 private static ContactAddedCallback _contactAddedCallback = null; 34 private static ContactAddedCallback _contactAddedCallback = null;
35 35
36 //we need this for compounds 36 //we need this for compounds
37 private Matrix _rootTransA; 37 private Matrix _rootTransA;
38 private Matrix _rootTransB; 38 private Matrix _rootTransB;
39 39
40 private CollisionObject _bodyA; 40 private CollisionObject _bodyA;
41 private CollisionObject _bodyB; 41 private CollisionObject _bodyB;
42 private int _partIdA; 42 private int _partIdA;
43 private int _partIdB; 43 private int _partIdB;
44 private int _indexA; 44 private int _indexA;
45 private int _indexB; 45 private int _indexB;
46 46
47 public ManifoldResult() 47 public ManifoldResult()
48 { 48 {
49 } 49 }
50 50
51 public ManifoldResult(CollisionObject bodyA, CollisionObject bodyB) 51 public ManifoldResult(CollisionObject bodyA, CollisionObject bodyB)
52 { 52 {
53 _bodyA = bodyA; 53 _bodyA = bodyA;
54 _bodyB = bodyB; 54 _bodyB = bodyB;
55 _rootTransA = bodyA.WorldTransform; 55 _rootTransA = bodyA.WorldTransform;
56 _rootTransB = bodyB.WorldTransform; 56 _rootTransB = bodyB.WorldTransform;
57 } 57 }
58 58
59 public static ContactAddedCallback ContactAddedCallback { get { return _contactAddedCallback; } set { _contactAddedCallback = value; } } 59 public static ContactAddedCallback ContactAddedCallback { get { return _contactAddedCallback; } set { _contactAddedCallback = value; } }
60 60
61 public void SetPersistentManifold(PersistentManifold manifold) 61 public void SetPersistentManifold(PersistentManifold manifold)
62 { 62 {
63 _manifold = manifold; 63 _manifold = manifold;
64 } 64 }
65 65
66 public override void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB) 66 public override void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB)
67 { 67 {
68 _partIdA = partIdA; 68 _partIdA = partIdA;
69 _partIdB = partIdB; 69 _partIdB = partIdB;
70 _indexA = indexA; 70 _indexA = indexA;
71 _indexB = indexB; 71 _indexB = indexB;
72 } 72 }
73 73
74 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) 74 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth)
75 { 75 {
76 if (_manifold == null) 76 if (_manifold == null)
77 throw new BulletException("Manifold Pointer is null."); 77 throw new BulletException("Manifold Pointer is null.");
78 78
79 //order in manifold needs to match 79 //order in manifold needs to match
80 80
81 if (depth > PersistentManifold.ContactBreakingThreshold) 81 if (depth > PersistentManifold.ContactBreakingThreshold)
82 return; 82 return;
83 83
84 bool isSwapped = _manifold.BodyA != _bodyA; 84 bool isSwapped = _manifold.BodyA != _bodyA;
85 85
86 Vector3 pointA = pointInWorld + normalOnBInWorld * depth; 86 Vector3 pointA = pointInWorld + normalOnBInWorld * depth;
87 Vector3 localA; 87 Vector3 localA;
88 Vector3 localB; 88 Vector3 localB;
89 89
90 if (isSwapped) 90 if (isSwapped)
91 { 91 {
92 localA = MathHelper.InvXForm(_rootTransB, pointA); 92 localA = MathHelper.InvXForm(_rootTransB, pointA);
93 localB = MathHelper.InvXForm(_rootTransA, pointInWorld); 93 localB = MathHelper.InvXForm(_rootTransA, pointInWorld);
94 } 94 }
95 else 95 else
96 { 96 {
97 localA = MathHelper.InvXForm(_rootTransA, pointA); 97 localA = MathHelper.InvXForm(_rootTransA, pointA);
98 localB = MathHelper.InvXForm(_rootTransB, pointInWorld); 98 localB = MathHelper.InvXForm(_rootTransB, pointInWorld);
99 } 99 }
100 100
101 ManifoldPoint newPt = new ManifoldPoint(localA, localB, normalOnBInWorld, depth); 101 ManifoldPoint newPt = new ManifoldPoint(localA, localB, normalOnBInWorld, depth);
102 102
103 int insertIndex = _manifold.GetCacheEntry(newPt); 103 int insertIndex = _manifold.GetCacheEntry(newPt);
104 104
105 newPt.CombinedFriction = CalculateCombinedFriction(_bodyA, _bodyB); 105 newPt.CombinedFriction = CalculateCombinedFriction(_bodyA, _bodyB);
106 newPt.CombinedRestitution = CalculateCombinedRestitution(_bodyA, _bodyB); 106 newPt.CombinedRestitution = CalculateCombinedRestitution(_bodyA, _bodyB);
107 107
108 //User can override friction and/or restitution 108 //User can override friction and/or restitution
109 if (_contactAddedCallback != null && 109 if (_contactAddedCallback != null &&
110 //and if either of the two bodies requires custom material 110 //and if either of the two bodies requires custom material
111 ((_bodyA.CollisionFlags & CollisionOptions.CustomMaterialCallback) != 0 || 111 ((_bodyA.CollisionFlags & CollisionOptions.CustomMaterialCallback) != 0 ||
112 (_bodyB.CollisionFlags & CollisionOptions.CustomMaterialCallback) != 0)) 112 (_bodyB.CollisionFlags & CollisionOptions.CustomMaterialCallback) != 0))
113 { 113 {
114 //experimental feature info, for per-triangle material etc. 114 //experimental feature info, for per-triangle material etc.
115 CollisionObject obj0 = isSwapped ? _bodyB : _bodyA; 115 CollisionObject obj0 = isSwapped ? _bodyB : _bodyA;
116 CollisionObject obj1 = isSwapped ? _bodyA : _bodyB; 116 CollisionObject obj1 = isSwapped ? _bodyA : _bodyB;
117 _contactAddedCallback(newPt, obj0, _partIdA, _indexA, obj1, _partIdB, _indexB); 117 _contactAddedCallback(newPt, obj0, _partIdA, _indexA, obj1, _partIdB, _indexB);
118 } 118 }
119 119
120 if (insertIndex >= 0) 120 if (insertIndex >= 0)
121 { 121 {
122 _manifold.ReplaceContactPoint(newPt, insertIndex); 122 _manifold.ReplaceContactPoint(newPt, insertIndex);
123 } 123 }
124 else 124 else
125 { 125 {
126 _manifold.AddManifoldPoint(newPt); 126 _manifold.AddManifoldPoint(newPt);
127 } 127 }
128 } 128 }
129 129
130 private float CalculateCombinedFriction(CollisionObject bodyA, CollisionObject bodyB) 130 private float CalculateCombinedFriction(CollisionObject bodyA, CollisionObject bodyB)
131 { 131 {
132 float friction = bodyA.Friction * bodyB.Friction; 132 float friction = bodyA.Friction * bodyB.Friction;
133 133
134 float MaxFriction = 10; 134 float MaxFriction = 10;
135 if (friction < -MaxFriction) 135 if (friction < -MaxFriction)
136 friction = -MaxFriction; 136 friction = -MaxFriction;
137 if (friction > MaxFriction) 137 if (friction > MaxFriction)
138 friction = MaxFriction; 138 friction = MaxFriction;
139 return friction; 139 return friction;
140 } 140 }
141 141
142 private float CalculateCombinedRestitution(CollisionObject bodyA, CollisionObject bodyB) 142 private float CalculateCombinedRestitution(CollisionObject bodyA, CollisionObject bodyB)
143 { 143 {
144 return bodyA.Restitution * bodyB.Restitution; 144 return bodyA.Restitution * bodyB.Restitution;
145 } 145 }
146 } 146 }
147} 147}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SimulationIslandManager.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SimulationIslandManager.cs
index 957843b..39eb53a 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SimulationIslandManager.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SimulationIslandManager.cs
@@ -1,304 +1,304 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class SimulationIslandManager 29 public class SimulationIslandManager
30 { 30 {
31 private UnionFind _unionFind = new UnionFind(); 31 private UnionFind _unionFind = new UnionFind();
32 32
33 public void InitUnionFind(int n) 33 public void InitUnionFind(int n)
34 { 34 {
35 _unionFind.Reset(n); 35 _unionFind.Reset(n);
36 } 36 }
37 37
38 public UnionFind UnionFind { get { return _unionFind; } } 38 public UnionFind UnionFind { get { return _unionFind; } }
39 39
40 public virtual void UpdateActivationState(CollisionWorld world, IDispatcher dispatcher) 40 public virtual void UpdateActivationState(CollisionWorld world, IDispatcher dispatcher)
41 { 41 {
42 InitUnionFind(world.CollisionObjectsCount); 42 InitUnionFind(world.CollisionObjectsCount);
43 43
44 // put the index into m_controllers into m_tag 44 // put the index into m_controllers into m_tag
45 int index = 0; 45 int index = 0;
46 for (int i = 0; i < world.CollisionObjects.Count; i++) 46 for (int i = 0; i < world.CollisionObjects.Count; i++)
47 { 47 {
48 world.CollisionObjects[i].IslandTag = index; 48 world.CollisionObjects[i].IslandTag = index;
49 world.CollisionObjects[i].HitFraction = 1; 49 world.CollisionObjects[i].HitFraction = 1;
50 world.CollisionObjects[i].CompanionID = -1; 50 world.CollisionObjects[i].CompanionID = -1;
51 index++; 51 index++;
52 } 52 }
53 // do the union find 53 // do the union find
54 FindUnions(dispatcher); 54 FindUnions(dispatcher);
55 } 55 }
56 56
57 public virtual void StoreIslandActivationState(CollisionWorld world) 57 public virtual void StoreIslandActivationState(CollisionWorld world)
58 { 58 {
59 // put the islandId ('find' value) into m_tag 59 // put the islandId ('find' value) into m_tag
60 int index = 0; 60 int index = 0;
61 for (int i = 0; i < world.CollisionObjects.Count; i++) 61 for (int i = 0; i < world.CollisionObjects.Count; i++)
62 { 62 {
63 if (world.CollisionObjects[i].MergesSimulationIslands) 63 if (world.CollisionObjects[i].MergesSimulationIslands)
64 { 64 {
65 world.CollisionObjects[i].IslandTag = _unionFind.Find(index); 65 world.CollisionObjects[i].IslandTag = _unionFind.Find(index);
66 world.CollisionObjects[i].CompanionID = -1; 66 world.CollisionObjects[i].CompanionID = -1;
67 } 67 }
68 else 68 else
69 { 69 {
70 world.CollisionObjects[i].IslandTag = -1; 70 world.CollisionObjects[i].IslandTag = -1;
71 world.CollisionObjects[i].CompanionID = -2; 71 world.CollisionObjects[i].CompanionID = -2;
72 } 72 }
73 index++; 73 index++;
74 } 74 }
75 } 75 }
76 76
77 public void FindUnions(IDispatcher dispatcher) 77 public void FindUnions(IDispatcher dispatcher)
78 { 78 {
79 for (int i = 0; i < dispatcher.ManifoldCount; i++) 79 for (int i = 0; i < dispatcher.ManifoldCount; i++)
80 { 80 {
81 PersistentManifold manifold = dispatcher.GetManifoldByIndex(i); 81 PersistentManifold manifold = dispatcher.GetManifoldByIndex(i);
82 //static objects (invmass 0.f) don't merge ! 82 //static objects (invmass 0.f) don't merge !
83 83
84 CollisionObject colObjA = manifold.BodyA as CollisionObject; 84 CollisionObject colObjA = manifold.BodyA as CollisionObject;
85 CollisionObject colObjB = manifold.BodyB as CollisionObject; 85 CollisionObject colObjB = manifold.BodyB as CollisionObject;
86 86
87 if (((colObjA != null) && (colObjA.MergesSimulationIslands)) && 87 if (((colObjA != null) && (colObjA.MergesSimulationIslands)) &&
88 ((colObjB != null) && (colObjB.MergesSimulationIslands))) 88 ((colObjB != null) && (colObjB.MergesSimulationIslands)))
89 { 89 {
90 _unionFind.Unite(colObjA.IslandTag, colObjB.IslandTag); 90 _unionFind.Unite(colObjA.IslandTag, colObjB.IslandTag);
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 public void BuildAndProcessIslands(IDispatcher dispatcher, List<CollisionObject> collisionObjects, IIslandCallback callback) 95 public void BuildAndProcessIslands(IDispatcher dispatcher, List<CollisionObject> collisionObjects, IIslandCallback callback)
96 { 96 {
97 //we are going to sort the unionfind array, and store the element id in the size 97 //we are going to sort the unionfind array, and store the element id in the size
98 //afterwards, we clean unionfind, to make sure no-one uses it anymore 98 //afterwards, we clean unionfind, to make sure no-one uses it anymore
99 UnionFind.SortIslands(); 99 UnionFind.SortIslands();
100 int numElem = UnionFind.ElementCount; 100 int numElem = UnionFind.ElementCount;
101 101
102 int endIslandIndex = 1; 102 int endIslandIndex = 1;
103 int startIslandIndex; 103 int startIslandIndex;
104 104
105 //update the sleeping state for bodies, if all are sleeping 105 //update the sleeping state for bodies, if all are sleeping
106 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex) 106 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex)
107 { 107 {
108 int islandId = UnionFind[startIslandIndex].ID; 108 int islandId = UnionFind[startIslandIndex].ID;
109 for (endIslandIndex = startIslandIndex + 1; (endIslandIndex < numElem) && (UnionFind[endIslandIndex].ID == islandId); endIslandIndex++) 109 for (endIslandIndex = startIslandIndex + 1; (endIslandIndex < numElem) && (UnionFind[endIslandIndex].ID == islandId); endIslandIndex++)
110 { 110 {
111 } 111 }
112 112
113 //int numSleeping = 0; 113 //int numSleeping = 0;
114 114
115 bool allSleeping = true; 115 bool allSleeping = true;
116 116
117 int idx; 117 int idx;
118 for (idx = startIslandIndex; idx < endIslandIndex; idx++) 118 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
119 { 119 {
120 int i = UnionFind[idx].Size; 120 int i = UnionFind[idx].Size;
121 121
122 CollisionObject colObjA = collisionObjects[i]; 122 CollisionObject colObjA = collisionObjects[i];
123 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1)) 123 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1))
124 { 124 {
125 Console.WriteLine("error in island management"); 125 Console.WriteLine("error in island management");
126 } 126 }
127 127
128 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1)); 128 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1));
129 if (colObjA.IslandTag == islandId) 129 if (colObjA.IslandTag == islandId)
130 { 130 {
131 if (colObjA.ActivationState == ActivationState.Active) 131 if (colObjA.ActivationState == ActivationState.Active)
132 { 132 {
133 allSleeping = false; 133 allSleeping = false;
134 } 134 }
135 if (colObjA.ActivationState == ActivationState.DisableDeactivation) 135 if (colObjA.ActivationState == ActivationState.DisableDeactivation)
136 { 136 {
137 allSleeping = false; 137 allSleeping = false;
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 142
143 if (allSleeping) 143 if (allSleeping)
144 { 144 {
145 for (idx = startIslandIndex; idx < endIslandIndex; idx++) 145 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
146 { 146 {
147 int i = UnionFind[idx].Size; 147 int i = UnionFind[idx].Size;
148 CollisionObject colObjA = collisionObjects[i]; 148 CollisionObject colObjA = collisionObjects[i];
149 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1)) 149 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1))
150 { 150 {
151 Console.WriteLine("error in island management"); 151 Console.WriteLine("error in island management");
152 } 152 }
153 153
154 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1)); 154 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1));
155 155
156 if (colObjA.IslandTag == islandId) 156 if (colObjA.IslandTag == islandId)
157 { 157 {
158 colObjA.ActivationState =ActivationState.IslandSleeping; 158 colObjA.ActivationState =ActivationState.IslandSleeping;
159 } 159 }
160 } 160 }
161 } 161 }
162 else 162 else
163 { 163 {
164 for (idx = startIslandIndex; idx < endIslandIndex; idx++) 164 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
165 { 165 {
166 int i = UnionFind[idx].Size; 166 int i = UnionFind[idx].Size;
167 167
168 CollisionObject colObjA = collisionObjects[i]; 168 CollisionObject colObjA = collisionObjects[i];
169 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1)) 169 if ((colObjA.IslandTag != islandId) && (colObjA.IslandTag != -1))
170 { 170 {
171 Console.WriteLine("error in island management"); 171 Console.WriteLine("error in island management");
172 } 172 }
173 173
174 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1)); 174 BulletDebug.Assert((colObjA.IslandTag == islandId) || (colObjA.IslandTag == -1));
175 175
176 if (colObjA.IslandTag == islandId) 176 if (colObjA.IslandTag == islandId)
177 { 177 {
178 if (colObjA.ActivationState == ActivationState.IslandSleeping) 178 if (colObjA.ActivationState == ActivationState.IslandSleeping)
179 { 179 {
180 colObjA.ActivationState = ActivationState.WantsDeactivation; 180 colObjA.ActivationState = ActivationState.WantsDeactivation;
181 } 181 }
182 } 182 }
183 } 183 }
184 } 184 }
185 } 185 }
186 186
187 //int maxNumManifolds = dispatcher.ManifoldCount; 187 //int maxNumManifolds = dispatcher.ManifoldCount;
188 List<PersistentManifold> islandmanifold = new List<PersistentManifold>(dispatcher.ManifoldCount); 188 List<PersistentManifold> islandmanifold = new List<PersistentManifold>(dispatcher.ManifoldCount);
189 189
190 for (int i = 0; i < dispatcher.ManifoldCount; i++) 190 for (int i = 0; i < dispatcher.ManifoldCount; i++)
191 { 191 {
192 PersistentManifold manifold = dispatcher.GetManifoldByIndex(i); 192 PersistentManifold manifold = dispatcher.GetManifoldByIndex(i);
193 193
194 CollisionObject colObjA = manifold.BodyA as CollisionObject; 194 CollisionObject colObjA = manifold.BodyA as CollisionObject;
195 CollisionObject colObjB = manifold.BodyB as CollisionObject; 195 CollisionObject colObjB = manifold.BodyB as CollisionObject;
196 196
197 //todo: check sleeping conditions! 197 //todo: check sleeping conditions!
198 if (((colObjA != null) && colObjA.ActivationState != ActivationState.IslandSleeping) || 198 if (((colObjA != null) && colObjA.ActivationState != ActivationState.IslandSleeping) ||
199 ((colObjB != null) && colObjB.ActivationState != ActivationState.IslandSleeping)) 199 ((colObjB != null) && colObjB.ActivationState != ActivationState.IslandSleeping))
200 { 200 {
201 201
202 //kinematic objects don't merge islands, but wake up all connected objects 202 //kinematic objects don't merge islands, but wake up all connected objects
203 if (colObjA.IsStaticOrKinematicObject && colObjA.ActivationState != ActivationState.IslandSleeping) 203 if (colObjA.IsStaticOrKinematicObject && colObjA.ActivationState != ActivationState.IslandSleeping)
204 { 204 {
205 colObjB.Activate(); 205 colObjB.Activate();
206 } 206 }
207 if (colObjB.IsStaticOrKinematicObject && colObjB.ActivationState != ActivationState.IslandSleeping) 207 if (colObjB.IsStaticOrKinematicObject && colObjB.ActivationState != ActivationState.IslandSleeping)
208 { 208 {
209 colObjA.Activate(); 209 colObjA.Activate();
210 } 210 }
211 211
212 //filtering for response 212 //filtering for response
213 if (dispatcher.NeedsResponse(colObjA, colObjB)) 213 if (dispatcher.NeedsResponse(colObjA, colObjB))
214 islandmanifold.Add(manifold); 214 islandmanifold.Add(manifold);
215 } 215 }
216 } 216 }
217 217
218 int numManifolds = islandmanifold.Count; 218 int numManifolds = islandmanifold.Count;
219 219
220 // Sort manifolds, based on islands 220 // Sort manifolds, based on islands
221 // Sort the vector using predicate and std::sort 221 // Sort the vector using predicate and std::sort
222 islandmanifold.Sort(new Comparison<PersistentManifold>(PersistentManifoldSortPredicate)); 222 islandmanifold.Sort(new Comparison<PersistentManifold>(PersistentManifoldSortPredicate));
223 223
224 //now process all active islands (sets of manifolds for now) 224 //now process all active islands (sets of manifolds for now)
225 int startManifoldIndex = 0; 225 int startManifoldIndex = 0;
226 int endManifoldIndex = 1; 226 int endManifoldIndex = 1;
227 227
228 List<CollisionObject> islandBodies = new List<CollisionObject>(); 228 List<CollisionObject> islandBodies = new List<CollisionObject>();
229 229
230 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex) 230 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex)
231 { 231 {
232 int islandId = UnionFind[startIslandIndex].ID; 232 int islandId = UnionFind[startIslandIndex].ID;
233 bool islandSleeping = false; 233 bool islandSleeping = false;
234 for (endIslandIndex = startIslandIndex; (endIslandIndex < numElem) && (UnionFind[endIslandIndex].ID == islandId); endIslandIndex++) 234 for (endIslandIndex = startIslandIndex; (endIslandIndex < numElem) && (UnionFind[endIslandIndex].ID == islandId); endIslandIndex++)
235 { 235 {
236 int i = UnionFind[endIslandIndex].Size; 236 int i = UnionFind[endIslandIndex].Size;
237 CollisionObject colObjA = collisionObjects[i]; 237 CollisionObject colObjA = collisionObjects[i];
238 islandBodies.Add(colObjA); 238 islandBodies.Add(colObjA);
239 if (!colObjA.IsActive) 239 if (!colObjA.IsActive)
240 islandSleeping = true; 240 islandSleeping = true;
241 } 241 }
242 242
243 //find the accompanying contact manifold for this islandId 243 //find the accompanying contact manifold for this islandId
244 int numIslandManifolds = 0; 244 int numIslandManifolds = 0;
245 List<PersistentManifold> startManifold = new List<PersistentManifold>(numIslandManifolds); 245 List<PersistentManifold> startManifold = new List<PersistentManifold>(numIslandManifolds);
246 246
247 if (startManifoldIndex < numManifolds) 247 if (startManifoldIndex < numManifolds)
248 { 248 {
249 int curIslandID = GetIslandId(islandmanifold[startManifoldIndex]); 249 int curIslandID = GetIslandId(islandmanifold[startManifoldIndex]);
250 if (curIslandID == islandId) 250 if (curIslandID == islandId)
251 { 251 {
252 for (int k = startManifoldIndex; k < islandmanifold.Count; k++) 252 for (int k = startManifoldIndex; k < islandmanifold.Count; k++)
253 { 253 {
254 startManifold.Add(islandmanifold[k]); 254 startManifold.Add(islandmanifold[k]);
255 } 255 }
256 for (endManifoldIndex = startManifoldIndex + 1; (endManifoldIndex < numManifolds) && (islandId == GetIslandId(islandmanifold[endManifoldIndex])); endManifoldIndex++) { } 256 for (endManifoldIndex = startManifoldIndex + 1; (endManifoldIndex < numManifolds) && (islandId == GetIslandId(islandmanifold[endManifoldIndex])); endManifoldIndex++) { }
257 257
258 // Process the actual simulation, only if not sleeping/deactivated 258 // Process the actual simulation, only if not sleeping/deactivated
259 numIslandManifolds = endManifoldIndex - startManifoldIndex; 259 numIslandManifolds = endManifoldIndex - startManifoldIndex;
260 } 260 }
261 } 261 }
262 262
263 if (!islandSleeping) 263 if (!islandSleeping)
264 { 264 {
265 callback.ProcessIsland(islandBodies, startManifold, numIslandManifolds, islandId); 265 callback.ProcessIsland(islandBodies, startManifold, numIslandManifolds, islandId);
266 } 266 }
267 267
268 if (numIslandManifolds != 0) 268 if (numIslandManifolds != 0)
269 { 269 {
270 startManifoldIndex = endManifoldIndex; 270 startManifoldIndex = endManifoldIndex;
271 } 271 }
272 272
273 islandBodies.Clear(); 273 islandBodies.Clear();
274 } 274 }
275 } 275 }
276 276
277 private static int GetIslandId(PersistentManifold lhs) 277 private static int GetIslandId(PersistentManifold lhs)
278 { 278 {
279 int islandId; 279 int islandId;
280 CollisionObject rcolObjA = lhs.BodyA as CollisionObject; 280 CollisionObject rcolObjA = lhs.BodyA as CollisionObject;
281 CollisionObject rcolObjB = lhs.BodyB as CollisionObject; 281 CollisionObject rcolObjB = lhs.BodyB as CollisionObject;
282 islandId = rcolObjA.IslandTag >= 0 ? rcolObjA.IslandTag : rcolObjB.IslandTag; 282 islandId = rcolObjA.IslandTag >= 0 ? rcolObjA.IslandTag : rcolObjB.IslandTag;
283 return islandId; 283 return islandId;
284 } 284 }
285 285
286 private static int PersistentManifoldSortPredicate(PersistentManifold lhs, PersistentManifold rhs) 286 private static int PersistentManifoldSortPredicate(PersistentManifold lhs, PersistentManifold rhs)
287 { 287 {
288 int rIslandIdA, lIslandIdB; 288 int rIslandIdA, lIslandIdB;
289 rIslandIdA = GetIslandId(rhs); 289 rIslandIdA = GetIslandId(rhs);
290 lIslandIdB = GetIslandId(lhs); 290 lIslandIdB = GetIslandId(lhs);
291 //return lIslandId0 < rIslandId0; 291 //return lIslandId0 < rIslandId0;
292 if (lIslandIdB < rIslandIdA) 292 if (lIslandIdB < rIslandIdA)
293 return -1; 293 return -1;
294 //else if (lIslandIdB > rIslandIdA) 294 //else if (lIslandIdB > rIslandIdA)
295 // return 1; 295 // return 1;
296 return 1; 296 return 1;
297 } 297 }
298 298
299 public interface IIslandCallback 299 public interface IIslandCallback
300 { 300 {
301 void ProcessIsland(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, int islandID); 301 void ProcessIsland(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, int islandID);
302 } 302 }
303 } 303 }
304} 304}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereBoxCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereBoxCollisionAlgorithm.cs
index 8933638..2b4e801 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereBoxCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereBoxCollisionAlgorithm.cs
@@ -1,270 +1,270 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// SphereBoxCollisionAlgorithm provides sphere-box collision detection. 30 /// SphereBoxCollisionAlgorithm provides sphere-box collision detection.
31 /// Other features are frame-coherency (persistent data) and collision response. 31 /// Other features are frame-coherency (persistent data) and collision response.
32 /// </summary> 32 /// </summary>
33 public class SphereBoxCollisionAlgorithm : CollisionAlgorithm, IDisposable 33 public class SphereBoxCollisionAlgorithm : CollisionAlgorithm, IDisposable
34 { 34 {
35 private bool _ownManifold; 35 private bool _ownManifold;
36 private PersistentManifold _manifold; 36 private PersistentManifold _manifold;
37 private bool _isSwapped; 37 private bool _isSwapped;
38 38
39 public SphereBoxCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject collisionObjectA, CollisionObject collisionObjectB, bool isSwapped) 39 public SphereBoxCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject collisionObjectA, CollisionObject collisionObjectB, bool isSwapped)
40 : base(collisionAlgorithmConstructionInfo) 40 : base(collisionAlgorithmConstructionInfo)
41 { 41 {
42 _ownManifold = false; 42 _ownManifold = false;
43 _manifold = manifold; 43 _manifold = manifold;
44 _isSwapped = isSwapped; 44 _isSwapped = isSwapped;
45 45
46 CollisionObject sphereObject = _isSwapped ? collisionObjectB : collisionObjectA; 46 CollisionObject sphereObject = _isSwapped ? collisionObjectB : collisionObjectA;
47 CollisionObject boxObject = _isSwapped ? collisionObjectA : collisionObjectB; 47 CollisionObject boxObject = _isSwapped ? collisionObjectA : collisionObjectB;
48 48
49 if (_manifold == null && Dispatcher.NeedsCollision(sphereObject, boxObject)) 49 if (_manifold == null && Dispatcher.NeedsCollision(sphereObject, boxObject))
50 { 50 {
51 _manifold = Dispatcher.GetNewManifold(sphereObject, boxObject); 51 _manifold = Dispatcher.GetNewManifold(sphereObject, boxObject);
52 _ownManifold = true; 52 _ownManifold = true;
53 } 53 }
54 } 54 }
55 55
56 public float GetSphereDistance(CollisionObject boxObject, out Vector3 pointOnBox, out Vector3 pointOnSphere, Vector3 sphereCenter, float radius) 56 public float GetSphereDistance(CollisionObject boxObject, out Vector3 pointOnBox, out Vector3 pointOnSphere, Vector3 sphereCenter, float radius)
57 { 57 {
58 pointOnBox = new Vector3(); 58 pointOnBox = new Vector3();
59 pointOnSphere = new Vector3(); 59 pointOnSphere = new Vector3();
60 60
61 float margins; 61 float margins;
62 Vector3[] bounds = new Vector3[2]; 62 Vector3[] bounds = new Vector3[2];
63 BoxShape boxShape = boxObject.CollisionShape as BoxShape; 63 BoxShape boxShape = boxObject.CollisionShape as BoxShape;
64 64
65 bounds[0] = -boxShape.HalfExtents; 65 bounds[0] = -boxShape.HalfExtents;
66 bounds[1] = boxShape.HalfExtents; 66 bounds[1] = boxShape.HalfExtents;
67 67
68 margins = boxShape.Margin; //also add sphereShape margin? 68 margins = boxShape.Margin; //also add sphereShape margin?
69 69
70 Matrix m44T = boxObject.WorldTransform; 70 Matrix m44T = boxObject.WorldTransform;
71 71
72 Vector3[] boundsVec = new Vector3[2]; 72 Vector3[] boundsVec = new Vector3[2];
73 float penetration; 73 float penetration;
74 74
75 boundsVec[0] = bounds[0]; 75 boundsVec[0] = bounds[0];
76 boundsVec[1] = bounds[1]; 76 boundsVec[1] = bounds[1];
77 77
78 Vector3 marginsVec = new Vector3(margins, margins, margins); 78 Vector3 marginsVec = new Vector3(margins, margins, margins);
79 79
80 // add margins 80 // add margins
81 bounds[0] += marginsVec; 81 bounds[0] += marginsVec;
82 bounds[1] -= marginsVec; 82 bounds[1] -= marginsVec;
83 83
84 ///////////////////////////////////////////////// 84 /////////////////////////////////////////////////
85 85
86 Vector3 tmp, prel, normal, v3P; 86 Vector3 tmp, prel, normal, v3P;
87 Vector3[] n = new Vector3[6]; 87 Vector3[] n = new Vector3[6];
88 float sep = 10000000.0f, sepThis; 88 float sep = 10000000.0f, sepThis;
89 89
90 n[0] = new Vector3(-1.0f, 0.0f, 0.0f); 90 n[0] = new Vector3(-1.0f, 0.0f, 0.0f);
91 n[1] = new Vector3(0.0f, -1.0f, 0.0f); 91 n[1] = new Vector3(0.0f, -1.0f, 0.0f);
92 n[2] = new Vector3(0.0f, 0.0f, -1.0f); 92 n[2] = new Vector3(0.0f, 0.0f, -1.0f);
93 n[3] = new Vector3(1.0f, 0.0f, 0.0f); 93 n[3] = new Vector3(1.0f, 0.0f, 0.0f);
94 n[4] = new Vector3(0.0f, 1.0f, 0.0f); 94 n[4] = new Vector3(0.0f, 1.0f, 0.0f);
95 n[5] = new Vector3(0.0f, 0.0f, 1.0f); 95 n[5] = new Vector3(0.0f, 0.0f, 1.0f);
96 96
97 // convert point in local space 97 // convert point in local space
98 prel = MathHelper.InvXForm(m44T, sphereCenter); 98 prel = MathHelper.InvXForm(m44T, sphereCenter);
99 99
100 bool found = false; 100 bool found = false;
101 101
102 v3P = prel; 102 v3P = prel;
103 103
104 for (int i = 0; i < 6; i++) 104 for (int i = 0; i < 6; i++)
105 { 105 {
106 int j = i < 3 ? 0 : 1; 106 int j = i < 3 ? 0 : 1;
107 if ((sepThis = (Vector3.Dot(v3P - bounds[j], n[i]))) > 0.0f) 107 if ((sepThis = (Vector3.Dot(v3P - bounds[j], n[i]))) > 0.0f)
108 { 108 {
109 v3P = v3P - n[i] * sepThis; 109 v3P = v3P - n[i] * sepThis;
110 found = true; 110 found = true;
111 } 111 }
112 } 112 }
113 113
114 // 114 //
115 115
116 if (found) 116 if (found)
117 { 117 {
118 bounds[0] = boundsVec[0]; 118 bounds[0] = boundsVec[0];
119 bounds[1] = boundsVec[1]; 119 bounds[1] = boundsVec[1];
120 120
121 normal = Vector3.Normalize(prel - v3P); 121 normal = Vector3.Normalize(prel - v3P);
122 pointOnBox = v3P + normal * margins; 122 pointOnBox = v3P + normal * margins;
123 pointOnSphere = prel - normal * radius; 123 pointOnSphere = prel - normal * radius;
124 124
125 if ((Vector3.Dot(pointOnSphere - pointOnBox, normal)) > 0.0f) 125 if ((Vector3.Dot(pointOnSphere - pointOnBox, normal)) > 0.0f)
126 { 126 {
127 return 1.0f; 127 return 1.0f;
128 } 128 }
129 129
130 // transform back in world space 130 // transform back in world space
131 tmp = MathHelper.MatrixToVector(m44T, pointOnBox); 131 tmp = MathHelper.MatrixToVector(m44T, pointOnBox);
132 pointOnBox = tmp; 132 pointOnBox = tmp;
133 tmp = MathHelper.MatrixToVector(m44T, pointOnSphere); 133 tmp = MathHelper.MatrixToVector(m44T, pointOnSphere);
134 pointOnSphere = tmp; 134 pointOnSphere = tmp;
135 float seps2 = (pointOnBox - pointOnSphere).LengthSquared(); 135 float seps2 = (pointOnBox - pointOnSphere).LengthSquared();
136 136
137 //if this fails, fallback into deeper penetration case, below 137 //if this fails, fallback into deeper penetration case, below
138 if (seps2 > MathHelper.Epsilon) 138 if (seps2 > MathHelper.Epsilon)
139 { 139 {
140 sep = -(float)Math.Sqrt(seps2); 140 sep = -(float)Math.Sqrt(seps2);
141 normal = (pointOnBox - pointOnSphere); 141 normal = (pointOnBox - pointOnSphere);
142 normal *= 1f / sep; 142 normal *= 1f / sep;
143 } 143 }
144 return sep; 144 return sep;
145 } 145 }
146 146
147 ////////////////////////////////////////////////// 147 //////////////////////////////////////////////////
148 // Deep penetration case 148 // Deep penetration case
149 149
150 penetration = GetSpherePenetration(boxObject, ref pointOnBox, ref pointOnSphere, sphereCenter, radius, bounds[0], bounds[1]); 150 penetration = GetSpherePenetration(boxObject, ref pointOnBox, ref pointOnSphere, sphereCenter, radius, bounds[0], bounds[1]);
151 151
152 bounds[0] = boundsVec[0]; 152 bounds[0] = boundsVec[0];
153 bounds[1] = boundsVec[1]; 153 bounds[1] = boundsVec[1];
154 154
155 if (penetration <= 0.0f) 155 if (penetration <= 0.0f)
156 return (penetration - margins); 156 return (penetration - margins);
157 else 157 else
158 return 1.0f; 158 return 1.0f;
159 } 159 }
160 160
161 public float GetSpherePenetration(CollisionObject boxObject, ref Vector3 pointOnBox, ref Vector3 pointOnSphere, Vector3 sphereCenter, float radius, Vector3 aabbMin, Vector3 aabbMax) 161 public float GetSpherePenetration(CollisionObject boxObject, ref Vector3 pointOnBox, ref Vector3 pointOnSphere, Vector3 sphereCenter, float radius, Vector3 aabbMin, Vector3 aabbMax)
162 { 162 {
163 Vector3[] bounds = new Vector3[2]; 163 Vector3[] bounds = new Vector3[2];
164 164
165 bounds[0] = aabbMin; 165 bounds[0] = aabbMin;
166 bounds[1] = aabbMax; 166 bounds[1] = aabbMax;
167 167
168 Vector3 p0 = new Vector3(), tmp, prel, normal = new Vector3(); 168 Vector3 p0 = new Vector3(), tmp, prel, normal = new Vector3();
169 Vector3[] n = new Vector3[6]; 169 Vector3[] n = new Vector3[6];
170 float sep = -10000000.0f, sepThis; 170 float sep = -10000000.0f, sepThis;
171 171
172 n[0] = new Vector3(-1.0f, 0.0f, 0.0f); 172 n[0] = new Vector3(-1.0f, 0.0f, 0.0f);
173 n[1] = new Vector3(0.0f, -1.0f, 0.0f); 173 n[1] = new Vector3(0.0f, -1.0f, 0.0f);
174 n[2] = new Vector3(0.0f, 0.0f, -1.0f); 174 n[2] = new Vector3(0.0f, 0.0f, -1.0f);
175 n[3] = new Vector3(1.0f, 0.0f, 0.0f); 175 n[3] = new Vector3(1.0f, 0.0f, 0.0f);
176 n[4] = new Vector3(0.0f, 1.0f, 0.0f); 176 n[4] = new Vector3(0.0f, 1.0f, 0.0f);
177 n[5] = new Vector3(0.0f, 0.0f, 1.0f); 177 n[5] = new Vector3(0.0f, 0.0f, 1.0f);
178 178
179 Matrix m44T = boxObject.WorldTransform; 179 Matrix m44T = boxObject.WorldTransform;
180 180
181 // convert point in local space 181 // convert point in local space
182 prel = MathHelper.InvXForm(m44T, sphereCenter); 182 prel = MathHelper.InvXForm(m44T, sphereCenter);
183 183
184 /////////// 184 ///////////
185 185
186 for (int i = 0; i < 6; i++) 186 for (int i = 0; i < 6; i++)
187 { 187 {
188 int j = i < 3 ? 0 : 1; 188 int j = i < 3 ? 0 : 1;
189 if ((sepThis = (Vector3.Dot(prel - bounds[j], n[i])) - radius) > 0.0f) return 1.0f; 189 if ((sepThis = (Vector3.Dot(prel - bounds[j], n[i])) - radius) > 0.0f) return 1.0f;
190 if (sepThis > sep) 190 if (sepThis > sep)
191 { 191 {
192 p0 = bounds[j]; 192 p0 = bounds[j];
193 normal = n[i]; 193 normal = n[i];
194 sep = sepThis; 194 sep = sepThis;
195 } 195 }
196 } 196 }
197 197
198 pointOnBox = prel - normal * (Vector3.Dot(normal, (prel - p0))); 198 pointOnBox = prel - normal * (Vector3.Dot(normal, (prel - p0)));
199 pointOnSphere = pointOnBox + normal * sep; 199 pointOnSphere = pointOnBox + normal * sep;
200 200
201 // transform back in world space 201 // transform back in world space
202 tmp = MathHelper.MatrixToVector(m44T, pointOnBox); 202 tmp = MathHelper.MatrixToVector(m44T, pointOnBox);
203 pointOnBox = tmp; 203 pointOnBox = tmp;
204 tmp = MathHelper.MatrixToVector(m44T, pointOnSphere); 204 tmp = MathHelper.MatrixToVector(m44T, pointOnSphere);
205 pointOnSphere = tmp; 205 pointOnSphere = tmp;
206 normal = Vector3.Normalize(pointOnBox - pointOnSphere); 206 normal = Vector3.Normalize(pointOnBox - pointOnSphere);
207 207
208 return sep; 208 return sep;
209 } 209 }
210 210
211 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 211 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
212 { 212 {
213 if (_manifold == null) 213 if (_manifold == null)
214 return; 214 return;
215 215
216 CollisionObject sphereObject = _isSwapped ? bodyB : bodyA; 216 CollisionObject sphereObject = _isSwapped ? bodyB : bodyA;
217 CollisionObject boxObject = _isSwapped ? bodyA : bodyB; 217 CollisionObject boxObject = _isSwapped ? bodyA : bodyB;
218 218
219 SphereShape sphereA = sphereObject.CollisionShape as SphereShape; 219 SphereShape sphereA = sphereObject.CollisionShape as SphereShape;
220 220
221 Vector3 pOnBox, pOnSphere; 221 Vector3 pOnBox, pOnSphere;
222 Vector3 sphereCenter = sphereObject.WorldTransform.Translation; 222 Vector3 sphereCenter = sphereObject.WorldTransform.Translation;
223 float radius = sphereA.Radius; 223 float radius = sphereA.Radius;
224 224
225 float dist = GetSphereDistance(boxObject, out pOnBox, out pOnSphere, sphereCenter, radius); 225 float dist = GetSphereDistance(boxObject, out pOnBox, out pOnSphere, sphereCenter, radius);
226 226
227 if (dist < MathHelper.Epsilon) 227 if (dist < MathHelper.Epsilon)
228 { 228 {
229 Vector3 normalOnSurfaceB = Vector3.Normalize(pOnBox - pOnSphere); 229 Vector3 normalOnSurfaceB = Vector3.Normalize(pOnBox - pOnSphere);
230 230
231 // report a contact. internally this will be kept persistent, and contact reduction is done 231 // report a contact. internally this will be kept persistent, and contact reduction is done
232 resultOut.SetPersistentManifold(_manifold); 232 resultOut.SetPersistentManifold(_manifold);
233 resultOut.AddContactPoint(normalOnSurfaceB, pOnBox, dist); 233 resultOut.AddContactPoint(normalOnSurfaceB, pOnBox, dist);
234 } 234 }
235 } 235 }
236 236
237 public override float CalculateTimeOfImpact(CollisionObject collisionObjectA, CollisionObject collisionObjectB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 237 public override float CalculateTimeOfImpact(CollisionObject collisionObjectA, CollisionObject collisionObjectB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
238 { 238 {
239 //not yet 239 //not yet
240 return 1; 240 return 1;
241 } 241 }
242 242
243 public class CreateFunc : CollisionAlgorithmCreateFunction 243 public class CreateFunc : CollisionAlgorithmCreateFunction
244 { 244 {
245 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 245 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
246 { 246 {
247 if (!IsSwapped) 247 if (!IsSwapped)
248 return new SphereBoxCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB, false); 248 return new SphereBoxCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB, false);
249 else 249 else
250 return new SphereBoxCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB, true); 250 return new SphereBoxCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB, true);
251 } 251 }
252 } 252 }
253 253
254 #region IDisposable Members 254 #region IDisposable Members
255 public void Dispose() 255 public void Dispose()
256 { 256 {
257 Dispose(true); 257 Dispose(true);
258 } 258 }
259 259
260 public void Dispose(bool disposing) 260 public void Dispose(bool disposing)
261 { 261 {
262 if (disposing && _ownManifold) 262 if (disposing && _ownManifold)
263 { 263 {
264 if (_manifold != null) 264 if (_manifold != null)
265 Dispatcher.ReleaseManifold(_manifold); 265 Dispatcher.ReleaseManifold(_manifold);
266 } 266 }
267 } 267 }
268 #endregion 268 #endregion
269 } 269 }
270} 270}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereSphereCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereSphereCollisionAlgorithm.cs
index 7a76d24..3a780c1 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereSphereCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereSphereCollisionAlgorithm.cs
@@ -1,104 +1,104 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class SphereSphereCollisionAlgorithm : CollisionAlgorithm 29 public class SphereSphereCollisionAlgorithm : CollisionAlgorithm
30 { 30 {
31 private bool _ownManifold; 31 private bool _ownManifold;
32 private PersistentManifold _manifold; 32 private PersistentManifold _manifold;
33 33
34 public SphereSphereCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 34 public SphereSphereCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
35 : base(collisionAlgorithmConstructionInfo) 35 : base(collisionAlgorithmConstructionInfo)
36 { 36 {
37 _ownManifold = false; 37 _ownManifold = false;
38 _manifold = manifold; 38 _manifold = manifold;
39 39
40 if (_manifold == null) 40 if (_manifold == null)
41 { 41 {
42 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB); 42 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB);
43 _ownManifold = true; 43 _ownManifold = true;
44 } 44 }
45 } 45 }
46 46
47 public SphereSphereCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo) 47 public SphereSphereCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo)
48 : base(collisionAlgorithmConstructionInfo) { } 48 : base(collisionAlgorithmConstructionInfo) { }
49 49
50 ~SphereSphereCollisionAlgorithm() 50 ~SphereSphereCollisionAlgorithm()
51 { 51 {
52 if (_ownManifold) 52 if (_ownManifold)
53 { 53 {
54 if (_manifold != null) 54 if (_manifold != null)
55 Dispatcher.ReleaseManifold(_manifold); 55 Dispatcher.ReleaseManifold(_manifold);
56 } 56 }
57 } 57 }
58 58
59 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 59 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
60 { 60 {
61 if (_manifold == null) 61 if (_manifold == null)
62 return; 62 return;
63 63
64 SphereShape sphereA = bodyA.CollisionShape as SphereShape; 64 SphereShape sphereA = bodyA.CollisionShape as SphereShape;
65 SphereShape sphereB = bodyB.CollisionShape as SphereShape; 65 SphereShape sphereB = bodyB.CollisionShape as SphereShape;
66 66
67 Vector3 diff = bodyA.WorldTransform.Translation - bodyB.WorldTransform.Translation; 67 Vector3 diff = bodyA.WorldTransform.Translation - bodyB.WorldTransform.Translation;
68 float len = diff.Length(); 68 float len = diff.Length();
69 float radiusA = sphereA.Radius; 69 float radiusA = sphereA.Radius;
70 float radiusB = sphereB.Radius; 70 float radiusB = sphereB.Radius;
71 71
72 //if distance positive, don't generate a new contact 72 //if distance positive, don't generate a new contact
73 if (len > (radiusA + radiusB)) 73 if (len > (radiusA + radiusB))
74 return; 74 return;
75 75
76 //distance (negative means penetration) 76 //distance (negative means penetration)
77 float dist = len - (radiusA + radiusB); 77 float dist = len - (radiusA + radiusB);
78 78
79 Vector3 normalOnSurfaceB = diff / len; 79 Vector3 normalOnSurfaceB = diff / len;
80 //point on A (worldspace) 80 //point on A (worldspace)
81 Vector3 posA = bodyA.WorldTransform.Translation - radiusA * normalOnSurfaceB; 81 Vector3 posA = bodyA.WorldTransform.Translation - radiusA * normalOnSurfaceB;
82 //point on B (worldspace) 82 //point on B (worldspace)
83 Vector3 posB = bodyB.WorldTransform.Translation + radiusB * normalOnSurfaceB; 83 Vector3 posB = bodyB.WorldTransform.Translation + radiusB * normalOnSurfaceB;
84 84
85 // report a contact. internally this will be kept persistent, and contact reduction is done 85 // report a contact. internally this will be kept persistent, and contact reduction is done
86 resultOut.SetPersistentManifold(_manifold); 86 resultOut.SetPersistentManifold(_manifold);
87 resultOut.AddContactPoint(normalOnSurfaceB, posB, dist); 87 resultOut.AddContactPoint(normalOnSurfaceB, posB, dist);
88 } 88 }
89 89
90 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 90 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
91 { 91 {
92 //not yet 92 //not yet
93 return 1f; 93 return 1f;
94 } 94 }
95 95
96 public class CreateFunc : CollisionAlgorithmCreateFunction 96 public class CreateFunc : CollisionAlgorithmCreateFunction
97 { 97 {
98 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 98 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
99 { 99 {
100 return new SphereSphereCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB); 100 return new SphereSphereCollisionAlgorithm(null, collisionAlgorithmConstructionInfo, bodyA, bodyB);
101 } 101 }
102 } 102 }
103 } 103 }
104} 104}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleCollisionAlgorithm.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleCollisionAlgorithm.cs
index 1ca5cfb..00dfaf1 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleCollisionAlgorithm.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleCollisionAlgorithm.cs
@@ -1,100 +1,100 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// SphereSphereCollisionAlgorithm provides sphere-sphere collision detection. 30 /// SphereSphereCollisionAlgorithm provides sphere-sphere collision detection.
31 /// Other features are frame-coherency (persistent data) and collision response. 31 /// Other features are frame-coherency (persistent data) and collision response.
32 /// Also provides the most basic sample for custom/user btCollisionAlgorithm 32 /// Also provides the most basic sample for custom/user btCollisionAlgorithm
33 /// </summary> 33 /// </summary>
34 public class SphereTriangleCollisionAlgorithm : CollisionAlgorithm, IDisposable 34 public class SphereTriangleCollisionAlgorithm : CollisionAlgorithm, IDisposable
35 { 35 {
36 private bool _ownManifold; 36 private bool _ownManifold;
37 private PersistentManifold _manifold; 37 private PersistentManifold _manifold;
38 private bool _isSwapped; 38 private bool _isSwapped;
39 39
40 public SphereTriangleCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped) 40 public SphereTriangleCollisionAlgorithm(PersistentManifold manifold, CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB, bool isSwapped)
41 : base(collisionAlgorithmConstructionInfo) 41 : base(collisionAlgorithmConstructionInfo)
42 { 42 {
43 _ownManifold = false; 43 _ownManifold = false;
44 _manifold = manifold; 44 _manifold = manifold;
45 _isSwapped = isSwapped; 45 _isSwapped = isSwapped;
46 46
47 if (_manifold == null) 47 if (_manifold == null)
48 { 48 {
49 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB); 49 _manifold = Dispatcher.GetNewManifold(bodyA, bodyB);
50 _ownManifold = true; 50 _ownManifold = true;
51 } 51 }
52 } 52 }
53 53
54 public SphereTriangleCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo) 54 public SphereTriangleCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo)
55 : base(collisionAlgorithmConstructionInfo) { } 55 : base(collisionAlgorithmConstructionInfo) { }
56 56
57 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 57 public override void ProcessCollision(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
58 { 58 {
59 if (_manifold == null) 59 if (_manifold == null)
60 return; 60 return;
61 61
62 SphereShape sphere = bodyA.CollisionShape as SphereShape; 62 SphereShape sphere = bodyA.CollisionShape as SphereShape;
63 TriangleShape triangle = bodyB.CollisionShape as TriangleShape; 63 TriangleShape triangle = bodyB.CollisionShape as TriangleShape;
64 64
65 /// report a contact. internally this will be kept persistent, and contact reduction is done 65 /// report a contact. internally this will be kept persistent, and contact reduction is done
66 resultOut.SetPersistentManifold(_manifold); 66 resultOut.SetPersistentManifold(_manifold);
67 SphereTriangleDetector detector = new SphereTriangleDetector(sphere, triangle); 67 SphereTriangleDetector detector = new SphereTriangleDetector(sphere, triangle);
68 68
69 DiscreteCollisionDetectorInterface.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 69 DiscreteCollisionDetectorInterface.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
70 input.MaximumDistanceSquared = 1e30f;//todo: tighter bounds 70 input.MaximumDistanceSquared = 1e30f;//todo: tighter bounds
71 input.TransformA = bodyA.WorldTransform; 71 input.TransformA = bodyA.WorldTransform;
72 input.TransformB = bodyB.WorldTransform; 72 input.TransformB = bodyB.WorldTransform;
73 73
74 detector.GetClosestPoints(input, resultOut, null); 74 detector.GetClosestPoints(input, resultOut, null);
75 } 75 }
76 76
77 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut) 77 public override float CalculateTimeOfImpact(CollisionObject bodyA, CollisionObject bodyB, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
78 { 78 {
79 //not yet 79 //not yet
80 return 1f; 80 return 1f;
81 } 81 }
82 82
83 public class CreateFunc : CollisionAlgorithmCreateFunction 83 public class CreateFunc : CollisionAlgorithmCreateFunction
84 { 84 {
85 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB) 85 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo collisionAlgorithmConstructionInfo, CollisionObject bodyA, CollisionObject bodyB)
86 { 86 {
87 return new SphereTriangleCollisionAlgorithm(collisionAlgorithmConstructionInfo.Manifold, collisionAlgorithmConstructionInfo, bodyA, bodyB, IsSwapped); 87 return new SphereTriangleCollisionAlgorithm(collisionAlgorithmConstructionInfo.Manifold, collisionAlgorithmConstructionInfo, bodyA, bodyB, IsSwapped);
88 } 88 }
89 } 89 }
90 90
91 #region IDisposable Members 91 #region IDisposable Members
92 public void Dispose() 92 public void Dispose()
93 { 93 {
94 if (_ownManifold) 94 if (_ownManifold)
95 if (_manifold != null) 95 if (_manifold != null)
96 Dispatcher.ReleaseManifold(_manifold); 96 Dispatcher.ReleaseManifold(_manifold);
97 } 97 }
98 #endregion 98 #endregion
99 } 99 }
100} 100}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleDetector.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleDetector.cs
index 865754a..4d578d8 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleDetector.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/SphereTriangleDetector.cs
@@ -1,214 +1,214 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class SphereTriangleDetector : DiscreteCollisionDetectorInterface 29 public class SphereTriangleDetector : DiscreteCollisionDetectorInterface
30 { 30 {
31 private SphereShape _sphere; 31 private SphereShape _sphere;
32 private TriangleShape _triangle; 32 private TriangleShape _triangle;
33 private const int MaxOverlap = 0; 33 private const int MaxOverlap = 0;
34 34
35 public SphereTriangleDetector(SphereShape sphere, TriangleShape triangle) 35 public SphereTriangleDetector(SphereShape sphere, TriangleShape triangle)
36 { 36 {
37 this._sphere = sphere; 37 this._sphere = sphere;
38 this._triangle = triangle; 38 this._triangle = triangle;
39 } 39 }
40 40
41 public override void GetClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw) 41 public override void GetClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw)
42 { 42 {
43 Matrix transformA = input.TransformA; 43 Matrix transformA = input.TransformA;
44 Matrix transformB = input.TransformB; 44 Matrix transformB = input.TransformB;
45 45
46 Vector3 point = new Vector3(); 46 Vector3 point = new Vector3();
47 Vector3 normal = new Vector3(); 47 Vector3 normal = new Vector3();
48 Single timeOfImpact = 1.0f; 48 Single timeOfImpact = 1.0f;
49 Single depth = 0.0f; 49 Single depth = 0.0f;
50 50
51 //move sphere into triangle space 51 //move sphere into triangle space
52 Matrix sphereInTr = MathHelper.InverseTimes(transformB, transformA); 52 Matrix sphereInTr = MathHelper.InverseTimes(transformB, transformA);
53 53
54 if (Collide(sphereInTr.Translation, point, normal, depth, timeOfImpact)) 54 if (Collide(sphereInTr.Translation, point, normal, depth, timeOfImpact))
55 output.AddContactPoint(Vector3.TransformNormal(normal, transformB), Vector3.TransformNormal(point, transformB), depth); 55 output.AddContactPoint(Vector3.TransformNormal(normal, transformB), Vector3.TransformNormal(point, transformB), depth);
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// See also geometrictools.com 59 /// See also geometrictools.com
60 /// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv 60 /// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv
61 /// </summary> 61 /// </summary>
62 /// <param name="from"></param> 62 /// <param name="from"></param>
63 /// <param name="to"></param> 63 /// <param name="to"></param>
64 /// <param name="p"></param> 64 /// <param name="p"></param>
65 /// <param name="nearest"></param> 65 /// <param name="nearest"></param>
66 /// <returns></returns> 66 /// <returns></returns>
67 private float SegmentSquareDistance(Vector3 from, Vector3 to, Vector3 point, Vector3 nearest) 67 private float SegmentSquareDistance(Vector3 from, Vector3 to, Vector3 point, Vector3 nearest)
68 { 68 {
69 Vector3 diff = point - from; 69 Vector3 diff = point - from;
70 Vector3 v = to - from; 70 Vector3 v = to - from;
71 float t = Vector3.Dot(v, diff); 71 float t = Vector3.Dot(v, diff);
72 72
73 if (t > 0) 73 if (t > 0)
74 { 74 {
75 float dotVV = Vector3.Dot(v, v); 75 float dotVV = Vector3.Dot(v, v);
76 if (t < dotVV) 76 if (t < dotVV)
77 { 77 {
78 t /= dotVV; 78 t /= dotVV;
79 diff -= t * v; 79 diff -= t * v;
80 } 80 }
81 else 81 else
82 { 82 {
83 t = 1; 83 t = 1;
84 diff -= v; 84 diff -= v;
85 } 85 }
86 } 86 }
87 else 87 else
88 t = 0; 88 t = 0;
89 89
90 nearest = from + t * v; 90 nearest = from + t * v;
91 return Vector3.Dot(diff, diff); 91 return Vector3.Dot(diff, diff);
92 } 92 }
93 93
94 private bool Collide(Vector3 sphereCenter, Vector3 point, Vector3 resultNormal, float depth, float timeOfImpact) 94 private bool Collide(Vector3 sphereCenter, Vector3 point, Vector3 resultNormal, float depth, float timeOfImpact)
95 { 95 {
96 Vector3[] vertices = _triangle.Vertices; 96 Vector3[] vertices = _triangle.Vertices;
97 Vector3 c = sphereCenter; 97 Vector3 c = sphereCenter;
98 float r = _sphere.Radius; 98 float r = _sphere.Radius;
99 99
100 Vector3 delta = new Vector3(); 100 Vector3 delta = new Vector3();
101 101
102 Vector3 normal = Vector3.Cross(vertices[1] - vertices[0], vertices[2] - vertices[0]); 102 Vector3 normal = Vector3.Cross(vertices[1] - vertices[0], vertices[2] - vertices[0]);
103 normal = Vector3.Normalize(normal); 103 normal = Vector3.Normalize(normal);
104 Vector3 p1ToCentre = c - vertices[0]; 104 Vector3 p1ToCentre = c - vertices[0];
105 float distanceFromPlane = Vector3.Dot(p1ToCentre, normal); 105 float distanceFromPlane = Vector3.Dot(p1ToCentre, normal);
106 106
107 if (distanceFromPlane < 0) 107 if (distanceFromPlane < 0)
108 { 108 {
109 //triangle facing the other way 109 //triangle facing the other way
110 distanceFromPlane *= -1; 110 distanceFromPlane *= -1;
111 normal *= -1; 111 normal *= -1;
112 } 112 }
113 113
114 float contactMargin = PersistentManifold.ContactBreakingThreshold; 114 float contactMargin = PersistentManifold.ContactBreakingThreshold;
115 bool isInsideContactPlane = distanceFromPlane < r + contactMargin; 115 bool isInsideContactPlane = distanceFromPlane < r + contactMargin;
116 bool isInsideShellPlane = distanceFromPlane < r; 116 bool isInsideShellPlane = distanceFromPlane < r;
117 117
118 float deltaDotNormal = Vector3.Dot(delta, normal); 118 float deltaDotNormal = Vector3.Dot(delta, normal);
119 if (!isInsideShellPlane && deltaDotNormal >= 0.0f) 119 if (!isInsideShellPlane && deltaDotNormal >= 0.0f)
120 return false; 120 return false;
121 121
122 // Check for contact / intersection 122 // Check for contact / intersection
123 bool hasContact = false; 123 bool hasContact = false;
124 Vector3 contactPoint = new Vector3(); 124 Vector3 contactPoint = new Vector3();
125 if (isInsideContactPlane) 125 if (isInsideContactPlane)
126 { 126 {
127 if (FaceContains(c, vertices, normal)) 127 if (FaceContains(c, vertices, normal))
128 { 128 {
129 // Inside the contact wedge - touches a point on the shell plane 129 // Inside the contact wedge - touches a point on the shell plane
130 hasContact = true; 130 hasContact = true;
131 contactPoint = c - normal * distanceFromPlane; 131 contactPoint = c - normal * distanceFromPlane;
132 } 132 }
133 else 133 else
134 { 134 {
135 // Could be inside one of the contact capsules 135 // Could be inside one of the contact capsules
136 float contactCapsuleRadiusSqr = (r + contactMargin) * (r + contactMargin); 136 float contactCapsuleRadiusSqr = (r + contactMargin) * (r + contactMargin);
137 Vector3 nearestOnEdge = new Vector3(); 137 Vector3 nearestOnEdge = new Vector3();
138 for (int i = 0; i < _triangle.EdgeCount; i++) 138 for (int i = 0; i < _triangle.EdgeCount; i++)
139 { 139 {
140 Vector3 pa, pb; 140 Vector3 pa, pb;
141 _triangle.GetEdge(i, out pa, out pb); 141 _triangle.GetEdge(i, out pa, out pb);
142 142
143 float distanceSqr = SegmentSquareDistance(pa, pb, c, nearestOnEdge); 143 float distanceSqr = SegmentSquareDistance(pa, pb, c, nearestOnEdge);
144 if (distanceSqr < contactCapsuleRadiusSqr) 144 if (distanceSqr < contactCapsuleRadiusSqr)
145 { 145 {
146 // Yep, we're inside a capsule 146 // Yep, we're inside a capsule
147 hasContact = true; 147 hasContact = true;
148 contactPoint = nearestOnEdge; 148 contactPoint = nearestOnEdge;
149 } 149 }
150 } 150 }
151 } 151 }
152 } 152 }
153 153
154 if (hasContact) 154 if (hasContact)
155 { 155 {
156 Vector3 contactToCentre = c - contactPoint; 156 Vector3 contactToCentre = c - contactPoint;
157 float distanceSqr = contactToCentre.LengthSquared(); 157 float distanceSqr = contactToCentre.LengthSquared();
158 if (distanceSqr < (r - MaxOverlap) * (r - MaxOverlap)) 158 if (distanceSqr < (r - MaxOverlap) * (r - MaxOverlap))
159 { 159 {
160 float distance = (float)Math.Sqrt(distanceSqr); 160 float distance = (float)Math.Sqrt(distanceSqr);
161 resultNormal = contactToCentre; 161 resultNormal = contactToCentre;
162 resultNormal = Vector3.Normalize(resultNormal); 162 resultNormal = Vector3.Normalize(resultNormal);
163 point = contactPoint; 163 point = contactPoint;
164 depth = -(r - distance); 164 depth = -(r - distance);
165 return true; 165 return true;
166 } 166 }
167 167
168 if (Vector3.Dot(delta, contactToCentre) >= 0.0f) 168 if (Vector3.Dot(delta, contactToCentre) >= 0.0f)
169 return false; 169 return false;
170 170
171 // Moving towards the contact point -> collision 171 // Moving towards the contact point -> collision
172 point = contactPoint; 172 point = contactPoint;
173 timeOfImpact = 0.0f; 173 timeOfImpact = 0.0f;
174 return true; 174 return true;
175 } 175 }
176 return false; 176 return false;
177 } 177 }
178 178
179 private bool PointInTriangle(Vector3[] vertices, Vector3 normal, Vector3 p) 179 private bool PointInTriangle(Vector3[] vertices, Vector3 normal, Vector3 p)
180 { 180 {
181 Vector3 p1 = vertices[0]; 181 Vector3 p1 = vertices[0];
182 Vector3 p2 = vertices[1]; 182 Vector3 p2 = vertices[1];
183 Vector3 p3 = vertices[2]; 183 Vector3 p3 = vertices[2];
184 184
185 Vector3 edge1 = p2 - p1; 185 Vector3 edge1 = p2 - p1;
186 Vector3 edge2 = p3 - p2; 186 Vector3 edge2 = p3 - p2;
187 Vector3 edge3 = p1 - p3; 187 Vector3 edge3 = p1 - p3;
188 188
189 Vector3 p1ToP = p - p1; 189 Vector3 p1ToP = p - p1;
190 Vector3 p2ToP = p - p2; 190 Vector3 p2ToP = p - p2;
191 Vector3 p3ToP = p - p3; 191 Vector3 p3ToP = p - p3;
192 192
193 Vector3 edge1Normal = Vector3.Cross(edge1, normal); 193 Vector3 edge1Normal = Vector3.Cross(edge1, normal);
194 Vector3 edge2Normal = Vector3.Cross(edge2, normal); 194 Vector3 edge2Normal = Vector3.Cross(edge2, normal);
195 Vector3 edge3Normal = Vector3.Cross(edge3, normal); 195 Vector3 edge3Normal = Vector3.Cross(edge3, normal);
196 196
197 float r1, r2, r3; 197 float r1, r2, r3;
198 r1 = Vector3.Dot(edge1Normal, p1ToP); 198 r1 = Vector3.Dot(edge1Normal, p1ToP);
199 r2 = Vector3.Dot(edge2Normal, p2ToP); 199 r2 = Vector3.Dot(edge2Normal, p2ToP);
200 r3 = Vector3.Dot(edge3Normal, p3ToP); 200 r3 = Vector3.Dot(edge3Normal, p3ToP);
201 if ((r1 > 0 && r2 > 0 && r3 > 0) || 201 if ((r1 > 0 && r2 > 0 && r3 > 0) ||
202 (r1 <= 0 && r2 <= 0 && r3 <= 0)) 202 (r1 <= 0 && r2 <= 0 && r3 <= 0))
203 return true; 203 return true;
204 return false; 204 return false;
205 } 205 }
206 206
207 private bool FaceContains(Vector3 p, Vector3[] vertices, Vector3 normal) 207 private bool FaceContains(Vector3 p, Vector3[] vertices, Vector3 normal)
208 { 208 {
209 Vector3 lp = p; 209 Vector3 lp = p;
210 Vector3 lnormal = normal; 210 Vector3 lnormal = normal;
211 return PointInTriangle(vertices, lnormal, lp); 211 return PointInTriangle(vertices, lnormal, lp);
212 } 212 }
213 } 213 }
214} \ No newline at end of file 214} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/UnionFind.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/UnionFind.cs
index a825fad..3c7daea 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/UnionFind.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionDispatch/UnionFind.cs
@@ -1,151 +1,151 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public class UnionFind : IDisposable 28 public class UnionFind : IDisposable
29 { 29 {
30 private List<Element> _elements = new List<Element>(); 30 private List<Element> _elements = new List<Element>();
31 31
32 public int ElementCount 32 public int ElementCount
33 { 33 {
34 get { return _elements.Count; } 34 get { return _elements.Count; }
35 } 35 }
36 36
37 public void SortIslands() 37 public void SortIslands()
38 { 38 {
39 for (int i = 0; i < _elements.Count; i++) 39 for (int i = 0; i < _elements.Count; i++)
40 { 40 {
41 _elements[i].ID = Find(i); 41 _elements[i].ID = Find(i);
42 _elements[i].Size = i; 42 _elements[i].Size = i;
43 } 43 }
44 44
45 _elements.Sort(Sort); 45 _elements.Sort(Sort);
46 } 46 }
47 47
48 private static int Sort(Element x, Element y) 48 private static int Sort(Element x, Element y)
49 { 49 {
50 if (x.ID < y.ID) return -1; 50 if (x.ID < y.ID) return -1;
51 //else if (x.ID > y.ID) return 1; 51 //else if (x.ID > y.ID) return 1;
52 else return 0; 52 else return 0;
53 } 53 }
54 54
55 public void Reset(int number) 55 public void Reset(int number)
56 { 56 {
57 Allocate(number); 57 Allocate(number);
58 58
59 for (int i = 0; i < number; i++) 59 for (int i = 0; i < number; i++)
60 { 60 {
61 Element element = new Element(); 61 Element element = new Element();
62 element.ID = i; 62 element.ID = i;
63 element.Size = 1; 63 element.Size = 1;
64 _elements.Insert(i, element); 64 _elements.Insert(i, element);
65 } 65 }
66 } 66 }
67 67
68 public bool IsRoot(int index) 68 public bool IsRoot(int index)
69 { 69 {
70 return (_elements[index].Size == index); 70 return (_elements[index].Size == index);
71 } 71 }
72 72
73 public Element this[int index] 73 public Element this[int index]
74 { 74 {
75 get { return _elements[index]; } 75 get { return _elements[index]; }
76 } 76 }
77 77
78 public void Allocate(int number) 78 public void Allocate(int number)
79 { 79 {
80 //Does nothing 80 //Does nothing
81 _elements = new List<Element>(number); 81 _elements = new List<Element>(number);
82 } 82 }
83 83
84 public bool Find(int i, int j) 84 public bool Find(int i, int j)
85 { 85 {
86 return (Find(i) == Find(j)); 86 return (Find(i) == Find(j));
87 } 87 }
88 88
89 public int Find(int i) 89 public int Find(int i)
90 { 90 {
91 while (i != _elements[i].ID) 91 while (i != _elements[i].ID)
92 { 92 {
93 //Element element = _elements[i]; 93 //Element element = _elements[i];
94 //element.ID = _elements[_elements[i].ID].ID; 94 //element.ID = _elements[_elements[i].ID].ID;
95 _elements[i].ID = _elements[_elements[i].ID].ID; 95 _elements[i].ID = _elements[_elements[i].ID].ID;
96 i = _elements[i].ID; 96 i = _elements[i].ID;
97 } 97 }
98 98
99 return i; 99 return i;
100 } 100 }
101 101
102 public void Unite(int p, int q) 102 public void Unite(int p, int q)
103 { 103 {
104 int i = Find(p), j = Find(q); 104 int i = Find(p), j = Find(q);
105 if (i == j) 105 if (i == j)
106 return; 106 return;
107 107
108 //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) ) 108 //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) )
109 //if (_elements[i].Size < _elements[j].Size) 109 //if (_elements[i].Size < _elements[j].Size)
110 //{ 110 //{
111 // Element element = _elements[i]; 111 // Element element = _elements[i];
112 // element.ID = j; 112 // element.ID = j;
113 // _elements[i] = element; 113 // _elements[i] = element;
114 114
115 // element = _elements[j]; 115 // element = _elements[j];
116 // element.Size += _elements[i].Size; 116 // element.Size += _elements[i].Size;
117 // _elements[j] = element; 117 // _elements[j] = element;
118 //} 118 //}
119 //else 119 //else
120 //{ 120 //{
121 // Element element = _elements[j]; 121 // Element element = _elements[j];
122 // element.ID = i; 122 // element.ID = i;
123 // _elements[j] = element; 123 // _elements[j] = element;
124 124
125 // element = _elements[i]; 125 // element = _elements[i];
126 // element.Size += _elements[j].Size; 126 // element.Size += _elements[j].Size;
127 // _elements[i] = element; 127 // _elements[i] = element;
128 //} 128 //}
129 _elements[i].ID = j; 129 _elements[i].ID = j;
130 _elements[j].Size += _elements[i].Size; 130 _elements[j].Size += _elements[i].Size;
131 } 131 }
132 132
133 #region IDisposable Members 133 #region IDisposable Members
134 134
135 public void Dispose() 135 public void Dispose()
136 { 136 {
137 _elements.Clear(); 137 _elements.Clear();
138 } 138 }
139 139
140 #endregion 140 #endregion
141 } 141 }
142 142
143 public class Element 143 public class Element
144 { 144 {
145 private int _id; 145 private int _id;
146 private int _size; 146 private int _size;
147 147
148 public int ID { get { return _id; } set { _id = value; } } 148 public int ID { get { return _id; } set { _id = value; } }
149 public int Size { get { return _size; } set { _size = value; } } 149 public int Size { get { return _size; } set { _size = value; } }
150 } 150 }
151} \ No newline at end of file 151} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BUSimplex1to4.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BUSimplex1to4.cs
index b75c2b6..34f7442 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BUSimplex1to4.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BUSimplex1to4.cs
@@ -1,215 +1,215 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// BUSimplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex). 30 /// BUSimplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex).
31 /// </summary> 31 /// </summary>
32 public class BUSimplex1to4 : PolyhedralConvexShape 32 public class BUSimplex1to4 : PolyhedralConvexShape
33 { 33 {
34 private int _numVertices = 0; 34 private int _numVertices = 0;
35 private Vector3[] _vertices = new Vector3[4]; 35 private Vector3[] _vertices = new Vector3[4];
36 36
37 public BUSimplex1to4() { } 37 public BUSimplex1to4() { }
38 38
39 public BUSimplex1to4(Vector3 pointA) 39 public BUSimplex1to4(Vector3 pointA)
40 { 40 {
41 AddVertex(pointA); 41 AddVertex(pointA);
42 } 42 }
43 43
44 public BUSimplex1to4(Vector3 pointA, Vector3 pointB) 44 public BUSimplex1to4(Vector3 pointA, Vector3 pointB)
45 { 45 {
46 AddVertex(pointA); 46 AddVertex(pointA);
47 AddVertex(pointB); 47 AddVertex(pointB);
48 } 48 }
49 49
50 public BUSimplex1to4(Vector3 pointA, Vector3 pointB, Vector3 pointC) 50 public BUSimplex1to4(Vector3 pointA, Vector3 pointB, Vector3 pointC)
51 { 51 {
52 AddVertex(pointA); 52 AddVertex(pointA);
53 AddVertex(pointB); 53 AddVertex(pointB);
54 AddVertex(pointC); 54 AddVertex(pointC);
55 } 55 }
56 56
57 public BUSimplex1to4(Vector3 pointA, Vector3 pointB, Vector3 pointC, Vector3 pointD) 57 public BUSimplex1to4(Vector3 pointA, Vector3 pointB, Vector3 pointC, Vector3 pointD)
58 { 58 {
59 AddVertex(pointA); 59 AddVertex(pointA);
60 AddVertex(pointB); 60 AddVertex(pointB);
61 AddVertex(pointC); 61 AddVertex(pointC);
62 AddVertex(pointD); 62 AddVertex(pointD);
63 } 63 }
64 64
65 protected Vector3[] Vertices { get { return _vertices; } set { _vertices = value; } } 65 protected Vector3[] Vertices { get { return _vertices; } set { _vertices = value; } }
66 66
67 public override int VertexCount 67 public override int VertexCount
68 { 68 {
69 get 69 get
70 { 70 {
71 return _numVertices; 71 return _numVertices;
72 } 72 }
73 } 73 }
74 74
75 public override int EdgeCount 75 public override int EdgeCount
76 { 76 {
77 get 77 get
78 { 78 {
79 //euler formula, F-E+V = 2, so E = F+V-2 79 //euler formula, F-E+V = 2, so E = F+V-2
80 switch (_numVertices) 80 switch (_numVertices)
81 { 81 {
82 case 0: return 0; 82 case 0: return 0;
83 case 1: return 0; 83 case 1: return 0;
84 case 2: return 1; 84 case 2: return 1;
85 case 3: return 3; 85 case 3: return 3;
86 case 4: return 6; 86 case 4: return 6;
87 } 87 }
88 return 0; 88 return 0;
89 } 89 }
90 } 90 }
91 91
92 public override int PlaneCount 92 public override int PlaneCount
93 { 93 {
94 get 94 get
95 { 95 {
96 switch (_numVertices) 96 switch (_numVertices)
97 { 97 {
98 case 0: 98 case 0:
99 return 0; 99 return 0;
100 case 1: 100 case 1:
101 return 0; 101 return 0;
102 case 2: 102 case 2:
103 return 0; 103 return 0;
104 case 3: 104 case 3:
105 return 2; 105 return 2;
106 case 4: 106 case 4:
107 return 4; 107 return 4;
108 } 108 }
109 return 0; 109 return 0;
110 } 110 }
111 } 111 }
112 112
113 public override BroadphaseNativeTypes ShapeType 113 public override BroadphaseNativeTypes ShapeType
114 { 114 {
115 get 115 get
116 { 116 {
117 return BroadphaseNativeTypes.Tetrahedral; 117 return BroadphaseNativeTypes.Tetrahedral;
118 } 118 }
119 } 119 }
120 120
121 public override string Name 121 public override string Name
122 { 122 {
123 get 123 get
124 { 124 {
125 return "BUSimplex1to4"; 125 return "BUSimplex1to4";
126 } 126 }
127 } 127 }
128 128
129 public void AddVertex(Vector3 v) 129 public void AddVertex(Vector3 v)
130 { 130 {
131 _vertices[_numVertices++] = v; 131 _vertices[_numVertices++] = v;
132 } 132 }
133 133
134 public void Reset() 134 public void Reset()
135 { 135 {
136 _numVertices = 0; 136 _numVertices = 0;
137 } 137 }
138 138
139 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb) 139 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb)
140 { 140 {
141 switch (_numVertices) 141 switch (_numVertices)
142 { 142 {
143 case 2: 143 case 2:
144 pa = _vertices[0]; 144 pa = _vertices[0];
145 pb = _vertices[1]; 145 pb = _vertices[1];
146 return; 146 return;
147 case 3: 147 case 3:
148 switch (i) 148 switch (i)
149 { 149 {
150 case 0: 150 case 0:
151 pa = _vertices[0]; 151 pa = _vertices[0];
152 pb = _vertices[1]; 152 pb = _vertices[1];
153 return; 153 return;
154 case 1: 154 case 1:
155 pa = _vertices[1]; 155 pa = _vertices[1];
156 pb = _vertices[2]; 156 pb = _vertices[2];
157 return; 157 return;
158 case 2: 158 case 2:
159 pa = _vertices[2]; 159 pa = _vertices[2];
160 pb = _vertices[0]; 160 pb = _vertices[0];
161 return; 161 return;
162 } 162 }
163 break; 163 break;
164 case 4: 164 case 4:
165 switch (i) 165 switch (i)
166 { 166 {
167 case 0: 167 case 0:
168 pa = _vertices[0]; 168 pa = _vertices[0];
169 pb = _vertices[1]; 169 pb = _vertices[1];
170 return; 170 return;
171 case 1: 171 case 1:
172 pa = _vertices[1]; 172 pa = _vertices[1];
173 pb = _vertices[2]; 173 pb = _vertices[2];
174 return; 174 return;
175 case 2: 175 case 2:
176 pa = _vertices[2]; 176 pa = _vertices[2];
177 pb = _vertices[0]; 177 pb = _vertices[0];
178 return; 178 return;
179 case 3: 179 case 3:
180 pa = _vertices[0]; 180 pa = _vertices[0];
181 pb = _vertices[3]; 181 pb = _vertices[3];
182 return; 182 return;
183 case 4: 183 case 4:
184 pa = _vertices[1]; 184 pa = _vertices[1];
185 pb = _vertices[3]; 185 pb = _vertices[3];
186 return; 186 return;
187 case 5: 187 case 5:
188 pa = _vertices[2]; 188 pa = _vertices[2];
189 pb = _vertices[3]; 189 pb = _vertices[3];
190 return; 190 return;
191 } 191 }
192 break; 192 break;
193 } 193 }
194 194
195 pa = new Vector3(); 195 pa = new Vector3();
196 pb = new Vector3(); 196 pb = new Vector3();
197 } 197 }
198 198
199 public override void GetVertex(int i, out Vector3 vtx) 199 public override void GetVertex(int i, out Vector3 vtx)
200 { 200 {
201 vtx = _vertices[i]; 201 vtx = _vertices[i];
202 } 202 }
203 203
204 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i) 204 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i)
205 { 205 {
206 planeNormal = new Vector3(); 206 planeNormal = new Vector3();
207 planeSupport = new Vector3(); 207 planeSupport = new Vector3();
208 } 208 }
209 209
210 public override bool IsInside(Vector3 pt, float tolerance) 210 public override bool IsInside(Vector3 pt, float tolerance)
211 { 211 {
212 return false; 212 return false;
213 } 213 }
214 } 214 }
215} 215}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BoxShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BoxShape.cs
index ba6f3b7..7fab5c7 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BoxShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BoxShape.cs
@@ -1,316 +1,316 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class BoxShape : PolyhedralConvexShape 29 public class BoxShape : PolyhedralConvexShape
30 { 30 {
31 public BoxShape(Vector3 boxHalfExtents) 31 public BoxShape(Vector3 boxHalfExtents)
32 { 32 {
33 ImplicitShapeDimensions = boxHalfExtents; 33 ImplicitShapeDimensions = boxHalfExtents;
34 } 34 }
35 35
36 public override int VertexCount 36 public override int VertexCount
37 { 37 {
38 get 38 get
39 { 39 {
40 return 8; 40 return 8;
41 } 41 }
42 } 42 }
43 43
44 public override int EdgeCount 44 public override int EdgeCount
45 { 45 {
46 get 46 get
47 { 47 {
48 return 12; 48 return 12;
49 } 49 }
50 } 50 }
51 51
52 public override BroadphaseNativeTypes ShapeType 52 public override BroadphaseNativeTypes ShapeType
53 { 53 {
54 get 54 get
55 { 55 {
56 return BroadphaseNativeTypes.Box; 56 return BroadphaseNativeTypes.Box;
57 } 57 }
58 } 58 }
59 59
60 public override string Name 60 public override string Name
61 { 61 {
62 get 62 get
63 { 63 {
64 return "Box"; 64 return "Box";
65 } 65 }
66 } 66 }
67 67
68 public override int PreferredPenetrationDirectionsCount 68 public override int PreferredPenetrationDirectionsCount
69 { 69 {
70 get 70 get
71 { 71 {
72 return 6; 72 return 6;
73 } 73 }
74 } 74 }
75 75
76 public override int PlaneCount 76 public override int PlaneCount
77 { 77 {
78 get 78 get
79 { 79 {
80 return 6; 80 return 6;
81 } 81 }
82 } 82 }
83 83
84 public Vector3 HalfExtents { get { return ImplicitShapeDimensions * LocalScaling; } } 84 public Vector3 HalfExtents { get { return ImplicitShapeDimensions * LocalScaling; } }
85 85
86 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb) 86 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb)
87 { 87 {
88 int edgeVert0 = 0; 88 int edgeVert0 = 0;
89 int edgeVert1 = 0; 89 int edgeVert1 = 0;
90 90
91 switch (i) 91 switch (i)
92 { 92 {
93 case 0: 93 case 0:
94 edgeVert0 = 0; 94 edgeVert0 = 0;
95 edgeVert1 = 1; 95 edgeVert1 = 1;
96 break; 96 break;
97 case 1: 97 case 1:
98 edgeVert0 = 0; 98 edgeVert0 = 0;
99 edgeVert1 = 2; 99 edgeVert1 = 2;
100 break; 100 break;
101 case 2: 101 case 2:
102 edgeVert0 = 1; 102 edgeVert0 = 1;
103 edgeVert1 = 3; 103 edgeVert1 = 3;
104 104
105 break; 105 break;
106 case 3: 106 case 3:
107 edgeVert0 = 2; 107 edgeVert0 = 2;
108 edgeVert1 = 3; 108 edgeVert1 = 3;
109 break; 109 break;
110 case 4: 110 case 4:
111 edgeVert0 = 0; 111 edgeVert0 = 0;
112 edgeVert1 = 4; 112 edgeVert1 = 4;
113 break; 113 break;
114 case 5: 114 case 5:
115 edgeVert0 = 1; 115 edgeVert0 = 1;
116 edgeVert1 = 5; 116 edgeVert1 = 5;
117 117
118 break; 118 break;
119 case 6: 119 case 6:
120 edgeVert0 = 2; 120 edgeVert0 = 2;
121 edgeVert1 = 6; 121 edgeVert1 = 6;
122 break; 122 break;
123 case 7: 123 case 7:
124 edgeVert0 = 3; 124 edgeVert0 = 3;
125 edgeVert1 = 7; 125 edgeVert1 = 7;
126 break; 126 break;
127 case 8: 127 case 8:
128 edgeVert0 = 4; 128 edgeVert0 = 4;
129 edgeVert1 = 5; 129 edgeVert1 = 5;
130 break; 130 break;
131 case 9: 131 case 9:
132 edgeVert0 = 4; 132 edgeVert0 = 4;
133 edgeVert1 = 6; 133 edgeVert1 = 6;
134 break; 134 break;
135 case 10: 135 case 10:
136 edgeVert0 = 5; 136 edgeVert0 = 5;
137 edgeVert1 = 7; 137 edgeVert1 = 7;
138 break; 138 break;
139 case 11: 139 case 11:
140 edgeVert0 = 6; 140 edgeVert0 = 6;
141 edgeVert1 = 7; 141 edgeVert1 = 7;
142 break; 142 break;
143 default: 143 default:
144 throw new BulletException(); 144 throw new BulletException();
145 145
146 } 146 }
147 147
148 GetVertex(edgeVert0, out pa); 148 GetVertex(edgeVert0, out pa);
149 GetVertex(edgeVert1, out pb); 149 GetVertex(edgeVert1, out pb);
150 } 150 }
151 151
152 public override void GetVertex(int i, out Vector3 vtx) 152 public override void GetVertex(int i, out Vector3 vtx)
153 { 153 {
154 Vector3 halfExtents = HalfExtents; 154 Vector3 halfExtents = HalfExtents;
155 155
156 vtx = new Vector3( 156 vtx = new Vector3(
157 halfExtents.X * (1 - (i & 1)) - halfExtents.X * (i & 1), 157 halfExtents.X * (1 - (i & 1)) - halfExtents.X * (i & 1),
158 halfExtents.Y * (1 - ((i & 2) >> 1)) - halfExtents.Y * ((i & 2) >> 1), 158 halfExtents.Y * (1 - ((i & 2) >> 1)) - halfExtents.Y * ((i & 2) >> 1),
159 halfExtents.Z * (1 - ((i & 4) >> 2)) - halfExtents.Z * ((i & 4) >> 2)); 159 halfExtents.Z * (1 - ((i & 4) >> 2)) - halfExtents.Z * ((i & 4) >> 2));
160 } 160 }
161 161
162 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i) 162 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i)
163 { 163 {
164 //this plane might not be aligned... 164 //this plane might not be aligned...
165 Vector4 plane; 165 Vector4 plane;
166 GetPlaneEquation(out plane, i); 166 GetPlaneEquation(out plane, i);
167 planeNormal = new Vector3(plane.X, plane.Y, plane.Z); 167 planeNormal = new Vector3(plane.X, plane.Y, plane.Z);
168 planeSupport = LocalGetSupportingVertex(-planeNormal); 168 planeSupport = LocalGetSupportingVertex(-planeNormal);
169 } 169 }
170 170
171 public override bool IsInside(Vector3 pt, float tolerance) 171 public override bool IsInside(Vector3 pt, float tolerance)
172 { 172 {
173 Vector3 halfExtents = HalfExtents; 173 Vector3 halfExtents = HalfExtents;
174 174
175 //btScalar minDist = 2*tolerance; 175 //btScalar minDist = 2*tolerance;
176 176
177 bool result = (pt.X <= ( halfExtents.X + tolerance)) && 177 bool result = (pt.X <= ( halfExtents.X + tolerance)) &&
178 (pt.X >= (-halfExtents.X - tolerance)) && 178 (pt.X >= (-halfExtents.X - tolerance)) &&
179 (pt.Y <= ( halfExtents.Y + tolerance)) && 179 (pt.Y <= ( halfExtents.Y + tolerance)) &&
180 (pt.Y >= (-halfExtents.Y - tolerance)) && 180 (pt.Y >= (-halfExtents.Y - tolerance)) &&
181 (pt.Z <= ( halfExtents.Z + tolerance)) && 181 (pt.Z <= ( halfExtents.Z + tolerance)) &&
182 (pt.Z >= (-halfExtents.Z - tolerance)); 182 (pt.Z >= (-halfExtents.Z - tolerance));
183 183
184 return result; 184 return result;
185 } 185 }
186 186
187 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 187 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
188 { 188 {
189 Vector3 halfExtents = HalfExtents; 189 Vector3 halfExtents = HalfExtents;
190 190
191 return new Vector3( vec.X < 0.0f ? -halfExtents.X : halfExtents.X, 191 return new Vector3( vec.X < 0.0f ? -halfExtents.X : halfExtents.X,
192 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y, 192 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y,
193 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z); 193 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z);
194 } 194 }
195 195
196 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 196 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
197 { 197 {
198 Vector3 halfExtents = HalfExtents; 198 Vector3 halfExtents = HalfExtents;
199 Vector3 margin = new Vector3(Margin, Margin, Margin); 199 Vector3 margin = new Vector3(Margin, Margin, Margin);
200 halfExtents -= margin; 200 halfExtents -= margin;
201 201
202 return new Vector3( vec.X < 0.0f ? -halfExtents.X : halfExtents.X, 202 return new Vector3( vec.X < 0.0f ? -halfExtents.X : halfExtents.X,
203 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y, 203 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y,
204 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z); 204 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z);
205 } 205 }
206 206
207 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 207 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
208 { 208 {
209 Vector3 halfExtents = HalfExtents; 209 Vector3 halfExtents = HalfExtents;
210 Vector3 margin = new Vector3(Margin, Margin, Margin); 210 Vector3 margin = new Vector3(Margin, Margin, Margin);
211 halfExtents -= margin; 211 halfExtents -= margin;
212 212
213 for (int i = 0; i < vectors.Length; i++) 213 for (int i = 0; i < vectors.Length; i++)
214 { 214 {
215 Vector3 vec = vectors[i]; 215 Vector3 vec = vectors[i];
216 supportVerticesOut[i] = new Vector3(vec.X < 0.0f ? -halfExtents.X : halfExtents.X, 216 supportVerticesOut[i] = new Vector3(vec.X < 0.0f ? -halfExtents.X : halfExtents.X,
217 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y, 217 vec.Y < 0.0f ? -halfExtents.Y : halfExtents.Y,
218 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z); 218 vec.Z < 0.0f ? -halfExtents.Z : halfExtents.Z);
219 } 219 }
220 } 220 }
221 221
222 public virtual void GetPlaneEquation(out Vector4 plane, int i) 222 public virtual void GetPlaneEquation(out Vector4 plane, int i)
223 { 223 {
224 Vector3 halfExtents = HalfExtents; 224 Vector3 halfExtents = HalfExtents;
225 225
226 switch (i) 226 switch (i)
227 { 227 {
228 case 0: 228 case 0:
229 plane = new Vector4(1, 0, 0, 0); 229 plane = new Vector4(1, 0, 0, 0);
230 plane.W = -halfExtents.X; 230 plane.W = -halfExtents.X;
231 break; 231 break;
232 case 1: 232 case 1:
233 plane = new Vector4(-1, 0, 0, 0); 233 plane = new Vector4(-1, 0, 0, 0);
234 plane.W = -halfExtents.X; 234 plane.W = -halfExtents.X;
235 break; 235 break;
236 case 2: 236 case 2:
237 plane = new Vector4(0, 1, 0, 0); 237 plane = new Vector4(0, 1, 0, 0);
238 plane.W = -halfExtents.Y; 238 plane.W = -halfExtents.Y;
239 break; 239 break;
240 case 3: 240 case 3:
241 plane = new Vector4(0, -1, 0, 0); 241 plane = new Vector4(0, -1, 0, 0);
242 plane.W = -halfExtents.Y; 242 plane.W = -halfExtents.Y;
243 break; 243 break;
244 case 4: 244 case 4:
245 plane = new Vector4(0, 0, 1, 0); 245 plane = new Vector4(0, 0, 1, 0);
246 plane.W = -halfExtents.Z; 246 plane.W = -halfExtents.Z;
247 break; 247 break;
248 case 5: 248 case 5:
249 plane = new Vector4(0, 0, -1, 0); 249 plane = new Vector4(0, 0, -1, 0);
250 plane.W = -halfExtents.Z; 250 plane.W = -halfExtents.Z;
251 break; 251 break;
252 default: 252 default:
253 throw new BulletException(); 253 throw new BulletException();
254 } 254 }
255 } 255 }
256 256
257 public override void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector) 257 public override void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector)
258 { 258 {
259 switch (index) 259 switch (index)
260 { 260 {
261 case 0: 261 case 0:
262 penetrationVector = new Vector3(1, 0, 0); 262 penetrationVector = new Vector3(1, 0, 0);
263 break; 263 break;
264 case 1: 264 case 1:
265 penetrationVector = new Vector3(-1, 0, 0); 265 penetrationVector = new Vector3(-1, 0, 0);
266 break; 266 break;
267 case 2: 267 case 2:
268 penetrationVector = new Vector3(0, 1, 0); 268 penetrationVector = new Vector3(0, 1, 0);
269 break; 269 break;
270 case 3: 270 case 3:
271 penetrationVector = new Vector3(0, -1, 0); 271 penetrationVector = new Vector3(0, -1, 0);
272 break; 272 break;
273 case 4: 273 case 4:
274 penetrationVector = new Vector3(0, 0, 1); 274 penetrationVector = new Vector3(0, 0, 1);
275 break; 275 break;
276 case 5: 276 case 5:
277 penetrationVector = new Vector3(0, 0, -1); 277 penetrationVector = new Vector3(0, 0, -1);
278 break; 278 break;
279 default: 279 default:
280 throw new BulletException(); 280 throw new BulletException();
281 } 281 }
282 } 282 }
283 283
284 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 284 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
285 { 285 {
286 Vector3 halfExtents = HalfExtents; 286 Vector3 halfExtents = HalfExtents;
287 287
288 Matrix abs_b = MathHelper.Absolute(t); 288 Matrix abs_b = MathHelper.Absolute(t);
289 Vector3 center = t.Translation; 289 Vector3 center = t.Translation;
290 Vector3 row1 = new Vector3(abs_b.M11, abs_b.M12, abs_b.M13); 290 Vector3 row1 = new Vector3(abs_b.M11, abs_b.M12, abs_b.M13);
291 Vector3 row2 = new Vector3(abs_b.M21, abs_b.M22, abs_b.M23); 291 Vector3 row2 = new Vector3(abs_b.M21, abs_b.M22, abs_b.M23);
292 Vector3 row3 = new Vector3(abs_b.M31, abs_b.M32, abs_b.M33); 292 Vector3 row3 = new Vector3(abs_b.M31, abs_b.M32, abs_b.M33);
293 Vector3 extent = new Vector3(Vector3.Dot(row1, halfExtents), 293 Vector3 extent = new Vector3(Vector3.Dot(row1, halfExtents),
294 Vector3.Dot(row2, halfExtents), 294 Vector3.Dot(row2, halfExtents),
295 Vector3.Dot(row3, halfExtents)); 295 Vector3.Dot(row3, halfExtents));
296 extent += new Vector3(Margin, Margin, Margin); 296 extent += new Vector3(Margin, Margin, Margin);
297 297
298 aabbMin = center - extent; 298 aabbMin = center - extent;
299 aabbMax = center + extent; 299 aabbMax = center + extent;
300 } 300 }
301 301
302 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 302 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
303 { 303 {
304 Vector3 halfExtents = HalfExtents; 304 Vector3 halfExtents = HalfExtents;
305 305
306 float lx = 2f * (halfExtents.X); 306 float lx = 2f * (halfExtents.X);
307 float ly = 2f * (halfExtents.Y); 307 float ly = 2f * (halfExtents.Y);
308 float lz = 2f * (halfExtents.Z); 308 float lz = 2f * (halfExtents.Z);
309 309
310 inertia = new Vector3(); 310 inertia = new Vector3();
311 inertia.X = mass / (12.0f) * (ly * ly + lz * lz); 311 inertia.X = mass / (12.0f) * (ly * ly + lz * lz);
312 inertia.Y = mass / (12.0f) * (lx * lx + lz * lz); 312 inertia.Y = mass / (12.0f) * (lx * lx + lz * lz);
313 inertia.Z = mass / (12.0f) * (lx * lx + ly * ly); 313 inertia.Z = mass / (12.0f) * (lx * lx + ly * ly);
314 } 314 }
315 } 315 }
316} 316}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BvhTriangleMeshShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BvhTriangleMeshShape.cs
index 00247a0..03e1e44 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BvhTriangleMeshShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/BvhTriangleMeshShape.cs
@@ -1,83 +1,83 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 class MyNodeOverlapCallback : INodeOverlapCallback 29 class MyNodeOverlapCallback : INodeOverlapCallback
30 { 30 {
31 StridingMeshInterface _meshInterface; 31 StridingMeshInterface _meshInterface;
32 ITriangleCallback _callback; 32 ITriangleCallback _callback;
33 Vector3[] _triangle = new Vector3[3]; 33 Vector3[] _triangle = new Vector3[3];
34 34
35 public MyNodeOverlapCallback(ITriangleCallback callback, StridingMeshInterface meshInterface) 35 public MyNodeOverlapCallback(ITriangleCallback callback, StridingMeshInterface meshInterface)
36 { 36 {
37 _meshInterface = meshInterface; 37 _meshInterface = meshInterface;
38 _callback = callback; 38 _callback = callback;
39 } 39 }
40 40
41 public void ProcessNode(OptimizedBvhNode node) 41 public void ProcessNode(OptimizedBvhNode node)
42 { 42 {
43 List<Vector3> verts; 43 List<Vector3> verts;
44 List<int> indicies; 44 List<int> indicies;
45 int numtriangles; 45 int numtriangles;
46 46
47 _meshInterface.GetLockedReadOnlyVertexIndexBase(out verts, out indicies, out numtriangles, node.SubPart); 47 _meshInterface.GetLockedReadOnlyVertexIndexBase(out verts, out indicies, out numtriangles, node.SubPart);
48 Vector3 meshScaling = _meshInterface.Scaling; 48 Vector3 meshScaling = _meshInterface.Scaling;
49 49
50 for (int j = 0; j < 3; j++) 50 for (int j = 0; j < 3; j++)
51 { 51 {
52 _triangle[j] = verts[indicies[j + node.TriangleIndex * 3]] * meshScaling; 52 _triangle[j] = verts[indicies[j + node.TriangleIndex * 3]] * meshScaling;
53 } 53 }
54 54
55 _callback.ProcessTriangle(_triangle, node.SubPart, node.TriangleIndex); 55 _callback.ProcessTriangle(_triangle, node.SubPart, node.TriangleIndex);
56 _meshInterface.UnLockReadOnlyVertexBase(node.SubPart); 56 _meshInterface.UnLockReadOnlyVertexBase(node.SubPart);
57 } 57 }
58 } 58 }
59 59
60 public class BvhTriangleMeshShape : TriangleMeshShape 60 public class BvhTriangleMeshShape : TriangleMeshShape
61 { 61 {
62 OptimizedBvh _bvh = new OptimizedBvh(); 62 OptimizedBvh _bvh = new OptimizedBvh();
63 63
64 public BvhTriangleMeshShape(StridingMeshInterface meshInterface) : base(meshInterface) 64 public BvhTriangleMeshShape(StridingMeshInterface meshInterface) : base(meshInterface)
65 { 65 {
66 _bvh.Build(meshInterface); 66 _bvh.Build(meshInterface);
67 } 67 }
68 68
69 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) 69 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax)
70 { 70 {
71 MyNodeOverlapCallback myNodeCallback = new MyNodeOverlapCallback(callback, MeshInterface); 71 MyNodeOverlapCallback myNodeCallback = new MyNodeOverlapCallback(callback, MeshInterface);
72 _bvh.ReportAabbOverlappingNodex(myNodeCallback, aabbMin, aabbMax); 72 _bvh.ReportAabbOverlappingNodex(myNodeCallback, aabbMin, aabbMax);
73 } 73 }
74 74
75 public override string Name 75 public override string Name
76 { 76 {
77 get 77 get
78 { 78 {
79 return "BvhTriangleMesh"; 79 return "BvhTriangleMesh";
80 } 80 }
81 } 81 }
82 } 82 }
83} 83}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CollisionShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CollisionShape.cs
index a9ce3be..1a4fac2 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CollisionShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CollisionShape.cs
@@ -1,148 +1,148 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// CollisionShape provides generic interface for collidable objects 30 /// CollisionShape provides generic interface for collidable objects
31 /// </summary> 31 /// </summary>
32 public abstract class CollisionShape 32 public abstract class CollisionShape
33 { 33 {
34 //debugging support 34 //debugging support
35 private string _tempDebug; 35 private string _tempDebug;
36 36
37 public abstract string Name { get; } 37 public abstract string Name { get; }
38 public string ExtraDebugInfo { get { return _tempDebug; } set { _tempDebug = value; } } 38 public string ExtraDebugInfo { get { return _tempDebug; } set { _tempDebug = value; } }
39 39
40 public bool IsPolyhedral 40 public bool IsPolyhedral
41 { 41 {
42 get 42 get
43 { 43 {
44 return BroadphaseProxy.IsPolyhedral(ShapeType); 44 return BroadphaseProxy.IsPolyhedral(ShapeType);
45 } 45 }
46 } 46 }
47 47
48 public bool IsConvex 48 public bool IsConvex
49 { 49 {
50 get 50 get
51 { 51 {
52 return BroadphaseProxy.IsConvex(ShapeType); 52 return BroadphaseProxy.IsConvex(ShapeType);
53 } 53 }
54 } 54 }
55 public bool IsConcave 55 public bool IsConcave
56 { 56 {
57 get 57 get
58 { 58 {
59 return BroadphaseProxy.IsConcave(ShapeType); 59 return BroadphaseProxy.IsConcave(ShapeType);
60 } 60 }
61 } 61 }
62 public bool IsCompound 62 public bool IsCompound
63 { 63 {
64 get 64 get
65 { 65 {
66 return BroadphaseProxy.IsCompound(ShapeType); 66 return BroadphaseProxy.IsCompound(ShapeType);
67 } 67 }
68 } 68 }
69 69
70 //isInfinite is used to catch simulation error (aabb check) 70 //isInfinite is used to catch simulation error (aabb check)
71 public bool IsInfinite 71 public bool IsInfinite
72 { 72 {
73 get 73 get
74 { 74 {
75 return BroadphaseProxy.IsInfinite(ShapeType); 75 return BroadphaseProxy.IsInfinite(ShapeType);
76 } 76 }
77 } 77 }
78 78
79 public abstract float Margin { get; set; } 79 public abstract float Margin { get; set; }
80 public abstract Vector3 LocalScaling { get; set; } 80 public abstract Vector3 LocalScaling { get; set; }
81 public abstract BroadphaseNativeTypes ShapeType { get; } 81 public abstract BroadphaseNativeTypes ShapeType { get; }
82 82
83 83
84 public virtual void GetBoundingSphere(out Vector3 center, out float radius) 84 public virtual void GetBoundingSphere(out Vector3 center, out float radius)
85 { 85 {
86 Matrix tr = Matrix.Identity; 86 Matrix tr = Matrix.Identity;
87 Vector3 aabbMin, aabbMax; 87 Vector3 aabbMin, aabbMax;
88 88
89 GetAabb(tr, out aabbMin, out aabbMax); 89 GetAabb(tr, out aabbMin, out aabbMax);
90 90
91 radius = (aabbMax - aabbMin).Length() * 0.5f; 91 radius = (aabbMax - aabbMin).Length() * 0.5f;
92 center = (aabbMin + aabbMax) * 0.5f; 92 center = (aabbMin + aabbMax) * 0.5f;
93 } 93 }
94 94
95 public virtual float GetAngularMotionDisc() 95 public virtual float GetAngularMotionDisc()
96 { 96 {
97 Vector3 center; 97 Vector3 center;
98 float disc; 98 float disc;
99 GetBoundingSphere(out center, out disc); 99 GetBoundingSphere(out center, out disc);
100 disc += center.Length(); 100 disc += center.Length();
101 return disc; 101 return disc;
102 } 102 }
103 103
104 //calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) 104 //calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep)
105 //result is conservative 105 //result is conservative
106 public void CalculateTemporalAabb(Matrix currentTransform, Vector3 linearVelocity, Vector3 angularVelocity, float timeStep, out Vector3 temporalAabbMin, out Vector3 temporalAabbMax) 106 public void CalculateTemporalAabb(Matrix currentTransform, Vector3 linearVelocity, Vector3 angularVelocity, float timeStep, out Vector3 temporalAabbMin, out Vector3 temporalAabbMax)
107 { 107 {
108 //start with static aabb 108 //start with static aabb
109 GetAabb(currentTransform, out temporalAabbMin, out temporalAabbMax); 109 GetAabb(currentTransform, out temporalAabbMin, out temporalAabbMax);
110 110
111 float temporalAabbMaxx = temporalAabbMax.X; 111 float temporalAabbMaxx = temporalAabbMax.X;
112 float temporalAabbMaxy = temporalAabbMax.Y; 112 float temporalAabbMaxy = temporalAabbMax.Y;
113 float temporalAabbMaxz = temporalAabbMax.Z; 113 float temporalAabbMaxz = temporalAabbMax.Z;
114 float temporalAabbMinx = temporalAabbMin.X; 114 float temporalAabbMinx = temporalAabbMin.X;
115 float temporalAabbMiny = temporalAabbMin.Y; 115 float temporalAabbMiny = temporalAabbMin.Y;
116 float temporalAabbMinz = temporalAabbMin.Z; 116 float temporalAabbMinz = temporalAabbMin.Z;
117 117
118 // add linear motion 118 // add linear motion
119 Vector3 linMotion = linearVelocity * timeStep; 119 Vector3 linMotion = linearVelocity * timeStep;
120 //todo: simd would have a vector max/min operation, instead of per-element access 120 //todo: simd would have a vector max/min operation, instead of per-element access
121 if (linMotion.X > 0) 121 if (linMotion.X > 0)
122 temporalAabbMaxx += linMotion.X; 122 temporalAabbMaxx += linMotion.X;
123 else 123 else
124 temporalAabbMinx += linMotion.X; 124 temporalAabbMinx += linMotion.X;
125 if (linMotion.Y > 0) 125 if (linMotion.Y > 0)
126 temporalAabbMaxy += linMotion.Y; 126 temporalAabbMaxy += linMotion.Y;
127 else 127 else
128 temporalAabbMiny += linMotion.Y; 128 temporalAabbMiny += linMotion.Y;
129 if (linMotion.Z > 0) 129 if (linMotion.Z > 0)
130 temporalAabbMaxz += linMotion.Z; 130 temporalAabbMaxz += linMotion.Z;
131 else 131 else
132 temporalAabbMinz += linMotion.Z; 132 temporalAabbMinz += linMotion.Z;
133 133
134 //add conservative angular motion 134 //add conservative angular motion
135 float angularMotion = angularVelocity.Length() * GetAngularMotionDisc() * timeStep; 135 float angularMotion = angularVelocity.Length() * GetAngularMotionDisc() * timeStep;
136 Vector3 angularMotion3d = new Vector3(angularMotion, angularMotion, angularMotion); 136 Vector3 angularMotion3d = new Vector3(angularMotion, angularMotion, angularMotion);
137 temporalAabbMin = new Vector3(temporalAabbMinx, temporalAabbMiny, temporalAabbMinz); 137 temporalAabbMin = new Vector3(temporalAabbMinx, temporalAabbMiny, temporalAabbMinz);
138 temporalAabbMax = new Vector3(temporalAabbMaxx, temporalAabbMaxy, temporalAabbMaxz); 138 temporalAabbMax = new Vector3(temporalAabbMaxx, temporalAabbMaxy, temporalAabbMaxz);
139 139
140 temporalAabbMin -= angularMotion3d; 140 temporalAabbMin -= angularMotion3d;
141 temporalAabbMax += angularMotion3d; 141 temporalAabbMax += angularMotion3d;
142 } 142 }
143 143
144 public abstract void GetAabb(Matrix transform, out Vector3 aabbMin, out Vector3 aabbMax); 144 public abstract void GetAabb(Matrix transform, out Vector3 aabbMin, out Vector3 aabbMax);
145 145
146 public abstract void CalculateLocalInertia(float mass, out Vector3 inertia); 146 public abstract void CalculateLocalInertia(float mass, out Vector3 inertia);
147 } 147 }
148} 148}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CompoundShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CompoundShape.cs
index 08aeec8..bd13ffd 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CompoundShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CompoundShape.cs
@@ -1,183 +1,183 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// CompoundShape allows to store multiple other CollisionShapes 30 /// CompoundShape allows to store multiple other CollisionShapes
31 /// This allows for concave collision objects. This is more general then the Static Concave TriangleMeshShape. 31 /// This allows for concave collision objects. This is more general then the Static Concave TriangleMeshShape.
32 /// </summary> 32 /// </summary>
33 public class CompoundShape : CollisionShape 33 public class CompoundShape : CollisionShape
34 { 34 {
35 private List<Matrix> _childTransforms = new List<Matrix>(); 35 private List<Matrix> _childTransforms = new List<Matrix>();
36 private List<CollisionShape> _childShapes = new List<CollisionShape>(); 36 private List<CollisionShape> _childShapes = new List<CollisionShape>();
37 private Vector3 _localAabbMin; 37 private Vector3 _localAabbMin;
38 private Vector3 _localAabbMax; 38 private Vector3 _localAabbMax;
39 39
40 private OptimizedBvh _aabbTree; 40 private OptimizedBvh _aabbTree;
41 private float _collisionMargin; 41 private float _collisionMargin;
42 private Vector3 _localScaling; 42 private Vector3 _localScaling;
43 43
44 public CompoundShape() 44 public CompoundShape()
45 { 45 {
46 _localAabbMin = new Vector3(1e30f, 1e30f, 1e30f); 46 _localAabbMin = new Vector3(1e30f, 1e30f, 1e30f);
47 _localAabbMax = new Vector3(-1e30f, -1e30f, -1e30f); 47 _localAabbMax = new Vector3(-1e30f, -1e30f, -1e30f);
48 _aabbTree = null; 48 _aabbTree = null;
49 _collisionMargin = 0f; 49 _collisionMargin = 0f;
50 _localScaling = new Vector3(1f, 1f, 1f); 50 _localScaling = new Vector3(1f, 1f, 1f);
51 } 51 }
52 52
53 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 53 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
54 { 54 {
55 Vector3 localHalfExtents = 0.5f * (_localAabbMax - _localAabbMin); 55 Vector3 localHalfExtents = 0.5f * (_localAabbMax - _localAabbMin);
56 Vector3 localCenter = 0.5f * (_localAabbMax + _localAabbMin); 56 Vector3 localCenter = 0.5f * (_localAabbMax + _localAabbMin);
57 57
58 Matrix abs_b = MathHelper.Absolute(t); 58 Matrix abs_b = MathHelper.Absolute(t);
59 59
60 Vector3 row1 = new Vector3(abs_b.M11, abs_b.M12, abs_b.M13); 60 Vector3 row1 = new Vector3(abs_b.M11, abs_b.M12, abs_b.M13);
61 Vector3 row2 = new Vector3(abs_b.M21, abs_b.M22, abs_b.M23); 61 Vector3 row2 = new Vector3(abs_b.M21, abs_b.M22, abs_b.M23);
62 Vector3 row3 = new Vector3(abs_b.M31, abs_b.M32, abs_b.M33); 62 Vector3 row3 = new Vector3(abs_b.M31, abs_b.M32, abs_b.M33);
63 63
64 Vector3 center = new Vector3(Vector3.Dot(row1, localCenter) + t.Translation.X, 64 Vector3 center = new Vector3(Vector3.Dot(row1, localCenter) + t.Translation.X,
65 Vector3.Dot(row2, localCenter) + t.Translation.Y, 65 Vector3.Dot(row2, localCenter) + t.Translation.Y,
66 Vector3.Dot(row3, localCenter) + t.Translation.Z); 66 Vector3.Dot(row3, localCenter) + t.Translation.Z);
67 67
68 Vector3 extent = new Vector3(Vector3.Dot(row1, localHalfExtents), 68 Vector3 extent = new Vector3(Vector3.Dot(row1, localHalfExtents),
69 Vector3.Dot(row2, localHalfExtents), 69 Vector3.Dot(row2, localHalfExtents),
70 Vector3.Dot(row3, localHalfExtents)); 70 Vector3.Dot(row3, localHalfExtents));
71 71
72 aabbMin = center - extent; 72 aabbMin = center - extent;
73 aabbMax = center + extent; 73 aabbMax = center + extent;
74 } 74 }
75 75
76 public override BroadphaseNativeTypes ShapeType 76 public override BroadphaseNativeTypes ShapeType
77 { 77 {
78 get 78 get
79 { 79 {
80 return BroadphaseNativeTypes.Compound; 80 return BroadphaseNativeTypes.Compound;
81 } 81 }
82 } 82 }
83 83
84 public override Vector3 LocalScaling 84 public override Vector3 LocalScaling
85 { 85 {
86 get 86 get
87 { 87 {
88 return _localScaling; 88 return _localScaling;
89 } 89 }
90 set 90 set
91 { 91 {
92 _localScaling = value; 92 _localScaling = value;
93 } 93 }
94 } 94 }
95 95
96 public override string Name 96 public override string Name
97 { 97 {
98 get 98 get
99 { 99 {
100 return "Compound"; 100 return "Compound";
101 } 101 }
102 } 102 }
103 103
104 public override float Margin 104 public override float Margin
105 { 105 {
106 get 106 get
107 { 107 {
108 return _collisionMargin; 108 return _collisionMargin;
109 } 109 }
110 set 110 set
111 { 111 {
112 _collisionMargin = value; 112 _collisionMargin = value;
113 } 113 }
114 } 114 }
115 115
116 public int ChildShapeCount { get { return _childShapes.Count; } } 116 public int ChildShapeCount { get { return _childShapes.Count; } }
117 //this is optional, but should make collision queries faster, by culling non-overlapping nodes 117 //this is optional, but should make collision queries faster, by culling non-overlapping nodes
118 public OptimizedBvh AabbTree { get { return _aabbTree; } } 118 public OptimizedBvh AabbTree { get { return _aabbTree; } }
119 119
120 public CollisionShape GetChildShape(int index) 120 public CollisionShape GetChildShape(int index)
121 { 121 {
122 return _childShapes[index]; 122 return _childShapes[index];
123 } 123 }
124 124
125 public Matrix GetChildTransform(int index) 125 public Matrix GetChildTransform(int index)
126 { 126 {
127 return _childTransforms[index]; 127 return _childTransforms[index];
128 } 128 }
129 129
130 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 130 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
131 { 131 {
132 //approximation: take the inertia from the aabb for now 132 //approximation: take the inertia from the aabb for now
133 Matrix ident = Matrix.Identity; 133 Matrix ident = Matrix.Identity;
134 Vector3 aabbMin, aabbMax; 134 Vector3 aabbMin, aabbMax;
135 GetAabb(ident, out aabbMin, out aabbMax); 135 GetAabb(ident, out aabbMin, out aabbMax);
136 136
137 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f; 137 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f;
138 138
139 float lx = 2f * (halfExtents.X); 139 float lx = 2f * (halfExtents.X);
140 float ly = 2f * (halfExtents.Y); 140 float ly = 2f * (halfExtents.Y);
141 float lz = 2f * (halfExtents.Z); 141 float lz = 2f * (halfExtents.Z);
142 142
143 inertia = new Vector3(); 143 inertia = new Vector3();
144 inertia.X = mass / (12.0f) * (ly * ly + lz * lz); 144 inertia.X = mass / (12.0f) * (ly * ly + lz * lz);
145 inertia.Y = mass / (12.0f) * (lx * lx + lz * lz); 145 inertia.Y = mass / (12.0f) * (lx * lx + lz * lz);
146 inertia.Z = mass / (12.0f) * (lx * lx + ly * ly); 146 inertia.Z = mass / (12.0f) * (lx * lx + ly * ly);
147 } 147 }
148 148
149 public void AddChildShape(Matrix localTransform, CollisionShape shape) 149 public void AddChildShape(Matrix localTransform, CollisionShape shape)
150 { 150 {
151 _childTransforms.Add(localTransform); 151 _childTransforms.Add(localTransform);
152 _childShapes.Add(shape); 152 _childShapes.Add(shape);
153 153
154 //extend the local aabbMin/aabbMax 154 //extend the local aabbMin/aabbMax
155 Vector3 localAabbMin, localAabbMax; 155 Vector3 localAabbMin, localAabbMax;
156 shape.GetAabb(localTransform, out localAabbMin, out localAabbMax); 156 shape.GetAabb(localTransform, out localAabbMin, out localAabbMax);
157 if (_localAabbMin.X > localAabbMin.X) 157 if (_localAabbMin.X > localAabbMin.X)
158 { 158 {
159 _localAabbMin.X = localAabbMin.X; 159 _localAabbMin.X = localAabbMin.X;
160 } 160 }
161 if (_localAabbMax.X < localAabbMax.X) 161 if (_localAabbMax.X < localAabbMax.X)
162 { 162 {
163 _localAabbMax.X = localAabbMax.X; 163 _localAabbMax.X = localAabbMax.X;
164 } 164 }
165 if (_localAabbMin.Y > localAabbMin.Y) 165 if (_localAabbMin.Y > localAabbMin.Y)
166 { 166 {
167 _localAabbMin.Y = localAabbMin.Y; 167 _localAabbMin.Y = localAabbMin.Y;
168 } 168 }
169 if (_localAabbMax.Y < localAabbMax.Y) 169 if (_localAabbMax.Y < localAabbMax.Y)
170 { 170 {
171 _localAabbMax.Y = localAabbMax.Y; 171 _localAabbMax.Y = localAabbMax.Y;
172 } 172 }
173 if (_localAabbMin.Z > localAabbMin.Z) 173 if (_localAabbMin.Z > localAabbMin.Z)
174 { 174 {
175 _localAabbMin.Z = localAabbMin.Z; 175 _localAabbMin.Z = localAabbMin.Z;
176 } 176 }
177 if (_localAabbMax.Z < localAabbMax.Z) 177 if (_localAabbMax.Z < localAabbMax.Z)
178 { 178 {
179 _localAabbMax.Z = localAabbMax.Z; 179 _localAabbMax.Z = localAabbMax.Z;
180 } 180 }
181 } 181 }
182 } 182 }
183} 183}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConcaveShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConcaveShape.cs
index 1e773f0..c0b177d 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConcaveShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConcaveShape.cs
@@ -1,55 +1,55 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public abstract class ConcaveShape : CollisionShape 29 public abstract class ConcaveShape : CollisionShape
30 { 30 {
31 private float _collisionMargin; 31 private float _collisionMargin;
32 32
33 public ConcaveShape() { } 33 public ConcaveShape() { }
34 34
35 public float CollisionMargin 35 public float CollisionMargin
36 { 36 {
37 get { return _collisionMargin; } 37 get { return _collisionMargin; }
38 set { _collisionMargin = value; } 38 set { _collisionMargin = value; }
39 } 39 }
40 40
41 public override float Margin 41 public override float Margin
42 { 42 {
43 get 43 get
44 { 44 {
45 return _collisionMargin; 45 return _collisionMargin;
46 } 46 }
47 set 47 set
48 { 48 {
49 _collisionMargin = value; 49 _collisionMargin = value;
50 } 50 }
51 } 51 }
52 52
53 public abstract void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax); 53 public abstract void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax);
54 } 54 }
55} \ No newline at end of file 55} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConeShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConeShape.cs
index 361c277..52084f4 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConeShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConeShape.cs
@@ -1,208 +1,208 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// ConeShape implements a Cone shape, around the X axis 30 /// ConeShape implements a Cone shape, around the X axis
31 /// </summary> 31 /// </summary>
32 public class ConeShapeX : ConeShape 32 public class ConeShapeX : ConeShape
33 { 33 {
34 public ConeShapeX(float radius, float height) 34 public ConeShapeX(float radius, float height)
35 : base(radius, height) 35 : base(radius, height)
36 { 36 {
37 ConeUpIndex = 0; 37 ConeUpIndex = 0;
38 } 38 }
39 } 39 }
40 40
41 /// <summary> 41 /// <summary>
42 /// ConeShape implements a Cone shape, around the Z axis 42 /// ConeShape implements a Cone shape, around the Z axis
43 /// </summary> 43 /// </summary>
44 public class ConeShapeZ : ConeShape 44 public class ConeShapeZ : ConeShape
45 { 45 {
46 public ConeShapeZ(float radius, float height) 46 public ConeShapeZ(float radius, float height)
47 : base(radius, height) 47 : base(radius, height)
48 { 48 {
49 ConeUpIndex = 2; 49 ConeUpIndex = 2;
50 } 50 }
51 } 51 }
52 52
53 /// <summary> 53 /// <summary>
54 /// ConeShape implements a Cone shape, around the Y axis 54 /// ConeShape implements a Cone shape, around the Y axis
55 /// </summary> 55 /// </summary>
56 public class ConeShape : ConvexShape 56 public class ConeShape : ConvexShape
57 { 57 {
58 private float _sinAngle; 58 private float _sinAngle;
59 private float _radius; 59 private float _radius;
60 private float _height; 60 private float _height;
61 private int[] _coneIndices = new int[3]; 61 private int[] _coneIndices = new int[3];
62 62
63 public ConeShape(float radius, float height) 63 public ConeShape(float radius, float height)
64 { 64 {
65 _radius = radius; 65 _radius = radius;
66 _height = height; 66 _height = height;
67 ConeUpIndex = 1; 67 ConeUpIndex = 1;
68 _sinAngle = (_radius / (float)Math.Sqrt(_radius * _radius + _height * _height)); 68 _sinAngle = (_radius / (float)Math.Sqrt(_radius * _radius + _height * _height));
69 } 69 }
70 70
71 public float Radius { get { return _radius; } } 71 public float Radius { get { return _radius; } }
72 public float Height { get { return _height; } } 72 public float Height { get { return _height; } }
73 73
74 public override BroadphaseNativeTypes ShapeType 74 public override BroadphaseNativeTypes ShapeType
75 { 75 {
76 get 76 get
77 { 77 {
78 return BroadphaseNativeTypes.Cone; 78 return BroadphaseNativeTypes.Cone;
79 } 79 }
80 } 80 }
81 81
82 public override string Name 82 public override string Name
83 { 83 {
84 get 84 get
85 { 85 {
86 return "Cone"; 86 return "Cone";
87 } 87 }
88 } 88 }
89 89
90 //choose upAxis index 90 //choose upAxis index
91 public int ConeUpIndex 91 public int ConeUpIndex
92 { 92 {
93 get { return _coneIndices[1]; } 93 get { return _coneIndices[1]; }
94 set 94 set
95 { 95 {
96 switch (value) 96 switch (value)
97 { 97 {
98 case 0: 98 case 0:
99 _coneIndices[0] = 1; 99 _coneIndices[0] = 1;
100 _coneIndices[1] = 0; 100 _coneIndices[1] = 0;
101 _coneIndices[2] = 2; 101 _coneIndices[2] = 2;
102 break; 102 break;
103 case 1: 103 case 1:
104 _coneIndices[0] = 0; 104 _coneIndices[0] = 0;
105 _coneIndices[1] = 1; 105 _coneIndices[1] = 1;
106 _coneIndices[2] = 2; 106 _coneIndices[2] = 2;
107 break; 107 break;
108 case 2: 108 case 2:
109 _coneIndices[0] = 0; 109 _coneIndices[0] = 0;
110 _coneIndices[1] = 2; 110 _coneIndices[1] = 2;
111 _coneIndices[2] = 1; 111 _coneIndices[2] = 1;
112 break; 112 break;
113 default: 113 default:
114 BulletDebug.Assert(false); 114 BulletDebug.Assert(false);
115 break; 115 break;
116 } 116 }
117 } 117 }
118 } 118 }
119 119
120 private Vector3 ConeLocalSupport(Vector3 v) 120 private Vector3 ConeLocalSupport(Vector3 v)
121 { 121 {
122 float halfHeight = _height * 0.5f; 122 float halfHeight = _height * 0.5f;
123 bool condition; 123 bool condition;
124 124
125 if (_coneIndices[1] == 0) 125 if (_coneIndices[1] == 0)
126 condition = v.X > v.Length() * _sinAngle; 126 condition = v.X > v.Length() * _sinAngle;
127 else if (_coneIndices[1] == 1) 127 else if (_coneIndices[1] == 1)
128 condition = v.Y > v.Length() * _sinAngle; 128 condition = v.Y > v.Length() * _sinAngle;
129 else 129 else
130 condition = v.Z > v.Length() * _sinAngle; 130 condition = v.Z > v.Length() * _sinAngle;
131 131
132 if (condition) 132 if (condition)
133 { 133 {
134 Vector3 tmp = new Vector3(); 134 Vector3 tmp = new Vector3();
135 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], halfHeight); 135 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], halfHeight);
136 return tmp; 136 return tmp;
137 } 137 }
138 else 138 else
139 { 139 {
140 float s = (float)Math.Sqrt(MathHelper.GetValueByIndex(v, _coneIndices[0]) * MathHelper.GetValueByIndex(v, _coneIndices[0]) 140 float s = (float)Math.Sqrt(MathHelper.GetValueByIndex(v, _coneIndices[0]) * MathHelper.GetValueByIndex(v, _coneIndices[0])
141 + MathHelper.GetValueByIndex(v, _coneIndices[2]) * MathHelper.GetValueByIndex(v, _coneIndices[2])); 141 + MathHelper.GetValueByIndex(v, _coneIndices[2]) * MathHelper.GetValueByIndex(v, _coneIndices[2]));
142 if (s > MathHelper.Epsilon) 142 if (s > MathHelper.Epsilon)
143 { 143 {
144 float d = _radius / s; 144 float d = _radius / s;
145 Vector3 tmp = new Vector3(); 145 Vector3 tmp = new Vector3();
146 MathHelper.SetValueByIndex(ref tmp, _coneIndices[0], MathHelper.GetValueByIndex(v, _coneIndices[0]) * d); 146 MathHelper.SetValueByIndex(ref tmp, _coneIndices[0], MathHelper.GetValueByIndex(v, _coneIndices[0]) * d);
147 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], -halfHeight); 147 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], -halfHeight);
148 MathHelper.SetValueByIndex(ref tmp, _coneIndices[2], MathHelper.GetValueByIndex(v, _coneIndices[2]) * d); 148 MathHelper.SetValueByIndex(ref tmp, _coneIndices[2], MathHelper.GetValueByIndex(v, _coneIndices[2]) * d);
149 return tmp; 149 return tmp;
150 } 150 }
151 else 151 else
152 { 152 {
153 Vector3 tmp = new Vector3(); 153 Vector3 tmp = new Vector3();
154 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], -halfHeight); 154 MathHelper.SetValueByIndex(ref tmp, _coneIndices[1], -halfHeight);
155 return tmp; 155 return tmp;
156 } 156 }
157 } 157 }
158 } 158 }
159 159
160 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 160 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
161 { 161 {
162 return ConeLocalSupport(vec); 162 return ConeLocalSupport(vec);
163 } 163 }
164 164
165 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 165 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
166 { 166 {
167 for (int i = 0; i < vectors.Length; i++) 167 for (int i = 0; i < vectors.Length; i++)
168 supportVerticesOut[i] = ConeLocalSupport(vectors[i]); 168 supportVerticesOut[i] = ConeLocalSupport(vectors[i]);
169 } 169 }
170 170
171 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 171 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
172 { 172 {
173 Matrix identity = Matrix.Identity; 173 Matrix identity = Matrix.Identity;
174 Vector3 aabbMin, aabbMax; 174 Vector3 aabbMin, aabbMax;
175 GetAabb(identity, out aabbMin, out aabbMax); 175 GetAabb(identity, out aabbMin, out aabbMax);
176 176
177 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f; 177 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f;
178 178
179 float margin = Margin; 179 float margin = Margin;
180 180
181 float lx = 2f * (halfExtents.X + margin); 181 float lx = 2f * (halfExtents.X + margin);
182 float ly = 2f * (halfExtents.Y + margin); 182 float ly = 2f * (halfExtents.Y + margin);
183 float lz = 2f * (halfExtents.Z + margin); 183 float lz = 2f * (halfExtents.Z + margin);
184 float x2 = lx * lx; 184 float x2 = lx * lx;
185 float y2 = ly * ly; 185 float y2 = ly * ly;
186 float z2 = lz * lz; 186 float z2 = lz * lz;
187 float scaledmass = mass * 0.08333333f; 187 float scaledmass = mass * 0.08333333f;
188 188
189 inertia = scaledmass * (new Vector3(y2 + z2, x2 + z2, x2 + y2)); 189 inertia = scaledmass * (new Vector3(y2 + z2, x2 + z2, x2 + y2));
190 } 190 }
191 191
192 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 192 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
193 { 193 {
194 Vector3 supVertex = ConeLocalSupport(vec); 194 Vector3 supVertex = ConeLocalSupport(vec);
195 if (Margin != 0) 195 if (Margin != 0)
196 { 196 {
197 Vector3 vecnorm = vec; 197 Vector3 vecnorm = vec;
198 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 198 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
199 { 199 {
200 vecnorm = new Vector3(-1f, -1f, -1f); 200 vecnorm = new Vector3(-1f, -1f, -1f);
201 } 201 }
202 vecnorm = Vector3.Normalize(vecnorm); 202 vecnorm = Vector3.Normalize(vecnorm);
203 supVertex += Margin * vecnorm; 203 supVertex += Margin * vecnorm;
204 } 204 }
205 return supVertex; 205 return supVertex;
206 } 206 }
207 } 207 }
208} 208}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexHullShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexHullShape.cs
index eb78533..8d06c90 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexHullShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexHullShape.cs
@@ -1,184 +1,184 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices) 30 /// ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices)
31 /// No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices. 31 /// No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices.
32 /// on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash. 32 /// on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash.
33 /// (memory is much slower then the cpu) 33 /// (memory is much slower then the cpu)
34 /// </summary> 34 /// </summary>
35 public class ConvexHullShape : PolyhedralConvexShape 35 public class ConvexHullShape : PolyhedralConvexShape
36 { 36 {
37 private List<Vector3> _points = new List<Vector3>(); 37 private List<Vector3> _points = new List<Vector3>();
38 38
39 public ConvexHullShape() { } 39 public ConvexHullShape() { }
40 40
41 public override int VertexCount 41 public override int VertexCount
42 { 42 {
43 get 43 get
44 { 44 {
45 return _points.Count; 45 return _points.Count;
46 } 46 }
47 } 47 }
48 48
49 public override int EdgeCount 49 public override int EdgeCount
50 { 50 {
51 get 51 get
52 { 52 {
53 return _points.Count; 53 return _points.Count;
54 } 54 }
55 } 55 }
56 56
57 public override int PlaneCount 57 public override int PlaneCount
58 { 58 {
59 get 59 get
60 { 60 {
61 return 0; 61 return 0;
62 } 62 }
63 } 63 }
64 64
65 public override BroadphaseNativeTypes ShapeType 65 public override BroadphaseNativeTypes ShapeType
66 { 66 {
67 get 67 get
68 { 68 {
69 return BroadphaseNativeTypes.ConvexHull; 69 return BroadphaseNativeTypes.ConvexHull;
70 } 70 }
71 } 71 }
72 72
73 public override string Name 73 public override string Name
74 { 74 {
75 get 75 get
76 { 76 {
77 return "Convex"; 77 return "Convex";
78 } 78 }
79 } 79 }
80 80
81 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 81 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
82 { 82 {
83 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec); 83 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec);
84 84
85 if (Margin != 0) 85 if (Margin != 0)
86 { 86 {
87 Vector3 vecnorm = vec; 87 Vector3 vecnorm = vec;
88 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 88 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
89 { 89 {
90 vecnorm=new Vector3(-1, -1, -1); 90 vecnorm=new Vector3(-1, -1, -1);
91 } 91 }
92 vecnorm = Vector3.Normalize(vecnorm); 92 vecnorm = Vector3.Normalize(vecnorm);
93 supVertex += Margin * vecnorm; 93 supVertex += Margin * vecnorm;
94 } 94 }
95 return supVertex; 95 return supVertex;
96 } 96 }
97 97
98 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec0) 98 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec0)
99 { 99 {
100 Vector3 supVec = new Vector3(); 100 Vector3 supVec = new Vector3();
101 float newDot, maxDot = -1e30f; 101 float newDot, maxDot = -1e30f;
102 102
103 Vector3 vec = vec0; 103 Vector3 vec = vec0;
104 float lenSqr = vec.LengthSquared(); 104 float lenSqr = vec.LengthSquared();
105 if (lenSqr < 0.0001f) 105 if (lenSqr < 0.0001f)
106 { 106 {
107 vec = new Vector3(1, 0, 0); 107 vec = new Vector3(1, 0, 0);
108 } 108 }
109 else 109 else
110 { 110 {
111 float rlen = 1f / (float)Math.Sqrt(lenSqr); 111 float rlen = 1f / (float)Math.Sqrt(lenSqr);
112 vec *= rlen; 112 vec *= rlen;
113 } 113 }
114 114
115 for (int i = 0; i < _points.Count; i++) 115 for (int i = 0; i < _points.Count; i++)
116 { 116 {
117 Vector3 vtx = _points[i] * LocalScaling; 117 Vector3 vtx = _points[i] * LocalScaling;
118 118
119 newDot = Vector3.Dot(vec, vtx); 119 newDot = Vector3.Dot(vec, vtx);
120 if (newDot > maxDot) 120 if (newDot > maxDot)
121 { 121 {
122 maxDot = newDot; 122 maxDot = newDot;
123 supVec = vtx; 123 supVec = vtx;
124 } 124 }
125 } 125 }
126 return supVec; 126 return supVec;
127 } 127 }
128 128
129 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 129 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
130 { 130 {
131 float newDot; 131 float newDot;
132 //use 'w' component of supportVerticesOut? 132 //use 'w' component of supportVerticesOut?
133 /*{ 133 /*{
134 for (int i = 0; i < numVectors; i++) 134 for (int i = 0; i < numVectors; i++)
135 { 135 {
136 supportVerticesOut[i][3] = -1e30f; 136 supportVerticesOut[i][3] = -1e30f;
137 } 137 }
138 }*/ 138 }*/
139 #warning Warning! 139 #warning Warning!
140 for (int i = 0; i < _points.Count; i++) 140 for (int i = 0; i < _points.Count; i++)
141 { 141 {
142 Vector3 vtx = _points[i] * LocalScaling; 142 Vector3 vtx = _points[i] * LocalScaling;
143 143
144 for (int j = 0; j < vectors.Length; j++) 144 for (int j = 0; j < vectors.Length; j++)
145 { 145 {
146 newDot = Vector3.Dot(vectors[j], vtx); 146 newDot = Vector3.Dot(vectors[j], vtx);
147 if (newDot > -1e30f) 147 if (newDot > -1e30f)
148 { 148 {
149 //WARNING: don't swap next lines, the w component would get overwritten! 149 //WARNING: don't swap next lines, the w component would get overwritten!
150 supportVerticesOut[j] = vtx; 150 supportVerticesOut[j] = vtx;
151 //supportVerticesOut[j][3] = newDot; 151 //supportVerticesOut[j][3] = newDot;
152 #warning Warning! 152 #warning Warning!
153 } 153 }
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb) 158 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb)
159 { 159 {
160 int index0 = i % _points.Count; 160 int index0 = i % _points.Count;
161 int index1 = (i + 1) % _points.Count; 161 int index1 = (i + 1) % _points.Count;
162 pa = _points[index0] * LocalScaling; 162 pa = _points[index0] * LocalScaling;
163 pb = _points[index1] * LocalScaling; 163 pb = _points[index1] * LocalScaling;
164 } 164 }
165 165
166 public override void GetVertex(int i, out Vector3 vtx) 166 public override void GetVertex(int i, out Vector3 vtx)
167 { 167 {
168 vtx = _points[i] * LocalScaling; 168 vtx = _points[i] * LocalScaling;
169 } 169 }
170 170
171 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i) 171 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i)
172 { 172 {
173 planeNormal = new Vector3(); 173 planeNormal = new Vector3();
174 planeSupport = new Vector3(); 174 planeSupport = new Vector3();
175 BulletDebug.Assert(false); 175 BulletDebug.Assert(false);
176 } 176 }
177 177
178 public override bool IsInside(Vector3 pt, float tolerance) 178 public override bool IsInside(Vector3 pt, float tolerance)
179 { 179 {
180 BulletDebug.Assert(false); 180 BulletDebug.Assert(false);
181 return false; 181 return false;
182 } 182 }
183 } 183 }
184} 184}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexShape.cs
index 02d678e..d5c2fbd 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexShape.cs
@@ -1,141 +1,141 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// ConvexShape is an abstract shape interface. 30 /// ConvexShape is an abstract shape interface.
31 /// The explicit part provides plane-equations, the implicit part provides GetClosestPoint interface. 31 /// The explicit part provides plane-equations, the implicit part provides GetClosestPoint interface.
32 /// used in combination with GJK or btConvexCast 32 /// used in combination with GJK or btConvexCast
33 /// </summary> 33 /// </summary>
34 public abstract class ConvexShape : CollisionShape 34 public abstract class ConvexShape : CollisionShape
35 { 35 {
36 private const int _maxPreferredPenetrationDirections = 10; 36 private const int _maxPreferredPenetrationDirections = 10;
37 private const float _convexDistanceMargin = 0.04f; 37 private const float _convexDistanceMargin = 0.04f;
38 38
39 private Vector3 _localScaling; 39 private Vector3 _localScaling;
40 private Vector3 _implicitShapeDimensions; 40 private Vector3 _implicitShapeDimensions;
41 private float _collisionMargin; 41 private float _collisionMargin;
42 42
43 public ConvexShape() 43 public ConvexShape()
44 : base() 44 : base()
45 { 45 {
46 _localScaling = Vector3.One; 46 _localScaling = Vector3.One;
47 _collisionMargin = ConvexDistanceMargin; 47 _collisionMargin = ConvexDistanceMargin;
48 } 48 }
49 49
50 public static int MaxPreferredPenetrationDirections { get { return _maxPreferredPenetrationDirections; } } 50 public static int MaxPreferredPenetrationDirections { get { return _maxPreferredPenetrationDirections; } }
51 public static float ConvexDistanceMargin { get { return _convexDistanceMargin; } } 51 public static float ConvexDistanceMargin { get { return _convexDistanceMargin; } }
52 52
53 public Vector3 ImplicitShapeDimensions { get { return _implicitShapeDimensions; } protected set { _implicitShapeDimensions = value; } } 53 public Vector3 ImplicitShapeDimensions { get { return _implicitShapeDimensions; } protected set { _implicitShapeDimensions = value; } }
54 public virtual int PreferredPenetrationDirectionsCount { get { return 0; } } 54 public virtual int PreferredPenetrationDirectionsCount { get { return 0; } }
55 55
56 protected float CollisionMargin { get { return _collisionMargin; } set { _collisionMargin = value; } } 56 protected float CollisionMargin { get { return _collisionMargin; } set { _collisionMargin = value; } }
57 57
58 public virtual void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector) 58 public virtual void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector)
59 { 59 {
60 penetrationVector = new Vector3(); 60 penetrationVector = new Vector3();
61 BulletDebug.Assert(false); 61 BulletDebug.Assert(false);
62 } 62 }
63 63
64 public abstract Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec); 64 public abstract Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec);
65 //notice that the vectors should be unit length 65 //notice that the vectors should be unit length
66 public abstract void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut); 66 public abstract void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut);
67 67
68 /// <summary> 68 /// <summary>
69 /// getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version 69 /// getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
70 /// </summary> 70 /// </summary>
71 /// <param name="t"></param> 71 /// <param name="t"></param>
72 /// <param name="aabbMin"></param> 72 /// <param name="aabbMin"></param>
73 /// <param name="aabbMax"></param> 73 /// <param name="aabbMax"></param>
74 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 74 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
75 { 75 {
76 GetAabbSlow(t, out aabbMin, out aabbMax); 76 GetAabbSlow(t, out aabbMin, out aabbMax);
77 } 77 }
78 78
79 public override Vector3 LocalScaling 79 public override Vector3 LocalScaling
80 { 80 {
81 get 81 get
82 { 82 {
83 return _localScaling; 83 return _localScaling;
84 } 84 }
85 set 85 set
86 { 86 {
87 _localScaling = value; 87 _localScaling = value;
88 } 88 }
89 } 89 }
90 90
91 public override float Margin 91 public override float Margin
92 { 92 {
93 get 93 get
94 { 94 {
95 return _collisionMargin; 95 return _collisionMargin;
96 } 96 }
97 set 97 set
98 { 98 {
99 _collisionMargin = value; 99 _collisionMargin = value;
100 } 100 }
101 } 101 }
102 102
103 public virtual Vector3 LocalGetSupportingVertex(Vector3 vec) 103 public virtual Vector3 LocalGetSupportingVertex(Vector3 vec)
104 { 104 {
105 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec); 105 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec);
106 106
107 if (Margin != 0f) 107 if (Margin != 0f)
108 { 108 {
109 Vector3 vecnorm = vec; 109 Vector3 vecnorm = vec;
110 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 110 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
111 { 111 {
112 vecnorm = new Vector3(-1f, -1f, -1f); 112 vecnorm = new Vector3(-1f, -1f, -1f);
113 } 113 }
114 vecnorm.Normalize(); 114 vecnorm.Normalize();
115 supVertex += Margin * vecnorm; 115 supVertex += Margin * vecnorm;
116 } 116 }
117 return supVertex; 117 return supVertex;
118 } 118 }
119 119
120 public virtual void GetAabbSlow(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 120 public virtual void GetAabbSlow(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
121 { 121 {
122 float margin = Margin; 122 float margin = Margin;
123 aabbMax = new Vector3(); 123 aabbMax = new Vector3();
124 aabbMin = new Vector3(); 124 aabbMin = new Vector3();
125 125
126 for (int i = 0; i < 3; i++) 126 for (int i = 0; i < 3; i++)
127 { 127 {
128 Vector3 vec = new Vector3(0f, 0f, 0f); 128 Vector3 vec = new Vector3(0f, 0f, 0f);
129 MathHelper.SetElement(ref vec, i, 1); 129 MathHelper.SetElement(ref vec, i, 1);
130 130
131 Vector3 sv = LocalGetSupportingVertex(Vector3.TransformNormal(vec, t)); 131 Vector3 sv = LocalGetSupportingVertex(Vector3.TransformNormal(vec, t));
132 132
133 Vector3 tmp = MathHelper.MatrixToVector(t, sv); 133 Vector3 tmp = MathHelper.MatrixToVector(t, sv);
134 MathHelper.SetElement(ref aabbMax, i, MathHelper.GetElement(tmp, i) + margin); 134 MathHelper.SetElement(ref aabbMax, i, MathHelper.GetElement(tmp, i) + margin);
135 MathHelper.SetElement(ref vec, i, -1f); 135 MathHelper.SetElement(ref vec, i, -1f);
136 tmp = MathHelper.MatrixToVector(t, LocalGetSupportingVertex(Vector3.TransformNormal(vec, t))); 136 tmp = MathHelper.MatrixToVector(t, LocalGetSupportingVertex(Vector3.TransformNormal(vec, t)));
137 MathHelper.SetElement(ref aabbMin, i, MathHelper.GetElement(tmp, i) - margin); 137 MathHelper.SetElement(ref aabbMin, i, MathHelper.GetElement(tmp, i) - margin);
138 } 138 }
139 } 139 }
140 } 140 }
141} 141}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexTriangleMeshShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexTriangleMeshShape.cs
index 0fd3fa7..3e46c66 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexTriangleMeshShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/ConvexTriangleMeshShape.cs
@@ -1,185 +1,185 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// ConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use ConvexHullShape instead. 30 /// ConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use ConvexHullShape instead.
31 /// It uses the StridingMeshInterface instead of a point cloud. This can avoid the duplication of the triangle mesh data. 31 /// It uses the StridingMeshInterface instead of a point cloud. This can avoid the duplication of the triangle mesh data.
32 /// </summary> 32 /// </summary>
33 public class ConvexTriangleMeshShape : PolyhedralConvexShape 33 public class ConvexTriangleMeshShape : PolyhedralConvexShape
34 { 34 {
35 private StridingMeshInterface _stridingMesh; 35 private StridingMeshInterface _stridingMesh;
36 36
37 public ConvexTriangleMeshShape(StridingMeshInterface meshInterface) 37 public ConvexTriangleMeshShape(StridingMeshInterface meshInterface)
38 { 38 {
39 _stridingMesh = meshInterface; 39 _stridingMesh = meshInterface;
40 } 40 }
41 41
42 public StridingMeshInterface getStridingMesh() 42 public StridingMeshInterface getStridingMesh()
43 { 43 {
44 return _stridingMesh; 44 return _stridingMesh;
45 } 45 }
46 46
47 public override int VertexCount 47 public override int VertexCount
48 { 48 {
49 get 49 get
50 { 50 {
51 return 0; 51 return 0;
52 } 52 }
53 } 53 }
54 54
55 public override int EdgeCount 55 public override int EdgeCount
56 { 56 {
57 get 57 get
58 { 58 {
59 return 0; 59 return 0;
60 } 60 }
61 } 61 }
62 62
63 public override int PlaneCount 63 public override int PlaneCount
64 { 64 {
65 get 65 get
66 { 66 {
67 return 0; 67 return 0;
68 } 68 }
69 } 69 }
70 70
71 public override Vector3 LocalScaling 71 public override Vector3 LocalScaling
72 { 72 {
73 get 73 get
74 { 74 {
75 return base.LocalScaling; 75 return base.LocalScaling;
76 } 76 }
77 set 77 set
78 { 78 {
79 _stridingMesh.Scaling = value; 79 _stridingMesh.Scaling = value;
80 } 80 }
81 } 81 }
82 82
83 public override BroadphaseNativeTypes ShapeType 83 public override BroadphaseNativeTypes ShapeType
84 { 84 {
85 get 85 get
86 { 86 {
87 return BroadphaseNativeTypes.ConvexTriangleMesh; 87 return BroadphaseNativeTypes.ConvexTriangleMesh;
88 } 88 }
89 } 89 }
90 90
91 public override string Name 91 public override string Name
92 { 92 {
93 get 93 get
94 { 94 {
95 return "ConvexTrimesh"; 95 return "ConvexTrimesh";
96 } 96 }
97 } 97 }
98 98
99 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb) 99 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb)
100 { 100 {
101 pa = new Vector3(); 101 pa = new Vector3();
102 pb = new Vector3(); 102 pb = new Vector3();
103 BulletDebug.Assert(false); 103 BulletDebug.Assert(false);
104 } 104 }
105 105
106 public override void GetVertex(int i, out Vector3 vtx) 106 public override void GetVertex(int i, out Vector3 vtx)
107 { 107 {
108 vtx = new Vector3(); 108 vtx = new Vector3();
109 BulletDebug.Assert(false); 109 BulletDebug.Assert(false);
110 } 110 }
111 111
112 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i) 112 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i)
113 { 113 {
114 planeNormal = new Vector3(); 114 planeNormal = new Vector3();
115 planeSupport = new Vector3(); 115 planeSupport = new Vector3();
116 BulletDebug.Assert(false); 116 BulletDebug.Assert(false);
117 } 117 }
118 118
119 public override bool IsInside(Vector3 pt, float tolerance) 119 public override bool IsInside(Vector3 pt, float tolerance)
120 { 120 {
121 BulletDebug.Assert(false); 121 BulletDebug.Assert(false);
122 return false; 122 return false;
123 } 123 }
124 124
125 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 125 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
126 { 126 {
127 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec); 127 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec);
128 128
129 if (Margin != 0) 129 if (Margin != 0)
130 { 130 {
131 Vector3 vecnorm = vec; 131 Vector3 vecnorm = vec;
132 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 132 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
133 { 133 {
134 vecnorm = new Vector3(-1, -1, -1); 134 vecnorm = new Vector3(-1, -1, -1);
135 } 135 }
136 vecnorm = Vector3.Normalize(vecnorm); 136 vecnorm = Vector3.Normalize(vecnorm);
137 supVertex += Margin * vecnorm; 137 supVertex += Margin * vecnorm;
138 } 138 }
139 return supVertex; 139 return supVertex;
140 } 140 }
141 141
142 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec0) 142 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec0)
143 { 143 {
144 Vector3 supVec = new Vector3(); 144 Vector3 supVec = new Vector3();
145 145
146 Vector3 vec = vec0; 146 Vector3 vec = vec0;
147 float lenSqr = vec.LengthSquared(); 147 float lenSqr = vec.LengthSquared();
148 if (lenSqr < 0.0001f) 148 if (lenSqr < 0.0001f)
149 { 149 {
150 vec = new Vector3(1, 0, 0); 150 vec = new Vector3(1, 0, 0);
151 } 151 }
152 else 152 else
153 { 153 {
154 float rlen = 1f / (float)Math.Sqrt(lenSqr); 154 float rlen = 1f / (float)Math.Sqrt(lenSqr);
155 vec *= rlen; 155 vec *= rlen;
156 } 156 }
157 157
158 LocalSupportVertexCallback supportCallback = new LocalSupportVertexCallback(vec); 158 LocalSupportVertexCallback supportCallback = new LocalSupportVertexCallback(vec);
159 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 159 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
160 _stridingMesh.InternalProcessAllTriangles(supportCallback, -aabbMax, aabbMax); 160 _stridingMesh.InternalProcessAllTriangles(supportCallback, -aabbMax, aabbMax);
161 supVec = supportCallback.SupportVertexLocal; 161 supVec = supportCallback.SupportVertexLocal;
162 162
163 return supVec; 163 return supVec;
164 } 164 }
165 165
166 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 166 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
167 { 167 {
168 //use 'w' component of supportVerticesOut? 168 //use 'w' component of supportVerticesOut?
169 /*{ 169 /*{
170 for (int i = 0; i < numVectors; i++) 170 for (int i = 0; i < numVectors; i++)
171 { 171 {
172 supportVerticesOut[i][3] = -1e30f; 172 supportVerticesOut[i][3] = -1e30f;
173 } 173 }
174 }*/ 174 }*/
175 for (int j = 0; j < vectors.Length; j++) 175 for (int j = 0; j < vectors.Length; j++)
176 { 176 {
177 Vector3 vec = vectors[j]; 177 Vector3 vec = vectors[j];
178 LocalSupportVertexCallback supportCallback = new LocalSupportVertexCallback(vec); 178 LocalSupportVertexCallback supportCallback = new LocalSupportVertexCallback(vec);
179 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 179 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
180 _stridingMesh.InternalProcessAllTriangles(supportCallback, -aabbMax, aabbMax); 180 _stridingMesh.InternalProcessAllTriangles(supportCallback, -aabbMax, aabbMax);
181 supportVerticesOut[j] = supportCallback.SupportVertexLocal; 181 supportVerticesOut[j] = supportCallback.SupportVertexLocal;
182 } 182 }
183 } 183 }
184 } 184 }
185} 185}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShape.cs
index 9a86eaf..85bf769 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShape.cs
@@ -1,136 +1,136 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// implements cylinder shape interface 30 /// implements cylinder shape interface
31 /// </summary> 31 /// </summary>
32 public class CylinderShape : BoxShape 32 public class CylinderShape : BoxShape
33 { 33 {
34 public CylinderShape(Vector3 halfExtents) 34 public CylinderShape(Vector3 halfExtents)
35 : base(halfExtents) 35 : base(halfExtents)
36 { 36 {
37 } 37 }
38 38
39 public override BroadphaseNativeTypes ShapeType 39 public override BroadphaseNativeTypes ShapeType
40 { 40 {
41 get 41 get
42 { 42 {
43 return BroadphaseNativeTypes.Cylinder; 43 return BroadphaseNativeTypes.Cylinder;
44 } 44 }
45 } 45 }
46 46
47 public virtual int UpAxis 47 public virtual int UpAxis
48 { 48 {
49 get 49 get
50 { 50 {
51 return 1; 51 return 1;
52 } 52 }
53 } 53 }
54 54
55 public virtual float Radius 55 public virtual float Radius
56 { 56 {
57 get 57 get
58 { 58 {
59 return HalfExtents.Z; 59 return HalfExtents.Z;
60 } 60 }
61 } 61 }
62 62
63 //debugging 63 //debugging
64 public override string Name 64 public override string Name
65 { 65 {
66 get 66 get
67 { 67 {
68 return "CylinderY"; 68 return "CylinderY";
69 } 69 }
70 } 70 }
71 71
72 //getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version 72 //getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
73 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 73 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
74 { 74 {
75 GetAabbSlow(t, out aabbMin, out aabbMax); 75 GetAabbSlow(t, out aabbMin, out aabbMax);
76 } 76 }
77 77
78 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 78 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
79 { 79 {
80 return CylinderLocalSupportY(HalfExtents, vec); 80 return CylinderLocalSupportY(HalfExtents, vec);
81 } 81 }
82 82
83 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 83 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
84 { 84 {
85 for (int i = 0; i < vectors.Length; i++) 85 for (int i = 0; i < vectors.Length; i++)
86 { 86 {
87 supportVerticesOut[i] = CylinderLocalSupportY(HalfExtents, vectors[i]); 87 supportVerticesOut[i] = CylinderLocalSupportY(HalfExtents, vectors[i]);
88 } 88 }
89 } 89 }
90 90
91 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 91 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
92 { 92 {
93 93
94 Vector3 supVertex; 94 Vector3 supVertex;
95 supVertex = LocalGetSupportingVertexWithoutMargin(vec); 95 supVertex = LocalGetSupportingVertexWithoutMargin(vec);
96 96
97 if (Margin != 0) 97 if (Margin != 0)
98 { 98 {
99 Vector3 vecnorm = vec; 99 Vector3 vecnorm = vec;
100 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 100 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
101 { 101 {
102 vecnorm=new Vector3(-1, -1, -1); 102 vecnorm=new Vector3(-1, -1, -1);
103 } 103 }
104 vecnorm = Vector3.Normalize(vecnorm); 104 vecnorm = Vector3.Normalize(vecnorm);
105 supVertex += Margin * vecnorm; 105 supVertex += Margin * vecnorm;
106 } 106 }
107 return supVertex; 107 return supVertex;
108 } 108 }
109 109
110 private Vector3 CylinderLocalSupportY(Vector3 halfExtents, Vector3 v) 110 private Vector3 CylinderLocalSupportY(Vector3 halfExtents, Vector3 v)
111 { 111 {
112 float radius = halfExtents.X; 112 float radius = halfExtents.X;
113 float halfHeight = halfExtents.Y; 113 float halfHeight = halfExtents.Y;
114 114
115 Vector3 tmp = new Vector3(); 115 Vector3 tmp = new Vector3();
116 float d; 116 float d;
117 117
118 float s = (float)Math.Sqrt(v.X * v.X + v.Z * v.Z); 118 float s = (float)Math.Sqrt(v.X * v.X + v.Z * v.Z);
119 if (s != 0) 119 if (s != 0)
120 { 120 {
121 d = radius / s; 121 d = radius / s;
122 tmp.X = v.X * d; 122 tmp.X = v.X * d;
123 tmp.Y = v.Y < 0 ? -halfHeight : halfHeight; 123 tmp.Y = v.Y < 0 ? -halfHeight : halfHeight;
124 tmp.Z = v.Z * d; 124 tmp.Z = v.Z * d;
125 return tmp; 125 return tmp;
126 } 126 }
127 else 127 else
128 { 128 {
129 tmp.X = radius; 129 tmp.X = radius;
130 tmp.Y = v.Y < 0 ? -halfHeight : halfHeight; 130 tmp.Y = v.Y < 0 ? -halfHeight : halfHeight;
131 tmp.Z = 0; 131 tmp.Z = 0;
132 return tmp; 132 return tmp;
133 } 133 }
134 } 134 }
135 } 135 }
136} 136}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeX.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeX.cs
index 9dc8e2d..da84462 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeX.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeX.cs
@@ -1,100 +1,100 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class CylinderShapeX : CylinderShape 29 public class CylinderShapeX : CylinderShape
30 { 30 {
31 public CylinderShapeX(Vector3 halfExtents) 31 public CylinderShapeX(Vector3 halfExtents)
32 : base(halfExtents) { } 32 : base(halfExtents) { }
33 33
34 public override int UpAxis 34 public override int UpAxis
35 { 35 {
36 get 36 get
37 { 37 {
38 return 0; 38 return 0;
39 } 39 }
40 } 40 }
41 41
42 public override float Radius 42 public override float Radius
43 { 43 {
44 get 44 get
45 { 45 {
46 return HalfExtents.Y; 46 return HalfExtents.Y;
47 } 47 }
48 } 48 }
49 49
50 //debugging 50 //debugging
51 public override string Name 51 public override string Name
52 { 52 {
53 get 53 get
54 { 54 {
55 return "CylinderX"; 55 return "CylinderX";
56 } 56 }
57 } 57 }
58 58
59 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 59 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
60 { 60 {
61 return CylinderLocalSupportX(HalfExtents, vec); 61 return CylinderLocalSupportX(HalfExtents, vec);
62 } 62 }
63 63
64 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 64 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
65 { 65 {
66 for (int i = 0; i < vectors.Length; i++) 66 for (int i = 0; i < vectors.Length; i++)
67 { 67 {
68 supportVerticesOut[i] = CylinderLocalSupportX(HalfExtents, vectors[i]); 68 supportVerticesOut[i] = CylinderLocalSupportX(HalfExtents, vectors[i]);
69 } 69 }
70 } 70 }
71 71
72 private Vector3 CylinderLocalSupportX(Vector3 halfExtents, Vector3 v) 72 private Vector3 CylinderLocalSupportX(Vector3 halfExtents, Vector3 v)
73 { 73 {
74 //mapping depends on how cylinder local orientation is 74 //mapping depends on how cylinder local orientation is
75 // extents of the cylinder is: X,Y is for radius, and Z for height 75 // extents of the cylinder is: X,Y is for radius, and Z for height
76 float radius = halfExtents.Y; 76 float radius = halfExtents.Y;
77 float halfHeight = halfExtents.X; 77 float halfHeight = halfExtents.X;
78 78
79 Vector3 tmp = new Vector3(); 79 Vector3 tmp = new Vector3();
80 float d; 80 float d;
81 81
82 float s = (float)Math.Sqrt(v.Y * v.Y + v.Z * v.Z); 82 float s = (float)Math.Sqrt(v.Y * v.Y + v.Z * v.Z);
83 if (s != 0) 83 if (s != 0)
84 { 84 {
85 d = radius / s; 85 d = radius / s;
86 tmp.Y = v.Y * d; 86 tmp.Y = v.Y * d;
87 tmp.X = v.X < 0 ? -halfHeight : halfHeight; 87 tmp.X = v.X < 0 ? -halfHeight : halfHeight;
88 tmp.Z = v.Z * d; 88 tmp.Z = v.Z * d;
89 return tmp; 89 return tmp;
90 } 90 }
91 else 91 else
92 { 92 {
93 tmp.Y = radius; 93 tmp.Y = radius;
94 tmp.X = v.X < 0 ? -halfHeight : halfHeight; 94 tmp.X = v.X < 0 ? -halfHeight : halfHeight;
95 tmp.Z = 0; 95 tmp.Z = 0;
96 return tmp; 96 return tmp;
97 } 97 }
98 } 98 }
99 } 99 }
100} 100}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeZ.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeZ.cs
index 1913e9c..10a1995 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeZ.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/CylinderShapeZ.cs
@@ -1,100 +1,100 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class CylinderShapeZ : CylinderShape 29 public class CylinderShapeZ : CylinderShape
30 { 30 {
31 public CylinderShapeZ(Vector3 halfExtents) 31 public CylinderShapeZ(Vector3 halfExtents)
32 : base(halfExtents) { } 32 : base(halfExtents) { }
33 33
34 public override int UpAxis 34 public override int UpAxis
35 { 35 {
36 get 36 get
37 { 37 {
38 return 2; 38 return 2;
39 } 39 }
40 } 40 }
41 41
42 public override float Radius 42 public override float Radius
43 { 43 {
44 get 44 get
45 { 45 {
46 return HalfExtents.X; 46 return HalfExtents.X;
47 } 47 }
48 } 48 }
49 49
50 //debugging 50 //debugging
51 public override string Name 51 public override string Name
52 { 52 {
53 get 53 get
54 { 54 {
55 return "CylinderZ"; 55 return "CylinderZ";
56 } 56 }
57 } 57 }
58 58
59 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 59 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
60 { 60 {
61 return CylinderLocalSupportZ(HalfExtents, vec); 61 return CylinderLocalSupportZ(HalfExtents, vec);
62 } 62 }
63 63
64 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 64 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
65 { 65 {
66 for (int i = 0; i < vectors.Length; i++) 66 for (int i = 0; i < vectors.Length; i++)
67 { 67 {
68 supportVerticesOut[i] = CylinderLocalSupportZ(HalfExtents, vectors[i]); 68 supportVerticesOut[i] = CylinderLocalSupportZ(HalfExtents, vectors[i]);
69 } 69 }
70 } 70 }
71 71
72 Vector3 CylinderLocalSupportZ(Vector3 halfExtents, Vector3 v) 72 Vector3 CylinderLocalSupportZ(Vector3 halfExtents, Vector3 v)
73 { 73 {
74 //mapping depends on how cylinder local orientation is 74 //mapping depends on how cylinder local orientation is
75 // extents of the cylinder is: X,Y is for radius, and Z for height 75 // extents of the cylinder is: X,Y is for radius, and Z for height
76 float radius = halfExtents.X; 76 float radius = halfExtents.X;
77 float halfHeight = halfExtents.Z; 77 float halfHeight = halfExtents.Z;
78 78
79 Vector3 tmp = new Vector3(); 79 Vector3 tmp = new Vector3();
80 float d; 80 float d;
81 81
82 float s = (float)Math.Sqrt(v.X * v.X + v.Y * v.Y); 82 float s = (float)Math.Sqrt(v.X * v.X + v.Y * v.Y);
83 if (s != 0) 83 if (s != 0)
84 { 84 {
85 d = radius / s; 85 d = radius / s;
86 tmp.X = v.X * d; 86 tmp.X = v.X * d;
87 tmp.Z = v.Z < 0 ? -halfHeight : halfHeight; 87 tmp.Z = v.Z < 0 ? -halfHeight : halfHeight;
88 tmp.Y = v.Y * d; 88 tmp.Y = v.Y * d;
89 return tmp; 89 return tmp;
90 } 90 }
91 else 91 else
92 { 92 {
93 tmp.X = radius; 93 tmp.X = radius;
94 tmp.Z = v.Z < 0 ? -halfHeight : halfHeight; 94 tmp.Z = v.Z < 0 ? -halfHeight : halfHeight;
95 tmp.Y = 0; 95 tmp.Y = 0;
96 return tmp; 96 return tmp;
97 } 97 }
98 } 98 }
99 } 99 }
100} 100}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/EmptyShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/EmptyShape.cs
index b094c39..ef6f134 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/EmptyShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/EmptyShape.cs
@@ -1,80 +1,80 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26using System.Diagnostics; 26using System.Diagnostics;
27 27
28namespace XnaDevRu.BulletX 28namespace XnaDevRu.BulletX
29{ 29{
30 public class EmptyShape : ConcaveShape 30 public class EmptyShape : ConcaveShape
31 { 31 {
32 private Vector3 _localScaling; 32 private Vector3 _localScaling;
33 33
34 public override string Name 34 public override string Name
35 { 35 {
36 get 36 get
37 { 37 {
38 return "Empty"; 38 return "Empty";
39 } 39 }
40 } 40 }
41 41
42 public override BroadphaseNativeTypes ShapeType 42 public override BroadphaseNativeTypes ShapeType
43 { 43 {
44 get 44 get
45 { 45 {
46 return BroadphaseNativeTypes.Empty; 46 return BroadphaseNativeTypes.Empty;
47 } 47 }
48 } 48 }
49 49
50 public override Vector3 LocalScaling 50 public override Vector3 LocalScaling
51 { 51 {
52 get 52 get
53 { 53 {
54 return _localScaling; 54 return _localScaling;
55 } 55 }
56 set 56 set
57 { 57 {
58 _localScaling = value; 58 _localScaling = value;
59 } 59 }
60 } 60 }
61 61
62 public override void ProcessAllTriangles(ITriangleCallback callback, MonoXnaCompactMaths.Vector3 aabbMin, MonoXnaCompactMaths.Vector3 aabbMax) 62 public override void ProcessAllTriangles(ITriangleCallback callback, MonoXnaCompactMaths.Vector3 aabbMin, MonoXnaCompactMaths.Vector3 aabbMax)
63 { 63 {
64 throw new Exception("The method or operation is not implemented."); 64 throw new Exception("The method or operation is not implemented.");
65 } 65 }
66 66
67 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 67 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
68 { 68 {
69 Vector3 margin = new Vector3(Margin, Margin, Margin); 69 Vector3 margin = new Vector3(Margin, Margin, Margin);
70 aabbMin = t.Translation - margin; 70 aabbMin = t.Translation - margin;
71 aabbMax = t.Translation + margin; 71 aabbMax = t.Translation + margin;
72 } 72 }
73 73
74 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 74 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
75 { 75 {
76 inertia = new Vector3(); 76 inertia = new Vector3();
77 BulletDebug.Assert(false); 77 BulletDebug.Assert(false);
78 } 78 }
79 } 79 }
80} 80}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/FilteredCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/FilteredCallback.cs
index 5073096..dffd865 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/FilteredCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/FilteredCallback.cs
@@ -1,55 +1,55 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class FilteredCallback : ITriangleIndexCallback 29 public class FilteredCallback : ITriangleIndexCallback
30 { 30 {
31 private ITriangleCallback _callback; 31 private ITriangleCallback _callback;
32 private Vector3 _aabbMin; 32 private Vector3 _aabbMin;
33 private Vector3 _aabbMax; 33 private Vector3 _aabbMax;
34 34
35 public FilteredCallback(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) 35 public FilteredCallback(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax)
36 { 36 {
37 _callback = callback; 37 _callback = callback;
38 _aabbMin = aabbMin; 38 _aabbMin = aabbMin;
39 _aabbMax = aabbMax; 39 _aabbMax = aabbMax;
40 } 40 }
41 41
42 public ITriangleCallback TriangleCallback { get { return _callback; } set { _callback = value; } } 42 public ITriangleCallback TriangleCallback { get { return _callback; } set { _callback = value; } }
43 public Vector3 AabbMin { get { return _aabbMin; } set { _aabbMin = value; } } 43 public Vector3 AabbMin { get { return _aabbMin; } set { _aabbMin = value; } }
44 public Vector3 AabbMax { get { return _aabbMax; } set { _aabbMax = value; } } 44 public Vector3 AabbMax { get { return _aabbMax; } set { _aabbMax = value; } }
45 45
46 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex) 46 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex)
47 { 47 {
48 if (MathHelper.TestTriangleAgainstAabb2(triangle, _aabbMin, _aabbMax)) 48 if (MathHelper.TestTriangleAgainstAabb2(triangle, _aabbMin, _aabbMax))
49 { 49 {
50 //check aabb in triangle-space, before doing this 50 //check aabb in triangle-space, before doing this
51 _callback.ProcessTriangle(triangle, partId, triangleIndex); 51 _callback.ProcessTriangle(triangle, partId, triangleIndex);
52 } 52 }
53 } 53 }
54 } 54 }
55} 55}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/InternalTriangleIndexCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/InternalTriangleIndexCallback.cs
index b88d804..51c65b7 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/InternalTriangleIndexCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/InternalTriangleIndexCallback.cs
@@ -1,33 +1,33 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public interface ITriangleIndexCallback 29 public interface ITriangleIndexCallback
30 { 30 {
31 void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex); 31 void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex);
32 } 32 }
33} 33}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/LocalSupportVertexCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/LocalSupportVertexCallback.cs
index 951707d..1e5e141 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/LocalSupportVertexCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/LocalSupportVertexCallback.cs
@@ -1,58 +1,58 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class LocalSupportVertexCallback : ITriangleIndexCallback 29 public class LocalSupportVertexCallback : ITriangleIndexCallback
30 { 30 {
31 private Vector3 _supportVertexLocal; 31 private Vector3 _supportVertexLocal;
32 private float _maxDot; 32 private float _maxDot;
33 private Vector3 _supportVecLocal; 33 private Vector3 _supportVecLocal;
34 34
35 public LocalSupportVertexCallback(Vector3 supportVecLocal) 35 public LocalSupportVertexCallback(Vector3 supportVecLocal)
36 { 36 {
37 _supportVertexLocal = new Vector3(); 37 _supportVertexLocal = new Vector3();
38 _maxDot = -1e30f; 38 _maxDot = -1e30f;
39 _supportVecLocal = supportVecLocal; 39 _supportVecLocal = supportVecLocal;
40 } 40 }
41 41
42 public float MaxDot { get { return _maxDot; } set { _maxDot = value; } } 42 public float MaxDot { get { return _maxDot; } set { _maxDot = value; } }
43 public Vector3 SupportVertexLocal { get { return _supportVecLocal; } set { _supportVecLocal = value; } } 43 public Vector3 SupportVertexLocal { get { return _supportVecLocal; } set { _supportVecLocal = value; } }
44 44
45 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex) 45 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex)
46 { 46 {
47 for (int i = 0; i < 3; i++) 47 for (int i = 0; i < 3; i++)
48 { 48 {
49 float dot = Vector3.Dot(_supportVecLocal, triangle[i]); 49 float dot = Vector3.Dot(_supportVecLocal, triangle[i]);
50 if (dot > _maxDot) 50 if (dot > _maxDot)
51 { 51 {
52 _maxDot = dot; 52 _maxDot = dot;
53 _supportVertexLocal = triangle[i]; 53 _supportVertexLocal = triangle[i];
54 } 54 }
55 } 55 }
56 } 56 }
57 } 57 }
58} 58}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MinkowskiSumShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MinkowskiSumShape.cs
index 6f70cae..8cdcfbe 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MinkowskiSumShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MinkowskiSumShape.cs
@@ -1,99 +1,99 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// MinkowskiSumShape represents implicit (getSupportingVertex) based minkowski sum of two convex implicit shapes. 30 /// MinkowskiSumShape represents implicit (getSupportingVertex) based minkowski sum of two convex implicit shapes.
31 /// </summary> 31 /// </summary>
32 public class MinkowskiSumShape : ConvexShape 32 public class MinkowskiSumShape : ConvexShape
33 { 33 {
34 private Matrix _transformA; 34 private Matrix _transformA;
35 private Matrix _transformB; 35 private Matrix _transformB;
36 private ConvexShape _shapeA; 36 private ConvexShape _shapeA;
37 private ConvexShape _shapeB; 37 private ConvexShape _shapeB;
38 38
39 public MinkowskiSumShape(ConvexShape shapeA, ConvexShape shapeB) 39 public MinkowskiSumShape(ConvexShape shapeA, ConvexShape shapeB)
40 { 40 {
41 _shapeA = shapeA; 41 _shapeA = shapeA;
42 _shapeB = shapeB; 42 _shapeB = shapeB;
43 _transformA = Matrix.Identity; 43 _transformA = Matrix.Identity;
44 _transformB = Matrix.Identity; 44 _transformB = Matrix.Identity;
45 } 45 }
46 46
47 public Matrix TransformA { get { return _transformA; } set { _transformA = value; } } 47 public Matrix TransformA { get { return _transformA; } set { _transformA = value; } }
48 public Matrix TransformB { get { return _transformB; } set { _transformB = value; } } 48 public Matrix TransformB { get { return _transformB; } set { _transformB = value; } }
49 public ConvexShape ShapeA { get { return _shapeA; } } 49 public ConvexShape ShapeA { get { return _shapeA; } }
50 public ConvexShape ShapeB { get { return _shapeB; } } 50 public ConvexShape ShapeB { get { return _shapeB; } }
51 51
52 public override float Margin 52 public override float Margin
53 { 53 {
54 get 54 get
55 { 55 {
56 return _shapeA.Margin + _shapeB.Margin; 56 return _shapeA.Margin + _shapeB.Margin;
57 } 57 }
58 set 58 set
59 { 59 {
60 base.Margin = value; 60 base.Margin = value;
61 } 61 }
62 } 62 }
63 63
64 public override BroadphaseNativeTypes ShapeType 64 public override BroadphaseNativeTypes ShapeType
65 { 65 {
66 get 66 get
67 { 67 {
68 return BroadphaseNativeTypes.MinkowskiDifference; 68 return BroadphaseNativeTypes.MinkowskiDifference;
69 } 69 }
70 } 70 }
71 71
72 public override string Name 72 public override string Name
73 { 73 {
74 get 74 get
75 { 75 {
76 return "MinkowskiSum"; 76 return "MinkowskiSum";
77 } 77 }
78 } 78 }
79 79
80 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 80 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
81 { 81 {
82 Vector3 supVertexA = MathHelper.MatrixToVector(_transformA, _shapeA.LocalGetSupportingVertexWithoutMargin(Vector3.TransformNormal(vec, _transformA))); 82 Vector3 supVertexA = MathHelper.MatrixToVector(_transformA, _shapeA.LocalGetSupportingVertexWithoutMargin(Vector3.TransformNormal(vec, _transformA)));
83 Vector3 supVertexB = MathHelper.MatrixToVector(_transformB, _shapeB.LocalGetSupportingVertexWithoutMargin(Vector3.TransformNormal(vec, _transformB))); 83 Vector3 supVertexB = MathHelper.MatrixToVector(_transformB, _shapeB.LocalGetSupportingVertexWithoutMargin(Vector3.TransformNormal(vec, _transformB)));
84 return supVertexA + supVertexB; 84 return supVertexA + supVertexB;
85 } 85 }
86 86
87 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 87 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
88 { 88 {
89 for (int i = 0; i < vectors.Length; i++) 89 for (int i = 0; i < vectors.Length; i++)
90 supportVerticesOut[i] = LocalGetSupportingVertexWithoutMargin(vectors[i]); 90 supportVerticesOut[i] = LocalGetSupportingVertexWithoutMargin(vectors[i]);
91 } 91 }
92 92
93 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 93 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
94 { 94 {
95 inertia = new Vector3(); 95 inertia = new Vector3();
96 BulletDebug.Assert(false); 96 BulletDebug.Assert(false);
97 } 97 }
98 } 98 }
99} 99}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MultiSphereShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MultiSphereShape.cs
index 9959c01..73fd094 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MultiSphereShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/MultiSphereShape.cs
@@ -1,154 +1,154 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// MultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex) 30 /// MultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex)
31 /// </summary> 31 /// </summary>
32 public class MultiSphereShape : ConvexShape 32 public class MultiSphereShape : ConvexShape
33 { 33 {
34 private const int _maxNumSpheres = 5; 34 private const int _maxNumSpheres = 5;
35 private Vector3[] _localPositions = new Vector3[MaxNumSpheres]; 35 private Vector3[] _localPositions = new Vector3[MaxNumSpheres];
36 private float[] _radi = new float[MaxNumSpheres]; 36 private float[] _radi = new float[MaxNumSpheres];
37 private Vector3 _inertiaHalfExtents; 37 private Vector3 _inertiaHalfExtents;
38 38
39 private int m_numSpheres; 39 private int m_numSpheres;
40 40
41 public MultiSphereShape(Vector3 inertiaHalfExtents, Vector3[] positions, float[] radi, int numSpheres) 41 public MultiSphereShape(Vector3 inertiaHalfExtents, Vector3[] positions, float[] radi, int numSpheres)
42 { 42 {
43 _inertiaHalfExtents = inertiaHalfExtents; 43 _inertiaHalfExtents = inertiaHalfExtents;
44 float startMargin = 1e30f; 44 float startMargin = 1e30f;
45 45
46 m_numSpheres = numSpheres; 46 m_numSpheres = numSpheres;
47 for (int i = 0; i < m_numSpheres; i++) 47 for (int i = 0; i < m_numSpheres; i++)
48 { 48 {
49 _localPositions[i] = positions[i]; 49 _localPositions[i] = positions[i];
50 _radi[i] = radi[i]; 50 _radi[i] = radi[i];
51 if (radi[i] < startMargin) 51 if (radi[i] < startMargin)
52 startMargin = radi[i]; 52 startMargin = radi[i];
53 } 53 }
54 Margin = startMargin; 54 Margin = startMargin;
55 } 55 }
56 56
57 public static int MaxNumSpheres { get { return _maxNumSpheres; } } 57 public static int MaxNumSpheres { get { return _maxNumSpheres; } }
58 58
59 public override BroadphaseNativeTypes ShapeType 59 public override BroadphaseNativeTypes ShapeType
60 { 60 {
61 get 61 get
62 { 62 {
63 return BroadphaseNativeTypes.MultiSphere; 63 return BroadphaseNativeTypes.MultiSphere;
64 } 64 }
65 } 65 }
66 66
67 public override string Name 67 public override string Name
68 { 68 {
69 get 69 get
70 { 70 {
71 return "MultiSphere"; 71 return "MultiSphere";
72 } 72 }
73 } 73 }
74 74
75 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vecA) 75 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vecA)
76 { 76 {
77 Vector3 supVec = new Vector3(); 77 Vector3 supVec = new Vector3();
78 78
79 float maxDot = -1e30f; 79 float maxDot = -1e30f;
80 80
81 81
82 Vector3 vec = vecA; 82 Vector3 vec = vecA;
83 float lenSqr = vec.LengthSquared(); 83 float lenSqr = vec.LengthSquared();
84 if (lenSqr < 0.0001f) 84 if (lenSqr < 0.0001f)
85 { 85 {
86 vec = new Vector3(1, 0, 0); 86 vec = new Vector3(1, 0, 0);
87 } 87 }
88 else 88 else
89 { 89 {
90 float rlen = 1f / (float)Math.Sqrt(lenSqr); 90 float rlen = 1f / (float)Math.Sqrt(lenSqr);
91 vec *= rlen; 91 vec *= rlen;
92 } 92 }
93 93
94 Vector3 vtx; 94 Vector3 vtx;
95 float newDot; 95 float newDot;
96 96
97 for (int i = 0; i < m_numSpheres; i++) 97 for (int i = 0; i < m_numSpheres; i++)
98 { 98 {
99 vtx = _localPositions[i] + vec * LocalScaling * _radi[i] - vec * Margin; 99 vtx = _localPositions[i] + vec * LocalScaling * _radi[i] - vec * Margin;
100 newDot = Vector3.Dot(vec, vtx); 100 newDot = Vector3.Dot(vec, vtx);
101 if (newDot > maxDot) 101 if (newDot > maxDot)
102 { 102 {
103 maxDot = newDot; 103 maxDot = newDot;
104 supVec = vtx; 104 supVec = vtx;
105 } 105 }
106 } 106 }
107 107
108 return supVec; 108 return supVec;
109 } 109 }
110 110
111 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 111 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
112 { 112 {
113 for (int j = 0; j < vectors.Length; j++) 113 for (int j = 0; j < vectors.Length; j++)
114 { 114 {
115 float maxDot = -1e30f; 115 float maxDot = -1e30f;
116 Vector3 vtx; 116 Vector3 vtx;
117 float newDot; 117 float newDot;
118 118
119 for (int i = 0; i < m_numSpheres; i++) 119 for (int i = 0; i < m_numSpheres; i++)
120 { 120 {
121 vtx = _localPositions[i] + vectors[j] * LocalScaling * _radi[i] - vectors[j] * Margin; 121 vtx = _localPositions[i] + vectors[j] * LocalScaling * _radi[i] - vectors[j] * Margin;
122 newDot = Vector3.Dot(vectors[j], vtx); 122 newDot = Vector3.Dot(vectors[j], vtx);
123 if (newDot > maxDot) 123 if (newDot > maxDot)
124 { 124 {
125 maxDot = newDot; 125 maxDot = newDot;
126 supportVerticesOut[j] = vtx; 126 supportVerticesOut[j] = vtx;
127 } 127 }
128 } 128 }
129 } 129 }
130 } 130 }
131 131
132 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 132 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
133 { 133 {
134 //as an approximation, take the inertia of the box that bounds the spheres 134 //as an approximation, take the inertia of the box that bounds the spheres
135 Matrix ident = Matrix.Identity; 135 Matrix ident = Matrix.Identity;
136 Vector3 halfExtents = _inertiaHalfExtents; 136 Vector3 halfExtents = _inertiaHalfExtents;
137 137
138 float margin = ConvexDistanceMargin; 138 float margin = ConvexDistanceMargin;
139 139
140 float lx = 2f * (halfExtents.X + margin); 140 float lx = 2f * (halfExtents.X + margin);
141 float ly = 2f * (halfExtents.Y + margin); 141 float ly = 2f * (halfExtents.Y + margin);
142 float lz = 2f * (halfExtents.Z + margin); 142 float lz = 2f * (halfExtents.Z + margin);
143 float x2 = lx * lx; 143 float x2 = lx * lx;
144 float y2 = ly * ly; 144 float y2 = ly * ly;
145 float z2 = lz * lz; 145 float z2 = lz * lz;
146 float scaledmass = mass * 0.08333333f; 146 float scaledmass = mass * 0.08333333f;
147 147
148 inertia = new Vector3(); 148 inertia = new Vector3();
149 inertia.X = scaledmass * (y2 + z2); 149 inertia.X = scaledmass * (y2 + z2);
150 inertia.Y = scaledmass * (x2 + z2); 150 inertia.Y = scaledmass * (x2 + z2);
151 inertia.Z = scaledmass * (x2 + y2); 151 inertia.Z = scaledmass * (x2 + y2);
152 } 152 }
153 } 153 }
154} 154}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/NodeOverlapCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/NodeOverlapCallback.cs
index fac344e..324cdbc 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/NodeOverlapCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/NodeOverlapCallback.cs
@@ -1,32 +1,32 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX 26namespace XnaDevRu.BulletX
27{ 27{
28 public interface INodeOverlapCallback 28 public interface INodeOverlapCallback
29 { 29 {
30 void ProcessNode(OptimizedBvhNode node); 30 void ProcessNode(OptimizedBvhNode node);
31 } 31 }
32} 32}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvh.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvh.cs
index c22c990..5b7a5e4 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvh.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvh.cs
@@ -1,293 +1,293 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// OptimizedBvh store an AABB tree that can be quickly traversed on CPU (and SPU,GPU in future) 30 /// OptimizedBvh store an AABB tree that can be quickly traversed on CPU (and SPU,GPU in future)
31 /// </summary> 31 /// </summary>
32 public class OptimizedBvh 32 public class OptimizedBvh
33 { 33 {
34 private static int _maxIterations = 0; 34 private static int _maxIterations = 0;
35 private OptimizedBvhNode _rootNode; 35 private OptimizedBvhNode _rootNode;
36 36
37 private OptimizedBvhNode[] _contiguousNodes; 37 private OptimizedBvhNode[] _contiguousNodes;
38 private int _curNodeIndex; 38 private int _curNodeIndex;
39 39
40 private List<OptimizedBvhNode> _leafNodes = new List<OptimizedBvhNode>(); 40 private List<OptimizedBvhNode> _leafNodes = new List<OptimizedBvhNode>();
41 41
42 public OptimizedBvh() { } 42 public OptimizedBvh() { }
43 43
44 public void Build(StridingMeshInterface triangles) 44 public void Build(StridingMeshInterface triangles)
45 { 45 {
46 NodeTriangleCallback callback = new NodeTriangleCallback(_leafNodes); 46 NodeTriangleCallback callback = new NodeTriangleCallback(_leafNodes);
47 47
48 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); 48 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f);
49 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 49 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
50 50
51 triangles.InternalProcessAllTriangles(callback, aabbMin, aabbMax); 51 triangles.InternalProcessAllTriangles(callback, aabbMin, aabbMax);
52 52
53 //now we have an array of leafnodes in m_leafNodes 53 //now we have an array of leafnodes in m_leafNodes
54 _contiguousNodes = new OptimizedBvhNode[2 * _leafNodes.Count]; 54 _contiguousNodes = new OptimizedBvhNode[2 * _leafNodes.Count];
55 for (int i = 0; i < _contiguousNodes.Length; i++) 55 for (int i = 0; i < _contiguousNodes.Length; i++)
56 _contiguousNodes[i] = new OptimizedBvhNode(); 56 _contiguousNodes[i] = new OptimizedBvhNode();
57 _curNodeIndex = 0; 57 _curNodeIndex = 0;
58 58
59 _rootNode = BuildTree(_leafNodes, 0, _leafNodes.Count); 59 _rootNode = BuildTree(_leafNodes, 0, _leafNodes.Count);
60 } 60 }
61 61
62 public OptimizedBvhNode BuildTree(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex) 62 public OptimizedBvhNode BuildTree(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex)
63 { 63 {
64 OptimizedBvhNode internalNode; 64 OptimizedBvhNode internalNode;
65 65
66 int splitAxis, splitIndex, i; 66 int splitAxis, splitIndex, i;
67 int numIndices = endIndex - startIndex; 67 int numIndices = endIndex - startIndex;
68 int curIndex = _curNodeIndex; 68 int curIndex = _curNodeIndex;
69 69
70 if (numIndices <= 0) 70 if (numIndices <= 0)
71 throw new BulletException(); 71 throw new BulletException();
72 72
73 if (numIndices == 1) 73 if (numIndices == 1)
74 { 74 {
75 _contiguousNodes[_curNodeIndex++] = leafNodes[startIndex]; 75 _contiguousNodes[_curNodeIndex++] = leafNodes[startIndex];
76 //return new (&m_contiguousNodes[m_curNodeIndex++]) btOptimizedBvhNode(leafNodes[startIndex]); 76 //return new (&m_contiguousNodes[m_curNodeIndex++]) btOptimizedBvhNode(leafNodes[startIndex]);
77 return leafNodes[startIndex]; 77 return leafNodes[startIndex];
78 } 78 }
79 79
80 //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'. 80 //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'.
81 splitAxis = CalculateSplittingAxis(leafNodes, startIndex, endIndex); 81 splitAxis = CalculateSplittingAxis(leafNodes, startIndex, endIndex);
82 82
83 splitIndex = SortAndCalculateSplittingIndex(leafNodes, startIndex, endIndex, splitAxis); 83 splitIndex = SortAndCalculateSplittingIndex(leafNodes, startIndex, endIndex, splitAxis);
84 84
85 internalNode = _contiguousNodes[_curNodeIndex++]; 85 internalNode = _contiguousNodes[_curNodeIndex++];
86 86
87 internalNode.AabbMax = new Vector3(-1e30f, -1e30f, -1e30f); 87 internalNode.AabbMax = new Vector3(-1e30f, -1e30f, -1e30f);
88 internalNode.AabbMin = new Vector3(1e30f, 1e30f, 1e30f); 88 internalNode.AabbMin = new Vector3(1e30f, 1e30f, 1e30f);
89 89
90 for (i = startIndex; i < endIndex; i++) 90 for (i = startIndex; i < endIndex; i++)
91 { 91 {
92 internalNode.AabbMax = MathHelper.SetMax(internalNode.AabbMax, leafNodes[i].AabbMax); 92 internalNode.AabbMax = MathHelper.SetMax(internalNode.AabbMax, leafNodes[i].AabbMax);
93 internalNode.AabbMin = MathHelper.SetMin(internalNode.AabbMin, leafNodes[i].AabbMin); 93 internalNode.AabbMin = MathHelper.SetMin(internalNode.AabbMin, leafNodes[i].AabbMin);
94 } 94 }
95 95
96 //internalNode->m_escapeIndex; 96 //internalNode->m_escapeIndex;
97 internalNode.LeftChild = BuildTree(leafNodes, startIndex, splitIndex); 97 internalNode.LeftChild = BuildTree(leafNodes, startIndex, splitIndex);
98 internalNode.RightChild = BuildTree(leafNodes, splitIndex, endIndex); 98 internalNode.RightChild = BuildTree(leafNodes, splitIndex, endIndex);
99 99
100 internalNode.EscapeIndex = _curNodeIndex - curIndex; 100 internalNode.EscapeIndex = _curNodeIndex - curIndex;
101 return internalNode; 101 return internalNode;
102 } 102 }
103 103
104 public int CalculateSplittingAxis(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex) 104 public int CalculateSplittingAxis(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex)
105 { 105 {
106 Vector3 means = new Vector3(); 106 Vector3 means = new Vector3();
107 Vector3 variance = new Vector3(); 107 Vector3 variance = new Vector3();
108 int numIndices = endIndex - startIndex; 108 int numIndices = endIndex - startIndex;
109 109
110 for (int i = startIndex; i < endIndex; i++) 110 for (int i = startIndex; i < endIndex; i++)
111 { 111 {
112 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin); 112 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin);
113 means += center; 113 means += center;
114 } 114 }
115 means *= (1f / (float)numIndices); 115 means *= (1f / (float)numIndices);
116 116
117 for (int i = startIndex; i < endIndex; i++) 117 for (int i = startIndex; i < endIndex; i++)
118 { 118 {
119 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin); 119 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin);
120 Vector3 diff2 = center - means; 120 Vector3 diff2 = center - means;
121 diff2 = diff2 * diff2; 121 diff2 = diff2 * diff2;
122 variance += diff2; 122 variance += diff2;
123 } 123 }
124 variance *= (1f / ((float)numIndices - 1)); 124 variance *= (1f / ((float)numIndices - 1));
125 125
126 return MathHelper.MaxAxis(variance); 126 return MathHelper.MaxAxis(variance);
127 } 127 }
128 128
129 public int SortAndCalculateSplittingIndex(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex, int splitAxis) 129 public int SortAndCalculateSplittingIndex(List<OptimizedBvhNode> leafNodes, int startIndex, int endIndex, int splitAxis)
130 { 130 {
131 int splitIndex = startIndex; 131 int splitIndex = startIndex;
132 int numIndices = endIndex - startIndex; 132 int numIndices = endIndex - startIndex;
133 float splitValue; 133 float splitValue;
134 134
135 Vector3 means = new Vector3(); 135 Vector3 means = new Vector3();
136 for (int i = startIndex; i < endIndex; i++) 136 for (int i = startIndex; i < endIndex; i++)
137 { 137 {
138 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin); 138 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin);
139 means += center; 139 means += center;
140 } 140 }
141 means *= (1f / (float)numIndices); 141 means *= (1f / (float)numIndices);
142 142
143 if (splitAxis == 0) 143 if (splitAxis == 0)
144 splitValue = means.X; 144 splitValue = means.X;
145 else if (splitAxis == 1) 145 else if (splitAxis == 1)
146 splitValue = means.Y; 146 splitValue = means.Y;
147 else if (splitAxis == 2) 147 else if (splitAxis == 2)
148 splitValue = means.Z; 148 splitValue = means.Z;
149 else 149 else
150 throw new ArgumentException(); 150 throw new ArgumentException();
151 151
152 //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'. 152 //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
153 for (int i = startIndex; i < endIndex; i++) 153 for (int i = startIndex; i < endIndex; i++)
154 { 154 {
155 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin); 155 Vector3 center = 0.5f * (leafNodes[i].AabbMax + leafNodes[i].AabbMin);
156 float centerSplit; 156 float centerSplit;
157 157
158 if (splitAxis == 0) 158 if (splitAxis == 0)
159 centerSplit = means.X; 159 centerSplit = means.X;
160 else if (splitAxis == 1) 160 else if (splitAxis == 1)
161 centerSplit = means.Y; 161 centerSplit = means.Y;
162 else if (splitAxis == 2) 162 else if (splitAxis == 2)
163 centerSplit = means.Z; 163 centerSplit = means.Z;
164 else 164 else
165 throw new ArgumentException(); 165 throw new ArgumentException();
166 166
167 if (centerSplit > splitValue) 167 if (centerSplit > splitValue)
168 { 168 {
169 //swap 169 //swap
170 OptimizedBvhNode tmp = leafNodes[i]; 170 OptimizedBvhNode tmp = leafNodes[i];
171 leafNodes[i] = leafNodes[splitIndex]; 171 leafNodes[i] = leafNodes[splitIndex];
172 leafNodes[splitIndex] = tmp; 172 leafNodes[splitIndex] = tmp;
173 splitIndex++; 173 splitIndex++;
174 } 174 }
175 } 175 }
176 if ((splitIndex == startIndex) || (splitIndex == (endIndex - 1))) 176 if ((splitIndex == startIndex) || (splitIndex == (endIndex - 1)))
177 { 177 {
178 splitIndex = startIndex + (numIndices >> 1); 178 splitIndex = startIndex + (numIndices >> 1);
179 } 179 }
180 return splitIndex; 180 return splitIndex;
181 } 181 }
182 182
183 public void WalkTree(OptimizedBvhNode rootNode, INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) 183 public void WalkTree(OptimizedBvhNode rootNode, INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax)
184 { 184 {
185 bool isLeafNode, aabbOverlap = MathHelper.TestAabbAgainstAabb2(aabbMin, aabbMax, rootNode.AabbMin, rootNode.AabbMax); 185 bool isLeafNode, aabbOverlap = MathHelper.TestAabbAgainstAabb2(aabbMin, aabbMax, rootNode.AabbMin, rootNode.AabbMax);
186 if (aabbOverlap) 186 if (aabbOverlap)
187 { 187 {
188 isLeafNode = (rootNode.LeftChild == null && rootNode.RightChild == null); 188 isLeafNode = (rootNode.LeftChild == null && rootNode.RightChild == null);
189 if (isLeafNode) 189 if (isLeafNode)
190 { 190 {
191 nodeCallback.ProcessNode(rootNode); 191 nodeCallback.ProcessNode(rootNode);
192 } 192 }
193 else 193 else
194 { 194 {
195 WalkTree(rootNode.LeftChild, nodeCallback, aabbMin, aabbMax); 195 WalkTree(rootNode.LeftChild, nodeCallback, aabbMin, aabbMax);
196 WalkTree(rootNode.RightChild, nodeCallback, aabbMin, aabbMax); 196 WalkTree(rootNode.RightChild, nodeCallback, aabbMin, aabbMax);
197 } 197 }
198 } 198 }
199 } 199 }
200 200
201 public void WalkStacklessTree(OptimizedBvhNode[] rootNodeArray, INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) 201 public void WalkStacklessTree(OptimizedBvhNode[] rootNodeArray, INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax)
202 { 202 {
203 int escapeIndex, curIndex = 0; 203 int escapeIndex, curIndex = 0;
204 int walkIterations = 0; 204 int walkIterations = 0;
205 bool aabbOverlap, isLeafNode; 205 bool aabbOverlap, isLeafNode;
206 int rootNodeIndex = 0; 206 int rootNodeIndex = 0;
207 OptimizedBvhNode rootNode = rootNodeArray[rootNodeIndex]; 207 OptimizedBvhNode rootNode = rootNodeArray[rootNodeIndex];
208 208
209 while (curIndex < _curNodeIndex) 209 while (curIndex < _curNodeIndex)
210 { 210 {
211 //catch bugs in tree data 211 //catch bugs in tree data
212 if (walkIterations >= _curNodeIndex) 212 if (walkIterations >= _curNodeIndex)
213 throw new BulletException(); 213 throw new BulletException();
214 214
215 walkIterations++; 215 walkIterations++;
216 aabbOverlap = MathHelper.TestAabbAgainstAabb2(aabbMin, aabbMax, rootNode.AabbMin, rootNode.AabbMax); 216 aabbOverlap = MathHelper.TestAabbAgainstAabb2(aabbMin, aabbMax, rootNode.AabbMin, rootNode.AabbMax);
217 isLeafNode = (rootNode.LeftChild == null && rootNode.RightChild == null); 217 isLeafNode = (rootNode.LeftChild == null && rootNode.RightChild == null);
218 218
219 if (isLeafNode && aabbOverlap) 219 if (isLeafNode && aabbOverlap)
220 { 220 {
221 nodeCallback.ProcessNode(rootNode); 221 nodeCallback.ProcessNode(rootNode);
222 } 222 }
223 223
224 if (aabbOverlap || isLeafNode) 224 if (aabbOverlap || isLeafNode)
225 { 225 {
226 rootNodeIndex++; // this 226 rootNodeIndex++; // this
227 curIndex++; 227 curIndex++;
228 if (rootNodeIndex < rootNodeArray.Length) 228 if (rootNodeIndex < rootNodeArray.Length)
229 rootNode = rootNodeArray[rootNodeIndex]; 229 rootNode = rootNodeArray[rootNodeIndex];
230 } 230 }
231 else 231 else
232 { 232 {
233 escapeIndex = rootNode.EscapeIndex; 233 escapeIndex = rootNode.EscapeIndex;
234 rootNodeIndex += escapeIndex; // and this 234 rootNodeIndex += escapeIndex; // and this
235 curIndex += escapeIndex; 235 curIndex += escapeIndex;
236 if (rootNodeIndex < rootNodeArray.Length) 236 if (rootNodeIndex < rootNodeArray.Length)
237 rootNode = rootNodeArray[rootNodeIndex]; 237 rootNode = rootNodeArray[rootNodeIndex];
238 } 238 }
239 239
240 } 240 }
241 241
242 if (_maxIterations < walkIterations) 242 if (_maxIterations < walkIterations)
243 _maxIterations = walkIterations; 243 _maxIterations = walkIterations;
244 } 244 }
245 245
246 public void ReportAabbOverlappingNodex(INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) 246 public void ReportAabbOverlappingNodex(INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax)
247 { 247 {
248 //either choose recursive traversal (walkTree) or stackless (walkStacklessTree) 248 //either choose recursive traversal (walkTree) or stackless (walkStacklessTree)
249 //walkTree(m_rootNode1,nodeCallback,aabbMin,aabbMax); 249 //walkTree(m_rootNode1,nodeCallback,aabbMin,aabbMax);
250 //WalkStacklessTree(_rootNode, nodeCallback, aabbMin, aabbMax); 250 //WalkStacklessTree(_rootNode, nodeCallback, aabbMin, aabbMax);
251 WalkStacklessTree(_contiguousNodes, nodeCallback, aabbMin, aabbMax); 251 WalkStacklessTree(_contiguousNodes, nodeCallback, aabbMin, aabbMax);
252 } 252 }
253 253
254 public void ReportSphereOverlappingNodex(INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) { } 254 public void ReportSphereOverlappingNodex(INodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) { }
255 } 255 }
256 256
257 public class NodeTriangleCallback : ITriangleIndexCallback 257 public class NodeTriangleCallback : ITriangleIndexCallback
258 { 258 {
259 private List<OptimizedBvhNode> _triangleNodes; 259 private List<OptimizedBvhNode> _triangleNodes;
260 260
261 public NodeTriangleCallback(List<OptimizedBvhNode> triangleNodes) 261 public NodeTriangleCallback(List<OptimizedBvhNode> triangleNodes)
262 { 262 {
263 _triangleNodes = triangleNodes; 263 _triangleNodes = triangleNodes;
264 } 264 }
265 265
266 public List<OptimizedBvhNode> TriangleNodes { get { return _triangleNodes; } set { _triangleNodes = value; } } 266 public List<OptimizedBvhNode> TriangleNodes { get { return _triangleNodes; } set { _triangleNodes = value; } }
267 267
268 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex) 268 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex)
269 { 269 {
270 270
271 OptimizedBvhNode node = new OptimizedBvhNode(); 271 OptimizedBvhNode node = new OptimizedBvhNode();
272 node.AabbMin = new Vector3(1e30f, 1e30f, 1e30f); 272 node.AabbMin = new Vector3(1e30f, 1e30f, 1e30f);
273 node.AabbMax = new Vector3(-1e30f, -1e30f, -1e30f); 273 node.AabbMax = new Vector3(-1e30f, -1e30f, -1e30f);
274 274
275 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[0]); 275 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[0]);
276 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[0]); 276 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[0]);
277 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[1]); 277 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[1]);
278 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[1]); 278 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[1]);
279 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[2]); 279 node.AabbMin = MathHelper.SetMin(node.AabbMin, triangle[2]);
280 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[2]); 280 node.AabbMax = MathHelper.SetMax(node.AabbMax, triangle[2]);
281 281
282 node.EscapeIndex = -1; 282 node.EscapeIndex = -1;
283 node.LeftChild = null; 283 node.LeftChild = null;
284 node.RightChild = null; 284 node.RightChild = null;
285 285
286 //for child nodes 286 //for child nodes
287 node.SubPart = partId; 287 node.SubPart = partId;
288 node.TriangleIndex = triangleIndex; 288 node.TriangleIndex = triangleIndex;
289 289
290 _triangleNodes.Add(node); 290 _triangleNodes.Add(node);
291 } 291 }
292 } 292 }
293} 293}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvhNode.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvhNode.cs
index d43f2fb..83cc6e5 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvhNode.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/OptimizedBvhNode.cs
@@ -1,63 +1,63 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// OptimizedBvhNode contains both internal and leaf node information. 30 /// OptimizedBvhNode contains both internal and leaf node information.
31 /// It hasn't been optimized yet for storage. Some obvious optimizations are: 31 /// It hasn't been optimized yet for storage. Some obvious optimizations are:
32 /// Removal of the pointers (can already be done, they are not used for traversal) 32 /// Removal of the pointers (can already be done, they are not used for traversal)
33 /// and storing aabbmin/max as quantized integers. 33 /// and storing aabbmin/max as quantized integers.
34 /// 'subpart' doesn't need an integer either. It allows to re-use graphics triangle 34 /// 'subpart' doesn't need an integer either. It allows to re-use graphics triangle
35 /// meshes stored in a non-uniform way (like batches/subparts of triangle-fans 35 /// meshes stored in a non-uniform way (like batches/subparts of triangle-fans
36 /// </summary> 36 /// </summary>
37 public class OptimizedBvhNode 37 public class OptimizedBvhNode
38 { 38 {
39 private Vector3 _aabbMin; 39 private Vector3 _aabbMin;
40 private Vector3 _aabbMax; 40 private Vector3 _aabbMax;
41 41
42 //these 2 pointers are obsolete, the stackless traversal just uses the escape index 42 //these 2 pointers are obsolete, the stackless traversal just uses the escape index
43 private OptimizedBvhNode _leftChild; 43 private OptimizedBvhNode _leftChild;
44 private OptimizedBvhNode _rightChild; 44 private OptimizedBvhNode _rightChild;
45 45
46 private int _escapeIndex; 46 private int _escapeIndex;
47 47
48 //for child nodes 48 //for child nodes
49 private int _subPart; 49 private int _subPart;
50 private int _triangleIndex; 50 private int _triangleIndex;
51 51
52 public Vector3 AabbMin { get { return _aabbMin; } set { _aabbMin = value; } } 52 public Vector3 AabbMin { get { return _aabbMin; } set { _aabbMin = value; } }
53 public Vector3 AabbMax { get { return _aabbMax; } set { _aabbMax = value; } } 53 public Vector3 AabbMax { get { return _aabbMax; } set { _aabbMax = value; } }
54 54
55 public OptimizedBvhNode LeftChild { get { return _leftChild; } set { _leftChild = value; } } 55 public OptimizedBvhNode LeftChild { get { return _leftChild; } set { _leftChild = value; } }
56 public OptimizedBvhNode RightChild { get { return _rightChild; } set { _rightChild = value; } } 56 public OptimizedBvhNode RightChild { get { return _rightChild; } set { _rightChild = value; } }
57 57
58 public int EscapeIndex { get { return _escapeIndex; } set { _escapeIndex = value; } } 58 public int EscapeIndex { get { return _escapeIndex; } set { _escapeIndex = value; } }
59 59
60 public int SubPart { get { return _subPart; } set { _subPart = value; } } 60 public int SubPart { get { return _subPart; } set { _subPart = value; } }
61 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } } 61 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } }
62 } 62 }
63} 63}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/PolyhedralConvexShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/PolyhedralConvexShape.cs
index f61371a..1a911b3 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/PolyhedralConvexShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/PolyhedralConvexShape.cs
@@ -1,133 +1,133 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public abstract class PolyhedralConvexShape : ConvexShape 29 public abstract class PolyhedralConvexShape : ConvexShape
30 { 30 {
31 public PolyhedralConvexShape() 31 public PolyhedralConvexShape()
32 { 32 {
33 //m_optionalHull = null; 33 //m_optionalHull = null;
34 } 34 }
35 35
36 public abstract int VertexCount { get; } 36 public abstract int VertexCount { get; }
37 public abstract int EdgeCount { get; } 37 public abstract int EdgeCount { get; }
38 public abstract int PlaneCount { get; } 38 public abstract int PlaneCount { get; }
39 39
40 public abstract void GetEdge(int i, out Vector3 pointA, out Vector3 pointB); 40 public abstract void GetEdge(int i, out Vector3 pointA, out Vector3 pointB);
41 public abstract void GetVertex(int i, out Vector3 vertex); 41 public abstract void GetVertex(int i, out Vector3 vertex);
42 public abstract void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i); 42 public abstract void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i);
43 // abstract int getIndex(int i); 43 // abstract int getIndex(int i);
44 44
45 public abstract bool IsInside(Vector3 point, float tolerance); 45 public abstract bool IsInside(Vector3 point, float tolerance);
46 46
47 // optional Hull is for optional Separating Axis Test Hull collision detection, see Hull.cpp 47 // optional Hull is for optional Separating Axis Test Hull collision detection, see Hull.cpp
48 //public class Hull m_optionalHull; 48 //public class Hull m_optionalHull;
49 49
50 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 50 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
51 { 51 {
52 Vector3 supVec = new Vector3(); 52 Vector3 supVec = new Vector3();
53 53
54 float maxDot = -1e30f; 54 float maxDot = -1e30f;
55 55
56 float lenSqr = vec.LengthSquared(); 56 float lenSqr = vec.LengthSquared();
57 if (lenSqr < 0.0001f) 57 if (lenSqr < 0.0001f)
58 { 58 {
59 vec = new Vector3(1, 0, 0); 59 vec = new Vector3(1, 0, 0);
60 } 60 }
61 else 61 else
62 { 62 {
63 float rlen = 1f / (float)Math.Sqrt(lenSqr); 63 float rlen = 1f / (float)Math.Sqrt(lenSqr);
64 vec *= rlen; 64 vec *= rlen;
65 } 65 }
66 66
67 Vector3 vtx; 67 Vector3 vtx;
68 float newDot; 68 float newDot;
69 69
70 for (int i = 0; i < VertexCount; i++) 70 for (int i = 0; i < VertexCount; i++)
71 { 71 {
72 GetVertex(i, out vtx); 72 GetVertex(i, out vtx);
73 newDot = Vector3.Dot(vec, vtx); 73 newDot = Vector3.Dot(vec, vtx);
74 if (newDot > maxDot) 74 if (newDot > maxDot)
75 { 75 {
76 maxDot = newDot; 76 maxDot = newDot;
77 supVec = vtx; 77 supVec = vtx;
78 } 78 }
79 } 79 }
80 return supVec; 80 return supVec;
81 } 81 }
82 82
83 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 83 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
84 { 84 {
85 #warning Think about this 85 #warning Think about this
86 /*Vector3 vtx; 86 /*Vector3 vtx;
87 float newDot; 87 float newDot;
88 88
89 for (int i = 0; i < vectors.Length; i++) 89 for (int i = 0; i < vectors.Length; i++)
90 { 90 {
91 supportVerticesOut[i][3] = -1e30f; 91 supportVerticesOut[i][3] = -1e30f;
92 } 92 }
93 93
94 for (int j = 0; j < vectors.Length; j++) 94 for (int j = 0; j < vectors.Length; j++)
95 { 95 {
96 Vector3 vec = vectors[j]; 96 Vector3 vec = vectors[j];
97 97
98 for (int i = 0; i < getNumVertices(); i++) 98 for (int i = 0; i < getNumVertices(); i++)
99 { 99 {
100 getVertex(i, out vtx); 100 getVertex(i, out vtx);
101 newDot = Vector3.Dot(vec,vtx); 101 newDot = Vector3.Dot(vec,vtx);
102 if (newDot > supportVerticesOut[j][3]) 102 if (newDot > supportVerticesOut[j][3])
103 { 103 {
104 //WARNING: don't swap next lines, the w component would get overwritten! 104 //WARNING: don't swap next lines, the w component would get overwritten!
105 supportVerticesOut[j] = vtx; 105 supportVerticesOut[j] = vtx;
106 supportVerticesOut[j][3] = newDot; 106 supportVerticesOut[j][3] = newDot;
107 } 107 }
108 } 108 }
109 }*/ 109 }*/
110 } 110 }
111 111
112 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 112 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
113 { 113 {
114 //not yet, return box inertia 114 //not yet, return box inertia
115 float margin = Margin; 115 float margin = Margin;
116 116
117 Matrix ident = Matrix.Identity; 117 Matrix ident = Matrix.Identity;
118 Vector3 aabbMin, aabbMax; 118 Vector3 aabbMin, aabbMax;
119 GetAabb(ident, out aabbMin, out aabbMax); 119 GetAabb(ident, out aabbMin, out aabbMax);
120 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f; 120 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f;
121 121
122 float lx = 2f * (halfExtents.X + margin); 122 float lx = 2f * (halfExtents.X + margin);
123 float ly = 2f * (halfExtents.Y + margin); 123 float ly = 2f * (halfExtents.Y + margin);
124 float lz = 2f * (halfExtents.Z + margin); 124 float lz = 2f * (halfExtents.Z + margin);
125 float x2 = lx * lx; 125 float x2 = lx * lx;
126 float y2 = ly * ly; 126 float y2 = ly * ly;
127 float z2 = lz * lz; 127 float z2 = lz * lz;
128 float scaledmass = mass * 0.08333333f; 128 float scaledmass = mass * 0.08333333f;
129 129
130 inertia = scaledmass * (new Vector3(y2 + z2, x2 + z2, x2 + y2)); 130 inertia = scaledmass * (new Vector3(y2 + z2, x2 + z2, x2 + y2));
131 } 131 }
132 } 132 }
133} 133}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SphereShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SphereShape.cs
index c660a6f..cc3cea9 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SphereShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SphereShape.cs
@@ -1,116 +1,116 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// btSphereShape implements an implicit (getSupportingVertex) Sphere 30 /// btSphereShape implements an implicit (getSupportingVertex) Sphere
31 /// </summary> 31 /// </summary>
32 public class SphereShape : ConvexShape 32 public class SphereShape : ConvexShape
33 { 33 {
34 public SphereShape(float radius) 34 public SphereShape(float radius)
35 : base() 35 : base()
36 { 36 {
37 Vector3 temp = ImplicitShapeDimensions; 37 Vector3 temp = ImplicitShapeDimensions;
38 temp.X = radius; 38 temp.X = radius;
39 ImplicitShapeDimensions = temp; 39 ImplicitShapeDimensions = temp;
40 } 40 }
41 41
42 public float Radius { get { return ImplicitShapeDimensions.X; } } 42 public float Radius { get { return ImplicitShapeDimensions.X; } }
43 43
44 public override BroadphaseNativeTypes ShapeType 44 public override BroadphaseNativeTypes ShapeType
45 { 45 {
46 get 46 get
47 { 47 {
48 return BroadphaseNativeTypes.Sphere; 48 return BroadphaseNativeTypes.Sphere;
49 } 49 }
50 } 50 }
51 51
52 public override string Name 52 public override string Name
53 { 53 {
54 get 54 get
55 { 55 {
56 return "Sphere"; 56 return "Sphere";
57 } 57 }
58 } 58 }
59 59
60 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 60 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
61 { 61 {
62 return new Vector3(); 62 return new Vector3();
63 } 63 }
64 64
65 /// <summary> 65 /// <summary>
66 /// to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case 66 /// to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case
67 /// this means, non-uniform scaling is not supported anymore 67 /// this means, non-uniform scaling is not supported anymore
68 /// </summary> 68 /// </summary>
69 public override float Margin 69 public override float Margin
70 { 70 {
71 get 71 get
72 { 72 {
73 return LocalScaling.X * Radius + base.Margin; 73 return LocalScaling.X * Radius + base.Margin;
74 } 74 }
75 set 75 set
76 { 76 {
77 base.Margin = value; 77 base.Margin = value;
78 } 78 }
79 } 79 }
80 80
81 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 81 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
82 { 82 {
83 if (supportVerticesOut != null) 83 if (supportVerticesOut != null)
84 for (int i = 0; i < supportVerticesOut.Length; i++) 84 for (int i = 0; i < supportVerticesOut.Length; i++)
85 supportVerticesOut[i] = new Vector3(); 85 supportVerticesOut[i] = new Vector3();
86 } 86 }
87 87
88 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 88 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
89 { 89 {
90 float elem = 0.4f * mass * Margin * Margin; 90 float elem = 0.4f * mass * Margin * Margin;
91 inertia = new Vector3(elem, elem, elem); 91 inertia = new Vector3(elem, elem, elem);
92 } 92 }
93 93
94 public override Vector3 LocalGetSupportingVertex(Vector3 vec) 94 public override Vector3 LocalGetSupportingVertex(Vector3 vec)
95 { 95 {
96 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec); 96 Vector3 supVertex = LocalGetSupportingVertexWithoutMargin(vec);
97 97
98 Vector3 vecnorm = vec; 98 Vector3 vecnorm = vec;
99 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon)) 99 if (vecnorm.LengthSquared() < (MathHelper.Epsilon * MathHelper.Epsilon))
100 { 100 {
101 vecnorm = new Vector3(-1f, -1f, -1f); 101 vecnorm = new Vector3(-1f, -1f, -1f);
102 } 102 }
103 vecnorm.Normalize(); 103 vecnorm.Normalize();
104 supVertex += Margin * vecnorm; 104 supVertex += Margin * vecnorm;
105 return supVertex; 105 return supVertex;
106 } 106 }
107 107
108 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 108 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
109 { 109 {
110 Vector3 center = t.Translation; 110 Vector3 center = t.Translation;
111 Vector3 extent = new Vector3(Margin, Margin, Margin); 111 Vector3 extent = new Vector3(Margin, Margin, Margin);
112 aabbMin = center - extent; 112 aabbMin = center - extent;
113 aabbMax = center + extent; 113 aabbMax = center + extent;
114 } 114 }
115 } 115 }
116} 116}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StaticPlaneShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StaticPlaneShape.cs
index 49604a0..a79a145 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StaticPlaneShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StaticPlaneShape.cs
@@ -1,124 +1,124 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class StaticPlaneShape : ConcaveShape 29 public class StaticPlaneShape : ConcaveShape
30 { 30 {
31 private Vector3 _localAabbMin; 31 private Vector3 _localAabbMin;
32 private Vector3 _localAabbMax; 32 private Vector3 _localAabbMax;
33 33
34 private Vector3 _planeNormal; 34 private Vector3 _planeNormal;
35 private float _planeConstant; 35 private float _planeConstant;
36 private Vector3 _localScaling; 36 private Vector3 _localScaling;
37 37
38 public StaticPlaneShape(Vector3 planeNormal, float planeConstant) 38 public StaticPlaneShape(Vector3 planeNormal, float planeConstant)
39 { 39 {
40 _planeNormal = planeNormal; 40 _planeNormal = planeNormal;
41 _planeConstant = planeConstant; 41 _planeConstant = planeConstant;
42 _localScaling = new Vector3(); 42 _localScaling = new Vector3();
43 } 43 }
44 44
45 protected Vector3 LocalAabbMin { get { return _localAabbMin; } set { _localAabbMin = value; } } 45 protected Vector3 LocalAabbMin { get { return _localAabbMin; } set { _localAabbMin = value; } }
46 protected Vector3 LocalAabbMax { get { return _localAabbMax; } set { _localAabbMax = value; } } 46 protected Vector3 LocalAabbMax { get { return _localAabbMax; } set { _localAabbMax = value; } }
47 47
48 protected Vector3 PlaneNormal { get { return _planeNormal; } set { _planeNormal = value; } } 48 protected Vector3 PlaneNormal { get { return _planeNormal; } set { _planeNormal = value; } }
49 protected float PlaneConstant { get { return _planeConstant; } set { _planeConstant = value; } } 49 protected float PlaneConstant { get { return _planeConstant; } set { _planeConstant = value; } }
50 50
51 public override BroadphaseNativeTypes ShapeType 51 public override BroadphaseNativeTypes ShapeType
52 { 52 {
53 get 53 get
54 { 54 {
55 return BroadphaseNativeTypes.StaticPlane; 55 return BroadphaseNativeTypes.StaticPlane;
56 } 56 }
57 } 57 }
58 58
59 public override Vector3 LocalScaling 59 public override Vector3 LocalScaling
60 { 60 {
61 get 61 get
62 { 62 {
63 return _localScaling; 63 return _localScaling;
64 } 64 }
65 set 65 set
66 { 66 {
67 _localScaling = value; 67 _localScaling = value;
68 } 68 }
69 } 69 }
70 70
71 public override string Name 71 public override string Name
72 { 72 {
73 get 73 get
74 { 74 {
75 return "StaticPlane"; 75 return "StaticPlane";
76 } 76 }
77 } 77 }
78 78
79 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 79 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
80 { 80 {
81 Vector3 infvec = new Vector3(1e30f, 1e30f, 1e30f); 81 Vector3 infvec = new Vector3(1e30f, 1e30f, 1e30f);
82 82
83 Vector3 center = _planeNormal * _planeConstant; 83 Vector3 center = _planeNormal * _planeConstant;
84 aabbMin = center + infvec * _planeNormal; 84 aabbMin = center + infvec * _planeNormal;
85 aabbMax = aabbMin; 85 aabbMax = aabbMin;
86 MathHelper.SetMin(ref aabbMin, center - infvec * _planeNormal); 86 MathHelper.SetMin(ref aabbMin, center - infvec * _planeNormal);
87 MathHelper.SetMax(ref aabbMax, center - infvec * _planeNormal); 87 MathHelper.SetMax(ref aabbMax, center - infvec * _planeNormal);
88 88
89 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); 89 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f);
90 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 90 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
91 } 91 }
92 92
93 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 93 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
94 { 94 {
95 //moving concave objects not supported 95 //moving concave objects not supported
96 inertia = new Vector3(); 96 inertia = new Vector3();
97 } 97 }
98 98
99 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) { 99 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) {
100 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f; 100 Vector3 halfExtents = (aabbMax - aabbMin) * 0.5f;
101 float radius = halfExtents.Length(); 101 float radius = halfExtents.Length();
102 Vector3 center = (aabbMax + aabbMin) * 0.5f; 102 Vector3 center = (aabbMax + aabbMin) * 0.5f;
103 103
104 //this is where the triangles are generated, given AABB and plane equation (normal/constant) 104 //this is where the triangles are generated, given AABB and plane equation (normal/constant)
105 Vector3 tangentDir0 = new Vector3(), tangentDir1 = new Vector3(); 105 Vector3 tangentDir0 = new Vector3(), tangentDir1 = new Vector3();
106 106
107 //tangentDir0/tangentDir1 can be precalculated 107 //tangentDir0/tangentDir1 can be precalculated
108 MathHelper.PlaneSpace1(_planeNormal, ref tangentDir0, ref tangentDir1); 108 MathHelper.PlaneSpace1(_planeNormal, ref tangentDir0, ref tangentDir1);
109 109
110 Vector3 projectedCenter = center - (Vector3.Dot(_planeNormal, center) - _planeConstant) * _planeNormal; 110 Vector3 projectedCenter = center - (Vector3.Dot(_planeNormal, center) - _planeConstant) * _planeNormal;
111 111
112 Vector3[] triangle = new Vector3[3]; 112 Vector3[] triangle = new Vector3[3];
113 triangle[0] = projectedCenter + tangentDir0 * radius + tangentDir1 * radius; 113 triangle[0] = projectedCenter + tangentDir0 * radius + tangentDir1 * radius;
114 triangle[1] = projectedCenter + tangentDir0 * radius - tangentDir1 * radius; 114 triangle[1] = projectedCenter + tangentDir0 * radius - tangentDir1 * radius;
115 triangle[2] = projectedCenter - tangentDir0 * radius - tangentDir1 * radius; 115 triangle[2] = projectedCenter - tangentDir0 * radius - tangentDir1 * radius;
116 callback.ProcessTriangle(triangle, 0, 0); 116 callback.ProcessTriangle(triangle, 0, 0);
117 117
118 triangle[0] = projectedCenter - tangentDir0 * radius - tangentDir1 * radius; 118 triangle[0] = projectedCenter - tangentDir0 * radius - tangentDir1 * radius;
119 triangle[1] = projectedCenter - tangentDir0 * radius + tangentDir1 * radius; 119 triangle[1] = projectedCenter - tangentDir0 * radius + tangentDir1 * radius;
120 triangle[2] = projectedCenter + tangentDir0 * radius + tangentDir1 * radius; 120 triangle[2] = projectedCenter + tangentDir0 * radius + tangentDir1 * radius;
121 callback.ProcessTriangle(triangle, 0, 1); 121 callback.ProcessTriangle(triangle, 0, 1);
122 } 122 }
123 } 123 }
124} 124}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StridingMeshInterface.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StridingMeshInterface.cs
index 2a2ce27..20baccb 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StridingMeshInterface.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/StridingMeshInterface.cs
@@ -1,115 +1,115 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// PHY_ScalarType enumerates possible scalar types. 30 /// PHY_ScalarType enumerates possible scalar types.
31 /// See the StridingMeshInterface for its use 31 /// See the StridingMeshInterface for its use
32 /// </summary> 32 /// </summary>
33 public enum PHY_ScalarType 33 public enum PHY_ScalarType
34 { 34 {
35 PHY_FLOAT, 35 PHY_FLOAT,
36 PHY_DOUBLE, 36 PHY_DOUBLE,
37 PHY_INTEGER, 37 PHY_INTEGER,
38 PHY_SHORT, 38 PHY_SHORT,
39 PHY_FIXEDPOINT88 39 PHY_FIXEDPOINT88
40 } 40 }
41 41
42 /// <summary> 42 /// <summary>
43 /// StridingMeshInterface is the interface class for high performance access to triangle meshes 43 /// StridingMeshInterface is the interface class for high performance access to triangle meshes
44 /// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory. 44 /// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory.
45 /// </summary> 45 /// </summary>
46 public abstract class StridingMeshInterface 46 public abstract class StridingMeshInterface
47 { 47 {
48 protected Vector3 _scaling; 48 protected Vector3 _scaling;
49 49
50 public StridingMeshInterface() 50 public StridingMeshInterface()
51 { 51 {
52 _scaling = new Vector3(1f,1f,1f); 52 _scaling = new Vector3(1f,1f,1f);
53 } 53 }
54 54
55 public void InternalProcessAllTriangles(ITriangleIndexCallback callback, Vector3 aabbMin, Vector3 aabbMax) 55 public void InternalProcessAllTriangles(ITriangleIndexCallback callback, Vector3 aabbMin, Vector3 aabbMax)
56 { 56 {
57 int numtotalphysicsverts = 0; 57 int numtotalphysicsverts = 0;
58 int numtriangles, gfxindex; 58 int numtriangles, gfxindex;
59 int part, graphicssubparts = SubPartsCount(); 59 int part, graphicssubparts = SubPartsCount();
60 Vector3[] triangle = new Vector3[3]; 60 Vector3[] triangle = new Vector3[3];
61 List<Vector3> verts; 61 List<Vector3> verts;
62 List<int> indicies; 62 List<int> indicies;
63 63
64 Vector3 meshScaling = Scaling; 64 Vector3 meshScaling = Scaling;
65 65
66 //if the number of parts is big, the performance might drop due to the innerloop switch on indextype 66 //if the number of parts is big, the performance might drop due to the innerloop switch on indextype
67 for (part = 0; part < graphicssubparts; part++) 67 for (part = 0; part < graphicssubparts; part++)
68 { 68 {
69 GetLockedReadOnlyVertexIndexBase(out verts, out indicies, out numtriangles, part); 69 GetLockedReadOnlyVertexIndexBase(out verts, out indicies, out numtriangles, part);
70 numtotalphysicsverts += numtriangles * 3; //upper bound 70 numtotalphysicsverts += numtriangles * 3; //upper bound
71 71
72 for (gfxindex = 0; gfxindex < numtriangles; gfxindex++) 72 for (gfxindex = 0; gfxindex < numtriangles; gfxindex++)
73 { 73 {
74 triangle[0] = verts[indicies[gfxindex * 3 + 0]]; 74 triangle[0] = verts[indicies[gfxindex * 3 + 0]];
75 triangle[1] = verts[indicies[gfxindex * 3 + 1]]; 75 triangle[1] = verts[indicies[gfxindex * 3 + 1]];
76 triangle[2] = verts[indicies[gfxindex * 3 + 2]]; 76 triangle[2] = verts[indicies[gfxindex * 3 + 2]];
77 77
78 callback.ProcessTriangleIndex(triangle, part, gfxindex); 78 callback.ProcessTriangleIndex(triangle, part, gfxindex);
79 } 79 }
80 80
81 UnLockReadOnlyVertexBase(part); 81 UnLockReadOnlyVertexBase(part);
82 } 82 }
83 } 83 }
84 84
85 85
86 // get read and write access to a subpart of a triangle mesh 86 // get read and write access to a subpart of a triangle mesh
87 // this subpart has a continuous array of vertices and indices 87 // this subpart has a continuous array of vertices and indices
88 // in this way the mesh can be handled as chunks of memory with striding 88 // in this way the mesh can be handled as chunks of memory with striding
89 // very similar to OpenGL vertexarray support 89 // very similar to OpenGL vertexarray support
90 // make a call to unLockVertexBase when the read and write access is finished 90 // make a call to unLockVertexBase when the read and write access is finished
91 public abstract void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart); 91 public abstract void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart);
92 92
93 public abstract void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart); 93 public abstract void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart);
94 94
95 // unLockVertexBase finishes the access to a subpart of the triangle mesh 95 // unLockVertexBase finishes the access to a subpart of the triangle mesh
96 // make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished 96 // make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished
97 public abstract void UnLockVertexBase(int subpart); 97 public abstract void UnLockVertexBase(int subpart);
98 98
99 public abstract void UnLockReadOnlyVertexBase(int subpart); 99 public abstract void UnLockReadOnlyVertexBase(int subpart);
100 100
101 101
102 // getNumSubParts returns the number of seperate subparts 102 // getNumSubParts returns the number of seperate subparts
103 // each subpart has a continuous array of vertices and indices 103 // each subpart has a continuous array of vertices and indices
104 public abstract int SubPartsCount(); 104 public abstract int SubPartsCount();
105 105
106 public abstract void PreallocateVertices(int numverts); 106 public abstract void PreallocateVertices(int numverts);
107 public abstract void PreallocateIndices(int numindices); 107 public abstract void PreallocateIndices(int numindices);
108 108
109 public Vector3 Scaling 109 public Vector3 Scaling
110 { 110 {
111 get { return _scaling; } 111 get { return _scaling; }
112 set { _scaling = value; } 112 set { _scaling = value; }
113 } 113 }
114 } 114 }
115} 115}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SupportVertexCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SupportVertexCallback.cs
index ffb5813..eab822e 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SupportVertexCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/SupportVertexCallback.cs
@@ -1,67 +1,67 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 internal class SupportVertexCallback : ITriangleCallback 29 internal class SupportVertexCallback : ITriangleCallback
30 { 30 {
31 private Vector3 _supportVertexLocal; 31 private Vector3 _supportVertexLocal;
32 32
33 private Matrix _worldTransform; 33 private Matrix _worldTransform;
34 private float _maxDot; 34 private float _maxDot;
35 private Vector3 _supportVecLocal; 35 private Vector3 _supportVecLocal;
36 36
37 public SupportVertexCallback(Vector3 supportVecWorld, Matrix trans) 37 public SupportVertexCallback(Vector3 supportVecWorld, Matrix trans)
38 { 38 {
39 _supportVertexLocal = new Vector3(); 39 _supportVertexLocal = new Vector3();
40 _worldTransform = trans; 40 _worldTransform = trans;
41 _maxDot = -1e30f; 41 _maxDot = -1e30f;
42 _supportVecLocal = Vector3.TransformNormal(supportVecWorld, _worldTransform); 42 _supportVecLocal = Vector3.TransformNormal(supportVecWorld, _worldTransform);
43 } 43 }
44 44
45 public Matrix WorldTransform { get { return _worldTransform; } set { _worldTransform = value; } } 45 public Matrix WorldTransform { get { return _worldTransform; } set { _worldTransform = value; } }
46 public float MaxDot { get { return _maxDot; } set { _maxDot = value; } } 46 public float MaxDot { get { return _maxDot; } set { _maxDot = value; } }
47 public Vector3 SupportVectorLocal { get { return _supportVecLocal; } set { _supportVecLocal = value; } } 47 public Vector3 SupportVectorLocal { get { return _supportVecLocal; } set { _supportVecLocal = value; } }
48 48
49 public Vector3 SupportVertexLocal { get { return _supportVertexLocal; } } 49 public Vector3 SupportVertexLocal { get { return _supportVertexLocal; } }
50 public Vector3 SupportVertexWorldSpace { get { return MathHelper.MatrixToVector(_worldTransform, _supportVertexLocal); } } 50 public Vector3 SupportVertexWorldSpace { get { return MathHelper.MatrixToVector(_worldTransform, _supportVertexLocal); } }
51 51
52 #region ITriangleCallback Members 52 #region ITriangleCallback Members
53 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex) 53 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex)
54 { 54 {
55 for (int i = 0; i < 3; i++) 55 for (int i = 0; i < 3; i++)
56 { 56 {
57 float dot = Vector3.Dot(_supportVecLocal, triangle[i]); 57 float dot = Vector3.Dot(_supportVecLocal, triangle[i]);
58 if (dot > _maxDot) 58 if (dot > _maxDot)
59 { 59 {
60 _maxDot = dot; 60 _maxDot = dot;
61 _supportVertexLocal = triangle[i]; 61 _supportVertexLocal = triangle[i];
62 } 62 }
63 } 63 }
64 } 64 }
65 #endregion 65 #endregion
66 } 66 }
67} 67}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleBuffer.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleBuffer.cs
index 158e42a..a472583 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleBuffer.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleBuffer.cs
@@ -1,80 +1,80 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class Triangle 29 public class Triangle
30 { 30 {
31 private Vector3 _vertexA; 31 private Vector3 _vertexA;
32 private Vector3 _vertexB; 32 private Vector3 _vertexB;
33 private Vector3 _vertexC; 33 private Vector3 _vertexC;
34 private int _partId; 34 private int _partId;
35 private int _triangleIndex; 35 private int _triangleIndex;
36 36
37 public Vector3 VertexA { get { return _vertexA; } set { _vertexA = value; } } 37 public Vector3 VertexA { get { return _vertexA; } set { _vertexA = value; } }
38 public Vector3 VertexB { get { return _vertexB; } set { _vertexB = value; } } 38 public Vector3 VertexB { get { return _vertexB; } set { _vertexB = value; } }
39 public Vector3 VertexC { get { return _vertexC; } set { _vertexC = value; } } 39 public Vector3 VertexC { get { return _vertexC; } set { _vertexC = value; } }
40 public int PartId { get { return _partId; } set { _partId = value; } } 40 public int PartId { get { return _partId; } set { _partId = value; } }
41 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } } 41 public int TriangleIndex { get { return _triangleIndex; } set { _triangleIndex = value; } }
42 } 42 }
43 43
44 /// <summary> 44 /// <summary>
45 /// example usage of this class: 45 /// example usage of this class:
46 /// TriangleBuffer triBuf; 46 /// TriangleBuffer triBuf;
47 /// concaveShape.processAllTriangles(triBuf, out aabbMin, out aabbMax); 47 /// concaveShape.processAllTriangles(triBuf, out aabbMin, out aabbMax);
48 /// for (int i = 0; i < triBuf.getNumTriangles(); i++) 48 /// for (int i = 0; i < triBuf.getNumTriangles(); i++)
49 /// { 49 /// {
50 /// Triangle tri = triBuf.getTriangle(i); 50 /// Triangle tri = triBuf.getTriangle(i);
51 /// //do something useful here with the triangle 51 /// //do something useful here with the triangle
52 /// } 52 /// }
53 /// </summary> 53 /// </summary>
54 public class TriangleBuffer : ITriangleCallback 54 public class TriangleBuffer : ITriangleCallback
55 { 55 {
56 private List<Triangle> _triangleBuffer = new List<Triangle>(); 56 private List<Triangle> _triangleBuffer = new List<Triangle>();
57 57
58 public int TriangleCount { get { return _triangleBuffer.Count; } } 58 public int TriangleCount { get { return _triangleBuffer.Count; } }
59 public Triangle this[int index] { get { return _triangleBuffer[index]; } } 59 public Triangle this[int index] { get { return _triangleBuffer[index]; } }
60 60
61 public void ClearBuffer() 61 public void ClearBuffer()
62 { 62 {
63 _triangleBuffer.Clear(); 63 _triangleBuffer.Clear();
64 } 64 }
65 65
66 #region ITriangleCallback Members 66 #region ITriangleCallback Members
67 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex) 67 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex)
68 { 68 {
69 Triangle tri = new Triangle(); 69 Triangle tri = new Triangle();
70 tri.VertexA = triangle[0]; 70 tri.VertexA = triangle[0];
71 tri.VertexB = triangle[1]; 71 tri.VertexB = triangle[1];
72 tri.VertexC = triangle[2]; 72 tri.VertexC = triangle[2];
73 tri.PartId = partID; 73 tri.PartId = partID;
74 tri.TriangleIndex = triangleIndex; 74 tri.TriangleIndex = triangleIndex;
75 75
76 _triangleBuffer.Add(tri); 76 _triangleBuffer.Add(tri);
77 } 77 }
78 #endregion 78 #endregion
79 } 79 }
80} 80}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleCallback.cs
index ac892c2..938765b 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleCallback.cs
@@ -1,33 +1,33 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public interface ITriangleCallback 29 public interface ITriangleCallback
30 { 30 {
31 void ProcessTriangle(Vector3[] triangle, int partId, int triangleIndex); 31 void ProcessTriangle(Vector3[] triangle, int partId, int triangleIndex);
32 } 32 }
33} 33}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleIndexVertexArray.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleIndexVertexArray.cs
index 6d0d7b5..52c08ed 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleIndexVertexArray.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleIndexVertexArray.cs
@@ -1,136 +1,136 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// IndexedMesh indexes into existing vertex and index arrays, in a similar way OpenGL glDrawElements 30 /// IndexedMesh indexes into existing vertex and index arrays, in a similar way OpenGL glDrawElements
31 /// instead of the number of indices, we pass the number of triangles 31 /// instead of the number of indices, we pass the number of triangles
32 /// </summary> 32 /// </summary>
33 public struct IndexedMesh 33 public struct IndexedMesh
34 { 34 {
35 private int _numTriangles; 35 private int _numTriangles;
36 private int[] _triangleIndexBase; 36 private int[] _triangleIndexBase;
37 private int _triangleIndexStride; 37 private int _triangleIndexStride;
38 private int _numVertices; 38 private int _numVertices;
39 private Vector3[] _vertexBase; 39 private Vector3[] _vertexBase;
40 private int _vertexStride; 40 private int _vertexStride;
41 41
42 public IndexedMesh(int numTriangleIndices, int[] triangleIndexBase, int triangleIndexStride, int numVertices, Vector3[] vertexBase, int vertexStride) 42 public IndexedMesh(int numTriangleIndices, int[] triangleIndexBase, int triangleIndexStride, int numVertices, Vector3[] vertexBase, int vertexStride)
43 { 43 {
44 _numTriangles = numTriangleIndices; 44 _numTriangles = numTriangleIndices;
45 _triangleIndexBase = triangleIndexBase; 45 _triangleIndexBase = triangleIndexBase;
46 _triangleIndexStride = triangleIndexStride; 46 _triangleIndexStride = triangleIndexStride;
47 _vertexBase = vertexBase; 47 _vertexBase = vertexBase;
48 _numVertices = numVertices; 48 _numVertices = numVertices;
49 _vertexStride = vertexStride; 49 _vertexStride = vertexStride;
50 } 50 }
51 51
52 public IndexedMesh(int[] triangleIndexBase, Vector3[] vertexBase) 52 public IndexedMesh(int[] triangleIndexBase, Vector3[] vertexBase)
53 { 53 {
54 _numTriangles = triangleIndexBase.Length; 54 _numTriangles = triangleIndexBase.Length;
55 _triangleIndexBase = triangleIndexBase; 55 _triangleIndexBase = triangleIndexBase;
56 _triangleIndexStride = 32; 56 _triangleIndexStride = 32;
57 _vertexBase = vertexBase; 57 _vertexBase = vertexBase;
58 _numVertices = vertexBase.Length; 58 _numVertices = vertexBase.Length;
59 _vertexStride = 24; 59 _vertexStride = 24;
60 } 60 }
61 61
62 public int TriangleCount { get { return _numTriangles; } set { _numTriangles = value; } } 62 public int TriangleCount { get { return _numTriangles; } set { _numTriangles = value; } }
63 public int[] TriangleIndexBase { get { return _triangleIndexBase; } set { _triangleIndexBase = value; } } 63 public int[] TriangleIndexBase { get { return _triangleIndexBase; } set { _triangleIndexBase = value; } }
64 public int TriangleIndexStride { get { return _triangleIndexStride; } set { _triangleIndexStride = value; } } 64 public int TriangleIndexStride { get { return _triangleIndexStride; } set { _triangleIndexStride = value; } }
65 public int VertexCount { get { return _numVertices; } set { _numVertices = value; } } 65 public int VertexCount { get { return _numVertices; } set { _numVertices = value; } }
66 public Vector3[] VertexBase { get { return _vertexBase; } set { _vertexBase = value; } } 66 public Vector3[] VertexBase { get { return _vertexBase; } set { _vertexBase = value; } }
67 public int VertexStride { get { return _vertexStride; } set { _vertexStride = value; } } 67 public int VertexStride { get { return _vertexStride; } set { _vertexStride = value; } }
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// TriangleIndexVertexArray allows to use multiple meshes, by indexing into existing triangle/index arrays. 71 /// TriangleIndexVertexArray allows to use multiple meshes, by indexing into existing triangle/index arrays.
72 /// Additional meshes can be added using addIndexedMesh 72 /// Additional meshes can be added using addIndexedMesh
73 /// </summary> 73 /// </summary>
74 public class TriangleIndexVertexArray : StridingMeshInterface 74 public class TriangleIndexVertexArray : StridingMeshInterface
75 { 75 {
76 List<IndexedMesh> _indexedMeshes = new List<IndexedMesh>(); 76 List<IndexedMesh> _indexedMeshes = new List<IndexedMesh>();
77 77
78 public TriangleIndexVertexArray() { } 78 public TriangleIndexVertexArray() { }
79 79
80 public TriangleIndexVertexArray(int numTriangleIndices, int[] triangleIndexBase, int triangleIndexStride, int numVertices, Vector3[] vertexBase, int vertexStride) 80 public TriangleIndexVertexArray(int numTriangleIndices, int[] triangleIndexBase, int triangleIndexStride, int numVertices, Vector3[] vertexBase, int vertexStride)
81 { 81 {
82 IndexedMesh mesh = new IndexedMesh(); 82 IndexedMesh mesh = new IndexedMesh();
83 mesh.TriangleCount = numTriangleIndices; 83 mesh.TriangleCount = numTriangleIndices;
84 mesh.TriangleIndexBase = triangleIndexBase; 84 mesh.TriangleIndexBase = triangleIndexBase;
85 mesh.TriangleIndexStride = triangleIndexStride; 85 mesh.TriangleIndexStride = triangleIndexStride;
86 mesh.VertexBase = vertexBase; 86 mesh.VertexBase = vertexBase;
87 mesh.VertexCount = numVertices; 87 mesh.VertexCount = numVertices;
88 mesh.VertexStride = vertexStride; 88 mesh.VertexStride = vertexStride;
89 89
90 AddIndexedMesh(mesh); 90 AddIndexedMesh(mesh);
91 } 91 }
92 92
93 public TriangleIndexVertexArray(int[] triangleIndexBase, Vector3[] vertexBase) 93 public TriangleIndexVertexArray(int[] triangleIndexBase, Vector3[] vertexBase)
94 : this(triangleIndexBase.Length, triangleIndexBase, 32, vertexBase.Length, vertexBase, 24) { } 94 : this(triangleIndexBase.Length, triangleIndexBase, 32, vertexBase.Length, vertexBase, 24) { }
95 95
96 public void AddIndexedMesh(IndexedMesh indexedMesh) 96 public void AddIndexedMesh(IndexedMesh indexedMesh)
97 { 97 {
98 _indexedMeshes.Add(indexedMesh); 98 _indexedMeshes.Add(indexedMesh);
99 } 99 }
100 100
101 public override void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart) 101 public override void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart)
102 { 102 {
103 throw new Exception("The method or operation is not implemented."); 103 throw new Exception("The method or operation is not implemented.");
104 } 104 }
105 105
106 public override void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart) 106 public override void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart)
107 { 107 {
108 throw new Exception("The method or operation is not implemented."); 108 throw new Exception("The method or operation is not implemented.");
109 } 109 }
110 110
111 public override void UnLockVertexBase(int subpart) 111 public override void UnLockVertexBase(int subpart)
112 { 112 {
113 throw new Exception("The method or operation is not implemented."); 113 throw new Exception("The method or operation is not implemented.");
114 } 114 }
115 115
116 public override void UnLockReadOnlyVertexBase(int subpart) 116 public override void UnLockReadOnlyVertexBase(int subpart)
117 { 117 {
118 throw new Exception("The method or operation is not implemented."); 118 throw new Exception("The method or operation is not implemented.");
119 } 119 }
120 120
121 public override int SubPartsCount() 121 public override int SubPartsCount()
122 { 122 {
123 return _indexedMeshes.Count; 123 return _indexedMeshes.Count;
124 } 124 }
125 125
126 public override void PreallocateVertices(int numverts) 126 public override void PreallocateVertices(int numverts)
127 { 127 {
128 throw new Exception("The method or operation is not implemented."); 128 throw new Exception("The method or operation is not implemented.");
129 } 129 }
130 130
131 public override void PreallocateIndices(int numindices) 131 public override void PreallocateIndices(int numindices)
132 { 132 {
133 throw new Exception("The method or operation is not implemented."); 133 throw new Exception("The method or operation is not implemented.");
134 } 134 }
135 } 135 }
136} 136}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMesh.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMesh.cs
index 1426355..d5b93ba 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMesh.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMesh.cs
@@ -1,102 +1,102 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26using MonoXnaCompactMaths; 26using MonoXnaCompactMaths;
27 27
28namespace XnaDevRu.BulletX 28namespace XnaDevRu.BulletX
29{ 29{
30 class TriangleMesh : StridingMeshInterface 30 class TriangleMesh : StridingMeshInterface
31 { 31 {
32 int _numTriangles; 32 int _numTriangles;
33 List<Vector3> _verts; 33 List<Vector3> _verts;
34 34
35 public TriangleMesh() 35 public TriangleMesh()
36 { 36 {
37 _numTriangles = 0; 37 _numTriangles = 0;
38 _verts = new List<Vector3>(); 38 _verts = new List<Vector3>();
39 } 39 }
40 40
41 void AddTriangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2) 41 void AddTriangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2)
42 { 42 {
43 _verts.Add(vertex0); 43 _verts.Add(vertex0);
44 _verts.Add(vertex1); 44 _verts.Add(vertex1);
45 _verts.Add(vertex2); 45 _verts.Add(vertex2);
46 _numTriangles++; 46 _numTriangles++;
47 } 47 }
48 48
49 public override void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart) 49 public override void GetLockedVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart)
50 { 50 {
51 verts = new List<Vector3>(); 51 verts = new List<Vector3>();
52 for (int i = 0; i < 3; i++) 52 for (int i = 0; i < 3; i++)
53 { 53 {
54 verts.Add(_verts[subpart * 3 + i]); 54 verts.Add(_verts[subpart * 3 + i]);
55 } 55 }
56 indicies = new List<int>(); 56 indicies = new List<int>();
57 indicies.Add(0); 57 indicies.Add(0);
58 indicies.Add(1); 58 indicies.Add(1);
59 indicies.Add(2); 59 indicies.Add(2);
60 numfaces = 1; 60 numfaces = 1;
61 } 61 }
62 62
63 public override void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart) 63 public override void GetLockedReadOnlyVertexIndexBase(out List<Vector3> verts, out List<int> indicies, out int numfaces, int subpart)
64 { 64 {
65 verts = new List<Vector3>(); 65 verts = new List<Vector3>();
66 for (int i = 0; i < 3; i++) 66 for (int i = 0; i < 3; i++)
67 { 67 {
68 verts.Add(_verts[subpart * 3 + i]); 68 verts.Add(_verts[subpart * 3 + i]);
69 } 69 }
70 indicies = new List<int>(); 70 indicies = new List<int>();
71 indicies.Add(0); 71 indicies.Add(0);
72 indicies.Add(1); 72 indicies.Add(1);
73 indicies.Add(2); 73 indicies.Add(2);
74 numfaces = 1; 74 numfaces = 1;
75 } 75 }
76 76
77 public override void UnLockVertexBase(int subpart) 77 public override void UnLockVertexBase(int subpart)
78 { 78 {
79 79
80 } 80 }
81 81
82 public override void UnLockReadOnlyVertexBase(int subpart) 82 public override void UnLockReadOnlyVertexBase(int subpart)
83 { 83 {
84 84
85 } 85 }
86 86
87 public override int SubPartsCount() 87 public override int SubPartsCount()
88 { 88 {
89 return _numTriangles; 89 return _numTriangles;
90 } 90 }
91 91
92 public override void PreallocateVertices(int numverts) 92 public override void PreallocateVertices(int numverts)
93 { 93 {
94 94
95 } 95 }
96 96
97 public override void PreallocateIndices(int numindices) 97 public override void PreallocateIndices(int numindices)
98 { 98 {
99 99
100 } 100 }
101 } 101 }
102} 102}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMeshShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMeshShape.cs
index bc8f09e..5f5a0cf 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMeshShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleMeshShape.cs
@@ -1,160 +1,160 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// Concave triangle mesh. Uses an interface to access the triangles to allow for sharing graphics/physics triangles. 30 /// Concave triangle mesh. Uses an interface to access the triangles to allow for sharing graphics/physics triangles.
31 /// </summary> 31 /// </summary>
32 public class TriangleMeshShape : ConcaveShape 32 public class TriangleMeshShape : ConcaveShape
33 { 33 {
34 private StridingMeshInterface _meshInterface; 34 private StridingMeshInterface _meshInterface;
35 private Vector3 _localAabbMin; 35 private Vector3 _localAabbMin;
36 private Vector3 _localAabbMax; 36 private Vector3 _localAabbMax;
37 37
38 public TriangleMeshShape(StridingMeshInterface meshInterface) 38 public TriangleMeshShape(StridingMeshInterface meshInterface)
39 { 39 {
40 this._meshInterface = meshInterface; 40 this._meshInterface = meshInterface;
41 RecalcLocalAabb(); 41 RecalcLocalAabb();
42 } 42 }
43 43
44 protected StridingMeshInterface MeshInterface { get { return _meshInterface; } set { _meshInterface = value; } } 44 protected StridingMeshInterface MeshInterface { get { return _meshInterface; } set { _meshInterface = value; } }
45 protected Vector3 LocalAabbMin { get { return _localAabbMin; } set { _localAabbMin = value; } } 45 protected Vector3 LocalAabbMin { get { return _localAabbMin; } set { _localAabbMin = value; } }
46 protected Vector3 LocalAabbMax { get { return _localAabbMax; } set { _localAabbMax = value; } } 46 protected Vector3 LocalAabbMax { get { return _localAabbMax; } set { _localAabbMax = value; } }
47 47
48 public override BroadphaseNativeTypes ShapeType 48 public override BroadphaseNativeTypes ShapeType
49 { 49 {
50 get 50 get
51 { 51 {
52 return BroadphaseNativeTypes.TriangleMesh; 52 return BroadphaseNativeTypes.TriangleMesh;
53 } 53 }
54 } 54 }
55 55
56 public override Vector3 LocalScaling 56 public override Vector3 LocalScaling
57 { 57 {
58 get 58 get
59 { 59 {
60 return _meshInterface.Scaling; 60 return _meshInterface.Scaling;
61 } 61 }
62 set 62 set
63 { 63 {
64 _meshInterface.Scaling = value; 64 _meshInterface.Scaling = value;
65 } 65 }
66 } 66 }
67 67
68 public override string Name 68 public override string Name
69 { 69 {
70 get 70 get
71 { 71 {
72 return "TriangleMesh"; 72 return "TriangleMesh";
73 } 73 }
74 } 74 }
75 75
76 public void RecalcLocalAabb() 76 public void RecalcLocalAabb()
77 { 77 {
78 { 78 {
79 Vector3 vec = new Vector3(); 79 Vector3 vec = new Vector3();
80 vec.X = 1f; 80 vec.X = 1f;
81 Vector3 tmp = LocalGetSupportingVertex(vec); 81 Vector3 tmp = LocalGetSupportingVertex(vec);
82 _localAabbMax.X = tmp.X + CollisionMargin; 82 _localAabbMax.X = tmp.X + CollisionMargin;
83 vec.X = -1f; 83 vec.X = -1f;
84 tmp = LocalGetSupportingVertex(vec); 84 tmp = LocalGetSupportingVertex(vec);
85 _localAabbMin.X = tmp.X - CollisionMargin; 85 _localAabbMin.X = tmp.X - CollisionMargin;
86 } 86 }
87 { 87 {
88 Vector3 vec = new Vector3(); 88 Vector3 vec = new Vector3();
89 vec.Y = 1f; 89 vec.Y = 1f;
90 Vector3 tmp = LocalGetSupportingVertex(vec); 90 Vector3 tmp = LocalGetSupportingVertex(vec);
91 _localAabbMax.Y = tmp.Y + CollisionMargin; 91 _localAabbMax.Y = tmp.Y + CollisionMargin;
92 vec.Y = -1f; 92 vec.Y = -1f;
93 tmp = LocalGetSupportingVertex(vec); 93 tmp = LocalGetSupportingVertex(vec);
94 _localAabbMin.Y = tmp.Y - CollisionMargin; 94 _localAabbMin.Y = tmp.Y - CollisionMargin;
95 } 95 }
96 { 96 {
97 Vector3 vec = new Vector3(); 97 Vector3 vec = new Vector3();
98 vec.Z = 1f; 98 vec.Z = 1f;
99 Vector3 tmp = LocalGetSupportingVertex(vec); 99 Vector3 tmp = LocalGetSupportingVertex(vec);
100 _localAabbMax.Z = tmp.Z + CollisionMargin; 100 _localAabbMax.Z = tmp.Z + CollisionMargin;
101 vec.Z = -1f; 101 vec.Z = -1f;
102 tmp = LocalGetSupportingVertex(vec); 102 tmp = LocalGetSupportingVertex(vec);
103 _localAabbMin.Z = tmp.Z - CollisionMargin; 103 _localAabbMin.Z = tmp.Z - CollisionMargin;
104 } 104 }
105 } 105 }
106 106
107 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) 107 public override void ProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax)
108 { 108 {
109 LocalProcessAllTriangles(callback, aabbMax, aabbMax); 109 LocalProcessAllTriangles(callback, aabbMax, aabbMax);
110 } 110 }
111 111
112 protected void LocalProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) 112 protected void LocalProcessAllTriangles(ITriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax)
113 { 113 {
114 FilteredCallback filterCallback = new FilteredCallback(callback, aabbMin, aabbMax); 114 FilteredCallback filterCallback = new FilteredCallback(callback, aabbMin, aabbMax);
115 _meshInterface.InternalProcessAllTriangles(filterCallback, aabbMin, aabbMax); 115 _meshInterface.InternalProcessAllTriangles(filterCallback, aabbMin, aabbMax);
116 } 116 }
117 117
118 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 118 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
119 { 119 {
120 Vector3 localHalfExtents = 0.5f * (_localAabbMax - _localAabbMin); 120 Vector3 localHalfExtents = 0.5f * (_localAabbMax - _localAabbMin);
121 Vector3 localCenter = 0.5f * (_localAabbMax + _localAabbMin); 121 Vector3 localCenter = 0.5f * (_localAabbMax + _localAabbMin);
122 122
123 Matrix abs_b = MathHelper.Absolute(t); 123 Matrix abs_b = MathHelper.Absolute(t);
124 124
125 Vector3 center = MathHelper.MatrixToVector(t, localCenter); 125 Vector3 center = MathHelper.MatrixToVector(t, localCenter);
126 126
127 Vector3 extent = new Vector3(Vector3.Dot(new Vector3(abs_b.M11, abs_b.M12, abs_b.M13), localHalfExtents), 127 Vector3 extent = new Vector3(Vector3.Dot(new Vector3(abs_b.M11, abs_b.M12, abs_b.M13), localHalfExtents),
128 Vector3.Dot(new Vector3(abs_b.M21, abs_b.M22, abs_b.M23), localHalfExtents), 128 Vector3.Dot(new Vector3(abs_b.M21, abs_b.M22, abs_b.M23), localHalfExtents),
129 Vector3.Dot(new Vector3(abs_b.M31, abs_b.M32, abs_b.M33), localHalfExtents)); 129 Vector3.Dot(new Vector3(abs_b.M31, abs_b.M32, abs_b.M33), localHalfExtents));
130 extent += new Vector3(Margin, Margin, Margin); 130 extent += new Vector3(Margin, Margin, Margin);
131 131
132 aabbMin = center - extent; 132 aabbMin = center - extent;
133 aabbMax = center + extent; 133 aabbMax = center + extent;
134 } 134 }
135 135
136 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 136 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
137 { 137 {
138 inertia = new Vector3(); 138 inertia = new Vector3();
139 //moving concave objects not supported 139 //moving concave objects not supported
140 BulletDebug.Assert(false); 140 BulletDebug.Assert(false);
141 } 141 }
142 142
143 public virtual Vector3 LocalGetSupportingVertex(Vector3 vec) 143 public virtual Vector3 LocalGetSupportingVertex(Vector3 vec)
144 { 144 {
145 Vector3 supportVertex; 145 Vector3 supportVertex;
146 Matrix ident = Matrix.Identity; 146 Matrix ident = Matrix.Identity;
147 SupportVertexCallback supportCallback = new SupportVertexCallback(vec, ident); 147 SupportVertexCallback supportCallback = new SupportVertexCallback(vec, ident);
148 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 148 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
149 LocalProcessAllTriangles(supportCallback, -aabbMax, aabbMax); 149 LocalProcessAllTriangles(supportCallback, -aabbMax, aabbMax);
150 supportVertex = supportCallback.SupportVertexLocal; 150 supportVertex = supportCallback.SupportVertexLocal;
151 return supportVertex; 151 return supportVertex;
152 } 152 }
153 153
154 public virtual Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 154 public virtual Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
155 { 155 {
156 BulletDebug.Assert(false); 156 BulletDebug.Assert(false);
157 return LocalGetSupportingVertex(vec); 157 return LocalGetSupportingVertex(vec);
158 } 158 }
159 } 159 }
160} 160}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleShape.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleShape.cs
index 59ffad0..d5a17f3 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleShape.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/CollisionShapes/TriangleShape.cs
@@ -1,187 +1,187 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class TriangleShape : PolyhedralConvexShape 29 public class TriangleShape : PolyhedralConvexShape
30 { 30 {
31 private Vector3[] _vertices = new Vector3[3]; 31 private Vector3[] _vertices = new Vector3[3];
32 32
33 public TriangleShape(Vector3 pointA, Vector3 pointB, Vector3 pointC) 33 public TriangleShape(Vector3 pointA, Vector3 pointB, Vector3 pointC)
34 { 34 {
35 _vertices[0] = pointA; 35 _vertices[0] = pointA;
36 _vertices[1] = pointB; 36 _vertices[1] = pointB;
37 _vertices[2] = pointC; 37 _vertices[2] = pointC;
38 } 38 }
39 39
40 public override int PreferredPenetrationDirectionsCount 40 public override int PreferredPenetrationDirectionsCount
41 { 41 {
42 get 42 get
43 { 43 {
44 return 2; 44 return 2;
45 } 45 }
46 } 46 }
47 47
48 public Vector3[] Vertices 48 public Vector3[] Vertices
49 { 49 {
50 get 50 get
51 { 51 {
52 return _vertices; 52 return _vertices;
53 } 53 }
54 } 54 }
55 55
56 public override int VertexCount 56 public override int VertexCount
57 { 57 {
58 get 58 get
59 { 59 {
60 return 3; 60 return 3;
61 } 61 }
62 } 62 }
63 63
64 public override int EdgeCount 64 public override int EdgeCount
65 { 65 {
66 get 66 get
67 { 67 {
68 return 3; 68 return 3;
69 } 69 }
70 } 70 }
71 71
72 public override int PlaneCount 72 public override int PlaneCount
73 { 73 {
74 get 74 get
75 { 75 {
76 return 1; 76 return 1;
77 } 77 }
78 } 78 }
79 79
80 public override BroadphaseNativeTypes ShapeType 80 public override BroadphaseNativeTypes ShapeType
81 { 81 {
82 get 82 get
83 { 83 {
84 return BroadphaseNativeTypes.Triangle; 84 return BroadphaseNativeTypes.Triangle;
85 } 85 }
86 } 86 }
87 87
88 public override string Name 88 public override string Name
89 { 89 {
90 get 90 get
91 { 91 {
92 return "Triangle"; 92 return "Triangle";
93 } 93 }
94 } 94 }
95 95
96 public override void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector) 96 public override void GetPreferredPenetrationDirection(int index, out Vector3 penetrationVector)
97 { 97 {
98 CalculateNormal(out penetrationVector); 98 CalculateNormal(out penetrationVector);
99 if (index != 0) 99 if (index != 0)
100 penetrationVector *= -1f; 100 penetrationVector *= -1f;
101 } 101 }
102 102
103 public virtual void GetPlaneEquation(int i, out Vector3 planeNormal, out Vector3 planeSupport) 103 public virtual void GetPlaneEquation(int i, out Vector3 planeNormal, out Vector3 planeSupport)
104 { 104 {
105 CalculateNormal(out planeNormal); 105 CalculateNormal(out planeNormal);
106 planeSupport = _vertices[0]; 106 planeSupport = _vertices[0];
107 } 107 }
108 108
109 public void CalculateNormal(out Vector3 normal) 109 public void CalculateNormal(out Vector3 normal)
110 { 110 {
111 normal = Vector3.Normalize(Vector3.Cross(_vertices[1] - _vertices[0], _vertices[2] - _vertices[0])); 111 normal = Vector3.Normalize(Vector3.Cross(_vertices[1] - _vertices[0], _vertices[2] - _vertices[0]));
112 } 112 }
113 113
114 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec) 114 public override Vector3 LocalGetSupportingVertexWithoutMargin(Vector3 vec)
115 { 115 {
116 Vector3 dots = new Vector3(Vector3.Dot(vec, _vertices[0]), Vector3.Dot(vec, _vertices[1]), Vector3.Dot(vec, _vertices[2])); 116 Vector3 dots = new Vector3(Vector3.Dot(vec, _vertices[0]), Vector3.Dot(vec, _vertices[1]), Vector3.Dot(vec, _vertices[2]));
117 return _vertices[MathHelper.MaxAxis(dots)]; 117 return _vertices[MathHelper.MaxAxis(dots)];
118 } 118 }
119 119
120 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut) 120 public override void BatchedUnitVectorGetSupportingVertexWithoutMargin(Vector3[] vectors, Vector3[] supportVerticesOut)
121 { 121 {
122 for (int i = 0; i < vectors.Length; i++) 122 for (int i = 0; i < vectors.Length; i++)
123 { 123 {
124 Vector3 dir = vectors[i]; 124 Vector3 dir = vectors[i];
125 Vector3 dots = new Vector3(Vector3.Dot(dir, _vertices[0]), Vector3.Dot(dir, _vertices[1]), Vector3.Dot(dir, _vertices[2])); 125 Vector3 dots = new Vector3(Vector3.Dot(dir, _vertices[0]), Vector3.Dot(dir, _vertices[1]), Vector3.Dot(dir, _vertices[2]));
126 supportVerticesOut[i] = _vertices[MathHelper.MaxAxis(dots)]; 126 supportVerticesOut[i] = _vertices[MathHelper.MaxAxis(dots)];
127 } 127 }
128 } 128 }
129 129
130 public override void CalculateLocalInertia(float mass, out Vector3 inertia) 130 public override void CalculateLocalInertia(float mass, out Vector3 inertia)
131 { 131 {
132 inertia = new Vector3(); 132 inertia = new Vector3();
133 BulletDebug.Assert(false); 133 BulletDebug.Assert(false);
134 } 134 }
135 135
136 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb) 136 public override void GetEdge(int i, out Vector3 pa, out Vector3 pb)
137 { 137 {
138 GetVertex(i, out pa); 138 GetVertex(i, out pa);
139 GetVertex((i + 1) % 3, out pb); 139 GetVertex((i + 1) % 3, out pb);
140 } 140 }
141 141
142 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax) 142 public override void GetAabb(Matrix t, out Vector3 aabbMin, out Vector3 aabbMax)
143 { 143 {
144 GetAabbSlow(t, out aabbMin, out aabbMax); 144 GetAabbSlow(t, out aabbMin, out aabbMax);
145 } 145 }
146 146
147 public override void GetVertex(int i, out Vector3 vtx) 147 public override void GetVertex(int i, out Vector3 vtx)
148 { 148 {
149 vtx = _vertices[i]; 149 vtx = _vertices[i];
150 } 150 }
151 151
152 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i) 152 public override void GetPlane(out Vector3 planeNormal, out Vector3 planeSupport, int i)
153 { 153 {
154 GetPlaneEquation(i, out planeNormal, out planeSupport); 154 GetPlaneEquation(i, out planeNormal, out planeSupport);
155 } 155 }
156 156
157 public override bool IsInside(Vector3 pt, float tolerance) 157 public override bool IsInside(Vector3 pt, float tolerance)
158 { 158 {
159 Vector3 normal; 159 Vector3 normal;
160 CalculateNormal(out normal); 160 CalculateNormal(out normal);
161 //distance to plane 161 //distance to plane
162 float dist = Vector3.Dot(pt, normal); 162 float dist = Vector3.Dot(pt, normal);
163 float planeconst = Vector3.Dot(_vertices[0], normal); 163 float planeconst = Vector3.Dot(_vertices[0], normal);
164 dist -= planeconst; 164 dist -= planeconst;
165 if (dist >= -tolerance && dist <= tolerance) 165 if (dist >= -tolerance && dist <= tolerance)
166 { 166 {
167 //inside check on edge-planes 167 //inside check on edge-planes
168 int i; 168 int i;
169 for (i = 0; i < 3; i++) 169 for (i = 0; i < 3; i++)
170 { 170 {
171 Vector3 pa, pb; 171 Vector3 pa, pb;
172 GetEdge(i, out pa, out pb); 172 GetEdge(i, out pa, out pb);
173 Vector3 edge = pb - pa; 173 Vector3 edge = pb - pa;
174 Vector3 edgeNormal = Vector3.Cross(edge, normal); 174 Vector3 edgeNormal = Vector3.Cross(edge, normal);
175 edgeNormal = Vector3.Normalize(edgeNormal); 175 edgeNormal = Vector3.Normalize(edgeNormal);
176 float distance = Vector3.Dot(pt, edgeNormal); 176 float distance = Vector3.Dot(pt, edgeNormal);
177 float edgeConst = Vector3.Dot(pa, edgeNormal); 177 float edgeConst = Vector3.Dot(pa, edgeNormal);
178 distance -= edgeConst; 178 distance -= edgeConst;
179 if (distance < -tolerance) 179 if (distance < -tolerance)
180 return false; 180 return false;
181 } 181 }
182 return true; 182 return true;
183 } 183 }
184 return false; 184 return false;
185 } 185 }
186 } 186 }
187} 187}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ContinuousConvexCollision.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ContinuousConvexCollision.cs
index 497f220..d011ef2 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ContinuousConvexCollision.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ContinuousConvexCollision.cs
@@ -1,199 +1,199 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// ContinuousConvexCollision implements angular and linear time of impact for convex objects. 30 /// ContinuousConvexCollision implements angular and linear time of impact for convex objects.
31 /// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis). 31 /// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
32 /// Algorithm operates in worldspace, in order to keep inbetween motion globally consistent. 32 /// Algorithm operates in worldspace, in order to keep inbetween motion globally consistent.
33 /// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops 33 /// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops
34 /// </summary> 34 /// </summary>
35 public class ContinuousConvexCollision : IConvexCast 35 public class ContinuousConvexCollision : IConvexCast
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// This maximum should not be necessary. It allows for untested/degenerate cases in production code. 38 /// This maximum should not be necessary. It allows for untested/degenerate cases in production code.
39 /// You don't want your game ever to lock-up. 39 /// You don't want your game ever to lock-up.
40 /// </summary> 40 /// </summary>
41 private const int MaxIterations = 1000; 41 private const int MaxIterations = 1000;
42 42
43 private ISimplexSolver _simplexSolver; 43 private ISimplexSolver _simplexSolver;
44 private IConvexPenetrationDepthSolver _penetrationDepthSolver; 44 private IConvexPenetrationDepthSolver _penetrationDepthSolver;
45 private ConvexShape _convexA; 45 private ConvexShape _convexA;
46 private ConvexShape _convexB; 46 private ConvexShape _convexB;
47 47
48 public ContinuousConvexCollision(ConvexShape convexA, ConvexShape convexB, 48 public ContinuousConvexCollision(ConvexShape convexA, ConvexShape convexB,
49 ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver) 49 ISimplexSolver simplexSolver, IConvexPenetrationDepthSolver penetrationDepthSolver)
50 { 50 {
51 _simplexSolver = simplexSolver; 51 _simplexSolver = simplexSolver;
52 _penetrationDepthSolver = penetrationDepthSolver; 52 _penetrationDepthSolver = penetrationDepthSolver;
53 _convexA = convexA; 53 _convexA = convexA;
54 _convexB = convexB; 54 _convexB = convexB;
55 } 55 }
56 56
57 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result) 57 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result)
58 { 58 {
59 _simplexSolver.Reset(); 59 _simplexSolver.Reset();
60 60
61 // compute linear and angular velocity for this interval, to interpolate 61 // compute linear and angular velocity for this interval, to interpolate
62 Vector3 linVelA = new Vector3(), angVelA = new Vector3(), linVelB = new Vector3(), angVelB = new Vector3(); 62 Vector3 linVelA = new Vector3(), angVelA = new Vector3(), linVelB = new Vector3(), angVelB = new Vector3();
63 TransformUtil.CalculateVelocity(fromA, toA, 1f, ref linVelA, ref angVelA); 63 TransformUtil.CalculateVelocity(fromA, toA, 1f, ref linVelA, ref angVelA);
64 TransformUtil.CalculateVelocity(fromB, toB, 1f, ref linVelB, ref angVelB); 64 TransformUtil.CalculateVelocity(fromB, toB, 1f, ref linVelB, ref angVelB);
65 65
66 float boundingRadiusA = _convexA.GetAngularMotionDisc(); 66 float boundingRadiusA = _convexA.GetAngularMotionDisc();
67 float boundingRadiusB = _convexB.GetAngularMotionDisc(); 67 float boundingRadiusB = _convexB.GetAngularMotionDisc();
68 68
69 float maxAngularProjectedVelocity = angVelA.Length() * boundingRadiusA + 69 float maxAngularProjectedVelocity = angVelA.Length() * boundingRadiusA +
70 angVelB.Length() * boundingRadiusB; 70 angVelB.Length() * boundingRadiusB;
71 71
72 float radius = 0.001f; 72 float radius = 0.001f;
73 73
74 float lambda = 0f; 74 float lambda = 0f;
75 Vector3 v = new Vector3(1f, 0f, 0f); 75 Vector3 v = new Vector3(1f, 0f, 0f);
76 76
77 int maxIter = MaxIterations; 77 int maxIter = MaxIterations;
78 78
79 Vector3 n = new Vector3(); 79 Vector3 n = new Vector3();
80 bool hasResult = false; 80 bool hasResult = false;
81 Vector3 c; 81 Vector3 c;
82 82
83 float lastLambda = lambda; 83 float lastLambda = lambda;
84 //float epsilon = 0.001f; 84 //float epsilon = 0.001f;
85 85
86 int numIter = 0; 86 int numIter = 0;
87 //first solution, using GJK 87 //first solution, using GJK
88 88
89 89
90 Matrix identityTrans = Matrix.Identity; 90 Matrix identityTrans = Matrix.Identity;
91 91
92 SphereShape raySphere = new SphereShape(0f); 92 SphereShape raySphere = new SphereShape(0f);
93 raySphere.Margin=0f; 93 raySphere.Margin=0f;
94 94
95 95
96 //result.drawCoordSystem(sphereTr); 96 //result.drawCoordSystem(sphereTr);
97 97
98 PointCollector pointCollector1 = new PointCollector(); 98 PointCollector pointCollector1 = new PointCollector();
99 99
100 GjkPairDetector gjk = new GjkPairDetector(_convexA, _convexB, (VoronoiSimplexSolver)_simplexSolver, _penetrationDepthSolver); 100 GjkPairDetector gjk = new GjkPairDetector(_convexA, _convexB, (VoronoiSimplexSolver)_simplexSolver, _penetrationDepthSolver);
101 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 101 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
102 102
103 //we don't use margins during CCD 103 //we don't use margins during CCD
104 gjk.setIgnoreMargin(true); 104 gjk.setIgnoreMargin(true);
105 105
106 input.TransformA = fromA; 106 input.TransformA = fromA;
107 input.TransformB = fromB; 107 input.TransformB = fromB;
108 108
109 DiscreteCollisionDetectorInterface.Result r = (DiscreteCollisionDetectorInterface.Result)pointCollector1; 109 DiscreteCollisionDetectorInterface.Result r = (DiscreteCollisionDetectorInterface.Result)pointCollector1;
110 gjk.GetClosestPoints(input, r, null); 110 gjk.GetClosestPoints(input, r, null);
111 111
112 hasResult = pointCollector1.HasResult; 112 hasResult = pointCollector1.HasResult;
113 c = pointCollector1.PointInWorld; 113 c = pointCollector1.PointInWorld;
114 114
115 if (hasResult) 115 if (hasResult)
116 { 116 {
117 float dist; 117 float dist;
118 dist = pointCollector1.Distance; 118 dist = pointCollector1.Distance;
119 n = pointCollector1.NormalOnBInWorld; 119 n = pointCollector1.NormalOnBInWorld;
120 120
121 //not close enough 121 //not close enough
122 while (dist > radius) 122 while (dist > radius)
123 { 123 {
124 numIter++; 124 numIter++;
125 if (numIter > maxIter) 125 if (numIter > maxIter)
126 return false; //todo: report a failure 126 return false; //todo: report a failure
127 127
128 float dLambda = 0f; 128 float dLambda = 0f;
129 129
130 //calculate safe moving fraction from distance / (linear+rotational velocity) 130 //calculate safe moving fraction from distance / (linear+rotational velocity)
131 131
132 //float clippedDist = GEN_min(angularConservativeRadius,dist); 132 //float clippedDist = GEN_min(angularConservativeRadius,dist);
133 //float clippedDist = dist; 133 //float clippedDist = dist;
134 134
135 float projectedLinearVelocity = Vector3.Dot(linVelB - linVelA, n); 135 float projectedLinearVelocity = Vector3.Dot(linVelB - linVelA, n);
136 136
137 dLambda = dist / (projectedLinearVelocity + maxAngularProjectedVelocity); 137 dLambda = dist / (projectedLinearVelocity + maxAngularProjectedVelocity);
138 138
139 lambda = lambda + dLambda; 139 lambda = lambda + dLambda;
140 140
141 if (lambda > 1f) return false; 141 if (lambda > 1f) return false;
142 if (lambda < 0f) return false; 142 if (lambda < 0f) return false;
143 143
144 //todo: next check with relative epsilon 144 //todo: next check with relative epsilon
145 if (lambda <= lastLambda) 145 if (lambda <= lastLambda)
146 break; 146 break;
147 lastLambda = lambda; 147 lastLambda = lambda;
148 148
149 149
150 //interpolate to next lambda 150 //interpolate to next lambda
151 Matrix interpolatedTransA = new Matrix(), interpolatedTransB = new Matrix(), relativeTrans; 151 Matrix interpolatedTransA = new Matrix(), interpolatedTransB = new Matrix(), relativeTrans;
152 152
153 TransformUtil.IntegrateTransform(fromA, linVelA, angVelA, lambda, ref interpolatedTransA); 153 TransformUtil.IntegrateTransform(fromA, linVelA, angVelA, lambda, ref interpolatedTransA);
154 TransformUtil.IntegrateTransform(fromB, linVelB, angVelB, lambda, ref interpolatedTransB); 154 TransformUtil.IntegrateTransform(fromB, linVelB, angVelB, lambda, ref interpolatedTransB);
155 155
156 relativeTrans = MathHelper.InverseTimes(interpolatedTransB, interpolatedTransA); 156 relativeTrans = MathHelper.InverseTimes(interpolatedTransB, interpolatedTransA);
157 157
158 result.DebugDraw(lambda); 158 result.DebugDraw(lambda);
159 159
160 PointCollector pointCollector = new PointCollector(); 160 PointCollector pointCollector = new PointCollector();
161 gjk = new GjkPairDetector(_convexA, _convexB, (VoronoiSimplexSolver)_simplexSolver, _penetrationDepthSolver); 161 gjk = new GjkPairDetector(_convexA, _convexB, (VoronoiSimplexSolver)_simplexSolver, _penetrationDepthSolver);
162 input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 162 input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
163 input.TransformA = interpolatedTransA; 163 input.TransformA = interpolatedTransA;
164 input.TransformB = interpolatedTransB; 164 input.TransformB = interpolatedTransB;
165 165
166 // !!!!!!!!!! 166 // !!!!!!!!!!
167 r = (DiscreteCollisionDetectorInterface.Result)pointCollector1; 167 r = (DiscreteCollisionDetectorInterface.Result)pointCollector1;
168 gjk.GetClosestPoints(input, r, null); 168 gjk.GetClosestPoints(input, r, null);
169 169
170 if (pointCollector.HasResult) 170 if (pointCollector.HasResult)
171 { 171 {
172 if (pointCollector.Distance < 0f) 172 if (pointCollector.Distance < 0f)
173 { 173 {
174 //degenerate ?! 174 //degenerate ?!
175 result.Fraction = lastLambda; 175 result.Fraction = lastLambda;
176 result.Normal = n; 176 result.Normal = n;
177 return true; 177 return true;
178 } 178 }
179 c = pointCollector.PointInWorld; 179 c = pointCollector.PointInWorld;
180 180
181 dist = pointCollector.Distance; 181 dist = pointCollector.Distance;
182 } 182 }
183 else 183 else
184 { 184 {
185 //?? 185 //??
186 return false; 186 return false;
187 } 187 }
188 188
189 } 189 }
190 190
191 result.Fraction = lambda; 191 result.Fraction = lambda;
192 result.Normal = n; 192 result.Normal = n;
193 return true; 193 return true;
194 } 194 }
195 195
196 return false; 196 return false;
197 } 197 }
198 } 198 }
199} 199}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ConvexCast.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ConvexCast.cs
index 9e88a7e..93501ed 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ConvexCast.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ConvexCast.cs
@@ -1,73 +1,73 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 29
30 /// <summary> 30 /// <summary>
31 /// CastResult stores the closest result 31 /// CastResult stores the closest result
32 /// alternatively, add a callback method to decide about closest/all results 32 /// alternatively, add a callback method to decide about closest/all results
33 /// </summary> 33 /// </summary>
34 public class CastResult 34 public class CastResult
35 { 35 {
36 private Vector3 _normal; 36 private Vector3 _normal;
37 private float _fraction; 37 private float _fraction;
38 private Matrix _hitTransformA; 38 private Matrix _hitTransformA;
39 private Matrix _hitTransformB; 39 private Matrix _hitTransformB;
40 private IDebugDraw _debugDrawer; 40 private IDebugDraw _debugDrawer;
41 41
42 public CastResult() 42 public CastResult()
43 { 43 {
44 _fraction = 1e30f; 44 _fraction = 1e30f;
45 } 45 }
46 46
47 public Vector3 Normal { get { return _normal; } set { _normal = value; } } 47 public Vector3 Normal { get { return _normal; } set { _normal = value; } }
48 public float Fraction { get { return _fraction; } set { _fraction = value; } } 48 public float Fraction { get { return _fraction; } set { _fraction = value; } }
49 public Matrix HitTransformA { get { return _hitTransformA; } set { _hitTransformA = value; } } 49 public Matrix HitTransformA { get { return _hitTransformA; } set { _hitTransformA = value; } }
50 public Matrix HitTransformB { get { return _hitTransformB; } set { _hitTransformB = value; } } 50 public Matrix HitTransformB { get { return _hitTransformB; } set { _hitTransformB = value; } }
51 public IDebugDraw DebugDrawer { get { return _debugDrawer; } set { _debugDrawer = value; } } 51 public IDebugDraw DebugDrawer { get { return _debugDrawer; } set { _debugDrawer = value; } }
52 52
53 public virtual void DebugDraw(float fraction) { } 53 public virtual void DebugDraw(float fraction) { }
54 public virtual void DrawCoordSystem(Matrix trans) { } 54 public virtual void DrawCoordSystem(Matrix trans) { }
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// ConvexCast is an interface for Casting 58 /// ConvexCast is an interface for Casting
59 /// </summary> 59 /// </summary>
60 public interface IConvexCast 60 public interface IConvexCast
61 { 61 {
62 /// <summary> 62 /// <summary>
63 /// cast a convex against another convex object 63 /// cast a convex against another convex object
64 /// </summary> 64 /// </summary>
65 /// <param name="fromA"></param> 65 /// <param name="fromA"></param>
66 /// <param name="toA"></param> 66 /// <param name="toA"></param>
67 /// <param name="fromB"></param> 67 /// <param name="fromB"></param>
68 /// <param name="toB"></param> 68 /// <param name="toB"></param>
69 /// <param name="result"></param> 69 /// <param name="result"></param>
70 /// <returns></returns> 70 /// <returns></returns>
71 bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result); 71 bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result);
72 } 72 }
73} 73}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/DiscreteCollisionDetectorInterface.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/DiscreteCollisionDetectorInterface.cs
index fae2557..5b07d9b 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/DiscreteCollisionDetectorInterface.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/DiscreteCollisionDetectorInterface.cs
@@ -1,117 +1,117 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public abstract class DiscreteCollisionDetectorInterface 29 public abstract class DiscreteCollisionDetectorInterface
30 { 30 {
31 public abstract class Result 31 public abstract class Result
32 { 32 {
33 public abstract void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB); 33 public abstract void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB);
34 public abstract void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth); 34 public abstract void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth);
35 } 35 }
36 36
37 public class ClosestPointInput 37 public class ClosestPointInput
38 { 38 {
39 private float _maximumDistanceSquared; 39 private float _maximumDistanceSquared;
40 private Matrix _transformA, _transformB; 40 private Matrix _transformA, _transformB;
41 41
42 #region Properties 42 #region Properties
43 public Matrix TransformB 43 public Matrix TransformB
44 { 44 {
45 get { return _transformB; } 45 get { return _transformB; }
46 set { _transformB = value; } 46 set { _transformB = value; }
47 } 47 }
48 48
49 public Matrix TransformA 49 public Matrix TransformA
50 { 50 {
51 get { return _transformA; } 51 get { return _transformA; }
52 set { _transformA = value; } 52 set { _transformA = value; }
53 } 53 }
54 54
55 public float MaximumDistanceSquared 55 public float MaximumDistanceSquared
56 { 56 {
57 get { return _maximumDistanceSquared; } 57 get { return _maximumDistanceSquared; }
58 set { _maximumDistanceSquared = value; } 58 set { _maximumDistanceSquared = value; }
59 } 59 }
60 #endregion 60 #endregion
61 61
62 public ClosestPointInput() 62 public ClosestPointInput()
63 { 63 {
64 _maximumDistanceSquared = 1e30f; 64 _maximumDistanceSquared = 1e30f;
65 } 65 }
66 } 66 }
67 67
68 public abstract void GetClosestPoints(ClosestPointInput input, Result output, IDebugDraw debugDraw); 68 public abstract void GetClosestPoints(ClosestPointInput input, Result output, IDebugDraw debugDraw);
69 } 69 }
70 70
71 public class StorageResult : DiscreteCollisionDetectorInterface.Result 71 public class StorageResult : DiscreteCollisionDetectorInterface.Result
72 { 72 {
73 private Vector3 _closestPointInB; 73 private Vector3 _closestPointInB;
74 private Vector3 _normalOnSurfaceB; 74 private Vector3 _normalOnSurfaceB;
75 private float _distance; //negative means penetration ! 75 private float _distance; //negative means penetration !
76 76
77 #region Properties 77 #region Properties
78 78
79 public float Distance 79 public float Distance
80 { 80 {
81 get { return _distance; } 81 get { return _distance; }
82 set { _distance = value; } 82 set { _distance = value; }
83 } 83 }
84 public Vector3 NormalOnSurfaceB 84 public Vector3 NormalOnSurfaceB
85 { 85 {
86 get { return _normalOnSurfaceB; } 86 get { return _normalOnSurfaceB; }
87 set { _normalOnSurfaceB = value; } 87 set { _normalOnSurfaceB = value; }
88 } 88 }
89 public Vector3 ClosestPointInB 89 public Vector3 ClosestPointInB
90 { 90 {
91 get { return _closestPointInB; } 91 get { return _closestPointInB; }
92 set { _closestPointInB = value; } 92 set { _closestPointInB = value; }
93 } 93 }
94 94
95 #endregion 95 #endregion
96 96
97 public StorageResult() 97 public StorageResult()
98 { 98 {
99 _distance = 1e30f; 99 _distance = 1e30f;
100 } 100 }
101 101
102 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) 102 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth)
103 { 103 {
104 if (depth < _distance) 104 if (depth < _distance)
105 { 105 {
106 _normalOnSurfaceB = normalOnBInWorld; 106 _normalOnSurfaceB = normalOnBInWorld;
107 _closestPointInB = pointInWorld; 107 _closestPointInB = pointInWorld;
108 _distance = depth; 108 _distance = depth;
109 } 109 }
110 } 110 }
111 111
112 public override void SetShapeIdentifiers(int partId0, int index0, int partId1, int index1) 112 public override void SetShapeIdentifiers(int partId0, int index0, int partId1, int index1)
113 { 113 {
114 throw new Exception("The method or operation is not implemented."); 114 throw new Exception("The method or operation is not implemented.");
115 } 115 }
116 } 116 }
117} 117}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkConvexCast.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkConvexCast.cs
index 4ee9599..ea7d335 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkConvexCast.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkConvexCast.cs
@@ -1,176 +1,176 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// GjkConvexCast performs a raycast on a convex object using support mapping. 30 /// GjkConvexCast performs a raycast on a convex object using support mapping.
31 /// </summary> 31 /// </summary>
32 public class GjkConvexCast : IConvexCast 32 public class GjkConvexCast : IConvexCast
33 { 33 {
34 private VoronoiSimplexSolver _simplexSolver; 34 private VoronoiSimplexSolver _simplexSolver;
35 private ConvexShape _convexA, _convexB; 35 private ConvexShape _convexA, _convexB;
36 36
37 public GjkConvexCast(ConvexShape convexShapeA, ConvexShape convexShapeB, VoronoiSimplexSolver solver) 37 public GjkConvexCast(ConvexShape convexShapeA, ConvexShape convexShapeB, VoronoiSimplexSolver solver)
38 { 38 {
39 _simplexSolver = solver; 39 _simplexSolver = solver;
40 40
41 _convexA = convexShapeA; 41 _convexA = convexShapeA;
42 _convexB = convexShapeB; 42 _convexB = convexShapeB;
43 } 43 }
44 44
45 #region IConvexCast Members 45 #region IConvexCast Members
46 46
47 /// <summary> 47 /// <summary>
48 /// cast a convex against another convex object 48 /// cast a convex against another convex object
49 /// </summary> 49 /// </summary>
50 /// <param name="fromA"></param> 50 /// <param name="fromA"></param>
51 /// <param name="toA"></param> 51 /// <param name="toA"></param>
52 /// <param name="fromB"></param> 52 /// <param name="fromB"></param>
53 /// <param name="toB"></param> 53 /// <param name="toB"></param>
54 /// <param name="result"></param> 54 /// <param name="result"></param>
55 /// <returns></returns> 55 /// <returns></returns>
56 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result) 56 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result)
57 { 57 {
58 MinkowskiSumShape combined = new MinkowskiSumShape(_convexA, _convexB); 58 MinkowskiSumShape combined = new MinkowskiSumShape(_convexA, _convexB);
59 59
60 Matrix rayFromLocalA = MathHelper.InvertMatrix(fromA) * fromB; 60 Matrix rayFromLocalA = MathHelper.InvertMatrix(fromA) * fromB;
61 Matrix rayToLocalA = MathHelper.InvertMatrix(toA) * toB; 61 Matrix rayToLocalA = MathHelper.InvertMatrix(toA) * toB;
62 62
63 Matrix transformA = fromA; 63 Matrix transformA = fromA;
64 Matrix transformB = fromB; 64 Matrix transformB = fromB;
65 65
66 transformA.Translation = new Vector3(0, 0, 0); 66 transformA.Translation = new Vector3(0, 0, 0);
67 transformB.Translation = new Vector3(0, 0, 0); 67 transformB.Translation = new Vector3(0, 0, 0);
68 68
69 combined.TransformA = transformA; 69 combined.TransformA = transformA;
70 combined.TransformB = transformB; 70 combined.TransformB = transformB;
71 71
72 float radius = 0.01f; 72 float radius = 0.01f;
73 float lambda = 0; 73 float lambda = 0;
74 74
75 Vector3 s = rayFromLocalA.Translation; 75 Vector3 s = rayFromLocalA.Translation;
76 Vector3 r = rayToLocalA.Translation - rayFromLocalA.Translation; 76 Vector3 r = rayToLocalA.Translation - rayFromLocalA.Translation;
77 Vector3 x = s; 77 Vector3 x = s;
78 Vector3 n = new Vector3(); 78 Vector3 n = new Vector3();
79 Vector3 c = new Vector3(); 79 Vector3 c = new Vector3();
80 80
81 bool hasResult = false; 81 bool hasResult = false;
82 float lastLambda = lambda; 82 float lastLambda = lambda;
83 83
84 IConvexPenetrationDepthSolver penSolver = null; 84 IConvexPenetrationDepthSolver penSolver = null;
85 Matrix identityTransform = Matrix.Identity; 85 Matrix identityTransform = Matrix.Identity;
86 86
87 SphereShape raySphere = new SphereShape(0.0f); 87 SphereShape raySphere = new SphereShape(0.0f);
88 raySphere.Margin=0.0f; 88 raySphere.Margin=0.0f;
89 89
90 Matrix sphereTransform = Matrix.Identity; 90 Matrix sphereTransform = Matrix.Identity;
91 sphereTransform.Translation = rayFromLocalA.Translation; 91 sphereTransform.Translation = rayFromLocalA.Translation;
92 92
93 result.DrawCoordSystem(sphereTransform); 93 result.DrawCoordSystem(sphereTransform);
94 94
95 { 95 {
96 PointCollector pointCollector = new PointCollector(); 96 PointCollector pointCollector = new PointCollector();
97 GjkPairDetector gjk = new GjkPairDetector(raySphere, combined, _simplexSolver, penSolver); 97 GjkPairDetector gjk = new GjkPairDetector(raySphere, combined, _simplexSolver, penSolver);
98 98
99 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 99 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
100 input.TransformA = sphereTransform; 100 input.TransformA = sphereTransform;
101 input.TransformB = identityTransform; 101 input.TransformB = identityTransform;
102 102
103 gjk.GetClosestPoints(input, pointCollector, null); 103 gjk.GetClosestPoints(input, pointCollector, null);
104 104
105 hasResult = pointCollector.HasResult; 105 hasResult = pointCollector.HasResult;
106 106
107 c = pointCollector.PointInWorld; 107 c = pointCollector.PointInWorld;
108 n = pointCollector.NormalOnBInWorld; 108 n = pointCollector.NormalOnBInWorld;
109 } 109 }
110 110
111 if (hasResult) 111 if (hasResult)
112 { 112 {
113 float dist = (c - x).Length(); 113 float dist = (c - x).Length();
114 114
115 if (dist < radius) 115 if (dist < radius)
116 { 116 {
117 lastLambda = 1.0f; 117 lastLambda = 1.0f;
118 } 118 }
119 119
120 while (dist > radius) 120 while (dist > radius)
121 { 121 {
122 n = x - c; 122 n = x - c;
123 float dot = Vector3.Dot(n, r); 123 float dot = Vector3.Dot(n, r);
124 124
125 if (dot >= -(MathHelper.Epsilon * MathHelper.Epsilon)) return false; 125 if (dot >= -(MathHelper.Epsilon * MathHelper.Epsilon)) return false;
126 126
127 lambda = lambda - Vector3.Distance(n, n) / dot; 127 lambda = lambda - Vector3.Distance(n, n) / dot;
128 if (lambda <= lastLambda) break; 128 if (lambda <= lastLambda) break;
129 129
130 lastLambda = lambda; 130 lastLambda = lambda;
131 131
132 x = s + lambda * r; 132 x = s + lambda * r;
133 133
134 sphereTransform.Translation = x; 134 sphereTransform.Translation = x;
135 result.DrawCoordSystem(sphereTransform); 135 result.DrawCoordSystem(sphereTransform);
136 PointCollector pointCollector = new PointCollector(); 136 PointCollector pointCollector = new PointCollector();
137 137
138 GjkPairDetector gjk = new GjkPairDetector(raySphere, combined, _simplexSolver, penSolver); 138 GjkPairDetector gjk = new GjkPairDetector(raySphere, combined, _simplexSolver, penSolver);
139 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 139 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
140 input.TransformA = sphereTransform; 140 input.TransformA = sphereTransform;
141 input.TransformB = identityTransform; 141 input.TransformB = identityTransform;
142 142
143 gjk.GetClosestPoints(input, pointCollector, null); 143 gjk.GetClosestPoints(input, pointCollector, null);
144 144
145 if (pointCollector.HasResult) 145 if (pointCollector.HasResult)
146 { 146 {
147 if (pointCollector.Distance < 0.0f) 147 if (pointCollector.Distance < 0.0f)
148 { 148 {
149 result.Fraction = lastLambda; 149 result.Fraction = lastLambda;
150 result.Normal = n; 150 result.Normal = n;
151 return true; 151 return true;
152 } 152 }
153 153
154 c = pointCollector.PointInWorld; 154 c = pointCollector.PointInWorld;
155 dist = (c - x).Length(); 155 dist = (c - x).Length();
156 } 156 }
157 else 157 else
158 { 158 {
159 return false; 159 return false;
160 } 160 }
161 } 161 }
162 162
163 if (lastLambda < 1.0f) 163 if (lastLambda < 1.0f)
164 { 164 {
165 result.Fraction = lastLambda; 165 result.Fraction = lastLambda;
166 result.Normal = n; 166 result.Normal = n;
167 return true; 167 return true;
168 } 168 }
169 } 169 }
170 170
171 return false; 171 return false;
172 } 172 }
173 173
174 #endregion 174 #endregion
175 } 175 }
176} 176}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpa.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpa.cs
index 50ae7ab..a3064db 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpa.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpa.cs
@@ -1,633 +1,633 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// GJK-EPA collision solver by Nathanael Presson 30 /// GJK-EPA collision solver by Nathanael Presson
31 /// Nov.2006 31 /// Nov.2006
32 /// </summary> 32 /// </summary>
33 public class GjkEpa 33 public class GjkEpa
34 { 34 {
35 //private static readonly int _precision = 1 /* U(sizeof(F) == 4)*/; 35 //private static readonly int _precision = 1 /* U(sizeof(F) == 4)*/;
36 36
37 private static readonly float _infinity = MathHelper.Infinity; 37 private static readonly float _infinity = MathHelper.Infinity;
38 //private static readonly float _pi = (float)Math.PI; 38 //private static readonly float _pi = (float)Math.PI;
39 private static readonly float _twoPi = (float)(Math.PI * 2); 39 private static readonly float _twoPi = (float)(Math.PI * 2);
40 40
41 private static readonly int _gjkMaxIterations = 128; 41 private static readonly int _gjkMaxIterations = 128;
42 private static readonly int _gjkHashSize = 1 << 6; 42 private static readonly int _gjkHashSize = 1 << 6;
43 private static readonly int _gjkHashMask = _gjkHashSize - 1; 43 private static readonly int _gjkHashMask = _gjkHashSize - 1;
44 private static readonly float _gjkInSimplexEpsilon = 0.0001f; 44 private static readonly float _gjkInSimplexEpsilon = 0.0001f;
45 private static readonly float _gjkSquareInSimplexEpsilon = _gjkInSimplexEpsilon * _gjkInSimplexEpsilon; 45 private static readonly float _gjkSquareInSimplexEpsilon = _gjkInSimplexEpsilon * _gjkInSimplexEpsilon;
46 46
47 private static readonly int _epaMaxIterations = 256; 47 private static readonly int _epaMaxIterations = 256;
48 private static readonly float _epaInFaceEpsilon = 0.01f; 48 private static readonly float _epaInFaceEpsilon = 0.01f;
49 private static readonly float _epaAccuracy = 0.001f; 49 private static readonly float _epaAccuracy = 0.001f;
50 50
51 public static float EpaAccuracy { get { return _epaAccuracy; } } 51 public static float EpaAccuracy { get { return _epaAccuracy; } }
52 52
53 private static float Abs(float v) { return (v < 0 ? -v : v); } 53 private static float Abs(float v) { return (v < 0 ? -v : v); }
54 private static float Sign(float v) { return (v < 0 ? -1 : 1); } 54 private static float Sign(float v) { return (v < 0 ? -1 : 1); }
55 55
56 static void Swap<T>(ref T a, ref T b) 56 static void Swap<T>(ref T a, ref T b)
57 { 57 {
58 T t = a; 58 T t = a;
59 a = b; 59 a = b;
60 b = t; 60 b = t;
61 } 61 }
62 62
63 public class Gjk 63 public class Gjk
64 { 64 {
65 public class MinkowskiVertice 65 public class MinkowskiVertice
66 { 66 {
67 private Vector3 _vertice; /* Minkowski vertice */ 67 private Vector3 _vertice; /* Minkowski vertice */
68 private Vector3 _ray; /* Ray */ 68 private Vector3 _ray; /* Ray */
69 69
70 public Vector3 Vertice { get { return _vertice; } set { _vertice = value; } } 70 public Vector3 Vertice { get { return _vertice; } set { _vertice = value; } }
71 public Vector3 Ray { get { return _ray; } set { _ray = value; } } 71 public Vector3 Ray { get { return _ray; } set { _ray = value; } }
72 } 72 }
73 public class He 73 public class He
74 { 74 {
75 private Vector3 _ray; 75 private Vector3 _ray;
76 private He _next; 76 private He _next;
77 77
78 public He Next { get { return _next; } set { _next = value; } } 78 public He Next { get { return _next; } set { _next = value; } }
79 public Vector3 Ray { get { return _ray; } set { _ray = value; } } 79 public Vector3 Ray { get { return _ray; } set { _ray = value; } }
80 } 80 }
81 81
82 private He[] _table = new He[_gjkHashSize]; 82 private He[] _table = new He[_gjkHashSize];
83 private Matrix[] _wrotations = new Matrix[2]; 83 private Matrix[] _wrotations = new Matrix[2];
84 private Vector3[] _positions = new Vector3[2]; 84 private Vector3[] _positions = new Vector3[2];
85 private ConvexShape[] _shapes = new ConvexShape[2]; 85 private ConvexShape[] _shapes = new ConvexShape[2];
86 private MinkowskiVertice[] _simplex = new MinkowskiVertice[5]; 86 private MinkowskiVertice[] _simplex = new MinkowskiVertice[5];
87 private Vector3 _ray; 87 private Vector3 _ray;
88 private int _order; 88 private int _order;
89 private int _iterations; 89 private int _iterations;
90 private float _margin; 90 private float _margin;
91 private bool _failed; 91 private bool _failed;
92 92
93 public Gjk(Matrix wrotationA, Vector3 positionA, ConvexShape shapeA, 93 public Gjk(Matrix wrotationA, Vector3 positionA, ConvexShape shapeA,
94 Matrix wrotationB, Vector3 positionB, ConvexShape shapeB) 94 Matrix wrotationB, Vector3 positionB, ConvexShape shapeB)
95 : this(wrotationA, positionA, shapeA, wrotationB, positionB, shapeB, 0) { } 95 : this(wrotationA, positionA, shapeA, wrotationB, positionB, shapeB, 0) { }
96 96
97 public Gjk(Matrix wrotationA, Vector3 positionA, ConvexShape shapeA, 97 public Gjk(Matrix wrotationA, Vector3 positionA, ConvexShape shapeA,
98 Matrix wrotationB, Vector3 positionB, ConvexShape shapeB, 98 Matrix wrotationB, Vector3 positionB, ConvexShape shapeB,
99 float pmargin) 99 float pmargin)
100 { 100 {
101 for (int i = 0; i < _simplex.Length; i++) 101 for (int i = 0; i < _simplex.Length; i++)
102 _simplex[i] = new MinkowskiVertice(); 102 _simplex[i] = new MinkowskiVertice();
103 103
104 for (int i = 0; i < _wrotations.Length; i++) 104 for (int i = 0; i < _wrotations.Length; i++)
105 _wrotations[i] = new Matrix(); 105 _wrotations[i] = new Matrix();
106 106
107 for (int i = 0; i < _positions.Length; i++) 107 for (int i = 0; i < _positions.Length; i++)
108 _positions[i] = new Vector3(); 108 _positions[i] = new Vector3();
109 109
110 _wrotations[0] = wrotationA; _positions[0] = positionA; 110 _wrotations[0] = wrotationA; _positions[0] = positionA;
111 _shapes[0] = shapeA; 111 _shapes[0] = shapeA;
112 _wrotations[0].Translation = Vector3.Zero; 112 _wrotations[0].Translation = Vector3.Zero;
113 _wrotations[1] = wrotationB; _positions[1] = positionB; 113 _wrotations[1] = wrotationB; _positions[1] = positionB;
114 _shapes[1] = shapeB; 114 _shapes[1] = shapeB;
115 _wrotations[1].Translation = Vector3.Zero; 115 _wrotations[1].Translation = Vector3.Zero;
116 //sablock = sa->BeginBlock(); 116 //sablock = sa->BeginBlock();
117 _margin = pmargin; 117 _margin = pmargin;
118 _failed = false; 118 _failed = false;
119 } 119 }
120 120
121 public bool Failed { get { return _failed; } } 121 public bool Failed { get { return _failed; } }
122 public int Iterations { get { return _iterations; } } 122 public int Iterations { get { return _iterations; } }
123 public int Order { get { return _order; } } 123 public int Order { get { return _order; } }
124 public MinkowskiVertice[] Simplex { get { return _simplex; } } 124 public MinkowskiVertice[] Simplex { get { return _simplex; } }
125 125
126 public int Hash(Vector3 v) 126 public int Hash(Vector3 v)
127 { 127 {
128 int h = ((int)(v.X * 15461) ^ (int)(v.Y * 83003) ^ (int)(v.Z * 15473)); 128 int h = ((int)(v.X * 15461) ^ (int)(v.Y * 83003) ^ (int)(v.Z * 15473));
129 return (h * 169639) & _gjkHashMask; 129 return (h * 169639) & _gjkHashMask;
130 } 130 }
131 131
132 public bool FetchSupport() 132 public bool FetchSupport()
133 { 133 {
134 int h = Hash(_ray); 134 int h = Hash(_ray);
135 He e = _table[h]; 135 He e = _table[h];
136 while (e != null) 136 while (e != null)
137 { 137 {
138 if (e.Ray == _ray) 138 if (e.Ray == _ray)
139 { 139 {
140 --_order; 140 --_order;
141 return (false); 141 return (false);
142 } 142 }
143 else e = e.Next; 143 else e = e.Next;
144 } 144 }
145 e = new He(); 145 e = new He();
146 e.Ray = _ray; 146 e.Ray = _ray;
147 e.Next = _table[h]; 147 e.Next = _table[h];
148 _table[h] = e; 148 _table[h] = e;
149 Support(_ray, ref _simplex[++_order]); 149 Support(_ray, ref _simplex[++_order]);
150 return (Vector3.Dot(_ray, _simplex[_order].Vertice) > 0); 150 return (Vector3.Dot(_ray, _simplex[_order].Vertice) > 0);
151 } 151 }
152 152
153 public Vector3 LocalSupport(Vector3 d, int i) 153 public Vector3 LocalSupport(Vector3 d, int i)
154 { 154 {
155 Matrix m = _wrotations[i]; 155 Matrix m = _wrotations[i];
156 m.Translation = Vector3.Zero; 156 m.Translation = Vector3.Zero;
157 Vector3 vtx = Vector3.TransformNormal(d, m); 157 Vector3 vtx = Vector3.TransformNormal(d, m);
158 Vector3 result = MathHelper.MatrixToVector(_wrotations[i], _shapes[i].LocalGetSupportingVertex(vtx)); 158 Vector3 result = MathHelper.MatrixToVector(_wrotations[i], _shapes[i].LocalGetSupportingVertex(vtx));
159 return (result + _positions[i]); 159 return (result + _positions[i]);
160 } 160 }
161 161
162 public void Support(Vector3 d, ref MinkowskiVertice v) 162 public void Support(Vector3 d, ref MinkowskiVertice v)
163 { 163 {
164 v.Ray = d; 164 v.Ray = d;
165 v.Vertice = LocalSupport(d, 0) - LocalSupport(-d, 1) + d * _margin; 165 v.Vertice = LocalSupport(d, 0) - LocalSupport(-d, 1) + d * _margin;
166 } 166 }
167 167
168 public bool SolveSimplex2(Vector3 ao, Vector3 ab) 168 public bool SolveSimplex2(Vector3 ao, Vector3 ab)
169 { 169 {
170 if (Vector3.Dot(ab, ao) >= 0) 170 if (Vector3.Dot(ab, ao) >= 0)
171 { 171 {
172 Vector3 cabo = Vector3.Cross(ab, ao); 172 Vector3 cabo = Vector3.Cross(ab, ao);
173 if (cabo.LengthSquared() > _gjkSquareInSimplexEpsilon) 173 if (cabo.LengthSquared() > _gjkSquareInSimplexEpsilon)
174 { _ray = Vector3.Cross(cabo, ab); } 174 { _ray = Vector3.Cross(cabo, ab); }
175 else 175 else
176 { return true; } 176 { return true; }
177 } 177 }
178 else 178 else
179 { 179 {
180 _order = 0; 180 _order = 0;
181 _simplex[0].Ray = _simplex[1].Ray; 181 _simplex[0].Ray = _simplex[1].Ray;
182 _simplex[0].Vertice = _simplex[1].Vertice; 182 _simplex[0].Vertice = _simplex[1].Vertice;
183 183
184 _ray = ao; 184 _ray = ao;
185 } 185 }
186 return false; 186 return false;
187 } 187 }
188 188
189 public bool SolveSimplex3(Vector3 ao, Vector3 ab, Vector3 ac) 189 public bool SolveSimplex3(Vector3 ao, Vector3 ab, Vector3 ac)
190 { 190 {
191 return (SolveSimplex3a(ao, ab, ac, Vector3.Cross(ab, ac))); 191 return (SolveSimplex3a(ao, ab, ac, Vector3.Cross(ab, ac)));
192 } 192 }
193 193
194 public bool SolveSimplex3a(Vector3 ao, Vector3 ab, Vector3 ac, Vector3 cabc) 194 public bool SolveSimplex3a(Vector3 ao, Vector3 ab, Vector3 ac, Vector3 cabc)
195 { 195 {
196 if ((Vector3.Dot(Vector3.Cross(cabc, ab), ao)) < -_gjkInSimplexEpsilon) 196 if ((Vector3.Dot(Vector3.Cross(cabc, ab), ao)) < -_gjkInSimplexEpsilon)
197 { 197 {
198 _order = 1; 198 _order = 1;
199 _simplex[0].Vertice = _simplex[1].Vertice; 199 _simplex[0].Vertice = _simplex[1].Vertice;
200 _simplex[0].Ray = _simplex[1].Ray; 200 _simplex[0].Ray = _simplex[1].Ray;
201 201
202 _simplex[1].Vertice = _simplex[2].Vertice; 202 _simplex[1].Vertice = _simplex[2].Vertice;
203 _simplex[1].Ray = _simplex[2].Ray; 203 _simplex[1].Ray = _simplex[2].Ray;
204 204
205 return (SolveSimplex2(ao, ab)); 205 return (SolveSimplex2(ao, ab));
206 } 206 }
207 else if (Vector3.Dot(Vector3.Cross(cabc, ac), ao) > +_gjkInSimplexEpsilon) 207 else if (Vector3.Dot(Vector3.Cross(cabc, ac), ao) > +_gjkInSimplexEpsilon)
208 { 208 {
209 _order = 1; 209 _order = 1;
210 _simplex[1].Vertice = _simplex[2].Vertice; 210 _simplex[1].Vertice = _simplex[2].Vertice;
211 _simplex[1].Ray = _simplex[2].Ray; 211 _simplex[1].Ray = _simplex[2].Ray;
212 212
213 return (SolveSimplex2(ao, ac)); 213 return (SolveSimplex2(ao, ac));
214 } 214 }
215 else 215 else
216 { 216 {
217 float d = Vector3.Dot(cabc, ao); 217 float d = Vector3.Dot(cabc, ao);
218 if (Abs(d) > _gjkInSimplexEpsilon) 218 if (Abs(d) > _gjkInSimplexEpsilon)
219 { 219 {
220 if (d > 0) 220 if (d > 0)
221 { _ray = cabc; } 221 { _ray = cabc; }
222 else 222 else
223 { _ray = -cabc; Swap<MinkowskiVertice>(ref _simplex[0], ref _simplex[1]); } 223 { _ray = -cabc; Swap<MinkowskiVertice>(ref _simplex[0], ref _simplex[1]); }
224 return (false); 224 return (false);
225 } 225 }
226 else return (true); 226 else return (true);
227 } 227 }
228 } 228 }
229 229
230 public bool SolveSimplex4(Vector3 ao, Vector3 ab, Vector3 ac, Vector3 ad) 230 public bool SolveSimplex4(Vector3 ao, Vector3 ab, Vector3 ac, Vector3 ad)
231 { 231 {
232 Vector3 crs; 232 Vector3 crs;
233 if (Vector3.Dot((crs = Vector3.Cross(ab, ac)), ao) > _gjkInSimplexEpsilon) 233 if (Vector3.Dot((crs = Vector3.Cross(ab, ac)), ao) > _gjkInSimplexEpsilon)
234 { 234 {
235 _order = 2; 235 _order = 2;
236 _simplex[0].Vertice = _simplex[1].Vertice; 236 _simplex[0].Vertice = _simplex[1].Vertice;
237 _simplex[0].Ray = _simplex[1].Ray; 237 _simplex[0].Ray = _simplex[1].Ray;
238 238
239 _simplex[1].Vertice = _simplex[2].Vertice; 239 _simplex[1].Vertice = _simplex[2].Vertice;
240 _simplex[1].Ray = _simplex[2].Ray; 240 _simplex[1].Ray = _simplex[2].Ray;
241 241
242 _simplex[2].Vertice = _simplex[3].Vertice; 242 _simplex[2].Vertice = _simplex[3].Vertice;
243 _simplex[2].Ray = _simplex[3].Ray; 243 _simplex[2].Ray = _simplex[3].Ray;
244 244
245 return (SolveSimplex3a(ao, ab, ac, crs)); 245 return (SolveSimplex3a(ao, ab, ac, crs));
246 } 246 }
247 else if (Vector3.Dot((crs = Vector3.Cross(ac, ad)), ao) > _gjkInSimplexEpsilon) 247 else if (Vector3.Dot((crs = Vector3.Cross(ac, ad)), ao) > _gjkInSimplexEpsilon)
248 { 248 {
249 _order = 2; 249 _order = 2;
250 _simplex[2].Vertice = _simplex[3].Vertice; 250 _simplex[2].Vertice = _simplex[3].Vertice;
251 _simplex[2].Ray = _simplex[3].Ray; 251 _simplex[2].Ray = _simplex[3].Ray;
252 252
253 return (SolveSimplex3a(ao, ac, ad, crs)); 253 return (SolveSimplex3a(ao, ac, ad, crs));
254 } 254 }
255 else if (Vector3.Dot((crs = Vector3.Cross(ad, ab)), ao) > _gjkInSimplexEpsilon) 255 else if (Vector3.Dot((crs = Vector3.Cross(ad, ab)), ao) > _gjkInSimplexEpsilon)
256 { 256 {
257 _order = 2; 257 _order = 2;
258 258
259 _simplex[1].Vertice = _simplex[0].Vertice; 259 _simplex[1].Vertice = _simplex[0].Vertice;
260 _simplex[1].Ray = _simplex[0].Ray; 260 _simplex[1].Ray = _simplex[0].Ray;
261 261
262 _simplex[0].Vertice = _simplex[2].Vertice; 262 _simplex[0].Vertice = _simplex[2].Vertice;
263 _simplex[0].Ray = _simplex[2].Ray; 263 _simplex[0].Ray = _simplex[2].Ray;
264 264
265 _simplex[2].Vertice = _simplex[3].Vertice; 265 _simplex[2].Vertice = _simplex[3].Vertice;
266 _simplex[2].Ray = _simplex[3].Ray; 266 _simplex[2].Ray = _simplex[3].Ray;
267 267
268 return (SolveSimplex3a(ao, ad, ab, crs)); 268 return (SolveSimplex3a(ao, ad, ab, crs));
269 } 269 }
270 else return (true); 270 else return (true);
271 } 271 }
272 272
273 public bool SearchOrigin() 273 public bool SearchOrigin()
274 { 274 {
275 return SearchOrigin(new Vector3(1, 0, 0)); 275 return SearchOrigin(new Vector3(1, 0, 0));
276 } 276 }
277 277
278 public bool SearchOrigin(Vector3 initray) 278 public bool SearchOrigin(Vector3 initray)
279 { 279 {
280 _iterations = 0; 280 _iterations = 0;
281 unchecked 281 unchecked
282 { 282 {
283 _order = (int)(-1); 283 _order = (int)(-1);
284 } 284 }
285 _failed = false; 285 _failed = false;
286 _ray = Vector3.Normalize(initray); 286 _ray = Vector3.Normalize(initray);
287 287
288 //ClearMemory(table, sizeof(void*) * GJK_hashsize); 288 //ClearMemory(table, sizeof(void*) * GJK_hashsize);
289 for (int i = 0; i < _table.Length; i++) 289 for (int i = 0; i < _table.Length; i++)
290 _table[i] = null; 290 _table[i] = null;
291 FetchSupport(); 291 FetchSupport();
292 _ray = -_simplex[0].Vertice; 292 _ray = -_simplex[0].Vertice;
293 for (; _iterations < _gjkMaxIterations; ++_iterations) 293 for (; _iterations < _gjkMaxIterations; ++_iterations)
294 { 294 {
295 float rl = _ray.Length(); 295 float rl = _ray.Length();
296 _ray /= rl > 0 ? rl : 1; 296 _ray /= rl > 0 ? rl : 1;
297 if (FetchSupport()) 297 if (FetchSupport())
298 { 298 {
299 bool found = (false); 299 bool found = (false);
300 switch (_order) 300 switch (_order)
301 { 301 {
302 case 1: found = SolveSimplex2(-_simplex[1].Vertice, _simplex[0].Vertice - _simplex[1].Vertice); break; 302 case 1: found = SolveSimplex2(-_simplex[1].Vertice, _simplex[0].Vertice - _simplex[1].Vertice); break;
303 case 2: found = SolveSimplex3(-_simplex[2].Vertice, _simplex[1].Vertice - _simplex[2].Vertice, _simplex[0].Vertice - _simplex[2].Vertice); break; 303 case 2: found = SolveSimplex3(-_simplex[2].Vertice, _simplex[1].Vertice - _simplex[2].Vertice, _simplex[0].Vertice - _simplex[2].Vertice); break;
304 case 3: found = SolveSimplex4(-_simplex[3].Vertice, _simplex[2].Vertice - _simplex[3].Vertice, _simplex[1].Vertice - _simplex[3].Vertice, _simplex[0].Vertice - _simplex[3].Vertice); break; 304 case 3: found = SolveSimplex4(-_simplex[3].Vertice, _simplex[2].Vertice - _simplex[3].Vertice, _simplex[1].Vertice - _simplex[3].Vertice, _simplex[0].Vertice - _simplex[3].Vertice); break;
305 } 305 }
306 if (found) return (true); 306 if (found) return (true);
307 } 307 }
308 else return (false); 308 else return (false);
309 } 309 }
310 _failed = true; 310 _failed = true;
311 return (false); 311 return (false);
312 } 312 }
313 313
314 public bool EncloseOrigin() 314 public bool EncloseOrigin()
315 { 315 {
316 switch (_order) 316 switch (_order)
317 { 317 {
318 /* Point */ 318 /* Point */
319 case 0: break; 319 case 0: break;
320 /* Line */ 320 /* Line */
321 case 1: 321 case 1:
322 Vector3 ab = _simplex[1].Vertice - _simplex[0].Vertice; 322 Vector3 ab = _simplex[1].Vertice - _simplex[0].Vertice;
323 Vector3[] b ={ Vector3.Cross(ab, new Vector3(1, 0, 0)), 323 Vector3[] b ={ Vector3.Cross(ab, new Vector3(1, 0, 0)),
324 Vector3.Cross(ab, new Vector3(0, 1, 0)), 324 Vector3.Cross(ab, new Vector3(0, 1, 0)),
325 Vector3.Cross(ab, new Vector3(0, 0, 1)) }; 325 Vector3.Cross(ab, new Vector3(0, 0, 1)) };
326 float[] m ={ b[0].LengthSquared(), b[1].LengthSquared(), b[2].LengthSquared() }; 326 float[] m ={ b[0].LengthSquared(), b[1].LengthSquared(), b[2].LengthSquared() };
327 Matrix r = Matrix.CreateFromQuaternion(new Quaternion(Vector3.Normalize(ab), _twoPi / 3)); 327 Matrix r = Matrix.CreateFromQuaternion(new Quaternion(Vector3.Normalize(ab), _twoPi / 3));
328 Vector3 w = b[m[0] > m[1] ? m[0] > m[2] ? 0 : 2 : m[1] > m[2] ? 1 : 2]; 328 Vector3 w = b[m[0] > m[1] ? m[0] > m[2] ? 0 : 2 : m[1] > m[2] ? 1 : 2];
329 Support(Vector3.Normalize(w), ref _simplex[4]); w = Vector3.TransformNormal(w, r); 329 Support(Vector3.Normalize(w), ref _simplex[4]); w = Vector3.TransformNormal(w, r);
330 Support(Vector3.Normalize(w), ref _simplex[2]); w = Vector3.TransformNormal(w, r); 330 Support(Vector3.Normalize(w), ref _simplex[2]); w = Vector3.TransformNormal(w, r);
331 Support(Vector3.Normalize(w), ref _simplex[3]); w = Vector3.TransformNormal(w, r); 331 Support(Vector3.Normalize(w), ref _simplex[3]); w = Vector3.TransformNormal(w, r);
332 _order = 4; 332 _order = 4;
333 return true; 333 return true;
334 /* Triangle */ 334 /* Triangle */
335 case 2: 335 case 2:
336 Vector3 n = Vector3.Normalize(Vector3.Cross(_simplex[1].Vertice - _simplex[0].Vertice, _simplex[2].Vertice - _simplex[0].Vertice)); 336 Vector3 n = Vector3.Normalize(Vector3.Cross(_simplex[1].Vertice - _simplex[0].Vertice, _simplex[2].Vertice - _simplex[0].Vertice));
337 Support(n, ref _simplex[3]); 337 Support(n, ref _simplex[3]);
338 Support(-n, ref _simplex[4]); 338 Support(-n, ref _simplex[4]);
339 _order = 4; 339 _order = 4;
340 return true; 340 return true;
341 /* Tetrahedron */ 341 /* Tetrahedron */
342 case 3: return (true); 342 case 3: return (true);
343 /* Hexahedron */ 343 /* Hexahedron */
344 case 4: return (true); 344 case 4: return (true);
345 } 345 }
346 return (false); 346 return (false);
347 } 347 }
348 } 348 }
349 349
350 public class Epa 350 public class Epa
351 { 351 {
352 public class Face 352 public class Face
353 { 353 {
354 public Gjk.MinkowskiVertice[] _vertices = new Gjk.MinkowskiVertice[3]; 354 public Gjk.MinkowskiVertice[] _vertices = new Gjk.MinkowskiVertice[3];
355 public Face[] _faces = new Face[3]; 355 public Face[] _faces = new Face[3];
356 public int[] _e = new int[3]; 356 public int[] _e = new int[3];
357 public Vector3 _n; 357 public Vector3 _n;
358 public float _d; 358 public float _d;
359 public int _mark; 359 public int _mark;
360 public Face _prev; 360 public Face _prev;
361 public Face _next; 361 public Face _next;
362 } 362 }
363 363
364 private Gjk _gjk; 364 private Gjk _gjk;
365 private Face _root; 365 private Face _root;
366 private int _nfaces; 366 private int _nfaces;
367 private int _iterations; 367 private int _iterations;
368 private Vector3[,] _features = new Vector3[2, 3]; 368 private Vector3[,] _features = new Vector3[2, 3];
369 private Vector3[] _nearest = new Vector3[2]; 369 private Vector3[] _nearest = new Vector3[2];
370 private Vector3 _normal; 370 private Vector3 _normal;
371 private float _depth; 371 private float _depth;
372 private bool _failed; 372 private bool _failed;
373 373
374 public Epa(Gjk gjk) 374 public Epa(Gjk gjk)
375 { 375 {
376 this._gjk = gjk; 376 this._gjk = gjk;
377 } 377 }
378 378
379 public bool Failed { get { return _failed; } } 379 public bool Failed { get { return _failed; } }
380 public int Iterations { get { return _iterations; } } 380 public int Iterations { get { return _iterations; } }
381 public Vector3 Normal { get { return _normal; } } 381 public Vector3 Normal { get { return _normal; } }
382 public Vector3[] Nearest { get { return _nearest; } } 382 public Vector3[] Nearest { get { return _nearest; } }
383 383
384 public Vector3 GetCoordinates(Face face) 384 public Vector3 GetCoordinates(Face face)
385 { 385 {
386 Vector3 o = face._n * -face._d; 386 Vector3 o = face._n * -face._d;
387 float[] a ={ Vector3.Cross(face._vertices[0].Vertice - o, face._vertices[1].Vertice - o).Length(), 387 float[] a ={ Vector3.Cross(face._vertices[0].Vertice - o, face._vertices[1].Vertice - o).Length(),
388 Vector3.Cross(face._vertices[1].Vertice - o, face._vertices[2].Vertice - o).Length(), 388 Vector3.Cross(face._vertices[1].Vertice - o, face._vertices[2].Vertice - o).Length(),
389 Vector3.Cross(face._vertices[2].Vertice - o, face._vertices[0].Vertice - o).Length()}; 389 Vector3.Cross(face._vertices[2].Vertice - o, face._vertices[0].Vertice - o).Length()};
390 float sm = a[0] + a[1] + a[2]; 390 float sm = a[0] + a[1] + a[2];
391 return (new Vector3(a[1], a[2], a[0]) / (sm > 0 ? sm : 1)); 391 return (new Vector3(a[1], a[2], a[0]) / (sm > 0 ? sm : 1));
392 } 392 }
393 393
394 public Face FindBest() 394 public Face FindBest()
395 { 395 {
396 Face bf = null; 396 Face bf = null;
397 if (_root != null) 397 if (_root != null)
398 { 398 {
399 Face cf = _root; 399 Face cf = _root;
400 float bd = _infinity; 400 float bd = _infinity;
401 do 401 do
402 { 402 {
403 if (cf._d < bd) { bd = cf._d; bf = cf; } 403 if (cf._d < bd) { bd = cf._d; bf = cf; }
404 } while (null != (cf = cf._next)); 404 } while (null != (cf = cf._next));
405 } 405 }
406 return bf; 406 return bf;
407 } 407 }
408 408
409 public bool Set(ref Face f, Gjk.MinkowskiVertice a, Gjk.MinkowskiVertice b, Gjk.MinkowskiVertice c) 409 public bool Set(ref Face f, Gjk.MinkowskiVertice a, Gjk.MinkowskiVertice b, Gjk.MinkowskiVertice c)
410 { 410 {
411 Vector3 nrm = Vector3.Cross(b.Vertice - a.Vertice, c.Vertice - a.Vertice); 411 Vector3 nrm = Vector3.Cross(b.Vertice - a.Vertice, c.Vertice - a.Vertice);
412 float len = nrm.Length(); 412 float len = nrm.Length();
413 bool valid = (Vector3.Dot(Vector3.Cross(a.Vertice, b.Vertice), nrm) >= -_epaInFaceEpsilon && 413 bool valid = (Vector3.Dot(Vector3.Cross(a.Vertice, b.Vertice), nrm) >= -_epaInFaceEpsilon &&
414 Vector3.Dot(Vector3.Cross(b.Vertice, c.Vertice), nrm) >= -_epaInFaceEpsilon && 414 Vector3.Dot(Vector3.Cross(b.Vertice, c.Vertice), nrm) >= -_epaInFaceEpsilon &&
415 Vector3.Dot(Vector3.Cross(c.Vertice, a.Vertice), nrm) >= -_epaInFaceEpsilon); 415 Vector3.Dot(Vector3.Cross(c.Vertice, a.Vertice), nrm) >= -_epaInFaceEpsilon);
416 f._vertices[0] = a; 416 f._vertices[0] = a;
417 f._vertices[1] = b; 417 f._vertices[1] = b;
418 f._vertices[2] = c; 418 f._vertices[2] = c;
419 f._mark = 0; 419 f._mark = 0;
420 f._n = nrm / (len > 0 ? len : _infinity); 420 f._n = nrm / (len > 0 ? len : _infinity);
421 f._d = Max(0, -Vector3.Dot(f._n, a.Vertice)); 421 f._d = Max(0, -Vector3.Dot(f._n, a.Vertice));
422 return valid; 422 return valid;
423 } 423 }
424 424
425 public Face NewFace(Gjk.MinkowskiVertice a, Gjk.MinkowskiVertice b, Gjk.MinkowskiVertice c) 425 public Face NewFace(Gjk.MinkowskiVertice a, Gjk.MinkowskiVertice b, Gjk.MinkowskiVertice c)
426 { 426 {
427 Face pf = new Face(); 427 Face pf = new Face();
428 if (Set(ref pf, a, b, c)) 428 if (Set(ref pf, a, b, c))
429 { 429 {
430 if (_root != null) _root._prev = pf; 430 if (_root != null) _root._prev = pf;
431 pf._prev = null; 431 pf._prev = null;
432 pf._next = _root; 432 pf._next = _root;
433 _root = pf; 433 _root = pf;
434 ++_nfaces; 434 ++_nfaces;
435 } 435 }
436 else 436 else
437 { 437 {
438 pf._prev = pf._next = null; 438 pf._prev = pf._next = null;
439 } 439 }
440 return (pf); 440 return (pf);
441 } 441 }
442 442
443 public void Detach(ref Face face) 443 public void Detach(ref Face face)
444 { 444 {
445 if (face._prev != null || face._next != null) 445 if (face._prev != null || face._next != null)
446 { 446 {
447 --_nfaces; 447 --_nfaces;
448 if (face == _root) 448 if (face == _root)
449 { 449 {
450 _root = face._next; 450 _root = face._next;
451 _root._prev = null; 451 _root._prev = null;
452 } 452 }
453 else 453 else
454 { 454 {
455 if (face._next == null) 455 if (face._next == null)
456 { 456 {
457 face._prev._next = null; 457 face._prev._next = null;
458 } 458 }
459 else 459 else
460 { 460 {
461 face._prev._next = face._next; 461 face._prev._next = face._next;
462 face._next._prev = face._prev; 462 face._next._prev = face._prev;
463 } 463 }
464 } 464 }
465 face._prev = face._next = null; 465 face._prev = face._next = null;
466 } 466 }
467 } 467 }
468 468
469 public void Link(ref Face f0, int e0, ref Face f1, int e1) 469 public void Link(ref Face f0, int e0, ref Face f1, int e1)
470 { 470 {
471 f0._faces[e0] = f1; f1._e[e1] = e0; 471 f0._faces[e0] = f1; f1._e[e1] = e0;
472 f1._faces[e1] = f0; f0._e[e0] = e1; 472 f1._faces[e1] = f0; f0._e[e0] = e1;
473 } 473 }
474 474
475 public Gjk.MinkowskiVertice Support(Vector3 w) 475 public Gjk.MinkowskiVertice Support(Vector3 w)
476 { 476 {
477 Gjk.MinkowskiVertice v = new Gjk.MinkowskiVertice(); 477 Gjk.MinkowskiVertice v = new Gjk.MinkowskiVertice();
478 _gjk.Support(w, ref v); 478 _gjk.Support(w, ref v);
479 return v; 479 return v;
480 } 480 }
481 481
482 private static int[] mod3 ={ 0, 1, 2, 0, 1 }; 482 private static int[] mod3 ={ 0, 1, 2, 0, 1 };
483 483
484 public int BuildHorizon(int markid, Gjk.MinkowskiVertice w, ref Face f, int e, ref Face cf, ref Face ff) 484 public int BuildHorizon(int markid, Gjk.MinkowskiVertice w, ref Face f, int e, ref Face cf, ref Face ff)
485 { 485 {
486 int ne = (0); 486 int ne = (0);
487 if (f._mark != markid) 487 if (f._mark != markid)
488 { 488 {
489 int e1 = (mod3[e + 1]); 489 int e1 = (mod3[e + 1]);
490 if ((Vector3.Dot(f._n, w.Vertice) + f._d) > 0) 490 if ((Vector3.Dot(f._n, w.Vertice) + f._d) > 0)
491 { 491 {
492 Face nf = NewFace(f._vertices[e1], f._vertices[e], w); 492 Face nf = NewFace(f._vertices[e1], f._vertices[e], w);
493 Link(ref nf, 0, ref f, e); 493 Link(ref nf, 0, ref f, e);
494 if (cf != null) Link(ref cf, 1, ref nf, 2); else ff = nf; 494 if (cf != null) Link(ref cf, 1, ref nf, 2); else ff = nf;
495 cf = nf; ne = 1; 495 cf = nf; ne = 1;
496 } 496 }
497 else 497 else
498 { 498 {
499 int e2 = (mod3[e + 2]); 499 int e2 = (mod3[e + 2]);
500 Detach(ref f); 500 Detach(ref f);
501 f._mark = markid; 501 f._mark = markid;
502 ne += BuildHorizon(markid, w, ref f._faces[e1], f._e[e1], ref cf, ref ff); 502 ne += BuildHorizon(markid, w, ref f._faces[e1], f._e[e1], ref cf, ref ff);
503 ne += BuildHorizon(markid, w, ref f._faces[e2], f._e[e2], ref cf, ref ff); 503 ne += BuildHorizon(markid, w, ref f._faces[e2], f._e[e2], ref cf, ref ff);
504 } 504 }
505 } 505 }
506 return (ne); 506 return (ne);
507 } 507 }
508 508
509 public float EvaluatePD() 509 public float EvaluatePD()
510 { 510 {
511 return EvaluatePD(_epaAccuracy); 511 return EvaluatePD(_epaAccuracy);
512 } 512 }
513 513
514 private int[,] fidx; 514 private int[,] fidx;
515 private int[,] eidx; 515 private int[,] eidx;
516 516
517 public float EvaluatePD(float accuracy) 517 public float EvaluatePD(float accuracy)
518 { 518 {
519 //Block* sablock = sa->BeginBlock(); 519 //Block* sablock = sa->BeginBlock();
520 Face bestface = null; 520 Face bestface = null;
521 int markid = 1; 521 int markid = 1;
522 _depth = -_infinity; 522 _depth = -_infinity;
523 _normal = new Vector3(); 523 _normal = new Vector3();
524 _root = null; 524 _root = null;
525 _nfaces = 0; 525 _nfaces = 0;
526 _iterations = 0; 526 _iterations = 0;
527 _failed = false; 527 _failed = false;
528 /* Prepare hull */ 528 /* Prepare hull */
529 if (_gjk.EncloseOrigin()) 529 if (_gjk.EncloseOrigin())
530 { 530 {
531 int nfidx = 0; 531 int nfidx = 0;
532 int neidx = 0; 532 int neidx = 0;
533 Gjk.MinkowskiVertice[] basemkv = new Gjk.MinkowskiVertice[5]; 533 Gjk.MinkowskiVertice[] basemkv = new Gjk.MinkowskiVertice[5];
534 Face[] basefaces = new Face[6]; 534 Face[] basefaces = new Face[6];
535 switch (_gjk.Order) 535 switch (_gjk.Order)
536 { 536 {
537 /* Tetrahedron */ 537 /* Tetrahedron */
538 case 3: 538 case 3:
539 { 539 {
540 fidx = new int[,] { { 2, 1, 0 }, { 3, 0, 1 }, { 3, 1, 2 }, { 3, 2, 0 } }; 540 fidx = new int[,] { { 2, 1, 0 }, { 3, 0, 1 }, { 3, 1, 2 }, { 3, 2, 0 } };
541 eidx = new int[,] { { 0, 0, 2, 1 }, { 0, 1, 1, 1 }, { 0, 2, 3, 1 }, { 1, 0, 3, 2 }, { 2, 0, 1, 2 }, { 3, 0, 2, 2 } }; 541 eidx = new int[,] { { 0, 0, 2, 1 }, { 0, 1, 1, 1 }, { 0, 2, 3, 1 }, { 1, 0, 3, 2 }, { 2, 0, 1, 2 }, { 3, 0, 2, 2 } };
542 nfidx = 4; neidx = 6; 542 nfidx = 4; neidx = 6;
543 } break; 543 } break;
544 /* Hexahedron */ 544 /* Hexahedron */
545 case 4: 545 case 4:
546 { 546 {
547 fidx = new int[,] { { 2, 0, 4 }, { 4, 1, 2 }, { 1, 4, 0 }, { 0, 3, 1 }, { 0, 2, 3 }, { 1, 3, 2 } }; 547 fidx = new int[,] { { 2, 0, 4 }, { 4, 1, 2 }, { 1, 4, 0 }, { 0, 3, 1 }, { 0, 2, 3 }, { 1, 3, 2 } };
548 eidx = new int[,] { { 0, 0, 4, 0 }, { 0, 1, 2, 1 }, { 0, 2, 1, 2 }, { 1, 1, 5, 2 }, { 1, 0, 2, 0 }, { 2, 2, 3, 2 }, { 3, 1, 5, 0 }, { 3, 0, 4, 2 }, { 5, 1, 4, 1 } }; 548 eidx = new int[,] { { 0, 0, 4, 0 }, { 0, 1, 2, 1 }, { 0, 2, 1, 2 }, { 1, 1, 5, 2 }, { 1, 0, 2, 0 }, { 2, 2, 3, 2 }, { 3, 1, 5, 0 }, { 3, 0, 4, 2 }, { 5, 1, 4, 1 } };
549 nfidx = 6; neidx = 9; 549 nfidx = 6; neidx = 9;
550 } break; 550 } break;
551 } 551 }
552 int i; 552 int i;
553 553
554 for (i = 0; i <= _gjk.Order; ++i) 554 for (i = 0; i <= _gjk.Order; ++i)
555 { 555 {
556 //basemkv[i] = (GJK::Mkv*)sa->Allocate(sizeof(GJK::Mkv)); 556 //basemkv[i] = (GJK::Mkv*)sa->Allocate(sizeof(GJK::Mkv));
557 basemkv[i] = new Gjk.MinkowskiVertice(); 557 basemkv[i] = new Gjk.MinkowskiVertice();
558 basemkv[i].Vertice = _gjk.Simplex[i].Vertice; 558 basemkv[i].Vertice = _gjk.Simplex[i].Vertice;
559 basemkv[i].Ray = _gjk.Simplex[i].Ray; 559 basemkv[i].Ray = _gjk.Simplex[i].Ray;
560 } 560 }
561 for (i = 0; i < nfidx; ++i) 561 for (i = 0; i < nfidx; ++i)
562 { 562 {
563 basefaces[i] = NewFace(basemkv[fidx[i, 0]], basemkv[fidx[i, 1]], basemkv[fidx[i, 2]]); 563 basefaces[i] = NewFace(basemkv[fidx[i, 0]], basemkv[fidx[i, 1]], basemkv[fidx[i, 2]]);
564 } 564 }
565 for (i = 0; i < neidx; ++i) 565 for (i = 0; i < neidx; ++i)
566 { 566 {
567 Link(ref basefaces[eidx[i, 0]], eidx[i, 1], ref basefaces[eidx[i, 2]], eidx[i, 3]); 567 Link(ref basefaces[eidx[i, 0]], eidx[i, 1], ref basefaces[eidx[i, 2]], eidx[i, 3]);
568 } 568 }
569 } 569 }
570 if (0 == _nfaces) 570 if (0 == _nfaces)
571 { 571 {
572 return _depth; 572 return _depth;
573 } 573 }
574 /* Expand hull */ 574 /* Expand hull */
575 for (; _iterations < _epaMaxIterations; ++_iterations) 575 for (; _iterations < _epaMaxIterations; ++_iterations)
576 { 576 {
577 Face bf = FindBest(); 577 Face bf = FindBest();
578 if (bf != null) 578 if (bf != null)
579 { 579 {
580 Gjk.MinkowskiVertice w = Support(-bf._n); 580 Gjk.MinkowskiVertice w = Support(-bf._n);
581 float d = Vector3.Dot(bf._n, w.Vertice) + bf._d; 581 float d = Vector3.Dot(bf._n, w.Vertice) + bf._d;
582 bestface = bf; 582 bestface = bf;
583 if (d < -accuracy) 583 if (d < -accuracy)
584 { 584 {
585 Face cf = null; 585 Face cf = null;
586 Face ff = null; 586 Face ff = null;
587 int nf = 0; 587 int nf = 0;
588 Detach(ref bf); 588 Detach(ref bf);
589 bf._mark = ++markid; 589 bf._mark = ++markid;
590 for (int i = 0; i < 3; ++i) 590 for (int i = 0; i < 3; ++i)
591 { 591 {
592 nf += BuildHorizon(markid, w, ref bf._faces[i], bf._e[i], ref cf, ref ff); 592 nf += BuildHorizon(markid, w, ref bf._faces[i], bf._e[i], ref cf, ref ff);
593 } 593 }
594 if (nf <= 2) { break; } 594 if (nf <= 2) { break; }
595 Link(ref cf, 1, ref ff, 2); 595 Link(ref cf, 1, ref ff, 2);
596 } 596 }
597 else break; 597 else break;
598 } 598 }
599 else break; 599 else break;
600 } 600 }
601 /* Extract contact */ 601 /* Extract contact */
602 if (bestface != null) 602 if (bestface != null)
603 { 603 {
604 Vector3 b = GetCoordinates(bestface); 604 Vector3 b = GetCoordinates(bestface);
605 _normal = bestface._n; 605 _normal = bestface._n;
606 _depth = Max(0, bestface._d); 606 _depth = Max(0, bestface._d);
607 for (int i = 0; i < 2; ++i) 607 for (int i = 0; i < 2; ++i)
608 { 608 {
609 float s = i != 0 ? -1 : 1; 609 float s = i != 0 ? -1 : 1;
610 for (int j = 0; j < 3; ++j) 610 for (int j = 0; j < 3; ++j)
611 { 611 {
612 _features[i, j] = _gjk.LocalSupport(s * bestface._vertices[j].Ray, i); 612 _features[i, j] = _gjk.LocalSupport(s * bestface._vertices[j].Ray, i);
613 } 613 }
614 } 614 }
615 _nearest[0] = _features[0, 0] * b.X + _features[0, 1] * b.Y + _features[0, 2] * b.Z; 615 _nearest[0] = _features[0, 0] * b.X + _features[0, 1] * b.Y + _features[0, 2] * b.Z;
616 _nearest[1] = _features[1, 0] * b.X + _features[1, 1] * b.Y + _features[1, 2] * b.Z; 616 _nearest[1] = _features[1, 0] * b.X + _features[1, 1] * b.Y + _features[1, 2] * b.Z;
617 } 617 }
618 else _failed = true; 618 else _failed = true;
619 return _depth; 619 return _depth;
620 } 620 }
621 621
622 private float Max(float a, float b) 622 private float Max(float a, float b)
623 { 623 {
624 return (a > b ? a : b); 624 return (a > b ? a : b);
625 } 625 }
626 626
627 private float Min(float a, float b) 627 private float Min(float a, float b)
628 { 628 {
629 return (a < b ? a : b); 629 return (a < b ? a : b);
630 } 630 }
631 } 631 }
632 } 632 }
633} 633}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaPenetrationDepthSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaPenetrationDepthSolver.cs
index 739b4fc..551449f 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaPenetrationDepthSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaPenetrationDepthSolver.cs
@@ -1,56 +1,56 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to 30 /// EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to
31 /// calculate the penetration depth between two convex shapes. 31 /// calculate the penetration depth between two convex shapes.
32 /// </summary> 32 /// </summary>
33 public class GjkEpaPenetrationDepthSolver : IConvexPenetrationDepthSolver 33 public class GjkEpaPenetrationDepthSolver : IConvexPenetrationDepthSolver
34 { 34 {
35 public bool CalculatePenetrationDepth(ISimplexSolver simplexSolver, ConvexShape convexA, ConvexShape convexB, Matrix transformA, Matrix transformB, Vector3 vector, out Vector3 ptrA, out Vector3 ptrB, IDebugDraw debugDraw) 35 public bool CalculatePenetrationDepth(ISimplexSolver simplexSolver, ConvexShape convexA, ConvexShape convexB, Matrix transformA, Matrix transformB, Vector3 vector, out Vector3 ptrA, out Vector3 ptrB, IDebugDraw debugDraw)
36 { 36 {
37 float radialmargin = 0; 37 float radialmargin = 0;
38 38
39 GjkEpaSolver.Results results; 39 GjkEpaSolver.Results results;
40 if (GjkEpaSolver.Collide(convexA, transformA, 40 if (GjkEpaSolver.Collide(convexA, transformA,
41 convexB, transformB, 41 convexB, transformB,
42 radialmargin, out results)) 42 radialmargin, out results))
43 { 43 {
44 // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); 44 // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0));
45 //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); 45 //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth);
46 ptrA = results.Witnesses[0]; 46 ptrA = results.Witnesses[0];
47 ptrB = results.Witnesses[1]; 47 ptrB = results.Witnesses[1];
48 return true; 48 return true;
49 } 49 }
50 ptrA = new Vector3(); 50 ptrA = new Vector3();
51 ptrB = new Vector3(); 51 ptrB = new Vector3();
52 52
53 return false; 53 return false;
54 } 54 }
55 } 55 }
56} 56}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaSolver.cs
index aa9d61e..20af192 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkEpaSolver.cs
@@ -1,101 +1,101 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// GjkEpaSolver contributed under zlib by Nathanael Presson 30 /// GjkEpaSolver contributed under zlib by Nathanael Presson
31 /// </summary> 31 /// </summary>
32 public class GjkEpaSolver 32 public class GjkEpaSolver
33 { 33 {
34 public struct Results 34 public struct Results
35 { 35 {
36 public enum Status 36 public enum Status
37 { 37 {
38 Separated, /* Shapes doesnt penetrate */ 38 Separated, /* Shapes doesnt penetrate */
39 Penetrating, /* Shapes are penetrating */ 39 Penetrating, /* Shapes are penetrating */
40 GjkFailed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */ 40 GjkFailed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */
41 EpaFailed, /* EPA phase fail, bigger problem, need to save parameters, and debug */ 41 EpaFailed, /* EPA phase fail, bigger problem, need to save parameters, and debug */
42 } 42 }
43 43
44 private Vector3[] _witnesses; 44 private Vector3[] _witnesses;
45 private Vector3 _normal; 45 private Vector3 _normal;
46 private float _depth; 46 private float _depth;
47 private int _epaIterations; 47 private int _epaIterations;
48 private int _gjkIterations; 48 private int _gjkIterations;
49 private Status _status; 49 private Status _status;
50 50
51 public Vector3[] Witnesses { get { return _witnesses; } set { _witnesses = value; } } 51 public Vector3[] Witnesses { get { return _witnesses; } set { _witnesses = value; } }
52 public Vector3 Normal { get { return _normal; } set { _normal = value; } } 52 public Vector3 Normal { get { return _normal; } set { _normal = value; } }
53 public float Depth { get { return _depth; } set { _depth = value; } } 53 public float Depth { get { return _depth; } set { _depth = value; } }
54 public int EpaIterations { get { return _epaIterations; } set { _epaIterations = value; } } 54 public int EpaIterations { get { return _epaIterations; } set { _epaIterations = value; } }
55 public int GjkIterations { get { return _gjkIterations; } set { _gjkIterations = value; } } 55 public int GjkIterations { get { return _gjkIterations; } set { _gjkIterations = value; } }
56 public Status ResultStatus { get { return _status; } set { _status = value; } } 56 public Status ResultStatus { get { return _status; } set { _status = value; } }
57 } 57 }
58 58
59 public static bool Collide(ConvexShape shapeA, Matrix wtrsA, 59 public static bool Collide(ConvexShape shapeA, Matrix wtrsA,
60 ConvexShape shapeB, Matrix wtrsB, 60 ConvexShape shapeB, Matrix wtrsB,
61 float radialmargin, 61 float radialmargin,
62 out Results results) 62 out Results results)
63 { 63 {
64 /* Initialize */ 64 /* Initialize */
65 results = new Results(); 65 results = new Results();
66 results.Witnesses = new Vector3[2]; 66 results.Witnesses = new Vector3[2];
67 results.Witnesses[0] = 67 results.Witnesses[0] =
68 results.Witnesses[1] = 68 results.Witnesses[1] =
69 results.Normal = new Vector3(); 69 results.Normal = new Vector3();
70 results.Depth = 0; 70 results.Depth = 0;
71 results.ResultStatus = Results.Status.Separated; 71 results.ResultStatus = Results.Status.Separated;
72 results.EpaIterations = 0; 72 results.EpaIterations = 0;
73 results.GjkIterations = 0; 73 results.GjkIterations = 0;
74 /* Use GJK to locate origin */ 74 /* Use GJK to locate origin */
75 GjkEpa.Gjk gjk = new GjkEpa.Gjk(wtrsA, wtrsA.Translation, shapeA, 75 GjkEpa.Gjk gjk = new GjkEpa.Gjk(wtrsA, wtrsA.Translation, shapeA,
76 wtrsB, wtrsB.Translation, shapeB, 76 wtrsB, wtrsB.Translation, shapeB,
77 radialmargin + GjkEpa.EpaAccuracy); 77 radialmargin + GjkEpa.EpaAccuracy);
78 bool collide = gjk.SearchOrigin(); 78 bool collide = gjk.SearchOrigin();
79 results.GjkIterations = gjk.Iterations + 1; 79 results.GjkIterations = gjk.Iterations + 1;
80 if (collide) 80 if (collide)
81 { 81 {
82 /* Then EPA for penetration depth */ 82 /* Then EPA for penetration depth */
83 GjkEpa.Epa epa = new GjkEpa.Epa(gjk); 83 GjkEpa.Epa epa = new GjkEpa.Epa(gjk);
84 float pd = epa.EvaluatePD(); 84 float pd = epa.EvaluatePD();
85 results.EpaIterations = epa.Iterations + 1; 85 results.EpaIterations = epa.Iterations + 1;
86 if (pd > 0) 86 if (pd > 0)
87 { 87 {
88 results.ResultStatus = Results.Status.Penetrating; 88 results.ResultStatus = Results.Status.Penetrating;
89 results.Normal = epa.Normal; 89 results.Normal = epa.Normal;
90 results.Depth = pd; 90 results.Depth = pd;
91 results.Witnesses[0] = epa.Nearest[0]; 91 results.Witnesses[0] = epa.Nearest[0];
92 results.Witnesses[1] = epa.Nearest[1]; 92 results.Witnesses[1] = epa.Nearest[1];
93 return true; 93 return true;
94 } 94 }
95 else { if (epa.Failed) results.ResultStatus = Results.Status.EpaFailed; } 95 else { if (epa.Failed) results.ResultStatus = Results.Status.EpaFailed; }
96 } 96 }
97 else { if (gjk.Failed) results.ResultStatus = Results.Status.GjkFailed; } 97 else { if (gjk.Failed) results.ResultStatus = Results.Status.GjkFailed; }
98 return false; 98 return false;
99 } 99 }
100 } 100 }
101} 101}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkPairDetector.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkPairDetector.cs
index 0831ff5..7557ed9 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkPairDetector.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/GjkPairDetector.cs
@@ -1,343 +1,343 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class GjkPairDetector : DiscreteCollisionDetectorInterface 29 public class GjkPairDetector : DiscreteCollisionDetectorInterface
30 { 30 {
31 private Vector3 _cachedSeparatingAxis; 31 private Vector3 _cachedSeparatingAxis;
32 private IConvexPenetrationDepthSolver _penetrationDepthSolver; 32 private IConvexPenetrationDepthSolver _penetrationDepthSolver;
33 private ISimplexSolver _simplexSolver; 33 private ISimplexSolver _simplexSolver;
34 private ConvexShape _minkowskiA, _minkowskiB; 34 private ConvexShape _minkowskiA, _minkowskiB;
35 private bool _ignoreMargin; 35 private bool _ignoreMargin;
36 36
37 private int _lastUsedMethod; 37 private int _lastUsedMethod;
38 private int _currentIteration; 38 private int _currentIteration;
39 private int _degenerateSimplex; 39 private int _degenerateSimplex;
40 private int _catchDegeneracies; 40 private int _catchDegeneracies;
41 41
42 private static int _numDeepPenetrationChecks = 0; 42 private static int _numDeepPenetrationChecks = 0;
43 private static int _numGjkChecks = 0; 43 private static int _numGjkChecks = 0;
44 44
45 private const float RelativeError2 = 1.0e-6f; 45 private const float RelativeError2 = 1.0e-6f;
46 46
47 #region Properties 47 #region Properties
48 public int LastUsedMethod 48 public int LastUsedMethod
49 { 49 {
50 get { return _lastUsedMethod; } 50 get { return _lastUsedMethod; }
51 set { _lastUsedMethod = value; } 51 set { _lastUsedMethod = value; }
52 } 52 }
53 53
54 public int CurrentIteration 54 public int CurrentIteration
55 { 55 {
56 get { return _currentIteration; } 56 get { return _currentIteration; }
57 set { _currentIteration = value; } 57 set { _currentIteration = value; }
58 } 58 }
59 59
60 public int DegenerateSimplex 60 public int DegenerateSimplex
61 { 61 {
62 get { return _degenerateSimplex; } 62 get { return _degenerateSimplex; }
63 set { _degenerateSimplex = value; } 63 set { _degenerateSimplex = value; }
64 } 64 }
65 65
66 public int CatchDegeneracies 66 public int CatchDegeneracies
67 { 67 {
68 get { return _catchDegeneracies; } 68 get { return _catchDegeneracies; }
69 set { _catchDegeneracies = value; } 69 set { _catchDegeneracies = value; }
70 } 70 }
71 71
72 public static int DeepPenetrationChecksCount { get { return _numDeepPenetrationChecks; } } 72 public static int DeepPenetrationChecksCount { get { return _numDeepPenetrationChecks; } }
73 public static int GjkChecksCount { get { return _numGjkChecks; } } 73 public static int GjkChecksCount { get { return _numGjkChecks; } }
74 #endregion 74 #endregion
75 75
76 public GjkPairDetector(ConvexShape objectA, ConvexShape objectB, 76 public GjkPairDetector(ConvexShape objectA, ConvexShape objectB,
77 ISimplexSolver simplexSolver, 77 ISimplexSolver simplexSolver,
78 IConvexPenetrationDepthSolver penetrationDepthSolver) 78 IConvexPenetrationDepthSolver penetrationDepthSolver)
79 { 79 {
80 _cachedSeparatingAxis = new Vector3(0, 0, 1); 80 _cachedSeparatingAxis = new Vector3(0, 0, 1);
81 81
82 _penetrationDepthSolver = penetrationDepthSolver; 82 _penetrationDepthSolver = penetrationDepthSolver;
83 _simplexSolver = simplexSolver; 83 _simplexSolver = simplexSolver;
84 _minkowskiA = objectA; 84 _minkowskiA = objectA;
85 _minkowskiB = objectB; 85 _minkowskiB = objectB;
86 _ignoreMargin = false; 86 _ignoreMargin = false;
87 _lastUsedMethod = -1; 87 _lastUsedMethod = -1;
88 _catchDegeneracies = 1; 88 _catchDegeneracies = 1;
89 } 89 }
90 90
91 public void setMinkowskiA(ConvexShape minkA) 91 public void setMinkowskiA(ConvexShape minkA)
92 { 92 {
93 _minkowskiA = minkA; 93 _minkowskiA = minkA;
94 } 94 }
95 95
96 public void setMinkowskiB(ConvexShape minkB) 96 public void setMinkowskiB(ConvexShape minkB)
97 { 97 {
98 _minkowskiB = minkB; 98 _minkowskiB = minkB;
99 } 99 }
100 public void setCachedSeperatingAxis(Vector3 seperatingAxis) 100 public void setCachedSeperatingAxis(Vector3 seperatingAxis)
101 { 101 {
102 _cachedSeparatingAxis = seperatingAxis; 102 _cachedSeparatingAxis = seperatingAxis;
103 } 103 }
104 104
105 public void setPenetrationDepthSolver(IConvexPenetrationDepthSolver penetrationDepthSolver) 105 public void setPenetrationDepthSolver(IConvexPenetrationDepthSolver penetrationDepthSolver)
106 { 106 {
107 this._penetrationDepthSolver = penetrationDepthSolver; 107 this._penetrationDepthSolver = penetrationDepthSolver;
108 } 108 }
109 109
110 public void setIgnoreMargin(bool ignoreMargin) 110 public void setIgnoreMargin(bool ignoreMargin)
111 { 111 {
112 this._ignoreMargin = ignoreMargin; 112 this._ignoreMargin = ignoreMargin;
113 } 113 }
114 114
115 public override void GetClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw) 115 public override void GetClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw)
116 { 116 {
117 float distance = 0; 117 float distance = 0;
118 118
119 Vector3 normalInB = new Vector3(); 119 Vector3 normalInB = new Vector3();
120 Vector3 pointOnA = new Vector3(), pointOnB = new Vector3(); 120 Vector3 pointOnA = new Vector3(), pointOnB = new Vector3();
121 121
122 Matrix localTransA = input.TransformA; 122 Matrix localTransA = input.TransformA;
123 Matrix localTransB = input.TransformB; 123 Matrix localTransB = input.TransformB;
124 124
125 Vector3 positionOffset = (localTransA.Translation + localTransB.Translation) * 0.5f; 125 Vector3 positionOffset = (localTransA.Translation + localTransB.Translation) * 0.5f;
126 localTransA.Translation -= positionOffset; 126 localTransA.Translation -= positionOffset;
127 localTransB.Translation -= positionOffset; 127 localTransB.Translation -= positionOffset;
128 128
129 float marginA = _minkowskiA.Margin; 129 float marginA = _minkowskiA.Margin;
130 float marginB = _minkowskiB.Margin; 130 float marginB = _minkowskiB.Margin;
131 131
132 _numGjkChecks++; 132 _numGjkChecks++;
133 133
134 if (_ignoreMargin) 134 if (_ignoreMargin)
135 { 135 {
136 marginA = 0; 136 marginA = 0;
137 marginB = 0; 137 marginB = 0;
138 } 138 }
139 139
140 _currentIteration = 0; 140 _currentIteration = 0;
141 141
142 int gjkMaxIter = 1000; 142 int gjkMaxIter = 1000;
143 _cachedSeparatingAxis = new Vector3(0, 1, 0); 143 _cachedSeparatingAxis = new Vector3(0, 1, 0);
144 144
145 bool isValid = false; 145 bool isValid = false;
146 bool checkSimplex = false; 146 bool checkSimplex = false;
147 bool checkPenetration = true; 147 bool checkPenetration = true;
148 _degenerateSimplex = 0; 148 _degenerateSimplex = 0;
149 149
150 _lastUsedMethod = -1; 150 _lastUsedMethod = -1;
151 151
152 { 152 {
153 float squaredDistance = MathHelper.Infinity; 153 float squaredDistance = MathHelper.Infinity;
154 float delta = 0; 154 float delta = 0;
155 155
156 float margin = marginA + marginB; 156 float margin = marginA + marginB;
157 157
158 _simplexSolver.Reset(); 158 _simplexSolver.Reset();
159 159
160 while (true) 160 while (true)
161 { 161 {
162 Matrix transABasis = input.TransformA; 162 Matrix transABasis = input.TransformA;
163 transABasis.Translation = Vector3.Zero; 163 transABasis.Translation = Vector3.Zero;
164 164
165 Matrix transBBasis = input.TransformB; 165 Matrix transBBasis = input.TransformB;
166 transBBasis.Translation = Vector3.Zero; 166 transBBasis.Translation = Vector3.Zero;
167 167
168 Vector3 seperatingAxisInA = Vector3.TransformNormal(-_cachedSeparatingAxis, transABasis); 168 Vector3 seperatingAxisInA = Vector3.TransformNormal(-_cachedSeparatingAxis, transABasis);
169 Vector3 seperatingAxisInB = Vector3.TransformNormal(_cachedSeparatingAxis, transBBasis); 169 Vector3 seperatingAxisInB = Vector3.TransformNormal(_cachedSeparatingAxis, transBBasis);
170 170
171 Vector3 pInA = _minkowskiA.LocalGetSupportingVertexWithoutMargin(seperatingAxisInA); 171 Vector3 pInA = _minkowskiA.LocalGetSupportingVertexWithoutMargin(seperatingAxisInA);
172 Vector3 qInB = _minkowskiB.LocalGetSupportingVertexWithoutMargin(seperatingAxisInB); 172 Vector3 qInB = _minkowskiB.LocalGetSupportingVertexWithoutMargin(seperatingAxisInB);
173 Vector3 pWorld = MathHelper.MatrixToVector(localTransA, pInA); 173 Vector3 pWorld = MathHelper.MatrixToVector(localTransA, pInA);
174 Vector3 qWorld = MathHelper.MatrixToVector(localTransB, qInB); 174 Vector3 qWorld = MathHelper.MatrixToVector(localTransB, qInB);
175 175
176 Vector3 w = pWorld - qWorld; 176 Vector3 w = pWorld - qWorld;
177 delta = Vector3.Dot(_cachedSeparatingAxis, w); 177 delta = Vector3.Dot(_cachedSeparatingAxis, w);
178 178
179 if ((delta > 0.0) && (delta * delta > squaredDistance * input.MaximumDistanceSquared)) 179 if ((delta > 0.0) && (delta * delta > squaredDistance * input.MaximumDistanceSquared))
180 { 180 {
181 checkPenetration = false; 181 checkPenetration = false;
182 break; 182 break;
183 } 183 }
184 184
185 if (_simplexSolver.InSimplex(w)) 185 if (_simplexSolver.InSimplex(w))
186 { 186 {
187 _degenerateSimplex = 1; 187 _degenerateSimplex = 1;
188 checkSimplex = true; 188 checkSimplex = true;
189 break; 189 break;
190 } 190 }
191 191
192 float f0 = squaredDistance - delta; 192 float f0 = squaredDistance - delta;
193 float f1 = squaredDistance * RelativeError2; 193 float f1 = squaredDistance * RelativeError2;
194 194
195 if (f0 <= f1) 195 if (f0 <= f1)
196 { 196 {
197 if (f0 <= 0.0f) 197 if (f0 <= 0.0f)
198 { 198 {
199 _degenerateSimplex = 2; 199 _degenerateSimplex = 2;
200 } 200 }
201 201
202 checkSimplex = true; 202 checkSimplex = true;
203 break; 203 break;
204 } 204 }
205 205
206 _simplexSolver.AddVertex(w, pWorld, qWorld); 206 _simplexSolver.AddVertex(w, pWorld, qWorld);
207 207
208 if (!_simplexSolver.Closest(out _cachedSeparatingAxis)) 208 if (!_simplexSolver.Closest(out _cachedSeparatingAxis))
209 { 209 {
210 _degenerateSimplex = 3; 210 _degenerateSimplex = 3;
211 checkSimplex = true; 211 checkSimplex = true;
212 break; 212 break;
213 } 213 }
214 214
215 float previouseSquaredDistance = squaredDistance; 215 float previouseSquaredDistance = squaredDistance;
216 squaredDistance = _cachedSeparatingAxis.LengthSquared(); 216 squaredDistance = _cachedSeparatingAxis.LengthSquared();
217 217
218 if (previouseSquaredDistance - squaredDistance <= MathHelper.Epsilon * previouseSquaredDistance) 218 if (previouseSquaredDistance - squaredDistance <= MathHelper.Epsilon * previouseSquaredDistance)
219 { 219 {
220 _simplexSolver.BackupClosest(out _cachedSeparatingAxis); 220 _simplexSolver.BackupClosest(out _cachedSeparatingAxis);
221 checkSimplex = true; 221 checkSimplex = true;
222 break; 222 break;
223 } 223 }
224 224
225 if (_currentIteration++ > gjkMaxIter) 225 if (_currentIteration++ > gjkMaxIter)
226 { 226 {
227#if DEBUG 227#if DEBUG
228 Console.WriteLine("GjkPairDetector maxIter exceeded: {0}", _currentIteration); 228 Console.WriteLine("GjkPairDetector maxIter exceeded: {0}", _currentIteration);
229 Console.WriteLine("sepAxis=({0},{1},{2}), squaredDistance = {3}, shapeTypeA={4}, shapeTypeB={5}", 229 Console.WriteLine("sepAxis=({0},{1},{2}), squaredDistance = {3}, shapeTypeA={4}, shapeTypeB={5}",
230 _cachedSeparatingAxis.X, 230 _cachedSeparatingAxis.X,
231 _cachedSeparatingAxis.Y, 231 _cachedSeparatingAxis.Y,
232 _cachedSeparatingAxis.Z, 232 _cachedSeparatingAxis.Z,
233 squaredDistance, 233 squaredDistance,
234 _minkowskiA.ShapeType, 234 _minkowskiA.ShapeType,
235 _minkowskiB.ShapeType 235 _minkowskiB.ShapeType
236 ); 236 );
237#endif 237#endif
238 break; 238 break;
239 } 239 }
240 240
241 bool check = (!_simplexSolver.FullSimplex); 241 bool check = (!_simplexSolver.FullSimplex);
242 242
243 if (!check) 243 if (!check)
244 { 244 {
245 _simplexSolver.BackupClosest(out _cachedSeparatingAxis); 245 _simplexSolver.BackupClosest(out _cachedSeparatingAxis);
246 break; 246 break;
247 } 247 }
248 } 248 }
249 249
250 if (checkSimplex) 250 if (checkSimplex)
251 { 251 {
252 _simplexSolver.ComputePoints(out pointOnA, out pointOnB); 252 _simplexSolver.ComputePoints(out pointOnA, out pointOnB);
253 normalInB = pointOnA - pointOnB; 253 normalInB = pointOnA - pointOnB;
254 float lenSqr = _cachedSeparatingAxis.LengthSquared(); 254 float lenSqr = _cachedSeparatingAxis.LengthSquared();
255 255
256 if (lenSqr < 0.0001f) 256 if (lenSqr < 0.0001f)
257 { 257 {
258 _degenerateSimplex = 5; 258 _degenerateSimplex = 5;
259 } 259 }
260 260
261 if (lenSqr > MathHelper.Epsilon * MathHelper.Epsilon) 261 if (lenSqr > MathHelper.Epsilon * MathHelper.Epsilon)
262 { 262 {
263 float rlen = 1.0f / (float)Math.Sqrt((float)lenSqr); 263 float rlen = 1.0f / (float)Math.Sqrt((float)lenSqr);
264 normalInB *= rlen; 264 normalInB *= rlen;
265 float s = (float)Math.Sqrt((float)squaredDistance); 265 float s = (float)Math.Sqrt((float)squaredDistance);
266 266
267 BulletDebug.Assert(s > 0); 267 BulletDebug.Assert(s > 0);
268 pointOnA -= _cachedSeparatingAxis * (marginA / s); 268 pointOnA -= _cachedSeparatingAxis * (marginA / s);
269 pointOnB += _cachedSeparatingAxis * (marginB / s); 269 pointOnB += _cachedSeparatingAxis * (marginB / s);
270 distance = ((1 / rlen) - margin); 270 distance = ((1 / rlen) - margin);
271 271
272 isValid = true; 272 isValid = true;
273 273
274 _lastUsedMethod = 1; 274 _lastUsedMethod = 1;
275 } 275 }
276 else 276 else
277 { 277 {
278 _lastUsedMethod = 2; 278 _lastUsedMethod = 2;
279 } 279 }
280 } 280 }
281 281
282 bool catchDegeneratePenetrationCase = 282 bool catchDegeneratePenetrationCase =
283 (_catchDegeneracies != 0 && _penetrationDepthSolver != null && _degenerateSimplex != 0 && ((distance + margin) < 0.01f)); 283 (_catchDegeneracies != 0 && _penetrationDepthSolver != null && _degenerateSimplex != 0 && ((distance + margin) < 0.01f));
284 284
285 if (checkPenetration && (!isValid || catchDegeneratePenetrationCase)) 285 if (checkPenetration && (!isValid || catchDegeneratePenetrationCase))
286 { 286 {
287#warning Check this 287#warning Check this
288 if (_penetrationDepthSolver != null) 288 if (_penetrationDepthSolver != null)
289 { 289 {
290 Vector3 tmpPointOnA, tmpPointOnB; 290 Vector3 tmpPointOnA, tmpPointOnB;
291 291
292 _numDeepPenetrationChecks++; 292 _numDeepPenetrationChecks++;
293 293
294 bool isValid2 = _penetrationDepthSolver.CalculatePenetrationDepth( 294 bool isValid2 = _penetrationDepthSolver.CalculatePenetrationDepth(
295 _simplexSolver, _minkowskiA, _minkowskiB, localTransA, localTransB, 295 _simplexSolver, _minkowskiA, _minkowskiB, localTransA, localTransB,
296 _cachedSeparatingAxis, out tmpPointOnA, out tmpPointOnB, 296 _cachedSeparatingAxis, out tmpPointOnA, out tmpPointOnB,
297 debugDraw 297 debugDraw
298 ); 298 );
299 299
300 if (isValid2) 300 if (isValid2)
301 { 301 {
302 Vector3 tmpNormalInB = tmpPointOnB - tmpPointOnA; 302 Vector3 tmpNormalInB = tmpPointOnB - tmpPointOnA;
303 float lengSqr = tmpNormalInB.LengthSquared(); 303 float lengSqr = tmpNormalInB.LengthSquared();
304 304
305 if (lengSqr > (MathHelper.Epsilon * MathHelper.Epsilon)) 305 if (lengSqr > (MathHelper.Epsilon * MathHelper.Epsilon))
306 { 306 {
307 tmpNormalInB /= (float)Math.Sqrt((float)lengSqr); 307 tmpNormalInB /= (float)Math.Sqrt((float)lengSqr);
308 float distance2 = -(tmpPointOnA - tmpPointOnB).Length(); 308 float distance2 = -(tmpPointOnA - tmpPointOnB).Length();
309 309
310 if (!isValid || (distance2 < distance)) 310 if (!isValid || (distance2 < distance))
311 { 311 {
312 distance = distance2; 312 distance = distance2;
313 pointOnA = tmpPointOnA; 313 pointOnA = tmpPointOnA;
314 pointOnB = tmpPointOnB; 314 pointOnB = tmpPointOnB;
315 normalInB = tmpNormalInB; 315 normalInB = tmpNormalInB;
316 isValid = true; 316 isValid = true;
317 _lastUsedMethod = 3; 317 _lastUsedMethod = 3;
318 } 318 }
319 else 319 else
320 { 320 {
321 321
322 } 322 }
323 } 323 }
324 else 324 else
325 { 325 {
326 _lastUsedMethod = 4; 326 _lastUsedMethod = 4;
327 } 327 }
328 } 328 }
329 else 329 else
330 { 330 {
331 _lastUsedMethod = 5; 331 _lastUsedMethod = 5;
332 } 332 }
333 } 333 }
334 } 334 }
335 335
336 if (isValid) 336 if (isValid)
337 { 337 {
338 output.AddContactPoint(normalInB, pointOnB + positionOffset, distance); 338 output.AddContactPoint(normalInB, pointOnB + positionOffset, distance);
339 } 339 }
340 } 340 }
341 } 341 }
342 } 342 }
343} \ No newline at end of file 343} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/IConvexPenetrationDepthSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/IConvexPenetrationDepthSolver.cs
index 59fd486..08206c8 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/IConvexPenetrationDepthSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/IConvexPenetrationDepthSolver.cs
@@ -1,42 +1,42 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// IConvexPenetrationDepthSolver provides an interface for penetration depth calculation. 30 /// IConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
31 /// </summary> 31 /// </summary>
32 public interface IConvexPenetrationDepthSolver 32 public interface IConvexPenetrationDepthSolver
33 { 33 {
34 bool CalculatePenetrationDepth( 34 bool CalculatePenetrationDepth(
35 ISimplexSolver simplexSolver, 35 ISimplexSolver simplexSolver,
36 ConvexShape convexA, ConvexShape convexB, 36 ConvexShape convexA, ConvexShape convexB,
37 Matrix transformA, Matrix transformB, 37 Matrix transformA, Matrix transformB,
38 Vector3 vector, out Vector3 ptrA, out Vector3 ptrB, 38 Vector3 vector, out Vector3 ptrA, out Vector3 ptrB,
39 IDebugDraw debugDraw//, StackAlloc stackAlloc 39 IDebugDraw debugDraw//, StackAlloc stackAlloc
40 ); 40 );
41 } 41 }
42} 42}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ISimplexSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ISimplexSolver.cs
index 71b1eaa..f1b1807 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ISimplexSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ISimplexSolver.cs
@@ -1,48 +1,48 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// ISimplexSolver can incrementally calculate distance between origin and up to 4 vertices 29 /// ISimplexSolver can incrementally calculate distance between origin and up to 4 vertices
30 /// Used by GJK or Linear Casting. Can be implemented by the Johnson-algorithm or alternative approaches based on 30 /// Used by GJK or Linear Casting. Can be implemented by the Johnson-algorithm or alternative approaches based on
31 /// voronoi regions or barycentric coordinates 31 /// voronoi regions or barycentric coordinates
32 public interface ISimplexSolver 32 public interface ISimplexSolver
33 { 33 {
34 void Reset(); 34 void Reset();
35 void AddVertex(Vector3 w, Vector3 p, Vector3 q); 35 void AddVertex(Vector3 w, Vector3 p, Vector3 q);
36 bool Closest(out Vector3 v); 36 bool Closest(out Vector3 v);
37 37
38 int GetSimplex(out Vector3[] pBuf, out Vector3[] qBuf, out Vector3[] yBuf); 38 int GetSimplex(out Vector3[] pBuf, out Vector3[] qBuf, out Vector3[] yBuf);
39 bool InSimplex(Vector3 w); 39 bool InSimplex(Vector3 w);
40 void BackupClosest(out Vector3 v); 40 void BackupClosest(out Vector3 v);
41 void ComputePoints(out Vector3 pA, out Vector3 pB); 41 void ComputePoints(out Vector3 pA, out Vector3 pB);
42 42
43 int NumVertices { get;} 43 int NumVertices { get;}
44 bool EmptySimplex { get;} 44 bool EmptySimplex { get;}
45 float MaxVertex { get;} 45 float MaxVertex { get;}
46 bool FullSimplex { get;} 46 bool FullSimplex { get;}
47 } 47 }
48} \ No newline at end of file 48} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ManifoldPoint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ManifoldPoint.cs
index 751a9df..f5bcedc 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ManifoldPoint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/ManifoldPoint.cs
@@ -1,78 +1,78 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class ManifoldPoint 29 public class ManifoldPoint
30 { 30 {
31 private Vector3 _localPointA; 31 private Vector3 _localPointA;
32 private Vector3 _localPointB; 32 private Vector3 _localPointB;
33 private Vector3 _positionWorldOnB; 33 private Vector3 _positionWorldOnB;
34 private Vector3 _positionWorldOnA; 34 private Vector3 _positionWorldOnA;
35 private Vector3 _normalWorldOnB; 35 private Vector3 _normalWorldOnB;
36 36
37 private float _distance; 37 private float _distance;
38 private float _combinedFriction; 38 private float _combinedFriction;
39 private float _combinedRestitution; 39 private float _combinedRestitution;
40 40
41 private object _userPersistentData; 41 private object _userPersistentData;
42 42
43 private int _lifeTime;//lifetime of the contactpoint in frames 43 private int _lifeTime;//lifetime of the contactpoint in frames
44 44
45 public ManifoldPoint() 45 public ManifoldPoint()
46 : this(new Vector3(), new Vector3(), new Vector3(), 0f) 46 : this(new Vector3(), new Vector3(), new Vector3(), 0f)
47 { 47 {
48 } 48 }
49 49
50 public ManifoldPoint(Vector3 pointA, Vector3 pointB, 50 public ManifoldPoint(Vector3 pointA, Vector3 pointB,
51 Vector3 normal, 51 Vector3 normal,
52 float distance) 52 float distance)
53 { 53 {
54 _localPointA = pointA; 54 _localPointA = pointA;
55 _localPointB = pointB; 55 _localPointB = pointB;
56 _normalWorldOnB = normal; 56 _normalWorldOnB = normal;
57 _distance = distance; 57 _distance = distance;
58 _positionWorldOnA = new Vector3(); 58 _positionWorldOnA = new Vector3();
59 _positionWorldOnB = new Vector3(); 59 _positionWorldOnB = new Vector3();
60 } 60 }
61 61
62 public float Distance { get { return _distance; } set { _distance = value; } } 62 public float Distance { get { return _distance; } set { _distance = value; } }
63 public int LifeTime { get { return _lifeTime; } set { _lifeTime = value; } } 63 public int LifeTime { get { return _lifeTime; } set { _lifeTime = value; } }
64 64
65 public Vector3 PositionWorldOnA { get { return _positionWorldOnA; } set { _positionWorldOnA = value; } } 65 public Vector3 PositionWorldOnA { get { return _positionWorldOnA; } set { _positionWorldOnA = value; } }
66 public Vector3 PositionWorldOnB { get { return _positionWorldOnB; } set { _positionWorldOnB = value; } } 66 public Vector3 PositionWorldOnB { get { return _positionWorldOnB; } set { _positionWorldOnB = value; } }
67 67
68 public Vector3 LocalPointA { get { return _localPointA; } set { _localPointA = value; } } 68 public Vector3 LocalPointA { get { return _localPointA; } set { _localPointA = value; } }
69 public Vector3 LocalPointB { get { return _localPointB; } set { _localPointB = value; } } 69 public Vector3 LocalPointB { get { return _localPointB; } set { _localPointB = value; } }
70 70
71 public Vector3 NormalWorldOnB { get { return _normalWorldOnB; } } 71 public Vector3 NormalWorldOnB { get { return _normalWorldOnB; } }
72 72
73 public float CombinedFriction { get { return _combinedFriction; } set { _combinedFriction = value; } } 73 public float CombinedFriction { get { return _combinedFriction; } set { _combinedFriction = value; } }
74 public float CombinedRestitution { get { return _combinedRestitution; } set { _combinedRestitution = value; } } 74 public float CombinedRestitution { get { return _combinedRestitution; } set { _combinedRestitution = value; } }
75 75
76 public object UserPersistentData { get { return _userPersistentData; } set { _userPersistentData = value; } } 76 public object UserPersistentData { get { return _userPersistentData; } set { _userPersistentData = value; } }
77 } 77 }
78} 78}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cs
index 81b05b8..7363e28 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cs
@@ -1,246 +1,246 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. 30 /// MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
31 /// Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. 31 /// Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points.
32 /// </summary> 32 /// </summary>
33 public class MinkowskiPenetrationDepthSolver : IConvexPenetrationDepthSolver 33 public class MinkowskiPenetrationDepthSolver : IConvexPenetrationDepthSolver
34 { 34 {
35 private const int UnitSpherePointsCount = 42; 35 private const int UnitSpherePointsCount = 42;
36 36
37 private static Vector3[] penetrationDirections = 37 private static Vector3[] penetrationDirections =
38 { 38 {
39 new Vector3(0.000000f , -0.000000f,-1.000000f), 39 new Vector3(0.000000f , -0.000000f,-1.000000f),
40 new Vector3(0.723608f , -0.525725f,-0.447219f), 40 new Vector3(0.723608f , -0.525725f,-0.447219f),
41 new Vector3(-0.276388f , -0.850649f,-0.447219f), 41 new Vector3(-0.276388f , -0.850649f,-0.447219f),
42 new Vector3(-0.894426f , -0.000000f,-0.447216f), 42 new Vector3(-0.894426f , -0.000000f,-0.447216f),
43 new Vector3(-0.276388f , 0.850649f,-0.447220f), 43 new Vector3(-0.276388f , 0.850649f,-0.447220f),
44 new Vector3(0.723608f , 0.525725f,-0.447219f), 44 new Vector3(0.723608f , 0.525725f,-0.447219f),
45 new Vector3(0.276388f , -0.850649f,0.447220f), 45 new Vector3(0.276388f , -0.850649f,0.447220f),
46 new Vector3(-0.723608f , -0.525725f,0.447219f), 46 new Vector3(-0.723608f , -0.525725f,0.447219f),
47 new Vector3(-0.723608f , 0.525725f,0.447219f), 47 new Vector3(-0.723608f , 0.525725f,0.447219f),
48 new Vector3(0.276388f , 0.850649f,0.447219f), 48 new Vector3(0.276388f , 0.850649f,0.447219f),
49 new Vector3(0.894426f , 0.000000f,0.447216f), 49 new Vector3(0.894426f , 0.000000f,0.447216f),
50 new Vector3(-0.000000f , 0.000000f,1.000000f), 50 new Vector3(-0.000000f , 0.000000f,1.000000f),
51 new Vector3(0.425323f , -0.309011f,-0.850654f), 51 new Vector3(0.425323f , -0.309011f,-0.850654f),
52 new Vector3(-0.162456f , -0.499995f,-0.850654f), 52 new Vector3(-0.162456f , -0.499995f,-0.850654f),
53 new Vector3(0.262869f , -0.809012f,-0.525738f), 53 new Vector3(0.262869f , -0.809012f,-0.525738f),
54 new Vector3(0.425323f , 0.309011f,-0.850654f), 54 new Vector3(0.425323f , 0.309011f,-0.850654f),
55 new Vector3(0.850648f , -0.000000f,-0.525736f), 55 new Vector3(0.850648f , -0.000000f,-0.525736f),
56 new Vector3(-0.525730f , -0.000000f,-0.850652f), 56 new Vector3(-0.525730f , -0.000000f,-0.850652f),
57 new Vector3(-0.688190f , -0.499997f,-0.525736f), 57 new Vector3(-0.688190f , -0.499997f,-0.525736f),
58 new Vector3(-0.162456f , 0.499995f,-0.850654f), 58 new Vector3(-0.162456f , 0.499995f,-0.850654f),
59 new Vector3(-0.688190f , 0.499997f,-0.525736f), 59 new Vector3(-0.688190f , 0.499997f,-0.525736f),
60 new Vector3(0.262869f , 0.809012f,-0.525738f), 60 new Vector3(0.262869f , 0.809012f,-0.525738f),
61 new Vector3(0.951058f , 0.309013f,0.000000f), 61 new Vector3(0.951058f , 0.309013f,0.000000f),
62 new Vector3(0.951058f , -0.309013f,0.000000f), 62 new Vector3(0.951058f , -0.309013f,0.000000f),
63 new Vector3(0.587786f , -0.809017f,0.000000f), 63 new Vector3(0.587786f , -0.809017f,0.000000f),
64 new Vector3(0.000000f , -1.000000f,0.000000f), 64 new Vector3(0.000000f , -1.000000f,0.000000f),
65 new Vector3(-0.587786f , -0.809017f,0.000000f), 65 new Vector3(-0.587786f , -0.809017f,0.000000f),
66 new Vector3(-0.951058f , -0.309013f,-0.000000f), 66 new Vector3(-0.951058f , -0.309013f,-0.000000f),
67 new Vector3(-0.951058f , 0.309013f,-0.000000f), 67 new Vector3(-0.951058f , 0.309013f,-0.000000f),
68 new Vector3(-0.587786f , 0.809017f,-0.000000f), 68 new Vector3(-0.587786f , 0.809017f,-0.000000f),
69 new Vector3(-0.000000f , 1.000000f,-0.000000f), 69 new Vector3(-0.000000f , 1.000000f,-0.000000f),
70 new Vector3(0.587786f , 0.809017f,-0.000000f), 70 new Vector3(0.587786f , 0.809017f,-0.000000f),
71 new Vector3(0.688190f , -0.499997f,0.525736f), 71 new Vector3(0.688190f , -0.499997f,0.525736f),
72 new Vector3(-0.262869f , -0.809012f,0.525738f), 72 new Vector3(-0.262869f , -0.809012f,0.525738f),
73 new Vector3(-0.850648f , 0.000000f,0.525736f), 73 new Vector3(-0.850648f , 0.000000f,0.525736f),
74 new Vector3(-0.262869f , 0.809012f,0.525738f), 74 new Vector3(-0.262869f , 0.809012f,0.525738f),
75 new Vector3(0.688190f , 0.499997f,0.525736f), 75 new Vector3(0.688190f , 0.499997f,0.525736f),
76 new Vector3(0.525730f , 0.000000f,0.850652f), 76 new Vector3(0.525730f , 0.000000f,0.850652f),
77 new Vector3(0.162456f , -0.499995f,0.850654f), 77 new Vector3(0.162456f , -0.499995f,0.850654f),
78 new Vector3(-0.425323f , -0.309011f,0.850654f), 78 new Vector3(-0.425323f , -0.309011f,0.850654f),
79 new Vector3(-0.425323f , 0.309011f,0.850654f), 79 new Vector3(-0.425323f , 0.309011f,0.850654f),
80 new Vector3(0.162456f , 0.499995f,0.850654f) 80 new Vector3(0.162456f , 0.499995f,0.850654f)
81 }; 81 };
82 82
83 private class IntermediateResult : DiscreteCollisionDetectorInterface.Result 83 private class IntermediateResult : DiscreteCollisionDetectorInterface.Result
84 { 84 {
85 private Vector3 _normalOnBInWorld; 85 private Vector3 _normalOnBInWorld;
86 private Vector3 _pointInWorld; 86 private Vector3 _pointInWorld;
87 private float _depth; 87 private float _depth;
88 private bool _hasResult; 88 private bool _hasResult;
89 89
90 public IntermediateResult() 90 public IntermediateResult()
91 { 91 {
92 _hasResult = false; 92 _hasResult = false;
93 } 93 }
94 94
95 public bool HasResult { get { return _hasResult; } } 95 public bool HasResult { get { return _hasResult; } }
96 public float Depth { get { return _depth; } } 96 public float Depth { get { return _depth; } }
97 public Vector3 PointInWorld { get { return _pointInWorld; } } 97 public Vector3 PointInWorld { get { return _pointInWorld; } }
98 98
99 public override void SetShapeIdentifiers(int partId0, int index0, int partId1, int index1) 99 public override void SetShapeIdentifiers(int partId0, int index0, int partId1, int index1)
100 { 100 {
101 } 101 }
102 102
103 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) 103 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth)
104 { 104 {
105 _normalOnBInWorld = normalOnBInWorld; 105 _normalOnBInWorld = normalOnBInWorld;
106 _pointInWorld = pointInWorld; 106 _pointInWorld = pointInWorld;
107 _depth = depth; 107 _depth = depth;
108 _hasResult = true; 108 _hasResult = true;
109 } 109 }
110 } 110 }
111 111
112 #region IConvexPenetrationDepthSolver Members 112 #region IConvexPenetrationDepthSolver Members
113 public bool CalculatePenetrationDepth(ISimplexSolver simplexSolver, 113 public bool CalculatePenetrationDepth(ISimplexSolver simplexSolver,
114 ConvexShape convexA, ConvexShape convexB, 114 ConvexShape convexA, ConvexShape convexB,
115 Matrix transformA, Matrix transformB, 115 Matrix transformA, Matrix transformB,
116 Vector3 v, out Vector3 pa, out Vector3 pb, IDebugDraw debugDraw) 116 Vector3 v, out Vector3 pa, out Vector3 pb, IDebugDraw debugDraw)
117 { 117 {
118 pa = new Vector3(); 118 pa = new Vector3();
119 pb = new Vector3(); 119 pb = new Vector3();
120 //just take fixed number of orientation, and sample the penetration depth in that direction 120 //just take fixed number of orientation, and sample the penetration depth in that direction
121 float minProj = 1e30f; 121 float minProj = 1e30f;
122 Vector3 minNorm = new Vector3(); 122 Vector3 minNorm = new Vector3();
123 Vector3 minA = new Vector3(), minB = new Vector3(); 123 Vector3 minA = new Vector3(), minB = new Vector3();
124 Vector3 seperatingAxisInA, seperatingAxisInB; 124 Vector3 seperatingAxisInA, seperatingAxisInB;
125 Vector3 pInA, qInB, pWorld, qWorld, w; 125 Vector3 pInA, qInB, pWorld, qWorld, w;
126 126
127 Vector3[] supportVerticesABatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2]; 127 Vector3[] supportVerticesABatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2];
128 Vector3[] supportVerticesBBatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2]; 128 Vector3[] supportVerticesBBatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2];
129 Vector3[] seperatingAxisInABatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2]; 129 Vector3[] seperatingAxisInABatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2];
130 Vector3[] seperatingAxisInBBatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2]; 130 Vector3[] seperatingAxisInBBatch = new Vector3[UnitSpherePointsCount + ConvexShape.MaxPreferredPenetrationDirections * 2];
131 131
132 int numSampleDirections = UnitSpherePointsCount; 132 int numSampleDirections = UnitSpherePointsCount;
133 133
134 for (int i = 0; i < numSampleDirections; i++) 134 for (int i = 0; i < numSampleDirections; i++)
135 { 135 {
136 Vector3 norm = penetrationDirections[i]; 136 Vector3 norm = penetrationDirections[i];
137 seperatingAxisInABatch[i] = Vector3.TransformNormal((-norm), transformA); 137 seperatingAxisInABatch[i] = Vector3.TransformNormal((-norm), transformA);
138 seperatingAxisInBBatch[i] = Vector3.TransformNormal(norm, transformB); 138 seperatingAxisInBBatch[i] = Vector3.TransformNormal(norm, transformB);
139 } 139 }
140 140
141 { 141 {
142 int numPDA = convexA.PreferredPenetrationDirectionsCount; 142 int numPDA = convexA.PreferredPenetrationDirectionsCount;
143 if (numPDA != 0) 143 if (numPDA != 0)
144 { 144 {
145 for (int i = 0; i < numPDA; i++) 145 for (int i = 0; i < numPDA; i++)
146 { 146 {
147 Vector3 norm; 147 Vector3 norm;
148 convexA.GetPreferredPenetrationDirection(i, out norm); 148 convexA.GetPreferredPenetrationDirection(i, out norm);
149 norm = Vector3.TransformNormal(norm, transformA); 149 norm = Vector3.TransformNormal(norm, transformA);
150 penetrationDirections[numSampleDirections] = norm; 150 penetrationDirections[numSampleDirections] = norm;
151 seperatingAxisInABatch[numSampleDirections] = Vector3.TransformNormal((-norm), transformA); 151 seperatingAxisInABatch[numSampleDirections] = Vector3.TransformNormal((-norm), transformA);
152 seperatingAxisInBBatch[numSampleDirections] = Vector3.TransformNormal(norm, transformB); 152 seperatingAxisInBBatch[numSampleDirections] = Vector3.TransformNormal(norm, transformB);
153 numSampleDirections++; 153 numSampleDirections++;
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 { 158 {
159 int numPDB = convexB.PreferredPenetrationDirectionsCount; 159 int numPDB = convexB.PreferredPenetrationDirectionsCount;
160 if (numPDB != 0) 160 if (numPDB != 0)
161 { 161 {
162 for (int i = 0; i < numPDB; i++) 162 for (int i = 0; i < numPDB; i++)
163 { 163 {
164 Vector3 norm; 164 Vector3 norm;
165 convexB.GetPreferredPenetrationDirection(i, out norm); 165 convexB.GetPreferredPenetrationDirection(i, out norm);
166 norm = Vector3.TransformNormal(norm, transformB); 166 norm = Vector3.TransformNormal(norm, transformB);
167 penetrationDirections[numSampleDirections] = norm; 167 penetrationDirections[numSampleDirections] = norm;
168 seperatingAxisInABatch[numSampleDirections] = Vector3.TransformNormal((-norm), transformA); 168 seperatingAxisInABatch[numSampleDirections] = Vector3.TransformNormal((-norm), transformA);
169 seperatingAxisInBBatch[numSampleDirections] = Vector3.TransformNormal(norm, transformB); 169 seperatingAxisInBBatch[numSampleDirections] = Vector3.TransformNormal(norm, transformB);
170 numSampleDirections++; 170 numSampleDirections++;
171 } 171 }
172 } 172 }
173 } 173 }
174 174
175 convexA.BatchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch, supportVerticesABatch); //, numSampleDirections); 175 convexA.BatchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch, supportVerticesABatch); //, numSampleDirections);
176 convexB.BatchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch, supportVerticesBBatch); //, numSampleDirections); 176 convexB.BatchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch, supportVerticesBBatch); //, numSampleDirections);
177 177
178 for (int i = 0; i < numSampleDirections; i++) 178 for (int i = 0; i < numSampleDirections; i++)
179 { 179 {
180 Vector3 norm = penetrationDirections[i]; 180 Vector3 norm = penetrationDirections[i];
181 seperatingAxisInA = seperatingAxisInABatch[i]; 181 seperatingAxisInA = seperatingAxisInABatch[i];
182 seperatingAxisInB = seperatingAxisInBBatch[i]; 182 seperatingAxisInB = seperatingAxisInBBatch[i];
183 183
184 pInA = supportVerticesABatch[i]; 184 pInA = supportVerticesABatch[i];
185 qInB = supportVerticesBBatch[i]; 185 qInB = supportVerticesBBatch[i];
186 186
187 pWorld = MathHelper.MatrixToVector(transformA, pInA); 187 pWorld = MathHelper.MatrixToVector(transformA, pInA);
188 qWorld = MathHelper.MatrixToVector(transformB, qInB); 188 qWorld = MathHelper.MatrixToVector(transformB, qInB);
189 w = qWorld - pWorld; 189 w = qWorld - pWorld;
190 float delta = Vector3.Dot(norm, w); 190 float delta = Vector3.Dot(norm, w);
191 //find smallest delta 191 //find smallest delta
192 if (delta < minProj) 192 if (delta < minProj)
193 { 193 {
194 minProj = delta; 194 minProj = delta;
195 minNorm = norm; 195 minNorm = norm;
196 minA = pWorld; 196 minA = pWorld;
197 minB = qWorld; 197 minB = qWorld;
198 } 198 }
199 } 199 }
200 200
201 //add the margins 201 //add the margins
202 minA += minNorm * convexA.Margin; 202 minA += minNorm * convexA.Margin;
203 minB -= minNorm * convexB.Margin; 203 minB -= minNorm * convexB.Margin;
204 //no penetration 204 //no penetration
205 if (minProj < 0) 205 if (minProj < 0)
206 return false; 206 return false;
207 207
208 minProj += (convexA.Margin + convexB.Margin); 208 minProj += (convexA.Margin + convexB.Margin);
209 209
210 GjkPairDetector gjkdet = new GjkPairDetector(convexA, convexB, simplexSolver, null); 210 GjkPairDetector gjkdet = new GjkPairDetector(convexA, convexB, simplexSolver, null);
211 211
212 float offsetDist = minProj; 212 float offsetDist = minProj;
213 Vector3 offset = minNorm * offsetDist; 213 Vector3 offset = minNorm * offsetDist;
214 214
215 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput(); 215 GjkPairDetector.ClosestPointInput input = new DiscreteCollisionDetectorInterface.ClosestPointInput();
216 216
217 Vector3 newOrg = transformA.Translation + offset; 217 Vector3 newOrg = transformA.Translation + offset;
218 218
219 Matrix displacedTrans = transformA; 219 Matrix displacedTrans = transformA;
220 displacedTrans.Translation = newOrg; 220 displacedTrans.Translation = newOrg;
221 221
222 input.TransformA = displacedTrans; 222 input.TransformA = displacedTrans;
223 input.TransformB = transformB; 223 input.TransformB = transformB;
224 input.MaximumDistanceSquared = 1e30f;//minProj; 224 input.MaximumDistanceSquared = 1e30f;//minProj;
225 225
226 IntermediateResult res = new IntermediateResult(); 226 IntermediateResult res = new IntermediateResult();
227 gjkdet.GetClosestPoints(input, res, debugDraw); 227 gjkdet.GetClosestPoints(input, res, debugDraw);
228 228
229 float correctedMinNorm = minProj - res.Depth; 229 float correctedMinNorm = minProj - res.Depth;
230 230
231 //the penetration depth is over-estimated, relax it 231 //the penetration depth is over-estimated, relax it
232 float penetration_relaxation = 1; 232 float penetration_relaxation = 1;
233 minNorm *= penetration_relaxation; 233 minNorm *= penetration_relaxation;
234 234
235 if (res.HasResult) 235 if (res.HasResult)
236 { 236 {
237 237
238 pa = res.PointInWorld - minNorm * correctedMinNorm; 238 pa = res.PointInWorld - minNorm * correctedMinNorm;
239 pb = res.PointInWorld; 239 pb = res.PointInWorld;
240 } 240 }
241 241
242 return res.HasResult; 242 return res.HasResult;
243 } 243 }
244 #endregion 244 #endregion
245 } 245 }
246} 246}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PersistentManifold.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PersistentManifold.cs
index 47cfe9a..04a533d 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PersistentManifold.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PersistentManifold.cs
@@ -1,272 +1,272 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public delegate bool ContactDestroyedCallback(object userPersistentData); 29 public delegate bool ContactDestroyedCallback(object userPersistentData);
30 30
31 public class PersistentManifold 31 public class PersistentManifold
32 { 32 {
33 private static ContactDestroyedCallback _contactDestroyedCallback = null; 33 private static ContactDestroyedCallback _contactDestroyedCallback = null;
34 private static float _contactBreakingThreshold = 0.02f; 34 private static float _contactBreakingThreshold = 0.02f;
35 35
36 private ManifoldPoint[] _pointCache = new ManifoldPoint[4]; 36 private ManifoldPoint[] _pointCache = new ManifoldPoint[4];
37 37
38 // this two body pointers can point to the physics rigidbody class. 38 // this two body pointers can point to the physics rigidbody class.
39 // object will allow any rigidbody class 39 // object will allow any rigidbody class
40 private object _bodyA; 40 private object _bodyA;
41 private object _bodyB; 41 private object _bodyB;
42 private int _cachedPoints; 42 private int _cachedPoints;
43 43
44 public PersistentManifold(object bodyA, object bodyB) 44 public PersistentManifold(object bodyA, object bodyB)
45 { 45 {
46 _bodyA = bodyA; 46 _bodyA = bodyA;
47 _bodyB = bodyB; 47 _bodyB = bodyB;
48 _cachedPoints = 0; 48 _cachedPoints = 0;
49 } 49 }
50 50
51 public object BodyA { get { return _bodyA; } } 51 public object BodyA { get { return _bodyA; } }
52 public object BodyB { get { return _bodyB; } } 52 public object BodyB { get { return _bodyB; } }
53 53
54 public int ContactsCount { get { return _cachedPoints; } } 54 public int ContactsCount { get { return _cachedPoints; } }
55 55
56 public static ContactDestroyedCallback ContactDestroyedCallback { get { return _contactDestroyedCallback; } set { _contactDestroyedCallback = value; } } 56 public static ContactDestroyedCallback ContactDestroyedCallback { get { return _contactDestroyedCallback; } set { _contactDestroyedCallback = value; } }
57 public static float ContactBreakingThreshold { get { return _contactBreakingThreshold; } } 57 public static float ContactBreakingThreshold { get { return _contactBreakingThreshold; } }
58 58
59 public void SetBodies(object bodyA, object bodyB) 59 public void SetBodies(object bodyA, object bodyB)
60 { 60 {
61 _bodyA = bodyA; 61 _bodyA = bodyA;
62 _bodyB = bodyB; 62 _bodyB = bodyB;
63 } 63 }
64 64
65 public ManifoldPoint GetContactPoint(int index) 65 public ManifoldPoint GetContactPoint(int index)
66 { 66 {
67 if (index >= _cachedPoints) 67 if (index >= _cachedPoints)
68 throw new ArgumentOutOfRangeException("index", "index must be smaller than cachedPoints"); 68 throw new ArgumentOutOfRangeException("index", "index must be smaller than cachedPoints");
69 69
70 return _pointCache[index]; 70 return _pointCache[index];
71 } 71 }
72 72
73 public int GetCacheEntry(ManifoldPoint newPoint) 73 public int GetCacheEntry(ManifoldPoint newPoint)
74 { 74 {
75 float shortestDist = ContactBreakingThreshold * ContactBreakingThreshold; 75 float shortestDist = ContactBreakingThreshold * ContactBreakingThreshold;
76 int size = ContactsCount; 76 int size = ContactsCount;
77 int nearestPoint = -1; 77 int nearestPoint = -1;
78 for (int i = 0; i < size; i++) 78 for (int i = 0; i < size; i++)
79 { 79 {
80 ManifoldPoint mp = _pointCache[i]; 80 ManifoldPoint mp = _pointCache[i];
81 81
82 Vector3 diffA = mp.LocalPointA - newPoint.LocalPointA; 82 Vector3 diffA = mp.LocalPointA - newPoint.LocalPointA;
83 float distToManiPoint = Vector3.Dot(diffA, diffA); 83 float distToManiPoint = Vector3.Dot(diffA, diffA);
84 if (distToManiPoint < shortestDist) 84 if (distToManiPoint < shortestDist)
85 { 85 {
86 shortestDist = distToManiPoint; 86 shortestDist = distToManiPoint;
87 nearestPoint = i; 87 nearestPoint = i;
88 } 88 }
89 } 89 }
90 return nearestPoint; 90 return nearestPoint;
91 } 91 }
92 92
93 public void AddManifoldPoint(ManifoldPoint newPoint) 93 public void AddManifoldPoint(ManifoldPoint newPoint)
94 { 94 {
95 if (!ValidContactDistance(newPoint)) 95 if (!ValidContactDistance(newPoint))
96 throw new BulletException(); 96 throw new BulletException();
97 97
98 int insertIndex = ContactsCount; 98 int insertIndex = ContactsCount;
99 if (insertIndex == 4) 99 if (insertIndex == 4)
100 { 100 {
101 //sort cache so best points come first, based on area 101 //sort cache so best points come first, based on area
102 insertIndex = SortCachedPoints(newPoint); 102 insertIndex = SortCachedPoints(newPoint);
103 } 103 }
104 else 104 else
105 { 105 {
106 _cachedPoints++; 106 _cachedPoints++;
107 } 107 }
108 ReplaceContactPoint(newPoint, insertIndex); 108 ReplaceContactPoint(newPoint, insertIndex);
109 } 109 }
110 110
111 public void RemoveContactPoint(int index) 111 public void RemoveContactPoint(int index)
112 { 112 {
113 ClearUserCache(_pointCache[index]); 113 ClearUserCache(_pointCache[index]);
114 114
115 int lastUsedIndex = ContactsCount - 1; 115 int lastUsedIndex = ContactsCount - 1;
116 _pointCache[index] = _pointCache[lastUsedIndex]; 116 _pointCache[index] = _pointCache[lastUsedIndex];
117 //get rid of duplicated userPersistentData pointer 117 //get rid of duplicated userPersistentData pointer
118 _pointCache[lastUsedIndex].UserPersistentData = null; 118 _pointCache[lastUsedIndex].UserPersistentData = null;
119 _cachedPoints--; 119 _cachedPoints--;
120 } 120 }
121 121
122 public void ReplaceContactPoint(ManifoldPoint newPoint, int insertIndex) 122 public void ReplaceContactPoint(ManifoldPoint newPoint, int insertIndex)
123 { 123 {
124 BulletDebug.Assert(ValidContactDistance(newPoint)); 124 BulletDebug.Assert(ValidContactDistance(newPoint));
125 125
126 if (_pointCache[insertIndex] != null) 126 if (_pointCache[insertIndex] != null)
127 { 127 {
128 int lifeTime = _pointCache[insertIndex].LifeTime; 128 int lifeTime = _pointCache[insertIndex].LifeTime;
129 BulletDebug.Assert(lifeTime >= 0); 129 BulletDebug.Assert(lifeTime >= 0);
130 object cache = _pointCache[insertIndex].UserPersistentData; 130 object cache = _pointCache[insertIndex].UserPersistentData;
131 131
132 _pointCache[insertIndex] = newPoint; 132 _pointCache[insertIndex] = newPoint;
133 133
134 _pointCache[insertIndex].UserPersistentData = cache; 134 _pointCache[insertIndex].UserPersistentData = cache;
135 _pointCache[insertIndex].LifeTime = lifeTime; 135 _pointCache[insertIndex].LifeTime = lifeTime;
136 } 136 }
137 else 137 else
138 { 138 {
139 _pointCache[insertIndex] = newPoint; 139 _pointCache[insertIndex] = newPoint;
140 } 140 }
141 141
142 //ClearUserCache(_pointCache[insertIndex]); 142 //ClearUserCache(_pointCache[insertIndex]);
143 //_pointCache[insertIndex] = newPoint; 143 //_pointCache[insertIndex] = newPoint;
144 } 144 }
145 145
146 public bool ValidContactDistance(ManifoldPoint pt) 146 public bool ValidContactDistance(ManifoldPoint pt)
147 { 147 {
148 return pt.Distance <= ContactBreakingThreshold; 148 return pt.Distance <= ContactBreakingThreshold;
149 } 149 }
150 150
151 // calculated new worldspace coordinates and depth, and reject points that exceed the collision margin 151 // calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
152 public void RefreshContactPoints(Matrix trA, Matrix trB) 152 public void RefreshContactPoints(Matrix trA, Matrix trB)
153 { 153 {
154 // first refresh worldspace positions and distance 154 // first refresh worldspace positions and distance
155 for (int i = ContactsCount - 1; i >= 0; i--) 155 for (int i = ContactsCount - 1; i >= 0; i--)
156 { 156 {
157 ManifoldPoint manifoldPoint = _pointCache[i]; 157 ManifoldPoint manifoldPoint = _pointCache[i];
158 manifoldPoint.PositionWorldOnA = MathHelper.MatrixToVector(trA,manifoldPoint.LocalPointA); 158 manifoldPoint.PositionWorldOnA = MathHelper.MatrixToVector(trA,manifoldPoint.LocalPointA);
159 manifoldPoint.PositionWorldOnB = MathHelper.MatrixToVector(trB, manifoldPoint.LocalPointB); 159 manifoldPoint.PositionWorldOnB = MathHelper.MatrixToVector(trB, manifoldPoint.LocalPointB);
160 manifoldPoint.Distance = Vector3.Dot(manifoldPoint.PositionWorldOnA - manifoldPoint.PositionWorldOnB, manifoldPoint.NormalWorldOnB); 160 manifoldPoint.Distance = Vector3.Dot(manifoldPoint.PositionWorldOnA - manifoldPoint.PositionWorldOnB, manifoldPoint.NormalWorldOnB);
161 manifoldPoint.LifeTime++; 161 manifoldPoint.LifeTime++;
162 } 162 }
163 163
164 // then 164 // then
165 float distance2d; 165 float distance2d;
166 Vector3 projectedDifference, projectedPoint; 166 Vector3 projectedDifference, projectedPoint;
167 for (int i = ContactsCount - 1; i >= 0; i--) 167 for (int i = ContactsCount - 1; i >= 0; i--)
168 { 168 {
169 169
170 ManifoldPoint manifoldPoint = _pointCache[i]; 170 ManifoldPoint manifoldPoint = _pointCache[i];
171 //contact becomes invalid when signed distance exceeds margin (projected on contactnormal direction) 171 //contact becomes invalid when signed distance exceeds margin (projected on contactnormal direction)
172 if (!ValidContactDistance(manifoldPoint)) 172 if (!ValidContactDistance(manifoldPoint))
173 { 173 {
174 RemoveContactPoint(i); 174 RemoveContactPoint(i);
175 } 175 }
176 else 176 else
177 { 177 {
178 //contact also becomes invalid when relative movement orthogonal to normal exceeds margin 178 //contact also becomes invalid when relative movement orthogonal to normal exceeds margin
179 projectedPoint = manifoldPoint.PositionWorldOnA - manifoldPoint.NormalWorldOnB * manifoldPoint.Distance; 179 projectedPoint = manifoldPoint.PositionWorldOnA - manifoldPoint.NormalWorldOnB * manifoldPoint.Distance;
180 projectedDifference = manifoldPoint.PositionWorldOnB - projectedPoint; 180 projectedDifference = manifoldPoint.PositionWorldOnB - projectedPoint;
181 distance2d = Vector3.Dot(projectedDifference, projectedDifference); 181 distance2d = Vector3.Dot(projectedDifference, projectedDifference);
182 if (distance2d > ContactBreakingThreshold * ContactBreakingThreshold) 182 if (distance2d > ContactBreakingThreshold * ContactBreakingThreshold)
183 { 183 {
184 RemoveContactPoint(i); 184 RemoveContactPoint(i);
185 } 185 }
186 } 186 }
187 } 187 }
188 } 188 }
189 189
190 public void ClearManifold() 190 public void ClearManifold()
191 { 191 {
192 for (int i = 0; i < _cachedPoints; i++) 192 for (int i = 0; i < _cachedPoints; i++)
193 { 193 {
194 ClearUserCache(_pointCache[i]); 194 ClearUserCache(_pointCache[i]);
195 } 195 }
196 _cachedPoints = 0; 196 _cachedPoints = 0;
197 } 197 }
198 198
199 private void ClearUserCache(ManifoldPoint pt) 199 private void ClearUserCache(ManifoldPoint pt)
200 { 200 {
201 if (pt != null) 201 if (pt != null)
202 { 202 {
203 object oldPtr = pt.UserPersistentData; 203 object oldPtr = pt.UserPersistentData;
204 204
205 if (oldPtr != null) 205 if (oldPtr != null)
206 { 206 {
207 if (pt.UserPersistentData != null && _contactDestroyedCallback != null) 207 if (pt.UserPersistentData != null && _contactDestroyedCallback != null)
208 { 208 {
209 _contactDestroyedCallback(pt.UserPersistentData); 209 _contactDestroyedCallback(pt.UserPersistentData);
210 pt.UserPersistentData = null; 210 pt.UserPersistentData = null;
211 } 211 }
212 } 212 }
213 } 213 }
214 } 214 }
215 215
216 // sort cached points so most isolated points come first 216 // sort cached points so most isolated points come first
217 private int SortCachedPoints(ManifoldPoint pt) 217 private int SortCachedPoints(ManifoldPoint pt)
218 { 218 {
219 //calculate 4 possible cases areas, and take biggest area 219 //calculate 4 possible cases areas, and take biggest area
220 //also need to keep 'deepest' 220 //also need to keep 'deepest'
221 221
222 int maxPenetrationIndex = -1; 222 int maxPenetrationIndex = -1;
223 float maxPenetration = pt.Distance; 223 float maxPenetration = pt.Distance;
224 for (int i = 0; i < 4; i++) 224 for (int i = 0; i < 4; i++)
225 { 225 {
226 if (_pointCache[i].Distance < maxPenetration) 226 if (_pointCache[i].Distance < maxPenetration)
227 { 227 {
228 maxPenetrationIndex = i; 228 maxPenetrationIndex = i;
229 maxPenetration = _pointCache[i].Distance; 229 maxPenetration = _pointCache[i].Distance;
230 } 230 }
231 } 231 }
232 232
233 float res0 = 0, res1 = 0, res2 = 0, res3 = 0; 233 float res0 = 0, res1 = 0, res2 = 0, res3 = 0;
234 if (maxPenetrationIndex != 0) 234 if (maxPenetrationIndex != 0)
235 { 235 {
236 Vector3 a0 = pt.LocalPointA - _pointCache[1].LocalPointA; 236 Vector3 a0 = pt.LocalPointA - _pointCache[1].LocalPointA;
237 Vector3 b0 = _pointCache[3].LocalPointA - _pointCache[2].LocalPointA; 237 Vector3 b0 = _pointCache[3].LocalPointA - _pointCache[2].LocalPointA;
238 Vector3 cross = Vector3.Cross(a0, b0); 238 Vector3 cross = Vector3.Cross(a0, b0);
239 res0 = cross.LengthSquared(); 239 res0 = cross.LengthSquared();
240 } 240 }
241 if (maxPenetrationIndex != 1) 241 if (maxPenetrationIndex != 1)
242 { 242 {
243 Vector3 a1 = pt.LocalPointA - _pointCache[0].LocalPointA; 243 Vector3 a1 = pt.LocalPointA - _pointCache[0].LocalPointA;
244 Vector3 b1 = _pointCache[3].LocalPointA - _pointCache[2].LocalPointA; 244 Vector3 b1 = _pointCache[3].LocalPointA - _pointCache[2].LocalPointA;
245 Vector3 cross = Vector3.Cross(a1, b1); 245 Vector3 cross = Vector3.Cross(a1, b1);
246 res1 = cross.LengthSquared(); 246 res1 = cross.LengthSquared();
247 } 247 }
248 248
249 if (maxPenetrationIndex != 2) 249 if (maxPenetrationIndex != 2)
250 { 250 {
251 Vector3 a2 = pt.LocalPointA - _pointCache[0].LocalPointA; 251 Vector3 a2 = pt.LocalPointA - _pointCache[0].LocalPointA;
252 Vector3 b2 = _pointCache[3].LocalPointA - _pointCache[1].LocalPointA; 252 Vector3 b2 = _pointCache[3].LocalPointA - _pointCache[1].LocalPointA;
253 Vector3 cross = Vector3.Cross(a2, b2); 253 Vector3 cross = Vector3.Cross(a2, b2);
254 res2 = cross.LengthSquared(); 254 res2 = cross.LengthSquared();
255 } 255 }
256 256
257 if (maxPenetrationIndex != 3) 257 if (maxPenetrationIndex != 3)
258 { 258 {
259 Vector3 a3 = pt.LocalPointA - _pointCache[0].LocalPointA; 259 Vector3 a3 = pt.LocalPointA - _pointCache[0].LocalPointA;
260 Vector3 b3 = _pointCache[2].LocalPointA - _pointCache[1].LocalPointA; 260 Vector3 b3 = _pointCache[2].LocalPointA - _pointCache[1].LocalPointA;
261 Vector3 cross = Vector3.Cross(a3, b3); 261 Vector3 cross = Vector3.Cross(a3, b3);
262 res3 = cross.LengthSquared(); 262 res3 = cross.LengthSquared();
263 } 263 }
264 264
265 Vector4 maxvec = new Vector4(res0, res1, res2, res3); 265 Vector4 maxvec = new Vector4(res0, res1, res2, res3);
266 int biggestarea = MathHelper.ClosestAxis(maxvec); 266 int biggestarea = MathHelper.ClosestAxis(maxvec);
267 return biggestarea; 267 return biggestarea;
268 } 268 }
269 269
270 private int FindContactPoint(ManifoldPoint unUsed, int numUnused, ManifoldPoint pt) { return 0; } 270 private int FindContactPoint(ManifoldPoint unUsed, int numUnused, ManifoldPoint pt) { return 0; }
271 } 271 }
272} 272}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PointCollector.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PointCollector.cs
index 4e0b0a0..c70741e 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PointCollector.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/PointCollector.cs
@@ -1,64 +1,64 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class PointCollector : DiscreteCollisionDetectorInterface.Result 29 public class PointCollector : DiscreteCollisionDetectorInterface.Result
30 { 30 {
31 private Vector3 _normalOnBInWorld; 31 private Vector3 _normalOnBInWorld;
32 private Vector3 _pointInWorld; 32 private Vector3 _pointInWorld;
33 private float _distance; //negative means penetration 33 private float _distance; //negative means penetration
34 private bool _hasResult; 34 private bool _hasResult;
35 35
36 public PointCollector() 36 public PointCollector()
37 { 37 {
38 _distance = 1e30f; 38 _distance = 1e30f;
39 _hasResult = false; 39 _hasResult = false;
40 } 40 }
41 41
42 public Vector3 NormalOnBInWorld { get { return _normalOnBInWorld; } } 42 public Vector3 NormalOnBInWorld { get { return _normalOnBInWorld; } }
43 public Vector3 PointInWorld { get { return _pointInWorld; } } 43 public Vector3 PointInWorld { get { return _pointInWorld; } }
44 public float Distance { get { return _distance; } } 44 public float Distance { get { return _distance; } }
45 public bool HasResult { get { return _hasResult; } } 45 public bool HasResult { get { return _hasResult; } }
46 46
47 public override void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB) 47 public override void SetShapeIdentifiers(int partIdA, int indexA, int partIdB, int indexB)
48 { 48 {
49 //?? 49 //??
50 } 50 }
51 51
52 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) 52 public override void AddContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth)
53 { 53 {
54 if (depth < _distance) 54 if (depth < _distance)
55 { 55 {
56 _hasResult = true; 56 _hasResult = true;
57 _normalOnBInWorld = normalOnBInWorld; 57 _normalOnBInWorld = normalOnBInWorld;
58 _pointInWorld = pointInWorld; 58 _pointInWorld = pointInWorld;
59 //negative means penetration 59 //negative means penetration
60 _distance = depth; 60 _distance = depth;
61 } 61 }
62 } 62 }
63 } 63 }
64} 64}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/SubsimplexConvexCast.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/SubsimplexConvexCast.cs
index 6d320c4..5c92a0c 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/SubsimplexConvexCast.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/SubsimplexConvexCast.cs
@@ -1,142 +1,142 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// SubsimplexConvexCast implements Gino van den Bergens' paper 30 /// SubsimplexConvexCast implements Gino van den Bergens' paper
31 /// "Ray Casting against bteral Convex Objects with Application to Continuous Collision Detection" 31 /// "Ray Casting against bteral Convex Objects with Application to Continuous Collision Detection"
32 /// GJK based Ray Cast, optimized version 32 /// GJK based Ray Cast, optimized version
33 /// Objects should not start in overlap, otherwise results are not defined. 33 /// Objects should not start in overlap, otherwise results are not defined.
34 /// </summary> 34 /// </summary>
35 public class SubsimplexConvexCast : IConvexCast 35 public class SubsimplexConvexCast : IConvexCast
36 { 36 {
37 private ISimplexSolver _simplexSolver; 37 private ISimplexSolver _simplexSolver;
38 private ConvexShape _convexA; 38 private ConvexShape _convexA;
39 private ConvexShape _convexB; 39 private ConvexShape _convexB;
40 40
41 /// <summary> 41 /// <summary>
42 /// Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases. 42 /// Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases.
43 /// See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565 43 /// See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565
44 /// </summary> 44 /// </summary>
45 private const int MaxIterations = 32; 45 private const int MaxIterations = 32;
46 46
47 public SubsimplexConvexCast(ConvexShape shapeA, ConvexShape shapeB, ISimplexSolver simplexSolver) 47 public SubsimplexConvexCast(ConvexShape shapeA, ConvexShape shapeB, ISimplexSolver simplexSolver)
48 { 48 {
49 _simplexSolver = simplexSolver; 49 _simplexSolver = simplexSolver;
50 _convexA = shapeA; 50 _convexA = shapeA;
51 _convexB = shapeB; 51 _convexB = shapeB;
52 } 52 }
53 53
54 #region IConvexCast Members 54 #region IConvexCast Members
55 /// <summary> 55 /// <summary>
56 /// SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (sweep) between two moving objects. 56 /// SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (sweep) between two moving objects.
57 /// Precondition is that objects should not penetration/overlap at the start from the interval. Overlap can be tested using GjkPairDetector. 57 /// Precondition is that objects should not penetration/overlap at the start from the interval. Overlap can be tested using GjkPairDetector.
58 /// </summary> 58 /// </summary>
59 /// <param name="fromA"></param> 59 /// <param name="fromA"></param>
60 /// <param name="toA"></param> 60 /// <param name="toA"></param>
61 /// <param name="fromB"></param> 61 /// <param name="fromB"></param>
62 /// <param name="toB"></param> 62 /// <param name="toB"></param>
63 /// <param name="result"></param> 63 /// <param name="result"></param>
64 /// <returns></returns> 64 /// <returns></returns>
65 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result) 65 public bool CalcTimeOfImpact(Matrix fromA, Matrix toA, Matrix fromB, Matrix toB, CastResult result)
66 { 66 {
67 MinkowskiSumShape convex = new MinkowskiSumShape(_convexA, _convexB); 67 MinkowskiSumShape convex = new MinkowskiSumShape(_convexA, _convexB);
68 68
69 Matrix rayFromLocalA; 69 Matrix rayFromLocalA;
70 Matrix rayToLocalA; 70 Matrix rayToLocalA;
71 71
72 rayFromLocalA = MathHelper.InvertMatrix(fromA) * fromB; 72 rayFromLocalA = MathHelper.InvertMatrix(fromA) * fromB;
73 rayToLocalA = MathHelper.InvertMatrix(toA) * toB; 73 rayToLocalA = MathHelper.InvertMatrix(toA) * toB;
74 74
75 _simplexSolver.Reset(); 75 _simplexSolver.Reset();
76 76
77 convex.TransformB = rayFromLocalA; 77 convex.TransformB = rayFromLocalA;
78 78
79 float lambda = 0; 79 float lambda = 0;
80 //todo: need to verify this: 80 //todo: need to verify this:
81 //because of minkowski difference, we need the inverse direction 81 //because of minkowski difference, we need the inverse direction
82 82
83 Vector3 s = -rayFromLocalA.Translation; 83 Vector3 s = -rayFromLocalA.Translation;
84 Vector3 r = -(rayToLocalA.Translation - rayFromLocalA.Translation); 84 Vector3 r = -(rayToLocalA.Translation - rayFromLocalA.Translation);
85 Vector3 x = s; 85 Vector3 x = s;
86 Vector3 v; 86 Vector3 v;
87 Vector3 arbitraryPoint = convex.LocalGetSupportingVertex(r); 87 Vector3 arbitraryPoint = convex.LocalGetSupportingVertex(r);
88 88
89 v = x - arbitraryPoint; 89 v = x - arbitraryPoint;
90 90
91 int maxIter = MaxIterations; 91 int maxIter = MaxIterations;
92 92
93 Vector3 n = new Vector3(); 93 Vector3 n = new Vector3();
94 float lastLambda = lambda; 94 float lastLambda = lambda;
95 95
96 float dist2 = v.LengthSquared(); 96 float dist2 = v.LengthSquared();
97 float epsilon = 0.0001f; 97 float epsilon = 0.0001f;
98 98
99 Vector3 w, p; 99 Vector3 w, p;
100 float VdotR; 100 float VdotR;
101 101
102 while ((dist2 > epsilon) && (maxIter-- != 0)) 102 while ((dist2 > epsilon) && (maxIter-- != 0))
103 { 103 {
104 p = convex.LocalGetSupportingVertex(v); 104 p = convex.LocalGetSupportingVertex(v);
105 w = x - p; 105 w = x - p;
106 106
107 float VdotW = Vector3.Dot(v, w); 107 float VdotW = Vector3.Dot(v, w);
108 108
109 if (VdotW > 0) 109 if (VdotW > 0)
110 { 110 {
111 VdotR = Vector3.Dot(v, r); 111 VdotR = Vector3.Dot(v, r);
112 112
113 if (VdotR >= -(MathHelper.Epsilon * MathHelper.Epsilon)) 113 if (VdotR >= -(MathHelper.Epsilon * MathHelper.Epsilon))
114 return false; 114 return false;
115 else 115 else
116 { 116 {
117 lambda = lambda - VdotW / VdotR; 117 lambda = lambda - VdotW / VdotR;
118 x = s + lambda * r; 118 x = s + lambda * r;
119 _simplexSolver.Reset(); 119 _simplexSolver.Reset();
120 //check next line 120 //check next line
121 w = x - p; 121 w = x - p;
122 lastLambda = lambda; 122 lastLambda = lambda;
123 n = v; 123 n = v;
124 } 124 }
125 } 125 }
126 _simplexSolver.AddVertex(w, x, p); 126 _simplexSolver.AddVertex(w, x, p);
127 if (_simplexSolver.Closest(out v)) 127 if (_simplexSolver.Closest(out v))
128 { 128 {
129 dist2 = v.LengthSquared(); 129 dist2 = v.LengthSquared();
130 } 130 }
131 else 131 else
132 { 132 {
133 dist2 = 0f; 133 dist2 = 0f;
134 } 134 }
135 } 135 }
136 result.Fraction = lambda; 136 result.Fraction = lambda;
137 result.Normal = n; 137 result.Normal = n;
138 return true; 138 return true;
139 } 139 }
140 #endregion 140 #endregion
141 } 141 }
142} 142}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/TriangleRaycastCallback.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/TriangleRaycastCallback.cs
index c127460..1e0fb3b 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/TriangleRaycastCallback.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/TriangleRaycastCallback.cs
@@ -1,115 +1,115 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public abstract class TriangleRaycastCallback : ITriangleCallback 29 public abstract class TriangleRaycastCallback : ITriangleCallback
30 { 30 {
31 private Vector3 _from; 31 private Vector3 _from;
32 private Vector3 _to; 32 private Vector3 _to;
33 private float _hitFraction; 33 private float _hitFraction;
34 34
35 public TriangleRaycastCallback(Vector3 from, Vector3 to) 35 public TriangleRaycastCallback(Vector3 from, Vector3 to)
36 { 36 {
37 _from = from; 37 _from = from;
38 _to = to; 38 _to = to;
39 _hitFraction = 1; 39 _hitFraction = 1;
40 } 40 }
41 41
42 public Vector3 From { get { return _from; } set { _from = value; } } 42 public Vector3 From { get { return _from; } set { _from = value; } }
43 public Vector3 To { get { return _to; } set { _to = value; } } 43 public Vector3 To { get { return _to; } set { _to = value; } }
44 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } } 44 public float HitFraction { get { return _hitFraction; } set { _hitFraction = value; } }
45 45
46 public abstract float ReportHit(Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex); 46 public abstract float ReportHit(Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex);
47 47
48 #region ITriangleCallback Members 48 #region ITriangleCallback Members
49 49
50 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex) 50 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex)
51 { 51 {
52 Vector3 vertA = triangle[0]; 52 Vector3 vertA = triangle[0];
53 Vector3 vertB = triangle[1]; 53 Vector3 vertB = triangle[1];
54 Vector3 vertC = triangle[2]; 54 Vector3 vertC = triangle[2];
55 55
56 Vector3 vBA = vertB - vertA; 56 Vector3 vBA = vertB - vertA;
57 Vector3 vCA = vertC - vertA; 57 Vector3 vCA = vertC - vertA;
58 58
59 Vector3 triangleNormal = Vector3.Cross(vBA, vCA); 59 Vector3 triangleNormal = Vector3.Cross(vBA, vCA);
60 60
61 float dist = Vector3.Dot(vertA, triangleNormal); 61 float dist = Vector3.Dot(vertA, triangleNormal);
62 float distA = Vector3.Dot(triangleNormal, _from); 62 float distA = Vector3.Dot(triangleNormal, _from);
63 distA -= dist; 63 distA -= dist;
64 float distB = Vector3.Dot(triangleNormal, _to); 64 float distB = Vector3.Dot(triangleNormal, _to);
65 distB -= dist; 65 distB -= dist;
66 66
67 if (distA * distB >= 0.0f) 67 if (distA * distB >= 0.0f)
68 { 68 {
69 return; // same sign 69 return; // same sign
70 } 70 }
71 71
72 float projLength = distA - distB; 72 float projLength = distA - distB;
73 float distance = (distA) / (projLength); 73 float distance = (distA) / (projLength);
74 // Now we have the intersection point on the plane, we'll see if it's inside the triangle 74 // Now we have the intersection point on the plane, we'll see if it's inside the triangle
75 // Add an epsilon as a tolerance for the raycast, 75 // Add an epsilon as a tolerance for the raycast,
76 // in case the ray hits exacly on the edge of the triangle. 76 // in case the ray hits exacly on the edge of the triangle.
77 // It must be scaled for the triangle size. 77 // It must be scaled for the triangle size.
78 78
79 if (distance < _hitFraction) 79 if (distance < _hitFraction)
80 { 80 {
81 float edgeTolerance = triangleNormal.LengthSquared(); 81 float edgeTolerance = triangleNormal.LengthSquared();
82 edgeTolerance *= -0.0001f; 82 edgeTolerance *= -0.0001f;
83 Vector3 point = new Vector3(); 83 Vector3 point = new Vector3();
84 MathHelper.SetInterpolate3(_from, _to, distance, ref point); 84 MathHelper.SetInterpolate3(_from, _to, distance, ref point);
85 85
86 Vector3 vertexAPoint = vertA - point; 86 Vector3 vertexAPoint = vertA - point;
87 Vector3 vertexBPoint = vertB - point; 87 Vector3 vertexBPoint = vertB - point;
88 Vector3 contactPointA = Vector3.Cross(vertexAPoint, vertexBPoint); 88 Vector3 contactPointA = Vector3.Cross(vertexAPoint, vertexBPoint);
89 89
90 if (Vector3.Dot(contactPointA, triangleNormal) >= edgeTolerance) 90 if (Vector3.Dot(contactPointA, triangleNormal) >= edgeTolerance)
91 { 91 {
92 Vector3 vertexCPoint = vertC - point; 92 Vector3 vertexCPoint = vertC - point;
93 Vector3 contactPointB = Vector3.Cross(vertexBPoint, vertexCPoint); 93 Vector3 contactPointB = Vector3.Cross(vertexBPoint, vertexCPoint);
94 if (Vector3.Dot(contactPointB, triangleNormal) >= edgeTolerance) 94 if (Vector3.Dot(contactPointB, triangleNormal) >= edgeTolerance)
95 { 95 {
96 Vector3 contactPointC = Vector3.Cross(vertexCPoint, vertexAPoint); 96 Vector3 contactPointC = Vector3.Cross(vertexCPoint, vertexAPoint);
97 97
98 if (Vector3.Dot(contactPointC, triangleNormal) >= edgeTolerance) 98 if (Vector3.Dot(contactPointC, triangleNormal) >= edgeTolerance)
99 { 99 {
100 if (distA > 0) 100 if (distA > 0)
101 { 101 {
102 _hitFraction = ReportHit(triangleNormal, distance, partID, triangleIndex); 102 _hitFraction = ReportHit(triangleNormal, distance, partID, triangleIndex);
103 } 103 }
104 else 104 else
105 { 105 {
106 _hitFraction = ReportHit(-triangleNormal, distance, partID, triangleIndex); 106 _hitFraction = ReportHit(-triangleNormal, distance, partID, triangleIndex);
107 } 107 }
108 } 108 }
109 } 109 }
110 } 110 }
111 } 111 }
112 } 112 }
113 #endregion 113 #endregion
114 } 114 }
115} 115}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/VoronoiSimplexSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/VoronoiSimplexSolver.cs
index 16f3dab..1bc94d3 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/VoronoiSimplexSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Collision/NarrowPhaseCollision/VoronoiSimplexSolver.cs
@@ -1,643 +1,643 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class UsageBitfield 29 public class UsageBitfield
30 { 30 {
31 private bool _usedVertexA, _usedVertexB, _usedVertexC, _usedVertexD; 31 private bool _usedVertexA, _usedVertexB, _usedVertexC, _usedVertexD;
32 32
33 public bool UsedVertexA { get { return _usedVertexA; } set { _usedVertexA = value; } } 33 public bool UsedVertexA { get { return _usedVertexA; } set { _usedVertexA = value; } }
34 public bool UsedVertexB { get { return _usedVertexB; } set { _usedVertexB = value; } } 34 public bool UsedVertexB { get { return _usedVertexB; } set { _usedVertexB = value; } }
35 public bool UsedVertexC { get { return _usedVertexC; } set { _usedVertexC = value; } } 35 public bool UsedVertexC { get { return _usedVertexC; } set { _usedVertexC = value; } }
36 public bool UsedVertexD { get { return _usedVertexD; } set { _usedVertexD = value; } } 36 public bool UsedVertexD { get { return _usedVertexD; } set { _usedVertexD = value; } }
37 37
38 public void Reset() 38 public void Reset()
39 { 39 {
40 _usedVertexA = _usedVertexB = _usedVertexC = _usedVertexD = false; 40 _usedVertexA = _usedVertexB = _usedVertexC = _usedVertexD = false;
41 } 41 }
42 } 42 }
43 43
44 public class SubSimplexClosestResult 44 public class SubSimplexClosestResult
45 { 45 {
46 private Vector3 _closestPointOnSimplex; 46 private Vector3 _closestPointOnSimplex;
47 47
48 //MASK for m_usedVertices 48 //MASK for m_usedVertices
49 //stores the simplex vertex-usage, using the MASK, 49 //stores the simplex vertex-usage, using the MASK,
50 // if m_usedVertices & MASK then the related vertex is used 50 // if m_usedVertices & MASK then the related vertex is used
51 private UsageBitfield _usedVertices = new UsageBitfield(); 51 private UsageBitfield _usedVertices = new UsageBitfield();
52 private float[] _barycentricCoords = new float[4]; 52 private float[] _barycentricCoords = new float[4];
53 private bool _degenerate; 53 private bool _degenerate;
54 54
55 public Vector3 ClosestPointOnSimplex { get { return _closestPointOnSimplex; } set { _closestPointOnSimplex = value; } } 55 public Vector3 ClosestPointOnSimplex { get { return _closestPointOnSimplex; } set { _closestPointOnSimplex = value; } }
56 public UsageBitfield UsedVertices { get { return _usedVertices; } set { _usedVertices = value; } } 56 public UsageBitfield UsedVertices { get { return _usedVertices; } set { _usedVertices = value; } }
57 public float[] BarycentricCoords { get { return _barycentricCoords; } set { _barycentricCoords = value; } } 57 public float[] BarycentricCoords { get { return _barycentricCoords; } set { _barycentricCoords = value; } }
58 public bool Degenerate { get { return _degenerate; } set { _degenerate = value; } } 58 public bool Degenerate { get { return _degenerate; } set { _degenerate = value; } }
59 59
60 public void Reset() 60 public void Reset()
61 { 61 {
62 _degenerate = false; 62 _degenerate = false;
63 SetBarycentricCoordinates(); 63 SetBarycentricCoordinates();
64 _usedVertices.Reset(); 64 _usedVertices.Reset();
65 } 65 }
66 66
67 public bool IsValid 67 public bool IsValid
68 { 68 {
69 get 69 get
70 { 70 {
71 return (_barycentricCoords[0] >= 0f) && 71 return (_barycentricCoords[0] >= 0f) &&
72 (_barycentricCoords[1] >= 0f) && 72 (_barycentricCoords[1] >= 0f) &&
73 (_barycentricCoords[2] >= 0f) && 73 (_barycentricCoords[2] >= 0f) &&
74 (_barycentricCoords[3] >= 0f); 74 (_barycentricCoords[3] >= 0f);
75 } 75 }
76 } 76 }
77 77
78 public void SetBarycentricCoordinates() 78 public void SetBarycentricCoordinates()
79 { 79 {
80 SetBarycentricCoordinates(0f, 0f, 0f, 0f); 80 SetBarycentricCoordinates(0f, 0f, 0f, 0f);
81 } 81 }
82 82
83 public void SetBarycentricCoordinates(float a, float b, float c, float d) 83 public void SetBarycentricCoordinates(float a, float b, float c, float d)
84 { 84 {
85 _barycentricCoords[0] = a; 85 _barycentricCoords[0] = a;
86 _barycentricCoords[1] = b; 86 _barycentricCoords[1] = b;
87 _barycentricCoords[2] = c; 87 _barycentricCoords[2] = c;
88 _barycentricCoords[3] = d; 88 _barycentricCoords[3] = d;
89 } 89 }
90 } 90 }
91 91
92 /// VoronoiSimplexSolver is an implementation of the closest point distance 92 /// VoronoiSimplexSolver is an implementation of the closest point distance
93 /// algorithm from a 1-4 points simplex to the origin. 93 /// algorithm from a 1-4 points simplex to the origin.
94 /// Can be used with GJK, as an alternative to Johnson distance algorithm. 94 /// Can be used with GJK, as an alternative to Johnson distance algorithm.
95 public class VoronoiSimplexSolver : ISimplexSolver 95 public class VoronoiSimplexSolver : ISimplexSolver
96 { 96 {
97 private const int VertexA = 0, VertexB = 1, VertexC = 2, VertexD = 3; 97 private const int VertexA = 0, VertexB = 1, VertexC = 2, VertexD = 3;
98 98
99 private const int VoronoiSimplexMaxVerts = 5; 99 private const int VoronoiSimplexMaxVerts = 5;
100 private const bool CatchDegenerateTetrahedron = true; 100 private const bool CatchDegenerateTetrahedron = true;
101 101
102 private int _numVertices; 102 private int _numVertices;
103 103
104 private Vector3[] _simplexVectorW = new Vector3[VoronoiSimplexMaxVerts]; 104 private Vector3[] _simplexVectorW = new Vector3[VoronoiSimplexMaxVerts];
105 private Vector3[] _simplexPointsP = new Vector3[VoronoiSimplexMaxVerts]; 105 private Vector3[] _simplexPointsP = new Vector3[VoronoiSimplexMaxVerts];
106 private Vector3[] _simplexPointsQ = new Vector3[VoronoiSimplexMaxVerts]; 106 private Vector3[] _simplexPointsQ = new Vector3[VoronoiSimplexMaxVerts];
107 107
108 private Vector3 _cachedPA; 108 private Vector3 _cachedPA;
109 private Vector3 _cachedPB; 109 private Vector3 _cachedPB;
110 private Vector3 _cachedV; 110 private Vector3 _cachedV;
111 private Vector3 _lastW; 111 private Vector3 _lastW;
112 private bool _cachedValidClosest; 112 private bool _cachedValidClosest;
113 113
114 private SubSimplexClosestResult _cachedBC = new SubSimplexClosestResult(); 114 private SubSimplexClosestResult _cachedBC = new SubSimplexClosestResult();
115 115
116 private bool _needsUpdate; 116 private bool _needsUpdate;
117 117
118 #region ISimplexSolver Members 118 #region ISimplexSolver Members
119 119
120 public bool FullSimplex 120 public bool FullSimplex
121 { 121 {
122 get 122 get
123 { 123 {
124 return _numVertices == 4; 124 return _numVertices == 4;
125 } 125 }
126 } 126 }
127 127
128 public int NumVertices 128 public int NumVertices
129 { 129 {
130 get 130 get
131 { 131 {
132 return _numVertices; 132 return _numVertices;
133 } 133 }
134 } 134 }
135 135
136 public void Reset() 136 public void Reset()
137 { 137 {
138 _cachedValidClosest = false; 138 _cachedValidClosest = false;
139 _numVertices = 0; 139 _numVertices = 0;
140 _needsUpdate = true; 140 _needsUpdate = true;
141 _lastW = new Vector3(1e30f, 1e30f, 1e30f); 141 _lastW = new Vector3(1e30f, 1e30f, 1e30f);
142 _cachedBC.Reset(); 142 _cachedBC.Reset();
143 } 143 }
144 144
145 public void AddVertex(Vector3 w, Vector3 p, Vector3 q) 145 public void AddVertex(Vector3 w, Vector3 p, Vector3 q)
146 { 146 {
147 _lastW = w; 147 _lastW = w;
148 _needsUpdate = true; 148 _needsUpdate = true;
149 149
150 _simplexVectorW[_numVertices] = w; 150 _simplexVectorW[_numVertices] = w;
151 _simplexPointsP[_numVertices] = p; 151 _simplexPointsP[_numVertices] = p;
152 _simplexPointsQ[_numVertices] = q; 152 _simplexPointsQ[_numVertices] = q;
153 153
154 _numVertices++; 154 _numVertices++;
155 } 155 }
156 156
157 //return/calculate the closest vertex 157 //return/calculate the closest vertex
158 public bool Closest(out Vector3 v) 158 public bool Closest(out Vector3 v)
159 { 159 {
160 bool succes = UpdateClosestVectorAndPoints(); 160 bool succes = UpdateClosestVectorAndPoints();
161 v = _cachedV; 161 v = _cachedV;
162 return succes; 162 return succes;
163 } 163 }
164 164
165 public float MaxVertex 165 public float MaxVertex
166 { 166 {
167 get 167 get
168 { 168 {
169 int numverts = NumVertices; 169 int numverts = NumVertices;
170 float maxV = 0f, curLen2; 170 float maxV = 0f, curLen2;
171 for (int i = 0; i < numverts; i++) 171 for (int i = 0; i < numverts; i++)
172 { 172 {
173 curLen2 = _simplexVectorW[i].LengthSquared(); 173 curLen2 = _simplexVectorW[i].LengthSquared();
174 if (maxV < curLen2) maxV = curLen2; 174 if (maxV < curLen2) maxV = curLen2;
175 } 175 }
176 return maxV; 176 return maxV;
177 } 177 }
178 } 178 }
179 179
180 //return the current simplex 180 //return the current simplex
181 public int GetSimplex(out Vector3[] pBuf, out Vector3[] qBuf, out Vector3[] yBuf) 181 public int GetSimplex(out Vector3[] pBuf, out Vector3[] qBuf, out Vector3[] yBuf)
182 { 182 {
183 int numverts = NumVertices; 183 int numverts = NumVertices;
184 pBuf = new Vector3[numverts]; 184 pBuf = new Vector3[numverts];
185 qBuf = new Vector3[numverts]; 185 qBuf = new Vector3[numverts];
186 yBuf = new Vector3[numverts]; 186 yBuf = new Vector3[numverts];
187 for (int i = 0; i < numverts; i++) 187 for (int i = 0; i < numverts; i++)
188 { 188 {
189 yBuf[i] = _simplexVectorW[i]; 189 yBuf[i] = _simplexVectorW[i];
190 pBuf[i] = _simplexPointsP[i]; 190 pBuf[i] = _simplexPointsP[i];
191 qBuf[i] = _simplexPointsQ[i]; 191 qBuf[i] = _simplexPointsQ[i];
192 } 192 }
193 return numverts; 193 return numverts;
194 } 194 }
195 195
196 public bool InSimplex(Vector3 w) 196 public bool InSimplex(Vector3 w)
197 { 197 {
198 //check in case lastW is already removed 198 //check in case lastW is already removed
199 if (w == _lastW) return true; 199 if (w == _lastW) return true;
200 200
201 //w is in the current (reduced) simplex 201 //w is in the current (reduced) simplex
202 int numverts = NumVertices; 202 int numverts = NumVertices;
203 for (int i = 0; i < numverts; i++) 203 for (int i = 0; i < numverts; i++)
204 if (_simplexVectorW[i] == w) return true; 204 if (_simplexVectorW[i] == w) return true;
205 205
206 return false; 206 return false;
207 } 207 }
208 208
209 public void BackupClosest(out Vector3 v) 209 public void BackupClosest(out Vector3 v)
210 { 210 {
211 v = _cachedV; 211 v = _cachedV;
212 } 212 }
213 213
214 public bool EmptySimplex 214 public bool EmptySimplex
215 { 215 {
216 get 216 get
217 { 217 {
218 return NumVertices == 0; 218 return NumVertices == 0;
219 } 219 }
220 } 220 }
221 221
222 public void ComputePoints(out Vector3 p1, out Vector3 p2) 222 public void ComputePoints(out Vector3 p1, out Vector3 p2)
223 { 223 {
224 UpdateClosestVectorAndPoints(); 224 UpdateClosestVectorAndPoints();
225 p1 = _cachedPA; 225 p1 = _cachedPA;
226 p2 = _cachedPB; 226 p2 = _cachedPB;
227 } 227 }
228 228
229 #endregion 229 #endregion
230 230
231 public void RemoveVertex(int index) 231 public void RemoveVertex(int index)
232 { 232 {
233 BulletDebug.Assert(_numVertices > 0); 233 BulletDebug.Assert(_numVertices > 0);
234 _numVertices--; 234 _numVertices--;
235 _simplexVectorW[index] = _simplexVectorW[_numVertices]; 235 _simplexVectorW[index] = _simplexVectorW[_numVertices];
236 _simplexPointsP[index] = _simplexPointsP[_numVertices]; 236 _simplexPointsP[index] = _simplexPointsP[_numVertices];
237 _simplexPointsQ[index] = _simplexPointsQ[_numVertices]; 237 _simplexPointsQ[index] = _simplexPointsQ[_numVertices];
238 } 238 }
239 239
240 public void ReduceVertices(UsageBitfield usedVerts) 240 public void ReduceVertices(UsageBitfield usedVerts)
241 { 241 {
242 if ((NumVertices >= 4) && (!usedVerts.UsedVertexD)) RemoveVertex(3); 242 if ((NumVertices >= 4) && (!usedVerts.UsedVertexD)) RemoveVertex(3);
243 if ((NumVertices >= 3) && (!usedVerts.UsedVertexC)) RemoveVertex(2); 243 if ((NumVertices >= 3) && (!usedVerts.UsedVertexC)) RemoveVertex(2);
244 if ((NumVertices >= 2) && (!usedVerts.UsedVertexB)) RemoveVertex(1); 244 if ((NumVertices >= 2) && (!usedVerts.UsedVertexB)) RemoveVertex(1);
245 if ((NumVertices >= 1) && (!usedVerts.UsedVertexA)) RemoveVertex(0); 245 if ((NumVertices >= 1) && (!usedVerts.UsedVertexA)) RemoveVertex(0);
246 } 246 }
247 247
248 public bool UpdateClosestVectorAndPoints() 248 public bool UpdateClosestVectorAndPoints()
249 { 249 {
250 if (_needsUpdate) 250 if (_needsUpdate)
251 { 251 {
252 _cachedBC.Reset(); 252 _cachedBC.Reset();
253 _needsUpdate = false; 253 _needsUpdate = false;
254 254
255 Vector3 p, a, b, c, d; 255 Vector3 p, a, b, c, d;
256 switch (NumVertices) 256 switch (NumVertices)
257 { 257 {
258 case 0: 258 case 0:
259 _cachedValidClosest = false; 259 _cachedValidClosest = false;
260 break; 260 break;
261 case 1: 261 case 1:
262 _cachedPA = _simplexPointsP[0]; 262 _cachedPA = _simplexPointsP[0];
263 _cachedPB = _simplexPointsQ[0]; 263 _cachedPB = _simplexPointsQ[0];
264 _cachedV = _cachedPA - _cachedPB; 264 _cachedV = _cachedPA - _cachedPB;
265 _cachedBC.Reset(); 265 _cachedBC.Reset();
266 _cachedBC.SetBarycentricCoordinates(1f, 0f, 0f, 0f); 266 _cachedBC.SetBarycentricCoordinates(1f, 0f, 0f, 0f);
267 _cachedValidClosest = _cachedBC.IsValid; 267 _cachedValidClosest = _cachedBC.IsValid;
268 break; 268 break;
269 case 2: 269 case 2:
270 //closest point origin from line segment 270 //closest point origin from line segment
271 Vector3 from = _simplexVectorW[0]; 271 Vector3 from = _simplexVectorW[0];
272 Vector3 to = _simplexVectorW[1]; 272 Vector3 to = _simplexVectorW[1];
273 Vector3 nearest; 273 Vector3 nearest;
274 274
275 Vector3 diff = -from; 275 Vector3 diff = -from;
276 Vector3 v = to - from; 276 Vector3 v = to - from;
277 float t = Vector3.Dot(v, diff); 277 float t = Vector3.Dot(v, diff);
278 278
279 if (t > 0) 279 if (t > 0)
280 { 280 {
281 float dotVV = v.LengthSquared(); 281 float dotVV = v.LengthSquared();
282 if (t < dotVV) 282 if (t < dotVV)
283 { 283 {
284 t /= dotVV; 284 t /= dotVV;
285 diff -= t * v; 285 diff -= t * v;
286 _cachedBC.UsedVertices.UsedVertexA = true; 286 _cachedBC.UsedVertices.UsedVertexA = true;
287 _cachedBC.UsedVertices.UsedVertexB = true; 287 _cachedBC.UsedVertices.UsedVertexB = true;
288 } 288 }
289 else 289 else
290 { 290 {
291 t = 1; 291 t = 1;
292 diff -= v; 292 diff -= v;
293 //reduce to 1 point 293 //reduce to 1 point
294 _cachedBC.UsedVertices.UsedVertexB = true; 294 _cachedBC.UsedVertices.UsedVertexB = true;
295 } 295 }
296 } 296 }
297 else 297 else
298 { 298 {
299 t = 0; 299 t = 0;
300 //reduce to 1 point 300 //reduce to 1 point
301 _cachedBC.UsedVertices.UsedVertexA = true; 301 _cachedBC.UsedVertices.UsedVertexA = true;
302 } 302 }
303 303
304 _cachedBC.SetBarycentricCoordinates(1 - t, t, 0, 0); 304 _cachedBC.SetBarycentricCoordinates(1 - t, t, 0, 0);
305 nearest = from + t * v; 305 nearest = from + t * v;
306 306
307 _cachedPA = _simplexPointsP[0] + t * (_simplexPointsP[1] - _simplexPointsP[0]); 307 _cachedPA = _simplexPointsP[0] + t * (_simplexPointsP[1] - _simplexPointsP[0]);
308 _cachedPB = _simplexPointsQ[0] + t * (_simplexPointsQ[1] - _simplexPointsQ[0]); 308 _cachedPB = _simplexPointsQ[0] + t * (_simplexPointsQ[1] - _simplexPointsQ[0]);
309 _cachedV = _cachedPA - _cachedPB; 309 _cachedV = _cachedPA - _cachedPB;
310 310
311 ReduceVertices(_cachedBC.UsedVertices); 311 ReduceVertices(_cachedBC.UsedVertices);
312 312
313 _cachedValidClosest = _cachedBC.IsValid; 313 _cachedValidClosest = _cachedBC.IsValid;
314 break; 314 break;
315 case 3: 315 case 3:
316 //closest point origin from triangle 316 //closest point origin from triangle
317 p = new Vector3(); 317 p = new Vector3();
318 a = _simplexVectorW[0]; 318 a = _simplexVectorW[0];
319 b = _simplexVectorW[1]; 319 b = _simplexVectorW[1];
320 c = _simplexVectorW[2]; 320 c = _simplexVectorW[2];
321 321
322 ClosestPtPointTriangle(p, a, b, c, ref _cachedBC); 322 ClosestPtPointTriangle(p, a, b, c, ref _cachedBC);
323 _cachedPA = _simplexPointsP[0] * _cachedBC.BarycentricCoords[0] + 323 _cachedPA = _simplexPointsP[0] * _cachedBC.BarycentricCoords[0] +
324 _simplexPointsP[1] * _cachedBC.BarycentricCoords[1] + 324 _simplexPointsP[1] * _cachedBC.BarycentricCoords[1] +
325 _simplexPointsP[2] * _cachedBC.BarycentricCoords[2] + 325 _simplexPointsP[2] * _cachedBC.BarycentricCoords[2] +
326 _simplexPointsP[3] * _cachedBC.BarycentricCoords[3]; 326 _simplexPointsP[3] * _cachedBC.BarycentricCoords[3];
327 327
328 _cachedPB = _simplexPointsQ[0] * _cachedBC.BarycentricCoords[0] + 328 _cachedPB = _simplexPointsQ[0] * _cachedBC.BarycentricCoords[0] +
329 _simplexPointsQ[1] * _cachedBC.BarycentricCoords[1] + 329 _simplexPointsQ[1] * _cachedBC.BarycentricCoords[1] +
330 _simplexPointsQ[2] * _cachedBC.BarycentricCoords[2] + 330 _simplexPointsQ[2] * _cachedBC.BarycentricCoords[2] +
331 _simplexPointsQ[3] * _cachedBC.BarycentricCoords[3]; 331 _simplexPointsQ[3] * _cachedBC.BarycentricCoords[3];
332 332
333 _cachedV = _cachedPA - _cachedPB; 333 _cachedV = _cachedPA - _cachedPB;
334 334
335 ReduceVertices(_cachedBC.UsedVertices); 335 ReduceVertices(_cachedBC.UsedVertices);
336 _cachedValidClosest = _cachedBC.IsValid; 336 _cachedValidClosest = _cachedBC.IsValid;
337 break; 337 break;
338 case 4: 338 case 4:
339 p = new Vector3(); 339 p = new Vector3();
340 a = _simplexVectorW[0]; 340 a = _simplexVectorW[0];
341 b = _simplexVectorW[1]; 341 b = _simplexVectorW[1];
342 c = _simplexVectorW[2]; 342 c = _simplexVectorW[2];
343 d = _simplexVectorW[3]; 343 d = _simplexVectorW[3];
344 344
345 bool hasSeperation = ClosestPtPointTetrahedron(p, a, b, c, d, ref _cachedBC); 345 bool hasSeperation = ClosestPtPointTetrahedron(p, a, b, c, d, ref _cachedBC);
346 346
347 if (hasSeperation) 347 if (hasSeperation)
348 { 348 {
349 _cachedPA = _simplexPointsP[0] * _cachedBC.BarycentricCoords[0] + 349 _cachedPA = _simplexPointsP[0] * _cachedBC.BarycentricCoords[0] +
350 _simplexPointsP[1] * _cachedBC.BarycentricCoords[1] + 350 _simplexPointsP[1] * _cachedBC.BarycentricCoords[1] +
351 _simplexPointsP[2] * _cachedBC.BarycentricCoords[2] + 351 _simplexPointsP[2] * _cachedBC.BarycentricCoords[2] +
352 _simplexPointsP[3] * _cachedBC.BarycentricCoords[3]; 352 _simplexPointsP[3] * _cachedBC.BarycentricCoords[3];
353 353
354 _cachedPB = _simplexPointsQ[0] * _cachedBC.BarycentricCoords[0] + 354 _cachedPB = _simplexPointsQ[0] * _cachedBC.BarycentricCoords[0] +
355 _simplexPointsQ[1] * _cachedBC.BarycentricCoords[1] + 355 _simplexPointsQ[1] * _cachedBC.BarycentricCoords[1] +
356 _simplexPointsQ[2] * _cachedBC.BarycentricCoords[2] + 356 _simplexPointsQ[2] * _cachedBC.BarycentricCoords[2] +
357 _simplexPointsQ[3] * _cachedBC.BarycentricCoords[3]; 357 _simplexPointsQ[3] * _cachedBC.BarycentricCoords[3];
358 358
359 _cachedV = _cachedPA - _cachedPB; 359 _cachedV = _cachedPA - _cachedPB;
360 ReduceVertices(_cachedBC.UsedVertices); 360 ReduceVertices(_cachedBC.UsedVertices);
361 } 361 }
362 else 362 else
363 { 363 {
364 if (_cachedBC.Degenerate) 364 if (_cachedBC.Degenerate)
365 { 365 {
366 _cachedValidClosest = false; 366 _cachedValidClosest = false;
367 } 367 }
368 else 368 else
369 { 369 {
370 _cachedValidClosest = true; 370 _cachedValidClosest = true;
371 //degenerate case == false, penetration = true + zero 371 //degenerate case == false, penetration = true + zero
372 _cachedV.X = _cachedV.Y = _cachedV.Z = 0f; 372 _cachedV.X = _cachedV.Y = _cachedV.Z = 0f;
373 } 373 }
374 break; // !!!!!!!!!!!! proverit na vsakiy sluchai 374 break; // !!!!!!!!!!!! proverit na vsakiy sluchai
375 } 375 }
376 376
377 _cachedValidClosest = _cachedBC.IsValid; 377 _cachedValidClosest = _cachedBC.IsValid;
378 378
379 //closest point origin from tetrahedron 379 //closest point origin from tetrahedron
380 break; 380 break;
381 default: 381 default:
382 _cachedValidClosest = false; 382 _cachedValidClosest = false;
383 break; 383 break;
384 } 384 }
385 } 385 }
386 386
387 return _cachedValidClosest; 387 return _cachedValidClosest;
388 } 388 }
389 389
390 public bool ClosestPtPointTriangle(Vector3 p, Vector3 a, Vector3 b, Vector3 c, 390 public bool ClosestPtPointTriangle(Vector3 p, Vector3 a, Vector3 b, Vector3 c,
391 ref SubSimplexClosestResult result) 391 ref SubSimplexClosestResult result)
392 { 392 {
393 result.UsedVertices.Reset(); 393 result.UsedVertices.Reset();
394 394
395 float v, w; 395 float v, w;
396 396
397 // Check if P in vertex region outside A 397 // Check if P in vertex region outside A
398 Vector3 ab = b - a; 398 Vector3 ab = b - a;
399 Vector3 ac = c - a; 399 Vector3 ac = c - a;
400 Vector3 ap = p - a; 400 Vector3 ap = p - a;
401 float d1 = Vector3.Dot(ab, ap); 401 float d1 = Vector3.Dot(ab, ap);
402 float d2 = Vector3.Dot(ac, ap); 402 float d2 = Vector3.Dot(ac, ap);
403 if (d1 <= 0f && d2 <= 0f) 403 if (d1 <= 0f && d2 <= 0f)
404 { 404 {
405 result.ClosestPointOnSimplex = a; 405 result.ClosestPointOnSimplex = a;
406 result.UsedVertices.UsedVertexA = true; 406 result.UsedVertices.UsedVertexA = true;
407 result.SetBarycentricCoordinates(1, 0, 0, 0); 407 result.SetBarycentricCoordinates(1, 0, 0, 0);
408 return true; // a; // barycentric coordinates (1,0,0) 408 return true; // a; // barycentric coordinates (1,0,0)
409 } 409 }
410 410
411 // Check if P in vertex region outside B 411 // Check if P in vertex region outside B
412 Vector3 bp = p - b; 412 Vector3 bp = p - b;
413 float d3 = Vector3.Dot(ab, bp); 413 float d3 = Vector3.Dot(ab, bp);
414 float d4 = Vector3.Dot(ac, bp); 414 float d4 = Vector3.Dot(ac, bp);
415 if (d3 >= 0f && d4 <= d3) 415 if (d3 >= 0f && d4 <= d3)
416 { 416 {
417 result.ClosestPointOnSimplex = b; 417 result.ClosestPointOnSimplex = b;
418 result.UsedVertices.UsedVertexB = true; 418 result.UsedVertices.UsedVertexB = true;
419 result.SetBarycentricCoordinates(0, 1, 0, 0); 419 result.SetBarycentricCoordinates(0, 1, 0, 0);
420 420
421 return true; // b; // barycentric coordinates (0,1,0) 421 return true; // b; // barycentric coordinates (0,1,0)
422 } 422 }
423 // Check if P in edge region of AB, if so return projection of P onto AB 423 // Check if P in edge region of AB, if so return projection of P onto AB
424 float vc = d1 * d4 - d3 * d2; 424 float vc = d1 * d4 - d3 * d2;
425 if (vc <= 0f && d1 >= 0f && d3 <= 0f) 425 if (vc <= 0f && d1 >= 0f && d3 <= 0f)
426 { 426 {
427 v = d1 / (d1 - d3); 427 v = d1 / (d1 - d3);
428 result.ClosestPointOnSimplex = a + v * ab; 428 result.ClosestPointOnSimplex = a + v * ab;
429 result.UsedVertices.UsedVertexA = true; 429 result.UsedVertices.UsedVertexA = true;
430 result.UsedVertices.UsedVertexB = true; 430 result.UsedVertices.UsedVertexB = true;
431 result.SetBarycentricCoordinates(1 - v, v, 0, 0); 431 result.SetBarycentricCoordinates(1 - v, v, 0, 0);
432 return true; 432 return true;
433 //return a + v * ab; // barycentric coordinates (1-v,v,0) 433 //return a + v * ab; // barycentric coordinates (1-v,v,0)
434 } 434 }
435 435
436 // Check if P in vertex region outside C 436 // Check if P in vertex region outside C
437 Vector3 cp = p - c; 437 Vector3 cp = p - c;
438 float d5 = Vector3.Dot(ab, cp); 438 float d5 = Vector3.Dot(ab, cp);
439 float d6 = Vector3.Dot(ac, cp); 439 float d6 = Vector3.Dot(ac, cp);
440 if (d6 >= 0f && d5 <= d6) 440 if (d6 >= 0f && d5 <= d6)
441 { 441 {
442 result.ClosestPointOnSimplex = c; 442 result.ClosestPointOnSimplex = c;
443 result.UsedVertices.UsedVertexC = true; 443 result.UsedVertices.UsedVertexC = true;
444 result.SetBarycentricCoordinates(0, 0, 1, 0); 444 result.SetBarycentricCoordinates(0, 0, 1, 0);
445 return true;//c; // barycentric coordinates (0,0,1) 445 return true;//c; // barycentric coordinates (0,0,1)
446 } 446 }
447 447
448 // Check if P in edge region of AC, if so return projection of P onto AC 448 // Check if P in edge region of AC, if so return projection of P onto AC
449 float vb = d5 * d2 - d1 * d6; 449 float vb = d5 * d2 - d1 * d6;
450 if (vb <= 0f && d2 >= 0f && d6 <= 0f) 450 if (vb <= 0f && d2 >= 0f && d6 <= 0f)
451 { 451 {
452 w = d2 / (d2 - d6); 452 w = d2 / (d2 - d6);
453 result.ClosestPointOnSimplex = a + w * ac; 453 result.ClosestPointOnSimplex = a + w * ac;
454 result.UsedVertices.UsedVertexA = true; 454 result.UsedVertices.UsedVertexA = true;
455 result.UsedVertices.UsedVertexC = true; 455 result.UsedVertices.UsedVertexC = true;
456 result.SetBarycentricCoordinates(1 - w, 0, w, 0); 456 result.SetBarycentricCoordinates(1 - w, 0, w, 0);
457 return true; 457 return true;
458 //return a + w * ac; // barycentric coordinates (1-w,0,w) 458 //return a + w * ac; // barycentric coordinates (1-w,0,w)
459 } 459 }
460 460
461 // Check if P in edge region of BC, if so return projection of P onto BC 461 // Check if P in edge region of BC, if so return projection of P onto BC
462 float va = d3 * d6 - d5 * d4; 462 float va = d3 * d6 - d5 * d4;
463 if (va <= 0f && (d4 - d3) >= 0f && (d5 - d6) >= 0f) 463 if (va <= 0f && (d4 - d3) >= 0f && (d5 - d6) >= 0f)
464 { 464 {
465 w = (d4 - d3) / ((d4 - d3) + (d5 - d6)); 465 w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
466 466
467 result.ClosestPointOnSimplex = b + w * (c - b); 467 result.ClosestPointOnSimplex = b + w * (c - b);
468 result.UsedVertices.UsedVertexB = true; 468 result.UsedVertices.UsedVertexB = true;
469 result.UsedVertices.UsedVertexC = true; 469 result.UsedVertices.UsedVertexC = true;
470 result.SetBarycentricCoordinates(0, 1 - w, w, 0); 470 result.SetBarycentricCoordinates(0, 1 - w, w, 0);
471 return true; 471 return true;
472 // return b + w * (c - b); // barycentric coordinates (0,1-w,w) 472 // return b + w * (c - b); // barycentric coordinates (0,1-w,w)
473 } 473 }
474 474
475 // P inside face region. Compute Q through its barycentric coordinates (u,v,w) 475 // P inside face region. Compute Q through its barycentric coordinates (u,v,w)
476 float denom = 1.0f / (va + vb + vc); 476 float denom = 1.0f / (va + vb + vc);
477 v = vb * denom; 477 v = vb * denom;
478 w = vc * denom; 478 w = vc * denom;
479 479
480 result.ClosestPointOnSimplex = a + ab * v + ac * w; 480 result.ClosestPointOnSimplex = a + ab * v + ac * w;
481 result.UsedVertices.UsedVertexA = true; 481 result.UsedVertices.UsedVertexA = true;
482 result.UsedVertices.UsedVertexB = true; 482 result.UsedVertices.UsedVertexB = true;
483 result.UsedVertices.UsedVertexC = true; 483 result.UsedVertices.UsedVertexC = true;
484 result.SetBarycentricCoordinates(1 - v - w, v, w, 0); 484 result.SetBarycentricCoordinates(1 - v - w, v, w, 0);
485 485
486 return true; 486 return true;
487 } 487 }
488 488
489 /// Test if point p and d lie on opposite sides of plane through abc 489 /// Test if point p and d lie on opposite sides of plane through abc
490 public int PointOutsideOfPlane(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d) 490 public int PointOutsideOfPlane(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d)
491 { 491 {
492 Vector3 normal = Vector3.Cross(b - a, c - a); 492 Vector3 normal = Vector3.Cross(b - a, c - a);
493 493
494 float signp = Vector3.Dot(p - a, normal); // [AP AB AC] 494 float signp = Vector3.Dot(p - a, normal); // [AP AB AC]
495 float signd = Vector3.Dot(d - a, normal); // [AD AB AC] 495 float signd = Vector3.Dot(d - a, normal); // [AD AB AC]
496 496
497 if (CatchDegenerateTetrahedron) 497 if (CatchDegenerateTetrahedron)
498 if (signd * signd < (1e-4f * 1e-4f)) return -1; 498 if (signd * signd < (1e-4f * 1e-4f)) return -1;
499 499
500 // Points on opposite sides if expression signs are opposite 500 // Points on opposite sides if expression signs are opposite
501 return signp * signd < 0f ? 1 : 0; 501 return signp * signd < 0f ? 1 : 0;
502 } 502 }
503 503
504 public bool ClosestPtPointTetrahedron(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d, 504 public bool ClosestPtPointTetrahedron(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d,
505 ref SubSimplexClosestResult finalResult) 505 ref SubSimplexClosestResult finalResult)
506 { 506 {
507 SubSimplexClosestResult tempResult = new SubSimplexClosestResult(); 507 SubSimplexClosestResult tempResult = new SubSimplexClosestResult();
508 508
509 // Start out assuming point inside all halfspaces, so closest to itself 509 // Start out assuming point inside all halfspaces, so closest to itself
510 finalResult.ClosestPointOnSimplex = p; 510 finalResult.ClosestPointOnSimplex = p;
511 finalResult.UsedVertices.Reset(); 511 finalResult.UsedVertices.Reset();
512 finalResult.UsedVertices.UsedVertexA = true; 512 finalResult.UsedVertices.UsedVertexA = true;
513 finalResult.UsedVertices.UsedVertexB = true; 513 finalResult.UsedVertices.UsedVertexB = true;
514 finalResult.UsedVertices.UsedVertexC = true; 514 finalResult.UsedVertices.UsedVertexC = true;
515 finalResult.UsedVertices.UsedVertexD = true; 515 finalResult.UsedVertices.UsedVertexD = true;
516 516
517 int pointOutsideABC = PointOutsideOfPlane(p, a, b, c, d); 517 int pointOutsideABC = PointOutsideOfPlane(p, a, b, c, d);
518 int pointOutsideACD = PointOutsideOfPlane(p, a, c, d, b); 518 int pointOutsideACD = PointOutsideOfPlane(p, a, c, d, b);
519 int pointOutsideADB = PointOutsideOfPlane(p, a, d, b, c); 519 int pointOutsideADB = PointOutsideOfPlane(p, a, d, b, c);
520 int pointOutsideBDC = PointOutsideOfPlane(p, b, d, c, a); 520 int pointOutsideBDC = PointOutsideOfPlane(p, b, d, c, a);
521 521
522 if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0) 522 if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0)
523 { 523 {
524 finalResult.Degenerate = true; 524 finalResult.Degenerate = true;
525 return false; 525 return false;
526 } 526 }
527 527
528 if (pointOutsideABC == 0 && pointOutsideACD == 0 && pointOutsideADB == 0 && pointOutsideBDC == 0) 528 if (pointOutsideABC == 0 && pointOutsideACD == 0 && pointOutsideADB == 0 && pointOutsideBDC == 0)
529 return false; 529 return false;
530 530
531 float bestSqDist = float.MaxValue; 531 float bestSqDist = float.MaxValue;
532 // If point outside face abc then compute closest point on abc 532 // If point outside face abc then compute closest point on abc
533 if (pointOutsideABC != 0) 533 if (pointOutsideABC != 0)
534 { 534 {
535 ClosestPtPointTriangle(p, a, b, c, ref tempResult); 535 ClosestPtPointTriangle(p, a, b, c, ref tempResult);
536 Vector3 q = tempResult.ClosestPointOnSimplex; 536 Vector3 q = tempResult.ClosestPointOnSimplex;
537 537
538 float sqDist = ((Vector3)(q - p)).LengthSquared(); 538 float sqDist = ((Vector3)(q - p)).LengthSquared();
539 // Update best closest point if (squared) distance is less than current best 539 // Update best closest point if (squared) distance is less than current best
540 if (sqDist < bestSqDist) 540 if (sqDist < bestSqDist)
541 { 541 {
542 bestSqDist = sqDist; 542 bestSqDist = sqDist;
543 finalResult.ClosestPointOnSimplex = q; 543 finalResult.ClosestPointOnSimplex = q;
544 //convert result bitmask! 544 //convert result bitmask!
545 finalResult.UsedVertices.Reset(); 545 finalResult.UsedVertices.Reset();
546 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA; 546 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA;
547 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexB; 547 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexB;
548 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexC; 548 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexC;
549 finalResult.SetBarycentricCoordinates( 549 finalResult.SetBarycentricCoordinates(
550 tempResult.BarycentricCoords[VertexA], 550 tempResult.BarycentricCoords[VertexA],
551 tempResult.BarycentricCoords[VertexB], 551 tempResult.BarycentricCoords[VertexB],
552 tempResult.BarycentricCoords[VertexC], 552 tempResult.BarycentricCoords[VertexC],
553 0); 553 0);
554 } 554 }
555 } 555 }
556 556
557 // Repeat test for face acd 557 // Repeat test for face acd
558 if (pointOutsideACD != 0) 558 if (pointOutsideACD != 0)
559 { 559 {
560 ClosestPtPointTriangle(p, a, c, d, ref tempResult); 560 ClosestPtPointTriangle(p, a, c, d, ref tempResult);
561 Vector3 q = tempResult.ClosestPointOnSimplex; 561 Vector3 q = tempResult.ClosestPointOnSimplex;
562 //convert result bitmask! 562 //convert result bitmask!
563 563
564 float sqDist = ((Vector3)(q - p)).LengthSquared(); 564 float sqDist = ((Vector3)(q - p)).LengthSquared();
565 if (sqDist < bestSqDist) 565 if (sqDist < bestSqDist)
566 { 566 {
567 bestSqDist = sqDist; 567 bestSqDist = sqDist;
568 finalResult.ClosestPointOnSimplex = q; 568 finalResult.ClosestPointOnSimplex = q;
569 finalResult.UsedVertices.Reset(); 569 finalResult.UsedVertices.Reset();
570 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA; 570 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA;
571 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexB; 571 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexB;
572 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexC; 572 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexC;
573 finalResult.SetBarycentricCoordinates( 573 finalResult.SetBarycentricCoordinates(
574 tempResult.BarycentricCoords[VertexA], 574 tempResult.BarycentricCoords[VertexA],
575 0, 575 0,
576 tempResult.BarycentricCoords[VertexB], 576 tempResult.BarycentricCoords[VertexB],
577 tempResult.BarycentricCoords[VertexC]); 577 tempResult.BarycentricCoords[VertexC]);
578 } 578 }
579 } 579 }
580 // Repeat test for face adb 580 // Repeat test for face adb
581 581
582 if (pointOutsideADB != 0) 582 if (pointOutsideADB != 0)
583 { 583 {
584 ClosestPtPointTriangle(p, a, d, b, ref tempResult); 584 ClosestPtPointTriangle(p, a, d, b, ref tempResult);
585 Vector3 q = tempResult.ClosestPointOnSimplex; 585 Vector3 q = tempResult.ClosestPointOnSimplex;
586 //convert result bitmask! 586 //convert result bitmask!
587 587
588 float sqDist = ((Vector3)(q - p)).LengthSquared(); 588 float sqDist = ((Vector3)(q - p)).LengthSquared();
589 if (sqDist < bestSqDist) 589 if (sqDist < bestSqDist)
590 { 590 {
591 bestSqDist = sqDist; 591 bestSqDist = sqDist;
592 finalResult.ClosestPointOnSimplex = q; 592 finalResult.ClosestPointOnSimplex = q;
593 finalResult.UsedVertices.Reset(); 593 finalResult.UsedVertices.Reset();
594 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA; 594 finalResult.UsedVertices.UsedVertexA = tempResult.UsedVertices.UsedVertexA;
595 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexB; 595 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexB;
596 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexC; 596 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexC;
597 finalResult.SetBarycentricCoordinates( 597 finalResult.SetBarycentricCoordinates(
598 tempResult.BarycentricCoords[VertexA], 598 tempResult.BarycentricCoords[VertexA],
599 tempResult.BarycentricCoords[VertexC], 599 tempResult.BarycentricCoords[VertexC],
600 0, 600 0,
601 tempResult.BarycentricCoords[VertexB]); 601 tempResult.BarycentricCoords[VertexB]);
602 602
603 } 603 }
604 } 604 }
605 // Repeat test for face bdc 605 // Repeat test for face bdc
606 606
607 if (pointOutsideBDC != 0) 607 if (pointOutsideBDC != 0)
608 { 608 {
609 ClosestPtPointTriangle(p, b, d, c, ref tempResult); 609 ClosestPtPointTriangle(p, b, d, c, ref tempResult);
610 Vector3 q = tempResult.ClosestPointOnSimplex; 610 Vector3 q = tempResult.ClosestPointOnSimplex;
611 //convert result bitmask! 611 //convert result bitmask!
612 float sqDist = ((Vector3)(q - p)).LengthSquared(); 612 float sqDist = ((Vector3)(q - p)).LengthSquared();
613 if (sqDist < bestSqDist) 613 if (sqDist < bestSqDist)
614 { 614 {
615 bestSqDist = sqDist; 615 bestSqDist = sqDist;
616 finalResult.ClosestPointOnSimplex = q; 616 finalResult.ClosestPointOnSimplex = q;
617 finalResult.UsedVertices.Reset(); 617 finalResult.UsedVertices.Reset();
618 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexA; 618 finalResult.UsedVertices.UsedVertexB = tempResult.UsedVertices.UsedVertexA;
619 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexB; 619 finalResult.UsedVertices.UsedVertexD = tempResult.UsedVertices.UsedVertexB;
620 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexC; 620 finalResult.UsedVertices.UsedVertexC = tempResult.UsedVertices.UsedVertexC;
621 621
622 finalResult.SetBarycentricCoordinates( 622 finalResult.SetBarycentricCoordinates(
623 0, 623 0,
624 tempResult.BarycentricCoords[VertexA], 624 tempResult.BarycentricCoords[VertexA],
625 tempResult.BarycentricCoords[VertexC], 625 tempResult.BarycentricCoords[VertexC],
626 tempResult.BarycentricCoords[VertexB]); 626 tempResult.BarycentricCoords[VertexB]);
627 } 627 }
628 } 628 }
629 629
630 //help! we ended up full ! 630 //help! we ended up full !
631 631
632 if (finalResult.UsedVertices.UsedVertexA && 632 if (finalResult.UsedVertices.UsedVertexA &&
633 finalResult.UsedVertices.UsedVertexB && 633 finalResult.UsedVertices.UsedVertexB &&
634 finalResult.UsedVertices.UsedVertexC && 634 finalResult.UsedVertices.UsedVertexC &&
635 finalResult.UsedVertices.UsedVertexD) 635 finalResult.UsedVertices.UsedVertexD)
636 { 636 {
637 return true; 637 return true;
638 } 638 }
639 639
640 return true; 640 return true;
641 } 641 }
642 } 642 }
643} 643}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactConstraint.cs
index e4a9ae2..e731643 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactConstraint.cs
@@ -1,488 +1,488 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public delegate float ContactSolverFunc (RigidBody bodyA, RigidBody bodyB, ManifoldPoint contactPoint, ContactSolverInfo info); 29 public delegate float ContactSolverFunc (RigidBody bodyA, RigidBody bodyB, ManifoldPoint contactPoint, ContactSolverInfo info);
30 30
31 public enum ContactSolverType 31 public enum ContactSolverType
32 { 32 {
33 Default = 0, 33 Default = 0,
34 TypeA, 34 TypeA,
35 TypeB, 35 TypeB,
36 User, 36 User,
37 MaxContactSolverType, 37 MaxContactSolverType,
38 } 38 }
39 39
40 public class ConstraintPersistentData 40 public class ConstraintPersistentData
41 { 41 {
42 // total applied impulse during most recent frame 42 // total applied impulse during most recent frame
43 private float _appliedImpulse; 43 private float _appliedImpulse;
44 private float _previousAppliedImpulse; 44 private float _previousAppliedImpulse;
45 private float _accumulatedTangentImpulse0; 45 private float _accumulatedTangentImpulse0;
46 private float _accumulatedTangentImpulse1; 46 private float _accumulatedTangentImpulse1;
47 47
48 private float _jacDiagABInv; 48 private float _jacDiagABInv;
49 private float _jacDiagABInvTangentA; 49 private float _jacDiagABInvTangentA;
50 private float _jacDiagABInvTangentB; 50 private float _jacDiagABInvTangentB;
51 private int _persistentLifeTime; 51 private int _persistentLifeTime;
52 private float _restitution; 52 private float _restitution;
53 private float _friction; 53 private float _friction;
54 private float _penetration; 54 private float _penetration;
55 private Vector3 _frictionWorldTangentialA; 55 private Vector3 _frictionWorldTangentialA;
56 private Vector3 _frictionWorldTangentialB; 56 private Vector3 _frictionWorldTangentialB;
57 57
58 private Vector3 _frictionAngularComponent0A; 58 private Vector3 _frictionAngularComponent0A;
59 private Vector3 _frictionAngularComponent0B; 59 private Vector3 _frictionAngularComponent0B;
60 private Vector3 _frictionAngularComponent1A; 60 private Vector3 _frictionAngularComponent1A;
61 private Vector3 _frictionAngularComponent1B; 61 private Vector3 _frictionAngularComponent1B;
62 62
63 //some data doesn't need to be persistent over frames: todo: clean/reuse this 63 //some data doesn't need to be persistent over frames: todo: clean/reuse this
64 private Vector3 _angularComponentA; 64 private Vector3 _angularComponentA;
65 private Vector3 _angularComponentB; 65 private Vector3 _angularComponentB;
66 66
67 private ContactSolverFunc _contactSolverFunc; 67 private ContactSolverFunc _contactSolverFunc;
68 private ContactSolverFunc _frictionSolverFunc; 68 private ContactSolverFunc _frictionSolverFunc;
69 69
70 public float AppliedImpulse { get { return _appliedImpulse; } set { _appliedImpulse = value; } } 70 public float AppliedImpulse { get { return _appliedImpulse; } set { _appliedImpulse = value; } }
71 public float PreviousAppliedImpulse { get { return _previousAppliedImpulse; } set { _previousAppliedImpulse = value; } } 71 public float PreviousAppliedImpulse { get { return _previousAppliedImpulse; } set { _previousAppliedImpulse = value; } }
72 public float AccumulatedTangentImpulseA { get { return _accumulatedTangentImpulse0; } set { _accumulatedTangentImpulse0 = value; } } 72 public float AccumulatedTangentImpulseA { get { return _accumulatedTangentImpulse0; } set { _accumulatedTangentImpulse0 = value; } }
73 public float AccumulatedTangentImpulseB { get { return _accumulatedTangentImpulse1; } set { _accumulatedTangentImpulse1 = value; } } 73 public float AccumulatedTangentImpulseB { get { return _accumulatedTangentImpulse1; } set { _accumulatedTangentImpulse1 = value; } }
74 74
75 public float JacDiagABInv { get { return _jacDiagABInv; } set { _jacDiagABInv = value; } } 75 public float JacDiagABInv { get { return _jacDiagABInv; } set { _jacDiagABInv = value; } }
76 public float JacDiagABInvTangentA { get { return _jacDiagABInvTangentA; } set { _jacDiagABInvTangentA = value; } } 76 public float JacDiagABInvTangentA { get { return _jacDiagABInvTangentA; } set { _jacDiagABInvTangentA = value; } }
77 public float JacDiagABInvTangentB { get { return _jacDiagABInvTangentB; } set { _jacDiagABInvTangentB = value; } } 77 public float JacDiagABInvTangentB { get { return _jacDiagABInvTangentB; } set { _jacDiagABInvTangentB = value; } }
78 public int PersistentLifeTime { get { return _persistentLifeTime; } set { _persistentLifeTime = value; } } 78 public int PersistentLifeTime { get { return _persistentLifeTime; } set { _persistentLifeTime = value; } }
79 public float Restitution { get { return _restitution; } set { _restitution = value; } } 79 public float Restitution { get { return _restitution; } set { _restitution = value; } }
80 public float Friction { get { return _friction; } set { _friction = value; } } 80 public float Friction { get { return _friction; } set { _friction = value; } }
81 public float Penetration { get { return _penetration; } set { _penetration = value; } } 81 public float Penetration { get { return _penetration; } set { _penetration = value; } }
82 public Vector3 FrictionWorldTangentialA { get { return _frictionWorldTangentialA; } set { _frictionWorldTangentialA = value; } } 82 public Vector3 FrictionWorldTangentialA { get { return _frictionWorldTangentialA; } set { _frictionWorldTangentialA = value; } }
83 public Vector3 FrictionWorldTangentialB { get { return _frictionWorldTangentialB; } set { _frictionWorldTangentialB = value; } } 83 public Vector3 FrictionWorldTangentialB { get { return _frictionWorldTangentialB; } set { _frictionWorldTangentialB = value; } }
84 84
85 public Vector3 FrictionAngularComponent0A { get { return _frictionAngularComponent0A; } set { _frictionAngularComponent0A = value; } } 85 public Vector3 FrictionAngularComponent0A { get { return _frictionAngularComponent0A; } set { _frictionAngularComponent0A = value; } }
86 public Vector3 FrictionAngularComponent0B { get { return _frictionAngularComponent0B; } set { _frictionAngularComponent0B = value; } } 86 public Vector3 FrictionAngularComponent0B { get { return _frictionAngularComponent0B; } set { _frictionAngularComponent0B = value; } }
87 public Vector3 FrictionAngularComponent1A { get { return _frictionAngularComponent1A; } set { _frictionAngularComponent1A = value; } } 87 public Vector3 FrictionAngularComponent1A { get { return _frictionAngularComponent1A; } set { _frictionAngularComponent1A = value; } }
88 public Vector3 FrictionAngularComponent1B { get { return _frictionAngularComponent1B; } set { _frictionAngularComponent1B = value; } } 88 public Vector3 FrictionAngularComponent1B { get { return _frictionAngularComponent1B; } set { _frictionAngularComponent1B = value; } }
89 89
90 public Vector3 AngularComponentA { get { return _angularComponentA; } set { _angularComponentA = value; } } 90 public Vector3 AngularComponentA { get { return _angularComponentA; } set { _angularComponentA = value; } }
91 public Vector3 AngularComponentB { get { return _angularComponentB; } set { _angularComponentB = value; } } 91 public Vector3 AngularComponentB { get { return _angularComponentB; } set { _angularComponentB = value; } }
92 92
93 public ContactSolverFunc ContactSolverFunc { get { return _contactSolverFunc; } set { _contactSolverFunc = value; } } 93 public ContactSolverFunc ContactSolverFunc { get { return _contactSolverFunc; } set { _contactSolverFunc = value; } }
94 public ContactSolverFunc FrictionSolverFunc { get { return _frictionSolverFunc; } set { _frictionSolverFunc = value; } } 94 public ContactSolverFunc FrictionSolverFunc { get { return _frictionSolverFunc; } set { _frictionSolverFunc = value; } }
95 } 95 }
96 96
97 public static class ContactConstraint 97 public static class ContactConstraint
98 { 98 {
99 private const int UseInternalApplyImpulse = 1; 99 private const int UseInternalApplyImpulse = 1;
100 100
101 /// <summary> 101 /// <summary>
102 /// bilateral constraint between two dynamic objects 102 /// bilateral constraint between two dynamic objects
103 /// positive distance = separation, negative distance = penetration 103 /// positive distance = separation, negative distance = penetration
104 /// </summary> 104 /// </summary>
105 /// <param name="body1"></param> 105 /// <param name="body1"></param>
106 /// <param name="pos1"></param> 106 /// <param name="pos1"></param>
107 /// <param name="body2"></param> 107 /// <param name="body2"></param>
108 /// <param name="pos2"></param> 108 /// <param name="pos2"></param>
109 /// <param name="distance"></param> 109 /// <param name="distance"></param>
110 /// <param name="normal"></param> 110 /// <param name="normal"></param>
111 /// <param name="impulse"></param> 111 /// <param name="impulse"></param>
112 /// <param name="timeStep"></param> 112 /// <param name="timeStep"></param>
113 public static void ResolveSingleBilateral(RigidBody bodyA, Vector3 posA, 113 public static void ResolveSingleBilateral(RigidBody bodyA, Vector3 posA,
114 RigidBody bodyB, Vector3 posB, 114 RigidBody bodyB, Vector3 posB,
115 float distance, Vector3 normal, out float impulse, float timeStep) 115 float distance, Vector3 normal, out float impulse, float timeStep)
116 { 116 {
117 float normalLenSqr = normal.LengthSquared(); 117 float normalLenSqr = normal.LengthSquared();
118 118
119 if (Math.Abs(normalLenSqr) >= 1.1f) 119 if (Math.Abs(normalLenSqr) >= 1.1f)
120 throw new BulletException(); 120 throw new BulletException();
121 121
122 /*if (normalLenSqr > 1.1f) 122 /*if (normalLenSqr > 1.1f)
123 { 123 {
124 impulse = 0f; 124 impulse = 0f;
125 return; 125 return;
126 }*/ 126 }*/
127 Vector3 rel_pos1 = posA - bodyA.CenterOfMassPosition; 127 Vector3 rel_pos1 = posA - bodyA.CenterOfMassPosition;
128 Vector3 rel_pos2 = posB - bodyB.CenterOfMassPosition; 128 Vector3 rel_pos2 = posB - bodyB.CenterOfMassPosition;
129 //this jacobian entry could be re-used for all iterations 129 //this jacobian entry could be re-used for all iterations
130 130
131 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1); 131 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1);
132 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2); 132 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2);
133 Vector3 vel = vel1 - vel2; 133 Vector3 vel = vel1 - vel2;
134 134
135 135
136 JacobianEntry jac = new JacobianEntry(Matrix.Transpose(bodyA.CenterOfMassTransform), 136 JacobianEntry jac = new JacobianEntry(Matrix.Transpose(bodyA.CenterOfMassTransform),
137 Matrix.Transpose(bodyB.CenterOfMassTransform), 137 Matrix.Transpose(bodyB.CenterOfMassTransform),
138 rel_pos1, rel_pos2, normal, bodyA.InvInertiaDiagLocal, bodyA.InverseMass, 138 rel_pos1, rel_pos2, normal, bodyA.InvInertiaDiagLocal, bodyA.InverseMass,
139 bodyB.InvInertiaDiagLocal, bodyB.InverseMass); 139 bodyB.InvInertiaDiagLocal, bodyB.InverseMass);
140 140
141 float jacDiagAB = jac.Diagonal; 141 float jacDiagAB = jac.Diagonal;
142 float jacDiagABInv = 1f / jacDiagAB; 142 float jacDiagABInv = 1f / jacDiagAB;
143 143
144 float rel_vel = jac.GetRelativeVelocity( 144 float rel_vel = jac.GetRelativeVelocity(
145 bodyA.LinearVelocity, 145 bodyA.LinearVelocity,
146 Vector3.TransformNormal(bodyA.AngularVelocity, Matrix.Transpose(bodyA.CenterOfMassTransform)), 146 Vector3.TransformNormal(bodyA.AngularVelocity, Matrix.Transpose(bodyA.CenterOfMassTransform)),
147 bodyB.LinearVelocity, 147 bodyB.LinearVelocity,
148 Vector3.TransformNormal(bodyB.AngularVelocity, Matrix.Transpose(bodyB.CenterOfMassTransform))); 148 Vector3.TransformNormal(bodyB.AngularVelocity, Matrix.Transpose(bodyB.CenterOfMassTransform)));
149 float a; 149 float a;
150 a = jacDiagABInv; 150 a = jacDiagABInv;
151 151
152 152
153 rel_vel = Vector3.Dot(normal, vel); 153 rel_vel = Vector3.Dot(normal, vel);
154 154
155 float contactDamping = 0.2f; 155 float contactDamping = 0.2f;
156 156
157 float velocityImpulse = -contactDamping * rel_vel * jacDiagABInv; 157 float velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
158 impulse = velocityImpulse; 158 impulse = velocityImpulse;
159 } 159 }
160 160
161 161
162 /// <summary> 162 /// <summary>
163 /// contact constraint resolution: 163 /// contact constraint resolution:
164 /// calculate and apply impulse to satisfy non-penetration and non-negative relative velocity constraint 164 /// calculate and apply impulse to satisfy non-penetration and non-negative relative velocity constraint
165 /// positive distance = separation, negative distance = penetration 165 /// positive distance = separation, negative distance = penetration
166 /// </summary> 166 /// </summary>
167 /// <param name="body1"></param> 167 /// <param name="body1"></param>
168 /// <param name="body2"></param> 168 /// <param name="body2"></param>
169 /// <param name="contactPoint"></param> 169 /// <param name="contactPoint"></param>
170 /// <param name="info"></param> 170 /// <param name="info"></param>
171 /// <returns></returns> 171 /// <returns></returns>
172 public static float ResolveSingleCollision(RigidBody bodyA, RigidBody bodyB, 172 public static float ResolveSingleCollision(RigidBody bodyA, RigidBody bodyB,
173 ManifoldPoint contactPoint, ContactSolverInfo solverInfo) 173 ManifoldPoint contactPoint, ContactSolverInfo solverInfo)
174 { 174 {
175 Vector3 pos1 = contactPoint.PositionWorldOnA; 175 Vector3 pos1 = contactPoint.PositionWorldOnA;
176 Vector3 pos2 = contactPoint.PositionWorldOnB; 176 Vector3 pos2 = contactPoint.PositionWorldOnB;
177 177
178 178
179 // printf("distance=%f\n",distance); 179 // printf("distance=%f\n",distance);
180 180
181 Vector3 normal = contactPoint.NormalWorldOnB; 181 Vector3 normal = contactPoint.NormalWorldOnB;
182 182
183 Vector3 rel_pos1 = pos1 - bodyA.CenterOfMassPosition; 183 Vector3 rel_pos1 = pos1 - bodyA.CenterOfMassPosition;
184 Vector3 rel_pos2 = pos2 - bodyB.CenterOfMassPosition; 184 Vector3 rel_pos2 = pos2 - bodyB.CenterOfMassPosition;
185 185
186 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1); 186 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1);
187 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2); 187 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2);
188 Vector3 vel = vel1 - vel2; 188 Vector3 vel = vel1 - vel2;
189 float rel_vel; 189 float rel_vel;
190 rel_vel = Vector3.Dot(normal, vel); 190 rel_vel = Vector3.Dot(normal, vel);
191 191
192 192
193 float Kfps = 1f / solverInfo.TimeStep; 193 float Kfps = 1f / solverInfo.TimeStep;
194 194
195 //float damping = solverInfo.m_damping; 195 //float damping = solverInfo.m_damping;
196 float Kerp = solverInfo.Erp; 196 float Kerp = solverInfo.Erp;
197 197
198 float Kcor = Kerp * Kfps; 198 float Kcor = Kerp * Kfps;
199 199
200 //printf("dist=%f\n",distance); 200 //printf("dist=%f\n",distance);
201 201
202 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData; 202 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData;
203 if (cpd == null) 203 if (cpd == null)
204 throw new BulletException(); 204 throw new BulletException();
205 205
206 float distance = cpd.Penetration;//contactPoint.getDistance(); 206 float distance = cpd.Penetration;//contactPoint.getDistance();
207 207
208 208
209 //distance = 0.f; 209 //distance = 0.f;
210 float positionalError = Kcor * -distance; 210 float positionalError = Kcor * -distance;
211 //jacDiagABInv; 211 //jacDiagABInv;
212 float velocityError = cpd.Restitution - rel_vel;// * damping; 212 float velocityError = cpd.Restitution - rel_vel;// * damping;
213 213
214 214
215 float penetrationImpulse = positionalError * cpd.JacDiagABInv; 215 float penetrationImpulse = positionalError * cpd.JacDiagABInv;
216 float velocityImpulse = velocityError * cpd.JacDiagABInv; 216 float velocityImpulse = velocityError * cpd.JacDiagABInv;
217 float normalImpulse = penetrationImpulse + velocityImpulse; 217 float normalImpulse = penetrationImpulse + velocityImpulse;
218 218
219 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse 219 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse
220 float oldNormalImpulse = cpd.AppliedImpulse; 220 float oldNormalImpulse = cpd.AppliedImpulse;
221 float sum = oldNormalImpulse + normalImpulse; 221 float sum = oldNormalImpulse + normalImpulse;
222 cpd.AppliedImpulse = 0f > sum ? 0f : sum; 222 cpd.AppliedImpulse = 0f > sum ? 0f : sum;
223 223
224 normalImpulse = cpd.AppliedImpulse - oldNormalImpulse; 224 normalImpulse = cpd.AppliedImpulse - oldNormalImpulse;
225 225
226 if (bodyA.InverseMass != 0) 226 if (bodyA.InverseMass != 0)
227 { 227 {
228 bodyA.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyA.InverseMass, cpd.AngularComponentA, normalImpulse); 228 bodyA.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyA.InverseMass, cpd.AngularComponentA, normalImpulse);
229 } 229 }
230 if (bodyB.InverseMass != 0) 230 if (bodyB.InverseMass != 0)
231 { 231 {
232 bodyB.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyB.InverseMass, cpd.AngularComponentB, -normalImpulse); 232 bodyB.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyB.InverseMass, cpd.AngularComponentB, -normalImpulse);
233 } 233 }
234 234
235 /*body1.applyImpulse(normal * (normalImpulse), rel_pos1); 235 /*body1.applyImpulse(normal * (normalImpulse), rel_pos1);
236 body2.applyImpulse(-normal * (normalImpulse), rel_pos2);*/ 236 body2.applyImpulse(-normal * (normalImpulse), rel_pos2);*/
237 237
238 return normalImpulse; 238 return normalImpulse;
239 } 239 }
240 240
241 public static float ResolveSingleFriction(RigidBody bodyA, RigidBody bodyB, 241 public static float ResolveSingleFriction(RigidBody bodyA, RigidBody bodyB,
242 ManifoldPoint contactPoint, ContactSolverInfo solverInfo) 242 ManifoldPoint contactPoint, ContactSolverInfo solverInfo)
243 { 243 {
244 244
245 Vector3 pos1 = contactPoint.PositionWorldOnA; 245 Vector3 pos1 = contactPoint.PositionWorldOnA;
246 Vector3 pos2 = contactPoint.PositionWorldOnB; 246 Vector3 pos2 = contactPoint.PositionWorldOnB;
247 247
248 Vector3 rel_pos1 = pos1 - bodyA.CenterOfMassPosition; 248 Vector3 rel_pos1 = pos1 - bodyA.CenterOfMassPosition;
249 Vector3 rel_pos2 = pos2 - bodyB.CenterOfMassPosition; 249 Vector3 rel_pos2 = pos2 - bodyB.CenterOfMassPosition;
250 250
251 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData; 251 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData;
252 if (cpd == null) 252 if (cpd == null)
253 throw new BulletException(); 253 throw new BulletException();
254 254
255 float combinedFriction = cpd.Friction; 255 float combinedFriction = cpd.Friction;
256 256
257 float limit = cpd.AppliedImpulse * combinedFriction; 257 float limit = cpd.AppliedImpulse * combinedFriction;
258 258
259 //friction 259 //friction
260 if (cpd.AppliedImpulse > 0) 260 if (cpd.AppliedImpulse > 0)
261 { 261 {
262 //apply friction in the 2 tangential directions 262 //apply friction in the 2 tangential directions
263 263
264 // 1st tangent 264 // 1st tangent
265 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1); 265 Vector3 vel1 = bodyA.GetVelocityInLocalPoint(rel_pos1);
266 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2); 266 Vector3 vel2 = bodyB.GetVelocityInLocalPoint(rel_pos2);
267 Vector3 vel = vel1 - vel2; 267 Vector3 vel = vel1 - vel2;
268 268
269 float j1, j2; 269 float j1, j2;
270 270
271 { 271 {
272 272
273 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialA, vel); 273 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialA, vel);
274 274
275 // calculate j that moves us to zero relative velocity 275 // calculate j that moves us to zero relative velocity
276 j1 = -vrel * cpd.JacDiagABInvTangentA; 276 j1 = -vrel * cpd.JacDiagABInvTangentA;
277 float oldTangentImpulse = cpd.AccumulatedTangentImpulseA; 277 float oldTangentImpulse = cpd.AccumulatedTangentImpulseA;
278 cpd.AccumulatedTangentImpulseA = oldTangentImpulse + j1; 278 cpd.AccumulatedTangentImpulseA = oldTangentImpulse + j1;
279 float atia = cpd.AccumulatedTangentImpulseA; 279 float atia = cpd.AccumulatedTangentImpulseA;
280 MathHelper.SetMin(ref atia, limit); 280 MathHelper.SetMin(ref atia, limit);
281 MathHelper.SetMax(ref atia, -limit); 281 MathHelper.SetMax(ref atia, -limit);
282 cpd.AccumulatedTangentImpulseA = atia; 282 cpd.AccumulatedTangentImpulseA = atia;
283 j1 = cpd.AccumulatedTangentImpulseA - oldTangentImpulse; 283 j1 = cpd.AccumulatedTangentImpulseA - oldTangentImpulse;
284 284
285 } 285 }
286 { 286 {
287 // 2nd tangent 287 // 2nd tangent
288 288
289 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialB, vel); 289 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialB, vel);
290 290
291 // calculate j that moves us to zero relative velocity 291 // calculate j that moves us to zero relative velocity
292 j2 = -vrel * cpd.JacDiagABInvTangentB; 292 j2 = -vrel * cpd.JacDiagABInvTangentB;
293 float oldTangentImpulse = cpd.AccumulatedTangentImpulseB; 293 float oldTangentImpulse = cpd.AccumulatedTangentImpulseB;
294 cpd.AccumulatedTangentImpulseB = oldTangentImpulse + j2; 294 cpd.AccumulatedTangentImpulseB = oldTangentImpulse + j2;
295 float atib = cpd.AccumulatedTangentImpulseB; 295 float atib = cpd.AccumulatedTangentImpulseB;
296 MathHelper.SetMin(ref atib, limit); 296 MathHelper.SetMin(ref atib, limit);
297 MathHelper.SetMax(ref atib, -limit); 297 MathHelper.SetMax(ref atib, -limit);
298 cpd.AccumulatedTangentImpulseB = atib; 298 cpd.AccumulatedTangentImpulseB = atib;
299 j2 = cpd.AccumulatedTangentImpulseB - oldTangentImpulse; 299 j2 = cpd.AccumulatedTangentImpulseB - oldTangentImpulse;
300 } 300 }
301 301
302 if (bodyA.InverseMass != 0) 302 if (bodyA.InverseMass != 0)
303 { 303 {
304 bodyA.InternalApplyImpulse(cpd.FrictionWorldTangentialA * bodyA.InverseMass, cpd.FrictionAngularComponent0A, j1); 304 bodyA.InternalApplyImpulse(cpd.FrictionWorldTangentialA * bodyA.InverseMass, cpd.FrictionAngularComponent0A, j1);
305 bodyA.InternalApplyImpulse(cpd.FrictionWorldTangentialB * bodyA.InverseMass, cpd.FrictionAngularComponent1A, j2); 305 bodyA.InternalApplyImpulse(cpd.FrictionWorldTangentialB * bodyA.InverseMass, cpd.FrictionAngularComponent1A, j2);
306 } 306 }
307 if (bodyB.InverseMass != 0) 307 if (bodyB.InverseMass != 0)
308 { 308 {
309 bodyB.InternalApplyImpulse(cpd.FrictionWorldTangentialA * bodyB.InverseMass, cpd.FrictionAngularComponent0B, -j1); 309 bodyB.InternalApplyImpulse(cpd.FrictionWorldTangentialA * bodyB.InverseMass, cpd.FrictionAngularComponent0B, -j1);
310 bodyB.InternalApplyImpulse(cpd.FrictionWorldTangentialB * bodyB.InverseMass, cpd.FrictionAngularComponent1B, -j2); 310 bodyB.InternalApplyImpulse(cpd.FrictionWorldTangentialB * bodyB.InverseMass, cpd.FrictionAngularComponent1B, -j2);
311 } 311 }
312 312
313 } 313 }
314 return cpd.AppliedImpulse; 314 return cpd.AppliedImpulse;
315 } 315 }
316 316
317 public static float ResolveSingleFrictionOriginal( 317 public static float ResolveSingleFrictionOriginal(
318 RigidBody bodyA, 318 RigidBody bodyA,
319 RigidBody bodyB, 319 RigidBody bodyB,
320 ManifoldPoint contactPoint, 320 ManifoldPoint contactPoint,
321 ContactSolverInfo solverInfo) 321 ContactSolverInfo solverInfo)
322 { 322 {
323 Vector3 posA = contactPoint.PositionWorldOnA; 323 Vector3 posA = contactPoint.PositionWorldOnA;
324 Vector3 posB = contactPoint.PositionWorldOnB; 324 Vector3 posB = contactPoint.PositionWorldOnB;
325 325
326 Vector3 relPosA = posA - bodyA.CenterOfMassPosition; 326 Vector3 relPosA = posA - bodyA.CenterOfMassPosition;
327 Vector3 relPosB = posB - bodyB.CenterOfMassPosition; 327 Vector3 relPosB = posB - bodyB.CenterOfMassPosition;
328 328
329 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData; 329 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData;
330 if (cpd == null) 330 if (cpd == null)
331 throw new BulletException(); 331 throw new BulletException();
332 332
333 float combinedFriction = cpd.Friction; 333 float combinedFriction = cpd.Friction;
334 334
335 float limit = cpd.AppliedImpulse * combinedFriction; 335 float limit = cpd.AppliedImpulse * combinedFriction;
336 //if (contactPoint.m_appliedImpulse>0.f) 336 //if (contactPoint.m_appliedImpulse>0.f)
337 //friction 337 //friction
338 { 338 {
339 //apply friction in the 2 tangential directions 339 //apply friction in the 2 tangential directions
340 340
341 { 341 {
342 // 1st tangent 342 // 1st tangent
343 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA); 343 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA);
344 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB); 344 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB);
345 Vector3 vel = velA - velB; 345 Vector3 vel = velA - velB;
346 346
347 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialA, vel); 347 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialA, vel);
348 348
349 // calculate j that moves us to zero relative velocity 349 // calculate j that moves us to zero relative velocity
350 float j = -vrel * cpd.JacDiagABInvTangentA; 350 float j = -vrel * cpd.JacDiagABInvTangentA;
351 float total = cpd.AccumulatedTangentImpulseA + j; 351 float total = cpd.AccumulatedTangentImpulseA + j;
352 if (limit < total) 352 if (limit < total)
353 total = limit; 353 total = limit;
354 if (total < -limit) 354 if (total < -limit)
355 total = -limit; 355 total = -limit;
356 j = total - cpd.AccumulatedTangentImpulseA; 356 j = total - cpd.AccumulatedTangentImpulseA;
357 cpd.AccumulatedTangentImpulseA = total; 357 cpd.AccumulatedTangentImpulseA = total;
358 bodyA.ApplyImpulse(j * cpd.FrictionWorldTangentialA, relPosA); 358 bodyA.ApplyImpulse(j * cpd.FrictionWorldTangentialA, relPosA);
359 bodyB.ApplyImpulse(j * -cpd.FrictionWorldTangentialA, relPosB); 359 bodyB.ApplyImpulse(j * -cpd.FrictionWorldTangentialA, relPosB);
360 } 360 }
361 361
362 362
363 { 363 {
364 // 2nd tangent 364 // 2nd tangent
365 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA); 365 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA);
366 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB); 366 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB);
367 Vector3 vel = velA - velB; 367 Vector3 vel = velA - velB;
368 368
369 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialB, vel); 369 float vrel = Vector3.Dot(cpd.FrictionWorldTangentialB, vel);
370 370
371 // calculate j that moves us to zero relative velocity 371 // calculate j that moves us to zero relative velocity
372 float j = -vrel * cpd.JacDiagABInvTangentB; 372 float j = -vrel * cpd.JacDiagABInvTangentB;
373 float total = cpd.AccumulatedTangentImpulseB + j; 373 float total = cpd.AccumulatedTangentImpulseB + j;
374 if (limit < total) 374 if (limit < total)
375 total = limit; 375 total = limit;
376 if (total < -limit) 376 if (total < -limit)
377 total = -limit; 377 total = -limit;
378 j = total - cpd.AccumulatedTangentImpulseB; 378 j = total - cpd.AccumulatedTangentImpulseB;
379 cpd.AccumulatedTangentImpulseB = total; 379 cpd.AccumulatedTangentImpulseB = total;
380 bodyA.ApplyImpulse(j * cpd.FrictionWorldTangentialB, relPosA); 380 bodyA.ApplyImpulse(j * cpd.FrictionWorldTangentialB, relPosA);
381 bodyB.ApplyImpulse(j * -cpd.FrictionWorldTangentialB, relPosB); 381 bodyB.ApplyImpulse(j * -cpd.FrictionWorldTangentialB, relPosB);
382 } 382 }
383 } 383 }
384 384
385 return cpd.AppliedImpulse; 385 return cpd.AppliedImpulse;
386 } 386 }
387 387
388 //velocity + friction 388 //velocity + friction
389 //response between two dynamic objects with friction 389 //response between two dynamic objects with friction
390 public static float ResolveSingleCollisionCombined( 390 public static float ResolveSingleCollisionCombined(
391 RigidBody bodyA, 391 RigidBody bodyA,
392 RigidBody bodyB, 392 RigidBody bodyB,
393 ManifoldPoint contactPoint, 393 ManifoldPoint contactPoint,
394 ContactSolverInfo solverInfo) 394 ContactSolverInfo solverInfo)
395 { 395 {
396 396
397 Vector3 posA = contactPoint.PositionWorldOnA; 397 Vector3 posA = contactPoint.PositionWorldOnA;
398 Vector3 posB = contactPoint.PositionWorldOnB; 398 Vector3 posB = contactPoint.PositionWorldOnB;
399 Vector3 normal = contactPoint.NormalWorldOnB; 399 Vector3 normal = contactPoint.NormalWorldOnB;
400 400
401 Vector3 relPosA = posA - bodyA.CenterOfMassPosition; 401 Vector3 relPosA = posA - bodyA.CenterOfMassPosition;
402 Vector3 relPosB = posB - bodyB.CenterOfMassPosition; 402 Vector3 relPosB = posB - bodyB.CenterOfMassPosition;
403 403
404 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA); 404 Vector3 velA = bodyA.GetVelocityInLocalPoint(relPosA);
405 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB); 405 Vector3 velB = bodyB.GetVelocityInLocalPoint(relPosB);
406 Vector3 vel = velA - velB; 406 Vector3 vel = velA - velB;
407 float relVel; 407 float relVel;
408 relVel = Vector3.Dot(normal, vel); 408 relVel = Vector3.Dot(normal, vel);
409 409
410 float Kfps = 1f / solverInfo.TimeStep; 410 float Kfps = 1f / solverInfo.TimeStep;
411 411
412 //float damping = solverInfo.m_damping; 412 //float damping = solverInfo.m_damping;
413 float Kerp = solverInfo.Erp; 413 float Kerp = solverInfo.Erp;
414 float Kcor = Kerp * Kfps; 414 float Kcor = Kerp * Kfps;
415 415
416 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData; 416 ConstraintPersistentData cpd = contactPoint.UserPersistentData as ConstraintPersistentData;
417 if (cpd == null) 417 if (cpd == null)
418 throw new BulletException(); 418 throw new BulletException();
419 419
420 float distance = cpd.Penetration; 420 float distance = cpd.Penetration;
421 float positionalError = Kcor * -distance; 421 float positionalError = Kcor * -distance;
422 float velocityError = cpd.Restitution - relVel;// * damping; 422 float velocityError = cpd.Restitution - relVel;// * damping;
423 423
424 float penetrationImpulse = positionalError * cpd.JacDiagABInv; 424 float penetrationImpulse = positionalError * cpd.JacDiagABInv;
425 425
426 float velocityImpulse = velocityError * cpd.JacDiagABInv; 426 float velocityImpulse = velocityError * cpd.JacDiagABInv;
427 427
428 float normalImpulse = penetrationImpulse + velocityImpulse; 428 float normalImpulse = penetrationImpulse + velocityImpulse;
429 429
430 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse 430 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse
431 float oldNormalImpulse = cpd.AppliedImpulse; 431 float oldNormalImpulse = cpd.AppliedImpulse;
432 float sum = oldNormalImpulse + normalImpulse; 432 float sum = oldNormalImpulse + normalImpulse;
433 cpd.AppliedImpulse = 0 > sum ? 0 : sum; 433 cpd.AppliedImpulse = 0 > sum ? 0 : sum;
434 434
435 normalImpulse = cpd.AppliedImpulse - oldNormalImpulse; 435 normalImpulse = cpd.AppliedImpulse - oldNormalImpulse;
436 436
437 if (bodyA.InverseMass != 0) 437 if (bodyA.InverseMass != 0)
438 { 438 {
439 bodyA.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyA.InverseMass, cpd.AngularComponentA, normalImpulse); 439 bodyA.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyA.InverseMass, cpd.AngularComponentA, normalImpulse);
440 } 440 }
441 if (bodyB.InverseMass != 0) 441 if (bodyB.InverseMass != 0)
442 { 442 {
443 bodyB.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyB.InverseMass, cpd.AngularComponentB, -normalImpulse); 443 bodyB.InternalApplyImpulse(contactPoint.NormalWorldOnB * bodyB.InverseMass, cpd.AngularComponentB, -normalImpulse);
444 } 444 }
445 445
446 { 446 {
447 //friction 447 //friction
448 Vector3 vel12 = bodyA.GetVelocityInLocalPoint(relPosA); 448 Vector3 vel12 = bodyA.GetVelocityInLocalPoint(relPosA);
449 Vector3 vel22 = bodyB.GetVelocityInLocalPoint(relPosB); 449 Vector3 vel22 = bodyB.GetVelocityInLocalPoint(relPosB);
450 Vector3 vel3 = vel12 - vel22; 450 Vector3 vel3 = vel12 - vel22;
451 451
452 relVel = Vector3.Dot(normal, vel3); 452 relVel = Vector3.Dot(normal, vel3);
453 453
454 454
455 Vector3 latVel = vel3 - normal * relVel; 455 Vector3 latVel = vel3 - normal * relVel;
456 float lat_rel_vel = latVel.Length(); 456 float lat_rel_vel = latVel.Length();
457 457
458 float combinedFriction = cpd.Friction; 458 float combinedFriction = cpd.Friction;
459 459
460 if (cpd.AppliedImpulse > 0) 460 if (cpd.AppliedImpulse > 0)
461 if (lat_rel_vel > float.Epsilon) 461 if (lat_rel_vel > float.Epsilon)
462 { 462 {
463 latVel /= lat_rel_vel; 463 latVel /= lat_rel_vel;
464 Vector3 temp1 = Vector3.TransformNormal(Vector3.Cross(relPosA, latVel), bodyA.InvInertiaTensorWorld); 464 Vector3 temp1 = Vector3.TransformNormal(Vector3.Cross(relPosA, latVel), bodyA.InvInertiaTensorWorld);
465 Vector3 temp2 = Vector3.TransformNormal(Vector3.Cross(relPosB, latVel), bodyB.InvInertiaTensorWorld); 465 Vector3 temp2 = Vector3.TransformNormal(Vector3.Cross(relPosB, latVel), bodyB.InvInertiaTensorWorld);
466 float friction_impulse = lat_rel_vel / 466 float friction_impulse = lat_rel_vel /
467 (bodyA.InverseMass + bodyB.InverseMass + Vector3.Dot(latVel, Vector3.Cross(temp1, relPosA) + Vector3.Cross(temp2, relPosB))); 467 (bodyA.InverseMass + bodyB.InverseMass + Vector3.Dot(latVel, Vector3.Cross(temp1, relPosA) + Vector3.Cross(temp2, relPosB)));
468 float normal_impulse = cpd.AppliedImpulse * combinedFriction; 468 float normal_impulse = cpd.AppliedImpulse * combinedFriction;
469 469
470 MathHelper.SetMin(ref friction_impulse, normal_impulse); 470 MathHelper.SetMin(ref friction_impulse, normal_impulse);
471 MathHelper.SetMin(ref friction_impulse, -normal_impulse); 471 MathHelper.SetMin(ref friction_impulse, -normal_impulse);
472 bodyA.ApplyImpulse(latVel * -friction_impulse, relPosA); 472 bodyA.ApplyImpulse(latVel * -friction_impulse, relPosA);
473 bodyB.ApplyImpulse(latVel * friction_impulse, relPosB); 473 bodyB.ApplyImpulse(latVel * friction_impulse, relPosB);
474 } 474 }
475 } 475 }
476 return normalImpulse; 476 return normalImpulse;
477 } 477 }
478 478
479 public static float ResolveSingleFrictionEmpty( 479 public static float ResolveSingleFrictionEmpty(
480 RigidBody bodyA, 480 RigidBody bodyA,
481 RigidBody bodyB, 481 RigidBody bodyB,
482 ManifoldPoint contactPoint, 482 ManifoldPoint contactPoint,
483 ContactSolverInfo solverInfo) 483 ContactSolverInfo solverInfo)
484 { 484 {
485 return 0; 485 return 0;
486 } 486 }
487 } 487 }
488} 488}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactSolverInfo.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactSolverInfo.cs
index c1763df..d3424f6 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactSolverInfo.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/ContactSolverInfo.cs
@@ -1,62 +1,62 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.Dynamics 26namespace XnaDevRu.BulletX.Dynamics
27{ 27{
28 public class ContactSolverInfo 28 public class ContactSolverInfo
29 { 29 {
30 private float _tau; 30 private float _tau;
31 private float _damping; 31 private float _damping;
32 private float _friction; 32 private float _friction;
33 private float _timeStep; 33 private float _timeStep;
34 private float _restitution; 34 private float _restitution;
35 private int _numIterations; 35 private int _numIterations;
36 private float _maxErrorReduction; 36 private float _maxErrorReduction;
37 private float _sor; 37 private float _sor;
38 private float _erp; 38 private float _erp;
39 39
40 public ContactSolverInfo() 40 public ContactSolverInfo()
41 { 41 {
42 _tau = 0.6f; 42 _tau = 0.6f;
43 _damping = 1.0f; 43 _damping = 1.0f;
44 _friction = 0.3f; 44 _friction = 0.3f;
45 _restitution = 0f; 45 _restitution = 0f;
46 _maxErrorReduction = 20f; 46 _maxErrorReduction = 20f;
47 _numIterations = 10; 47 _numIterations = 10;
48 _erp = 0.4f; 48 _erp = 0.4f;
49 _sor = 1.3f; 49 _sor = 1.3f;
50 } 50 }
51 51
52 public float Tau { get { return _tau; } set { _tau = value; } } 52 public float Tau { get { return _tau; } set { _tau = value; } }
53 public float Damping { get { return _damping; } set { _damping = value; } } 53 public float Damping { get { return _damping; } set { _damping = value; } }
54 public float Friction { get { return _friction; } set { _friction = value; } } 54 public float Friction { get { return _friction; } set { _friction = value; } }
55 public float TimeStep { get { return _timeStep; } set { _timeStep = value; } } 55 public float TimeStep { get { return _timeStep; } set { _timeStep = value; } }
56 public float Restitution { get { return _restitution; } set { _restitution = value; } } 56 public float Restitution { get { return _restitution; } set { _restitution = value; } }
57 public int IterationsCount { get { return _numIterations; } set { _numIterations = value; } } 57 public int IterationsCount { get { return _numIterations; } set { _numIterations = value; } }
58 public float MaxErrorReduction { get { return _maxErrorReduction; } set { _maxErrorReduction = value; } } 58 public float MaxErrorReduction { get { return _maxErrorReduction; } set { _maxErrorReduction = value; } }
59 public float Sor { get { return _sor; } set { _sor = value; } } 59 public float Sor { get { return _sor; } set { _sor = value; } }
60 public float Erp { get { return _erp; } set { _erp = value; } } 60 public float Erp { get { return _erp; } set { _erp = value; } }
61 } 61 }
62} 62}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Generic6DofConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Generic6DofConstraint.cs
index 479c863..f1e0b1e 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Generic6DofConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Generic6DofConstraint.cs
@@ -1,440 +1,440 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// Generic6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space 30 /// Generic6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
31 /// Generic6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked' 31 /// Generic6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked'
32 /// Work in progress (is still a Hinge actually) 32 /// Work in progress (is still a Hinge actually)
33 /// </summary> 33 /// </summary>
34 public class Generic6DofConstraint : TypedConstraint 34 public class Generic6DofConstraint : TypedConstraint
35 { 35 {
36 private static readonly float[] _sign = { 1.0f, -1.0f, 1.0f }; 36 private static readonly float[] _sign = { 1.0f, -1.0f, 1.0f };
37 private static readonly int[] _axisA = { 1, 0, 0 }; 37 private static readonly int[] _axisA = { 1, 0, 0 };
38 private static readonly int[] _axisB = { 2, 2, 1 }; 38 private static readonly int[] _axisB = { 2, 2, 1 };
39 39
40 private JacobianEntry[] _jacLinear = new JacobianEntry[3]; // 3 orthogonal linear constraints 40 private JacobianEntry[] _jacLinear = new JacobianEntry[3]; // 3 orthogonal linear constraints
41 private JacobianEntry[] _jacAng = new JacobianEntry[3]; // 3 orthogonal angular constraints 41 private JacobianEntry[] _jacAng = new JacobianEntry[3]; // 3 orthogonal angular constraints
42 42
43 private Matrix _frameInA; // the constraint space w.r.t body A 43 private Matrix _frameInA; // the constraint space w.r.t body A
44 private Matrix _frameInB; // the constraint space w.r.t body B 44 private Matrix _frameInB; // the constraint space w.r.t body B
45 45
46 private float[] _lowerLimit = new float[6]; // the constraint lower limits 46 private float[] _lowerLimit = new float[6]; // the constraint lower limits
47 private float[] _upperLimit = new float[6]; // the constraint upper limits 47 private float[] _upperLimit = new float[6]; // the constraint upper limits
48 48
49 private float[] _accumulatedImpulse = new float[6]; 49 private float[] _accumulatedImpulse = new float[6];
50 50
51 public Generic6DofConstraint(RigidBody rbA, RigidBody rbB, Matrix frameInA, Matrix frameInB) 51 public Generic6DofConstraint(RigidBody rbA, RigidBody rbB, Matrix frameInA, Matrix frameInB)
52 : base(rbA, rbB) 52 : base(rbA, rbB)
53 { 53 {
54 _frameInA = frameInA; 54 _frameInA = frameInA;
55 _frameInB = frameInB; 55 _frameInB = frameInB;
56 //free means upper < lower, 56 //free means upper < lower,
57 //locked means upper == lower 57 //locked means upper == lower
58 //limited means upper > lower 58 //limited means upper > lower
59 //so start all locked 59 //so start all locked
60 for (int i = 0; i < 6; ++i) 60 for (int i = 0; i < 6; ++i)
61 { 61 {
62 _lowerLimit[i] = 0.0f; 62 _lowerLimit[i] = 0.0f;
63 _upperLimit[i] = 0.0f; 63 _upperLimit[i] = 0.0f;
64 _accumulatedImpulse[i] = 0.0f; 64 _accumulatedImpulse[i] = 0.0f;
65 } 65 }
66 } 66 }
67 67
68 public Generic6DofConstraint() { } 68 public Generic6DofConstraint() { }
69 69
70 public void UpdateRHS(float timeStep) { } 70 public void UpdateRHS(float timeStep) { }
71 71
72 public float ComputeAngle(int axis) 72 public float ComputeAngle(int axis)
73 { 73 {
74 float angle = 0; 74 float angle = 0;
75 75
76 switch (axis) 76 switch (axis)
77 { 77 {
78 case 0: 78 case 0:
79 { 79 {
80 Vector3 v1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 1), RigidBodyA.CenterOfMassTransform); 80 Vector3 v1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 1), RigidBodyA.CenterOfMassTransform);
81 Vector3 v2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 1), RigidBodyB.CenterOfMassTransform); 81 Vector3 v2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 1), RigidBodyB.CenterOfMassTransform);
82 Vector3 w2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 2), RigidBodyB.CenterOfMassTransform); 82 Vector3 w2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 2), RigidBodyB.CenterOfMassTransform);
83 83
84 float s = Vector3.Dot(v1, w2); 84 float s = Vector3.Dot(v1, w2);
85 float c = Vector3.Dot(v1, v2); 85 float c = Vector3.Dot(v1, v2);
86 86
87 angle = (float)Math.Atan2(s, c); 87 angle = (float)Math.Atan2(s, c);
88 break; 88 break;
89 } 89 }
90 case 1: 90 case 1:
91 { 91 {
92 Vector3 w1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 2), RigidBodyA.CenterOfMassTransform); 92 Vector3 w1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 2), RigidBodyA.CenterOfMassTransform);
93 Vector3 w2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 2), RigidBodyB.CenterOfMassTransform); 93 Vector3 w2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 2), RigidBodyB.CenterOfMassTransform);
94 Vector3 u2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 0), RigidBodyB.CenterOfMassTransform); 94 Vector3 u2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 0), RigidBodyB.CenterOfMassTransform);
95 95
96 float s = Vector3.Dot(w1, u2); 96 float s = Vector3.Dot(w1, u2);
97 float c = Vector3.Dot(w1, w2); 97 float c = Vector3.Dot(w1, w2);
98 98
99 angle = (float)Math.Atan2(s, c); 99 angle = (float)Math.Atan2(s, c);
100 break; 100 break;
101 } 101 }
102 case 2: 102 case 2:
103 { 103 {
104 Vector3 u1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 0), RigidBodyA.CenterOfMassTransform); 104 Vector3 u1 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, 0), RigidBodyA.CenterOfMassTransform);
105 Vector3 u2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 0), RigidBodyB.CenterOfMassTransform); 105 Vector3 u2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 0), RigidBodyB.CenterOfMassTransform);
106 Vector3 v2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 1), RigidBodyB.CenterOfMassTransform); 106 Vector3 v2 = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, 1), RigidBodyB.CenterOfMassTransform);
107 107
108 float s = Vector3.Dot(u1, v2); 108 float s = Vector3.Dot(u1, v2);
109 float c = Vector3.Dot(u1, u2); 109 float c = Vector3.Dot(u1, u2);
110 110
111 angle = (float)Math.Atan2(s, c); 111 angle = (float)Math.Atan2(s, c);
112 break; 112 break;
113 } 113 }
114 default: BulletDebug.Assert(false); break; 114 default: BulletDebug.Assert(false); break;
115 } 115 }
116 116
117 return angle; 117 return angle;
118 } 118 }
119 119
120 public void SetLinearLowerLimit(Vector3 linearLower) 120 public void SetLinearLowerLimit(Vector3 linearLower)
121 { 121 {
122 _lowerLimit[0] = linearLower.X; 122 _lowerLimit[0] = linearLower.X;
123 _lowerLimit[1] = linearLower.Y; 123 _lowerLimit[1] = linearLower.Y;
124 _lowerLimit[2] = linearLower.Z; 124 _lowerLimit[2] = linearLower.Z;
125 } 125 }
126 126
127 public void SetLinearUpperLimit(Vector3 linearUpper) 127 public void SetLinearUpperLimit(Vector3 linearUpper)
128 { 128 {
129 _upperLimit[0] = linearUpper.X; 129 _upperLimit[0] = linearUpper.X;
130 _upperLimit[1] = linearUpper.Y; 130 _upperLimit[1] = linearUpper.Y;
131 _upperLimit[2] = linearUpper.Z; 131 _upperLimit[2] = linearUpper.Z;
132 } 132 }
133 133
134 public void SetAngularLowerLimit(Vector3 angularLower) 134 public void SetAngularLowerLimit(Vector3 angularLower)
135 { 135 {
136 _lowerLimit[3] = angularLower.X; 136 _lowerLimit[3] = angularLower.X;
137 _lowerLimit[4] = angularLower.Y; 137 _lowerLimit[4] = angularLower.Y;
138 _lowerLimit[5] = angularLower.Z; 138 _lowerLimit[5] = angularLower.Z;
139 } 139 }
140 140
141 public void SetAngularUpperLimit(Vector3 angularUpper) 141 public void SetAngularUpperLimit(Vector3 angularUpper)
142 { 142 {
143 _upperLimit[3] = angularUpper.X; 143 _upperLimit[3] = angularUpper.X;
144 _upperLimit[4] = angularUpper.Y; 144 _upperLimit[4] = angularUpper.Y;
145 _upperLimit[5] = angularUpper.Z; 145 _upperLimit[5] = angularUpper.Z;
146 } 146 }
147 147
148 //first 3 are linear, next 3 are angular 148 //first 3 are linear, next 3 are angular
149 public void SetLimit(int axis, float lo, float hi) 149 public void SetLimit(int axis, float lo, float hi)
150 { 150 {
151 _lowerLimit[axis] = lo; 151 _lowerLimit[axis] = lo;
152 _upperLimit[axis] = hi; 152 _upperLimit[axis] = hi;
153 } 153 }
154 154
155 //free means upper < lower, 155 //free means upper < lower,
156 //locked means upper == lower 156 //locked means upper == lower
157 //limited means upper > lower 157 //limited means upper > lower
158 //limitIndex: first 3 are linear, next 3 are angular 158 //limitIndex: first 3 are linear, next 3 are angular
159 public bool IsLimited(int limitIndex) 159 public bool IsLimited(int limitIndex)
160 { 160 {
161 return (_upperLimit[limitIndex] >= _lowerLimit[limitIndex]); 161 return (_upperLimit[limitIndex] >= _lowerLimit[limitIndex]);
162 } 162 }
163 163
164 public override void BuildJacobian() 164 public override void BuildJacobian()
165 { 165 {
166 Vector3 localNormalInA = new Vector3(0, 0, 0); 166 Vector3 localNormalInA = new Vector3(0, 0, 0);
167 167
168 Vector3 pivotInA = _frameInA.Translation; 168 Vector3 pivotInA = _frameInA.Translation;
169 Vector3 pivotInB = _frameInB.Translation; 169 Vector3 pivotInB = _frameInB.Translation;
170 170
171 Vector3 pivotAInW = MathHelper.Transform(_frameInA.Translation, RigidBodyA.CenterOfMassTransform); 171 Vector3 pivotAInW = MathHelper.Transform(_frameInA.Translation, RigidBodyA.CenterOfMassTransform);
172 Vector3 pivotBInW = MathHelper.Transform(_frameInB.Translation, RigidBodyB.CenterOfMassTransform); 172 Vector3 pivotBInW = MathHelper.Transform(_frameInB.Translation, RigidBodyB.CenterOfMassTransform);
173 173
174 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition; 174 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition;
175 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition; 175 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition;
176 176
177 //linear part 177 //linear part
178 for (int i = 0; i < 3; i++) 178 for (int i = 0; i < 3; i++)
179 { 179 {
180 if (IsLimited(i)) 180 if (IsLimited(i))
181 { 181 {
182 if (i == 0) 182 if (i == 0)
183 localNormalInA = new Vector3(1, 0, 0); 183 localNormalInA = new Vector3(1, 0, 0);
184 else if (i == 1) 184 else if (i == 1)
185 localNormalInA = new Vector3(0, 1, 0); 185 localNormalInA = new Vector3(0, 1, 0);
186 else 186 else
187 localNormalInA = new Vector3(0, 0, 1); 187 localNormalInA = new Vector3(0, 0, 1);
188 188
189 Vector3 normalWorld = MathHelper.TransformNormal(localNormalInA, RigidBodyA.CenterOfMassTransform); 189 Vector3 normalWorld = MathHelper.TransformNormal(localNormalInA, RigidBodyA.CenterOfMassTransform);
190 190
191 // Create linear atom 191 // Create linear atom
192 _jacLinear[i] = new JacobianEntry( 192 _jacLinear[i] = new JacobianEntry(
193 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 193 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
194 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 194 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
195 MathHelper.Transform(pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition, 195 MathHelper.Transform(pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition,
196 MathHelper.Transform(pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition, 196 MathHelper.Transform(pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition,
197 normalWorld, 197 normalWorld,
198 RigidBodyA.InvInertiaDiagLocal, 198 RigidBodyA.InvInertiaDiagLocal,
199 RigidBodyA.InverseMass, 199 RigidBodyA.InverseMass,
200 RigidBodyB.InvInertiaDiagLocal, 200 RigidBodyB.InvInertiaDiagLocal,
201 RigidBodyB.InverseMass); 201 RigidBodyB.InverseMass);
202 202
203 //optionally disable warmstarting 203 //optionally disable warmstarting
204 _accumulatedImpulse[i] = 0f; 204 _accumulatedImpulse[i] = 0f;
205 205
206 // Apply accumulated impulse 206 // Apply accumulated impulse
207 Vector3 impulse_vector = _accumulatedImpulse[i] * normalWorld; 207 Vector3 impulse_vector = _accumulatedImpulse[i] * normalWorld;
208 208
209 RigidBodyA.ApplyImpulse(impulse_vector, rel_pos1); 209 RigidBodyA.ApplyImpulse(impulse_vector, rel_pos1);
210 RigidBodyB.ApplyImpulse(-impulse_vector, rel_pos2); 210 RigidBodyB.ApplyImpulse(-impulse_vector, rel_pos2);
211 } 211 }
212 } 212 }
213 213
214 // angular part 214 // angular part
215 for (int i = 0; i < 3; i++) 215 for (int i = 0; i < 3; i++)
216 { 216 {
217 if (IsLimited(i + 3)) 217 if (IsLimited(i + 3))
218 { 218 {
219 Vector3 axisA = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, _axisA[i] + 1), RigidBodyA.CenterOfMassTransform); 219 Vector3 axisA = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, _axisA[i] + 1), RigidBodyA.CenterOfMassTransform);
220 Vector3 axisB = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, _axisB[i] + 1), RigidBodyB.CenterOfMassTransform); 220 Vector3 axisB = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, _axisB[i] + 1), RigidBodyB.CenterOfMassTransform);
221 221
222 Vector3 axis = _sign[i] * Vector3.Cross(axisA, axisB); 222 Vector3 axis = _sign[i] * Vector3.Cross(axisA, axisB);
223 223
224 // Create angular atom 224 // Create angular atom
225 _jacAng[i] = new JacobianEntry(axis, 225 _jacAng[i] = new JacobianEntry(axis,
226 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 226 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
227 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 227 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
228 RigidBodyA.InvInertiaDiagLocal, 228 RigidBodyA.InvInertiaDiagLocal,
229 RigidBodyB.InvInertiaDiagLocal); 229 RigidBodyB.InvInertiaDiagLocal);
230 230
231 _accumulatedImpulse[i + 3] = 0f; 231 _accumulatedImpulse[i + 3] = 0f;
232 232
233 // Apply accumulated impulse 233 // Apply accumulated impulse
234 Vector3 impulse_vector = _accumulatedImpulse[i + 3] * axis; 234 Vector3 impulse_vector = _accumulatedImpulse[i + 3] * axis;
235 235
236 RigidBodyA.ApplyTorqueImpulse(impulse_vector); 236 RigidBodyA.ApplyTorqueImpulse(impulse_vector);
237 RigidBodyB.ApplyTorqueImpulse(-impulse_vector); 237 RigidBodyB.ApplyTorqueImpulse(-impulse_vector);
238 } 238 }
239 } 239 }
240 } 240 }
241 241
242 public override void SolveConstraint(float timeStep) 242 public override void SolveConstraint(float timeStep)
243 { 243 {
244 float tau = 0.1f; 244 float tau = 0.1f;
245 float damping = 1.0f; 245 float damping = 1.0f;
246 246
247 Vector3 pivotAInW = MathHelper.Transform(_frameInA.Translation, RigidBodyA.CenterOfMassTransform); 247 Vector3 pivotAInW = MathHelper.Transform(_frameInA.Translation, RigidBodyA.CenterOfMassTransform);
248 Vector3 pivotBInW = MathHelper.Transform(_frameInB.Translation, RigidBodyB.CenterOfMassTransform); 248 Vector3 pivotBInW = MathHelper.Transform(_frameInB.Translation, RigidBodyB.CenterOfMassTransform);
249 249
250 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition; 250 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition;
251 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition; 251 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition;
252 252
253 Vector3 localNormalInA = new Vector3(); 253 Vector3 localNormalInA = new Vector3();
254 254
255 // linear 255 // linear
256 for (int i = 0; i < 3; i++) 256 for (int i = 0; i < 3; i++)
257 { 257 {
258 if (IsLimited(i)) 258 if (IsLimited(i))
259 { 259 {
260 Vector3 angvelA = MathHelper.TransformNormal(RigidBodyA.AngularVelocity, MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform)); 260 Vector3 angvelA = MathHelper.TransformNormal(RigidBodyA.AngularVelocity, MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform));
261 Vector3 angvelB = MathHelper.TransformNormal(RigidBodyB.AngularVelocity, MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform)); 261 Vector3 angvelB = MathHelper.TransformNormal(RigidBodyB.AngularVelocity, MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform));
262 262
263 if (i == 0) 263 if (i == 0)
264 localNormalInA = new Vector3(1, 0, 0); 264 localNormalInA = new Vector3(1, 0, 0);
265 else if (i == 1) 265 else if (i == 1)
266 localNormalInA = new Vector3(0, 1, 0); 266 localNormalInA = new Vector3(0, 1, 0);
267 else 267 else
268 localNormalInA = new Vector3(0, 0, 1); 268 localNormalInA = new Vector3(0, 0, 1);
269 269
270 Vector3 normalWorld = MathHelper.TransformNormal(localNormalInA, RigidBodyA.CenterOfMassTransform); 270 Vector3 normalWorld = MathHelper.TransformNormal(localNormalInA, RigidBodyA.CenterOfMassTransform);
271 271
272 float jacDiagABInv = 1f / _jacLinear[i].Diagonal; 272 float jacDiagABInv = 1f / _jacLinear[i].Diagonal;
273 273
274 //velocity error (first order error) 274 //velocity error (first order error)
275 float rel_vel = _jacLinear[i].GetRelativeVelocity(RigidBodyA.LinearVelocity, angvelA, 275 float rel_vel = _jacLinear[i].GetRelativeVelocity(RigidBodyA.LinearVelocity, angvelA,
276 RigidBodyB.LinearVelocity, angvelB); 276 RigidBodyB.LinearVelocity, angvelB);
277 277
278 //positional error (zeroth order error) 278 //positional error (zeroth order error)
279 float depth = -Vector3.Dot(pivotAInW - pivotBInW, normalWorld); 279 float depth = -Vector3.Dot(pivotAInW - pivotBInW, normalWorld);
280 float lo = -1e30f; 280 float lo = -1e30f;
281 float hi = 1e30f; 281 float hi = 1e30f;
282 282
283 //handle the limits 283 //handle the limits
284 if (_lowerLimit[i] < _upperLimit[i]) 284 if (_lowerLimit[i] < _upperLimit[i])
285 { 285 {
286 if (depth > _upperLimit[i]) 286 if (depth > _upperLimit[i])
287 { 287 {
288 depth -= _upperLimit[i]; 288 depth -= _upperLimit[i];
289 lo = 0f; 289 lo = 0f;
290 } 290 }
291 else 291 else
292 { 292 {
293 if (depth < _lowerLimit[i]) 293 if (depth < _lowerLimit[i])
294 { 294 {
295 depth -= _lowerLimit[i]; 295 depth -= _lowerLimit[i];
296 hi = 0f; 296 hi = 0f;
297 } 297 }
298 else 298 else
299 { 299 {
300 continue; 300 continue;
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 float normalImpulse = (tau * depth / timeStep - damping * rel_vel) * jacDiagABInv; 305 float normalImpulse = (tau * depth / timeStep - damping * rel_vel) * jacDiagABInv;
306 float oldNormalImpulse = _accumulatedImpulse[i]; 306 float oldNormalImpulse = _accumulatedImpulse[i];
307 float sum = oldNormalImpulse + normalImpulse; 307 float sum = oldNormalImpulse + normalImpulse;
308 _accumulatedImpulse[i] = sum > hi ? 0f : sum < lo ? 0f : sum; 308 _accumulatedImpulse[i] = sum > hi ? 0f : sum < lo ? 0f : sum;
309 normalImpulse = _accumulatedImpulse[i] - oldNormalImpulse; 309 normalImpulse = _accumulatedImpulse[i] - oldNormalImpulse;
310 310
311 Vector3 impulse_vector = normalWorld * normalImpulse; 311 Vector3 impulse_vector = normalWorld * normalImpulse;
312 RigidBodyA.ApplyImpulse(impulse_vector, rel_pos1); 312 RigidBodyA.ApplyImpulse(impulse_vector, rel_pos1);
313 RigidBodyB.ApplyImpulse(-impulse_vector, rel_pos2); 313 RigidBodyB.ApplyImpulse(-impulse_vector, rel_pos2);
314 } 314 }
315 } 315 }
316 316
317 Vector3 axis; 317 Vector3 axis;
318 float angle; 318 float angle;
319 Matrix frameAWorld = RigidBodyA.CenterOfMassTransform * _frameInA; 319 Matrix frameAWorld = RigidBodyA.CenterOfMassTransform * _frameInA;
320 Matrix frameBWorld = RigidBodyB.CenterOfMassTransform * _frameInB; 320 Matrix frameBWorld = RigidBodyB.CenterOfMassTransform * _frameInB;
321 321
322 TransformUtil.CalculateDiffAxisAngle(frameAWorld, frameBWorld, out axis, out angle); 322 TransformUtil.CalculateDiffAxisAngle(frameAWorld, frameBWorld, out axis, out angle);
323 Quaternion diff = new Quaternion(axis, angle); 323 Quaternion diff = new Quaternion(axis, angle);
324 Matrix diffMat = Matrix.CreateFromQuaternion(diff); 324 Matrix diffMat = Matrix.CreateFromQuaternion(diff);
325 Vector3 xyz; 325 Vector3 xyz;
326 // this is not perfect, we can first check which axis are limited, and choose a more appropriate order 326 // this is not perfect, we can first check which axis are limited, and choose a more appropriate order
327 MatrixToEulerXYZ(diffMat, out xyz); 327 MatrixToEulerXYZ(diffMat, out xyz);
328 328
329 // angular 329 // angular
330 for (int i = 0; i < 3; i++) 330 for (int i = 0; i < 3; i++)
331 { 331 {
332 if (IsLimited(i + 3)) 332 if (IsLimited(i + 3))
333 { 333 {
334 Vector3 angvelA = MathHelper.TransformNormal(RigidBodyA.AngularVelocity, MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform)); 334 Vector3 angvelA = MathHelper.TransformNormal(RigidBodyA.AngularVelocity, MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform));
335 Vector3 angvelB = MathHelper.TransformNormal(RigidBodyB.AngularVelocity, MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform)); 335 Vector3 angvelB = MathHelper.TransformNormal(RigidBodyB.AngularVelocity, MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform));
336 336
337 float jacDiagABInv = 1f / _jacAng[i].Diagonal; 337 float jacDiagABInv = 1f / _jacAng[i].Diagonal;
338 338
339 //velocity error (first order error) 339 //velocity error (first order error)
340 float rel_vel = _jacAng[i].GetRelativeVelocity(RigidBodyA.LinearVelocity, angvelA, 340 float rel_vel = _jacAng[i].GetRelativeVelocity(RigidBodyA.LinearVelocity, angvelA,
341 RigidBodyB.LinearVelocity, angvelB); 341 RigidBodyB.LinearVelocity, angvelB);
342 342
343 //positional error (zeroth order error) 343 //positional error (zeroth order error)
344 Vector3 axisA = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, _axisA[i] + 1), RigidBodyA.CenterOfMassTransform); 344 Vector3 axisA = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInA, _axisA[i] + 1), RigidBodyA.CenterOfMassTransform);
345 Vector3 axisB = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, _axisB[i] + 1), RigidBodyB.CenterOfMassTransform); 345 Vector3 axisB = MathHelper.TransformNormal(MathHelper.GetColumn(_frameInB, _axisB[i] + 1), RigidBodyB.CenterOfMassTransform);
346 346
347 float rel_pos = _sign[i] * Vector3.Dot(axisA, axisB); 347 float rel_pos = _sign[i] * Vector3.Dot(axisA, axisB);
348 348
349 float lo = -1e30f; 349 float lo = -1e30f;
350 float hi = 1e30f; 350 float hi = 1e30f;
351 351
352 //handle the twist limit 352 //handle the twist limit
353 if (_lowerLimit[i + 3] < _upperLimit[i + 3]) 353 if (_lowerLimit[i + 3] < _upperLimit[i + 3])
354 { 354 {
355 //clamp the values 355 //clamp the values
356 float loLimit = _upperLimit[i + 3] > -3.1415 ? _lowerLimit[i + 3] : -1e30f; 356 float loLimit = _upperLimit[i + 3] > -3.1415 ? _lowerLimit[i + 3] : -1e30f;
357 float hiLimit = _upperLimit[i + 3] < 3.1415 ? _upperLimit[i + 3] : 1e30f; 357 float hiLimit = _upperLimit[i + 3] < 3.1415 ? _upperLimit[i + 3] : 1e30f;
358 358
359 float projAngle; 359 float projAngle;
360 360
361 if (i == 0) 361 if (i == 0)
362 projAngle = -2f * xyz.Z; 362 projAngle = -2f * xyz.Z;
363 else if (i == 1) 363 else if (i == 1)
364 projAngle = -2f * xyz.Y; 364 projAngle = -2f * xyz.Y;
365 else 365 else
366 projAngle = -2f * xyz.Z; 366 projAngle = -2f * xyz.Z;
367 367
368 if (projAngle < loLimit) 368 if (projAngle < loLimit)
369 { 369 {
370 hi = 0f; 370 hi = 0f;
371 rel_pos = loLimit - projAngle; 371 rel_pos = loLimit - projAngle;
372 } 372 }
373 else 373 else
374 { 374 {
375 if (projAngle > hiLimit) 375 if (projAngle > hiLimit)
376 { 376 {
377 lo = 0f; 377 lo = 0f;
378 rel_pos = (hiLimit - projAngle); 378 rel_pos = (hiLimit - projAngle);
379 } 379 }
380 else 380 else
381 { 381 {
382 continue; 382 continue;
383 } 383 }
384 } 384 }
385 } 385 }
386 386
387 //impulse 387 //impulse
388 388
389 float normalImpulse = -(tau * rel_pos / timeStep + damping * rel_vel) * jacDiagABInv; 389 float normalImpulse = -(tau * rel_pos / timeStep + damping * rel_vel) * jacDiagABInv;
390 float oldNormalImpulse = _accumulatedImpulse[i + 3]; 390 float oldNormalImpulse = _accumulatedImpulse[i + 3];
391 float sum = oldNormalImpulse + normalImpulse; 391 float sum = oldNormalImpulse + normalImpulse;
392 _accumulatedImpulse[i + 3] = sum > hi ? 0f : sum < lo ? 0f : sum; 392 _accumulatedImpulse[i + 3] = sum > hi ? 0f : sum < lo ? 0f : sum;
393 normalImpulse = _accumulatedImpulse[i + 3] - oldNormalImpulse; 393 normalImpulse = _accumulatedImpulse[i + 3] - oldNormalImpulse;
394 394
395 Vector3 axis2 = _sign[i] * Vector3.Cross(axisA, axisB); 395 Vector3 axis2 = _sign[i] * Vector3.Cross(axisA, axisB);
396 Vector3 impulse_vector = axis2 * normalImpulse; 396 Vector3 impulse_vector = axis2 * normalImpulse;
397 397
398 RigidBodyA.ApplyTorqueImpulse(impulse_vector); 398 RigidBodyA.ApplyTorqueImpulse(impulse_vector);
399 RigidBodyB.ApplyTorqueImpulse(-impulse_vector); 399 RigidBodyB.ApplyTorqueImpulse(-impulse_vector);
400 } 400 }
401 } 401 }
402 } 402 }
403 403
404 //MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html 404 //MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html
405 private bool MatrixToEulerXYZ(Matrix mat, out Vector3 xyz) 405 private bool MatrixToEulerXYZ(Matrix mat, out Vector3 xyz)
406 { 406 {
407 // rot = cy*cz -cy*sz sy 407 // rot = cy*cz -cy*sz sy
408 // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx 408 // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
409 // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy 409 // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
410 xyz = new Vector3(); 410 xyz = new Vector3();
411 411
412 if (MathHelper.GetElement(mat, 2) < 1.0f) 412 if (MathHelper.GetElement(mat, 2) < 1.0f)
413 { 413 {
414 if (MathHelper.GetElement(mat, 2) > -1.0f) 414 if (MathHelper.GetElement(mat, 2) > -1.0f)
415 { 415 {
416 xyz.X = (float)Math.Atan2(-MathHelper.GetElement(mat, 5), MathHelper.GetElement(mat, 8)); 416 xyz.X = (float)Math.Atan2(-MathHelper.GetElement(mat, 5), MathHelper.GetElement(mat, 8));
417 xyz.Y = (float)Math.Asin(MathHelper.GetElement(mat, 2)); 417 xyz.Y = (float)Math.Asin(MathHelper.GetElement(mat, 2));
418 xyz.Z = (float)Math.Atan2(-MathHelper.GetElement(mat, 1), MathHelper.GetElement(mat, 0)); 418 xyz.Z = (float)Math.Atan2(-MathHelper.GetElement(mat, 1), MathHelper.GetElement(mat, 0));
419 return true; 419 return true;
420 } 420 }
421 else 421 else
422 { 422 {
423 // WARNING. Not unique. XA - ZA = -atan2(r10,r11) 423 // WARNING. Not unique. XA - ZA = -atan2(r10,r11)
424 xyz.X = -(float)Math.Atan2(MathHelper.GetElement(mat, 3), MathHelper.GetElement(mat, 4)); 424 xyz.X = -(float)Math.Atan2(MathHelper.GetElement(mat, 3), MathHelper.GetElement(mat, 4));
425 xyz.Y = -(float)Math.PI / 2; 425 xyz.Y = -(float)Math.PI / 2;
426 xyz.Z = 0.0f; 426 xyz.Z = 0.0f;
427 return false; 427 return false;
428 } 428 }
429 } 429 }
430 else 430 else
431 { 431 {
432 // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) 432 // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11)
433 xyz.X = (float)Math.Atan2(MathHelper.GetElement(mat, 3), MathHelper.GetElement(mat, 4)); 433 xyz.X = (float)Math.Atan2(MathHelper.GetElement(mat, 3), MathHelper.GetElement(mat, 4));
434 xyz.Y = (float)Math.PI / 2; 434 xyz.Y = (float)Math.PI / 2;
435 xyz.Z = 0.0f; 435 xyz.Z = 0.0f;
436 return false; 436 return false;
437 } 437 }
438 } 438 }
439 } 439 }
440} 440}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/HingeConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/HingeConstraint.cs
index 3e35550..02bcf8a 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/HingeConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/HingeConstraint.cs
@@ -1,246 +1,246 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space 30 /// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
31 /// axis defines the orientation of the hinge axis 31 /// axis defines the orientation of the hinge axis
32 /// </summary> 32 /// </summary>
33 public class HingeConstraint : TypedConstraint 33 public class HingeConstraint : TypedConstraint
34 { 34 {
35 private JacobianEntry[] _jac = new JacobianEntry[3]; //3 orthogonal linear constraints 35 private JacobianEntry[] _jac = new JacobianEntry[3]; //3 orthogonal linear constraints
36 private JacobianEntry[] _jacAng = new JacobianEntry[3]; //2 orthogonal angular constraints + 1 for limit/motor 36 private JacobianEntry[] _jacAng = new JacobianEntry[3]; //2 orthogonal angular constraints + 1 for limit/motor
37 37
38 private Vector3 _pivotInA; 38 private Vector3 _pivotInA;
39 private Vector3 _pivotInB; 39 private Vector3 _pivotInB;
40 private Vector3 _axisInA; 40 private Vector3 _axisInA;
41 private Vector3 _axisInB; 41 private Vector3 _axisInB;
42 42
43 private bool _angularOnly; 43 private bool _angularOnly;
44 44
45 private float _motorTargetVelocity; 45 private float _motorTargetVelocity;
46 private float _maxMotorImpulse; 46 private float _maxMotorImpulse;
47 private bool _enableAngularMotor; 47 private bool _enableAngularMotor;
48 48
49 public HingeConstraint(RigidBody rbA, RigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB) 49 public HingeConstraint(RigidBody rbA, RigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB)
50 : base(rbA, rbB) 50 : base(rbA, rbB)
51 { 51 {
52 _pivotInA = pivotInA; 52 _pivotInA = pivotInA;
53 _pivotInB = pivotInB; 53 _pivotInB = pivotInB;
54 _axisInA = axisInA; 54 _axisInA = axisInA;
55 _axisInB = -axisInB; 55 _axisInB = -axisInB;
56 _angularOnly = false; 56 _angularOnly = false;
57 } 57 }
58 58
59 public HingeConstraint(RigidBody rbA, Vector3 pivotInA, Vector3 axisInA) 59 public HingeConstraint(RigidBody rbA, Vector3 pivotInA, Vector3 axisInA)
60 : base(rbA) 60 : base(rbA)
61 { 61 {
62 _pivotInA = pivotInA; 62 _pivotInA = pivotInA;
63 _pivotInB = MathHelper.MatrixToVector(rbA.CenterOfMassTransform, pivotInA); 63 _pivotInB = MathHelper.MatrixToVector(rbA.CenterOfMassTransform, pivotInA);
64 _axisInA = axisInA; 64 _axisInA = axisInA;
65 //fixed axis in worldspace 65 //fixed axis in worldspace
66 _axisInB = MathHelper.TransformNormal(-axisInA, rbA.CenterOfMassTransform); 66 _axisInB = MathHelper.TransformNormal(-axisInA, rbA.CenterOfMassTransform);
67 _angularOnly = false; 67 _angularOnly = false;
68 } 68 }
69 69
70 public HingeConstraint() { } 70 public HingeConstraint() { }
71 71
72 public bool AngularOnly { set { _angularOnly = value; } } 72 public bool AngularOnly { set { _angularOnly = value; } }
73 73
74 public override void BuildJacobian() 74 public override void BuildJacobian()
75 { 75 {
76 AppliedImpulse = 0f; 76 AppliedImpulse = 0f;
77 77
78 Vector3 normal = new Vector3(); 78 Vector3 normal = new Vector3();
79 79
80 if (!_angularOnly) 80 if (!_angularOnly)
81 { 81 {
82 for (int i = 0; i < 3; i++) 82 for (int i = 0; i < 3; i++)
83 { 83 {
84 MathHelper.SetElement(ref normal, i, 1); 84 MathHelper.SetElement(ref normal, i, 1);
85 _jac[i] = new JacobianEntry( 85 _jac[i] = new JacobianEntry(
86 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 86 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
87 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 87 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
88 MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition, 88 MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition,
89 MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition, 89 MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition,
90 normal, 90 normal,
91 RigidBodyA.InvInertiaDiagLocal, 91 RigidBodyA.InvInertiaDiagLocal,
92 RigidBodyA.InverseMass, 92 RigidBodyA.InverseMass,
93 RigidBodyB.InvInertiaDiagLocal, 93 RigidBodyB.InvInertiaDiagLocal,
94 RigidBodyB.InverseMass); 94 RigidBodyB.InverseMass);
95 MathHelper.SetElement(ref normal, i, 0); 95 MathHelper.SetElement(ref normal, i, 0);
96 } 96 }
97 } 97 }
98 98
99 //calculate two perpendicular jointAxis, orthogonal to hingeAxis 99 //calculate two perpendicular jointAxis, orthogonal to hingeAxis
100 //these two jointAxis require equal angular velocities for both bodies 100 //these two jointAxis require equal angular velocities for both bodies
101 //this is unused for now, it's a todo 101 //this is unused for now, it's a todo
102 Vector3 jointAxisALocal = new Vector3(); 102 Vector3 jointAxisALocal = new Vector3();
103 Vector3 jointAxisBLocal = new Vector3(); 103 Vector3 jointAxisBLocal = new Vector3();
104 MathHelper.PlaneSpace1(_axisInA, ref jointAxisALocal, ref jointAxisBLocal); 104 MathHelper.PlaneSpace1(_axisInA, ref jointAxisALocal, ref jointAxisBLocal);
105 105
106 Vector3 jointAxisA = MathHelper.TransformNormal(jointAxisALocal, RigidBodyA.CenterOfMassTransform); 106 Vector3 jointAxisA = MathHelper.TransformNormal(jointAxisALocal, RigidBodyA.CenterOfMassTransform);
107 Vector3 jointAxisB = MathHelper.TransformNormal(jointAxisBLocal, RigidBodyA.CenterOfMassTransform); 107 Vector3 jointAxisB = MathHelper.TransformNormal(jointAxisBLocal, RigidBodyA.CenterOfMassTransform);
108 Vector3 hingeAxisWorld = MathHelper.TransformNormal(_axisInA, RigidBodyA.CenterOfMassTransform); 108 Vector3 hingeAxisWorld = MathHelper.TransformNormal(_axisInA, RigidBodyA.CenterOfMassTransform);
109 109
110 _jacAng[0] = new JacobianEntry(jointAxisA, 110 _jacAng[0] = new JacobianEntry(jointAxisA,
111 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 111 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
112 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 112 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
113 RigidBodyA.InvInertiaDiagLocal, 113 RigidBodyA.InvInertiaDiagLocal,
114 RigidBodyB.InvInertiaDiagLocal); 114 RigidBodyB.InvInertiaDiagLocal);
115 115
116 _jacAng[1] = new JacobianEntry(jointAxisB, 116 _jacAng[1] = new JacobianEntry(jointAxisB,
117 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 117 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
118 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 118 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
119 RigidBodyA.InvInertiaDiagLocal, 119 RigidBodyA.InvInertiaDiagLocal,
120 RigidBodyB.InvInertiaDiagLocal); 120 RigidBodyB.InvInertiaDiagLocal);
121 121
122 _jacAng[2] = new JacobianEntry(hingeAxisWorld, 122 _jacAng[2] = new JacobianEntry(hingeAxisWorld,
123 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 123 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
124 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 124 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
125 RigidBodyA.InvInertiaDiagLocal, 125 RigidBodyA.InvInertiaDiagLocal,
126 RigidBodyB.InvInertiaDiagLocal); 126 RigidBodyB.InvInertiaDiagLocal);
127 } 127 }
128 128
129 public override void SolveConstraint(float timeStep) 129 public override void SolveConstraint(float timeStep)
130 { 130 {
131 Vector3 pivotAInW = MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform); 131 Vector3 pivotAInW = MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform);
132 Vector3 pivotBInW = MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform); 132 Vector3 pivotBInW = MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform);
133 133
134 Vector3 normal = new Vector3(0, 0, 0); 134 Vector3 normal = new Vector3(0, 0, 0);
135 float tau = 0.3f; 135 float tau = 0.3f;
136 float damping = 1f; 136 float damping = 1f;
137 137
138 //linear part 138 //linear part
139 if (!_angularOnly) 139 if (!_angularOnly)
140 { 140 {
141 for (int i = 0; i < 3; i++) 141 for (int i = 0; i < 3; i++)
142 { 142 {
143 if (i == 0) 143 if (i == 0)
144 normal = new Vector3(1, 0, 0); 144 normal = new Vector3(1, 0, 0);
145 else if (i == 1) 145 else if (i == 1)
146 normal = new Vector3(0, 1, 0); 146 normal = new Vector3(0, 1, 0);
147 else 147 else
148 normal = new Vector3(0, 0, 1); 148 normal = new Vector3(0, 0, 1);
149 149
150 float jacDiagABInv = 1f / _jac[i].Diagonal; 150 float jacDiagABInv = 1f / _jac[i].Diagonal;
151 151
152 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition; 152 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition;
153 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition; 153 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition;
154 154
155 Vector3 vel1 = RigidBodyA.GetVelocityInLocalPoint(rel_pos1); 155 Vector3 vel1 = RigidBodyA.GetVelocityInLocalPoint(rel_pos1);
156 Vector3 vel2 = RigidBodyB.GetVelocityInLocalPoint(rel_pos2); 156 Vector3 vel2 = RigidBodyB.GetVelocityInLocalPoint(rel_pos2);
157 Vector3 vel = vel1 - vel2; 157 Vector3 vel = vel1 - vel2;
158 float rel_vel; 158 float rel_vel;
159 rel_vel = Vector3.Dot(normal, vel); 159 rel_vel = Vector3.Dot(normal, vel);
160 //positional error (zeroth order error) 160 //positional error (zeroth order error)
161 float depth = -Vector3.Dot(pivotAInW - pivotBInW, normal); //this is the error projected on the normal 161 float depth = -Vector3.Dot(pivotAInW - pivotBInW, normal); //this is the error projected on the normal
162 float impulse = depth * tau / timeStep * jacDiagABInv - damping * rel_vel * jacDiagABInv * damping; 162 float impulse = depth * tau / timeStep * jacDiagABInv - damping * rel_vel * jacDiagABInv * damping;
163 AppliedImpulse += impulse; 163 AppliedImpulse += impulse;
164 Vector3 impulse_vector = normal * impulse; 164 Vector3 impulse_vector = normal * impulse;
165 RigidBodyA.ApplyImpulse(impulse_vector, pivotAInW - RigidBodyA.CenterOfMassPosition); 165 RigidBodyA.ApplyImpulse(impulse_vector, pivotAInW - RigidBodyA.CenterOfMassPosition);
166 RigidBodyB.ApplyImpulse(-impulse_vector, pivotBInW - RigidBodyB.CenterOfMassPosition); 166 RigidBodyB.ApplyImpulse(-impulse_vector, pivotBInW - RigidBodyB.CenterOfMassPosition);
167 } 167 }
168 } 168 }
169 //solve angular part 169 //solve angular part
170 // get axes in world space 170 // get axes in world space
171 Vector3 axisA = MathHelper.TransformNormal(_axisInA, RigidBodyA.CenterOfMassTransform); 171 Vector3 axisA = MathHelper.TransformNormal(_axisInA, RigidBodyA.CenterOfMassTransform);
172 Vector3 axisB = MathHelper.TransformNormal(_axisInB, RigidBodyB.CenterOfMassTransform); 172 Vector3 axisB = MathHelper.TransformNormal(_axisInB, RigidBodyB.CenterOfMassTransform);
173 173
174 Vector3 angVelA = RigidBodyA.AngularVelocity; 174 Vector3 angVelA = RigidBodyA.AngularVelocity;
175 Vector3 angVelB = RigidBodyB.AngularVelocity; 175 Vector3 angVelB = RigidBodyB.AngularVelocity;
176 Vector3 angVelAroundHingeAxisA = axisA * Vector3.Dot(axisA, angVelA); 176 Vector3 angVelAroundHingeAxisA = axisA * Vector3.Dot(axisA, angVelA);
177 Vector3 angVelAroundHingeAxisB = axisB * Vector3.Dot(axisB, angVelB); 177 Vector3 angVelAroundHingeAxisB = axisB * Vector3.Dot(axisB, angVelB);
178 178
179 Vector3 angAOrthog = angVelA - angVelAroundHingeAxisA; 179 Vector3 angAOrthog = angVelA - angVelAroundHingeAxisA;
180 Vector3 angBOrthog = angVelB - angVelAroundHingeAxisB; 180 Vector3 angBOrthog = angVelB - angVelAroundHingeAxisB;
181 Vector3 velrelOrthog = angAOrthog - angBOrthog; 181 Vector3 velrelOrthog = angAOrthog - angBOrthog;
182 182
183 //solve angular velocity correction 183 //solve angular velocity correction
184 float relaxation = 1f; 184 float relaxation = 1f;
185 float len = velrelOrthog.Length(); 185 float len = velrelOrthog.Length();
186 if (len > 0.00001f) 186 if (len > 0.00001f)
187 { 187 {
188 Vector3 normal2 = Vector3.Normalize(velrelOrthog); 188 Vector3 normal2 = Vector3.Normalize(velrelOrthog);
189 float denom = RigidBodyA.ComputeAngularImpulseDenominator(normal2) + 189 float denom = RigidBodyA.ComputeAngularImpulseDenominator(normal2) +
190 RigidBodyB.ComputeAngularImpulseDenominator(normal2); 190 RigidBodyB.ComputeAngularImpulseDenominator(normal2);
191 // scale for mass and relaxation 191 // scale for mass and relaxation
192 velrelOrthog *= (1f / denom) * 0.9f; 192 velrelOrthog *= (1f / denom) * 0.9f;
193 } 193 }
194 194
195 //solve angular positional correction 195 //solve angular positional correction
196 Vector3 angularError = -Vector3.Cross(axisA, axisB) * (1f / timeStep); 196 Vector3 angularError = -Vector3.Cross(axisA, axisB) * (1f / timeStep);
197 float len2 = angularError.Length(); 197 float len2 = angularError.Length();
198 if (len2 > 0.00001f) 198 if (len2 > 0.00001f)
199 { 199 {
200 Vector3 normal2 = Vector3.Normalize(angularError); 200 Vector3 normal2 = Vector3.Normalize(angularError);
201 float denom2 = RigidBodyA.ComputeAngularImpulseDenominator(normal2) + 201 float denom2 = RigidBodyA.ComputeAngularImpulseDenominator(normal2) +
202 RigidBodyB.ComputeAngularImpulseDenominator(normal2); 202 RigidBodyB.ComputeAngularImpulseDenominator(normal2);
203 angularError *= (1f / denom2) * relaxation; 203 angularError *= (1f / denom2) * relaxation;
204 } 204 }
205 205
206 RigidBodyA.ApplyTorqueImpulse(-velrelOrthog + angularError); 206 RigidBodyA.ApplyTorqueImpulse(-velrelOrthog + angularError);
207 RigidBodyB.ApplyTorqueImpulse(velrelOrthog - angularError); 207 RigidBodyB.ApplyTorqueImpulse(velrelOrthog - angularError);
208 208
209 //apply motor 209 //apply motor
210 if (_enableAngularMotor) 210 if (_enableAngularMotor)
211 { 211 {
212 //todo: add limits too 212 //todo: add limits too
213 Vector3 angularLimit = Vector3.Zero; 213 Vector3 angularLimit = Vector3.Zero;
214 214
215 Vector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB; 215 Vector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB;
216 float projRelVel = Vector3.Dot(velrel, axisA); 216 float projRelVel = Vector3.Dot(velrel, axisA);
217 217
218 float desiredMotorVel = _motorTargetVelocity; 218 float desiredMotorVel = _motorTargetVelocity;
219 float motorRelvel = desiredMotorVel - projRelVel; 219 float motorRelvel = desiredMotorVel - projRelVel;
220 220
221 float denom3 = RigidBodyA.ComputeAngularImpulseDenominator(axisA) + 221 float denom3 = RigidBodyA.ComputeAngularImpulseDenominator(axisA) +
222 RigidBodyB.ComputeAngularImpulseDenominator(axisA); 222 RigidBodyB.ComputeAngularImpulseDenominator(axisA);
223 223
224 float unclippedMotorImpulse = (1f / denom3) * motorRelvel; 224 float unclippedMotorImpulse = (1f / denom3) * motorRelvel;
225 //todo: should clip against accumulated impulse 225 //todo: should clip against accumulated impulse
226 float clippedMotorImpulse = unclippedMotorImpulse > _maxMotorImpulse ? _maxMotorImpulse : unclippedMotorImpulse; 226 float clippedMotorImpulse = unclippedMotorImpulse > _maxMotorImpulse ? _maxMotorImpulse : unclippedMotorImpulse;
227 clippedMotorImpulse = clippedMotorImpulse < -_maxMotorImpulse ? -_maxMotorImpulse : clippedMotorImpulse; 227 clippedMotorImpulse = clippedMotorImpulse < -_maxMotorImpulse ? -_maxMotorImpulse : clippedMotorImpulse;
228 Vector3 motorImp = clippedMotorImpulse * axisA; 228 Vector3 motorImp = clippedMotorImpulse * axisA;
229 229
230 RigidBodyA.ApplyTorqueImpulse(motorImp + angularLimit); 230 RigidBodyA.ApplyTorqueImpulse(motorImp + angularLimit);
231 RigidBodyB.ApplyTorqueImpulse(-motorImp - angularLimit); 231 RigidBodyB.ApplyTorqueImpulse(-motorImp - angularLimit);
232 } 232 }
233 } 233 }
234 234
235 public void EnableAngularMotor(bool enableMotor, float targetVelocity, float maxMotorImpulse) 235 public void EnableAngularMotor(bool enableMotor, float targetVelocity, float maxMotorImpulse)
236 { 236 {
237 _enableAngularMotor = enableMotor; 237 _enableAngularMotor = enableMotor;
238 _motorTargetVelocity = targetVelocity; 238 _motorTargetVelocity = targetVelocity;
239 _maxMotorImpulse = maxMotorImpulse; 239 _maxMotorImpulse = maxMotorImpulse;
240 } 240 }
241 241
242 public void UpdateRHS(float timeStep) 242 public void UpdateRHS(float timeStep)
243 { 243 {
244 } 244 }
245 } 245 }
246} 246}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/IConstraintSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/IConstraintSolver.cs
index de25225..a83eaa5 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/IConstraintSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/IConstraintSolver.cs
@@ -1,32 +1,32 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.Dynamics 26namespace XnaDevRu.BulletX.Dynamics
27{ 27{
28 public interface IConstraintSolver 28 public interface IConstraintSolver
29 { 29 {
30 float SolveGroup(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo info, IDebugDraw debugDrawer); 30 float SolveGroup(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo info, IDebugDraw debugDrawer);
31 } 31 }
32} 32}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/JacobianEntry.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/JacobianEntry.cs
index 3b8d8d8..6249998 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/JacobianEntry.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/JacobianEntry.cs
@@ -1,155 +1,155 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// Jacobian entry is an abstraction that allows to describe constraints 30 /// Jacobian entry is an abstraction that allows to describe constraints
31 /// it can be used in combination with a constraint solver 31 /// it can be used in combination with a constraint solver
32 /// Can be used to relate the effect of an impulse to the constraint error 32 /// Can be used to relate the effect of an impulse to the constraint error
33 /// </summary> 33 /// </summary>
34 public class JacobianEntry 34 public class JacobianEntry
35 { 35 {
36 private Vector3 _linearJointAxis; 36 private Vector3 _linearJointAxis;
37 private Vector3 _aJ; 37 private Vector3 _aJ;
38 private Vector3 _bJ; 38 private Vector3 _bJ;
39 private Vector3 _0MinvJt; 39 private Vector3 _0MinvJt;
40 private Vector3 _1MinvJt; 40 private Vector3 _1MinvJt;
41 private float _adiag; 41 private float _adiag;
42 42
43 public JacobianEntry() { } 43 public JacobianEntry() { }
44 44
45 //constraint between two different rigidbodies 45 //constraint between two different rigidbodies
46 public JacobianEntry( 46 public JacobianEntry(
47 Matrix world2A, 47 Matrix world2A,
48 Matrix world2B, 48 Matrix world2B,
49 Vector3 relPosA, Vector3 relPosB, 49 Vector3 relPosA, Vector3 relPosB,
50 Vector3 jointAxis, 50 Vector3 jointAxis,
51 Vector3 inertiaInvA, 51 Vector3 inertiaInvA,
52 float massInvA, 52 float massInvA,
53 Vector3 inertiaInvB, 53 Vector3 inertiaInvB,
54 float massInvB) 54 float massInvB)
55 { 55 {
56 _linearJointAxis = jointAxis; 56 _linearJointAxis = jointAxis;
57 _aJ = Vector3.TransformNormal(Vector3.Cross(relPosA, _linearJointAxis), world2A); 57 _aJ = Vector3.TransformNormal(Vector3.Cross(relPosA, _linearJointAxis), world2A);
58 _bJ = Vector3.TransformNormal(Vector3.Cross(relPosB, -_linearJointAxis), world2B); 58 _bJ = Vector3.TransformNormal(Vector3.Cross(relPosB, -_linearJointAxis), world2B);
59 _0MinvJt = inertiaInvA * _aJ; 59 _0MinvJt = inertiaInvA * _aJ;
60 _1MinvJt = inertiaInvB * _bJ; 60 _1MinvJt = inertiaInvB * _bJ;
61 _adiag = massInvA + Vector3.Dot(_0MinvJt, _aJ) + massInvB + Vector3.Dot(_1MinvJt, _bJ); 61 _adiag = massInvA + Vector3.Dot(_0MinvJt, _aJ) + massInvB + Vector3.Dot(_1MinvJt, _bJ);
62 62
63 if (_adiag <= 0.0f) 63 if (_adiag <= 0.0f)
64 throw new BulletException(); 64 throw new BulletException();
65 } 65 }
66 66
67 //angular constraint between two different rigidbodies 67 //angular constraint between two different rigidbodies
68 public JacobianEntry(Vector3 jointAxis, 68 public JacobianEntry(Vector3 jointAxis,
69 Matrix world2A, 69 Matrix world2A,
70 Matrix world2B, 70 Matrix world2B,
71 Vector3 inertiaInvA, 71 Vector3 inertiaInvA,
72 Vector3 inertiaInvB) 72 Vector3 inertiaInvB)
73 { 73 {
74 _linearJointAxis = new Vector3(); 74 _linearJointAxis = new Vector3();
75 _aJ = Vector3.TransformNormal(jointAxis, world2A); 75 _aJ = Vector3.TransformNormal(jointAxis, world2A);
76 _bJ = Vector3.TransformNormal(-jointAxis, world2B); 76 _bJ = Vector3.TransformNormal(-jointAxis, world2B);
77 _0MinvJt = inertiaInvA * _aJ; 77 _0MinvJt = inertiaInvA * _aJ;
78 _1MinvJt = inertiaInvB * _bJ; 78 _1MinvJt = inertiaInvB * _bJ;
79 _adiag = Vector3.Dot(_0MinvJt, _aJ) + Vector3.Dot(_1MinvJt, _bJ); 79 _adiag = Vector3.Dot(_0MinvJt, _aJ) + Vector3.Dot(_1MinvJt, _bJ);
80 80
81 if (_adiag <= 0.0f) 81 if (_adiag <= 0.0f)
82 throw new BulletException(); 82 throw new BulletException();
83 } 83 }
84 84
85 //angular constraint between two different rigidbodies 85 //angular constraint between two different rigidbodies
86 public JacobianEntry(Vector3 axisInA, 86 public JacobianEntry(Vector3 axisInA,
87 Vector3 axisInB, 87 Vector3 axisInB,
88 Vector3 inertiaInvA, 88 Vector3 inertiaInvA,
89 Vector3 inertiaInvB) 89 Vector3 inertiaInvB)
90 { 90 {
91 _linearJointAxis = new Vector3(); 91 _linearJointAxis = new Vector3();
92 _aJ = axisInA; 92 _aJ = axisInA;
93 _bJ = -axisInB; 93 _bJ = -axisInB;
94 _0MinvJt = inertiaInvA * _aJ; 94 _0MinvJt = inertiaInvA * _aJ;
95 _1MinvJt = inertiaInvB * _bJ; 95 _1MinvJt = inertiaInvB * _bJ;
96 _adiag = Vector3.Dot(_0MinvJt, _aJ) + Vector3.Dot(_1MinvJt, _bJ); 96 _adiag = Vector3.Dot(_0MinvJt, _aJ) + Vector3.Dot(_1MinvJt, _bJ);
97 97
98 if (_adiag <= 0.0f) 98 if (_adiag <= 0.0f)
99 throw new BulletException(); 99 throw new BulletException();
100 } 100 }
101 101
102 //constraint on one rigidbody 102 //constraint on one rigidbody
103 public JacobianEntry( 103 public JacobianEntry(
104 Matrix world2A, 104 Matrix world2A,
105 Vector3 rel_pos1, Vector3 rel_pos2, 105 Vector3 rel_pos1, Vector3 rel_pos2,
106 Vector3 jointAxis, 106 Vector3 jointAxis,
107 Vector3 inertiaInvA, 107 Vector3 inertiaInvA,
108 float massInvA) 108 float massInvA)
109 { 109 {
110 _linearJointAxis = jointAxis; 110 _linearJointAxis = jointAxis;
111 _aJ = Vector3.TransformNormal(Vector3.Cross(rel_pos1, jointAxis), world2A); 111 _aJ = Vector3.TransformNormal(Vector3.Cross(rel_pos1, jointAxis), world2A);
112 _bJ = Vector3.TransformNormal(Vector3.Cross(rel_pos2, -jointAxis), world2A); 112 _bJ = Vector3.TransformNormal(Vector3.Cross(rel_pos2, -jointAxis), world2A);
113 _0MinvJt = inertiaInvA * _aJ; 113 _0MinvJt = inertiaInvA * _aJ;
114 _1MinvJt = new Vector3(); 114 _1MinvJt = new Vector3();
115 _adiag = massInvA + Vector3.Dot(_0MinvJt, _aJ); 115 _adiag = massInvA + Vector3.Dot(_0MinvJt, _aJ);
116 116
117 if (_adiag <= 0.0f) 117 if (_adiag <= 0.0f)
118 throw new BulletException(); 118 throw new BulletException();
119 } 119 }
120 120
121 public float Diagonal { get { return _adiag; } } 121 public float Diagonal { get { return _adiag; } }
122 122
123 // for two constraints on the same rigidbody (for example vehicle friction) 123 // for two constraints on the same rigidbody (for example vehicle friction)
124 public float GetNonDiagonal(JacobianEntry jacB, float massInvA) 124 public float GetNonDiagonal(JacobianEntry jacB, float massInvA)
125 { 125 {
126 float lin = massInvA * Vector3.Dot(_linearJointAxis, jacB._linearJointAxis); 126 float lin = massInvA * Vector3.Dot(_linearJointAxis, jacB._linearJointAxis);
127 float ang = Vector3.Dot(_0MinvJt, jacB._aJ); 127 float ang = Vector3.Dot(_0MinvJt, jacB._aJ);
128 return lin + ang; 128 return lin + ang;
129 } 129 }
130 130
131 // for two constraints on sharing two same rigidbodies (for example two contact points between two rigidbodies) 131 // for two constraints on sharing two same rigidbodies (for example two contact points between two rigidbodies)
132 public float GetNonDiagonal(JacobianEntry jacB, float massInvA, float massInvB) 132 public float GetNonDiagonal(JacobianEntry jacB, float massInvA, float massInvB)
133 { 133 {
134 Vector3 lin = _linearJointAxis * jacB._linearJointAxis; 134 Vector3 lin = _linearJointAxis * jacB._linearJointAxis;
135 Vector3 ang0 = _0MinvJt * jacB._aJ; 135 Vector3 ang0 = _0MinvJt * jacB._aJ;
136 Vector3 ang1 = _1MinvJt * jacB._bJ; 136 Vector3 ang1 = _1MinvJt * jacB._bJ;
137 Vector3 lin0 = massInvA * lin; 137 Vector3 lin0 = massInvA * lin;
138 Vector3 lin1 = massInvB * lin; 138 Vector3 lin1 = massInvB * lin;
139 Vector3 sum = ang0 + ang1 + lin0 + lin1; 139 Vector3 sum = ang0 + ang1 + lin0 + lin1;
140 return sum.X + sum.Y + sum.Z; 140 return sum.X + sum.Y + sum.Z;
141 } 141 }
142 142
143 public float GetRelativeVelocity(Vector3 linvelA, Vector3 angvelA, Vector3 linvelB, Vector3 angvelB) 143 public float GetRelativeVelocity(Vector3 linvelA, Vector3 angvelA, Vector3 linvelB, Vector3 angvelB)
144 { 144 {
145 Vector3 linrel = linvelA - linvelB; 145 Vector3 linrel = linvelA - linvelB;
146 Vector3 angvela = angvelA * _aJ; 146 Vector3 angvela = angvelA * _aJ;
147 Vector3 angvelb = angvelB * _bJ; 147 Vector3 angvelb = angvelB * _bJ;
148 linrel *= _linearJointAxis; 148 linrel *= _linearJointAxis;
149 angvela += angvelb; 149 angvela += angvelb;
150 angvela += linrel; 150 angvela += linrel;
151 float rel_vel2 = angvela.X + angvela.Y + angvela.Z; 151 float rel_vel2 = angvela.X + angvela.Y + angvela.Z;
152 return rel_vel2 + float.Epsilon; 152 return rel_vel2 + float.Epsilon;
153 } 153 }
154 } 154 }
155} 155}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Point2PointConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Point2PointConstraint.cs
index d4206ea..8ffd3d5 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Point2PointConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Point2PointConstraint.cs
@@ -1,157 +1,157 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public class ConstraintSetting 29 public class ConstraintSetting
30 { 30 {
31 private float _tau, _damping; 31 private float _tau, _damping;
32 32
33 public ConstraintSetting() 33 public ConstraintSetting()
34 { 34 {
35 _tau = 0.3f; 35 _tau = 0.3f;
36 _damping = 1.0f; 36 _damping = 1.0f;
37 } 37 }
38 38
39 public float Damping 39 public float Damping
40 { 40 {
41 get { return _damping; } 41 get { return _damping; }
42 set { _damping = value; } 42 set { _damping = value; }
43 } 43 }
44 44
45 public float Tau 45 public float Tau
46 { 46 {
47 get { return _tau; } 47 get { return _tau; }
48 set { _tau = value; } 48 set { _tau = value; }
49 } 49 }
50 } 50 }
51 51
52 public class Point2PointConstraint : TypedConstraint 52 public class Point2PointConstraint : TypedConstraint
53 { 53 {
54 private JacobianEntry[] _jacobian; 54 private JacobianEntry[] _jacobian;
55 private Vector3 _pivotInA, _pivotInB; 55 private Vector3 _pivotInA, _pivotInB;
56 56
57 private ConstraintSetting _setting = new ConstraintSetting(); 57 private ConstraintSetting _setting = new ConstraintSetting();
58 58
59 public Point2PointConstraint() 59 public Point2PointConstraint()
60 { 60 {
61 _jacobian = new JacobianEntry[3]; 61 _jacobian = new JacobianEntry[3];
62 } 62 }
63 63
64 public Point2PointConstraint(RigidBody rbA, RigidBody rbB, Vector3 pivotInA, Vector3 pivotInB) 64 public Point2PointConstraint(RigidBody rbA, RigidBody rbB, Vector3 pivotInA, Vector3 pivotInB)
65 : base(rbA, rbB) 65 : base(rbA, rbB)
66 { 66 {
67 _jacobian = new JacobianEntry[3]; 67 _jacobian = new JacobianEntry[3];
68 68
69 _pivotInA = pivotInA; 69 _pivotInA = pivotInA;
70 _pivotInB = pivotInB; 70 _pivotInB = pivotInB;
71 } 71 }
72 72
73 public Point2PointConstraint(RigidBody rbA, Vector3 pivotInA) 73 public Point2PointConstraint(RigidBody rbA, Vector3 pivotInA)
74 : base(rbA) 74 : base(rbA)
75 { 75 {
76 _jacobian = new JacobianEntry[3]; 76 _jacobian = new JacobianEntry[3];
77 77
78 _pivotInA = pivotInA; 78 _pivotInA = pivotInA;
79 _pivotInB = MathHelper.MatrixToVector(rbA.CenterOfMassTransform, _pivotInA); 79 _pivotInB = MathHelper.MatrixToVector(rbA.CenterOfMassTransform, _pivotInA);
80 } 80 }
81 81
82 public ConstraintSetting Settings { get { return _setting; } set { _setting = value; } } 82 public ConstraintSetting Settings { get { return _setting; } set { _setting = value; } }
83 83
84 public Vector3 PivotInA 84 public Vector3 PivotInA
85 { 85 {
86 set 86 set
87 { 87 {
88 _pivotInA = value; 88 _pivotInA = value;
89 } 89 }
90 } 90 }
91 91
92 public Vector3 PivotInB 92 public Vector3 PivotInB
93 { 93 {
94 set 94 set
95 { 95 {
96 _pivotInB = value; 96 _pivotInB = value;
97 } 97 }
98 } 98 }
99 99
100 public override void BuildJacobian() 100 public override void BuildJacobian()
101 { 101 {
102 Vector3 normal = new Vector3(); 102 Vector3 normal = new Vector3();
103 103
104 for (int i = 0; i < 3; i++) 104 for (int i = 0; i < 3; i++)
105 { 105 {
106 MathHelper.SetElement(ref normal, i, 1); 106 MathHelper.SetElement(ref normal, i, 1);
107 _jacobian[i] = new JacobianEntry( 107 _jacobian[i] = new JacobianEntry(
108 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform), 108 MatrixOperations.Transpose(RigidBodyA.CenterOfMassTransform),
109 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform), 109 MatrixOperations.Transpose(RigidBodyB.CenterOfMassTransform),
110 MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition, 110 MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform) - RigidBodyA.CenterOfMassPosition,
111 MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition, 111 MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform) - RigidBodyB.CenterOfMassPosition,
112 normal, 112 normal,
113 RigidBodyA.InvInertiaDiagLocal, 113 RigidBodyA.InvInertiaDiagLocal,
114 RigidBodyA.InverseMass, 114 RigidBodyA.InverseMass,
115 RigidBodyB.InvInertiaDiagLocal, 115 RigidBodyB.InvInertiaDiagLocal,
116 RigidBodyB.InverseMass 116 RigidBodyB.InverseMass
117 ); 117 );
118 MathHelper.SetElement(ref normal, i, 0); 118 MathHelper.SetElement(ref normal, i, 0);
119 } 119 }
120 } 120 }
121 121
122 public override void SolveConstraint(float timeStep) 122 public override void SolveConstraint(float timeStep)
123 { 123 {
124 Vector3 pivotAInW = MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform); 124 Vector3 pivotAInW = MathHelper.Transform(_pivotInA, RigidBodyA.CenterOfMassTransform);
125 Vector3 pivotBInW = MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform); 125 Vector3 pivotBInW = MathHelper.Transform(_pivotInB, RigidBodyB.CenterOfMassTransform);
126 126
127 Vector3 normal = new Vector3(); 127 Vector3 normal = new Vector3();
128 128
129 for (int i = 0; i < 3; i++) 129 for (int i = 0; i < 3; i++)
130 { 130 {
131 MathHelper.SetElement(ref normal, i, 1); 131 MathHelper.SetElement(ref normal, i, 1);
132 132
133 float jacDiagABInv = 1.0f / _jacobian[i].Diagonal; 133 float jacDiagABInv = 1.0f / _jacobian[i].Diagonal;
134 134
135 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition; 135 Vector3 rel_pos1 = pivotAInW - RigidBodyA.CenterOfMassPosition;
136 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition; 136 Vector3 rel_pos2 = pivotBInW - RigidBodyB.CenterOfMassPosition;
137 137
138 Vector3 vel1 = RigidBodyA.GetVelocityInLocalPoint(rel_pos1); 138 Vector3 vel1 = RigidBodyA.GetVelocityInLocalPoint(rel_pos1);
139 Vector3 vel2 = RigidBodyB.GetVelocityInLocalPoint(rel_pos2); 139 Vector3 vel2 = RigidBodyB.GetVelocityInLocalPoint(rel_pos2);
140 140
141 Vector3 vel = vel1 - vel2; 141 Vector3 vel = vel1 - vel2;
142 142
143 float rel_vel = Vector3.Dot(normal, vel); 143 float rel_vel = Vector3.Dot(normal, vel);
144 float depth = -Vector3.Dot((pivotAInW - pivotBInW), normal); 144 float depth = -Vector3.Dot((pivotAInW - pivotBInW), normal);
145 145
146 float impulse = depth * _setting.Tau / timeStep * jacDiagABInv - _setting.Damping * rel_vel * jacDiagABInv; 146 float impulse = depth * _setting.Tau / timeStep * jacDiagABInv - _setting.Damping * rel_vel * jacDiagABInv;
147 AppliedImpulse += impulse; 147 AppliedImpulse += impulse;
148 Vector3 impulseVector = normal * impulse; 148 Vector3 impulseVector = normal * impulse;
149 149
150 RigidBodyA.ApplyImpulse(impulseVector, pivotAInW - RigidBodyA.CenterOfMassPosition); 150 RigidBodyA.ApplyImpulse(impulseVector, pivotAInW - RigidBodyA.CenterOfMassPosition);
151 RigidBodyB.ApplyImpulse(-impulseVector, pivotBInW - RigidBodyB.CenterOfMassPosition); 151 RigidBodyB.ApplyImpulse(-impulseVector, pivotBInW - RigidBodyB.CenterOfMassPosition);
152 152
153 MathHelper.SetElement(ref normal, i, 0); 153 MathHelper.SetElement(ref normal, i, 0);
154 } 154 }
155 } 155 }
156 } 156 }
157} \ No newline at end of file 157} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SequentialImpulseConstraintSolver.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SequentialImpulseConstraintSolver.cs
index 4d5e93d..f275550 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SequentialImpulseConstraintSolver.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SequentialImpulseConstraintSolver.cs
@@ -1,915 +1,915 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 [Flags] 29 [Flags]
30 public enum SolverMode 30 public enum SolverMode
31 { 31 {
32 None = 0, 32 None = 0,
33 RandomizeOrder = 1, 33 RandomizeOrder = 1,
34 FrictionSeperate = 2, 34 FrictionSeperate = 2,
35 UseWarmstarting = 4, 35 UseWarmstarting = 4,
36 CacheFriendly = 8, 36 CacheFriendly = 8,
37 } 37 }
38 38
39 public class SequentialImpulseConstraintSolver : IConstraintSolver 39 public class SequentialImpulseConstraintSolver : IConstraintSolver
40 { 40 {
41 private static int _totalContactPoints = 0; 41 private static int _totalContactPoints = 0;
42 42
43 private SolverMode _solverMode; 43 private SolverMode _solverMode;
44 private int _totalCpd = 0; 44 private int _totalCpd = 0;
45 private ContactSolverFunc[,] _contactDispatch = new ContactSolverFunc[(int)ContactSolverType.MaxContactSolverType, (int)ContactSolverType.MaxContactSolverType]; 45 private ContactSolverFunc[,] _contactDispatch = new ContactSolverFunc[(int)ContactSolverType.MaxContactSolverType, (int)ContactSolverType.MaxContactSolverType];
46 private ContactSolverFunc[,] _frictionDispatch = new ContactSolverFunc[(int)ContactSolverType.MaxContactSolverType, (int)ContactSolverType.MaxContactSolverType]; 46 private ContactSolverFunc[,] _frictionDispatch = new ContactSolverFunc[(int)ContactSolverType.MaxContactSolverType, (int)ContactSolverType.MaxContactSolverType];
47 47
48 private float _penetrationResolveFactor = 0.9f; 48 private float _penetrationResolveFactor = 0.9f;
49 private List<SolverBody> _tmpSolverBodyPool = new List<SolverBody>(); 49 private List<SolverBody> _tmpSolverBodyPool = new List<SolverBody>();
50 private List<SolverConstraint> _tmpSolverConstraintPool = new List<SolverConstraint>(); 50 private List<SolverConstraint> _tmpSolverConstraintPool = new List<SolverConstraint>();
51 private List<SolverConstraint> _tmpSolverFrictionConstraintPool = new List<SolverConstraint>(); 51 private List<SolverConstraint> _tmpSolverFrictionConstraintPool = new List<SolverConstraint>();
52 52
53 private const int _sequentialImpulseMaxSolverPoints = 16384; 53 private const int _sequentialImpulseMaxSolverPoints = 16384;
54 private static OrderIndex[] _order = new OrderIndex[SequentialImpulseMaxSolverPoints]; 54 private static OrderIndex[] _order = new OrderIndex[SequentialImpulseMaxSolverPoints];
55 private static long _seed2 = 0; 55 private static long _seed2 = 0;
56 56
57 public SequentialImpulseConstraintSolver() 57 public SequentialImpulseConstraintSolver()
58 { 58 {
59 _solverMode = SolverMode.RandomizeOrder | SolverMode.CacheFriendly; 59 _solverMode = SolverMode.RandomizeOrder | SolverMode.CacheFriendly;
60 PersistentManifold.ContactDestroyedCallback = MyContactDestroyedCallback; 60 PersistentManifold.ContactDestroyedCallback = MyContactDestroyedCallback;
61 61
62 //initialize default friction/contact funcs 62 //initialize default friction/contact funcs
63 int i, j; 63 int i, j;
64 for (i = 0; i < (int)ContactSolverType.MaxContactSolverType; i++) 64 for (i = 0; i < (int)ContactSolverType.MaxContactSolverType; i++)
65 for (j = 0; j < (int)ContactSolverType.MaxContactSolverType; j++) 65 for (j = 0; j < (int)ContactSolverType.MaxContactSolverType; j++)
66 { 66 {
67 67
68 _contactDispatch[i, j] = ContactConstraint.ResolveSingleCollision; 68 _contactDispatch[i, j] = ContactConstraint.ResolveSingleCollision;
69 _frictionDispatch[i, j] = ContactConstraint.ResolveSingleFriction; 69 _frictionDispatch[i, j] = ContactConstraint.ResolveSingleFriction;
70 } 70 }
71 } 71 }
72 72
73 public SolverMode SolverMode { get { return _solverMode; } set { _solverMode = value; } } 73 public SolverMode SolverMode { get { return _solverMode; } set { _solverMode = value; } }
74 public static int SequentialImpulseMaxSolverPoints { get { return _sequentialImpulseMaxSolverPoints; } } 74 public static int SequentialImpulseMaxSolverPoints { get { return _sequentialImpulseMaxSolverPoints; } }
75 protected static OrderIndex[] Order { get { return _order; } set { _order = value; } } 75 protected static OrderIndex[] Order { get { return _order; } set { _order = value; } }
76 public static long RandSeed { get { return _seed2; } set { _seed2 = value; } } 76 public static long RandSeed { get { return _seed2; } set { _seed2 = value; } }
77 77
78 ///<summary> 78 ///<summary>
79 /// Advanced: Override the default contact solving function for contacts, for certain types of rigidbody 79 /// Advanced: Override the default contact solving function for contacts, for certain types of rigidbody
80 /// See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType 80 /// See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType
81 ///</summary> 81 ///</summary>
82 public void SetContactSolverFunc(ContactSolverFunc func, int typeA, int typeB) 82 public void SetContactSolverFunc(ContactSolverFunc func, int typeA, int typeB)
83 { 83 {
84 _contactDispatch[typeA, typeB] = func; 84 _contactDispatch[typeA, typeB] = func;
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Advanced: Override the default friction solving function for contacts, for certain types of rigidbody 88 /// Advanced: Override the default friction solving function for contacts, for certain types of rigidbody
89 /// See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType 89 /// See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType
90 ///</summary> 90 ///</summary>
91 public void SetFrictionSolverFunc(ContactSolverFunc func, int typeA, int typeB) 91 public void SetFrictionSolverFunc(ContactSolverFunc func, int typeA, int typeB)
92 { 92 {
93 _frictionDispatch[typeA, typeB] = func; 93 _frictionDispatch[typeA, typeB] = func;
94 } 94 }
95 95
96 protected float Solve(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw) 96 protected float Solve(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw)
97 { 97 {
98 float maxImpulse = 0; 98 float maxImpulse = 0;
99 99
100 Vector3 color = new Vector3(0, 1, 0); 100 Vector3 color = new Vector3(0, 1, 0);
101 if (cp.Distance <= 0) 101 if (cp.Distance <= 0)
102 { 102 {
103 if (iter == 0) 103 if (iter == 0)
104 if(debugDraw != null) 104 if(debugDraw != null)
105 debugDraw.DrawContactPoint(cp.PositionWorldOnB, cp.NormalWorldOnB, cp.Distance, cp.LifeTime, color); 105 debugDraw.DrawContactPoint(cp.PositionWorldOnB, cp.NormalWorldOnB, cp.Distance, cp.LifeTime, color);
106 106
107 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData; 107 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData;
108 float impulse = cpd.ContactSolverFunc( 108 float impulse = cpd.ContactSolverFunc(
109 bodyA, bodyB, 109 bodyA, bodyB,
110 cp, 110 cp,
111 info); 111 info);
112 112
113 if (maxImpulse < impulse) 113 if (maxImpulse < impulse)
114 maxImpulse = impulse; 114 maxImpulse = impulse;
115 } 115 }
116 return maxImpulse; 116 return maxImpulse;
117 } 117 }
118 118
119 protected float Solve(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter) 119 protected float Solve(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter)
120 { 120 {
121 return Solve(bodyA, bodyB, cp, info, iter, null); 121 return Solve(bodyA, bodyB, cp, info, iter, null);
122 } 122 }
123 123
124 protected float SolveCombinedContactFriction(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw) 124 protected float SolveCombinedContactFriction(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw)
125 { 125 {
126 float maxImpulse = 0; 126 float maxImpulse = 0;
127 127
128 Vector3 color = new Vector3(0, 1, 0); 128 Vector3 color = new Vector3(0, 1, 0);
129 if (cp.Distance <= 0) 129 if (cp.Distance <= 0)
130 { 130 {
131 if (iter == 0) 131 if (iter == 0)
132 if (debugDraw != null) 132 if (debugDraw != null)
133 debugDraw.DrawContactPoint(cp.PositionWorldOnB, cp.NormalWorldOnB, cp.Distance, cp.LifeTime, color); 133 debugDraw.DrawContactPoint(cp.PositionWorldOnB, cp.NormalWorldOnB, cp.Distance, cp.LifeTime, color);
134 134
135 float impulse = ContactConstraint.ResolveSingleCollisionCombined( 135 float impulse = ContactConstraint.ResolveSingleCollisionCombined(
136 bodyA, bodyB, 136 bodyA, bodyB,
137 cp, 137 cp,
138 info); 138 info);
139 139
140 if (maxImpulse < impulse) 140 if (maxImpulse < impulse)
141 maxImpulse = impulse; 141 maxImpulse = impulse;
142 } 142 }
143 return maxImpulse; 143 return maxImpulse;
144 } 144 }
145 145
146 protected float SolveFriction(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw) 146 protected float SolveFriction(RigidBody bodyA, RigidBody bodyB, ManifoldPoint cp, ContactSolverInfo info, int iter, IDebugDraw debugDraw)
147 { 147 {
148 Vector3 color = new Vector3(0, 1, 0); 148 Vector3 color = new Vector3(0, 1, 0);
149 149
150 if (cp.Distance <= 0) 150 if (cp.Distance <= 0)
151 { 151 {
152 152
153 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData; 153 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData;
154 cpd.FrictionSolverFunc( 154 cpd.FrictionSolverFunc(
155 bodyA, bodyB, 155 bodyA, bodyB,
156 cp, 156 cp,
157 info); 157 info);
158 } 158 }
159 return 0; 159 return 0;
160 } 160 }
161 161
162 protected void PrepareConstraints(PersistentManifold manifold, ContactSolverInfo info) 162 protected void PrepareConstraints(PersistentManifold manifold, ContactSolverInfo info)
163 { 163 {
164 RigidBody body0 = manifold.BodyA as RigidBody; 164 RigidBody body0 = manifold.BodyA as RigidBody;
165 RigidBody body1 = manifold.BodyB as RigidBody; 165 RigidBody body1 = manifold.BodyB as RigidBody;
166 166
167 167
168 //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop 168 //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop
169 { 169 {
170 manifold.RefreshContactPoints(body0.CenterOfMassTransform, body1.CenterOfMassTransform); 170 manifold.RefreshContactPoints(body0.CenterOfMassTransform, body1.CenterOfMassTransform);
171 171
172 int numpoints = manifold.ContactsCount; 172 int numpoints = manifold.ContactsCount;
173 173
174 _totalContactPoints += numpoints; 174 _totalContactPoints += numpoints;
175 175
176 Vector3 color = new Vector3(0, 1, 0); 176 Vector3 color = new Vector3(0, 1, 0);
177 for (int i = 0; i < numpoints; i++) 177 for (int i = 0; i < numpoints; i++)
178 { 178 {
179 ManifoldPoint cp = manifold.GetContactPoint(i); 179 ManifoldPoint cp = manifold.GetContactPoint(i);
180 if (cp.Distance <= 0) 180 if (cp.Distance <= 0)
181 { 181 {
182 Vector3 pos1 = cp.PositionWorldOnA; 182 Vector3 pos1 = cp.PositionWorldOnA;
183 Vector3 pos2 = cp.PositionWorldOnB; 183 Vector3 pos2 = cp.PositionWorldOnB;
184 184
185 Vector3 rel_pos1 = pos1 - body0.CenterOfMassPosition; 185 Vector3 rel_pos1 = pos1 - body0.CenterOfMassPosition;
186 Vector3 rel_pos2 = pos2 - body1.CenterOfMassPosition; 186 Vector3 rel_pos2 = pos2 - body1.CenterOfMassPosition;
187 187
188 188
189 //this jacobian entry is re-used for all iterations 189 //this jacobian entry is re-used for all iterations
190 JacobianEntry jac = new JacobianEntry(MatrixOperations.Transpose(body0.CenterOfMassTransform), 190 JacobianEntry jac = new JacobianEntry(MatrixOperations.Transpose(body0.CenterOfMassTransform),
191 MatrixOperations.Transpose(body1.CenterOfMassTransform), 191 MatrixOperations.Transpose(body1.CenterOfMassTransform),
192 rel_pos1, rel_pos2, cp.NormalWorldOnB, body0.InvInertiaDiagLocal, body0.InverseMass, 192 rel_pos1, rel_pos2, cp.NormalWorldOnB, body0.InvInertiaDiagLocal, body0.InverseMass,
193 body1.InvInertiaDiagLocal, body1.InverseMass); 193 body1.InvInertiaDiagLocal, body1.InverseMass);
194 194
195 float jacDiagAB = jac.Diagonal; 195 float jacDiagAB = jac.Diagonal;
196 196
197 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData; 197 ConstraintPersistentData cpd = cp.UserPersistentData as ConstraintPersistentData;
198 if (cpd != null) 198 if (cpd != null)
199 { 199 {
200 //might be invalid 200 //might be invalid
201 cpd.PersistentLifeTime++; 201 cpd.PersistentLifeTime++;
202 if (cpd.PersistentLifeTime != cp.LifeTime) 202 if (cpd.PersistentLifeTime != cp.LifeTime)
203 { 203 {
204 //printf("Invalid: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); 204 //printf("Invalid: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime());
205 cpd = new ConstraintPersistentData(); 205 cpd = new ConstraintPersistentData();
206 cpd.PersistentLifeTime = cp.LifeTime; 206 cpd.PersistentLifeTime = cp.LifeTime;
207 207
208 } 208 }
209 } 209 }
210 else 210 else
211 { 211 {
212 212
213 cpd = new ConstraintPersistentData(); 213 cpd = new ConstraintPersistentData();
214 _totalCpd++; 214 _totalCpd++;
215 //printf("totalCpd = %i Created Ptr %x\n",totalCpd,cpd); 215 //printf("totalCpd = %i Created Ptr %x\n",totalCpd,cpd);
216 cp.UserPersistentData = cpd; 216 cp.UserPersistentData = cpd;
217 cpd.PersistentLifeTime = cp.LifeTime; 217 cpd.PersistentLifeTime = cp.LifeTime;
218 //printf("CREATED: %x . cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd,cpd->m_persistentLifeTime,cp.getLifeTime()); 218 //printf("CREATED: %x . cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd,cpd->m_persistentLifeTime,cp.getLifeTime());
219 219
220 } 220 }
221 if (cpd == null) 221 if (cpd == null)
222 throw new BulletException(); 222 throw new BulletException();
223 223
224 cpd.JacDiagABInv = 1f / jacDiagAB; 224 cpd.JacDiagABInv = 1f / jacDiagAB;
225 225
226 //Dependent on Rigidbody A and B types, fetch the contact/friction response func 226 //Dependent on Rigidbody A and B types, fetch the contact/friction response func
227 //perhaps do a similar thing for friction/restutution combiner funcs... 227 //perhaps do a similar thing for friction/restutution combiner funcs...
228 228
229 cpd.FrictionSolverFunc = _frictionDispatch[(int)body0.FrictionSolverType, (int)body1.FrictionSolverType]; 229 cpd.FrictionSolverFunc = _frictionDispatch[(int)body0.FrictionSolverType, (int)body1.FrictionSolverType];
230 cpd.ContactSolverFunc = _contactDispatch[(int)body0.ContactSolverType, (int)body1.ContactSolverType]; 230 cpd.ContactSolverFunc = _contactDispatch[(int)body0.ContactSolverType, (int)body1.ContactSolverType];
231 231
232 Vector3 vel1 = body0.GetVelocityInLocalPoint(rel_pos1); 232 Vector3 vel1 = body0.GetVelocityInLocalPoint(rel_pos1);
233 Vector3 vel2 = body1.GetVelocityInLocalPoint(rel_pos2); 233 Vector3 vel2 = body1.GetVelocityInLocalPoint(rel_pos2);
234 Vector3 vel = vel1 - vel2; 234 Vector3 vel = vel1 - vel2;
235 float rel_vel; 235 float rel_vel;
236 rel_vel = Vector3.Dot(cp.NormalWorldOnB, vel); 236 rel_vel = Vector3.Dot(cp.NormalWorldOnB, vel);
237 237
238 float combinedRestitution = cp.CombinedRestitution; 238 float combinedRestitution = cp.CombinedRestitution;
239 239
240 cpd.Penetration = cp.Distance; 240 cpd.Penetration = cp.Distance;
241 cpd.Friction = cp.CombinedFriction; 241 cpd.Friction = cp.CombinedFriction;
242 cpd.Restitution = RestitutionCurve(rel_vel, combinedRestitution); 242 cpd.Restitution = RestitutionCurve(rel_vel, combinedRestitution);
243 if (cpd.Restitution < 0f) 243 if (cpd.Restitution < 0f)
244 { 244 {
245 cpd.Restitution = 0.0f; 245 cpd.Restitution = 0.0f;
246 246
247 }; 247 };
248 248
249 //restitution and penetration work in same direction so 249 //restitution and penetration work in same direction so
250 //rel_vel 250 //rel_vel
251 251
252 float penVel = -cpd.Penetration / info.TimeStep; 252 float penVel = -cpd.Penetration / info.TimeStep;
253 253
254 if (cpd.Restitution > penVel) 254 if (cpd.Restitution > penVel)
255 { 255 {
256 cpd.Penetration = 0; 256 cpd.Penetration = 0;
257 } 257 }
258 258
259 259
260 float relaxation = info.Damping; 260 float relaxation = info.Damping;
261 if ((_solverMode & SolverMode.UseWarmstarting) != 0) 261 if ((_solverMode & SolverMode.UseWarmstarting) != 0)
262 { 262 {
263 cpd.AppliedImpulse *= relaxation; 263 cpd.AppliedImpulse *= relaxation;
264 } 264 }
265 else 265 else
266 { 266 {
267 cpd.AppliedImpulse = 0f; 267 cpd.AppliedImpulse = 0f;
268 } 268 }
269 269
270 //for friction 270 //for friction
271 cpd.PreviousAppliedImpulse = cpd.AppliedImpulse; 271 cpd.PreviousAppliedImpulse = cpd.AppliedImpulse;
272 272
273 //re-calculate friction direction every frame, todo: check if this is really needed 273 //re-calculate friction direction every frame, todo: check if this is really needed
274 Vector3 fwta = cpd.FrictionWorldTangentialA; 274 Vector3 fwta = cpd.FrictionWorldTangentialA;
275 Vector3 fwtb = cpd.FrictionWorldTangentialB; 275 Vector3 fwtb = cpd.FrictionWorldTangentialB;
276 MathHelper.PlaneSpace1(cp.NormalWorldOnB, ref fwta, ref fwtb); 276 MathHelper.PlaneSpace1(cp.NormalWorldOnB, ref fwta, ref fwtb);
277 cpd.FrictionWorldTangentialA = fwta; 277 cpd.FrictionWorldTangentialA = fwta;
278 cpd.FrictionWorldTangentialB = fwtb; 278 cpd.FrictionWorldTangentialB = fwtb;
279 279
280 cpd.AccumulatedTangentImpulseA = 0; 280 cpd.AccumulatedTangentImpulseA = 0;
281 cpd.AccumulatedTangentImpulseB = 0; 281 cpd.AccumulatedTangentImpulseB = 0;
282 float denom0 = body0.ComputeImpulseDenominator(pos1, cpd.FrictionWorldTangentialA); 282 float denom0 = body0.ComputeImpulseDenominator(pos1, cpd.FrictionWorldTangentialA);
283 float denom1 = body1.ComputeImpulseDenominator(pos2, cpd.FrictionWorldTangentialA); 283 float denom1 = body1.ComputeImpulseDenominator(pos2, cpd.FrictionWorldTangentialA);
284 float denom = relaxation / (denom0 + denom1); 284 float denom = relaxation / (denom0 + denom1);
285 cpd.JacDiagABInvTangentA = denom; 285 cpd.JacDiagABInvTangentA = denom;
286 286
287 287
288 denom0 = body0.ComputeImpulseDenominator(pos1, cpd.FrictionWorldTangentialB); 288 denom0 = body0.ComputeImpulseDenominator(pos1, cpd.FrictionWorldTangentialB);
289 denom1 = body1.ComputeImpulseDenominator(pos2, cpd.FrictionWorldTangentialB); 289 denom1 = body1.ComputeImpulseDenominator(pos2, cpd.FrictionWorldTangentialB);
290 denom = relaxation / (denom0 + denom1); 290 denom = relaxation / (denom0 + denom1);
291 cpd.JacDiagABInvTangentB = denom; 291 cpd.JacDiagABInvTangentB = denom;
292 292
293 Vector3 totalImpulse = cp.NormalWorldOnB * cpd.AppliedImpulse; 293 Vector3 totalImpulse = cp.NormalWorldOnB * cpd.AppliedImpulse;
294 294
295 { 295 {
296 Vector3 torqueAxis0 = Vector3.Cross(rel_pos1, cp.NormalWorldOnB); 296 Vector3 torqueAxis0 = Vector3.Cross(rel_pos1, cp.NormalWorldOnB);
297 cpd.AngularComponentA = Vector3.TransformNormal(torqueAxis0, body0.InvInertiaTensorWorld); 297 cpd.AngularComponentA = Vector3.TransformNormal(torqueAxis0, body0.InvInertiaTensorWorld);
298 Vector3 torqueAxis1 = Vector3.Cross(rel_pos2, cp.NormalWorldOnB); 298 Vector3 torqueAxis1 = Vector3.Cross(rel_pos2, cp.NormalWorldOnB);
299 cpd.AngularComponentB = Vector3.TransformNormal(torqueAxis1, body1.InvInertiaTensorWorld); 299 cpd.AngularComponentB = Vector3.TransformNormal(torqueAxis1, body1.InvInertiaTensorWorld);
300 } 300 }
301 { 301 {
302 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos1, cpd.FrictionWorldTangentialA); 302 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos1, cpd.FrictionWorldTangentialA);
303 cpd.FrictionAngularComponent0A = Vector3.TransformNormal(ftorqueAxis0, body0.InvInertiaTensorWorld); 303 cpd.FrictionAngularComponent0A = Vector3.TransformNormal(ftorqueAxis0, body0.InvInertiaTensorWorld);
304 } 304 }
305 { 305 {
306 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos1, cpd.FrictionWorldTangentialB); 306 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos1, cpd.FrictionWorldTangentialB);
307 cpd.FrictionAngularComponent1A = Vector3.TransformNormal(ftorqueAxis1, body0.InvInertiaTensorWorld); 307 cpd.FrictionAngularComponent1A = Vector3.TransformNormal(ftorqueAxis1, body0.InvInertiaTensorWorld);
308 } 308 }
309 { 309 {
310 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos2, cpd.FrictionWorldTangentialA); 310 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos2, cpd.FrictionWorldTangentialA);
311 cpd.FrictionAngularComponent0B = Vector3.TransformNormal(ftorqueAxis0, body1.InvInertiaTensorWorld); 311 cpd.FrictionAngularComponent0B = Vector3.TransformNormal(ftorqueAxis0, body1.InvInertiaTensorWorld);
312 } 312 }
313 { 313 {
314 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos2, cpd.FrictionWorldTangentialB); 314 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos2, cpd.FrictionWorldTangentialB);
315 cpd.FrictionAngularComponent1B = Vector3.TransformNormal(ftorqueAxis1, body1.InvInertiaTensorWorld); 315 cpd.FrictionAngularComponent1B = Vector3.TransformNormal(ftorqueAxis1, body1.InvInertiaTensorWorld);
316 } 316 }
317 317
318 318
319 //apply previous frames impulse on both bodies 319 //apply previous frames impulse on both bodies
320 body0.ApplyImpulse(totalImpulse, rel_pos1); 320 body0.ApplyImpulse(totalImpulse, rel_pos1);
321 body1.ApplyImpulse(-totalImpulse, rel_pos2); 321 body1.ApplyImpulse(-totalImpulse, rel_pos2);
322 } 322 }
323 } 323 }
324 } 324 }
325 } 325 }
326 326
327 private bool MyContactDestroyedCallback(object userPersistentData) 327 private bool MyContactDestroyedCallback(object userPersistentData)
328 { 328 {
329 if (userPersistentData == null) 329 if (userPersistentData == null)
330 throw new BulletException(); 330 throw new BulletException();
331 ConstraintPersistentData cpd = userPersistentData as ConstraintPersistentData; 331 ConstraintPersistentData cpd = userPersistentData as ConstraintPersistentData;
332 _totalCpd--; 332 _totalCpd--;
333 return true; 333 return true;
334 } 334 }
335 335
336 private float RestitutionCurve(float relVel, float restitution) 336 private float RestitutionCurve(float relVel, float restitution)
337 { 337 {
338 float rest = restitution * -relVel; 338 float rest = restitution * -relVel;
339 return rest; 339 return rest;
340 } 340 }
341 341
342 //velocity + friction 342 //velocity + friction
343 //response between two dynamic objects with friction 343 //response between two dynamic objects with friction
344 public virtual float ResolveSingleCollisionCombinedCacheFriendly( 344 public virtual float ResolveSingleCollisionCombinedCacheFriendly(
345 SolverBody bodyA, 345 SolverBody bodyA,
346 SolverBody bodyB, 346 SolverBody bodyB,
347 SolverConstraint contactConstraint, 347 SolverConstraint contactConstraint,
348 ContactSolverInfo solverInfo) 348 ContactSolverInfo solverInfo)
349 { 349 {
350 float normalImpulse = 0; 350 float normalImpulse = 0;
351 351
352 if (contactConstraint.Penetration < 0) 352 if (contactConstraint.Penetration < 0)
353 return 0; 353 return 0;
354 354
355 float relVel; 355 float relVel;
356 float velADotn = Vector3.Dot(contactConstraint.ContactNormal,bodyA.LinearVelocity) 356 float velADotn = Vector3.Dot(contactConstraint.ContactNormal,bodyA.LinearVelocity)
357 + Vector3.Dot(contactConstraint.RelPosACrossNormal,bodyA.AngularVelocity); 357 + Vector3.Dot(contactConstraint.RelPosACrossNormal,bodyA.AngularVelocity);
358 float velBDotn = Vector3.Dot(contactConstraint.ContactNormal,bodyB.LinearVelocity) 358 float velBDotn = Vector3.Dot(contactConstraint.ContactNormal,bodyB.LinearVelocity)
359 + Vector3.Dot(contactConstraint.RelPosBCrossNormal,bodyB.AngularVelocity); 359 + Vector3.Dot(contactConstraint.RelPosBCrossNormal,bodyB.AngularVelocity);
360 360
361 relVel = velADotn - velBDotn; 361 relVel = velADotn - velBDotn;
362 362
363 float positionalError = contactConstraint.Penetration; 363 float positionalError = contactConstraint.Penetration;
364 float velocityError = contactConstraint.Restitution - relVel;// * damping; 364 float velocityError = contactConstraint.Restitution - relVel;// * damping;
365 365
366 float penetrationImpulse = positionalError * contactConstraint.JacDiagABInv; 366 float penetrationImpulse = positionalError * contactConstraint.JacDiagABInv;
367 float velocityImpulse = velocityError * contactConstraint.JacDiagABInv; 367 float velocityImpulse = velocityError * contactConstraint.JacDiagABInv;
368 normalImpulse = penetrationImpulse + velocityImpulse; 368 normalImpulse = penetrationImpulse + velocityImpulse;
369 369
370 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse 370 // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse
371 float oldNormalImpulse = contactConstraint.AppliedImpulse; 371 float oldNormalImpulse = contactConstraint.AppliedImpulse;
372 float sum = oldNormalImpulse + normalImpulse; 372 float sum = oldNormalImpulse + normalImpulse;
373 contactConstraint.AppliedImpulse = 0 > sum ? 0 : sum; 373 contactConstraint.AppliedImpulse = 0 > sum ? 0 : sum;
374 374
375 float oldVelocityImpulse = contactConstraint.AppliedVelocityImpulse; 375 float oldVelocityImpulse = contactConstraint.AppliedVelocityImpulse;
376 float velocitySum = oldVelocityImpulse + velocityImpulse; 376 float velocitySum = oldVelocityImpulse + velocityImpulse;
377 contactConstraint.AppliedVelocityImpulse = 0 > velocitySum ? 0 : velocitySum; 377 contactConstraint.AppliedVelocityImpulse = 0 > velocitySum ? 0 : velocitySum;
378 378
379 normalImpulse = contactConstraint.AppliedImpulse - oldNormalImpulse; 379 normalImpulse = contactConstraint.AppliedImpulse - oldNormalImpulse;
380 380
381 if (bodyA.InvMass != 0) 381 if (bodyA.InvMass != 0)
382 { 382 {
383 bodyA.ApplyImpulse(contactConstraint.ContactNormal * bodyA.InvMass, 383 bodyA.ApplyImpulse(contactConstraint.ContactNormal * bodyA.InvMass,
384 contactConstraint.AngularComponentA, normalImpulse); 384 contactConstraint.AngularComponentA, normalImpulse);
385 } 385 }
386 if (bodyB.InvMass != 0) 386 if (bodyB.InvMass != 0)
387 { 387 {
388 bodyB.ApplyImpulse(contactConstraint.ContactNormal * bodyB.InvMass, 388 bodyB.ApplyImpulse(contactConstraint.ContactNormal * bodyB.InvMass,
389 contactConstraint.AngularComponentB, -normalImpulse); 389 contactConstraint.AngularComponentB, -normalImpulse);
390 } 390 }
391 391
392 return normalImpulse; 392 return normalImpulse;
393 } 393 }
394 394
395 public virtual float ResolveSingleFrictionCacheFriendly( 395 public virtual float ResolveSingleFrictionCacheFriendly(
396 SolverBody bodyA, 396 SolverBody bodyA,
397 SolverBody bodyB, 397 SolverBody bodyB,
398 SolverConstraint contactConstraint, 398 SolverConstraint contactConstraint,
399 ContactSolverInfo solverInfo, 399 ContactSolverInfo solverInfo,
400 float appliedNormalImpulse) 400 float appliedNormalImpulse)
401 { 401 {
402 float combinedFriction = contactConstraint.Friction; 402 float combinedFriction = contactConstraint.Friction;
403 float limit = appliedNormalImpulse * combinedFriction; 403 float limit = appliedNormalImpulse * combinedFriction;
404 404
405 if (appliedNormalImpulse > 0) 405 if (appliedNormalImpulse > 0)
406 //friction 406 //friction
407 { 407 {
408 float j1; 408 float j1;
409 { 409 {
410 float relVel; 410 float relVel;
411 float velADotn = Vector3.Dot(contactConstraint.ContactNormal, bodyA.LinearVelocity) 411 float velADotn = Vector3.Dot(contactConstraint.ContactNormal, bodyA.LinearVelocity)
412 + Vector3.Dot(contactConstraint.RelPosACrossNormal, bodyA.AngularVelocity); 412 + Vector3.Dot(contactConstraint.RelPosACrossNormal, bodyA.AngularVelocity);
413 float velBDotn = Vector3.Dot(contactConstraint.ContactNormal, bodyB.LinearVelocity) 413 float velBDotn = Vector3.Dot(contactConstraint.ContactNormal, bodyB.LinearVelocity)
414 + Vector3.Dot(contactConstraint.RelPosBCrossNormal, bodyB.AngularVelocity); 414 + Vector3.Dot(contactConstraint.RelPosBCrossNormal, bodyB.AngularVelocity);
415 relVel = velADotn - velBDotn; 415 relVel = velADotn - velBDotn;
416 416
417 // calculate j that moves us to zero relative velocity 417 // calculate j that moves us to zero relative velocity
418 j1 = -relVel * contactConstraint.JacDiagABInv; 418 j1 = -relVel * contactConstraint.JacDiagABInv;
419 float oldTangentImpulse = contactConstraint.AppliedImpulse; 419 float oldTangentImpulse = contactConstraint.AppliedImpulse;
420 contactConstraint.AppliedImpulse = oldTangentImpulse + j1; 420 contactConstraint.AppliedImpulse = oldTangentImpulse + j1;
421 421
422 float test = contactConstraint.AppliedImpulse; 422 float test = contactConstraint.AppliedImpulse;
423 MathHelper.SetMin(ref test, limit); 423 MathHelper.SetMin(ref test, limit);
424 MathHelper.SetMax(ref test, -limit); 424 MathHelper.SetMax(ref test, -limit);
425 contactConstraint.AppliedImpulse = test; 425 contactConstraint.AppliedImpulse = test;
426 426
427 j1 = contactConstraint.AppliedImpulse - oldTangentImpulse; 427 j1 = contactConstraint.AppliedImpulse - oldTangentImpulse;
428 } 428 }
429 429
430 if (bodyA.InvMass != 0) 430 if (bodyA.InvMass != 0)
431 { 431 {
432 bodyA.ApplyImpulse(contactConstraint.ContactNormal * bodyA.InvMass, contactConstraint.AngularComponentA, j1); 432 bodyA.ApplyImpulse(contactConstraint.ContactNormal * bodyA.InvMass, contactConstraint.AngularComponentA, j1);
433 } 433 }
434 if (bodyB.InvMass != 0) 434 if (bodyB.InvMass != 0)
435 { 435 {
436 bodyB.ApplyImpulse(contactConstraint.ContactNormal * bodyB.InvMass, contactConstraint.AngularComponentB, -j1); 436 bodyB.ApplyImpulse(contactConstraint.ContactNormal * bodyB.InvMass, contactConstraint.AngularComponentB, -j1);
437 } 437 }
438 } 438 }
439 return 0; 439 return 0;
440 } 440 }
441 441
442 public virtual float SolveGroupCacheFriendly(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo infoGlobal, IDebugDraw debugDrawer) 442 public virtual float SolveGroupCacheFriendly(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo infoGlobal, IDebugDraw debugDrawer)
443 { 443 {
444 if (constraints.Count + numManifolds == 0) 444 if (constraints.Count + numManifolds == 0)
445 { 445 {
446 return 0; 446 return 0;
447 } 447 }
448 448
449 for (int i = 0; i < numManifolds; i++) 449 for (int i = 0; i < numManifolds; i++)
450 { 450 {
451 PersistentManifold manifold = manifolds[i]; 451 PersistentManifold manifold = manifolds[i];
452 RigidBody rbA = (RigidBody)manifold.BodyA; 452 RigidBody rbA = (RigidBody)manifold.BodyA;
453 RigidBody rbB = (RigidBody)manifold.BodyB; 453 RigidBody rbB = (RigidBody)manifold.BodyB;
454 454
455 manifold.RefreshContactPoints(rbA.CenterOfMassTransform, rbB.CenterOfMassTransform); 455 manifold.RefreshContactPoints(rbA.CenterOfMassTransform, rbB.CenterOfMassTransform);
456 } 456 }
457 457
458 int minReservation = manifolds.Count * 2; 458 int minReservation = manifolds.Count * 2;
459 459
460 _tmpSolverBodyPool = new List<SolverBody>(minReservation); 460 _tmpSolverBodyPool = new List<SolverBody>(minReservation);
461 461
462 for (int i = 0; i < bodies.Count; i++) 462 for (int i = 0; i < bodies.Count; i++)
463 { 463 {
464 RigidBody rb = RigidBody.Upcast(bodies[i]); 464 RigidBody rb = RigidBody.Upcast(bodies[i]);
465 if (rb != null && rb.IslandTag >= 0) 465 if (rb != null && rb.IslandTag >= 0)
466 { 466 {
467 BulletDebug.Assert(rb.CompanionID < 0); 467 BulletDebug.Assert(rb.CompanionID < 0);
468 int solverBodyId = _tmpSolverBodyPool.Count; 468 int solverBodyId = _tmpSolverBodyPool.Count;
469 SolverBody solverBody; 469 SolverBody solverBody;
470 InitSolverBody(out solverBody, rb); 470 InitSolverBody(out solverBody, rb);
471 _tmpSolverBodyPool.Add(solverBody); 471 _tmpSolverBodyPool.Add(solverBody);
472 rb.CompanionID = solverBodyId; 472 rb.CompanionID = solverBodyId;
473 } 473 }
474 } 474 }
475 475
476 _tmpSolverConstraintPool = new List<SolverConstraint>(minReservation); 476 _tmpSolverConstraintPool = new List<SolverConstraint>(minReservation);
477 _tmpSolverFrictionConstraintPool = new List<SolverConstraint>(minReservation); 477 _tmpSolverFrictionConstraintPool = new List<SolverConstraint>(minReservation);
478 478
479 for (int i = 0; i < numManifolds; i++) 479 for (int i = 0; i < numManifolds; i++)
480 { 480 {
481 PersistentManifold manifold = manifolds[i]; 481 PersistentManifold manifold = manifolds[i];
482 RigidBody rb0 = (RigidBody)manifold.BodyA; 482 RigidBody rb0 = (RigidBody)manifold.BodyA;
483 RigidBody rb1 = (RigidBody)manifold.BodyB; 483 RigidBody rb1 = (RigidBody)manifold.BodyB;
484 484
485 int solverBodyIdA = -1; 485 int solverBodyIdA = -1;
486 int solverBodyIdB = -1; 486 int solverBodyIdB = -1;
487 487
488 //if (i == 89) 488 //if (i == 89)
489 // System.Diagnostics.Debugger.Break(); 489 // System.Diagnostics.Debugger.Break();
490 490
491 if (manifold.ContactsCount != 0) 491 if (manifold.ContactsCount != 0)
492 { 492 {
493 if (rb0.IslandTag >= 0) 493 if (rb0.IslandTag >= 0)
494 { 494 {
495 solverBodyIdA = rb0.CompanionID; 495 solverBodyIdA = rb0.CompanionID;
496 } 496 }
497 else 497 else
498 { 498 {
499 //create a static body 499 //create a static body
500 solverBodyIdA = _tmpSolverBodyPool.Count; 500 solverBodyIdA = _tmpSolverBodyPool.Count;
501 SolverBody solverBody; 501 SolverBody solverBody;
502 InitSolverBody(out solverBody, rb0); 502 InitSolverBody(out solverBody, rb0);
503 _tmpSolverBodyPool.Add(solverBody); 503 _tmpSolverBodyPool.Add(solverBody);
504 } 504 }
505 505
506 if (rb1.IslandTag >= 0) 506 if (rb1.IslandTag >= 0)
507 { 507 {
508 solverBodyIdB = rb1.CompanionID; 508 solverBodyIdB = rb1.CompanionID;
509 } 509 }
510 else 510 else
511 { 511 {
512 //create a static body 512 //create a static body
513 solverBodyIdB = _tmpSolverBodyPool.Count; 513 solverBodyIdB = _tmpSolverBodyPool.Count;
514 SolverBody solverBody; 514 SolverBody solverBody;
515 InitSolverBody(out solverBody, rb1); 515 InitSolverBody(out solverBody, rb1);
516 _tmpSolverBodyPool.Add(solverBody); 516 _tmpSolverBodyPool.Add(solverBody);
517 } 517 }
518 } 518 }
519 519
520 if (solverBodyIdB == -1 || solverBodyIdA == -1) 520 if (solverBodyIdB == -1 || solverBodyIdA == -1)
521 System.Diagnostics.Debug.WriteLine(string.Format("We're in ass ! {0}", i)); 521 System.Diagnostics.Debug.WriteLine(string.Format("We're in ass ! {0}", i));
522 522
523 for (int j = 0; j < manifold.ContactsCount; j++) 523 for (int j = 0; j < manifold.ContactsCount; j++)
524 { 524 {
525 ManifoldPoint cp = manifold.GetContactPoint(j); 525 ManifoldPoint cp = manifold.GetContactPoint(j);
526 526
527 int frictionIndex = _tmpSolverConstraintPool.Count; 527 int frictionIndex = _tmpSolverConstraintPool.Count;
528 528
529 if (cp.Distance <= 0) 529 if (cp.Distance <= 0)
530 { 530 {
531 531
532 Vector3 pos1 = cp.PositionWorldOnA; 532 Vector3 pos1 = cp.PositionWorldOnA;
533 Vector3 pos2 = cp.PositionWorldOnB; 533 Vector3 pos2 = cp.PositionWorldOnB;
534 534
535 Vector3 rel_pos1 = pos1 - rb0.CenterOfMassPosition; 535 Vector3 rel_pos1 = pos1 - rb0.CenterOfMassPosition;
536 Vector3 rel_pos2 = pos2 - rb1.CenterOfMassPosition; 536 Vector3 rel_pos2 = pos2 - rb1.CenterOfMassPosition;
537 537
538 float relaxation = 1; 538 float relaxation = 1;
539 { 539 {
540 SolverConstraint solverConstraint = new SolverConstraint(); 540 SolverConstraint solverConstraint = new SolverConstraint();
541 _tmpSolverConstraintPool.Add(solverConstraint); 541 _tmpSolverConstraintPool.Add(solverConstraint);
542 542
543 solverConstraint.SolverBodyIdA = solverBodyIdA; 543 solverConstraint.SolverBodyIdA = solverBodyIdA;
544 solverConstraint.SolverBodyIdB = solverBodyIdB; 544 solverConstraint.SolverBodyIdB = solverBodyIdB;
545 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Contact; 545 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Contact;
546 546
547 //can be optimized, the cross products are already calculated 547 //can be optimized, the cross products are already calculated
548 float denom0 = rb0.ComputeImpulseDenominator(pos1, cp.NormalWorldOnB); 548 float denom0 = rb0.ComputeImpulseDenominator(pos1, cp.NormalWorldOnB);
549 float denom1 = rb1.ComputeImpulseDenominator(pos2, cp.NormalWorldOnB); 549 float denom1 = rb1.ComputeImpulseDenominator(pos2, cp.NormalWorldOnB);
550 float denom = relaxation / (denom0 + denom1); 550 float denom = relaxation / (denom0 + denom1);
551 solverConstraint.JacDiagABInv = denom; 551 solverConstraint.JacDiagABInv = denom;
552 552
553 solverConstraint.ContactNormal = cp.NormalWorldOnB; 553 solverConstraint.ContactNormal = cp.NormalWorldOnB;
554 solverConstraint.RelPosACrossNormal = Vector3.Cross(rel_pos1, cp.NormalWorldOnB); 554 solverConstraint.RelPosACrossNormal = Vector3.Cross(rel_pos1, cp.NormalWorldOnB);
555 solverConstraint.RelPosBCrossNormal = Vector3.Cross(rel_pos2, cp.NormalWorldOnB); 555 solverConstraint.RelPosBCrossNormal = Vector3.Cross(rel_pos2, cp.NormalWorldOnB);
556 556
557 Vector3 vel1 = rb0.GetVelocityInLocalPoint(rel_pos1); 557 Vector3 vel1 = rb0.GetVelocityInLocalPoint(rel_pos1);
558 Vector3 vel2 = rb1.GetVelocityInLocalPoint(rel_pos2); 558 Vector3 vel2 = rb1.GetVelocityInLocalPoint(rel_pos2);
559 559
560 Vector3 vel = vel1 - vel2; 560 Vector3 vel = vel1 - vel2;
561 float rel_vel; 561 float rel_vel;
562 rel_vel = Vector3.Dot(cp.NormalWorldOnB, vel); 562 rel_vel = Vector3.Dot(cp.NormalWorldOnB, vel);
563 563
564 564
565 solverConstraint.Penetration = cp.Distance;//btScalar(infoGlobal.m_numIterations); 565 solverConstraint.Penetration = cp.Distance;//btScalar(infoGlobal.m_numIterations);
566 solverConstraint.Friction = cp.CombinedFriction; 566 solverConstraint.Friction = cp.CombinedFriction;
567 float rest = RestitutionCurve(rel_vel, cp.CombinedRestitution); 567 float rest = RestitutionCurve(rel_vel, cp.CombinedRestitution);
568 if (rest <= 0) 568 if (rest <= 0)
569 { 569 {
570 rest = 0; 570 rest = 0;
571 } 571 }
572 572
573 float penVel = -solverConstraint.Penetration / infoGlobal.TimeStep; 573 float penVel = -solverConstraint.Penetration / infoGlobal.TimeStep;
574 if (rest > penVel) 574 if (rest > penVel)
575 { 575 {
576 rest = 0; 576 rest = 0;
577 } 577 }
578 solverConstraint.Restitution = rest; 578 solverConstraint.Restitution = rest;
579 579
580 solverConstraint.Penetration *= -(infoGlobal.Erp / infoGlobal.TimeStep); 580 solverConstraint.Penetration *= -(infoGlobal.Erp / infoGlobal.TimeStep);
581 581
582 solverConstraint.AppliedImpulse = 0f; 582 solverConstraint.AppliedImpulse = 0f;
583 solverConstraint.AppliedVelocityImpulse = 0f; 583 solverConstraint.AppliedVelocityImpulse = 0f;
584 584
585#warning Check to see if we need Vector3.Transform 585#warning Check to see if we need Vector3.Transform
586 Vector3 torqueAxis0 = Vector3.Cross(rel_pos1, cp.NormalWorldOnB); 586 Vector3 torqueAxis0 = Vector3.Cross(rel_pos1, cp.NormalWorldOnB);
587 solverConstraint.AngularComponentA = Vector3.TransformNormal(torqueAxis0, rb0.InvInertiaTensorWorld); 587 solverConstraint.AngularComponentA = Vector3.TransformNormal(torqueAxis0, rb0.InvInertiaTensorWorld);
588 Vector3 torqueAxis1 = Vector3.Cross(rel_pos2, cp.NormalWorldOnB); 588 Vector3 torqueAxis1 = Vector3.Cross(rel_pos2, cp.NormalWorldOnB);
589 solverConstraint.AngularComponentB = Vector3.TransformNormal(torqueAxis1, rb1.InvInertiaTensorWorld); 589 solverConstraint.AngularComponentB = Vector3.TransformNormal(torqueAxis1, rb1.InvInertiaTensorWorld);
590 } 590 }
591 //create 2 '1d axis' constraints for 2 tangential friction directions 591 //create 2 '1d axis' constraints for 2 tangential friction directions
592 592
593 //re-calculate friction direction every frame, todo: check if this is really needed 593 //re-calculate friction direction every frame, todo: check if this is really needed
594 Vector3 frictionTangential0a = new Vector3(), 594 Vector3 frictionTangential0a = new Vector3(),
595 frictionTangential1b = new Vector3(); 595 frictionTangential1b = new Vector3();
596 596
597 MathHelper.PlaneSpace1(cp.NormalWorldOnB, ref frictionTangential0a, ref frictionTangential1b); 597 MathHelper.PlaneSpace1(cp.NormalWorldOnB, ref frictionTangential0a, ref frictionTangential1b);
598 { 598 {
599 SolverConstraint solverConstraint = new SolverConstraint(); 599 SolverConstraint solverConstraint = new SolverConstraint();
600 _tmpSolverFrictionConstraintPool.Add(solverConstraint); 600 _tmpSolverFrictionConstraintPool.Add(solverConstraint);
601 solverConstraint.ContactNormal = frictionTangential0a; 601 solverConstraint.ContactNormal = frictionTangential0a;
602 602
603 solverConstraint.SolverBodyIdA = solverBodyIdA; 603 solverConstraint.SolverBodyIdA = solverBodyIdA;
604 solverConstraint.SolverBodyIdB = solverBodyIdB; 604 solverConstraint.SolverBodyIdB = solverBodyIdB;
605 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Friction; 605 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Friction;
606 solverConstraint.FrictionIndex = frictionIndex; 606 solverConstraint.FrictionIndex = frictionIndex;
607 607
608 solverConstraint.Friction = cp.CombinedFriction; 608 solverConstraint.Friction = cp.CombinedFriction;
609 609
610 solverConstraint.AppliedImpulse = 0; 610 solverConstraint.AppliedImpulse = 0;
611 solverConstraint.AppliedVelocityImpulse = 0; 611 solverConstraint.AppliedVelocityImpulse = 0;
612 612
613 float denom0 = rb0.ComputeImpulseDenominator(pos1, solverConstraint.ContactNormal); 613 float denom0 = rb0.ComputeImpulseDenominator(pos1, solverConstraint.ContactNormal);
614 float denom1 = rb1.ComputeImpulseDenominator(pos2, solverConstraint.ContactNormal); 614 float denom1 = rb1.ComputeImpulseDenominator(pos2, solverConstraint.ContactNormal);
615 float denom = relaxation / (denom0 + denom1); 615 float denom = relaxation / (denom0 + denom1);
616 solverConstraint.JacDiagABInv = denom; 616 solverConstraint.JacDiagABInv = denom;
617 617
618 { 618 {
619 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos1, solverConstraint.ContactNormal); 619 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos1, solverConstraint.ContactNormal);
620 solverConstraint.RelPosACrossNormal = ftorqueAxis0; 620 solverConstraint.RelPosACrossNormal = ftorqueAxis0;
621 solverConstraint.AngularComponentA = Vector3.TransformNormal(ftorqueAxis0, rb0.InvInertiaTensorWorld); 621 solverConstraint.AngularComponentA = Vector3.TransformNormal(ftorqueAxis0, rb0.InvInertiaTensorWorld);
622 } 622 }
623 { 623 {
624 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos2, solverConstraint.ContactNormal); 624 Vector3 ftorqueAxis0 = Vector3.Cross(rel_pos2, solverConstraint.ContactNormal);
625 solverConstraint.RelPosBCrossNormal = ftorqueAxis0; 625 solverConstraint.RelPosBCrossNormal = ftorqueAxis0;
626 solverConstraint.AngularComponentB = Vector3.TransformNormal(ftorqueAxis0, rb1.InvInertiaTensorWorld); 626 solverConstraint.AngularComponentB = Vector3.TransformNormal(ftorqueAxis0, rb1.InvInertiaTensorWorld);
627 } 627 }
628 } 628 }
629 629
630 630
631 { 631 {
632 632
633 SolverConstraint solverConstraint = new SolverConstraint(); 633 SolverConstraint solverConstraint = new SolverConstraint();
634 _tmpSolverFrictionConstraintPool.Add(solverConstraint); 634 _tmpSolverFrictionConstraintPool.Add(solverConstraint);
635 solverConstraint.ContactNormal = frictionTangential1b; 635 solverConstraint.ContactNormal = frictionTangential1b;
636 636
637 solverConstraint.SolverBodyIdA = solverBodyIdA; 637 solverConstraint.SolverBodyIdA = solverBodyIdA;
638 solverConstraint.SolverBodyIdB = solverBodyIdB; 638 solverConstraint.SolverBodyIdB = solverBodyIdB;
639 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Friction; 639 solverConstraint.ConstraintType = SolverConstraint.SolverConstraintType.Friction;
640 solverConstraint.FrictionIndex = frictionIndex; 640 solverConstraint.FrictionIndex = frictionIndex;
641 641
642 solverConstraint.Friction = cp.CombinedFriction; 642 solverConstraint.Friction = cp.CombinedFriction;
643 643
644 solverConstraint.AppliedImpulse = 0; 644 solverConstraint.AppliedImpulse = 0;
645 solverConstraint.AppliedVelocityImpulse = 0; 645 solverConstraint.AppliedVelocityImpulse = 0;
646 646
647 float denom0 = rb0.ComputeImpulseDenominator(pos1, solverConstraint.ContactNormal); 647 float denom0 = rb0.ComputeImpulseDenominator(pos1, solverConstraint.ContactNormal);
648 float denom1 = rb1.ComputeImpulseDenominator(pos2, solverConstraint.ContactNormal); 648 float denom1 = rb1.ComputeImpulseDenominator(pos2, solverConstraint.ContactNormal);
649 float denom = relaxation / (denom0 + denom1); 649 float denom = relaxation / (denom0 + denom1);
650 solverConstraint.JacDiagABInv = denom; 650 solverConstraint.JacDiagABInv = denom;
651 { 651 {
652 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos1, solverConstraint.ContactNormal); 652 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos1, solverConstraint.ContactNormal);
653 solverConstraint.RelPosACrossNormal = ftorqueAxis1; 653 solverConstraint.RelPosACrossNormal = ftorqueAxis1;
654 solverConstraint.AngularComponentA = Vector3.TransformNormal(ftorqueAxis1, rb0.InvInertiaTensorWorld); 654 solverConstraint.AngularComponentA = Vector3.TransformNormal(ftorqueAxis1, rb0.InvInertiaTensorWorld);
655 } 655 }
656 { 656 {
657 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos2, solverConstraint.ContactNormal); 657 Vector3 ftorqueAxis1 = Vector3.Cross(rel_pos2, solverConstraint.ContactNormal);
658 solverConstraint.RelPosBCrossNormal = ftorqueAxis1; 658 solverConstraint.RelPosBCrossNormal = ftorqueAxis1;
659 solverConstraint.AngularComponentB = Vector3.TransformNormal(ftorqueAxis1, rb1.InvInertiaTensorWorld); 659 solverConstraint.AngularComponentB = Vector3.TransformNormal(ftorqueAxis1, rb1.InvInertiaTensorWorld);
660 } 660 }
661 } 661 }
662 } 662 }
663 } 663 }
664 } 664 }
665 665
666 ContactSolverInfo info = infoGlobal; 666 ContactSolverInfo info = infoGlobal;
667 { 667 {
668 for (int j = 0; j < constraints.Count; j++) 668 for (int j = 0; j < constraints.Count; j++)
669 { 669 {
670 TypedConstraint constraint = constraints[j]; 670 TypedConstraint constraint = constraints[j];
671 constraint.BuildJacobian(); 671 constraint.BuildJacobian();
672 } 672 }
673 } 673 }
674 674
675 int numConstraintPool = _tmpSolverConstraintPool.Count; 675 int numConstraintPool = _tmpSolverConstraintPool.Count;
676 int numFrictionPool = _tmpSolverFrictionConstraintPool.Count; 676 int numFrictionPool = _tmpSolverFrictionConstraintPool.Count;
677 677
678 //todo: use stack allocator for such temporarily memory, same for solver bodies/constraints 678 //todo: use stack allocator for such temporarily memory, same for solver bodies/constraints
679 List<int> gOrderTmpConstraintPool = new List<int>(numConstraintPool); 679 List<int> gOrderTmpConstraintPool = new List<int>(numConstraintPool);
680 List<int> gOrderFrictionConstraintPool = new List<int>(numFrictionPool); 680 List<int> gOrderFrictionConstraintPool = new List<int>(numFrictionPool);
681 { 681 {
682 for (int i = 0; i < numConstraintPool; i++) 682 for (int i = 0; i < numConstraintPool; i++)
683 { 683 {
684 gOrderTmpConstraintPool.Add(i); 684 gOrderTmpConstraintPool.Add(i);
685 } 685 }
686 for (int i = 0; i < numFrictionPool; i++) 686 for (int i = 0; i < numFrictionPool; i++)
687 { 687 {
688 gOrderFrictionConstraintPool.Add(i); 688 gOrderFrictionConstraintPool.Add(i);
689 } 689 }
690 } 690 }
691 691
692 //should traverse the contacts random order... 692 //should traverse the contacts random order...
693 int iteration; 693 int iteration;
694 { 694 {
695 for (iteration = 0; iteration < info.IterationsCount; iteration++) 695 for (iteration = 0; iteration < info.IterationsCount; iteration++)
696 { 696 {
697 697
698 int j; 698 int j;
699 if ((_solverMode & SolverMode.RandomizeOrder) != SolverMode.None) 699 if ((_solverMode & SolverMode.RandomizeOrder) != SolverMode.None)
700 { 700 {
701 if ((iteration & 7) == 0) 701 if ((iteration & 7) == 0)
702 { 702 {
703 for (j = 0; j < numConstraintPool; ++j) 703 for (j = 0; j < numConstraintPool; ++j)
704 { 704 {
705 int tmp = gOrderTmpConstraintPool[j]; 705 int tmp = gOrderTmpConstraintPool[j];
706 int swapi = RandInt2(j + 1); 706 int swapi = RandInt2(j + 1);
707 gOrderTmpConstraintPool[j] = gOrderTmpConstraintPool[swapi]; 707 gOrderTmpConstraintPool[j] = gOrderTmpConstraintPool[swapi];
708 gOrderTmpConstraintPool[swapi] = tmp; 708 gOrderTmpConstraintPool[swapi] = tmp;
709 } 709 }
710 710
711 for (j = 0; j < numFrictionPool; ++j) 711 for (j = 0; j < numFrictionPool; ++j)
712 { 712 {
713 int tmp = gOrderFrictionConstraintPool[j]; 713 int tmp = gOrderFrictionConstraintPool[j];
714 int swapi = RandInt2(j + 1); 714 int swapi = RandInt2(j + 1);
715 gOrderFrictionConstraintPool[j] = gOrderFrictionConstraintPool[swapi]; 715 gOrderFrictionConstraintPool[j] = gOrderFrictionConstraintPool[swapi];
716 gOrderFrictionConstraintPool[swapi] = tmp; 716 gOrderFrictionConstraintPool[swapi] = tmp;
717 } 717 }
718 } 718 }
719 } 719 }
720 720
721 for (j = 0; j < constraints.Count; j++) 721 for (j = 0; j < constraints.Count; j++)
722 { 722 {
723 TypedConstraint constraint = constraints[j]; 723 TypedConstraint constraint = constraints[j];
724 //todo: use solver bodies, so we don't need to copy from/to btRigidBody 724 //todo: use solver bodies, so we don't need to copy from/to btRigidBody
725 725
726 if ((constraint.RigidBodyA.IslandTag >= 0) && (constraint.RigidBodyA.CompanionID >= 0)) 726 if ((constraint.RigidBodyA.IslandTag >= 0) && (constraint.RigidBodyA.CompanionID >= 0))
727 { 727 {
728 _tmpSolverBodyPool[constraint.RigidBodyA.CompanionID].WriteBackVelocity(); 728 _tmpSolverBodyPool[constraint.RigidBodyA.CompanionID].WriteBackVelocity();
729 } 729 }
730 if ((constraint.RigidBodyB.IslandTag >= 0) && (constraint.RigidBodyB.CompanionID >= 0)) 730 if ((constraint.RigidBodyB.IslandTag >= 0) && (constraint.RigidBodyB.CompanionID >= 0))
731 { 731 {
732 _tmpSolverBodyPool[constraint.RigidBodyB.CompanionID].WriteBackVelocity(); 732 _tmpSolverBodyPool[constraint.RigidBodyB.CompanionID].WriteBackVelocity();
733 } 733 }
734 734
735 constraint.SolveConstraint(info.TimeStep); 735 constraint.SolveConstraint(info.TimeStep);
736 736
737 if ((constraint.RigidBodyA.IslandTag >= 0) && (constraint.RigidBodyA.CompanionID >= 0)) 737 if ((constraint.RigidBodyA.IslandTag >= 0) && (constraint.RigidBodyA.CompanionID >= 0))
738 { 738 {
739 _tmpSolverBodyPool[constraint.RigidBodyA.CompanionID].ReadVelocity(); 739 _tmpSolverBodyPool[constraint.RigidBodyA.CompanionID].ReadVelocity();
740 } 740 }
741 if ((constraint.RigidBodyB.IslandTag >= 0) && (constraint.RigidBodyB.CompanionID >= 0)) 741 if ((constraint.RigidBodyB.IslandTag >= 0) && (constraint.RigidBodyB.CompanionID >= 0))
742 { 742 {
743 _tmpSolverBodyPool[constraint.RigidBodyB.CompanionID].ReadVelocity(); 743 _tmpSolverBodyPool[constraint.RigidBodyB.CompanionID].ReadVelocity();
744 } 744 }
745 745
746 } 746 }
747 747
748 { 748 {
749 int numPoolConstraints = _tmpSolverConstraintPool.Count; 749 int numPoolConstraints = _tmpSolverConstraintPool.Count;
750 for (j = 0; j < numPoolConstraints; j++) 750 for (j = 0; j < numPoolConstraints; j++)
751 { 751 {
752 SolverConstraint solveManifold = _tmpSolverConstraintPool[gOrderTmpConstraintPool[j]]; 752 SolverConstraint solveManifold = _tmpSolverConstraintPool[gOrderTmpConstraintPool[j]];
753 ResolveSingleCollisionCombinedCacheFriendly(_tmpSolverBodyPool[solveManifold.SolverBodyIdA], 753 ResolveSingleCollisionCombinedCacheFriendly(_tmpSolverBodyPool[solveManifold.SolverBodyIdA],
754 _tmpSolverBodyPool[solveManifold.SolverBodyIdB], solveManifold, info); 754 _tmpSolverBodyPool[solveManifold.SolverBodyIdB], solveManifold, info);
755 } 755 }
756 } 756 }
757 757
758 { 758 {
759 int numFrictionPoolConstraints = _tmpSolverFrictionConstraintPool.Count; 759 int numFrictionPoolConstraints = _tmpSolverFrictionConstraintPool.Count;
760 for (j = 0; j < numFrictionPoolConstraints; j++) 760 for (j = 0; j < numFrictionPoolConstraints; j++)
761 { 761 {
762 SolverConstraint solveManifold = _tmpSolverFrictionConstraintPool[gOrderFrictionConstraintPool[j]]; 762 SolverConstraint solveManifold = _tmpSolverFrictionConstraintPool[gOrderFrictionConstraintPool[j]];
763 float appliedNormalImpulse = _tmpSolverConstraintPool[solveManifold.FrictionIndex].AppliedImpulse; 763 float appliedNormalImpulse = _tmpSolverConstraintPool[solveManifold.FrictionIndex].AppliedImpulse;
764 764
765 ResolveSingleFrictionCacheFriendly(_tmpSolverBodyPool[solveManifold.SolverBodyIdA], 765 ResolveSingleFrictionCacheFriendly(_tmpSolverBodyPool[solveManifold.SolverBodyIdA],
766 _tmpSolverBodyPool[solveManifold.SolverBodyIdB], solveManifold, info, appliedNormalImpulse); 766 _tmpSolverBodyPool[solveManifold.SolverBodyIdB], solveManifold, info, appliedNormalImpulse);
767 } 767 }
768 } 768 }
769 } 769 }
770 } 770 }
771 771
772 for (int i = 0; i < _tmpSolverBodyPool.Count; i++) 772 for (int i = 0; i < _tmpSolverBodyPool.Count; i++)
773 { 773 {
774 _tmpSolverBodyPool[i].WriteBackVelocity(); 774 _tmpSolverBodyPool[i].WriteBackVelocity();
775 } 775 }
776 776
777 _tmpSolverBodyPool.Clear(); 777 _tmpSolverBodyPool.Clear();
778 _tmpSolverConstraintPool.Clear(); 778 _tmpSolverConstraintPool.Clear();
779 _tmpSolverFrictionConstraintPool.Clear(); 779 _tmpSolverFrictionConstraintPool.Clear();
780 780
781 return 0; 781 return 0;
782 } 782 }
783 783
784 public virtual float SolveGroup(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo infoGlobal, IDebugDraw debugDrawer) 784 public virtual float SolveGroup(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, List<TypedConstraint> constraints, ContactSolverInfo infoGlobal, IDebugDraw debugDrawer)
785 { 785 {
786 if ((_solverMode & SolverMode.CacheFriendly) != SolverMode.None) 786 if ((_solverMode & SolverMode.CacheFriendly) != SolverMode.None)
787 { 787 {
788 return SolveGroupCacheFriendly(bodies, manifolds, numManifolds, constraints, infoGlobal, debugDrawer); 788 return SolveGroupCacheFriendly(bodies, manifolds, numManifolds, constraints, infoGlobal, debugDrawer);
789 } 789 }
790 790
791 ContactSolverInfo info = infoGlobal; 791 ContactSolverInfo info = infoGlobal;
792 int totalPoints = 0; 792 int totalPoints = 0;
793 793
794 int numiter = infoGlobal.IterationsCount; 794 int numiter = infoGlobal.IterationsCount;
795 795
796 for (int j = 0; j < manifolds.Count; j++) 796 for (int j = 0; j < manifolds.Count; j++)
797 { 797 {
798 PersistentManifold manifold = manifolds[j]; 798 PersistentManifold manifold = manifolds[j];
799 PrepareConstraints(manifold, info); 799 PrepareConstraints(manifold, info);
800 800
801 for (int p = 0; p < manifolds[j].ContactsCount; p++) 801 for (int p = 0; p < manifolds[j].ContactsCount; p++)
802 { 802 {
803 _order[totalPoints].ManifoldIndex = j; 803 _order[totalPoints].ManifoldIndex = j;
804 _order[totalPoints].PointIndex = p; 804 _order[totalPoints].PointIndex = p;
805 totalPoints++; 805 totalPoints++;
806 } 806 }
807 } 807 }
808 808
809 for (int j = 0; j < constraints.Count; j++) 809 for (int j = 0; j < constraints.Count; j++)
810 { 810 {
811 constraints[j].BuildJacobian(); 811 constraints[j].BuildJacobian();
812 } 812 }
813 813
814 //should traverse the contacts random order... 814 //should traverse the contacts random order...
815 int iteration; 815 int iteration;
816 816
817 for (iteration = 0; iteration < numiter; iteration++) 817 for (iteration = 0; iteration < numiter; iteration++)
818 { 818 {
819 int j; 819 int j;
820 if ((_solverMode & SolverMode.RandomizeOrder) != SolverMode.None) 820 if ((_solverMode & SolverMode.RandomizeOrder) != SolverMode.None)
821 { 821 {
822 if ((iteration & 7) == 0) 822 if ((iteration & 7) == 0)
823 { 823 {
824 for (j = 0; j < totalPoints; ++j) 824 for (j = 0; j < totalPoints; ++j)
825 { 825 {
826 OrderIndex tmp = _order[j]; 826 OrderIndex tmp = _order[j];
827 int swapi = RandInt2(j + 1); 827 int swapi = RandInt2(j + 1);
828 _order[j] = _order[swapi]; 828 _order[j] = _order[swapi];
829 _order[swapi] = tmp; 829 _order[swapi] = tmp;
830 } 830 }
831 } 831 }
832 } 832 }
833 833
834 for (j = 0; j < constraints.Count; j++) 834 for (j = 0; j < constraints.Count; j++)
835 { 835 {
836 constraints[j].SolveConstraint(info.TimeStep); 836 constraints[j].SolveConstraint(info.TimeStep);
837 } 837 }
838 838
839 for (j = 0; j < totalPoints; j++) 839 for (j = 0; j < totalPoints; j++)
840 { 840 {
841 PersistentManifold manifold = manifolds[_order[j].ManifoldIndex]; 841 PersistentManifold manifold = manifolds[_order[j].ManifoldIndex];
842 Solve((RigidBody)manifold.BodyA, (RigidBody)manifold.BodyB, 842 Solve((RigidBody)manifold.BodyA, (RigidBody)manifold.BodyB,
843 manifold.GetContactPoint(_order[j].PointIndex), info, iteration, debugDrawer); 843 manifold.GetContactPoint(_order[j].PointIndex), info, iteration, debugDrawer);
844 } 844 }
845 845
846 for (j = 0; j < totalPoints; j++) 846 for (j = 0; j < totalPoints; j++)
847 { 847 {
848 PersistentManifold manifold = manifolds[_order[j].ManifoldIndex]; 848 PersistentManifold manifold = manifolds[_order[j].ManifoldIndex];
849 SolveFriction((RigidBody)manifold.BodyA, 849 SolveFriction((RigidBody)manifold.BodyA,
850 (RigidBody)manifold.BodyB, manifold.GetContactPoint(_order[j].PointIndex), info, iteration, debugDrawer); 850 (RigidBody)manifold.BodyB, manifold.GetContactPoint(_order[j].PointIndex), info, iteration, debugDrawer);
851 } 851 }
852 } 852 }
853 853
854 return 0; 854 return 0;
855 } 855 }
856 856
857 private void InitSolverBody(out SolverBody solverBody, RigidBody rigidBody) 857 private void InitSolverBody(out SolverBody solverBody, RigidBody rigidBody)
858 { 858 {
859 solverBody = new SolverBody(); 859 solverBody = new SolverBody();
860 solverBody.AngularVelocity = rigidBody.AngularVelocity; 860 solverBody.AngularVelocity = rigidBody.AngularVelocity;
861 solverBody.CenterOfMassPosition = rigidBody.CenterOfMassPosition; 861 solverBody.CenterOfMassPosition = rigidBody.CenterOfMassPosition;
862 solverBody.Friction = rigidBody.Friction; 862 solverBody.Friction = rigidBody.Friction;
863 solverBody.InvMass = rigidBody.InverseMass; 863 solverBody.InvMass = rigidBody.InverseMass;
864 solverBody.LinearVelocity = rigidBody.LinearVelocity; 864 solverBody.LinearVelocity = rigidBody.LinearVelocity;
865 solverBody.OriginalBody = rigidBody; 865 solverBody.OriginalBody = rigidBody;
866 solverBody.AngularFactor = rigidBody.AngularFactor; 866 solverBody.AngularFactor = rigidBody.AngularFactor;
867 } 867 }
868 868
869 private long Rand2() 869 private long Rand2()
870 { 870 {
871 _seed2 = (1664525L * _seed2 + 1013904223L) & 0xffffffff; 871 _seed2 = (1664525L * _seed2 + 1013904223L) & 0xffffffff;
872 return _seed2; 872 return _seed2;
873 } 873 }
874 874
875 private int RandInt2(int n) 875 private int RandInt2(int n)
876 { 876 {
877 // seems good; xor-fold and modulus 877 // seems good; xor-fold and modulus
878 long un = n; 878 long un = n;
879 long r = Rand2(); 879 long r = Rand2();
880 880
881 // note: probably more aggressive than it needs to be -- might be 881 // note: probably more aggressive than it needs to be -- might be
882 // able to get away without one or two of the innermost branches. 882 // able to get away without one or two of the innermost branches.
883 if (un <= 0x00010000L) 883 if (un <= 0x00010000L)
884 { 884 {
885 r ^= (r >> 16); 885 r ^= (r >> 16);
886 if (un <= 0x00000100L) 886 if (un <= 0x00000100L)
887 { 887 {
888 r ^= (r >> 8); 888 r ^= (r >> 8);
889 if (un <= 0x00000010L) 889 if (un <= 0x00000010L)
890 { 890 {
891 r ^= (r >> 4); 891 r ^= (r >> 4);
892 if (un <= 0x00000004L) 892 if (un <= 0x00000004L)
893 { 893 {
894 r ^= (r >> 2); 894 r ^= (r >> 2);
895 if (un <= 0x00000002L) 895 if (un <= 0x00000002L)
896 { 896 {
897 r ^= (r >> 1); 897 r ^= (r >> 1);
898 } 898 }
899 } 899 }
900 } 900 }
901 } 901 }
902 } 902 }
903 return (int)(r % un); 903 return (int)(r % un);
904 } 904 }
905 905
906 protected struct OrderIndex 906 protected struct OrderIndex
907 { 907 {
908 private int _manifoldIndex; 908 private int _manifoldIndex;
909 private int _pointIndex; 909 private int _pointIndex;
910 910
911 public int ManifoldIndex { get { return _manifoldIndex; } set { _manifoldIndex = value; } } 911 public int ManifoldIndex { get { return _manifoldIndex; } set { _manifoldIndex = value; } }
912 public int PointIndex { get { return _pointIndex; } set { _pointIndex = value; } } 912 public int PointIndex { get { return _pointIndex; } set { _pointIndex = value; } }
913 } 913 }
914 } 914 }
915} 915}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Solve2LinearConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Solve2LinearConstraint.cs
index 6ced783..9d4060d 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Solve2LinearConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/Solve2LinearConstraint.cs
@@ -1,188 +1,188 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// constraint class used for lateral tyre friction 30 /// constraint class used for lateral tyre friction
31 /// </summary> 31 /// </summary>
32 public class Solve2LinearConstraint 32 public class Solve2LinearConstraint
33 { 33 {
34 private float _tau; 34 private float _tau;
35 private float _damping; 35 private float _damping;
36 36
37 public Solve2LinearConstraint(float tau, float damping) 37 public Solve2LinearConstraint(float tau, float damping)
38 { 38 {
39 _tau = tau; 39 _tau = tau;
40 _damping = damping; 40 _damping = damping;
41 } 41 }
42 42
43 // solve unilateral constraint (equality, direct method) 43 // solve unilateral constraint (equality, direct method)
44 public void ResolveUnilateralPairConstraint( 44 public void ResolveUnilateralPairConstraint(
45 RigidBody body1, RigidBody body2, 45 RigidBody body1, RigidBody body2,
46 Matrix world2A, 46 Matrix world2A,
47 Matrix world2B, 47 Matrix world2B,
48 Vector3 invInertiaADiag, 48 Vector3 invInertiaADiag,
49 float invMassA, 49 float invMassA,
50 Vector3 linvelA, Vector3 angvelA, 50 Vector3 linvelA, Vector3 angvelA,
51 Vector3 rel_posA1, 51 Vector3 rel_posA1,
52 Vector3 invInertiaBDiag, 52 Vector3 invInertiaBDiag,
53 float invMassB, 53 float invMassB,
54 Vector3 linvelB, Vector3 angvelB, 54 Vector3 linvelB, Vector3 angvelB,
55 Vector3 rel_posA2, 55 Vector3 rel_posA2,
56 float depthA, Vector3 normalA, 56 float depthA, Vector3 normalA,
57 Vector3 rel_posB1, Vector3 rel_posB2, 57 Vector3 rel_posB1, Vector3 rel_posB2,
58 float depthB, Vector3 normalB, 58 float depthB, Vector3 normalB,
59 out float imp0, out float imp1) 59 out float imp0, out float imp1)
60 { 60 {
61 imp0 = 0; 61 imp0 = 0;
62 imp1 = 0; 62 imp1 = 0;
63 63
64 float len = Math.Abs(normalA.Length()) - 1f; 64 float len = Math.Abs(normalA.Length()) - 1f;
65 if (Math.Abs(len) >= float.Epsilon) 65 if (Math.Abs(len) >= float.Epsilon)
66 return; 66 return;
67 67
68 BulletDebug.Assert(len < float.Epsilon); 68 BulletDebug.Assert(len < float.Epsilon);
69 69
70 //this jacobian entry could be re-used for all iterations 70 //this jacobian entry could be re-used for all iterations
71 JacobianEntry jacA = new JacobianEntry(world2A, world2B, rel_posA1, rel_posA2, normalA, invInertiaADiag, invMassA, 71 JacobianEntry jacA = new JacobianEntry(world2A, world2B, rel_posA1, rel_posA2, normalA, invInertiaADiag, invMassA,
72 invInertiaBDiag, invMassB); 72 invInertiaBDiag, invMassB);
73 JacobianEntry jacB = new JacobianEntry(world2A, world2B, rel_posB1, rel_posB2, normalB, invInertiaADiag, invMassA, 73 JacobianEntry jacB = new JacobianEntry(world2A, world2B, rel_posB1, rel_posB2, normalB, invInertiaADiag, invMassA,
74 invInertiaBDiag, invMassB); 74 invInertiaBDiag, invMassB);
75 75
76 float vel0 = Vector3.Dot(normalA, body1.GetVelocityInLocalPoint(rel_posA1) - body2.GetVelocityInLocalPoint(rel_posA1)); 76 float vel0 = Vector3.Dot(normalA, body1.GetVelocityInLocalPoint(rel_posA1) - body2.GetVelocityInLocalPoint(rel_posA1));
77 float vel1 = Vector3.Dot(normalB, body1.GetVelocityInLocalPoint(rel_posB1) - body2.GetVelocityInLocalPoint(rel_posB1)); 77 float vel1 = Vector3.Dot(normalB, body1.GetVelocityInLocalPoint(rel_posB1) - body2.GetVelocityInLocalPoint(rel_posB1));
78 78
79 // btScalar penetrationImpulse = (depth*contactTau*timeCorrection) * massTerm;//jacDiagABInv 79 // btScalar penetrationImpulse = (depth*contactTau*timeCorrection) * massTerm;//jacDiagABInv
80 float massTerm = 1f / (invMassA + invMassB); 80 float massTerm = 1f / (invMassA + invMassB);
81 81
82 // calculate rhs (or error) terms 82 // calculate rhs (or error) terms
83 float dv0 = depthA * _tau * massTerm - vel0 * _damping; 83 float dv0 = depthA * _tau * massTerm - vel0 * _damping;
84 float dv1 = depthB * _tau * massTerm - vel1 * _damping; 84 float dv1 = depthB * _tau * massTerm - vel1 * _damping;
85 85
86 float nonDiag = jacA.GetNonDiagonal(jacB, invMassA, invMassB); 86 float nonDiag = jacA.GetNonDiagonal(jacB, invMassA, invMassB);
87 float invDet = 1.0f / (jacA.Diagonal * jacB.Diagonal - nonDiag * nonDiag); 87 float invDet = 1.0f / (jacA.Diagonal * jacB.Diagonal - nonDiag * nonDiag);
88 88
89 imp0 = dv0 * jacA.Diagonal * invDet + dv1 * -nonDiag * invDet; 89 imp0 = dv0 * jacA.Diagonal * invDet + dv1 * -nonDiag * invDet;
90 imp1 = dv1 * jacB.Diagonal * invDet + dv0 * -nonDiag * invDet; 90 imp1 = dv1 * jacB.Diagonal * invDet + dv0 * -nonDiag * invDet;
91 } 91 }
92 92
93 // solving 2x2 lcp problem (inequality, direct solution ) 93 // solving 2x2 lcp problem (inequality, direct solution )
94 public void ResolveBilateralPairConstraint( 94 public void ResolveBilateralPairConstraint(
95 RigidBody body1, RigidBody body2, 95 RigidBody body1, RigidBody body2,
96 Matrix world2A, Matrix world2B, 96 Matrix world2A, Matrix world2B,
97 Vector3 invInertiaADiag, 97 Vector3 invInertiaADiag,
98 float invMassA, 98 float invMassA,
99 Vector3 linvelA, Vector3 angvelA, 99 Vector3 linvelA, Vector3 angvelA,
100 Vector3 rel_posA1, 100 Vector3 rel_posA1,
101 Vector3 invInertiaBDiag, 101 Vector3 invInertiaBDiag,
102 float invMassB, 102 float invMassB,
103 Vector3 linvelB, Vector3 angvelB, 103 Vector3 linvelB, Vector3 angvelB,
104 Vector3 rel_posA2, 104 Vector3 rel_posA2,
105 float depthA, Vector3 normalA, 105 float depthA, Vector3 normalA,
106 Vector3 rel_posB1, Vector3 rel_posB2, 106 Vector3 rel_posB1, Vector3 rel_posB2,
107 float depthB, Vector3 normalB, 107 float depthB, Vector3 normalB,
108 out float imp0, out float imp1) 108 out float imp0, out float imp1)
109 { 109 {
110 imp0 = 0f; 110 imp0 = 0f;
111 imp1 = 0f; 111 imp1 = 0f;
112 112
113 float len = Math.Abs(normalA.Length()) - 1f; 113 float len = Math.Abs(normalA.Length()) - 1f;
114 if (Math.Abs(len) >= float.Epsilon) 114 if (Math.Abs(len) >= float.Epsilon)
115 return; 115 return;
116 116
117 BulletDebug.Assert(len < float.Epsilon); 117 BulletDebug.Assert(len < float.Epsilon);
118 118
119 JacobianEntry jacA = new JacobianEntry(world2A, world2B, rel_posA1, rel_posA2, normalA, invInertiaADiag, invMassA, 119 JacobianEntry jacA = new JacobianEntry(world2A, world2B, rel_posA1, rel_posA2, normalA, invInertiaADiag, invMassA,
120 invInertiaBDiag, invMassB); 120 invInertiaBDiag, invMassB);
121 JacobianEntry jacB = new JacobianEntry(world2A, world2B, rel_posB1, rel_posB2, normalB, invInertiaADiag, invMassA, 121 JacobianEntry jacB = new JacobianEntry(world2A, world2B, rel_posB1, rel_posB2, normalB, invInertiaADiag, invMassA,
122 invInertiaBDiag, invMassB); 122 invInertiaBDiag, invMassB);
123 123
124 float vel0 = Vector3.Dot(normalA, body1.GetVelocityInLocalPoint(rel_posA1) - body2.GetVelocityInLocalPoint(rel_posA1)); 124 float vel0 = Vector3.Dot(normalA, body1.GetVelocityInLocalPoint(rel_posA1) - body2.GetVelocityInLocalPoint(rel_posA1));
125 float vel1 = Vector3.Dot(normalB, body1.GetVelocityInLocalPoint(rel_posB1) - body2.GetVelocityInLocalPoint(rel_posB1)); 125 float vel1 = Vector3.Dot(normalB, body1.GetVelocityInLocalPoint(rel_posB1) - body2.GetVelocityInLocalPoint(rel_posB1));
126 126
127 // calculate rhs (or error) terms 127 // calculate rhs (or error) terms
128 float dv0 = depthA * _tau - vel0 * _damping; 128 float dv0 = depthA * _tau - vel0 * _damping;
129 float dv1 = depthB * _tau - vel1 * _damping; 129 float dv1 = depthB * _tau - vel1 * _damping;
130 130
131 float nonDiag = jacA.GetNonDiagonal(jacB, invMassA, invMassB); 131 float nonDiag = jacA.GetNonDiagonal(jacB, invMassA, invMassB);
132 float invDet = 1.0f / (jacA.Diagonal * jacB.Diagonal - nonDiag * nonDiag); 132 float invDet = 1.0f / (jacA.Diagonal * jacB.Diagonal - nonDiag * nonDiag);
133 133
134 imp0 = dv0 * jacA.Diagonal * invDet + dv1 * -nonDiag * invDet; 134 imp0 = dv0 * jacA.Diagonal * invDet + dv1 * -nonDiag * invDet;
135 imp1 = dv1 * jacB.Diagonal * invDet + dv0 * -nonDiag * invDet; 135 imp1 = dv1 * jacB.Diagonal * invDet + dv0 * -nonDiag * invDet;
136 136
137 if (imp0 > 0.0f) 137 if (imp0 > 0.0f)
138 { 138 {
139 if (imp1 <= 0.0f) 139 if (imp1 <= 0.0f)
140 { 140 {
141 imp1 = 0f; 141 imp1 = 0f;
142 142
143 // now imp0>0 imp1<0 143 // now imp0>0 imp1<0
144 imp0 = dv0 / jacA.Diagonal; 144 imp0 = dv0 / jacA.Diagonal;
145 if (imp0 < 0.0f) 145 if (imp0 < 0.0f)
146 imp0 = 0f; 146 imp0 = 0f;
147 } 147 }
148 } 148 }
149 else 149 else
150 { 150 {
151 imp0 = 0f; 151 imp0 = 0f;
152 152
153 imp1 = dv1 / jacB.Diagonal; 153 imp1 = dv1 / jacB.Diagonal;
154 if (imp1 <= 0.0f) 154 if (imp1 <= 0.0f)
155 { 155 {
156 imp1 = 0f; 156 imp1 = 0f;
157 // now imp0>0 imp1<0 157 // now imp0>0 imp1<0
158 imp0 = dv0 / jacA.Diagonal; 158 imp0 = dv0 / jacA.Diagonal;
159 if (imp0 > 0.0f) 159 if (imp0 > 0.0f)
160 { 160 {
161 } 161 }
162 else 162 else
163 { 163 {
164 imp0 = 0f; 164 imp0 = 0f;
165 } 165 }
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 //public void ResolveAngularConstraint( 170 //public void ResolveAngularConstraint(
171 // Matrix invInertiaAWS, 171 // Matrix invInertiaAWS,
172 // float invMassA, 172 // float invMassA,
173 // Vector3 linvelA, Vector3 angvelA, 173 // Vector3 linvelA, Vector3 angvelA,
174 // Vector3 rel_posA1, 174 // Vector3 rel_posA1,
175 // Matrix invInertiaBWS, 175 // Matrix invInertiaBWS,
176 // float invMassB, 176 // float invMassB,
177 // Vector3 linvelB, Vector3 angvelB, 177 // Vector3 linvelB, Vector3 angvelB,
178 // Vector3 rel_posA2, 178 // Vector3 rel_posA2,
179 // float depthA, Vector3 normalA, 179 // float depthA, Vector3 normalA,
180 // Vector3 rel_posB1, Vector3 rel_posB2, 180 // Vector3 rel_posB1, Vector3 rel_posB2,
181 // float depthB, Vector3 normalB, 181 // float depthB, Vector3 normalB,
182 // out float imp0, out float imp1) 182 // out float imp0, out float imp1)
183 //{ 183 //{
184 // imp0 = 0; 184 // imp0 = 0;
185 // imp1 = 0; 185 // imp1 = 0;
186 //} 186 //}
187 } 187 }
188} 188}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverBody.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverBody.cs
index 09b73cc..6996272 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverBody.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverBody.cs
@@ -1,78 +1,78 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26using System.Runtime.InteropServices; 26using System.Runtime.InteropServices;
27 27
28namespace XnaDevRu.BulletX.Dynamics 28namespace XnaDevRu.BulletX.Dynamics
29{ 29{
30 public class SolverBody 30 public class SolverBody
31 { 31 {
32 private Vector3 _centerOfMassPosition = new Vector3(); 32 private Vector3 _centerOfMassPosition = new Vector3();
33 private Vector3 _linearVelocity = new Vector3(); 33 private Vector3 _linearVelocity = new Vector3();
34 private Vector3 _angularVelocity = new Vector3(); 34 private Vector3 _angularVelocity = new Vector3();
35 private RigidBody _originalBody = null; 35 private RigidBody _originalBody = null;
36 private float _invMass; 36 private float _invMass;
37 private float _friction; 37 private float _friction;
38 private float _angularFactor; 38 private float _angularFactor;
39 39
40 public Vector3 CenterOfMassPosition { get { return _centerOfMassPosition; } set { _centerOfMassPosition = value; } } 40 public Vector3 CenterOfMassPosition { get { return _centerOfMassPosition; } set { _centerOfMassPosition = value; } }
41 public Vector3 LinearVelocity { get { return _linearVelocity; } set { _linearVelocity = value; } } 41 public Vector3 LinearVelocity { get { return _linearVelocity; } set { _linearVelocity = value; } }
42 public Vector3 AngularVelocity { get { return _angularVelocity; } set { _angularVelocity = value; } } 42 public Vector3 AngularVelocity { get { return _angularVelocity; } set { _angularVelocity = value; } }
43 public RigidBody OriginalBody { get { return _originalBody; } set { _originalBody = value; } } 43 public RigidBody OriginalBody { get { return _originalBody; } set { _originalBody = value; } }
44 public float InvMass { get { return _invMass; } set { _invMass = value; } } 44 public float InvMass { get { return _invMass; } set { _invMass = value; } }
45 public float Friction { get { return _friction; } set { _friction = value; } } 45 public float Friction { get { return _friction; } set { _friction = value; } }
46 public float AngularFactor { get { return _angularFactor; } set { _angularFactor = value; } } 46 public float AngularFactor { get { return _angularFactor; } set { _angularFactor = value; } }
47 47
48 public void GetVelocityInLocalPoint(Vector3 relPos, out Vector3 velocity) 48 public void GetVelocityInLocalPoint(Vector3 relPos, out Vector3 velocity)
49 { 49 {
50 velocity = _linearVelocity + Vector3.Cross(_angularVelocity, relPos); 50 velocity = _linearVelocity + Vector3.Cross(_angularVelocity, relPos);
51 } 51 }
52 52
53 public void WriteBackVelocity() 53 public void WriteBackVelocity()
54 { 54 {
55 if (_invMass != 0) 55 if (_invMass != 0)
56 { 56 {
57 _originalBody.LinearVelocity = _linearVelocity; 57 _originalBody.LinearVelocity = _linearVelocity;
58 _originalBody.AngularVelocity = _angularVelocity; 58 _originalBody.AngularVelocity = _angularVelocity;
59 } 59 }
60 } 60 }
61 61
62 public void ReadVelocity() 62 public void ReadVelocity()
63 { 63 {
64 if (_invMass != 0) 64 if (_invMass != 0)
65 { 65 {
66 _linearVelocity = _originalBody.LinearVelocity; 66 _linearVelocity = _originalBody.LinearVelocity;
67 _angularVelocity = _originalBody.AngularVelocity; 67 _angularVelocity = _originalBody.AngularVelocity;
68 } 68 }
69 } 69 }
70 70
71 //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position 71 //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position
72 internal void ApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) 72 internal void ApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude)
73 { 73 {
74 _linearVelocity += linearComponent * impulseMagnitude; 74 _linearVelocity += linearComponent * impulseMagnitude;
75 _angularVelocity += angularComponent * impulseMagnitude * _angularFactor; 75 _angularVelocity += angularComponent * impulseMagnitude * _angularFactor;
76 } 76 }
77 } 77 }
78} 78}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverConstraint.cs
index 3e3a64a..4fd0361 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/SolverConstraint.cs
@@ -1,77 +1,77 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26using System.Runtime.InteropServices; 26using System.Runtime.InteropServices;
27 27
28namespace XnaDevRu.BulletX.Dynamics 28namespace XnaDevRu.BulletX.Dynamics
29{ 29{
30 //1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. 30 //1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints.
31 public class SolverConstraint 31 public class SolverConstraint
32 { 32 {
33 private Vector3 _relpos1CrossNormal = new Vector3(); 33 private Vector3 _relpos1CrossNormal = new Vector3();
34 private Vector3 _relpos2CrossNormal = new Vector3(); 34 private Vector3 _relpos2CrossNormal = new Vector3();
35 private Vector3 _contactNormal = new Vector3(); 35 private Vector3 _contactNormal = new Vector3();
36 private Vector3 _angularComponentA = new Vector3(); 36 private Vector3 _angularComponentA = new Vector3();
37 private Vector3 _angularComponentB = new Vector3(); 37 private Vector3 _angularComponentB = new Vector3();
38 38
39 private float _appliedVelocityImpulse; 39 private float _appliedVelocityImpulse;
40 private int _solverBodyIdA; 40 private int _solverBodyIdA;
41 int _solverBodyIdB; 41 int _solverBodyIdB;
42 private float _friction; 42 private float _friction;
43 private float _restitution; 43 private float _restitution;
44 private float _jacDiagABInv; 44 private float _jacDiagABInv;
45 private float _penetration; 45 private float _penetration;
46 private float _appliedImpulse; 46 private float _appliedImpulse;
47 47
48 private SolverConstraintType _constraintType = SolverConstraintType.Contact; 48 private SolverConstraintType _constraintType = SolverConstraintType.Contact;
49 private int _frictionIndex; 49 private int _frictionIndex;
50 private int[] _unusedPadding = new int[2]; 50 private int[] _unusedPadding = new int[2];
51 51
52 public Vector3 RelPosACrossNormal { get { return _relpos1CrossNormal; } set { _relpos1CrossNormal = value; } } 52 public Vector3 RelPosACrossNormal { get { return _relpos1CrossNormal; } set { _relpos1CrossNormal = value; } }
53 public Vector3 RelPosBCrossNormal { get { return _relpos2CrossNormal; } set { _relpos2CrossNormal = value; } } 53 public Vector3 RelPosBCrossNormal { get { return _relpos2CrossNormal; } set { _relpos2CrossNormal = value; } }
54 public Vector3 ContactNormal { get { return _contactNormal; } set { _contactNormal = value; } } 54 public Vector3 ContactNormal { get { return _contactNormal; } set { _contactNormal = value; } }
55 public Vector3 AngularComponentA { get { return _angularComponentA; } set { _angularComponentA = value; } } 55 public Vector3 AngularComponentA { get { return _angularComponentA; } set { _angularComponentA = value; } }
56 public Vector3 AngularComponentB { get { return _angularComponentB; } set { _angularComponentB = value; } } 56 public Vector3 AngularComponentB { get { return _angularComponentB; } set { _angularComponentB = value; } }
57 57
58 public float AppliedVelocityImpulse { get { return _appliedVelocityImpulse; } set { _appliedVelocityImpulse = value; } } 58 public float AppliedVelocityImpulse { get { return _appliedVelocityImpulse; } set { _appliedVelocityImpulse = value; } }
59 public int SolverBodyIdA { get { return _solverBodyIdA; } set { _solverBodyIdA = value; } } 59 public int SolverBodyIdA { get { return _solverBodyIdA; } set { _solverBodyIdA = value; } }
60 public int SolverBodyIdB { get { return _solverBodyIdB; } set { _solverBodyIdB = value; } } 60 public int SolverBodyIdB { get { return _solverBodyIdB; } set { _solverBodyIdB = value; } }
61 public float Friction { get { return _friction; } set { _friction = value; } } 61 public float Friction { get { return _friction; } set { _friction = value; } }
62 public float Restitution { get { return _restitution; } set { _restitution = value; } } 62 public float Restitution { get { return _restitution; } set { _restitution = value; } }
63 public float JacDiagABInv { get { return _jacDiagABInv; } set { _jacDiagABInv = value; } } 63 public float JacDiagABInv { get { return _jacDiagABInv; } set { _jacDiagABInv = value; } }
64 public float Penetration { get { return _penetration; } set { _penetration = value; } } 64 public float Penetration { get { return _penetration; } set { _penetration = value; } }
65 public float AppliedImpulse { get { return _appliedImpulse; } set { _appliedImpulse = value; } } 65 public float AppliedImpulse { get { return _appliedImpulse; } set { _appliedImpulse = value; } }
66 66
67 public SolverConstraintType ConstraintType { get { return _constraintType; } set { _constraintType = value; } } 67 public SolverConstraintType ConstraintType { get { return _constraintType; } set { _constraintType = value; } }
68 public int FrictionIndex { get { return _frictionIndex; } set { _frictionIndex = value; } } 68 public int FrictionIndex { get { return _frictionIndex; } set { _frictionIndex = value; } }
69 public int[] UnusedPadding { get { return _unusedPadding; } set { _unusedPadding = value; } } 69 public int[] UnusedPadding { get { return _unusedPadding; } set { _unusedPadding = value; } }
70 70
71 public enum SolverConstraintType 71 public enum SolverConstraintType
72 { 72 {
73 Contact = 0, 73 Contact = 0,
74 Friction, 74 Friction,
75 } 75 }
76 } 76 }
77} 77}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/TypedConstraint.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/TypedConstraint.cs
index abd10f1..8131463 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/TypedConstraint.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/ConstraintSolver/TypedConstraint.cs
@@ -1,88 +1,88 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public abstract class TypedConstraint 29 public abstract class TypedConstraint
30 { 30 {
31 private static RigidBody _fixed = new RigidBody(0, null, null, new Vector3(), 0, 0, 0.5f, 0); 31 private static RigidBody _fixed = new RigidBody(0, null, null, new Vector3(), 0, 0, 0.5f, 0);
32 private int _userConstraintType; 32 private int _userConstraintType;
33 private int _userConstraintId; 33 private int _userConstraintId;
34 34
35 private RigidBody _rbA; 35 private RigidBody _rbA;
36 private RigidBody _rbB; 36 private RigidBody _rbB;
37 private float _appliedImpulse; 37 private float _appliedImpulse;
38 38
39 public TypedConstraint() 39 public TypedConstraint()
40 : this(_fixed, _fixed) { } 40 : this(_fixed, _fixed) { }
41 41
42 public TypedConstraint(RigidBody rbA) 42 public TypedConstraint(RigidBody rbA)
43 : this(rbA, _fixed) { } 43 : this(rbA, _fixed) { }
44 44
45 public TypedConstraint(RigidBody rbA, RigidBody rbB) 45 public TypedConstraint(RigidBody rbA, RigidBody rbB)
46 { 46 {
47 _userConstraintType = -1; 47 _userConstraintType = -1;
48 _userConstraintId = -1; 48 _userConstraintId = -1;
49 _rbA = rbA; 49 _rbA = rbA;
50 _rbB = rbB; 50 _rbB = rbB;
51 _appliedImpulse = 0; 51 _appliedImpulse = 0;
52 52
53 _fixed.SetMassProps(0, new Vector3()); 53 _fixed.SetMassProps(0, new Vector3());
54 } 54 }
55 55
56 public virtual RigidBody RigidBodyA { get { return _rbA; } protected set { _rbA = value; } } 56 public virtual RigidBody RigidBodyA { get { return _rbA; } protected set { _rbA = value; } }
57 public virtual RigidBody RigidBodyB { get { return _rbB; } protected set { _rbB = value; } } 57 public virtual RigidBody RigidBodyB { get { return _rbB; } protected set { _rbB = value; } }
58 58
59 public float AppliedImpulse { get { return _appliedImpulse; } protected set { _appliedImpulse = value; } } 59 public float AppliedImpulse { get { return _appliedImpulse; } protected set { _appliedImpulse = value; } }
60 public int UserConstraintId { get { return _userConstraintId; } set { _userConstraintId = value; } } 60 public int UserConstraintId { get { return _userConstraintId; } set { _userConstraintId = value; } }
61 public int UserConstraintType { get { return _userConstraintType; } set { _userConstraintType = value; } } 61 public int UserConstraintType { get { return _userConstraintType; } set { _userConstraintType = value; } }
62 62
63 public abstract void BuildJacobian(); 63 public abstract void BuildJacobian();
64 public abstract void SolveConstraint(float timeStep); 64 public abstract void SolveConstraint(float timeStep);
65 65
66 public static int SortConstraintOnIslandPredicate(TypedConstraint left, TypedConstraint right) 66 public static int SortConstraintOnIslandPredicate(TypedConstraint left, TypedConstraint right)
67 { 67 {
68 int rightIslandID, leftIslandID; 68 int rightIslandID, leftIslandID;
69 rightIslandID = GetConstraintIslandId(right); 69 rightIslandID = GetConstraintIslandId(right);
70 leftIslandID = GetConstraintIslandId(left); 70 leftIslandID = GetConstraintIslandId(left);
71 if (leftIslandID < rightIslandID) 71 if (leftIslandID < rightIslandID)
72 return -1; 72 return -1;
73 else 73 else
74 return 1; 74 return 1;
75 return 0; 75 return 0;
76 } 76 }
77 77
78 internal static int GetConstraintIslandId(TypedConstraint lhs) 78 internal static int GetConstraintIslandId(TypedConstraint lhs)
79 { 79 {
80 int islandId; 80 int islandId;
81 81
82 CollisionObject colObjA = lhs.RigidBodyA; 82 CollisionObject colObjA = lhs.RigidBodyA;
83 CollisionObject colObjB = lhs.RigidBodyB; 83 CollisionObject colObjB = lhs.RigidBodyB;
84 islandId = colObjA.IslandTag >= 0 ? colObjA.IslandTag : colObjB.IslandTag; 84 islandId = colObjA.IslandTag >= 0 ? colObjA.IslandTag : colObjB.IslandTag;
85 return islandId; 85 return islandId;
86 } 86 }
87 } 87 }
88} 88}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DiscreteDynamicsWorld.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DiscreteDynamicsWorld.cs
index acceb98..3702c2a 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DiscreteDynamicsWorld.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DiscreteDynamicsWorld.cs
@@ -1,790 +1,790 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 /// <summary> 29 /// <summary>
30 /// DiscreteDynamicsWorld provides discrete rigid body simulation 30 /// DiscreteDynamicsWorld provides discrete rigid body simulation
31 /// those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController 31 /// those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController
32 /// </summary> 32 /// </summary>
33 public class DiscreteDynamicsWorld : DynamicsWorld 33 public class DiscreteDynamicsWorld : DynamicsWorld
34 { 34 {
35 private static bool _reportMe = true; 35 private static bool _reportMe = true;
36 36
37 private IConstraintSolver _constraintSolver; 37 private IConstraintSolver _constraintSolver;
38 private SimulationIslandManager _islandManager; 38 private SimulationIslandManager _islandManager;
39 private List<TypedConstraint> _constraints = new List<TypedConstraint>(); 39 private List<TypedConstraint> _constraints = new List<TypedConstraint>();
40 private IDebugDraw _debugDrawer; 40 private IDebugDraw _debugDrawer;
41 private ContactSolverInfo _solverInfo = new ContactSolverInfo(); 41 private ContactSolverInfo _solverInfo = new ContactSolverInfo();
42 private Vector3 _gravity; 42 private Vector3 _gravity;
43 //for variable timesteps 43 //for variable timesteps
44 private float _localTime; 44 private float _localTime;
45 //for variable timesteps 45 //for variable timesteps
46 private bool _ownsIslandManager; 46 private bool _ownsIslandManager;
47 private bool _ownsConstraintSolver; 47 private bool _ownsConstraintSolver;
48 private List<RaycastVehicle> _vehicles = new List<RaycastVehicle>(); 48 private List<RaycastVehicle> _vehicles = new List<RaycastVehicle>();
49 private int _profileTimings; 49 private int _profileTimings;
50 50
51 public DiscreteDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache) 51 public DiscreteDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache)
52 : this(dispatcher, pairCache, null) { } 52 : this(dispatcher, pairCache, null) { }
53 53
54 //this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those 54 //this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those
55 public DiscreteDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache, IConstraintSolver constraintSolver) 55 public DiscreteDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache, IConstraintSolver constraintSolver)
56 : base(dispatcher, pairCache) 56 : base(dispatcher, pairCache)
57 { 57 {
58 _constraintSolver = constraintSolver != null ? constraintSolver : new SequentialImpulseConstraintSolver(); 58 _constraintSolver = constraintSolver != null ? constraintSolver : new SequentialImpulseConstraintSolver();
59 _debugDrawer = null; 59 _debugDrawer = null;
60 _gravity = new Vector3(0, -10, 0); 60 _gravity = new Vector3(0, -10, 0);
61 _localTime = 1f / 60f; 61 _localTime = 1f / 60f;
62 _profileTimings = 0; 62 _profileTimings = 0;
63 _islandManager = new SimulationIslandManager(); 63 _islandManager = new SimulationIslandManager();
64 _ownsIslandManager = true; 64 _ownsIslandManager = true;
65 _ownsConstraintSolver = constraintSolver == null; 65 _ownsConstraintSolver = constraintSolver == null;
66 } 66 }
67 67
68 public ContactSolverInfo SolverInfo { get { return _solverInfo; } } 68 public ContactSolverInfo SolverInfo { get { return _solverInfo; } }
69 public SimulationIslandManager SimulationIslandManager { get { return _islandManager; } } 69 public SimulationIslandManager SimulationIslandManager { get { return _islandManager; } }
70 public CollisionWorld CollisionWorld { get { return this; } } 70 public CollisionWorld CollisionWorld { get { return this; } }
71 71
72 public override IDebugDraw DebugDrawer 72 public override IDebugDraw DebugDrawer
73 { 73 {
74 get 74 get
75 { 75 {
76 return _debugDrawer; 76 return _debugDrawer;
77 } 77 }
78 set 78 set
79 { 79 {
80 _debugDrawer = value; 80 _debugDrawer = value;
81 } 81 }
82 } 82 }
83 83
84 public override Vector3 Gravity 84 public override Vector3 Gravity
85 { 85 {
86 set 86 set
87 { 87 {
88 _gravity = value; 88 _gravity = value;
89 for (int i = 0; i < CollisionObjects.Count; i++) 89 for (int i = 0; i < CollisionObjects.Count; i++)
90 { 90 {
91 CollisionObject colObj = CollisionObjects[i]; 91 CollisionObject colObj = CollisionObjects[i];
92 RigidBody body = RigidBody.Upcast(colObj); 92 RigidBody body = RigidBody.Upcast(colObj);
93 if (body != null) 93 if (body != null)
94 { 94 {
95 body.Gravity = value; 95 body.Gravity = value;
96 } 96 }
97 } 97 }
98 } 98 }
99 } 99 }
100 100
101 public override IConstraintSolver ConstraintSolver 101 public override IConstraintSolver ConstraintSolver
102 { 102 {
103 set 103 set
104 { 104 {
105 _ownsConstraintSolver = false; 105 _ownsConstraintSolver = false;
106 _constraintSolver = value; 106 _constraintSolver = value;
107 } 107 }
108 } 108 }
109 109
110 public override int ConstraintsCount 110 public override int ConstraintsCount
111 { 111 {
112 get 112 get
113 { 113 {
114 return _constraints.Count; 114 return _constraints.Count;
115 } 115 }
116 } 116 }
117 117
118 //if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's 118 //if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
119 public override void StepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) 119 public override void StepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep)
120 { 120 {
121 int numSimulationSubSteps = 0; 121 int numSimulationSubSteps = 0;
122 122
123 if (maxSubSteps != 0) 123 if (maxSubSteps != 0)
124 { 124 {
125 //fixed timestep with interpolation 125 //fixed timestep with interpolation
126 _localTime += timeStep; 126 _localTime += timeStep;
127 if (_localTime >= fixedTimeStep) 127 if (_localTime >= fixedTimeStep)
128 { 128 {
129 numSimulationSubSteps = (int)(_localTime / fixedTimeStep); 129 numSimulationSubSteps = (int)(_localTime / fixedTimeStep);
130 _localTime -= numSimulationSubSteps * fixedTimeStep; 130 _localTime -= numSimulationSubSteps * fixedTimeStep;
131 } 131 }
132 } 132 }
133 else 133 else
134 { 134 {
135 //variable timestep 135 //variable timestep
136 fixedTimeStep = timeStep; 136 fixedTimeStep = timeStep;
137 _localTime = timeStep; 137 _localTime = timeStep;
138 if (Math.Abs(timeStep) < float.Epsilon) 138 if (Math.Abs(timeStep) < float.Epsilon)
139 { 139 {
140 numSimulationSubSteps = 0; 140 numSimulationSubSteps = 0;
141 maxSubSteps = 0; 141 maxSubSteps = 0;
142 } 142 }
143 else 143 else
144 { 144 {
145 numSimulationSubSteps = 1; 145 numSimulationSubSteps = 1;
146 maxSubSteps = 1; 146 maxSubSteps = 1;
147 } 147 }
148 } 148 }
149 149
150 //process some debugging flags 150 //process some debugging flags
151 if (DebugDrawer != null) 151 if (DebugDrawer != null)
152 { 152 {
153 RigidBody.DisableDeactivation = (DebugDrawer.DebugMode & DebugDrawModes.NoDeactivation) != 0; 153 RigidBody.DisableDeactivation = (DebugDrawer.DebugMode & DebugDrawModes.NoDeactivation) != 0;
154 } 154 }
155 if (numSimulationSubSteps != 0) 155 if (numSimulationSubSteps != 0)
156 { 156 {
157 157
158 SaveKinematicState(fixedTimeStep); 158 SaveKinematicState(fixedTimeStep);
159 159
160 //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt 160 //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt
161 int clampedSimulationSteps = (numSimulationSubSteps > maxSubSteps) ? maxSubSteps : numSimulationSubSteps; 161 int clampedSimulationSteps = (numSimulationSubSteps > maxSubSteps) ? maxSubSteps : numSimulationSubSteps;
162 162
163 for (int i = 0; i < clampedSimulationSteps; i++) 163 for (int i = 0; i < clampedSimulationSteps; i++)
164 { 164 {
165 InternalSingleStepSimulation(fixedTimeStep); 165 InternalSingleStepSimulation(fixedTimeStep);
166 SynchronizeMotionStates(); 166 SynchronizeMotionStates();
167 } 167 }
168 168
169 } 169 }
170 170
171 SynchronizeMotionStates(); 171 SynchronizeMotionStates();
172 172
173 //return numSimulationSubSteps; 173 //return numSimulationSubSteps;
174 } 174 }
175 175
176 public void StepSimulation(float timeStep, int maxSubSteps) 176 public void StepSimulation(float timeStep, int maxSubSteps)
177 { 177 {
178 StepSimulation(timeStep, maxSubSteps, 1f / 60f); 178 StepSimulation(timeStep, maxSubSteps, 1f / 60f);
179 } 179 }
180 180
181 public override void UpdateAabbs() 181 public override void UpdateAabbs()
182 { 182 {
183 Vector3 colorvec = new Vector3(1, 0, 0); 183 Vector3 colorvec = new Vector3(1, 0, 0);
184 for (int i = 0; i < CollisionObjects.Count; i++) 184 for (int i = 0; i < CollisionObjects.Count; i++)
185 { 185 {
186 CollisionObject colObj = CollisionObjects[i]; 186 CollisionObject colObj = CollisionObjects[i];
187 RigidBody body = RigidBody.Upcast(colObj); 187 RigidBody body = RigidBody.Upcast(colObj);
188 188
189 if (body != null) 189 if (body != null)
190 { 190 {
191 // if (body->IsActive() && (!body->IsStatic())) 191 // if (body->IsActive() && (!body->IsStatic()))
192 { 192 {
193 Vector3 minAabb, maxAabb; 193 Vector3 minAabb, maxAabb;
194 colObj.CollisionShape.GetAabb(colObj.WorldTransform, out minAabb, out maxAabb); 194 colObj.CollisionShape.GetAabb(colObj.WorldTransform, out minAabb, out maxAabb);
195 OverlappingPairCache bp = BroadphasePairCache; 195 OverlappingPairCache bp = BroadphasePairCache;
196 196
197 //moving objects should be moderately sized, probably something wrong if not 197 //moving objects should be moderately sized, probably something wrong if not
198 if (colObj.IsStaticObject || ((maxAabb - minAabb).LengthSquared() < 1e12f)) 198 if (colObj.IsStaticObject || ((maxAabb - minAabb).LengthSquared() < 1e12f))
199 { 199 {
200 bp.SetAabb(body.Broadphase, minAabb, maxAabb); 200 bp.SetAabb(body.Broadphase, minAabb, maxAabb);
201 } 201 }
202 else 202 else
203 { 203 {
204 //something went wrong, investigate 204 //something went wrong, investigate
205 //this assert is unwanted in 3D modelers (danger of loosing work) 205 //this assert is unwanted in 3D modelers (danger of loosing work)
206 BulletDebug.Assert(false); 206 BulletDebug.Assert(false);
207 body.ActivationState = ActivationState.DisableSimulation; 207 body.ActivationState = ActivationState.DisableSimulation;
208 208
209 if (_reportMe) 209 if (_reportMe)
210 { 210 {
211 _reportMe = false; 211 _reportMe = false;
212 Console.WriteLine("Overflow in AABB, object removed from simulation \n"); 212 Console.WriteLine("Overflow in AABB, object removed from simulation \n");
213 Console.WriteLine("If you can reproduce this, please email bugs@continuousphysics.com\n"); 213 Console.WriteLine("If you can reproduce this, please email bugs@continuousphysics.com\n");
214 Console.WriteLine("Please include above information, your Platform, version of OS.\n"); 214 Console.WriteLine("Please include above information, your Platform, version of OS.\n");
215 Console.WriteLine("Thanks.\n"); 215 Console.WriteLine("Thanks.\n");
216 } 216 }
217 } 217 }
218 if (_debugDrawer != null && (_debugDrawer.DebugMode & DebugDrawModes.DrawAabb) != 0) 218 if (_debugDrawer != null && (_debugDrawer.DebugMode & DebugDrawModes.DrawAabb) != 0)
219 DrawAabb(_debugDrawer, minAabb, maxAabb, colorvec); 219 DrawAabb(_debugDrawer, minAabb, maxAabb, colorvec);
220 } 220 }
221 } 221 }
222 } 222 }
223 } 223 }
224 224
225 public override void AddConstraint(TypedConstraint constraint) 225 public override void AddConstraint(TypedConstraint constraint)
226 { 226 {
227 _constraints.Add(constraint); 227 _constraints.Add(constraint);
228 } 228 }
229 229
230 public override void RemoveConstraint(TypedConstraint constraint) 230 public override void RemoveConstraint(TypedConstraint constraint)
231 { 231 {
232 _constraints.Remove(constraint); 232 _constraints.Remove(constraint);
233 } 233 }
234 234
235 public void AddVehicle(RaycastVehicle vehicle) 235 public void AddVehicle(RaycastVehicle vehicle)
236 { 236 {
237 _vehicles.Add(vehicle); 237 _vehicles.Add(vehicle);
238 } 238 }
239 239
240 public void RemoveVehicle(RaycastVehicle vehicle) 240 public void RemoveVehicle(RaycastVehicle vehicle)
241 { 241 {
242 _vehicles.Remove(vehicle); 242 _vehicles.Remove(vehicle);
243 } 243 }
244 244
245 public override void AddRigidBody(RigidBody body) 245 public override void AddRigidBody(RigidBody body)
246 { 246 {
247 if (!body.IsStaticOrKinematicObject) 247 if (!body.IsStaticOrKinematicObject)
248 { 248 {
249 body.Gravity = _gravity; 249 body.Gravity = _gravity;
250 } 250 }
251 251
252 if (body.CollisionShape != null) 252 if (body.CollisionShape != null)
253 { 253 {
254 bool isDynamic = !(body.IsStaticObject || body.IsKinematicObject); 254 bool isDynamic = !(body.IsStaticObject || body.IsKinematicObject);
255 BroadphaseProxy.CollisionFilterGroups collisionFilterGroup = isDynamic ? BroadphaseProxy.CollisionFilterGroups.Default : BroadphaseProxy.CollisionFilterGroups.Static; 255 BroadphaseProxy.CollisionFilterGroups collisionFilterGroup = isDynamic ? BroadphaseProxy.CollisionFilterGroups.Default : BroadphaseProxy.CollisionFilterGroups.Static;
256 BroadphaseProxy.CollisionFilterGroups collisionFilterMask = isDynamic ? BroadphaseProxy.CollisionFilterGroups.All : (BroadphaseProxy.CollisionFilterGroups.All ^ BroadphaseProxy.CollisionFilterGroups.Static); 256 BroadphaseProxy.CollisionFilterGroups collisionFilterMask = isDynamic ? BroadphaseProxy.CollisionFilterGroups.All : (BroadphaseProxy.CollisionFilterGroups.All ^ BroadphaseProxy.CollisionFilterGroups.Static);
257 257
258 AddCollisionObject(body, collisionFilterGroup, collisionFilterMask); 258 AddCollisionObject(body, collisionFilterGroup, collisionFilterMask);
259 } 259 }
260 } 260 }
261 261
262 public override void RemoveRigidBody(RigidBody body) 262 public override void RemoveRigidBody(RigidBody body)
263 { 263 {
264 RemoveCollisionObject(body); 264 RemoveCollisionObject(body);
265 } 265 }
266 266
267 public void DebugDrawObject(Matrix worldTransform, CollisionShape shape, Vector3 color) 267 public void DebugDrawObject(Matrix worldTransform, CollisionShape shape, Vector3 color)
268 { 268 {
269 if (shape.ShapeType == BroadphaseNativeTypes.Compound) 269 if (shape.ShapeType == BroadphaseNativeTypes.Compound)
270 { 270 {
271 CompoundShape compoundShape = shape as CompoundShape; 271 CompoundShape compoundShape = shape as CompoundShape;
272 for (int i = compoundShape.ChildShapeCount - 1; i >= 0; i--) 272 for (int i = compoundShape.ChildShapeCount - 1; i >= 0; i--)
273 { 273 {
274 Matrix childTrans = compoundShape.GetChildTransform(i); 274 Matrix childTrans = compoundShape.GetChildTransform(i);
275 CollisionShape colShape = compoundShape.GetChildShape(i); 275 CollisionShape colShape = compoundShape.GetChildShape(i);
276 DebugDrawObject(worldTransform * childTrans, colShape, color); 276 DebugDrawObject(worldTransform * childTrans, colShape, color);
277 } 277 }
278 278
279 } 279 }
280 else 280 else
281 { 281 {
282 switch (shape.ShapeType) 282 switch (shape.ShapeType)
283 { 283 {
284 284
285 case BroadphaseNativeTypes.Sphere: 285 case BroadphaseNativeTypes.Sphere:
286 { 286 {
287 SphereShape sphereShape = shape as SphereShape; 287 SphereShape sphereShape = shape as SphereShape;
288 float radius = sphereShape.Margin;//radius doesn't include the margin, so draw with margin 288 float radius = sphereShape.Margin;//radius doesn't include the margin, so draw with margin
289 Vector3 start = worldTransform.Translation; 289 Vector3 start = worldTransform.Translation;
290 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(radius, 0, 0), worldTransform), color); 290 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(radius, 0, 0), worldTransform), color);
291 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(0, radius, 0), worldTransform), color); 291 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(0, radius, 0), worldTransform), color);
292 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(0, 0, radius), worldTransform), color); 292 DebugDrawer.DrawLine(start, start + Vector3.TransformNormal(new Vector3(0, 0, radius), worldTransform), color);
293 //drawSphere 293 //drawSphere
294 break; 294 break;
295 } 295 }
296 case BroadphaseNativeTypes.MultiSphere: 296 case BroadphaseNativeTypes.MultiSphere:
297 case BroadphaseNativeTypes.Cone: 297 case BroadphaseNativeTypes.Cone:
298 { 298 {
299 ConeShape coneShape = shape as ConeShape; 299 ConeShape coneShape = shape as ConeShape;
300 float radius = coneShape.Radius;//+coneShape->getMargin(); 300 float radius = coneShape.Radius;//+coneShape->getMargin();
301 float height = coneShape.Height;//+coneShape->getMargin(); 301 float height = coneShape.Height;//+coneShape->getMargin();
302 Vector3 start = worldTransform.Translation; 302 Vector3 start = worldTransform.Translation;
303 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(radius, 0f, -0.5f * height), worldTransform), color); 303 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(radius, 0f, -0.5f * height), worldTransform), color);
304 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(-radius, 0f, -0.5f * height), worldTransform), color); 304 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(-radius, 0f, -0.5f * height), worldTransform), color);
305 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(0f, radius, -0.5f * height), worldTransform), color); 305 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(0f, radius, -0.5f * height), worldTransform), color);
306 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(0f, -radius, -0.5f * height), worldTransform), color); 306 DebugDrawer.DrawLine(start + Vector3.TransformNormal(new Vector3(0f, 0f, 0.5f * height), worldTransform), start + Vector3.TransformNormal(new Vector3(0f, -radius, -0.5f * height), worldTransform), color);
307 break; 307 break;
308 } 308 }
309 case BroadphaseNativeTypes.Cylinder: 309 case BroadphaseNativeTypes.Cylinder:
310 { 310 {
311 CylinderShape cylinder = shape as CylinderShape; 311 CylinderShape cylinder = shape as CylinderShape;
312 int upAxis = cylinder.UpAxis; 312 int upAxis = cylinder.UpAxis;
313 float radius = cylinder.Radius; 313 float radius = cylinder.Radius;
314 float halfHeight = MathHelper.GetElement(cylinder.HalfExtents, upAxis); 314 float halfHeight = MathHelper.GetElement(cylinder.HalfExtents, upAxis);
315 Vector3 start = worldTransform.Translation; 315 Vector3 start = worldTransform.Translation;
316 Vector3 offsetHeight = new Vector3(); 316 Vector3 offsetHeight = new Vector3();
317 MathHelper.SetElement(ref offsetHeight, upAxis, halfHeight); 317 MathHelper.SetElement(ref offsetHeight, upAxis, halfHeight);
318 Vector3 offsetRadius = new Vector3(); 318 Vector3 offsetRadius = new Vector3();
319 MathHelper.SetElement(ref offsetRadius, (upAxis + 1) % 3, radius); 319 MathHelper.SetElement(ref offsetRadius, (upAxis + 1) % 3, radius);
320 DebugDrawer.DrawLine(start + Vector3.TransformNormal(offsetHeight + offsetRadius, worldTransform), start + Vector3.TransformNormal(-offsetHeight + offsetRadius, worldTransform), color); 320 DebugDrawer.DrawLine(start + Vector3.TransformNormal(offsetHeight + offsetRadius, worldTransform), start + Vector3.TransformNormal(-offsetHeight + offsetRadius, worldTransform), color);
321 DebugDrawer.DrawLine(start + Vector3.TransformNormal(offsetHeight - offsetRadius, worldTransform), start + Vector3.TransformNormal(-offsetHeight - offsetRadius, worldTransform), color); 321 DebugDrawer.DrawLine(start + Vector3.TransformNormal(offsetHeight - offsetRadius, worldTransform), start + Vector3.TransformNormal(-offsetHeight - offsetRadius, worldTransform), color);
322 break; 322 break;
323 } 323 }
324 default: 324 default:
325 { 325 {
326 if (shape.ShapeType == BroadphaseNativeTypes.TriangleMesh) 326 if (shape.ShapeType == BroadphaseNativeTypes.TriangleMesh)
327 { 327 {
328 TriangleMeshShape concaveMesh = shape as TriangleMeshShape; 328 TriangleMeshShape concaveMesh = shape as TriangleMeshShape;
329 //btVector3 aabbMax(1e30f,1e30f,1e30f); 329 //btVector3 aabbMax(1e30f,1e30f,1e30f);
330 //btVector3 aabbMax(100,100,100);//1e30f,1e30f,1e30f); 330 //btVector3 aabbMax(100,100,100);//1e30f,1e30f,1e30f);
331 331
332 //todo pass camera, for some culling 332 //todo pass camera, for some culling
333 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 333 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
334 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); 334 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f);
335 335
336 DebugDrawCallback drawCallback = new DebugDrawCallback(DebugDrawer, worldTransform, color); 336 DebugDrawCallback drawCallback = new DebugDrawCallback(DebugDrawer, worldTransform, color);
337 concaveMesh.ProcessAllTriangles(drawCallback, aabbMin, aabbMax); 337 concaveMesh.ProcessAllTriangles(drawCallback, aabbMin, aabbMax);
338 } 338 }
339 339
340 if (shape.ShapeType == BroadphaseNativeTypes.ConvexTriangleMesh) 340 if (shape.ShapeType == BroadphaseNativeTypes.ConvexTriangleMesh)
341 { 341 {
342 ConvexTriangleMeshShape convexMesh = shape as ConvexTriangleMeshShape; 342 ConvexTriangleMeshShape convexMesh = shape as ConvexTriangleMeshShape;
343 //todo: pass camera for some culling 343 //todo: pass camera for some culling
344 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); 344 Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f);
345 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); 345 Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f);
346 //DebugDrawcallback drawCallback; 346 //DebugDrawcallback drawCallback;
347 DebugDrawCallback drawCallback = new DebugDrawCallback(DebugDrawer, worldTransform, color); 347 DebugDrawCallback drawCallback = new DebugDrawCallback(DebugDrawer, worldTransform, color);
348 convexMesh.getStridingMesh().InternalProcessAllTriangles(drawCallback, aabbMin, aabbMax); 348 convexMesh.getStridingMesh().InternalProcessAllTriangles(drawCallback, aabbMin, aabbMax);
349 } 349 }
350 350
351 // for polyhedral shapes 351 // for polyhedral shapes
352 if (shape.IsPolyhedral) 352 if (shape.IsPolyhedral)
353 { 353 {
354 PolyhedralConvexShape polyshape = shape as PolyhedralConvexShape; 354 PolyhedralConvexShape polyshape = shape as PolyhedralConvexShape;
355 355
356 for (int i = 0; i < polyshape.EdgeCount; i++) 356 for (int i = 0; i < polyshape.EdgeCount; i++)
357 { 357 {
358 Vector3 a, b; 358 Vector3 a, b;
359 polyshape.GetEdge(i, out a, out b); 359 polyshape.GetEdge(i, out a, out b);
360 a = Vector3.TransformNormal(a, worldTransform); 360 a = Vector3.TransformNormal(a, worldTransform);
361 b = Vector3.TransformNormal(b, worldTransform); 361 b = Vector3.TransformNormal(b, worldTransform);
362 DebugDrawer.DrawLine(a, b, color); 362 DebugDrawer.DrawLine(a, b, color);
363 } 363 }
364 } 364 }
365 break; 365 break;
366 } 366 }
367 } 367 }
368 } 368 }
369 } 369 }
370 370
371 public override TypedConstraint GetConstraint(int index) 371 public override TypedConstraint GetConstraint(int index)
372 { 372 {
373 return _constraints[index]; 373 return _constraints[index];
374 } 374 }
375 375
376 public static void DrawAabb(IDebugDraw debugDrawer, Vector3 from, Vector3 to, Vector3 color) 376 public static void DrawAabb(IDebugDraw debugDrawer, Vector3 from, Vector3 to, Vector3 color)
377 { 377 {
378 Vector3 halfExtents = (to - from) * 0.5f; 378 Vector3 halfExtents = (to - from) * 0.5f;
379 Vector3 center = (to + from) * 0.5f; 379 Vector3 center = (to + from) * 0.5f;
380 380
381 Vector3 edgecoord = new Vector3(1f, 1f, 1f), pa, pb; 381 Vector3 edgecoord = new Vector3(1f, 1f, 1f), pa, pb;
382 for (int i = 0; i < 4; i++) 382 for (int i = 0; i < 4; i++)
383 { 383 {
384 for (int j = 0; j < 3; j++) 384 for (int j = 0; j < 3; j++)
385 { 385 {
386 pa = new Vector3(edgecoord.X * halfExtents.X, edgecoord.Y * halfExtents.Y, 386 pa = new Vector3(edgecoord.X * halfExtents.X, edgecoord.Y * halfExtents.Y,
387 edgecoord.Z * halfExtents.Z); 387 edgecoord.Z * halfExtents.Z);
388 pa += center; 388 pa += center;
389 389
390 int othercoord = j % 3; 390 int othercoord = j % 3;
391 MathHelper.SetElement(ref edgecoord, othercoord, MathHelper.GetElement(edgecoord, othercoord) * -1f); 391 MathHelper.SetElement(ref edgecoord, othercoord, MathHelper.GetElement(edgecoord, othercoord) * -1f);
392 pb = new Vector3(edgecoord.X * halfExtents.X, edgecoord.Y * halfExtents.Y, 392 pb = new Vector3(edgecoord.X * halfExtents.X, edgecoord.Y * halfExtents.Y,
393 edgecoord.Z * halfExtents.Z); 393 edgecoord.Z * halfExtents.Z);
394 pb += center; 394 pb += center;
395 395
396 debugDrawer.DrawLine(pa, pb, color); 396 debugDrawer.DrawLine(pa, pb, color);
397 } 397 }
398 edgecoord = new Vector3(-1f, -1f, -1f); 398 edgecoord = new Vector3(-1f, -1f, -1f);
399 if (i < 3) 399 if (i < 3)
400 MathHelper.SetElement(ref edgecoord, i, MathHelper.GetElement(edgecoord, i) * -1f); 400 MathHelper.SetElement(ref edgecoord, i, MathHelper.GetElement(edgecoord, i) * -1f);
401 } 401 }
402 } 402 }
403 403
404 protected void PredictUnconstraintMotion(float timeStep) 404 protected void PredictUnconstraintMotion(float timeStep)
405 { 405 {
406 for (int i = 0; i < CollisionObjects.Count; i++) 406 for (int i = 0; i < CollisionObjects.Count; i++)
407 { 407 {
408 CollisionObject colObj = CollisionObjects[i]; 408 CollisionObject colObj = CollisionObjects[i];
409 RigidBody body = RigidBody.Upcast(colObj); 409 RigidBody body = RigidBody.Upcast(colObj);
410 if (body != null) 410 if (body != null)
411 { 411 {
412 if (!body.IsStaticOrKinematicObject) 412 if (!body.IsStaticOrKinematicObject)
413 { 413 {
414 if (body.IsActive) 414 if (body.IsActive)
415 { 415 {
416 body.ApplyForces(timeStep); 416 body.ApplyForces(timeStep);
417 body.IntegrateVelocities(timeStep); 417 body.IntegrateVelocities(timeStep);
418 Matrix temp = body.InterpolationWorldTransform; 418 Matrix temp = body.InterpolationWorldTransform;
419 body.PredictIntegratedTransform(timeStep, ref temp); 419 body.PredictIntegratedTransform(timeStep, ref temp);
420 body.InterpolationWorldTransform = temp; 420 body.InterpolationWorldTransform = temp;
421 } 421 }
422 } 422 }
423 } 423 }
424 } 424 }
425 } 425 }
426 426
427 protected void IntegrateTransforms(float timeStep) 427 protected void IntegrateTransforms(float timeStep)
428 { 428 {
429 Matrix predictedTrans = new Matrix(); 429 Matrix predictedTrans = new Matrix();
430 for (int i = 0; i < CollisionObjects.Count; i++) 430 for (int i = 0; i < CollisionObjects.Count; i++)
431 { 431 {
432 CollisionObject colObj = CollisionObjects[i]; 432 CollisionObject colObj = CollisionObjects[i];
433 RigidBody body = RigidBody.Upcast(colObj); 433 RigidBody body = RigidBody.Upcast(colObj);
434 if (body != null) 434 if (body != null)
435 { 435 {
436 if (body.IsActive && (!body.IsStaticOrKinematicObject)) 436 if (body.IsActive && (!body.IsStaticOrKinematicObject))
437 { 437 {
438 body.PredictIntegratedTransform(timeStep, ref predictedTrans); 438 body.PredictIntegratedTransform(timeStep, ref predictedTrans);
439 body.ProceedToTransform(predictedTrans); 439 body.ProceedToTransform(predictedTrans);
440 } 440 }
441 } 441 }
442 } 442 }
443 } 443 }
444 444
445 protected void CalculateSimulationIslands() 445 protected void CalculateSimulationIslands()
446 { 446 {
447 SimulationIslandManager.UpdateActivationState(this, Dispatcher); 447 SimulationIslandManager.UpdateActivationState(this, Dispatcher);
448 448
449 for (int i = 0; i < _constraints.Count; i++) 449 for (int i = 0; i < _constraints.Count; i++)
450 { 450 {
451 TypedConstraint constraint = _constraints[i]; 451 TypedConstraint constraint = _constraints[i];
452 452
453 RigidBody colObj0 = constraint.RigidBodyA; 453 RigidBody colObj0 = constraint.RigidBodyA;
454 RigidBody colObj1 = constraint.RigidBodyB; 454 RigidBody colObj1 = constraint.RigidBodyB;
455 455
456 if (((colObj0 != null) && (colObj0.MergesSimulationIslands)) && 456 if (((colObj0 != null) && (colObj0.MergesSimulationIslands)) &&
457 ((colObj1 != null) && (colObj1.MergesSimulationIslands))) 457 ((colObj1 != null) && (colObj1.MergesSimulationIslands)))
458 { 458 {
459 if (colObj0.IsActive || colObj1.IsActive) 459 if (colObj0.IsActive || colObj1.IsActive)
460 { 460 {
461 461
462 SimulationIslandManager.UnionFind.Unite((colObj0).IslandTag, 462 SimulationIslandManager.UnionFind.Unite((colObj0).IslandTag,
463 (colObj1).IslandTag); 463 (colObj1).IslandTag);
464 } 464 }
465 } 465 }
466 } 466 }
467 467
468 //Store the island id in each body 468 //Store the island id in each body
469 SimulationIslandManager.StoreIslandActivationState(this); 469 SimulationIslandManager.StoreIslandActivationState(this);
470 } 470 }
471 471
472 //protected void SolveNonContactConstraints(ContactSolverInfo solverInfo) 472 //protected void SolveNonContactConstraints(ContactSolverInfo solverInfo)
473 //{ 473 //{
474 // //constraint preparation: building jacobians 474 // //constraint preparation: building jacobians
475 // for (int i = 0; i < _constraints.Count; i++) 475 // for (int i = 0; i < _constraints.Count; i++)
476 // { 476 // {
477 // TypedConstraint constraint = _constraints[i]; 477 // TypedConstraint constraint = _constraints[i];
478 // constraint.BuildJacobian(); 478 // constraint.BuildJacobian();
479 // } 479 // }
480 480
481 // //solve the regular non-contact constraints (point 2 point, hinge, generic d6) 481 // //solve the regular non-contact constraints (point 2 point, hinge, generic d6)
482 // for (int g = 0; g < solverInfo.IterationsCount; g++) 482 // for (int g = 0; g < solverInfo.IterationsCount; g++)
483 // { 483 // {
484 // for (int i = 0; i < _constraints.Count; i++) 484 // for (int i = 0; i < _constraints.Count; i++)
485 // { 485 // {
486 // TypedConstraint constraint = _constraints[i]; 486 // TypedConstraint constraint = _constraints[i];
487 // constraint.SolveConstraint(solverInfo.TimeStep); 487 // constraint.SolveConstraint(solverInfo.TimeStep);
488 // } 488 // }
489 // } 489 // }
490 //} 490 //}
491 491
492 //protected void SolveContactConstraints(ContactSolverInfo solverInfo) 492 //protected void SolveContactConstraints(ContactSolverInfo solverInfo)
493 //{ 493 //{
494 // InplaceSolverIslandCallback solverCallback = new InplaceSolverIslandCallback(solverInfo, _constraintSolver, _debugDrawer); 494 // InplaceSolverIslandCallback solverCallback = new InplaceSolverIslandCallback(solverInfo, _constraintSolver, _debugDrawer);
495 495
496 // // solve all the contact points and contact friction 496 // // solve all the contact points and contact friction
497 // _islandManager.BuildAndProcessIslands(Dispatcher, CollisionObjects, solverCallback); 497 // _islandManager.BuildAndProcessIslands(Dispatcher, CollisionObjects, solverCallback);
498 //} 498 //}
499 499
500 protected void SolveConstraints(ContactSolverInfo solverInfo) 500 protected void SolveConstraints(ContactSolverInfo solverInfo)
501 { 501 {
502 //sorted version of all btTypedConstraint, based on islandId 502 //sorted version of all btTypedConstraint, based on islandId
503 List<TypedConstraint> sortedConstraints = new List<TypedConstraint>(ConstraintsCount); 503 List<TypedConstraint> sortedConstraints = new List<TypedConstraint>(ConstraintsCount);
504 504
505 for (int i = 0; i < ConstraintsCount; i++) 505 for (int i = 0; i < ConstraintsCount; i++)
506 { 506 {
507 sortedConstraints.Add(_constraints[i]); 507 sortedConstraints.Add(_constraints[i]);
508 } 508 }
509 509
510 sortedConstraints.Sort(new Comparison<TypedConstraint>(TypedConstraint.SortConstraintOnIslandPredicate)); 510 sortedConstraints.Sort(new Comparison<TypedConstraint>(TypedConstraint.SortConstraintOnIslandPredicate));
511 List<TypedConstraint> constraintsPtr = ConstraintsCount != 0 ? sortedConstraints : new List<TypedConstraint>(); 511 List<TypedConstraint> constraintsPtr = ConstraintsCount != 0 ? sortedConstraints : new List<TypedConstraint>();
512 512
513 InplaceSolverIslandCallback solverCallback = new InplaceSolverIslandCallback(solverInfo, _constraintSolver, constraintsPtr, _debugDrawer); 513 InplaceSolverIslandCallback solverCallback = new InplaceSolverIslandCallback(solverInfo, _constraintSolver, constraintsPtr, _debugDrawer);
514 514
515 // solve all the constraints for this island 515 // solve all the constraints for this island
516 _islandManager.BuildAndProcessIslands(CollisionWorld.Dispatcher, CollisionWorld.CollisionObjects, solverCallback); 516 _islandManager.BuildAndProcessIslands(CollisionWorld.Dispatcher, CollisionWorld.CollisionObjects, solverCallback);
517 } 517 }
518 518
519 protected void UpdateActivationState(float timeStep) 519 protected void UpdateActivationState(float timeStep)
520 { 520 {
521 for (int i = 0; i < CollisionObjects.Count; i++) 521 for (int i = 0; i < CollisionObjects.Count; i++)
522 { 522 {
523 CollisionObject colObj = CollisionObjects[i]; 523 CollisionObject colObj = CollisionObjects[i];
524 RigidBody body = RigidBody.Upcast(colObj); 524 RigidBody body = RigidBody.Upcast(colObj);
525 if (body != null) 525 if (body != null)
526 { 526 {
527 body.UpdateDeactivation(timeStep); 527 body.UpdateDeactivation(timeStep);
528 528
529 if (body.WantsSleeping()) 529 if (body.WantsSleeping())
530 { 530 {
531 if (body.IsStaticOrKinematicObject) 531 if (body.IsStaticOrKinematicObject)
532 { 532 {
533 body.ActivationState = ActivationState.IslandSleeping; 533 body.ActivationState = ActivationState.IslandSleeping;
534 } 534 }
535 else 535 else
536 { 536 {
537 if (body.ActivationState == ActivationState.Active) 537 if (body.ActivationState == ActivationState.Active)
538 body.ActivationState = ActivationState.WantsDeactivation; 538 body.ActivationState = ActivationState.WantsDeactivation;
539 } 539 }
540 } 540 }
541 else 541 else
542 { 542 {
543 if (body.ActivationState != ActivationState.DisableDeactivation) 543 if (body.ActivationState != ActivationState.DisableDeactivation)
544 body.ActivationState = ActivationState.Active; 544 body.ActivationState = ActivationState.Active;
545 } 545 }
546 } 546 }
547 } 547 }
548 } 548 }
549 549
550 protected void UpdateVehicles(float timeStep) 550 protected void UpdateVehicles(float timeStep)
551 { 551 {
552 for (int i = 0; i < _vehicles.Count; i++) 552 for (int i = 0; i < _vehicles.Count; i++)
553 { 553 {
554 RaycastVehicle vehicle = _vehicles[i]; 554 RaycastVehicle vehicle = _vehicles[i];
555 vehicle.updateVehicle(timeStep); 555 vehicle.updateVehicle(timeStep);
556 } 556 }
557 } 557 }
558 558
559 protected void StartProfiling(float timeStep) { } 559 protected void StartProfiling(float timeStep) { }
560 560
561 protected virtual void InternalSingleStepSimulation(float timeStep) 561 protected virtual void InternalSingleStepSimulation(float timeStep)
562 { 562 {
563 StartProfiling(timeStep); 563 StartProfiling(timeStep);
564 564
565 //update aabbs information 565 //update aabbs information
566 UpdateAabbs(); 566 UpdateAabbs();
567 567
568 //apply gravity, predict motion 568 //apply gravity, predict motion
569 PredictUnconstraintMotion(timeStep); 569 PredictUnconstraintMotion(timeStep);
570 570
571 DispatcherInfo dispatchInfo = DispatchInfo; 571 DispatcherInfo dispatchInfo = DispatchInfo;
572 dispatchInfo.TimeStep = timeStep; 572 dispatchInfo.TimeStep = timeStep;
573 dispatchInfo.StepCount = 0; 573 dispatchInfo.StepCount = 0;
574 dispatchInfo.DebugDraw = DebugDrawer; 574 dispatchInfo.DebugDraw = DebugDrawer;
575 575
576 //perform collision detection 576 //perform collision detection
577 PerformDiscreteCollisionDetection(); 577 PerformDiscreteCollisionDetection();
578 578
579 CalculateSimulationIslands(); 579 CalculateSimulationIslands();
580 580
581 SolverInfo.TimeStep = timeStep; 581 SolverInfo.TimeStep = timeStep;
582 582
583 //solve contact and other joint constraints 583 //solve contact and other joint constraints
584 SolveConstraints(SolverInfo); 584 SolveConstraints(SolverInfo);
585 585
586 //CallbackTriggers(); 586 //CallbackTriggers();
587 587
588 //integrate transforms 588 //integrate transforms
589 IntegrateTransforms(timeStep); 589 IntegrateTransforms(timeStep);
590 590
591 //update vehicle simulation 591 //update vehicle simulation
592 UpdateVehicles(timeStep); 592 UpdateVehicles(timeStep);
593 593
594 UpdateActivationState(timeStep); 594 UpdateActivationState(timeStep);
595 } 595 }
596 596
597 protected void SynchronizeMotionStates() 597 protected void SynchronizeMotionStates()
598 { 598 {
599 //debug vehicle wheels 599 //debug vehicle wheels
600 { 600 {
601 //todo: iterate over awake simulation islands! 601 //todo: iterate over awake simulation islands!
602 for (int i = 0; i < CollisionObjects.Count; i++) 602 for (int i = 0; i < CollisionObjects.Count; i++)
603 { 603 {
604 CollisionObject colObj = CollisionObjects[i]; 604 CollisionObject colObj = CollisionObjects[i];
605 if (DebugDrawer != null && (DebugDrawer.DebugMode & DebugDrawModes.DrawWireframe) != 0) 605 if (DebugDrawer != null && (DebugDrawer.DebugMode & DebugDrawModes.DrawWireframe) != 0)
606 { 606 {
607 Vector3 color = new Vector3(255f, 255f, 255f); 607 Vector3 color = new Vector3(255f, 255f, 255f);
608 switch (colObj.ActivationState) 608 switch (colObj.ActivationState)
609 { 609 {
610 case ActivationState.Active: 610 case ActivationState.Active:
611 color = new Vector3(255f, 255f, 255f); break; 611 color = new Vector3(255f, 255f, 255f); break;
612 case ActivationState.IslandSleeping: 612 case ActivationState.IslandSleeping:
613 color = new Vector3(0f, 255f, 0f); break; 613 color = new Vector3(0f, 255f, 0f); break;
614 case ActivationState.WantsDeactivation: 614 case ActivationState.WantsDeactivation:
615 color = new Vector3(0f, 255f, 255f); break; 615 color = new Vector3(0f, 255f, 255f); break;
616 case ActivationState.DisableDeactivation: 616 case ActivationState.DisableDeactivation:
617 color = new Vector3(255f, 0f, 0f); break; 617 color = new Vector3(255f, 0f, 0f); break;
618 case ActivationState.DisableSimulation: 618 case ActivationState.DisableSimulation:
619 color = new Vector3(255f, 255f, 0f); break; 619 color = new Vector3(255f, 255f, 0f); break;
620 default: 620 default:
621 color = new Vector3(255f, 0f, 0f); break; 621 color = new Vector3(255f, 0f, 0f); break;
622 } 622 }
623 623
624 DebugDrawObject(colObj.WorldTransform, colObj.CollisionShape, color); 624 DebugDrawObject(colObj.WorldTransform, colObj.CollisionShape, color);
625 } 625 }
626 RigidBody body = RigidBody.Upcast(colObj); 626 RigidBody body = RigidBody.Upcast(colObj);
627 if (body != null && body.MotionState != null && !body.IsStaticOrKinematicObject) 627 if (body != null && body.MotionState != null && !body.IsStaticOrKinematicObject)
628 { 628 {
629 //if (body.ActivationState != ActivationState.IslandSleeping) 629 //if (body.ActivationState != ActivationState.IslandSleeping)
630 { 630 {
631 Matrix interpolatedTransform = new Matrix(); 631 Matrix interpolatedTransform = new Matrix();
632 TransformUtil.IntegrateTransform(body.InterpolationWorldTransform, 632 TransformUtil.IntegrateTransform(body.InterpolationWorldTransform,
633 body.InterpolationLinearVelocity, body.InterpolationAngularVelocity, _localTime, ref interpolatedTransform); 633 body.InterpolationLinearVelocity, body.InterpolationAngularVelocity, _localTime, ref interpolatedTransform);
634 body.MotionState.SetWorldTransform(interpolatedTransform); 634 body.MotionState.SetWorldTransform(interpolatedTransform);
635 } 635 }
636 } 636 }
637 } 637 }
638 } 638 }
639 639
640 if (DebugDrawer != null && (DebugDrawer.DebugMode & DebugDrawModes.DrawWireframe) != 0) 640 if (DebugDrawer != null && (DebugDrawer.DebugMode & DebugDrawModes.DrawWireframe) != 0)
641 { 641 {
642 for (int i = 0; i < _vehicles.Count; i++) 642 for (int i = 0; i < _vehicles.Count; i++)
643 { 643 {
644 for (int v = 0; v < _vehicles[i].getNumWheels(); v++) 644 for (int v = 0; v < _vehicles[i].getNumWheels(); v++)
645 { 645 {
646 Vector3 wheelColor = new Vector3(0, 255, 255); 646 Vector3 wheelColor = new Vector3(0, 255, 255);
647 if (_vehicles[i].getWheelInfo(v).RaycastInfo.IsInContact) 647 if (_vehicles[i].getWheelInfo(v).RaycastInfo.IsInContact)
648 { 648 {
649 wheelColor = new Vector3(0, 0, 255); 649 wheelColor = new Vector3(0, 0, 255);
650 } 650 }
651 else 651 else
652 { 652 {
653 wheelColor = new Vector3(255, 0, 255); 653 wheelColor = new Vector3(255, 0, 255);
654 } 654 }
655 655
656 //synchronize the wheels with the (interpolated) chassis worldtransform 656 //synchronize the wheels with the (interpolated) chassis worldtransform
657 _vehicles[i].updateWheelTransform(v, true); 657 _vehicles[i].updateWheelTransform(v, true);
658 658
659 Vector3 wheelPosWS = _vehicles[i].getWheelInfo(v).WorldTransform.Translation; 659 Vector3 wheelPosWS = _vehicles[i].getWheelInfo(v).WorldTransform.Translation;
660 660
661 Vector3 axle = new Vector3( 661 Vector3 axle = new Vector3(
662 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 0, _vehicles[i].getRightAxis()), 662 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 0, _vehicles[i].getRightAxis()),
663 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 1, _vehicles[i].getRightAxis()), 663 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 1, _vehicles[i].getRightAxis()),
664 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 2, _vehicles[i].getRightAxis())); 664 MathHelper.GetElement(_vehicles[i].getWheelInfo(v).WorldTransform, 2, _vehicles[i].getRightAxis()));
665 665
666 666
667 //m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_wheelAxleWS 667 //m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_wheelAxleWS
668 //debug wheels (cylinders) 668 //debug wheels (cylinders)
669 _debugDrawer.DrawLine(wheelPosWS, wheelPosWS + axle, wheelColor); 669 _debugDrawer.DrawLine(wheelPosWS, wheelPosWS + axle, wheelColor);
670 _debugDrawer.DrawLine(wheelPosWS, _vehicles[i].getWheelInfo(v).RaycastInfo.ContactPointWS, wheelColor); 670 _debugDrawer.DrawLine(wheelPosWS, _vehicles[i].getWheelInfo(v).RaycastInfo.ContactPointWS, wheelColor);
671 } 671 }
672 } 672 }
673 } 673 }
674 } 674 }
675 675
676 protected void SaveKinematicState(float timeStep) 676 protected void SaveKinematicState(float timeStep)
677 { 677 {
678 for (int i = 0; i < CollisionObjects.Count; i++) 678 for (int i = 0; i < CollisionObjects.Count; i++)
679 { 679 {
680 CollisionObject colObj = CollisionObjects[i]; 680 CollisionObject colObj = CollisionObjects[i];
681 RigidBody body = RigidBody.Upcast(colObj); 681 RigidBody body = RigidBody.Upcast(colObj);
682 if (body != null) 682 if (body != null)
683 { 683 {
684 if (body.ActivationState != ActivationState.IslandSleeping) 684 if (body.ActivationState != ActivationState.IslandSleeping)
685 { 685 {
686 if (body.IsKinematicObject) 686 if (body.IsKinematicObject)
687 { 687 {
688 //to calculate velocities next frame 688 //to calculate velocities next frame
689 body.SaveKinematicState(timeStep); 689 body.SaveKinematicState(timeStep);
690 } 690 }
691 } 691 }
692 } 692 }
693 } 693 }
694 } 694 }
695 695
696 internal class InplaceSolverIslandCallback : SimulationIslandManager.IIslandCallback 696 internal class InplaceSolverIslandCallback : SimulationIslandManager.IIslandCallback
697 { 697 {
698 private ContactSolverInfo _solverInfo; 698 private ContactSolverInfo _solverInfo;
699 private IConstraintSolver _solver; 699 private IConstraintSolver _solver;
700 private IDebugDraw _debugDrawer; 700 private IDebugDraw _debugDrawer;
701 private List<TypedConstraint> _sortedConstraints; 701 private List<TypedConstraint> _sortedConstraints;
702 702
703 public InplaceSolverIslandCallback( 703 public InplaceSolverIslandCallback(
704 ContactSolverInfo solverInfo, 704 ContactSolverInfo solverInfo,
705 IConstraintSolver solver, 705 IConstraintSolver solver,
706 List<TypedConstraint> sortedConstraints, 706 List<TypedConstraint> sortedConstraints,
707 IDebugDraw debugDrawer) 707 IDebugDraw debugDrawer)
708 { 708 {
709 _solverInfo = solverInfo; 709 _solverInfo = solverInfo;
710 _solver = solver; 710 _solver = solver;
711 _sortedConstraints = sortedConstraints; 711 _sortedConstraints = sortedConstraints;
712 _debugDrawer = debugDrawer; 712 _debugDrawer = debugDrawer;
713 } 713 }
714 714
715 public ContactSolverInfo SolverInfo { get { return _solverInfo; } set { _solverInfo = value; } } 715 public ContactSolverInfo SolverInfo { get { return _solverInfo; } set { _solverInfo = value; } }
716 public IConstraintSolver Solver { get { return _solver; } set { _solver = value; } } 716 public IConstraintSolver Solver { get { return _solver; } set { _solver = value; } }
717 public List<TypedConstraint> Constraints { get { return _sortedConstraints; } set { _sortedConstraints = value; } } 717 public List<TypedConstraint> Constraints { get { return _sortedConstraints; } set { _sortedConstraints = value; } }
718 public IDebugDraw DebugDrawer { get { return _debugDrawer; } set { _debugDrawer = value; } } 718 public IDebugDraw DebugDrawer { get { return _debugDrawer; } set { _debugDrawer = value; } }
719 719
720 public void ProcessIsland(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, int islandID) 720 public void ProcessIsland(List<CollisionObject> bodies, List<PersistentManifold> manifolds, int numManifolds, int islandID)
721 { 721 {
722 //also add all non-contact constraints/joints for this island 722 //also add all non-contact constraints/joints for this island
723 List<TypedConstraint> startConstraint = new List<TypedConstraint>(); 723 List<TypedConstraint> startConstraint = new List<TypedConstraint>();
724 int numCurConstraints = 0; 724 int numCurConstraints = 0;
725 int startIndex = 0; 725 int startIndex = 0;
726 int i; 726 int i;
727 727
728 //find the first constraint for this island 728 //find the first constraint for this island
729 for (i = 0; i < _sortedConstraints.Count; i++) 729 for (i = 0; i < _sortedConstraints.Count; i++)
730 { 730 {
731 if (TypedConstraint.GetConstraintIslandId(_sortedConstraints[i]) == islandID) 731 if (TypedConstraint.GetConstraintIslandId(_sortedConstraints[i]) == islandID)
732 { 732 {
733 //startConstraint = &m_sortedConstraints[i]; 733 //startConstraint = &m_sortedConstraints[i];
734 startIndex = i; 734 startIndex = i;
735 break; 735 break;
736 } 736 }
737 } 737 }
738 //count the number of constraints in this island 738 //count the number of constraints in this island
739 for (; i < _sortedConstraints.Count; i++) 739 for (; i < _sortedConstraints.Count; i++)
740 { 740 {
741 if (TypedConstraint.GetConstraintIslandId(_sortedConstraints[i]) == islandID) 741 if (TypedConstraint.GetConstraintIslandId(_sortedConstraints[i]) == islandID)
742 { 742 {
743 numCurConstraints++; 743 numCurConstraints++;
744 } 744 }
745 } 745 }
746 746
747 for (i = startIndex; i < startIndex + numCurConstraints; i++) 747 for (i = startIndex; i < startIndex + numCurConstraints; i++)
748 { 748 {
749 startConstraint.Add(_sortedConstraints[i]); 749 startConstraint.Add(_sortedConstraints[i]);
750 } 750 }
751 751
752 _solver.SolveGroup(bodies, manifolds, numManifolds, startConstraint, _solverInfo, _debugDrawer); 752 _solver.SolveGroup(bodies, manifolds, numManifolds, startConstraint, _solverInfo, _debugDrawer);
753 } 753 }
754 } 754 }
755 } 755 }
756 756
757 internal class DebugDrawCallback : ITriangleIndexCallback, ITriangleCallback 757 internal class DebugDrawCallback : ITriangleIndexCallback, ITriangleCallback
758 { 758 {
759 private IDebugDraw _debugDrawer; 759 private IDebugDraw _debugDrawer;
760 private Vector3 _color; 760 private Vector3 _color;
761 private Matrix _worldTrans; 761 private Matrix _worldTrans;
762 762
763 public DebugDrawCallback(IDebugDraw debugDrawer, Matrix worldTrans, Vector3 color) 763 public DebugDrawCallback(IDebugDraw debugDrawer, Matrix worldTrans, Vector3 color)
764 { 764 {
765 _debugDrawer = debugDrawer; 765 _debugDrawer = debugDrawer;
766 _worldTrans = worldTrans; 766 _worldTrans = worldTrans;
767 _color = color; 767 _color = color;
768 } 768 }
769 769
770 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex) 770 public void ProcessTriangleIndex(Vector3[] triangle, int partId, int triangleIndex)
771 { 771 {
772 ProcessTriangle(triangle, partId, triangleIndex); 772 ProcessTriangle(triangle, partId, triangleIndex);
773 } 773 }
774 774
775 #region ITriangleCallback Members 775 #region ITriangleCallback Members
776 776
777 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex) 777 public void ProcessTriangle(Vector3[] triangle, int partID, int triangleIndex)
778 { 778 {
779 Vector3 wv0, wv1, wv2; 779 Vector3 wv0, wv1, wv2;
780 wv0 = Vector3.TransformNormal(triangle[0], _worldTrans); 780 wv0 = Vector3.TransformNormal(triangle[0], _worldTrans);
781 wv1 = Vector3.TransformNormal(triangle[1], _worldTrans); 781 wv1 = Vector3.TransformNormal(triangle[1], _worldTrans);
782 wv2 = Vector3.TransformNormal(triangle[2], _worldTrans); 782 wv2 = Vector3.TransformNormal(triangle[2], _worldTrans);
783 _debugDrawer.DrawLine(wv0, wv1, _color); 783 _debugDrawer.DrawLine(wv0, wv1, _color);
784 _debugDrawer.DrawLine(wv1, wv2, _color); 784 _debugDrawer.DrawLine(wv1, wv2, _color);
785 _debugDrawer.DrawLine(wv2, wv0, _color); 785 _debugDrawer.DrawLine(wv2, wv0, _color);
786 } 786 }
787 787
788 #endregion 788 #endregion
789 } 789 }
790} \ No newline at end of file 790} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DynamicsWorld.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DynamicsWorld.cs
index 647c8ec..34ae608 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DynamicsWorld.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/DynamicsWorld.cs
@@ -1,59 +1,59 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public abstract class DynamicsWorld : CollisionWorld 29 public abstract class DynamicsWorld : CollisionWorld
30 { 30 {
31 public DynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache) 31 public DynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache)
32 : base(dispatcher, pairCache) { } 32 : base(dispatcher, pairCache) { }
33 33
34 //once a rigidbody is added to the dynamics world, it will get this gravity assigned 34 //once a rigidbody is added to the dynamics world, it will get this gravity assigned
35 //existing rigidbodies in the world get gravity assigned too, during this method 35 //existing rigidbodies in the world get gravity assigned too, during this method
36 public abstract Vector3 Gravity { set; } 36 public abstract Vector3 Gravity { set; }
37 public abstract IConstraintSolver ConstraintSolver { set; } 37 public abstract IConstraintSolver ConstraintSolver { set; }
38 public virtual int ConstraintsCount { get { return 0; } } 38 public virtual int ConstraintsCount { get { return 0; } }
39 public abstract IDebugDraw DebugDrawer { get; set; } 39 public abstract IDebugDraw DebugDrawer { get; set; }
40 40
41 //stepSimulation proceeds the simulation over timeStep units 41 //stepSimulation proceeds the simulation over timeStep units
42 public abstract void StepSimulation(float timeStep, int numSubsteps, float fixedTimeStep); 42 public abstract void StepSimulation(float timeStep, int numSubsteps, float fixedTimeStep);
43 43
44 public void StepSimulation(float timeStep) 44 public void StepSimulation(float timeStep)
45 { 45 {
46 StepSimulation(timeStep, 1, 1f / 60f); 46 StepSimulation(timeStep, 1, 1f / 60f);
47 } 47 }
48 48
49 public abstract void UpdateAabbs(); 49 public abstract void UpdateAabbs();
50 50
51 public virtual void AddConstraint(TypedConstraint constraint) { } 51 public virtual void AddConstraint(TypedConstraint constraint) { }
52 public virtual void RemoveConstraint(TypedConstraint constraint) { } 52 public virtual void RemoveConstraint(TypedConstraint constraint) { }
53 53
54 public abstract void AddRigidBody(RigidBody body); 54 public abstract void AddRigidBody(RigidBody body);
55 public abstract void RemoveRigidBody(RigidBody body); 55 public abstract void RemoveRigidBody(RigidBody body);
56 56
57 public virtual TypedConstraint GetConstraint(int index) { return null; } 57 public virtual TypedConstraint GetConstraint(int index) { return null; }
58 } 58 }
59} 59}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/RigidBody.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/RigidBody.cs
index ec14daf..12a7485 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/RigidBody.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/RigidBody.cs
@@ -1,447 +1,447 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public class RigidBody : CollisionObject 29 public class RigidBody : CollisionObject
30 { 30 {
31 private static float _linearAirDamping = 1; 31 private static float _linearAirDamping = 1;
32 //'temporarily' global variables 32 //'temporarily' global variables
33 private static float _rigidBodyDeactivationTime = 2; 33 private static float _rigidBodyDeactivationTime = 2;
34 private static bool _disableDeactivation = false; 34 private static bool _disableDeactivation = false;
35 35
36 private static float _linearSleepingThreshold = 0.8f; 36 private static float _linearSleepingThreshold = 0.8f;
37 private static float _angularSleepingThreshold = 1.0f; 37 private static float _angularSleepingThreshold = 1.0f;
38 private static int _uniqueId = 0; 38 private static int _uniqueId = 0;
39 39
40 private Matrix _invInertiaTensorWorld; 40 private Matrix _invInertiaTensorWorld;
41 private Vector3 _linearVelocity; 41 private Vector3 _linearVelocity;
42 private Vector3 _angularVelocity; 42 private Vector3 _angularVelocity;
43 private float _inverseMass; 43 private float _inverseMass;
44 private float _angularFactor; 44 private float _angularFactor;
45 45
46 private Vector3 _gravity; 46 private Vector3 _gravity;
47 private Vector3 _invInertiaLocal; 47 private Vector3 _invInertiaLocal;
48 private Vector3 _totalForce; 48 private Vector3 _totalForce;
49 private Vector3 _totalTorque; 49 private Vector3 _totalTorque;
50 50
51 private float _linearDamping; 51 private float _linearDamping;
52 private float _angularDamping; 52 private float _angularDamping;
53 53
54 //m_optionalMotionState allows to automatic synchronize the world transform for active objects 54 //m_optionalMotionState allows to automatic synchronize the world transform for active objects
55 private MotionState _optionalMotionState; 55 private MotionState _optionalMotionState;
56 56
57 //for experimental overriding of friction/contact solver func 57 //for experimental overriding of friction/contact solver func
58 private ContactSolverType _contactSolverType; 58 private ContactSolverType _contactSolverType;
59 private ContactSolverType _frictionSolverType; 59 private ContactSolverType _frictionSolverType;
60 60
61 private int _debugBodyId; 61 private int _debugBodyId;
62 62
63 //Bullet 2.20b has experimental damping code to reduce jitter just before objects fall asleep/deactivate 63 //Bullet 2.20b has experimental damping code to reduce jitter just before objects fall asleep/deactivate
64 //doesn't work very well yet (value 0 disabled this damping) 64 //doesn't work very well yet (value 0 disabled this damping)
65 //note there this influences deactivation thresholds! 65 //note there this influences deactivation thresholds!
66 private float _clippedAngvelThresholdSqr = 0.01f; 66 private float _clippedAngvelThresholdSqr = 0.01f;
67 private float _clippedLinearThresholdSqr = 0.01f; 67 private float _clippedLinearThresholdSqr = 0.01f;
68 68
69 private float _jitterVelocityDampingFactor = 0.7f; 69 private float _jitterVelocityDampingFactor = 0.7f;
70 70
71 public RigidBody(float mass, MotionState motionState, CollisionShape collisionShape, Vector3 localInertia, float linearDamping, float angularDamping, float friction, float restitution) 71 public RigidBody(float mass, MotionState motionState, CollisionShape collisionShape, Vector3 localInertia, float linearDamping, float angularDamping, float friction, float restitution)
72 { 72 {
73 _optionalMotionState = motionState; 73 _optionalMotionState = motionState;
74 _angularFactor = 1; 74 _angularFactor = 1;
75 _angularDamping = 0.5f; 75 _angularDamping = 0.5f;
76 76
77 if (motionState != null) 77 if (motionState != null)
78 { 78 {
79 motionState.GetWorldTransform(out _worldTransform); 79 motionState.GetWorldTransform(out _worldTransform);
80 } 80 }
81 else 81 else
82 { 82 {
83 WorldTransform = Matrix.Identity; 83 WorldTransform = Matrix.Identity;
84 } 84 }
85 85
86 InterpolationWorldTransform = WorldTransform; 86 InterpolationWorldTransform = WorldTransform;
87 InterpolationLinearVelocity = new Vector3(); 87 InterpolationLinearVelocity = new Vector3();
88 InterpolationAngularVelocity = new Vector3(); 88 InterpolationAngularVelocity = new Vector3();
89 89
90 //moved to btCollisionObject 90 //moved to btCollisionObject
91 Friction = friction; 91 Friction = friction;
92 Restitution = restitution; 92 Restitution = restitution;
93 93
94 CollisionShape = collisionShape; 94 CollisionShape = collisionShape;
95 _debugBodyId = UniqueID++; 95 _debugBodyId = UniqueID++;
96 96
97 //m_internalOwner is to allow upcasting from collision object to rigid body 97 //m_internalOwner is to allow upcasting from collision object to rigid body
98 Owner = this; 98 Owner = this;
99 99
100 SetMassProps(mass, localInertia); 100 SetMassProps(mass, localInertia);
101 SetDamping(linearDamping, angularDamping); 101 SetDamping(linearDamping, angularDamping);
102 UpdateInertiaTensor(); 102 UpdateInertiaTensor();
103 } 103 }
104 104
105 public int DebugBodyID { get { return _debugBodyId; } set { _debugBodyId = value; } } 105 public int DebugBodyID { get { return _debugBodyId; } set { _debugBodyId = value; } }
106 106
107 public ContactSolverType ContactSolverType { get { return _contactSolverType; } set { _contactSolverType = value; } } 107 public ContactSolverType ContactSolverType { get { return _contactSolverType; } set { _contactSolverType = value; } }
108 public ContactSolverType FrictionSolverType { get { return _frictionSolverType; } set { _frictionSolverType = value; } } 108 public ContactSolverType FrictionSolverType { get { return _frictionSolverType; } set { _frictionSolverType = value; } }
109 109
110 public float AngularFactor { get { return _angularFactor; } set { _angularFactor = value; } } 110 public float AngularFactor { get { return _angularFactor; } set { _angularFactor = value; } }
111 111
112 //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase? 112 //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase?
113 public bool IsInWorld { get { return Broadphase != null; } } 113 public bool IsInWorld { get { return Broadphase != null; } }
114 114
115 public Vector3 Gravity 115 public Vector3 Gravity
116 { 116 {
117 get { return _gravity; } 117 get { return _gravity; }
118 set 118 set
119 { 119 {
120 if (_inverseMass != 0.0f) 120 if (_inverseMass != 0.0f)
121 { 121 {
122 _gravity = value * (1.0f / _inverseMass); 122 _gravity = value * (1.0f / _inverseMass);
123 } 123 }
124 } 124 }
125 } 125 }
126 public Matrix InvInertiaTensorWorld { get { return _invInertiaTensorWorld; } } 126 public Matrix InvInertiaTensorWorld { get { return _invInertiaTensorWorld; } }
127 public float InverseMass { get { return _inverseMass; } } 127 public float InverseMass { get { return _inverseMass; } }
128 public Vector3 InvInertiaDiagLocal { get { return _invInertiaLocal; } set { _invInertiaLocal = value; } } 128 public Vector3 InvInertiaDiagLocal { get { return _invInertiaLocal; } set { _invInertiaLocal = value; } }
129 public Vector3 CenterOfMassPosition { get { return WorldTransform.Translation; } } 129 public Vector3 CenterOfMassPosition { get { return WorldTransform.Translation; } }
130 public Quaternion Orientation { get { return Quaternion.CreateFromRotationMatrix(WorldTransform); } } 130 public Quaternion Orientation { get { return Quaternion.CreateFromRotationMatrix(WorldTransform); } }
131 public Matrix CenterOfMassTransform 131 public Matrix CenterOfMassTransform
132 { 132 {
133 get { return WorldTransform; } 133 get { return WorldTransform; }
134 set 134 set
135 { 135 {
136 InterpolationWorldTransform = value; 136 InterpolationWorldTransform = value;
137 InterpolationLinearVelocity = LinearVelocity; 137 InterpolationLinearVelocity = LinearVelocity;
138 InterpolationAngularVelocity = AngularVelocity; 138 InterpolationAngularVelocity = AngularVelocity;
139 WorldTransform = value; 139 WorldTransform = value;
140 UpdateInertiaTensor(); 140 UpdateInertiaTensor();
141 } 141 }
142 } 142 }
143 143
144 public Vector3 LinearVelocity 144 public Vector3 LinearVelocity
145 { 145 {
146 get { return _linearVelocity; } 146 get { return _linearVelocity; }
147 set 147 set
148 { 148 {
149 if (CollisionFlags == CollisionOptions.StaticObject) 149 if (CollisionFlags == CollisionOptions.StaticObject)
150 throw new BulletException("Static objects can't have linear velocity!"); 150 throw new BulletException("Static objects can't have linear velocity!");
151 _linearVelocity = value; 151 _linearVelocity = value;
152 } 152 }
153 } 153 }
154 154
155 public Vector3 AngularVelocity 155 public Vector3 AngularVelocity
156 { 156 {
157 get { return _angularVelocity; } 157 get { return _angularVelocity; }
158 set 158 set
159 { 159 {
160 if (CollisionFlags == CollisionOptions.StaticObject) 160 if (CollisionFlags == CollisionOptions.StaticObject)
161 throw new BulletException("Static objects can't have angular velocity!"); 161 throw new BulletException("Static objects can't have angular velocity!");
162 _angularVelocity = value; 162 _angularVelocity = value;
163 } 163 }
164 } 164 }
165 165
166 //MotionState allows to automatic synchronize the world transform for active objects 166 //MotionState allows to automatic synchronize the world transform for active objects
167 public MotionState MotionState 167 public MotionState MotionState
168 { 168 {
169 get { return _optionalMotionState; } 169 get { return _optionalMotionState; }
170 set 170 set
171 { 171 {
172 _optionalMotionState = value; 172 _optionalMotionState = value;
173 if (_optionalMotionState != null) 173 if (_optionalMotionState != null)
174 value.GetWorldTransform(out _worldTransform); 174 value.GetWorldTransform(out _worldTransform);
175 } 175 }
176 } 176 }
177 177
178 public static float LinearAirDamping { get { return _linearAirDamping; } set { _linearAirDamping = value; } } 178 public static float LinearAirDamping { get { return _linearAirDamping; } set { _linearAirDamping = value; } }
179 public static float RigidBodyDeactivationTime { get { return _rigidBodyDeactivationTime; } set { _rigidBodyDeactivationTime = value; } } 179 public static float RigidBodyDeactivationTime { get { return _rigidBodyDeactivationTime; } set { _rigidBodyDeactivationTime = value; } }
180 public static bool DisableDeactivation { get { return _disableDeactivation; } set { _disableDeactivation = value; } } 180 public static bool DisableDeactivation { get { return _disableDeactivation; } set { _disableDeactivation = value; } }
181 public static float LinearSleepingThreshold { get { return _linearSleepingThreshold; } set { _linearSleepingThreshold = value; } } 181 public static float LinearSleepingThreshold { get { return _linearSleepingThreshold; } set { _linearSleepingThreshold = value; } }
182 public static float AngularSleepingThreshold { get { return _angularSleepingThreshold; } set { _angularSleepingThreshold = value; } } 182 public static float AngularSleepingThreshold { get { return _angularSleepingThreshold; } set { _angularSleepingThreshold = value; } }
183 public static int UniqueID { get { return _uniqueId; } set { _uniqueId = value; } } 183 public static int UniqueID { get { return _uniqueId; } set { _uniqueId = value; } }
184 184
185 public void ProceedToTransform(Matrix newTrans) 185 public void ProceedToTransform(Matrix newTrans)
186 { 186 {
187 CenterOfMassTransform = newTrans; 187 CenterOfMassTransform = newTrans;
188 } 188 }
189 189
190 //to keep collision detection and dynamics separate we don't store a rigidbody pointer 190 //to keep collision detection and dynamics separate we don't store a rigidbody pointer
191 //but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast 191 //but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast
192 public static RigidBody Upcast(CollisionObject colObj) 192 public static RigidBody Upcast(CollisionObject colObj)
193 { 193 {
194 return colObj.Owner as RigidBody; 194 return colObj.Owner as RigidBody;
195 } 195 }
196 196
197 // continuous collision detection needs prediction 197 // continuous collision detection needs prediction
198 public void PredictIntegratedTransform(float step, ref Matrix predictedTransform) 198 public void PredictIntegratedTransform(float step, ref Matrix predictedTransform)
199 { 199 {
200 if ((_angularVelocity.LengthSquared() < _clippedAngvelThresholdSqr) && 200 if ((_angularVelocity.LengthSquared() < _clippedAngvelThresholdSqr) &&
201 (_linearVelocity.LengthSquared() < _clippedLinearThresholdSqr)) 201 (_linearVelocity.LengthSquared() < _clippedLinearThresholdSqr))
202 { 202 {
203 _angularVelocity *= _jitterVelocityDampingFactor; 203 _angularVelocity *= _jitterVelocityDampingFactor;
204 _linearVelocity *= _jitterVelocityDampingFactor; 204 _linearVelocity *= _jitterVelocityDampingFactor;
205 } 205 }
206 206
207 TransformUtil.IntegrateTransform(WorldTransform, _linearVelocity, _angularVelocity, step, ref predictedTransform); 207 TransformUtil.IntegrateTransform(WorldTransform, _linearVelocity, _angularVelocity, step, ref predictedTransform);
208 } 208 }
209 209
210 public void SaveKinematicState(float step) 210 public void SaveKinematicState(float step)
211 { 211 {
212 //todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities 212 //todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities
213 if (step != 0) 213 if (step != 0)
214 { 214 {
215 //if we use motionstate to synchronize world transforms, get the new kinematic/animated world transform 215 //if we use motionstate to synchronize world transforms, get the new kinematic/animated world transform
216 if (MotionState != null) 216 if (MotionState != null)
217 MotionState.GetWorldTransform(out _worldTransform); 217 MotionState.GetWorldTransform(out _worldTransform);
218 218
219 TransformUtil.CalculateVelocity(InterpolationWorldTransform, WorldTransform, step, ref _linearVelocity, ref _angularVelocity); 219 TransformUtil.CalculateVelocity(InterpolationWorldTransform, WorldTransform, step, ref _linearVelocity, ref _angularVelocity);
220 InterpolationLinearVelocity = _linearVelocity; 220 InterpolationLinearVelocity = _linearVelocity;
221 InterpolationAngularVelocity = _angularVelocity; 221 InterpolationAngularVelocity = _angularVelocity;
222 InterpolationWorldTransform = WorldTransform; 222 InterpolationWorldTransform = WorldTransform;
223 } 223 }
224 } 224 }
225 225
226 public void ApplyForces(float step) 226 public void ApplyForces(float step)
227 { 227 {
228 if (IsStaticOrKinematicObject) 228 if (IsStaticOrKinematicObject)
229 return; 229 return;
230 230
231 ApplyCentralForce(_gravity); 231 ApplyCentralForce(_gravity);
232 232
233 _linearVelocity *= (1 - step * LinearAirDamping * _linearDamping) < 0.0f ? 0.0f : (1.0f < (1 - step * LinearAirDamping * _linearDamping) ? 1.0f : (1 - step * LinearAirDamping * _linearDamping)); 233 _linearVelocity *= (1 - step * LinearAirDamping * _linearDamping) < 0.0f ? 0.0f : (1.0f < (1 - step * LinearAirDamping * _linearDamping) ? 1.0f : (1 - step * LinearAirDamping * _linearDamping));
234 _angularVelocity *= (1 - step * _angularDamping) < 0.0f ? 0.0f : (1.0f < (1 - step * _angularDamping) ? 1.0f : (1 - step * _angularDamping)); 234 _angularVelocity *= (1 - step * _angularDamping) < 0.0f ? 0.0f : (1.0f < (1 - step * _angularDamping) ? 1.0f : (1 - step * _angularDamping));
235 235
236 float speed = _linearVelocity.Length(); 236 float speed = _linearVelocity.Length();
237 if (speed < _linearDamping) 237 if (speed < _linearDamping)
238 { 238 {
239 float dampVel = 0.005f; 239 float dampVel = 0.005f;
240 if (speed > dampVel) 240 if (speed > dampVel)
241 { 241 {
242 Vector3 dir = _linearVelocity; 242 Vector3 dir = _linearVelocity;
243 dir.Normalize(); 243 dir.Normalize();
244 _linearVelocity -= dir * dampVel; 244 _linearVelocity -= dir * dampVel;
245 } 245 }
246 else 246 else
247 { 247 {
248 _linearVelocity = new Vector3(); 248 _linearVelocity = new Vector3();
249 } 249 }
250 } 250 }
251 251
252 float angSpeed = _angularVelocity.Length(); 252 float angSpeed = _angularVelocity.Length();
253 if (angSpeed < _angularDamping) 253 if (angSpeed < _angularDamping)
254 { 254 {
255 float angDampVel = 0.005f; 255 float angDampVel = 0.005f;
256 if (angSpeed > angDampVel) 256 if (angSpeed > angDampVel)
257 { 257 {
258 Vector3 dir = _angularVelocity; 258 Vector3 dir = _angularVelocity;
259 dir.Normalize(); 259 dir.Normalize();
260 _angularVelocity -= dir * angDampVel; 260 _angularVelocity -= dir * angDampVel;
261 } 261 }
262 else 262 else
263 { 263 {
264 _angularVelocity = new Vector3(); 264 _angularVelocity = new Vector3();
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 public void SetDamping(float linDamping, float angDamping) 269 public void SetDamping(float linDamping, float angDamping)
270 { 270 {
271 _linearDamping = linDamping < 0.0f ? 0.0f : (1.0f < linDamping ? 1.0f : linDamping); 271 _linearDamping = linDamping < 0.0f ? 0.0f : (1.0f < linDamping ? 1.0f : linDamping);
272 _angularDamping = angDamping < 0.0f ? 0.0f : (1.0f < angDamping ? 1.0f : angDamping); 272 _angularDamping = angDamping < 0.0f ? 0.0f : (1.0f < angDamping ? 1.0f : angDamping);
273 } 273 }
274 274
275 public void SetMassProps(float mass, Vector3 inertia) 275 public void SetMassProps(float mass, Vector3 inertia)
276 { 276 {
277 if (mass == 0) 277 if (mass == 0)
278 { 278 {
279 CollisionFlags |= CollisionOptions.StaticObject; 279 CollisionFlags |= CollisionOptions.StaticObject;
280 _inverseMass = 0; 280 _inverseMass = 0;
281 } 281 }
282 else 282 else
283 { 283 {
284 CollisionFlags &= (~CollisionOptions.StaticObject); 284 CollisionFlags &= (~CollisionOptions.StaticObject);
285 _inverseMass = 1.0f / mass; 285 _inverseMass = 1.0f / mass;
286 } 286 }
287 287
288 _invInertiaLocal = new Vector3(inertia.X != 0.0f ? 1.0f / inertia.X : 0.0f, 288 _invInertiaLocal = new Vector3(inertia.X != 0.0f ? 1.0f / inertia.X : 0.0f,
289 inertia.Y != 0.0f ? 1.0f / inertia.Y : 0.0f, 289 inertia.Y != 0.0f ? 1.0f / inertia.Y : 0.0f,
290 inertia.Z != 0.0f ? 1.0f / inertia.Z : 0.0f); 290 inertia.Z != 0.0f ? 1.0f / inertia.Z : 0.0f);
291 } 291 }
292 292
293 public void IntegrateVelocities(float step) 293 public void IntegrateVelocities(float step)
294 { 294 {
295 if (IsStaticOrKinematicObject) 295 if (IsStaticOrKinematicObject)
296 return; 296 return;
297 297
298 _linearVelocity += _totalForce * (_inverseMass * step); 298 _linearVelocity += _totalForce * (_inverseMass * step);
299 _angularVelocity += Vector3.TransformNormal(_totalTorque, _invInertiaTensorWorld) * step; 299 _angularVelocity += Vector3.TransformNormal(_totalTorque, _invInertiaTensorWorld) * step;
300 300
301 //float MAX_ANGVEL = MonoXnaCompactMaths.MathHelper.PiOver2; 301 //float MAX_ANGVEL = MonoXnaCompactMaths.MathHelper.PiOver2;
302 float MAX_ANGVEL = (float)Math.PI / 2.0f; 302 float MAX_ANGVEL = (float)Math.PI / 2.0f;
303 /// clamp angular velocity. collision calculations will fail on higher angular velocities 303 /// clamp angular velocity. collision calculations will fail on higher angular velocities
304 float angvel = _angularVelocity.Length(); 304 float angvel = _angularVelocity.Length();
305 if (angvel * step > MAX_ANGVEL) 305 if (angvel * step > MAX_ANGVEL)
306 { 306 {
307 _angularVelocity *= (MAX_ANGVEL / step) / angvel; 307 _angularVelocity *= (MAX_ANGVEL / step) / angvel;
308 } 308 }
309 309
310 ClearForces(); 310 ClearForces();
311 } 311 }
312 312
313 public void ApplyCentralForce(Vector3 force) 313 public void ApplyCentralForce(Vector3 force)
314 { 314 {
315 _totalForce += force; 315 _totalForce += force;
316 } 316 }
317 317
318 public void ApplyTorque(Vector3 torque) 318 public void ApplyTorque(Vector3 torque)
319 { 319 {
320 _totalTorque += torque; 320 _totalTorque += torque;
321 } 321 }
322 322
323 public void ApplyForce(Vector3 force, Vector3 rel_pos) 323 public void ApplyForce(Vector3 force, Vector3 rel_pos)
324 { 324 {
325 ApplyCentralForce(force); 325 ApplyCentralForce(force);
326 ApplyTorque(Vector3.Cross(rel_pos, force)); 326 ApplyTorque(Vector3.Cross(rel_pos, force));
327 } 327 }
328 328
329 public void ApplyCentralImpulse(Vector3 impulse) 329 public void ApplyCentralImpulse(Vector3 impulse)
330 { 330 {
331 _linearVelocity += impulse * _inverseMass; 331 _linearVelocity += impulse * _inverseMass;
332 } 332 }
333 333
334 public void ApplyTorqueImpulse(Vector3 torque) 334 public void ApplyTorqueImpulse(Vector3 torque)
335 { 335 {
336 _angularVelocity += Vector3.TransformNormal(torque, _invInertiaTensorWorld); 336 _angularVelocity += Vector3.TransformNormal(torque, _invInertiaTensorWorld);
337 } 337 }
338 338
339 public void ApplyImpulse(Vector3 impulse, Vector3 rel_pos) 339 public void ApplyImpulse(Vector3 impulse, Vector3 rel_pos)
340 { 340 {
341 if (_inverseMass != 0) 341 if (_inverseMass != 0)
342 { 342 {
343 ApplyCentralImpulse(impulse); 343 ApplyCentralImpulse(impulse);
344 if (_angularFactor != 0) 344 if (_angularFactor != 0)
345 ApplyTorqueImpulse(Vector3.Cross(rel_pos, impulse) * _angularFactor); 345 ApplyTorqueImpulse(Vector3.Cross(rel_pos, impulse) * _angularFactor);
346 } 346 }
347 } 347 }
348 348
349 public void InternalApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) 349 public void InternalApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude)
350 { 350 {
351 if (_inverseMass != 0) 351 if (_inverseMass != 0)
352 { 352 {
353 _linearVelocity += linearComponent * impulseMagnitude; 353 _linearVelocity += linearComponent * impulseMagnitude;
354 if (_angularFactor != 0) 354 if (_angularFactor != 0)
355 _angularVelocity += angularComponent * impulseMagnitude * _angularFactor; 355 _angularVelocity += angularComponent * impulseMagnitude * _angularFactor;
356 } 356 }
357 } 357 }
358 358
359 public void ClearForces() 359 public void ClearForces()
360 { 360 {
361 _totalForce = new Vector3(); 361 _totalForce = new Vector3();
362 _totalTorque = new Vector3(); 362 _totalTorque = new Vector3();
363 } 363 }
364 364
365 public void UpdateInertiaTensor() 365 public void UpdateInertiaTensor()
366 { 366 {
367 Matrix temp = WorldTransform; 367 Matrix temp = WorldTransform;
368 temp.Translation = Vector3.Zero; 368 temp.Translation = Vector3.Zero;
369 _invInertiaTensorWorld = MatrixOperations.Multiply(MatrixOperations.Scaled(WorldTransform, _invInertiaLocal), Matrix.Transpose(temp)); 369 _invInertiaTensorWorld = MatrixOperations.Multiply(MatrixOperations.Scaled(WorldTransform, _invInertiaLocal), Matrix.Transpose(temp));
370 } 370 }
371 371
372 public Vector3 GetVelocityInLocalPoint(Vector3 relPos) 372 public Vector3 GetVelocityInLocalPoint(Vector3 relPos)
373 { 373 {
374 //we also calculate lin/ang velocity for kinematic objects 374 //we also calculate lin/ang velocity for kinematic objects
375 return _linearVelocity + Vector3.Cross(_angularVelocity, relPos); 375 return _linearVelocity + Vector3.Cross(_angularVelocity, relPos);
376 376
377 //for kinematic objects, we could also use use: 377 //for kinematic objects, we could also use use:
378 // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep; 378 // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep;
379 } 379 }
380 380
381 public void Translate(Vector3 v) 381 public void Translate(Vector3 v)
382 { 382 {
383 Matrix m = WorldTransform; 383 Matrix m = WorldTransform;
384 m.Translation += v; 384 m.Translation += v;
385 WorldTransform = m; 385 WorldTransform = m;
386 } 386 }
387 387
388 public void GetAabb(out Vector3 aabbMin, out Vector3 aabbMax) 388 public void GetAabb(out Vector3 aabbMin, out Vector3 aabbMax)
389 { 389 {
390 CollisionShape.GetAabb(WorldTransform, out aabbMin, out aabbMax); 390 CollisionShape.GetAabb(WorldTransform, out aabbMin, out aabbMax);
391 } 391 }
392 392
393 public float ComputeImpulseDenominator(Vector3 pos, Vector3 normal) 393 public float ComputeImpulseDenominator(Vector3 pos, Vector3 normal)
394 { 394 {
395 Vector3 r0 = pos - CenterOfMassPosition; 395 Vector3 r0 = pos - CenterOfMassPosition;
396 Vector3 c0 = Vector3.Cross(r0, normal); 396 Vector3 c0 = Vector3.Cross(r0, normal);
397 Vector3 vec = Vector3.Cross(Vector3.TransformNormal(c0, InvInertiaTensorWorld), r0); 397 Vector3 vec = Vector3.Cross(Vector3.TransformNormal(c0, InvInertiaTensorWorld), r0);
398 398
399 return _inverseMass + Vector3.Dot(normal, vec); 399 return _inverseMass + Vector3.Dot(normal, vec);
400 400
401 } 401 }
402 402
403 public float ComputeAngularImpulseDenominator(Vector3 axis) 403 public float ComputeAngularImpulseDenominator(Vector3 axis)
404 { 404 {
405 Vector3 vec = Vector3.TransformNormal(axis, InvInertiaTensorWorld); 405 Vector3 vec = Vector3.TransformNormal(axis, InvInertiaTensorWorld);
406 return Vector3.Dot(axis, vec); 406 return Vector3.Dot(axis, vec);
407 } 407 }
408 408
409 public void UpdateDeactivation(float timeStep) 409 public void UpdateDeactivation(float timeStep)
410 { 410 {
411 if ((ActivationState == ActivationState.IslandSleeping) || (ActivationState == ActivationState.DisableDeactivation)) 411 if ((ActivationState == ActivationState.IslandSleeping) || (ActivationState == ActivationState.DisableDeactivation))
412 return; 412 return;
413 413
414 if ((LinearVelocity.LengthSquared() < LinearSleepingThreshold * LinearSleepingThreshold) && 414 if ((LinearVelocity.LengthSquared() < LinearSleepingThreshold * LinearSleepingThreshold) &&
415 (AngularVelocity.LengthSquared() < AngularSleepingThreshold * AngularSleepingThreshold)) 415 (AngularVelocity.LengthSquared() < AngularSleepingThreshold * AngularSleepingThreshold))
416 { 416 {
417 DeactivationTime += timeStep; 417 DeactivationTime += timeStep;
418 } 418 }
419 else 419 else
420 { 420 {
421 DeactivationTime = 0; 421 DeactivationTime = 0;
422 ActivationState = ActivationState.Nothing; 422 ActivationState = ActivationState.Nothing;
423 } 423 }
424 424
425 } 425 }
426 426
427 public bool WantsSleeping() 427 public bool WantsSleeping()
428 { 428 {
429 429
430 if (ActivationState == ActivationState.DisableDeactivation) 430 if (ActivationState == ActivationState.DisableDeactivation)
431 return false; 431 return false;
432 432
433 //disable deactivation 433 //disable deactivation
434 if (DisableDeactivation || (RigidBodyDeactivationTime == 0)) 434 if (DisableDeactivation || (RigidBodyDeactivationTime == 0))
435 return false; 435 return false;
436 436
437 if ((ActivationState == ActivationState.IslandSleeping) || (ActivationState == ActivationState.WantsDeactivation)) 437 if ((ActivationState == ActivationState.IslandSleeping) || (ActivationState == ActivationState.WantsDeactivation))
438 return true; 438 return true;
439 439
440 if (DeactivationTime > RigidBodyDeactivationTime) 440 if (DeactivationTime > RigidBodyDeactivationTime)
441 { 441 {
442 return true; 442 return true;
443 } 443 }
444 return false; 444 return false;
445 } 445 }
446 } 446 }
447} 447}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/SimpleDynamicsWorld.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/SimpleDynamicsWorld.cs
index aa91a03..3430a73 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/SimpleDynamicsWorld.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/SimpleDynamicsWorld.cs
@@ -1,211 +1,211 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public class SimpleDynamicsWorld : DynamicsWorld 29 public class SimpleDynamicsWorld : DynamicsWorld
30 { 30 {
31 private IConstraintSolver _constraintSolver; 31 private IConstraintSolver _constraintSolver;
32 private bool _ownsConstraintSolver; 32 private bool _ownsConstraintSolver;
33 private Vector3 _gravity; 33 private Vector3 _gravity;
34 private IDebugDraw _debugDrawer; 34 private IDebugDraw _debugDrawer;
35 35
36 /// <summary> 36 /// <summary>
37 /// this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver 37 /// this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
38 /// </summary> 38 /// </summary>
39 /// <param name="dispatcher"></param> 39 /// <param name="dispatcher"></param>
40 /// <param name="pairCache"></param> 40 /// <param name="pairCache"></param>
41 /// <param name="constraintSolver"></param> 41 /// <param name="constraintSolver"></param>
42 public SimpleDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache, IConstraintSolver constraintSolver) 42 public SimpleDynamicsWorld(IDispatcher dispatcher, OverlappingPairCache pairCache, IConstraintSolver constraintSolver)
43 : base(dispatcher, pairCache) 43 : base(dispatcher, pairCache)
44 { 44 {
45 _constraintSolver = constraintSolver; 45 _constraintSolver = constraintSolver;
46 _ownsConstraintSolver = false; 46 _ownsConstraintSolver = false;
47 _gravity = new Vector3(0, 0, -10); 47 _gravity = new Vector3(0, 0, -10);
48 } 48 }
49 49
50 public override Vector3 Gravity 50 public override Vector3 Gravity
51 { 51 {
52 set 52 set
53 { 53 {
54 _gravity = value; 54 _gravity = value;
55 for (int i = 0; i < CollisionObjects.Count; i++) 55 for (int i = 0; i < CollisionObjects.Count; i++)
56 { 56 {
57 CollisionObject colObj = CollisionObjects[i]; 57 CollisionObject colObj = CollisionObjects[i];
58 RigidBody body = RigidBody.Upcast(colObj); 58 RigidBody body = RigidBody.Upcast(colObj);
59 if (body != null) 59 if (body != null)
60 { 60 {
61 body.Gravity = value; 61 body.Gravity = value;
62 } 62 }
63 } 63 }
64 } 64 }
65 } 65 }
66 66
67 public override IConstraintSolver ConstraintSolver 67 public override IConstraintSolver ConstraintSolver
68 { 68 {
69 set 69 set
70 { 70 {
71 _ownsConstraintSolver = false; 71 _ownsConstraintSolver = false;
72 _constraintSolver = value; 72 _constraintSolver = value;
73 } 73 }
74 } 74 }
75 75
76 public override IDebugDraw DebugDrawer 76 public override IDebugDraw DebugDrawer
77 { 77 {
78 get 78 get
79 { 79 {
80 return _debugDrawer; 80 return _debugDrawer;
81 } 81 }
82 set 82 set
83 { 83 {
84 _debugDrawer = value; 84 _debugDrawer = value;
85 } 85 }
86 } 86 }
87 87
88 public override void StepSimulation(float timeStep, int numSubsteps, float fixedTimeStep) 88 public override void StepSimulation(float timeStep, int numSubsteps, float fixedTimeStep)
89 { 89 {
90 //apply gravity, predict motion 90 //apply gravity, predict motion
91 PredictUnconstraintMotion(timeStep); 91 PredictUnconstraintMotion(timeStep);
92 92
93 DispatcherInfo dispatchInfo = new DispatcherInfo(); 93 DispatcherInfo dispatchInfo = new DispatcherInfo();
94 dispatchInfo.TimeStep = timeStep; 94 dispatchInfo.TimeStep = timeStep;
95 dispatchInfo.StepCount = 0; 95 dispatchInfo.StepCount = 0;
96 dispatchInfo.DebugDraw = DebugDrawer; 96 dispatchInfo.DebugDraw = DebugDrawer;
97 //perform collision detection 97 //perform collision detection
98 PerformDiscreteCollisionDetection(); 98 PerformDiscreteCollisionDetection();
99 99
100 //solve contact constraints 100 //solve contact constraints
101 int numManifolds = Dispatcher.ManifoldCount; 101 int numManifolds = Dispatcher.ManifoldCount;
102 if (numManifolds != 0) 102 if (numManifolds != 0)
103 { 103 {
104 104
105 List<PersistentManifold> manifolds = (Dispatcher as CollisionDispatcher).Manifolds; 105 List<PersistentManifold> manifolds = (Dispatcher as CollisionDispatcher).Manifolds;
106 //int numManifolds = m_dispatcher1.GetNumManifolds(); 106 //int numManifolds = m_dispatcher1.GetNumManifolds();
107 ContactSolverInfo infoGlobal = new ContactSolverInfo(); 107 ContactSolverInfo infoGlobal = new ContactSolverInfo();
108 infoGlobal.TimeStep = timeStep; 108 infoGlobal.TimeStep = timeStep;
109 109
110 _constraintSolver.SolveGroup(new List<CollisionObject>(), manifolds, manifolds.Count, new List<TypedConstraint>(), infoGlobal, _debugDrawer); 110 _constraintSolver.SolveGroup(new List<CollisionObject>(), manifolds, manifolds.Count, new List<TypedConstraint>(), infoGlobal, _debugDrawer);
111 } 111 }
112 //integrate transforms 112 //integrate transforms
113 IntegrateTransforms(timeStep); 113 IntegrateTransforms(timeStep);
114 114
115 UpdateAabbs(); 115 UpdateAabbs();
116 116
117 SynchronizeMotionStates(); 117 SynchronizeMotionStates();
118 } 118 }
119 119
120 public override void UpdateAabbs() 120 public override void UpdateAabbs()
121 { 121 {
122 for (int i = 0; i < CollisionObjects.Count; i++) 122 for (int i = 0; i < CollisionObjects.Count; i++)
123 { 123 {
124 CollisionObject colObj = CollisionObjects[i]; 124 CollisionObject colObj = CollisionObjects[i];
125 RigidBody body = RigidBody.Upcast(colObj); 125 RigidBody body = RigidBody.Upcast(colObj);
126 if (body != null) 126 if (body != null)
127 { 127 {
128 if (body.IsActive && (!body.IsStaticObject)) 128 if (body.IsActive && (!body.IsStaticObject))
129 { 129 {
130 Vector3 minAabb, maxAabb; 130 Vector3 minAabb, maxAabb;
131 colObj.CollisionShape.GetAabb(colObj.WorldTransform, out minAabb, out maxAabb); 131 colObj.CollisionShape.GetAabb(colObj.WorldTransform, out minAabb, out maxAabb);
132 IBroadphase bp = Broadphase; 132 IBroadphase bp = Broadphase;
133 bp.SetAabb(body.Broadphase, minAabb, maxAabb); 133 bp.SetAabb(body.Broadphase, minAabb, maxAabb);
134 } 134 }
135 } 135 }
136 } 136 }
137 } 137 }
138 138
139 public override void AddRigidBody(RigidBody body) 139 public override void AddRigidBody(RigidBody body)
140 { 140 {
141 body.Gravity = _gravity; 141 body.Gravity = _gravity;
142 142
143 if (body.CollisionShape != null) 143 if (body.CollisionShape != null)
144 { 144 {
145 AddCollisionObject(body); 145 AddCollisionObject(body);
146 } 146 }
147 } 147 }
148 148
149 public override void RemoveRigidBody(RigidBody body) 149 public override void RemoveRigidBody(RigidBody body)
150 { 150 {
151 RemoveCollisionObject(body); 151 RemoveCollisionObject(body);
152 } 152 }
153 153
154 public void SynchronizeMotionStates() 154 public void SynchronizeMotionStates()
155 { 155 {
156 for (int i = 0; i < CollisionObjects.Count; i++) 156 for (int i = 0; i < CollisionObjects.Count; i++)
157 { 157 {
158 CollisionObject colObj = CollisionObjects[i]; 158 CollisionObject colObj = CollisionObjects[i];
159 RigidBody body = RigidBody.Upcast(colObj); 159 RigidBody body = RigidBody.Upcast(colObj);
160 if (body != null && body.MotionState != null) 160 if (body != null && body.MotionState != null)
161 { 161 {
162 if (body.ActivationState != ActivationState.IslandSleeping) 162 if (body.ActivationState != ActivationState.IslandSleeping)
163 { 163 {
164 body.MotionState.SetWorldTransform(body.WorldTransform); 164 body.MotionState.SetWorldTransform(body.WorldTransform);
165 } 165 }
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 protected void PredictUnconstraintMotion(float timeStep) 170 protected void PredictUnconstraintMotion(float timeStep)
171 { 171 {
172 for (int i = 0; i < CollisionObjects.Count; i++) 172 for (int i = 0; i < CollisionObjects.Count; i++)
173 { 173 {
174 CollisionObject colObj = CollisionObjects[i]; 174 CollisionObject colObj = CollisionObjects[i];
175 RigidBody body = RigidBody.Upcast(colObj); 175 RigidBody body = RigidBody.Upcast(colObj);
176 if (body != null) 176 if (body != null)
177 { 177 {
178 if (!body.IsStaticObject) 178 if (!body.IsStaticObject)
179 { 179 {
180 if (body.IsActive) 180 if (body.IsActive)
181 { 181 {
182 body.ApplyForces(timeStep); 182 body.ApplyForces(timeStep);
183 body.IntegrateVelocities(timeStep); 183 body.IntegrateVelocities(timeStep);
184 Matrix temp = body.InterpolationWorldTransform; 184 Matrix temp = body.InterpolationWorldTransform;
185 body.PredictIntegratedTransform(timeStep, ref temp); 185 body.PredictIntegratedTransform(timeStep, ref temp);
186 body.InterpolationWorldTransform = temp; 186 body.InterpolationWorldTransform = temp;
187 } 187 }
188 } 188 }
189 } 189 }
190 } 190 }
191 } 191 }
192 192
193 protected void IntegrateTransforms(float timeStep) 193 protected void IntegrateTransforms(float timeStep)
194 { 194 {
195 Matrix predictedTrans = Matrix.Identity; 195 Matrix predictedTrans = Matrix.Identity;
196 for (int i = 0; i < CollisionObjects.Count; i++) 196 for (int i = 0; i < CollisionObjects.Count; i++)
197 { 197 {
198 CollisionObject colObj = CollisionObjects[i]; 198 CollisionObject colObj = CollisionObjects[i];
199 RigidBody body = RigidBody.Upcast(colObj); 199 RigidBody body = RigidBody.Upcast(colObj);
200 if (body != null) 200 if (body != null)
201 { 201 {
202 if (body.IsActive && (!body.IsStaticObject)) 202 if (body.IsActive && (!body.IsStaticObject))
203 { 203 {
204 body.PredictIntegratedTransform(timeStep, ref predictedTrans); 204 body.PredictIntegratedTransform(timeStep, ref predictedTrans);
205 body.ProceedToTransform(predictedTrans); 205 body.ProceedToTransform(predictedTrans);
206 } 206 }
207 } 207 }
208 } 208 }
209 } 209 }
210 } 210 }
211} 211}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/RaycastVehicle.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/RaycastVehicle.cs
index 90db9ee..4e0e64b 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/RaycastVehicle.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/RaycastVehicle.cs
@@ -1,94 +1,94 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public class RaycastVehicle : TypedConstraint 29 public class RaycastVehicle : TypedConstraint
30 { 30 {
31 public override void BuildJacobian() 31 public override void BuildJacobian()
32 { 32 {
33 throw new Exception("The method or operation is not implemented."); 33 throw new Exception("The method or operation is not implemented.");
34 } 34 }
35 35
36 public override void SolveConstraint(float timeStep) 36 public override void SolveConstraint(float timeStep)
37 { 37 {
38 throw new Exception("The method or operation is not implemented."); 38 throw new Exception("The method or operation is not implemented.");
39 } 39 }
40 40
41 public int getNumWheels() 41 public int getNumWheels()
42 { 42 {
43 throw new Exception("The method or operation is not implemented."); 43 throw new Exception("The method or operation is not implemented.");
44 } 44 }
45 45
46 public WheelInfo getWheelInfo(int v) 46 public WheelInfo getWheelInfo(int v)
47 { 47 {
48 throw new Exception("The method or operation is not implemented."); 48 throw new Exception("The method or operation is not implemented.");
49 } 49 }
50 50
51 public void updateWheelTransform(int v, bool p) 51 public void updateWheelTransform(int v, bool p)
52 { 52 {
53 throw new Exception("The method or operation is not implemented."); 53 throw new Exception("The method or operation is not implemented.");
54 } 54 }
55 55
56 public int getRightAxis() 56 public int getRightAxis()
57 { 57 {
58 throw new Exception("The method or operation is not implemented."); 58 throw new Exception("The method or operation is not implemented.");
59 } 59 }
60 60
61 public void updateVehicle(float timeStep) 61 public void updateVehicle(float timeStep)
62 { 62 {
63 throw new Exception("The method or operation is not implemented."); 63 throw new Exception("The method or operation is not implemented.");
64 } 64 }
65 } 65 }
66 66
67 public class DefaultVehicleRaycaster : IVehicleRaycaster 67 public class DefaultVehicleRaycaster : IVehicleRaycaster
68 { 68 {
69 DynamicsWorld _dynamicsWorld; 69 DynamicsWorld _dynamicsWorld;
70 70
71 public DefaultVehicleRaycaster(DynamicsWorld world) 71 public DefaultVehicleRaycaster(DynamicsWorld world)
72 { 72 {
73 _dynamicsWorld = world; 73 _dynamicsWorld = world;
74 } 74 }
75 75
76 public object CastRay(Vector3 from, Vector3 to, out VehicleRaycasterResult result) 76 public object CastRay(Vector3 from, Vector3 to, out VehicleRaycasterResult result)
77 { 77 {
78 CollisionWorld.ClosestRayResultCallback rayCallback = new CollisionWorld.ClosestRayResultCallback(from, to); 78 CollisionWorld.ClosestRayResultCallback rayCallback = new CollisionWorld.ClosestRayResultCallback(from, to);
79 _dynamicsWorld.RayTest(from, to, rayCallback); 79 _dynamicsWorld.RayTest(from, to, rayCallback);
80 80
81 result = new VehicleRaycasterResult(); 81 result = new VehicleRaycasterResult();
82 82
83 if (!rayCallback.HasHit) return 0; 83 if (!rayCallback.HasHit) return 0;
84 RigidBody body = RigidBody.Upcast(rayCallback.CollisionObject); 84 RigidBody body = RigidBody.Upcast(rayCallback.CollisionObject);
85 if (body == null) return 0; 85 if (body == null) return 0;
86 86
87 result.HitPointInWorld = rayCallback.HitPointWorld; 87 result.HitPointInWorld = rayCallback.HitPointWorld;
88 result.HitNormalInWorld = rayCallback.HitNormalWorld; 88 result.HitNormalInWorld = rayCallback.HitNormalWorld;
89 result.HitNormalInWorld.Normalize(); 89 result.HitNormalInWorld.Normalize();
90 result.DistFraction = rayCallback.ClosestHitFraction; 90 result.DistFraction = rayCallback.ClosestHitFraction;
91 return body; 91 return body;
92 } 92 }
93 } 93 }
94} \ No newline at end of file 94} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/VehicleRaycaster.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/VehicleRaycaster.cs
index 86829e3..14c13c6 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/VehicleRaycaster.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/VehicleRaycaster.cs
@@ -1,49 +1,49 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public interface IVehicleRaycaster 29 public interface IVehicleRaycaster
30 { 30 {
31 object CastRay(Vector3 from, Vector3 to, out VehicleRaycasterResult result); 31 object CastRay(Vector3 from, Vector3 to, out VehicleRaycasterResult result);
32 } 32 }
33 33
34 public class VehicleRaycasterResult 34 public class VehicleRaycasterResult
35 { 35 {
36 private Single _distFraction; 36 private Single _distFraction;
37 private Vector3 _hitNormalInWorld; 37 private Vector3 _hitNormalInWorld;
38 private Vector3 _hitPointInWorld; 38 private Vector3 _hitPointInWorld;
39 39
40 public VehicleRaycasterResult() 40 public VehicleRaycasterResult()
41 { 41 {
42 _distFraction = -1; 42 _distFraction = -1;
43 } 43 }
44 44
45 public float DistFraction { get { return _distFraction; } set { _distFraction = value; } } 45 public float DistFraction { get { return _distFraction; } set { _distFraction = value; } }
46 public Vector3 HitNormalInWorld { get { return _hitNormalInWorld; } set { _hitNormalInWorld = value; } } 46 public Vector3 HitNormalInWorld { get { return _hitNormalInWorld; } set { _hitNormalInWorld = value; } }
47 public Vector3 HitPointInWorld { get { return _hitPointInWorld; } set { _hitPointInWorld = value; } } 47 public Vector3 HitPointInWorld { get { return _hitPointInWorld; } set { _hitPointInWorld = value; } }
48 } 48 }
49} 49}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/WheelInfo.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/WheelInfo.cs
index d4a94f3..516e455 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/WheelInfo.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Dynamics/Vehicle/WheelInfo.cs
@@ -1,529 +1,529 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX.Dynamics 27namespace XnaDevRu.BulletX.Dynamics
28{ 28{
29 public struct WheelInfoConstructionInfo 29 public struct WheelInfoConstructionInfo
30 { 30 {
31 private Vector3 _chassicConnectionCS; 31 private Vector3 _chassicConnectionCS;
32 private Vector3 _wheelDirectionCS; 32 private Vector3 _wheelDirectionCS;
33 private Vector3 _wheelAxisCS; 33 private Vector3 _wheelAxisCS;
34 34
35 private Single _suspensionRestLength; 35 private Single _suspensionRestLength;
36 private Single _maxSuspensionTravelCm; 36 private Single _maxSuspensionTravelCm;
37 private Single _wheelRadius; 37 private Single _wheelRadius;
38 private Single _suspensionStiffness; 38 private Single _suspensionStiffness;
39 private Single _wheelsDampingCompression; 39 private Single _wheelsDampingCompression;
40 private Single _wheelsDampingRelaxation; 40 private Single _wheelsDampingRelaxation;
41 private Single _frictionSlip; 41 private Single _frictionSlip;
42 42
43 private Boolean _isFrontWheel; 43 private Boolean _isFrontWheel;
44 44
45 #region Basic Properties 45 #region Basic Properties
46 public Vector3 ChassicConnectionCS 46 public Vector3 ChassicConnectionCS
47 { 47 {
48 get { return _chassicConnectionCS; } 48 get { return _chassicConnectionCS; }
49 set { _chassicConnectionCS = value; } 49 set { _chassicConnectionCS = value; }
50 } 50 }
51 51
52 public Vector3 WheelDirectionCS 52 public Vector3 WheelDirectionCS
53 { 53 {
54 get { return _wheelDirectionCS; } 54 get { return _wheelDirectionCS; }
55 set { _wheelDirectionCS = value; } 55 set { _wheelDirectionCS = value; }
56 } 56 }
57 57
58 public Vector3 WheelAxleCS 58 public Vector3 WheelAxleCS
59 { 59 {
60 get { return _wheelAxisCS; } 60 get { return _wheelAxisCS; }
61 set { _wheelAxisCS = value; } 61 set { _wheelAxisCS = value; }
62 } 62 }
63 63
64 64
65 public Single SuspensionRestLength 65 public Single SuspensionRestLength
66 { 66 {
67 get { return _suspensionRestLength; } 67 get { return _suspensionRestLength; }
68 set { _suspensionRestLength = value; } 68 set { _suspensionRestLength = value; }
69 } 69 }
70 70
71 public Single MaxSuspensionTravelCm 71 public Single MaxSuspensionTravelCm
72 { 72 {
73 get { return _maxSuspensionTravelCm; } 73 get { return _maxSuspensionTravelCm; }
74 set { _maxSuspensionTravelCm = value; } 74 set { _maxSuspensionTravelCm = value; }
75 } 75 }
76 76
77 public Single WheelRadius 77 public Single WheelRadius
78 { 78 {
79 get { return _wheelRadius; } 79 get { return _wheelRadius; }
80 set { _wheelRadius = value; } 80 set { _wheelRadius = value; }
81 } 81 }
82 82
83 83
84 public Single SuspensionStiffness 84 public Single SuspensionStiffness
85 { 85 {
86 get { return _suspensionStiffness; } 86 get { return _suspensionStiffness; }
87 set { _suspensionStiffness = value; } 87 set { _suspensionStiffness = value; }
88 } 88 }
89 89
90 public Single WheelsDampingCompression 90 public Single WheelsDampingCompression
91 { 91 {
92 get { return _wheelsDampingCompression; } 92 get { return _wheelsDampingCompression; }
93 set { _wheelsDampingCompression = value; } 93 set { _wheelsDampingCompression = value; }
94 } 94 }
95 95
96 public Single WheelsDampingRelaxation 96 public Single WheelsDampingRelaxation
97 { 97 {
98 get { return _wheelsDampingRelaxation; } 98 get { return _wheelsDampingRelaxation; }
99 set { _wheelsDampingRelaxation = value; } 99 set { _wheelsDampingRelaxation = value; }
100 } 100 }
101 101
102 public Single FrictionSlip 102 public Single FrictionSlip
103 { 103 {
104 get { return _frictionSlip; } 104 get { return _frictionSlip; }
105 set { _frictionSlip = value; } 105 set { _frictionSlip = value; }
106 } 106 }
107 107
108 108
109 public Boolean IsFrontWheel 109 public Boolean IsFrontWheel
110 { 110 {
111 get { return _isFrontWheel; } 111 get { return _isFrontWheel; }
112 set { _isFrontWheel = value; } 112 set { _isFrontWheel = value; }
113 } 113 }
114 #endregion 114 #endregion
115 } 115 }
116 116
117 public struct RaycastInfo 117 public struct RaycastInfo
118 { 118 {
119 private Vector3 _contractNormalWS; 119 private Vector3 _contractNormalWS;
120 private Vector3 _contractPointWS; 120 private Vector3 _contractPointWS;
121 121
122 private Vector3 _hardPointWS; 122 private Vector3 _hardPointWS;
123 private Vector3 _wheelDirectionWS; 123 private Vector3 _wheelDirectionWS;
124 private Vector3 _wheelAxleWS; 124 private Vector3 _wheelAxleWS;
125 125
126 private Single _suspensionLength; 126 private Single _suspensionLength;
127 private Boolean _isInContract; 127 private Boolean _isInContract;
128 128
129 #region Basic Properties 129 #region Basic Properties
130 public Single SuspensionLength 130 public Single SuspensionLength
131 { 131 {
132 get { return _suspensionLength; } 132 get { return _suspensionLength; }
133 set { _suspensionLength = value; } 133 set { _suspensionLength = value; }
134 } 134 }
135 135
136 public Boolean IsInContact 136 public Boolean IsInContact
137 { 137 {
138 get { return _isInContract; } 138 get { return _isInContract; }
139 set { _isInContract = value; } 139 set { _isInContract = value; }
140 } 140 }
141 141
142 public Vector3 ContactNormalWS 142 public Vector3 ContactNormalWS
143 { 143 {
144 get { return _contractNormalWS; } 144 get { return _contractNormalWS; }
145 set { _contractNormalWS = value; } 145 set { _contractNormalWS = value; }
146 } 146 }
147 147
148 public Vector3 ContactPointWS 148 public Vector3 ContactPointWS
149 { 149 {
150 get { return _contractPointWS; } 150 get { return _contractPointWS; }
151 set { _contractPointWS = value; } 151 set { _contractPointWS = value; }
152 } 152 }
153 153
154 public Vector3 HardPointWS 154 public Vector3 HardPointWS
155 { 155 {
156 get { return _hardPointWS; } 156 get { return _hardPointWS; }
157 set { _hardPointWS = value; } 157 set { _hardPointWS = value; }
158 } 158 }
159 159
160 public Vector3 WheelDirectionWS 160 public Vector3 WheelDirectionWS
161 { 161 {
162 get { return _wheelDirectionWS; } 162 get { return _wheelDirectionWS; }
163 set { _wheelDirectionWS = value; } 163 set { _wheelDirectionWS = value; }
164 } 164 }
165 165
166 public Vector3 WheelAxleWS 166 public Vector3 WheelAxleWS
167 { 167 {
168 get { return _wheelAxleWS; } 168 get { return _wheelAxleWS; }
169 set { _wheelAxleWS = value; } 169 set { _wheelAxleWS = value; }
170 } 170 }
171 #endregion 171 #endregion
172 } 172 }
173 173
174 public struct WheelInfo 174 public struct WheelInfo
175 { 175 {
176 private RaycastInfo _raycastInfo; 176 private RaycastInfo _raycastInfo;
177 177
178 private Matrix _worldTransform; 178 private Matrix _worldTransform;
179 179
180 private Vector3 _chassicConnectionPointCS; 180 private Vector3 _chassicConnectionPointCS;
181 private Vector3 _wheelDirectionCS; 181 private Vector3 _wheelDirectionCS;
182 private Vector3 _wheelAxleCS; 182 private Vector3 _wheelAxleCS;
183 183
184 private Single _suspensionRestLength; 184 private Single _suspensionRestLength;
185 private Single _maxSuspensionTravelCm; 185 private Single _maxSuspensionTravelCm;
186 186
187 private Single _wheelsRadius; 187 private Single _wheelsRadius;
188 private Single _rollInfluence; 188 private Single _rollInfluence;
189 private Single _suspensionStiffness; 189 private Single _suspensionStiffness;
190 private Single _wheelsDampingCompression; 190 private Single _wheelsDampingCompression;
191 private Single _wheelsDampingRelaxation; 191 private Single _wheelsDampingRelaxation;
192 private Single _frictionSlip; 192 private Single _frictionSlip;
193 private Single _steering; 193 private Single _steering;
194 private Single _rotation; 194 private Single _rotation;
195 private Single _deltaRotation; 195 private Single _deltaRotation;
196 196
197 private Single _engineForce; 197 private Single _engineForce;
198 private Single _brake; 198 private Single _brake;
199 private Boolean _isFrontWheel; 199 private Boolean _isFrontWheel;
200 200
201 201
202 private Single _clippedInvContactDotSuspension; 202 private Single _clippedInvContactDotSuspension;
203 private Single _skidInfo; 203 private Single _skidInfo;
204 private Single _wheelsSuspensionForce; 204 private Single _wheelsSuspensionForce;
205 private Single _suspensionRelativeVelocity; 205 private Single _suspensionRelativeVelocity;
206 //can be used to store pointer to sync transforms... 206 //can be used to store pointer to sync transforms...
207 private object _clientInfo; 207 private object _clientInfo;
208 208
209 #region Constructor 209 #region Constructor
210 public WheelInfo(WheelInfoConstructionInfo constructionInfo) 210 public WheelInfo(WheelInfoConstructionInfo constructionInfo)
211 { 211 {
212 _suspensionRestLength = constructionInfo.SuspensionRestLength; 212 _suspensionRestLength = constructionInfo.SuspensionRestLength;
213 _maxSuspensionTravelCm = constructionInfo.MaxSuspensionTravelCm; 213 _maxSuspensionTravelCm = constructionInfo.MaxSuspensionTravelCm;
214 214
215 _wheelsRadius = constructionInfo.WheelRadius; 215 _wheelsRadius = constructionInfo.WheelRadius;
216 _wheelsDampingCompression = constructionInfo.WheelsDampingCompression; 216 _wheelsDampingCompression = constructionInfo.WheelsDampingCompression;
217 _wheelsDampingRelaxation = constructionInfo.WheelsDampingRelaxation; 217 _wheelsDampingRelaxation = constructionInfo.WheelsDampingRelaxation;
218 _wheelDirectionCS = constructionInfo.WheelDirectionCS; 218 _wheelDirectionCS = constructionInfo.WheelDirectionCS;
219 219
220 _suspensionStiffness = constructionInfo.SuspensionStiffness; 220 _suspensionStiffness = constructionInfo.SuspensionStiffness;
221 _chassicConnectionPointCS = constructionInfo.ChassicConnectionCS; 221 _chassicConnectionPointCS = constructionInfo.ChassicConnectionCS;
222 222
223 _wheelAxleCS = constructionInfo.WheelAxleCS; 223 _wheelAxleCS = constructionInfo.WheelAxleCS;
224 _frictionSlip = constructionInfo.FrictionSlip; 224 _frictionSlip = constructionInfo.FrictionSlip;
225 225
226 _clippedInvContactDotSuspension = 0; 226 _clippedInvContactDotSuspension = 0;
227 _suspensionRelativeVelocity = 0; 227 _suspensionRelativeVelocity = 0;
228 _wheelsSuspensionForce = 0; 228 _wheelsSuspensionForce = 0;
229 _skidInfo = 0; 229 _skidInfo = 0;
230 230
231 _steering = 0; 231 _steering = 0;
232 _engineForce = 0; 232 _engineForce = 0;
233 _rotation = 0; 233 _rotation = 0;
234 _rotation = 0; 234 _rotation = 0;
235 _deltaRotation = 0; 235 _deltaRotation = 0;
236 _brake = 0; 236 _brake = 0;
237 _rollInfluence = 0.1f; 237 _rollInfluence = 0.1f;
238 _brake = 0; 238 _brake = 0;
239 _rollInfluence = 0.1f; 239 _rollInfluence = 0.1f;
240 240
241 _isFrontWheel = constructionInfo.IsFrontWheel; 241 _isFrontWheel = constructionInfo.IsFrontWheel;
242 242
243 _raycastInfo = default(RaycastInfo); 243 _raycastInfo = default(RaycastInfo);
244 _worldTransform = default(Matrix); 244 _worldTransform = default(Matrix);
245 _clientInfo = null; 245 _clientInfo = null;
246 } 246 }
247 #endregion 247 #endregion
248 248
249 #region BasicProperties 249 #region BasicProperties
250 public object ClientInfo { get { return _clientInfo; } set { _clientInfo = value; } } 250 public object ClientInfo { get { return _clientInfo; } set { _clientInfo = value; } }
251 251
252 public RaycastInfo RaycastInfo 252 public RaycastInfo RaycastInfo
253 { 253 {
254 get { return _raycastInfo; } 254 get { return _raycastInfo; }
255 set { _raycastInfo = value; } 255 set { _raycastInfo = value; }
256 } 256 }
257 257
258 public Matrix WorldTransform 258 public Matrix WorldTransform
259 { 259 {
260 get { return _worldTransform; } 260 get { return _worldTransform; }
261 set { _worldTransform = value; } 261 set { _worldTransform = value; }
262 } 262 }
263 263
264 public Vector3 ChassicConnectionPointCS 264 public Vector3 ChassicConnectionPointCS
265 { 265 {
266 get { return _chassicConnectionPointCS; } 266 get { return _chassicConnectionPointCS; }
267 set { _chassicConnectionPointCS = value; } 267 set { _chassicConnectionPointCS = value; }
268 } 268 }
269 public Vector3 WheelDirectionCS 269 public Vector3 WheelDirectionCS
270 { 270 {
271 get { return _wheelDirectionCS; } 271 get { return _wheelDirectionCS; }
272 set { _wheelDirectionCS = value; } 272 set { _wheelDirectionCS = value; }
273 } 273 }
274 public Vector3 WheelAxleCS 274 public Vector3 WheelAxleCS
275 { 275 {
276 get { return _wheelAxleCS; } 276 get { return _wheelAxleCS; }
277 set { _wheelAxleCS = value; } 277 set { _wheelAxleCS = value; }
278 } 278 }
279 279
280 public Single SuspensionRestLength 280 public Single SuspensionRestLength
281 { 281 {
282 get { return _suspensionRestLength; } 282 get { return _suspensionRestLength; }
283 set { _suspensionRestLength = value; } 283 set { _suspensionRestLength = value; }
284 } 284 }
285 285
286 286
287 public Single MaxSuspensionTravelCm 287 public Single MaxSuspensionTravelCm
288 { 288 {
289 get { return _maxSuspensionTravelCm; } 289 get { return _maxSuspensionTravelCm; }
290 set { _maxSuspensionTravelCm = value; } 290 set { _maxSuspensionTravelCm = value; }
291 } 291 }
292 292
293 public Single WheelsRadius 293 public Single WheelsRadius
294 { 294 {
295 get { return _wheelsRadius; } 295 get { return _wheelsRadius; }
296 set { _wheelsRadius = value; } 296 set { _wheelsRadius = value; }
297 } 297 }
298 298
299 public Single SuspensionStiffness 299 public Single SuspensionStiffness
300 { 300 {
301 get { return _suspensionStiffness; } 301 get { return _suspensionStiffness; }
302 set { _suspensionStiffness = value; } 302 set { _suspensionStiffness = value; }
303 } 303 }
304 304
305 public Single WheelsDampingCompression 305 public Single WheelsDampingCompression
306 { 306 {
307 get { return _wheelsDampingCompression; } 307 get { return _wheelsDampingCompression; }
308 set { _wheelsDampingCompression = value; } 308 set { _wheelsDampingCompression = value; }
309 } 309 }
310 310
311 public Single WheelsDampingRelaxation 311 public Single WheelsDampingRelaxation
312 { 312 {
313 get { return _wheelsDampingRelaxation; } 313 get { return _wheelsDampingRelaxation; }
314 set { _wheelsDampingRelaxation = value; } 314 set { _wheelsDampingRelaxation = value; }
315 } 315 }
316 316
317 public Single FrictionSlip 317 public Single FrictionSlip
318 { 318 {
319 get { return _frictionSlip; } 319 get { return _frictionSlip; }
320 set { _frictionSlip = value; } 320 set { _frictionSlip = value; }
321 } 321 }
322 322
323 public Single Steering 323 public Single Steering
324 { 324 {
325 get { return _steering; } 325 get { return _steering; }
326 set { _steering = value; } 326 set { _steering = value; }
327 } 327 }
328 328
329 public Single Rotation 329 public Single Rotation
330 { 330 {
331 get { return _rotation; } 331 get { return _rotation; }
332 set { _rotation = value; } 332 set { _rotation = value; }
333 } 333 }
334 334
335 public Single DeltaRotation 335 public Single DeltaRotation
336 { 336 {
337 get { return _deltaRotation; } 337 get { return _deltaRotation; }
338 set { _deltaRotation = value; } 338 set { _deltaRotation = value; }
339 } 339 }
340 340
341 public Single RollInfluence 341 public Single RollInfluence
342 { 342 {
343 get { return _rollInfluence; } 343 get { return _rollInfluence; }
344 set { _rollInfluence = value; } 344 set { _rollInfluence = value; }
345 } 345 }
346 346
347 public Single EngineForce 347 public Single EngineForce
348 { 348 {
349 get { return _engineForce; } 349 get { return _engineForce; }
350 set { _engineForce = value; } 350 set { _engineForce = value; }
351 } 351 }
352 352
353 public Single Brake 353 public Single Brake
354 { 354 {
355 get { return _brake; } 355 get { return _brake; }
356 set { _brake = value; } 356 set { _brake = value; }
357 } 357 }
358 358
359 public Boolean IsFrontWheel 359 public Boolean IsFrontWheel
360 { 360 {
361 get { return _isFrontWheel; } 361 get { return _isFrontWheel; }
362 set { _isFrontWheel = value; } 362 set { _isFrontWheel = value; }
363 } 363 }
364 364
365 public Single ClippedInvContactDotSuspension 365 public Single ClippedInvContactDotSuspension
366 { 366 {
367 get { return _clippedInvContactDotSuspension; } 367 get { return _clippedInvContactDotSuspension; }
368 set { _clippedInvContactDotSuspension = value; } 368 set { _clippedInvContactDotSuspension = value; }
369 } 369 }
370 370
371 public Single SuspensionRelativeVelocity 371 public Single SuspensionRelativeVelocity
372 { 372 {
373 get { return _suspensionRelativeVelocity; } 373 get { return _suspensionRelativeVelocity; }
374 set { _suspensionRelativeVelocity = value; } 374 set { _suspensionRelativeVelocity = value; }
375 } 375 }
376 376
377 public Single WheelsSuspensionForce 377 public Single WheelsSuspensionForce
378 { 378 {
379 get { return _wheelsSuspensionForce; } 379 get { return _wheelsSuspensionForce; }
380 set { _wheelsSuspensionForce = value; } 380 set { _wheelsSuspensionForce = value; }
381 } 381 }
382 382
383 public Single SkidInfo 383 public Single SkidInfo
384 { 384 {
385 get { return _skidInfo; } 385 get { return _skidInfo; }
386 set { _skidInfo = value; } 386 set { _skidInfo = value; }
387 } 387 }
388 #endregion 388 #endregion
389 389
390 /// <summary> 390 /// <summary>
391 /// 391 ///
392 /// </summary> 392 /// </summary>
393 /// <param name="chassis"></param> 393 /// <param name="chassis"></param>
394 /// <param name="paramRaycastInfo">Not used!</param> 394 /// <param name="paramRaycastInfo">Not used!</param>
395 public void UpdateWheel(RigidBody chassis, RaycastInfo paramRaycastInfo) 395 public void UpdateWheel(RigidBody chassis, RaycastInfo paramRaycastInfo)
396 { 396 {
397 if (_raycastInfo.IsInContact) 397 if (_raycastInfo.IsInContact)
398 { 398 {
399 float project = Vector3.Dot(_raycastInfo.ContactNormalWS, _raycastInfo.WheelDirectionWS); 399 float project = Vector3.Dot(_raycastInfo.ContactNormalWS, _raycastInfo.WheelDirectionWS);
400 400
401 Vector3 chassisVelocityAtContactPoint = new Vector3(); 401 Vector3 chassisVelocityAtContactPoint = new Vector3();
402 Vector3 relpos = _raycastInfo.ContactPointWS - chassis.CenterOfMassPosition; 402 Vector3 relpos = _raycastInfo.ContactPointWS - chassis.CenterOfMassPosition;
403 chassisVelocityAtContactPoint = chassis.GetVelocityInLocalPoint(relpos); 403 chassisVelocityAtContactPoint = chassis.GetVelocityInLocalPoint(relpos);
404 float projVel = Vector3.Dot(_raycastInfo.ContactNormalWS, chassisVelocityAtContactPoint); 404 float projVel = Vector3.Dot(_raycastInfo.ContactNormalWS, chassisVelocityAtContactPoint);
405 405
406 if (project >= -0.1f) 406 if (project >= -0.1f)
407 { 407 {
408 _suspensionRelativeVelocity = 0; 408 _suspensionRelativeVelocity = 0;
409 _clippedInvContactDotSuspension = 1.0f / 0.1f; 409 _clippedInvContactDotSuspension = 1.0f / 0.1f;
410 } 410 }
411 else 411 else
412 { 412 {
413 float inv = -1 / project; 413 float inv = -1 / project;
414 _suspensionRelativeVelocity = projVel * inv; 414 _suspensionRelativeVelocity = projVel * inv;
415 _clippedInvContactDotSuspension = inv; 415 _clippedInvContactDotSuspension = inv;
416 } 416 }
417 } 417 }
418 else 418 else
419 { 419 {
420 _raycastInfo.SuspensionLength = _suspensionRestLength; 420 _raycastInfo.SuspensionLength = _suspensionRestLength;
421 _suspensionRelativeVelocity = 0.0f; 421 _suspensionRelativeVelocity = 0.0f;
422 _raycastInfo.ContactNormalWS = -_raycastInfo.WheelDirectionWS; 422 _raycastInfo.ContactNormalWS = -_raycastInfo.WheelDirectionWS;
423 _clippedInvContactDotSuspension = 1.0f; 423 _clippedInvContactDotSuspension = 1.0f;
424 } 424 }
425 } 425 }
426 426
427 // if (m_raycastInfo.m_isInContact) 427 // if (m_raycastInfo.m_isInContact)
428 428
429 //{ 429 //{
430 // btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS ); 430 // btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS );
431 // btVector3 chassis_velocity_at_contactPoint; 431 // btVector3 chassis_velocity_at_contactPoint;
432 // btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition(); 432 // btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition();
433 // chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos ); 433 // chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos );
434 // btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); 434 // btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint );
435 // if ( project >= -0.1f) 435 // if ( project >= -0.1f)
436 // { 436 // {
437 // m_suspensionRelativeVelocity = 0.0f; 437 // m_suspensionRelativeVelocity = 0.0f;
438 // m_clippedInvContactDotSuspension = 1.0f / 0.1f; 438 // m_clippedInvContactDotSuspension = 1.0f / 0.1f;
439 // } 439 // }
440 // else 440 // else
441 // { 441 // {
442 // btScalar inv = -1.f / project; 442 // btScalar inv = -1.f / project;
443 // m_suspensionRelativeVelocity = projVel * inv; 443 // m_suspensionRelativeVelocity = projVel * inv;
444 // m_clippedInvContactDotSuspension = inv; 444 // m_clippedInvContactDotSuspension = inv;
445 // } 445 // }
446 446
447 //} 447 //}
448 448
449 //else // Not in contact : position wheel in a nice (rest length) position 449 //else // Not in contact : position wheel in a nice (rest length) position
450 //{ 450 //{
451 // m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength(); 451 // m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength();
452 // m_suspensionRelativeVelocity = 0.0f; 452 // m_suspensionRelativeVelocity = 0.0f;
453 // m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS; 453 // m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS;
454 // m_clippedInvContactDotSuspension = 1.0f; 454 // m_clippedInvContactDotSuspension = 1.0f;
455 //} 455 //}
456 }; 456 };
457 457
458 //btScalar m_clippedInvContactDotSuspension; 458 //btScalar m_clippedInvContactDotSuspension;
459 //btScalar m_suspensionRelativeVelocity; 459 //btScalar m_suspensionRelativeVelocity;
460 //btScalar m_wheelsSuspensionForce; 460 //btScalar m_wheelsSuspensionForce;
461 //btScalar m_skidInfo; 461 //btScalar m_skidInfo;
462 462
463 //void* m_clientInfo;//can be used to store pointer to sync transforms... 463 //void* m_clientInfo;//can be used to store pointer to sync transforms...
464 464
465 //btWheelInfo(btWheelInfoConstructionInfo& ci) 465 //btWheelInfo(btWheelInfoConstructionInfo& ci)
466 466
467 //{ 467 //{
468 468
469 // m_suspensionRestLength1 = ci.m_suspensionRestLength; 469 // m_suspensionRestLength1 = ci.m_suspensionRestLength;
470 // m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm; 470 // m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm;
471 471
472 // m_wheelsRadius = ci.m_wheelRadius; 472 // m_wheelsRadius = ci.m_wheelRadius;
473 // m_suspensionStiffness = ci.m_suspensionStiffness; 473 // m_suspensionStiffness = ci.m_suspensionStiffness;
474 // m_wheelsDampingCompression = ci.m_wheelsDampingCompression; 474 // m_wheelsDampingCompression = ci.m_wheelsDampingCompression;
475 // m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation; 475 // m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation;
476 // m_chassisConnectionPointCS = ci.m_chassisConnectionCS; 476 // m_chassisConnectionPointCS = ci.m_chassisConnectionCS;
477 // m_wheelDirectionCS = ci.m_wheelDirectionCS; 477 // m_wheelDirectionCS = ci.m_wheelDirectionCS;
478 // m_wheelAxleCS = ci.m_wheelAxleCS; 478 // m_wheelAxleCS = ci.m_wheelAxleCS;
479 // m_frictionSlip = ci.m_frictionSlip; 479 // m_frictionSlip = ci.m_frictionSlip;
480 // m_steering = 0.f; 480 // m_steering = 0.f;
481 // m_engineForce = 0.f; 481 // m_engineForce = 0.f;
482 // m_rotation = 0.f; 482 // m_rotation = 0.f;
483 // m_deltaRotation = 0.f; 483 // m_deltaRotation = 0.f;
484 // m_brake = 0.f; 484 // m_brake = 0.f;
485 // m_rollInfluence = 0.1f; 485 // m_rollInfluence = 0.1f;
486 // m_bIsFrontWheel = ci.m_bIsFrontWheel; 486 // m_bIsFrontWheel = ci.m_bIsFrontWheel;
487 487
488 //} 488 //}
489 489
490 //void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo); 490 //void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo);
491 491
492 //btScalar m_clippedInvContactDotSuspension; 492 //btScalar m_clippedInvContactDotSuspension;
493 //btScalar m_suspensionRelativeVelocity; 493 //btScalar m_suspensionRelativeVelocity;
494 ////calculated by suspension 494 ////calculated by suspension
495 //btScalar m_wheelsSuspensionForce; 495 //btScalar m_wheelsSuspensionForce;
496 //btScalar m_skidInfo; 496 //btScalar m_skidInfo;
497 497
498 //}; 498 //};
499 499
500 //struct RaycastInfo 500 //struct RaycastInfo
501 //{ 501 //{
502 // //set by raycaster 502 // //set by raycaster
503 // btVector3 m_contactNormalWS;//contactnormal 503 // btVector3 m_contactNormalWS;//contactnormal
504 // btVector3 m_contactPointWS;//raycast hitpoint 504 // btVector3 m_contactPointWS;//raycast hitpoint
505 // btScalar m_suspensionLength; 505 // btScalar m_suspensionLength;
506 // btVector3 m_hardPointWS;//raycast starting point 506 // btVector3 m_hardPointWS;//raycast starting point
507 // btVector3 m_wheelDirectionWS; //direction in worldspace 507 // btVector3 m_wheelDirectionWS; //direction in worldspace
508 // btVector3 m_wheelAxleWS; // axle in worldspace 508 // btVector3 m_wheelAxleWS; // axle in worldspace
509 // bool m_isInContact; 509 // bool m_isInContact;
510 // void* m_groundObject; //could be general void* ptr 510 // void* m_groundObject; //could be general void* ptr
511 //}; 511 //};
512 512
513 //struct btWheelInfoConstructionInfo 513 //struct btWheelInfoConstructionInfo
514 //{ 514 //{
515 // btVector3 m_chassisConnectionCS; 515 // btVector3 m_chassisConnectionCS;
516 // btVector3 m_wheelDirectionCS; 516 // btVector3 m_wheelDirectionCS;
517 // btVector3 m_wheelAxleCS; 517 // btVector3 m_wheelAxleCS;
518 // btScalar m_suspensionRestLength; 518 // btScalar m_suspensionRestLength;
519 // btScalar m_maxSuspensionTravelCm; 519 // btScalar m_maxSuspensionTravelCm;
520 // btScalar m_wheelRadius; 520 // btScalar m_wheelRadius;
521 521
522 // float m_suspensionStiffness; 522 // float m_suspensionStiffness;
523 // float m_wheelsDampingCompression; 523 // float m_wheelsDampingCompression;
524 // float m_wheelsDampingRelaxation; 524 // float m_wheelsDampingRelaxation;
525 // float m_frictionSlip; 525 // float m_frictionSlip;
526 // bool m_bIsFrontWheel; 526 // bool m_bIsFrontWheel;
527 527
528 //}; 528 //};
529} 529}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Exceptions/BulletException.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Exceptions/BulletException.cs
index abd4885..3ae3ad6 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Exceptions/BulletException.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Exceptions/BulletException.cs
@@ -1,53 +1,53 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using System.Runtime.Serialization; 25using System.Runtime.Serialization;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public class BulletException : Exception 29 public class BulletException : Exception
30 { 30 {
31 internal BulletException() 31 internal BulletException()
32 : base("Bullet Physics Library has thrown an exception.") 32 : base("Bullet Physics Library has thrown an exception.")
33 { 33 {
34 } 34 }
35 35
36 internal BulletException(string message) 36 internal BulletException(string message)
37 : base(message) 37 : base(message)
38 { 38 {
39 } 39 }
40 40
41 internal BulletException(string message, Exception innerException) 41 internal BulletException(string message, Exception innerException)
42 : base(message, innerException) 42 : base(message, innerException)
43 { 43 {
44 } 44 }
45 45
46#if !XBOX 46#if !XBOX
47 internal BulletException(SerializationInfo info, StreamingContext context) 47 internal BulletException(SerializationInfo info, StreamingContext context)
48 : base(info, context) 48 : base(info, context)
49 { 49 {
50 } 50 }
51#endif 51#endif
52 } 52 }
53} 53}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/IDebugDraw.cs b/libraries/ModifiedBulletX/ModifiedBulletX/IDebugDraw.cs
index ef5b5dc..5af979c 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/IDebugDraw.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/IDebugDraw.cs
@@ -1,60 +1,60 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public enum DebugDrawModes 29 public enum DebugDrawModes
30 { 30 {
31 NoDebug = 0, 31 NoDebug = 0,
32 DrawWireframe = 1, 32 DrawWireframe = 1,
33 DrawAabb = 2, 33 DrawAabb = 2,
34 DrawFeaturesText = 4, 34 DrawFeaturesText = 4,
35 DrawContactPoints = 8, 35 DrawContactPoints = 8,
36 NoDeactivation = 16, 36 NoDeactivation = 16,
37 NoHelpText = 32, 37 NoHelpText = 32,
38 DrawText = 64, 38 DrawText = 64,
39 ProfileTimings = 128, 39 ProfileTimings = 128,
40 EnableSatComparison = 256, 40 EnableSatComparison = 256,
41 DisableBulletLcp = 512, 41 DisableBulletLcp = 512,
42 EnableCcd = 1024, 42 EnableCcd = 1024,
43 MaxDebugDrawMode 43 MaxDebugDrawMode
44 } 44 }
45 45
46 public interface IDebugDraw 46 public interface IDebugDraw
47 { 47 {
48 void DrawLine(Vector3 from, Vector3 to, Vector3 color); 48 void DrawLine(Vector3 from, Vector3 to, Vector3 color);
49 49
50 void DrawContactPoint( 50 void DrawContactPoint(
51 Vector3 pointOnB, 51 Vector3 pointOnB,
52 Vector3 normalOnB, 52 Vector3 normalOnB,
53 float distance, 53 float distance,
54 int lifeTime, 54 int lifeTime,
55 Vector3 color 55 Vector3 color
56 ); 56 );
57 57
58 DebugDrawModes DebugMode { get; set; } 58 DebugDrawModes DebugMode { get; set; }
59 } 59 }
60} \ No newline at end of file 60} \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/DefaultMotionState.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/DefaultMotionState.cs
index 2a45a20..73dc675 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/DefaultMotionState.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/DefaultMotionState.cs
@@ -1,66 +1,66 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 // DefaultMotionState provides a common implementation to synchronize world transforms with offsets 29 // DefaultMotionState provides a common implementation to synchronize world transforms with offsets
30 public class DefaultMotionState : MotionState 30 public class DefaultMotionState : MotionState
31 { 31 {
32 private Matrix _graphicsWorldTransform; 32 private Matrix _graphicsWorldTransform;
33 private Matrix _centerOfMassOffset; 33 private Matrix _centerOfMassOffset;
34 private Matrix _startWorldTransform; 34 private Matrix _startWorldTransform;
35 private object _userData; 35 private object _userData;
36 36
37 public DefaultMotionState() 37 public DefaultMotionState()
38 : this(Matrix.Identity, Matrix.Identity) { } 38 : this(Matrix.Identity, Matrix.Identity) { }
39 39
40 public DefaultMotionState(Matrix startTransform, Matrix centerOfMassOffset) 40 public DefaultMotionState(Matrix startTransform, Matrix centerOfMassOffset)
41 { 41 {
42 _graphicsWorldTransform = startTransform; 42 _graphicsWorldTransform = startTransform;
43 _centerOfMassOffset = centerOfMassOffset; 43 _centerOfMassOffset = centerOfMassOffset;
44 _startWorldTransform = startTransform; 44 _startWorldTransform = startTransform;
45 } 45 }
46 46
47 public Matrix GraphicsWorldTransform { get { return _graphicsWorldTransform; } set { _graphicsWorldTransform = value; } } 47 public Matrix GraphicsWorldTransform { get { return _graphicsWorldTransform; } set { _graphicsWorldTransform = value; } }
48 public Matrix CenterOfMassOffset { get { return _centerOfMassOffset; } set { _centerOfMassOffset = value; } } 48 public Matrix CenterOfMassOffset { get { return _centerOfMassOffset; } set { _centerOfMassOffset = value; } }
49 public Matrix StartWorldTransform { get { return _startWorldTransform; } set { _startWorldTransform = value; } } 49 public Matrix StartWorldTransform { get { return _startWorldTransform; } set { _startWorldTransform = value; } }
50 public object UserData { get { return _userData; } set { _userData = value; } } 50 public object UserData { get { return _userData; } set { _userData = value; } }
51 51
52 // synchronizes world transform from user to physics 52 // synchronizes world transform from user to physics
53 public override void GetWorldTransform(out Matrix centerOfMassWorldTrans) 53 public override void GetWorldTransform(out Matrix centerOfMassWorldTrans)
54 { 54 {
55 centerOfMassWorldTrans = MathHelper.InvertMatrix(_centerOfMassOffset) * _graphicsWorldTransform; 55 centerOfMassWorldTrans = MathHelper.InvertMatrix(_centerOfMassOffset) * _graphicsWorldTransform;
56 } 56 }
57 57
58 // synchronizes world transform from physics to user 58 // synchronizes world transform from physics to user
59 // Bullet only calls the update of worldtransform for active objects 59 // Bullet only calls the update of worldtransform for active objects
60 public override void SetWorldTransform(Matrix centerOfMassWorldTrans) 60 public override void SetWorldTransform(Matrix centerOfMassWorldTrans)
61 { 61 {
62 _graphicsWorldTransform = MatrixOperations.Multiply(centerOfMassWorldTrans, _centerOfMassOffset); 62 _graphicsWorldTransform = MatrixOperations.Multiply(centerOfMassWorldTrans, _centerOfMassOffset);
63 _graphicsWorldTransform.Translation = centerOfMassWorldTrans.Translation; 63 _graphicsWorldTransform.Translation = centerOfMassWorldTrans.Translation;
64 } 64 }
65 } 65 }
66} 66}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MathHelper.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MathHelper.cs
index 2e3f258..15c7bb8 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MathHelper.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MathHelper.cs
@@ -1,581 +1,581 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26using MonoXnaCompactMaths; 26using MonoXnaCompactMaths;
27 27
28namespace XnaDevRu.BulletX 28namespace XnaDevRu.BulletX
29{ 29{
30 public static class MathHelper 30 public static class MathHelper
31 { 31 {
32 internal const float Sqrt12 = 0.7071067811865475244008443621048490f; 32 internal const float Sqrt12 = 0.7071067811865475244008443621048490f;
33 internal const float Infinity = 3.402823466e+38f; 33 internal const float Infinity = 3.402823466e+38f;
34 internal const float Epsilon = 1.192092896e-07f; 34 internal const float Epsilon = 1.192092896e-07f;
35 35
36 public static Vector3 MatrixToVector(Matrix m, Vector3 v) 36 public static Vector3 MatrixToVector(Matrix m, Vector3 v)
37 { 37 {
38 return new Vector3( 38 return new Vector3(
39 Vector3.Dot(new Vector3(m.M11, m.M12, m.M13), v) + m.Translation.X, 39 Vector3.Dot(new Vector3(m.M11, m.M12, m.M13), v) + m.Translation.X,
40 Vector3.Dot(new Vector3(m.M21, m.M22, m.M23), v) + m.Translation.Y, 40 Vector3.Dot(new Vector3(m.M21, m.M22, m.M23), v) + m.Translation.Y,
41 Vector3.Dot(new Vector3(m.M31, m.M32, m.M33), v) + m.Translation.Z 41 Vector3.Dot(new Vector3(m.M31, m.M32, m.M33), v) + m.Translation.Z
42 ); 42 );
43 } 43 }
44 44
45 internal static int ClosestAxis(Vector4 v) 45 internal static int ClosestAxis(Vector4 v)
46 { 46 {
47 return MaxAxis(Absolute(v)); 47 return MaxAxis(Absolute(v));
48 } 48 }
49 49
50 internal static Vector4 Absolute(Vector4 v) 50 internal static Vector4 Absolute(Vector4 v)
51 { 51 {
52 return new Vector4(Math.Abs(v.X), Math.Abs(v.Y), Math.Abs(v.Z), Math.Abs(v.W)); 52 return new Vector4(Math.Abs(v.X), Math.Abs(v.Y), Math.Abs(v.Z), Math.Abs(v.W));
53 } 53 }
54 54
55 internal static int MaxAxis(Vector4 v) 55 internal static int MaxAxis(Vector4 v)
56 { 56 {
57 int maxIndex = -1; 57 int maxIndex = -1;
58 float maxVal = float.MinValue; 58 float maxVal = float.MinValue;
59 if (v.X > maxVal) 59 if (v.X > maxVal)
60 { 60 {
61 maxIndex = 0; 61 maxIndex = 0;
62 maxVal = v.X; 62 maxVal = v.X;
63 } 63 }
64 if (v.Y > maxVal) 64 if (v.Y > maxVal)
65 { 65 {
66 maxIndex = 1; 66 maxIndex = 1;
67 maxVal = v.Y; 67 maxVal = v.Y;
68 } 68 }
69 if (v.Z > maxVal) 69 if (v.Z > maxVal)
70 { 70 {
71 maxIndex = 2; 71 maxIndex = 2;
72 maxVal = v.Z; 72 maxVal = v.Z;
73 } 73 }
74 if (v.W > maxVal) 74 if (v.W > maxVal)
75 { 75 {
76 maxIndex = 3; 76 maxIndex = 3;
77 maxVal = v.W; 77 maxVal = v.W;
78 } 78 }
79 79
80 return maxIndex; 80 return maxIndex;
81 } 81 }
82 82
83 internal static int MaxAxis(Vector3 v) 83 internal static int MaxAxis(Vector3 v)
84 { 84 {
85 return v.X < v.Y ? (v.Y < v.Z ? 2 : 1) : (v.X < v.Z ? 2 : 0); 85 return v.X < v.Y ? (v.Y < v.Z ? 2 : 1) : (v.X < v.Z ? 2 : 0);
86 } 86 }
87 87
88 // conservative test for overlap between two aabbs 88 // conservative test for overlap between two aabbs
89 internal static bool TestAabbAgainstAabb2(Vector3 aabbMinA, Vector3 aabbMaxA, Vector3 aabbMinB, Vector3 aabbMaxB) 89 internal static bool TestAabbAgainstAabb2(Vector3 aabbMinA, Vector3 aabbMaxA, Vector3 aabbMinB, Vector3 aabbMaxB)
90 { 90 {
91 bool overlap = true; 91 bool overlap = true;
92 overlap = (aabbMinA.X > aabbMaxB.X || aabbMaxA.X < aabbMinB.X) ? false : overlap; 92 overlap = (aabbMinA.X > aabbMaxB.X || aabbMaxA.X < aabbMinB.X) ? false : overlap;
93 overlap = (aabbMinA.Z > aabbMaxB.Z || aabbMaxA.Z < aabbMinB.Z) ? false : overlap; 93 overlap = (aabbMinA.Z > aabbMaxB.Z || aabbMaxA.Z < aabbMinB.Z) ? false : overlap;
94 overlap = (aabbMinA.Y > aabbMaxB.Y || aabbMaxA.Y < aabbMinB.Y) ? false : overlap; 94 overlap = (aabbMinA.Y > aabbMaxB.Y || aabbMaxA.Y < aabbMinB.Y) ? false : overlap;
95 return overlap; 95 return overlap;
96 } 96 }
97 97
98 internal static bool TestTriangleAgainstAabb2(Vector3[] vertices, Vector3 aabbMin, Vector3 aabbMax) 98 internal static bool TestTriangleAgainstAabb2(Vector3[] vertices, Vector3 aabbMin, Vector3 aabbMax)
99 { 99 {
100 Vector3 p1 = vertices[0]; 100 Vector3 p1 = vertices[0];
101 Vector3 p2 = vertices[1]; 101 Vector3 p2 = vertices[1];
102 Vector3 p3 = vertices[2]; 102 Vector3 p3 = vertices[2];
103 103
104 if (Math.Min(Math.Min(p1.X, p2.X), p3.X) > aabbMax.X) return false; 104 if (Math.Min(Math.Min(p1.X, p2.X), p3.X) > aabbMax.X) return false;
105 if (Math.Max(Math.Max(p1.X, p2.X), p3.X) < aabbMin.X) return false; 105 if (Math.Max(Math.Max(p1.X, p2.X), p3.X) < aabbMin.X) return false;
106 106
107 if (Math.Min(Math.Min(p1.Z, p2.Z), p3.Z) > aabbMax.Z) return false; 107 if (Math.Min(Math.Min(p1.Z, p2.Z), p3.Z) > aabbMax.Z) return false;
108 if (Math.Max(Math.Max(p1.Z, p2.Z), p3.Z) < aabbMin.Z) return false; 108 if (Math.Max(Math.Max(p1.Z, p2.Z), p3.Z) < aabbMin.Z) return false;
109 109
110 if (Math.Min(Math.Min(p1.Y, p2.Y), p3.Y) > aabbMax.Y) return false; 110 if (Math.Min(Math.Min(p1.Y, p2.Y), p3.Y) > aabbMax.Y) return false;
111 if (Math.Max(Math.Max(p1.Y, p2.Y), p3.Y) < aabbMin.Y) return false; 111 if (Math.Max(Math.Max(p1.Y, p2.Y), p3.Y) < aabbMin.Y) return false;
112 return true; 112 return true;
113 } 113 }
114 114
115 internal static void SetInterpolate3(Vector3 vA, Vector3 vB, float rt, ref Vector3 interpolated) 115 internal static void SetInterpolate3(Vector3 vA, Vector3 vB, float rt, ref Vector3 interpolated)
116 { 116 {
117 float s = 1.0f - rt; 117 float s = 1.0f - rt;
118 interpolated.X = s * vA.X + rt * vB.X; 118 interpolated.X = s * vA.X + rt * vB.X;
119 interpolated.Y = s * vA.Y + rt * vB.Y; 119 interpolated.Y = s * vA.Y + rt * vB.Y;
120 interpolated.Z = s * vA.Z + rt * vB.Z; 120 interpolated.Z = s * vA.Z + rt * vB.Z;
121 } 121 }
122 122
123 internal static void PlaneSpace1(Vector3 n, ref Vector3 p, ref Vector3 q) 123 internal static void PlaneSpace1(Vector3 n, ref Vector3 p, ref Vector3 q)
124 { 124 {
125 if (Math.Abs(n.Z) > Sqrt12) 125 if (Math.Abs(n.Z) > Sqrt12)
126 { 126 {
127 // choose p in y-z plane 127 // choose p in y-z plane
128 float a = n.Y * n.Y + n.Z * n.Z; 128 float a = n.Y * n.Y + n.Z * n.Z;
129 float k = 1f / (float)Math.Sqrt(a); 129 float k = 1f / (float)Math.Sqrt(a);
130 p.X = 0; 130 p.X = 0;
131 p.Y = -n.Z * k; 131 p.Y = -n.Z * k;
132 p.Z = n.Y * k; 132 p.Z = n.Y * k;
133 // set q = n x p 133 // set q = n x p
134 q.X = a * k; 134 q.X = a * k;
135 q.Y = -n.X * p.Z; 135 q.Y = -n.X * p.Z;
136 q.Z = n.X * p.Y; 136 q.Z = n.X * p.Y;
137 } 137 }
138 else 138 else
139 { 139 {
140 // choose p in x-y plane 140 // choose p in x-y plane
141 float a = n.X * n.X + n.Y * n.Y; 141 float a = n.X * n.X + n.Y * n.Y;
142 float k = 1f / (float)Math.Sqrt(a); 142 float k = 1f / (float)Math.Sqrt(a);
143 p.X = -n.Y * k; 143 p.X = -n.Y * k;
144 p.Y = n.X * k; 144 p.Y = n.X * k;
145 p.Z = 0; 145 p.Z = 0;
146 // set q = n x p 146 // set q = n x p
147 q.X = -n.Z * p.Y; 147 q.X = -n.Z * p.Y;
148 q.Y = n.Z * p.X; 148 q.Y = n.Z * p.X;
149 q.Z = a * k; 149 q.Z = a * k;
150 } 150 }
151 } 151 }
152 152
153 internal static bool RayAabb(Vector3 rayFrom, 153 internal static bool RayAabb(Vector3 rayFrom,
154 Vector3 rayTo, 154 Vector3 rayTo,
155 Vector3 aabbMin, 155 Vector3 aabbMin,
156 Vector3 aabbMax, 156 Vector3 aabbMax,
157 float param, Vector3 normal) 157 float param, Vector3 normal)
158 { 158 {
159 Vector3 aabbHalfExtent = (aabbMax - aabbMin) * 0.5f; 159 Vector3 aabbHalfExtent = (aabbMax - aabbMin) * 0.5f;
160 Vector3 aabbCenter = (aabbMax + aabbMin) * 0.5f; 160 Vector3 aabbCenter = (aabbMax + aabbMin) * 0.5f;
161 Vector3 source = rayFrom - aabbCenter; 161 Vector3 source = rayFrom - aabbCenter;
162 Vector3 target = rayTo - aabbCenter; 162 Vector3 target = rayTo - aabbCenter;
163 int sourceOutcode = Outcode(source, aabbHalfExtent); 163 int sourceOutcode = Outcode(source, aabbHalfExtent);
164 int targetOutcode = Outcode(target, aabbHalfExtent); 164 int targetOutcode = Outcode(target, aabbHalfExtent);
165 if ((sourceOutcode & targetOutcode) == 0x0) 165 if ((sourceOutcode & targetOutcode) == 0x0)
166 { 166 {
167 float lambda_enter = 0; 167 float lambda_enter = 0;
168 float lambda_exit = param; 168 float lambda_exit = param;
169 Vector3 r = target - source; 169 Vector3 r = target - source;
170 float normSign = 1; 170 float normSign = 1;
171 Vector3 hitNormal = new Vector3(); 171 Vector3 hitNormal = new Vector3();
172 int bit = 1; 172 int bit = 1;
173 173
174 for (int j = 0; j < 2; j++) 174 for (int j = 0; j < 2; j++)
175 { 175 {
176 { 176 {
177 if ((sourceOutcode & bit) != 0) 177 if ((sourceOutcode & bit) != 0)
178 { 178 {
179 float lambda = (-source.X - aabbHalfExtent.X * normSign) / r.X; 179 float lambda = (-source.X - aabbHalfExtent.X * normSign) / r.X;
180 if (lambda_enter <= lambda) 180 if (lambda_enter <= lambda)
181 { 181 {
182 lambda_enter = lambda; 182 lambda_enter = lambda;
183 hitNormal = new Vector3(); 183 hitNormal = new Vector3();
184 hitNormal.X = normSign; 184 hitNormal.X = normSign;
185 } 185 }
186 } 186 }
187 else if ((targetOutcode & bit) != 0) 187 else if ((targetOutcode & bit) != 0)
188 { 188 {
189 float lambda = (-source.X - aabbHalfExtent.X * normSign) / r.X; 189 float lambda = (-source.X - aabbHalfExtent.X * normSign) / r.X;
190 SetMin(ref lambda_exit, lambda); 190 SetMin(ref lambda_exit, lambda);
191 } 191 }
192 bit <<= 1; 192 bit <<= 1;
193 } 193 }
194 { 194 {
195 if ((sourceOutcode & bit) != 0) 195 if ((sourceOutcode & bit) != 0)
196 { 196 {
197 float lambda = (-source.Y - aabbHalfExtent.Y * normSign) / r.Y; 197 float lambda = (-source.Y - aabbHalfExtent.Y * normSign) / r.Y;
198 if (lambda_enter <= lambda) 198 if (lambda_enter <= lambda)
199 { 199 {
200 lambda_enter = lambda; 200 lambda_enter = lambda;
201 hitNormal = new Vector3(); 201 hitNormal = new Vector3();
202 hitNormal.Y = normSign; 202 hitNormal.Y = normSign;
203 } 203 }
204 } 204 }
205 else if ((targetOutcode & bit) != 0) 205 else if ((targetOutcode & bit) != 0)
206 { 206 {
207 float lambda = (-source.Y - aabbHalfExtent.Y * normSign) / r.Y; 207 float lambda = (-source.Y - aabbHalfExtent.Y * normSign) / r.Y;
208 SetMin(ref lambda_exit, lambda); 208 SetMin(ref lambda_exit, lambda);
209 } 209 }
210 bit <<= 1; 210 bit <<= 1;
211 } 211 }
212 { 212 {
213 if ((sourceOutcode & bit) != 0) 213 if ((sourceOutcode & bit) != 0)
214 { 214 {
215 float lambda = (-source.Z - aabbHalfExtent.Z * normSign) / r.Z; 215 float lambda = (-source.Z - aabbHalfExtent.Z * normSign) / r.Z;
216 if (lambda_enter <= lambda) 216 if (lambda_enter <= lambda)
217 { 217 {
218 lambda_enter = lambda; 218 lambda_enter = lambda;
219 hitNormal = new Vector3(); 219 hitNormal = new Vector3();
220 hitNormal.Z = normSign; 220 hitNormal.Z = normSign;
221 } 221 }
222 } 222 }
223 else if ((targetOutcode & bit) != 0) 223 else if ((targetOutcode & bit) != 0)
224 { 224 {
225 float lambda = (-source.Z - aabbHalfExtent.Z * normSign) / r.Z; 225 float lambda = (-source.Z - aabbHalfExtent.Z * normSign) / r.Z;
226 SetMin(ref lambda_exit, lambda); 226 SetMin(ref lambda_exit, lambda);
227 } 227 }
228 bit <<= 1; 228 bit <<= 1;
229 } 229 }
230 normSign = -1; 230 normSign = -1;
231 } 231 }
232 if (lambda_enter <= lambda_exit) 232 if (lambda_enter <= lambda_exit)
233 { 233 {
234 param = lambda_enter; 234 param = lambda_enter;
235 normal = hitNormal; 235 normal = hitNormal;
236 return true; 236 return true;
237 } 237 }
238 } 238 }
239 return false; 239 return false;
240 } 240 }
241 241
242 internal static void SetMin(ref float a, float b) 242 internal static void SetMin(ref float a, float b)
243 { 243 {
244 if (a > b) 244 if (a > b)
245 a = b; 245 a = b;
246 } 246 }
247 247
248 internal static void SetMax(ref float a, float b) 248 internal static void SetMax(ref float a, float b)
249 { 249 {
250 if (a < b) 250 if (a < b)
251 a = b; 251 a = b;
252 } 252 }
253 253
254 internal static void SetMax(ref Vector3 self, Vector3 other) 254 internal static void SetMax(ref Vector3 self, Vector3 other)
255 { 255 {
256 if (other.X > self.X) 256 if (other.X > self.X)
257 self.X = other.X; 257 self.X = other.X;
258 258
259 if (other.Y > self.Y) 259 if (other.Y > self.Y)
260 self.Y = other.Y; 260 self.Y = other.Y;
261 261
262 if (other.Z > self.Z) 262 if (other.Z > self.Z)
263 self.Z = other.Z; 263 self.Z = other.Z;
264 } 264 }
265 265
266 internal static Vector3 SetMax(Vector3 self, Vector3 other) 266 internal static Vector3 SetMax(Vector3 self, Vector3 other)
267 { 267 {
268 if (other.X > self.X) 268 if (other.X > self.X)
269 self.X = other.X; 269 self.X = other.X;
270 270
271 if (other.Y > self.Y) 271 if (other.Y > self.Y)
272 self.Y = other.Y; 272 self.Y = other.Y;
273 273
274 if (other.Z > self.Z) 274 if (other.Z > self.Z)
275 self.Z = other.Z; 275 self.Z = other.Z;
276 276
277 return self; 277 return self;
278 } 278 }
279 279
280 internal static void SetMin(ref Vector3 self, Vector3 other) 280 internal static void SetMin(ref Vector3 self, Vector3 other)
281 { 281 {
282 if (other.X < self.X) 282 if (other.X < self.X)
283 self.X = other.X; 283 self.X = other.X;
284 284
285 if (other.Y < self.Y) 285 if (other.Y < self.Y)
286 self.Y = other.Y; 286 self.Y = other.Y;
287 287
288 if (other.Z < self.Z) 288 if (other.Z < self.Z)
289 self.Z = other.Z; 289 self.Z = other.Z;
290 } 290 }
291 291
292 internal static Vector3 SetMin(Vector3 self, Vector3 other) 292 internal static Vector3 SetMin(Vector3 self, Vector3 other)
293 { 293 {
294 if (other.X < self.X) 294 if (other.X < self.X)
295 self.X = other.X; 295 self.X = other.X;
296 296
297 if (other.Y < self.Y) 297 if (other.Y < self.Y)
298 self.Y = other.Y; 298 self.Y = other.Y;
299 299
300 if (other.Z < self.Z) 300 if (other.Z < self.Z)
301 self.Z = other.Z; 301 self.Z = other.Z;
302 302
303 return self; 303 return self;
304 } 304 }
305 305
306 internal static int Outcode(Vector3 p, Vector3 halfExtent) 306 internal static int Outcode(Vector3 p, Vector3 halfExtent)
307 { 307 {
308 return (p.X < -halfExtent.X ? 0x01 : 0x0) | 308 return (p.X < -halfExtent.X ? 0x01 : 0x0) |
309 (p.X > halfExtent.X ? 0x08 : 0x0) | 309 (p.X > halfExtent.X ? 0x08 : 0x0) |
310 (p.Y < -halfExtent.Y ? 0x02 : 0x0) | 310 (p.Y < -halfExtent.Y ? 0x02 : 0x0) |
311 (p.Y > halfExtent.Y ? 0x10 : 0x0) | 311 (p.Y > halfExtent.Y ? 0x10 : 0x0) |
312 (p.Z < -halfExtent.Z ? 0x4 : 0x0) | 312 (p.Z < -halfExtent.Z ? 0x4 : 0x0) |
313 (p.Z > halfExtent.Z ? 0x20 : 0x0); 313 (p.Z > halfExtent.Z ? 0x20 : 0x0);
314 } 314 }
315 315
316 internal static Matrix Absolute(Matrix m) 316 internal static Matrix Absolute(Matrix m)
317 { 317 {
318 return new Matrix(Math.Abs(m.M11), Math.Abs(m.M12), Math.Abs(m.M13), Math.Abs(m.M14), 318 return new Matrix(Math.Abs(m.M11), Math.Abs(m.M12), Math.Abs(m.M13), Math.Abs(m.M14),
319 Math.Abs(m.M21), Math.Abs(m.M22), Math.Abs(m.M23), Math.Abs(m.M24), 319 Math.Abs(m.M21), Math.Abs(m.M22), Math.Abs(m.M23), Math.Abs(m.M24),
320 Math.Abs(m.M31), Math.Abs(m.M32), Math.Abs(m.M33), Math.Abs(m.M34), 320 Math.Abs(m.M31), Math.Abs(m.M32), Math.Abs(m.M33), Math.Abs(m.M34),
321 Math.Abs(m.M41), Math.Abs(m.M42), Math.Abs(m.M43), Math.Abs(m.M44)); 321 Math.Abs(m.M41), Math.Abs(m.M42), Math.Abs(m.M43), Math.Abs(m.M44));
322 } 322 }
323 323
324 internal static void SetValueByIndex(ref Vector3 v, int i, float value) 324 internal static void SetValueByIndex(ref Vector3 v, int i, float value)
325 { 325 {
326 if (i == 0) 326 if (i == 0)
327 v.X = value; 327 v.X = value;
328 else if (i == 1) 328 else if (i == 1)
329 v.Y = value; 329 v.Y = value;
330 else 330 else
331 v.Z = value; 331 v.Z = value;
332 } 332 }
333 333
334 internal static float GetValueByIndex(Vector3 v, int i) 334 internal static float GetValueByIndex(Vector3 v, int i)
335 { 335 {
336 if (i == 0) 336 if (i == 0)
337 return v.X; 337 return v.X;
338 else if (i == 1) 338 else if (i == 1)
339 return v.Y; 339 return v.Y;
340 else 340 else
341 return v.Z; 341 return v.Z;
342 } 342 }
343 343
344 internal static Vector3 InvXForm(Matrix m, Vector3 v) 344 internal static Vector3 InvXForm(Matrix m, Vector3 v)
345 { 345 {
346 v -= m.Translation; 346 v -= m.Translation;
347 m.Translation = new Vector3(); 347 m.Translation = new Vector3();
348 return MathHelper.Transform(v, Matrix.Transpose(m)); 348 return MathHelper.Transform(v, Matrix.Transpose(m));
349 } 349 }
350 350
351 internal static Matrix InverseTimes(Matrix m, Matrix t) 351 internal static Matrix InverseTimes(Matrix m, Matrix t)
352 { 352 {
353 Vector3 v = t.Translation - m.Translation; 353 Vector3 v = t.Translation - m.Translation;
354 354
355 Matrix mat = TransposeTimes(m, t); 355 Matrix mat = TransposeTimes(m, t);
356 mat.Translation = Vector3.Transform(v, m); 356 mat.Translation = Vector3.Transform(v, m);
357 return mat; 357 return mat;
358 } 358 }
359 359
360 internal static Matrix TransposeTimes(Matrix mA, Matrix mB) 360 internal static Matrix TransposeTimes(Matrix mA, Matrix mB)
361 { 361 {
362 return new Matrix( 362 return new Matrix(
363 mA.M11 * mB.M11 + mA.M21 * mB.M21 + mA.M31 * mB.M31, 363 mA.M11 * mB.M11 + mA.M21 * mB.M21 + mA.M31 * mB.M31,
364 mA.M11 * mB.M12 + mA.M21 * mB.M22 + mA.M31 * mB.M32, 364 mA.M11 * mB.M12 + mA.M21 * mB.M22 + mA.M31 * mB.M32,
365 mA.M11 * mB.M13 + mA.M21 * mB.M23 + mA.M31 * mB.M33, 365 mA.M11 * mB.M13 + mA.M21 * mB.M23 + mA.M31 * mB.M33,
366 0, 366 0,
367 mA.M12 * mB.M11 + mA.M22 * mB.M21 + mA.M32 * mB.M31, 367 mA.M12 * mB.M11 + mA.M22 * mB.M21 + mA.M32 * mB.M31,
368 mA.M12 * mB.M12 + mA.M22 * mB.M22 + mA.M32 * mB.M32, 368 mA.M12 * mB.M12 + mA.M22 * mB.M22 + mA.M32 * mB.M32,
369 mA.M12 * mB.M13 + mA.M22 * mB.M23 + mA.M32 * mB.M33, 369 mA.M12 * mB.M13 + mA.M22 * mB.M23 + mA.M32 * mB.M33,
370 0, 370 0,
371 mA.M13 * mB.M11 + mA.M23 * mB.M21 + mA.M33 * mB.M31, 371 mA.M13 * mB.M11 + mA.M23 * mB.M21 + mA.M33 * mB.M31,
372 mA.M13 * mB.M12 + mA.M23 * mB.M22 + mA.M33 * mB.M32, 372 mA.M13 * mB.M12 + mA.M23 * mB.M22 + mA.M33 * mB.M32,
373 mA.M13 * mB.M13 + mA.M23 * mB.M23 + mA.M33 * mB.M33, 373 mA.M13 * mB.M13 + mA.M23 * mB.M23 + mA.M33 * mB.M33,
374 0, 0, 0, 0, 1); 374 0, 0, 0, 0, 1);
375 } 375 }
376 376
377 internal static Vector3 GetColumn(Matrix m, int column) 377 internal static Vector3 GetColumn(Matrix m, int column)
378 { 378 {
379 switch (column) 379 switch (column)
380 { 380 {
381 case 1: 381 case 1:
382 return new Vector3(m.M11, m.M21, m.M31); 382 return new Vector3(m.M11, m.M21, m.M31);
383 case 2: 383 case 2:
384 return new Vector3(m.M12, m.M22, m.M32); 384 return new Vector3(m.M12, m.M22, m.M32);
385 case 3: 385 case 3:
386 return new Vector3(m.M13, m.M23, m.M33); 386 return new Vector3(m.M13, m.M23, m.M33);
387 default: 387 default:
388 throw new ArgumentOutOfRangeException("column"); 388 throw new ArgumentOutOfRangeException("column");
389 } 389 }
390 } 390 }
391 391
392 internal static Vector3 GetRow(Matrix m, int row) 392 internal static Vector3 GetRow(Matrix m, int row)
393 { 393 {
394 switch (row) 394 switch (row)
395 { 395 {
396 case 1: 396 case 1:
397 return new Vector3(m.M11, m.M12, m.M13); 397 return new Vector3(m.M11, m.M12, m.M13);
398 case 2: 398 case 2:
399 return new Vector3(m.M21, m.M22, m.M23); 399 return new Vector3(m.M21, m.M22, m.M23);
400 case 3: 400 case 3:
401 return new Vector3(m.M31, m.M32, m.M33); 401 return new Vector3(m.M31, m.M32, m.M33);
402 default: 402 default:
403 throw new ArgumentOutOfRangeException("row"); 403 throw new ArgumentOutOfRangeException("row");
404 } 404 }
405 } 405 }
406 406
407 internal static Quaternion GetRotation(Matrix m) 407 internal static Quaternion GetRotation(Matrix m)
408 { 408 {
409 float trace = m.M11 + m.M22 + m.M33; 409 float trace = m.M11 + m.M22 + m.M33;
410 Quaternion q = new Quaternion(); 410 Quaternion q = new Quaternion();
411 411
412 if (trace > 0) 412 if (trace > 0)
413 { 413 {
414 float s = (float)Math.Sqrt(trace + 1.0f); 414 float s = (float)Math.Sqrt(trace + 1.0f);
415 q.W = s * 0.5f; 415 q.W = s * 0.5f;
416 s = 0.5f / s; 416 s = 0.5f / s;
417 417
418 q.X = (m.M32 - m.M23) * s; 418 q.X = (m.M32 - m.M23) * s;
419 q.Y = (m.M13 - m.M31) * s; 419 q.Y = (m.M13 - m.M31) * s;
420 q.Z = (m.M21 - m.M12) * s; 420 q.Z = (m.M21 - m.M12) * s;
421 } 421 }
422 else 422 else
423 { 423 {
424 int i = m.M11 < m.M22 ? 424 int i = m.M11 < m.M22 ?
425 (m.M22 < m.M33 ? 2 : 1) : 425 (m.M22 < m.M33 ? 2 : 1) :
426 (m.M11 < m.M33 ? 2 : 0); 426 (m.M11 < m.M33 ? 2 : 0);
427 int j = (i + 1) % 3; 427 int j = (i + 1) % 3;
428 int k = (i + 2) % 3; 428 int k = (i + 2) % 3;
429 429
430 float s = (float)Math.Sqrt(GetElement(m, i, i) - GetElement(m, j, j) - GetElement(m, k, k) + 1.0f); 430 float s = (float)Math.Sqrt(GetElement(m, i, i) - GetElement(m, j, j) - GetElement(m, k, k) + 1.0f);
431 SetElement(ref q, i, s * 0.5f); 431 SetElement(ref q, i, s * 0.5f);
432 s = 0.5f / s; 432 s = 0.5f / s;
433 433
434 q.W = (GetElement(m, k, j) - GetElement(m, j, k)) * s; 434 q.W = (GetElement(m, k, j) - GetElement(m, j, k)) * s;
435 SetElement(ref q, j, (GetElement(m, j, i) + GetElement(m, i, j)) * s); 435 SetElement(ref q, j, (GetElement(m, j, i) + GetElement(m, i, j)) * s);
436 SetElement(ref q, k, (GetElement(m, k, i) + GetElement(m, i, k)) * s); 436 SetElement(ref q, k, (GetElement(m, k, i) + GetElement(m, i, k)) * s);
437 } 437 }
438 return q; 438 return q;
439 } 439 }
440 440
441 internal static float SetElement(ref Quaternion q, int index, float value) 441 internal static float SetElement(ref Quaternion q, int index, float value)
442 { 442 {
443 switch (index) 443 switch (index)
444 { 444 {
445 case 0: 445 case 0:
446 q.X = value; break; 446 q.X = value; break;
447 case 1: 447 case 1:
448 q.Y = value; break; 448 q.Y = value; break;
449 case 2: 449 case 2:
450 q.Z = value; break; 450 q.Z = value; break;
451 case 3: 451 case 3:
452 q.W = value; break; 452 q.W = value; break;
453 } 453 }
454 454
455 return 0; 455 return 0;
456 } 456 }
457 457
458 internal static float GetElement(Quaternion q, int index) 458 internal static float GetElement(Quaternion q, int index)
459 { 459 {
460 switch (index) 460 switch (index)
461 { 461 {
462 case 0: 462 case 0:
463 return q.X; 463 return q.X;
464 case 1: 464 case 1:
465 return q.Y; 465 return q.Y;
466 case 2: 466 case 2:
467 return q.Z; 467 return q.Z;
468 default: 468 default:
469 return q.W; 469 return q.W;
470 } 470 }
471 } 471 }
472 472
473 internal static float GetElement(Matrix mat, int index) 473 internal static float GetElement(Matrix mat, int index)
474 { 474 {
475 int row = index % 3; 475 int row = index % 3;
476 int col = index / 3; 476 int col = index / 3;
477 477
478 return GetElement(mat, row, col); 478 return GetElement(mat, row, col);
479 } 479 }
480 480
481 internal static float GetElement(Matrix mat, int row, int col) 481 internal static float GetElement(Matrix mat, int row, int col)
482 { 482 {
483 switch (row) 483 switch (row)
484 { 484 {
485 case 0: 485 case 0:
486 switch (col) 486 switch (col)
487 { 487 {
488 case 0: 488 case 0:
489 return mat.M11; 489 return mat.M11;
490 case 1: 490 case 1:
491 return mat.M12; 491 return mat.M12;
492 case 2: 492 case 2:
493 return mat.M13; 493 return mat.M13;
494 } break; 494 } break;
495 case 1: 495 case 1:
496 switch (col) 496 switch (col)
497 { 497 {
498 case 0: 498 case 0:
499 return mat.M21; 499 return mat.M21;
500 case 1: 500 case 1:
501 return mat.M22; 501 return mat.M22;
502 case 2: 502 case 2:
503 return mat.M23; 503 return mat.M23;
504 } break; 504 } break;
505 case 2: 505 case 2:
506 switch (col) 506 switch (col)
507 { 507 {
508 case 0: 508 case 0:
509 return mat.M31; 509 return mat.M31;
510 case 1: 510 case 1:
511 return mat.M32; 511 return mat.M32;
512 case 2: 512 case 2:
513 return mat.M33; 513 return mat.M33;
514 } break; 514 } break;
515 } 515 }
516 516
517 return 0; 517 return 0;
518 } 518 }
519 519
520 internal static float GetElement(Vector3 v, int index) 520 internal static float GetElement(Vector3 v, int index)
521 { 521 {
522 if (index == 0) 522 if (index == 0)
523 return v.X; 523 return v.X;
524 if (index == 1) 524 if (index == 1)
525 return v.Y; 525 return v.Y;
526 if (index == 2) 526 if (index == 2)
527 return v.Z; 527 return v.Z;
528 528
529 throw new ArgumentOutOfRangeException("index"); 529 throw new ArgumentOutOfRangeException("index");
530 } 530 }
531 531
532 internal static void SetElement(ref Vector3 v, int index, float value) 532 internal static void SetElement(ref Vector3 v, int index, float value)
533 { 533 {
534 if (index == 0) 534 if (index == 0)
535 v.X = value; 535 v.X = value;
536 else if (index == 1) 536 else if (index == 1)
537 v.Y = value; 537 v.Y = value;
538 else if (index == 2) 538 else if (index == 2)
539 v.Z = value; 539 v.Z = value;
540 else 540 else
541 throw new ArgumentOutOfRangeException("index"); 541 throw new ArgumentOutOfRangeException("index");
542 } 542 }
543 543
544 public static Matrix InvertMatrix(Matrix m) 544 public static Matrix InvertMatrix(Matrix m)
545 { 545 {
546 Vector3 pos = m.Translation; 546 Vector3 pos = m.Translation;
547 m.Translation = Vector3.Zero; 547 m.Translation = Vector3.Zero;
548 Matrix inv = Matrix.Transpose(m); 548 Matrix inv = Matrix.Transpose(m);
549 pos = Vector3.Transform(-pos, m); 549 pos = Vector3.Transform(-pos, m);
550 inv.Translation = pos; 550 inv.Translation = pos;
551 return inv; 551 return inv;
552 } 552 }
553 553
554 public static Matrix GetDisplayMatrix(Matrix m) 554 public static Matrix GetDisplayMatrix(Matrix m)
555 { 555 {
556 Matrix displayMatrix = m; 556 Matrix displayMatrix = m;
557 displayMatrix.Translation = Vector3.Zero; 557 displayMatrix.Translation = Vector3.Zero;
558 displayMatrix = Matrix.Transpose(displayMatrix); 558 displayMatrix = Matrix.Transpose(displayMatrix);
559 displayMatrix.Translation = m.Translation; 559 displayMatrix.Translation = m.Translation;
560 return displayMatrix; 560 return displayMatrix;
561 } 561 }
562 562
563 internal static Vector3 Transform(Vector3 position, Matrix matrix) 563 internal static Vector3 Transform(Vector3 position, Matrix matrix)
564 { 564 {
565 Vector3 vector = new Vector3(); 565 Vector3 vector = new Vector3();
566 vector.X = (((position.X * matrix.M11) + (position.Y * matrix.M12)) + (position.Z * matrix.M13)) + matrix.M41; 566 vector.X = (((position.X * matrix.M11) + (position.Y * matrix.M12)) + (position.Z * matrix.M13)) + matrix.M41;
567 vector.Y = (((position.X * matrix.M21) + (position.Y * matrix.M22)) + (position.Z * matrix.M23)) + matrix.M42; 567 vector.Y = (((position.X * matrix.M21) + (position.Y * matrix.M22)) + (position.Z * matrix.M23)) + matrix.M42;
568 vector.Z = (((position.X * matrix.M31) + (position.Y * matrix.M32)) + (position.Z * matrix.M33)) + matrix.M43; 568 vector.Z = (((position.X * matrix.M31) + (position.Y * matrix.M32)) + (position.Z * matrix.M33)) + matrix.M43;
569 return vector; 569 return vector;
570 } 570 }
571 571
572 internal static Vector3 TransformNormal(Vector3 position, Matrix matrix) 572 internal static Vector3 TransformNormal(Vector3 position, Matrix matrix)
573 { 573 {
574 Vector3 vector = new Vector3(); 574 Vector3 vector = new Vector3();
575 vector.X = (((position.X * matrix.M11) + (position.Y * matrix.M12)) + (position.Z * matrix.M13)); 575 vector.X = (((position.X * matrix.M11) + (position.Y * matrix.M12)) + (position.Z * matrix.M13));
576 vector.Y = (((position.X * matrix.M21) + (position.Y * matrix.M22)) + (position.Z * matrix.M23)); 576 vector.Y = (((position.X * matrix.M21) + (position.Y * matrix.M22)) + (position.Z * matrix.M23));
577 vector.Z = (((position.X * matrix.M31) + (position.Y * matrix.M32)) + (position.Z * matrix.M33)); 577 vector.Z = (((position.X * matrix.M31) + (position.Y * matrix.M32)) + (position.Z * matrix.M33));
578 return vector; 578 return vector;
579 } 579 }
580 } 580 }
581} 581}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MatrixOperations.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MatrixOperations.cs
index 04e42d9..93a99f2 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MatrixOperations.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MatrixOperations.cs
@@ -1,116 +1,116 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 internal static class MatrixOperations 29 internal static class MatrixOperations
30 { 30 {
31 public static void SetRotation(ref Matrix m, Quaternion q) 31 public static void SetRotation(ref Matrix m, Quaternion q)
32 { 32 {
33 float d = q.LengthSquared(); 33 float d = q.LengthSquared();
34 BulletDebug.Assert(d != 0); 34 BulletDebug.Assert(d != 0);
35 float s = 2f / d; 35 float s = 2f / d;
36 float xs = q.X * s, ys = q.Y * s, zs = q.Z * s; 36 float xs = q.X * s, ys = q.Y * s, zs = q.Z * s;
37 float wx = q.W * xs, wy = q.W * ys, wz = q.W * zs; 37 float wx = q.W * xs, wy = q.W * ys, wz = q.W * zs;
38 float xx = q.X * xs, xy = q.X * ys, xz = q.X * zs; 38 float xx = q.X * xs, xy = q.X * ys, xz = q.X * zs;
39 float yy = q.Y * ys, yz = q.Y * zs, zz = q.Z * zs; 39 float yy = q.Y * ys, yz = q.Y * zs, zz = q.Z * zs;
40 m = new Matrix(1 - (yy + zz), xy - wz, xz + wy, 0, 40 m = new Matrix(1 - (yy + zz), xy - wz, xz + wy, 0,
41 xy + wz, 1 - (xx + zz), yz - wx, 0, 41 xy + wz, 1 - (xx + zz), yz - wx, 0,
42 xz - wy, yz + wx, 1 - (xx + yy), 0, 42 xz - wy, yz + wx, 1 - (xx + yy), 0,
43 m.M41, m.M42, m.M43, 1); 43 m.M41, m.M42, m.M43, 1);
44 } 44 }
45 45
46 public static Quaternion GetRotation(Matrix m) 46 public static Quaternion GetRotation(Matrix m)
47 { 47 {
48 Quaternion q = new Quaternion(); 48 Quaternion q = new Quaternion();
49 49
50 float trace = m.M11 + m.M22 + m.M33; 50 float trace = m.M11 + m.M22 + m.M33;
51 51
52 if (trace > 0) 52 if (trace > 0)
53 { 53 {
54 float s = (float)Math.Sqrt(trace + 1); 54 float s = (float)Math.Sqrt(trace + 1);
55 q.W = s * 0.5f; 55 q.W = s * 0.5f;
56 s = 0.5f / s; 56 s = 0.5f / s;
57 57
58 q.X = (m.M32 - m.M23) * s; 58 q.X = (m.M32 - m.M23) * s;
59 q.Y = (m.M13 - m.M31) * s; 59 q.Y = (m.M13 - m.M31) * s;
60 q.Z = (m.M21 - m.M12) * s; 60 q.Z = (m.M21 - m.M12) * s;
61 } 61 }
62 else 62 else
63 { 63 {
64 int i = m.M11 < m.M22 ? 64 int i = m.M11 < m.M22 ?
65 (m.M22 < m.M33 ? 2 : 1) : 65 (m.M22 < m.M33 ? 2 : 1) :
66 (m.M11 < m.M33 ? 2 : 0); 66 (m.M11 < m.M33 ? 2 : 0);
67 int j = (i + 1) % 3; 67 int j = (i + 1) % 3;
68 int k = (i + 2) % 3; 68 int k = (i + 2) % 3;
69 69
70 float s = (float)Math.Sqrt(MathHelper.GetElement(m, i, i) - MathHelper.GetElement(m, j, j) - MathHelper.GetElement(m, k, k) + 1); 70 float s = (float)Math.Sqrt(MathHelper.GetElement(m, i, i) - MathHelper.GetElement(m, j, j) - MathHelper.GetElement(m, k, k) + 1);
71 MathHelper.SetElement(ref q, i, s * 0.5f); 71 MathHelper.SetElement(ref q, i, s * 0.5f);
72 s = 0.5f / s; 72 s = 0.5f / s;
73 73
74 q.W = (MathHelper.GetElement(m, k, j) - MathHelper.GetElement(m, j, k)) * s; 74 q.W = (MathHelper.GetElement(m, k, j) - MathHelper.GetElement(m, j, k)) * s;
75 MathHelper.SetElement(ref q, j, (MathHelper.GetElement(m, j, i) + MathHelper.GetElement(m, i, j)) * s); 75 MathHelper.SetElement(ref q, j, (MathHelper.GetElement(m, j, i) + MathHelper.GetElement(m, i, j)) * s);
76 MathHelper.SetElement(ref q, k, (MathHelper.GetElement(m, k, i) + MathHelper.GetElement(m, i, k)) * s); 76 MathHelper.SetElement(ref q, k, (MathHelper.GetElement(m, k, i) + MathHelper.GetElement(m, i, k)) * s);
77 } 77 }
78 78
79 return q; 79 return q;
80 } 80 }
81 81
82 public static Matrix Scaled(Matrix m, Vector3 v) 82 public static Matrix Scaled(Matrix m, Vector3 v)
83 { 83 {
84 return new Matrix( m.M11 * v.X, m.M12 * v.Y, m.M13 * v.Z, 0, 84 return new Matrix( m.M11 * v.X, m.M12 * v.Y, m.M13 * v.Z, 0,
85 m.M21 * v.X, m.M22 * v.Y, m.M23 * v.Z, 0, 85 m.M21 * v.X, m.M22 * v.Y, m.M23 * v.Z, 0,
86 m.M31 * v.X, m.M32 * v.Y, m.M33 * v.Z, 0, 86 m.M31 * v.X, m.M32 * v.Y, m.M33 * v.Z, 0,
87 0, 0, 0, 1); 87 0, 0, 0, 1);
88 } 88 }
89 89
90 public static Matrix Multiply(Matrix a, Matrix b) 90 public static Matrix Multiply(Matrix a, Matrix b)
91 { 91 {
92 /*return btMatrix3x3( 92 /*return btMatrix3x3(
93 m2.tdot(0, m1[0]), m2.tdot(1, m1[0]), m2.tdot(2, m1[0]), 93 m2.tdot(0, m1[0]), m2.tdot(1, m1[0]), m2.tdot(2, m1[0]),
94 m2.tdot(0, m1[1]), m2.tdot(1, m1[1]), m2.tdot(2, m1[1]), 94 m2.tdot(0, m1[1]), m2.tdot(1, m1[1]), m2.tdot(2, m1[1]),
95 m2.tdot(0, m1[2]), m2.tdot(1, m1[2]), m2.tdot(2, m1[2]));*/ 95 m2.tdot(0, m1[2]), m2.tdot(1, m1[2]), m2.tdot(2, m1[2]));*/
96 return new Matrix( 96 return new Matrix(
97 Dot(b, 0, MathHelper.GetRow(a, 1)), Dot(b, 1, MathHelper.GetRow(a, 1)), Dot(b, 2, MathHelper.GetRow(a, 1)), 0, 97 Dot(b, 0, MathHelper.GetRow(a, 1)), Dot(b, 1, MathHelper.GetRow(a, 1)), Dot(b, 2, MathHelper.GetRow(a, 1)), 0,
98 Dot(b, 0, MathHelper.GetRow(a, 2)), Dot(b, 1, MathHelper.GetRow(a, 2)), Dot(b, 2, MathHelper.GetRow(a, 2)), 0, 98 Dot(b, 0, MathHelper.GetRow(a, 2)), Dot(b, 1, MathHelper.GetRow(a, 2)), Dot(b, 2, MathHelper.GetRow(a, 2)), 0,
99 Dot(b, 0, MathHelper.GetRow(a, 3)), Dot(b, 1, MathHelper.GetRow(a, 3)), Dot(b, 2, MathHelper.GetRow(a, 3)), 0, 99 Dot(b, 0, MathHelper.GetRow(a, 3)), Dot(b, 1, MathHelper.GetRow(a, 3)), Dot(b, 2, MathHelper.GetRow(a, 3)), 0,
100 0, 0, 0, 1); 100 0, 0, 0, 1);
101 } 101 }
102 102
103 public static float Dot(Matrix m, int c, Vector3 v) 103 public static float Dot(Matrix m, int c, Vector3 v)
104 { 104 {
105 return MathHelper.GetElement(m, 0, c) * v.X + MathHelper.GetElement(m, 1, c) * v.Y + MathHelper.GetElement(m, 2, c) * v.Z; 105 return MathHelper.GetElement(m, 0, c) * v.X + MathHelper.GetElement(m, 1, c) * v.Y + MathHelper.GetElement(m, 2, c) * v.Z;
106 } 106 }
107 107
108 public static Matrix Transpose(Matrix m) 108 public static Matrix Transpose(Matrix m)
109 { 109 {
110 return new Matrix( m.M11, m.M21, m.M31, 0, 110 return new Matrix( m.M11, m.M21, m.M31, 0,
111 m.M12, m.M22, m.M32, 0, 111 m.M12, m.M22, m.M32, 0,
112 m.M13, m.M23, m.M33, 0, 112 m.M13, m.M23, m.M33, 0,
113 0, 0, 0, 1); 113 0, 0, 0, 1);
114 } 114 }
115 } 115 }
116} 116}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MotionState.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MotionState.cs
index 4039177..407a285 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MotionState.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/MotionState.cs
@@ -1,44 +1,44 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public abstract class MotionState 29 public abstract class MotionState
30 { 30 {
31 /*public abstract Vector3 getWorldPosition(); 31 /*public abstract Vector3 getWorldPosition();
32 public abstract Vector3 getWorldScaling(); 32 public abstract Vector3 getWorldScaling();
33 public abstract Quaternion getWorldOrientation(); 33 public abstract Quaternion getWorldOrientation();
34 34
35 public abstract void setWorldPosition(Vector3 worldPos); 35 public abstract void setWorldPosition(Vector3 worldPos);
36 public abstract void setWorldOrientation(Quaternion orn); 36 public abstract void setWorldOrientation(Quaternion orn);
37 37
38 public abstract void calculateWorldTransformations();*/ 38 public abstract void calculateWorldTransformations();*/
39 39
40 public abstract void GetWorldTransform(out Matrix worldTransform); 40 public abstract void GetWorldTransform(out Matrix worldTransform);
41 //Bullet only calls the update of worldtransform for active objects 41 //Bullet only calls the update of worldtransform for active objects
42 public abstract void SetWorldTransform(Matrix worldTransform); 42 public abstract void SetWorldTransform(Matrix worldTransform);
43 } 43 }
44} 44}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/QuadWord.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/QuadWord.cs
index 35c9fed..0f59e87 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/QuadWord.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/QuadWord.cs
@@ -1,88 +1,88 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.LinearMath 26namespace XnaDevRu.BulletX.LinearMath
27{ 27{
28 internal abstract class QuadWord 28 internal abstract class QuadWord
29 { 29 {
30 private float x; 30 private float x;
31 private float y; 31 private float y;
32 private float z; 32 private float z;
33 private float w; 33 private float w;
34 34
35 public float X { get { return x; } set { x = value; } } 35 public float X { get { return x; } set { x = value; } }
36 public float Y { get { return y; } set { y = value; } } 36 public float Y { get { return y; } set { y = value; } }
37 public float Z { get { return z; } set { z = value; } } 37 public float Z { get { return z; } set { z = value; } }
38 public float W { get { return w; } set { w = value; } } 38 public float W { get { return w; } set { w = value; } }
39 39
40 public QuadWord() { } 40 public QuadWord() { }
41 41
42 public QuadWord(float x, float y, float z, float w) 42 public QuadWord(float x, float y, float z, float w)
43 { 43 {
44 X = x; 44 X = x;
45 Y = y; 45 Y = y;
46 Z = z; 46 Z = z;
47 W = w; 47 W = w;
48 } 48 }
49 49
50 public QuadWord(float x, float y, float z) 50 public QuadWord(float x, float y, float z)
51 { 51 {
52 X = x; 52 X = x;
53 Y = y; 53 Y = y;
54 Z = z; 54 Z = z;
55 W = 0; 55 W = 0;
56 } 56 }
57 57
58 public void SetMax(QuadWord other) 58 public void SetMax(QuadWord other)
59 { 59 {
60 if (other.X > X) 60 if (other.X > X)
61 X = other.X; 61 X = other.X;
62 62
63 if (other.Y > Y) 63 if (other.Y > Y)
64 Y = other.Y; 64 Y = other.Y;
65 65
66 if (other.Z > Z) 66 if (other.Z > Z)
67 Z = other.Z; 67 Z = other.Z;
68 68
69 if (other.W > W) 69 if (other.W > W)
70 W = other.W; 70 W = other.W;
71 } 71 }
72 72
73 public void SetMin(QuadWord other) 73 public void SetMin(QuadWord other)
74 { 74 {
75 if (other.X < X) 75 if (other.X < X)
76 X = other.X; 76 X = other.X;
77 77
78 if (other.Y < Y) 78 if (other.Y < Y)
79 Y = other.Y; 79 Y = other.Y;
80 80
81 if (other.Z < Z) 81 if (other.Z < Z)
82 Z = other.Z; 82 Z = other.Z;
83 83
84 if (other.W < W) 84 if (other.W < W)
85 W = other.W; 85 W = other.W;
86 } 86 }
87 } 87 }
88} 88}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Quaternion.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Quaternion.cs
index 5425a05..0685d4a 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Quaternion.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Quaternion.cs
@@ -1,198 +1,198 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.LinearMath 26namespace XnaDevRu.BulletX.LinearMath
27{ 27{
28 internal class Quaternion : QuadWord 28 internal class Quaternion : QuadWord
29 { 29 {
30 public Quaternion() { } 30 public Quaternion() { }
31 31
32 public Quaternion(float x, float y, float z, float w) 32 public Quaternion(float x, float y, float z, float w)
33 : base(x, y, z, w) { } 33 : base(x, y, z, w) { }
34 34
35 public Quaternion(Vector3 axis, float angle) 35 public Quaternion(Vector3 axis, float angle)
36 { 36 {
37 SetRotation(axis, angle); 37 SetRotation(axis, angle);
38 } 38 }
39 39
40 public Quaternion(float yaw, float pitch, float roll) 40 public Quaternion(float yaw, float pitch, float roll)
41 { 41 {
42 SetEuler(yaw, pitch, roll); 42 SetEuler(yaw, pitch, roll);
43 } 43 }
44 44
45 public void SetRotation(Vector3 axis, float angle) 45 public void SetRotation(Vector3 axis, float angle)
46 { 46 {
47 float d = axis.Length(); 47 float d = axis.Length();
48 if (d == 0) throw new DivideByZeroException(); 48 if (d == 0) throw new DivideByZeroException();
49 float s = (float)Math.Sin(angle * 0.5f) / d; 49 float s = (float)Math.Sin(angle * 0.5f) / d;
50 X = axis.X * s; 50 X = axis.X * s;
51 Y = axis.Y * s; 51 Y = axis.Y * s;
52 Z = axis.Z * s; 52 Z = axis.Z * s;
53 W = (float)Math.Cos(angle * 0.5f); 53 W = (float)Math.Cos(angle * 0.5f);
54 } 54 }
55 55
56 public void SetEuler(float yaw, float pitch, float roll) 56 public void SetEuler(float yaw, float pitch, float roll)
57 { 57 {
58 float halfYaw = yaw * 0.5f; 58 float halfYaw = yaw * 0.5f;
59 float halfPitch = pitch * 0.5f; 59 float halfPitch = pitch * 0.5f;
60 float halfRoll = roll * 0.5f; 60 float halfRoll = roll * 0.5f;
61 float cosYaw = (float)Math.Cos(halfYaw); 61 float cosYaw = (float)Math.Cos(halfYaw);
62 float sinYaw = (float)Math.Sin(halfYaw); 62 float sinYaw = (float)Math.Sin(halfYaw);
63 float cosPitch = (float)Math.Cos(halfPitch); 63 float cosPitch = (float)Math.Cos(halfPitch);
64 float sinPitch = (float)Math.Sin(halfPitch); 64 float sinPitch = (float)Math.Sin(halfPitch);
65 float cosRoll = (float)Math.Cos(halfRoll); 65 float cosRoll = (float)Math.Cos(halfRoll);
66 float sinRoll = (float)Math.Sin(halfRoll); 66 float sinRoll = (float)Math.Sin(halfRoll);
67 X = cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw; 67 X = cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw;
68 Y = cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw; 68 Y = cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw;
69 Z = sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw; 69 Z = sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw;
70 W = cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw; 70 W = cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw;
71 } 71 }
72 72
73 public float LengthSquared() 73 public float LengthSquared()
74 { 74 {
75 return Dot(this, this); 75 return Dot(this, this);
76 } 76 }
77 77
78 public float Length() 78 public float Length()
79 { 79 {
80 return (float)Math.Sqrt(LengthSquared()); 80 return (float)Math.Sqrt(LengthSquared());
81 } 81 }
82 82
83 public float Angle() 83 public float Angle()
84 { 84 {
85 return 2f * (float)Math.Acos(W); 85 return 2f * (float)Math.Acos(W);
86 } 86 }
87 87
88 public static float Angle(Quaternion a, Quaternion b) 88 public static float Angle(Quaternion a, Quaternion b)
89 { 89 {
90 float s = (float)Math.Sqrt(a.LengthSquared() * b.LengthSquared()); 90 float s = (float)Math.Sqrt(a.LengthSquared() * b.LengthSquared());
91 if (s == 0) throw new DivideByZeroException(); 91 if (s == 0) throw new DivideByZeroException();
92 return (float)Math.Acos(Dot(a, b) / s); 92 return (float)Math.Acos(Dot(a, b) / s);
93 } 93 }
94 94
95 public static Quaternion Farthest(Quaternion a, Quaternion b) 95 public static Quaternion Farthest(Quaternion a, Quaternion b)
96 { 96 {
97 Quaternion diff, sum; 97 Quaternion diff, sum;
98 diff = a - b; 98 diff = a - b;
99 sum = a + b; 99 sum = a + b;
100 if (Dot(diff, diff) > Dot(sum, sum)) 100 if (Dot(diff, diff) > Dot(sum, sum))
101 return b; 101 return b;
102 return -b; 102 return -b;
103 } 103 }
104 104
105 public static Quaternion Slerp(Quaternion a, Quaternion b, float c) 105 public static Quaternion Slerp(Quaternion a, Quaternion b, float c)
106 { 106 {
107 float theta = Angle(a, b); 107 float theta = Angle(a, b);
108 if (theta != 0) 108 if (theta != 0)
109 { 109 {
110 float d = 1f / (float)Math.Sin(theta); 110 float d = 1f / (float)Math.Sin(theta);
111 float s0 = (float)Math.Sin((1f - c) * theta); 111 float s0 = (float)Math.Sin((1f - c) * theta);
112 float s1 = (float)Math.Sin(c * theta); 112 float s1 = (float)Math.Sin(c * theta);
113 return new Quaternion( 113 return new Quaternion(
114 (a.X * s0 + b.X * s1) * d, 114 (a.X * s0 + b.X * s1) * d,
115 (a.Y * s0 + b.Y * s1) * d, 115 (a.Y * s0 + b.Y * s1) * d,
116 (a.Z * s0 + b.Z * s1) * d, 116 (a.Z * s0 + b.Z * s1) * d,
117 (a.W * s0 + b.W * s1) * d); 117 (a.W * s0 + b.W * s1) * d);
118 } 118 }
119 else 119 else
120 { 120 {
121 return a; 121 return a;
122 } 122 }
123 } 123 }
124 124
125 public static Quaternion Inverse(Quaternion a) 125 public static Quaternion Inverse(Quaternion a)
126 { 126 {
127 return new Quaternion(a.X, a.Y, a.Z, -a.W); 127 return new Quaternion(a.X, a.Y, a.Z, -a.W);
128 } 128 }
129 129
130 public static Quaternion Normalize(Quaternion a) 130 public static Quaternion Normalize(Quaternion a)
131 { 131 {
132 return a / a.Length(); 132 return a / a.Length();
133 } 133 }
134 134
135 public static float Dot(Quaternion a, Quaternion b) 135 public static float Dot(Quaternion a, Quaternion b)
136 { 136 {
137 return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W; 137 return a.X * b.X + a.Y * b.Y + a.Z * b.Z + a.W * b.W;
138 } 138 }
139 139
140 public static Quaternion operator +(Quaternion a, Quaternion b) 140 public static Quaternion operator +(Quaternion a, Quaternion b)
141 { 141 {
142 return new Quaternion(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); 142 return new Quaternion(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W);
143 } 143 }
144 144
145 public static Quaternion operator -(Quaternion a, Quaternion b) 145 public static Quaternion operator -(Quaternion a, Quaternion b)
146 { 146 {
147 return new Quaternion(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); 147 return new Quaternion(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W);
148 } 148 }
149 149
150 public static Quaternion operator -(Quaternion a) 150 public static Quaternion operator -(Quaternion a)
151 { 151 {
152 return new Quaternion(-a.X, -a.Y, -a.Z, -a.W); 152 return new Quaternion(-a.X, -a.Y, -a.Z, -a.W);
153 } 153 }
154 154
155 public static Quaternion operator *(Quaternion a, float b) 155 public static Quaternion operator *(Quaternion a, float b)
156 { 156 {
157 return new Quaternion(a.X * b, a.Y * b, a.Z * b, a.W * b); 157 return new Quaternion(a.X * b, a.Y * b, a.Z * b, a.W * b);
158 } 158 }
159 159
160 public static Quaternion operator *(Quaternion a, Quaternion b) 160 public static Quaternion operator *(Quaternion a, Quaternion b)
161 { 161 {
162 return new Quaternion( 162 return new Quaternion(
163 a.W * b.X + a.X * b.W + a.Y * b.Z - a.Z * b.Y, 163 a.W * b.X + a.X * b.W + a.Y * b.Z - a.Z * b.Y,
164 a.W * b.Y + a.Y * b.W + a.Z * b.X - a.X * b.Z, 164 a.W * b.Y + a.Y * b.W + a.Z * b.X - a.X * b.Z,
165 a.W * b.Z + a.Z * b.W + a.X * b.Y - a.Y * b.X, 165 a.W * b.Z + a.Z * b.W + a.X * b.Y - a.Y * b.X,
166 a.W * b.W - a.X * b.X - a.Y * b.Y - a.Z * b.Z); 166 a.W * b.W - a.X * b.X - a.Y * b.Y - a.Z * b.Z);
167 } 167 }
168 168
169 public static Quaternion operator *(Quaternion a, Vector3 b) 169 public static Quaternion operator *(Quaternion a, Vector3 b)
170 { 170 {
171 return new Quaternion( 171 return new Quaternion(
172 a.W * b.X + a.Y * b.Z - a.Z * b.Y, 172 a.W * b.X + a.Y * b.Z - a.Z * b.Y,
173 a.W * b.Y + a.Z * b.X - a.X * b.Z, 173 a.W * b.Y + a.Z * b.X - a.X * b.Z,
174 a.W * b.Z + a.X * b.Y - a.Y * b.X, 174 a.W * b.Z + a.X * b.Y - a.Y * b.X,
175 -a.X * b.X - a.Y * b.Y - a.Z * b.Z); 175 -a.X * b.X - a.Y * b.Y - a.Z * b.Z);
176 } 176 }
177 177
178 public static Quaternion operator *(Vector3 w, Quaternion q) 178 public static Quaternion operator *(Vector3 w, Quaternion q)
179 { 179 {
180 return new Quaternion( 180 return new Quaternion(
181 w.X * q.W + w.Y * q.Z - w.Z * q.Y, 181 w.X * q.W + w.Y * q.Z - w.Z * q.Y,
182 w.Y * q.W + w.Z * q.X - w.X * q.Z, 182 w.Y * q.W + w.Z * q.X - w.X * q.Z,
183 w.Z * q.W + w.X * q.Y - w.Y * q.X, 183 w.Z * q.W + w.X * q.Y - w.Y * q.X,
184 -w.X * q.X - w.Y * q.Y - w.Z * q.Z); 184 -w.X * q.X - w.Y * q.Y - w.Z * q.Z);
185 } 185 }
186 186
187 public static Quaternion operator /(Quaternion a, float b) 187 public static Quaternion operator /(Quaternion a, float b)
188 { 188 {
189 if (b == 0) throw new DivideByZeroException(); 189 if (b == 0) throw new DivideByZeroException();
190 return new Quaternion(a.X / b, a.Y / b, a.Z / b, a.W / b); 190 return new Quaternion(a.X / b, a.Y / b, a.Z / b, a.W / b);
191 } 191 }
192 192
193 public static explicit operator MonoXnaCompactMaths.Quaternion(Quaternion a) 193 public static explicit operator MonoXnaCompactMaths.Quaternion(Quaternion a)
194 { 194 {
195 return new MonoXnaCompactMaths.Quaternion(a.X, a.Y, a.Z, a.W); 195 return new MonoXnaCompactMaths.Quaternion(a.X, a.Y, a.Z, a.W);
196 } 196 }
197 } 197 }
198} 198}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/TransformUtil.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/TransformUtil.cs
index 031faab..ccf92a0 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/TransformUtil.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/TransformUtil.cs
@@ -1,102 +1,102 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25using MonoXnaCompactMaths; 25using MonoXnaCompactMaths;
26 26
27namespace XnaDevRu.BulletX 27namespace XnaDevRu.BulletX
28{ 28{
29 public static class TransformUtil 29 public static class TransformUtil
30 { 30 {
31 //const float AngularMotionTreshold = 0.5f * MonoXnaCompactMaths.MathHelper.PiOver2; 31 //const float AngularMotionTreshold = 0.5f * MonoXnaCompactMaths.MathHelper.PiOver2;
32 const float AngularMotionTreshold = 0.5f * (float)Math.PI / 2.0f; 32 const float AngularMotionTreshold = 0.5f * (float)Math.PI / 2.0f;
33 33
34 public static void IntegrateTransform(Matrix currentTransform, Vector3 linearVelocity, Vector3 angularVelocity, float timeStep, ref Matrix predictedTransform) 34 public static void IntegrateTransform(Matrix currentTransform, Vector3 linearVelocity, Vector3 angularVelocity, float timeStep, ref Matrix predictedTransform)
35 { 35 {
36 predictedTransform.Translation = currentTransform.Translation + linearVelocity * timeStep; 36 predictedTransform.Translation = currentTransform.Translation + linearVelocity * timeStep;
37 //exponential map 37 //exponential map
38 Vector3 axis; 38 Vector3 axis;
39 float angle = angularVelocity.Length(); 39 float angle = angularVelocity.Length();
40 //limit the angular motion 40 //limit the angular motion
41 if (angle * timeStep > AngularMotionTreshold) 41 if (angle * timeStep > AngularMotionTreshold)
42 { 42 {
43 angle = AngularMotionTreshold / timeStep; 43 angle = AngularMotionTreshold / timeStep;
44 } 44 }
45 45
46 if (angle < 0.001f) 46 if (angle < 0.001f)
47 { 47 {
48 // use Taylor's expansions of sync function 48 // use Taylor's expansions of sync function
49 axis = angularVelocity * (0.5f * timeStep - (timeStep * timeStep * timeStep) * (0.020833333333f) * angle * angle); 49 axis = angularVelocity * (0.5f * timeStep - (timeStep * timeStep * timeStep) * (0.020833333333f) * angle * angle);
50 } 50 }
51 else 51 else
52 { 52 {
53 // sync(fAngle) = sin(c*fAngle)/t 53 // sync(fAngle) = sin(c*fAngle)/t
54 axis = angularVelocity * ((float)Math.Sin(0.5f * angle * timeStep) / angle); 54 axis = angularVelocity * ((float)Math.Sin(0.5f * angle * timeStep) / angle);
55 } 55 }
56 Quaternion dorn = new Quaternion(axis.X, axis.Y, axis.Z, (float)Math.Cos(angle * timeStep * 0.5f)); 56 Quaternion dorn = new Quaternion(axis.X, axis.Y, axis.Z, (float)Math.Cos(angle * timeStep * 0.5f));
57 Quaternion ornA = MatrixOperations.GetRotation(currentTransform); 57 Quaternion ornA = MatrixOperations.GetRotation(currentTransform);
58 58
59 Quaternion predictedOrn = dorn * ornA; 59 Quaternion predictedOrn = dorn * ornA;
60 predictedOrn.Normalize(); 60 predictedOrn.Normalize();
61 61
62 MatrixOperations.SetRotation(ref predictedTransform, predictedOrn); 62 MatrixOperations.SetRotation(ref predictedTransform, predictedOrn);
63 63
64 Matrix test = Matrix.CreateFromQuaternion(predictedOrn); 64 Matrix test = Matrix.CreateFromQuaternion(predictedOrn);
65 } 65 }
66 66
67 public static void CalculateVelocity(Matrix transformA, Matrix transformB, float timeStep, ref Vector3 linearVelocity, ref Vector3 angularVelocity) 67 public static void CalculateVelocity(Matrix transformA, Matrix transformB, float timeStep, ref Vector3 linearVelocity, ref Vector3 angularVelocity)
68 { 68 {
69 linearVelocity = (transformB.Translation - transformA.Translation) / timeStep; 69 linearVelocity = (transformB.Translation - transformA.Translation) / timeStep;
70 Matrix dmat = transformB * MathHelper.InvertMatrix(transformA); 70 Matrix dmat = transformB * MathHelper.InvertMatrix(transformA);
71 Quaternion dorn = Quaternion.CreateFromRotationMatrix(dmat); 71 Quaternion dorn = Quaternion.CreateFromRotationMatrix(dmat);
72 72
73 Vector3 axis; 73 Vector3 axis;
74 float angle = 2 * (float)Math.Acos(dorn.W); 74 float angle = 2 * (float)Math.Acos(dorn.W);
75 axis = new Vector3(dorn.X, dorn.Y, dorn.Z); 75 axis = new Vector3(dorn.X, dorn.Y, dorn.Z);
76 //axis[3] = 0.f; 76 //axis[3] = 0.f;
77 //check for axis length 77 //check for axis length
78 float len = axis.LengthSquared(); 78 float len = axis.LengthSquared();
79 if (len < MathHelper.Epsilon * MathHelper.Epsilon) 79 if (len < MathHelper.Epsilon * MathHelper.Epsilon)
80 axis = new Vector3(1f, 0f, 0f); 80 axis = new Vector3(1f, 0f, 0f);
81 else 81 else
82 axis /= (float)Math.Sqrt(len); 82 axis /= (float)Math.Sqrt(len);
83 83
84 angularVelocity = axis * angle / timeStep; 84 angularVelocity = axis * angle / timeStep;
85 } 85 }
86 86
87 public static void CalculateDiffAxisAngle(Matrix transformA, Matrix transformB, out Vector3 axis, out float angle) 87 public static void CalculateDiffAxisAngle(Matrix transformA, Matrix transformB, out Vector3 axis, out float angle)
88 { 88 {
89 Matrix dmat = transformB * MathHelper.InvertMatrix(transformA); 89 Matrix dmat = transformB * MathHelper.InvertMatrix(transformA);
90 Quaternion dorn = MathHelper.GetRotation(dmat); 90 Quaternion dorn = MathHelper.GetRotation(dmat);
91 91
92 angle = 2f * (float)Math.Acos(dorn.W); 92 angle = 2f * (float)Math.Acos(dorn.W);
93 axis = new Vector3(dorn.X, dorn.Y, dorn.Z); 93 axis = new Vector3(dorn.X, dorn.Y, dorn.Z);
94 //check for axis length 94 //check for axis length
95 float len = axis.LengthSquared(); 95 float len = axis.LengthSquared();
96 if (len < MathHelper.Epsilon * MathHelper.Epsilon) 96 if (len < MathHelper.Epsilon * MathHelper.Epsilon)
97 axis = new Vector3(1f, 0f, 0f); 97 axis = new Vector3(1f, 0f, 0f);
98 else 98 else
99 axis /= (float)Math.Sqrt(len); 99 axis /= (float)Math.Sqrt(len);
100 } 100 }
101 } 101 }
102} 102}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector3.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector3.cs
index 79b1262..adeec25 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector3.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector3.cs
@@ -1,221 +1,221 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.LinearMath 26namespace XnaDevRu.BulletX.LinearMath
27{ 27{
28 internal class Vector3 : QuadWord 28 internal class Vector3 : QuadWord
29 { 29 {
30 public Vector3() { } 30 public Vector3() { }
31 31
32 public Vector3(float x, float y, float z) 32 public Vector3(float x, float y, float z)
33 : base(x, y, z) { } 33 : base(x, y, z) { }
34 34
35 public void SetInterpolate3(Vector3 a, Vector3 b, float c) 35 public void SetInterpolate3(Vector3 a, Vector3 b, float c)
36 { 36 {
37 float s = 1.0f - c; 37 float s = 1.0f - c;
38 X = s * a.X + c * b.X; 38 X = s * a.X + c * b.X;
39 Y = s * a.Y + c * b.Y; 39 Y = s * a.Y + c * b.Y;
40 Z = s * a.Z + c * b.Z; 40 Z = s * a.Z + c * b.Z;
41 } 41 }
42 42
43 public float LengthSquared() 43 public float LengthSquared()
44 { 44 {
45 return Dot(this, this); 45 return Dot(this, this);
46 } 46 }
47 47
48 public float Length() 48 public float Length()
49 { 49 {
50 return (float)Math.Sqrt(LengthSquared()); 50 return (float)Math.Sqrt(LengthSquared());
51 } 51 }
52 52
53 public int MinAxis() 53 public int MinAxis()
54 { 54 {
55 return X < Y ? (X < Z ? 0 : 2) : (Y < Z ? 1 : 2); 55 return X < Y ? (X < Z ? 0 : 2) : (Y < Z ? 1 : 2);
56 } 56 }
57 57
58 public int MaxAxis() 58 public int MaxAxis()
59 { 59 {
60 return X < Y ? (Y < Z ? 2 : 1) : (X < Z ? 2 : 0); 60 return X < Y ? (Y < Z ? 2 : 1) : (X < Z ? 2 : 0);
61 } 61 }
62 62
63 public int FurthestAxis() 63 public int FurthestAxis()
64 { 64 {
65 return Absolute(this).MinAxis(); 65 return Absolute(this).MinAxis();
66 } 66 }
67 67
68 public int ClosestAxis() 68 public int ClosestAxis()
69 { 69 {
70 return Absolute(this).MaxAxis(); 70 return Absolute(this).MaxAxis();
71 } 71 }
72 72
73 public Vector3 Rotate(Vector3 axis, float angle) 73 public Vector3 Rotate(Vector3 axis, float angle)
74 { 74 {
75 Vector3 o = axis * Dot(axis, this); 75 Vector3 o = axis * Dot(axis, this);
76 Vector3 x = this - o; 76 Vector3 x = this - o;
77 Vector3 y = Cross(axis, this); 77 Vector3 y = Cross(axis, this);
78 78
79 return (o + x * (float)Math.Cos(angle) + y * (float)Math.Sin(angle)); 79 return (o + x * (float)Math.Cos(angle) + y * (float)Math.Sin(angle));
80 } 80 }
81 81
82 public static Vector3 Lerp(Vector3 a, Vector3 b, float c) 82 public static Vector3 Lerp(Vector3 a, Vector3 b, float c)
83 { 83 {
84 return new Vector3( 84 return new Vector3(
85 a.X + (b.X - a.X) * c, 85 a.X + (b.X - a.X) * c,
86 a.Y + (b.Y - a.Y) * c, 86 a.Y + (b.Y - a.Y) * c,
87 a.Z + (b.Z - a.Z) * c); 87 a.Z + (b.Z - a.Z) * c);
88 } 88 }
89 89
90 public static float Angle(Vector3 a, Vector3 b) 90 public static float Angle(Vector3 a, Vector3 b)
91 { 91 {
92 float s = (float)Math.Sqrt(a.LengthSquared() * b.LengthSquared()); 92 float s = (float)Math.Sqrt(a.LengthSquared() * b.LengthSquared());
93 if (s == 0) throw new DivideByZeroException(); 93 if (s == 0) throw new DivideByZeroException();
94 return (float)Math.Acos(Dot(a, b) / s); 94 return (float)Math.Acos(Dot(a, b) / s);
95 } 95 }
96 96
97 public static Vector3 Absolute(Vector3 a) 97 public static Vector3 Absolute(Vector3 a)
98 { 98 {
99 return new Vector3( 99 return new Vector3(
100 Math.Abs(a.X), 100 Math.Abs(a.X),
101 Math.Abs(a.Y), 101 Math.Abs(a.Y),
102 Math.Abs(a.Z)); 102 Math.Abs(a.Z));
103 } 103 }
104 104
105 public static Vector3 Normalize(Vector3 a) 105 public static Vector3 Normalize(Vector3 a)
106 { 106 {
107 return a / a.Length(); 107 return a / a.Length();
108 } 108 }
109 109
110 public static Vector3 Cross(Vector3 a, Vector3 b) 110 public static Vector3 Cross(Vector3 a, Vector3 b)
111 { 111 {
112 return new Vector3( 112 return new Vector3(
113 a.Y * b.Z - a.Z * b.Y, 113 a.Y * b.Z - a.Z * b.Y,
114 a.Z * b.X - a.X * b.Z, 114 a.Z * b.X - a.X * b.Z,
115 a.X * b.Y - a.Y * b.X); 115 a.X * b.Y - a.Y * b.X);
116 } 116 }
117 117
118 public static float Dot(Vector3 a, Vector3 b) 118 public static float Dot(Vector3 a, Vector3 b)
119 { 119 {
120 return a.X * b.X + a.Y * b.Y + a.Z * b.Z; 120 return a.X * b.X + a.Y * b.Y + a.Z * b.Z;
121 } 121 }
122 122
123 public static float Triple(Vector3 a, Vector3 b, Vector3 c) 123 public static float Triple(Vector3 a, Vector3 b, Vector3 c)
124 { 124 {
125 return a.X * (b.Y * c.Z - b.Z * c.Y) + 125 return a.X * (b.Y * c.Z - b.Z * c.Y) +
126 a.Y * (b.Z * c.X - b.X * c.Z) + 126 a.Y * (b.Z * c.X - b.X * c.Z) +
127 a.Z * (b.X * c.Y - b.Y * c.X); 127 a.Z * (b.X * c.Y - b.Y * c.X);
128 } 128 }
129 129
130 public static float Distance(Vector3 a, Vector3 b) 130 public static float Distance(Vector3 a, Vector3 b)
131 { 131 {
132 return (b - a).Length(); 132 return (b - a).Length();
133 } 133 }
134 134
135 public static float DistanceSquared(Vector3 a, Vector3 b) 135 public static float DistanceSquared(Vector3 a, Vector3 b)
136 { 136 {
137 return (b - a).LengthSquared(); 137 return (b - a).LengthSquared();
138 } 138 }
139 139
140 public static Vector3 Rotate(Vector3 a, Vector3 axis, float angle) 140 public static Vector3 Rotate(Vector3 a, Vector3 axis, float angle)
141 { 141 {
142 Vector3 o = axis * Dot(axis, a); 142 Vector3 o = axis * Dot(axis, a);
143 Vector3 x = a - o; 143 Vector3 x = a - o;
144 Vector3 y = Cross(axis, a); 144 Vector3 y = Cross(axis, a);
145 145
146 return (o + x * (float)Math.Cos(angle) + y * (float)Math.Sin(angle)); 146 return (o + x * (float)Math.Cos(angle) + y * (float)Math.Sin(angle));
147 } 147 }
148 148
149 public static Vector3 operator +(Vector3 a, Vector3 b) 149 public static Vector3 operator +(Vector3 a, Vector3 b)
150 { 150 {
151 return new Vector3(a.X + b.X, a.Y + b.Y, a.Z + b.Z); 151 return new Vector3(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
152 } 152 }
153 153
154 public static Vector3 operator -(Vector3 a, Vector3 b) 154 public static Vector3 operator -(Vector3 a, Vector3 b)
155 { 155 {
156 return new Vector3(a.X - b.X, a.Y - b.Y, a.Z - b.Z); 156 return new Vector3(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
157 } 157 }
158 158
159 public static Vector3 operator -(Vector3 a) 159 public static Vector3 operator -(Vector3 a)
160 { 160 {
161 return new Vector3(-a.X, -a.Y, -a.Z); 161 return new Vector3(-a.X, -a.Y, -a.Z);
162 } 162 }
163 163
164 public static Vector3 operator *(float b, Vector3 a) 164 public static Vector3 operator *(float b, Vector3 a)
165 { 165 {
166 return new Vector3(a.X * b, a.Y * b, a.Z * b); 166 return new Vector3(a.X * b, a.Y * b, a.Z * b);
167 } 167 }
168 168
169 public static Vector3 operator *(Vector3 a, float b) 169 public static Vector3 operator *(Vector3 a, float b)
170 { 170 {
171 return new Vector3(a.X * b, a.Y * b, a.Z * b); 171 return new Vector3(a.X * b, a.Y * b, a.Z * b);
172 } 172 }
173 173
174 public static Vector3 operator *(Vector3 a, Vector3 b) 174 public static Vector3 operator *(Vector3 a, Vector3 b)
175 { 175 {
176 return new Vector3(a.X * b.X, a.Y * b.Y, a.Z * b.Z); 176 return new Vector3(a.X * b.X, a.Y * b.Y, a.Z * b.Z);
177 } 177 }
178 178
179 public static Vector3 operator /(Vector3 a, float b) 179 public static Vector3 operator /(Vector3 a, float b)
180 { 180 {
181 if (b == 0) throw new DivideByZeroException(); 181 if (b == 0) throw new DivideByZeroException();
182 return new Vector3(a.X / b, a.Y / b, a.Z / b); 182 return new Vector3(a.X / b, a.Y / b, a.Z / b);
183 } 183 }
184 184
185 public static Vector3 operator /(Vector3 a, Vector3 b) 185 public static Vector3 operator /(Vector3 a, Vector3 b)
186 { 186 {
187 if (b.X == 0 || b.Y == 0 || b.Z == 0) throw new DivideByZeroException(); 187 if (b.X == 0 || b.Y == 0 || b.Z == 0) throw new DivideByZeroException();
188 return new Vector3(a.X / b.X, a.Y / b.Y, a.Z / b.Z); 188 return new Vector3(a.X / b.X, a.Y / b.Y, a.Z / b.Z);
189 } 189 }
190 190
191 public static bool operator ==(Vector3 a, Vector3 b) 191 public static bool operator ==(Vector3 a, Vector3 b)
192 { 192 {
193 return a.X == b.X && a.Y == b.Y && a.Z == b.Z; 193 return a.X == b.X && a.Y == b.Y && a.Z == b.Z;
194 } 194 }
195 195
196 public static bool operator !=(Vector3 a, Vector3 b) 196 public static bool operator !=(Vector3 a, Vector3 b)
197 { 197 {
198 return a.X != b.X || a.Y != b.Y || a.Z != b.Z; 198 return a.X != b.X || a.Y != b.Y || a.Z != b.Z;
199 } 199 }
200 200
201 public static explicit operator MonoXnaCompactMaths.Vector3(Vector3 a) 201 public static explicit operator MonoXnaCompactMaths.Vector3(Vector3 a)
202 { 202 {
203 return new MonoXnaCompactMaths.Vector3(a.X, a.Y, a.Z); 203 return new MonoXnaCompactMaths.Vector3(a.X, a.Y, a.Z);
204 } 204 }
205 205
206 public override bool Equals(object obj) 206 public override bool Equals(object obj)
207 { 207 {
208 return object.Equals(this, obj); 208 return object.Equals(this, obj);
209 } 209 }
210 210
211 public override int GetHashCode() 211 public override int GetHashCode()
212 { 212 {
213 return X.GetHashCode() & Y.GetHashCode() & Z.GetHashCode(); 213 return X.GetHashCode() & Y.GetHashCode() & Z.GetHashCode();
214 } 214 }
215 215
216 public override string ToString() 216 public override string ToString()
217 { 217 {
218 return string.Format("{0}, {1}, {2}", X, Y, Z); 218 return string.Format("{0}, {1}, {2}", X, Y, Z);
219 } 219 }
220 } 220 }
221} 221}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector4.cs b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector4.cs
index a64ce97..de98ccd 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector4.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/LinearMath/Vector4.cs
@@ -1,110 +1,110 @@
1/* 1/*
2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru 2 Bullet for XNA Copyright (c) 2003-2007 Vsevolod Klementjev http://www.codeplex.com/xnadevru
3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com 3 Bullet original C++ version Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
4 4
5 This software is provided 'as-is', without any express or implied 5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages 6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software. 7 arising from the use of this software.
8 8
9 Permission is granted to anyone to use this software for any purpose, 9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it 10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions: 11 freely, subject to the following restrictions:
12 12
13 1. The origin of this software must not be misrepresented; you must not 13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software 14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be 15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required. 16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be 17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software. 18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution. 19 3. This notice may not be removed or altered from any source distribution.
20*/ 20*/
21 21
22using System; 22using System;
23using System.Collections.Generic; 23using System.Collections.Generic;
24using System.Text; 24using System.Text;
25 25
26namespace XnaDevRu.BulletX.LinearMath 26namespace XnaDevRu.BulletX.LinearMath
27{ 27{
28 internal class Vector4 : Vector3 28 internal class Vector4 : Vector3
29 { 29 {
30 public Vector4() { } 30 public Vector4() { }
31 31
32 public Vector4(float x, float y, float z, float w) 32 public Vector4(float x, float y, float z, float w)
33 : base(x, y, z) { W = w; } 33 : base(x, y, z) { W = w; }
34 34
35 public static Vector4 Absolute4(Vector4 a) 35 public static Vector4 Absolute4(Vector4 a)
36 { 36 {
37 return new Vector4( 37 return new Vector4(
38 Math.Abs(a.X), 38 Math.Abs(a.X),
39 Math.Abs(a.Y), 39 Math.Abs(a.Y),
40 Math.Abs(a.Z), 40 Math.Abs(a.Z),
41 Math.Abs(a.W)); 41 Math.Abs(a.W));
42 } 42 }
43 43
44 public int MaxAxis4() 44 public int MaxAxis4()
45 { 45 {
46 int maxIndex = -1; 46 int maxIndex = -1;
47 float maxVal = -1e30f; 47 float maxVal = -1e30f;
48 if (X > maxVal) 48 if (X > maxVal)
49 { 49 {
50 maxIndex = 0; 50 maxIndex = 0;
51 maxVal = X; 51 maxVal = X;
52 } 52 }
53 if (Y > maxVal) 53 if (Y > maxVal)
54 { 54 {
55 maxIndex = 1; 55 maxIndex = 1;
56 maxVal = Y; 56 maxVal = Y;
57 } 57 }
58 if (Z > maxVal) 58 if (Z > maxVal)
59 { 59 {
60 maxIndex = 2; 60 maxIndex = 2;
61 maxVal = Z; 61 maxVal = Z;
62 } 62 }
63 if (W > maxVal) 63 if (W > maxVal)
64 { 64 {
65 maxIndex = 3; 65 maxIndex = 3;
66 maxVal = W; 66 maxVal = W;
67 } 67 }
68 68
69 return maxIndex; 69 return maxIndex;
70 } 70 }
71 71
72 public int MinAxis4() 72 public int MinAxis4()
73 { 73 {
74 int minIndex = -1; 74 int minIndex = -1;
75 float minVal = 1e30f; 75 float minVal = 1e30f;
76 if (X < minVal) 76 if (X < minVal)
77 { 77 {
78 minIndex = 0; 78 minIndex = 0;
79 minVal = X; 79 minVal = X;
80 } 80 }
81 if (Y < minVal) 81 if (Y < minVal)
82 { 82 {
83 minIndex = 1; 83 minIndex = 1;
84 minVal = Y; 84 minVal = Y;
85 } 85 }
86 if (Z < minVal) 86 if (Z < minVal)
87 { 87 {
88 minIndex = 2; 88 minIndex = 2;
89 minVal = Z; 89 minVal = Z;
90 } 90 }
91 if (W < minVal) 91 if (W < minVal)
92 { 92 {
93 minIndex = 3; 93 minIndex = 3;
94 minVal = W; 94 minVal = W;
95 } 95 }
96 96
97 return minIndex; 97 return minIndex;
98 } 98 }
99 99
100 public int ClosestAxis4() 100 public int ClosestAxis4()
101 { 101 {
102 return Absolute4(this).MaxAxis4(); 102 return Absolute4(this).MaxAxis4();
103 } 103 }
104 104
105 public static explicit operator MonoXnaCompactMaths.Vector4(Vector4 a) 105 public static explicit operator MonoXnaCompactMaths.Vector4(Vector4 a)
106 { 106 {
107 return new MonoXnaCompactMaths.Vector4(a.X, a.Y, a.Z, a.W); 107 return new MonoXnaCompactMaths.Vector4(a.X, a.Y, a.Z, a.W);
108 } 108 }
109 } 109 }
110} 110}
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Modified.XnaDevRu.BulletX.csproj b/libraries/ModifiedBulletX/ModifiedBulletX/Modified.XnaDevRu.BulletX.csproj
index bed8d19..06b98bc 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Modified.XnaDevRu.BulletX.csproj
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Modified.XnaDevRu.BulletX.csproj
@@ -1,168 +1,168 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup> 2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ProductVersion>8.0.50727</ProductVersion> 5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion> 6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{44270344-ACA7-4875-B585-81D5C06D0489}</ProjectGuid> 7 <ProjectGuid>{44270344-ACA7-4875-B585-81D5C06D0489}</ProjectGuid>
8 <OutputType>Library</OutputType> 8 <OutputType>Library</OutputType>
9 <AppDesignerFolder>Properties</AppDesignerFolder> 9 <AppDesignerFolder>Properties</AppDesignerFolder>
10 <RootNamespace>XnaDevRu.BulletX</RootNamespace> 10 <RootNamespace>XnaDevRu.BulletX</RootNamespace>
11 <AssemblyName>Modified.XnaDevRu.BulletX</AssemblyName> 11 <AssemblyName>Modified.XnaDevRu.BulletX</AssemblyName>
12 </PropertyGroup> 12 </PropertyGroup>
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14 <DebugSymbols>true</DebugSymbols> 14 <DebugSymbols>true</DebugSymbols>
15 <DebugType>full</DebugType> 15 <DebugType>full</DebugType>
16 <Optimize>false</Optimize> 16 <Optimize>false</Optimize>
17 <OutputPath>bin\Debug\</OutputPath> 17 <OutputPath>bin\Debug\</OutputPath>
18 <DefineConstants>DEBUG;TRACE</DefineConstants> 18 <DefineConstants>DEBUG;TRACE</DefineConstants>
19 <ErrorReport>prompt</ErrorReport> 19 <ErrorReport>prompt</ErrorReport>
20 <WarningLevel>4</WarningLevel> 20 <WarningLevel>4</WarningLevel>
21 </PropertyGroup> 21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23 <DebugType>pdbonly</DebugType> 23 <DebugType>pdbonly</DebugType>
24 <Optimize>true</Optimize> 24 <Optimize>true</Optimize>
25 <OutputPath>bin\Release\</OutputPath> 25 <OutputPath>bin\Release\</OutputPath>
26 <DefineConstants>TRACE</DefineConstants> 26 <DefineConstants>TRACE</DefineConstants>
27 <ErrorReport>prompt</ErrorReport> 27 <ErrorReport>prompt</ErrorReport>
28 <WarningLevel>4</WarningLevel> 28 <WarningLevel>4</WarningLevel>
29 </PropertyGroup> 29 </PropertyGroup>
30 <ItemGroup> 30 <ItemGroup>
31 <Reference Include="System" /> 31 <Reference Include="System" />
32 </ItemGroup> 32 </ItemGroup>
33 <ItemGroup> 33 <ItemGroup>
34 <Compile Include="BulletDebug.cs" /> 34 <Compile Include="BulletDebug.cs" />
35 <Compile Include="Collision\BroadphaseCollision\AxisSweep3.cs" /> 35 <Compile Include="Collision\BroadphaseCollision\AxisSweep3.cs" />
36 <Compile Include="Collision\BroadphaseCollision\BroadphaseNativeTypes.cs" /> 36 <Compile Include="Collision\BroadphaseCollision\BroadphaseNativeTypes.cs" />
37 <Compile Include="Collision\BroadphaseCollision\BroadphasePair.cs" /> 37 <Compile Include="Collision\BroadphaseCollision\BroadphasePair.cs" />
38 <Compile Include="Collision\BroadphaseCollision\BroadphaseProxy.cs" /> 38 <Compile Include="Collision\BroadphaseCollision\BroadphaseProxy.cs" />
39 <Compile Include="Collision\BroadphaseCollision\CollisionAlgorithm.cs" /> 39 <Compile Include="Collision\BroadphaseCollision\CollisionAlgorithm.cs" />
40 <Compile Include="Collision\BroadphaseCollision\CollisionAlgorithmConstructionInfo.cs" /> 40 <Compile Include="Collision\BroadphaseCollision\CollisionAlgorithmConstructionInfo.cs" />
41 <Compile Include="Collision\BroadphaseCollision\DispatcherInfo.cs" /> 41 <Compile Include="Collision\BroadphaseCollision\DispatcherInfo.cs" />
42 <Compile Include="Collision\BroadphaseCollision\IBroadphase.cs" /> 42 <Compile Include="Collision\BroadphaseCollision\IBroadphase.cs" />
43 <Compile Include="Collision\BroadphaseCollision\IDispatcher.cs" /> 43 <Compile Include="Collision\BroadphaseCollision\IDispatcher.cs" />
44 <Compile Include="Collision\BroadphaseCollision\IOverlapCallback.cs" /> 44 <Compile Include="Collision\BroadphaseCollision\IOverlapCallback.cs" />
45 <Compile Include="Collision\BroadphaseCollision\OverlappingPairCache.cs" /> 45 <Compile Include="Collision\BroadphaseCollision\OverlappingPairCache.cs" />
46 <Compile Include="Collision\BroadphaseCollision\SimpleBroadphase.cs" /> 46 <Compile Include="Collision\BroadphaseCollision\SimpleBroadphase.cs" />
47 <Compile Include="Collision\BroadphaseCollision\SimpleBroadphaseProxy.cs" /> 47 <Compile Include="Collision\BroadphaseCollision\SimpleBroadphaseProxy.cs" />
48 <Compile Include="Collision\CollisionDispatch\BridgeTriangleRaycastCallback.cs" /> 48 <Compile Include="Collision\CollisionDispatch\BridgeTriangleRaycastCallback.cs" />
49 <Compile Include="Collision\CollisionDispatch\CollisionAlgorithmCreateFunc.cs" /> 49 <Compile Include="Collision\CollisionDispatch\CollisionAlgorithmCreateFunc.cs" />
50 <Compile Include="Collision\CollisionDispatch\CollisionDispatcher.cs" /> 50 <Compile Include="Collision\CollisionDispatch\CollisionDispatcher.cs" />
51 <Compile Include="Collision\CollisionDispatch\CollisionObject.cs" /> 51 <Compile Include="Collision\CollisionDispatch\CollisionObject.cs" />
52 <Compile Include="Collision\CollisionDispatch\CollisionPairCallback.cs" /> 52 <Compile Include="Collision\CollisionDispatch\CollisionPairCallback.cs" />
53 <Compile Include="Collision\CollisionDispatch\CollisionWorld.cs" /> 53 <Compile Include="Collision\CollisionDispatch\CollisionWorld.cs" />
54 <Compile Include="Collision\CollisionDispatch\CompoundCollisionAlgorithm.cs" /> 54 <Compile Include="Collision\CollisionDispatch\CompoundCollisionAlgorithm.cs" />
55 <Compile Include="Collision\CollisionDispatch\ConvexConcaveCollisionAlgorithm.cs" /> 55 <Compile Include="Collision\CollisionDispatch\ConvexConcaveCollisionAlgorithm.cs" />
56 <Compile Include="Collision\CollisionDispatch\ConvexConvexCollisionAlgorithm.cs" /> 56 <Compile Include="Collision\CollisionDispatch\ConvexConvexCollisionAlgorithm.cs" />
57 <Compile Include="Collision\CollisionDispatch\ConvexTriangleCallback.cs" /> 57 <Compile Include="Collision\CollisionDispatch\ConvexTriangleCallback.cs" />
58 <Compile Include="Collision\CollisionDispatch\EmptyAlgorithm.cs" /> 58 <Compile Include="Collision\CollisionDispatch\EmptyAlgorithm.cs" />
59 <Compile Include="Collision\CollisionDispatch\ManifoldResult.cs" /> 59 <Compile Include="Collision\CollisionDispatch\ManifoldResult.cs" />
60 <Compile Include="Collision\CollisionDispatch\SimulationIslandManager.cs" /> 60 <Compile Include="Collision\CollisionDispatch\SimulationIslandManager.cs" />
61 <Compile Include="Collision\CollisionDispatch\SphereBoxCollisionAlgorithm.cs" /> 61 <Compile Include="Collision\CollisionDispatch\SphereBoxCollisionAlgorithm.cs" />
62 <Compile Include="Collision\CollisionDispatch\SphereSphereCollisionAlgorithm.cs" /> 62 <Compile Include="Collision\CollisionDispatch\SphereSphereCollisionAlgorithm.cs" />
63 <Compile Include="Collision\CollisionDispatch\SphereTriangleCollisionAlgorithm.cs" /> 63 <Compile Include="Collision\CollisionDispatch\SphereTriangleCollisionAlgorithm.cs" />
64 <Compile Include="Collision\CollisionDispatch\SphereTriangleDetector.cs" /> 64 <Compile Include="Collision\CollisionDispatch\SphereTriangleDetector.cs" />
65 <Compile Include="Collision\CollisionDispatch\UnionFind.cs" /> 65 <Compile Include="Collision\CollisionDispatch\UnionFind.cs" />
66 <Compile Include="Collision\CollisionShapes\BoxShape.cs" /> 66 <Compile Include="Collision\CollisionShapes\BoxShape.cs" />
67 <Compile Include="Collision\CollisionShapes\BUSimplex1to4.cs" /> 67 <Compile Include="Collision\CollisionShapes\BUSimplex1to4.cs" />
68 <Compile Include="Collision\CollisionShapes\BvhTriangleMeshShape.cs" /> 68 <Compile Include="Collision\CollisionShapes\BvhTriangleMeshShape.cs" />
69 <Compile Include="Collision\CollisionShapes\CollisionShape.cs" /> 69 <Compile Include="Collision\CollisionShapes\CollisionShape.cs" />
70 <Compile Include="Collision\CollisionShapes\CompoundShape.cs" /> 70 <Compile Include="Collision\CollisionShapes\CompoundShape.cs" />
71 <Compile Include="Collision\CollisionShapes\ConcaveShape.cs" /> 71 <Compile Include="Collision\CollisionShapes\ConcaveShape.cs" />
72 <Compile Include="Collision\CollisionShapes\ConeShape.cs" /> 72 <Compile Include="Collision\CollisionShapes\ConeShape.cs" />
73 <Compile Include="Collision\CollisionShapes\ConvexHullShape.cs" /> 73 <Compile Include="Collision\CollisionShapes\ConvexHullShape.cs" />
74 <Compile Include="Collision\CollisionShapes\ConvexShape.cs" /> 74 <Compile Include="Collision\CollisionShapes\ConvexShape.cs" />
75 <Compile Include="Collision\CollisionShapes\ConvexTriangleMeshShape.cs" /> 75 <Compile Include="Collision\CollisionShapes\ConvexTriangleMeshShape.cs" />
76 <Compile Include="Collision\CollisionShapes\CylinderShape.cs" /> 76 <Compile Include="Collision\CollisionShapes\CylinderShape.cs" />
77 <Compile Include="Collision\CollisionShapes\CylinderShapeX.cs" /> 77 <Compile Include="Collision\CollisionShapes\CylinderShapeX.cs" />
78 <Compile Include="Collision\CollisionShapes\CylinderShapeZ.cs" /> 78 <Compile Include="Collision\CollisionShapes\CylinderShapeZ.cs" />
79 <Compile Include="Collision\CollisionShapes\EmptyShape.cs" /> 79 <Compile Include="Collision\CollisionShapes\EmptyShape.cs" />
80 <Compile Include="Collision\CollisionShapes\FilteredCallback.cs" /> 80 <Compile Include="Collision\CollisionShapes\FilteredCallback.cs" />
81 <Compile Include="Collision\CollisionShapes\InternalTriangleIndexCallback.cs" /> 81 <Compile Include="Collision\CollisionShapes\InternalTriangleIndexCallback.cs" />
82 <Compile Include="Collision\CollisionShapes\LocalSupportVertexCallback.cs" /> 82 <Compile Include="Collision\CollisionShapes\LocalSupportVertexCallback.cs" />
83 <Compile Include="Collision\CollisionShapes\MinkowskiSumShape.cs" /> 83 <Compile Include="Collision\CollisionShapes\MinkowskiSumShape.cs" />
84 <Compile Include="Collision\CollisionShapes\MultiSphereShape.cs" /> 84 <Compile Include="Collision\CollisionShapes\MultiSphereShape.cs" />
85 <Compile Include="Collision\CollisionShapes\NodeOverlapCallback.cs" /> 85 <Compile Include="Collision\CollisionShapes\NodeOverlapCallback.cs" />
86 <Compile Include="Collision\CollisionShapes\OptimizedBvh.cs" /> 86 <Compile Include="Collision\CollisionShapes\OptimizedBvh.cs" />
87 <Compile Include="Collision\CollisionShapes\OptimizedBvhNode.cs" /> 87 <Compile Include="Collision\CollisionShapes\OptimizedBvhNode.cs" />
88 <Compile Include="Collision\CollisionShapes\PolyhedralConvexShape.cs" /> 88 <Compile Include="Collision\CollisionShapes\PolyhedralConvexShape.cs" />
89 <Compile Include="Collision\CollisionShapes\SphereShape.cs" /> 89 <Compile Include="Collision\CollisionShapes\SphereShape.cs" />
90 <Compile Include="Collision\CollisionShapes\StaticPlaneShape.cs" /> 90 <Compile Include="Collision\CollisionShapes\StaticPlaneShape.cs" />
91 <Compile Include="Collision\CollisionShapes\StridingMeshInterface.cs" /> 91 <Compile Include="Collision\CollisionShapes\StridingMeshInterface.cs" />
92 <Compile Include="Collision\CollisionShapes\SupportVertexCallback.cs" /> 92 <Compile Include="Collision\CollisionShapes\SupportVertexCallback.cs" />
93 <Compile Include="Collision\CollisionShapes\TriangleBuffer.cs" /> 93 <Compile Include="Collision\CollisionShapes\TriangleBuffer.cs" />
94 <Compile Include="Collision\CollisionShapes\TriangleCallback.cs" /> 94 <Compile Include="Collision\CollisionShapes\TriangleCallback.cs" />
95 <Compile Include="Collision\CollisionShapes\TriangleIndexVertexArray.cs" /> 95 <Compile Include="Collision\CollisionShapes\TriangleIndexVertexArray.cs" />
96 <Compile Include="Collision\CollisionShapes\TriangleMesh.cs" /> 96 <Compile Include="Collision\CollisionShapes\TriangleMesh.cs" />
97 <Compile Include="Collision\CollisionShapes\TriangleMeshShape.cs" /> 97 <Compile Include="Collision\CollisionShapes\TriangleMeshShape.cs" />
98 <Compile Include="Collision\CollisionShapes\TriangleShape.cs" /> 98 <Compile Include="Collision\CollisionShapes\TriangleShape.cs" />
99 <Compile Include="Collision\NarrowPhaseCollision\ContinuousConvexCollision.cs" /> 99 <Compile Include="Collision\NarrowPhaseCollision\ContinuousConvexCollision.cs" />
100 <Compile Include="Collision\NarrowPhaseCollision\ConvexCast.cs" /> 100 <Compile Include="Collision\NarrowPhaseCollision\ConvexCast.cs" />
101 <Compile Include="Collision\NarrowPhaseCollision\DiscreteCollisionDetectorInterface.cs" /> 101 <Compile Include="Collision\NarrowPhaseCollision\DiscreteCollisionDetectorInterface.cs" />
102 <Compile Include="Collision\NarrowPhaseCollision\GjkConvexCast.cs" /> 102 <Compile Include="Collision\NarrowPhaseCollision\GjkConvexCast.cs" />
103 <Compile Include="Collision\NarrowPhaseCollision\GjkEpa.cs" /> 103 <Compile Include="Collision\NarrowPhaseCollision\GjkEpa.cs" />
104 <Compile Include="Collision\NarrowPhaseCollision\GjkEpaPenetrationDepthSolver.cs" /> 104 <Compile Include="Collision\NarrowPhaseCollision\GjkEpaPenetrationDepthSolver.cs" />
105 <Compile Include="Collision\NarrowPhaseCollision\GjkEpaSolver.cs" /> 105 <Compile Include="Collision\NarrowPhaseCollision\GjkEpaSolver.cs" />
106 <Compile Include="Collision\NarrowPhaseCollision\GjkPairDetector.cs" /> 106 <Compile Include="Collision\NarrowPhaseCollision\GjkPairDetector.cs" />
107 <Compile Include="Collision\NarrowPhaseCollision\IConvexPenetrationDepthSolver.cs" /> 107 <Compile Include="Collision\NarrowPhaseCollision\IConvexPenetrationDepthSolver.cs" />
108 <Compile Include="Collision\NarrowPhaseCollision\ISimplexSolver.cs" /> 108 <Compile Include="Collision\NarrowPhaseCollision\ISimplexSolver.cs" />
109 <Compile Include="Collision\NarrowPhaseCollision\ManifoldPoint.cs" /> 109 <Compile Include="Collision\NarrowPhaseCollision\ManifoldPoint.cs" />
110 <Compile Include="Collision\NarrowPhaseCollision\MinkowskiPenetrationDepthSolver.cs" /> 110 <Compile Include="Collision\NarrowPhaseCollision\MinkowskiPenetrationDepthSolver.cs" />
111 <Compile Include="Collision\NarrowPhaseCollision\PersistentManifold.cs" /> 111 <Compile Include="Collision\NarrowPhaseCollision\PersistentManifold.cs" />
112 <Compile Include="Collision\NarrowPhaseCollision\PointCollector.cs" /> 112 <Compile Include="Collision\NarrowPhaseCollision\PointCollector.cs" />
113 <Compile Include="Collision\NarrowPhaseCollision\SubsimplexConvexCast.cs" /> 113 <Compile Include="Collision\NarrowPhaseCollision\SubsimplexConvexCast.cs" />
114 <Compile Include="Collision\NarrowPhaseCollision\TriangleRaycastCallback.cs" /> 114 <Compile Include="Collision\NarrowPhaseCollision\TriangleRaycastCallback.cs" />
115 <Compile Include="Collision\NarrowPhaseCollision\VoronoiSimplexSolver.cs" /> 115 <Compile Include="Collision\NarrowPhaseCollision\VoronoiSimplexSolver.cs" />
116 <Compile Include="Dynamics\ConstraintSolver\ContactConstraint.cs" /> 116 <Compile Include="Dynamics\ConstraintSolver\ContactConstraint.cs" />
117 <Compile Include="Dynamics\ConstraintSolver\ContactSolverInfo.cs" /> 117 <Compile Include="Dynamics\ConstraintSolver\ContactSolverInfo.cs" />
118 <Compile Include="Dynamics\ConstraintSolver\Generic6DofConstraint.cs" /> 118 <Compile Include="Dynamics\ConstraintSolver\Generic6DofConstraint.cs" />
119 <Compile Include="Dynamics\ConstraintSolver\HingeConstraint.cs" /> 119 <Compile Include="Dynamics\ConstraintSolver\HingeConstraint.cs" />
120 <Compile Include="Dynamics\ConstraintSolver\IConstraintSolver.cs" /> 120 <Compile Include="Dynamics\ConstraintSolver\IConstraintSolver.cs" />
121 <Compile Include="Dynamics\ConstraintSolver\JacobianEntry.cs" /> 121 <Compile Include="Dynamics\ConstraintSolver\JacobianEntry.cs" />
122 <Compile Include="Dynamics\ConstraintSolver\Point2PointConstraint.cs" /> 122 <Compile Include="Dynamics\ConstraintSolver\Point2PointConstraint.cs" />
123 <Compile Include="Dynamics\ConstraintSolver\SequentialImpulseConstraintSolver.cs" /> 123 <Compile Include="Dynamics\ConstraintSolver\SequentialImpulseConstraintSolver.cs" />
124 <Compile Include="Dynamics\ConstraintSolver\Solve2LinearConstraint.cs" /> 124 <Compile Include="Dynamics\ConstraintSolver\Solve2LinearConstraint.cs" />
125 <Compile Include="Dynamics\ConstraintSolver\SolverBody.cs" /> 125 <Compile Include="Dynamics\ConstraintSolver\SolverBody.cs" />
126 <Compile Include="Dynamics\ConstraintSolver\SolverConstraint.cs" /> 126 <Compile Include="Dynamics\ConstraintSolver\SolverConstraint.cs" />
127 <Compile Include="Dynamics\ConstraintSolver\TypedConstraint.cs" /> 127 <Compile Include="Dynamics\ConstraintSolver\TypedConstraint.cs" />
128 <Compile Include="Dynamics\DiscreteDynamicsWorld.cs" /> 128 <Compile Include="Dynamics\DiscreteDynamicsWorld.cs" />
129 <Compile Include="Dynamics\DynamicsWorld.cs" /> 129 <Compile Include="Dynamics\DynamicsWorld.cs" />
130 <Compile Include="Dynamics\RigidBody.cs" /> 130 <Compile Include="Dynamics\RigidBody.cs" />
131 <Compile Include="Dynamics\SimpleDynamicsWorld.cs" /> 131 <Compile Include="Dynamics\SimpleDynamicsWorld.cs" />
132 <Compile Include="Dynamics\Vehicle\RaycastVehicle.cs" /> 132 <Compile Include="Dynamics\Vehicle\RaycastVehicle.cs" />
133 <Compile Include="Dynamics\Vehicle\VehicleRaycaster.cs" /> 133 <Compile Include="Dynamics\Vehicle\VehicleRaycaster.cs" />
134 <Compile Include="Dynamics\Vehicle\WheelInfo.cs" /> 134 <Compile Include="Dynamics\Vehicle\WheelInfo.cs" />
135 <Compile Include="Exceptions\BulletException.cs" /> 135 <Compile Include="Exceptions\BulletException.cs" />
136 <Compile Include="IDebugDraw.cs" /> 136 <Compile Include="IDebugDraw.cs" />
137 <Compile Include="LinearMath\DefaultMotionState.cs" /> 137 <Compile Include="LinearMath\DefaultMotionState.cs" />
138 <Compile Include="LinearMath\MathHelper.cs" /> 138 <Compile Include="LinearMath\MathHelper.cs" />
139 <Compile Include="LinearMath\MatrixOperations.cs" /> 139 <Compile Include="LinearMath\MatrixOperations.cs" />
140 <Compile Include="LinearMath\MotionState.cs" /> 140 <Compile Include="LinearMath\MotionState.cs" />
141 <Compile Include="LinearMath\QuadWord.cs" /> 141 <Compile Include="LinearMath\QuadWord.cs" />
142 <Compile Include="LinearMath\Quaternion.cs" /> 142 <Compile Include="LinearMath\Quaternion.cs" />
143 <Compile Include="LinearMath\TransformUtil.cs" /> 143 <Compile Include="LinearMath\TransformUtil.cs" />
144 <Compile Include="LinearMath\Vector3.cs" /> 144 <Compile Include="LinearMath\Vector3.cs" />
145 <Compile Include="LinearMath\Vector4.cs" /> 145 <Compile Include="LinearMath\Vector4.cs" />
146 <Compile Include="Properties\AssemblyInfo.cs" /> 146 <Compile Include="Properties\AssemblyInfo.cs" />
147 </ItemGroup> 147 </ItemGroup>
148 <ItemGroup> 148 <ItemGroup>
149 <ProjectReference Include="..\MonoXnaCompactMaths\MonoXnaCompactMaths.csproj"> 149 <ProjectReference Include="..\MonoXnaCompactMaths\MonoXnaCompactMaths.csproj">
150 <Project>{121147BC-B06B-406C-84E9-907F268CF0EB}</Project> 150 <Project>{121147BC-B06B-406C-84E9-907F268CF0EB}</Project>
151 <Name>MonoXnaCompactMaths</Name> 151 <Name>MonoXnaCompactMaths</Name>
152 </ProjectReference> 152 </ProjectReference>
153 </ItemGroup> 153 </ItemGroup>
154 <ItemGroup> 154 <ItemGroup>
155 <None Include="BulletX.snk" /> 155 <None Include="BulletX.snk" />
156 </ItemGroup> 156 </ItemGroup>
157 <ItemGroup> 157 <ItemGroup>
158 <Folder Include="Content\" /> 158 <Folder Include="Content\" />
159 </ItemGroup> 159 </ItemGroup>
160 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 160 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
161 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 161 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
162 Other similar extension points exist, see Microsoft.Common.targets. 162 Other similar extension points exist, see Microsoft.Common.targets.
163 <Target Name="BeforeBuild"> 163 <Target Name="BeforeBuild">
164 </Target> 164 </Target>
165 <Target Name="AfterBuild"> 165 <Target Name="AfterBuild">
166 </Target> 166 </Target>
167 --> 167 -->
168</Project> \ No newline at end of file 168</Project> \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/ModifiedBulletX/Properties/AssemblyInfo.cs b/libraries/ModifiedBulletX/ModifiedBulletX/Properties/AssemblyInfo.cs
index efc8fd6..03d1e3e 100644
--- a/libraries/ModifiedBulletX/ModifiedBulletX/Properties/AssemblyInfo.cs
+++ b/libraries/ModifiedBulletX/ModifiedBulletX/Properties/AssemblyInfo.cs
@@ -1,35 +1,35 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// La información general sobre un ensamblado se controla mediante el siguiente 5// La información general sobre un ensamblado se controla mediante el siguiente
6// conjunto de atributos. Cambie estos atributos para modificar la información 6// conjunto de atributos. Cambie estos atributos para modificar la información
7// asociada con un ensamblado. 7// asociada con un ensamblado.
8[assembly: AssemblyTitle("Modified.XnaDevRu.BulletX")] 8[assembly: AssemblyTitle("Modified.XnaDevRu.BulletX")]
9[assembly: AssemblyDescription("Modified Bullet for XNA")] 9[assembly: AssemblyDescription("Modified Bullet for XNA")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("XNADev.ru")] 11[assembly: AssemblyCompany("XNADev.ru")]
12[assembly: AssemblyProduct("Bullet for XNA")] 12[assembly: AssemblyProduct("Bullet for XNA")]
13[assembly: AssemblyCopyright("Copyright © 2007 XNADev.ru")] 13[assembly: AssemblyCopyright("Copyright © 2007 XNADev.ru")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Si establece ComVisible como false hace que los tipos de este ensamblado no sean visibles 17// Si establece ComVisible como false hace que los tipos de este ensamblado no sean visibles
18// a los componentes COM. Si necesita obtener acceso a un tipo en este ensamblado desde 18// a los componentes COM. Si necesita obtener acceso a un tipo en este ensamblado desde
19// COM, establezca el atributo ComVisible como true en este tipo. 19// COM, establezca el atributo ComVisible como true en este tipo.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
22// El siguiente GUID sirve como identificador de la biblioteca de tipos si este proyecto se expone a COM 22// El siguiente GUID sirve como identificador de la biblioteca de tipos si este proyecto se expone a COM
23[assembly: Guid("a6148224-0271-4cd8-9d0a-5d4955cd2b2c")] 23[assembly: Guid("a6148224-0271-4cd8-9d0a-5d4955cd2b2c")]
24 24
25// La información de versión de un ensamblado consta de los cuatro valores siguientes: 25// La información de versión de un ensamblado consta de los cuatro valores siguientes:
26// 26//
27// Versión principal 27// Versión principal
28// Versión secundaria 28// Versión secundaria
29// Número de versión de compilación 29// Número de versión de compilación
30// Revisión 30// Revisión
31// 31//
32// Puede especificar todos los valores o puede establecer como valores predeterminados los números de revisión y generación 32// Puede especificar todos los valores o puede establecer como valores predeterminados los números de revisión y generación
33// mediante el asterisco ('*'), como se muestra a continuación: 33// mediante el asterisco ('*'), como se muestra a continuación:
34[assembly: AssemblyVersion("1.0.0.0")] 34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")] 35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Matrix.cs b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Matrix.cs
index a104d89..22842ca 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Matrix.cs
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Matrix.cs
@@ -1,683 +1,683 @@
1#region License 1#region License
2/* 2/*
3MIT License 3MIT License
4Copyright © 2006 The Mono.Xna Team 4Copyright © 2006 The Mono.Xna Team
5 5
6All rights reserved. 6All rights reserved.
7 7
8Permission is hereby granted, free of charge, to any person obtaining a copy 8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal 9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights 10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is 12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions: 13furnished to do so, subject to the following conditions:
14 14
15The above copyright notice and this permission notice shall be included in all 15The above copyright notice and this permission notice shall be included in all
16copies or substantial portions of the Software. 16copies or substantial portions of the Software.
17 17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24SOFTWARE. 24SOFTWARE.
25*/ 25*/
26#endregion License 26#endregion License
27 27
28using System; 28using System;
29using System.ComponentModel; 29using System.ComponentModel;
30using System.Runtime.InteropServices; 30using System.Runtime.InteropServices;
31 31
32namespace MonoXnaCompactMaths 32namespace MonoXnaCompactMaths
33{ 33{
34 [Serializable] 34 [Serializable]
35 [StructLayout(LayoutKind.Sequential)] 35 [StructLayout(LayoutKind.Sequential)]
36 //[TypeConverter(typeof(MatrixConverter))] 36 //[TypeConverter(typeof(MatrixConverter))]
37 public struct Matrix : IEquatable<Matrix> 37 public struct Matrix : IEquatable<Matrix>
38 { 38 {
39 #region Public Constructors 39 #region Public Constructors
40 40
41 public Matrix(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, 41 public Matrix(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31,
42 float m32, float m33, float m34, float m41, float m42, float m43, float m44) 42 float m32, float m33, float m34, float m41, float m42, float m43, float m44)
43 { 43 {
44 this.M11 = m11; 44 this.M11 = m11;
45 this.M12 = m12; 45 this.M12 = m12;
46 this.M13 = m13; 46 this.M13 = m13;
47 this.M14 = m14; 47 this.M14 = m14;
48 this.M21 = m21; 48 this.M21 = m21;
49 this.M22 = m22; 49 this.M22 = m22;
50 this.M23 = m23; 50 this.M23 = m23;
51 this.M24 = m24; 51 this.M24 = m24;
52 this.M31 = m31; 52 this.M31 = m31;
53 this.M32 = m32; 53 this.M32 = m32;
54 this.M33 = m33; 54 this.M33 = m33;
55 this.M34 = m34; 55 this.M34 = m34;
56 this.M41 = m41; 56 this.M41 = m41;
57 this.M42 = m42; 57 this.M42 = m42;
58 this.M43 = m43; 58 this.M43 = m43;
59 this.M44 = m44; 59 this.M44 = m44;
60 } 60 }
61 61
62 #endregion Public Constructors 62 #endregion Public Constructors
63 63
64 64
65 #region Public Fields 65 #region Public Fields
66 66
67 public float M11; 67 public float M11;
68 public float M12; 68 public float M12;
69 public float M13; 69 public float M13;
70 public float M14; 70 public float M14;
71 public float M21; 71 public float M21;
72 public float M22; 72 public float M22;
73 public float M23; 73 public float M23;
74 public float M24; 74 public float M24;
75 public float M31; 75 public float M31;
76 public float M32; 76 public float M32;
77 public float M33; 77 public float M33;
78 public float M34; 78 public float M34;
79 public float M41; 79 public float M41;
80 public float M42; 80 public float M42;
81 public float M43; 81 public float M43;
82 public float M44; 82 public float M44;
83 83
84 #endregion Public Fields 84 #endregion Public Fields
85 85
86 86
87 #region Private Members 87 #region Private Members
88 private static Matrix identity = new Matrix(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f); 88 private static Matrix identity = new Matrix(1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f, 1f);
89 #endregion Private Members 89 #endregion Private Members
90 90
91 91
92 #region Public Properties 92 #region Public Properties
93 93
94 public Vector3 Backward 94 public Vector3 Backward
95 { 95 {
96 get 96 get
97 { 97 {
98 return new Vector3(this.M31, this.M32, this.M33); 98 return new Vector3(this.M31, this.M32, this.M33);
99 } 99 }
100 set 100 set
101 { 101 {
102 this.M31 = value.X; 102 this.M31 = value.X;
103 this.M32 = value.Y; 103 this.M32 = value.Y;
104 this.M33 = value.Z; 104 this.M33 = value.Z;
105 } 105 }
106 } 106 }
107 107
108 108
109 public Vector3 Down 109 public Vector3 Down
110 { 110 {
111 get 111 get
112 { 112 {
113 return new Vector3(-this.M21, -this.M22, -this.M23); 113 return new Vector3(-this.M21, -this.M22, -this.M23);
114 } 114 }
115 set 115 set
116 { 116 {
117 this.M21 = -value.X; 117 this.M21 = -value.X;
118 this.M22 = -value.Y; 118 this.M22 = -value.Y;
119 this.M23 = -value.Z; 119 this.M23 = -value.Z;
120 } 120 }
121 } 121 }
122 122
123 123
124 public Vector3 Forward 124 public Vector3 Forward
125 { 125 {
126 get 126 get
127 { 127 {
128 return new Vector3(-this.M31, -this.M32, -this.M33); 128 return new Vector3(-this.M31, -this.M32, -this.M33);
129 } 129 }
130 set 130 set
131 { 131 {
132 this.M31 = -value.X; 132 this.M31 = -value.X;
133 this.M32 = -value.Y; 133 this.M32 = -value.Y;
134 this.M33 = -value.Z; 134 this.M33 = -value.Z;
135 } 135 }
136 } 136 }
137 137
138 138
139 public static Matrix Identity 139 public static Matrix Identity
140 { 140 {
141 get { return identity; } 141 get { return identity; }
142 } 142 }
143 143
144 144
145 public Vector3 Left 145 public Vector3 Left
146 { 146 {
147 get 147 get
148 { 148 {
149 return new Vector3(-this.M11, -this.M12, -this.M13); 149 return new Vector3(-this.M11, -this.M12, -this.M13);
150 } 150 }
151 set 151 set
152 { 152 {
153 this.M11 = -value.X; 153 this.M11 = -value.X;
154 this.M12 = -value.Y; 154 this.M12 = -value.Y;
155 this.M13 = -value.Z; 155 this.M13 = -value.Z;
156 } 156 }
157 } 157 }
158 158
159 159
160 public Vector3 Right 160 public Vector3 Right
161 { 161 {
162 get 162 get
163 { 163 {
164 return new Vector3(this.M11, this.M12, this.M13); 164 return new Vector3(this.M11, this.M12, this.M13);
165 } 165 }
166 set 166 set
167 { 167 {
168 this.M11 = value.X; 168 this.M11 = value.X;
169 this.M12 = value.Y; 169 this.M12 = value.Y;
170 this.M13 = value.Z; 170 this.M13 = value.Z;
171 } 171 }
172 } 172 }
173 173
174 174
175 public Vector3 Translation 175 public Vector3 Translation
176 { 176 {
177 get 177 get
178 { 178 {
179 return new Vector3(this.M41, this.M42, this.M43); 179 return new Vector3(this.M41, this.M42, this.M43);
180 } 180 }
181 set 181 set
182 { 182 {
183 this.M41 = value.X; 183 this.M41 = value.X;
184 this.M42 = value.Y; 184 this.M42 = value.Y;
185 this.M43 = value.Z; 185 this.M43 = value.Z;
186 } 186 }
187 } 187 }
188 188
189 189
190 public Vector3 Up 190 public Vector3 Up
191 { 191 {
192 get 192 get
193 { 193 {
194 return new Vector3(this.M21, this.M22, this.M23); 194 return new Vector3(this.M21, this.M22, this.M23);
195 } 195 }
196 set 196 set
197 { 197 {
198 this.M21 = value.X; 198 this.M21 = value.X;
199 this.M22 = value.Y; 199 this.M22 = value.Y;
200 this.M23 = value.Z; 200 this.M23 = value.Z;
201 } 201 }
202 } 202 }
203 #endregion Public Properties 203 #endregion Public Properties
204 204
205 205
206 #region Public Methods 206 #region Public Methods
207 207
208 public static Matrix Add(Matrix matrix1, Matrix matrix2) 208 public static Matrix Add(Matrix matrix1, Matrix matrix2)
209 { 209 {
210 throw new NotImplementedException(); 210 throw new NotImplementedException();
211 } 211 }
212 212
213 213
214 public static void Add(ref Matrix matrix1, ref Matrix matrix2, out Matrix result) 214 public static void Add(ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
215 { 215 {
216 throw new NotImplementedException(); 216 throw new NotImplementedException();
217 } 217 }
218 218
219 219
220 public static Matrix CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, 220 public static Matrix CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition,
221 Vector3 cameraUpVector, Nullable<Vector3> cameraForwardVector) 221 Vector3 cameraUpVector, Nullable<Vector3> cameraForwardVector)
222 { 222 {
223 throw new NotImplementedException(); 223 throw new NotImplementedException();
224 } 224 }
225 225
226 226
227 public static void CreateBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, 227 public static void CreateBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition,
228 ref Vector3 cameraUpVector, Vector3? cameraForwardVector, out Matrix result) 228 ref Vector3 cameraUpVector, Vector3? cameraForwardVector, out Matrix result)
229 { 229 {
230 throw new NotImplementedException(); 230 throw new NotImplementedException();
231 } 231 }
232 232
233 233
234 public static Matrix CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, 234 public static Matrix CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition,
235 Vector3 rotateAxis, Nullable<Vector3> cameraForwardVector, Nullable<Vector3> objectForwardVector) 235 Vector3 rotateAxis, Nullable<Vector3> cameraForwardVector, Nullable<Vector3> objectForwardVector)
236 { 236 {
237 throw new NotImplementedException(); 237 throw new NotImplementedException();
238 } 238 }
239 239
240 240
241 public static void CreateConstrainedBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition, 241 public static void CreateConstrainedBillboard(ref Vector3 objectPosition, ref Vector3 cameraPosition,
242 ref Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector, out Matrix result) 242 ref Vector3 rotateAxis, Vector3? cameraForwardVector, Vector3? objectForwardVector, out Matrix result)
243 { 243 {
244 throw new NotImplementedException(); 244 throw new NotImplementedException();
245 } 245 }
246 246
247 247
248 public static Matrix CreateFromAxisAngle(Vector3 axis, float angle) 248 public static Matrix CreateFromAxisAngle(Vector3 axis, float angle)
249 { 249 {
250 throw new NotImplementedException(); 250 throw new NotImplementedException();
251 } 251 }
252 252
253 253
254 public static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Matrix result) 254 public static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Matrix result)
255 { 255 {
256 throw new NotImplementedException(); 256 throw new NotImplementedException();
257 } 257 }
258 258
259 259
260 public static Matrix CreateFromQuaternion(Quaternion quaternion) 260 public static Matrix CreateFromQuaternion(Quaternion quaternion)
261 { 261 {
262 //--- 262 //---
263 //http://lists.ximian.com/pipermail/mono-patches/2006-December/084667.html 263 //http://lists.ximian.com/pipermail/mono-patches/2006-December/084667.html
264 float xx = quaternion.X * quaternion.X; 264 float xx = quaternion.X * quaternion.X;
265 float xy = quaternion.X * quaternion.Y; 265 float xy = quaternion.X * quaternion.Y;
266 float xw = quaternion.X * quaternion.W; 266 float xw = quaternion.X * quaternion.W;
267 float yy = quaternion.Y * quaternion.Y; 267 float yy = quaternion.Y * quaternion.Y;
268 float yw = quaternion.Y * quaternion.W; 268 float yw = quaternion.Y * quaternion.W;
269 float yz = quaternion.Y * quaternion.Z; 269 float yz = quaternion.Y * quaternion.Z;
270 float zx = quaternion.Z * quaternion.X; 270 float zx = quaternion.Z * quaternion.X;
271 float zw = quaternion.Z * quaternion.W; 271 float zw = quaternion.Z * quaternion.W;
272 float zz = quaternion.Z * quaternion.Z; 272 float zz = quaternion.Z * quaternion.Z;
273 return new Matrix(1f - (2f * (yy + zz)), 2f * (xy + zw), 2f * (zx - yw), 0f, 2f * (xy - zw), 273 return new Matrix(1f - (2f * (yy + zz)), 2f * (xy + zw), 2f * (zx - yw), 0f, 2f * (xy - zw),
274 1f - (2f * (zz + xx)), 2f * (yz + xw), 0f, 2f * (zx + yw), 2f * (yz - xw), 274 1f - (2f * (zz + xx)), 2f * (yz + xw), 0f, 2f * (zx + yw), 2f * (yz - xw),
275 1f - (2f * (yy + xx)), 0f, 0f, 0f, 0f, 1f); 275 1f - (2f * (yy + xx)), 0f, 0f, 0f, 0f, 1f);
276 //throw new NotImplementedException(); 276 //throw new NotImplementedException();
277 } 277 }
278 278
279 279
280 public static void CreateFromQuaternion(ref Quaternion quaternion, out Matrix result) 280 public static void CreateFromQuaternion(ref Quaternion quaternion, out Matrix result)
281 { 281 {
282 throw new NotImplementedException(); 282 throw new NotImplementedException();
283 } 283 }
284 284
285 285
286 public static Matrix CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector) 286 public static Matrix CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
287 { 287 {
288 throw new NotImplementedException(); 288 throw new NotImplementedException();
289 } 289 }
290 290
291 291
292 public static void CreateLookAt(ref Vector3 cameraPosition, ref Vector3 cameraTarget, ref Vector3 cameraUpVector, out Matrix result) 292 public static void CreateLookAt(ref Vector3 cameraPosition, ref Vector3 cameraTarget, ref Vector3 cameraUpVector, out Matrix result)
293 { 293 {
294 throw new NotImplementedException(); 294 throw new NotImplementedException();
295 } 295 }
296 296
297 297
298 public static Matrix CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane) 298 public static Matrix CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)
299 { 299 {
300 throw new NotImplementedException(); 300 throw new NotImplementedException();
301 } 301 }
302 302
303 303
304 public static void CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, out Matrix result) 304 public static void CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane, out Matrix result)
305 { 305 {
306 throw new NotImplementedException(); 306 throw new NotImplementedException();
307 } 307 }
308 308
309 309
310 public static Matrix CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 310 public static Matrix CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
311 { 311 {
312 throw new NotImplementedException(); 312 throw new NotImplementedException();
313 } 313 }
314 314
315 315
316 public static void CreateOrthographicOffCenter(float left, float right, float bottom, float top, 316 public static void CreateOrthographicOffCenter(float left, float right, float bottom, float top,
317 float zNearPlane, float zFarPlane, out Matrix result) 317 float zNearPlane, float zFarPlane, out Matrix result)
318 { 318 {
319 throw new NotImplementedException(); 319 throw new NotImplementedException();
320 } 320 }
321 321
322 322
323 public static Matrix CreatePerspective(float width, float height, float zNearPlane, float zFarPlane) 323 public static Matrix CreatePerspective(float width, float height, float zNearPlane, float zFarPlane)
324 { 324 {
325 throw new NotImplementedException(); 325 throw new NotImplementedException();
326 } 326 }
327 327
328 328
329 public static void CreatePerspective(float width, float height, float zNearPlane, float zFarPlane, out Matrix result) 329 public static void CreatePerspective(float width, float height, float zNearPlane, float zFarPlane, out Matrix result)
330 { 330 {
331 throw new NotImplementedException(); 331 throw new NotImplementedException();
332 } 332 }
333 333
334 334
335 public static Matrix CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float zNearPlane, float zFarPlane) 335 public static Matrix CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float zNearPlane, float zFarPlane)
336 { 336 {
337 throw new NotImplementedException(); 337 throw new NotImplementedException();
338 } 338 }
339 339
340 340
341 public static void CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, out Matrix result) 341 public static void CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance, out Matrix result)
342 { 342 {
343 throw new NotImplementedException(); 343 throw new NotImplementedException();
344 } 344 }
345 345
346 346
347 public static Matrix CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 347 public static Matrix CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
348 { 348 {
349 throw new NotImplementedException(); 349 throw new NotImplementedException();
350 } 350 }
351 351
352 352
353 public static void CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, out Matrix result) 353 public static void CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance, out Matrix result)
354 { 354 {
355 throw new NotImplementedException(); 355 throw new NotImplementedException();
356 } 356 }
357 357
358 358
359 public static Matrix CreateRotationX(float radians) 359 public static Matrix CreateRotationX(float radians)
360 { 360 {
361 throw new NotImplementedException(); 361 throw new NotImplementedException();
362 } 362 }
363 363
364 364
365 public static void CreateRotationX(float radians, out Matrix result) 365 public static void CreateRotationX(float radians, out Matrix result)
366 { 366 {
367 throw new NotImplementedException(); 367 throw new NotImplementedException();
368 } 368 }
369 369
370 370
371 public static Matrix CreateRotationY(float radians) 371 public static Matrix CreateRotationY(float radians)
372 { 372 {
373 throw new NotImplementedException(); 373 throw new NotImplementedException();
374 } 374 }
375 375
376 376
377 public static void CreateRotationY(float radians, out Matrix result) 377 public static void CreateRotationY(float radians, out Matrix result)
378 { 378 {
379 throw new NotImplementedException(); 379 throw new NotImplementedException();
380 } 380 }
381 381
382 382
383 public static Matrix CreateRotationZ(float radians) 383 public static Matrix CreateRotationZ(float radians)
384 { 384 {
385 throw new NotImplementedException(); 385 throw new NotImplementedException();
386 } 386 }
387 387
388 388
389 public static void CreateRotationZ(float radians, out Matrix result) 389 public static void CreateRotationZ(float radians, out Matrix result)
390 { 390 {
391 throw new NotImplementedException(); 391 throw new NotImplementedException();
392 } 392 }
393 393
394 394
395 public static Matrix CreateScale(float scale) 395 public static Matrix CreateScale(float scale)
396 { 396 {
397 throw new NotImplementedException(); 397 throw new NotImplementedException();
398 } 398 }
399 399
400 400
401 public static void CreateScale(float scale, out Matrix result) 401 public static void CreateScale(float scale, out Matrix result)
402 { 402 {
403 throw new NotImplementedException(); 403 throw new NotImplementedException();
404 } 404 }
405 405
406 406
407 public static Matrix CreateScale(float xScale, float yScale, float zScale) 407 public static Matrix CreateScale(float xScale, float yScale, float zScale)
408 { 408 {
409 throw new NotImplementedException(); 409 throw new NotImplementedException();
410 } 410 }
411 411
412 412
413 public static void CreateScale(float xScale, float yScale, float zScale, out Matrix result) 413 public static void CreateScale(float xScale, float yScale, float zScale, out Matrix result)
414 { 414 {
415 throw new NotImplementedException(); 415 throw new NotImplementedException();
416 } 416 }
417 417
418 418
419 public static Matrix CreateScale(Vector3 scales) 419 public static Matrix CreateScale(Vector3 scales)
420 { 420 {
421 throw new NotImplementedException(); 421 throw new NotImplementedException();
422 } 422 }
423 423
424 424
425 public static void CreateScale(ref Vector3 scales, out Matrix result) 425 public static void CreateScale(ref Vector3 scales, out Matrix result)
426 { 426 {
427 throw new NotImplementedException(); 427 throw new NotImplementedException();
428 } 428 }
429 429
430 430
431 public static Matrix CreateTranslation(float xPosition, float yPosition, float zPosition) 431 public static Matrix CreateTranslation(float xPosition, float yPosition, float zPosition)
432 { 432 {
433 throw new NotImplementedException(); 433 throw new NotImplementedException();
434 } 434 }
435 435
436 436
437 public static void CreateTranslation(ref Vector3 position, out Matrix result) 437 public static void CreateTranslation(ref Vector3 position, out Matrix result)
438 { 438 {
439 throw new NotImplementedException(); 439 throw new NotImplementedException();
440 } 440 }
441 441
442 442
443 public static Matrix CreateTranslation(Vector3 position) 443 public static Matrix CreateTranslation(Vector3 position)
444 { 444 {
445 throw new NotImplementedException(); 445 throw new NotImplementedException();
446 } 446 }
447 447
448 448
449 public static void CreateTranslation(float xPosition, float yPosition, float zPosition, out Matrix result) 449 public static void CreateTranslation(float xPosition, float yPosition, float zPosition, out Matrix result)
450 { 450 {
451 throw new NotImplementedException(); 451 throw new NotImplementedException();
452 } 452 }
453 453
454 454
455 public float Determinant() 455 public float Determinant()
456 { 456 {
457 throw new NotImplementedException(); 457 throw new NotImplementedException();
458 } 458 }
459 459
460 460
461 public static Matrix Divide(Matrix matrix1, Matrix matrix2) 461 public static Matrix Divide(Matrix matrix1, Matrix matrix2)
462 { 462 {
463 throw new NotImplementedException(); 463 throw new NotImplementedException();
464 } 464 }
465 465
466 466
467 public static void Divide(ref Matrix matrix1, ref Matrix matrix2, out Matrix result) 467 public static void Divide(ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
468 { 468 {
469 throw new NotImplementedException(); 469 throw new NotImplementedException();
470 } 470 }
471 471
472 472
473 public static Matrix Divide(Matrix matrix1, float divider) 473 public static Matrix Divide(Matrix matrix1, float divider)
474 { 474 {
475 throw new NotImplementedException(); 475 throw new NotImplementedException();
476 } 476 }
477 477
478 478
479 public static void Divide(ref Matrix matrix1, float divider, out Matrix result) 479 public static void Divide(ref Matrix matrix1, float divider, out Matrix result)
480 { 480 {
481 throw new NotImplementedException(); 481 throw new NotImplementedException();
482 } 482 }
483 483
484 484
485 public bool Equals(Matrix other) 485 public bool Equals(Matrix other)
486 { 486 {
487 throw new NotImplementedException(); 487 throw new NotImplementedException();
488 } 488 }
489 489
490 490
491 public override bool Equals(object obj) 491 public override bool Equals(object obj)
492 { 492 {
493 throw new NotImplementedException(); 493 throw new NotImplementedException();
494 } 494 }
495 495
496 496
497 public override int GetHashCode() 497 public override int GetHashCode()
498 { 498 {
499 throw new NotImplementedException(); 499 throw new NotImplementedException();
500 } 500 }
501 501
502 502
503 public static Matrix Invert(Matrix matrix) 503 public static Matrix Invert(Matrix matrix)
504 { 504 {
505 throw new NotImplementedException(); 505 throw new NotImplementedException();
506 } 506 }
507 507
508 508
509 public static void Invert(ref Matrix matrix, out Matrix result) 509 public static void Invert(ref Matrix matrix, out Matrix result)
510 { 510 {
511 throw new NotImplementedException(); 511 throw new NotImplementedException();
512 } 512 }
513 513
514 514
515 public static Matrix Lerp(Matrix matrix1, Matrix matrix2, float amount) 515 public static Matrix Lerp(Matrix matrix1, Matrix matrix2, float amount)
516 { 516 {
517 throw new NotImplementedException(); 517 throw new NotImplementedException();
518 } 518 }
519 519
520 520
521 public static void Lerp(ref Matrix matrix1, ref Matrix matrix2, float amount, out Matrix result) 521 public static void Lerp(ref Matrix matrix1, ref Matrix matrix2, float amount, out Matrix result)
522 { 522 {
523 throw new NotImplementedException(); 523 throw new NotImplementedException();
524 } 524 }
525 525
526 public static Matrix Multiply(Matrix matrix1, Matrix matrix2) 526 public static Matrix Multiply(Matrix matrix1, Matrix matrix2)
527 { 527 {
528 throw new NotImplementedException(); 528 throw new NotImplementedException();
529 } 529 }
530 530
531 531
532 public static void Multiply(ref Matrix matrix1, ref Matrix matrix2, out Matrix result) 532 public static void Multiply(ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
533 { 533 {
534 throw new NotImplementedException(); 534 throw new NotImplementedException();
535 } 535 }
536 536
537 537
538 public static Matrix Multiply(Matrix matrix1, float factor) 538 public static Matrix Multiply(Matrix matrix1, float factor)
539 { 539 {
540 throw new NotImplementedException(); 540 throw new NotImplementedException();
541 } 541 }
542 542
543 543
544 public static void Multiply(ref Matrix matrix1, float factor, out Matrix result) 544 public static void Multiply(ref Matrix matrix1, float factor, out Matrix result)
545 { 545 {
546 throw new NotImplementedException(); 546 throw new NotImplementedException();
547 } 547 }
548 548
549 549
550 public static Matrix Negate(Matrix matrix) 550 public static Matrix Negate(Matrix matrix)
551 { 551 {
552 throw new NotImplementedException(); 552 throw new NotImplementedException();
553 } 553 }
554 554
555 555
556 public static void Negate(ref Matrix matrix, out Matrix result) 556 public static void Negate(ref Matrix matrix, out Matrix result)
557 { 557 {
558 throw new NotImplementedException(); 558 throw new NotImplementedException();
559 } 559 }
560 560
561 561
562 public static Matrix operator +(Matrix matrix1, Matrix matrix2) 562 public static Matrix operator +(Matrix matrix1, Matrix matrix2)
563 { 563 {
564 throw new NotImplementedException(); 564 throw new NotImplementedException();
565 } 565 }
566 566
567 567
568 public static Matrix operator /(Matrix matrix1, Matrix matrix2) 568 public static Matrix operator /(Matrix matrix1, Matrix matrix2)
569 { 569 {
570 throw new NotImplementedException(); 570 throw new NotImplementedException();
571 } 571 }
572 572
573 573
574 public static Matrix operator /(Matrix matrix1, float divider) 574 public static Matrix operator /(Matrix matrix1, float divider)
575 { 575 {
576 throw new NotImplementedException(); 576 throw new NotImplementedException();
577 } 577 }
578 578
579 579
580 public static bool operator ==(Matrix matrix1, Matrix matrix2) 580 public static bool operator ==(Matrix matrix1, Matrix matrix2)
581 { 581 {
582 throw new NotImplementedException(); 582 throw new NotImplementedException();
583 } 583 }
584 584
585 585
586 public static bool operator !=(Matrix matrix1, Matrix matrix2) 586 public static bool operator !=(Matrix matrix1, Matrix matrix2)
587 { 587 {
588 throw new NotImplementedException(); 588 throw new NotImplementedException();
589 } 589 }
590 590
591 591
592 public static Matrix operator *(Matrix matrix1, Matrix matrix2) 592 public static Matrix operator *(Matrix matrix1, Matrix matrix2)
593 { 593 {
594 //--- 594 //---
595 float[, ] arrayMatrix1 = new float[4, 4]; 595 float[, ] arrayMatrix1 = new float[4, 4];
596 float[, ] arrayMatrix2 = new float[4, 4]; 596 float[, ] arrayMatrix2 = new float[4, 4];
597 float[, ] arrayMatrixProduct = new float[4, 4]; 597 float[, ] arrayMatrixProduct = new float[4, 4];
598 arrayMatrix1[0, 0] = matrix1.M11; arrayMatrix1[0, 1] = matrix1.M12; arrayMatrix1[0, 2] = matrix1.M13; arrayMatrix1[0, 3] = matrix1.M14; 598 arrayMatrix1[0, 0] = matrix1.M11; arrayMatrix1[0, 1] = matrix1.M12; arrayMatrix1[0, 2] = matrix1.M13; arrayMatrix1[0, 3] = matrix1.M14;
599 arrayMatrix1[1, 0] = matrix1.M21; arrayMatrix1[1, 1] = matrix1.M22; arrayMatrix1[1, 2] = matrix1.M23; arrayMatrix1[1, 3] = matrix1.M24; 599 arrayMatrix1[1, 0] = matrix1.M21; arrayMatrix1[1, 1] = matrix1.M22; arrayMatrix1[1, 2] = matrix1.M23; arrayMatrix1[1, 3] = matrix1.M24;
600 arrayMatrix1[2, 0] = matrix1.M31; arrayMatrix1[2, 1] = matrix1.M32; arrayMatrix1[2, 2] = matrix1.M33; arrayMatrix1[2, 3] = matrix1.M34; 600 arrayMatrix1[2, 0] = matrix1.M31; arrayMatrix1[2, 1] = matrix1.M32; arrayMatrix1[2, 2] = matrix1.M33; arrayMatrix1[2, 3] = matrix1.M34;
601 arrayMatrix1[3, 0] = matrix1.M41; arrayMatrix1[3, 1] = matrix1.M42; arrayMatrix1[3, 2] = matrix1.M43; arrayMatrix1[3, 3] = matrix1.M44; 601 arrayMatrix1[3, 0] = matrix1.M41; arrayMatrix1[3, 1] = matrix1.M42; arrayMatrix1[3, 2] = matrix1.M43; arrayMatrix1[3, 3] = matrix1.M44;
602 602
603 arrayMatrix2[0, 0] = matrix2.M11; arrayMatrix2[0, 1] = matrix2.M12; arrayMatrix2[0, 2] = matrix2.M13; arrayMatrix2[0, 3] = matrix2.M14; 603 arrayMatrix2[0, 0] = matrix2.M11; arrayMatrix2[0, 1] = matrix2.M12; arrayMatrix2[0, 2] = matrix2.M13; arrayMatrix2[0, 3] = matrix2.M14;
604 arrayMatrix2[1, 0] = matrix2.M21; arrayMatrix2[1, 1] = matrix2.M22; arrayMatrix2[1, 2] = matrix2.M23; arrayMatrix2[1, 3] = matrix2.M24; 604 arrayMatrix2[1, 0] = matrix2.M21; arrayMatrix2[1, 1] = matrix2.M22; arrayMatrix2[1, 2] = matrix2.M23; arrayMatrix2[1, 3] = matrix2.M24;
605 arrayMatrix2[2, 0] = matrix2.M31; arrayMatrix2[2, 1] = matrix2.M32; arrayMatrix2[2, 2] = matrix2.M33; arrayMatrix2[2, 3] = matrix2.M34; 605 arrayMatrix2[2, 0] = matrix2.M31; arrayMatrix2[2, 1] = matrix2.M32; arrayMatrix2[2, 2] = matrix2.M33; arrayMatrix2[2, 3] = matrix2.M34;
606 arrayMatrix2[3, 0] = matrix2.M41; arrayMatrix2[3, 1] = matrix2.M42; arrayMatrix2[3, 2] = matrix2.M43; arrayMatrix2[3, 3] = matrix2.M44; 606 arrayMatrix2[3, 0] = matrix2.M41; arrayMatrix2[3, 1] = matrix2.M42; arrayMatrix2[3, 2] = matrix2.M43; arrayMatrix2[3, 3] = matrix2.M44;
607 607
608 int n = 4; 608 int n = 4;
609 for (int i = 0; i < n; i++) 609 for (int i = 0; i < n; i++)
610 { 610 {
611 for (int j = 0; j < n; j++) 611 for (int j = 0; j < n; j++)
612 { 612 {
613 // (AB)[i,j] = Sum(k=0; k < 4; k++) { A[i,k] * B[k, j] } 613 // (AB)[i,j] = Sum(k=0; k < 4; k++) { A[i,k] * B[k, j] }
614 for (int k = 0; k < n; k++) 614 for (int k = 0; k < n; k++)
615 { 615 {
616 arrayMatrixProduct[i, j] += arrayMatrix1[i, k] * arrayMatrix2[k, j]; 616 arrayMatrixProduct[i, j] += arrayMatrix1[i, k] * arrayMatrix2[k, j];
617 } 617 }
618 } 618 }
619 } 619 }
620 return new Matrix( arrayMatrixProduct[0, 0], arrayMatrixProduct[0, 1], arrayMatrixProduct[0, 2], arrayMatrixProduct[0, 3], 620 return new Matrix( arrayMatrixProduct[0, 0], arrayMatrixProduct[0, 1], arrayMatrixProduct[0, 2], arrayMatrixProduct[0, 3],
621 arrayMatrixProduct[1, 0], arrayMatrixProduct[1, 1], arrayMatrixProduct[1, 2], arrayMatrixProduct[1, 3], 621 arrayMatrixProduct[1, 0], arrayMatrixProduct[1, 1], arrayMatrixProduct[1, 2], arrayMatrixProduct[1, 3],
622 arrayMatrixProduct[2, 0], arrayMatrixProduct[2, 1], arrayMatrixProduct[2, 2], arrayMatrixProduct[2, 3], 622 arrayMatrixProduct[2, 0], arrayMatrixProduct[2, 1], arrayMatrixProduct[2, 2], arrayMatrixProduct[2, 3],
623 arrayMatrixProduct[3, 1], arrayMatrixProduct[3, 1], arrayMatrixProduct[3, 2], arrayMatrixProduct[3, 3]); 623 arrayMatrixProduct[3, 1], arrayMatrixProduct[3, 1], arrayMatrixProduct[3, 2], arrayMatrixProduct[3, 3]);
624 //--- 624 //---
625 //throw new NotImplementedException(); 625 //throw new NotImplementedException();
626 } 626 }
627 627
628 628
629 public static Matrix operator *(Matrix matrix, float scaleFactor) 629 public static Matrix operator *(Matrix matrix, float scaleFactor)
630 { 630 {
631 throw new NotImplementedException(); 631 throw new NotImplementedException();
632 } 632 }
633 633
634 634
635 public static Matrix operator -(Matrix matrix1, Matrix matrix2) 635 public static Matrix operator -(Matrix matrix1, Matrix matrix2)
636 { 636 {
637 throw new NotImplementedException(); 637 throw new NotImplementedException();
638 } 638 }
639 639
640 640
641 public static Matrix operator -(Matrix matrix1) 641 public static Matrix operator -(Matrix matrix1)
642 { 642 {
643 throw new NotImplementedException(); 643 throw new NotImplementedException();
644 } 644 }
645 645
646 646
647 public static Matrix Subtract(Matrix matrix1, Matrix matrix2) 647 public static Matrix Subtract(Matrix matrix1, Matrix matrix2)
648 { 648 {
649 throw new NotImplementedException(); 649 throw new NotImplementedException();
650 } 650 }
651 651
652 652
653 public static void Subtract(ref Matrix matrix1, ref Matrix matrix2, out Matrix result) 653 public static void Subtract(ref Matrix matrix1, ref Matrix matrix2, out Matrix result)
654 { 654 {
655 throw new NotImplementedException(); 655 throw new NotImplementedException();
656 } 656 }
657 657
658 658
659 public override string ToString() 659 public override string ToString()
660 { 660 {
661 throw new NotImplementedException(); 661 throw new NotImplementedException();
662 } 662 }
663 663
664 664
665 public static Matrix Transpose(Matrix matrix) 665 public static Matrix Transpose(Matrix matrix)
666 { 666 {
667 //--- 667 //---
668 return new Matrix( matrix.M11, matrix.M21, matrix.M31, matrix.M41, 668 return new Matrix( matrix.M11, matrix.M21, matrix.M31, matrix.M41,
669 matrix.M12, matrix.M22, matrix.M32, matrix.M42, 669 matrix.M12, matrix.M22, matrix.M32, matrix.M42,
670 matrix.M13, matrix.M23, matrix.M33, matrix.M43, 670 matrix.M13, matrix.M23, matrix.M33, matrix.M43,
671 matrix.M14, matrix.M24, matrix.M34, matrix.M44); 671 matrix.M14, matrix.M24, matrix.M34, matrix.M44);
672 //--- 672 //---
673 //throw new NotImplementedException(); 673 //throw new NotImplementedException();
674 } 674 }
675 675
676 676
677 public static void Transpose(ref Matrix matrix, out Matrix result) 677 public static void Transpose(ref Matrix matrix, out Matrix result)
678 { 678 {
679 throw new NotImplementedException(); 679 throw new NotImplementedException();
680 } 680 }
681 #endregion Public Methods 681 #endregion Public Methods
682 } 682 }
683} 683}
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/MonoXnaCompactMaths.csproj b/libraries/ModifiedBulletX/MonoXnaCompactMaths/MonoXnaCompactMaths.csproj
index c3ec4dd..79c5263 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/MonoXnaCompactMaths.csproj
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/MonoXnaCompactMaths.csproj
@@ -1,51 +1,51 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup> 3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProductVersion>8.0.50727</ProductVersion> 6 <ProductVersion>8.0.50727</ProductVersion>
7 <SchemaVersion>2.0</SchemaVersion> 7 <SchemaVersion>2.0</SchemaVersion>
8 <ProjectGuid>{121147BC-B06B-406C-84E9-907F268CF0EB}</ProjectGuid> 8 <ProjectGuid>{121147BC-B06B-406C-84E9-907F268CF0EB}</ProjectGuid>
9 <OutputType>Library</OutputType> 9 <OutputType>Library</OutputType>
10 <AppDesignerFolder>Properties</AppDesignerFolder> 10 <AppDesignerFolder>Properties</AppDesignerFolder>
11 <RootNamespace>MonoXnaCompactMaths</RootNamespace> 11 <RootNamespace>MonoXnaCompactMaths</RootNamespace>
12 <AssemblyName>MonoXnaCompactMaths</AssemblyName> 12 <AssemblyName>MonoXnaCompactMaths</AssemblyName>
13 <StartupObject> 13 <StartupObject>
14 </StartupObject> 14 </StartupObject>
15 </PropertyGroup> 15 </PropertyGroup>
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17 <DebugSymbols>true</DebugSymbols> 17 <DebugSymbols>true</DebugSymbols>
18 <DebugType>full</DebugType> 18 <DebugType>full</DebugType>
19 <Optimize>false</Optimize> 19 <Optimize>false</Optimize>
20 <OutputPath>bin\Debug\</OutputPath> 20 <OutputPath>bin\Debug\</OutputPath>
21 <DefineConstants>DEBUG;TRACE</DefineConstants> 21 <DefineConstants>DEBUG;TRACE</DefineConstants>
22 <ErrorReport>prompt</ErrorReport> 22 <ErrorReport>prompt</ErrorReport>
23 <WarningLevel>4</WarningLevel> 23 <WarningLevel>4</WarningLevel>
24 </PropertyGroup> 24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26 <DebugType>pdbonly</DebugType> 26 <DebugType>pdbonly</DebugType>
27 <Optimize>true</Optimize> 27 <Optimize>true</Optimize>
28 <OutputPath>bin\Release\</OutputPath> 28 <OutputPath>bin\Release\</OutputPath>
29 <DefineConstants>TRACE</DefineConstants> 29 <DefineConstants>TRACE</DefineConstants>
30 <ErrorReport>prompt</ErrorReport> 30 <ErrorReport>prompt</ErrorReport>
31 <WarningLevel>4</WarningLevel> 31 <WarningLevel>4</WarningLevel>
32 </PropertyGroup> 32 </PropertyGroup>
33 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 33 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
34 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 34 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
35 Other similar extension points exist, see Microsoft.Common.targets. 35 Other similar extension points exist, see Microsoft.Common.targets.
36 <Target Name="BeforeBuild"> 36 <Target Name="BeforeBuild">
37 </Target> 37 </Target>
38 <Target Name="AfterBuild"> 38 <Target Name="AfterBuild">
39 </Target> 39 </Target>
40 --> 40 -->
41 <ItemGroup> 41 <ItemGroup>
42 <Compile Include="Matrix.cs" /> 42 <Compile Include="Matrix.cs" />
43 <Compile Include="Properties\AssemblyInfo.cs" /> 43 <Compile Include="Properties\AssemblyInfo.cs" />
44 <Compile Include="Quaternion.cs" /> 44 <Compile Include="Quaternion.cs" />
45 <Compile Include="Vector3.cs" /> 45 <Compile Include="Vector3.cs" />
46 <Compile Include="Vector4.cs" /> 46 <Compile Include="Vector4.cs" />
47 </ItemGroup> 47 </ItemGroup>
48 <ItemGroup> 48 <ItemGroup>
49 <Reference Include="System" /> 49 <Reference Include="System" />
50 </ItemGroup> 50 </ItemGroup>
51</Project> \ No newline at end of file 51</Project> \ No newline at end of file
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Properties/AssemblyInfo.cs b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Properties/AssemblyInfo.cs
index 748b94a..366f664 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Properties/AssemblyInfo.cs
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// La información general sobre un ensamblado se controla mediante el siguiente 5// La información general sobre un ensamblado se controla mediante el siguiente
6// conjunto de atributos. Cambie estos atributos para modificar la información 6// conjunto de atributos. Cambie estos atributos para modificar la información
7// asociada con un ensamblado. 7// asociada con un ensamblado.
8[assembly: AssemblyTitle("MonoXnaCompactMaths")] 8[assembly: AssemblyTitle("MonoXnaCompactMaths")]
9[assembly: AssemblyDescription("MonoXnaCompactMaths (Vector3, Vector4, Quaternion and Matrix)")] 9[assembly: AssemblyDescription("MonoXnaCompactMaths (Vector3, Vector4, Quaternion and Matrix)")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("")] 12[assembly: AssemblyProduct("")]
13[assembly: AssemblyCopyright("Copyright 2006 - 2007 The Mono.Xna Team")] 13[assembly: AssemblyCopyright("Copyright 2006 - 2007 The Mono.Xna Team")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Si establece ComVisible como false hace que los tipos de este ensamblado no sean visibles 17// Si establece ComVisible como false hace que los tipos de este ensamblado no sean visibles
18// a los componentes COM. Si necesita obtener acceso a un tipo en este ensamblado desde 18// a los componentes COM. Si necesita obtener acceso a un tipo en este ensamblado desde
19// COM, establezca el atributo ComVisible como true en este tipo. 19// COM, establezca el atributo ComVisible como true en este tipo.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
22// El siguiente GUID sirve como identificador de la biblioteca de tipos si este proyecto se expone a COM 22// El siguiente GUID sirve como identificador de la biblioteca de tipos si este proyecto se expone a COM
23[assembly: Guid("79f9dfd1-60f8-44b8-ab08-6f6e341976b7")] 23[assembly: Guid("79f9dfd1-60f8-44b8-ab08-6f6e341976b7")]
24 24
25// La información de versión de un ensamblado consta de los cuatro valores siguientes: 25// La información de versión de un ensamblado consta de los cuatro valores siguientes:
26// 26//
27// Versión principal 27// Versión principal
28// Versión secundaria 28// Versión secundaria
29// Número de versión de compilación 29// Número de versión de compilación
30// Revisión 30// Revisión
31// 31//
32[assembly: AssemblyVersion("1.0.0.0")] 32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")] 33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Quaternion.cs b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Quaternion.cs
index 6ed1443..b4f1873 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Quaternion.cs
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Quaternion.cs
@@ -1,346 +1,346 @@
1#region License 1#region License
2/* 2/*
3MIT License 3MIT License
4Copyright © 2006 The Mono.Xna Team 4Copyright © 2006 The Mono.Xna Team
5 5
6All rights reserved. 6All rights reserved.
7 7
8Permission is hereby granted, free of charge, to any person obtaining a copy 8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal 9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights 10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is 12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions: 13furnished to do so, subject to the following conditions:
14 14
15The above copyright notice and this permission notice shall be included in all 15The above copyright notice and this permission notice shall be included in all
16copies or substantial portions of the Software. 16copies or substantial portions of the Software.
17 17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24SOFTWARE. 24SOFTWARE.
25*/ 25*/
26#endregion License 26#endregion License
27 27
28using System; 28using System;
29using System.ComponentModel; 29using System.ComponentModel;
30 30
31namespace MonoXnaCompactMaths 31namespace MonoXnaCompactMaths
32{ 32{
33 [Serializable] 33 [Serializable]
34 //[TypeConverter(typeof(QuaternionConverter))] 34 //[TypeConverter(typeof(QuaternionConverter))]
35 public struct Quaternion : IEquatable<Quaternion> 35 public struct Quaternion : IEquatable<Quaternion>
36 { 36 {
37 public float X; 37 public float X;
38 public float Y; 38 public float Y;
39 public float Z; 39 public float Z;
40 public float W; 40 public float W;
41 static Quaternion identity = new Quaternion(0, 0, 0, 1); 41 static Quaternion identity = new Quaternion(0, 0, 0, 1);
42 42
43 43
44 public Quaternion(float x, float y, float z, float w) 44 public Quaternion(float x, float y, float z, float w)
45 { 45 {
46 this.X = x; 46 this.X = x;
47 this.Y = y; 47 this.Y = y;
48 this.Z = z; 48 this.Z = z;
49 this.W = w; 49 this.W = w;
50 } 50 }
51 51
52 52
53 public Quaternion(Vector3 vectorPart, float scalarPart) 53 public Quaternion(Vector3 vectorPart, float scalarPart)
54 { 54 {
55 this.X = vectorPart.X; 55 this.X = vectorPart.X;
56 this.Y = vectorPart.Y; 56 this.Y = vectorPart.Y;
57 this.Z = vectorPart.Z; 57 this.Z = vectorPart.Z;
58 this.W = scalarPart; 58 this.W = scalarPart;
59 } 59 }
60 60
61 public static Quaternion Identity 61 public static Quaternion Identity
62 { 62 {
63 get{ return identity; } 63 get{ return identity; }
64 } 64 }
65 65
66 66
67 public static Quaternion Add(Quaternion quaternion1, Quaternion quaternion2) 67 public static Quaternion Add(Quaternion quaternion1, Quaternion quaternion2)
68 { 68 {
69 throw new NotImplementedException(); 69 throw new NotImplementedException();
70 } 70 }
71 71
72 72
73 public static void Add(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) 73 public static void Add(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
74 { 74 {
75 throw new NotImplementedException(); 75 throw new NotImplementedException();
76 } 76 }
77 77
78 78
79 public static Quaternion CreateFromAxisAngle(Vector3 axis, float angle) 79 public static Quaternion CreateFromAxisAngle(Vector3 axis, float angle)
80 { 80 {
81 throw new NotImplementedException(); 81 throw new NotImplementedException();
82 } 82 }
83 83
84 84
85 public static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Quaternion result) 85 public static void CreateFromAxisAngle(ref Vector3 axis, float angle, out Quaternion result)
86 { 86 {
87 throw new NotImplementedException(); 87 throw new NotImplementedException();
88 } 88 }
89 89
90 90
91 public static Quaternion CreateFromRotationMatrix(Matrix matrix) 91 public static Quaternion CreateFromRotationMatrix(Matrix matrix)
92 { 92 {
93 throw new NotImplementedException(); 93 throw new NotImplementedException();
94 } 94 }
95 95
96 96
97 public static void CreateFromRotationMatrix(ref Matrix matrix, out Quaternion result) 97 public static void CreateFromRotationMatrix(ref Matrix matrix, out Quaternion result)
98 { 98 {
99 throw new NotImplementedException(); 99 throw new NotImplementedException();
100 } 100 }
101 101
102 102
103 public static Quaternion Divide(Quaternion quaternion1, Quaternion quaternion2) 103 public static Quaternion Divide(Quaternion quaternion1, Quaternion quaternion2)
104 { 104 {
105 throw new NotImplementedException(); 105 throw new NotImplementedException();
106 } 106 }
107 107
108 108
109 public static void Divide(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) 109 public static void Divide(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
110 { 110 {
111 throw new NotImplementedException(); 111 throw new NotImplementedException();
112 } 112 }
113 113
114 114
115 public static float Dot(Quaternion quaternion1, Quaternion quaternion2) 115 public static float Dot(Quaternion quaternion1, Quaternion quaternion2)
116 { 116 {
117 throw new NotImplementedException(); 117 throw new NotImplementedException();
118 } 118 }
119 119
120 120
121 public static void Dot(ref Quaternion quaternion1, ref Quaternion quaternion2, out float result) 121 public static void Dot(ref Quaternion quaternion1, ref Quaternion quaternion2, out float result)
122 { 122 {
123 throw new NotImplementedException(); 123 throw new NotImplementedException();
124 } 124 }
125 125
126 126
127 public override bool Equals(object obj) 127 public override bool Equals(object obj)
128 { 128 {
129 throw new NotImplementedException(); 129 throw new NotImplementedException();
130 } 130 }
131 131
132 132
133 public bool Equals(Quaternion other) 133 public bool Equals(Quaternion other)
134 { 134 {
135 throw new NotImplementedException(); 135 throw new NotImplementedException();
136 } 136 }
137 137
138 138
139 public override int GetHashCode() 139 public override int GetHashCode()
140 { 140 {
141 throw new NotImplementedException(); 141 throw new NotImplementedException();
142 } 142 }
143 143
144 144
145 public static Quaternion Inverse(Quaternion quaternion) 145 public static Quaternion Inverse(Quaternion quaternion)
146 { 146 {
147 throw new NotImplementedException(); 147 throw new NotImplementedException();
148 } 148 }
149 149
150 150
151 public static void Inverse(ref Quaternion quaternion, out Quaternion result) 151 public static void Inverse(ref Quaternion quaternion, out Quaternion result)
152 { 152 {
153 throw new NotImplementedException(); 153 throw new NotImplementedException();
154 } 154 }
155 155
156 156
157 public float Length() 157 public float Length()
158 { 158 {
159 //--- 159 //---
160 return (float)Math.Sqrt(Math.Pow(this.W, 2.0) + Math.Pow(this.X, 2.0) + Math.Pow(this.Y, 2.0) + Math.Pow(this.Z, 2.0)); 160 return (float)Math.Sqrt(Math.Pow(this.W, 2.0) + Math.Pow(this.X, 2.0) + Math.Pow(this.Y, 2.0) + Math.Pow(this.Z, 2.0));
161 //--- 161 //---
162 //throw new NotImplementedException(); 162 //throw new NotImplementedException();
163 } 163 }
164 164
165 165
166 public float LengthSquared() 166 public float LengthSquared()
167 { 167 {
168 //--- 168 //---
169 return (float)(Math.Pow(this.W, 2.0) + Math.Pow(this.X, 2.0) + Math.Pow(this.Y, 2.0) + Math.Pow(this.Z, 2.0)); 169 return (float)(Math.Pow(this.W, 2.0) + Math.Pow(this.X, 2.0) + Math.Pow(this.Y, 2.0) + Math.Pow(this.Z, 2.0));
170 //--- 170 //---
171 //throw new NotImplementedException(); 171 //throw new NotImplementedException();
172 } 172 }
173 173
174 174
175 public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount) 175 public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
176 { 176 {
177 throw new NotImplementedException(); 177 throw new NotImplementedException();
178 } 178 }
179 179
180 180
181 public static void Lerp(ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result) 181 public static void Lerp(ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result)
182 { 182 {
183 throw new NotImplementedException(); 183 throw new NotImplementedException();
184 } 184 }
185 185
186 186
187 public static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, float amount) 187 public static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, float amount)
188 { 188 {
189 throw new NotImplementedException(); 189 throw new NotImplementedException();
190 } 190 }
191 191
192 192
193 public static void Slerp(ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result) 193 public static void Slerp(ref Quaternion quaternion1, ref Quaternion quaternion2, float amount, out Quaternion result)
194 { 194 {
195 throw new NotImplementedException(); 195 throw new NotImplementedException();
196 } 196 }
197 197
198 198
199 public static Quaternion Subtract(Quaternion quaternion1, Quaternion quaternion2) 199 public static Quaternion Subtract(Quaternion quaternion1, Quaternion quaternion2)
200 { 200 {
201 throw new NotImplementedException(); 201 throw new NotImplementedException();
202 } 202 }
203 203
204 204
205 public static void Subtract(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) 205 public static void Subtract(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
206 { 206 {
207 throw new NotImplementedException(); 207 throw new NotImplementedException();
208 } 208 }
209 209
210 210
211 public static Quaternion Multiply(Quaternion quaternion1, Quaternion quaternion2) 211 public static Quaternion Multiply(Quaternion quaternion1, Quaternion quaternion2)
212 { 212 {
213 throw new NotImplementedException(); 213 throw new NotImplementedException();
214 } 214 }
215 215
216 216
217 public static Quaternion Multiply(Quaternion quaternion1, float scaleFactor) 217 public static Quaternion Multiply(Quaternion quaternion1, float scaleFactor)
218 { 218 {
219 throw new NotImplementedException(); 219 throw new NotImplementedException();
220 } 220 }
221 221
222 222
223 public static void Multiply(ref Quaternion quaternion1, float scaleFactor, out Quaternion result) 223 public static void Multiply(ref Quaternion quaternion1, float scaleFactor, out Quaternion result)
224 { 224 {
225 throw new NotImplementedException(); 225 throw new NotImplementedException();
226 } 226 }
227 227
228 228
229 public static void Multiply(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result) 229 public static void Multiply(ref Quaternion quaternion1, ref Quaternion quaternion2, out Quaternion result)
230 { 230 {
231 throw new NotImplementedException(); 231 throw new NotImplementedException();
232 } 232 }
233 233
234 234
235 public static Quaternion Negate(Quaternion quaternion) 235 public static Quaternion Negate(Quaternion quaternion)
236 { 236 {
237 throw new NotImplementedException(); 237 throw new NotImplementedException();
238 } 238 }
239 239
240 240
241 public static void Negate(ref Quaternion quaternion, out Quaternion result) 241 public static void Negate(ref Quaternion quaternion, out Quaternion result)
242 { 242 {
243 throw new NotImplementedException(); 243 throw new NotImplementedException();
244 } 244 }
245 245
246 246
247 public void Normalize() 247 public void Normalize()
248 { 248 {
249 //--- 249 //---
250 this = Normalize(this); 250 this = Normalize(this);
251 //--- 251 //---
252 //throw new NotImplementedException(); 252 //throw new NotImplementedException();
253 } 253 }
254 254
255 255
256 public static Quaternion Normalize(Quaternion quaternion) 256 public static Quaternion Normalize(Quaternion quaternion)
257 { 257 {
258 //--- 258 //---
259 return quaternion / quaternion.Length(); 259 return quaternion / quaternion.Length();
260 //--- 260 //---
261 //throw new NotImplementedException(); 261 //throw new NotImplementedException();
262 } 262 }
263 263
264 264
265 public static void Normalize(ref Quaternion quaternion, out Quaternion result) 265 public static void Normalize(ref Quaternion quaternion, out Quaternion result)
266 { 266 {
267 throw new NotImplementedException(); 267 throw new NotImplementedException();
268 } 268 }
269 269
270 270
271 public static Quaternion operator +(Quaternion quaternion1, Quaternion quaternion2) 271 public static Quaternion operator +(Quaternion quaternion1, Quaternion quaternion2)
272 { 272 {
273 throw new NotImplementedException(); 273 throw new NotImplementedException();
274 } 274 }
275 275
276 276
277 public static Quaternion operator /(Quaternion quaternion1, Quaternion quaternion2) 277 public static Quaternion operator /(Quaternion quaternion1, Quaternion quaternion2)
278 { 278 {
279 throw new NotImplementedException(); 279 throw new NotImplementedException();
280 } 280 }
281 public static Quaternion operator /(Quaternion quaternion, float factor) 281 public static Quaternion operator /(Quaternion quaternion, float factor)
282 { 282 {
283 quaternion.W /= factor; 283 quaternion.W /= factor;
284 quaternion.X /= factor; 284 quaternion.X /= factor;
285 quaternion.Y /= factor; 285 quaternion.Y /= factor;
286 quaternion.Z /= factor; 286 quaternion.Z /= factor;
287 return quaternion; 287 return quaternion;
288 } 288 }
289 289
290 public static bool operator ==(Quaternion quaternion1, Quaternion quaternion2) 290 public static bool operator ==(Quaternion quaternion1, Quaternion quaternion2)
291 { 291 {
292 throw new NotImplementedException(); 292 throw new NotImplementedException();
293 } 293 }
294 294
295 295
296 public static bool operator !=(Quaternion quaternion1, Quaternion quaternion2) 296 public static bool operator !=(Quaternion quaternion1, Quaternion quaternion2)
297 { 297 {
298 throw new NotImplementedException(); 298 throw new NotImplementedException();
299 } 299 }
300 300
301 301
302 public static Quaternion operator *(Quaternion quaternion1, Quaternion quaternion2) 302 public static Quaternion operator *(Quaternion quaternion1, Quaternion quaternion2)
303 { 303 {
304 //--- 304 //---
305 //Grassmann product 305 //Grassmann product
306 Quaternion quaternionProduct = new Quaternion(); 306 Quaternion quaternionProduct = new Quaternion();
307 307
308 quaternionProduct.W = quaternion1.W * quaternion2.W - quaternion1.X * quaternion2.X - quaternion1.Y * quaternion2.Y - quaternion1.Z * quaternion2.Z; 308 quaternionProduct.W = quaternion1.W * quaternion2.W - quaternion1.X * quaternion2.X - quaternion1.Y * quaternion2.Y - quaternion1.Z * quaternion2.Z;
309 quaternionProduct.X = quaternion1.W * quaternion2.X + quaternion1.X * quaternion2.W + quaternion1.Y * quaternion2.Z - quaternion1.Z * quaternion2.Y; 309 quaternionProduct.X = quaternion1.W * quaternion2.X + quaternion1.X * quaternion2.W + quaternion1.Y * quaternion2.Z - quaternion1.Z * quaternion2.Y;
310 quaternionProduct.Y = quaternion1.W * quaternion2.Y - quaternion1.X * quaternion2.Z + quaternion1.Y * quaternion2.W + quaternion1.Z * quaternion2.X; 310 quaternionProduct.Y = quaternion1.W * quaternion2.Y - quaternion1.X * quaternion2.Z + quaternion1.Y * quaternion2.W + quaternion1.Z * quaternion2.X;
311 quaternionProduct.Z = quaternion1.W * quaternion2.Z + quaternion1.X * quaternion2.Y - quaternion1.Y * quaternion2.X + quaternion1.Z * quaternion2.W; 311 quaternionProduct.Z = quaternion1.W * quaternion2.Z + quaternion1.X * quaternion2.Y - quaternion1.Y * quaternion2.X + quaternion1.Z * quaternion2.W;
312 return quaternionProduct; 312 return quaternionProduct;
313 //--- 313 //---
314 //throw new NotImplementedException(); 314 //throw new NotImplementedException();
315 } 315 }
316 316
317 317
318 public static Quaternion operator *(Quaternion quaternion1, float scaleFactor) 318 public static Quaternion operator *(Quaternion quaternion1, float scaleFactor)
319 { 319 {
320 throw new NotImplementedException(); 320 throw new NotImplementedException();
321 } 321 }
322 322
323 323
324 public static Quaternion operator -(Quaternion quaternion1, Quaternion quaternion2) 324 public static Quaternion operator -(Quaternion quaternion1, Quaternion quaternion2)
325 { 325 {
326 throw new NotImplementedException(); 326 throw new NotImplementedException();
327 } 327 }
328 328
329 329
330 public static Quaternion operator -(Quaternion quaternion) 330 public static Quaternion operator -(Quaternion quaternion)
331 { 331 {
332 throw new NotImplementedException(); 332 throw new NotImplementedException();
333 } 333 }
334 334
335 335
336 public override string ToString() 336 public override string ToString()
337 { 337 {
338 throw new NotImplementedException(); 338 throw new NotImplementedException();
339 } 339 }
340 340
341 private static void Conjugate(ref Quaternion quaternion, out Quaternion result) 341 private static void Conjugate(ref Quaternion quaternion, out Quaternion result)
342 { 342 {
343 throw new NotImplementedException(); 343 throw new NotImplementedException();
344 } 344 }
345 } 345 }
346} 346}
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector3.cs b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector3.cs
index fd4bcd2..f246415 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector3.cs
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector3.cs
@@ -1,620 +1,620 @@
1#region License 1#region License
2/* 2/*
3MIT License 3MIT License
4Copyright © 2006 The Mono.Xna Team 4Copyright © 2006 The Mono.Xna Team
5 5
6All rights reserved. 6All rights reserved.
7 7
8Authors: 8Authors:
9 * Alan McGovern 9 * Alan McGovern
10 10
11Permission is hereby granted, free of charge, to any person obtaining a copy 11Permission is hereby granted, free of charge, to any person obtaining a copy
12of this software and associated documentation files (the "Software"), to deal 12of this software and associated documentation files (the "Software"), to deal
13in the Software without restriction, including without limitation the rights 13in the Software without restriction, including without limitation the rights
14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15copies of the Software, and to permit persons to whom the Software is 15copies of the Software, and to permit persons to whom the Software is
16furnished to do so, subject to the following conditions: 16furnished to do so, subject to the following conditions:
17 17
18The above copyright notice and this permission notice shall be included in all 18The above copyright notice and this permission notice shall be included in all
19copies or substantial portions of the Software. 19copies or substantial portions of the Software.
20 20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27SOFTWARE. 27SOFTWARE.
28*/ 28*/
29#endregion License 29#endregion License
30 30
31using System; 31using System;
32using System.ComponentModel; 32using System.ComponentModel;
33using System.Text; 33using System.Text;
34using System.Runtime.InteropServices; 34using System.Runtime.InteropServices;
35 35
36namespace MonoXnaCompactMaths 36namespace MonoXnaCompactMaths
37{ 37{
38 [Serializable] 38 [Serializable]
39 [StructLayout(LayoutKind.Sequential)] 39 [StructLayout(LayoutKind.Sequential)]
40 //[TypeConverter(typeof(Vector3Converter))] 40 //[TypeConverter(typeof(Vector3Converter))]
41 public struct Vector3 : IEquatable<Vector3> 41 public struct Vector3 : IEquatable<Vector3>
42 { 42 {
43 #region Private Fields 43 #region Private Fields
44 44
45 private static Vector3 zero = new Vector3(0f, 0f, 0f); 45 private static Vector3 zero = new Vector3(0f, 0f, 0f);
46 private static Vector3 one = new Vector3(1f, 1f, 1f); 46 private static Vector3 one = new Vector3(1f, 1f, 1f);
47 private static Vector3 unitX = new Vector3(1f, 0f, 0f); 47 private static Vector3 unitX = new Vector3(1f, 0f, 0f);
48 private static Vector3 unitY = new Vector3(0f, 1f, 0f); 48 private static Vector3 unitY = new Vector3(0f, 1f, 0f);
49 private static Vector3 unitZ = new Vector3(0f, 0f, 1f); 49 private static Vector3 unitZ = new Vector3(0f, 0f, 1f);
50 private static Vector3 up = new Vector3(0f, 1f, 0f); 50 private static Vector3 up = new Vector3(0f, 1f, 0f);
51 private static Vector3 down = new Vector3(0f, -1f, 0f); 51 private static Vector3 down = new Vector3(0f, -1f, 0f);
52 private static Vector3 right = new Vector3(1f, 0f, 0f); 52 private static Vector3 right = new Vector3(1f, 0f, 0f);
53 private static Vector3 left = new Vector3(-1f, 0f, 0f); 53 private static Vector3 left = new Vector3(-1f, 0f, 0f);
54 private static Vector3 forward = new Vector3(0f, 0f, -1f); 54 private static Vector3 forward = new Vector3(0f, 0f, -1f);
55 private static Vector3 backward = new Vector3(0f, 0f, 1f); 55 private static Vector3 backward = new Vector3(0f, 0f, 1f);
56 56
57 #endregion Private Fields 57 #endregion Private Fields
58 58
59 59
60 #region Public Fields 60 #region Public Fields
61 61
62 public float X; 62 public float X;
63 public float Y; 63 public float Y;
64 public float Z; 64 public float Z;
65 65
66 #endregion Public Fields 66 #endregion Public Fields
67 67
68 68
69 #region Properties 69 #region Properties
70 70
71 public static Vector3 Zero 71 public static Vector3 Zero
72 { 72 {
73 get { return zero; } 73 get { return zero; }
74 } 74 }
75 75
76 public static Vector3 One 76 public static Vector3 One
77 { 77 {
78 get { return one; } 78 get { return one; }
79 } 79 }
80 80
81 public static Vector3 UnitX 81 public static Vector3 UnitX
82 { 82 {
83 get { return unitX; } 83 get { return unitX; }
84 } 84 }
85 85
86 public static Vector3 UnitY 86 public static Vector3 UnitY
87 { 87 {
88 get { return unitY; } 88 get { return unitY; }
89 } 89 }
90 90
91 public static Vector3 UnitZ 91 public static Vector3 UnitZ
92 { 92 {
93 get { return unitZ; } 93 get { return unitZ; }
94 } 94 }
95 95
96 public static Vector3 Up 96 public static Vector3 Up
97 { 97 {
98 get { return up; } 98 get { return up; }
99 } 99 }
100 100
101 public static Vector3 Down 101 public static Vector3 Down
102 { 102 {
103 get { return down; } 103 get { return down; }
104 } 104 }
105 105
106 public static Vector3 Right 106 public static Vector3 Right
107 { 107 {
108 get { return right; } 108 get { return right; }
109 } 109 }
110 110
111 public static Vector3 Left 111 public static Vector3 Left
112 { 112 {
113 get { return left; } 113 get { return left; }
114 } 114 }
115 115
116 public static Vector3 Forward 116 public static Vector3 Forward
117 { 117 {
118 get { return forward; } 118 get { return forward; }
119 } 119 }
120 120
121 public static Vector3 Backward 121 public static Vector3 Backward
122 { 122 {
123 get { return backward; } 123 get { return backward; }
124 } 124 }
125 125
126 #endregion Properties 126 #endregion Properties
127 127
128 128
129 #region Constructors 129 #region Constructors
130 130
131 public Vector3(float x, float y, float z) 131 public Vector3(float x, float y, float z)
132 { 132 {
133 this.X = x; 133 this.X = x;
134 this.Y = y; 134 this.Y = y;
135 this.Z = z; 135 this.Z = z;
136 } 136 }
137 137
138 138
139 public Vector3(float value) 139 public Vector3(float value)
140 { 140 {
141 this.X = value; 141 this.X = value;
142 this.Y = value; 142 this.Y = value;
143 this.Z = value; 143 this.Z = value;
144 } 144 }
145 145
146 146
147 /*public Vector3(Vector2 value, float z) 147 /*public Vector3(Vector2 value, float z)
148 { 148 {
149 this.X = value.X; 149 this.X = value.X;
150 this.Y = value.Y; 150 this.Y = value.Y;
151 this.Z = z; 151 this.Z = z;
152 }*/ 152 }*/
153 153
154 154
155 #endregion Constructors 155 #endregion Constructors
156 156
157 157
158 #region Public Methods 158 #region Public Methods
159 159
160 public static Vector3 Add(Vector3 value1, Vector3 value2) 160 public static Vector3 Add(Vector3 value1, Vector3 value2)
161 { 161 {
162 value1.X += value2.X; 162 value1.X += value2.X;
163 value1.Y += value2.Y; 163 value1.Y += value2.Y;
164 value1.Z += value2.Z; 164 value1.Z += value2.Z;
165 return value1; 165 return value1;
166 } 166 }
167 167
168 public static void Add(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 168 public static void Add(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
169 { 169 {
170 result.X = value1.X + value2.X; 170 result.X = value1.X + value2.X;
171 result.Y = value1.Y + value2.Y; 171 result.Y = value1.Y + value2.Y;
172 result.Z = value1.Z + value2.Z; 172 result.Z = value1.Z + value2.Z;
173 } 173 }
174 174
175 /*public static Vector3 Barycentric(Vector3 value1, Vector3 value2, Vector3 value3, float amount1, float amount2) 175 /*public static Vector3 Barycentric(Vector3 value1, Vector3 value2, Vector3 value3, float amount1, float amount2)
176 { 176 {
177 return new Vector3( 177 return new Vector3(
178 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2), 178 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),
179 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2), 179 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2),
180 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2)); 180 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2));
181 }*/ 181 }*/
182 182
183 /*public static void Barycentric(ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, float amount1, float amount2, out Vector3 result) 183 /*public static void Barycentric(ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, float amount1, float amount2, out Vector3 result)
184 { 184 {
185 result = new Vector3( 185 result = new Vector3(
186 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2), 186 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),
187 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2), 187 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2),
188 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2)); 188 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2));
189 }*/ 189 }*/
190 190
191 /*public static Vector3 CatmullRom(Vector3 value1, Vector3 value2, Vector3 value3, Vector3 value4, float amount) 191 /*public static Vector3 CatmullRom(Vector3 value1, Vector3 value2, Vector3 value3, Vector3 value4, float amount)
192 { 192 {
193 return new Vector3( 193 return new Vector3(
194 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount), 194 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),
195 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount), 195 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount),
196 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount)); 196 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount));
197 }*/ 197 }*/
198 198
199 /*public static void CatmullRom(ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, ref Vector3 value4, float amount, out Vector3 result) 199 /*public static void CatmullRom(ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, ref Vector3 value4, float amount, out Vector3 result)
200 { 200 {
201 result = new Vector3( 201 result = new Vector3(
202 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount), 202 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),
203 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount), 203 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount),
204 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount)); 204 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount));
205 }*/ 205 }*/
206 206
207 /*public static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max) 207 /*public static Vector3 Clamp(Vector3 value1, Vector3 min, Vector3 max)
208 { 208 {
209 return new Vector3( 209 return new Vector3(
210 MathHelper.Clamp(value1.X, min.X, max.X), 210 MathHelper.Clamp(value1.X, min.X, max.X),
211 MathHelper.Clamp(value1.Y, min.Y, max.Y), 211 MathHelper.Clamp(value1.Y, min.Y, max.Y),
212 MathHelper.Clamp(value1.Z, min.Z, max.Z)); 212 MathHelper.Clamp(value1.Z, min.Z, max.Z));
213 }*/ 213 }*/
214 214
215 /*public static void Clamp(ref Vector3 value1, ref Vector3 min, ref Vector3 max, out Vector3 result) 215 /*public static void Clamp(ref Vector3 value1, ref Vector3 min, ref Vector3 max, out Vector3 result)
216 { 216 {
217 result = new Vector3( 217 result = new Vector3(
218 MathHelper.Clamp(value1.X, min.X, max.X), 218 MathHelper.Clamp(value1.X, min.X, max.X),
219 MathHelper.Clamp(value1.Y, min.Y, max.Y), 219 MathHelper.Clamp(value1.Y, min.Y, max.Y),
220 MathHelper.Clamp(value1.Z, min.Z, max.Z)); 220 MathHelper.Clamp(value1.Z, min.Z, max.Z));
221 }*/ 221 }*/
222 222
223 public static Vector3 Cross(Vector3 vector1, Vector3 vector2) 223 public static Vector3 Cross(Vector3 vector1, Vector3 vector2)
224 { 224 {
225 Cross(ref vector1, ref vector2, out vector1); 225 Cross(ref vector1, ref vector2, out vector1);
226 return vector1; 226 return vector1;
227 } 227 }
228 228
229 public static void Cross(ref Vector3 vector1, ref Vector3 vector2, out Vector3 result) 229 public static void Cross(ref Vector3 vector1, ref Vector3 vector2, out Vector3 result)
230 { 230 {
231 result = new Vector3(vector1.Y * vector2.Z - vector2.Y * vector1.Z, 231 result = new Vector3(vector1.Y * vector2.Z - vector2.Y * vector1.Z,
232 -(vector1.X * vector2.Z - vector2.X * vector1.Z), 232 -(vector1.X * vector2.Z - vector2.X * vector1.Z),
233 vector1.X * vector2.Y - vector2.X * vector1.Y); 233 vector1.X * vector2.Y - vector2.X * vector1.Y);
234 } 234 }
235 235
236 public static float Distance(Vector3 vector1, Vector3 vector2) 236 public static float Distance(Vector3 vector1, Vector3 vector2)
237 { 237 {
238 float result; 238 float result;
239 DistanceSquared(ref vector1, ref vector2, out result); 239 DistanceSquared(ref vector1, ref vector2, out result);
240 return (float)Math.Sqrt(result); 240 return (float)Math.Sqrt(result);
241 } 241 }
242 242
243 public static void Distance(ref Vector3 value1, ref Vector3 value2, out float result) 243 public static void Distance(ref Vector3 value1, ref Vector3 value2, out float result)
244 { 244 {
245 DistanceSquared(ref value1, ref value2, out result); 245 DistanceSquared(ref value1, ref value2, out result);
246 result = (float)Math.Sqrt(result); 246 result = (float)Math.Sqrt(result);
247 } 247 }
248 248
249 public static float DistanceSquared(Vector3 value1, Vector3 value2) 249 public static float DistanceSquared(Vector3 value1, Vector3 value2)
250 { 250 {
251 float result; 251 float result;
252 DistanceSquared(ref value1, ref value2, out result); 252 DistanceSquared(ref value1, ref value2, out result);
253 return result; 253 return result;
254 } 254 }
255 255
256 public static void DistanceSquared(ref Vector3 value1, ref Vector3 value2, out float result) 256 public static void DistanceSquared(ref Vector3 value1, ref Vector3 value2, out float result)
257 { 257 {
258 result = (value1.X - value2.X) * (value1.X - value2.X) + 258 result = (value1.X - value2.X) * (value1.X - value2.X) +
259 (value1.Y - value2.Y) * (value1.Y - value2.Y) + 259 (value1.Y - value2.Y) * (value1.Y - value2.Y) +
260 (value1.Z - value2.Z) * (value1.Z - value2.Z); 260 (value1.Z - value2.Z) * (value1.Z - value2.Z);
261 } 261 }
262 262
263 public static Vector3 Divide(Vector3 value1, Vector3 value2) 263 public static Vector3 Divide(Vector3 value1, Vector3 value2)
264 { 264 {
265 value1.X /= value2.X; 265 value1.X /= value2.X;
266 value1.Y /= value2.Y; 266 value1.Y /= value2.Y;
267 value1.Z /= value2.Z; 267 value1.Z /= value2.Z;
268 return value1; 268 return value1;
269 } 269 }
270 270
271 public static Vector3 Divide(Vector3 value1, float value2) 271 public static Vector3 Divide(Vector3 value1, float value2)
272 { 272 {
273 float factor = 1 / value2; 273 float factor = 1 / value2;
274 value1.X *= factor; 274 value1.X *= factor;
275 value1.Y *= factor; 275 value1.Y *= factor;
276 value1.Z *= factor; 276 value1.Z *= factor;
277 return value1; 277 return value1;
278 } 278 }
279 279
280 public static void Divide(ref Vector3 value1, float divisor, out Vector3 result) 280 public static void Divide(ref Vector3 value1, float divisor, out Vector3 result)
281 { 281 {
282 float factor = 1 / divisor; 282 float factor = 1 / divisor;
283 result.X = value1.X * factor; 283 result.X = value1.X * factor;
284 result.Y = value1.Y * factor; 284 result.Y = value1.Y * factor;
285 result.Z = value1.Z * factor; 285 result.Z = value1.Z * factor;
286 } 286 }
287 287
288 public static void Divide(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 288 public static void Divide(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
289 { 289 {
290 result.X = value1.X / value2.X; 290 result.X = value1.X / value2.X;
291 result.Y = value1.Y / value2.Y; 291 result.Y = value1.Y / value2.Y;
292 result.Z = value1.Z / value2.Z; 292 result.Z = value1.Z / value2.Z;
293 } 293 }
294 294
295 public static float Dot(Vector3 vector1, Vector3 vector2) 295 public static float Dot(Vector3 vector1, Vector3 vector2)
296 { 296 {
297 return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z; 297 return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z;
298 } 298 }
299 299
300 public static void Dot(ref Vector3 vector1, ref Vector3 vector2, out float result) 300 public static void Dot(ref Vector3 vector1, ref Vector3 vector2, out float result)
301 { 301 {
302 result = vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z; 302 result = vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z;
303 } 303 }
304 304
305 public override bool Equals(object obj) 305 public override bool Equals(object obj)
306 { 306 {
307 return (obj is Vector3) ? this == (Vector3)obj : false; 307 return (obj is Vector3) ? this == (Vector3)obj : false;
308 } 308 }
309 309
310 public bool Equals(Vector3 other) 310 public bool Equals(Vector3 other)
311 { 311 {
312 return this == other; 312 return this == other;
313 } 313 }
314 314
315 public override int GetHashCode() 315 public override int GetHashCode()
316 { 316 {
317 return (int)(this.X + this.Y + this.Z); 317 return (int)(this.X + this.Y + this.Z);
318 } 318 }
319 319
320 /*public static Vector3 Hermite(Vector3 value1, Vector3 tangent1, Vector3 value2, Vector3 tangent2, float amount) 320 /*public static Vector3 Hermite(Vector3 value1, Vector3 tangent1, Vector3 value2, Vector3 tangent2, float amount)
321 { 321 {
322 Vector3 result = new Vector3(); 322 Vector3 result = new Vector3();
323 Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result); 323 Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result);
324 return result; 324 return result;
325 }*/ 325 }*/
326 326
327 /*public static void Hermite(ref Vector3 value1, ref Vector3 tangent1, ref Vector3 value2, ref Vector3 tangent2, float amount, out Vector3 result) 327 /*public static void Hermite(ref Vector3 value1, ref Vector3 tangent1, ref Vector3 value2, ref Vector3 tangent2, float amount, out Vector3 result)
328 { 328 {
329 result.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount); 329 result.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount);
330 result.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount); 330 result.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount);
331 result.Z = MathHelper.Hermite(value1.Z, tangent1.Z, value2.Z, tangent2.Z, amount); 331 result.Z = MathHelper.Hermite(value1.Z, tangent1.Z, value2.Z, tangent2.Z, amount);
332 }*/ 332 }*/
333 333
334 public float Length() 334 public float Length()
335 { 335 {
336 float result; 336 float result;
337 DistanceSquared(ref this, ref zero, out result); 337 DistanceSquared(ref this, ref zero, out result);
338 return (float)Math.Sqrt(result); 338 return (float)Math.Sqrt(result);
339 } 339 }
340 340
341 public float LengthSquared() 341 public float LengthSquared()
342 { 342 {
343 float result; 343 float result;
344 DistanceSquared(ref this, ref zero, out result); 344 DistanceSquared(ref this, ref zero, out result);
345 return result; 345 return result;
346 } 346 }
347 347
348 /*public static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount) 348 /*public static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount)
349 { 349 {
350 return new Vector3( 350 return new Vector3(
351 MathHelper.Lerp(value1.X, value2.X, amount), 351 MathHelper.Lerp(value1.X, value2.X, amount),
352 MathHelper.Lerp(value1.Y, value2.Y, amount), 352 MathHelper.Lerp(value1.Y, value2.Y, amount),
353 MathHelper.Lerp(value1.Z, value2.Z, amount)); 353 MathHelper.Lerp(value1.Z, value2.Z, amount));
354 }*/ 354 }*/
355 355
356 /*public static void Lerp(ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result) 356 /*public static void Lerp(ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result)
357 { 357 {
358 result = new Vector3( 358 result = new Vector3(
359 MathHelper.Lerp(value1.X, value2.X, amount), 359 MathHelper.Lerp(value1.X, value2.X, amount),
360 MathHelper.Lerp(value1.Y, value2.Y, amount), 360 MathHelper.Lerp(value1.Y, value2.Y, amount),
361 MathHelper.Lerp(value1.Z, value2.Z, amount)); 361 MathHelper.Lerp(value1.Z, value2.Z, amount));
362 }*/ 362 }*/
363 363
364 /*public static Vector3 Max(Vector3 value1, Vector3 value2) 364 /*public static Vector3 Max(Vector3 value1, Vector3 value2)
365 { 365 {
366 return new Vector3( 366 return new Vector3(
367 MathHelper.Max(value1.X, value2.X), 367 MathHelper.Max(value1.X, value2.X),
368 MathHelper.Max(value1.Y, value2.Y), 368 MathHelper.Max(value1.Y, value2.Y),
369 MathHelper.Max(value1.Z, value2.Z)); 369 MathHelper.Max(value1.Z, value2.Z));
370 }*/ 370 }*/
371 371
372 /*public static void Max(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 372 /*public static void Max(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
373 { 373 {
374 result = new Vector3( 374 result = new Vector3(
375 MathHelper.Max(value1.X, value2.X), 375 MathHelper.Max(value1.X, value2.X),
376 MathHelper.Max(value1.Y, value2.Y), 376 MathHelper.Max(value1.Y, value2.Y),
377 MathHelper.Max(value1.Z, value2.Z)); 377 MathHelper.Max(value1.Z, value2.Z));
378 }*/ 378 }*/
379 379
380 /*public static Vector3 Min(Vector3 value1, Vector3 value2) 380 /*public static Vector3 Min(Vector3 value1, Vector3 value2)
381 { 381 {
382 return new Vector3( 382 return new Vector3(
383 MathHelper.Min(value1.X, value2.X), 383 MathHelper.Min(value1.X, value2.X),
384 MathHelper.Min(value1.Y, value2.Y), 384 MathHelper.Min(value1.Y, value2.Y),
385 MathHelper.Min(value1.Z, value2.Z)); 385 MathHelper.Min(value1.Z, value2.Z));
386 }*/ 386 }*/
387 387
388 /*public static void Min(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 388 /*public static void Min(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
389 { 389 {
390 result = new Vector3( 390 result = new Vector3(
391 MathHelper.Min(value1.X, value2.X), 391 MathHelper.Min(value1.X, value2.X),
392 MathHelper.Min(value1.Y, value2.Y), 392 MathHelper.Min(value1.Y, value2.Y),
393 MathHelper.Min(value1.Z, value2.Z)); 393 MathHelper.Min(value1.Z, value2.Z));
394 }*/ 394 }*/
395 395
396 public static Vector3 Multiply(Vector3 value1, Vector3 value2) 396 public static Vector3 Multiply(Vector3 value1, Vector3 value2)
397 { 397 {
398 value1.X *= value2.X; 398 value1.X *= value2.X;
399 value1.Y *= value2.Y; 399 value1.Y *= value2.Y;
400 value1.Z *= value2.Z; 400 value1.Z *= value2.Z;
401 return value1; 401 return value1;
402 } 402 }
403 403
404 public static Vector3 Multiply(Vector3 value1, float scaleFactor) 404 public static Vector3 Multiply(Vector3 value1, float scaleFactor)
405 { 405 {
406 value1.X *= scaleFactor; 406 value1.X *= scaleFactor;
407 value1.Y *= scaleFactor; 407 value1.Y *= scaleFactor;
408 value1.Z *= scaleFactor; 408 value1.Z *= scaleFactor;
409 return value1; 409 return value1;
410 } 410 }
411 411
412 public static void Multiply(ref Vector3 value1, float scaleFactor, out Vector3 result) 412 public static void Multiply(ref Vector3 value1, float scaleFactor, out Vector3 result)
413 { 413 {
414 result.X = value1.X * scaleFactor; 414 result.X = value1.X * scaleFactor;
415 result.Y = value1.Y * scaleFactor; 415 result.Y = value1.Y * scaleFactor;
416 result.Z = value1.Z * scaleFactor; 416 result.Z = value1.Z * scaleFactor;
417 } 417 }
418 418
419 public static void Multiply(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 419 public static void Multiply(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
420 { 420 {
421 result.X = value1.X * value2.X; 421 result.X = value1.X * value2.X;
422 result.Y = value1.Y * value2.Y; 422 result.Y = value1.Y * value2.Y;
423 result.Z = value1.Z * value2.Z; 423 result.Z = value1.Z * value2.Z;
424 } 424 }
425 425
426 public static Vector3 Negate(Vector3 value) 426 public static Vector3 Negate(Vector3 value)
427 { 427 {
428 value = new Vector3(-value.X, -value.Y, -value.Z); 428 value = new Vector3(-value.X, -value.Y, -value.Z);
429 return value; 429 return value;
430 } 430 }
431 431
432 public static void Negate(ref Vector3 value, out Vector3 result) 432 public static void Negate(ref Vector3 value, out Vector3 result)
433 { 433 {
434 result = new Vector3(-value.X, -value.Y, -value.Z); 434 result = new Vector3(-value.X, -value.Y, -value.Z);
435 } 435 }
436 436
437 public void Normalize() 437 public void Normalize()
438 { 438 {
439 Normalize(ref this, out this); 439 Normalize(ref this, out this);
440 } 440 }
441 441
442 public static Vector3 Normalize(Vector3 vector) 442 public static Vector3 Normalize(Vector3 vector)
443 { 443 {
444 Normalize(ref vector, out vector); 444 Normalize(ref vector, out vector);
445 return vector; 445 return vector;
446 } 446 }
447 447
448 public static void Normalize(ref Vector3 value, out Vector3 result) 448 public static void Normalize(ref Vector3 value, out Vector3 result)
449 { 449 {
450 float factor; 450 float factor;
451 Distance(ref value, ref zero, out factor); 451 Distance(ref value, ref zero, out factor);
452 factor = 1f / factor; 452 factor = 1f / factor;
453 result.X = value.X * factor; 453 result.X = value.X * factor;
454 result.Y = value.Y * factor; 454 result.Y = value.Y * factor;
455 result.Z = value.Z * factor; 455 result.Z = value.Z * factor;
456 } 456 }
457 457
458 public static Vector3 Reflect(Vector3 vector, Vector3 normal) 458 public static Vector3 Reflect(Vector3 vector, Vector3 normal)
459 { 459 {
460 throw new NotImplementedException(); 460 throw new NotImplementedException();
461 } 461 }
462 462
463 public static void Reflect(ref Vector3 vector, ref Vector3 normal, out Vector3 result) 463 public static void Reflect(ref Vector3 vector, ref Vector3 normal, out Vector3 result)
464 { 464 {
465 throw new NotImplementedException(); 465 throw new NotImplementedException();
466 } 466 }
467 467
468 /*public static Vector3 SmoothStep(Vector3 value1, Vector3 value2, float amount) 468 /*public static Vector3 SmoothStep(Vector3 value1, Vector3 value2, float amount)
469 { 469 {
470 return new Vector3( 470 return new Vector3(
471 MathHelper.SmoothStep(value1.X, value2.X, amount), 471 MathHelper.SmoothStep(value1.X, value2.X, amount),
472 MathHelper.SmoothStep(value1.Y, value2.Y, amount), 472 MathHelper.SmoothStep(value1.Y, value2.Y, amount),
473 MathHelper.SmoothStep(value1.Z, value2.Z, amount)); 473 MathHelper.SmoothStep(value1.Z, value2.Z, amount));
474 }*/ 474 }*/
475 475
476 /*public static void SmoothStep(ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result) 476 /*public static void SmoothStep(ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result)
477 { 477 {
478 result = new Vector3( 478 result = new Vector3(
479 MathHelper.SmoothStep(value1.X, value2.X, amount), 479 MathHelper.SmoothStep(value1.X, value2.X, amount),
480 MathHelper.SmoothStep(value1.Y, value2.Y, amount), 480 MathHelper.SmoothStep(value1.Y, value2.Y, amount),
481 MathHelper.SmoothStep(value1.Z, value2.Z, amount)); 481 MathHelper.SmoothStep(value1.Z, value2.Z, amount));
482 }*/ 482 }*/
483 483
484 public static Vector3 Subtract(Vector3 value1, Vector3 value2) 484 public static Vector3 Subtract(Vector3 value1, Vector3 value2)
485 { 485 {
486 value1.X -= value2.X; 486 value1.X -= value2.X;
487 value1.Y -= value2.Y; 487 value1.Y -= value2.Y;
488 value1.Z -= value2.Z; 488 value1.Z -= value2.Z;
489 return value1; 489 return value1;
490 } 490 }
491 491
492 public static void Subtract(ref Vector3 value1, ref Vector3 value2, out Vector3 result) 492 public static void Subtract(ref Vector3 value1, ref Vector3 value2, out Vector3 result)
493 { 493 {
494 result.X = value1.X - value2.X; 494 result.X = value1.X - value2.X;
495 result.Y = value1.Y - value2.Y; 495 result.Y = value1.Y - value2.Y;
496 result.Z = value1.Z - value2.Z; 496 result.Z = value1.Z - value2.Z;
497 } 497 }
498 498
499 public override string ToString() 499 public override string ToString()
500 { 500 {
501 StringBuilder sb = new StringBuilder(32); 501 StringBuilder sb = new StringBuilder(32);
502 sb.Append("{X:"); 502 sb.Append("{X:");
503 sb.Append(this.X); 503 sb.Append(this.X);
504 sb.Append(" Y:"); 504 sb.Append(" Y:");
505 sb.Append(this.Y); 505 sb.Append(this.Y);
506 sb.Append(" Z:"); 506 sb.Append(" Z:");
507 sb.Append(this.Z); 507 sb.Append(this.Z);
508 sb.Append("}"); 508 sb.Append("}");
509 return sb.ToString(); 509 return sb.ToString();
510 } 510 }
511 511
512 public static Vector3 Transform(Vector3 position, Matrix matrix) 512 public static Vector3 Transform(Vector3 position, Matrix matrix)
513 { 513 {
514 Transform(ref position, ref matrix, out position); 514 Transform(ref position, ref matrix, out position);
515 return position; 515 return position;
516 } 516 }
517 517
518 public static void Transform(ref Vector3 position, ref Matrix matrix, out Vector3 result) 518 public static void Transform(ref Vector3 position, ref Matrix matrix, out Vector3 result)
519 { 519 {
520 result = new Vector3((position.X * matrix.M11) + (position.Y * matrix.M21) + (position.Z * matrix.M31) + matrix.M41, 520 result = new Vector3((position.X * matrix.M11) + (position.Y * matrix.M21) + (position.Z * matrix.M31) + matrix.M41,
521 (position.X * matrix.M12) + (position.Y * matrix.M22) + (position.Z * matrix.M32) + matrix.M42, 521 (position.X * matrix.M12) + (position.Y * matrix.M22) + (position.Z * matrix.M32) + matrix.M42,
522 (position.X * matrix.M13) + (position.Y * matrix.M23) + (position.Z * matrix.M33) + matrix.M43); 522 (position.X * matrix.M13) + (position.Y * matrix.M23) + (position.Z * matrix.M33) + matrix.M43);
523 } 523 }
524 524
525 public static Vector3 TransformNormal(Vector3 normal, Matrix matrix) 525 public static Vector3 TransformNormal(Vector3 normal, Matrix matrix)
526 { 526 {
527 TransformNormal(ref normal, ref matrix, out normal); 527 TransformNormal(ref normal, ref matrix, out normal);
528 return normal; 528 return normal;
529 } 529 }
530 530
531 public static void TransformNormal(ref Vector3 normal, ref Matrix matrix, out Vector3 result) 531 public static void TransformNormal(ref Vector3 normal, ref Matrix matrix, out Vector3 result)
532 { 532 {
533 result = new Vector3((normal.X * matrix.M11) + (normal.Y * matrix.M21) + (normal.Z * matrix.M31), 533 result = new Vector3((normal.X * matrix.M11) + (normal.Y * matrix.M21) + (normal.Z * matrix.M31),
534 (normal.X * matrix.M12) + (normal.Y * matrix.M22) + (normal.Z * matrix.M32), 534 (normal.X * matrix.M12) + (normal.Y * matrix.M22) + (normal.Z * matrix.M32),
535 (normal.X * matrix.M13) + (normal.Y * matrix.M23) + (normal.Z * matrix.M33)); 535 (normal.X * matrix.M13) + (normal.Y * matrix.M23) + (normal.Z * matrix.M33));
536 } 536 }
537 537
538 #endregion Public methods 538 #endregion Public methods
539 539
540 540
541 #region Operators 541 #region Operators
542 542
543 public static bool operator ==(Vector3 value1, Vector3 value2) 543 public static bool operator ==(Vector3 value1, Vector3 value2)
544 { 544 {
545 return value1.X == value2.X 545 return value1.X == value2.X
546 && value1.Y == value2.Y 546 && value1.Y == value2.Y
547 && value1.Z == value2.Z; 547 && value1.Z == value2.Z;
548 } 548 }
549 549
550 public static bool operator !=(Vector3 value1, Vector3 value2) 550 public static bool operator !=(Vector3 value1, Vector3 value2)
551 { 551 {
552 return !(value1 == value2); 552 return !(value1 == value2);
553 } 553 }
554 554
555 public static Vector3 operator +(Vector3 value1, Vector3 value2) 555 public static Vector3 operator +(Vector3 value1, Vector3 value2)
556 { 556 {
557 value1.X += value2.X; 557 value1.X += value2.X;
558 value1.Y += value2.Y; 558 value1.Y += value2.Y;
559 value1.Z += value2.Z; 559 value1.Z += value2.Z;
560 return value1; 560 return value1;
561 } 561 }
562 562
563 public static Vector3 operator -(Vector3 value) 563 public static Vector3 operator -(Vector3 value)
564 { 564 {
565 value = new Vector3(-value.X, -value.Y, -value.Z); 565 value = new Vector3(-value.X, -value.Y, -value.Z);
566 return value; 566 return value;
567 } 567 }
568 568
569 public static Vector3 operator -(Vector3 value1, Vector3 value2) 569 public static Vector3 operator -(Vector3 value1, Vector3 value2)
570 { 570 {
571 value1.X -= value2.X; 571 value1.X -= value2.X;
572 value1.Y -= value2.Y; 572 value1.Y -= value2.Y;
573 value1.Z -= value2.Z; 573 value1.Z -= value2.Z;
574 return value1; 574 return value1;
575 } 575 }
576 576
577 public static Vector3 operator *(Vector3 value1, Vector3 value2) 577 public static Vector3 operator *(Vector3 value1, Vector3 value2)
578 { 578 {
579 value1.X *= value2.X; 579 value1.X *= value2.X;
580 value1.Y *= value2.Y; 580 value1.Y *= value2.Y;
581 value1.Z *= value2.Z; 581 value1.Z *= value2.Z;
582 return value1; 582 return value1;
583 } 583 }
584 584
585 public static Vector3 operator *(Vector3 value, float scaleFactor) 585 public static Vector3 operator *(Vector3 value, float scaleFactor)
586 { 586 {
587 value.X *= scaleFactor; 587 value.X *= scaleFactor;
588 value.Y *= scaleFactor; 588 value.Y *= scaleFactor;
589 value.Z *= scaleFactor; 589 value.Z *= scaleFactor;
590 return value; 590 return value;
591 } 591 }
592 592
593 public static Vector3 operator *(float scaleFactor, Vector3 value) 593 public static Vector3 operator *(float scaleFactor, Vector3 value)
594 { 594 {
595 value.X *= scaleFactor; 595 value.X *= scaleFactor;
596 value.Y *= scaleFactor; 596 value.Y *= scaleFactor;
597 value.Z *= scaleFactor; 597 value.Z *= scaleFactor;
598 return value; 598 return value;
599 } 599 }
600 600
601 public static Vector3 operator /(Vector3 value1, Vector3 value2) 601 public static Vector3 operator /(Vector3 value1, Vector3 value2)
602 { 602 {
603 value1.X /= value2.X; 603 value1.X /= value2.X;
604 value1.Y /= value2.Y; 604 value1.Y /= value2.Y;
605 value1.Z /= value2.Z; 605 value1.Z /= value2.Z;
606 return value1; 606 return value1;
607 } 607 }
608 608
609 public static Vector3 operator /(Vector3 value, float divider) 609 public static Vector3 operator /(Vector3 value, float divider)
610 { 610 {
611 float factor = 1 / divider; 611 float factor = 1 / divider;
612 value.X *= factor; 612 value.X *= factor;
613 value.Y *= factor; 613 value.Y *= factor;
614 value.Z *= factor; 614 value.Z *= factor;
615 return value; 615 return value;
616 } 616 }
617 617
618 #endregion 618 #endregion
619 } 619 }
620} 620}
diff --git a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector4.cs b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector4.cs
index c75b7c8..abb30a8 100644
--- a/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector4.cs
+++ b/libraries/ModifiedBulletX/MonoXnaCompactMaths/Vector4.cs
@@ -1,630 +1,630 @@
1#region License 1#region License
2/* 2/*
3MIT License 3MIT License
4Copyright © 2006 The Mono.Xna Team 4Copyright © 2006 The Mono.Xna Team
5 5
6All rights reserved. 6All rights reserved.
7 7
8Permission is hereby granted, free of charge, to any person obtaining a copy 8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal 9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights 10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is 12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions: 13furnished to do so, subject to the following conditions:
14 14
15The above copyright notice and this permission notice shall be included in all 15The above copyright notice and this permission notice shall be included in all
16copies or substantial portions of the Software. 16copies or substantial portions of the Software.
17 17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24SOFTWARE. 24SOFTWARE.
25*/ 25*/
26#endregion License 26#endregion License
27 27
28using System; 28using System;
29using System.ComponentModel; 29using System.ComponentModel;
30using System.Text; 30using System.Text;
31using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32 32
33namespace MonoXnaCompactMaths 33namespace MonoXnaCompactMaths
34{ 34{
35 [Serializable] 35 [Serializable]
36 [StructLayout(LayoutKind.Sequential)] 36 [StructLayout(LayoutKind.Sequential)]
37 //[TypeConverter(typeof(Vector4Converter))] 37 //[TypeConverter(typeof(Vector4Converter))]
38 public struct Vector4 : IEquatable<Vector4> 38 public struct Vector4 : IEquatable<Vector4>
39 { 39 {
40 #region Private Fields 40 #region Private Fields
41 41
42 private static Vector4 zeroVector = new Vector4(); 42 private static Vector4 zeroVector = new Vector4();
43 private static Vector4 unitVector = new Vector4(1f, 1f, 1f, 1f); 43 private static Vector4 unitVector = new Vector4(1f, 1f, 1f, 1f);
44 private static Vector4 unitXVector = new Vector4(1f, 0f, 0f, 0f); 44 private static Vector4 unitXVector = new Vector4(1f, 0f, 0f, 0f);
45 private static Vector4 unitYVector = new Vector4(0f, 1f, 0f, 0f); 45 private static Vector4 unitYVector = new Vector4(0f, 1f, 0f, 0f);
46 private static Vector4 unitZVector = new Vector4(0f, 0f, 1f, 0f); 46 private static Vector4 unitZVector = new Vector4(0f, 0f, 1f, 0f);
47 private static Vector4 unitWVector = new Vector4(0f, 0f, 0f, 1f); 47 private static Vector4 unitWVector = new Vector4(0f, 0f, 0f, 1f);
48 48
49 #endregion Private Fields 49 #endregion Private Fields
50 50
51 51
52 #region Public Fields 52 #region Public Fields
53 53
54 public float X; 54 public float X;
55 public float Y; 55 public float Y;
56 public float Z; 56 public float Z;
57 public float W; 57 public float W;
58 58
59 #endregion Public Fields 59 #endregion Public Fields
60 60
61 61
62 #region Properties 62 #region Properties
63 63
64 public static Vector4 Zero 64 public static Vector4 Zero
65 { 65 {
66 get { return zeroVector; } 66 get { return zeroVector; }
67 } 67 }
68 68
69 public static Vector4 One 69 public static Vector4 One
70 { 70 {
71 get { return unitVector; } 71 get { return unitVector; }
72 } 72 }
73 73
74 public static Vector4 UnitX 74 public static Vector4 UnitX
75 { 75 {
76 get { return unitXVector; } 76 get { return unitXVector; }
77 } 77 }
78 78
79 public static Vector4 UnitY 79 public static Vector4 UnitY
80 { 80 {
81 get { return unitYVector; } 81 get { return unitYVector; }
82 } 82 }
83 83
84 public static Vector4 UnitZ 84 public static Vector4 UnitZ
85 { 85 {
86 get { return unitZVector; } 86 get { return unitZVector; }
87 } 87 }
88 88
89 public static Vector4 UnitW 89 public static Vector4 UnitW
90 { 90 {
91 get { return unitWVector; } 91 get { return unitWVector; }
92 } 92 }
93 93
94 #endregion Properties 94 #endregion Properties
95 95
96 96
97 #region Constructors 97 #region Constructors
98 98
99 public Vector4(float x, float y, float z, float w) 99 public Vector4(float x, float y, float z, float w)
100 { 100 {
101 this.X = x; 101 this.X = x;
102 this.Y = y; 102 this.Y = y;
103 this.Z = z; 103 this.Z = z;
104 this.W = w; 104 this.W = w;
105 } 105 }
106 106
107 /*public Vector4(Vector2 value, float z, float w) 107 /*public Vector4(Vector2 value, float z, float w)
108 { 108 {
109 this.X = value.X; 109 this.X = value.X;
110 this.Y = value.Y; 110 this.Y = value.Y;
111 this.Z = z; 111 this.Z = z;
112 this.W = w; 112 this.W = w;
113 }*/ 113 }*/
114 114
115 public Vector4(Vector3 value, float w) 115 public Vector4(Vector3 value, float w)
116 { 116 {
117 this.X = value.X; 117 this.X = value.X;
118 this.Y = value.Y; 118 this.Y = value.Y;
119 this.Z = value.Z; 119 this.Z = value.Z;
120 this.W = w; 120 this.W = w;
121 } 121 }
122 122
123 public Vector4(float value) 123 public Vector4(float value)
124 { 124 {
125 this.X = value; 125 this.X = value;
126 this.Y = value; 126 this.Y = value;
127 this.Z = value; 127 this.Z = value;
128 this.W = value; 128 this.W = value;
129 } 129 }
130 130
131 #endregion 131 #endregion
132 132
133 133
134 #region Public Methods 134 #region Public Methods
135 135
136 public static Vector4 Add(Vector4 value1, Vector4 value2) 136 public static Vector4 Add(Vector4 value1, Vector4 value2)
137 { 137 {
138 value1.W += value2.W; 138 value1.W += value2.W;
139 value1.X += value2.X; 139 value1.X += value2.X;
140 value1.Y += value2.Y; 140 value1.Y += value2.Y;
141 value1.Z += value2.Z; 141 value1.Z += value2.Z;
142 return value1; 142 return value1;
143 } 143 }
144 144
145 public static void Add(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 145 public static void Add(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
146 { 146 {
147 result.W = value1.W + value2.W; 147 result.W = value1.W + value2.W;
148 result.X = value1.X + value2.X; 148 result.X = value1.X + value2.X;
149 result.Y = value1.Y + value2.Y; 149 result.Y = value1.Y + value2.Y;
150 result.Z = value1.Z + value2.Z; 150 result.Z = value1.Z + value2.Z;
151 } 151 }
152 152
153 /*public static Vector4 Barycentric(Vector4 value1, Vector4 value2, Vector4 value3, float amount1, float amount2) 153 /*public static Vector4 Barycentric(Vector4 value1, Vector4 value2, Vector4 value3, float amount1, float amount2)
154 { 154 {
155 return new Vector4( 155 return new Vector4(
156 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2), 156 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),
157 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2), 157 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2),
158 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2), 158 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2),
159 MathHelper.Barycentric(value1.W, value2.W, value3.W, amount1, amount2)); 159 MathHelper.Barycentric(value1.W, value2.W, value3.W, amount1, amount2));
160 }*/ 160 }*/
161 161
162 /*public static void Barycentric(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, float amount1, float amount2, out Vector4 result) 162 /*public static void Barycentric(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, float amount1, float amount2, out Vector4 result)
163 { 163 {
164 result = new Vector4( 164 result = new Vector4(
165 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2), 165 MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),
166 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2), 166 MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2),
167 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2), 167 MathHelper.Barycentric(value1.Z, value2.Z, value3.Z, amount1, amount2),
168 MathHelper.Barycentric(value1.W, value2.W, value3.W, amount1, amount2)); 168 MathHelper.Barycentric(value1.W, value2.W, value3.W, amount1, amount2));
169 }*/ 169 }*/
170 170
171 /*public static Vector4 CatmullRom(Vector4 value1, Vector4 value2, Vector4 value3, Vector4 value4, float amount) 171 /*public static Vector4 CatmullRom(Vector4 value1, Vector4 value2, Vector4 value3, Vector4 value4, float amount)
172 { 172 {
173 return new Vector4( 173 return new Vector4(
174 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount), 174 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),
175 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount), 175 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount),
176 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount), 176 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount),
177 MathHelper.CatmullRom(value1.W, value2.W, value3.W, value4.W, amount)); 177 MathHelper.CatmullRom(value1.W, value2.W, value3.W, value4.W, amount));
178 }*/ 178 }*/
179 179
180 /*public static void CatmullRom(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, ref Vector4 value4, float amount, out Vector4 result) 180 /*public static void CatmullRom(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, ref Vector4 value4, float amount, out Vector4 result)
181 { 181 {
182 result = new Vector4( 182 result = new Vector4(
183 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount), 183 MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),
184 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount), 184 MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount),
185 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount), 185 MathHelper.CatmullRom(value1.Z, value2.Z, value3.Z, value4.Z, amount),
186 MathHelper.CatmullRom(value1.W, value2.W, value3.W, value4.W, amount)); 186 MathHelper.CatmullRom(value1.W, value2.W, value3.W, value4.W, amount));
187 }*/ 187 }*/
188 188
189 /*public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max) 189 /*public static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max)
190 { 190 {
191 return new Vector4( 191 return new Vector4(
192 MathHelper.Clamp(value1.X, min.X, max.X), 192 MathHelper.Clamp(value1.X, min.X, max.X),
193 MathHelper.Clamp(value1.Y, min.Y, max.Y), 193 MathHelper.Clamp(value1.Y, min.Y, max.Y),
194 MathHelper.Clamp(value1.Z, min.Z, max.Z), 194 MathHelper.Clamp(value1.Z, min.Z, max.Z),
195 MathHelper.Clamp(value1.W, min.W, max.W)); 195 MathHelper.Clamp(value1.W, min.W, max.W));
196 }*/ 196 }*/
197 197
198 /*public static void Clamp(ref Vector4 value1, ref Vector4 min, ref Vector4 max, out Vector4 result) 198 /*public static void Clamp(ref Vector4 value1, ref Vector4 min, ref Vector4 max, out Vector4 result)
199 { 199 {
200 result = new Vector4( 200 result = new Vector4(
201 MathHelper.Clamp(value1.X, min.X, max.X), 201 MathHelper.Clamp(value1.X, min.X, max.X),
202 MathHelper.Clamp(value1.Y, min.Y, max.Y), 202 MathHelper.Clamp(value1.Y, min.Y, max.Y),
203 MathHelper.Clamp(value1.Z, min.Z, max.Z), 203 MathHelper.Clamp(value1.Z, min.Z, max.Z),
204 MathHelper.Clamp(value1.W, min.W, max.W)); 204 MathHelper.Clamp(value1.W, min.W, max.W));
205 }*/ 205 }*/
206 206
207 public static float Distance(Vector4 value1, Vector4 value2) 207 public static float Distance(Vector4 value1, Vector4 value2)
208 { 208 {
209 return (float)Math.Sqrt(DistanceSquared(value1, value2)); 209 return (float)Math.Sqrt(DistanceSquared(value1, value2));
210 } 210 }
211 211
212 public static void Distance(ref Vector4 value1, ref Vector4 value2, out float result) 212 public static void Distance(ref Vector4 value1, ref Vector4 value2, out float result)
213 { 213 {
214 result = (float)Math.Sqrt(DistanceSquared(value1, value2)); 214 result = (float)Math.Sqrt(DistanceSquared(value1, value2));
215 } 215 }
216 216
217 public static float DistanceSquared(Vector4 value1, Vector4 value2) 217 public static float DistanceSquared(Vector4 value1, Vector4 value2)
218 { 218 {
219 float result; 219 float result;
220 DistanceSquared(ref value1, ref value2, out result); 220 DistanceSquared(ref value1, ref value2, out result);
221 return result; 221 return result;
222 } 222 }
223 223
224 public static void DistanceSquared(ref Vector4 value1, ref Vector4 value2, out float result) 224 public static void DistanceSquared(ref Vector4 value1, ref Vector4 value2, out float result)
225 { 225 {
226 result = (value1.W - value2.W) * (value1.W - value2.W) + 226 result = (value1.W - value2.W) * (value1.W - value2.W) +
227 (value1.X - value2.X) * (value1.X - value2.X) + 227 (value1.X - value2.X) * (value1.X - value2.X) +
228 (value1.Y - value2.Y) * (value1.Y - value2.Y) + 228 (value1.Y - value2.Y) * (value1.Y - value2.Y) +
229 (value1.Z - value2.Z) * (value1.Z - value2.Z); 229 (value1.Z - value2.Z) * (value1.Z - value2.Z);
230 } 230 }
231 231
232 public static Vector4 Divide(Vector4 value1, Vector4 value2) 232 public static Vector4 Divide(Vector4 value1, Vector4 value2)
233 { 233 {
234 value1.W /= value2.W; 234 value1.W /= value2.W;
235 value1.X /= value2.X; 235 value1.X /= value2.X;
236 value1.Y /= value2.Y; 236 value1.Y /= value2.Y;
237 value1.Z /= value2.Z; 237 value1.Z /= value2.Z;
238 return value1; 238 return value1;
239 } 239 }
240 240
241 public static Vector4 Divide(Vector4 value1, float divider) 241 public static Vector4 Divide(Vector4 value1, float divider)
242 { 242 {
243 float factor = 1f / divider; 243 float factor = 1f / divider;
244 value1.W *= factor; 244 value1.W *= factor;
245 value1.X *= factor; 245 value1.X *= factor;
246 value1.Y *= factor; 246 value1.Y *= factor;
247 value1.Z *= factor; 247 value1.Z *= factor;
248 return value1; 248 return value1;
249 } 249 }
250 250
251 public static void Divide(ref Vector4 value1, float divider, out Vector4 result) 251 public static void Divide(ref Vector4 value1, float divider, out Vector4 result)
252 { 252 {
253 float factor = 1f / divider; 253 float factor = 1f / divider;
254 result.W = value1.W * factor; 254 result.W = value1.W * factor;
255 result.X = value1.X * factor; 255 result.X = value1.X * factor;
256 result.Y = value1.Y * factor; 256 result.Y = value1.Y * factor;
257 result.Z = value1.Z * factor; 257 result.Z = value1.Z * factor;
258 } 258 }
259 259
260 public static void Divide(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 260 public static void Divide(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
261 { 261 {
262 result.W = value1.W / value2.W; 262 result.W = value1.W / value2.W;
263 result.X = value1.X / value2.X; 263 result.X = value1.X / value2.X;
264 result.Y = value1.Y / value2.Y; 264 result.Y = value1.Y / value2.Y;
265 result.Z = value1.Z / value2.Z; 265 result.Z = value1.Z / value2.Z;
266 } 266 }
267 267
268 public static float Dot(Vector4 vector1, Vector4 vector2) 268 public static float Dot(Vector4 vector1, Vector4 vector2)
269 { 269 {
270 return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.W; 270 return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.W;
271 } 271 }
272 272
273 public static void Dot(ref Vector4 vector1, ref Vector4 vector2, out float result) 273 public static void Dot(ref Vector4 vector1, ref Vector4 vector2, out float result)
274 { 274 {
275 result = vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.W; 275 result = vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.W;
276 } 276 }
277 277
278 public override bool Equals(object obj) 278 public override bool Equals(object obj)
279 { 279 {
280 return (obj is Vector4) ? this == (Vector4)obj : false; 280 return (obj is Vector4) ? this == (Vector4)obj : false;
281 } 281 }
282 282
283 public bool Equals(Vector4 other) 283 public bool Equals(Vector4 other)
284 { 284 {
285 return this.W == other.W 285 return this.W == other.W
286 && this.X == other.X 286 && this.X == other.X
287 && this.Y == other.Y 287 && this.Y == other.Y
288 && this.Z == other.Z; 288 && this.Z == other.Z;
289 } 289 }
290 290
291 public override int GetHashCode() 291 public override int GetHashCode()
292 { 292 {
293 return (int)(this.W + this.X + this.Y + this.Y); 293 return (int)(this.W + this.X + this.Y + this.Y);
294 } 294 }
295 295
296 /*public static Vector4 Hermite(Vector4 value1, Vector4 tangent1, Vector4 value2, Vector4 tangent2, float amount) 296 /*public static Vector4 Hermite(Vector4 value1, Vector4 tangent1, Vector4 value2, Vector4 tangent2, float amount)
297 { 297 {
298 Vector4 result = new Vector4(); 298 Vector4 result = new Vector4();
299 Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result); 299 Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result);
300 return result; 300 return result;
301 }*/ 301 }*/
302 302
303 /*public static void Hermite(ref Vector4 value1, ref Vector4 tangent1, ref Vector4 value2, ref Vector4 tangent2, float amount, out Vector4 result) 303 /*public static void Hermite(ref Vector4 value1, ref Vector4 tangent1, ref Vector4 value2, ref Vector4 tangent2, float amount, out Vector4 result)
304 { 304 {
305 result.W = MathHelper.Hermite(value1.W, tangent1.W, value2.W, tangent2.W, amount); 305 result.W = MathHelper.Hermite(value1.W, tangent1.W, value2.W, tangent2.W, amount);
306 result.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount); 306 result.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount);
307 result.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount); 307 result.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount);
308 result.Z = MathHelper.Hermite(value1.Z, tangent1.Z, value2.Z, tangent2.Z, amount); 308 result.Z = MathHelper.Hermite(value1.Z, tangent1.Z, value2.Z, tangent2.Z, amount);
309 }*/ 309 }*/
310 310
311 public float Length() 311 public float Length()
312 { 312 {
313 float result; 313 float result;
314 DistanceSquared(ref this, ref zeroVector, out result); 314 DistanceSquared(ref this, ref zeroVector, out result);
315 return (float)Math.Sqrt(result); 315 return (float)Math.Sqrt(result);
316 } 316 }
317 317
318 public float LengthSquared() 318 public float LengthSquared()
319 { 319 {
320 float result; 320 float result;
321 DistanceSquared(ref this, ref zeroVector, out result); 321 DistanceSquared(ref this, ref zeroVector, out result);
322 return result; 322 return result;
323 } 323 }
324 324
325 /*public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount) 325 /*public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
326 { 326 {
327 return new Vector4( 327 return new Vector4(
328 MathHelper.Lerp(value1.X, value2.X, amount), 328 MathHelper.Lerp(value1.X, value2.X, amount),
329 MathHelper.Lerp(value1.Y, value2.Y, amount), 329 MathHelper.Lerp(value1.Y, value2.Y, amount),
330 MathHelper.Lerp(value1.Z, value2.Z, amount), 330 MathHelper.Lerp(value1.Z, value2.Z, amount),
331 MathHelper.Lerp(value1.W, value2.W, amount)); 331 MathHelper.Lerp(value1.W, value2.W, amount));
332 }*/ 332 }*/
333 333
334 /*public static void Lerp(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result) 334 /*public static void Lerp(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
335 { 335 {
336 result = new Vector4( 336 result = new Vector4(
337 MathHelper.Lerp(value1.X, value2.X, amount), 337 MathHelper.Lerp(value1.X, value2.X, amount),
338 MathHelper.Lerp(value1.Y, value2.Y, amount), 338 MathHelper.Lerp(value1.Y, value2.Y, amount),
339 MathHelper.Lerp(value1.Z, value2.Z, amount), 339 MathHelper.Lerp(value1.Z, value2.Z, amount),
340 MathHelper.Lerp(value1.W, value2.W, amount)); 340 MathHelper.Lerp(value1.W, value2.W, amount));
341 }*/ 341 }*/
342 342
343 /*public static Vector4 Max(Vector4 value1, Vector4 value2) 343 /*public static Vector4 Max(Vector4 value1, Vector4 value2)
344 { 344 {
345 return new Vector4( 345 return new Vector4(
346 MathHelper.Max(value1.X, value2.X), 346 MathHelper.Max(value1.X, value2.X),
347 MathHelper.Max(value1.Y, value2.Y), 347 MathHelper.Max(value1.Y, value2.Y),
348 MathHelper.Max(value1.Z, value2.Z), 348 MathHelper.Max(value1.Z, value2.Z),
349 MathHelper.Max(value1.W, value2.W)); 349 MathHelper.Max(value1.W, value2.W));
350 }*/ 350 }*/
351 351
352 /*public static void Max(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 352 /*public static void Max(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
353 { 353 {
354 result = new Vector4( 354 result = new Vector4(
355 MathHelper.Max(value1.X, value2.X), 355 MathHelper.Max(value1.X, value2.X),
356 MathHelper.Max(value1.Y, value2.Y), 356 MathHelper.Max(value1.Y, value2.Y),
357 MathHelper.Max(value1.Z, value2.Z), 357 MathHelper.Max(value1.Z, value2.Z),
358 MathHelper.Max(value1.W, value2.W)); 358 MathHelper.Max(value1.W, value2.W));
359 }*/ 359 }*/
360 360
361 /*public static Vector4 Min(Vector4 value1, Vector4 value2) 361 /*public static Vector4 Min(Vector4 value1, Vector4 value2)
362 { 362 {
363 return new Vector4( 363 return new Vector4(
364 MathHelper.Min(value1.X, value2.X), 364 MathHelper.Min(value1.X, value2.X),
365 MathHelper.Min(value1.Y, value2.Y), 365 MathHelper.Min(value1.Y, value2.Y),
366 MathHelper.Min(value1.Z, value2.Z), 366 MathHelper.Min(value1.Z, value2.Z),
367 MathHelper.Min(value1.W, value2.W)); 367 MathHelper.Min(value1.W, value2.W));
368 }*/ 368 }*/
369 369
370 /*public static void Min(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 370 /*public static void Min(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
371 { 371 {
372 result = new Vector4( 372 result = new Vector4(
373 MathHelper.Min(value1.X, value2.X), 373 MathHelper.Min(value1.X, value2.X),
374 MathHelper.Min(value1.Y, value2.Y), 374 MathHelper.Min(value1.Y, value2.Y),
375 MathHelper.Min(value1.Z, value2.Z), 375 MathHelper.Min(value1.Z, value2.Z),
376 MathHelper.Min(value1.W, value2.W)); 376 MathHelper.Min(value1.W, value2.W));
377 }*/ 377 }*/
378 378
379 public static Vector4 Multiply(Vector4 value1, Vector4 value2) 379 public static Vector4 Multiply(Vector4 value1, Vector4 value2)
380 { 380 {
381 value1.W *= value2.W; 381 value1.W *= value2.W;
382 value1.X *= value2.X; 382 value1.X *= value2.X;
383 value1.Y *= value2.Y; 383 value1.Y *= value2.Y;
384 value1.Z *= value2.Z; 384 value1.Z *= value2.Z;
385 return value1; 385 return value1;
386 } 386 }
387 387
388 public static Vector4 Multiply(Vector4 value1, float scaleFactor) 388 public static Vector4 Multiply(Vector4 value1, float scaleFactor)
389 { 389 {
390 value1.W *= scaleFactor; 390 value1.W *= scaleFactor;
391 value1.X *= scaleFactor; 391 value1.X *= scaleFactor;
392 value1.Y *= scaleFactor; 392 value1.Y *= scaleFactor;
393 value1.Z *= scaleFactor; 393 value1.Z *= scaleFactor;
394 return value1; 394 return value1;
395 } 395 }
396 396
397 public static void Multiply(ref Vector4 value1, float scaleFactor, out Vector4 result) 397 public static void Multiply(ref Vector4 value1, float scaleFactor, out Vector4 result)
398 { 398 {
399 result.W = value1.W * scaleFactor; 399 result.W = value1.W * scaleFactor;
400 result.X = value1.X * scaleFactor; 400 result.X = value1.X * scaleFactor;
401 result.Y = value1.Y * scaleFactor; 401 result.Y = value1.Y * scaleFactor;
402 result.Z = value1.Z * scaleFactor; 402 result.Z = value1.Z * scaleFactor;
403 } 403 }
404 404
405 public static void Multiply(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 405 public static void Multiply(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
406 { 406 {
407 result.W = value1.W * value2.W; 407 result.W = value1.W * value2.W;
408 result.X = value1.X * value2.X; 408 result.X = value1.X * value2.X;
409 result.Y = value1.Y * value2.Y; 409 result.Y = value1.Y * value2.Y;
410 result.Z = value1.Z * value2.Z; 410 result.Z = value1.Z * value2.Z;
411 } 411 }
412 412
413 public static Vector4 Negate(Vector4 value) 413 public static Vector4 Negate(Vector4 value)
414 { 414 {
415 value = new Vector4(-value.X, -value.Y, -value.Z, -value.W); 415 value = new Vector4(-value.X, -value.Y, -value.Z, -value.W);
416 return value; 416 return value;
417 } 417 }
418 418
419 public static void Negate(ref Vector4 value, out Vector4 result) 419 public static void Negate(ref Vector4 value, out Vector4 result)
420 { 420 {
421 result = new Vector4(-value.X, -value.Y, -value.Z,-value.W); 421 result = new Vector4(-value.X, -value.Y, -value.Z,-value.W);
422 } 422 }
423 423
424 public void Normalize() 424 public void Normalize()
425 { 425 {
426 Normalize(ref this, out this); 426 Normalize(ref this, out this);
427 } 427 }
428 428
429 public static Vector4 Normalize(Vector4 vector) 429 public static Vector4 Normalize(Vector4 vector)
430 { 430 {
431 Normalize(ref vector, out vector); 431 Normalize(ref vector, out vector);
432 return vector; 432 return vector;
433 } 433 }
434 434
435 public static void Normalize(ref Vector4 vector, out Vector4 result) 435 public static void Normalize(ref Vector4 vector, out Vector4 result)
436 { 436 {
437 float factor; 437 float factor;
438 DistanceSquared(ref vector, ref zeroVector, out factor); 438 DistanceSquared(ref vector, ref zeroVector, out factor);
439 factor = 1f / (float)Math.Sqrt(factor); 439 factor = 1f / (float)Math.Sqrt(factor);
440 440
441 result.W = vector.W * factor; 441 result.W = vector.W * factor;
442 result.X = vector.X * factor; 442 result.X = vector.X * factor;
443 result.Y = vector.Y * factor; 443 result.Y = vector.Y * factor;
444 result.Z = vector.Z * factor; 444 result.Z = vector.Z * factor;
445 } 445 }
446 446
447 /*public static Vector4 SmoothStep(Vector4 value1, Vector4 value2, float amount) 447 /*public static Vector4 SmoothStep(Vector4 value1, Vector4 value2, float amount)
448 { 448 {
449 return new Vector4( 449 return new Vector4(
450 MathHelper.SmoothStep(value1.X, value2.X, amount), 450 MathHelper.SmoothStep(value1.X, value2.X, amount),
451 MathHelper.SmoothStep(value1.Y, value2.Y, amount), 451 MathHelper.SmoothStep(value1.Y, value2.Y, amount),
452 MathHelper.SmoothStep(value1.Z, value2.Z, amount), 452 MathHelper.SmoothStep(value1.Z, value2.Z, amount),
453 MathHelper.SmoothStep(value1.W, value2.W, amount)); 453 MathHelper.SmoothStep(value1.W, value2.W, amount));
454 }*/ 454 }*/
455 455
456 /*public static void SmoothStep(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result) 456 /*public static void SmoothStep(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
457 { 457 {
458 result = new Vector4( 458 result = new Vector4(
459 MathHelper.SmoothStep(value1.X, value2.X, amount), 459 MathHelper.SmoothStep(value1.X, value2.X, amount),
460 MathHelper.SmoothStep(value1.Y, value2.Y, amount), 460 MathHelper.SmoothStep(value1.Y, value2.Y, amount),
461 MathHelper.SmoothStep(value1.Z, value2.Z, amount), 461 MathHelper.SmoothStep(value1.Z, value2.Z, amount),
462 MathHelper.SmoothStep(value1.W, value2.W, amount)); 462 MathHelper.SmoothStep(value1.W, value2.W, amount));
463 }*/ 463 }*/
464 464
465 public static Vector4 Subtract(Vector4 value1, Vector4 value2) 465 public static Vector4 Subtract(Vector4 value1, Vector4 value2)
466 { 466 {
467 value1.W -= value2.W; 467 value1.W -= value2.W;
468 value1.X -= value2.X; 468 value1.X -= value2.X;
469 value1.Y -= value2.Y; 469 value1.Y -= value2.Y;
470 value1.Z -= value2.Z; 470 value1.Z -= value2.Z;
471 return value1; 471 return value1;
472 } 472 }
473 473
474 public static void Subtract(ref Vector4 value1, ref Vector4 value2, out Vector4 result) 474 public static void Subtract(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
475 { 475 {
476 result.W = value1.W - value2.W; 476 result.W = value1.W - value2.W;
477 result.X = value1.X - value2.X; 477 result.X = value1.X - value2.X;
478 result.Y = value1.Y - value2.Y; 478 result.Y = value1.Y - value2.Y;
479 result.Z = value1.Z - value2.Z; 479 result.Z = value1.Z - value2.Z;
480 } 480 }
481 481
482 /*public static Vector4 Transform(Vector2 position, Matrix matrix) 482 /*public static Vector4 Transform(Vector2 position, Matrix matrix)
483 { 483 {
484 Vector4 result; 484 Vector4 result;
485 Transform(ref position, ref matrix, out result); 485 Transform(ref position, ref matrix, out result);
486 return result; 486 return result;
487 }*/ 487 }*/
488 488
489 public static Vector4 Transform(Vector3 position, Matrix matrix) 489 public static Vector4 Transform(Vector3 position, Matrix matrix)
490 { 490 {
491 Vector4 result; 491 Vector4 result;
492 Transform(ref position, ref matrix, out result); 492 Transform(ref position, ref matrix, out result);
493 return result; 493 return result;
494 } 494 }
495 495
496 public static Vector4 Transform(Vector4 vector, Matrix matrix) 496 public static Vector4 Transform(Vector4 vector, Matrix matrix)
497 { 497 {
498 Transform(ref vector, ref matrix, out vector); 498 Transform(ref vector, ref matrix, out vector);
499 return vector; 499 return vector;
500 } 500 }
501 501
502 /*public static void Transform(ref Vector2 position, ref Matrix matrix, out Vector4 result) 502 /*public static void Transform(ref Vector2 position, ref Matrix matrix, out Vector4 result)
503 { 503 {
504 result = new Vector4((position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M41, 504 result = new Vector4((position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M41,
505 (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M42, 505 (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M42,
506 (position.X * matrix.M13) + (position.Y * matrix.M23) + matrix.M43, 506 (position.X * matrix.M13) + (position.Y * matrix.M23) + matrix.M43,
507 (position.X * matrix.M14) + (position.Y * matrix.M24) + matrix.M44); 507 (position.X * matrix.M14) + (position.Y * matrix.M24) + matrix.M44);
508 }*/ 508 }*/
509 509
510 public static void Transform(ref Vector3 position, ref Matrix matrix, out Vector4 result) 510 public static void Transform(ref Vector3 position, ref Matrix matrix, out Vector4 result)
511 { 511 {
512 result = new Vector4((position.X * matrix.M11) + (position.Y * matrix.M21) + (position.Z * matrix.M31) + matrix.M41, 512 result = new Vector4((position.X * matrix.M11) + (position.Y * matrix.M21) + (position.Z * matrix.M31) + matrix.M41,
513 (position.X * matrix.M12) + (position.Y * matrix.M22) + (position.Z * matrix.M32) + matrix.M42, 513 (position.X * matrix.M12) + (position.Y * matrix.M22) + (position.Z * matrix.M32) + matrix.M42,
514 (position.X * matrix.M13) + (position.Y * matrix.M23) + (position.Z * matrix.M33) + matrix.M43, 514 (position.X * matrix.M13) + (position.Y * matrix.M23) + (position.Z * matrix.M33) + matrix.M43,
515 (position.X * matrix.M14) + (position.Y * matrix.M24) + (position.Z * matrix.M34) + matrix.M44); 515 (position.X * matrix.M14) + (position.Y * matrix.M24) + (position.Z * matrix.M34) + matrix.M44);
516 } 516 }
517 517
518 public static void Transform(ref Vector4 vector, ref Matrix matrix, out Vector4 result) 518 public static void Transform(ref Vector4 vector, ref Matrix matrix, out Vector4 result)
519 { 519 {
520 result = new Vector4((vector.X * matrix.M11) + (vector.Y * matrix.M21) + (vector.Z * matrix.M31) + (vector.W * matrix.M41), 520 result = new Vector4((vector.X * matrix.M11) + (vector.Y * matrix.M21) + (vector.Z * matrix.M31) + (vector.W * matrix.M41),
521 (vector.X * matrix.M12) + (vector.Y * matrix.M22) + (vector.Z * matrix.M32) + (vector.W * matrix.M42), 521 (vector.X * matrix.M12) + (vector.Y * matrix.M22) + (vector.Z * matrix.M32) + (vector.W * matrix.M42),
522 (vector.X * matrix.M13) + (vector.Y * matrix.M23) + (vector.Z * matrix.M33) + (vector.W * matrix.M43), 522 (vector.X * matrix.M13) + (vector.Y * matrix.M23) + (vector.Z * matrix.M33) + (vector.W * matrix.M43),
523 (vector.X * matrix.M14) + (vector.Y * matrix.M24) + (vector.Z * matrix.M34) + (vector.W * matrix.M44)); 523 (vector.X * matrix.M14) + (vector.Y * matrix.M24) + (vector.Z * matrix.M34) + (vector.W * matrix.M44));
524 } 524 }
525 525
526 public override string ToString() 526 public override string ToString()
527 { 527 {
528 StringBuilder sb = new StringBuilder(32); 528 StringBuilder sb = new StringBuilder(32);
529 sb.Append("{X:"); 529 sb.Append("{X:");
530 sb.Append(this.X); 530 sb.Append(this.X);
531 sb.Append(" Y:"); 531 sb.Append(" Y:");
532 sb.Append(this.Y); 532 sb.Append(this.Y);
533 sb.Append(" Z:"); 533 sb.Append(" Z:");
534 sb.Append(this.Z); 534 sb.Append(this.Z);
535 sb.Append(" W:"); 535 sb.Append(" W:");
536 sb.Append(this.W); 536 sb.Append(this.W);
537 sb.Append("}"); 537 sb.Append("}");
538 return sb.ToString(); 538 return sb.ToString();
539 } 539 }
540 540
541 #endregion Public Methods 541 #endregion Public Methods
542 542
543 543
544 #region Operators 544 #region Operators
545 545
546 public static Vector4 operator -(Vector4 value) 546 public static Vector4 operator -(Vector4 value)
547 { 547 {
548 return new Vector4(-value.X, -value.Y, -value.Z, -value.W); 548 return new Vector4(-value.X, -value.Y, -value.Z, -value.W);
549 } 549 }
550 550
551 public static bool operator ==(Vector4 value1, Vector4 value2) 551 public static bool operator ==(Vector4 value1, Vector4 value2)
552 { 552 {
553 return value1.W == value2.W 553 return value1.W == value2.W
554 && value1.X == value2.X 554 && value1.X == value2.X
555 && value1.Y == value2.Y 555 && value1.Y == value2.Y
556 && value1.Z == value2.Z; 556 && value1.Z == value2.Z;
557 } 557 }
558 558
559 public static bool operator !=(Vector4 value1, Vector4 value2) 559 public static bool operator !=(Vector4 value1, Vector4 value2)
560 { 560 {
561 return !(value1 == value2); 561 return !(value1 == value2);
562 } 562 }
563 563
564 public static Vector4 operator +(Vector4 value1, Vector4 value2) 564 public static Vector4 operator +(Vector4 value1, Vector4 value2)
565 { 565 {
566 value1.W += value2.W; 566 value1.W += value2.W;
567 value1.X += value2.X; 567 value1.X += value2.X;
568 value1.Y += value2.Y; 568 value1.Y += value2.Y;
569 value1.Z += value2.Z; 569 value1.Z += value2.Z;
570 return value1; 570 return value1;
571 } 571 }
572 572
573 public static Vector4 operator -(Vector4 value1, Vector4 value2) 573 public static Vector4 operator -(Vector4 value1, Vector4 value2)
574 { 574 {
575 value1.W -= value2.W; 575 value1.W -= value2.W;
576 value1.X -= value2.X; 576 value1.X -= value2.X;
577 value1.Y -= value2.Y; 577 value1.Y -= value2.Y;
578 value1.Z -= value2.Z; 578 value1.Z -= value2.Z;
579 return value1; 579 return value1;
580 } 580 }
581 581
582 public static Vector4 operator *(Vector4 value1, Vector4 value2) 582 public static Vector4 operator *(Vector4 value1, Vector4 value2)
583 { 583 {
584 value1.W *= value2.W; 584 value1.W *= value2.W;
585 value1.X *= value2.X; 585 value1.X *= value2.X;
586 value1.Y *= value2.Y; 586 value1.Y *= value2.Y;
587 value1.Z *= value2.Z; 587 value1.Z *= value2.Z;
588 return value1; 588 return value1;
589 } 589 }
590 590
591 public static Vector4 operator *(Vector4 value1, float scaleFactor) 591 public static Vector4 operator *(Vector4 value1, float scaleFactor)
592 { 592 {
593 value1.W *= scaleFactor; 593 value1.W *= scaleFactor;
594 value1.X *= scaleFactor; 594 value1.X *= scaleFactor;
595 value1.Y *= scaleFactor; 595 value1.Y *= scaleFactor;
596 value1.Z *= scaleFactor; 596 value1.Z *= scaleFactor;
597 return value1; 597 return value1;
598 } 598 }
599 599
600 public static Vector4 operator *(float scaleFactor, Vector4 value1) 600 public static Vector4 operator *(float scaleFactor, Vector4 value1)
601 { 601 {
602 value1.W *= scaleFactor; 602 value1.W *= scaleFactor;
603 value1.X *= scaleFactor; 603 value1.X *= scaleFactor;
604 value1.Y *= scaleFactor; 604 value1.Y *= scaleFactor;
605 value1.Z *= scaleFactor; 605 value1.Z *= scaleFactor;
606 return value1; 606 return value1;
607 } 607 }
608 608
609 public static Vector4 operator /(Vector4 value1, Vector4 value2) 609 public static Vector4 operator /(Vector4 value1, Vector4 value2)
610 { 610 {
611 value1.W /= value2.W; 611 value1.W /= value2.W;
612 value1.X /= value2.X; 612 value1.X /= value2.X;
613 value1.Y /= value2.Y; 613 value1.Y /= value2.Y;
614 value1.Z /= value2.Z; 614 value1.Z /= value2.Z;
615 return value1; 615 return value1;
616 } 616 }
617 617
618 public static Vector4 operator /(Vector4 value1, float divider) 618 public static Vector4 operator /(Vector4 value1, float divider)
619 { 619 {
620 float factor = 1f / divider; 620 float factor = 1f / divider;
621 value1.W *= factor; 621 value1.W *= factor;
622 value1.X *= factor; 622 value1.X *= factor;
623 value1.Y *= factor; 623 value1.Y *= factor;
624 value1.Z *= factor; 624 value1.Z *= factor;
625 return value1; 625 return value1;
626 } 626 }
627 627
628 #endregion Operators 628 #endregion Operators
629 } 629 }
630} 630}
diff --git a/prebuild.xml b/prebuild.xml
index 5be2871..a88b84b 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1,1060 +1,1060 @@
1<?xml version="1.0" encoding="utf-8" ?> 1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> 2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7">
3 <Solution name="OpenSim" activeConfig="Debug" path="./"> 3 <Solution name="OpenSim" activeConfig="Debug" path="./">
4 <Configuration name="Debug"> 4 <Configuration name="Debug">
5 <Options> 5 <Options>
6 <CompilerDefines>TRACE;DEBUG</CompilerDefines> 6 <CompilerDefines>TRACE;DEBUG</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode> 7 <OptimizeCode>false</OptimizeCode>
8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
9 <AllowUnsafe>false</AllowUnsafe> 9 <AllowUnsafe>false</AllowUnsafe>
10 <WarningLevel>4</WarningLevel> 10 <WarningLevel>4</WarningLevel>
11 <WarningsAsErrors>false</WarningsAsErrors> 11 <WarningsAsErrors>false</WarningsAsErrors>
12 <SuppressWarnings></SuppressWarnings> 12 <SuppressWarnings></SuppressWarnings>
13 <OutputPath>bin</OutputPath> 13 <OutputPath>bin</OutputPath>
14 <DebugInformation>true</DebugInformation> 14 <DebugInformation>true</DebugInformation>
15 <IncrementalBuild>true</IncrementalBuild> 15 <IncrementalBuild>true</IncrementalBuild>
16 <NoStdLib>false</NoStdLib> 16 <NoStdLib>false</NoStdLib>
17 </Options> 17 </Options>
18 </Configuration> 18 </Configuration>
19 <Configuration name="Release"> 19 <Configuration name="Release">
20 <Options> 20 <Options>
21 <CompilerDefines>TRACE</CompilerDefines> 21 <CompilerDefines>TRACE</CompilerDefines>
22 <OptimizeCode>true</OptimizeCode> 22 <OptimizeCode>true</OptimizeCode>
23 <CheckUnderflowOverflow>false</CheckUnderflowOverflow> 23 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
24 <AllowUnsafe>false</AllowUnsafe> 24 <AllowUnsafe>false</AllowUnsafe>
25 <WarningLevel>4</WarningLevel> 25 <WarningLevel>4</WarningLevel>
26 <WarningsAsErrors>false</WarningsAsErrors> 26 <WarningsAsErrors>false</WarningsAsErrors>
27 <SuppressWarnings></SuppressWarnings> 27 <SuppressWarnings></SuppressWarnings>
28 <OutputPath>bin</OutputPath> 28 <OutputPath>bin</OutputPath>
29 <DebugInformation>false</DebugInformation> 29 <DebugInformation>false</DebugInformation>
30 <IncrementalBuild>true</IncrementalBuild> 30 <IncrementalBuild>true</IncrementalBuild>
31 <NoStdLib>false</NoStdLib> 31 <NoStdLib>false</NoStdLib>
32 </Options> 32 </Options>
33 </Configuration> 33 </Configuration>
34 34
35 35
36 <!-- Core OpenSim Projects --> 36 <!-- Core OpenSim Projects -->
37 37
38 <Project name="OpenSim.Framework.Console" path="OpenSim/Framework/Console" type="Library"> 38 <Project name="OpenSim.Framework.Console" path="OpenSim/Framework/Console" type="Library">
39 <Configuration name="Debug"> 39 <Configuration name="Debug">
40 <Options> 40 <Options>
41 <OutputPath>../../../bin/</OutputPath> 41 <OutputPath>../../../bin/</OutputPath>
42 </Options> 42 </Options>
43 </Configuration> 43 </Configuration>
44 <Configuration name="Release"> 44 <Configuration name="Release">
45 <Options> 45 <Options>
46 <OutputPath>../../../bin/</OutputPath> 46 <OutputPath>../../../bin/</OutputPath>
47 </Options> 47 </Options>
48 </Configuration> 48 </Configuration>
49 49
50 <ReferencePath>../../../bin/</ReferencePath> 50 <ReferencePath>../../../bin/</ReferencePath>
51 <Reference name="System" localCopy="false"/> 51 <Reference name="System" localCopy="false"/>
52 <Files> 52 <Files>
53 <Match pattern="*.cs" recurse="true"/> 53 <Match pattern="*.cs" recurse="true"/>
54 </Files> 54 </Files>
55 </Project> 55 </Project>
56 56
57 <Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library"> 57 <Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
58 <Configuration name="Debug"> 58 <Configuration name="Debug">
59 <Options> 59 <Options>
60 <OutputPath>../../../bin/</OutputPath> 60 <OutputPath>../../../bin/</OutputPath>
61 </Options> 61 </Options>
62 </Configuration> 62 </Configuration>
63 <Configuration name="Release"> 63 <Configuration name="Release">
64 <Options> 64 <Options>
65 <OutputPath>../../../bin/</OutputPath> 65 <OutputPath>../../../bin/</OutputPath>
66 </Options> 66 </Options>
67 </Configuration> 67 </Configuration>
68 68
69 <ReferencePath>../../../bin/</ReferencePath> 69 <ReferencePath>../../../bin/</ReferencePath>
70 <Reference name="System" localCopy="false"/> 70 <Reference name="System" localCopy="false"/>
71 <Reference name="System.Xml"/> 71 <Reference name="System.Xml"/>
72 <Reference name="System.Data"/> 72 <Reference name="System.Data"/>
73 <Reference name="XMLRPC.dll"/> 73 <Reference name="XMLRPC.dll"/>
74 <Reference name="libsecondlife.dll"/> 74 <Reference name="libsecondlife.dll"/>
75 <Files> 75 <Files>
76 <Match pattern="*.cs" recurse="true"/> 76 <Match pattern="*.cs" recurse="true"/>
77 </Files> 77 </Files>
78 </Project> 78 </Project>
79 79
80 <Project name="OpenSim.Framework" path="OpenSim/Framework/General" type="Library"> 80 <Project name="OpenSim.Framework" path="OpenSim/Framework/General" type="Library">
81 <Configuration name="Debug"> 81 <Configuration name="Debug">
82 <Options> 82 <Options>
83 <OutputPath>../../../bin/</OutputPath> 83 <OutputPath>../../../bin/</OutputPath>
84 </Options> 84 </Options>
85 </Configuration> 85 </Configuration>
86 <Configuration name="Release"> 86 <Configuration name="Release">
87 <Options> 87 <Options>
88 <OutputPath>../../../bin/</OutputPath> 88 <OutputPath>../../../bin/</OutputPath>
89 </Options> 89 </Options>
90 </Configuration> 90 </Configuration>
91 91
92 <ReferencePath>../../../bin/</ReferencePath> 92 <ReferencePath>../../../bin/</ReferencePath>
93 <Reference name="System"/> 93 <Reference name="System"/>
94 <Reference name="System.Xml"/> 94 <Reference name="System.Xml"/>
95 <Reference name="libsecondlife.dll"/> 95 <Reference name="libsecondlife.dll"/>
96 <Reference name="Db4objects.Db4o.dll"/> 96 <Reference name="Db4objects.Db4o.dll"/>
97 <Reference name="XMLRPC.dll"/> 97 <Reference name="XMLRPC.dll"/>
98 <Reference name="OpenSim.Framework.Console"/> 98 <Reference name="OpenSim.Framework.Console"/>
99 <Reference name="OpenSim.Framework.Data"/> 99 <Reference name="OpenSim.Framework.Data"/>
100 <Files> 100 <Files>
101 <Match pattern="*.cs" recurse="true"/> 101 <Match pattern="*.cs" recurse="true"/>
102 </Files> 102 </Files>
103 </Project> 103 </Project>
104 104
105 <Project name="OpenSim.Framework.Servers" path="OpenSim/Framework/Servers" type="Library"> 105 <Project name="OpenSim.Framework.Servers" path="OpenSim/Framework/Servers" type="Library">
106 <Configuration name="Debug"> 106 <Configuration name="Debug">
107 <Options> 107 <Options>
108 <OutputPath>../../../bin/</OutputPath> 108 <OutputPath>../../../bin/</OutputPath>
109 </Options> 109 </Options>
110 </Configuration> 110 </Configuration>
111 <Configuration name="Release"> 111 <Configuration name="Release">
112 <Options> 112 <Options>
113 <OutputPath>../../../bin/</OutputPath> 113 <OutputPath>../../../bin/</OutputPath>
114 </Options> 114 </Options>
115 </Configuration> 115 </Configuration>
116 116
117 <ReferencePath>../../../bin/</ReferencePath> 117 <ReferencePath>../../../bin/</ReferencePath>
118 <Reference name="System"/> 118 <Reference name="System"/>
119 <Reference name="System.Xml"/> 119 <Reference name="System.Xml"/>
120 <Reference name="OpenSim.Framework"/> 120 <Reference name="OpenSim.Framework"/>
121 <Reference name="OpenSim.Framework.Console"/> 121 <Reference name="OpenSim.Framework.Console"/>
122 <Reference name="libsecondlife.dll"/> 122 <Reference name="libsecondlife.dll"/>
123 <Reference name="XMLRPC.dll"/> 123 <Reference name="XMLRPC.dll"/>
124 124
125 <Files> 125 <Files>
126 <Match pattern="*.cs" recurse="true"/> 126 <Match pattern="*.cs" recurse="true"/>
127 </Files> 127 </Files>
128 </Project> 128 </Project>
129 129
130 <Project name="OpenSim.Region.Caches" path="OpenSim/Region/Caches" type="Library"> 130 <Project name="OpenSim.Region.Caches" path="OpenSim/Region/Caches" type="Library">
131 <Configuration name="Debug"> 131 <Configuration name="Debug">
132 <Options> 132 <Options>
133 <OutputPath>../../../bin/</OutputPath> 133 <OutputPath>../../../bin/</OutputPath>
134 </Options> 134 </Options>
135 </Configuration> 135 </Configuration>
136 <Configuration name="Release"> 136 <Configuration name="Release">
137 <Options> 137 <Options>
138 <OutputPath>../../../bin/</OutputPath> 138 <OutputPath>../../../bin/</OutputPath>
139 </Options> 139 </Options>
140 </Configuration> 140 </Configuration>
141 141
142 <ReferencePath>../../../bin/</ReferencePath> 142 <ReferencePath>../../../bin/</ReferencePath>
143 <Reference name="System"/> 143 <Reference name="System"/>
144 <Reference name="System.Xml"/> 144 <Reference name="System.Xml"/>
145 <Reference name="libsecondlife.dll"/> 145 <Reference name="libsecondlife.dll"/>
146 <Reference name="OpenSim.Framework"/> 146 <Reference name="OpenSim.Framework"/>
147 <Reference name="OpenSim.Framework.Data"/> 147 <Reference name="OpenSim.Framework.Data"/>
148 <Files> 148 <Files>
149 <Match pattern="*.cs" recurse="true"/> 149 <Match pattern="*.cs" recurse="true"/>
150 </Files> 150 </Files>
151 </Project> 151 </Project>
152 152
153 <Project name="OpenSim.Region.Capabilities" path="OpenSim/Region/Capabilities" type="Library"> 153 <Project name="OpenSim.Region.Capabilities" path="OpenSim/Region/Capabilities" type="Library">
154 <Configuration name="Debug"> 154 <Configuration name="Debug">
155 <Options> 155 <Options>
156 <OutputPath>../../../bin/</OutputPath> 156 <OutputPath>../../../bin/</OutputPath>
157 </Options> 157 </Options>
158 </Configuration> 158 </Configuration>
159 <Configuration name="Release"> 159 <Configuration name="Release">
160 <Options> 160 <Options>
161 <OutputPath>../../../bin/</OutputPath> 161 <OutputPath>../../../bin/</OutputPath>
162 </Options> 162 </Options>
163 </Configuration> 163 </Configuration>
164 164
165 <ReferencePath>../../../bin/</ReferencePath> 165 <ReferencePath>../../../bin/</ReferencePath>
166 <Reference name="System"/> 166 <Reference name="System"/>
167 <Reference name="System.Xml"/> 167 <Reference name="System.Xml"/>
168 <Reference name="libsecondlife.dll"/> 168 <Reference name="libsecondlife.dll"/>
169 <Reference name="OpenSim.Framework"/> 169 <Reference name="OpenSim.Framework"/>
170 <Reference name="OpenSim.Framework.Servers"/> 170 <Reference name="OpenSim.Framework.Servers"/>
171 <Reference name="OpenSim.Region.Caches"/> 171 <Reference name="OpenSim.Region.Caches"/>
172 <Reference name="XMLRPC.dll"/> 172 <Reference name="XMLRPC.dll"/>
173 173
174 <Files> 174 <Files>
175 <Match pattern="*.cs" recurse="true"/> 175 <Match pattern="*.cs" recurse="true"/>
176 </Files> 176 </Files>
177 </Project> 177 </Project>
178 178
179 <!-- Storage Plug-ins --> 179 <!-- Storage Plug-ins -->
180 <Project name="OpenSim.Region.Storage.LocalStorageDb4o" path="OpenSim/Region/Storage/LocalStorageDb4o" type="Library"> 180 <Project name="OpenSim.Region.Storage.LocalStorageDb4o" path="OpenSim/Region/Storage/LocalStorageDb4o" type="Library">
181 <Configuration name="Debug"> 181 <Configuration name="Debug">
182 <Options> 182 <Options>
183 <OutputPath>../../../../bin/</OutputPath> 183 <OutputPath>../../../../bin/</OutputPath>
184 </Options> 184 </Options>
185 </Configuration> 185 </Configuration>
186 <Configuration name="Release"> 186 <Configuration name="Release">
187 <Options> 187 <Options>
188 <OutputPath>../../../../bin/</OutputPath> 188 <OutputPath>../../../../bin/</OutputPath>
189 </Options> 189 </Options>
190 </Configuration> 190 </Configuration>
191 191
192 <ReferencePath>../../../../bin/</ReferencePath> 192 <ReferencePath>../../../../bin/</ReferencePath>
193 <Reference name="System" localCopy="false"/> 193 <Reference name="System" localCopy="false"/>
194 <Reference name="System.Xml"/> 194 <Reference name="System.Xml"/>
195 <Reference name="Db4objects.Db4o.dll"/> 195 <Reference name="Db4objects.Db4o.dll"/>
196 <Reference name="libsecondlife.dll"/> 196 <Reference name="libsecondlife.dll"/>
197 <Reference name="OpenSim.Framework"/> 197 <Reference name="OpenSim.Framework"/>
198 <Reference name="OpenSim.Framework.Console"/> 198 <Reference name="OpenSim.Framework.Console"/>
199 <Files> 199 <Files>
200 <Match pattern="*.cs" recurse="true"/> 200 <Match pattern="*.cs" recurse="true"/>
201 </Files> 201 </Files>
202 </Project> 202 </Project>
203 203
204 <Project name="OpenSim.Region.Storage.LocalStorageSQLite" path="OpenSim/Region/Storage/LocalStorageSQLite" type="Library"> 204 <Project name="OpenSim.Region.Storage.LocalStorageSQLite" path="OpenSim/Region/Storage/LocalStorageSQLite" type="Library">
205 <Configuration name="Debug"> 205 <Configuration name="Debug">
206 <Options> 206 <Options>
207 <OutputPath>../../../../bin/</OutputPath> 207 <OutputPath>../../../../bin/</OutputPath>
208 </Options> 208 </Options>
209 </Configuration> 209 </Configuration>
210 <Configuration name="Release"> 210 <Configuration name="Release">
211 <Options> 211 <Options>
212 <OutputPath>../../../../bin/</OutputPath> 212 <OutputPath>../../../../bin/</OutputPath>
213 </Options> 213 </Options>
214 </Configuration> 214 </Configuration>
215 215
216 <ReferencePath>../../../../bin/</ReferencePath> 216 <ReferencePath>../../../../bin/</ReferencePath>
217 <Reference name="System" localCopy="false"/> 217 <Reference name="System" localCopy="false"/>
218 <Reference name="System.Xml"/> 218 <Reference name="System.Xml"/>
219 <Reference name="System.Data"/> 219 <Reference name="System.Data"/>
220 <Reference name="System.Data.SQLite.dll"/> 220 <Reference name="System.Data.SQLite.dll"/>
221 <Reference name="libsecondlife.dll"/> 221 <Reference name="libsecondlife.dll"/>
222 <Reference name="OpenSim.Framework"/> 222 <Reference name="OpenSim.Framework"/>
223 <Reference name="OpenSim.Framework.Console"/> 223 <Reference name="OpenSim.Framework.Console"/>
224 <Files> 224 <Files>
225 <Match pattern="*.cs" recurse="true"/> 225 <Match pattern="*.cs" recurse="true"/>
226 </Files> 226 </Files>
227 </Project> 227 </Project>
228 228
229 <Project name="OpenSim.Region.Storage.LocalStorageBerkeleyDB" path="OpenSim/Region/Storage/LocalStorageBerkeleyDB" type="Library"> 229 <Project name="OpenSim.Region.Storage.LocalStorageBerkeleyDB" path="OpenSim/Region/Storage/LocalStorageBerkeleyDB" type="Library">
230 <Configuration name="Debug"> 230 <Configuration name="Debug">
231 <Options> 231 <Options>
232 <OutputPath>../../../../bin/</OutputPath> 232 <OutputPath>../../../../bin/</OutputPath>
233 </Options> 233 </Options>
234 </Configuration> 234 </Configuration>
235 <Configuration name="Release"> 235 <Configuration name="Release">
236 <Options> 236 <Options>
237 <OutputPath>../../../../bin/</OutputPath> 237 <OutputPath>../../../../bin/</OutputPath>
238 </Options> 238 </Options>
239 </Configuration> 239 </Configuration>
240 240
241 <ReferencePath>../../../../bin/</ReferencePath> 241 <ReferencePath>../../../../bin/</ReferencePath>
242 <Reference name="System" localCopy="false"/> 242 <Reference name="System" localCopy="false"/>
243 <Reference name="System.Xml"/> 243 <Reference name="System.Xml"/>
244 <Reference name="System.Data"/> 244 <Reference name="System.Data"/>
245 <Reference name="Kds.Serialization.dll"/> 245 <Reference name="Kds.Serialization.dll"/>
246 <Reference name="libdb_dotNET43.dll"/> 246 <Reference name="libdb_dotNET43.dll"/>
247 <Reference name="libsecondlife.dll"/> 247 <Reference name="libsecondlife.dll"/>
248 <Reference name="OpenSim.Framework"/> 248 <Reference name="OpenSim.Framework"/>
249 <Reference name="OpenSim.Framework.Console"/> 249 <Reference name="OpenSim.Framework.Console"/>
250 <Files> 250 <Files>
251 <Match pattern="*.cs" recurse="true"/> 251 <Match pattern="*.cs" recurse="true"/>
252 </Files> 252 </Files>
253 </Project> 253 </Project>
254 254
255 <!-- Grid Server Plug-ins --> 255 <!-- Grid Server Plug-ins -->
256 <Project name="OpenSim.Region.GridInterfaces.Local" path="OpenSim/Region/GridInterfaces/Local" type="Library"> 256 <Project name="OpenSim.Region.GridInterfaces.Local" path="OpenSim/Region/GridInterfaces/Local" type="Library">
257 <Configuration name="Debug"> 257 <Configuration name="Debug">
258 <Options> 258 <Options>
259 <OutputPath>../../../../bin/</OutputPath> 259 <OutputPath>../../../../bin/</OutputPath>
260 </Options> 260 </Options>
261 </Configuration> 261 </Configuration>
262 <Configuration name="Release"> 262 <Configuration name="Release">
263 <Options> 263 <Options>
264 <OutputPath>../../../../bin/</OutputPath> 264 <OutputPath>../../../../bin/</OutputPath>
265 </Options> 265 </Options>
266 </Configuration> 266 </Configuration>
267 267
268 <ReferencePath>../../../../bin/</ReferencePath> 268 <ReferencePath>../../../../bin/</ReferencePath>
269 <Reference name="System" localCopy="false"/> 269 <Reference name="System" localCopy="false"/>
270 <Reference name="System.Xml"/> 270 <Reference name="System.Xml"/>
271 <Reference name="Db4objects.Db4o.dll"/> 271 <Reference name="Db4objects.Db4o.dll"/>
272 <Reference name="libsecondlife.dll"/> 272 <Reference name="libsecondlife.dll"/>
273 <Reference name="OpenSim.Framework"/> 273 <Reference name="OpenSim.Framework"/>
274 <Reference name="OpenSim.Framework.Console"/> 274 <Reference name="OpenSim.Framework.Console"/>
275 <Files> 275 <Files>
276 <Match pattern="*.cs" recurse="true"/> 276 <Match pattern="*.cs" recurse="true"/>
277 </Files> 277 </Files>
278 </Project> 278 </Project>
279 279
280 <Project name="OpenSim.Region.GridInterfaces.Remote" path="OpenSim/Region/GridInterfaces/Remote" type="Library"> 280 <Project name="OpenSim.Region.GridInterfaces.Remote" path="OpenSim/Region/GridInterfaces/Remote" type="Library">
281 <Configuration name="Debug"> 281 <Configuration name="Debug">
282 <Options> 282 <Options>
283 <OutputPath>../../../../bin/</OutputPath> 283 <OutputPath>../../../../bin/</OutputPath>
284 </Options> 284 </Options>
285 </Configuration> 285 </Configuration>
286 <Configuration name="Release"> 286 <Configuration name="Release">
287 <Options> 287 <Options>
288 <OutputPath>../../../../bin/</OutputPath> 288 <OutputPath>../../../../bin/</OutputPath>
289 </Options> 289 </Options>
290 </Configuration> 290 </Configuration>
291 291
292 <ReferencePath>../../../../bin/</ReferencePath> 292 <ReferencePath>../../../../bin/</ReferencePath>
293 <Reference name="System" localCopy="false"/> 293 <Reference name="System" localCopy="false"/>
294 <Reference name="System.Xml"/> 294 <Reference name="System.Xml"/>
295 <Reference name="libsecondlife.dll"/> 295 <Reference name="libsecondlife.dll"/>
296 <Reference name="OpenSim.Framework"/> 296 <Reference name="OpenSim.Framework"/>
297 <Reference name="OpenSim.Framework.Console"/> 297 <Reference name="OpenSim.Framework.Console"/>
298 <Reference name="XMLRPC.dll"/> 298 <Reference name="XMLRPC.dll"/>
299 <Files> 299 <Files>
300 <Match pattern="*.cs" recurse="true"/> 300 <Match pattern="*.cs" recurse="true"/>
301 </Files> 301 </Files>
302 </Project> 302 </Project>
303 303
304 <Project name="OpenSim.Region.Physics.Manager" path="OpenSim/Region/Physics/Manager" type="Library"> 304 <Project name="OpenSim.Region.Physics.Manager" path="OpenSim/Region/Physics/Manager" type="Library">
305 <Configuration name="Debug"> 305 <Configuration name="Debug">
306 <Options> 306 <Options>
307 <OutputPath>../../../../bin/</OutputPath> 307 <OutputPath>../../../../bin/</OutputPath>
308 </Options> 308 </Options>
309 </Configuration> 309 </Configuration>
310 <Configuration name="Release"> 310 <Configuration name="Release">
311 <Options> 311 <Options>
312 <OutputPath>../../../../bin/</OutputPath> 312 <OutputPath>../../../../bin/</OutputPath>
313 </Options> 313 </Options>
314 </Configuration> 314 </Configuration>
315 315
316 <ReferencePath>../../../../bin/</ReferencePath> 316 <ReferencePath>../../../../bin/</ReferencePath>
317 <Reference name="System" localCopy="false"/> 317 <Reference name="System" localCopy="false"/>
318 <Reference name="System.Xml" localCopy="false" /> 318 <Reference name="System.Xml" localCopy="false" />
319 <Reference name="Axiom.MathLib.dll" localCopy="false"/> 319 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
320 <Reference name="OpenSim.Framework" localCopy="false"/> 320 <Reference name="OpenSim.Framework" localCopy="false"/>
321 <Reference name="OpenSim.Framework.Console" localCopy="false"/> 321 <Reference name="OpenSim.Framework.Console" localCopy="false"/>
322 <Files> 322 <Files>
323 <Match pattern="*.cs" recurse="false"/> 323 <Match pattern="*.cs" recurse="false"/>
324 </Files> 324 </Files>
325 </Project> 325 </Project>
326 326
327 327
328 <!-- Physics Plug-ins --> 328 <!-- Physics Plug-ins -->
329 <Project name="OpenSim.Region.Physics.BasicPhysicsPlugin" path="OpenSim/Region/Physics/BasicPhysicsPlugin" type="Library"> 329 <Project name="OpenSim.Region.Physics.BasicPhysicsPlugin" path="OpenSim/Region/Physics/BasicPhysicsPlugin" type="Library">
330 <Configuration name="Debug"> 330 <Configuration name="Debug">
331 <Options> 331 <Options>
332 <OutputPath>../../../../bin/Physics/</OutputPath> 332 <OutputPath>../../../../bin/Physics/</OutputPath>
333 </Options> 333 </Options>
334 </Configuration> 334 </Configuration>
335 <Configuration name="Release"> 335 <Configuration name="Release">
336 <Options> 336 <Options>
337 <OutputPath>../../../../bin/Physics/</OutputPath> 337 <OutputPath>../../../../bin/Physics/</OutputPath>
338 </Options> 338 </Options>
339 </Configuration> 339 </Configuration>
340 340
341 <ReferencePath>../../../../bin/</ReferencePath> 341 <ReferencePath>../../../../bin/</ReferencePath>
342 <Reference name="System" localCopy="false"/> 342 <Reference name="System" localCopy="false"/>
343 <Reference name="Axiom.MathLib.dll" localCopy="false"/> 343 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
344 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> 344 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
345 <Files> 345 <Files>
346 <Match pattern="*.cs" recurse="true"/> 346 <Match pattern="*.cs" recurse="true"/>
347 </Files> 347 </Files>
348 </Project> 348 </Project>
349 349
350 <Project name="OpenSim.Region.Physics.PhysXPlugin" path="OpenSim/Region/Physics/PhysXPlugin" type="Library"> 350 <Project name="OpenSim.Region.Physics.PhysXPlugin" path="OpenSim/Region/Physics/PhysXPlugin" type="Library">
351 <Configuration name="Debug"> 351 <Configuration name="Debug">
352 <Options> 352 <Options>
353 <OutputPath>../../../../bin/Physics/</OutputPath> 353 <OutputPath>../../../../bin/Physics/</OutputPath>
354 </Options> 354 </Options>
355 </Configuration> 355 </Configuration>
356 <Configuration name="Release"> 356 <Configuration name="Release">
357 <Options> 357 <Options>
358 <OutputPath>../../../../bin/Physics/</OutputPath> 358 <OutputPath>../../../../bin/Physics/</OutputPath>
359 </Options> 359 </Options>
360 </Configuration> 360 </Configuration>
361 361
362 <ReferencePath>../../../../bin/</ReferencePath> 362 <ReferencePath>../../../../bin/</ReferencePath>
363 <Reference name="System" localCopy="false"/> 363 <Reference name="System" localCopy="false"/>
364 <Reference name="Axiom.MathLib.dll" localCopy="false"/> 364 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
365 <Reference name="PhysX_Wrapper_Dotnet.dll" localCopy="false"/> 365 <Reference name="PhysX_Wrapper_Dotnet.dll" localCopy="false"/>
366 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> 366 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
367 <Files> 367 <Files>
368 <Match pattern="*.cs" recurse="true"/> 368 <Match pattern="*.cs" recurse="true"/>
369 </Files> 369 </Files>
370 </Project> 370 </Project>
371 371
372 <Project name="OpenSim.Region.Physics.OdePlugin" path="OpenSim/Region/Physics/OdePlugin" type="Library"> 372 <Project name="OpenSim.Region.Physics.OdePlugin" path="OpenSim/Region/Physics/OdePlugin" type="Library">
373 <Configuration name="Debug"> 373 <Configuration name="Debug">
374 <Options> 374 <Options>
375 <OutputPath>../../../../bin/Physics/</OutputPath> 375 <OutputPath>../../../../bin/Physics/</OutputPath>
376 </Options> 376 </Options>
377 </Configuration> 377 </Configuration>
378 <Configuration name="Release"> 378 <Configuration name="Release">
379 <Options> 379 <Options>
380 <OutputPath>../../../../bin/Physics/</OutputPath> 380 <OutputPath>../../../../bin/Physics/</OutputPath>
381 </Options> 381 </Options>
382 </Configuration> 382 </Configuration>
383 383
384 <ReferencePath>../../../../bin/</ReferencePath> 384 <ReferencePath>../../../../bin/</ReferencePath>
385 <Reference name="System" localCopy="false"/> 385 <Reference name="System" localCopy="false"/>
386 <Reference name="Axiom.MathLib.dll" localCopy="false"/> 386 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
387 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> 387 <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
388 <Reference name="Ode.NET.dll" localCopy="false" /> 388 <Reference name="Ode.NET.dll" localCopy="false" />
389 389
390 <Files> 390 <Files>
391 <Match pattern="*.cs" recurse="true"/> 391 <Match pattern="*.cs" recurse="true"/>
392 </Files> 392 </Files>
393 </Project> 393 </Project>
394 394
395 <!-- Xml Config Dll --> 395 <!-- Xml Config Dll -->
396 <Project name="OpenSim.Framework.GenericConfig.Xml" path="OpenSim/Framework/GenericConfig/Xml" type="Library"> 396 <Project name="OpenSim.Framework.GenericConfig.Xml" path="OpenSim/Framework/GenericConfig/Xml" type="Library">
397 <Configuration name="Debug"> 397 <Configuration name="Debug">
398 <Options> 398 <Options>
399 <OutputPath>../../../../bin/</OutputPath> 399 <OutputPath>../../../../bin/</OutputPath>
400 </Options> 400 </Options>
401 </Configuration> 401 </Configuration>
402 <Configuration name="Release"> 402 <Configuration name="Release">
403 <Options> 403 <Options>
404 <OutputPath>../../../../bin/</OutputPath> 404 <OutputPath>../../../../bin/</OutputPath>
405 </Options> 405 </Options>
406 </Configuration> 406 </Configuration>
407 407
408 <ReferencePath>../../../../bin/</ReferencePath> 408 <ReferencePath>../../../../bin/</ReferencePath>
409 <Reference name="System"/> 409 <Reference name="System"/>
410 <Reference name="System.Xml"/> 410 <Reference name="System.Xml"/>
411 <Reference name="OpenSim.Framework"/> 411 <Reference name="OpenSim.Framework"/>
412 412
413 <Files> 413 <Files>
414 <Match pattern="*.cs" recurse="true"/> 414 <Match pattern="*.cs" recurse="true"/>
415 </Files> 415 </Files>
416 </Project> 416 </Project>
417 417
418 <!-- Terrain engine --> 418 <!-- Terrain engine -->
419 <Project name="OpenSim.Region.Terrain.BasicTerrain" path="OpenSim/Region/Terrain.BasicTerrain" type="Library"> 419 <Project name="OpenSim.Region.Terrain.BasicTerrain" path="OpenSim/Region/Terrain.BasicTerrain" type="Library">
420 <Configuration name="Debug"> 420 <Configuration name="Debug">
421 <Options> 421 <Options>
422 <OutputPath>../../../bin/</OutputPath> 422 <OutputPath>../../../bin/</OutputPath>
423 </Options> 423 </Options>
424 </Configuration> 424 </Configuration>
425 <Configuration name="Release"> 425 <Configuration name="Release">
426 <Options> 426 <Options>
427 <OutputPath>../../../bin/</OutputPath> 427 <OutputPath>../../../bin/</OutputPath>
428 </Options> 428 </Options>
429 </Configuration> 429 </Configuration>
430 430
431 <ReferencePath>../../../bin/</ReferencePath> 431 <ReferencePath>../../../bin/</ReferencePath>
432 <Reference name="System"/> 432 <Reference name="System"/>
433 <Reference name="System.Drawing"/> 433 <Reference name="System.Drawing"/>
434 <Reference name="System.Data"/> 434 <Reference name="System.Data"/>
435 <Reference name="System.Xml"/> 435 <Reference name="System.Xml"/>
436 <Reference name="Microsoft.JScript"/> 436 <Reference name="Microsoft.JScript"/>
437 <Reference name="libTerrain-BSD.dll"/> 437 <Reference name="libTerrain-BSD.dll"/>
438 <Reference name="openjpegnet.dll" /> 438 <Reference name="openjpegnet.dll" />
439 439
440 <Files> 440 <Files>
441 <Match pattern="*.cs" recurse="true"/> 441 <Match pattern="*.cs" recurse="true"/>
442 </Files> 442 </Files>
443 </Project> 443 </Project>
444 444
445 445
446 <Project name="OpenSim.Framework.Data.DB4o" path="OpenSim/Framework/Data.DB4o" type="Library"> 446 <Project name="OpenSim.Framework.Data.DB4o" path="OpenSim/Framework/Data.DB4o" type="Library">
447 <Configuration name="Debug"> 447 <Configuration name="Debug">
448 <Options> 448 <Options>
449 <OutputPath>../../../bin/</OutputPath> 449 <OutputPath>../../../bin/</OutputPath>
450 </Options> 450 </Options>
451 </Configuration> 451 </Configuration>
452 <Configuration name="Release"> 452 <Configuration name="Release">
453 <Options> 453 <Options>
454 <OutputPath>../../../bin/</OutputPath> 454 <OutputPath>../../../bin/</OutputPath>
455 </Options> 455 </Options>
456 </Configuration> 456 </Configuration>
457 457
458 <ReferencePath>../../../bin/</ReferencePath> 458 <ReferencePath>../../../bin/</ReferencePath>
459 <Reference name="System" localCopy="false"/> 459 <Reference name="System" localCopy="false"/>
460 <Reference name="System.Xml"/> 460 <Reference name="System.Xml"/>
461 <Reference name="System.Data"/> 461 <Reference name="System.Data"/>
462 <Reference name="OpenSim.Framework.Data"/> 462 <Reference name="OpenSim.Framework.Data"/>
463 <Reference name="libsecondlife.dll"/> 463 <Reference name="libsecondlife.dll"/>
464 <Reference name="Db4objects.Db4o.dll"/> 464 <Reference name="Db4objects.Db4o.dll"/>
465 <Files> 465 <Files>
466 <Match pattern="*.cs" recurse="true"/> 466 <Match pattern="*.cs" recurse="true"/>
467 </Files> 467 </Files>
468 </Project> 468 </Project>
469 469
470 <Project name="OpenSim.Framework.UserManagement" path="OpenSim/Framework/UserManager" type="Library"> 470 <Project name="OpenSim.Framework.UserManagement" path="OpenSim/Framework/UserManager" type="Library">
471 <Configuration name="Debug"> 471 <Configuration name="Debug">
472 <Options> 472 <Options>
473 <OutputPath>../../../bin/</OutputPath> 473 <OutputPath>../../../bin/</OutputPath>
474 </Options> 474 </Options>
475 </Configuration> 475 </Configuration>
476 <Configuration name="Release"> 476 <Configuration name="Release">
477 <Options> 477 <Options>
478 <OutputPath>../../../bin/</OutputPath> 478 <OutputPath>../../../bin/</OutputPath>
479 </Options> 479 </Options>
480 </Configuration> 480 </Configuration>
481 481
482 <ReferencePath>../../../bin/</ReferencePath> 482 <ReferencePath>../../../bin/</ReferencePath>
483 <Reference name="System" localCopy="false"/> 483 <Reference name="System" localCopy="false"/>
484 <Reference name="System.Data" localCopy="false"/> 484 <Reference name="System.Data" localCopy="false"/>
485 <Reference name="System.Xml" localCopy="false"/> 485 <Reference name="System.Xml" localCopy="false"/>
486 <Reference name="XMLRPC.dll"/> 486 <Reference name="XMLRPC.dll"/>
487 <Reference name="OpenSim.Framework"/> 487 <Reference name="OpenSim.Framework"/>
488 <Reference name="OpenSim.Framework.Console"/> 488 <Reference name="OpenSim.Framework.Console"/>
489 <Reference name="OpenSim.Framework.Data"/> 489 <Reference name="OpenSim.Framework.Data"/>
490 <Reference name="OpenSim.Framework.GenericConfig.Xml"/> 490 <Reference name="OpenSim.Framework.GenericConfig.Xml"/>
491 <Reference name="OpenSim.Framework.Servers"/> 491 <Reference name="OpenSim.Framework.Servers"/>
492 <Reference name="libsecondlife.dll"/> 492 <Reference name="libsecondlife.dll"/>
493 <Reference name="Db4objects.Db4o.dll"/> 493 <Reference name="Db4objects.Db4o.dll"/>
494 494
495 <Files> 495 <Files>
496 <Match pattern="*.cs" recurse="true"/> 496 <Match pattern="*.cs" recurse="true"/>
497 </Files> 497 </Files>
498 </Project> 498 </Project>
499 499
500 <!-- OpenSim.Framework.Communications --> 500 <!-- OpenSim.Framework.Communications -->
501 <Project name="OpenSim.Framework.Communications" path="OpenSim/Framework/Communications" type="Library"> 501 <Project name="OpenSim.Framework.Communications" path="OpenSim/Framework/Communications" type="Library">
502 <Configuration name="Debug"> 502 <Configuration name="Debug">
503 <Options> 503 <Options>
504 <OutputPath>../../../bin/</OutputPath> 504 <OutputPath>../../../bin/</OutputPath>
505 </Options> 505 </Options>
506 </Configuration> 506 </Configuration>
507 <Configuration name="Release"> 507 <Configuration name="Release">
508 <Options> 508 <Options>
509 <OutputPath>../../../bin/</OutputPath> 509 <OutputPath>../../../bin/</OutputPath>
510 </Options> 510 </Options>
511 </Configuration> 511 </Configuration>
512 512
513 <ReferencePath>../../../bin/</ReferencePath> 513 <ReferencePath>../../../bin/</ReferencePath>
514 <Reference name="System"/> 514 <Reference name="System"/>
515 <Reference name="System.Xml"/> 515 <Reference name="System.Xml"/>
516 <Reference name="OpenSim.Framework"/> 516 <Reference name="OpenSim.Framework"/>
517 <Reference name="OpenSim.Framework.Data" /> 517 <Reference name="OpenSim.Framework.Data" />
518 <Reference name="OpenSim.Framework.Servers"/> 518 <Reference name="OpenSim.Framework.Servers"/>
519 <Reference name="libsecondlife.dll"/> 519 <Reference name="libsecondlife.dll"/>
520 520
521 <Files> 521 <Files>
522 <Match pattern="*.cs" recurse="true"/> 522 <Match pattern="*.cs" recurse="true"/>
523 </Files> 523 </Files>
524 </Project> 524 </Project>
525 525
526 <Project name="OpenSim.Region.Communications.OGS1" path="OpenSim/Region/Communications/OGS1" type="Library"> 526 <Project name="OpenSim.Region.Communications.OGS1" path="OpenSim/Region/Communications/OGS1" type="Library">
527 <Configuration name="Debug"> 527 <Configuration name="Debug">
528 <Options> 528 <Options>
529 <OutputPath>../../../../bin/</OutputPath> 529 <OutputPath>../../../../bin/</OutputPath>
530 </Options> 530 </Options>
531 </Configuration> 531 </Configuration>
532 <Configuration name="Release"> 532 <Configuration name="Release">
533 <Options> 533 <Options>
534 <OutputPath>../../../../bin/</OutputPath> 534 <OutputPath>../../../../bin/</OutputPath>
535 </Options> 535 </Options>
536 </Configuration> 536 </Configuration>
537 537
538 <ReferencePath>../../../../bin/</ReferencePath> 538 <ReferencePath>../../../../bin/</ReferencePath>
539 <Reference name="System"/> 539 <Reference name="System"/>
540 <Reference name="System.Xml"/> 540 <Reference name="System.Xml"/>
541 <Reference name="System.Data"/> 541 <Reference name="System.Data"/>
542 <Reference name="System.Runtime.Remoting"/> 542 <Reference name="System.Runtime.Remoting"/>
543 <Reference name="OpenSim.Framework"/> 543 <Reference name="OpenSim.Framework"/>
544 <Reference name="OpenSim.Framework.Console"/> 544 <Reference name="OpenSim.Framework.Console"/>
545 <Reference name="OpenSim.Framework.Servers"/> 545 <Reference name="OpenSim.Framework.Servers"/>
546 <Reference name="OpenSim.Framework.Communications" /> 546 <Reference name="OpenSim.Framework.Communications" />
547 <Reference name="OpenSim.Framework.Data" /> 547 <Reference name="OpenSim.Framework.Data" />
548 <Reference name="libsecondlife.dll"/> 548 <Reference name="libsecondlife.dll"/>
549 <Reference name="XMLRPC.dll"/> 549 <Reference name="XMLRPC.dll"/>
550 550
551 <Files> 551 <Files>
552 <Match pattern="*.cs" recurse="true"/> 552 <Match pattern="*.cs" recurse="true"/>
553 </Files> 553 </Files>
554 </Project> 554 </Project>
555 555
556 <Project name="OpenSim.Region.Communications.Local" path="OpenSim/Region/Communications/Local" type="Library"> 556 <Project name="OpenSim.Region.Communications.Local" path="OpenSim/Region/Communications/Local" type="Library">
557 <Configuration name="Debug"> 557 <Configuration name="Debug">
558 <Options> 558 <Options>
559 <OutputPath>../../../../bin/</OutputPath> 559 <OutputPath>../../../../bin/</OutputPath>
560 </Options> 560 </Options>
561 </Configuration> 561 </Configuration>
562 <Configuration name="Release"> 562 <Configuration name="Release">
563 <Options> 563 <Options>
564 <OutputPath>../../../../bin/</OutputPath> 564 <OutputPath>../../../../bin/</OutputPath>
565 </Options> 565 </Options>
566 </Configuration> 566 </Configuration>
567 567
568 <ReferencePath>../../../../bin/</ReferencePath> 568 <ReferencePath>../../../../bin/</ReferencePath>
569 <Reference name="System"/> 569 <Reference name="System"/>
570 <Reference name="System.Xml"/> 570 <Reference name="System.Xml"/>
571 <Reference name="OpenSim.Framework.Communications"/> 571 <Reference name="OpenSim.Framework.Communications"/>
572 <Reference name="OpenSim.Framework.UserManagement" /> 572 <Reference name="OpenSim.Framework.UserManagement" />
573 <Reference name="OpenSim.Framework.Data" /> 573 <Reference name="OpenSim.Framework.Data" />
574 <Reference name="OpenSim.Framework.Servers"/> 574 <Reference name="OpenSim.Framework.Servers"/>
575 <Reference name="libsecondlife.dll"/> 575 <Reference name="libsecondlife.dll"/>
576 <Reference name="OpenSim.Framework"/> 576 <Reference name="OpenSim.Framework"/>
577 <Reference name="XMLRPC.dll"/> 577 <Reference name="XMLRPC.dll"/>
578 578
579 <Files> 579 <Files>
580 <Match pattern="*.cs" recurse="true"/> 580 <Match pattern="*.cs" recurse="true"/>
581 </Files> 581 </Files>
582 </Project> 582 </Project>
583 583
584 <Project name="OpenSim.Region.Environment" path="OpenSim/Region/Environment" type="Library"> 584 <Project name="OpenSim.Region.Environment" path="OpenSim/Region/Environment" type="Library">
585 <Configuration name="Debug"> 585 <Configuration name="Debug">
586 <Options> 586 <Options>
587 <OutputPath>../../../bin/</OutputPath> 587 <OutputPath>../../../bin/</OutputPath>
588 </Options> 588 </Options>
589 </Configuration> 589 </Configuration>
590 <Configuration name="Release"> 590 <Configuration name="Release">
591 <Options> 591 <Options>
592 <OutputPath>../../../bin/</OutputPath> 592 <OutputPath>../../../bin/</OutputPath>
593 </Options> 593 </Options>
594 </Configuration> 594 </Configuration>
595 595
596 <ReferencePath>../../../bin/</ReferencePath> 596 <ReferencePath>../../../bin/</ReferencePath>
597 <Reference name="System" localCopy="false"/> 597 <Reference name="System" localCopy="false"/>
598 <Reference name="System.Xml"/> 598 <Reference name="System.Xml"/>
599 <Reference name="libsecondlife.dll"/> 599 <Reference name="libsecondlife.dll"/>
600 <Reference name="Axiom.MathLib.dll"/> 600 <Reference name="Axiom.MathLib.dll"/>
601 <Reference name="Db4objects.Db4o.dll"/> 601 <Reference name="Db4objects.Db4o.dll"/>
602 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 602 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
603 <Reference name="OpenSim.Framework"/> 603 <Reference name="OpenSim.Framework"/>
604 <Reference name="OpenSim.Framework.Console"/> 604 <Reference name="OpenSim.Framework.Console"/>
605 <Reference name="OpenSim.Framework.GenericConfig.Xml"/> 605 <Reference name="OpenSim.Framework.GenericConfig.Xml"/>
606 <Reference name="OpenSim.Region.Physics.Manager"/> 606 <Reference name="OpenSim.Region.Physics.Manager"/>
607 <Reference name="OpenSim.Framework.Servers"/> 607 <Reference name="OpenSim.Framework.Servers"/>
608 <Reference name="OpenSim.Region.Caches"/> 608 <Reference name="OpenSim.Region.Caches"/>
609 <Reference name="OpenSim.Region.Capabilities"/> 609 <Reference name="OpenSim.Region.Capabilities"/>
610 <!-- For scripting in funny languages by default --> 610 <!-- For scripting in funny languages by default -->
611 <Reference name="Microsoft.JScript"/> 611 <Reference name="Microsoft.JScript"/>
612 <Reference name="XMLRPC.dll"/> 612 <Reference name="XMLRPC.dll"/>
613 <Reference name="OpenSim.Framework.Communications"/> 613 <Reference name="OpenSim.Framework.Communications"/>
614 614
615 <Files> 615 <Files>
616 <Match pattern="*.cs" recurse="true"/> 616 <Match pattern="*.cs" recurse="true"/>
617 </Files> 617 </Files>
618 </Project> 618 </Project>
619 619
620 <Project name="OpenSim.Region.ClientStack" path="OpenSim/Region/ClientStack" type="Library"> 620 <Project name="OpenSim.Region.ClientStack" path="OpenSim/Region/ClientStack" type="Library">
621 <Configuration name="Debug"> 621 <Configuration name="Debug">
622 <Options> 622 <Options>
623 <OutputPath>../../../bin/</OutputPath> 623 <OutputPath>../../../bin/</OutputPath>
624 </Options> 624 </Options>
625 </Configuration> 625 </Configuration>
626 <Configuration name="Release"> 626 <Configuration name="Release">
627 <Options> 627 <Options>
628 <OutputPath>../../../bin/</OutputPath> 628 <OutputPath>../../../bin/</OutputPath>
629 </Options> 629 </Options>
630 </Configuration> 630 </Configuration>
631 631
632 <ReferencePath>../../../bin/</ReferencePath> 632 <ReferencePath>../../../bin/</ReferencePath>
633 <Reference name="System" localCopy="false"/> 633 <Reference name="System" localCopy="false"/>
634 <Reference name="System.Xml"/> 634 <Reference name="System.Xml"/>
635 <Reference name="libsecondlife.dll"/> 635 <Reference name="libsecondlife.dll"/>
636 <Reference name="Axiom.MathLib.dll"/> 636 <Reference name="Axiom.MathLib.dll"/>
637 <Reference name="Db4objects.Db4o.dll"/> 637 <Reference name="Db4objects.Db4o.dll"/>
638 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 638 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
639 <Reference name="OpenSim.Region.Environment"/> 639 <Reference name="OpenSim.Region.Environment"/>
640 <Reference name="OpenSim.Framework"/> 640 <Reference name="OpenSim.Framework"/>
641 <Reference name="OpenSim.Framework.Console"/> 641 <Reference name="OpenSim.Framework.Console"/>
642 <Reference name="OpenSim.Region.Physics.Manager"/> 642 <Reference name="OpenSim.Region.Physics.Manager"/>
643 <Reference name="OpenSim.Framework.Servers"/> 643 <Reference name="OpenSim.Framework.Servers"/>
644 <Reference name="OpenSim.Region.Caches"/> 644 <Reference name="OpenSim.Region.Caches"/>
645 <Reference name="OpenSim.Framework.Data"/> 645 <Reference name="OpenSim.Framework.Data"/>
646 <Reference name="XMLRPC.dll"/> 646 <Reference name="XMLRPC.dll"/>
647 647
648 <Files> 648 <Files>
649 <Match pattern="*.cs" recurse="true"/> 649 <Match pattern="*.cs" recurse="true"/>
650 </Files> 650 </Files>
651 </Project> 651 </Project>
652 652
653 <!-- Datastore Plugins --> 653 <!-- Datastore Plugins -->
654 <Project name="OpenSim.DataStore.NullStorage" path="OpenSim/Region/Storage/OpenSim.DataStore.NullStorage" type="Library"> 654 <Project name="OpenSim.DataStore.NullStorage" path="OpenSim/Region/Storage/OpenSim.DataStore.NullStorage" type="Library">
655 <Configuration name="Debug"> 655 <Configuration name="Debug">
656 <Options> 656 <Options>
657 <OutputPath>../../../../bin/</OutputPath> 657 <OutputPath>../../../../bin/</OutputPath>
658 </Options> 658 </Options>
659 </Configuration> 659 </Configuration>
660 <Configuration name="Release"> 660 <Configuration name="Release">
661 <Options> 661 <Options>
662 <OutputPath>../../../../bin/</OutputPath> 662 <OutputPath>../../../../bin/</OutputPath>
663 </Options> 663 </Options>
664 </Configuration> 664 </Configuration>
665 665
666 <ReferencePath>../../../../bin/</ReferencePath> 666 <ReferencePath>../../../../bin/</ReferencePath>
667 <Reference name="System" localCopy="false"/> 667 <Reference name="System" localCopy="false"/>
668 <Reference name="System.Xml"/> 668 <Reference name="System.Xml"/>
669 <Reference name="Db4objects.Db4o.dll"/> 669 <Reference name="Db4objects.Db4o.dll"/>
670 <Reference name="libsecondlife.dll"/> 670 <Reference name="libsecondlife.dll"/>
671 <Reference name="OpenSim.Framework"/> 671 <Reference name="OpenSim.Framework"/>
672 <Reference name="OpenSim.Region.Environment"/> 672 <Reference name="OpenSim.Region.Environment"/>
673 <Reference name="OpenSim.Framework.Console"/> 673 <Reference name="OpenSim.Framework.Console"/>
674 <Files> 674 <Files>
675 <Match pattern="*.cs" recurse="true"/> 675 <Match pattern="*.cs" recurse="true"/>
676 </Files> 676 </Files>
677 </Project> 677 </Project>
678 678
679 679
680 <!-- OpenSim app --> 680 <!-- OpenSim app -->
681 <Project name="OpenSim" path="OpenSim/Region/Application" type="Exe"> 681 <Project name="OpenSim" path="OpenSim/Region/Application" type="Exe">
682 <Configuration name="Debug"> 682 <Configuration name="Debug">
683 <Options> 683 <Options>
684 <OutputPath>../../../bin/</OutputPath> 684 <OutputPath>../../../bin/</OutputPath>
685 </Options> 685 </Options>
686 </Configuration> 686 </Configuration>
687 <Configuration name="Release"> 687 <Configuration name="Release">
688 <Options> 688 <Options>
689 <OutputPath>../../../bin/</OutputPath> 689 <OutputPath>../../../bin/</OutputPath>
690 </Options> 690 </Options>
691 </Configuration> 691 </Configuration>
692 692
693 <ReferencePath>../../../bin/</ReferencePath> 693 <ReferencePath>../../../bin/</ReferencePath>
694 <Reference name="System" localCopy="false"/> 694 <Reference name="System" localCopy="false"/>
695 <Reference name="System.Xml"/> 695 <Reference name="System.Xml"/>
696 <Reference name="libsecondlife.dll"/> 696 <Reference name="libsecondlife.dll"/>
697 <Reference name="Axiom.MathLib.dll"/> 697 <Reference name="Axiom.MathLib.dll"/>
698 <Reference name="Db4objects.Db4o.dll"/> 698 <Reference name="Db4objects.Db4o.dll"/>
699 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 699 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
700 <Reference name="OpenSim.Framework"/> 700 <Reference name="OpenSim.Framework"/>
701 <Reference name="OpenSim.Framework.Data"/> 701 <Reference name="OpenSim.Framework.Data"/>
702 <Reference name="OpenSim.Framework.Console"/> 702 <Reference name="OpenSim.Framework.Console"/>
703 <Reference name="OpenSim.Region.Physics.Manager"/> 703 <Reference name="OpenSim.Region.Physics.Manager"/>
704 <Reference name="OpenSim.Framework.Servers"/> 704 <Reference name="OpenSim.Framework.Servers"/>
705 <Reference name="OpenSim.Region.Environment"/> 705 <Reference name="OpenSim.Region.Environment"/>
706 <Reference name="OpenSim.Region.ClientStack"/> 706 <Reference name="OpenSim.Region.ClientStack"/>
707 <Reference name="OpenSim.Framework.GenericConfig.Xml"/> 707 <Reference name="OpenSim.Framework.GenericConfig.Xml"/>
708 <Reference name="OpenSim.Framework.Communications"/> 708 <Reference name="OpenSim.Framework.Communications"/>
709 <Reference name="OpenSim.Region.Communications.OGS1"/> 709 <Reference name="OpenSim.Region.Communications.OGS1"/>
710 <Reference name="OpenSim.Region.Caches"/> 710 <Reference name="OpenSim.Region.Caches"/>
711 <Reference name="XMLRPC.dll"/> 711 <Reference name="XMLRPC.dll"/>
712 <Reference name="OpenSim.Framework.UserManagement" /> 712 <Reference name="OpenSim.Framework.UserManagement" />
713 <Reference name="OpenSim.Region.Communications.Local"/> 713 <Reference name="OpenSim.Region.Communications.Local"/>
714 714
715 <Files> 715 <Files>
716 <Match pattern="*.cs" recurse="true"/> 716 <Match pattern="*.cs" recurse="true"/>
717 </Files> 717 </Files>
718 </Project> 718 </Project>
719 719
720 <!-- Scene Server API Example Apps --> 720 <!-- Scene Server API Example Apps -->
721 721
722 <Project name="SimpleApp" path="OpenSim/Region/Examples/SimpleApp" type="Exe"> 722 <Project name="SimpleApp" path="OpenSim/Region/Examples/SimpleApp" type="Exe">
723 <Configuration name="Debug"> 723 <Configuration name="Debug">
724 <Options> 724 <Options>
725 <OutputPath>../../../../bin/</OutputPath> 725 <OutputPath>../../../../bin/</OutputPath>
726 </Options> 726 </Options>
727 </Configuration> 727 </Configuration>
728 <Configuration name="Release"> 728 <Configuration name="Release">
729 <Options> 729 <Options>
730 <OutputPath>../../../../bin/</OutputPath> 730 <OutputPath>../../../../bin/</OutputPath>
731 </Options> 731 </Options>
732 </Configuration> 732 </Configuration>
733 733
734 <ReferencePath>../../../../bin/</ReferencePath> 734 <ReferencePath>../../../../bin/</ReferencePath>
735 <ReferencePath>../../../../bin/Physics/</ReferencePath> 735 <ReferencePath>../../../../bin/Physics/</ReferencePath>
736 736
737 <Reference name="libsecondlife.dll"/> 737 <Reference name="libsecondlife.dll"/>
738 <Reference name="System" localCopy="false"/> 738 <Reference name="System" localCopy="false"/>
739 <Reference name="System.Data.dll"/> 739 <Reference name="System.Data.dll"/>
740 <Reference name="System.Xml"/> 740 <Reference name="System.Xml"/>
741 741
742 <Reference name="OpenSim.Framework.Console"/> 742 <Reference name="OpenSim.Framework.Console"/>
743 <Reference name="OpenSim.Framework"/> 743 <Reference name="OpenSim.Framework"/>
744 <Reference name="OpenSim.Framework.UserManagement"/> 744 <Reference name="OpenSim.Framework.UserManagement"/>
745 <Reference name="OpenSim.Framework.Data"/> 745 <Reference name="OpenSim.Framework.Data"/>
746 <Reference name="OpenSim.Region.Physics.Manager"/> 746 <Reference name="OpenSim.Region.Physics.Manager"/>
747 <Reference name="OpenSim.Region.Capabilities"/> 747 <Reference name="OpenSim.Region.Capabilities"/>
748 <Reference name="XMLRPC.dll"/> 748 <Reference name="XMLRPC.dll"/>
749 <Reference name="OpenSim.Region.GridInterfaces.Local"/> 749 <Reference name="OpenSim.Region.GridInterfaces.Local"/>
750 <Reference name="OpenSim.Framework.Servers"/> 750 <Reference name="OpenSim.Framework.Servers"/>
751 <Reference name="OpenSim.Framework.Communications"/> 751 <Reference name="OpenSim.Framework.Communications"/>
752 <Reference name="OpenSim.Region.Communications.Local"/> 752 <Reference name="OpenSim.Region.Communications.Local"/>
753 <Reference name="OpenSim.Region.Caches"/> 753 <Reference name="OpenSim.Region.Caches"/>
754 <Reference name="OpenSim.Region.ClientStack"/> 754 <Reference name="OpenSim.Region.ClientStack"/>
755 <Reference name="OpenSim.Region.Environment"/> 755 <Reference name="OpenSim.Region.Environment"/>
756 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 756 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
757 757
758 758
759 <Files> 759 <Files>
760 <Match pattern="*.cs" recurse="true"/> 760 <Match pattern="*.cs" recurse="true"/>
761 </Files> 761 </Files>
762 </Project> 762 </Project>
763 763
764 <Project name="OpenSim.Framework.Data.MySQL" path="OpenSim/Framework/Data.MySQL" type="Library"> 764 <Project name="OpenSim.Framework.Data.MySQL" path="OpenSim/Framework/Data.MySQL" type="Library">
765 <Configuration name="Debug"> 765 <Configuration name="Debug">
766 <Options> 766 <Options>
767 <OutputPath>../../../bin/</OutputPath> 767 <OutputPath>../../../bin/</OutputPath>
768 </Options> 768 </Options>
769 </Configuration> 769 </Configuration>
770 <Configuration name="Release"> 770 <Configuration name="Release">
771 <Options> 771 <Options>
772 <OutputPath>../../../bin/</OutputPath> 772 <OutputPath>../../../bin/</OutputPath>
773 </Options> 773 </Options>
774 </Configuration> 774 </Configuration>
775 775
776 <ReferencePath>../../../bin/</ReferencePath> 776 <ReferencePath>../../../bin/</ReferencePath>
777 <Reference name="System" localCopy="false"/> 777 <Reference name="System" localCopy="false"/>
778 <Reference name="System.Xml"/> 778 <Reference name="System.Xml"/>
779 <Reference name="System.Data"/> 779 <Reference name="System.Data"/>
780 <Reference name="OpenSim.Framework.Data"/> 780 <Reference name="OpenSim.Framework.Data"/>
781 <Reference name="libsecondlife.dll"/> 781 <Reference name="libsecondlife.dll"/>
782 <Reference name="MySql.Data.dll"/> 782 <Reference name="MySql.Data.dll"/>
783 <Files> 783 <Files>
784 <Match pattern="*.cs" recurse="true"/> 784 <Match pattern="*.cs" recurse="true"/>
785 </Files> 785 </Files>
786 </Project> 786 </Project>
787 787
788 <Project name="OpenSim.Framework.Data.MSSQL" path="OpenSim/Framework/Data.MSSQL" type="Library"> 788 <Project name="OpenSim.Framework.Data.MSSQL" path="OpenSim/Framework/Data.MSSQL" type="Library">
789 <Configuration name="Debug"> 789 <Configuration name="Debug">
790 <Options> 790 <Options>
791 <OutputPath>../../../bin/</OutputPath> 791 <OutputPath>../../../bin/</OutputPath>
792 </Options> 792 </Options>
793 </Configuration> 793 </Configuration>
794 <Configuration name="Release"> 794 <Configuration name="Release">
795 <Options> 795 <Options>
796 <OutputPath>../../../bin/</OutputPath> 796 <OutputPath>../../../bin/</OutputPath>
797 </Options> 797 </Options>
798 </Configuration> 798 </Configuration>
799 799
800 <ReferencePath>../../../bin/</ReferencePath> 800 <ReferencePath>../../../bin/</ReferencePath>
801 <Reference name="System" localCopy="false"/> 801 <Reference name="System" localCopy="false"/>
802 <Reference name="System.Xml"/> 802 <Reference name="System.Xml"/>
803 <Reference name="System.Data"/> 803 <Reference name="System.Data"/>
804 <Reference name="OpenSim.Framework.Data"/> 804 <Reference name="OpenSim.Framework.Data"/>
805 <Reference name="libsecondlife.dll"/> 805 <Reference name="libsecondlife.dll"/>
806 <Files> 806 <Files>
807 <Match pattern="*.cs" recurse="true"/> 807 <Match pattern="*.cs" recurse="true"/>
808 </Files> 808 </Files>
809 </Project> 809 </Project>
810 810
811 <Project name="OpenSim.Framework.Data.SQLite" path="OpenSim/Framework/Data.SQLite" type="Library"> 811 <Project name="OpenSim.Framework.Data.SQLite" path="OpenSim/Framework/Data.SQLite" type="Library">
812 <Configuration name="Debug"> 812 <Configuration name="Debug">
813 <Options> 813 <Options>
814 <OutputPath>../../../bin/</OutputPath> 814 <OutputPath>../../../bin/</OutputPath>
815 </Options> 815 </Options>
816 </Configuration> 816 </Configuration>
817 <Configuration name="Release"> 817 <Configuration name="Release">
818 <Options> 818 <Options>
819 <OutputPath>../../../bin/</OutputPath> 819 <OutputPath>../../../bin/</OutputPath>
820 </Options> 820 </Options>
821 </Configuration> 821 </Configuration>
822 822
823 <ReferencePath>../../../bin/</ReferencePath> 823 <ReferencePath>../../../bin/</ReferencePath>
824 <Reference name="System" localCopy="false"/> 824 <Reference name="System" localCopy="false"/>
825 <Reference name="System.Xml"/> 825 <Reference name="System.Xml"/>
826 <Reference name="System.Data"/> 826 <Reference name="System.Data"/>
827 <Reference name="System.Data.SQLite.dll"/> 827 <Reference name="System.Data.SQLite.dll"/>
828 <Reference name="OpenSim.Framework.Data"/> 828 <Reference name="OpenSim.Framework.Data"/>
829 <Reference name="libsecondlife.dll"/> 829 <Reference name="libsecondlife.dll"/>
830 <Files> 830 <Files>
831 <Match pattern="*.cs" recurse="true"/> 831 <Match pattern="*.cs" recurse="true"/>
832 </Files> 832 </Files>
833 </Project> 833 </Project>
834 834
835 <!-- OGS projects --> 835 <!-- OGS projects -->
836 836
837 <Project name="OpenSim.Grid.Framework.Manager" path="OpenSim/Grid/Framework.Manager" type="Library"> 837 <Project name="OpenSim.Grid.Framework.Manager" path="OpenSim/Grid/Framework.Manager" type="Library">
838 <Configuration name="Debug"> 838 <Configuration name="Debug">
839 <Options> 839 <Options>
840 <OutputPath>../../../bin/</OutputPath> 840 <OutputPath>../../../bin/</OutputPath>
841 </Options> 841 </Options>
842 </Configuration> 842 </Configuration>
843 <Configuration name="Release"> 843 <Configuration name="Release">
844 <Options> 844 <Options>
845 <OutputPath>../../../bin/</OutputPath> 845 <OutputPath>../../../bin/</OutputPath>
846 </Options> 846 </Options>
847 </Configuration> 847 </Configuration>
848 848
849 <ReferencePath>../../../bin/</ReferencePath> 849 <ReferencePath>../../../bin/</ReferencePath>
850 <Reference name="System" localCopy="false"/> 850 <Reference name="System" localCopy="false"/>
851 <Reference name="OpenSim.Framework"/> 851 <Reference name="OpenSim.Framework"/>
852 <Reference name="OpenSim.Framework.Servers"/> 852 <Reference name="OpenSim.Framework.Servers"/>
853 <Reference name="libsecondlife.dll"/> 853 <Reference name="libsecondlife.dll"/>
854 <Reference name="XMLRPC.dll"/> 854 <Reference name="XMLRPC.dll"/>
855 855
856 856
857 <Files> 857 <Files>
858 <Match pattern="*.cs" recurse="true"/> 858 <Match pattern="*.cs" recurse="true"/>
859 </Files> 859 </Files>
860 </Project> 860 </Project>
861 861
862 <Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe"> 862 <Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe">
863 <Configuration name="Debug"> 863 <Configuration name="Debug">
864 <Options> 864 <Options>
865 <OutputPath>../../../bin/</OutputPath> 865 <OutputPath>../../../bin/</OutputPath>
866 </Options> 866 </Options>
867 </Configuration> 867 </Configuration>
868 <Configuration name="Release"> 868 <Configuration name="Release">
869 <Options> 869 <Options>
870 <OutputPath>../../../bin/</OutputPath> 870 <OutputPath>../../../bin/</OutputPath>
871 </Options> 871 </Options>
872 </Configuration> 872 </Configuration>
873 873
874 <ReferencePath>../../../bin/</ReferencePath> 874 <ReferencePath>../../../bin/</ReferencePath>
875 <Reference name="System" localCopy="false"/> 875 <Reference name="System" localCopy="false"/>
876 <Reference name="System.Data" localCopy="false"/> 876 <Reference name="System.Data" localCopy="false"/>
877 <Reference name="System.Xml" localCopy="false"/> 877 <Reference name="System.Xml" localCopy="false"/>
878 <Reference name="OpenSim.Framework"/> 878 <Reference name="OpenSim.Framework"/>
879 <Reference name="OpenSim.Framework.Console"/> 879 <Reference name="OpenSim.Framework.Console"/>
880 <Reference name="OpenSim.Framework.Servers"/> 880 <Reference name="OpenSim.Framework.Servers"/>
881 <Reference name="OpenSim.Framework.Data"/> 881 <Reference name="OpenSim.Framework.Data"/>
882 <Reference name="OpenSim.Grid.Framework.Manager"/> 882 <Reference name="OpenSim.Grid.Framework.Manager"/>
883 <Reference name="OpenSim.Framework.GenericConfig.Xml"/> 883 <Reference name="OpenSim.Framework.GenericConfig.Xml"/>
884 <Reference name="libsecondlife.dll"/> 884 <Reference name="libsecondlife.dll"/>
885 <Reference name="Db4objects.Db4o.dll"/> 885 <Reference name="Db4objects.Db4o.dll"/>
886 <Reference name="XMLRPC.dll"/> 886 <Reference name="XMLRPC.dll"/>
887 887
888 <Files> 888 <Files>
889 <Match pattern="*.cs" recurse="true"/> 889 <Match pattern="*.cs" recurse="true"/>
890 </Files> 890 </Files>
891 </Project> 891 </Project>
892 892
893 <Project name="OpenSim.Grid.AssetServer" path="OpenSim/Grid/AssetServer" type="Exe"> 893 <Project name="OpenSim.Grid.AssetServer" path="OpenSim/Grid/AssetServer" type="Exe">
894 <Configuration name="Debug"> 894 <Configuration name="Debug">
895 <Options> 895 <Options>
896 <OutputPath>../../../bin/</OutputPath> 896 <OutputPath>../../../bin/</OutputPath>
897 </Options> 897 </Options>
898 </Configuration> 898 </Configuration>
899 <Configuration name="Release"> 899 <Configuration name="Release">
900 <Options> 900 <Options>
901 <OutputPath>../../../bin/</OutputPath> 901 <OutputPath>../../../bin/</OutputPath>
902 </Options> 902 </Options>
903 </Configuration> 903 </Configuration>
904 904
905 <ReferencePath>../../../bin/</ReferencePath> 905 <ReferencePath>../../../bin/</ReferencePath>
906 <Reference name="System" localCopy="false"/> 906 <Reference name="System" localCopy="false"/>
907 <Reference name="System.Data" localCopy="false"/> 907 <Reference name="System.Data" localCopy="false"/>
908 <Reference name="System.Xml" localCopy="false"/> 908 <Reference name="System.Xml" localCopy="false"/>
909 <Reference name="OpenSim.Framework"/> 909 <Reference name="OpenSim.Framework"/>
910 <Reference name="OpenSim.Framework.Console"/> 910 <Reference name="OpenSim.Framework.Console"/>
911 <Reference name="OpenSim.Framework.Servers"/> 911 <Reference name="OpenSim.Framework.Servers"/>
912 <Reference name="libsecondlife.dll"/> 912 <Reference name="libsecondlife.dll"/>
913 <Reference name="Db4objects.Db4o.dll"/> 913 <Reference name="Db4objects.Db4o.dll"/>
914 <Reference name="XMLRPC.dll"/> 914 <Reference name="XMLRPC.dll"/>
915 915
916 <Files> 916 <Files>
917 <Match pattern="*.cs" recurse="true"/> 917 <Match pattern="*.cs" recurse="true"/>
918 </Files> 918 </Files>
919 </Project> 919 </Project>
920 920
921 921
922 <Project name="OpenSim.Grid.UserServer" path="OpenSim/Grid/UserServer" type="Exe"> 922 <Project name="OpenSim.Grid.UserServer" path="OpenSim/Grid/UserServer" type="Exe">
923 <Configuration name="Debug"> 923 <Configuration name="Debug">
924 <Options> 924 <Options>
925 <OutputPath>../../../bin/</OutputPath> 925 <OutputPath>../../../bin/</OutputPath>
926 </Options> 926 </Options>
927 </Configuration> 927 </Configuration>
928 <Configuration name="Release"> 928 <Configuration name="Release">
929 <Options> 929 <Options>
930 <OutputPath>../../../bin/</OutputPath> 930 <OutputPath>../../../bin/</OutputPath>
931 </Options> 931 </Options>
932 </Configuration> 932 </Configuration>
933 933
934 <ReferencePath>../../../bin/</ReferencePath> 934 <ReferencePath>../../../bin/</ReferencePath>
935 <Reference name="System" localCopy="false"/> 935 <Reference name="System" localCopy="false"/>
936 <Reference name="System.Data" localCopy="false"/> 936 <Reference name="System.Data" localCopy="false"/>
937 <Reference name="System.Xml" localCopy="false"/> 937 <Reference name="System.Xml" localCopy="false"/>
938 <Reference name="OpenSim.Framework"/> 938 <Reference name="OpenSim.Framework"/>
939 <Reference name="OpenSim.Framework.Console"/> 939 <Reference name="OpenSim.Framework.Console"/>
940 <Reference name="OpenSim.Framework.Data"/> 940 <Reference name="OpenSim.Framework.Data"/>
941 <Reference name="OpenSim.Framework.GenericConfig.Xml"/> 941 <Reference name="OpenSim.Framework.GenericConfig.Xml"/>
942 <Reference name="OpenSim.Framework.Servers"/> 942 <Reference name="OpenSim.Framework.Servers"/>
943 <Reference name="OpenSim.Framework.UserManagement" /> 943 <Reference name="OpenSim.Framework.UserManagement" />
944 <Reference name="libsecondlife.dll"/> 944 <Reference name="libsecondlife.dll"/>
945 <Reference name="Db4objects.Db4o.dll"/> 945 <Reference name="Db4objects.Db4o.dll"/>
946 <Reference name="XMLRPC.dll"/> 946 <Reference name="XMLRPC.dll"/>
947 947
948 <Files> 948 <Files>
949 <Match pattern="*.cs" recurse="true"/> 949 <Match pattern="*.cs" recurse="true"/>
950 </Files> 950 </Files>
951 </Project> 951 </Project>
952 952
953 <Project name="OpenSim.Grid.GridServer.Config" path="OpenSim/Grid/GridServer.Config" type="Library"> 953 <Project name="OpenSim.Grid.GridServer.Config" path="OpenSim/Grid/GridServer.Config" type="Library">
954 <Configuration name="Debug"> 954 <Configuration name="Debug">
955 <Options> 955 <Options>
956 <OutputPath>../../../bin/</OutputPath> 956 <OutputPath>../../../bin/</OutputPath>
957 </Options> 957 </Options>
958 </Configuration> 958 </Configuration>
959 <Configuration name="Release"> 959 <Configuration name="Release">
960 <Options> 960 <Options>
961 <OutputPath>../../../bin/</OutputPath> 961 <OutputPath>../../../bin/</OutputPath>
962 </Options> 962 </Options>
963 </Configuration> 963 </Configuration>
964 964
965 <ReferencePath>../../../bin/</ReferencePath> 965 <ReferencePath>../../../bin/</ReferencePath>
966 <Reference name="System" localCopy="false"/> 966 <Reference name="System" localCopy="false"/>
967 <Reference name="System.Data.dll"/> 967 <Reference name="System.Data.dll"/>
968 <Reference name="System.Xml"/> 968 <Reference name="System.Xml"/>
969 <Reference name="libsecondlife.dll"/> 969 <Reference name="libsecondlife.dll"/>
970 <Reference name="Db4objects.Db4o.dll"/> 970 <Reference name="Db4objects.Db4o.dll"/>
971 <Reference name="OpenSim.Framework"/> 971 <Reference name="OpenSim.Framework"/>
972 <Reference name="OpenSim.Framework.Console"/> 972 <Reference name="OpenSim.Framework.Console"/>
973 <Files> 973 <Files>
974 <Match pattern="*.cs" recurse="true"/> 974 <Match pattern="*.cs" recurse="true"/>
975 </Files> 975 </Files>
976 </Project> 976 </Project>
977 977
978 <Project name="OpenSim.Grid.UserServer.Config" path="OpenSim/Grid/UserServer.Config" type="Library"> 978 <Project name="OpenSim.Grid.UserServer.Config" path="OpenSim/Grid/UserServer.Config" type="Library">
979 <Configuration name="Debug"> 979 <Configuration name="Debug">
980 <Options> 980 <Options>
981 <OutputPath>../../../bin/</OutputPath> 981 <OutputPath>../../../bin/</OutputPath>
982 </Options> 982 </Options>
983 </Configuration> 983 </Configuration>
984 <Configuration name="Release"> 984 <Configuration name="Release">
985 <Options> 985 <Options>
986 <OutputPath>../../../bin/</OutputPath> 986 <OutputPath>../../../bin/</OutputPath>
987 </Options> 987 </Options>
988 </Configuration> 988 </Configuration>
989 989
990 <ReferencePath>../../../bin/</ReferencePath> 990 <ReferencePath>../../../bin/</ReferencePath>
991 <Reference name="System" localCopy="false"/> 991 <Reference name="System" localCopy="false"/>
992 <Reference name="System.Data.dll"/> 992 <Reference name="System.Data.dll"/>
993 <Reference name="System.Xml"/> 993 <Reference name="System.Xml"/>
994 <Reference name="libsecondlife.dll"/> 994 <Reference name="libsecondlife.dll"/>
995 <Reference name="Db4objects.Db4o.dll"/> 995 <Reference name="Db4objects.Db4o.dll"/>
996 <Reference name="OpenSim.Framework"/> 996 <Reference name="OpenSim.Framework"/>
997 <Reference name="OpenSim.Framework.Console"/> 997 <Reference name="OpenSim.Framework.Console"/>
998 <Files> 998 <Files>
999 <Match pattern="*.cs" recurse="true"/> 999 <Match pattern="*.cs" recurse="true"/>
1000 </Files> 1000 </Files>
1001 </Project> 1001 </Project>
1002 1002
1003 </Solution> 1003 </Solution>
1004 1004
1005 1005
1006 <!-- Prebuild tool --> 1006 <!-- Prebuild tool -->
1007 <Solution name="Prebuild" path="Prebuild/" > 1007 <Solution name="Prebuild" path="Prebuild/" >
1008 <Configuration name="Debug"> 1008 <Configuration name="Debug">
1009 <Options> 1009 <Options>
1010 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 1010 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
1011 <OptimizeCode>false</OptimizeCode> 1011 <OptimizeCode>false</OptimizeCode>
1012 <OutputPath>bin/Debug</OutputPath> 1012 <OutputPath>bin/Debug</OutputPath>
1013 <DebugInformation>true</DebugInformation> 1013 <DebugInformation>true</DebugInformation>
1014 <SuppressWarnings>1595</SuppressWarnings> 1014 <SuppressWarnings>1595</SuppressWarnings>
1015 </Options> 1015 </Options>
1016 </Configuration> 1016 </Configuration>
1017 <Configuration name="Release"> 1017 <Configuration name="Release">
1018 <Options> 1018 <Options>
1019 <CompilerDefines>TRACE</CompilerDefines> 1019 <CompilerDefines>TRACE</CompilerDefines>
1020 <OutputPath>bin/Release</OutputPath> 1020 <OutputPath>bin/Release</OutputPath>
1021 <OptimizeCode>true</OptimizeCode> 1021 <OptimizeCode>true</OptimizeCode>
1022 <DebugInformation>false</DebugInformation> 1022 <DebugInformation>false</DebugInformation>
1023 <SuppressWarnings>1595</SuppressWarnings> 1023 <SuppressWarnings>1595</SuppressWarnings>
1024 </Options> 1024 </Options>
1025 </Configuration> 1025 </Configuration>
1026 <Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> 1026 <Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
1027 <Configuration name="Debug"> 1027 <Configuration name="Debug">
1028 <Options> 1028 <Options>
1029 <CompilerDefines>DEBUG;TRACE</CompilerDefines> 1029 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
1030 <OptimizeCode>false</OptimizeCode> 1030 <OptimizeCode>false</OptimizeCode>
1031 <OutputPath>..\..\bin\</OutputPath> 1031 <OutputPath>..\..\bin\</OutputPath>
1032 <DebugInformation>true</DebugInformation> 1032 <DebugInformation>true</DebugInformation>
1033 <KeyFile>Prebuild.snk</KeyFile> 1033 <KeyFile>Prebuild.snk</KeyFile>
1034 <SuppressWarnings>1595</SuppressWarnings> 1034 <SuppressWarnings>1595</SuppressWarnings>
1035 </Options> 1035 </Options>
1036 </Configuration> 1036 </Configuration>
1037 <Configuration name="Release"> 1037 <Configuration name="Release">
1038 <Options> 1038 <Options>
1039 <CompilerDefines>TRACE</CompilerDefines> 1039 <CompilerDefines>TRACE</CompilerDefines>
1040 <OutputPath>..\..\bin\</OutputPath> 1040 <OutputPath>..\..\bin\</OutputPath>
1041 <OptimizeCode>true</OptimizeCode> 1041 <OptimizeCode>true</OptimizeCode>
1042 <DebugInformation>false</DebugInformation> 1042 <DebugInformation>false</DebugInformation>
1043 <KeyFile>Prebuild.snk</KeyFile> 1043 <KeyFile>Prebuild.snk</KeyFile>
1044 <SuppressWarnings>1595</SuppressWarnings> 1044 <SuppressWarnings>1595</SuppressWarnings>
1045 </Options> 1045 </Options>
1046 </Configuration> 1046 </Configuration>
1047 <ReferencePath>../../bin/</ReferencePath> 1047 <ReferencePath>../../bin/</ReferencePath>
1048 <Reference name="System.EnterpriseServices" /> 1048 <Reference name="System.EnterpriseServices" />
1049 <Reference name="System.Xml" /> 1049 <Reference name="System.Xml" />
1050 <Reference name="System" /> 1050 <Reference name="System" />
1051 <Files> 1051 <Files>
1052 <Match pattern="App.ico" buildAction="EmbeddedResource"/> 1052 <Match pattern="App.ico" buildAction="EmbeddedResource"/>
1053 <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/> 1053 <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/>
1054 <Match pattern="*.cs" recurse="true"/> 1054 <Match pattern="*.cs" recurse="true"/>
1055 </Files> 1055 </Files>
1056 </Project> 1056 </Project>
1057 </Solution> 1057 </Solution>
1058</Prebuild> 1058</Prebuild>
1059 1059
1060 1060
diff --git a/runprebuild.bat b/runprebuild.bat
index c1e5d0e..8a2c21a 100644
--- a/runprebuild.bat
+++ b/runprebuild.bat
@@ -1,2 +1,2 @@
1bin\Prebuild.exe /target nant 1bin\Prebuild.exe /target nant
2bin\Prebuild.exe /target vs2005 \ No newline at end of file 2bin\Prebuild.exe /target vs2005 \ No newline at end of file
diff --git a/share/php/generateUserFunction.php b/share/php/generateUserFunction.php
index 52ebc9f..a262bf5 100644
--- a/share/php/generateUserFunction.php
+++ b/share/php/generateUserFunction.php
@@ -1,46 +1,46 @@
1<?php 1<?php
2 // GenerateUser (v1.0) 2 // GenerateUser (v1.0)
3 // Creates a new user account, and returns it into an associative array. 3 // Creates a new user account, and returns it into an associative array.
4 // -- 4 // --
5 // $firstname - The users firstname 5 // $firstname - The users firstname
6 // $lastname - The users lastname 6 // $lastname - The users lastname
7 // $password - the users password 7 // $password - the users password
8 // $home - the regionhandle of the users home location 8 // $home - the regionhandle of the users home location
9 // -- 9 // --
10 function generateUser($firstname,$lastname,$password,$home) { 10 function generateUser($firstname,$lastname,$password,$home) {
11 $user = array(); 11 $user = array();
12 $user['UUID'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 12 $user['UUID'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
13 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), 13 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
14 mt_rand( 0, 0x0fff ) | 0x4000, 14 mt_rand( 0, 0x0fff ) | 0x4000,
15 mt_rand( 0, 0x3fff ) | 0x8000, 15 mt_rand( 0, 0x3fff ) | 0x8000,
16 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) ); 16 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
17 $user['username'] = $firstname; 17 $user['username'] = $firstname;
18 $user['lastname'] = $lastname; 18 $user['lastname'] = $lastname;
19 19
20 $user['passwordSalt'] = md5(microtime() . mt_rand(0,0xffff)); 20 $user['passwordSalt'] = md5(microtime() . mt_rand(0,0xffff));
21 $user['passwordHash'] = md5(md5($password) . ":" . $user['passwordSalt']); 21 $user['passwordHash'] = md5(md5($password) . ":" . $user['passwordSalt']);
22 22
23 $user['homeRegion'] = $home; 23 $user['homeRegion'] = $home;
24 $user['homeLocationX'] = 128; 24 $user['homeLocationX'] = 128;
25 $user['homeLocationY'] = 128; 25 $user['homeLocationY'] = 128;
26 $user['homeLocationZ'] = 128; 26 $user['homeLocationZ'] = 128;
27 $user['homeLookAtX'] = 15; 27 $user['homeLookAtX'] = 15;
28 $user['homeLookAtY'] = 15; 28 $user['homeLookAtY'] = 15;
29 $user['homeLookAtZ'] = 15; 29 $user['homeLookAtZ'] = 15;
30 30
31 $user['created'] = time(); 31 $user['created'] = time();
32 $user['lastLogin'] = 0; 32 $user['lastLogin'] = 0;
33 33
34 $user['userInventoryURI'] = "http://inventory.server.tld:8004/"; 34 $user['userInventoryURI'] = "http://inventory.server.tld:8004/";
35 $user['userAssetURI'] = "http://asset.server.tld:8003/"; 35 $user['userAssetURI'] = "http://asset.server.tld:8003/";
36 36
37 $user['profileCanDoMask'] = 0; 37 $user['profileCanDoMask'] = 0;
38 $user['profileWantDoMask'] = 0; 38 $user['profileWantDoMask'] = 0;
39 $user['profileAboutText'] = "I am a user."; 39 $user['profileAboutText'] = "I am a user.";
40 $user['profileFirstText'] = "Stuff."; 40 $user['profileFirstText'] = "Stuff.";
41 $user['profileImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 ); 41 $user['profileImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 );
42 $user['profileFirstImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 ); 42 $user['profileFirstImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 );
43 43
44 return $user; 44 return $user;
45 } 45 }
46?> \ No newline at end of file 46?> \ No newline at end of file
diff --git a/share/regions/config_0.xml b/share/regions/config_0.xml
index a7a85ad..bf14fe6 100644
--- a/share/regions/config_0.xml
+++ b/share/regions/config_0.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf000" SimName="0" SimLocationX="1000" SimLocationY="1000" Datastore="store_0_x00_y00.yap" SimListenPort="9100" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf000" SimName="0" SimLocationX="1000" SimLocationY="1000" Datastore="store_0_x00_y00.yap" SimListenPort="9100" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1.xml b/share/regions/config_1.xml
index 1ff4fd9..5d313d1 100644
--- a/share/regions/config_1.xml
+++ b/share/regions/config_1.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf001" SimName="1" SimLocationX="1001" SimLocationY="1000" Datastore="store_1_x01_y00.yap" SimListenPort="9101" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf001" SimName="1" SimLocationX="1001" SimLocationY="1000" Datastore="store_1_x01_y00.yap" SimListenPort="9101" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_10.xml b/share/regions/config_10.xml
index 1ce503d..35f58fd 100644
--- a/share/regions/config_10.xml
+++ b/share/regions/config_10.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00a" SimName="10" SimLocationX="1010" SimLocationY="1000" Datastore="store_10_x10_y00.yap" SimListenPort="9110" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00a" SimName="10" SimLocationX="1010" SimLocationY="1000" Datastore="store_10_x10_y00.yap" SimListenPort="9110" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_100.xml b/share/regions/config_100.xml
index 5377794..5d5ae78 100644
--- a/share/regions/config_100.xml
+++ b/share/regions/config_100.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf064" SimName="100" SimLocationX="1004" SimLocationY="1003" Datastore="store_100_x04_y06.yap" SimListenPort="9200" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf064" SimName="100" SimLocationX="1004" SimLocationY="1003" Datastore="store_100_x04_y06.yap" SimListenPort="9200" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1000.xml b/share/regions/config_1000.xml
index 12cc889..db8cb9c 100644
--- a/share/regions/config_1000.xml
+++ b/share/regions/config_1000.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e8" SimName="1000" SimLocationX="1008" SimLocationY="1031" Datastore="store_1000_x08_y62.yap" SimListenPort="10100" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e8" SimName="1000" SimLocationX="1008" SimLocationY="1031" Datastore="store_1000_x08_y62.yap" SimListenPort="10100" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1001.xml b/share/regions/config_1001.xml
index e5010b9..1817100 100644
--- a/share/regions/config_1001.xml
+++ b/share/regions/config_1001.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e9" SimName="1001" SimLocationX="1009" SimLocationY="1031" Datastore="store_1001_x09_y62.yap" SimListenPort="10101" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e9" SimName="1001" SimLocationX="1009" SimLocationY="1031" Datastore="store_1001_x09_y62.yap" SimListenPort="10101" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1002.xml b/share/regions/config_1002.xml
index f901d80..3a93045 100644
--- a/share/regions/config_1002.xml
+++ b/share/regions/config_1002.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ea" SimName="1002" SimLocationX="1010" SimLocationY="1031" Datastore="store_1002_x10_y62.yap" SimListenPort="10102" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ea" SimName="1002" SimLocationX="1010" SimLocationY="1031" Datastore="store_1002_x10_y62.yap" SimListenPort="10102" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1003.xml b/share/regions/config_1003.xml
index 5ff3dce..a09b077 100644
--- a/share/regions/config_1003.xml
+++ b/share/regions/config_1003.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3eb" SimName="1003" SimLocationX="1011" SimLocationY="1031" Datastore="store_1003_x11_y62.yap" SimListenPort="10103" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3eb" SimName="1003" SimLocationX="1011" SimLocationY="1031" Datastore="store_1003_x11_y62.yap" SimListenPort="10103" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1004.xml b/share/regions/config_1004.xml
index c2b9f1e..75913c5 100644
--- a/share/regions/config_1004.xml
+++ b/share/regions/config_1004.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ec" SimName="1004" SimLocationX="1012" SimLocationY="1031" Datastore="store_1004_x12_y62.yap" SimListenPort="10104" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ec" SimName="1004" SimLocationX="1012" SimLocationY="1031" Datastore="store_1004_x12_y62.yap" SimListenPort="10104" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1005.xml b/share/regions/config_1005.xml
index 5aa7a3e..ddb9c6a 100644
--- a/share/regions/config_1005.xml
+++ b/share/regions/config_1005.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ed" SimName="1005" SimLocationX="1013" SimLocationY="1031" Datastore="store_1005_x13_y62.yap" SimListenPort="10105" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ed" SimName="1005" SimLocationX="1013" SimLocationY="1031" Datastore="store_1005_x13_y62.yap" SimListenPort="10105" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1006.xml b/share/regions/config_1006.xml
index d561403..f31426c 100644
--- a/share/regions/config_1006.xml
+++ b/share/regions/config_1006.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ee" SimName="1006" SimLocationX="1014" SimLocationY="1031" Datastore="store_1006_x14_y62.yap" SimListenPort="10106" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ee" SimName="1006" SimLocationX="1014" SimLocationY="1031" Datastore="store_1006_x14_y62.yap" SimListenPort="10106" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1007.xml b/share/regions/config_1007.xml
index afd6c8a..7d5a94f 100644
--- a/share/regions/config_1007.xml
+++ b/share/regions/config_1007.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ef" SimName="1007" SimLocationX="1015" SimLocationY="1031" Datastore="store_1007_x15_y62.yap" SimListenPort="10107" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ef" SimName="1007" SimLocationX="1015" SimLocationY="1031" Datastore="store_1007_x15_y62.yap" SimListenPort="10107" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1008.xml b/share/regions/config_1008.xml
index c69ac88..c802997 100644
--- a/share/regions/config_1008.xml
+++ b/share/regions/config_1008.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f0" SimName="1008" SimLocationX="1016" SimLocationY="1031" Datastore="store_1008_x00_y63.yap" SimListenPort="10108" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f0" SimName="1008" SimLocationX="1016" SimLocationY="1031" Datastore="store_1008_x00_y63.yap" SimListenPort="10108" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1009.xml b/share/regions/config_1009.xml
index 77a8cb9..c2dc4b2 100644
--- a/share/regions/config_1009.xml
+++ b/share/regions/config_1009.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f1" SimName="1009" SimLocationX="1017" SimLocationY="1031" Datastore="store_1009_x01_y63.yap" SimListenPort="10109" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f1" SimName="1009" SimLocationX="1017" SimLocationY="1031" Datastore="store_1009_x01_y63.yap" SimListenPort="10109" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_101.xml b/share/regions/config_101.xml
index d1510b6..1be57a6 100644
--- a/share/regions/config_101.xml
+++ b/share/regions/config_101.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf065" SimName="101" SimLocationX="1005" SimLocationY="1003" Datastore="store_101_x05_y06.yap" SimListenPort="9201" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf065" SimName="101" SimLocationX="1005" SimLocationY="1003" Datastore="store_101_x05_y06.yap" SimListenPort="9201" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1010.xml b/share/regions/config_1010.xml
index 1f371b9..ce2d263 100644
--- a/share/regions/config_1010.xml
+++ b/share/regions/config_1010.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f2" SimName="1010" SimLocationX="1018" SimLocationY="1031" Datastore="store_1010_x02_y63.yap" SimListenPort="10110" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f2" SimName="1010" SimLocationX="1018" SimLocationY="1031" Datastore="store_1010_x02_y63.yap" SimListenPort="10110" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1011.xml b/share/regions/config_1011.xml
index 1483495..e527a1d 100644
--- a/share/regions/config_1011.xml
+++ b/share/regions/config_1011.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f3" SimName="1011" SimLocationX="1019" SimLocationY="1031" Datastore="store_1011_x03_y63.yap" SimListenPort="10111" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f3" SimName="1011" SimLocationX="1019" SimLocationY="1031" Datastore="store_1011_x03_y63.yap" SimListenPort="10111" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1012.xml b/share/regions/config_1012.xml
index d076c14..371d9ec 100644
--- a/share/regions/config_1012.xml
+++ b/share/regions/config_1012.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f4" SimName="1012" SimLocationX="1020" SimLocationY="1031" Datastore="store_1012_x04_y63.yap" SimListenPort="10112" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f4" SimName="1012" SimLocationX="1020" SimLocationY="1031" Datastore="store_1012_x04_y63.yap" SimListenPort="10112" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1013.xml b/share/regions/config_1013.xml
index 32d783a..096f805 100644
--- a/share/regions/config_1013.xml
+++ b/share/regions/config_1013.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f5" SimName="1013" SimLocationX="1021" SimLocationY="1031" Datastore="store_1013_x05_y63.yap" SimListenPort="10113" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f5" SimName="1013" SimLocationX="1021" SimLocationY="1031" Datastore="store_1013_x05_y63.yap" SimListenPort="10113" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1014.xml b/share/regions/config_1014.xml
index 14df9f4..f18b095 100644
--- a/share/regions/config_1014.xml
+++ b/share/regions/config_1014.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f6" SimName="1014" SimLocationX="1022" SimLocationY="1031" Datastore="store_1014_x06_y63.yap" SimListenPort="10114" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f6" SimName="1014" SimLocationX="1022" SimLocationY="1031" Datastore="store_1014_x06_y63.yap" SimListenPort="10114" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1015.xml b/share/regions/config_1015.xml
index 20b2317..2fdd6c6 100644
--- a/share/regions/config_1015.xml
+++ b/share/regions/config_1015.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f7" SimName="1015" SimLocationX="1023" SimLocationY="1031" Datastore="store_1015_x07_y63.yap" SimListenPort="10115" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f7" SimName="1015" SimLocationX="1023" SimLocationY="1031" Datastore="store_1015_x07_y63.yap" SimListenPort="10115" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1016.xml b/share/regions/config_1016.xml
index 5be5dee..b435368 100644
--- a/share/regions/config_1016.xml
+++ b/share/regions/config_1016.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f8" SimName="1016" SimLocationX="1024" SimLocationY="1031" Datastore="store_1016_x08_y63.yap" SimListenPort="10116" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f8" SimName="1016" SimLocationX="1024" SimLocationY="1031" Datastore="store_1016_x08_y63.yap" SimListenPort="10116" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1017.xml b/share/regions/config_1017.xml
index 1edbc6a..ba667fb 100644
--- a/share/regions/config_1017.xml
+++ b/share/regions/config_1017.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f9" SimName="1017" SimLocationX="1025" SimLocationY="1031" Datastore="store_1017_x09_y63.yap" SimListenPort="10117" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3f9" SimName="1017" SimLocationX="1025" SimLocationY="1031" Datastore="store_1017_x09_y63.yap" SimListenPort="10117" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1018.xml b/share/regions/config_1018.xml
index bee2492..5a3764c 100644
--- a/share/regions/config_1018.xml
+++ b/share/regions/config_1018.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fa" SimName="1018" SimLocationX="1026" SimLocationY="1031" Datastore="store_1018_x10_y63.yap" SimListenPort="10118" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fa" SimName="1018" SimLocationX="1026" SimLocationY="1031" Datastore="store_1018_x10_y63.yap" SimListenPort="10118" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1019.xml b/share/regions/config_1019.xml
index ae20cce..4f2cccf 100644
--- a/share/regions/config_1019.xml
+++ b/share/regions/config_1019.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fb" SimName="1019" SimLocationX="1027" SimLocationY="1031" Datastore="store_1019_x11_y63.yap" SimListenPort="10119" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fb" SimName="1019" SimLocationX="1027" SimLocationY="1031" Datastore="store_1019_x11_y63.yap" SimListenPort="10119" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_102.xml b/share/regions/config_102.xml
index b163638..162bec4 100644
--- a/share/regions/config_102.xml
+++ b/share/regions/config_102.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf066" SimName="102" SimLocationX="1006" SimLocationY="1003" Datastore="store_102_x06_y06.yap" SimListenPort="9202" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf066" SimName="102" SimLocationX="1006" SimLocationY="1003" Datastore="store_102_x06_y06.yap" SimListenPort="9202" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1020.xml b/share/regions/config_1020.xml
index 3acbfe6..3d039af 100644
--- a/share/regions/config_1020.xml
+++ b/share/regions/config_1020.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fc" SimName="1020" SimLocationX="1028" SimLocationY="1031" Datastore="store_1020_x12_y63.yap" SimListenPort="10120" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fc" SimName="1020" SimLocationX="1028" SimLocationY="1031" Datastore="store_1020_x12_y63.yap" SimListenPort="10120" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1021.xml b/share/regions/config_1021.xml
index 33a28da..9869be2 100644
--- a/share/regions/config_1021.xml
+++ b/share/regions/config_1021.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fd" SimName="1021" SimLocationX="1029" SimLocationY="1031" Datastore="store_1021_x13_y63.yap" SimListenPort="10121" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fd" SimName="1021" SimLocationX="1029" SimLocationY="1031" Datastore="store_1021_x13_y63.yap" SimListenPort="10121" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1022.xml b/share/regions/config_1022.xml
index bee87ff..5eb9b24 100644
--- a/share/regions/config_1022.xml
+++ b/share/regions/config_1022.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fe" SimName="1022" SimLocationX="1030" SimLocationY="1031" Datastore="store_1022_x14_y63.yap" SimListenPort="10122" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3fe" SimName="1022" SimLocationX="1030" SimLocationY="1031" Datastore="store_1022_x14_y63.yap" SimListenPort="10122" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_1023.xml b/share/regions/config_1023.xml
index ff90f32..0f3810a 100644
--- a/share/regions/config_1023.xml
+++ b/share/regions/config_1023.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ff" SimName="1023" SimLocationX="1031" SimLocationY="1031" Datastore="store_1023_x15_y63.yap" SimListenPort="10123" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ff" SimName="1023" SimLocationX="1031" SimLocationY="1031" Datastore="store_1023_x15_y63.yap" SimListenPort="10123" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-48.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_103.xml b/share/regions/config_103.xml
index 8a1e78e..203111f 100644
--- a/share/regions/config_103.xml
+++ b/share/regions/config_103.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf067" SimName="103" SimLocationX="1007" SimLocationY="1003" Datastore="store_103_x07_y06.yap" SimListenPort="9203" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf067" SimName="103" SimLocationX="1007" SimLocationY="1003" Datastore="store_103_x07_y06.yap" SimListenPort="9203" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_104.xml b/share/regions/config_104.xml
index 5875dd9..3402fda 100644
--- a/share/regions/config_104.xml
+++ b/share/regions/config_104.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf068" SimName="104" SimLocationX="1008" SimLocationY="1003" Datastore="store_104_x08_y06.yap" SimListenPort="9204" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf068" SimName="104" SimLocationX="1008" SimLocationY="1003" Datastore="store_104_x08_y06.yap" SimListenPort="9204" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_105.xml b/share/regions/config_105.xml
index 86f6c5b..dacea52 100644
--- a/share/regions/config_105.xml
+++ b/share/regions/config_105.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf069" SimName="105" SimLocationX="1009" SimLocationY="1003" Datastore="store_105_x09_y06.yap" SimListenPort="9205" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf069" SimName="105" SimLocationX="1009" SimLocationY="1003" Datastore="store_105_x09_y06.yap" SimListenPort="9205" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_106.xml b/share/regions/config_106.xml
index 768a528..d7ecb15 100644
--- a/share/regions/config_106.xml
+++ b/share/regions/config_106.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06a" SimName="106" SimLocationX="1010" SimLocationY="1003" Datastore="store_106_x10_y06.yap" SimListenPort="9206" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06a" SimName="106" SimLocationX="1010" SimLocationY="1003" Datastore="store_106_x10_y06.yap" SimListenPort="9206" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_107.xml b/share/regions/config_107.xml
index efa0446..e55b891 100644
--- a/share/regions/config_107.xml
+++ b/share/regions/config_107.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06b" SimName="107" SimLocationX="1011" SimLocationY="1003" Datastore="store_107_x11_y06.yap" SimListenPort="9207" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06b" SimName="107" SimLocationX="1011" SimLocationY="1003" Datastore="store_107_x11_y06.yap" SimListenPort="9207" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_108.xml b/share/regions/config_108.xml
index 60f1dcb..fdb67fa 100644
--- a/share/regions/config_108.xml
+++ b/share/regions/config_108.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06c" SimName="108" SimLocationX="1012" SimLocationY="1003" Datastore="store_108_x12_y06.yap" SimListenPort="9208" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06c" SimName="108" SimLocationX="1012" SimLocationY="1003" Datastore="store_108_x12_y06.yap" SimListenPort="9208" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_109.xml b/share/regions/config_109.xml
index 2c44ff9..3a8f6b9 100644
--- a/share/regions/config_109.xml
+++ b/share/regions/config_109.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06d" SimName="109" SimLocationX="1013" SimLocationY="1003" Datastore="store_109_x13_y06.yap" SimListenPort="9209" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06d" SimName="109" SimLocationX="1013" SimLocationY="1003" Datastore="store_109_x13_y06.yap" SimListenPort="9209" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_11.xml b/share/regions/config_11.xml
index 63b3489..2ec06a3 100644
--- a/share/regions/config_11.xml
+++ b/share/regions/config_11.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00b" SimName="11" SimLocationX="1011" SimLocationY="1000" Datastore="store_11_x11_y00.yap" SimListenPort="9111" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00b" SimName="11" SimLocationX="1011" SimLocationY="1000" Datastore="store_11_x11_y00.yap" SimListenPort="9111" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_110.xml b/share/regions/config_110.xml
index 02fbc4d..74cded6 100644
--- a/share/regions/config_110.xml
+++ b/share/regions/config_110.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06e" SimName="110" SimLocationX="1014" SimLocationY="1003" Datastore="store_110_x14_y06.yap" SimListenPort="9210" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06e" SimName="110" SimLocationX="1014" SimLocationY="1003" Datastore="store_110_x14_y06.yap" SimListenPort="9210" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_111.xml b/share/regions/config_111.xml
index 4752891..8788198 100644
--- a/share/regions/config_111.xml
+++ b/share/regions/config_111.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06f" SimName="111" SimLocationX="1015" SimLocationY="1003" Datastore="store_111_x15_y06.yap" SimListenPort="9211" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf06f" SimName="111" SimLocationX="1015" SimLocationY="1003" Datastore="store_111_x15_y06.yap" SimListenPort="9211" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_112.xml b/share/regions/config_112.xml
index c672402..81c3662 100644
--- a/share/regions/config_112.xml
+++ b/share/regions/config_112.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf070" SimName="112" SimLocationX="1016" SimLocationY="1003" Datastore="store_112_x00_y07.yap" SimListenPort="9212" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf070" SimName="112" SimLocationX="1016" SimLocationY="1003" Datastore="store_112_x00_y07.yap" SimListenPort="9212" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_113.xml b/share/regions/config_113.xml
index 0ea4391..bdf8e29 100644
--- a/share/regions/config_113.xml
+++ b/share/regions/config_113.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf071" SimName="113" SimLocationX="1017" SimLocationY="1003" Datastore="store_113_x01_y07.yap" SimListenPort="9213" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf071" SimName="113" SimLocationX="1017" SimLocationY="1003" Datastore="store_113_x01_y07.yap" SimListenPort="9213" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_114.xml b/share/regions/config_114.xml
index 844653e..dd0150b 100644
--- a/share/regions/config_114.xml
+++ b/share/regions/config_114.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf072" SimName="114" SimLocationX="1018" SimLocationY="1003" Datastore="store_114_x02_y07.yap" SimListenPort="9214" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf072" SimName="114" SimLocationX="1018" SimLocationY="1003" Datastore="store_114_x02_y07.yap" SimListenPort="9214" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_115.xml b/share/regions/config_115.xml
index 1672c5d..f9981a3 100644
--- a/share/regions/config_115.xml
+++ b/share/regions/config_115.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf073" SimName="115" SimLocationX="1019" SimLocationY="1003" Datastore="store_115_x03_y07.yap" SimListenPort="9215" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf073" SimName="115" SimLocationX="1019" SimLocationY="1003" Datastore="store_115_x03_y07.yap" SimListenPort="9215" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_116.xml b/share/regions/config_116.xml
index abb1e44..de258a2 100644
--- a/share/regions/config_116.xml
+++ b/share/regions/config_116.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf074" SimName="116" SimLocationX="1020" SimLocationY="1003" Datastore="store_116_x04_y07.yap" SimListenPort="9216" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf074" SimName="116" SimLocationX="1020" SimLocationY="1003" Datastore="store_116_x04_y07.yap" SimListenPort="9216" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_117.xml b/share/regions/config_117.xml
index 4f90aa4..0eac634 100644
--- a/share/regions/config_117.xml
+++ b/share/regions/config_117.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf075" SimName="117" SimLocationX="1021" SimLocationY="1003" Datastore="store_117_x05_y07.yap" SimListenPort="9217" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf075" SimName="117" SimLocationX="1021" SimLocationY="1003" Datastore="store_117_x05_y07.yap" SimListenPort="9217" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_118.xml b/share/regions/config_118.xml
index 5241fa6..0091a2e 100644
--- a/share/regions/config_118.xml
+++ b/share/regions/config_118.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf076" SimName="118" SimLocationX="1022" SimLocationY="1003" Datastore="store_118_x06_y07.yap" SimListenPort="9218" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf076" SimName="118" SimLocationX="1022" SimLocationY="1003" Datastore="store_118_x06_y07.yap" SimListenPort="9218" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_119.xml b/share/regions/config_119.xml
index 8b8d85d..d520131 100644
--- a/share/regions/config_119.xml
+++ b/share/regions/config_119.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf077" SimName="119" SimLocationX="1023" SimLocationY="1003" Datastore="store_119_x07_y07.yap" SimListenPort="9219" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf077" SimName="119" SimLocationX="1023" SimLocationY="1003" Datastore="store_119_x07_y07.yap" SimListenPort="9219" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_12.xml b/share/regions/config_12.xml
index dbab016..c934b48 100644
--- a/share/regions/config_12.xml
+++ b/share/regions/config_12.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00c" SimName="12" SimLocationX="1012" SimLocationY="1000" Datastore="store_12_x12_y00.yap" SimListenPort="9112" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00c" SimName="12" SimLocationX="1012" SimLocationY="1000" Datastore="store_12_x12_y00.yap" SimListenPort="9112" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_120.xml b/share/regions/config_120.xml
index b3a3ba5..91914a9 100644
--- a/share/regions/config_120.xml
+++ b/share/regions/config_120.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf078" SimName="120" SimLocationX="1024" SimLocationY="1003" Datastore="store_120_x08_y07.yap" SimListenPort="9220" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf078" SimName="120" SimLocationX="1024" SimLocationY="1003" Datastore="store_120_x08_y07.yap" SimListenPort="9220" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_121.xml b/share/regions/config_121.xml
index d204659..c8059ed 100644
--- a/share/regions/config_121.xml
+++ b/share/regions/config_121.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf079" SimName="121" SimLocationX="1025" SimLocationY="1003" Datastore="store_121_x09_y07.yap" SimListenPort="9221" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf079" SimName="121" SimLocationX="1025" SimLocationY="1003" Datastore="store_121_x09_y07.yap" SimListenPort="9221" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_122.xml b/share/regions/config_122.xml
index b13dc6f..52592c3 100644
--- a/share/regions/config_122.xml
+++ b/share/regions/config_122.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07a" SimName="122" SimLocationX="1026" SimLocationY="1003" Datastore="store_122_x10_y07.yap" SimListenPort="9222" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07a" SimName="122" SimLocationX="1026" SimLocationY="1003" Datastore="store_122_x10_y07.yap" SimListenPort="9222" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_123.xml b/share/regions/config_123.xml
index 22a81ee..f2dc1e0 100644
--- a/share/regions/config_123.xml
+++ b/share/regions/config_123.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07b" SimName="123" SimLocationX="1027" SimLocationY="1003" Datastore="store_123_x11_y07.yap" SimListenPort="9223" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07b" SimName="123" SimLocationX="1027" SimLocationY="1003" Datastore="store_123_x11_y07.yap" SimListenPort="9223" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_124.xml b/share/regions/config_124.xml
index 5b9b153..a0ab2d2 100644
--- a/share/regions/config_124.xml
+++ b/share/regions/config_124.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07c" SimName="124" SimLocationX="1028" SimLocationY="1003" Datastore="store_124_x12_y07.yap" SimListenPort="9224" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07c" SimName="124" SimLocationX="1028" SimLocationY="1003" Datastore="store_124_x12_y07.yap" SimListenPort="9224" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_125.xml b/share/regions/config_125.xml
index deef175..63a1d46 100644
--- a/share/regions/config_125.xml
+++ b/share/regions/config_125.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07d" SimName="125" SimLocationX="1029" SimLocationY="1003" Datastore="store_125_x13_y07.yap" SimListenPort="9225" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07d" SimName="125" SimLocationX="1029" SimLocationY="1003" Datastore="store_125_x13_y07.yap" SimListenPort="9225" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_126.xml b/share/regions/config_126.xml
index 705978c..953b3ad 100644
--- a/share/regions/config_126.xml
+++ b/share/regions/config_126.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07e" SimName="126" SimLocationX="1030" SimLocationY="1003" Datastore="store_126_x14_y07.yap" SimListenPort="9226" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07e" SimName="126" SimLocationX="1030" SimLocationY="1003" Datastore="store_126_x14_y07.yap" SimListenPort="9226" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_127.xml b/share/regions/config_127.xml
index a6ef58c..053910e 100644
--- a/share/regions/config_127.xml
+++ b/share/regions/config_127.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07f" SimName="127" SimLocationX="1031" SimLocationY="1003" Datastore="store_127_x15_y07.yap" SimListenPort="9227" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf07f" SimName="127" SimLocationX="1031" SimLocationY="1003" Datastore="store_127_x15_y07.yap" SimListenPort="9227" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y08.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_128.xml b/share/regions/config_128.xml
index 9745ea2..57ed630 100644
--- a/share/regions/config_128.xml
+++ b/share/regions/config_128.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf080" SimName="128" SimLocationX="1000" SimLocationY="1004" Datastore="store_128_x00_y08.yap" SimListenPort="9228" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf080" SimName="128" SimLocationX="1000" SimLocationY="1004" Datastore="store_128_x00_y08.yap" SimListenPort="9228" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_129.xml b/share/regions/config_129.xml
index 81abdde..12c6863 100644
--- a/share/regions/config_129.xml
+++ b/share/regions/config_129.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf081" SimName="129" SimLocationX="1001" SimLocationY="1004" Datastore="store_129_x01_y08.yap" SimListenPort="9229" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf081" SimName="129" SimLocationX="1001" SimLocationY="1004" Datastore="store_129_x01_y08.yap" SimListenPort="9229" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_13.xml b/share/regions/config_13.xml
index 879d1cc..b8c3616 100644
--- a/share/regions/config_13.xml
+++ b/share/regions/config_13.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00d" SimName="13" SimLocationX="1013" SimLocationY="1000" Datastore="store_13_x13_y00.yap" SimListenPort="9113" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00d" SimName="13" SimLocationX="1013" SimLocationY="1000" Datastore="store_13_x13_y00.yap" SimListenPort="9113" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_130.xml b/share/regions/config_130.xml
index ca8f2fb..967c08b 100644
--- a/share/regions/config_130.xml
+++ b/share/regions/config_130.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf082" SimName="130" SimLocationX="1002" SimLocationY="1004" Datastore="store_130_x02_y08.yap" SimListenPort="9230" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf082" SimName="130" SimLocationX="1002" SimLocationY="1004" Datastore="store_130_x02_y08.yap" SimListenPort="9230" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_131.xml b/share/regions/config_131.xml
index ae84c9e..4bbe8fa 100644
--- a/share/regions/config_131.xml
+++ b/share/regions/config_131.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf083" SimName="131" SimLocationX="1003" SimLocationY="1004" Datastore="store_131_x03_y08.yap" SimListenPort="9231" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf083" SimName="131" SimLocationX="1003" SimLocationY="1004" Datastore="store_131_x03_y08.yap" SimListenPort="9231" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_132.xml b/share/regions/config_132.xml
index 88b0895..2fbbfda 100644
--- a/share/regions/config_132.xml
+++ b/share/regions/config_132.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf084" SimName="132" SimLocationX="1004" SimLocationY="1004" Datastore="store_132_x04_y08.yap" SimListenPort="9232" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf084" SimName="132" SimLocationX="1004" SimLocationY="1004" Datastore="store_132_x04_y08.yap" SimListenPort="9232" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_133.xml b/share/regions/config_133.xml
index f03aff6..130c6c1 100644
--- a/share/regions/config_133.xml
+++ b/share/regions/config_133.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf085" SimName="133" SimLocationX="1005" SimLocationY="1004" Datastore="store_133_x05_y08.yap" SimListenPort="9233" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf085" SimName="133" SimLocationX="1005" SimLocationY="1004" Datastore="store_133_x05_y08.yap" SimListenPort="9233" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_134.xml b/share/regions/config_134.xml
index 1dae046..c61d1fc 100644
--- a/share/regions/config_134.xml
+++ b/share/regions/config_134.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf086" SimName="134" SimLocationX="1006" SimLocationY="1004" Datastore="store_134_x06_y08.yap" SimListenPort="9234" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf086" SimName="134" SimLocationX="1006" SimLocationY="1004" Datastore="store_134_x06_y08.yap" SimListenPort="9234" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_135.xml b/share/regions/config_135.xml
index 5643a00..412d2d5 100644
--- a/share/regions/config_135.xml
+++ b/share/regions/config_135.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf087" SimName="135" SimLocationX="1007" SimLocationY="1004" Datastore="store_135_x07_y08.yap" SimListenPort="9235" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf087" SimName="135" SimLocationX="1007" SimLocationY="1004" Datastore="store_135_x07_y08.yap" SimListenPort="9235" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_136.xml b/share/regions/config_136.xml
index 5e85f53..756c3f8 100644
--- a/share/regions/config_136.xml
+++ b/share/regions/config_136.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf088" SimName="136" SimLocationX="1008" SimLocationY="1004" Datastore="store_136_x08_y08.yap" SimListenPort="9236" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf088" SimName="136" SimLocationX="1008" SimLocationY="1004" Datastore="store_136_x08_y08.yap" SimListenPort="9236" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_137.xml b/share/regions/config_137.xml
index 7fedbaa..2c64a56 100644
--- a/share/regions/config_137.xml
+++ b/share/regions/config_137.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf089" SimName="137" SimLocationX="1009" SimLocationY="1004" Datastore="store_137_x09_y08.yap" SimListenPort="9237" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf089" SimName="137" SimLocationX="1009" SimLocationY="1004" Datastore="store_137_x09_y08.yap" SimListenPort="9237" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_138.xml b/share/regions/config_138.xml
index 9610d97..02dd387 100644
--- a/share/regions/config_138.xml
+++ b/share/regions/config_138.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08a" SimName="138" SimLocationX="1010" SimLocationY="1004" Datastore="store_138_x10_y08.yap" SimListenPort="9238" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08a" SimName="138" SimLocationX="1010" SimLocationY="1004" Datastore="store_138_x10_y08.yap" SimListenPort="9238" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_139.xml b/share/regions/config_139.xml
index 950a9ae..b73b838 100644
--- a/share/regions/config_139.xml
+++ b/share/regions/config_139.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08b" SimName="139" SimLocationX="1011" SimLocationY="1004" Datastore="store_139_x11_y08.yap" SimListenPort="9239" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08b" SimName="139" SimLocationX="1011" SimLocationY="1004" Datastore="store_139_x11_y08.yap" SimListenPort="9239" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_14.xml b/share/regions/config_14.xml
index d737ebf..de773d7 100644
--- a/share/regions/config_14.xml
+++ b/share/regions/config_14.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00e" SimName="14" SimLocationX="1014" SimLocationY="1000" Datastore="store_14_x14_y00.yap" SimListenPort="9114" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00e" SimName="14" SimLocationX="1014" SimLocationY="1000" Datastore="store_14_x14_y00.yap" SimListenPort="9114" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_140.xml b/share/regions/config_140.xml
index 9ba3d2e..fbef1d7 100644
--- a/share/regions/config_140.xml
+++ b/share/regions/config_140.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08c" SimName="140" SimLocationX="1012" SimLocationY="1004" Datastore="store_140_x12_y08.yap" SimListenPort="9240" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08c" SimName="140" SimLocationX="1012" SimLocationY="1004" Datastore="store_140_x12_y08.yap" SimListenPort="9240" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_141.xml b/share/regions/config_141.xml
index 35f63d1..fa42a99 100644
--- a/share/regions/config_141.xml
+++ b/share/regions/config_141.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08d" SimName="141" SimLocationX="1013" SimLocationY="1004" Datastore="store_141_x13_y08.yap" SimListenPort="9241" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08d" SimName="141" SimLocationX="1013" SimLocationY="1004" Datastore="store_141_x13_y08.yap" SimListenPort="9241" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_142.xml b/share/regions/config_142.xml
index 35511cf..593a3e2 100644
--- a/share/regions/config_142.xml
+++ b/share/regions/config_142.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08e" SimName="142" SimLocationX="1014" SimLocationY="1004" Datastore="store_142_x14_y08.yap" SimListenPort="9242" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08e" SimName="142" SimLocationX="1014" SimLocationY="1004" Datastore="store_142_x14_y08.yap" SimListenPort="9242" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_143.xml b/share/regions/config_143.xml
index 83fd144..035a75b 100644
--- a/share/regions/config_143.xml
+++ b/share/regions/config_143.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08f" SimName="143" SimLocationX="1015" SimLocationY="1004" Datastore="store_143_x15_y08.yap" SimListenPort="9243" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf08f" SimName="143" SimLocationX="1015" SimLocationY="1004" Datastore="store_143_x15_y08.yap" SimListenPort="9243" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y07.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_144.xml b/share/regions/config_144.xml
index 559f854..64ce862 100644
--- a/share/regions/config_144.xml
+++ b/share/regions/config_144.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf090" SimName="144" SimLocationX="1016" SimLocationY="1004" Datastore="store_144_x00_y09.yap" SimListenPort="9244" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf090" SimName="144" SimLocationX="1016" SimLocationY="1004" Datastore="store_144_x00_y09.yap" SimListenPort="9244" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_145.xml b/share/regions/config_145.xml
index ea2aff7..25ce19c 100644
--- a/share/regions/config_145.xml
+++ b/share/regions/config_145.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf091" SimName="145" SimLocationX="1017" SimLocationY="1004" Datastore="store_145_x01_y09.yap" SimListenPort="9245" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf091" SimName="145" SimLocationX="1017" SimLocationY="1004" Datastore="store_145_x01_y09.yap" SimListenPort="9245" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_146.xml b/share/regions/config_146.xml
index 35308b0..51b5dbd 100644
--- a/share/regions/config_146.xml
+++ b/share/regions/config_146.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf092" SimName="146" SimLocationX="1018" SimLocationY="1004" Datastore="store_146_x02_y09.yap" SimListenPort="9246" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf092" SimName="146" SimLocationX="1018" SimLocationY="1004" Datastore="store_146_x02_y09.yap" SimListenPort="9246" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_147.xml b/share/regions/config_147.xml
index 65ffcbc..1d37dc6 100644
--- a/share/regions/config_147.xml
+++ b/share/regions/config_147.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf093" SimName="147" SimLocationX="1019" SimLocationY="1004" Datastore="store_147_x03_y09.yap" SimListenPort="9247" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf093" SimName="147" SimLocationX="1019" SimLocationY="1004" Datastore="store_147_x03_y09.yap" SimListenPort="9247" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_148.xml b/share/regions/config_148.xml
index 50e5b70..0215a1c 100644
--- a/share/regions/config_148.xml
+++ b/share/regions/config_148.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf094" SimName="148" SimLocationX="1020" SimLocationY="1004" Datastore="store_148_x04_y09.yap" SimListenPort="9248" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf094" SimName="148" SimLocationX="1020" SimLocationY="1004" Datastore="store_148_x04_y09.yap" SimListenPort="9248" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_149.xml b/share/regions/config_149.xml
index d75a455..0a23bde 100644
--- a/share/regions/config_149.xml
+++ b/share/regions/config_149.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf095" SimName="149" SimLocationX="1021" SimLocationY="1004" Datastore="store_149_x05_y09.yap" SimListenPort="9249" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf095" SimName="149" SimLocationX="1021" SimLocationY="1004" Datastore="store_149_x05_y09.yap" SimListenPort="9249" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_15.xml b/share/regions/config_15.xml
index 9caeae7..af363b4 100644
--- a/share/regions/config_15.xml
+++ b/share/regions/config_15.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00f" SimName="15" SimLocationX="1015" SimLocationY="1000" Datastore="store_15_x15_y00.yap" SimListenPort="9115" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf00f" SimName="15" SimLocationX="1015" SimLocationY="1000" Datastore="store_15_x15_y00.yap" SimListenPort="9115" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_150.xml b/share/regions/config_150.xml
index 2ae5b9f..fc17d9c 100644
--- a/share/regions/config_150.xml
+++ b/share/regions/config_150.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf096" SimName="150" SimLocationX="1022" SimLocationY="1004" Datastore="store_150_x06_y09.yap" SimListenPort="9250" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf096" SimName="150" SimLocationX="1022" SimLocationY="1004" Datastore="store_150_x06_y09.yap" SimListenPort="9250" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_151.xml b/share/regions/config_151.xml
index bc2bdcd..77067d7 100644
--- a/share/regions/config_151.xml
+++ b/share/regions/config_151.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf097" SimName="151" SimLocationX="1023" SimLocationY="1004" Datastore="store_151_x07_y09.yap" SimListenPort="9251" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf097" SimName="151" SimLocationX="1023" SimLocationY="1004" Datastore="store_151_x07_y09.yap" SimListenPort="9251" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_152.xml b/share/regions/config_152.xml
index b641d91..098d551 100644
--- a/share/regions/config_152.xml
+++ b/share/regions/config_152.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf098" SimName="152" SimLocationX="1024" SimLocationY="1004" Datastore="store_152_x08_y09.yap" SimListenPort="9252" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf098" SimName="152" SimLocationX="1024" SimLocationY="1004" Datastore="store_152_x08_y09.yap" SimListenPort="9252" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_153.xml b/share/regions/config_153.xml
index f308946..942cc86 100644
--- a/share/regions/config_153.xml
+++ b/share/regions/config_153.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf099" SimName="153" SimLocationX="1025" SimLocationY="1004" Datastore="store_153_x09_y09.yap" SimListenPort="9253" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf099" SimName="153" SimLocationX="1025" SimLocationY="1004" Datastore="store_153_x09_y09.yap" SimListenPort="9253" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_154.xml b/share/regions/config_154.xml
index 16a0185..a338d7b 100644
--- a/share/regions/config_154.xml
+++ b/share/regions/config_154.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09a" SimName="154" SimLocationX="1026" SimLocationY="1004" Datastore="store_154_x10_y09.yap" SimListenPort="9254" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09a" SimName="154" SimLocationX="1026" SimLocationY="1004" Datastore="store_154_x10_y09.yap" SimListenPort="9254" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_155.xml b/share/regions/config_155.xml
index d026ca7..4ed48f8 100644
--- a/share/regions/config_155.xml
+++ b/share/regions/config_155.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09b" SimName="155" SimLocationX="1027" SimLocationY="1004" Datastore="store_155_x11_y09.yap" SimListenPort="9255" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09b" SimName="155" SimLocationX="1027" SimLocationY="1004" Datastore="store_155_x11_y09.yap" SimListenPort="9255" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_156.xml b/share/regions/config_156.xml
index 1565d11..18df7ae 100644
--- a/share/regions/config_156.xml
+++ b/share/regions/config_156.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09c" SimName="156" SimLocationX="1028" SimLocationY="1004" Datastore="store_156_x12_y09.yap" SimListenPort="9256" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09c" SimName="156" SimLocationX="1028" SimLocationY="1004" Datastore="store_156_x12_y09.yap" SimListenPort="9256" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_157.xml b/share/regions/config_157.xml
index 6883214..145cbb7 100644
--- a/share/regions/config_157.xml
+++ b/share/regions/config_157.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09d" SimName="157" SimLocationX="1029" SimLocationY="1004" Datastore="store_157_x13_y09.yap" SimListenPort="9257" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09d" SimName="157" SimLocationX="1029" SimLocationY="1004" Datastore="store_157_x13_y09.yap" SimListenPort="9257" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_158.xml b/share/regions/config_158.xml
index f8d2d67..b4d6b99 100644
--- a/share/regions/config_158.xml
+++ b/share/regions/config_158.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09e" SimName="158" SimLocationX="1030" SimLocationY="1004" Datastore="store_158_x14_y09.yap" SimListenPort="9258" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09e" SimName="158" SimLocationX="1030" SimLocationY="1004" Datastore="store_158_x14_y09.yap" SimListenPort="9258" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_159.xml b/share/regions/config_159.xml
index 95147b4..eb45c6b 100644
--- a/share/regions/config_159.xml
+++ b/share/regions/config_159.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09f" SimName="159" SimLocationX="1031" SimLocationY="1004" Datastore="store_159_x15_y09.yap" SimListenPort="9259" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf09f" SimName="159" SimLocationX="1031" SimLocationY="1004" Datastore="store_159_x15_y09.yap" SimListenPort="9259" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y06.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_16.xml b/share/regions/config_16.xml
index 92bb4a9..9d1261c 100644
--- a/share/regions/config_16.xml
+++ b/share/regions/config_16.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf010" SimName="16" SimLocationX="1016" SimLocationY="1000" Datastore="store_16_x00_y01.yap" SimListenPort="9116" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf010" SimName="16" SimLocationX="1016" SimLocationY="1000" Datastore="store_16_x00_y01.yap" SimListenPort="9116" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_160.xml b/share/regions/config_160.xml
index 6590dd3..e5c41a5 100644
--- a/share/regions/config_160.xml
+++ b/share/regions/config_160.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a0" SimName="160" SimLocationX="1000" SimLocationY="1005" Datastore="store_160_x00_y10.yap" SimListenPort="9260" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a0" SimName="160" SimLocationX="1000" SimLocationY="1005" Datastore="store_160_x00_y10.yap" SimListenPort="9260" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_161.xml b/share/regions/config_161.xml
index 77f9205..65fd361 100644
--- a/share/regions/config_161.xml
+++ b/share/regions/config_161.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a1" SimName="161" SimLocationX="1001" SimLocationY="1005" Datastore="store_161_x01_y10.yap" SimListenPort="9261" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a1" SimName="161" SimLocationX="1001" SimLocationY="1005" Datastore="store_161_x01_y10.yap" SimListenPort="9261" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_162.xml b/share/regions/config_162.xml
index 0b33247..0fcceec 100644
--- a/share/regions/config_162.xml
+++ b/share/regions/config_162.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a2" SimName="162" SimLocationX="1002" SimLocationY="1005" Datastore="store_162_x02_y10.yap" SimListenPort="9262" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a2" SimName="162" SimLocationX="1002" SimLocationY="1005" Datastore="store_162_x02_y10.yap" SimListenPort="9262" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_163.xml b/share/regions/config_163.xml
index f6d1d2e..0de3ff2 100644
--- a/share/regions/config_163.xml
+++ b/share/regions/config_163.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a3" SimName="163" SimLocationX="1003" SimLocationY="1005" Datastore="store_163_x03_y10.yap" SimListenPort="9263" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a3" SimName="163" SimLocationX="1003" SimLocationY="1005" Datastore="store_163_x03_y10.yap" SimListenPort="9263" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_164.xml b/share/regions/config_164.xml
index 92e4731..1fa8e65 100644
--- a/share/regions/config_164.xml
+++ b/share/regions/config_164.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a4" SimName="164" SimLocationX="1004" SimLocationY="1005" Datastore="store_164_x04_y10.yap" SimListenPort="9264" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a4" SimName="164" SimLocationX="1004" SimLocationY="1005" Datastore="store_164_x04_y10.yap" SimListenPort="9264" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_165.xml b/share/regions/config_165.xml
index d7b8613..693a0b0 100644
--- a/share/regions/config_165.xml
+++ b/share/regions/config_165.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a5" SimName="165" SimLocationX="1005" SimLocationY="1005" Datastore="store_165_x05_y10.yap" SimListenPort="9265" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a5" SimName="165" SimLocationX="1005" SimLocationY="1005" Datastore="store_165_x05_y10.yap" SimListenPort="9265" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_166.xml b/share/regions/config_166.xml
index 61aa9d9..4a6167a 100644
--- a/share/regions/config_166.xml
+++ b/share/regions/config_166.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a6" SimName="166" SimLocationX="1006" SimLocationY="1005" Datastore="store_166_x06_y10.yap" SimListenPort="9266" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a6" SimName="166" SimLocationX="1006" SimLocationY="1005" Datastore="store_166_x06_y10.yap" SimListenPort="9266" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_167.xml b/share/regions/config_167.xml
index 96170d7..3d8d1d2 100644
--- a/share/regions/config_167.xml
+++ b/share/regions/config_167.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a7" SimName="167" SimLocationX="1007" SimLocationY="1005" Datastore="store_167_x07_y10.yap" SimListenPort="9267" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a7" SimName="167" SimLocationX="1007" SimLocationY="1005" Datastore="store_167_x07_y10.yap" SimListenPort="9267" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_168.xml b/share/regions/config_168.xml
index b0d3929..a5f2a6d 100644
--- a/share/regions/config_168.xml
+++ b/share/regions/config_168.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a8" SimName="168" SimLocationX="1008" SimLocationY="1005" Datastore="store_168_x08_y10.yap" SimListenPort="9268" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a8" SimName="168" SimLocationX="1008" SimLocationY="1005" Datastore="store_168_x08_y10.yap" SimListenPort="9268" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_169.xml b/share/regions/config_169.xml
index aeef543..8d45973 100644
--- a/share/regions/config_169.xml
+++ b/share/regions/config_169.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a9" SimName="169" SimLocationX="1009" SimLocationY="1005" Datastore="store_169_x09_y10.yap" SimListenPort="9269" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0a9" SimName="169" SimLocationX="1009" SimLocationY="1005" Datastore="store_169_x09_y10.yap" SimListenPort="9269" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_17.xml b/share/regions/config_17.xml
index 5265775..7014738 100644
--- a/share/regions/config_17.xml
+++ b/share/regions/config_17.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf011" SimName="17" SimLocationX="1017" SimLocationY="1000" Datastore="store_17_x01_y01.yap" SimListenPort="9117" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf011" SimName="17" SimLocationX="1017" SimLocationY="1000" Datastore="store_17_x01_y01.yap" SimListenPort="9117" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_170.xml b/share/regions/config_170.xml
index 37462f7..beb1075 100644
--- a/share/regions/config_170.xml
+++ b/share/regions/config_170.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0aa" SimName="170" SimLocationX="1010" SimLocationY="1005" Datastore="store_170_x10_y10.yap" SimListenPort="9270" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0aa" SimName="170" SimLocationX="1010" SimLocationY="1005" Datastore="store_170_x10_y10.yap" SimListenPort="9270" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_171.xml b/share/regions/config_171.xml
index 51c5e30..8dd22b9 100644
--- a/share/regions/config_171.xml
+++ b/share/regions/config_171.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ab" SimName="171" SimLocationX="1011" SimLocationY="1005" Datastore="store_171_x11_y10.yap" SimListenPort="9271" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ab" SimName="171" SimLocationX="1011" SimLocationY="1005" Datastore="store_171_x11_y10.yap" SimListenPort="9271" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_172.xml b/share/regions/config_172.xml
index 6560be5..6c76fdb 100644
--- a/share/regions/config_172.xml
+++ b/share/regions/config_172.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ac" SimName="172" SimLocationX="1012" SimLocationY="1005" Datastore="store_172_x12_y10.yap" SimListenPort="9272" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ac" SimName="172" SimLocationX="1012" SimLocationY="1005" Datastore="store_172_x12_y10.yap" SimListenPort="9272" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_173.xml b/share/regions/config_173.xml
index 12a448d..8c4c6b2 100644
--- a/share/regions/config_173.xml
+++ b/share/regions/config_173.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ad" SimName="173" SimLocationX="1013" SimLocationY="1005" Datastore="store_173_x13_y10.yap" SimListenPort="9273" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ad" SimName="173" SimLocationX="1013" SimLocationY="1005" Datastore="store_173_x13_y10.yap" SimListenPort="9273" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_174.xml b/share/regions/config_174.xml
index 5897c49..02e436a 100644
--- a/share/regions/config_174.xml
+++ b/share/regions/config_174.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ae" SimName="174" SimLocationX="1014" SimLocationY="1005" Datastore="store_174_x14_y10.yap" SimListenPort="9274" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ae" SimName="174" SimLocationX="1014" SimLocationY="1005" Datastore="store_174_x14_y10.yap" SimListenPort="9274" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_175.xml b/share/regions/config_175.xml
index 79e0808..382a3d2 100644
--- a/share/regions/config_175.xml
+++ b/share/regions/config_175.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0af" SimName="175" SimLocationX="1015" SimLocationY="1005" Datastore="store_175_x15_y10.yap" SimListenPort="9275" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0af" SimName="175" SimLocationX="1015" SimLocationY="1005" Datastore="store_175_x15_y10.yap" SimListenPort="9275" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y05.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_176.xml b/share/regions/config_176.xml
index 26845f3..81673bb 100644
--- a/share/regions/config_176.xml
+++ b/share/regions/config_176.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b0" SimName="176" SimLocationX="1016" SimLocationY="1005" Datastore="store_176_x00_y11.yap" SimListenPort="9276" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b0" SimName="176" SimLocationX="1016" SimLocationY="1005" Datastore="store_176_x00_y11.yap" SimListenPort="9276" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_177.xml b/share/regions/config_177.xml
index e87dc0d..48481a2 100644
--- a/share/regions/config_177.xml
+++ b/share/regions/config_177.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b1" SimName="177" SimLocationX="1017" SimLocationY="1005" Datastore="store_177_x01_y11.yap" SimListenPort="9277" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b1" SimName="177" SimLocationX="1017" SimLocationY="1005" Datastore="store_177_x01_y11.yap" SimListenPort="9277" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_178.xml b/share/regions/config_178.xml
index f82a47d..e2f09bc 100644
--- a/share/regions/config_178.xml
+++ b/share/regions/config_178.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b2" SimName="178" SimLocationX="1018" SimLocationY="1005" Datastore="store_178_x02_y11.yap" SimListenPort="9278" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b2" SimName="178" SimLocationX="1018" SimLocationY="1005" Datastore="store_178_x02_y11.yap" SimListenPort="9278" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_179.xml b/share/regions/config_179.xml
index 483f97f..9dea90d 100644
--- a/share/regions/config_179.xml
+++ b/share/regions/config_179.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b3" SimName="179" SimLocationX="1019" SimLocationY="1005" Datastore="store_179_x03_y11.yap" SimListenPort="9279" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b3" SimName="179" SimLocationX="1019" SimLocationY="1005" Datastore="store_179_x03_y11.yap" SimListenPort="9279" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_18.xml b/share/regions/config_18.xml
index ea486a1..24af560 100644
--- a/share/regions/config_18.xml
+++ b/share/regions/config_18.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf012" SimName="18" SimLocationX="1018" SimLocationY="1000" Datastore="store_18_x02_y01.yap" SimListenPort="9118" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf012" SimName="18" SimLocationX="1018" SimLocationY="1000" Datastore="store_18_x02_y01.yap" SimListenPort="9118" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_180.xml b/share/regions/config_180.xml
index 21a0ade..a9566b3 100644
--- a/share/regions/config_180.xml
+++ b/share/regions/config_180.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b4" SimName="180" SimLocationX="1020" SimLocationY="1005" Datastore="store_180_x04_y11.yap" SimListenPort="9280" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b4" SimName="180" SimLocationX="1020" SimLocationY="1005" Datastore="store_180_x04_y11.yap" SimListenPort="9280" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_181.xml b/share/regions/config_181.xml
index c8043c7..87db9c5 100644
--- a/share/regions/config_181.xml
+++ b/share/regions/config_181.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b5" SimName="181" SimLocationX="1021" SimLocationY="1005" Datastore="store_181_x05_y11.yap" SimListenPort="9281" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b5" SimName="181" SimLocationX="1021" SimLocationY="1005" Datastore="store_181_x05_y11.yap" SimListenPort="9281" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_182.xml b/share/regions/config_182.xml
index b1a35f6..93f691f 100644
--- a/share/regions/config_182.xml
+++ b/share/regions/config_182.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b6" SimName="182" SimLocationX="1022" SimLocationY="1005" Datastore="store_182_x06_y11.yap" SimListenPort="9282" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b6" SimName="182" SimLocationX="1022" SimLocationY="1005" Datastore="store_182_x06_y11.yap" SimListenPort="9282" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_183.xml b/share/regions/config_183.xml
index 0d4e7dc..5b813d0 100644
--- a/share/regions/config_183.xml
+++ b/share/regions/config_183.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b7" SimName="183" SimLocationX="1023" SimLocationY="1005" Datastore="store_183_x07_y11.yap" SimListenPort="9283" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b7" SimName="183" SimLocationX="1023" SimLocationY="1005" Datastore="store_183_x07_y11.yap" SimListenPort="9283" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_184.xml b/share/regions/config_184.xml
index 475f411..b2c7da9 100644
--- a/share/regions/config_184.xml
+++ b/share/regions/config_184.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b8" SimName="184" SimLocationX="1024" SimLocationY="1005" Datastore="store_184_x08_y11.yap" SimListenPort="9284" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b8" SimName="184" SimLocationX="1024" SimLocationY="1005" Datastore="store_184_x08_y11.yap" SimListenPort="9284" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_185.xml b/share/regions/config_185.xml
index 7501e1a..391d2e5 100644
--- a/share/regions/config_185.xml
+++ b/share/regions/config_185.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b9" SimName="185" SimLocationX="1025" SimLocationY="1005" Datastore="store_185_x09_y11.yap" SimListenPort="9285" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0b9" SimName="185" SimLocationX="1025" SimLocationY="1005" Datastore="store_185_x09_y11.yap" SimListenPort="9285" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_186.xml b/share/regions/config_186.xml
index 744e6d1..f034c1a 100644
--- a/share/regions/config_186.xml
+++ b/share/regions/config_186.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ba" SimName="186" SimLocationX="1026" SimLocationY="1005" Datastore="store_186_x10_y11.yap" SimListenPort="9286" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ba" SimName="186" SimLocationX="1026" SimLocationY="1005" Datastore="store_186_x10_y11.yap" SimListenPort="9286" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_187.xml b/share/regions/config_187.xml
index 3e063c9..58d5050 100644
--- a/share/regions/config_187.xml
+++ b/share/regions/config_187.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bb" SimName="187" SimLocationX="1027" SimLocationY="1005" Datastore="store_187_x11_y11.yap" SimListenPort="9287" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bb" SimName="187" SimLocationX="1027" SimLocationY="1005" Datastore="store_187_x11_y11.yap" SimListenPort="9287" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_188.xml b/share/regions/config_188.xml
index 89707ab..ed8731f 100644
--- a/share/regions/config_188.xml
+++ b/share/regions/config_188.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bc" SimName="188" SimLocationX="1028" SimLocationY="1005" Datastore="store_188_x12_y11.yap" SimListenPort="9288" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bc" SimName="188" SimLocationX="1028" SimLocationY="1005" Datastore="store_188_x12_y11.yap" SimListenPort="9288" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_189.xml b/share/regions/config_189.xml
index 6aaa491..9a46fa8 100644
--- a/share/regions/config_189.xml
+++ b/share/regions/config_189.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bd" SimName="189" SimLocationX="1029" SimLocationY="1005" Datastore="store_189_x13_y11.yap" SimListenPort="9289" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bd" SimName="189" SimLocationX="1029" SimLocationY="1005" Datastore="store_189_x13_y11.yap" SimListenPort="9289" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_19.xml b/share/regions/config_19.xml
index 5f5ca6f..549d21e 100644
--- a/share/regions/config_19.xml
+++ b/share/regions/config_19.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf013" SimName="19" SimLocationX="1019" SimLocationY="1000" Datastore="store_19_x03_y01.yap" SimListenPort="9119" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf013" SimName="19" SimLocationX="1019" SimLocationY="1000" Datastore="store_19_x03_y01.yap" SimListenPort="9119" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_190.xml b/share/regions/config_190.xml
index b37cce9..cebd0c7 100644
--- a/share/regions/config_190.xml
+++ b/share/regions/config_190.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0be" SimName="190" SimLocationX="1030" SimLocationY="1005" Datastore="store_190_x14_y11.yap" SimListenPort="9290" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0be" SimName="190" SimLocationX="1030" SimLocationY="1005" Datastore="store_190_x14_y11.yap" SimListenPort="9290" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_191.xml b/share/regions/config_191.xml
index 774b607..b48a0eb 100644
--- a/share/regions/config_191.xml
+++ b/share/regions/config_191.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bf" SimName="191" SimLocationX="1031" SimLocationY="1005" Datastore="store_191_x15_y11.yap" SimListenPort="9291" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0bf" SimName="191" SimLocationX="1031" SimLocationY="1005" Datastore="store_191_x15_y11.yap" SimListenPort="9291" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y04.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_192.xml b/share/regions/config_192.xml
index 8efd00f..9ed973f 100644
--- a/share/regions/config_192.xml
+++ b/share/regions/config_192.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c0" SimName="192" SimLocationX="1000" SimLocationY="1006" Datastore="store_192_x00_y12.yap" SimListenPort="9292" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c0" SimName="192" SimLocationX="1000" SimLocationY="1006" Datastore="store_192_x00_y12.yap" SimListenPort="9292" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_193.xml b/share/regions/config_193.xml
index a60cf3c..39fd7b6 100644
--- a/share/regions/config_193.xml
+++ b/share/regions/config_193.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c1" SimName="193" SimLocationX="1001" SimLocationY="1006" Datastore="store_193_x01_y12.yap" SimListenPort="9293" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c1" SimName="193" SimLocationX="1001" SimLocationY="1006" Datastore="store_193_x01_y12.yap" SimListenPort="9293" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_194.xml b/share/regions/config_194.xml
index fabecfe..1b15e7f 100644
--- a/share/regions/config_194.xml
+++ b/share/regions/config_194.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c2" SimName="194" SimLocationX="1002" SimLocationY="1006" Datastore="store_194_x02_y12.yap" SimListenPort="9294" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c2" SimName="194" SimLocationX="1002" SimLocationY="1006" Datastore="store_194_x02_y12.yap" SimListenPort="9294" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_195.xml b/share/regions/config_195.xml
index c83ab69..5159ede 100644
--- a/share/regions/config_195.xml
+++ b/share/regions/config_195.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c3" SimName="195" SimLocationX="1003" SimLocationY="1006" Datastore="store_195_x03_y12.yap" SimListenPort="9295" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c3" SimName="195" SimLocationX="1003" SimLocationY="1006" Datastore="store_195_x03_y12.yap" SimListenPort="9295" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_196.xml b/share/regions/config_196.xml
index 40cd901..a6de2b7 100644
--- a/share/regions/config_196.xml
+++ b/share/regions/config_196.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c4" SimName="196" SimLocationX="1004" SimLocationY="1006" Datastore="store_196_x04_y12.yap" SimListenPort="9296" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c4" SimName="196" SimLocationX="1004" SimLocationY="1006" Datastore="store_196_x04_y12.yap" SimListenPort="9296" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_197.xml b/share/regions/config_197.xml
index d1cd6e9..57b3f44 100644
--- a/share/regions/config_197.xml
+++ b/share/regions/config_197.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c5" SimName="197" SimLocationX="1005" SimLocationY="1006" Datastore="store_197_x05_y12.yap" SimListenPort="9297" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c5" SimName="197" SimLocationX="1005" SimLocationY="1006" Datastore="store_197_x05_y12.yap" SimListenPort="9297" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_198.xml b/share/regions/config_198.xml
index f66b8c3..ba6129d 100644
--- a/share/regions/config_198.xml
+++ b/share/regions/config_198.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c6" SimName="198" SimLocationX="1006" SimLocationY="1006" Datastore="store_198_x06_y12.yap" SimListenPort="9298" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c6" SimName="198" SimLocationX="1006" SimLocationY="1006" Datastore="store_198_x06_y12.yap" SimListenPort="9298" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_199.xml b/share/regions/config_199.xml
index e660b53..3af69fb 100644
--- a/share/regions/config_199.xml
+++ b/share/regions/config_199.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c7" SimName="199" SimLocationX="1007" SimLocationY="1006" Datastore="store_199_x07_y12.yap" SimListenPort="9299" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c7" SimName="199" SimLocationX="1007" SimLocationY="1006" Datastore="store_199_x07_y12.yap" SimListenPort="9299" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_2.xml b/share/regions/config_2.xml
index 83cb5aa..e8029a8 100644
--- a/share/regions/config_2.xml
+++ b/share/regions/config_2.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf002" SimName="2" SimLocationX="1002" SimLocationY="1000" Datastore="store_2_x02_y00.yap" SimListenPort="9102" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf002" SimName="2" SimLocationX="1002" SimLocationY="1000" Datastore="store_2_x02_y00.yap" SimListenPort="9102" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_20.xml b/share/regions/config_20.xml
index adbee55..1636ecd 100644
--- a/share/regions/config_20.xml
+++ b/share/regions/config_20.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf014" SimName="20" SimLocationX="1020" SimLocationY="1000" Datastore="store_20_x04_y01.yap" SimListenPort="9120" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf014" SimName="20" SimLocationX="1020" SimLocationY="1000" Datastore="store_20_x04_y01.yap" SimListenPort="9120" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_200.xml b/share/regions/config_200.xml
index 9911037..c34fd7c 100644
--- a/share/regions/config_200.xml
+++ b/share/regions/config_200.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c8" SimName="200" SimLocationX="1008" SimLocationY="1006" Datastore="store_200_x08_y12.yap" SimListenPort="9300" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c8" SimName="200" SimLocationX="1008" SimLocationY="1006" Datastore="store_200_x08_y12.yap" SimListenPort="9300" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_201.xml b/share/regions/config_201.xml
index 3c73666..b789d3e 100644
--- a/share/regions/config_201.xml
+++ b/share/regions/config_201.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c9" SimName="201" SimLocationX="1009" SimLocationY="1006" Datastore="store_201_x09_y12.yap" SimListenPort="9301" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0c9" SimName="201" SimLocationX="1009" SimLocationY="1006" Datastore="store_201_x09_y12.yap" SimListenPort="9301" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_202.xml b/share/regions/config_202.xml
index baab769..51052e8 100644
--- a/share/regions/config_202.xml
+++ b/share/regions/config_202.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ca" SimName="202" SimLocationX="1010" SimLocationY="1006" Datastore="store_202_x10_y12.yap" SimListenPort="9302" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ca" SimName="202" SimLocationX="1010" SimLocationY="1006" Datastore="store_202_x10_y12.yap" SimListenPort="9302" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_203.xml b/share/regions/config_203.xml
index a4aa865..00966c2 100644
--- a/share/regions/config_203.xml
+++ b/share/regions/config_203.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cb" SimName="203" SimLocationX="1011" SimLocationY="1006" Datastore="store_203_x11_y12.yap" SimListenPort="9303" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cb" SimName="203" SimLocationX="1011" SimLocationY="1006" Datastore="store_203_x11_y12.yap" SimListenPort="9303" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_204.xml b/share/regions/config_204.xml
index f5e62b0..a91bde9 100644
--- a/share/regions/config_204.xml
+++ b/share/regions/config_204.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cc" SimName="204" SimLocationX="1012" SimLocationY="1006" Datastore="store_204_x12_y12.yap" SimListenPort="9304" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cc" SimName="204" SimLocationX="1012" SimLocationY="1006" Datastore="store_204_x12_y12.yap" SimListenPort="9304" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_205.xml b/share/regions/config_205.xml
index daafd9a..c96c114 100644
--- a/share/regions/config_205.xml
+++ b/share/regions/config_205.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cd" SimName="205" SimLocationX="1013" SimLocationY="1006" Datastore="store_205_x13_y12.yap" SimListenPort="9305" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cd" SimName="205" SimLocationX="1013" SimLocationY="1006" Datastore="store_205_x13_y12.yap" SimListenPort="9305" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_206.xml b/share/regions/config_206.xml
index 951303b..353c7ff 100644
--- a/share/regions/config_206.xml
+++ b/share/regions/config_206.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ce" SimName="206" SimLocationX="1014" SimLocationY="1006" Datastore="store_206_x14_y12.yap" SimListenPort="9306" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ce" SimName="206" SimLocationX="1014" SimLocationY="1006" Datastore="store_206_x14_y12.yap" SimListenPort="9306" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_207.xml b/share/regions/config_207.xml
index 6978761..1209404 100644
--- a/share/regions/config_207.xml
+++ b/share/regions/config_207.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cf" SimName="207" SimLocationX="1015" SimLocationY="1006" Datastore="store_207_x15_y12.yap" SimListenPort="9307" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0cf" SimName="207" SimLocationX="1015" SimLocationY="1006" Datastore="store_207_x15_y12.yap" SimListenPort="9307" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y03.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_208.xml b/share/regions/config_208.xml
index beb4192..f89b31b 100644
--- a/share/regions/config_208.xml
+++ b/share/regions/config_208.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d0" SimName="208" SimLocationX="1016" SimLocationY="1006" Datastore="store_208_x00_y13.yap" SimListenPort="9308" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d0" SimName="208" SimLocationX="1016" SimLocationY="1006" Datastore="store_208_x00_y13.yap" SimListenPort="9308" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_209.xml b/share/regions/config_209.xml
index 0d31497..3ce5640 100644
--- a/share/regions/config_209.xml
+++ b/share/regions/config_209.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d1" SimName="209" SimLocationX="1017" SimLocationY="1006" Datastore="store_209_x01_y13.yap" SimListenPort="9309" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d1" SimName="209" SimLocationX="1017" SimLocationY="1006" Datastore="store_209_x01_y13.yap" SimListenPort="9309" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_21.xml b/share/regions/config_21.xml
index bc6d3c8..0f6045f 100644
--- a/share/regions/config_21.xml
+++ b/share/regions/config_21.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf015" SimName="21" SimLocationX="1021" SimLocationY="1000" Datastore="store_21_x05_y01.yap" SimListenPort="9121" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf015" SimName="21" SimLocationX="1021" SimLocationY="1000" Datastore="store_21_x05_y01.yap" SimListenPort="9121" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_210.xml b/share/regions/config_210.xml
index fefc765..1afbab4 100644
--- a/share/regions/config_210.xml
+++ b/share/regions/config_210.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d2" SimName="210" SimLocationX="1018" SimLocationY="1006" Datastore="store_210_x02_y13.yap" SimListenPort="9310" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d2" SimName="210" SimLocationX="1018" SimLocationY="1006" Datastore="store_210_x02_y13.yap" SimListenPort="9310" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_211.xml b/share/regions/config_211.xml
index 7988165..bd859d6 100644
--- a/share/regions/config_211.xml
+++ b/share/regions/config_211.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d3" SimName="211" SimLocationX="1019" SimLocationY="1006" Datastore="store_211_x03_y13.yap" SimListenPort="9311" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d3" SimName="211" SimLocationX="1019" SimLocationY="1006" Datastore="store_211_x03_y13.yap" SimListenPort="9311" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_212.xml b/share/regions/config_212.xml
index 85dbe0d..e640b1f 100644
--- a/share/regions/config_212.xml
+++ b/share/regions/config_212.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d4" SimName="212" SimLocationX="1020" SimLocationY="1006" Datastore="store_212_x04_y13.yap" SimListenPort="9312" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d4" SimName="212" SimLocationX="1020" SimLocationY="1006" Datastore="store_212_x04_y13.yap" SimListenPort="9312" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_213.xml b/share/regions/config_213.xml
index 548b527..40e6a3b 100644
--- a/share/regions/config_213.xml
+++ b/share/regions/config_213.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d5" SimName="213" SimLocationX="1021" SimLocationY="1006" Datastore="store_213_x05_y13.yap" SimListenPort="9313" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d5" SimName="213" SimLocationX="1021" SimLocationY="1006" Datastore="store_213_x05_y13.yap" SimListenPort="9313" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_214.xml b/share/regions/config_214.xml
index 40d84e4..a9a8605 100644
--- a/share/regions/config_214.xml
+++ b/share/regions/config_214.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d6" SimName="214" SimLocationX="1022" SimLocationY="1006" Datastore="store_214_x06_y13.yap" SimListenPort="9314" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d6" SimName="214" SimLocationX="1022" SimLocationY="1006" Datastore="store_214_x06_y13.yap" SimListenPort="9314" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_215.xml b/share/regions/config_215.xml
index d412233..3973c01 100644
--- a/share/regions/config_215.xml
+++ b/share/regions/config_215.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d7" SimName="215" SimLocationX="1023" SimLocationY="1006" Datastore="store_215_x07_y13.yap" SimListenPort="9315" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d7" SimName="215" SimLocationX="1023" SimLocationY="1006" Datastore="store_215_x07_y13.yap" SimListenPort="9315" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_216.xml b/share/regions/config_216.xml
index f404b28..7ce9225 100644
--- a/share/regions/config_216.xml
+++ b/share/regions/config_216.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d8" SimName="216" SimLocationX="1024" SimLocationY="1006" Datastore="store_216_x08_y13.yap" SimListenPort="9316" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d8" SimName="216" SimLocationX="1024" SimLocationY="1006" Datastore="store_216_x08_y13.yap" SimListenPort="9316" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_217.xml b/share/regions/config_217.xml
index 707bf97..c0c730a 100644
--- a/share/regions/config_217.xml
+++ b/share/regions/config_217.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d9" SimName="217" SimLocationX="1025" SimLocationY="1006" Datastore="store_217_x09_y13.yap" SimListenPort="9317" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0d9" SimName="217" SimLocationX="1025" SimLocationY="1006" Datastore="store_217_x09_y13.yap" SimListenPort="9317" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_218.xml b/share/regions/config_218.xml
index 656c3e0..74cdab6 100644
--- a/share/regions/config_218.xml
+++ b/share/regions/config_218.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0da" SimName="218" SimLocationX="1026" SimLocationY="1006" Datastore="store_218_x10_y13.yap" SimListenPort="9318" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0da" SimName="218" SimLocationX="1026" SimLocationY="1006" Datastore="store_218_x10_y13.yap" SimListenPort="9318" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_219.xml b/share/regions/config_219.xml
index 0dd3407..32a0ed9 100644
--- a/share/regions/config_219.xml
+++ b/share/regions/config_219.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0db" SimName="219" SimLocationX="1027" SimLocationY="1006" Datastore="store_219_x11_y13.yap" SimListenPort="9319" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0db" SimName="219" SimLocationX="1027" SimLocationY="1006" Datastore="store_219_x11_y13.yap" SimListenPort="9319" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_22.xml b/share/regions/config_22.xml
index c474cf8..6316310 100644
--- a/share/regions/config_22.xml
+++ b/share/regions/config_22.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf016" SimName="22" SimLocationX="1022" SimLocationY="1000" Datastore="store_22_x06_y01.yap" SimListenPort="9122" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf016" SimName="22" SimLocationX="1022" SimLocationY="1000" Datastore="store_22_x06_y01.yap" SimListenPort="9122" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_220.xml b/share/regions/config_220.xml
index 4518a89..536b639 100644
--- a/share/regions/config_220.xml
+++ b/share/regions/config_220.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0dc" SimName="220" SimLocationX="1028" SimLocationY="1006" Datastore="store_220_x12_y13.yap" SimListenPort="9320" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0dc" SimName="220" SimLocationX="1028" SimLocationY="1006" Datastore="store_220_x12_y13.yap" SimListenPort="9320" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_221.xml b/share/regions/config_221.xml
index 85c4523..e326815 100644
--- a/share/regions/config_221.xml
+++ b/share/regions/config_221.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0dd" SimName="221" SimLocationX="1029" SimLocationY="1006" Datastore="store_221_x13_y13.yap" SimListenPort="9321" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0dd" SimName="221" SimLocationX="1029" SimLocationY="1006" Datastore="store_221_x13_y13.yap" SimListenPort="9321" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_222.xml b/share/regions/config_222.xml
index 0985eb7..3421318 100644
--- a/share/regions/config_222.xml
+++ b/share/regions/config_222.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0de" SimName="222" SimLocationX="1030" SimLocationY="1006" Datastore="store_222_x14_y13.yap" SimListenPort="9322" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0de" SimName="222" SimLocationX="1030" SimLocationY="1006" Datastore="store_222_x14_y13.yap" SimListenPort="9322" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_223.xml b/share/regions/config_223.xml
index d0884d1..925b64b 100644
--- a/share/regions/config_223.xml
+++ b/share/regions/config_223.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0df" SimName="223" SimLocationX="1031" SimLocationY="1006" Datastore="store_223_x15_y13.yap" SimListenPort="9323" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0df" SimName="223" SimLocationX="1031" SimLocationY="1006" Datastore="store_223_x15_y13.yap" SimListenPort="9323" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y02.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_224.xml b/share/regions/config_224.xml
index 9c8f651..3b81fe3 100644
--- a/share/regions/config_224.xml
+++ b/share/regions/config_224.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e0" SimName="224" SimLocationX="1000" SimLocationY="1007" Datastore="store_224_x00_y14.yap" SimListenPort="9324" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e0" SimName="224" SimLocationX="1000" SimLocationY="1007" Datastore="store_224_x00_y14.yap" SimListenPort="9324" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_225.xml b/share/regions/config_225.xml
index c5dbf32..2b54872 100644
--- a/share/regions/config_225.xml
+++ b/share/regions/config_225.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e1" SimName="225" SimLocationX="1001" SimLocationY="1007" Datastore="store_225_x01_y14.yap" SimListenPort="9325" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e1" SimName="225" SimLocationX="1001" SimLocationY="1007" Datastore="store_225_x01_y14.yap" SimListenPort="9325" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_226.xml b/share/regions/config_226.xml
index 7d831d1..16e1a20 100644
--- a/share/regions/config_226.xml
+++ b/share/regions/config_226.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e2" SimName="226" SimLocationX="1002" SimLocationY="1007" Datastore="store_226_x02_y14.yap" SimListenPort="9326" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e2" SimName="226" SimLocationX="1002" SimLocationY="1007" Datastore="store_226_x02_y14.yap" SimListenPort="9326" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_227.xml b/share/regions/config_227.xml
index d614e38..9f4a2ad 100644
--- a/share/regions/config_227.xml
+++ b/share/regions/config_227.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e3" SimName="227" SimLocationX="1003" SimLocationY="1007" Datastore="store_227_x03_y14.yap" SimListenPort="9327" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e3" SimName="227" SimLocationX="1003" SimLocationY="1007" Datastore="store_227_x03_y14.yap" SimListenPort="9327" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_228.xml b/share/regions/config_228.xml
index 8ad7b59..0da26cd 100644
--- a/share/regions/config_228.xml
+++ b/share/regions/config_228.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e4" SimName="228" SimLocationX="1004" SimLocationY="1007" Datastore="store_228_x04_y14.yap" SimListenPort="9328" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e4" SimName="228" SimLocationX="1004" SimLocationY="1007" Datastore="store_228_x04_y14.yap" SimListenPort="9328" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_229.xml b/share/regions/config_229.xml
index 6a56d2a..8687657 100644
--- a/share/regions/config_229.xml
+++ b/share/regions/config_229.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e5" SimName="229" SimLocationX="1005" SimLocationY="1007" Datastore="store_229_x05_y14.yap" SimListenPort="9329" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e5" SimName="229" SimLocationX="1005" SimLocationY="1007" Datastore="store_229_x05_y14.yap" SimListenPort="9329" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_23.xml b/share/regions/config_23.xml
index 7d29fec..d063810 100644
--- a/share/regions/config_23.xml
+++ b/share/regions/config_23.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf017" SimName="23" SimLocationX="1023" SimLocationY="1000" Datastore="store_23_x07_y01.yap" SimListenPort="9123" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf017" SimName="23" SimLocationX="1023" SimLocationY="1000" Datastore="store_23_x07_y01.yap" SimListenPort="9123" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_230.xml b/share/regions/config_230.xml
index 8fcb606..54c9798 100644
--- a/share/regions/config_230.xml
+++ b/share/regions/config_230.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e6" SimName="230" SimLocationX="1006" SimLocationY="1007" Datastore="store_230_x06_y14.yap" SimListenPort="9330" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e6" SimName="230" SimLocationX="1006" SimLocationY="1007" Datastore="store_230_x06_y14.yap" SimListenPort="9330" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_231.xml b/share/regions/config_231.xml
index c024242..d2c0878 100644
--- a/share/regions/config_231.xml
+++ b/share/regions/config_231.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e7" SimName="231" SimLocationX="1007" SimLocationY="1007" Datastore="store_231_x07_y14.yap" SimListenPort="9331" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e7" SimName="231" SimLocationX="1007" SimLocationY="1007" Datastore="store_231_x07_y14.yap" SimListenPort="9331" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_232.xml b/share/regions/config_232.xml
index f55b7f0..1251239 100644
--- a/share/regions/config_232.xml
+++ b/share/regions/config_232.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e8" SimName="232" SimLocationX="1008" SimLocationY="1007" Datastore="store_232_x08_y14.yap" SimListenPort="9332" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e8" SimName="232" SimLocationX="1008" SimLocationY="1007" Datastore="store_232_x08_y14.yap" SimListenPort="9332" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_233.xml b/share/regions/config_233.xml
index 9ba5de1..bfa8fa7 100644
--- a/share/regions/config_233.xml
+++ b/share/regions/config_233.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e9" SimName="233" SimLocationX="1009" SimLocationY="1007" Datastore="store_233_x09_y14.yap" SimListenPort="9333" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0e9" SimName="233" SimLocationX="1009" SimLocationY="1007" Datastore="store_233_x09_y14.yap" SimListenPort="9333" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_234.xml b/share/regions/config_234.xml
index 7f5164f..6378fe9 100644
--- a/share/regions/config_234.xml
+++ b/share/regions/config_234.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ea" SimName="234" SimLocationX="1010" SimLocationY="1007" Datastore="store_234_x10_y14.yap" SimListenPort="9334" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ea" SimName="234" SimLocationX="1010" SimLocationY="1007" Datastore="store_234_x10_y14.yap" SimListenPort="9334" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_235.xml b/share/regions/config_235.xml
index 6a8292c..cf4b6a7 100644
--- a/share/regions/config_235.xml
+++ b/share/regions/config_235.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0eb" SimName="235" SimLocationX="1011" SimLocationY="1007" Datastore="store_235_x11_y14.yap" SimListenPort="9335" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0eb" SimName="235" SimLocationX="1011" SimLocationY="1007" Datastore="store_235_x11_y14.yap" SimListenPort="9335" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_236.xml b/share/regions/config_236.xml
index f99af33..b2e9d23 100644
--- a/share/regions/config_236.xml
+++ b/share/regions/config_236.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ec" SimName="236" SimLocationX="1012" SimLocationY="1007" Datastore="store_236_x12_y14.yap" SimListenPort="9336" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ec" SimName="236" SimLocationX="1012" SimLocationY="1007" Datastore="store_236_x12_y14.yap" SimListenPort="9336" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_237.xml b/share/regions/config_237.xml
index 3c8199f..734f523 100644
--- a/share/regions/config_237.xml
+++ b/share/regions/config_237.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ed" SimName="237" SimLocationX="1013" SimLocationY="1007" Datastore="store_237_x13_y14.yap" SimListenPort="9337" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ed" SimName="237" SimLocationX="1013" SimLocationY="1007" Datastore="store_237_x13_y14.yap" SimListenPort="9337" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_238.xml b/share/regions/config_238.xml
index 0144491..aa60b51 100644
--- a/share/regions/config_238.xml
+++ b/share/regions/config_238.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ee" SimName="238" SimLocationX="1014" SimLocationY="1007" Datastore="store_238_x14_y14.yap" SimListenPort="9338" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ee" SimName="238" SimLocationX="1014" SimLocationY="1007" Datastore="store_238_x14_y14.yap" SimListenPort="9338" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_239.xml b/share/regions/config_239.xml
index 9bf8bf5..192325a 100644
--- a/share/regions/config_239.xml
+++ b/share/regions/config_239.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ef" SimName="239" SimLocationX="1015" SimLocationY="1007" Datastore="store_239_x15_y14.yap" SimListenPort="9339" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ef" SimName="239" SimLocationX="1015" SimLocationY="1007" Datastore="store_239_x15_y14.yap" SimListenPort="9339" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y01.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_24.xml b/share/regions/config_24.xml
index c6f1752..e1ca98b 100644
--- a/share/regions/config_24.xml
+++ b/share/regions/config_24.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf018" SimName="24" SimLocationX="1024" SimLocationY="1000" Datastore="store_24_x08_y01.yap" SimListenPort="9124" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf018" SimName="24" SimLocationX="1024" SimLocationY="1000" Datastore="store_24_x08_y01.yap" SimListenPort="9124" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_240.xml b/share/regions/config_240.xml
index ad7181a..b45cc5e 100644
--- a/share/regions/config_240.xml
+++ b/share/regions/config_240.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f0" SimName="240" SimLocationX="1016" SimLocationY="1007" Datastore="store_240_x00_y15.yap" SimListenPort="9340" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f0" SimName="240" SimLocationX="1016" SimLocationY="1007" Datastore="store_240_x00_y15.yap" SimListenPort="9340" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_241.xml b/share/regions/config_241.xml
index 3fd187f..422e566 100644
--- a/share/regions/config_241.xml
+++ b/share/regions/config_241.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f1" SimName="241" SimLocationX="1017" SimLocationY="1007" Datastore="store_241_x01_y15.yap" SimListenPort="9341" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f1" SimName="241" SimLocationX="1017" SimLocationY="1007" Datastore="store_241_x01_y15.yap" SimListenPort="9341" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_242.xml b/share/regions/config_242.xml
index 6d265ef..2602fb9 100644
--- a/share/regions/config_242.xml
+++ b/share/regions/config_242.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f2" SimName="242" SimLocationX="1018" SimLocationY="1007" Datastore="store_242_x02_y15.yap" SimListenPort="9342" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f2" SimName="242" SimLocationX="1018" SimLocationY="1007" Datastore="store_242_x02_y15.yap" SimListenPort="9342" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_243.xml b/share/regions/config_243.xml
index a3c7508..154fa6c 100644
--- a/share/regions/config_243.xml
+++ b/share/regions/config_243.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f3" SimName="243" SimLocationX="1019" SimLocationY="1007" Datastore="store_243_x03_y15.yap" SimListenPort="9343" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f3" SimName="243" SimLocationX="1019" SimLocationY="1007" Datastore="store_243_x03_y15.yap" SimListenPort="9343" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_244.xml b/share/regions/config_244.xml
index b36846d..04f0a2c 100644
--- a/share/regions/config_244.xml
+++ b/share/regions/config_244.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f4" SimName="244" SimLocationX="1020" SimLocationY="1007" Datastore="store_244_x04_y15.yap" SimListenPort="9344" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f4" SimName="244" SimLocationX="1020" SimLocationY="1007" Datastore="store_244_x04_y15.yap" SimListenPort="9344" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_245.xml b/share/regions/config_245.xml
index 22f57a6..a795799 100644
--- a/share/regions/config_245.xml
+++ b/share/regions/config_245.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f5" SimName="245" SimLocationX="1021" SimLocationY="1007" Datastore="store_245_x05_y15.yap" SimListenPort="9345" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f5" SimName="245" SimLocationX="1021" SimLocationY="1007" Datastore="store_245_x05_y15.yap" SimListenPort="9345" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_246.xml b/share/regions/config_246.xml
index 9ead36c..84c76c5 100644
--- a/share/regions/config_246.xml
+++ b/share/regions/config_246.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f6" SimName="246" SimLocationX="1022" SimLocationY="1007" Datastore="store_246_x06_y15.yap" SimListenPort="9346" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f6" SimName="246" SimLocationX="1022" SimLocationY="1007" Datastore="store_246_x06_y15.yap" SimListenPort="9346" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_247.xml b/share/regions/config_247.xml
index 7bcb4d4..a9e90ac 100644
--- a/share/regions/config_247.xml
+++ b/share/regions/config_247.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f7" SimName="247" SimLocationX="1023" SimLocationY="1007" Datastore="store_247_x07_y15.yap" SimListenPort="9347" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f7" SimName="247" SimLocationX="1023" SimLocationY="1007" Datastore="store_247_x07_y15.yap" SimListenPort="9347" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_248.xml b/share/regions/config_248.xml
index 48232f1..1687688 100644
--- a/share/regions/config_248.xml
+++ b/share/regions/config_248.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f8" SimName="248" SimLocationX="1024" SimLocationY="1007" Datastore="store_248_x08_y15.yap" SimListenPort="9348" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f8" SimName="248" SimLocationX="1024" SimLocationY="1007" Datastore="store_248_x08_y15.yap" SimListenPort="9348" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_249.xml b/share/regions/config_249.xml
index 6d62588..6252873 100644
--- a/share/regions/config_249.xml
+++ b/share/regions/config_249.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f9" SimName="249" SimLocationX="1025" SimLocationY="1007" Datastore="store_249_x09_y15.yap" SimListenPort="9349" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0f9" SimName="249" SimLocationX="1025" SimLocationY="1007" Datastore="store_249_x09_y15.yap" SimListenPort="9349" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_25.xml b/share/regions/config_25.xml
index 5543521..cbab2bc 100644
--- a/share/regions/config_25.xml
+++ b/share/regions/config_25.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf019" SimName="25" SimLocationX="1025" SimLocationY="1000" Datastore="store_25_x09_y01.yap" SimListenPort="9125" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf019" SimName="25" SimLocationX="1025" SimLocationY="1000" Datastore="store_25_x09_y01.yap" SimListenPort="9125" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_250.xml b/share/regions/config_250.xml
index 1b1abaa..767ce8d 100644
--- a/share/regions/config_250.xml
+++ b/share/regions/config_250.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fa" SimName="250" SimLocationX="1026" SimLocationY="1007" Datastore="store_250_x10_y15.yap" SimListenPort="9350" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fa" SimName="250" SimLocationX="1026" SimLocationY="1007" Datastore="store_250_x10_y15.yap" SimListenPort="9350" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_251.xml b/share/regions/config_251.xml
index 780a6e6..b2c3962 100644
--- a/share/regions/config_251.xml
+++ b/share/regions/config_251.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fb" SimName="251" SimLocationX="1027" SimLocationY="1007" Datastore="store_251_x11_y15.yap" SimListenPort="9351" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fb" SimName="251" SimLocationX="1027" SimLocationY="1007" Datastore="store_251_x11_y15.yap" SimListenPort="9351" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_252.xml b/share/regions/config_252.xml
index 5adfad5..332fc9f 100644
--- a/share/regions/config_252.xml
+++ b/share/regions/config_252.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fc" SimName="252" SimLocationX="1028" SimLocationY="1007" Datastore="store_252_x12_y15.yap" SimListenPort="9352" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fc" SimName="252" SimLocationX="1028" SimLocationY="1007" Datastore="store_252_x12_y15.yap" SimListenPort="9352" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_253.xml b/share/regions/config_253.xml
index d974650..b80db76 100644
--- a/share/regions/config_253.xml
+++ b/share/regions/config_253.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fd" SimName="253" SimLocationX="1029" SimLocationY="1007" Datastore="store_253_x13_y15.yap" SimListenPort="9353" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fd" SimName="253" SimLocationX="1029" SimLocationY="1007" Datastore="store_253_x13_y15.yap" SimListenPort="9353" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_254.xml b/share/regions/config_254.xml
index ccb55f9..7b6dc9d 100644
--- a/share/regions/config_254.xml
+++ b/share/regions/config_254.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fe" SimName="254" SimLocationX="1030" SimLocationY="1007" Datastore="store_254_x14_y15.yap" SimListenPort="9354" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0fe" SimName="254" SimLocationX="1030" SimLocationY="1007" Datastore="store_254_x14_y15.yap" SimListenPort="9354" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_255.xml b/share/regions/config_255.xml
index 7cec0e9..cb7dc9b 100644
--- a/share/regions/config_255.xml
+++ b/share/regions/config_255.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ff" SimName="255" SimLocationX="1031" SimLocationY="1007" Datastore="store_255_x15_y15.yap" SimListenPort="9355" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf0ff" SimName="255" SimLocationX="1031" SimLocationY="1007" Datastore="store_255_x15_y15.yap" SimListenPort="9355" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y00.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_256.xml b/share/regions/config_256.xml
index 59a632f..1561a5c 100644
--- a/share/regions/config_256.xml
+++ b/share/regions/config_256.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf100" SimName="256" SimLocationX="1000" SimLocationY="1008" Datastore="store_256_x00_y16.yap" SimListenPort="9356" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf100" SimName="256" SimLocationX="1000" SimLocationY="1008" Datastore="store_256_x00_y16.yap" SimListenPort="9356" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_257.xml b/share/regions/config_257.xml
index 6e0543e..b850928 100644
--- a/share/regions/config_257.xml
+++ b/share/regions/config_257.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf101" SimName="257" SimLocationX="1001" SimLocationY="1008" Datastore="store_257_x01_y16.yap" SimListenPort="9357" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf101" SimName="257" SimLocationX="1001" SimLocationY="1008" Datastore="store_257_x01_y16.yap" SimListenPort="9357" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_258.xml b/share/regions/config_258.xml
index 655ace1..db0b63e 100644
--- a/share/regions/config_258.xml
+++ b/share/regions/config_258.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf102" SimName="258" SimLocationX="1002" SimLocationY="1008" Datastore="store_258_x02_y16.yap" SimListenPort="9358" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf102" SimName="258" SimLocationX="1002" SimLocationY="1008" Datastore="store_258_x02_y16.yap" SimListenPort="9358" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_259.xml b/share/regions/config_259.xml
index 78c90d6..f13f2c3 100644
--- a/share/regions/config_259.xml
+++ b/share/regions/config_259.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf103" SimName="259" SimLocationX="1003" SimLocationY="1008" Datastore="store_259_x03_y16.yap" SimListenPort="9359" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf103" SimName="259" SimLocationX="1003" SimLocationY="1008" Datastore="store_259_x03_y16.yap" SimListenPort="9359" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_26.xml b/share/regions/config_26.xml
index 763a3b1..ff511a9 100644
--- a/share/regions/config_26.xml
+++ b/share/regions/config_26.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01a" SimName="26" SimLocationX="1026" SimLocationY="1000" Datastore="store_26_x10_y01.yap" SimListenPort="9126" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01a" SimName="26" SimLocationX="1026" SimLocationY="1000" Datastore="store_26_x10_y01.yap" SimListenPort="9126" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_260.xml b/share/regions/config_260.xml
index 96e20ae..81dc28e 100644
--- a/share/regions/config_260.xml
+++ b/share/regions/config_260.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf104" SimName="260" SimLocationX="1004" SimLocationY="1008" Datastore="store_260_x04_y16.yap" SimListenPort="9360" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf104" SimName="260" SimLocationX="1004" SimLocationY="1008" Datastore="store_260_x04_y16.yap" SimListenPort="9360" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_261.xml b/share/regions/config_261.xml
index d50760c..40f710f 100644
--- a/share/regions/config_261.xml
+++ b/share/regions/config_261.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf105" SimName="261" SimLocationX="1005" SimLocationY="1008" Datastore="store_261_x05_y16.yap" SimListenPort="9361" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf105" SimName="261" SimLocationX="1005" SimLocationY="1008" Datastore="store_261_x05_y16.yap" SimListenPort="9361" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_262.xml b/share/regions/config_262.xml
index 96f8101..9ad492e 100644
--- a/share/regions/config_262.xml
+++ b/share/regions/config_262.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf106" SimName="262" SimLocationX="1006" SimLocationY="1008" Datastore="store_262_x06_y16.yap" SimListenPort="9362" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf106" SimName="262" SimLocationX="1006" SimLocationY="1008" Datastore="store_262_x06_y16.yap" SimListenPort="9362" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_263.xml b/share/regions/config_263.xml
index 2ce131b..874ae6e 100644
--- a/share/regions/config_263.xml
+++ b/share/regions/config_263.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf107" SimName="263" SimLocationX="1007" SimLocationY="1008" Datastore="store_263_x07_y16.yap" SimListenPort="9363" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf107" SimName="263" SimLocationX="1007" SimLocationY="1008" Datastore="store_263_x07_y16.yap" SimListenPort="9363" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_264.xml b/share/regions/config_264.xml
index 48e9e5d..5d82927 100644
--- a/share/regions/config_264.xml
+++ b/share/regions/config_264.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf108" SimName="264" SimLocationX="1008" SimLocationY="1008" Datastore="store_264_x08_y16.yap" SimListenPort="9364" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf108" SimName="264" SimLocationX="1008" SimLocationY="1008" Datastore="store_264_x08_y16.yap" SimListenPort="9364" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_265.xml b/share/regions/config_265.xml
index 45a4702..b7a76db 100644
--- a/share/regions/config_265.xml
+++ b/share/regions/config_265.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf109" SimName="265" SimLocationX="1009" SimLocationY="1008" Datastore="store_265_x09_y16.yap" SimListenPort="9365" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf109" SimName="265" SimLocationX="1009" SimLocationY="1008" Datastore="store_265_x09_y16.yap" SimListenPort="9365" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_266.xml b/share/regions/config_266.xml
index 19b71ef..63ae3e1 100644
--- a/share/regions/config_266.xml
+++ b/share/regions/config_266.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10a" SimName="266" SimLocationX="1010" SimLocationY="1008" Datastore="store_266_x10_y16.yap" SimListenPort="9366" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10a" SimName="266" SimLocationX="1010" SimLocationY="1008" Datastore="store_266_x10_y16.yap" SimListenPort="9366" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_267.xml b/share/regions/config_267.xml
index 66d6461..c581f82 100644
--- a/share/regions/config_267.xml
+++ b/share/regions/config_267.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10b" SimName="267" SimLocationX="1011" SimLocationY="1008" Datastore="store_267_x11_y16.yap" SimListenPort="9367" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10b" SimName="267" SimLocationX="1011" SimLocationY="1008" Datastore="store_267_x11_y16.yap" SimListenPort="9367" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_268.xml b/share/regions/config_268.xml
index 4a7d8a5..a48b4ba 100644
--- a/share/regions/config_268.xml
+++ b/share/regions/config_268.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10c" SimName="268" SimLocationX="1012" SimLocationY="1008" Datastore="store_268_x12_y16.yap" SimListenPort="9368" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10c" SimName="268" SimLocationX="1012" SimLocationY="1008" Datastore="store_268_x12_y16.yap" SimListenPort="9368" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_269.xml b/share/regions/config_269.xml
index 3b31628..07e308a 100644
--- a/share/regions/config_269.xml
+++ b/share/regions/config_269.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10d" SimName="269" SimLocationX="1013" SimLocationY="1008" Datastore="store_269_x13_y16.yap" SimListenPort="9369" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10d" SimName="269" SimLocationX="1013" SimLocationY="1008" Datastore="store_269_x13_y16.yap" SimListenPort="9369" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_27.xml b/share/regions/config_27.xml
index 8dfbbd3..5a767cd 100644
--- a/share/regions/config_27.xml
+++ b/share/regions/config_27.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01b" SimName="27" SimLocationX="1027" SimLocationY="1000" Datastore="store_27_x11_y01.yap" SimListenPort="9127" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01b" SimName="27" SimLocationX="1027" SimLocationY="1000" Datastore="store_27_x11_y01.yap" SimListenPort="9127" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_270.xml b/share/regions/config_270.xml
index 9117885..908325c 100644
--- a/share/regions/config_270.xml
+++ b/share/regions/config_270.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10e" SimName="270" SimLocationX="1014" SimLocationY="1008" Datastore="store_270_x14_y16.yap" SimListenPort="9370" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10e" SimName="270" SimLocationX="1014" SimLocationY="1008" Datastore="store_270_x14_y16.yap" SimListenPort="9370" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_271.xml b/share/regions/config_271.xml
index af8522c..3dc0927 100644
--- a/share/regions/config_271.xml
+++ b/share/regions/config_271.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10f" SimName="271" SimLocationX="1015" SimLocationY="1008" Datastore="store_271_x15_y16.yap" SimListenPort="9371" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf10f" SimName="271" SimLocationX="1015" SimLocationY="1008" Datastore="store_271_x15_y16.yap" SimListenPort="9371" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-1.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_272.xml b/share/regions/config_272.xml
index 0274ef9..9cd48b2 100644
--- a/share/regions/config_272.xml
+++ b/share/regions/config_272.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf110" SimName="272" SimLocationX="1016" SimLocationY="1008" Datastore="store_272_x00_y17.yap" SimListenPort="9372" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf110" SimName="272" SimLocationX="1016" SimLocationY="1008" Datastore="store_272_x00_y17.yap" SimListenPort="9372" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_273.xml b/share/regions/config_273.xml
index 0f55269..a6aa7c5 100644
--- a/share/regions/config_273.xml
+++ b/share/regions/config_273.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf111" SimName="273" SimLocationX="1017" SimLocationY="1008" Datastore="store_273_x01_y17.yap" SimListenPort="9373" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf111" SimName="273" SimLocationX="1017" SimLocationY="1008" Datastore="store_273_x01_y17.yap" SimListenPort="9373" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_274.xml b/share/regions/config_274.xml
index 35f3a9d..c457edc 100644
--- a/share/regions/config_274.xml
+++ b/share/regions/config_274.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf112" SimName="274" SimLocationX="1018" SimLocationY="1008" Datastore="store_274_x02_y17.yap" SimListenPort="9374" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf112" SimName="274" SimLocationX="1018" SimLocationY="1008" Datastore="store_274_x02_y17.yap" SimListenPort="9374" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_275.xml b/share/regions/config_275.xml
index fc37b99..105bfee 100644
--- a/share/regions/config_275.xml
+++ b/share/regions/config_275.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf113" SimName="275" SimLocationX="1019" SimLocationY="1008" Datastore="store_275_x03_y17.yap" SimListenPort="9375" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf113" SimName="275" SimLocationX="1019" SimLocationY="1008" Datastore="store_275_x03_y17.yap" SimListenPort="9375" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_276.xml b/share/regions/config_276.xml
index 2ffa80c..f4ef95b 100644
--- a/share/regions/config_276.xml
+++ b/share/regions/config_276.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf114" SimName="276" SimLocationX="1020" SimLocationY="1008" Datastore="store_276_x04_y17.yap" SimListenPort="9376" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf114" SimName="276" SimLocationX="1020" SimLocationY="1008" Datastore="store_276_x04_y17.yap" SimListenPort="9376" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_277.xml b/share/regions/config_277.xml
index 8f4f35c..b16458c 100644
--- a/share/regions/config_277.xml
+++ b/share/regions/config_277.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf115" SimName="277" SimLocationX="1021" SimLocationY="1008" Datastore="store_277_x05_y17.yap" SimListenPort="9377" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf115" SimName="277" SimLocationX="1021" SimLocationY="1008" Datastore="store_277_x05_y17.yap" SimListenPort="9377" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_278.xml b/share/regions/config_278.xml
index 3363f18..d110adb 100644
--- a/share/regions/config_278.xml
+++ b/share/regions/config_278.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf116" SimName="278" SimLocationX="1022" SimLocationY="1008" Datastore="store_278_x06_y17.yap" SimListenPort="9378" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf116" SimName="278" SimLocationX="1022" SimLocationY="1008" Datastore="store_278_x06_y17.yap" SimListenPort="9378" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_279.xml b/share/regions/config_279.xml
index df78f8f..711da84 100644
--- a/share/regions/config_279.xml
+++ b/share/regions/config_279.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf117" SimName="279" SimLocationX="1023" SimLocationY="1008" Datastore="store_279_x07_y17.yap" SimListenPort="9379" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf117" SimName="279" SimLocationX="1023" SimLocationY="1008" Datastore="store_279_x07_y17.yap" SimListenPort="9379" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_28.xml b/share/regions/config_28.xml
index 5e6441d..aeb4134 100644
--- a/share/regions/config_28.xml
+++ b/share/regions/config_28.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01c" SimName="28" SimLocationX="1028" SimLocationY="1000" Datastore="store_28_x12_y01.yap" SimListenPort="9128" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01c" SimName="28" SimLocationX="1028" SimLocationY="1000" Datastore="store_28_x12_y01.yap" SimListenPort="9128" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_280.xml b/share/regions/config_280.xml
index 766ac88..738146b 100644
--- a/share/regions/config_280.xml
+++ b/share/regions/config_280.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf118" SimName="280" SimLocationX="1024" SimLocationY="1008" Datastore="store_280_x08_y17.yap" SimListenPort="9380" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf118" SimName="280" SimLocationX="1024" SimLocationY="1008" Datastore="store_280_x08_y17.yap" SimListenPort="9380" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_281.xml b/share/regions/config_281.xml
index 32c6aa7..f35768a 100644
--- a/share/regions/config_281.xml
+++ b/share/regions/config_281.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf119" SimName="281" SimLocationX="1025" SimLocationY="1008" Datastore="store_281_x09_y17.yap" SimListenPort="9381" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf119" SimName="281" SimLocationX="1025" SimLocationY="1008" Datastore="store_281_x09_y17.yap" SimListenPort="9381" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_282.xml b/share/regions/config_282.xml
index d53e3d9..2267718 100644
--- a/share/regions/config_282.xml
+++ b/share/regions/config_282.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11a" SimName="282" SimLocationX="1026" SimLocationY="1008" Datastore="store_282_x10_y17.yap" SimListenPort="9382" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11a" SimName="282" SimLocationX="1026" SimLocationY="1008" Datastore="store_282_x10_y17.yap" SimListenPort="9382" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_283.xml b/share/regions/config_283.xml
index 9db3fdf..9116a83 100644
--- a/share/regions/config_283.xml
+++ b/share/regions/config_283.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11b" SimName="283" SimLocationX="1027" SimLocationY="1008" Datastore="store_283_x11_y17.yap" SimListenPort="9383" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11b" SimName="283" SimLocationX="1027" SimLocationY="1008" Datastore="store_283_x11_y17.yap" SimListenPort="9383" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_284.xml b/share/regions/config_284.xml
index 905bbb4..a3dda12 100644
--- a/share/regions/config_284.xml
+++ b/share/regions/config_284.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11c" SimName="284" SimLocationX="1028" SimLocationY="1008" Datastore="store_284_x12_y17.yap" SimListenPort="9384" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11c" SimName="284" SimLocationX="1028" SimLocationY="1008" Datastore="store_284_x12_y17.yap" SimListenPort="9384" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_285.xml b/share/regions/config_285.xml
index 8216e68..352467e 100644
--- a/share/regions/config_285.xml
+++ b/share/regions/config_285.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11d" SimName="285" SimLocationX="1029" SimLocationY="1008" Datastore="store_285_x13_y17.yap" SimListenPort="9385" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11d" SimName="285" SimLocationX="1029" SimLocationY="1008" Datastore="store_285_x13_y17.yap" SimListenPort="9385" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_286.xml b/share/regions/config_286.xml
index 58d10df..84a08b4 100644
--- a/share/regions/config_286.xml
+++ b/share/regions/config_286.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11e" SimName="286" SimLocationX="1030" SimLocationY="1008" Datastore="store_286_x14_y17.yap" SimListenPort="9386" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11e" SimName="286" SimLocationX="1030" SimLocationY="1008" Datastore="store_286_x14_y17.yap" SimListenPort="9386" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_287.xml b/share/regions/config_287.xml
index 4eee8cd..196433f 100644
--- a/share/regions/config_287.xml
+++ b/share/regions/config_287.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11f" SimName="287" SimLocationX="1031" SimLocationY="1008" Datastore="store_287_x15_y17.yap" SimListenPort="9387" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf11f" SimName="287" SimLocationX="1031" SimLocationY="1008" Datastore="store_287_x15_y17.yap" SimListenPort="9387" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-2.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_288.xml b/share/regions/config_288.xml
index ee82cd2..92e6042 100644
--- a/share/regions/config_288.xml
+++ b/share/regions/config_288.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf120" SimName="288" SimLocationX="1000" SimLocationY="1009" Datastore="store_288_x00_y18.yap" SimListenPort="9388" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf120" SimName="288" SimLocationX="1000" SimLocationY="1009" Datastore="store_288_x00_y18.yap" SimListenPort="9388" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_289.xml b/share/regions/config_289.xml
index 9601fc7..90d55ab 100644
--- a/share/regions/config_289.xml
+++ b/share/regions/config_289.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf121" SimName="289" SimLocationX="1001" SimLocationY="1009" Datastore="store_289_x01_y18.yap" SimListenPort="9389" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf121" SimName="289" SimLocationX="1001" SimLocationY="1009" Datastore="store_289_x01_y18.yap" SimListenPort="9389" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_29.xml b/share/regions/config_29.xml
index 1881ee9..f834797 100644
--- a/share/regions/config_29.xml
+++ b/share/regions/config_29.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01d" SimName="29" SimLocationX="1029" SimLocationY="1000" Datastore="store_29_x13_y01.yap" SimListenPort="9129" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01d" SimName="29" SimLocationX="1029" SimLocationY="1000" Datastore="store_29_x13_y01.yap" SimListenPort="9129" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_290.xml b/share/regions/config_290.xml
index 22a383a..f3ffda3 100644
--- a/share/regions/config_290.xml
+++ b/share/regions/config_290.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf122" SimName="290" SimLocationX="1002" SimLocationY="1009" Datastore="store_290_x02_y18.yap" SimListenPort="9390" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf122" SimName="290" SimLocationX="1002" SimLocationY="1009" Datastore="store_290_x02_y18.yap" SimListenPort="9390" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_291.xml b/share/regions/config_291.xml
index 540d89d..9433eec 100644
--- a/share/regions/config_291.xml
+++ b/share/regions/config_291.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf123" SimName="291" SimLocationX="1003" SimLocationY="1009" Datastore="store_291_x03_y18.yap" SimListenPort="9391" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf123" SimName="291" SimLocationX="1003" SimLocationY="1009" Datastore="store_291_x03_y18.yap" SimListenPort="9391" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_292.xml b/share/regions/config_292.xml
index 6ce1d47..71acc01 100644
--- a/share/regions/config_292.xml
+++ b/share/regions/config_292.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf124" SimName="292" SimLocationX="1004" SimLocationY="1009" Datastore="store_292_x04_y18.yap" SimListenPort="9392" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf124" SimName="292" SimLocationX="1004" SimLocationY="1009" Datastore="store_292_x04_y18.yap" SimListenPort="9392" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_293.xml b/share/regions/config_293.xml
index 003d49a..e030878 100644
--- a/share/regions/config_293.xml
+++ b/share/regions/config_293.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf125" SimName="293" SimLocationX="1005" SimLocationY="1009" Datastore="store_293_x05_y18.yap" SimListenPort="9393" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf125" SimName="293" SimLocationX="1005" SimLocationY="1009" Datastore="store_293_x05_y18.yap" SimListenPort="9393" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_294.xml b/share/regions/config_294.xml
index f668758..94ed34f 100644
--- a/share/regions/config_294.xml
+++ b/share/regions/config_294.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf126" SimName="294" SimLocationX="1006" SimLocationY="1009" Datastore="store_294_x06_y18.yap" SimListenPort="9394" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf126" SimName="294" SimLocationX="1006" SimLocationY="1009" Datastore="store_294_x06_y18.yap" SimListenPort="9394" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_295.xml b/share/regions/config_295.xml
index d102961..4e330a5 100644
--- a/share/regions/config_295.xml
+++ b/share/regions/config_295.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf127" SimName="295" SimLocationX="1007" SimLocationY="1009" Datastore="store_295_x07_y18.yap" SimListenPort="9395" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf127" SimName="295" SimLocationX="1007" SimLocationY="1009" Datastore="store_295_x07_y18.yap" SimListenPort="9395" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_296.xml b/share/regions/config_296.xml
index 5e012e4..9861da5 100644
--- a/share/regions/config_296.xml
+++ b/share/regions/config_296.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf128" SimName="296" SimLocationX="1008" SimLocationY="1009" Datastore="store_296_x08_y18.yap" SimListenPort="9396" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf128" SimName="296" SimLocationX="1008" SimLocationY="1009" Datastore="store_296_x08_y18.yap" SimListenPort="9396" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_297.xml b/share/regions/config_297.xml
index a3b8b93..038c85c 100644
--- a/share/regions/config_297.xml
+++ b/share/regions/config_297.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf129" SimName="297" SimLocationX="1009" SimLocationY="1009" Datastore="store_297_x09_y18.yap" SimListenPort="9397" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf129" SimName="297" SimLocationX="1009" SimLocationY="1009" Datastore="store_297_x09_y18.yap" SimListenPort="9397" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_298.xml b/share/regions/config_298.xml
index fdff826..3702df0 100644
--- a/share/regions/config_298.xml
+++ b/share/regions/config_298.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12a" SimName="298" SimLocationX="1010" SimLocationY="1009" Datastore="store_298_x10_y18.yap" SimListenPort="9398" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12a" SimName="298" SimLocationX="1010" SimLocationY="1009" Datastore="store_298_x10_y18.yap" SimListenPort="9398" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_299.xml b/share/regions/config_299.xml
index 0642bb3..8660888 100644
--- a/share/regions/config_299.xml
+++ b/share/regions/config_299.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12b" SimName="299" SimLocationX="1011" SimLocationY="1009" Datastore="store_299_x11_y18.yap" SimListenPort="9399" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12b" SimName="299" SimLocationX="1011" SimLocationY="1009" Datastore="store_299_x11_y18.yap" SimListenPort="9399" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_3.xml b/share/regions/config_3.xml
index 806c88d..be20c7e 100644
--- a/share/regions/config_3.xml
+++ b/share/regions/config_3.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf003" SimName="3" SimLocationX="1003" SimLocationY="1000" Datastore="store_3_x03_y00.yap" SimListenPort="9103" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf003" SimName="3" SimLocationX="1003" SimLocationY="1000" Datastore="store_3_x03_y00.yap" SimListenPort="9103" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_30.xml b/share/regions/config_30.xml
index c1c55ec..21b53be 100644
--- a/share/regions/config_30.xml
+++ b/share/regions/config_30.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01e" SimName="30" SimLocationX="1030" SimLocationY="1000" Datastore="store_30_x14_y01.yap" SimListenPort="9130" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01e" SimName="30" SimLocationX="1030" SimLocationY="1000" Datastore="store_30_x14_y01.yap" SimListenPort="9130" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_300.xml b/share/regions/config_300.xml
index 5fd299f..082fdba 100644
--- a/share/regions/config_300.xml
+++ b/share/regions/config_300.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12c" SimName="300" SimLocationX="1012" SimLocationY="1009" Datastore="store_300_x12_y18.yap" SimListenPort="9400" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12c" SimName="300" SimLocationX="1012" SimLocationY="1009" Datastore="store_300_x12_y18.yap" SimListenPort="9400" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_301.xml b/share/regions/config_301.xml
index 90c08bb..8bf9fe8 100644
--- a/share/regions/config_301.xml
+++ b/share/regions/config_301.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12d" SimName="301" SimLocationX="1013" SimLocationY="1009" Datastore="store_301_x13_y18.yap" SimListenPort="9401" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12d" SimName="301" SimLocationX="1013" SimLocationY="1009" Datastore="store_301_x13_y18.yap" SimListenPort="9401" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_302.xml b/share/regions/config_302.xml
index 4d1c646..5ef9ff1 100644
--- a/share/regions/config_302.xml
+++ b/share/regions/config_302.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12e" SimName="302" SimLocationX="1014" SimLocationY="1009" Datastore="store_302_x14_y18.yap" SimListenPort="9402" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12e" SimName="302" SimLocationX="1014" SimLocationY="1009" Datastore="store_302_x14_y18.yap" SimListenPort="9402" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_303.xml b/share/regions/config_303.xml
index 931bf65..06bd237 100644
--- a/share/regions/config_303.xml
+++ b/share/regions/config_303.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12f" SimName="303" SimLocationX="1015" SimLocationY="1009" Datastore="store_303_x15_y18.yap" SimListenPort="9403" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf12f" SimName="303" SimLocationX="1015" SimLocationY="1009" Datastore="store_303_x15_y18.yap" SimListenPort="9403" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-3.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_304.xml b/share/regions/config_304.xml
index 5d6395a..729be3e 100644
--- a/share/regions/config_304.xml
+++ b/share/regions/config_304.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf130" SimName="304" SimLocationX="1016" SimLocationY="1009" Datastore="store_304_x00_y19.yap" SimListenPort="9404" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf130" SimName="304" SimLocationX="1016" SimLocationY="1009" Datastore="store_304_x00_y19.yap" SimListenPort="9404" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_305.xml b/share/regions/config_305.xml
index 6d95c1d..bd4f0a7 100644
--- a/share/regions/config_305.xml
+++ b/share/regions/config_305.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf131" SimName="305" SimLocationX="1017" SimLocationY="1009" Datastore="store_305_x01_y19.yap" SimListenPort="9405" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf131" SimName="305" SimLocationX="1017" SimLocationY="1009" Datastore="store_305_x01_y19.yap" SimListenPort="9405" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_306.xml b/share/regions/config_306.xml
index 4beb01c..e1eace5 100644
--- a/share/regions/config_306.xml
+++ b/share/regions/config_306.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf132" SimName="306" SimLocationX="1018" SimLocationY="1009" Datastore="store_306_x02_y19.yap" SimListenPort="9406" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf132" SimName="306" SimLocationX="1018" SimLocationY="1009" Datastore="store_306_x02_y19.yap" SimListenPort="9406" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_307.xml b/share/regions/config_307.xml
index ac717c0..b0a9d3e 100644
--- a/share/regions/config_307.xml
+++ b/share/regions/config_307.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf133" SimName="307" SimLocationX="1019" SimLocationY="1009" Datastore="store_307_x03_y19.yap" SimListenPort="9407" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf133" SimName="307" SimLocationX="1019" SimLocationY="1009" Datastore="store_307_x03_y19.yap" SimListenPort="9407" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_308.xml b/share/regions/config_308.xml
index d84b894..6f11859 100644
--- a/share/regions/config_308.xml
+++ b/share/regions/config_308.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf134" SimName="308" SimLocationX="1020" SimLocationY="1009" Datastore="store_308_x04_y19.yap" SimListenPort="9408" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf134" SimName="308" SimLocationX="1020" SimLocationY="1009" Datastore="store_308_x04_y19.yap" SimListenPort="9408" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_309.xml b/share/regions/config_309.xml
index bb6d9cf..22515af 100644
--- a/share/regions/config_309.xml
+++ b/share/regions/config_309.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf135" SimName="309" SimLocationX="1021" SimLocationY="1009" Datastore="store_309_x05_y19.yap" SimListenPort="9409" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf135" SimName="309" SimLocationX="1021" SimLocationY="1009" Datastore="store_309_x05_y19.yap" SimListenPort="9409" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_31.xml b/share/regions/config_31.xml
index a66ed51..9eb621a 100644
--- a/share/regions/config_31.xml
+++ b/share/regions/config_31.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01f" SimName="31" SimLocationX="1031" SimLocationY="1000" Datastore="store_31_x15_y01.yap" SimListenPort="9131" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf01f" SimName="31" SimLocationX="1031" SimLocationY="1000" Datastore="store_31_x15_y01.yap" SimListenPort="9131" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_310.xml b/share/regions/config_310.xml
index c9d537d..c3c869a 100644
--- a/share/regions/config_310.xml
+++ b/share/regions/config_310.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf136" SimName="310" SimLocationX="1022" SimLocationY="1009" Datastore="store_310_x06_y19.yap" SimListenPort="9410" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf136" SimName="310" SimLocationX="1022" SimLocationY="1009" Datastore="store_310_x06_y19.yap" SimListenPort="9410" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_311.xml b/share/regions/config_311.xml
index ecdaeb8..89ea740 100644
--- a/share/regions/config_311.xml
+++ b/share/regions/config_311.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf137" SimName="311" SimLocationX="1023" SimLocationY="1009" Datastore="store_311_x07_y19.yap" SimListenPort="9411" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf137" SimName="311" SimLocationX="1023" SimLocationY="1009" Datastore="store_311_x07_y19.yap" SimListenPort="9411" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_312.xml b/share/regions/config_312.xml
index dbcb515..10f97f9 100644
--- a/share/regions/config_312.xml
+++ b/share/regions/config_312.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf138" SimName="312" SimLocationX="1024" SimLocationY="1009" Datastore="store_312_x08_y19.yap" SimListenPort="9412" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf138" SimName="312" SimLocationX="1024" SimLocationY="1009" Datastore="store_312_x08_y19.yap" SimListenPort="9412" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_313.xml b/share/regions/config_313.xml
index 7dc6b45..aad2cad 100644
--- a/share/regions/config_313.xml
+++ b/share/regions/config_313.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf139" SimName="313" SimLocationX="1025" SimLocationY="1009" Datastore="store_313_x09_y19.yap" SimListenPort="9413" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf139" SimName="313" SimLocationX="1025" SimLocationY="1009" Datastore="store_313_x09_y19.yap" SimListenPort="9413" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_314.xml b/share/regions/config_314.xml
index 865d865..a691bcb 100644
--- a/share/regions/config_314.xml
+++ b/share/regions/config_314.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13a" SimName="314" SimLocationX="1026" SimLocationY="1009" Datastore="store_314_x10_y19.yap" SimListenPort="9414" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13a" SimName="314" SimLocationX="1026" SimLocationY="1009" Datastore="store_314_x10_y19.yap" SimListenPort="9414" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_315.xml b/share/regions/config_315.xml
index 073e89a..f4d9a61 100644
--- a/share/regions/config_315.xml
+++ b/share/regions/config_315.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13b" SimName="315" SimLocationX="1027" SimLocationY="1009" Datastore="store_315_x11_y19.yap" SimListenPort="9415" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13b" SimName="315" SimLocationX="1027" SimLocationY="1009" Datastore="store_315_x11_y19.yap" SimListenPort="9415" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_316.xml b/share/regions/config_316.xml
index 4c5d131..1c3db30 100644
--- a/share/regions/config_316.xml
+++ b/share/regions/config_316.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13c" SimName="316" SimLocationX="1028" SimLocationY="1009" Datastore="store_316_x12_y19.yap" SimListenPort="9416" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13c" SimName="316" SimLocationX="1028" SimLocationY="1009" Datastore="store_316_x12_y19.yap" SimListenPort="9416" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_317.xml b/share/regions/config_317.xml
index 853caf7..f96a9e9 100644
--- a/share/regions/config_317.xml
+++ b/share/regions/config_317.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13d" SimName="317" SimLocationX="1029" SimLocationY="1009" Datastore="store_317_x13_y19.yap" SimListenPort="9417" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13d" SimName="317" SimLocationX="1029" SimLocationY="1009" Datastore="store_317_x13_y19.yap" SimListenPort="9417" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_318.xml b/share/regions/config_318.xml
index d0eb759..773bac7 100644
--- a/share/regions/config_318.xml
+++ b/share/regions/config_318.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13e" SimName="318" SimLocationX="1030" SimLocationY="1009" Datastore="store_318_x14_y19.yap" SimListenPort="9418" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13e" SimName="318" SimLocationX="1030" SimLocationY="1009" Datastore="store_318_x14_y19.yap" SimListenPort="9418" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_319.xml b/share/regions/config_319.xml
index 168875f..85412a4 100644
--- a/share/regions/config_319.xml
+++ b/share/regions/config_319.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13f" SimName="319" SimLocationX="1031" SimLocationY="1009" Datastore="store_319_x15_y19.yap" SimListenPort="9419" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf13f" SimName="319" SimLocationX="1031" SimLocationY="1009" Datastore="store_319_x15_y19.yap" SimListenPort="9419" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-4.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_32.xml b/share/regions/config_32.xml
index 47c45af..12ed130 100644
--- a/share/regions/config_32.xml
+++ b/share/regions/config_32.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf020" SimName="32" SimLocationX="1000" SimLocationY="1001" Datastore="store_32_x00_y02.yap" SimListenPort="9132" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf020" SimName="32" SimLocationX="1000" SimLocationY="1001" Datastore="store_32_x00_y02.yap" SimListenPort="9132" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_320.xml b/share/regions/config_320.xml
index 6f7c12e..c14dd4c 100644
--- a/share/regions/config_320.xml
+++ b/share/regions/config_320.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf140" SimName="320" SimLocationX="1000" SimLocationY="1010" Datastore="store_320_x00_y20.yap" SimListenPort="9420" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf140" SimName="320" SimLocationX="1000" SimLocationY="1010" Datastore="store_320_x00_y20.yap" SimListenPort="9420" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_321.xml b/share/regions/config_321.xml
index dd8c9ea..a287b32 100644
--- a/share/regions/config_321.xml
+++ b/share/regions/config_321.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf141" SimName="321" SimLocationX="1001" SimLocationY="1010" Datastore="store_321_x01_y20.yap" SimListenPort="9421" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf141" SimName="321" SimLocationX="1001" SimLocationY="1010" Datastore="store_321_x01_y20.yap" SimListenPort="9421" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_322.xml b/share/regions/config_322.xml
index 47ec1e8..ca5d8a9 100644
--- a/share/regions/config_322.xml
+++ b/share/regions/config_322.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf142" SimName="322" SimLocationX="1002" SimLocationY="1010" Datastore="store_322_x02_y20.yap" SimListenPort="9422" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf142" SimName="322" SimLocationX="1002" SimLocationY="1010" Datastore="store_322_x02_y20.yap" SimListenPort="9422" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_323.xml b/share/regions/config_323.xml
index e6efaf4..caded4f 100644
--- a/share/regions/config_323.xml
+++ b/share/regions/config_323.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf143" SimName="323" SimLocationX="1003" SimLocationY="1010" Datastore="store_323_x03_y20.yap" SimListenPort="9423" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf143" SimName="323" SimLocationX="1003" SimLocationY="1010" Datastore="store_323_x03_y20.yap" SimListenPort="9423" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_324.xml b/share/regions/config_324.xml
index 24c7a1a..b81867e 100644
--- a/share/regions/config_324.xml
+++ b/share/regions/config_324.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf144" SimName="324" SimLocationX="1004" SimLocationY="1010" Datastore="store_324_x04_y20.yap" SimListenPort="9424" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf144" SimName="324" SimLocationX="1004" SimLocationY="1010" Datastore="store_324_x04_y20.yap" SimListenPort="9424" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_325.xml b/share/regions/config_325.xml
index 5a9b9e1..de71fa0 100644
--- a/share/regions/config_325.xml
+++ b/share/regions/config_325.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf145" SimName="325" SimLocationX="1005" SimLocationY="1010" Datastore="store_325_x05_y20.yap" SimListenPort="9425" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf145" SimName="325" SimLocationX="1005" SimLocationY="1010" Datastore="store_325_x05_y20.yap" SimListenPort="9425" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_326.xml b/share/regions/config_326.xml
index 1994ff3..2513c2b 100644
--- a/share/regions/config_326.xml
+++ b/share/regions/config_326.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf146" SimName="326" SimLocationX="1006" SimLocationY="1010" Datastore="store_326_x06_y20.yap" SimListenPort="9426" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf146" SimName="326" SimLocationX="1006" SimLocationY="1010" Datastore="store_326_x06_y20.yap" SimListenPort="9426" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_327.xml b/share/regions/config_327.xml
index 75a3cfc..3d960f3 100644
--- a/share/regions/config_327.xml
+++ b/share/regions/config_327.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf147" SimName="327" SimLocationX="1007" SimLocationY="1010" Datastore="store_327_x07_y20.yap" SimListenPort="9427" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf147" SimName="327" SimLocationX="1007" SimLocationY="1010" Datastore="store_327_x07_y20.yap" SimListenPort="9427" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_328.xml b/share/regions/config_328.xml
index 824b2e9..aa3798b 100644
--- a/share/regions/config_328.xml
+++ b/share/regions/config_328.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf148" SimName="328" SimLocationX="1008" SimLocationY="1010" Datastore="store_328_x08_y20.yap" SimListenPort="9428" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf148" SimName="328" SimLocationX="1008" SimLocationY="1010" Datastore="store_328_x08_y20.yap" SimListenPort="9428" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_329.xml b/share/regions/config_329.xml
index 757680f..ab86abe 100644
--- a/share/regions/config_329.xml
+++ b/share/regions/config_329.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf149" SimName="329" SimLocationX="1009" SimLocationY="1010" Datastore="store_329_x09_y20.yap" SimListenPort="9429" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf149" SimName="329" SimLocationX="1009" SimLocationY="1010" Datastore="store_329_x09_y20.yap" SimListenPort="9429" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_33.xml b/share/regions/config_33.xml
index 8c14f7a..9195cc6 100644
--- a/share/regions/config_33.xml
+++ b/share/regions/config_33.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf021" SimName="33" SimLocationX="1001" SimLocationY="1001" Datastore="store_33_x01_y02.yap" SimListenPort="9133" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf021" SimName="33" SimLocationX="1001" SimLocationY="1001" Datastore="store_33_x01_y02.yap" SimListenPort="9133" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_330.xml b/share/regions/config_330.xml
index 0270580..287b7ea 100644
--- a/share/regions/config_330.xml
+++ b/share/regions/config_330.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14a" SimName="330" SimLocationX="1010" SimLocationY="1010" Datastore="store_330_x10_y20.yap" SimListenPort="9430" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14a" SimName="330" SimLocationX="1010" SimLocationY="1010" Datastore="store_330_x10_y20.yap" SimListenPort="9430" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_331.xml b/share/regions/config_331.xml
index ad74945..66c15f1 100644
--- a/share/regions/config_331.xml
+++ b/share/regions/config_331.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14b" SimName="331" SimLocationX="1011" SimLocationY="1010" Datastore="store_331_x11_y20.yap" SimListenPort="9431" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14b" SimName="331" SimLocationX="1011" SimLocationY="1010" Datastore="store_331_x11_y20.yap" SimListenPort="9431" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_332.xml b/share/regions/config_332.xml
index bf19af1..17aac8d 100644
--- a/share/regions/config_332.xml
+++ b/share/regions/config_332.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14c" SimName="332" SimLocationX="1012" SimLocationY="1010" Datastore="store_332_x12_y20.yap" SimListenPort="9432" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14c" SimName="332" SimLocationX="1012" SimLocationY="1010" Datastore="store_332_x12_y20.yap" SimListenPort="9432" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_333.xml b/share/regions/config_333.xml
index 3686668..47920e4 100644
--- a/share/regions/config_333.xml
+++ b/share/regions/config_333.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14d" SimName="333" SimLocationX="1013" SimLocationY="1010" Datastore="store_333_x13_y20.yap" SimListenPort="9433" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14d" SimName="333" SimLocationX="1013" SimLocationY="1010" Datastore="store_333_x13_y20.yap" SimListenPort="9433" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_334.xml b/share/regions/config_334.xml
index 4b28b3e..72737a7 100644
--- a/share/regions/config_334.xml
+++ b/share/regions/config_334.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14e" SimName="334" SimLocationX="1014" SimLocationY="1010" Datastore="store_334_x14_y20.yap" SimListenPort="9434" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14e" SimName="334" SimLocationX="1014" SimLocationY="1010" Datastore="store_334_x14_y20.yap" SimListenPort="9434" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_335.xml b/share/regions/config_335.xml
index 1980da0..73972a0 100644
--- a/share/regions/config_335.xml
+++ b/share/regions/config_335.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14f" SimName="335" SimLocationX="1015" SimLocationY="1010" Datastore="store_335_x15_y20.yap" SimListenPort="9435" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf14f" SimName="335" SimLocationX="1015" SimLocationY="1010" Datastore="store_335_x15_y20.yap" SimListenPort="9435" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-5.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_336.xml b/share/regions/config_336.xml
index 1e4b2a7..d261ee9 100644
--- a/share/regions/config_336.xml
+++ b/share/regions/config_336.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf150" SimName="336" SimLocationX="1016" SimLocationY="1010" Datastore="store_336_x00_y21.yap" SimListenPort="9436" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf150" SimName="336" SimLocationX="1016" SimLocationY="1010" Datastore="store_336_x00_y21.yap" SimListenPort="9436" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_337.xml b/share/regions/config_337.xml
index 3e7e3ce..983cd46 100644
--- a/share/regions/config_337.xml
+++ b/share/regions/config_337.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf151" SimName="337" SimLocationX="1017" SimLocationY="1010" Datastore="store_337_x01_y21.yap" SimListenPort="9437" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf151" SimName="337" SimLocationX="1017" SimLocationY="1010" Datastore="store_337_x01_y21.yap" SimListenPort="9437" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_338.xml b/share/regions/config_338.xml
index 71c88de..8235009 100644
--- a/share/regions/config_338.xml
+++ b/share/regions/config_338.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf152" SimName="338" SimLocationX="1018" SimLocationY="1010" Datastore="store_338_x02_y21.yap" SimListenPort="9438" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf152" SimName="338" SimLocationX="1018" SimLocationY="1010" Datastore="store_338_x02_y21.yap" SimListenPort="9438" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_339.xml b/share/regions/config_339.xml
index d22de66..637624d 100644
--- a/share/regions/config_339.xml
+++ b/share/regions/config_339.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf153" SimName="339" SimLocationX="1019" SimLocationY="1010" Datastore="store_339_x03_y21.yap" SimListenPort="9439" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf153" SimName="339" SimLocationX="1019" SimLocationY="1010" Datastore="store_339_x03_y21.yap" SimListenPort="9439" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_34.xml b/share/regions/config_34.xml
index 08132d0..8dbf4de 100644
--- a/share/regions/config_34.xml
+++ b/share/regions/config_34.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf022" SimName="34" SimLocationX="1002" SimLocationY="1001" Datastore="store_34_x02_y02.yap" SimListenPort="9134" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf022" SimName="34" SimLocationX="1002" SimLocationY="1001" Datastore="store_34_x02_y02.yap" SimListenPort="9134" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_340.xml b/share/regions/config_340.xml
index c05d9e3..e06080a 100644
--- a/share/regions/config_340.xml
+++ b/share/regions/config_340.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf154" SimName="340" SimLocationX="1020" SimLocationY="1010" Datastore="store_340_x04_y21.yap" SimListenPort="9440" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf154" SimName="340" SimLocationX="1020" SimLocationY="1010" Datastore="store_340_x04_y21.yap" SimListenPort="9440" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_341.xml b/share/regions/config_341.xml
index a8e8581..ebf05f1 100644
--- a/share/regions/config_341.xml
+++ b/share/regions/config_341.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf155" SimName="341" SimLocationX="1021" SimLocationY="1010" Datastore="store_341_x05_y21.yap" SimListenPort="9441" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf155" SimName="341" SimLocationX="1021" SimLocationY="1010" Datastore="store_341_x05_y21.yap" SimListenPort="9441" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_342.xml b/share/regions/config_342.xml
index cb28842..02e4289 100644
--- a/share/regions/config_342.xml
+++ b/share/regions/config_342.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf156" SimName="342" SimLocationX="1022" SimLocationY="1010" Datastore="store_342_x06_y21.yap" SimListenPort="9442" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf156" SimName="342" SimLocationX="1022" SimLocationY="1010" Datastore="store_342_x06_y21.yap" SimListenPort="9442" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_343.xml b/share/regions/config_343.xml
index 2a9678f..1ca82a7 100644
--- a/share/regions/config_343.xml
+++ b/share/regions/config_343.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf157" SimName="343" SimLocationX="1023" SimLocationY="1010" Datastore="store_343_x07_y21.yap" SimListenPort="9443" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf157" SimName="343" SimLocationX="1023" SimLocationY="1010" Datastore="store_343_x07_y21.yap" SimListenPort="9443" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_344.xml b/share/regions/config_344.xml
index 8e9771a..18a58dd 100644
--- a/share/regions/config_344.xml
+++ b/share/regions/config_344.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf158" SimName="344" SimLocationX="1024" SimLocationY="1010" Datastore="store_344_x08_y21.yap" SimListenPort="9444" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf158" SimName="344" SimLocationX="1024" SimLocationY="1010" Datastore="store_344_x08_y21.yap" SimListenPort="9444" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_345.xml b/share/regions/config_345.xml
index 4d64467..21fe1c6 100644
--- a/share/regions/config_345.xml
+++ b/share/regions/config_345.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf159" SimName="345" SimLocationX="1025" SimLocationY="1010" Datastore="store_345_x09_y21.yap" SimListenPort="9445" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf159" SimName="345" SimLocationX="1025" SimLocationY="1010" Datastore="store_345_x09_y21.yap" SimListenPort="9445" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_346.xml b/share/regions/config_346.xml
index 36b2516..b890795 100644
--- a/share/regions/config_346.xml
+++ b/share/regions/config_346.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15a" SimName="346" SimLocationX="1026" SimLocationY="1010" Datastore="store_346_x10_y21.yap" SimListenPort="9446" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15a" SimName="346" SimLocationX="1026" SimLocationY="1010" Datastore="store_346_x10_y21.yap" SimListenPort="9446" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_347.xml b/share/regions/config_347.xml
index 10344f4..1b9f5ce 100644
--- a/share/regions/config_347.xml
+++ b/share/regions/config_347.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15b" SimName="347" SimLocationX="1027" SimLocationY="1010" Datastore="store_347_x11_y21.yap" SimListenPort="9447" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15b" SimName="347" SimLocationX="1027" SimLocationY="1010" Datastore="store_347_x11_y21.yap" SimListenPort="9447" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_348.xml b/share/regions/config_348.xml
index 102b9dd..365b1c2 100644
--- a/share/regions/config_348.xml
+++ b/share/regions/config_348.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15c" SimName="348" SimLocationX="1028" SimLocationY="1010" Datastore="store_348_x12_y21.yap" SimListenPort="9448" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15c" SimName="348" SimLocationX="1028" SimLocationY="1010" Datastore="store_348_x12_y21.yap" SimListenPort="9448" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_349.xml b/share/regions/config_349.xml
index de39dc9..0a83f43 100644
--- a/share/regions/config_349.xml
+++ b/share/regions/config_349.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15d" SimName="349" SimLocationX="1029" SimLocationY="1010" Datastore="store_349_x13_y21.yap" SimListenPort="9449" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15d" SimName="349" SimLocationX="1029" SimLocationY="1010" Datastore="store_349_x13_y21.yap" SimListenPort="9449" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_35.xml b/share/regions/config_35.xml
index fde3552..4aa2981 100644
--- a/share/regions/config_35.xml
+++ b/share/regions/config_35.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf023" SimName="35" SimLocationX="1003" SimLocationY="1001" Datastore="store_35_x03_y02.yap" SimListenPort="9135" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf023" SimName="35" SimLocationX="1003" SimLocationY="1001" Datastore="store_35_x03_y02.yap" SimListenPort="9135" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_350.xml b/share/regions/config_350.xml
index aa10906..192fc2a 100644
--- a/share/regions/config_350.xml
+++ b/share/regions/config_350.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15e" SimName="350" SimLocationX="1030" SimLocationY="1010" Datastore="store_350_x14_y21.yap" SimListenPort="9450" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15e" SimName="350" SimLocationX="1030" SimLocationY="1010" Datastore="store_350_x14_y21.yap" SimListenPort="9450" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_351.xml b/share/regions/config_351.xml
index e791e61..2cd9336 100644
--- a/share/regions/config_351.xml
+++ b/share/regions/config_351.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15f" SimName="351" SimLocationX="1031" SimLocationY="1010" Datastore="store_351_x15_y21.yap" SimListenPort="9451" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf15f" SimName="351" SimLocationX="1031" SimLocationY="1010" Datastore="store_351_x15_y21.yap" SimListenPort="9451" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-6.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_352.xml b/share/regions/config_352.xml
index 7ab0219..d3faa76 100644
--- a/share/regions/config_352.xml
+++ b/share/regions/config_352.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf160" SimName="352" SimLocationX="1000" SimLocationY="1011" Datastore="store_352_x00_y22.yap" SimListenPort="9452" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf160" SimName="352" SimLocationX="1000" SimLocationY="1011" Datastore="store_352_x00_y22.yap" SimListenPort="9452" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_353.xml b/share/regions/config_353.xml
index 489ce5a..e165fcc 100644
--- a/share/regions/config_353.xml
+++ b/share/regions/config_353.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf161" SimName="353" SimLocationX="1001" SimLocationY="1011" Datastore="store_353_x01_y22.yap" SimListenPort="9453" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf161" SimName="353" SimLocationX="1001" SimLocationY="1011" Datastore="store_353_x01_y22.yap" SimListenPort="9453" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_354.xml b/share/regions/config_354.xml
index 4eacc38..f3828ba 100644
--- a/share/regions/config_354.xml
+++ b/share/regions/config_354.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf162" SimName="354" SimLocationX="1002" SimLocationY="1011" Datastore="store_354_x02_y22.yap" SimListenPort="9454" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf162" SimName="354" SimLocationX="1002" SimLocationY="1011" Datastore="store_354_x02_y22.yap" SimListenPort="9454" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_355.xml b/share/regions/config_355.xml
index 1f85b26..5c3c0f6 100644
--- a/share/regions/config_355.xml
+++ b/share/regions/config_355.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf163" SimName="355" SimLocationX="1003" SimLocationY="1011" Datastore="store_355_x03_y22.yap" SimListenPort="9455" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf163" SimName="355" SimLocationX="1003" SimLocationY="1011" Datastore="store_355_x03_y22.yap" SimListenPort="9455" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_356.xml b/share/regions/config_356.xml
index baf1880..1d3abac 100644
--- a/share/regions/config_356.xml
+++ b/share/regions/config_356.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf164" SimName="356" SimLocationX="1004" SimLocationY="1011" Datastore="store_356_x04_y22.yap" SimListenPort="9456" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf164" SimName="356" SimLocationX="1004" SimLocationY="1011" Datastore="store_356_x04_y22.yap" SimListenPort="9456" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_357.xml b/share/regions/config_357.xml
index 37e2f28..86f6803 100644
--- a/share/regions/config_357.xml
+++ b/share/regions/config_357.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf165" SimName="357" SimLocationX="1005" SimLocationY="1011" Datastore="store_357_x05_y22.yap" SimListenPort="9457" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf165" SimName="357" SimLocationX="1005" SimLocationY="1011" Datastore="store_357_x05_y22.yap" SimListenPort="9457" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_358.xml b/share/regions/config_358.xml
index 75ae185..870c416 100644
--- a/share/regions/config_358.xml
+++ b/share/regions/config_358.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf166" SimName="358" SimLocationX="1006" SimLocationY="1011" Datastore="store_358_x06_y22.yap" SimListenPort="9458" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf166" SimName="358" SimLocationX="1006" SimLocationY="1011" Datastore="store_358_x06_y22.yap" SimListenPort="9458" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_359.xml b/share/regions/config_359.xml
index 698ab2b..776fceb 100644
--- a/share/regions/config_359.xml
+++ b/share/regions/config_359.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf167" SimName="359" SimLocationX="1007" SimLocationY="1011" Datastore="store_359_x07_y22.yap" SimListenPort="9459" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf167" SimName="359" SimLocationX="1007" SimLocationY="1011" Datastore="store_359_x07_y22.yap" SimListenPort="9459" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_36.xml b/share/regions/config_36.xml
index f50eda8..52b29cc 100644
--- a/share/regions/config_36.xml
+++ b/share/regions/config_36.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf024" SimName="36" SimLocationX="1004" SimLocationY="1001" Datastore="store_36_x04_y02.yap" SimListenPort="9136" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf024" SimName="36" SimLocationX="1004" SimLocationY="1001" Datastore="store_36_x04_y02.yap" SimListenPort="9136" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_360.xml b/share/regions/config_360.xml
index c18027c..4e258b2 100644
--- a/share/regions/config_360.xml
+++ b/share/regions/config_360.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf168" SimName="360" SimLocationX="1008" SimLocationY="1011" Datastore="store_360_x08_y22.yap" SimListenPort="9460" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf168" SimName="360" SimLocationX="1008" SimLocationY="1011" Datastore="store_360_x08_y22.yap" SimListenPort="9460" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_361.xml b/share/regions/config_361.xml
index 97f12e6..0bcf97f 100644
--- a/share/regions/config_361.xml
+++ b/share/regions/config_361.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf169" SimName="361" SimLocationX="1009" SimLocationY="1011" Datastore="store_361_x09_y22.yap" SimListenPort="9461" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf169" SimName="361" SimLocationX="1009" SimLocationY="1011" Datastore="store_361_x09_y22.yap" SimListenPort="9461" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_362.xml b/share/regions/config_362.xml
index ba0a464..907093f 100644
--- a/share/regions/config_362.xml
+++ b/share/regions/config_362.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16a" SimName="362" SimLocationX="1010" SimLocationY="1011" Datastore="store_362_x10_y22.yap" SimListenPort="9462" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16a" SimName="362" SimLocationX="1010" SimLocationY="1011" Datastore="store_362_x10_y22.yap" SimListenPort="9462" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_363.xml b/share/regions/config_363.xml
index c0965e6..de1825f 100644
--- a/share/regions/config_363.xml
+++ b/share/regions/config_363.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16b" SimName="363" SimLocationX="1011" SimLocationY="1011" Datastore="store_363_x11_y22.yap" SimListenPort="9463" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16b" SimName="363" SimLocationX="1011" SimLocationY="1011" Datastore="store_363_x11_y22.yap" SimListenPort="9463" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_364.xml b/share/regions/config_364.xml
index d977ab4..d81564d 100644
--- a/share/regions/config_364.xml
+++ b/share/regions/config_364.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16c" SimName="364" SimLocationX="1012" SimLocationY="1011" Datastore="store_364_x12_y22.yap" SimListenPort="9464" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16c" SimName="364" SimLocationX="1012" SimLocationY="1011" Datastore="store_364_x12_y22.yap" SimListenPort="9464" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_365.xml b/share/regions/config_365.xml
index 260e3a6..67c4e44 100644
--- a/share/regions/config_365.xml
+++ b/share/regions/config_365.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16d" SimName="365" SimLocationX="1013" SimLocationY="1011" Datastore="store_365_x13_y22.yap" SimListenPort="9465" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16d" SimName="365" SimLocationX="1013" SimLocationY="1011" Datastore="store_365_x13_y22.yap" SimListenPort="9465" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_366.xml b/share/regions/config_366.xml
index 3d61061..781463c 100644
--- a/share/regions/config_366.xml
+++ b/share/regions/config_366.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16e" SimName="366" SimLocationX="1014" SimLocationY="1011" Datastore="store_366_x14_y22.yap" SimListenPort="9466" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16e" SimName="366" SimLocationX="1014" SimLocationY="1011" Datastore="store_366_x14_y22.yap" SimListenPort="9466" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_367.xml b/share/regions/config_367.xml
index cc2b5d6..de31e7f 100644
--- a/share/regions/config_367.xml
+++ b/share/regions/config_367.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16f" SimName="367" SimLocationX="1015" SimLocationY="1011" Datastore="store_367_x15_y22.yap" SimListenPort="9467" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf16f" SimName="367" SimLocationX="1015" SimLocationY="1011" Datastore="store_367_x15_y22.yap" SimListenPort="9467" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-7.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_368.xml b/share/regions/config_368.xml
index 07bab28..ec26130 100644
--- a/share/regions/config_368.xml
+++ b/share/regions/config_368.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf170" SimName="368" SimLocationX="1016" SimLocationY="1011" Datastore="store_368_x00_y23.yap" SimListenPort="9468" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf170" SimName="368" SimLocationX="1016" SimLocationY="1011" Datastore="store_368_x00_y23.yap" SimListenPort="9468" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_369.xml b/share/regions/config_369.xml
index 6b0b8f8..591a8ce 100644
--- a/share/regions/config_369.xml
+++ b/share/regions/config_369.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf171" SimName="369" SimLocationX="1017" SimLocationY="1011" Datastore="store_369_x01_y23.yap" SimListenPort="9469" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf171" SimName="369" SimLocationX="1017" SimLocationY="1011" Datastore="store_369_x01_y23.yap" SimListenPort="9469" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_37.xml b/share/regions/config_37.xml
index d8f8e70..113a9da 100644
--- a/share/regions/config_37.xml
+++ b/share/regions/config_37.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf025" SimName="37" SimLocationX="1005" SimLocationY="1001" Datastore="store_37_x05_y02.yap" SimListenPort="9137" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf025" SimName="37" SimLocationX="1005" SimLocationY="1001" Datastore="store_37_x05_y02.yap" SimListenPort="9137" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_370.xml b/share/regions/config_370.xml
index b9b23df..1a7799a 100644
--- a/share/regions/config_370.xml
+++ b/share/regions/config_370.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf172" SimName="370" SimLocationX="1018" SimLocationY="1011" Datastore="store_370_x02_y23.yap" SimListenPort="9470" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf172" SimName="370" SimLocationX="1018" SimLocationY="1011" Datastore="store_370_x02_y23.yap" SimListenPort="9470" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_371.xml b/share/regions/config_371.xml
index db2e347..49c40f4 100644
--- a/share/regions/config_371.xml
+++ b/share/regions/config_371.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf173" SimName="371" SimLocationX="1019" SimLocationY="1011" Datastore="store_371_x03_y23.yap" SimListenPort="9471" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf173" SimName="371" SimLocationX="1019" SimLocationY="1011" Datastore="store_371_x03_y23.yap" SimListenPort="9471" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_372.xml b/share/regions/config_372.xml
index daaf089..2224301 100644
--- a/share/regions/config_372.xml
+++ b/share/regions/config_372.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf174" SimName="372" SimLocationX="1020" SimLocationY="1011" Datastore="store_372_x04_y23.yap" SimListenPort="9472" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf174" SimName="372" SimLocationX="1020" SimLocationY="1011" Datastore="store_372_x04_y23.yap" SimListenPort="9472" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_373.xml b/share/regions/config_373.xml
index 9169e6f..8e80a1f 100644
--- a/share/regions/config_373.xml
+++ b/share/regions/config_373.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf175" SimName="373" SimLocationX="1021" SimLocationY="1011" Datastore="store_373_x05_y23.yap" SimListenPort="9473" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf175" SimName="373" SimLocationX="1021" SimLocationY="1011" Datastore="store_373_x05_y23.yap" SimListenPort="9473" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_374.xml b/share/regions/config_374.xml
index f7a8024..5d88a6f 100644
--- a/share/regions/config_374.xml
+++ b/share/regions/config_374.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf176" SimName="374" SimLocationX="1022" SimLocationY="1011" Datastore="store_374_x06_y23.yap" SimListenPort="9474" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf176" SimName="374" SimLocationX="1022" SimLocationY="1011" Datastore="store_374_x06_y23.yap" SimListenPort="9474" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_375.xml b/share/regions/config_375.xml
index ee53e02..4997cd2 100644
--- a/share/regions/config_375.xml
+++ b/share/regions/config_375.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf177" SimName="375" SimLocationX="1023" SimLocationY="1011" Datastore="store_375_x07_y23.yap" SimListenPort="9475" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf177" SimName="375" SimLocationX="1023" SimLocationY="1011" Datastore="store_375_x07_y23.yap" SimListenPort="9475" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_376.xml b/share/regions/config_376.xml
index 6567eba..ec1b6e8 100644
--- a/share/regions/config_376.xml
+++ b/share/regions/config_376.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf178" SimName="376" SimLocationX="1024" SimLocationY="1011" Datastore="store_376_x08_y23.yap" SimListenPort="9476" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf178" SimName="376" SimLocationX="1024" SimLocationY="1011" Datastore="store_376_x08_y23.yap" SimListenPort="9476" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_377.xml b/share/regions/config_377.xml
index 9cfc07a..1019af9 100644
--- a/share/regions/config_377.xml
+++ b/share/regions/config_377.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf179" SimName="377" SimLocationX="1025" SimLocationY="1011" Datastore="store_377_x09_y23.yap" SimListenPort="9477" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf179" SimName="377" SimLocationX="1025" SimLocationY="1011" Datastore="store_377_x09_y23.yap" SimListenPort="9477" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_378.xml b/share/regions/config_378.xml
index dc64f23..f3c78cb 100644
--- a/share/regions/config_378.xml
+++ b/share/regions/config_378.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17a" SimName="378" SimLocationX="1026" SimLocationY="1011" Datastore="store_378_x10_y23.yap" SimListenPort="9478" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17a" SimName="378" SimLocationX="1026" SimLocationY="1011" Datastore="store_378_x10_y23.yap" SimListenPort="9478" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_379.xml b/share/regions/config_379.xml
index b690161..6a3dd94 100644
--- a/share/regions/config_379.xml
+++ b/share/regions/config_379.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17b" SimName="379" SimLocationX="1027" SimLocationY="1011" Datastore="store_379_x11_y23.yap" SimListenPort="9479" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17b" SimName="379" SimLocationX="1027" SimLocationY="1011" Datastore="store_379_x11_y23.yap" SimListenPort="9479" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_38.xml b/share/regions/config_38.xml
index 8b59756..bfdfaf4 100644
--- a/share/regions/config_38.xml
+++ b/share/regions/config_38.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf026" SimName="38" SimLocationX="1006" SimLocationY="1001" Datastore="store_38_x06_y02.yap" SimListenPort="9138" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf026" SimName="38" SimLocationX="1006" SimLocationY="1001" Datastore="store_38_x06_y02.yap" SimListenPort="9138" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_380.xml b/share/regions/config_380.xml
index c287ca7..9e1cedf 100644
--- a/share/regions/config_380.xml
+++ b/share/regions/config_380.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17c" SimName="380" SimLocationX="1028" SimLocationY="1011" Datastore="store_380_x12_y23.yap" SimListenPort="9480" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17c" SimName="380" SimLocationX="1028" SimLocationY="1011" Datastore="store_380_x12_y23.yap" SimListenPort="9480" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_381.xml b/share/regions/config_381.xml
index 6407a59..3b4ef94 100644
--- a/share/regions/config_381.xml
+++ b/share/regions/config_381.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17d" SimName="381" SimLocationX="1029" SimLocationY="1011" Datastore="store_381_x13_y23.yap" SimListenPort="9481" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17d" SimName="381" SimLocationX="1029" SimLocationY="1011" Datastore="store_381_x13_y23.yap" SimListenPort="9481" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_382.xml b/share/regions/config_382.xml
index c3601c0..30fe79d 100644
--- a/share/regions/config_382.xml
+++ b/share/regions/config_382.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17e" SimName="382" SimLocationX="1030" SimLocationY="1011" Datastore="store_382_x14_y23.yap" SimListenPort="9482" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17e" SimName="382" SimLocationX="1030" SimLocationY="1011" Datastore="store_382_x14_y23.yap" SimListenPort="9482" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_383.xml b/share/regions/config_383.xml
index 5067b99..dcb9627 100644
--- a/share/regions/config_383.xml
+++ b/share/regions/config_383.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17f" SimName="383" SimLocationX="1031" SimLocationY="1011" Datastore="store_383_x15_y23.yap" SimListenPort="9483" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf17f" SimName="383" SimLocationX="1031" SimLocationY="1011" Datastore="store_383_x15_y23.yap" SimListenPort="9483" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-8.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_384.xml b/share/regions/config_384.xml
index e624312..5d98fc8 100644
--- a/share/regions/config_384.xml
+++ b/share/regions/config_384.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf180" SimName="384" SimLocationX="1000" SimLocationY="1012" Datastore="store_384_x00_y24.yap" SimListenPort="9484" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf180" SimName="384" SimLocationX="1000" SimLocationY="1012" Datastore="store_384_x00_y24.yap" SimListenPort="9484" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_385.xml b/share/regions/config_385.xml
index d0095f3..22dd496 100644
--- a/share/regions/config_385.xml
+++ b/share/regions/config_385.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf181" SimName="385" SimLocationX="1001" SimLocationY="1012" Datastore="store_385_x01_y24.yap" SimListenPort="9485" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf181" SimName="385" SimLocationX="1001" SimLocationY="1012" Datastore="store_385_x01_y24.yap" SimListenPort="9485" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_386.xml b/share/regions/config_386.xml
index ae9549d..a7599ae 100644
--- a/share/regions/config_386.xml
+++ b/share/regions/config_386.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf182" SimName="386" SimLocationX="1002" SimLocationY="1012" Datastore="store_386_x02_y24.yap" SimListenPort="9486" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf182" SimName="386" SimLocationX="1002" SimLocationY="1012" Datastore="store_386_x02_y24.yap" SimListenPort="9486" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_387.xml b/share/regions/config_387.xml
index e2c2880..e25ee23 100644
--- a/share/regions/config_387.xml
+++ b/share/regions/config_387.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf183" SimName="387" SimLocationX="1003" SimLocationY="1012" Datastore="store_387_x03_y24.yap" SimListenPort="9487" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf183" SimName="387" SimLocationX="1003" SimLocationY="1012" Datastore="store_387_x03_y24.yap" SimListenPort="9487" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_388.xml b/share/regions/config_388.xml
index 5b0e3e2..3da1d7c 100644
--- a/share/regions/config_388.xml
+++ b/share/regions/config_388.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf184" SimName="388" SimLocationX="1004" SimLocationY="1012" Datastore="store_388_x04_y24.yap" SimListenPort="9488" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf184" SimName="388" SimLocationX="1004" SimLocationY="1012" Datastore="store_388_x04_y24.yap" SimListenPort="9488" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_389.xml b/share/regions/config_389.xml
index a77061a..3741dad 100644
--- a/share/regions/config_389.xml
+++ b/share/regions/config_389.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf185" SimName="389" SimLocationX="1005" SimLocationY="1012" Datastore="store_389_x05_y24.yap" SimListenPort="9489" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf185" SimName="389" SimLocationX="1005" SimLocationY="1012" Datastore="store_389_x05_y24.yap" SimListenPort="9489" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_39.xml b/share/regions/config_39.xml
index 75050bb..61c0203 100644
--- a/share/regions/config_39.xml
+++ b/share/regions/config_39.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf027" SimName="39" SimLocationX="1007" SimLocationY="1001" Datastore="store_39_x07_y02.yap" SimListenPort="9139" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf027" SimName="39" SimLocationX="1007" SimLocationY="1001" Datastore="store_39_x07_y02.yap" SimListenPort="9139" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_390.xml b/share/regions/config_390.xml
index 79887c0..1468ebe 100644
--- a/share/regions/config_390.xml
+++ b/share/regions/config_390.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf186" SimName="390" SimLocationX="1006" SimLocationY="1012" Datastore="store_390_x06_y24.yap" SimListenPort="9490" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf186" SimName="390" SimLocationX="1006" SimLocationY="1012" Datastore="store_390_x06_y24.yap" SimListenPort="9490" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_391.xml b/share/regions/config_391.xml
index 3863fb5..5e75d92 100644
--- a/share/regions/config_391.xml
+++ b/share/regions/config_391.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf187" SimName="391" SimLocationX="1007" SimLocationY="1012" Datastore="store_391_x07_y24.yap" SimListenPort="9491" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf187" SimName="391" SimLocationX="1007" SimLocationY="1012" Datastore="store_391_x07_y24.yap" SimListenPort="9491" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_392.xml b/share/regions/config_392.xml
index c5c4552..4d5c922 100644
--- a/share/regions/config_392.xml
+++ b/share/regions/config_392.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf188" SimName="392" SimLocationX="1008" SimLocationY="1012" Datastore="store_392_x08_y24.yap" SimListenPort="9492" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf188" SimName="392" SimLocationX="1008" SimLocationY="1012" Datastore="store_392_x08_y24.yap" SimListenPort="9492" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_393.xml b/share/regions/config_393.xml
index d0e0a61..b73496f 100644
--- a/share/regions/config_393.xml
+++ b/share/regions/config_393.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf189" SimName="393" SimLocationX="1009" SimLocationY="1012" Datastore="store_393_x09_y24.yap" SimListenPort="9493" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf189" SimName="393" SimLocationX="1009" SimLocationY="1012" Datastore="store_393_x09_y24.yap" SimListenPort="9493" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_394.xml b/share/regions/config_394.xml
index 3fd4cb5..9f9dbe4 100644
--- a/share/regions/config_394.xml
+++ b/share/regions/config_394.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18a" SimName="394" SimLocationX="1010" SimLocationY="1012" Datastore="store_394_x10_y24.yap" SimListenPort="9494" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18a" SimName="394" SimLocationX="1010" SimLocationY="1012" Datastore="store_394_x10_y24.yap" SimListenPort="9494" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_395.xml b/share/regions/config_395.xml
index a49a948..aa79338 100644
--- a/share/regions/config_395.xml
+++ b/share/regions/config_395.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18b" SimName="395" SimLocationX="1011" SimLocationY="1012" Datastore="store_395_x11_y24.yap" SimListenPort="9495" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18b" SimName="395" SimLocationX="1011" SimLocationY="1012" Datastore="store_395_x11_y24.yap" SimListenPort="9495" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_396.xml b/share/regions/config_396.xml
index fd2461a..74ab33c 100644
--- a/share/regions/config_396.xml
+++ b/share/regions/config_396.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18c" SimName="396" SimLocationX="1012" SimLocationY="1012" Datastore="store_396_x12_y24.yap" SimListenPort="9496" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18c" SimName="396" SimLocationX="1012" SimLocationY="1012" Datastore="store_396_x12_y24.yap" SimListenPort="9496" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_397.xml b/share/regions/config_397.xml
index d3a693b..0741d9c 100644
--- a/share/regions/config_397.xml
+++ b/share/regions/config_397.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18d" SimName="397" SimLocationX="1013" SimLocationY="1012" Datastore="store_397_x13_y24.yap" SimListenPort="9497" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18d" SimName="397" SimLocationX="1013" SimLocationY="1012" Datastore="store_397_x13_y24.yap" SimListenPort="9497" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_398.xml b/share/regions/config_398.xml
index e2afde9..acdf154 100644
--- a/share/regions/config_398.xml
+++ b/share/regions/config_398.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18e" SimName="398" SimLocationX="1014" SimLocationY="1012" Datastore="store_398_x14_y24.yap" SimListenPort="9498" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18e" SimName="398" SimLocationX="1014" SimLocationY="1012" Datastore="store_398_x14_y24.yap" SimListenPort="9498" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_399.xml b/share/regions/config_399.xml
index 938794c..4442472 100644
--- a/share/regions/config_399.xml
+++ b/share/regions/config_399.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18f" SimName="399" SimLocationX="1015" SimLocationY="1012" Datastore="store_399_x15_y24.yap" SimListenPort="9499" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf18f" SimName="399" SimLocationX="1015" SimLocationY="1012" Datastore="store_399_x15_y24.yap" SimListenPort="9499" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-9.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_4.xml b/share/regions/config_4.xml
index 8744f4e..e0f9e59 100644
--- a/share/regions/config_4.xml
+++ b/share/regions/config_4.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf004" SimName="4" SimLocationX="1004" SimLocationY="1000" Datastore="store_4_x04_y00.yap" SimListenPort="9104" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf004" SimName="4" SimLocationX="1004" SimLocationY="1000" Datastore="store_4_x04_y00.yap" SimListenPort="9104" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_40.xml b/share/regions/config_40.xml
index 2e399da..2e9f93e 100644
--- a/share/regions/config_40.xml
+++ b/share/regions/config_40.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf028" SimName="40" SimLocationX="1008" SimLocationY="1001" Datastore="store_40_x08_y02.yap" SimListenPort="9140" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf028" SimName="40" SimLocationX="1008" SimLocationY="1001" Datastore="store_40_x08_y02.yap" SimListenPort="9140" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_400.xml b/share/regions/config_400.xml
index cab19d9..8e51dba 100644
--- a/share/regions/config_400.xml
+++ b/share/regions/config_400.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf190" SimName="400" SimLocationX="1016" SimLocationY="1012" Datastore="store_400_x00_y25.yap" SimListenPort="9500" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf190" SimName="400" SimLocationX="1016" SimLocationY="1012" Datastore="store_400_x00_y25.yap" SimListenPort="9500" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_401.xml b/share/regions/config_401.xml
index f8c29e7..7ad6d9f 100644
--- a/share/regions/config_401.xml
+++ b/share/regions/config_401.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf191" SimName="401" SimLocationX="1017" SimLocationY="1012" Datastore="store_401_x01_y25.yap" SimListenPort="9501" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf191" SimName="401" SimLocationX="1017" SimLocationY="1012" Datastore="store_401_x01_y25.yap" SimListenPort="9501" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_402.xml b/share/regions/config_402.xml
index 39fea36..8c75672 100644
--- a/share/regions/config_402.xml
+++ b/share/regions/config_402.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf192" SimName="402" SimLocationX="1018" SimLocationY="1012" Datastore="store_402_x02_y25.yap" SimListenPort="9502" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf192" SimName="402" SimLocationX="1018" SimLocationY="1012" Datastore="store_402_x02_y25.yap" SimListenPort="9502" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_403.xml b/share/regions/config_403.xml
index d61a2da..26d4037 100644
--- a/share/regions/config_403.xml
+++ b/share/regions/config_403.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf193" SimName="403" SimLocationX="1019" SimLocationY="1012" Datastore="store_403_x03_y25.yap" SimListenPort="9503" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf193" SimName="403" SimLocationX="1019" SimLocationY="1012" Datastore="store_403_x03_y25.yap" SimListenPort="9503" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_404.xml b/share/regions/config_404.xml
index d2d5a81..0c39e2a 100644
--- a/share/regions/config_404.xml
+++ b/share/regions/config_404.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf194" SimName="404" SimLocationX="1020" SimLocationY="1012" Datastore="store_404_x04_y25.yap" SimListenPort="9504" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf194" SimName="404" SimLocationX="1020" SimLocationY="1012" Datastore="store_404_x04_y25.yap" SimListenPort="9504" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_405.xml b/share/regions/config_405.xml
index a07a7bc..fa79294 100644
--- a/share/regions/config_405.xml
+++ b/share/regions/config_405.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf195" SimName="405" SimLocationX="1021" SimLocationY="1012" Datastore="store_405_x05_y25.yap" SimListenPort="9505" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf195" SimName="405" SimLocationX="1021" SimLocationY="1012" Datastore="store_405_x05_y25.yap" SimListenPort="9505" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_406.xml b/share/regions/config_406.xml
index 5855778..cee44cc 100644
--- a/share/regions/config_406.xml
+++ b/share/regions/config_406.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf196" SimName="406" SimLocationX="1022" SimLocationY="1012" Datastore="store_406_x06_y25.yap" SimListenPort="9506" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf196" SimName="406" SimLocationX="1022" SimLocationY="1012" Datastore="store_406_x06_y25.yap" SimListenPort="9506" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_407.xml b/share/regions/config_407.xml
index 9c54b3d..71c1e9b 100644
--- a/share/regions/config_407.xml
+++ b/share/regions/config_407.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf197" SimName="407" SimLocationX="1023" SimLocationY="1012" Datastore="store_407_x07_y25.yap" SimListenPort="9507" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf197" SimName="407" SimLocationX="1023" SimLocationY="1012" Datastore="store_407_x07_y25.yap" SimListenPort="9507" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_408.xml b/share/regions/config_408.xml
index 83e95b1..dcab0c6 100644
--- a/share/regions/config_408.xml
+++ b/share/regions/config_408.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf198" SimName="408" SimLocationX="1024" SimLocationY="1012" Datastore="store_408_x08_y25.yap" SimListenPort="9508" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf198" SimName="408" SimLocationX="1024" SimLocationY="1012" Datastore="store_408_x08_y25.yap" SimListenPort="9508" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_409.xml b/share/regions/config_409.xml
index 6b15ed3..b03f221 100644
--- a/share/regions/config_409.xml
+++ b/share/regions/config_409.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf199" SimName="409" SimLocationX="1025" SimLocationY="1012" Datastore="store_409_x09_y25.yap" SimListenPort="9509" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf199" SimName="409" SimLocationX="1025" SimLocationY="1012" Datastore="store_409_x09_y25.yap" SimListenPort="9509" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_41.xml b/share/regions/config_41.xml
index c7ddbb9..98d01f3 100644
--- a/share/regions/config_41.xml
+++ b/share/regions/config_41.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf029" SimName="41" SimLocationX="1009" SimLocationY="1001" Datastore="store_41_x09_y02.yap" SimListenPort="9141" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf029" SimName="41" SimLocationX="1009" SimLocationY="1001" Datastore="store_41_x09_y02.yap" SimListenPort="9141" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_410.xml b/share/regions/config_410.xml
index 0fb99a1..fb5d032 100644
--- a/share/regions/config_410.xml
+++ b/share/regions/config_410.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19a" SimName="410" SimLocationX="1026" SimLocationY="1012" Datastore="store_410_x10_y25.yap" SimListenPort="9510" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19a" SimName="410" SimLocationX="1026" SimLocationY="1012" Datastore="store_410_x10_y25.yap" SimListenPort="9510" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_411.xml b/share/regions/config_411.xml
index aa6144d..a971d14 100644
--- a/share/regions/config_411.xml
+++ b/share/regions/config_411.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19b" SimName="411" SimLocationX="1027" SimLocationY="1012" Datastore="store_411_x11_y25.yap" SimListenPort="9511" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19b" SimName="411" SimLocationX="1027" SimLocationY="1012" Datastore="store_411_x11_y25.yap" SimListenPort="9511" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_412.xml b/share/regions/config_412.xml
index 9645235..e0512ac 100644
--- a/share/regions/config_412.xml
+++ b/share/regions/config_412.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19c" SimName="412" SimLocationX="1028" SimLocationY="1012" Datastore="store_412_x12_y25.yap" SimListenPort="9512" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19c" SimName="412" SimLocationX="1028" SimLocationY="1012" Datastore="store_412_x12_y25.yap" SimListenPort="9512" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_413.xml b/share/regions/config_413.xml
index 1ae01f8..95cbb5a 100644
--- a/share/regions/config_413.xml
+++ b/share/regions/config_413.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19d" SimName="413" SimLocationX="1029" SimLocationY="1012" Datastore="store_413_x13_y25.yap" SimListenPort="9513" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19d" SimName="413" SimLocationX="1029" SimLocationY="1012" Datastore="store_413_x13_y25.yap" SimListenPort="9513" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_414.xml b/share/regions/config_414.xml
index 9773a95..510f427 100644
--- a/share/regions/config_414.xml
+++ b/share/regions/config_414.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19e" SimName="414" SimLocationX="1030" SimLocationY="1012" Datastore="store_414_x14_y25.yap" SimListenPort="9514" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19e" SimName="414" SimLocationX="1030" SimLocationY="1012" Datastore="store_414_x14_y25.yap" SimListenPort="9514" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_415.xml b/share/regions/config_415.xml
index 7b43426..ed39989 100644
--- a/share/regions/config_415.xml
+++ b/share/regions/config_415.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19f" SimName="415" SimLocationX="1031" SimLocationY="1012" Datastore="store_415_x15_y25.yap" SimListenPort="9515" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf19f" SimName="415" SimLocationX="1031" SimLocationY="1012" Datastore="store_415_x15_y25.yap" SimListenPort="9515" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_416.xml b/share/regions/config_416.xml
index a35c477..3cbb555 100644
--- a/share/regions/config_416.xml
+++ b/share/regions/config_416.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a0" SimName="416" SimLocationX="1000" SimLocationY="1013" Datastore="store_416_x00_y26.yap" SimListenPort="9516" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a0" SimName="416" SimLocationX="1000" SimLocationY="1013" Datastore="store_416_x00_y26.yap" SimListenPort="9516" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_417.xml b/share/regions/config_417.xml
index 58001d1..474f675 100644
--- a/share/regions/config_417.xml
+++ b/share/regions/config_417.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a1" SimName="417" SimLocationX="1001" SimLocationY="1013" Datastore="store_417_x01_y26.yap" SimListenPort="9517" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a1" SimName="417" SimLocationX="1001" SimLocationY="1013" Datastore="store_417_x01_y26.yap" SimListenPort="9517" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_418.xml b/share/regions/config_418.xml
index 3c525a1..0a7b115 100644
--- a/share/regions/config_418.xml
+++ b/share/regions/config_418.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a2" SimName="418" SimLocationX="1002" SimLocationY="1013" Datastore="store_418_x02_y26.yap" SimListenPort="9518" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a2" SimName="418" SimLocationX="1002" SimLocationY="1013" Datastore="store_418_x02_y26.yap" SimListenPort="9518" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_419.xml b/share/regions/config_419.xml
index 9663580..fed9a48 100644
--- a/share/regions/config_419.xml
+++ b/share/regions/config_419.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a3" SimName="419" SimLocationX="1003" SimLocationY="1013" Datastore="store_419_x03_y26.yap" SimListenPort="9519" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a3" SimName="419" SimLocationX="1003" SimLocationY="1013" Datastore="store_419_x03_y26.yap" SimListenPort="9519" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_42.xml b/share/regions/config_42.xml
index edc7db7..f517a2a 100644
--- a/share/regions/config_42.xml
+++ b/share/regions/config_42.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02a" SimName="42" SimLocationX="1010" SimLocationY="1001" Datastore="store_42_x10_y02.yap" SimListenPort="9142" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02a" SimName="42" SimLocationX="1010" SimLocationY="1001" Datastore="store_42_x10_y02.yap" SimListenPort="9142" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_420.xml b/share/regions/config_420.xml
index 3df78a7..119fdb1 100644
--- a/share/regions/config_420.xml
+++ b/share/regions/config_420.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a4" SimName="420" SimLocationX="1004" SimLocationY="1013" Datastore="store_420_x04_y26.yap" SimListenPort="9520" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a4" SimName="420" SimLocationX="1004" SimLocationY="1013" Datastore="store_420_x04_y26.yap" SimListenPort="9520" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_421.xml b/share/regions/config_421.xml
index aed95bc..c86f543 100644
--- a/share/regions/config_421.xml
+++ b/share/regions/config_421.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a5" SimName="421" SimLocationX="1005" SimLocationY="1013" Datastore="store_421_x05_y26.yap" SimListenPort="9521" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a5" SimName="421" SimLocationX="1005" SimLocationY="1013" Datastore="store_421_x05_y26.yap" SimListenPort="9521" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_422.xml b/share/regions/config_422.xml
index 703c004..271e8fb 100644
--- a/share/regions/config_422.xml
+++ b/share/regions/config_422.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a6" SimName="422" SimLocationX="1006" SimLocationY="1013" Datastore="store_422_x06_y26.yap" SimListenPort="9522" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a6" SimName="422" SimLocationX="1006" SimLocationY="1013" Datastore="store_422_x06_y26.yap" SimListenPort="9522" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_423.xml b/share/regions/config_423.xml
index eca9a6f..8a6e4c0 100644
--- a/share/regions/config_423.xml
+++ b/share/regions/config_423.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a7" SimName="423" SimLocationX="1007" SimLocationY="1013" Datastore="store_423_x07_y26.yap" SimListenPort="9523" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a7" SimName="423" SimLocationX="1007" SimLocationY="1013" Datastore="store_423_x07_y26.yap" SimListenPort="9523" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_424.xml b/share/regions/config_424.xml
index 91c68dc..62de26e 100644
--- a/share/regions/config_424.xml
+++ b/share/regions/config_424.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a8" SimName="424" SimLocationX="1008" SimLocationY="1013" Datastore="store_424_x08_y26.yap" SimListenPort="9524" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a8" SimName="424" SimLocationX="1008" SimLocationY="1013" Datastore="store_424_x08_y26.yap" SimListenPort="9524" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_425.xml b/share/regions/config_425.xml
index 92111f1..aa13b18 100644
--- a/share/regions/config_425.xml
+++ b/share/regions/config_425.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a9" SimName="425" SimLocationX="1009" SimLocationY="1013" Datastore="store_425_x09_y26.yap" SimListenPort="9525" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1a9" SimName="425" SimLocationX="1009" SimLocationY="1013" Datastore="store_425_x09_y26.yap" SimListenPort="9525" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_426.xml b/share/regions/config_426.xml
index 9295577..bc37041 100644
--- a/share/regions/config_426.xml
+++ b/share/regions/config_426.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1aa" SimName="426" SimLocationX="1010" SimLocationY="1013" Datastore="store_426_x10_y26.yap" SimListenPort="9526" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1aa" SimName="426" SimLocationX="1010" SimLocationY="1013" Datastore="store_426_x10_y26.yap" SimListenPort="9526" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_427.xml b/share/regions/config_427.xml
index f54d20c..6d31461 100644
--- a/share/regions/config_427.xml
+++ b/share/regions/config_427.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ab" SimName="427" SimLocationX="1011" SimLocationY="1013" Datastore="store_427_x11_y26.yap" SimListenPort="9527" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ab" SimName="427" SimLocationX="1011" SimLocationY="1013" Datastore="store_427_x11_y26.yap" SimListenPort="9527" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_428.xml b/share/regions/config_428.xml
index b4b407a..d1e5dcb 100644
--- a/share/regions/config_428.xml
+++ b/share/regions/config_428.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ac" SimName="428" SimLocationX="1012" SimLocationY="1013" Datastore="store_428_x12_y26.yap" SimListenPort="9528" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ac" SimName="428" SimLocationX="1012" SimLocationY="1013" Datastore="store_428_x12_y26.yap" SimListenPort="9528" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_429.xml b/share/regions/config_429.xml
index 3389b8c..94ca75f 100644
--- a/share/regions/config_429.xml
+++ b/share/regions/config_429.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ad" SimName="429" SimLocationX="1013" SimLocationY="1013" Datastore="store_429_x13_y26.yap" SimListenPort="9529" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ad" SimName="429" SimLocationX="1013" SimLocationY="1013" Datastore="store_429_x13_y26.yap" SimListenPort="9529" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_43.xml b/share/regions/config_43.xml
index 3841629..1f99e17 100644
--- a/share/regions/config_43.xml
+++ b/share/regions/config_43.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02b" SimName="43" SimLocationX="1011" SimLocationY="1001" Datastore="store_43_x11_y02.yap" SimListenPort="9143" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02b" SimName="43" SimLocationX="1011" SimLocationY="1001" Datastore="store_43_x11_y02.yap" SimListenPort="9143" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_430.xml b/share/regions/config_430.xml
index 1123c41..0a0e749 100644
--- a/share/regions/config_430.xml
+++ b/share/regions/config_430.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ae" SimName="430" SimLocationX="1014" SimLocationY="1013" Datastore="store_430_x14_y26.yap" SimListenPort="9530" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ae" SimName="430" SimLocationX="1014" SimLocationY="1013" Datastore="store_430_x14_y26.yap" SimListenPort="9530" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_431.xml b/share/regions/config_431.xml
index 3c225d2..cf6480e 100644
--- a/share/regions/config_431.xml
+++ b/share/regions/config_431.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1af" SimName="431" SimLocationX="1015" SimLocationY="1013" Datastore="store_431_x15_y26.yap" SimListenPort="9531" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1af" SimName="431" SimLocationX="1015" SimLocationY="1013" Datastore="store_431_x15_y26.yap" SimListenPort="9531" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_432.xml b/share/regions/config_432.xml
index 67579d3..71c3eab 100644
--- a/share/regions/config_432.xml
+++ b/share/regions/config_432.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b0" SimName="432" SimLocationX="1016" SimLocationY="1013" Datastore="store_432_x00_y27.yap" SimListenPort="9532" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b0" SimName="432" SimLocationX="1016" SimLocationY="1013" Datastore="store_432_x00_y27.yap" SimListenPort="9532" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_433.xml b/share/regions/config_433.xml
index 6086a53..a18c16e 100644
--- a/share/regions/config_433.xml
+++ b/share/regions/config_433.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b1" SimName="433" SimLocationX="1017" SimLocationY="1013" Datastore="store_433_x01_y27.yap" SimListenPort="9533" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b1" SimName="433" SimLocationX="1017" SimLocationY="1013" Datastore="store_433_x01_y27.yap" SimListenPort="9533" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_434.xml b/share/regions/config_434.xml
index a634da2..326fe17 100644
--- a/share/regions/config_434.xml
+++ b/share/regions/config_434.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b2" SimName="434" SimLocationX="1018" SimLocationY="1013" Datastore="store_434_x02_y27.yap" SimListenPort="9534" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b2" SimName="434" SimLocationX="1018" SimLocationY="1013" Datastore="store_434_x02_y27.yap" SimListenPort="9534" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_435.xml b/share/regions/config_435.xml
index 06dcd5b..097749d 100644
--- a/share/regions/config_435.xml
+++ b/share/regions/config_435.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b3" SimName="435" SimLocationX="1019" SimLocationY="1013" Datastore="store_435_x03_y27.yap" SimListenPort="9535" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b3" SimName="435" SimLocationX="1019" SimLocationY="1013" Datastore="store_435_x03_y27.yap" SimListenPort="9535" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_436.xml b/share/regions/config_436.xml
index 70c64a6..c1ae28b 100644
--- a/share/regions/config_436.xml
+++ b/share/regions/config_436.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b4" SimName="436" SimLocationX="1020" SimLocationY="1013" Datastore="store_436_x04_y27.yap" SimListenPort="9536" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b4" SimName="436" SimLocationX="1020" SimLocationY="1013" Datastore="store_436_x04_y27.yap" SimListenPort="9536" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_437.xml b/share/regions/config_437.xml
index aaa105e..26b90a9 100644
--- a/share/regions/config_437.xml
+++ b/share/regions/config_437.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b5" SimName="437" SimLocationX="1021" SimLocationY="1013" Datastore="store_437_x05_y27.yap" SimListenPort="9537" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b5" SimName="437" SimLocationX="1021" SimLocationY="1013" Datastore="store_437_x05_y27.yap" SimListenPort="9537" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_438.xml b/share/regions/config_438.xml
index 3f7b991..4d519b6 100644
--- a/share/regions/config_438.xml
+++ b/share/regions/config_438.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b6" SimName="438" SimLocationX="1022" SimLocationY="1013" Datastore="store_438_x06_y27.yap" SimListenPort="9538" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b6" SimName="438" SimLocationX="1022" SimLocationY="1013" Datastore="store_438_x06_y27.yap" SimListenPort="9538" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_439.xml b/share/regions/config_439.xml
index 6ff6c99..fe4e4dd 100644
--- a/share/regions/config_439.xml
+++ b/share/regions/config_439.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b7" SimName="439" SimLocationX="1023" SimLocationY="1013" Datastore="store_439_x07_y27.yap" SimListenPort="9539" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b7" SimName="439" SimLocationX="1023" SimLocationY="1013" Datastore="store_439_x07_y27.yap" SimListenPort="9539" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_44.xml b/share/regions/config_44.xml
index 00a639c..1383950 100644
--- a/share/regions/config_44.xml
+++ b/share/regions/config_44.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02c" SimName="44" SimLocationX="1012" SimLocationY="1001" Datastore="store_44_x12_y02.yap" SimListenPort="9144" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02c" SimName="44" SimLocationX="1012" SimLocationY="1001" Datastore="store_44_x12_y02.yap" SimListenPort="9144" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_440.xml b/share/regions/config_440.xml
index 2514f27..7af1097 100644
--- a/share/regions/config_440.xml
+++ b/share/regions/config_440.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b8" SimName="440" SimLocationX="1024" SimLocationY="1013" Datastore="store_440_x08_y27.yap" SimListenPort="9540" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b8" SimName="440" SimLocationX="1024" SimLocationY="1013" Datastore="store_440_x08_y27.yap" SimListenPort="9540" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_441.xml b/share/regions/config_441.xml
index 6c69568..098d379 100644
--- a/share/regions/config_441.xml
+++ b/share/regions/config_441.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b9" SimName="441" SimLocationX="1025" SimLocationY="1013" Datastore="store_441_x09_y27.yap" SimListenPort="9541" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1b9" SimName="441" SimLocationX="1025" SimLocationY="1013" Datastore="store_441_x09_y27.yap" SimListenPort="9541" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_442.xml b/share/regions/config_442.xml
index 3b39f84..ef75843 100644
--- a/share/regions/config_442.xml
+++ b/share/regions/config_442.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ba" SimName="442" SimLocationX="1026" SimLocationY="1013" Datastore="store_442_x10_y27.yap" SimListenPort="9542" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ba" SimName="442" SimLocationX="1026" SimLocationY="1013" Datastore="store_442_x10_y27.yap" SimListenPort="9542" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_443.xml b/share/regions/config_443.xml
index f86fcca..77f4cad 100644
--- a/share/regions/config_443.xml
+++ b/share/regions/config_443.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bb" SimName="443" SimLocationX="1027" SimLocationY="1013" Datastore="store_443_x11_y27.yap" SimListenPort="9543" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bb" SimName="443" SimLocationX="1027" SimLocationY="1013" Datastore="store_443_x11_y27.yap" SimListenPort="9543" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_444.xml b/share/regions/config_444.xml
index 0b2cecc..22ac8a3 100644
--- a/share/regions/config_444.xml
+++ b/share/regions/config_444.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bc" SimName="444" SimLocationX="1028" SimLocationY="1013" Datastore="store_444_x12_y27.yap" SimListenPort="9544" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bc" SimName="444" SimLocationX="1028" SimLocationY="1013" Datastore="store_444_x12_y27.yap" SimListenPort="9544" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_445.xml b/share/regions/config_445.xml
index cda5bf8..0cf11b3 100644
--- a/share/regions/config_445.xml
+++ b/share/regions/config_445.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bd" SimName="445" SimLocationX="1029" SimLocationY="1013" Datastore="store_445_x13_y27.yap" SimListenPort="9545" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bd" SimName="445" SimLocationX="1029" SimLocationY="1013" Datastore="store_445_x13_y27.yap" SimListenPort="9545" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_446.xml b/share/regions/config_446.xml
index d2daec5..ae3ad10 100644
--- a/share/regions/config_446.xml
+++ b/share/regions/config_446.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1be" SimName="446" SimLocationX="1030" SimLocationY="1013" Datastore="store_446_x14_y27.yap" SimListenPort="9546" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1be" SimName="446" SimLocationX="1030" SimLocationY="1013" Datastore="store_446_x14_y27.yap" SimListenPort="9546" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_447.xml b/share/regions/config_447.xml
index c39cd11..3e22ccb 100644
--- a/share/regions/config_447.xml
+++ b/share/regions/config_447.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bf" SimName="447" SimLocationX="1031" SimLocationY="1013" Datastore="store_447_x15_y27.yap" SimListenPort="9547" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1bf" SimName="447" SimLocationX="1031" SimLocationY="1013" Datastore="store_447_x15_y27.yap" SimListenPort="9547" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_448.xml b/share/regions/config_448.xml
index 391cf51..dcebb0b 100644
--- a/share/regions/config_448.xml
+++ b/share/regions/config_448.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c0" SimName="448" SimLocationX="1000" SimLocationY="1014" Datastore="store_448_x00_y28.yap" SimListenPort="9548" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c0" SimName="448" SimLocationX="1000" SimLocationY="1014" Datastore="store_448_x00_y28.yap" SimListenPort="9548" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_449.xml b/share/regions/config_449.xml
index fa67578..28ac8af 100644
--- a/share/regions/config_449.xml
+++ b/share/regions/config_449.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c1" SimName="449" SimLocationX="1001" SimLocationY="1014" Datastore="store_449_x01_y28.yap" SimListenPort="9549" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c1" SimName="449" SimLocationX="1001" SimLocationY="1014" Datastore="store_449_x01_y28.yap" SimListenPort="9549" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_45.xml b/share/regions/config_45.xml
index 247bcd7..8d1973f 100644
--- a/share/regions/config_45.xml
+++ b/share/regions/config_45.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02d" SimName="45" SimLocationX="1013" SimLocationY="1001" Datastore="store_45_x13_y02.yap" SimListenPort="9145" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02d" SimName="45" SimLocationX="1013" SimLocationY="1001" Datastore="store_45_x13_y02.yap" SimListenPort="9145" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_450.xml b/share/regions/config_450.xml
index 54404a1..984b71f 100644
--- a/share/regions/config_450.xml
+++ b/share/regions/config_450.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c2" SimName="450" SimLocationX="1002" SimLocationY="1014" Datastore="store_450_x02_y28.yap" SimListenPort="9550" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c2" SimName="450" SimLocationX="1002" SimLocationY="1014" Datastore="store_450_x02_y28.yap" SimListenPort="9550" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_451.xml b/share/regions/config_451.xml
index 4c21c75..5fcda6c 100644
--- a/share/regions/config_451.xml
+++ b/share/regions/config_451.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c3" SimName="451" SimLocationX="1003" SimLocationY="1014" Datastore="store_451_x03_y28.yap" SimListenPort="9551" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c3" SimName="451" SimLocationX="1003" SimLocationY="1014" Datastore="store_451_x03_y28.yap" SimListenPort="9551" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_452.xml b/share/regions/config_452.xml
index e2d8006..13b199b 100644
--- a/share/regions/config_452.xml
+++ b/share/regions/config_452.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c4" SimName="452" SimLocationX="1004" SimLocationY="1014" Datastore="store_452_x04_y28.yap" SimListenPort="9552" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c4" SimName="452" SimLocationX="1004" SimLocationY="1014" Datastore="store_452_x04_y28.yap" SimListenPort="9552" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_453.xml b/share/regions/config_453.xml
index 207829e..91846f3 100644
--- a/share/regions/config_453.xml
+++ b/share/regions/config_453.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c5" SimName="453" SimLocationX="1005" SimLocationY="1014" Datastore="store_453_x05_y28.yap" SimListenPort="9553" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c5" SimName="453" SimLocationX="1005" SimLocationY="1014" Datastore="store_453_x05_y28.yap" SimListenPort="9553" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_454.xml b/share/regions/config_454.xml
index d216735..25923dd 100644
--- a/share/regions/config_454.xml
+++ b/share/regions/config_454.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c6" SimName="454" SimLocationX="1006" SimLocationY="1014" Datastore="store_454_x06_y28.yap" SimListenPort="9554" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c6" SimName="454" SimLocationX="1006" SimLocationY="1014" Datastore="store_454_x06_y28.yap" SimListenPort="9554" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_455.xml b/share/regions/config_455.xml
index 82fae24..bc49fcd 100644
--- a/share/regions/config_455.xml
+++ b/share/regions/config_455.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c7" SimName="455" SimLocationX="1007" SimLocationY="1014" Datastore="store_455_x07_y28.yap" SimListenPort="9555" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c7" SimName="455" SimLocationX="1007" SimLocationY="1014" Datastore="store_455_x07_y28.yap" SimListenPort="9555" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_456.xml b/share/regions/config_456.xml
index 0487f14..fa01129 100644
--- a/share/regions/config_456.xml
+++ b/share/regions/config_456.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c8" SimName="456" SimLocationX="1008" SimLocationY="1014" Datastore="store_456_x08_y28.yap" SimListenPort="9556" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c8" SimName="456" SimLocationX="1008" SimLocationY="1014" Datastore="store_456_x08_y28.yap" SimListenPort="9556" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_457.xml b/share/regions/config_457.xml
index 858c3e0..45e5113 100644
--- a/share/regions/config_457.xml
+++ b/share/regions/config_457.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c9" SimName="457" SimLocationX="1009" SimLocationY="1014" Datastore="store_457_x09_y28.yap" SimListenPort="9557" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1c9" SimName="457" SimLocationX="1009" SimLocationY="1014" Datastore="store_457_x09_y28.yap" SimListenPort="9557" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_458.xml b/share/regions/config_458.xml
index 09e4a6c..9337072 100644
--- a/share/regions/config_458.xml
+++ b/share/regions/config_458.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ca" SimName="458" SimLocationX="1010" SimLocationY="1014" Datastore="store_458_x10_y28.yap" SimListenPort="9558" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ca" SimName="458" SimLocationX="1010" SimLocationY="1014" Datastore="store_458_x10_y28.yap" SimListenPort="9558" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_459.xml b/share/regions/config_459.xml
index f0f069c..469b415 100644
--- a/share/regions/config_459.xml
+++ b/share/regions/config_459.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cb" SimName="459" SimLocationX="1011" SimLocationY="1014" Datastore="store_459_x11_y28.yap" SimListenPort="9559" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cb" SimName="459" SimLocationX="1011" SimLocationY="1014" Datastore="store_459_x11_y28.yap" SimListenPort="9559" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_46.xml b/share/regions/config_46.xml
index e2b865c..6961da4 100644
--- a/share/regions/config_46.xml
+++ b/share/regions/config_46.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02e" SimName="46" SimLocationX="1014" SimLocationY="1001" Datastore="store_46_x14_y02.yap" SimListenPort="9146" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02e" SimName="46" SimLocationX="1014" SimLocationY="1001" Datastore="store_46_x14_y02.yap" SimListenPort="9146" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_460.xml b/share/regions/config_460.xml
index d90b4d2..9ef65ed 100644
--- a/share/regions/config_460.xml
+++ b/share/regions/config_460.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cc" SimName="460" SimLocationX="1012" SimLocationY="1014" Datastore="store_460_x12_y28.yap" SimListenPort="9560" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cc" SimName="460" SimLocationX="1012" SimLocationY="1014" Datastore="store_460_x12_y28.yap" SimListenPort="9560" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_461.xml b/share/regions/config_461.xml
index 18bc3d7..af7b9a5 100644
--- a/share/regions/config_461.xml
+++ b/share/regions/config_461.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cd" SimName="461" SimLocationX="1013" SimLocationY="1014" Datastore="store_461_x13_y28.yap" SimListenPort="9561" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cd" SimName="461" SimLocationX="1013" SimLocationY="1014" Datastore="store_461_x13_y28.yap" SimListenPort="9561" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_462.xml b/share/regions/config_462.xml
index 1d89c58..9786f1f 100644
--- a/share/regions/config_462.xml
+++ b/share/regions/config_462.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ce" SimName="462" SimLocationX="1014" SimLocationY="1014" Datastore="store_462_x14_y28.yap" SimListenPort="9562" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ce" SimName="462" SimLocationX="1014" SimLocationY="1014" Datastore="store_462_x14_y28.yap" SimListenPort="9562" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_463.xml b/share/regions/config_463.xml
index 55c5dfd..c3a6010 100644
--- a/share/regions/config_463.xml
+++ b/share/regions/config_463.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cf" SimName="463" SimLocationX="1015" SimLocationY="1014" Datastore="store_463_x15_y28.yap" SimListenPort="9563" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1cf" SimName="463" SimLocationX="1015" SimLocationY="1014" Datastore="store_463_x15_y28.yap" SimListenPort="9563" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_464.xml b/share/regions/config_464.xml
index 0831e89..204de06 100644
--- a/share/regions/config_464.xml
+++ b/share/regions/config_464.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d0" SimName="464" SimLocationX="1016" SimLocationY="1014" Datastore="store_464_x00_y29.yap" SimListenPort="9564" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d0" SimName="464" SimLocationX="1016" SimLocationY="1014" Datastore="store_464_x00_y29.yap" SimListenPort="9564" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_465.xml b/share/regions/config_465.xml
index 0f5c04b..2b88128 100644
--- a/share/regions/config_465.xml
+++ b/share/regions/config_465.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d1" SimName="465" SimLocationX="1017" SimLocationY="1014" Datastore="store_465_x01_y29.yap" SimListenPort="9565" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d1" SimName="465" SimLocationX="1017" SimLocationY="1014" Datastore="store_465_x01_y29.yap" SimListenPort="9565" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_466.xml b/share/regions/config_466.xml
index 6ae69b0..b87c991 100644
--- a/share/regions/config_466.xml
+++ b/share/regions/config_466.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d2" SimName="466" SimLocationX="1018" SimLocationY="1014" Datastore="store_466_x02_y29.yap" SimListenPort="9566" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d2" SimName="466" SimLocationX="1018" SimLocationY="1014" Datastore="store_466_x02_y29.yap" SimListenPort="9566" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_467.xml b/share/regions/config_467.xml
index b9904a3..3eabd30 100644
--- a/share/regions/config_467.xml
+++ b/share/regions/config_467.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d3" SimName="467" SimLocationX="1019" SimLocationY="1014" Datastore="store_467_x03_y29.yap" SimListenPort="9567" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d3" SimName="467" SimLocationX="1019" SimLocationY="1014" Datastore="store_467_x03_y29.yap" SimListenPort="9567" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_468.xml b/share/regions/config_468.xml
index 94ed66a..8c828ea 100644
--- a/share/regions/config_468.xml
+++ b/share/regions/config_468.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d4" SimName="468" SimLocationX="1020" SimLocationY="1014" Datastore="store_468_x04_y29.yap" SimListenPort="9568" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d4" SimName="468" SimLocationX="1020" SimLocationY="1014" Datastore="store_468_x04_y29.yap" SimListenPort="9568" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_469.xml b/share/regions/config_469.xml
index 5ac092e..4c3120c 100644
--- a/share/regions/config_469.xml
+++ b/share/regions/config_469.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d5" SimName="469" SimLocationX="1021" SimLocationY="1014" Datastore="store_469_x05_y29.yap" SimListenPort="9569" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d5" SimName="469" SimLocationX="1021" SimLocationY="1014" Datastore="store_469_x05_y29.yap" SimListenPort="9569" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_47.xml b/share/regions/config_47.xml
index b0efa2b..1bf9ae3 100644
--- a/share/regions/config_47.xml
+++ b/share/regions/config_47.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02f" SimName="47" SimLocationX="1015" SimLocationY="1001" Datastore="store_47_x15_y02.yap" SimListenPort="9147" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf02f" SimName="47" SimLocationX="1015" SimLocationY="1001" Datastore="store_47_x15_y02.yap" SimListenPort="9147" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y13.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_470.xml b/share/regions/config_470.xml
index c1d592a..e21792c 100644
--- a/share/regions/config_470.xml
+++ b/share/regions/config_470.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d6" SimName="470" SimLocationX="1022" SimLocationY="1014" Datastore="store_470_x06_y29.yap" SimListenPort="9570" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d6" SimName="470" SimLocationX="1022" SimLocationY="1014" Datastore="store_470_x06_y29.yap" SimListenPort="9570" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_471.xml b/share/regions/config_471.xml
index 4a53f11..0ace739 100644
--- a/share/regions/config_471.xml
+++ b/share/regions/config_471.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d7" SimName="471" SimLocationX="1023" SimLocationY="1014" Datastore="store_471_x07_y29.yap" SimListenPort="9571" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d7" SimName="471" SimLocationX="1023" SimLocationY="1014" Datastore="store_471_x07_y29.yap" SimListenPort="9571" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_472.xml b/share/regions/config_472.xml
index e5e387c..a1dd501 100644
--- a/share/regions/config_472.xml
+++ b/share/regions/config_472.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d8" SimName="472" SimLocationX="1024" SimLocationY="1014" Datastore="store_472_x08_y29.yap" SimListenPort="9572" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d8" SimName="472" SimLocationX="1024" SimLocationY="1014" Datastore="store_472_x08_y29.yap" SimListenPort="9572" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_473.xml b/share/regions/config_473.xml
index 4303c15..7dba804 100644
--- a/share/regions/config_473.xml
+++ b/share/regions/config_473.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d9" SimName="473" SimLocationX="1025" SimLocationY="1014" Datastore="store_473_x09_y29.yap" SimListenPort="9573" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1d9" SimName="473" SimLocationX="1025" SimLocationY="1014" Datastore="store_473_x09_y29.yap" SimListenPort="9573" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_474.xml b/share/regions/config_474.xml
index 77c264f..5541165 100644
--- a/share/regions/config_474.xml
+++ b/share/regions/config_474.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1da" SimName="474" SimLocationX="1026" SimLocationY="1014" Datastore="store_474_x10_y29.yap" SimListenPort="9574" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1da" SimName="474" SimLocationX="1026" SimLocationY="1014" Datastore="store_474_x10_y29.yap" SimListenPort="9574" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_475.xml b/share/regions/config_475.xml
index d1d660f..4dfa5ed 100644
--- a/share/regions/config_475.xml
+++ b/share/regions/config_475.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1db" SimName="475" SimLocationX="1027" SimLocationY="1014" Datastore="store_475_x11_y29.yap" SimListenPort="9575" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1db" SimName="475" SimLocationX="1027" SimLocationY="1014" Datastore="store_475_x11_y29.yap" SimListenPort="9575" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_476.xml b/share/regions/config_476.xml
index 7daed61..287ea6c 100644
--- a/share/regions/config_476.xml
+++ b/share/regions/config_476.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1dc" SimName="476" SimLocationX="1028" SimLocationY="1014" Datastore="store_476_x12_y29.yap" SimListenPort="9576" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1dc" SimName="476" SimLocationX="1028" SimLocationY="1014" Datastore="store_476_x12_y29.yap" SimListenPort="9576" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_477.xml b/share/regions/config_477.xml
index d146e10..62b16c4 100644
--- a/share/regions/config_477.xml
+++ b/share/regions/config_477.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1dd" SimName="477" SimLocationX="1029" SimLocationY="1014" Datastore="store_477_x13_y29.yap" SimListenPort="9577" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1dd" SimName="477" SimLocationX="1029" SimLocationY="1014" Datastore="store_477_x13_y29.yap" SimListenPort="9577" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_478.xml b/share/regions/config_478.xml
index e1d4b30..81bb1ce 100644
--- a/share/regions/config_478.xml
+++ b/share/regions/config_478.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1de" SimName="478" SimLocationX="1030" SimLocationY="1014" Datastore="store_478_x14_y29.yap" SimListenPort="9578" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1de" SimName="478" SimLocationX="1030" SimLocationY="1014" Datastore="store_478_x14_y29.yap" SimListenPort="9578" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_479.xml b/share/regions/config_479.xml
index 8b8d0a8..de54de1 100644
--- a/share/regions/config_479.xml
+++ b/share/regions/config_479.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1df" SimName="479" SimLocationX="1031" SimLocationY="1014" Datastore="store_479_x15_y29.yap" SimListenPort="9579" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1df" SimName="479" SimLocationX="1031" SimLocationY="1014" Datastore="store_479_x15_y29.yap" SimListenPort="9579" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-14.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_48.xml b/share/regions/config_48.xml
index ce31b09..4d29716 100644
--- a/share/regions/config_48.xml
+++ b/share/regions/config_48.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf030" SimName="48" SimLocationX="1016" SimLocationY="1001" Datastore="store_48_x00_y03.yap" SimListenPort="9148" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf030" SimName="48" SimLocationX="1016" SimLocationY="1001" Datastore="store_48_x00_y03.yap" SimListenPort="9148" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_480.xml b/share/regions/config_480.xml
index b6fecdc..3fbdd4a 100644
--- a/share/regions/config_480.xml
+++ b/share/regions/config_480.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e0" SimName="480" SimLocationX="1000" SimLocationY="1015" Datastore="store_480_x00_y30.yap" SimListenPort="9580" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e0" SimName="480" SimLocationX="1000" SimLocationY="1015" Datastore="store_480_x00_y30.yap" SimListenPort="9580" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_481.xml b/share/regions/config_481.xml
index ec438e5..3c3c093 100644
--- a/share/regions/config_481.xml
+++ b/share/regions/config_481.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e1" SimName="481" SimLocationX="1001" SimLocationY="1015" Datastore="store_481_x01_y30.yap" SimListenPort="9581" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e1" SimName="481" SimLocationX="1001" SimLocationY="1015" Datastore="store_481_x01_y30.yap" SimListenPort="9581" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_482.xml b/share/regions/config_482.xml
index c684968..73689d9 100644
--- a/share/regions/config_482.xml
+++ b/share/regions/config_482.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e2" SimName="482" SimLocationX="1002" SimLocationY="1015" Datastore="store_482_x02_y30.yap" SimListenPort="9582" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e2" SimName="482" SimLocationX="1002" SimLocationY="1015" Datastore="store_482_x02_y30.yap" SimListenPort="9582" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_483.xml b/share/regions/config_483.xml
index a22c870..926db39 100644
--- a/share/regions/config_483.xml
+++ b/share/regions/config_483.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e3" SimName="483" SimLocationX="1003" SimLocationY="1015" Datastore="store_483_x03_y30.yap" SimListenPort="9583" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e3" SimName="483" SimLocationX="1003" SimLocationY="1015" Datastore="store_483_x03_y30.yap" SimListenPort="9583" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_484.xml b/share/regions/config_484.xml
index 27d3e36..abe5f1a 100644
--- a/share/regions/config_484.xml
+++ b/share/regions/config_484.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e4" SimName="484" SimLocationX="1004" SimLocationY="1015" Datastore="store_484_x04_y30.yap" SimListenPort="9584" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e4" SimName="484" SimLocationX="1004" SimLocationY="1015" Datastore="store_484_x04_y30.yap" SimListenPort="9584" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_485.xml b/share/regions/config_485.xml
index cd85329..a53509b 100644
--- a/share/regions/config_485.xml
+++ b/share/regions/config_485.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e5" SimName="485" SimLocationX="1005" SimLocationY="1015" Datastore="store_485_x05_y30.yap" SimListenPort="9585" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e5" SimName="485" SimLocationX="1005" SimLocationY="1015" Datastore="store_485_x05_y30.yap" SimListenPort="9585" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_486.xml b/share/regions/config_486.xml
index 4c6667a..8e2a338 100644
--- a/share/regions/config_486.xml
+++ b/share/regions/config_486.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e6" SimName="486" SimLocationX="1006" SimLocationY="1015" Datastore="store_486_x06_y30.yap" SimListenPort="9586" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e6" SimName="486" SimLocationX="1006" SimLocationY="1015" Datastore="store_486_x06_y30.yap" SimListenPort="9586" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_487.xml b/share/regions/config_487.xml
index 96a2da7..aa47650 100644
--- a/share/regions/config_487.xml
+++ b/share/regions/config_487.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e7" SimName="487" SimLocationX="1007" SimLocationY="1015" Datastore="store_487_x07_y30.yap" SimListenPort="9587" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e7" SimName="487" SimLocationX="1007" SimLocationY="1015" Datastore="store_487_x07_y30.yap" SimListenPort="9587" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_488.xml b/share/regions/config_488.xml
index f8e7e04..7e7da5a 100644
--- a/share/regions/config_488.xml
+++ b/share/regions/config_488.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e8" SimName="488" SimLocationX="1008" SimLocationY="1015" Datastore="store_488_x08_y30.yap" SimListenPort="9588" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e8" SimName="488" SimLocationX="1008" SimLocationY="1015" Datastore="store_488_x08_y30.yap" SimListenPort="9588" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_489.xml b/share/regions/config_489.xml
index 1209ee0..bc414df 100644
--- a/share/regions/config_489.xml
+++ b/share/regions/config_489.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e9" SimName="489" SimLocationX="1009" SimLocationY="1015" Datastore="store_489_x09_y30.yap" SimListenPort="9589" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1e9" SimName="489" SimLocationX="1009" SimLocationY="1015" Datastore="store_489_x09_y30.yap" SimListenPort="9589" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_49.xml b/share/regions/config_49.xml
index 4c775f0..013ee98 100644
--- a/share/regions/config_49.xml
+++ b/share/regions/config_49.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf031" SimName="49" SimLocationX="1017" SimLocationY="1001" Datastore="store_49_x01_y03.yap" SimListenPort="9149" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf031" SimName="49" SimLocationX="1017" SimLocationY="1001" Datastore="store_49_x01_y03.yap" SimListenPort="9149" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_490.xml b/share/regions/config_490.xml
index 4f125ac..e09a9cf 100644
--- a/share/regions/config_490.xml
+++ b/share/regions/config_490.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ea" SimName="490" SimLocationX="1010" SimLocationY="1015" Datastore="store_490_x10_y30.yap" SimListenPort="9590" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ea" SimName="490" SimLocationX="1010" SimLocationY="1015" Datastore="store_490_x10_y30.yap" SimListenPort="9590" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_491.xml b/share/regions/config_491.xml
index 7ed67c4..9659c7b 100644
--- a/share/regions/config_491.xml
+++ b/share/regions/config_491.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1eb" SimName="491" SimLocationX="1011" SimLocationY="1015" Datastore="store_491_x11_y30.yap" SimListenPort="9591" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1eb" SimName="491" SimLocationX="1011" SimLocationY="1015" Datastore="store_491_x11_y30.yap" SimListenPort="9591" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_492.xml b/share/regions/config_492.xml
index 8a8bbaa..1cbb0bd 100644
--- a/share/regions/config_492.xml
+++ b/share/regions/config_492.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ec" SimName="492" SimLocationX="1012" SimLocationY="1015" Datastore="store_492_x12_y30.yap" SimListenPort="9592" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ec" SimName="492" SimLocationX="1012" SimLocationY="1015" Datastore="store_492_x12_y30.yap" SimListenPort="9592" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_493.xml b/share/regions/config_493.xml
index b6238a3..b345b6c 100644
--- a/share/regions/config_493.xml
+++ b/share/regions/config_493.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ed" SimName="493" SimLocationX="1013" SimLocationY="1015" Datastore="store_493_x13_y30.yap" SimListenPort="9593" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ed" SimName="493" SimLocationX="1013" SimLocationY="1015" Datastore="store_493_x13_y30.yap" SimListenPort="9593" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_494.xml b/share/regions/config_494.xml
index 2c4e400..63cd1bb 100644
--- a/share/regions/config_494.xml
+++ b/share/regions/config_494.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ee" SimName="494" SimLocationX="1014" SimLocationY="1015" Datastore="store_494_x14_y30.yap" SimListenPort="9594" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ee" SimName="494" SimLocationX="1014" SimLocationY="1015" Datastore="store_494_x14_y30.yap" SimListenPort="9594" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_495.xml b/share/regions/config_495.xml
index f249907..34ecdc6 100644
--- a/share/regions/config_495.xml
+++ b/share/regions/config_495.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ef" SimName="495" SimLocationX="1015" SimLocationY="1015" Datastore="store_495_x15_y30.yap" SimListenPort="9595" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ef" SimName="495" SimLocationX="1015" SimLocationY="1015" Datastore="store_495_x15_y30.yap" SimListenPort="9595" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_496.xml b/share/regions/config_496.xml
index c5870f2..12fd436 100644
--- a/share/regions/config_496.xml
+++ b/share/regions/config_496.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f0" SimName="496" SimLocationX="1016" SimLocationY="1015" Datastore="store_496_x00_y31.yap" SimListenPort="9596" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f0" SimName="496" SimLocationX="1016" SimLocationY="1015" Datastore="store_496_x00_y31.yap" SimListenPort="9596" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_497.xml b/share/regions/config_497.xml
index efeeda6..0325780 100644
--- a/share/regions/config_497.xml
+++ b/share/regions/config_497.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f1" SimName="497" SimLocationX="1017" SimLocationY="1015" Datastore="store_497_x01_y31.yap" SimListenPort="9597" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f1" SimName="497" SimLocationX="1017" SimLocationY="1015" Datastore="store_497_x01_y31.yap" SimListenPort="9597" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_498.xml b/share/regions/config_498.xml
index 257e3a4..b473ee7 100644
--- a/share/regions/config_498.xml
+++ b/share/regions/config_498.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f2" SimName="498" SimLocationX="1018" SimLocationY="1015" Datastore="store_498_x02_y31.yap" SimListenPort="9598" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f2" SimName="498" SimLocationX="1018" SimLocationY="1015" Datastore="store_498_x02_y31.yap" SimListenPort="9598" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_499.xml b/share/regions/config_499.xml
index b42f29b..05f8677 100644
--- a/share/regions/config_499.xml
+++ b/share/regions/config_499.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f3" SimName="499" SimLocationX="1019" SimLocationY="1015" Datastore="store_499_x03_y31.yap" SimListenPort="9599" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f3" SimName="499" SimLocationX="1019" SimLocationY="1015" Datastore="store_499_x03_y31.yap" SimListenPort="9599" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_5.xml b/share/regions/config_5.xml
index b32cb4b..17358bb 100644
--- a/share/regions/config_5.xml
+++ b/share/regions/config_5.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf005" SimName="5" SimLocationX="1005" SimLocationY="1000" Datastore="store_5_x05_y00.yap" SimListenPort="9105" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf005" SimName="5" SimLocationX="1005" SimLocationY="1000" Datastore="store_5_x05_y00.yap" SimListenPort="9105" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_50.xml b/share/regions/config_50.xml
index bd3138f..01bd47a 100644
--- a/share/regions/config_50.xml
+++ b/share/regions/config_50.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf032" SimName="50" SimLocationX="1018" SimLocationY="1001" Datastore="store_50_x02_y03.yap" SimListenPort="9150" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf032" SimName="50" SimLocationX="1018" SimLocationY="1001" Datastore="store_50_x02_y03.yap" SimListenPort="9150" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_500.xml b/share/regions/config_500.xml
index d272b8f..0a4870d 100644
--- a/share/regions/config_500.xml
+++ b/share/regions/config_500.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f4" SimName="500" SimLocationX="1020" SimLocationY="1015" Datastore="store_500_x04_y31.yap" SimListenPort="9600" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f4" SimName="500" SimLocationX="1020" SimLocationY="1015" Datastore="store_500_x04_y31.yap" SimListenPort="9600" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_501.xml b/share/regions/config_501.xml
index 70701c3..06836de 100644
--- a/share/regions/config_501.xml
+++ b/share/regions/config_501.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f5" SimName="501" SimLocationX="1021" SimLocationY="1015" Datastore="store_501_x05_y31.yap" SimListenPort="9601" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f5" SimName="501" SimLocationX="1021" SimLocationY="1015" Datastore="store_501_x05_y31.yap" SimListenPort="9601" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_502.xml b/share/regions/config_502.xml
index f29d78f..e1b9fe0 100644
--- a/share/regions/config_502.xml
+++ b/share/regions/config_502.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f6" SimName="502" SimLocationX="1022" SimLocationY="1015" Datastore="store_502_x06_y31.yap" SimListenPort="9602" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f6" SimName="502" SimLocationX="1022" SimLocationY="1015" Datastore="store_502_x06_y31.yap" SimListenPort="9602" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_503.xml b/share/regions/config_503.xml
index fc27205..25f0657 100644
--- a/share/regions/config_503.xml
+++ b/share/regions/config_503.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f7" SimName="503" SimLocationX="1023" SimLocationY="1015" Datastore="store_503_x07_y31.yap" SimListenPort="9603" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f7" SimName="503" SimLocationX="1023" SimLocationY="1015" Datastore="store_503_x07_y31.yap" SimListenPort="9603" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_504.xml b/share/regions/config_504.xml
index 4324371..1a97b01 100644
--- a/share/regions/config_504.xml
+++ b/share/regions/config_504.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f8" SimName="504" SimLocationX="1024" SimLocationY="1015" Datastore="store_504_x08_y31.yap" SimListenPort="9604" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f8" SimName="504" SimLocationX="1024" SimLocationY="1015" Datastore="store_504_x08_y31.yap" SimListenPort="9604" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_505.xml b/share/regions/config_505.xml
index b5d7933..707e8f8 100644
--- a/share/regions/config_505.xml
+++ b/share/regions/config_505.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f9" SimName="505" SimLocationX="1025" SimLocationY="1015" Datastore="store_505_x09_y31.yap" SimListenPort="9605" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1f9" SimName="505" SimLocationX="1025" SimLocationY="1015" Datastore="store_505_x09_y31.yap" SimListenPort="9605" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_506.xml b/share/regions/config_506.xml
index 9c34e60..d14ffb3 100644
--- a/share/regions/config_506.xml
+++ b/share/regions/config_506.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fa" SimName="506" SimLocationX="1026" SimLocationY="1015" Datastore="store_506_x10_y31.yap" SimListenPort="9606" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fa" SimName="506" SimLocationX="1026" SimLocationY="1015" Datastore="store_506_x10_y31.yap" SimListenPort="9606" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_507.xml b/share/regions/config_507.xml
index 8cf3e32..092586e 100644
--- a/share/regions/config_507.xml
+++ b/share/regions/config_507.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fb" SimName="507" SimLocationX="1027" SimLocationY="1015" Datastore="store_507_x11_y31.yap" SimListenPort="9607" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fb" SimName="507" SimLocationX="1027" SimLocationY="1015" Datastore="store_507_x11_y31.yap" SimListenPort="9607" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_508.xml b/share/regions/config_508.xml
index 629dc2f..520aacd 100644
--- a/share/regions/config_508.xml
+++ b/share/regions/config_508.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fc" SimName="508" SimLocationX="1028" SimLocationY="1015" Datastore="store_508_x12_y31.yap" SimListenPort="9608" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fc" SimName="508" SimLocationX="1028" SimLocationY="1015" Datastore="store_508_x12_y31.yap" SimListenPort="9608" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_509.xml b/share/regions/config_509.xml
index f850296..7bb839c 100644
--- a/share/regions/config_509.xml
+++ b/share/regions/config_509.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fd" SimName="509" SimLocationX="1029" SimLocationY="1015" Datastore="store_509_x13_y31.yap" SimListenPort="9609" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fd" SimName="509" SimLocationX="1029" SimLocationY="1015" Datastore="store_509_x13_y31.yap" SimListenPort="9609" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_51.xml b/share/regions/config_51.xml
index f40bd4e..2eece8f 100644
--- a/share/regions/config_51.xml
+++ b/share/regions/config_51.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf033" SimName="51" SimLocationX="1019" SimLocationY="1001" Datastore="store_51_x03_y03.yap" SimListenPort="9151" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf033" SimName="51" SimLocationX="1019" SimLocationY="1001" Datastore="store_51_x03_y03.yap" SimListenPort="9151" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_510.xml b/share/regions/config_510.xml
index 84c7aa3..24d373a 100644
--- a/share/regions/config_510.xml
+++ b/share/regions/config_510.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fe" SimName="510" SimLocationX="1030" SimLocationY="1015" Datastore="store_510_x14_y31.yap" SimListenPort="9610" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1fe" SimName="510" SimLocationX="1030" SimLocationY="1015" Datastore="store_510_x14_y31.yap" SimListenPort="9610" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_511.xml b/share/regions/config_511.xml
index e802fe9..f762c5a 100644
--- a/share/regions/config_511.xml
+++ b/share/regions/config_511.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ff" SimName="511" SimLocationX="1031" SimLocationY="1015" Datastore="store_511_x15_y31.yap" SimListenPort="9611" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf1ff" SimName="511" SimLocationX="1031" SimLocationY="1015" Datastore="store_511_x15_y31.yap" SimListenPort="9611" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-16.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_512.xml b/share/regions/config_512.xml
index 2c7f382..69df1f8 100644
--- a/share/regions/config_512.xml
+++ b/share/regions/config_512.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf200" SimName="512" SimLocationX="1000" SimLocationY="1016" Datastore="store_512_x00_y32.yap" SimListenPort="9612" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf200" SimName="512" SimLocationX="1000" SimLocationY="1016" Datastore="store_512_x00_y32.yap" SimListenPort="9612" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_513.xml b/share/regions/config_513.xml
index 3f8b78e..75969d7 100644
--- a/share/regions/config_513.xml
+++ b/share/regions/config_513.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf201" SimName="513" SimLocationX="1001" SimLocationY="1016" Datastore="store_513_x01_y32.yap" SimListenPort="9613" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf201" SimName="513" SimLocationX="1001" SimLocationY="1016" Datastore="store_513_x01_y32.yap" SimListenPort="9613" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_514.xml b/share/regions/config_514.xml
index ce0b6c3..297ac14 100644
--- a/share/regions/config_514.xml
+++ b/share/regions/config_514.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf202" SimName="514" SimLocationX="1002" SimLocationY="1016" Datastore="store_514_x02_y32.yap" SimListenPort="9614" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf202" SimName="514" SimLocationX="1002" SimLocationY="1016" Datastore="store_514_x02_y32.yap" SimListenPort="9614" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_515.xml b/share/regions/config_515.xml
index bbea25c..1bba58d 100644
--- a/share/regions/config_515.xml
+++ b/share/regions/config_515.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf203" SimName="515" SimLocationX="1003" SimLocationY="1016" Datastore="store_515_x03_y32.yap" SimListenPort="9615" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf203" SimName="515" SimLocationX="1003" SimLocationY="1016" Datastore="store_515_x03_y32.yap" SimListenPort="9615" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_516.xml b/share/regions/config_516.xml
index b71f9c9..12cd86e 100644
--- a/share/regions/config_516.xml
+++ b/share/regions/config_516.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf204" SimName="516" SimLocationX="1004" SimLocationY="1016" Datastore="store_516_x04_y32.yap" SimListenPort="9616" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf204" SimName="516" SimLocationX="1004" SimLocationY="1016" Datastore="store_516_x04_y32.yap" SimListenPort="9616" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_517.xml b/share/regions/config_517.xml
index 6c113bd..4d76b29 100644
--- a/share/regions/config_517.xml
+++ b/share/regions/config_517.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf205" SimName="517" SimLocationX="1005" SimLocationY="1016" Datastore="store_517_x05_y32.yap" SimListenPort="9617" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf205" SimName="517" SimLocationX="1005" SimLocationY="1016" Datastore="store_517_x05_y32.yap" SimListenPort="9617" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_518.xml b/share/regions/config_518.xml
index 0091020..b9cdf2b 100644
--- a/share/regions/config_518.xml
+++ b/share/regions/config_518.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf206" SimName="518" SimLocationX="1006" SimLocationY="1016" Datastore="store_518_x06_y32.yap" SimListenPort="9618" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf206" SimName="518" SimLocationX="1006" SimLocationY="1016" Datastore="store_518_x06_y32.yap" SimListenPort="9618" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_519.xml b/share/regions/config_519.xml
index deb4357..42266cf 100644
--- a/share/regions/config_519.xml
+++ b/share/regions/config_519.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf207" SimName="519" SimLocationX="1007" SimLocationY="1016" Datastore="store_519_x07_y32.yap" SimListenPort="9619" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf207" SimName="519" SimLocationX="1007" SimLocationY="1016" Datastore="store_519_x07_y32.yap" SimListenPort="9619" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_52.xml b/share/regions/config_52.xml
index 32b8f45..2a16e8e 100644
--- a/share/regions/config_52.xml
+++ b/share/regions/config_52.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf034" SimName="52" SimLocationX="1020" SimLocationY="1001" Datastore="store_52_x04_y03.yap" SimListenPort="9152" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf034" SimName="52" SimLocationX="1020" SimLocationY="1001" Datastore="store_52_x04_y03.yap" SimListenPort="9152" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_520.xml b/share/regions/config_520.xml
index a6bbdfc..7ccb4cf 100644
--- a/share/regions/config_520.xml
+++ b/share/regions/config_520.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf208" SimName="520" SimLocationX="1008" SimLocationY="1016" Datastore="store_520_x08_y32.yap" SimListenPort="9620" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf208" SimName="520" SimLocationX="1008" SimLocationY="1016" Datastore="store_520_x08_y32.yap" SimListenPort="9620" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_521.xml b/share/regions/config_521.xml
index 11bb267..29ced4c 100644
--- a/share/regions/config_521.xml
+++ b/share/regions/config_521.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf209" SimName="521" SimLocationX="1009" SimLocationY="1016" Datastore="store_521_x09_y32.yap" SimListenPort="9621" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf209" SimName="521" SimLocationX="1009" SimLocationY="1016" Datastore="store_521_x09_y32.yap" SimListenPort="9621" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_522.xml b/share/regions/config_522.xml
index 4bd3d4c..36d3319 100644
--- a/share/regions/config_522.xml
+++ b/share/regions/config_522.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20a" SimName="522" SimLocationX="1010" SimLocationY="1016" Datastore="store_522_x10_y32.yap" SimListenPort="9622" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20a" SimName="522" SimLocationX="1010" SimLocationY="1016" Datastore="store_522_x10_y32.yap" SimListenPort="9622" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_523.xml b/share/regions/config_523.xml
index 9b71352..acf94ef 100644
--- a/share/regions/config_523.xml
+++ b/share/regions/config_523.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20b" SimName="523" SimLocationX="1011" SimLocationY="1016" Datastore="store_523_x11_y32.yap" SimListenPort="9623" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20b" SimName="523" SimLocationX="1011" SimLocationY="1016" Datastore="store_523_x11_y32.yap" SimListenPort="9623" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_524.xml b/share/regions/config_524.xml
index bdac61a..ce3a448 100644
--- a/share/regions/config_524.xml
+++ b/share/regions/config_524.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20c" SimName="524" SimLocationX="1012" SimLocationY="1016" Datastore="store_524_x12_y32.yap" SimListenPort="9624" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20c" SimName="524" SimLocationX="1012" SimLocationY="1016" Datastore="store_524_x12_y32.yap" SimListenPort="9624" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_525.xml b/share/regions/config_525.xml
index 4bffa37..ae68fc1 100644
--- a/share/regions/config_525.xml
+++ b/share/regions/config_525.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20d" SimName="525" SimLocationX="1013" SimLocationY="1016" Datastore="store_525_x13_y32.yap" SimListenPort="9625" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20d" SimName="525" SimLocationX="1013" SimLocationY="1016" Datastore="store_525_x13_y32.yap" SimListenPort="9625" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_526.xml b/share/regions/config_526.xml
index a85625e..48f9c44 100644
--- a/share/regions/config_526.xml
+++ b/share/regions/config_526.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20e" SimName="526" SimLocationX="1014" SimLocationY="1016" Datastore="store_526_x14_y32.yap" SimListenPort="9626" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20e" SimName="526" SimLocationX="1014" SimLocationY="1016" Datastore="store_526_x14_y32.yap" SimListenPort="9626" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_527.xml b/share/regions/config_527.xml
index 0ca64ea..7f2507b 100644
--- a/share/regions/config_527.xml
+++ b/share/regions/config_527.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20f" SimName="527" SimLocationX="1015" SimLocationY="1016" Datastore="store_527_x15_y32.yap" SimListenPort="9627" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf20f" SimName="527" SimLocationX="1015" SimLocationY="1016" Datastore="store_527_x15_y32.yap" SimListenPort="9627" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-17.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_528.xml b/share/regions/config_528.xml
index 8bf8a53..a079789 100644
--- a/share/regions/config_528.xml
+++ b/share/regions/config_528.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf210" SimName="528" SimLocationX="1016" SimLocationY="1016" Datastore="store_528_x00_y33.yap" SimListenPort="9628" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf210" SimName="528" SimLocationX="1016" SimLocationY="1016" Datastore="store_528_x00_y33.yap" SimListenPort="9628" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_529.xml b/share/regions/config_529.xml
index d09b185..7430f14 100644
--- a/share/regions/config_529.xml
+++ b/share/regions/config_529.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf211" SimName="529" SimLocationX="1017" SimLocationY="1016" Datastore="store_529_x01_y33.yap" SimListenPort="9629" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf211" SimName="529" SimLocationX="1017" SimLocationY="1016" Datastore="store_529_x01_y33.yap" SimListenPort="9629" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_53.xml b/share/regions/config_53.xml
index 8ae55e1..e9b86a0 100644
--- a/share/regions/config_53.xml
+++ b/share/regions/config_53.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf035" SimName="53" SimLocationX="1021" SimLocationY="1001" Datastore="store_53_x05_y03.yap" SimListenPort="9153" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf035" SimName="53" SimLocationX="1021" SimLocationY="1001" Datastore="store_53_x05_y03.yap" SimListenPort="9153" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_530.xml b/share/regions/config_530.xml
index aed5fbc..fd86f49 100644
--- a/share/regions/config_530.xml
+++ b/share/regions/config_530.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf212" SimName="530" SimLocationX="1018" SimLocationY="1016" Datastore="store_530_x02_y33.yap" SimListenPort="9630" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf212" SimName="530" SimLocationX="1018" SimLocationY="1016" Datastore="store_530_x02_y33.yap" SimListenPort="9630" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_531.xml b/share/regions/config_531.xml
index 2ad352f..ad94509 100644
--- a/share/regions/config_531.xml
+++ b/share/regions/config_531.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf213" SimName="531" SimLocationX="1019" SimLocationY="1016" Datastore="store_531_x03_y33.yap" SimListenPort="9631" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf213" SimName="531" SimLocationX="1019" SimLocationY="1016" Datastore="store_531_x03_y33.yap" SimListenPort="9631" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_532.xml b/share/regions/config_532.xml
index 7650354..804ffb9 100644
--- a/share/regions/config_532.xml
+++ b/share/regions/config_532.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf214" SimName="532" SimLocationX="1020" SimLocationY="1016" Datastore="store_532_x04_y33.yap" SimListenPort="9632" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf214" SimName="532" SimLocationX="1020" SimLocationY="1016" Datastore="store_532_x04_y33.yap" SimListenPort="9632" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_533.xml b/share/regions/config_533.xml
index 2bcfe71..a71e7ee 100644
--- a/share/regions/config_533.xml
+++ b/share/regions/config_533.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf215" SimName="533" SimLocationX="1021" SimLocationY="1016" Datastore="store_533_x05_y33.yap" SimListenPort="9633" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf215" SimName="533" SimLocationX="1021" SimLocationY="1016" Datastore="store_533_x05_y33.yap" SimListenPort="9633" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_534.xml b/share/regions/config_534.xml
index 2484ebc..920ef82 100644
--- a/share/regions/config_534.xml
+++ b/share/regions/config_534.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf216" SimName="534" SimLocationX="1022" SimLocationY="1016" Datastore="store_534_x06_y33.yap" SimListenPort="9634" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf216" SimName="534" SimLocationX="1022" SimLocationY="1016" Datastore="store_534_x06_y33.yap" SimListenPort="9634" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_535.xml b/share/regions/config_535.xml
index c3310dd..8da7e54 100644
--- a/share/regions/config_535.xml
+++ b/share/regions/config_535.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf217" SimName="535" SimLocationX="1023" SimLocationY="1016" Datastore="store_535_x07_y33.yap" SimListenPort="9635" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf217" SimName="535" SimLocationX="1023" SimLocationY="1016" Datastore="store_535_x07_y33.yap" SimListenPort="9635" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_536.xml b/share/regions/config_536.xml
index a2733cf..2e4f3d0 100644
--- a/share/regions/config_536.xml
+++ b/share/regions/config_536.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf218" SimName="536" SimLocationX="1024" SimLocationY="1016" Datastore="store_536_x08_y33.yap" SimListenPort="9636" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf218" SimName="536" SimLocationX="1024" SimLocationY="1016" Datastore="store_536_x08_y33.yap" SimListenPort="9636" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_537.xml b/share/regions/config_537.xml
index fb04dc7..50264cf 100644
--- a/share/regions/config_537.xml
+++ b/share/regions/config_537.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf219" SimName="537" SimLocationX="1025" SimLocationY="1016" Datastore="store_537_x09_y33.yap" SimListenPort="9637" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf219" SimName="537" SimLocationX="1025" SimLocationY="1016" Datastore="store_537_x09_y33.yap" SimListenPort="9637" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_538.xml b/share/regions/config_538.xml
index 5c027f5..a986e25 100644
--- a/share/regions/config_538.xml
+++ b/share/regions/config_538.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21a" SimName="538" SimLocationX="1026" SimLocationY="1016" Datastore="store_538_x10_y33.yap" SimListenPort="9638" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21a" SimName="538" SimLocationX="1026" SimLocationY="1016" Datastore="store_538_x10_y33.yap" SimListenPort="9638" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_539.xml b/share/regions/config_539.xml
index 6f892e1..d863e75 100644
--- a/share/regions/config_539.xml
+++ b/share/regions/config_539.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21b" SimName="539" SimLocationX="1027" SimLocationY="1016" Datastore="store_539_x11_y33.yap" SimListenPort="9639" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21b" SimName="539" SimLocationX="1027" SimLocationY="1016" Datastore="store_539_x11_y33.yap" SimListenPort="9639" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_54.xml b/share/regions/config_54.xml
index 79e56bf..43c974f 100644
--- a/share/regions/config_54.xml
+++ b/share/regions/config_54.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf036" SimName="54" SimLocationX="1022" SimLocationY="1001" Datastore="store_54_x06_y03.yap" SimListenPort="9154" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf036" SimName="54" SimLocationX="1022" SimLocationY="1001" Datastore="store_54_x06_y03.yap" SimListenPort="9154" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_540.xml b/share/regions/config_540.xml
index f9a02ba..18441bf 100644
--- a/share/regions/config_540.xml
+++ b/share/regions/config_540.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21c" SimName="540" SimLocationX="1028" SimLocationY="1016" Datastore="store_540_x12_y33.yap" SimListenPort="9640" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21c" SimName="540" SimLocationX="1028" SimLocationY="1016" Datastore="store_540_x12_y33.yap" SimListenPort="9640" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_541.xml b/share/regions/config_541.xml
index 0f16ce2..474ad6d 100644
--- a/share/regions/config_541.xml
+++ b/share/regions/config_541.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21d" SimName="541" SimLocationX="1029" SimLocationY="1016" Datastore="store_541_x13_y33.yap" SimListenPort="9641" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21d" SimName="541" SimLocationX="1029" SimLocationY="1016" Datastore="store_541_x13_y33.yap" SimListenPort="9641" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_542.xml b/share/regions/config_542.xml
index 0d2800b..a1fd880 100644
--- a/share/regions/config_542.xml
+++ b/share/regions/config_542.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21e" SimName="542" SimLocationX="1030" SimLocationY="1016" Datastore="store_542_x14_y33.yap" SimListenPort="9642" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21e" SimName="542" SimLocationX="1030" SimLocationY="1016" Datastore="store_542_x14_y33.yap" SimListenPort="9642" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_543.xml b/share/regions/config_543.xml
index e523447..054a5ca 100644
--- a/share/regions/config_543.xml
+++ b/share/regions/config_543.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21f" SimName="543" SimLocationX="1031" SimLocationY="1016" Datastore="store_543_x15_y33.yap" SimListenPort="9643" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf21f" SimName="543" SimLocationX="1031" SimLocationY="1016" Datastore="store_543_x15_y33.yap" SimListenPort="9643" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-18.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_544.xml b/share/regions/config_544.xml
index e778d54..c42be1f 100644
--- a/share/regions/config_544.xml
+++ b/share/regions/config_544.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf220" SimName="544" SimLocationX="1000" SimLocationY="1017" Datastore="store_544_x00_y34.yap" SimListenPort="9644" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf220" SimName="544" SimLocationX="1000" SimLocationY="1017" Datastore="store_544_x00_y34.yap" SimListenPort="9644" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_545.xml b/share/regions/config_545.xml
index d3361b2..6af46da 100644
--- a/share/regions/config_545.xml
+++ b/share/regions/config_545.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf221" SimName="545" SimLocationX="1001" SimLocationY="1017" Datastore="store_545_x01_y34.yap" SimListenPort="9645" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf221" SimName="545" SimLocationX="1001" SimLocationY="1017" Datastore="store_545_x01_y34.yap" SimListenPort="9645" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_546.xml b/share/regions/config_546.xml
index 4421558..07e6827 100644
--- a/share/regions/config_546.xml
+++ b/share/regions/config_546.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf222" SimName="546" SimLocationX="1002" SimLocationY="1017" Datastore="store_546_x02_y34.yap" SimListenPort="9646" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf222" SimName="546" SimLocationX="1002" SimLocationY="1017" Datastore="store_546_x02_y34.yap" SimListenPort="9646" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_547.xml b/share/regions/config_547.xml
index 90ec378..6d9ed2c 100644
--- a/share/regions/config_547.xml
+++ b/share/regions/config_547.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf223" SimName="547" SimLocationX="1003" SimLocationY="1017" Datastore="store_547_x03_y34.yap" SimListenPort="9647" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf223" SimName="547" SimLocationX="1003" SimLocationY="1017" Datastore="store_547_x03_y34.yap" SimListenPort="9647" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_548.xml b/share/regions/config_548.xml
index c7c5ab9..57483b8 100644
--- a/share/regions/config_548.xml
+++ b/share/regions/config_548.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf224" SimName="548" SimLocationX="1004" SimLocationY="1017" Datastore="store_548_x04_y34.yap" SimListenPort="9648" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf224" SimName="548" SimLocationX="1004" SimLocationY="1017" Datastore="store_548_x04_y34.yap" SimListenPort="9648" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_549.xml b/share/regions/config_549.xml
index 23f426f..73d050a 100644
--- a/share/regions/config_549.xml
+++ b/share/regions/config_549.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf225" SimName="549" SimLocationX="1005" SimLocationY="1017" Datastore="store_549_x05_y34.yap" SimListenPort="9649" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf225" SimName="549" SimLocationX="1005" SimLocationY="1017" Datastore="store_549_x05_y34.yap" SimListenPort="9649" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_55.xml b/share/regions/config_55.xml
index 1c95a26..1cb5112 100644
--- a/share/regions/config_55.xml
+++ b/share/regions/config_55.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf037" SimName="55" SimLocationX="1023" SimLocationY="1001" Datastore="store_55_x07_y03.yap" SimListenPort="9155" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf037" SimName="55" SimLocationX="1023" SimLocationY="1001" Datastore="store_55_x07_y03.yap" SimListenPort="9155" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_550.xml b/share/regions/config_550.xml
index 9200dde..7688241 100644
--- a/share/regions/config_550.xml
+++ b/share/regions/config_550.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf226" SimName="550" SimLocationX="1006" SimLocationY="1017" Datastore="store_550_x06_y34.yap" SimListenPort="9650" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf226" SimName="550" SimLocationX="1006" SimLocationY="1017" Datastore="store_550_x06_y34.yap" SimListenPort="9650" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_551.xml b/share/regions/config_551.xml
index b0afa2e..7b8424f 100644
--- a/share/regions/config_551.xml
+++ b/share/regions/config_551.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf227" SimName="551" SimLocationX="1007" SimLocationY="1017" Datastore="store_551_x07_y34.yap" SimListenPort="9651" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf227" SimName="551" SimLocationX="1007" SimLocationY="1017" Datastore="store_551_x07_y34.yap" SimListenPort="9651" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_552.xml b/share/regions/config_552.xml
index a2ff8ce..e494abf 100644
--- a/share/regions/config_552.xml
+++ b/share/regions/config_552.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf228" SimName="552" SimLocationX="1008" SimLocationY="1017" Datastore="store_552_x08_y34.yap" SimListenPort="9652" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf228" SimName="552" SimLocationX="1008" SimLocationY="1017" Datastore="store_552_x08_y34.yap" SimListenPort="9652" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_553.xml b/share/regions/config_553.xml
index 504c70b..8a449c6 100644
--- a/share/regions/config_553.xml
+++ b/share/regions/config_553.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf229" SimName="553" SimLocationX="1009" SimLocationY="1017" Datastore="store_553_x09_y34.yap" SimListenPort="9653" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf229" SimName="553" SimLocationX="1009" SimLocationY="1017" Datastore="store_553_x09_y34.yap" SimListenPort="9653" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_554.xml b/share/regions/config_554.xml
index 0f07c23..db43132 100644
--- a/share/regions/config_554.xml
+++ b/share/regions/config_554.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22a" SimName="554" SimLocationX="1010" SimLocationY="1017" Datastore="store_554_x10_y34.yap" SimListenPort="9654" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22a" SimName="554" SimLocationX="1010" SimLocationY="1017" Datastore="store_554_x10_y34.yap" SimListenPort="9654" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_555.xml b/share/regions/config_555.xml
index 780a240..df9ebe8 100644
--- a/share/regions/config_555.xml
+++ b/share/regions/config_555.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22b" SimName="555" SimLocationX="1011" SimLocationY="1017" Datastore="store_555_x11_y34.yap" SimListenPort="9655" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22b" SimName="555" SimLocationX="1011" SimLocationY="1017" Datastore="store_555_x11_y34.yap" SimListenPort="9655" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_556.xml b/share/regions/config_556.xml
index cc01dff..dea8b89 100644
--- a/share/regions/config_556.xml
+++ b/share/regions/config_556.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22c" SimName="556" SimLocationX="1012" SimLocationY="1017" Datastore="store_556_x12_y34.yap" SimListenPort="9656" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22c" SimName="556" SimLocationX="1012" SimLocationY="1017" Datastore="store_556_x12_y34.yap" SimListenPort="9656" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_557.xml b/share/regions/config_557.xml
index af57ec2..f37c92f 100644
--- a/share/regions/config_557.xml
+++ b/share/regions/config_557.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22d" SimName="557" SimLocationX="1013" SimLocationY="1017" Datastore="store_557_x13_y34.yap" SimListenPort="9657" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22d" SimName="557" SimLocationX="1013" SimLocationY="1017" Datastore="store_557_x13_y34.yap" SimListenPort="9657" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_558.xml b/share/regions/config_558.xml
index f34c431..3cfe628 100644
--- a/share/regions/config_558.xml
+++ b/share/regions/config_558.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22e" SimName="558" SimLocationX="1014" SimLocationY="1017" Datastore="store_558_x14_y34.yap" SimListenPort="9658" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22e" SimName="558" SimLocationX="1014" SimLocationY="1017" Datastore="store_558_x14_y34.yap" SimListenPort="9658" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_559.xml b/share/regions/config_559.xml
index 11ba4a5..7f3a352 100644
--- a/share/regions/config_559.xml
+++ b/share/regions/config_559.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22f" SimName="559" SimLocationX="1015" SimLocationY="1017" Datastore="store_559_x15_y34.yap" SimListenPort="9659" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf22f" SimName="559" SimLocationX="1015" SimLocationY="1017" Datastore="store_559_x15_y34.yap" SimListenPort="9659" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-19.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_56.xml b/share/regions/config_56.xml
index 22d3547..9bcc6ad 100644
--- a/share/regions/config_56.xml
+++ b/share/regions/config_56.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf038" SimName="56" SimLocationX="1024" SimLocationY="1001" Datastore="store_56_x08_y03.yap" SimListenPort="9156" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf038" SimName="56" SimLocationX="1024" SimLocationY="1001" Datastore="store_56_x08_y03.yap" SimListenPort="9156" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_560.xml b/share/regions/config_560.xml
index 62d856b..59f91f2 100644
--- a/share/regions/config_560.xml
+++ b/share/regions/config_560.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf230" SimName="560" SimLocationX="1016" SimLocationY="1017" Datastore="store_560_x00_y35.yap" SimListenPort="9660" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf230" SimName="560" SimLocationX="1016" SimLocationY="1017" Datastore="store_560_x00_y35.yap" SimListenPort="9660" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_561.xml b/share/regions/config_561.xml
index 823f3aa..23de5ed 100644
--- a/share/regions/config_561.xml
+++ b/share/regions/config_561.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf231" SimName="561" SimLocationX="1017" SimLocationY="1017" Datastore="store_561_x01_y35.yap" SimListenPort="9661" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf231" SimName="561" SimLocationX="1017" SimLocationY="1017" Datastore="store_561_x01_y35.yap" SimListenPort="9661" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_562.xml b/share/regions/config_562.xml
index c364231..761959e 100644
--- a/share/regions/config_562.xml
+++ b/share/regions/config_562.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf232" SimName="562" SimLocationX="1018" SimLocationY="1017" Datastore="store_562_x02_y35.yap" SimListenPort="9662" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf232" SimName="562" SimLocationX="1018" SimLocationY="1017" Datastore="store_562_x02_y35.yap" SimListenPort="9662" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_563.xml b/share/regions/config_563.xml
index 26e60c7..e781c48 100644
--- a/share/regions/config_563.xml
+++ b/share/regions/config_563.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf233" SimName="563" SimLocationX="1019" SimLocationY="1017" Datastore="store_563_x03_y35.yap" SimListenPort="9663" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf233" SimName="563" SimLocationX="1019" SimLocationY="1017" Datastore="store_563_x03_y35.yap" SimListenPort="9663" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_564.xml b/share/regions/config_564.xml
index 98f671b..10a0cf1 100644
--- a/share/regions/config_564.xml
+++ b/share/regions/config_564.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf234" SimName="564" SimLocationX="1020" SimLocationY="1017" Datastore="store_564_x04_y35.yap" SimListenPort="9664" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf234" SimName="564" SimLocationX="1020" SimLocationY="1017" Datastore="store_564_x04_y35.yap" SimListenPort="9664" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_565.xml b/share/regions/config_565.xml
index 40877b1..359e6b6 100644
--- a/share/regions/config_565.xml
+++ b/share/regions/config_565.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf235" SimName="565" SimLocationX="1021" SimLocationY="1017" Datastore="store_565_x05_y35.yap" SimListenPort="9665" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf235" SimName="565" SimLocationX="1021" SimLocationY="1017" Datastore="store_565_x05_y35.yap" SimListenPort="9665" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_566.xml b/share/regions/config_566.xml
index efeaf26..6438809 100644
--- a/share/regions/config_566.xml
+++ b/share/regions/config_566.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf236" SimName="566" SimLocationX="1022" SimLocationY="1017" Datastore="store_566_x06_y35.yap" SimListenPort="9666" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf236" SimName="566" SimLocationX="1022" SimLocationY="1017" Datastore="store_566_x06_y35.yap" SimListenPort="9666" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_567.xml b/share/regions/config_567.xml
index 5937c5f..ff3ce46 100644
--- a/share/regions/config_567.xml
+++ b/share/regions/config_567.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf237" SimName="567" SimLocationX="1023" SimLocationY="1017" Datastore="store_567_x07_y35.yap" SimListenPort="9667" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf237" SimName="567" SimLocationX="1023" SimLocationY="1017" Datastore="store_567_x07_y35.yap" SimListenPort="9667" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_568.xml b/share/regions/config_568.xml
index 62a019e..c320ef8 100644
--- a/share/regions/config_568.xml
+++ b/share/regions/config_568.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf238" SimName="568" SimLocationX="1024" SimLocationY="1017" Datastore="store_568_x08_y35.yap" SimListenPort="9668" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf238" SimName="568" SimLocationX="1024" SimLocationY="1017" Datastore="store_568_x08_y35.yap" SimListenPort="9668" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_569.xml b/share/regions/config_569.xml
index e8e2d4c..f07ada0 100644
--- a/share/regions/config_569.xml
+++ b/share/regions/config_569.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf239" SimName="569" SimLocationX="1025" SimLocationY="1017" Datastore="store_569_x09_y35.yap" SimListenPort="9669" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf239" SimName="569" SimLocationX="1025" SimLocationY="1017" Datastore="store_569_x09_y35.yap" SimListenPort="9669" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_57.xml b/share/regions/config_57.xml
index 57366a8..9f59d6f 100644
--- a/share/regions/config_57.xml
+++ b/share/regions/config_57.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf039" SimName="57" SimLocationX="1025" SimLocationY="1001" Datastore="store_57_x09_y03.yap" SimListenPort="9157" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf039" SimName="57" SimLocationX="1025" SimLocationY="1001" Datastore="store_57_x09_y03.yap" SimListenPort="9157" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_570.xml b/share/regions/config_570.xml
index 4f71090..aab25b3 100644
--- a/share/regions/config_570.xml
+++ b/share/regions/config_570.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23a" SimName="570" SimLocationX="1026" SimLocationY="1017" Datastore="store_570_x10_y35.yap" SimListenPort="9670" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23a" SimName="570" SimLocationX="1026" SimLocationY="1017" Datastore="store_570_x10_y35.yap" SimListenPort="9670" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_571.xml b/share/regions/config_571.xml
index 4aee950..92fd9b2 100644
--- a/share/regions/config_571.xml
+++ b/share/regions/config_571.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23b" SimName="571" SimLocationX="1027" SimLocationY="1017" Datastore="store_571_x11_y35.yap" SimListenPort="9671" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23b" SimName="571" SimLocationX="1027" SimLocationY="1017" Datastore="store_571_x11_y35.yap" SimListenPort="9671" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_572.xml b/share/regions/config_572.xml
index fb784b8..0cdb0f0 100644
--- a/share/regions/config_572.xml
+++ b/share/regions/config_572.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23c" SimName="572" SimLocationX="1028" SimLocationY="1017" Datastore="store_572_x12_y35.yap" SimListenPort="9672" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23c" SimName="572" SimLocationX="1028" SimLocationY="1017" Datastore="store_572_x12_y35.yap" SimListenPort="9672" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_573.xml b/share/regions/config_573.xml
index ecfdb93..e96bfe3 100644
--- a/share/regions/config_573.xml
+++ b/share/regions/config_573.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23d" SimName="573" SimLocationX="1029" SimLocationY="1017" Datastore="store_573_x13_y35.yap" SimListenPort="9673" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23d" SimName="573" SimLocationX="1029" SimLocationY="1017" Datastore="store_573_x13_y35.yap" SimListenPort="9673" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_574.xml b/share/regions/config_574.xml
index 4ac455d..7490bf6 100644
--- a/share/regions/config_574.xml
+++ b/share/regions/config_574.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23e" SimName="574" SimLocationX="1030" SimLocationY="1017" Datastore="store_574_x14_y35.yap" SimListenPort="9674" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23e" SimName="574" SimLocationX="1030" SimLocationY="1017" Datastore="store_574_x14_y35.yap" SimListenPort="9674" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_575.xml b/share/regions/config_575.xml
index 2dce467..e0cd5e9 100644
--- a/share/regions/config_575.xml
+++ b/share/regions/config_575.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23f" SimName="575" SimLocationX="1031" SimLocationY="1017" Datastore="store_575_x15_y35.yap" SimListenPort="9675" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf23f" SimName="575" SimLocationX="1031" SimLocationY="1017" Datastore="store_575_x15_y35.yap" SimListenPort="9675" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-20.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_576.xml b/share/regions/config_576.xml
index f870dcd..bf41272 100644
--- a/share/regions/config_576.xml
+++ b/share/regions/config_576.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf240" SimName="576" SimLocationX="1000" SimLocationY="1018" Datastore="store_576_x00_y36.yap" SimListenPort="9676" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf240" SimName="576" SimLocationX="1000" SimLocationY="1018" Datastore="store_576_x00_y36.yap" SimListenPort="9676" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_577.xml b/share/regions/config_577.xml
index 349d03b..306c13f 100644
--- a/share/regions/config_577.xml
+++ b/share/regions/config_577.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf241" SimName="577" SimLocationX="1001" SimLocationY="1018" Datastore="store_577_x01_y36.yap" SimListenPort="9677" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf241" SimName="577" SimLocationX="1001" SimLocationY="1018" Datastore="store_577_x01_y36.yap" SimListenPort="9677" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_578.xml b/share/regions/config_578.xml
index eebe8bb..c9d1e72 100644
--- a/share/regions/config_578.xml
+++ b/share/regions/config_578.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf242" SimName="578" SimLocationX="1002" SimLocationY="1018" Datastore="store_578_x02_y36.yap" SimListenPort="9678" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf242" SimName="578" SimLocationX="1002" SimLocationY="1018" Datastore="store_578_x02_y36.yap" SimListenPort="9678" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_579.xml b/share/regions/config_579.xml
index 5970a14..fde5cd5 100644
--- a/share/regions/config_579.xml
+++ b/share/regions/config_579.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf243" SimName="579" SimLocationX="1003" SimLocationY="1018" Datastore="store_579_x03_y36.yap" SimListenPort="9679" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf243" SimName="579" SimLocationX="1003" SimLocationY="1018" Datastore="store_579_x03_y36.yap" SimListenPort="9679" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_58.xml b/share/regions/config_58.xml
index 2e8febd..29ddd19 100644
--- a/share/regions/config_58.xml
+++ b/share/regions/config_58.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03a" SimName="58" SimLocationX="1026" SimLocationY="1001" Datastore="store_58_x10_y03.yap" SimListenPort="9158" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03a" SimName="58" SimLocationX="1026" SimLocationY="1001" Datastore="store_58_x10_y03.yap" SimListenPort="9158" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_580.xml b/share/regions/config_580.xml
index ee93b09..bda6f54 100644
--- a/share/regions/config_580.xml
+++ b/share/regions/config_580.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf244" SimName="580" SimLocationX="1004" SimLocationY="1018" Datastore="store_580_x04_y36.yap" SimListenPort="9680" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf244" SimName="580" SimLocationX="1004" SimLocationY="1018" Datastore="store_580_x04_y36.yap" SimListenPort="9680" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_581.xml b/share/regions/config_581.xml
index 3d73d61..abf5a0b 100644
--- a/share/regions/config_581.xml
+++ b/share/regions/config_581.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf245" SimName="581" SimLocationX="1005" SimLocationY="1018" Datastore="store_581_x05_y36.yap" SimListenPort="9681" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf245" SimName="581" SimLocationX="1005" SimLocationY="1018" Datastore="store_581_x05_y36.yap" SimListenPort="9681" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_582.xml b/share/regions/config_582.xml
index 98f6b4f..01f9b82 100644
--- a/share/regions/config_582.xml
+++ b/share/regions/config_582.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf246" SimName="582" SimLocationX="1006" SimLocationY="1018" Datastore="store_582_x06_y36.yap" SimListenPort="9682" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf246" SimName="582" SimLocationX="1006" SimLocationY="1018" Datastore="store_582_x06_y36.yap" SimListenPort="9682" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_583.xml b/share/regions/config_583.xml
index e625c3e..d56e995 100644
--- a/share/regions/config_583.xml
+++ b/share/regions/config_583.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf247" SimName="583" SimLocationX="1007" SimLocationY="1018" Datastore="store_583_x07_y36.yap" SimListenPort="9683" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf247" SimName="583" SimLocationX="1007" SimLocationY="1018" Datastore="store_583_x07_y36.yap" SimListenPort="9683" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_584.xml b/share/regions/config_584.xml
index 5da7869..4a0a07b 100644
--- a/share/regions/config_584.xml
+++ b/share/regions/config_584.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf248" SimName="584" SimLocationX="1008" SimLocationY="1018" Datastore="store_584_x08_y36.yap" SimListenPort="9684" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf248" SimName="584" SimLocationX="1008" SimLocationY="1018" Datastore="store_584_x08_y36.yap" SimListenPort="9684" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_585.xml b/share/regions/config_585.xml
index 0d989a8..c6a0f3f 100644
--- a/share/regions/config_585.xml
+++ b/share/regions/config_585.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf249" SimName="585" SimLocationX="1009" SimLocationY="1018" Datastore="store_585_x09_y36.yap" SimListenPort="9685" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf249" SimName="585" SimLocationX="1009" SimLocationY="1018" Datastore="store_585_x09_y36.yap" SimListenPort="9685" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_586.xml b/share/regions/config_586.xml
index 17941ae..73b822c 100644
--- a/share/regions/config_586.xml
+++ b/share/regions/config_586.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24a" SimName="586" SimLocationX="1010" SimLocationY="1018" Datastore="store_586_x10_y36.yap" SimListenPort="9686" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24a" SimName="586" SimLocationX="1010" SimLocationY="1018" Datastore="store_586_x10_y36.yap" SimListenPort="9686" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_587.xml b/share/regions/config_587.xml
index dd191d1..ae6e3bb 100644
--- a/share/regions/config_587.xml
+++ b/share/regions/config_587.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24b" SimName="587" SimLocationX="1011" SimLocationY="1018" Datastore="store_587_x11_y36.yap" SimListenPort="9687" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24b" SimName="587" SimLocationX="1011" SimLocationY="1018" Datastore="store_587_x11_y36.yap" SimListenPort="9687" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_588.xml b/share/regions/config_588.xml
index c8e93b2..0525a6b 100644
--- a/share/regions/config_588.xml
+++ b/share/regions/config_588.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24c" SimName="588" SimLocationX="1012" SimLocationY="1018" Datastore="store_588_x12_y36.yap" SimListenPort="9688" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24c" SimName="588" SimLocationX="1012" SimLocationY="1018" Datastore="store_588_x12_y36.yap" SimListenPort="9688" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_589.xml b/share/regions/config_589.xml
index bb65f6c..1d14f85 100644
--- a/share/regions/config_589.xml
+++ b/share/regions/config_589.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24d" SimName="589" SimLocationX="1013" SimLocationY="1018" Datastore="store_589_x13_y36.yap" SimListenPort="9689" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24d" SimName="589" SimLocationX="1013" SimLocationY="1018" Datastore="store_589_x13_y36.yap" SimListenPort="9689" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_59.xml b/share/regions/config_59.xml
index 5c5b754..86a0f44 100644
--- a/share/regions/config_59.xml
+++ b/share/regions/config_59.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03b" SimName="59" SimLocationX="1027" SimLocationY="1001" Datastore="store_59_x11_y03.yap" SimListenPort="9159" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03b" SimName="59" SimLocationX="1027" SimLocationY="1001" Datastore="store_59_x11_y03.yap" SimListenPort="9159" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_590.xml b/share/regions/config_590.xml
index 82bf00d..322d812 100644
--- a/share/regions/config_590.xml
+++ b/share/regions/config_590.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24e" SimName="590" SimLocationX="1014" SimLocationY="1018" Datastore="store_590_x14_y36.yap" SimListenPort="9690" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24e" SimName="590" SimLocationX="1014" SimLocationY="1018" Datastore="store_590_x14_y36.yap" SimListenPort="9690" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_591.xml b/share/regions/config_591.xml
index 3fb37d4..8182a4b 100644
--- a/share/regions/config_591.xml
+++ b/share/regions/config_591.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24f" SimName="591" SimLocationX="1015" SimLocationY="1018" Datastore="store_591_x15_y36.yap" SimListenPort="9691" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf24f" SimName="591" SimLocationX="1015" SimLocationY="1018" Datastore="store_591_x15_y36.yap" SimListenPort="9691" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-21.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_592.xml b/share/regions/config_592.xml
index 0ffdab8..45cef91 100644
--- a/share/regions/config_592.xml
+++ b/share/regions/config_592.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf250" SimName="592" SimLocationX="1016" SimLocationY="1018" Datastore="store_592_x00_y37.yap" SimListenPort="9692" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf250" SimName="592" SimLocationX="1016" SimLocationY="1018" Datastore="store_592_x00_y37.yap" SimListenPort="9692" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_593.xml b/share/regions/config_593.xml
index 3e02f70..5b6e6c0 100644
--- a/share/regions/config_593.xml
+++ b/share/regions/config_593.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf251" SimName="593" SimLocationX="1017" SimLocationY="1018" Datastore="store_593_x01_y37.yap" SimListenPort="9693" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf251" SimName="593" SimLocationX="1017" SimLocationY="1018" Datastore="store_593_x01_y37.yap" SimListenPort="9693" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_594.xml b/share/regions/config_594.xml
index e75d997..d2b2e4d 100644
--- a/share/regions/config_594.xml
+++ b/share/regions/config_594.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf252" SimName="594" SimLocationX="1018" SimLocationY="1018" Datastore="store_594_x02_y37.yap" SimListenPort="9694" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf252" SimName="594" SimLocationX="1018" SimLocationY="1018" Datastore="store_594_x02_y37.yap" SimListenPort="9694" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_595.xml b/share/regions/config_595.xml
index 57a58da..9cd227d 100644
--- a/share/regions/config_595.xml
+++ b/share/regions/config_595.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf253" SimName="595" SimLocationX="1019" SimLocationY="1018" Datastore="store_595_x03_y37.yap" SimListenPort="9695" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf253" SimName="595" SimLocationX="1019" SimLocationY="1018" Datastore="store_595_x03_y37.yap" SimListenPort="9695" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_596.xml b/share/regions/config_596.xml
index 0a4f07f..6e0f7b3 100644
--- a/share/regions/config_596.xml
+++ b/share/regions/config_596.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf254" SimName="596" SimLocationX="1020" SimLocationY="1018" Datastore="store_596_x04_y37.yap" SimListenPort="9696" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf254" SimName="596" SimLocationX="1020" SimLocationY="1018" Datastore="store_596_x04_y37.yap" SimListenPort="9696" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_597.xml b/share/regions/config_597.xml
index 1d74ae4..782d0bb 100644
--- a/share/regions/config_597.xml
+++ b/share/regions/config_597.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf255" SimName="597" SimLocationX="1021" SimLocationY="1018" Datastore="store_597_x05_y37.yap" SimListenPort="9697" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf255" SimName="597" SimLocationX="1021" SimLocationY="1018" Datastore="store_597_x05_y37.yap" SimListenPort="9697" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_598.xml b/share/regions/config_598.xml
index 933d93d..ab4bc3e 100644
--- a/share/regions/config_598.xml
+++ b/share/regions/config_598.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf256" SimName="598" SimLocationX="1022" SimLocationY="1018" Datastore="store_598_x06_y37.yap" SimListenPort="9698" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf256" SimName="598" SimLocationX="1022" SimLocationY="1018" Datastore="store_598_x06_y37.yap" SimListenPort="9698" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_599.xml b/share/regions/config_599.xml
index 4ed64d0..42af836 100644
--- a/share/regions/config_599.xml
+++ b/share/regions/config_599.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf257" SimName="599" SimLocationX="1023" SimLocationY="1018" Datastore="store_599_x07_y37.yap" SimListenPort="9699" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf257" SimName="599" SimLocationX="1023" SimLocationY="1018" Datastore="store_599_x07_y37.yap" SimListenPort="9699" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_6.xml b/share/regions/config_6.xml
index e5a52ac..0935915 100644
--- a/share/regions/config_6.xml
+++ b/share/regions/config_6.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf006" SimName="6" SimLocationX="1006" SimLocationY="1000" Datastore="store_6_x06_y00.yap" SimListenPort="9106" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf006" SimName="6" SimLocationX="1006" SimLocationY="1000" Datastore="store_6_x06_y00.yap" SimListenPort="9106" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_60.xml b/share/regions/config_60.xml
index 8159d99..3f8fac1 100644
--- a/share/regions/config_60.xml
+++ b/share/regions/config_60.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03c" SimName="60" SimLocationX="1028" SimLocationY="1001" Datastore="store_60_x12_y03.yap" SimListenPort="9160" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03c" SimName="60" SimLocationX="1028" SimLocationY="1001" Datastore="store_60_x12_y03.yap" SimListenPort="9160" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_600.xml b/share/regions/config_600.xml
index 1fd886e..d794d92 100644
--- a/share/regions/config_600.xml
+++ b/share/regions/config_600.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf258" SimName="600" SimLocationX="1024" SimLocationY="1018" Datastore="store_600_x08_y37.yap" SimListenPort="9700" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf258" SimName="600" SimLocationX="1024" SimLocationY="1018" Datastore="store_600_x08_y37.yap" SimListenPort="9700" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_601.xml b/share/regions/config_601.xml
index e5ccd9d..b17cc43 100644
--- a/share/regions/config_601.xml
+++ b/share/regions/config_601.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf259" SimName="601" SimLocationX="1025" SimLocationY="1018" Datastore="store_601_x09_y37.yap" SimListenPort="9701" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf259" SimName="601" SimLocationX="1025" SimLocationY="1018" Datastore="store_601_x09_y37.yap" SimListenPort="9701" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_602.xml b/share/regions/config_602.xml
index 97ebf22..415b0d4 100644
--- a/share/regions/config_602.xml
+++ b/share/regions/config_602.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25a" SimName="602" SimLocationX="1026" SimLocationY="1018" Datastore="store_602_x10_y37.yap" SimListenPort="9702" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25a" SimName="602" SimLocationX="1026" SimLocationY="1018" Datastore="store_602_x10_y37.yap" SimListenPort="9702" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_603.xml b/share/regions/config_603.xml
index c4abec1..891e573 100644
--- a/share/regions/config_603.xml
+++ b/share/regions/config_603.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25b" SimName="603" SimLocationX="1027" SimLocationY="1018" Datastore="store_603_x11_y37.yap" SimListenPort="9703" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25b" SimName="603" SimLocationX="1027" SimLocationY="1018" Datastore="store_603_x11_y37.yap" SimListenPort="9703" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_604.xml b/share/regions/config_604.xml
index f8fb610..2683fb6 100644
--- a/share/regions/config_604.xml
+++ b/share/regions/config_604.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25c" SimName="604" SimLocationX="1028" SimLocationY="1018" Datastore="store_604_x12_y37.yap" SimListenPort="9704" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25c" SimName="604" SimLocationX="1028" SimLocationY="1018" Datastore="store_604_x12_y37.yap" SimListenPort="9704" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_605.xml b/share/regions/config_605.xml
index 9fe0d84..9670b21 100644
--- a/share/regions/config_605.xml
+++ b/share/regions/config_605.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25d" SimName="605" SimLocationX="1029" SimLocationY="1018" Datastore="store_605_x13_y37.yap" SimListenPort="9705" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25d" SimName="605" SimLocationX="1029" SimLocationY="1018" Datastore="store_605_x13_y37.yap" SimListenPort="9705" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_606.xml b/share/regions/config_606.xml
index 221310d..dd2bbf6 100644
--- a/share/regions/config_606.xml
+++ b/share/regions/config_606.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25e" SimName="606" SimLocationX="1030" SimLocationY="1018" Datastore="store_606_x14_y37.yap" SimListenPort="9706" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25e" SimName="606" SimLocationX="1030" SimLocationY="1018" Datastore="store_606_x14_y37.yap" SimListenPort="9706" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_607.xml b/share/regions/config_607.xml
index 77e16e4..33fc511 100644
--- a/share/regions/config_607.xml
+++ b/share/regions/config_607.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25f" SimName="607" SimLocationX="1031" SimLocationY="1018" Datastore="store_607_x15_y37.yap" SimListenPort="9707" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf25f" SimName="607" SimLocationX="1031" SimLocationY="1018" Datastore="store_607_x15_y37.yap" SimListenPort="9707" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-22.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_608.xml b/share/regions/config_608.xml
index 2e75ba6..f458481 100644
--- a/share/regions/config_608.xml
+++ b/share/regions/config_608.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf260" SimName="608" SimLocationX="1000" SimLocationY="1019" Datastore="store_608_x00_y38.yap" SimListenPort="9708" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf260" SimName="608" SimLocationX="1000" SimLocationY="1019" Datastore="store_608_x00_y38.yap" SimListenPort="9708" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_609.xml b/share/regions/config_609.xml
index 232d072..cc8786f 100644
--- a/share/regions/config_609.xml
+++ b/share/regions/config_609.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf261" SimName="609" SimLocationX="1001" SimLocationY="1019" Datastore="store_609_x01_y38.yap" SimListenPort="9709" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf261" SimName="609" SimLocationX="1001" SimLocationY="1019" Datastore="store_609_x01_y38.yap" SimListenPort="9709" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_61.xml b/share/regions/config_61.xml
index 55a8c64..836e82f 100644
--- a/share/regions/config_61.xml
+++ b/share/regions/config_61.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03d" SimName="61" SimLocationX="1029" SimLocationY="1001" Datastore="store_61_x13_y03.yap" SimListenPort="9161" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03d" SimName="61" SimLocationX="1029" SimLocationY="1001" Datastore="store_61_x13_y03.yap" SimListenPort="9161" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_610.xml b/share/regions/config_610.xml
index f0bc96b..6fc7d2c 100644
--- a/share/regions/config_610.xml
+++ b/share/regions/config_610.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf262" SimName="610" SimLocationX="1002" SimLocationY="1019" Datastore="store_610_x02_y38.yap" SimListenPort="9710" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf262" SimName="610" SimLocationX="1002" SimLocationY="1019" Datastore="store_610_x02_y38.yap" SimListenPort="9710" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_611.xml b/share/regions/config_611.xml
index e6340c4..af12489 100644
--- a/share/regions/config_611.xml
+++ b/share/regions/config_611.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf263" SimName="611" SimLocationX="1003" SimLocationY="1019" Datastore="store_611_x03_y38.yap" SimListenPort="9711" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf263" SimName="611" SimLocationX="1003" SimLocationY="1019" Datastore="store_611_x03_y38.yap" SimListenPort="9711" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_612.xml b/share/regions/config_612.xml
index f233f89..781dbbe 100644
--- a/share/regions/config_612.xml
+++ b/share/regions/config_612.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf264" SimName="612" SimLocationX="1004" SimLocationY="1019" Datastore="store_612_x04_y38.yap" SimListenPort="9712" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf264" SimName="612" SimLocationX="1004" SimLocationY="1019" Datastore="store_612_x04_y38.yap" SimListenPort="9712" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_613.xml b/share/regions/config_613.xml
index ec6ae40..e4a71d2 100644
--- a/share/regions/config_613.xml
+++ b/share/regions/config_613.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf265" SimName="613" SimLocationX="1005" SimLocationY="1019" Datastore="store_613_x05_y38.yap" SimListenPort="9713" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf265" SimName="613" SimLocationX="1005" SimLocationY="1019" Datastore="store_613_x05_y38.yap" SimListenPort="9713" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_614.xml b/share/regions/config_614.xml
index 4a6eb03..199120e 100644
--- a/share/regions/config_614.xml
+++ b/share/regions/config_614.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf266" SimName="614" SimLocationX="1006" SimLocationY="1019" Datastore="store_614_x06_y38.yap" SimListenPort="9714" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf266" SimName="614" SimLocationX="1006" SimLocationY="1019" Datastore="store_614_x06_y38.yap" SimListenPort="9714" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_615.xml b/share/regions/config_615.xml
index dc4c2f9..4330ffc 100644
--- a/share/regions/config_615.xml
+++ b/share/regions/config_615.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf267" SimName="615" SimLocationX="1007" SimLocationY="1019" Datastore="store_615_x07_y38.yap" SimListenPort="9715" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf267" SimName="615" SimLocationX="1007" SimLocationY="1019" Datastore="store_615_x07_y38.yap" SimListenPort="9715" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_616.xml b/share/regions/config_616.xml
index 34ce6d6..c6fb21d 100644
--- a/share/regions/config_616.xml
+++ b/share/regions/config_616.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf268" SimName="616" SimLocationX="1008" SimLocationY="1019" Datastore="store_616_x08_y38.yap" SimListenPort="9716" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf268" SimName="616" SimLocationX="1008" SimLocationY="1019" Datastore="store_616_x08_y38.yap" SimListenPort="9716" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_617.xml b/share/regions/config_617.xml
index b4903c2..b94fe70 100644
--- a/share/regions/config_617.xml
+++ b/share/regions/config_617.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf269" SimName="617" SimLocationX="1009" SimLocationY="1019" Datastore="store_617_x09_y38.yap" SimListenPort="9717" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf269" SimName="617" SimLocationX="1009" SimLocationY="1019" Datastore="store_617_x09_y38.yap" SimListenPort="9717" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_618.xml b/share/regions/config_618.xml
index 78b23b5..3033e40 100644
--- a/share/regions/config_618.xml
+++ b/share/regions/config_618.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26a" SimName="618" SimLocationX="1010" SimLocationY="1019" Datastore="store_618_x10_y38.yap" SimListenPort="9718" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26a" SimName="618" SimLocationX="1010" SimLocationY="1019" Datastore="store_618_x10_y38.yap" SimListenPort="9718" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_619.xml b/share/regions/config_619.xml
index 6b14d81..a733bf2 100644
--- a/share/regions/config_619.xml
+++ b/share/regions/config_619.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26b" SimName="619" SimLocationX="1011" SimLocationY="1019" Datastore="store_619_x11_y38.yap" SimListenPort="9719" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26b" SimName="619" SimLocationX="1011" SimLocationY="1019" Datastore="store_619_x11_y38.yap" SimListenPort="9719" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_62.xml b/share/regions/config_62.xml
index e35c51f..7d412e8 100644
--- a/share/regions/config_62.xml
+++ b/share/regions/config_62.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03e" SimName="62" SimLocationX="1030" SimLocationY="1001" Datastore="store_62_x14_y03.yap" SimListenPort="9162" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03e" SimName="62" SimLocationX="1030" SimLocationY="1001" Datastore="store_62_x14_y03.yap" SimListenPort="9162" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_620.xml b/share/regions/config_620.xml
index 660b624..0e5b609 100644
--- a/share/regions/config_620.xml
+++ b/share/regions/config_620.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26c" SimName="620" SimLocationX="1012" SimLocationY="1019" Datastore="store_620_x12_y38.yap" SimListenPort="9720" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26c" SimName="620" SimLocationX="1012" SimLocationY="1019" Datastore="store_620_x12_y38.yap" SimListenPort="9720" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_621.xml b/share/regions/config_621.xml
index d4d7767..4bf5084 100644
--- a/share/regions/config_621.xml
+++ b/share/regions/config_621.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26d" SimName="621" SimLocationX="1013" SimLocationY="1019" Datastore="store_621_x13_y38.yap" SimListenPort="9721" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26d" SimName="621" SimLocationX="1013" SimLocationY="1019" Datastore="store_621_x13_y38.yap" SimListenPort="9721" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_622.xml b/share/regions/config_622.xml
index ee45a34..959348c 100644
--- a/share/regions/config_622.xml
+++ b/share/regions/config_622.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26e" SimName="622" SimLocationX="1014" SimLocationY="1019" Datastore="store_622_x14_y38.yap" SimListenPort="9722" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26e" SimName="622" SimLocationX="1014" SimLocationY="1019" Datastore="store_622_x14_y38.yap" SimListenPort="9722" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_623.xml b/share/regions/config_623.xml
index 0919d49..d9b91ea 100644
--- a/share/regions/config_623.xml
+++ b/share/regions/config_623.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26f" SimName="623" SimLocationX="1015" SimLocationY="1019" Datastore="store_623_x15_y38.yap" SimListenPort="9723" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf26f" SimName="623" SimLocationX="1015" SimLocationY="1019" Datastore="store_623_x15_y38.yap" SimListenPort="9723" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-23.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_624.xml b/share/regions/config_624.xml
index 572a48f..df1bdac 100644
--- a/share/regions/config_624.xml
+++ b/share/regions/config_624.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf270" SimName="624" SimLocationX="1016" SimLocationY="1019" Datastore="store_624_x00_y39.yap" SimListenPort="9724" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf270" SimName="624" SimLocationX="1016" SimLocationY="1019" Datastore="store_624_x00_y39.yap" SimListenPort="9724" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_625.xml b/share/regions/config_625.xml
index 98bec19..396e641 100644
--- a/share/regions/config_625.xml
+++ b/share/regions/config_625.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf271" SimName="625" SimLocationX="1017" SimLocationY="1019" Datastore="store_625_x01_y39.yap" SimListenPort="9725" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf271" SimName="625" SimLocationX="1017" SimLocationY="1019" Datastore="store_625_x01_y39.yap" SimListenPort="9725" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_626.xml b/share/regions/config_626.xml
index a64fb56..049c5eb 100644
--- a/share/regions/config_626.xml
+++ b/share/regions/config_626.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf272" SimName="626" SimLocationX="1018" SimLocationY="1019" Datastore="store_626_x02_y39.yap" SimListenPort="9726" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf272" SimName="626" SimLocationX="1018" SimLocationY="1019" Datastore="store_626_x02_y39.yap" SimListenPort="9726" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_627.xml b/share/regions/config_627.xml
index a388684..a437b76 100644
--- a/share/regions/config_627.xml
+++ b/share/regions/config_627.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf273" SimName="627" SimLocationX="1019" SimLocationY="1019" Datastore="store_627_x03_y39.yap" SimListenPort="9727" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf273" SimName="627" SimLocationX="1019" SimLocationY="1019" Datastore="store_627_x03_y39.yap" SimListenPort="9727" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_628.xml b/share/regions/config_628.xml
index 786bf6e..f461b63 100644
--- a/share/regions/config_628.xml
+++ b/share/regions/config_628.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf274" SimName="628" SimLocationX="1020" SimLocationY="1019" Datastore="store_628_x04_y39.yap" SimListenPort="9728" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf274" SimName="628" SimLocationX="1020" SimLocationY="1019" Datastore="store_628_x04_y39.yap" SimListenPort="9728" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_629.xml b/share/regions/config_629.xml
index bc815b7..ee52269 100644
--- a/share/regions/config_629.xml
+++ b/share/regions/config_629.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf275" SimName="629" SimLocationX="1021" SimLocationY="1019" Datastore="store_629_x05_y39.yap" SimListenPort="9729" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf275" SimName="629" SimLocationX="1021" SimLocationY="1019" Datastore="store_629_x05_y39.yap" SimListenPort="9729" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_63.xml b/share/regions/config_63.xml
index bd9992b..4d4fa3e 100644
--- a/share/regions/config_63.xml
+++ b/share/regions/config_63.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03f" SimName="63" SimLocationX="1031" SimLocationY="1001" Datastore="store_63_x15_y03.yap" SimListenPort="9163" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf03f" SimName="63" SimLocationX="1031" SimLocationY="1001" Datastore="store_63_x15_y03.yap" SimListenPort="9163" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y12.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_630.xml b/share/regions/config_630.xml
index f654ce4..97d9bae 100644
--- a/share/regions/config_630.xml
+++ b/share/regions/config_630.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf276" SimName="630" SimLocationX="1022" SimLocationY="1019" Datastore="store_630_x06_y39.yap" SimListenPort="9730" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf276" SimName="630" SimLocationX="1022" SimLocationY="1019" Datastore="store_630_x06_y39.yap" SimListenPort="9730" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_631.xml b/share/regions/config_631.xml
index fbc2bf9..7d2dc85 100644
--- a/share/regions/config_631.xml
+++ b/share/regions/config_631.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf277" SimName="631" SimLocationX="1023" SimLocationY="1019" Datastore="store_631_x07_y39.yap" SimListenPort="9731" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf277" SimName="631" SimLocationX="1023" SimLocationY="1019" Datastore="store_631_x07_y39.yap" SimListenPort="9731" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_632.xml b/share/regions/config_632.xml
index 9530a63..b804674 100644
--- a/share/regions/config_632.xml
+++ b/share/regions/config_632.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf278" SimName="632" SimLocationX="1024" SimLocationY="1019" Datastore="store_632_x08_y39.yap" SimListenPort="9732" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf278" SimName="632" SimLocationX="1024" SimLocationY="1019" Datastore="store_632_x08_y39.yap" SimListenPort="9732" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_633.xml b/share/regions/config_633.xml
index 35babf2..c1ddfb7 100644
--- a/share/regions/config_633.xml
+++ b/share/regions/config_633.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf279" SimName="633" SimLocationX="1025" SimLocationY="1019" Datastore="store_633_x09_y39.yap" SimListenPort="9733" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf279" SimName="633" SimLocationX="1025" SimLocationY="1019" Datastore="store_633_x09_y39.yap" SimListenPort="9733" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_634.xml b/share/regions/config_634.xml
index ee3965d..bb7b2b9 100644
--- a/share/regions/config_634.xml
+++ b/share/regions/config_634.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27a" SimName="634" SimLocationX="1026" SimLocationY="1019" Datastore="store_634_x10_y39.yap" SimListenPort="9734" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27a" SimName="634" SimLocationX="1026" SimLocationY="1019" Datastore="store_634_x10_y39.yap" SimListenPort="9734" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_635.xml b/share/regions/config_635.xml
index 10e388f..b0f0418 100644
--- a/share/regions/config_635.xml
+++ b/share/regions/config_635.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27b" SimName="635" SimLocationX="1027" SimLocationY="1019" Datastore="store_635_x11_y39.yap" SimListenPort="9735" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27b" SimName="635" SimLocationX="1027" SimLocationY="1019" Datastore="store_635_x11_y39.yap" SimListenPort="9735" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_636.xml b/share/regions/config_636.xml
index b4a962c..b2574ca 100644
--- a/share/regions/config_636.xml
+++ b/share/regions/config_636.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27c" SimName="636" SimLocationX="1028" SimLocationY="1019" Datastore="store_636_x12_y39.yap" SimListenPort="9736" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27c" SimName="636" SimLocationX="1028" SimLocationY="1019" Datastore="store_636_x12_y39.yap" SimListenPort="9736" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_637.xml b/share/regions/config_637.xml
index 1d0ccfc..a49a384 100644
--- a/share/regions/config_637.xml
+++ b/share/regions/config_637.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27d" SimName="637" SimLocationX="1029" SimLocationY="1019" Datastore="store_637_x13_y39.yap" SimListenPort="9737" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27d" SimName="637" SimLocationX="1029" SimLocationY="1019" Datastore="store_637_x13_y39.yap" SimListenPort="9737" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_638.xml b/share/regions/config_638.xml
index a4ebf85..b0f38d1 100644
--- a/share/regions/config_638.xml
+++ b/share/regions/config_638.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27e" SimName="638" SimLocationX="1030" SimLocationY="1019" Datastore="store_638_x14_y39.yap" SimListenPort="9738" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27e" SimName="638" SimLocationX="1030" SimLocationY="1019" Datastore="store_638_x14_y39.yap" SimListenPort="9738" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_639.xml b/share/regions/config_639.xml
index 99d42e4..29626a2 100644
--- a/share/regions/config_639.xml
+++ b/share/regions/config_639.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27f" SimName="639" SimLocationX="1031" SimLocationY="1019" Datastore="store_639_x15_y39.yap" SimListenPort="9739" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf27f" SimName="639" SimLocationX="1031" SimLocationY="1019" Datastore="store_639_x15_y39.yap" SimListenPort="9739" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-24.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_64.xml b/share/regions/config_64.xml
index 669676c..ebaa49e 100644
--- a/share/regions/config_64.xml
+++ b/share/regions/config_64.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf040" SimName="64" SimLocationX="1000" SimLocationY="1002" Datastore="store_64_x00_y04.yap" SimListenPort="9164" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf040" SimName="64" SimLocationX="1000" SimLocationY="1002" Datastore="store_64_x00_y04.yap" SimListenPort="9164" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_640.xml b/share/regions/config_640.xml
index e32bc2e..99cbe5d 100644
--- a/share/regions/config_640.xml
+++ b/share/regions/config_640.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf280" SimName="640" SimLocationX="1000" SimLocationY="1020" Datastore="store_640_x00_y40.yap" SimListenPort="9740" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf280" SimName="640" SimLocationX="1000" SimLocationY="1020" Datastore="store_640_x00_y40.yap" SimListenPort="9740" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_641.xml b/share/regions/config_641.xml
index da68ff4..db9df9f 100644
--- a/share/regions/config_641.xml
+++ b/share/regions/config_641.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf281" SimName="641" SimLocationX="1001" SimLocationY="1020" Datastore="store_641_x01_y40.yap" SimListenPort="9741" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf281" SimName="641" SimLocationX="1001" SimLocationY="1020" Datastore="store_641_x01_y40.yap" SimListenPort="9741" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_642.xml b/share/regions/config_642.xml
index a90333f..12f8d76 100644
--- a/share/regions/config_642.xml
+++ b/share/regions/config_642.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf282" SimName="642" SimLocationX="1002" SimLocationY="1020" Datastore="store_642_x02_y40.yap" SimListenPort="9742" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf282" SimName="642" SimLocationX="1002" SimLocationY="1020" Datastore="store_642_x02_y40.yap" SimListenPort="9742" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_643.xml b/share/regions/config_643.xml
index 7912a3c..2a9e134 100644
--- a/share/regions/config_643.xml
+++ b/share/regions/config_643.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf283" SimName="643" SimLocationX="1003" SimLocationY="1020" Datastore="store_643_x03_y40.yap" SimListenPort="9743" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf283" SimName="643" SimLocationX="1003" SimLocationY="1020" Datastore="store_643_x03_y40.yap" SimListenPort="9743" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_644.xml b/share/regions/config_644.xml
index 89a302b..daccf07 100644
--- a/share/regions/config_644.xml
+++ b/share/regions/config_644.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf284" SimName="644" SimLocationX="1004" SimLocationY="1020" Datastore="store_644_x04_y40.yap" SimListenPort="9744" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf284" SimName="644" SimLocationX="1004" SimLocationY="1020" Datastore="store_644_x04_y40.yap" SimListenPort="9744" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_645.xml b/share/regions/config_645.xml
index f5fd1b6..0eabf06 100644
--- a/share/regions/config_645.xml
+++ b/share/regions/config_645.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf285" SimName="645" SimLocationX="1005" SimLocationY="1020" Datastore="store_645_x05_y40.yap" SimListenPort="9745" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf285" SimName="645" SimLocationX="1005" SimLocationY="1020" Datastore="store_645_x05_y40.yap" SimListenPort="9745" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_646.xml b/share/regions/config_646.xml
index 8cd3548..d033465 100644
--- a/share/regions/config_646.xml
+++ b/share/regions/config_646.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf286" SimName="646" SimLocationX="1006" SimLocationY="1020" Datastore="store_646_x06_y40.yap" SimListenPort="9746" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf286" SimName="646" SimLocationX="1006" SimLocationY="1020" Datastore="store_646_x06_y40.yap" SimListenPort="9746" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_647.xml b/share/regions/config_647.xml
index 8d82b10..3aa7d52 100644
--- a/share/regions/config_647.xml
+++ b/share/regions/config_647.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf287" SimName="647" SimLocationX="1007" SimLocationY="1020" Datastore="store_647_x07_y40.yap" SimListenPort="9747" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf287" SimName="647" SimLocationX="1007" SimLocationY="1020" Datastore="store_647_x07_y40.yap" SimListenPort="9747" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_648.xml b/share/regions/config_648.xml
index d02a8df..94b044f 100644
--- a/share/regions/config_648.xml
+++ b/share/regions/config_648.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf288" SimName="648" SimLocationX="1008" SimLocationY="1020" Datastore="store_648_x08_y40.yap" SimListenPort="9748" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf288" SimName="648" SimLocationX="1008" SimLocationY="1020" Datastore="store_648_x08_y40.yap" SimListenPort="9748" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_649.xml b/share/regions/config_649.xml
index 407e855..dc5b9e3 100644
--- a/share/regions/config_649.xml
+++ b/share/regions/config_649.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf289" SimName="649" SimLocationX="1009" SimLocationY="1020" Datastore="store_649_x09_y40.yap" SimListenPort="9749" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf289" SimName="649" SimLocationX="1009" SimLocationY="1020" Datastore="store_649_x09_y40.yap" SimListenPort="9749" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_65.xml b/share/regions/config_65.xml
index d502fda..b3253d8 100644
--- a/share/regions/config_65.xml
+++ b/share/regions/config_65.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf041" SimName="65" SimLocationX="1001" SimLocationY="1002" Datastore="store_65_x01_y04.yap" SimListenPort="9165" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf041" SimName="65" SimLocationX="1001" SimLocationY="1002" Datastore="store_65_x01_y04.yap" SimListenPort="9165" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_650.xml b/share/regions/config_650.xml
index ff9ecf2..a660dea 100644
--- a/share/regions/config_650.xml
+++ b/share/regions/config_650.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28a" SimName="650" SimLocationX="1010" SimLocationY="1020" Datastore="store_650_x10_y40.yap" SimListenPort="9750" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28a" SimName="650" SimLocationX="1010" SimLocationY="1020" Datastore="store_650_x10_y40.yap" SimListenPort="9750" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_651.xml b/share/regions/config_651.xml
index 07643d3..c706f58 100644
--- a/share/regions/config_651.xml
+++ b/share/regions/config_651.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28b" SimName="651" SimLocationX="1011" SimLocationY="1020" Datastore="store_651_x11_y40.yap" SimListenPort="9751" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28b" SimName="651" SimLocationX="1011" SimLocationY="1020" Datastore="store_651_x11_y40.yap" SimListenPort="9751" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_652.xml b/share/regions/config_652.xml
index f3bb531..162c0b8 100644
--- a/share/regions/config_652.xml
+++ b/share/regions/config_652.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28c" SimName="652" SimLocationX="1012" SimLocationY="1020" Datastore="store_652_x12_y40.yap" SimListenPort="9752" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28c" SimName="652" SimLocationX="1012" SimLocationY="1020" Datastore="store_652_x12_y40.yap" SimListenPort="9752" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_653.xml b/share/regions/config_653.xml
index 6e7c4b8..ec609de 100644
--- a/share/regions/config_653.xml
+++ b/share/regions/config_653.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28d" SimName="653" SimLocationX="1013" SimLocationY="1020" Datastore="store_653_x13_y40.yap" SimListenPort="9753" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28d" SimName="653" SimLocationX="1013" SimLocationY="1020" Datastore="store_653_x13_y40.yap" SimListenPort="9753" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_654.xml b/share/regions/config_654.xml
index 0346807..0d06d3b 100644
--- a/share/regions/config_654.xml
+++ b/share/regions/config_654.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28e" SimName="654" SimLocationX="1014" SimLocationY="1020" Datastore="store_654_x14_y40.yap" SimListenPort="9754" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28e" SimName="654" SimLocationX="1014" SimLocationY="1020" Datastore="store_654_x14_y40.yap" SimListenPort="9754" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_655.xml b/share/regions/config_655.xml
index 5113188..7822171 100644
--- a/share/regions/config_655.xml
+++ b/share/regions/config_655.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28f" SimName="655" SimLocationX="1015" SimLocationY="1020" Datastore="store_655_x15_y40.yap" SimListenPort="9755" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf28f" SimName="655" SimLocationX="1015" SimLocationY="1020" Datastore="store_655_x15_y40.yap" SimListenPort="9755" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-25.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_656.xml b/share/regions/config_656.xml
index f7d1ca4..64ec50e 100644
--- a/share/regions/config_656.xml
+++ b/share/regions/config_656.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf290" SimName="656" SimLocationX="1016" SimLocationY="1020" Datastore="store_656_x00_y41.yap" SimListenPort="9756" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf290" SimName="656" SimLocationX="1016" SimLocationY="1020" Datastore="store_656_x00_y41.yap" SimListenPort="9756" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_657.xml b/share/regions/config_657.xml
index 04cdf41..8f13e6b 100644
--- a/share/regions/config_657.xml
+++ b/share/regions/config_657.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf291" SimName="657" SimLocationX="1017" SimLocationY="1020" Datastore="store_657_x01_y41.yap" SimListenPort="9757" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf291" SimName="657" SimLocationX="1017" SimLocationY="1020" Datastore="store_657_x01_y41.yap" SimListenPort="9757" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_658.xml b/share/regions/config_658.xml
index 9682b36..970ee41 100644
--- a/share/regions/config_658.xml
+++ b/share/regions/config_658.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf292" SimName="658" SimLocationX="1018" SimLocationY="1020" Datastore="store_658_x02_y41.yap" SimListenPort="9758" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf292" SimName="658" SimLocationX="1018" SimLocationY="1020" Datastore="store_658_x02_y41.yap" SimListenPort="9758" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_659.xml b/share/regions/config_659.xml
index a5380c4..43ea515 100644
--- a/share/regions/config_659.xml
+++ b/share/regions/config_659.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf293" SimName="659" SimLocationX="1019" SimLocationY="1020" Datastore="store_659_x03_y41.yap" SimListenPort="9759" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf293" SimName="659" SimLocationX="1019" SimLocationY="1020" Datastore="store_659_x03_y41.yap" SimListenPort="9759" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_66.xml b/share/regions/config_66.xml
index 5cf1043..099f403 100644
--- a/share/regions/config_66.xml
+++ b/share/regions/config_66.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf042" SimName="66" SimLocationX="1002" SimLocationY="1002" Datastore="store_66_x02_y04.yap" SimListenPort="9166" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf042" SimName="66" SimLocationX="1002" SimLocationY="1002" Datastore="store_66_x02_y04.yap" SimListenPort="9166" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_660.xml b/share/regions/config_660.xml
index 7801bcb..58aea66 100644
--- a/share/regions/config_660.xml
+++ b/share/regions/config_660.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf294" SimName="660" SimLocationX="1020" SimLocationY="1020" Datastore="store_660_x04_y41.yap" SimListenPort="9760" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf294" SimName="660" SimLocationX="1020" SimLocationY="1020" Datastore="store_660_x04_y41.yap" SimListenPort="9760" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_661.xml b/share/regions/config_661.xml
index 3ff4ef9..76a0dee 100644
--- a/share/regions/config_661.xml
+++ b/share/regions/config_661.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf295" SimName="661" SimLocationX="1021" SimLocationY="1020" Datastore="store_661_x05_y41.yap" SimListenPort="9761" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf295" SimName="661" SimLocationX="1021" SimLocationY="1020" Datastore="store_661_x05_y41.yap" SimListenPort="9761" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_662.xml b/share/regions/config_662.xml
index 6b0ffb3..478ea9f 100644
--- a/share/regions/config_662.xml
+++ b/share/regions/config_662.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf296" SimName="662" SimLocationX="1022" SimLocationY="1020" Datastore="store_662_x06_y41.yap" SimListenPort="9762" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf296" SimName="662" SimLocationX="1022" SimLocationY="1020" Datastore="store_662_x06_y41.yap" SimListenPort="9762" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_663.xml b/share/regions/config_663.xml
index 2efec8d..55fbe0b 100644
--- a/share/regions/config_663.xml
+++ b/share/regions/config_663.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf297" SimName="663" SimLocationX="1023" SimLocationY="1020" Datastore="store_663_x07_y41.yap" SimListenPort="9763" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf297" SimName="663" SimLocationX="1023" SimLocationY="1020" Datastore="store_663_x07_y41.yap" SimListenPort="9763" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_664.xml b/share/regions/config_664.xml
index 1535dd4..430f2c6 100644
--- a/share/regions/config_664.xml
+++ b/share/regions/config_664.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf298" SimName="664" SimLocationX="1024" SimLocationY="1020" Datastore="store_664_x08_y41.yap" SimListenPort="9764" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf298" SimName="664" SimLocationX="1024" SimLocationY="1020" Datastore="store_664_x08_y41.yap" SimListenPort="9764" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_665.xml b/share/regions/config_665.xml
index 4a7c0e5..b53e47e 100644
--- a/share/regions/config_665.xml
+++ b/share/regions/config_665.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf299" SimName="665" SimLocationX="1025" SimLocationY="1020" Datastore="store_665_x09_y41.yap" SimListenPort="9765" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf299" SimName="665" SimLocationX="1025" SimLocationY="1020" Datastore="store_665_x09_y41.yap" SimListenPort="9765" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_666.xml b/share/regions/config_666.xml
index 3dd6225..e51a077 100644
--- a/share/regions/config_666.xml
+++ b/share/regions/config_666.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29a" SimName="666" SimLocationX="1026" SimLocationY="1020" Datastore="store_666_x10_y41.yap" SimListenPort="9766" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29a" SimName="666" SimLocationX="1026" SimLocationY="1020" Datastore="store_666_x10_y41.yap" SimListenPort="9766" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_667.xml b/share/regions/config_667.xml
index 0bd4d2f..589047d 100644
--- a/share/regions/config_667.xml
+++ b/share/regions/config_667.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29b" SimName="667" SimLocationX="1027" SimLocationY="1020" Datastore="store_667_x11_y41.yap" SimListenPort="9767" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29b" SimName="667" SimLocationX="1027" SimLocationY="1020" Datastore="store_667_x11_y41.yap" SimListenPort="9767" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_668.xml b/share/regions/config_668.xml
index 872ca80..02c6d89 100644
--- a/share/regions/config_668.xml
+++ b/share/regions/config_668.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29c" SimName="668" SimLocationX="1028" SimLocationY="1020" Datastore="store_668_x12_y41.yap" SimListenPort="9768" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29c" SimName="668" SimLocationX="1028" SimLocationY="1020" Datastore="store_668_x12_y41.yap" SimListenPort="9768" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_669.xml b/share/regions/config_669.xml
index 3b04eea..d54f60a 100644
--- a/share/regions/config_669.xml
+++ b/share/regions/config_669.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29d" SimName="669" SimLocationX="1029" SimLocationY="1020" Datastore="store_669_x13_y41.yap" SimListenPort="9769" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29d" SimName="669" SimLocationX="1029" SimLocationY="1020" Datastore="store_669_x13_y41.yap" SimListenPort="9769" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_67.xml b/share/regions/config_67.xml
index ce0b3be..5a35e06 100644
--- a/share/regions/config_67.xml
+++ b/share/regions/config_67.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf043" SimName="67" SimLocationX="1003" SimLocationY="1002" Datastore="store_67_x03_y04.yap" SimListenPort="9167" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf043" SimName="67" SimLocationX="1003" SimLocationY="1002" Datastore="store_67_x03_y04.yap" SimListenPort="9167" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_670.xml b/share/regions/config_670.xml
index ba31ce9..04f59cf 100644
--- a/share/regions/config_670.xml
+++ b/share/regions/config_670.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29e" SimName="670" SimLocationX="1030" SimLocationY="1020" Datastore="store_670_x14_y41.yap" SimListenPort="9770" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29e" SimName="670" SimLocationX="1030" SimLocationY="1020" Datastore="store_670_x14_y41.yap" SimListenPort="9770" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_671.xml b/share/regions/config_671.xml
index 99260f5..d50cf0c 100644
--- a/share/regions/config_671.xml
+++ b/share/regions/config_671.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29f" SimName="671" SimLocationX="1031" SimLocationY="1020" Datastore="store_671_x15_y41.yap" SimListenPort="9771" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf29f" SimName="671" SimLocationX="1031" SimLocationY="1020" Datastore="store_671_x15_y41.yap" SimListenPort="9771" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-26.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_672.xml b/share/regions/config_672.xml
index faa4e9f..28a7771 100644
--- a/share/regions/config_672.xml
+++ b/share/regions/config_672.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a0" SimName="672" SimLocationX="1000" SimLocationY="1021" Datastore="store_672_x00_y42.yap" SimListenPort="9772" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a0" SimName="672" SimLocationX="1000" SimLocationY="1021" Datastore="store_672_x00_y42.yap" SimListenPort="9772" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_673.xml b/share/regions/config_673.xml
index 304dee4..67e4a13 100644
--- a/share/regions/config_673.xml
+++ b/share/regions/config_673.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a1" SimName="673" SimLocationX="1001" SimLocationY="1021" Datastore="store_673_x01_y42.yap" SimListenPort="9773" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a1" SimName="673" SimLocationX="1001" SimLocationY="1021" Datastore="store_673_x01_y42.yap" SimListenPort="9773" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_674.xml b/share/regions/config_674.xml
index d7224ad..c8d4541 100644
--- a/share/regions/config_674.xml
+++ b/share/regions/config_674.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a2" SimName="674" SimLocationX="1002" SimLocationY="1021" Datastore="store_674_x02_y42.yap" SimListenPort="9774" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a2" SimName="674" SimLocationX="1002" SimLocationY="1021" Datastore="store_674_x02_y42.yap" SimListenPort="9774" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_675.xml b/share/regions/config_675.xml
index 713354f..9528ab7 100644
--- a/share/regions/config_675.xml
+++ b/share/regions/config_675.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a3" SimName="675" SimLocationX="1003" SimLocationY="1021" Datastore="store_675_x03_y42.yap" SimListenPort="9775" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a3" SimName="675" SimLocationX="1003" SimLocationY="1021" Datastore="store_675_x03_y42.yap" SimListenPort="9775" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_676.xml b/share/regions/config_676.xml
index 6e5eea0..b041b10 100644
--- a/share/regions/config_676.xml
+++ b/share/regions/config_676.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a4" SimName="676" SimLocationX="1004" SimLocationY="1021" Datastore="store_676_x04_y42.yap" SimListenPort="9776" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a4" SimName="676" SimLocationX="1004" SimLocationY="1021" Datastore="store_676_x04_y42.yap" SimListenPort="9776" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_677.xml b/share/regions/config_677.xml
index dc85b78..b369183 100644
--- a/share/regions/config_677.xml
+++ b/share/regions/config_677.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a5" SimName="677" SimLocationX="1005" SimLocationY="1021" Datastore="store_677_x05_y42.yap" SimListenPort="9777" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a5" SimName="677" SimLocationX="1005" SimLocationY="1021" Datastore="store_677_x05_y42.yap" SimListenPort="9777" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_678.xml b/share/regions/config_678.xml
index 238a63c..99b35d8 100644
--- a/share/regions/config_678.xml
+++ b/share/regions/config_678.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a6" SimName="678" SimLocationX="1006" SimLocationY="1021" Datastore="store_678_x06_y42.yap" SimListenPort="9778" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a6" SimName="678" SimLocationX="1006" SimLocationY="1021" Datastore="store_678_x06_y42.yap" SimListenPort="9778" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_679.xml b/share/regions/config_679.xml
index 8afb0de..35bb196 100644
--- a/share/regions/config_679.xml
+++ b/share/regions/config_679.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a7" SimName="679" SimLocationX="1007" SimLocationY="1021" Datastore="store_679_x07_y42.yap" SimListenPort="9779" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a7" SimName="679" SimLocationX="1007" SimLocationY="1021" Datastore="store_679_x07_y42.yap" SimListenPort="9779" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_68.xml b/share/regions/config_68.xml
index e3e4b40..3571f84 100644
--- a/share/regions/config_68.xml
+++ b/share/regions/config_68.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf044" SimName="68" SimLocationX="1004" SimLocationY="1002" Datastore="store_68_x04_y04.yap" SimListenPort="9168" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf044" SimName="68" SimLocationX="1004" SimLocationY="1002" Datastore="store_68_x04_y04.yap" SimListenPort="9168" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_680.xml b/share/regions/config_680.xml
index 3afcc52..c789d95 100644
--- a/share/regions/config_680.xml
+++ b/share/regions/config_680.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a8" SimName="680" SimLocationX="1008" SimLocationY="1021" Datastore="store_680_x08_y42.yap" SimListenPort="9780" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a8" SimName="680" SimLocationX="1008" SimLocationY="1021" Datastore="store_680_x08_y42.yap" SimListenPort="9780" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_681.xml b/share/regions/config_681.xml
index f5c6f7b..32c1dd1 100644
--- a/share/regions/config_681.xml
+++ b/share/regions/config_681.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a9" SimName="681" SimLocationX="1009" SimLocationY="1021" Datastore="store_681_x09_y42.yap" SimListenPort="9781" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2a9" SimName="681" SimLocationX="1009" SimLocationY="1021" Datastore="store_681_x09_y42.yap" SimListenPort="9781" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_682.xml b/share/regions/config_682.xml
index f88d81c..a4ba16a 100644
--- a/share/regions/config_682.xml
+++ b/share/regions/config_682.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2aa" SimName="682" SimLocationX="1010" SimLocationY="1021" Datastore="store_682_x10_y42.yap" SimListenPort="9782" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2aa" SimName="682" SimLocationX="1010" SimLocationY="1021" Datastore="store_682_x10_y42.yap" SimListenPort="9782" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_683.xml b/share/regions/config_683.xml
index 315e47c..91df192 100644
--- a/share/regions/config_683.xml
+++ b/share/regions/config_683.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ab" SimName="683" SimLocationX="1011" SimLocationY="1021" Datastore="store_683_x11_y42.yap" SimListenPort="9783" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ab" SimName="683" SimLocationX="1011" SimLocationY="1021" Datastore="store_683_x11_y42.yap" SimListenPort="9783" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_684.xml b/share/regions/config_684.xml
index cef1951..f03ea12 100644
--- a/share/regions/config_684.xml
+++ b/share/regions/config_684.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ac" SimName="684" SimLocationX="1012" SimLocationY="1021" Datastore="store_684_x12_y42.yap" SimListenPort="9784" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ac" SimName="684" SimLocationX="1012" SimLocationY="1021" Datastore="store_684_x12_y42.yap" SimListenPort="9784" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_685.xml b/share/regions/config_685.xml
index fce8917..17b778f 100644
--- a/share/regions/config_685.xml
+++ b/share/regions/config_685.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ad" SimName="685" SimLocationX="1013" SimLocationY="1021" Datastore="store_685_x13_y42.yap" SimListenPort="9785" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ad" SimName="685" SimLocationX="1013" SimLocationY="1021" Datastore="store_685_x13_y42.yap" SimListenPort="9785" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_686.xml b/share/regions/config_686.xml
index 20c19dc..84c5144 100644
--- a/share/regions/config_686.xml
+++ b/share/regions/config_686.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ae" SimName="686" SimLocationX="1014" SimLocationY="1021" Datastore="store_686_x14_y42.yap" SimListenPort="9786" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ae" SimName="686" SimLocationX="1014" SimLocationY="1021" Datastore="store_686_x14_y42.yap" SimListenPort="9786" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_687.xml b/share/regions/config_687.xml
index 8604eaf..729d27b 100644
--- a/share/regions/config_687.xml
+++ b/share/regions/config_687.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2af" SimName="687" SimLocationX="1015" SimLocationY="1021" Datastore="store_687_x15_y42.yap" SimListenPort="9787" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2af" SimName="687" SimLocationX="1015" SimLocationY="1021" Datastore="store_687_x15_y42.yap" SimListenPort="9787" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-27.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_688.xml b/share/regions/config_688.xml
index 12033c9..c5386eb 100644
--- a/share/regions/config_688.xml
+++ b/share/regions/config_688.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b0" SimName="688" SimLocationX="1016" SimLocationY="1021" Datastore="store_688_x00_y43.yap" SimListenPort="9788" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b0" SimName="688" SimLocationX="1016" SimLocationY="1021" Datastore="store_688_x00_y43.yap" SimListenPort="9788" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_689.xml b/share/regions/config_689.xml
index bda5afb..4f3e3ba 100644
--- a/share/regions/config_689.xml
+++ b/share/regions/config_689.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b1" SimName="689" SimLocationX="1017" SimLocationY="1021" Datastore="store_689_x01_y43.yap" SimListenPort="9789" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b1" SimName="689" SimLocationX="1017" SimLocationY="1021" Datastore="store_689_x01_y43.yap" SimListenPort="9789" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_69.xml b/share/regions/config_69.xml
index 55e75ab..a315c51 100644
--- a/share/regions/config_69.xml
+++ b/share/regions/config_69.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf045" SimName="69" SimLocationX="1005" SimLocationY="1002" Datastore="store_69_x05_y04.yap" SimListenPort="9169" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf045" SimName="69" SimLocationX="1005" SimLocationY="1002" Datastore="store_69_x05_y04.yap" SimListenPort="9169" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_690.xml b/share/regions/config_690.xml
index fd1ed38..4a95a57 100644
--- a/share/regions/config_690.xml
+++ b/share/regions/config_690.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b2" SimName="690" SimLocationX="1018" SimLocationY="1021" Datastore="store_690_x02_y43.yap" SimListenPort="9790" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b2" SimName="690" SimLocationX="1018" SimLocationY="1021" Datastore="store_690_x02_y43.yap" SimListenPort="9790" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_691.xml b/share/regions/config_691.xml
index 8c6f56e..3518543 100644
--- a/share/regions/config_691.xml
+++ b/share/regions/config_691.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b3" SimName="691" SimLocationX="1019" SimLocationY="1021" Datastore="store_691_x03_y43.yap" SimListenPort="9791" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b3" SimName="691" SimLocationX="1019" SimLocationY="1021" Datastore="store_691_x03_y43.yap" SimListenPort="9791" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_692.xml b/share/regions/config_692.xml
index 2b6133b..6105f6f 100644
--- a/share/regions/config_692.xml
+++ b/share/regions/config_692.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b4" SimName="692" SimLocationX="1020" SimLocationY="1021" Datastore="store_692_x04_y43.yap" SimListenPort="9792" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b4" SimName="692" SimLocationX="1020" SimLocationY="1021" Datastore="store_692_x04_y43.yap" SimListenPort="9792" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_693.xml b/share/regions/config_693.xml
index 1fa28f4..c70779a 100644
--- a/share/regions/config_693.xml
+++ b/share/regions/config_693.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b5" SimName="693" SimLocationX="1021" SimLocationY="1021" Datastore="store_693_x05_y43.yap" SimListenPort="9793" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b5" SimName="693" SimLocationX="1021" SimLocationY="1021" Datastore="store_693_x05_y43.yap" SimListenPort="9793" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_694.xml b/share/regions/config_694.xml
index 7ea9a56..1077d63 100644
--- a/share/regions/config_694.xml
+++ b/share/regions/config_694.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b6" SimName="694" SimLocationX="1022" SimLocationY="1021" Datastore="store_694_x06_y43.yap" SimListenPort="9794" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b6" SimName="694" SimLocationX="1022" SimLocationY="1021" Datastore="store_694_x06_y43.yap" SimListenPort="9794" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_695.xml b/share/regions/config_695.xml
index 6e57b7a..ac5e995 100644
--- a/share/regions/config_695.xml
+++ b/share/regions/config_695.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b7" SimName="695" SimLocationX="1023" SimLocationY="1021" Datastore="store_695_x07_y43.yap" SimListenPort="9795" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b7" SimName="695" SimLocationX="1023" SimLocationY="1021" Datastore="store_695_x07_y43.yap" SimListenPort="9795" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_696.xml b/share/regions/config_696.xml
index 5311547..603572f 100644
--- a/share/regions/config_696.xml
+++ b/share/regions/config_696.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b8" SimName="696" SimLocationX="1024" SimLocationY="1021" Datastore="store_696_x08_y43.yap" SimListenPort="9796" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b8" SimName="696" SimLocationX="1024" SimLocationY="1021" Datastore="store_696_x08_y43.yap" SimListenPort="9796" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_697.xml b/share/regions/config_697.xml
index a549fac..877e776 100644
--- a/share/regions/config_697.xml
+++ b/share/regions/config_697.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b9" SimName="697" SimLocationX="1025" SimLocationY="1021" Datastore="store_697_x09_y43.yap" SimListenPort="9797" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2b9" SimName="697" SimLocationX="1025" SimLocationY="1021" Datastore="store_697_x09_y43.yap" SimListenPort="9797" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_698.xml b/share/regions/config_698.xml
index 07aa253..9e16cd4 100644
--- a/share/regions/config_698.xml
+++ b/share/regions/config_698.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ba" SimName="698" SimLocationX="1026" SimLocationY="1021" Datastore="store_698_x10_y43.yap" SimListenPort="9798" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ba" SimName="698" SimLocationX="1026" SimLocationY="1021" Datastore="store_698_x10_y43.yap" SimListenPort="9798" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_699.xml b/share/regions/config_699.xml
index e85dc5c..147f873 100644
--- a/share/regions/config_699.xml
+++ b/share/regions/config_699.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bb" SimName="699" SimLocationX="1027" SimLocationY="1021" Datastore="store_699_x11_y43.yap" SimListenPort="9799" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bb" SimName="699" SimLocationX="1027" SimLocationY="1021" Datastore="store_699_x11_y43.yap" SimListenPort="9799" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_7.xml b/share/regions/config_7.xml
index fb8b2a4..5d3e956 100644
--- a/share/regions/config_7.xml
+++ b/share/regions/config_7.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf007" SimName="7" SimLocationX="1007" SimLocationY="1000" Datastore="store_7_x07_y00.yap" SimListenPort="9107" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf007" SimName="7" SimLocationX="1007" SimLocationY="1000" Datastore="store_7_x07_y00.yap" SimListenPort="9107" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_70.xml b/share/regions/config_70.xml
index bce1dc1..7c88550 100644
--- a/share/regions/config_70.xml
+++ b/share/regions/config_70.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf046" SimName="70" SimLocationX="1006" SimLocationY="1002" Datastore="store_70_x06_y04.yap" SimListenPort="9170" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf046" SimName="70" SimLocationX="1006" SimLocationY="1002" Datastore="store_70_x06_y04.yap" SimListenPort="9170" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_700.xml b/share/regions/config_700.xml
index d315e2f..58a8517 100644
--- a/share/regions/config_700.xml
+++ b/share/regions/config_700.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bc" SimName="700" SimLocationX="1028" SimLocationY="1021" Datastore="store_700_x12_y43.yap" SimListenPort="9800" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bc" SimName="700" SimLocationX="1028" SimLocationY="1021" Datastore="store_700_x12_y43.yap" SimListenPort="9800" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_701.xml b/share/regions/config_701.xml
index 2c2ee68..b5b85b5 100644
--- a/share/regions/config_701.xml
+++ b/share/regions/config_701.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bd" SimName="701" SimLocationX="1029" SimLocationY="1021" Datastore="store_701_x13_y43.yap" SimListenPort="9801" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bd" SimName="701" SimLocationX="1029" SimLocationY="1021" Datastore="store_701_x13_y43.yap" SimListenPort="9801" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_702.xml b/share/regions/config_702.xml
index b2f6b63..4c62767 100644
--- a/share/regions/config_702.xml
+++ b/share/regions/config_702.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2be" SimName="702" SimLocationX="1030" SimLocationY="1021" Datastore="store_702_x14_y43.yap" SimListenPort="9802" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2be" SimName="702" SimLocationX="1030" SimLocationY="1021" Datastore="store_702_x14_y43.yap" SimListenPort="9802" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_703.xml b/share/regions/config_703.xml
index 3ad5f15..2eedef8 100644
--- a/share/regions/config_703.xml
+++ b/share/regions/config_703.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bf" SimName="703" SimLocationX="1031" SimLocationY="1021" Datastore="store_703_x15_y43.yap" SimListenPort="9803" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2bf" SimName="703" SimLocationX="1031" SimLocationY="1021" Datastore="store_703_x15_y43.yap" SimListenPort="9803" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-28.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_704.xml b/share/regions/config_704.xml
index 94dc04e..ed7ee1f 100644
--- a/share/regions/config_704.xml
+++ b/share/regions/config_704.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c0" SimName="704" SimLocationX="1000" SimLocationY="1022" Datastore="store_704_x00_y44.yap" SimListenPort="9804" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c0" SimName="704" SimLocationX="1000" SimLocationY="1022" Datastore="store_704_x00_y44.yap" SimListenPort="9804" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_705.xml b/share/regions/config_705.xml
index 00b9909..91e0574 100644
--- a/share/regions/config_705.xml
+++ b/share/regions/config_705.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c1" SimName="705" SimLocationX="1001" SimLocationY="1022" Datastore="store_705_x01_y44.yap" SimListenPort="9805" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c1" SimName="705" SimLocationX="1001" SimLocationY="1022" Datastore="store_705_x01_y44.yap" SimListenPort="9805" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_706.xml b/share/regions/config_706.xml
index 729934d..6a44ddd 100644
--- a/share/regions/config_706.xml
+++ b/share/regions/config_706.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c2" SimName="706" SimLocationX="1002" SimLocationY="1022" Datastore="store_706_x02_y44.yap" SimListenPort="9806" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c2" SimName="706" SimLocationX="1002" SimLocationY="1022" Datastore="store_706_x02_y44.yap" SimListenPort="9806" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_707.xml b/share/regions/config_707.xml
index c65288a..ac2efae 100644
--- a/share/regions/config_707.xml
+++ b/share/regions/config_707.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c3" SimName="707" SimLocationX="1003" SimLocationY="1022" Datastore="store_707_x03_y44.yap" SimListenPort="9807" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c3" SimName="707" SimLocationX="1003" SimLocationY="1022" Datastore="store_707_x03_y44.yap" SimListenPort="9807" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_708.xml b/share/regions/config_708.xml
index bcdbd8a..1a3f8a5 100644
--- a/share/regions/config_708.xml
+++ b/share/regions/config_708.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c4" SimName="708" SimLocationX="1004" SimLocationY="1022" Datastore="store_708_x04_y44.yap" SimListenPort="9808" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c4" SimName="708" SimLocationX="1004" SimLocationY="1022" Datastore="store_708_x04_y44.yap" SimListenPort="9808" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_709.xml b/share/regions/config_709.xml
index e385e33..02ec62a 100644
--- a/share/regions/config_709.xml
+++ b/share/regions/config_709.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c5" SimName="709" SimLocationX="1005" SimLocationY="1022" Datastore="store_709_x05_y44.yap" SimListenPort="9809" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c5" SimName="709" SimLocationX="1005" SimLocationY="1022" Datastore="store_709_x05_y44.yap" SimListenPort="9809" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_71.xml b/share/regions/config_71.xml
index dc746dc..92bd55d 100644
--- a/share/regions/config_71.xml
+++ b/share/regions/config_71.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf047" SimName="71" SimLocationX="1007" SimLocationY="1002" Datastore="store_71_x07_y04.yap" SimListenPort="9171" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf047" SimName="71" SimLocationX="1007" SimLocationY="1002" Datastore="store_71_x07_y04.yap" SimListenPort="9171" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_710.xml b/share/regions/config_710.xml
index 25c91de..41e8688 100644
--- a/share/regions/config_710.xml
+++ b/share/regions/config_710.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c6" SimName="710" SimLocationX="1006" SimLocationY="1022" Datastore="store_710_x06_y44.yap" SimListenPort="9810" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c6" SimName="710" SimLocationX="1006" SimLocationY="1022" Datastore="store_710_x06_y44.yap" SimListenPort="9810" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_711.xml b/share/regions/config_711.xml
index 3cfc51d..46aab34 100644
--- a/share/regions/config_711.xml
+++ b/share/regions/config_711.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c7" SimName="711" SimLocationX="1007" SimLocationY="1022" Datastore="store_711_x07_y44.yap" SimListenPort="9811" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c7" SimName="711" SimLocationX="1007" SimLocationY="1022" Datastore="store_711_x07_y44.yap" SimListenPort="9811" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_712.xml b/share/regions/config_712.xml
index 7ef6107..41edc6a 100644
--- a/share/regions/config_712.xml
+++ b/share/regions/config_712.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c8" SimName="712" SimLocationX="1008" SimLocationY="1022" Datastore="store_712_x08_y44.yap" SimListenPort="9812" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c8" SimName="712" SimLocationX="1008" SimLocationY="1022" Datastore="store_712_x08_y44.yap" SimListenPort="9812" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_713.xml b/share/regions/config_713.xml
index 5a81394..50f92fc 100644
--- a/share/regions/config_713.xml
+++ b/share/regions/config_713.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c9" SimName="713" SimLocationX="1009" SimLocationY="1022" Datastore="store_713_x09_y44.yap" SimListenPort="9813" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2c9" SimName="713" SimLocationX="1009" SimLocationY="1022" Datastore="store_713_x09_y44.yap" SimListenPort="9813" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_714.xml b/share/regions/config_714.xml
index d4738a7..6c1bbbf 100644
--- a/share/regions/config_714.xml
+++ b/share/regions/config_714.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ca" SimName="714" SimLocationX="1010" SimLocationY="1022" Datastore="store_714_x10_y44.yap" SimListenPort="9814" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ca" SimName="714" SimLocationX="1010" SimLocationY="1022" Datastore="store_714_x10_y44.yap" SimListenPort="9814" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_715.xml b/share/regions/config_715.xml
index d86bf2b..d9dbd00 100644
--- a/share/regions/config_715.xml
+++ b/share/regions/config_715.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cb" SimName="715" SimLocationX="1011" SimLocationY="1022" Datastore="store_715_x11_y44.yap" SimListenPort="9815" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cb" SimName="715" SimLocationX="1011" SimLocationY="1022" Datastore="store_715_x11_y44.yap" SimListenPort="9815" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_716.xml b/share/regions/config_716.xml
index e57720d..b3e1f4e 100644
--- a/share/regions/config_716.xml
+++ b/share/regions/config_716.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cc" SimName="716" SimLocationX="1012" SimLocationY="1022" Datastore="store_716_x12_y44.yap" SimListenPort="9816" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cc" SimName="716" SimLocationX="1012" SimLocationY="1022" Datastore="store_716_x12_y44.yap" SimListenPort="9816" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_717.xml b/share/regions/config_717.xml
index c2ad944..9fff63f 100644
--- a/share/regions/config_717.xml
+++ b/share/regions/config_717.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cd" SimName="717" SimLocationX="1013" SimLocationY="1022" Datastore="store_717_x13_y44.yap" SimListenPort="9817" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cd" SimName="717" SimLocationX="1013" SimLocationY="1022" Datastore="store_717_x13_y44.yap" SimListenPort="9817" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_718.xml b/share/regions/config_718.xml
index 33211bc..0621953 100644
--- a/share/regions/config_718.xml
+++ b/share/regions/config_718.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ce" SimName="718" SimLocationX="1014" SimLocationY="1022" Datastore="store_718_x14_y44.yap" SimListenPort="9818" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ce" SimName="718" SimLocationX="1014" SimLocationY="1022" Datastore="store_718_x14_y44.yap" SimListenPort="9818" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_719.xml b/share/regions/config_719.xml
index a3a32d2..bdb4bb1 100644
--- a/share/regions/config_719.xml
+++ b/share/regions/config_719.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cf" SimName="719" SimLocationX="1015" SimLocationY="1022" Datastore="store_719_x15_y44.yap" SimListenPort="9819" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2cf" SimName="719" SimLocationX="1015" SimLocationY="1022" Datastore="store_719_x15_y44.yap" SimListenPort="9819" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-29.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_72.xml b/share/regions/config_72.xml
index 132db9a..670a991 100644
--- a/share/regions/config_72.xml
+++ b/share/regions/config_72.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf048" SimName="72" SimLocationX="1008" SimLocationY="1002" Datastore="store_72_x08_y04.yap" SimListenPort="9172" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf048" SimName="72" SimLocationX="1008" SimLocationY="1002" Datastore="store_72_x08_y04.yap" SimListenPort="9172" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_720.xml b/share/regions/config_720.xml
index 898cd57..58cc6b5 100644
--- a/share/regions/config_720.xml
+++ b/share/regions/config_720.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d0" SimName="720" SimLocationX="1016" SimLocationY="1022" Datastore="store_720_x00_y45.yap" SimListenPort="9820" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d0" SimName="720" SimLocationX="1016" SimLocationY="1022" Datastore="store_720_x00_y45.yap" SimListenPort="9820" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_721.xml b/share/regions/config_721.xml
index 30ec038..9b23418 100644
--- a/share/regions/config_721.xml
+++ b/share/regions/config_721.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d1" SimName="721" SimLocationX="1017" SimLocationY="1022" Datastore="store_721_x01_y45.yap" SimListenPort="9821" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d1" SimName="721" SimLocationX="1017" SimLocationY="1022" Datastore="store_721_x01_y45.yap" SimListenPort="9821" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_722.xml b/share/regions/config_722.xml
index 56f5e4a..b5c4b17 100644
--- a/share/regions/config_722.xml
+++ b/share/regions/config_722.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d2" SimName="722" SimLocationX="1018" SimLocationY="1022" Datastore="store_722_x02_y45.yap" SimListenPort="9822" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d2" SimName="722" SimLocationX="1018" SimLocationY="1022" Datastore="store_722_x02_y45.yap" SimListenPort="9822" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_723.xml b/share/regions/config_723.xml
index ce8fbf9..794f25f 100644
--- a/share/regions/config_723.xml
+++ b/share/regions/config_723.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d3" SimName="723" SimLocationX="1019" SimLocationY="1022" Datastore="store_723_x03_y45.yap" SimListenPort="9823" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d3" SimName="723" SimLocationX="1019" SimLocationY="1022" Datastore="store_723_x03_y45.yap" SimListenPort="9823" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_724.xml b/share/regions/config_724.xml
index 0a72dbc..4293992 100644
--- a/share/regions/config_724.xml
+++ b/share/regions/config_724.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d4" SimName="724" SimLocationX="1020" SimLocationY="1022" Datastore="store_724_x04_y45.yap" SimListenPort="9824" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d4" SimName="724" SimLocationX="1020" SimLocationY="1022" Datastore="store_724_x04_y45.yap" SimListenPort="9824" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_725.xml b/share/regions/config_725.xml
index 8608f8b..fab801e 100644
--- a/share/regions/config_725.xml
+++ b/share/regions/config_725.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d5" SimName="725" SimLocationX="1021" SimLocationY="1022" Datastore="store_725_x05_y45.yap" SimListenPort="9825" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d5" SimName="725" SimLocationX="1021" SimLocationY="1022" Datastore="store_725_x05_y45.yap" SimListenPort="9825" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_726.xml b/share/regions/config_726.xml
index 5766227..1257d34 100644
--- a/share/regions/config_726.xml
+++ b/share/regions/config_726.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d6" SimName="726" SimLocationX="1022" SimLocationY="1022" Datastore="store_726_x06_y45.yap" SimListenPort="9826" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d6" SimName="726" SimLocationX="1022" SimLocationY="1022" Datastore="store_726_x06_y45.yap" SimListenPort="9826" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_727.xml b/share/regions/config_727.xml
index 6553367..8e7d839 100644
--- a/share/regions/config_727.xml
+++ b/share/regions/config_727.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d7" SimName="727" SimLocationX="1023" SimLocationY="1022" Datastore="store_727_x07_y45.yap" SimListenPort="9827" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d7" SimName="727" SimLocationX="1023" SimLocationY="1022" Datastore="store_727_x07_y45.yap" SimListenPort="9827" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_728.xml b/share/regions/config_728.xml
index 867cdd1..550d5ad 100644
--- a/share/regions/config_728.xml
+++ b/share/regions/config_728.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d8" SimName="728" SimLocationX="1024" SimLocationY="1022" Datastore="store_728_x08_y45.yap" SimListenPort="9828" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d8" SimName="728" SimLocationX="1024" SimLocationY="1022" Datastore="store_728_x08_y45.yap" SimListenPort="9828" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_729.xml b/share/regions/config_729.xml
index 4c3f3bf..1e0947c 100644
--- a/share/regions/config_729.xml
+++ b/share/regions/config_729.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d9" SimName="729" SimLocationX="1025" SimLocationY="1022" Datastore="store_729_x09_y45.yap" SimListenPort="9829" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2d9" SimName="729" SimLocationX="1025" SimLocationY="1022" Datastore="store_729_x09_y45.yap" SimListenPort="9829" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_73.xml b/share/regions/config_73.xml
index a9dff11..5b0016a 100644
--- a/share/regions/config_73.xml
+++ b/share/regions/config_73.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf049" SimName="73" SimLocationX="1009" SimLocationY="1002" Datastore="store_73_x09_y04.yap" SimListenPort="9173" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf049" SimName="73" SimLocationX="1009" SimLocationY="1002" Datastore="store_73_x09_y04.yap" SimListenPort="9173" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_730.xml b/share/regions/config_730.xml
index 95567f3..9320b43 100644
--- a/share/regions/config_730.xml
+++ b/share/regions/config_730.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2da" SimName="730" SimLocationX="1026" SimLocationY="1022" Datastore="store_730_x10_y45.yap" SimListenPort="9830" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2da" SimName="730" SimLocationX="1026" SimLocationY="1022" Datastore="store_730_x10_y45.yap" SimListenPort="9830" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_731.xml b/share/regions/config_731.xml
index b1eac25..b3ab47f 100644
--- a/share/regions/config_731.xml
+++ b/share/regions/config_731.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2db" SimName="731" SimLocationX="1027" SimLocationY="1022" Datastore="store_731_x11_y45.yap" SimListenPort="9831" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2db" SimName="731" SimLocationX="1027" SimLocationY="1022" Datastore="store_731_x11_y45.yap" SimListenPort="9831" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_732.xml b/share/regions/config_732.xml
index df6ab85..f401837 100644
--- a/share/regions/config_732.xml
+++ b/share/regions/config_732.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2dc" SimName="732" SimLocationX="1028" SimLocationY="1022" Datastore="store_732_x12_y45.yap" SimListenPort="9832" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2dc" SimName="732" SimLocationX="1028" SimLocationY="1022" Datastore="store_732_x12_y45.yap" SimListenPort="9832" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_733.xml b/share/regions/config_733.xml
index cba3b47..8abed5d 100644
--- a/share/regions/config_733.xml
+++ b/share/regions/config_733.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2dd" SimName="733" SimLocationX="1029" SimLocationY="1022" Datastore="store_733_x13_y45.yap" SimListenPort="9833" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2dd" SimName="733" SimLocationX="1029" SimLocationY="1022" Datastore="store_733_x13_y45.yap" SimListenPort="9833" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_734.xml b/share/regions/config_734.xml
index 21cad95..cd07047 100644
--- a/share/regions/config_734.xml
+++ b/share/regions/config_734.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2de" SimName="734" SimLocationX="1030" SimLocationY="1022" Datastore="store_734_x14_y45.yap" SimListenPort="9834" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2de" SimName="734" SimLocationX="1030" SimLocationY="1022" Datastore="store_734_x14_y45.yap" SimListenPort="9834" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_735.xml b/share/regions/config_735.xml
index 78386fe..d726332 100644
--- a/share/regions/config_735.xml
+++ b/share/regions/config_735.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2df" SimName="735" SimLocationX="1031" SimLocationY="1022" Datastore="store_735_x15_y45.yap" SimListenPort="9835" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2df" SimName="735" SimLocationX="1031" SimLocationY="1022" Datastore="store_735_x15_y45.yap" SimListenPort="9835" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-30.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_736.xml b/share/regions/config_736.xml
index 2001880..b45c044 100644
--- a/share/regions/config_736.xml
+++ b/share/regions/config_736.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e0" SimName="736" SimLocationX="1000" SimLocationY="1023" Datastore="store_736_x00_y46.yap" SimListenPort="9836" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e0" SimName="736" SimLocationX="1000" SimLocationY="1023" Datastore="store_736_x00_y46.yap" SimListenPort="9836" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_737.xml b/share/regions/config_737.xml
index 8e73b25..9e49ee4 100644
--- a/share/regions/config_737.xml
+++ b/share/regions/config_737.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e1" SimName="737" SimLocationX="1001" SimLocationY="1023" Datastore="store_737_x01_y46.yap" SimListenPort="9837" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e1" SimName="737" SimLocationX="1001" SimLocationY="1023" Datastore="store_737_x01_y46.yap" SimListenPort="9837" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_738.xml b/share/regions/config_738.xml
index c27bea7..e84d780 100644
--- a/share/regions/config_738.xml
+++ b/share/regions/config_738.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e2" SimName="738" SimLocationX="1002" SimLocationY="1023" Datastore="store_738_x02_y46.yap" SimListenPort="9838" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e2" SimName="738" SimLocationX="1002" SimLocationY="1023" Datastore="store_738_x02_y46.yap" SimListenPort="9838" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_739.xml b/share/regions/config_739.xml
index 2a59512..c77e7b5 100644
--- a/share/regions/config_739.xml
+++ b/share/regions/config_739.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e3" SimName="739" SimLocationX="1003" SimLocationY="1023" Datastore="store_739_x03_y46.yap" SimListenPort="9839" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e3" SimName="739" SimLocationX="1003" SimLocationY="1023" Datastore="store_739_x03_y46.yap" SimListenPort="9839" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_74.xml b/share/regions/config_74.xml
index d1955d5..839234c 100644
--- a/share/regions/config_74.xml
+++ b/share/regions/config_74.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04a" SimName="74" SimLocationX="1010" SimLocationY="1002" Datastore="store_74_x10_y04.yap" SimListenPort="9174" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04a" SimName="74" SimLocationX="1010" SimLocationY="1002" Datastore="store_74_x10_y04.yap" SimListenPort="9174" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_740.xml b/share/regions/config_740.xml
index 21948b2..bbede36 100644
--- a/share/regions/config_740.xml
+++ b/share/regions/config_740.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e4" SimName="740" SimLocationX="1004" SimLocationY="1023" Datastore="store_740_x04_y46.yap" SimListenPort="9840" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e4" SimName="740" SimLocationX="1004" SimLocationY="1023" Datastore="store_740_x04_y46.yap" SimListenPort="9840" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_741.xml b/share/regions/config_741.xml
index f3c5719..fbe1593 100644
--- a/share/regions/config_741.xml
+++ b/share/regions/config_741.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e5" SimName="741" SimLocationX="1005" SimLocationY="1023" Datastore="store_741_x05_y46.yap" SimListenPort="9841" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e5" SimName="741" SimLocationX="1005" SimLocationY="1023" Datastore="store_741_x05_y46.yap" SimListenPort="9841" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_742.xml b/share/regions/config_742.xml
index d545076..7d45aef 100644
--- a/share/regions/config_742.xml
+++ b/share/regions/config_742.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e6" SimName="742" SimLocationX="1006" SimLocationY="1023" Datastore="store_742_x06_y46.yap" SimListenPort="9842" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e6" SimName="742" SimLocationX="1006" SimLocationY="1023" Datastore="store_742_x06_y46.yap" SimListenPort="9842" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_743.xml b/share/regions/config_743.xml
index 6bc85e7..551a122 100644
--- a/share/regions/config_743.xml
+++ b/share/regions/config_743.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e7" SimName="743" SimLocationX="1007" SimLocationY="1023" Datastore="store_743_x07_y46.yap" SimListenPort="9843" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e7" SimName="743" SimLocationX="1007" SimLocationY="1023" Datastore="store_743_x07_y46.yap" SimListenPort="9843" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_744.xml b/share/regions/config_744.xml
index c6b0084..94760fc 100644
--- a/share/regions/config_744.xml
+++ b/share/regions/config_744.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e8" SimName="744" SimLocationX="1008" SimLocationY="1023" Datastore="store_744_x08_y46.yap" SimListenPort="9844" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e8" SimName="744" SimLocationX="1008" SimLocationY="1023" Datastore="store_744_x08_y46.yap" SimListenPort="9844" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_745.xml b/share/regions/config_745.xml
index 726cbe4..d153d8b 100644
--- a/share/regions/config_745.xml
+++ b/share/regions/config_745.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e9" SimName="745" SimLocationX="1009" SimLocationY="1023" Datastore="store_745_x09_y46.yap" SimListenPort="9845" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2e9" SimName="745" SimLocationX="1009" SimLocationY="1023" Datastore="store_745_x09_y46.yap" SimListenPort="9845" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_746.xml b/share/regions/config_746.xml
index 8352089..cb7f1ab 100644
--- a/share/regions/config_746.xml
+++ b/share/regions/config_746.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ea" SimName="746" SimLocationX="1010" SimLocationY="1023" Datastore="store_746_x10_y46.yap" SimListenPort="9846" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ea" SimName="746" SimLocationX="1010" SimLocationY="1023" Datastore="store_746_x10_y46.yap" SimListenPort="9846" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_747.xml b/share/regions/config_747.xml
index 6b3f7bb..84d69bb 100644
--- a/share/regions/config_747.xml
+++ b/share/regions/config_747.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2eb" SimName="747" SimLocationX="1011" SimLocationY="1023" Datastore="store_747_x11_y46.yap" SimListenPort="9847" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2eb" SimName="747" SimLocationX="1011" SimLocationY="1023" Datastore="store_747_x11_y46.yap" SimListenPort="9847" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_748.xml b/share/regions/config_748.xml
index df21b05..f7b80dc 100644
--- a/share/regions/config_748.xml
+++ b/share/regions/config_748.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ec" SimName="748" SimLocationX="1012" SimLocationY="1023" Datastore="store_748_x12_y46.yap" SimListenPort="9848" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ec" SimName="748" SimLocationX="1012" SimLocationY="1023" Datastore="store_748_x12_y46.yap" SimListenPort="9848" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_749.xml b/share/regions/config_749.xml
index ef66c7b..ce0e034 100644
--- a/share/regions/config_749.xml
+++ b/share/regions/config_749.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ed" SimName="749" SimLocationX="1013" SimLocationY="1023" Datastore="store_749_x13_y46.yap" SimListenPort="9849" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ed" SimName="749" SimLocationX="1013" SimLocationY="1023" Datastore="store_749_x13_y46.yap" SimListenPort="9849" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_75.xml b/share/regions/config_75.xml
index 6849f9e..b63fbd8 100644
--- a/share/regions/config_75.xml
+++ b/share/regions/config_75.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04b" SimName="75" SimLocationX="1011" SimLocationY="1002" Datastore="store_75_x11_y04.yap" SimListenPort="9175" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04b" SimName="75" SimLocationX="1011" SimLocationY="1002" Datastore="store_75_x11_y04.yap" SimListenPort="9175" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_750.xml b/share/regions/config_750.xml
index d86e2af..28091aa 100644
--- a/share/regions/config_750.xml
+++ b/share/regions/config_750.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ee" SimName="750" SimLocationX="1014" SimLocationY="1023" Datastore="store_750_x14_y46.yap" SimListenPort="9850" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ee" SimName="750" SimLocationX="1014" SimLocationY="1023" Datastore="store_750_x14_y46.yap" SimListenPort="9850" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_751.xml b/share/regions/config_751.xml
index 84d4b55..5fb1e46 100644
--- a/share/regions/config_751.xml
+++ b/share/regions/config_751.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ef" SimName="751" SimLocationX="1015" SimLocationY="1023" Datastore="store_751_x15_y46.yap" SimListenPort="9851" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ef" SimName="751" SimLocationX="1015" SimLocationY="1023" Datastore="store_751_x15_y46.yap" SimListenPort="9851" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-31.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_752.xml b/share/regions/config_752.xml
index 4c29c01..67e1d3f 100644
--- a/share/regions/config_752.xml
+++ b/share/regions/config_752.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f0" SimName="752" SimLocationX="1016" SimLocationY="1023" Datastore="store_752_x00_y47.yap" SimListenPort="9852" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f0" SimName="752" SimLocationX="1016" SimLocationY="1023" Datastore="store_752_x00_y47.yap" SimListenPort="9852" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_753.xml b/share/regions/config_753.xml
index 4967672..5609b23 100644
--- a/share/regions/config_753.xml
+++ b/share/regions/config_753.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f1" SimName="753" SimLocationX="1017" SimLocationY="1023" Datastore="store_753_x01_y47.yap" SimListenPort="9853" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f1" SimName="753" SimLocationX="1017" SimLocationY="1023" Datastore="store_753_x01_y47.yap" SimListenPort="9853" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_754.xml b/share/regions/config_754.xml
index 9963821..e1daf8a 100644
--- a/share/regions/config_754.xml
+++ b/share/regions/config_754.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f2" SimName="754" SimLocationX="1018" SimLocationY="1023" Datastore="store_754_x02_y47.yap" SimListenPort="9854" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f2" SimName="754" SimLocationX="1018" SimLocationY="1023" Datastore="store_754_x02_y47.yap" SimListenPort="9854" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_755.xml b/share/regions/config_755.xml
index f4dc0a0..a0fde07 100644
--- a/share/regions/config_755.xml
+++ b/share/regions/config_755.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f3" SimName="755" SimLocationX="1019" SimLocationY="1023" Datastore="store_755_x03_y47.yap" SimListenPort="9855" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f3" SimName="755" SimLocationX="1019" SimLocationY="1023" Datastore="store_755_x03_y47.yap" SimListenPort="9855" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_756.xml b/share/regions/config_756.xml
index 027d8fd..a024591 100644
--- a/share/regions/config_756.xml
+++ b/share/regions/config_756.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f4" SimName="756" SimLocationX="1020" SimLocationY="1023" Datastore="store_756_x04_y47.yap" SimListenPort="9856" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f4" SimName="756" SimLocationX="1020" SimLocationY="1023" Datastore="store_756_x04_y47.yap" SimListenPort="9856" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_757.xml b/share/regions/config_757.xml
index 053ad3f..3f8a54f 100644
--- a/share/regions/config_757.xml
+++ b/share/regions/config_757.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f5" SimName="757" SimLocationX="1021" SimLocationY="1023" Datastore="store_757_x05_y47.yap" SimListenPort="9857" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f5" SimName="757" SimLocationX="1021" SimLocationY="1023" Datastore="store_757_x05_y47.yap" SimListenPort="9857" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_758.xml b/share/regions/config_758.xml
index 2a9f270..5e132da 100644
--- a/share/regions/config_758.xml
+++ b/share/regions/config_758.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f6" SimName="758" SimLocationX="1022" SimLocationY="1023" Datastore="store_758_x06_y47.yap" SimListenPort="9858" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f6" SimName="758" SimLocationX="1022" SimLocationY="1023" Datastore="store_758_x06_y47.yap" SimListenPort="9858" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_759.xml b/share/regions/config_759.xml
index fb00e58..ac438bb 100644
--- a/share/regions/config_759.xml
+++ b/share/regions/config_759.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f7" SimName="759" SimLocationX="1023" SimLocationY="1023" Datastore="store_759_x07_y47.yap" SimListenPort="9859" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f7" SimName="759" SimLocationX="1023" SimLocationY="1023" Datastore="store_759_x07_y47.yap" SimListenPort="9859" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_76.xml b/share/regions/config_76.xml
index 55cb583..dc56bfd 100644
--- a/share/regions/config_76.xml
+++ b/share/regions/config_76.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04c" SimName="76" SimLocationX="1012" SimLocationY="1002" Datastore="store_76_x12_y04.yap" SimListenPort="9176" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04c" SimName="76" SimLocationX="1012" SimLocationY="1002" Datastore="store_76_x12_y04.yap" SimListenPort="9176" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_760.xml b/share/regions/config_760.xml
index da23a264..ef88dfb 100644
--- a/share/regions/config_760.xml
+++ b/share/regions/config_760.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f8" SimName="760" SimLocationX="1024" SimLocationY="1023" Datastore="store_760_x08_y47.yap" SimListenPort="9860" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f8" SimName="760" SimLocationX="1024" SimLocationY="1023" Datastore="store_760_x08_y47.yap" SimListenPort="9860" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_761.xml b/share/regions/config_761.xml
index fd1d1bf..d0e1163 100644
--- a/share/regions/config_761.xml
+++ b/share/regions/config_761.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f9" SimName="761" SimLocationX="1025" SimLocationY="1023" Datastore="store_761_x09_y47.yap" SimListenPort="9861" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2f9" SimName="761" SimLocationX="1025" SimLocationY="1023" Datastore="store_761_x09_y47.yap" SimListenPort="9861" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_762.xml b/share/regions/config_762.xml
index 9da782a..1de0f26 100644
--- a/share/regions/config_762.xml
+++ b/share/regions/config_762.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fa" SimName="762" SimLocationX="1026" SimLocationY="1023" Datastore="store_762_x10_y47.yap" SimListenPort="9862" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fa" SimName="762" SimLocationX="1026" SimLocationY="1023" Datastore="store_762_x10_y47.yap" SimListenPort="9862" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_763.xml b/share/regions/config_763.xml
index eb8ae20..a0701b6 100644
--- a/share/regions/config_763.xml
+++ b/share/regions/config_763.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fb" SimName="763" SimLocationX="1027" SimLocationY="1023" Datastore="store_763_x11_y47.yap" SimListenPort="9863" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fb" SimName="763" SimLocationX="1027" SimLocationY="1023" Datastore="store_763_x11_y47.yap" SimListenPort="9863" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_764.xml b/share/regions/config_764.xml
index db700e8..0b2272b 100644
--- a/share/regions/config_764.xml
+++ b/share/regions/config_764.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fc" SimName="764" SimLocationX="1028" SimLocationY="1023" Datastore="store_764_x12_y47.yap" SimListenPort="9864" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fc" SimName="764" SimLocationX="1028" SimLocationY="1023" Datastore="store_764_x12_y47.yap" SimListenPort="9864" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_765.xml b/share/regions/config_765.xml
index dcd8fb5..8af4688 100644
--- a/share/regions/config_765.xml
+++ b/share/regions/config_765.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fd" SimName="765" SimLocationX="1029" SimLocationY="1023" Datastore="store_765_x13_y47.yap" SimListenPort="9865" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fd" SimName="765" SimLocationX="1029" SimLocationY="1023" Datastore="store_765_x13_y47.yap" SimListenPort="9865" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_766.xml b/share/regions/config_766.xml
index 42d7ca1..82b6c29 100644
--- a/share/regions/config_766.xml
+++ b/share/regions/config_766.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fe" SimName="766" SimLocationX="1030" SimLocationY="1023" Datastore="store_766_x14_y47.yap" SimListenPort="9866" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2fe" SimName="766" SimLocationX="1030" SimLocationY="1023" Datastore="store_766_x14_y47.yap" SimListenPort="9866" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_767.xml b/share/regions/config_767.xml
index 26c871f..07e8ceb 100644
--- a/share/regions/config_767.xml
+++ b/share/regions/config_767.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ff" SimName="767" SimLocationX="1031" SimLocationY="1023" Datastore="store_767_x15_y47.yap" SimListenPort="9867" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf2ff" SimName="767" SimLocationX="1031" SimLocationY="1023" Datastore="store_767_x15_y47.yap" SimListenPort="9867" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-32.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_768.xml b/share/regions/config_768.xml
index 2f03610..0eee74b 100644
--- a/share/regions/config_768.xml
+++ b/share/regions/config_768.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf300" SimName="768" SimLocationX="1000" SimLocationY="1024" Datastore="store_768_x00_y48.yap" SimListenPort="9868" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf300" SimName="768" SimLocationX="1000" SimLocationY="1024" Datastore="store_768_x00_y48.yap" SimListenPort="9868" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_769.xml b/share/regions/config_769.xml
index e203642..c97008d 100644
--- a/share/regions/config_769.xml
+++ b/share/regions/config_769.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf301" SimName="769" SimLocationX="1001" SimLocationY="1024" Datastore="store_769_x01_y48.yap" SimListenPort="9869" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf301" SimName="769" SimLocationX="1001" SimLocationY="1024" Datastore="store_769_x01_y48.yap" SimListenPort="9869" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_77.xml b/share/regions/config_77.xml
index 098fadb..35bf117 100644
--- a/share/regions/config_77.xml
+++ b/share/regions/config_77.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04d" SimName="77" SimLocationX="1013" SimLocationY="1002" Datastore="store_77_x13_y04.yap" SimListenPort="9177" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04d" SimName="77" SimLocationX="1013" SimLocationY="1002" Datastore="store_77_x13_y04.yap" SimListenPort="9177" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_770.xml b/share/regions/config_770.xml
index 4ba6aca..879caf2 100644
--- a/share/regions/config_770.xml
+++ b/share/regions/config_770.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf302" SimName="770" SimLocationX="1002" SimLocationY="1024" Datastore="store_770_x02_y48.yap" SimListenPort="9870" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf302" SimName="770" SimLocationX="1002" SimLocationY="1024" Datastore="store_770_x02_y48.yap" SimListenPort="9870" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_771.xml b/share/regions/config_771.xml
index 930228b..41e31e3 100644
--- a/share/regions/config_771.xml
+++ b/share/regions/config_771.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf303" SimName="771" SimLocationX="1003" SimLocationY="1024" Datastore="store_771_x03_y48.yap" SimListenPort="9871" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf303" SimName="771" SimLocationX="1003" SimLocationY="1024" Datastore="store_771_x03_y48.yap" SimListenPort="9871" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_772.xml b/share/regions/config_772.xml
index 89b63c7..7561794 100644
--- a/share/regions/config_772.xml
+++ b/share/regions/config_772.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf304" SimName="772" SimLocationX="1004" SimLocationY="1024" Datastore="store_772_x04_y48.yap" SimListenPort="9872" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf304" SimName="772" SimLocationX="1004" SimLocationY="1024" Datastore="store_772_x04_y48.yap" SimListenPort="9872" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_773.xml b/share/regions/config_773.xml
index 3fd3ebb..0c8731b 100644
--- a/share/regions/config_773.xml
+++ b/share/regions/config_773.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf305" SimName="773" SimLocationX="1005" SimLocationY="1024" Datastore="store_773_x05_y48.yap" SimListenPort="9873" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf305" SimName="773" SimLocationX="1005" SimLocationY="1024" Datastore="store_773_x05_y48.yap" SimListenPort="9873" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_774.xml b/share/regions/config_774.xml
index 00bc7ea..354a744 100644
--- a/share/regions/config_774.xml
+++ b/share/regions/config_774.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf306" SimName="774" SimLocationX="1006" SimLocationY="1024" Datastore="store_774_x06_y48.yap" SimListenPort="9874" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf306" SimName="774" SimLocationX="1006" SimLocationY="1024" Datastore="store_774_x06_y48.yap" SimListenPort="9874" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_775.xml b/share/regions/config_775.xml
index 8b5a0e4..5dc7827 100644
--- a/share/regions/config_775.xml
+++ b/share/regions/config_775.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf307" SimName="775" SimLocationX="1007" SimLocationY="1024" Datastore="store_775_x07_y48.yap" SimListenPort="9875" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf307" SimName="775" SimLocationX="1007" SimLocationY="1024" Datastore="store_775_x07_y48.yap" SimListenPort="9875" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_776.xml b/share/regions/config_776.xml
index 6ce71f7..7aa0a45 100644
--- a/share/regions/config_776.xml
+++ b/share/regions/config_776.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf308" SimName="776" SimLocationX="1008" SimLocationY="1024" Datastore="store_776_x08_y48.yap" SimListenPort="9876" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf308" SimName="776" SimLocationX="1008" SimLocationY="1024" Datastore="store_776_x08_y48.yap" SimListenPort="9876" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_777.xml b/share/regions/config_777.xml
index 3dc2da2..25f5bd3 100644
--- a/share/regions/config_777.xml
+++ b/share/regions/config_777.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf309" SimName="777" SimLocationX="1009" SimLocationY="1024" Datastore="store_777_x09_y48.yap" SimListenPort="9877" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf309" SimName="777" SimLocationX="1009" SimLocationY="1024" Datastore="store_777_x09_y48.yap" SimListenPort="9877" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_778.xml b/share/regions/config_778.xml
index 90c422e..3d613cb 100644
--- a/share/regions/config_778.xml
+++ b/share/regions/config_778.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30a" SimName="778" SimLocationX="1010" SimLocationY="1024" Datastore="store_778_x10_y48.yap" SimListenPort="9878" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30a" SimName="778" SimLocationX="1010" SimLocationY="1024" Datastore="store_778_x10_y48.yap" SimListenPort="9878" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_779.xml b/share/regions/config_779.xml
index 61bc661..64c62e5 100644
--- a/share/regions/config_779.xml
+++ b/share/regions/config_779.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30b" SimName="779" SimLocationX="1011" SimLocationY="1024" Datastore="store_779_x11_y48.yap" SimListenPort="9879" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30b" SimName="779" SimLocationX="1011" SimLocationY="1024" Datastore="store_779_x11_y48.yap" SimListenPort="9879" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_78.xml b/share/regions/config_78.xml
index ad83220..943d2ad 100644
--- a/share/regions/config_78.xml
+++ b/share/regions/config_78.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04e" SimName="78" SimLocationX="1014" SimLocationY="1002" Datastore="store_78_x14_y04.yap" SimListenPort="9178" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04e" SimName="78" SimLocationX="1014" SimLocationY="1002" Datastore="store_78_x14_y04.yap" SimListenPort="9178" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_780.xml b/share/regions/config_780.xml
index 2a37177..06f2bed 100644
--- a/share/regions/config_780.xml
+++ b/share/regions/config_780.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30c" SimName="780" SimLocationX="1012" SimLocationY="1024" Datastore="store_780_x12_y48.yap" SimListenPort="9880" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30c" SimName="780" SimLocationX="1012" SimLocationY="1024" Datastore="store_780_x12_y48.yap" SimListenPort="9880" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_781.xml b/share/regions/config_781.xml
index 27abcfb..8eb23b8 100644
--- a/share/regions/config_781.xml
+++ b/share/regions/config_781.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30d" SimName="781" SimLocationX="1013" SimLocationY="1024" Datastore="store_781_x13_y48.yap" SimListenPort="9881" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30d" SimName="781" SimLocationX="1013" SimLocationY="1024" Datastore="store_781_x13_y48.yap" SimListenPort="9881" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_782.xml b/share/regions/config_782.xml
index 7307283..9be3362 100644
--- a/share/regions/config_782.xml
+++ b/share/regions/config_782.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30e" SimName="782" SimLocationX="1014" SimLocationY="1024" Datastore="store_782_x14_y48.yap" SimListenPort="9882" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30e" SimName="782" SimLocationX="1014" SimLocationY="1024" Datastore="store_782_x14_y48.yap" SimListenPort="9882" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_783.xml b/share/regions/config_783.xml
index b27f4cc..a8cf4c7 100644
--- a/share/regions/config_783.xml
+++ b/share/regions/config_783.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30f" SimName="783" SimLocationX="1015" SimLocationY="1024" Datastore="store_783_x15_y48.yap" SimListenPort="9883" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf30f" SimName="783" SimLocationX="1015" SimLocationY="1024" Datastore="store_783_x15_y48.yap" SimListenPort="9883" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-33.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_784.xml b/share/regions/config_784.xml
index 50c1d5a..a26d2d0 100644
--- a/share/regions/config_784.xml
+++ b/share/regions/config_784.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf310" SimName="784" SimLocationX="1016" SimLocationY="1024" Datastore="store_784_x00_y49.yap" SimListenPort="9884" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf310" SimName="784" SimLocationX="1016" SimLocationY="1024" Datastore="store_784_x00_y49.yap" SimListenPort="9884" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_785.xml b/share/regions/config_785.xml
index 4449502..6a63c58 100644
--- a/share/regions/config_785.xml
+++ b/share/regions/config_785.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf311" SimName="785" SimLocationX="1017" SimLocationY="1024" Datastore="store_785_x01_y49.yap" SimListenPort="9885" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf311" SimName="785" SimLocationX="1017" SimLocationY="1024" Datastore="store_785_x01_y49.yap" SimListenPort="9885" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_786.xml b/share/regions/config_786.xml
index 3987f24..f1b05eb 100644
--- a/share/regions/config_786.xml
+++ b/share/regions/config_786.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf312" SimName="786" SimLocationX="1018" SimLocationY="1024" Datastore="store_786_x02_y49.yap" SimListenPort="9886" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf312" SimName="786" SimLocationX="1018" SimLocationY="1024" Datastore="store_786_x02_y49.yap" SimListenPort="9886" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_787.xml b/share/regions/config_787.xml
index 226675a..be9f7f0 100644
--- a/share/regions/config_787.xml
+++ b/share/regions/config_787.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf313" SimName="787" SimLocationX="1019" SimLocationY="1024" Datastore="store_787_x03_y49.yap" SimListenPort="9887" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf313" SimName="787" SimLocationX="1019" SimLocationY="1024" Datastore="store_787_x03_y49.yap" SimListenPort="9887" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_788.xml b/share/regions/config_788.xml
index 0d2b063..93e0198 100644
--- a/share/regions/config_788.xml
+++ b/share/regions/config_788.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf314" SimName="788" SimLocationX="1020" SimLocationY="1024" Datastore="store_788_x04_y49.yap" SimListenPort="9888" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf314" SimName="788" SimLocationX="1020" SimLocationY="1024" Datastore="store_788_x04_y49.yap" SimListenPort="9888" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_789.xml b/share/regions/config_789.xml
index 340351d..69a7ad0 100644
--- a/share/regions/config_789.xml
+++ b/share/regions/config_789.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf315" SimName="789" SimLocationX="1021" SimLocationY="1024" Datastore="store_789_x05_y49.yap" SimListenPort="9889" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf315" SimName="789" SimLocationX="1021" SimLocationY="1024" Datastore="store_789_x05_y49.yap" SimListenPort="9889" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_79.xml b/share/regions/config_79.xml
index 04cbad1..a2a1245 100644
--- a/share/regions/config_79.xml
+++ b/share/regions/config_79.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04f" SimName="79" SimLocationX="1015" SimLocationY="1002" Datastore="store_79_x15_y04.yap" SimListenPort="9179" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf04f" SimName="79" SimLocationX="1015" SimLocationY="1002" Datastore="store_79_x15_y04.yap" SimListenPort="9179" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y11.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_790.xml b/share/regions/config_790.xml
index 5a0f061..66cfe3e 100644
--- a/share/regions/config_790.xml
+++ b/share/regions/config_790.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf316" SimName="790" SimLocationX="1022" SimLocationY="1024" Datastore="store_790_x06_y49.yap" SimListenPort="9890" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf316" SimName="790" SimLocationX="1022" SimLocationY="1024" Datastore="store_790_x06_y49.yap" SimListenPort="9890" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_791.xml b/share/regions/config_791.xml
index 712e3e4..4bc51ca 100644
--- a/share/regions/config_791.xml
+++ b/share/regions/config_791.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf317" SimName="791" SimLocationX="1023" SimLocationY="1024" Datastore="store_791_x07_y49.yap" SimListenPort="9891" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf317" SimName="791" SimLocationX="1023" SimLocationY="1024" Datastore="store_791_x07_y49.yap" SimListenPort="9891" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_792.xml b/share/regions/config_792.xml
index 36d1b4f..9208666 100644
--- a/share/regions/config_792.xml
+++ b/share/regions/config_792.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf318" SimName="792" SimLocationX="1024" SimLocationY="1024" Datastore="store_792_x08_y49.yap" SimListenPort="9892" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf318" SimName="792" SimLocationX="1024" SimLocationY="1024" Datastore="store_792_x08_y49.yap" SimListenPort="9892" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_793.xml b/share/regions/config_793.xml
index 777df87..9b15118 100644
--- a/share/regions/config_793.xml
+++ b/share/regions/config_793.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf319" SimName="793" SimLocationX="1025" SimLocationY="1024" Datastore="store_793_x09_y49.yap" SimListenPort="9893" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf319" SimName="793" SimLocationX="1025" SimLocationY="1024" Datastore="store_793_x09_y49.yap" SimListenPort="9893" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_794.xml b/share/regions/config_794.xml
index 0fe4c96..baacd1b 100644
--- a/share/regions/config_794.xml
+++ b/share/regions/config_794.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31a" SimName="794" SimLocationX="1026" SimLocationY="1024" Datastore="store_794_x10_y49.yap" SimListenPort="9894" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31a" SimName="794" SimLocationX="1026" SimLocationY="1024" Datastore="store_794_x10_y49.yap" SimListenPort="9894" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_795.xml b/share/regions/config_795.xml
index a830ff1..1b2aadd 100644
--- a/share/regions/config_795.xml
+++ b/share/regions/config_795.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31b" SimName="795" SimLocationX="1027" SimLocationY="1024" Datastore="store_795_x11_y49.yap" SimListenPort="9895" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31b" SimName="795" SimLocationX="1027" SimLocationY="1024" Datastore="store_795_x11_y49.yap" SimListenPort="9895" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_796.xml b/share/regions/config_796.xml
index 4bb7ead..c756d2b 100644
--- a/share/regions/config_796.xml
+++ b/share/regions/config_796.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31c" SimName="796" SimLocationX="1028" SimLocationY="1024" Datastore="store_796_x12_y49.yap" SimListenPort="9896" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31c" SimName="796" SimLocationX="1028" SimLocationY="1024" Datastore="store_796_x12_y49.yap" SimListenPort="9896" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_797.xml b/share/regions/config_797.xml
index 84465a3..0b5f6e9 100644
--- a/share/regions/config_797.xml
+++ b/share/regions/config_797.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31d" SimName="797" SimLocationX="1029" SimLocationY="1024" Datastore="store_797_x13_y49.yap" SimListenPort="9897" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31d" SimName="797" SimLocationX="1029" SimLocationY="1024" Datastore="store_797_x13_y49.yap" SimListenPort="9897" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_798.xml b/share/regions/config_798.xml
index b7327c6..90f05f5 100644
--- a/share/regions/config_798.xml
+++ b/share/regions/config_798.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31e" SimName="798" SimLocationX="1030" SimLocationY="1024" Datastore="store_798_x14_y49.yap" SimListenPort="9898" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31e" SimName="798" SimLocationX="1030" SimLocationY="1024" Datastore="store_798_x14_y49.yap" SimListenPort="9898" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_799.xml b/share/regions/config_799.xml
index d810bcd..e538c26 100644
--- a/share/regions/config_799.xml
+++ b/share/regions/config_799.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31f" SimName="799" SimLocationX="1031" SimLocationY="1024" Datastore="store_799_x15_y49.yap" SimListenPort="9899" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf31f" SimName="799" SimLocationX="1031" SimLocationY="1024" Datastore="store_799_x15_y49.yap" SimListenPort="9899" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-34.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_8.xml b/share/regions/config_8.xml
index b4be610..86ca1cc 100644
--- a/share/regions/config_8.xml
+++ b/share/regions/config_8.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf008" SimName="8" SimLocationX="1008" SimLocationY="1000" Datastore="store_8_x08_y00.yap" SimListenPort="9108" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf008" SimName="8" SimLocationX="1008" SimLocationY="1000" Datastore="store_8_x08_y00.yap" SimListenPort="9108" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_80.xml b/share/regions/config_80.xml
index f3613ce..3ca25d4 100644
--- a/share/regions/config_80.xml
+++ b/share/regions/config_80.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf050" SimName="80" SimLocationX="1016" SimLocationY="1002" Datastore="store_80_x00_y05.yap" SimListenPort="9180" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf050" SimName="80" SimLocationX="1016" SimLocationY="1002" Datastore="store_80_x00_y05.yap" SimListenPort="9180" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_800.xml b/share/regions/config_800.xml
index 3d467d7..13d21ed 100644
--- a/share/regions/config_800.xml
+++ b/share/regions/config_800.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf320" SimName="800" SimLocationX="1000" SimLocationY="1025" Datastore="store_800_x00_y50.yap" SimListenPort="9900" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf320" SimName="800" SimLocationX="1000" SimLocationY="1025" Datastore="store_800_x00_y50.yap" SimListenPort="9900" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_801.xml b/share/regions/config_801.xml
index 8e58788..ed2a371 100644
--- a/share/regions/config_801.xml
+++ b/share/regions/config_801.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf321" SimName="801" SimLocationX="1001" SimLocationY="1025" Datastore="store_801_x01_y50.yap" SimListenPort="9901" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf321" SimName="801" SimLocationX="1001" SimLocationY="1025" Datastore="store_801_x01_y50.yap" SimListenPort="9901" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_802.xml b/share/regions/config_802.xml
index b91ee06..70d6625 100644
--- a/share/regions/config_802.xml
+++ b/share/regions/config_802.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf322" SimName="802" SimLocationX="1002" SimLocationY="1025" Datastore="store_802_x02_y50.yap" SimListenPort="9902" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf322" SimName="802" SimLocationX="1002" SimLocationY="1025" Datastore="store_802_x02_y50.yap" SimListenPort="9902" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_803.xml b/share/regions/config_803.xml
index 797e25b..32cfddf 100644
--- a/share/regions/config_803.xml
+++ b/share/regions/config_803.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf323" SimName="803" SimLocationX="1003" SimLocationY="1025" Datastore="store_803_x03_y50.yap" SimListenPort="9903" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf323" SimName="803" SimLocationX="1003" SimLocationY="1025" Datastore="store_803_x03_y50.yap" SimListenPort="9903" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_804.xml b/share/regions/config_804.xml
index fbb552b..889da15 100644
--- a/share/regions/config_804.xml
+++ b/share/regions/config_804.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf324" SimName="804" SimLocationX="1004" SimLocationY="1025" Datastore="store_804_x04_y50.yap" SimListenPort="9904" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf324" SimName="804" SimLocationX="1004" SimLocationY="1025" Datastore="store_804_x04_y50.yap" SimListenPort="9904" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_805.xml b/share/regions/config_805.xml
index c2813a7..fb3961f 100644
--- a/share/regions/config_805.xml
+++ b/share/regions/config_805.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf325" SimName="805" SimLocationX="1005" SimLocationY="1025" Datastore="store_805_x05_y50.yap" SimListenPort="9905" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf325" SimName="805" SimLocationX="1005" SimLocationY="1025" Datastore="store_805_x05_y50.yap" SimListenPort="9905" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_806.xml b/share/regions/config_806.xml
index 5ddfcb4..ae0ba1e 100644
--- a/share/regions/config_806.xml
+++ b/share/regions/config_806.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf326" SimName="806" SimLocationX="1006" SimLocationY="1025" Datastore="store_806_x06_y50.yap" SimListenPort="9906" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf326" SimName="806" SimLocationX="1006" SimLocationY="1025" Datastore="store_806_x06_y50.yap" SimListenPort="9906" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_807.xml b/share/regions/config_807.xml
index ebb9b3e..3cd75a9 100644
--- a/share/regions/config_807.xml
+++ b/share/regions/config_807.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf327" SimName="807" SimLocationX="1007" SimLocationY="1025" Datastore="store_807_x07_y50.yap" SimListenPort="9907" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf327" SimName="807" SimLocationX="1007" SimLocationY="1025" Datastore="store_807_x07_y50.yap" SimListenPort="9907" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_808.xml b/share/regions/config_808.xml
index 6718f13..aaf0e9b 100644
--- a/share/regions/config_808.xml
+++ b/share/regions/config_808.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf328" SimName="808" SimLocationX="1008" SimLocationY="1025" Datastore="store_808_x08_y50.yap" SimListenPort="9908" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf328" SimName="808" SimLocationX="1008" SimLocationY="1025" Datastore="store_808_x08_y50.yap" SimListenPort="9908" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_809.xml b/share/regions/config_809.xml
index cbe981a..6d28348 100644
--- a/share/regions/config_809.xml
+++ b/share/regions/config_809.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf329" SimName="809" SimLocationX="1009" SimLocationY="1025" Datastore="store_809_x09_y50.yap" SimListenPort="9909" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf329" SimName="809" SimLocationX="1009" SimLocationY="1025" Datastore="store_809_x09_y50.yap" SimListenPort="9909" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_81.xml b/share/regions/config_81.xml
index ee52bf7..b2eb36a 100644
--- a/share/regions/config_81.xml
+++ b/share/regions/config_81.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf051" SimName="81" SimLocationX="1017" SimLocationY="1002" Datastore="store_81_x01_y05.yap" SimListenPort="9181" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf051" SimName="81" SimLocationX="1017" SimLocationY="1002" Datastore="store_81_x01_y05.yap" SimListenPort="9181" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_810.xml b/share/regions/config_810.xml
index 8dfcdec..5b06a07 100644
--- a/share/regions/config_810.xml
+++ b/share/regions/config_810.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32a" SimName="810" SimLocationX="1010" SimLocationY="1025" Datastore="store_810_x10_y50.yap" SimListenPort="9910" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32a" SimName="810" SimLocationX="1010" SimLocationY="1025" Datastore="store_810_x10_y50.yap" SimListenPort="9910" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_811.xml b/share/regions/config_811.xml
index 1eaaa83..d1bfbac 100644
--- a/share/regions/config_811.xml
+++ b/share/regions/config_811.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32b" SimName="811" SimLocationX="1011" SimLocationY="1025" Datastore="store_811_x11_y50.yap" SimListenPort="9911" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32b" SimName="811" SimLocationX="1011" SimLocationY="1025" Datastore="store_811_x11_y50.yap" SimListenPort="9911" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_812.xml b/share/regions/config_812.xml
index a5e7f49..1b67b35 100644
--- a/share/regions/config_812.xml
+++ b/share/regions/config_812.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32c" SimName="812" SimLocationX="1012" SimLocationY="1025" Datastore="store_812_x12_y50.yap" SimListenPort="9912" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32c" SimName="812" SimLocationX="1012" SimLocationY="1025" Datastore="store_812_x12_y50.yap" SimListenPort="9912" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_813.xml b/share/regions/config_813.xml
index 991d105..3dab137 100644
--- a/share/regions/config_813.xml
+++ b/share/regions/config_813.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32d" SimName="813" SimLocationX="1013" SimLocationY="1025" Datastore="store_813_x13_y50.yap" SimListenPort="9913" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32d" SimName="813" SimLocationX="1013" SimLocationY="1025" Datastore="store_813_x13_y50.yap" SimListenPort="9913" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_814.xml b/share/regions/config_814.xml
index c7ea360..9e83ec9 100644
--- a/share/regions/config_814.xml
+++ b/share/regions/config_814.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32e" SimName="814" SimLocationX="1014" SimLocationY="1025" Datastore="store_814_x14_y50.yap" SimListenPort="9914" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32e" SimName="814" SimLocationX="1014" SimLocationY="1025" Datastore="store_814_x14_y50.yap" SimListenPort="9914" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_815.xml b/share/regions/config_815.xml
index 813f64b..5316b8c 100644
--- a/share/regions/config_815.xml
+++ b/share/regions/config_815.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32f" SimName="815" SimLocationX="1015" SimLocationY="1025" Datastore="store_815_x15_y50.yap" SimListenPort="9915" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf32f" SimName="815" SimLocationX="1015" SimLocationY="1025" Datastore="store_815_x15_y50.yap" SimListenPort="9915" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-35.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_816.xml b/share/regions/config_816.xml
index a15e217..58664ca 100644
--- a/share/regions/config_816.xml
+++ b/share/regions/config_816.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf330" SimName="816" SimLocationX="1016" SimLocationY="1025" Datastore="store_816_x00_y51.yap" SimListenPort="9916" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf330" SimName="816" SimLocationX="1016" SimLocationY="1025" Datastore="store_816_x00_y51.yap" SimListenPort="9916" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_817.xml b/share/regions/config_817.xml
index 81e6c67..0ac9987 100644
--- a/share/regions/config_817.xml
+++ b/share/regions/config_817.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf331" SimName="817" SimLocationX="1017" SimLocationY="1025" Datastore="store_817_x01_y51.yap" SimListenPort="9917" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf331" SimName="817" SimLocationX="1017" SimLocationY="1025" Datastore="store_817_x01_y51.yap" SimListenPort="9917" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_818.xml b/share/regions/config_818.xml
index 18a9086..666239f 100644
--- a/share/regions/config_818.xml
+++ b/share/regions/config_818.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf332" SimName="818" SimLocationX="1018" SimLocationY="1025" Datastore="store_818_x02_y51.yap" SimListenPort="9918" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf332" SimName="818" SimLocationX="1018" SimLocationY="1025" Datastore="store_818_x02_y51.yap" SimListenPort="9918" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_819.xml b/share/regions/config_819.xml
index 7b207ad..a41c6d6 100644
--- a/share/regions/config_819.xml
+++ b/share/regions/config_819.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf333" SimName="819" SimLocationX="1019" SimLocationY="1025" Datastore="store_819_x03_y51.yap" SimListenPort="9919" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf333" SimName="819" SimLocationX="1019" SimLocationY="1025" Datastore="store_819_x03_y51.yap" SimListenPort="9919" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_82.xml b/share/regions/config_82.xml
index d74644d..5c61659 100644
--- a/share/regions/config_82.xml
+++ b/share/regions/config_82.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf052" SimName="82" SimLocationX="1018" SimLocationY="1002" Datastore="store_82_x02_y05.yap" SimListenPort="9182" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf052" SimName="82" SimLocationX="1018" SimLocationY="1002" Datastore="store_82_x02_y05.yap" SimListenPort="9182" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_820.xml b/share/regions/config_820.xml
index d6b65c5..32b62c7 100644
--- a/share/regions/config_820.xml
+++ b/share/regions/config_820.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf334" SimName="820" SimLocationX="1020" SimLocationY="1025" Datastore="store_820_x04_y51.yap" SimListenPort="9920" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf334" SimName="820" SimLocationX="1020" SimLocationY="1025" Datastore="store_820_x04_y51.yap" SimListenPort="9920" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_821.xml b/share/regions/config_821.xml
index 49cf8ba..574fdf2 100644
--- a/share/regions/config_821.xml
+++ b/share/regions/config_821.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf335" SimName="821" SimLocationX="1021" SimLocationY="1025" Datastore="store_821_x05_y51.yap" SimListenPort="9921" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf335" SimName="821" SimLocationX="1021" SimLocationY="1025" Datastore="store_821_x05_y51.yap" SimListenPort="9921" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_822.xml b/share/regions/config_822.xml
index 2ef23f1..83c1c6f 100644
--- a/share/regions/config_822.xml
+++ b/share/regions/config_822.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf336" SimName="822" SimLocationX="1022" SimLocationY="1025" Datastore="store_822_x06_y51.yap" SimListenPort="9922" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf336" SimName="822" SimLocationX="1022" SimLocationY="1025" Datastore="store_822_x06_y51.yap" SimListenPort="9922" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_823.xml b/share/regions/config_823.xml
index f317ab9..1869978 100644
--- a/share/regions/config_823.xml
+++ b/share/regions/config_823.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf337" SimName="823" SimLocationX="1023" SimLocationY="1025" Datastore="store_823_x07_y51.yap" SimListenPort="9923" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf337" SimName="823" SimLocationX="1023" SimLocationY="1025" Datastore="store_823_x07_y51.yap" SimListenPort="9923" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_824.xml b/share/regions/config_824.xml
index b0e22a4..555baac 100644
--- a/share/regions/config_824.xml
+++ b/share/regions/config_824.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf338" SimName="824" SimLocationX="1024" SimLocationY="1025" Datastore="store_824_x08_y51.yap" SimListenPort="9924" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf338" SimName="824" SimLocationX="1024" SimLocationY="1025" Datastore="store_824_x08_y51.yap" SimListenPort="9924" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_825.xml b/share/regions/config_825.xml
index 282bd47..cd43c27 100644
--- a/share/regions/config_825.xml
+++ b/share/regions/config_825.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf339" SimName="825" SimLocationX="1025" SimLocationY="1025" Datastore="store_825_x09_y51.yap" SimListenPort="9925" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf339" SimName="825" SimLocationX="1025" SimLocationY="1025" Datastore="store_825_x09_y51.yap" SimListenPort="9925" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_826.xml b/share/regions/config_826.xml
index 3093150..e05d2f7 100644
--- a/share/regions/config_826.xml
+++ b/share/regions/config_826.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33a" SimName="826" SimLocationX="1026" SimLocationY="1025" Datastore="store_826_x10_y51.yap" SimListenPort="9926" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33a" SimName="826" SimLocationX="1026" SimLocationY="1025" Datastore="store_826_x10_y51.yap" SimListenPort="9926" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_827.xml b/share/regions/config_827.xml
index 4608a28..ae9dc33 100644
--- a/share/regions/config_827.xml
+++ b/share/regions/config_827.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33b" SimName="827" SimLocationX="1027" SimLocationY="1025" Datastore="store_827_x11_y51.yap" SimListenPort="9927" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33b" SimName="827" SimLocationX="1027" SimLocationY="1025" Datastore="store_827_x11_y51.yap" SimListenPort="9927" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_828.xml b/share/regions/config_828.xml
index 4bba5e4..44e5ccb 100644
--- a/share/regions/config_828.xml
+++ b/share/regions/config_828.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33c" SimName="828" SimLocationX="1028" SimLocationY="1025" Datastore="store_828_x12_y51.yap" SimListenPort="9928" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33c" SimName="828" SimLocationX="1028" SimLocationY="1025" Datastore="store_828_x12_y51.yap" SimListenPort="9928" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_829.xml b/share/regions/config_829.xml
index bd0e7db..4668bda 100644
--- a/share/regions/config_829.xml
+++ b/share/regions/config_829.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33d" SimName="829" SimLocationX="1029" SimLocationY="1025" Datastore="store_829_x13_y51.yap" SimListenPort="9929" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33d" SimName="829" SimLocationX="1029" SimLocationY="1025" Datastore="store_829_x13_y51.yap" SimListenPort="9929" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_83.xml b/share/regions/config_83.xml
index eea085c..d0443fa 100644
--- a/share/regions/config_83.xml
+++ b/share/regions/config_83.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf053" SimName="83" SimLocationX="1019" SimLocationY="1002" Datastore="store_83_x03_y05.yap" SimListenPort="9183" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf053" SimName="83" SimLocationX="1019" SimLocationY="1002" Datastore="store_83_x03_y05.yap" SimListenPort="9183" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_830.xml b/share/regions/config_830.xml
index 118864d..8f03d66 100644
--- a/share/regions/config_830.xml
+++ b/share/regions/config_830.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33e" SimName="830" SimLocationX="1030" SimLocationY="1025" Datastore="store_830_x14_y51.yap" SimListenPort="9930" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33e" SimName="830" SimLocationX="1030" SimLocationY="1025" Datastore="store_830_x14_y51.yap" SimListenPort="9930" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_831.xml b/share/regions/config_831.xml
index 6f3b420..fa6fd13 100644
--- a/share/regions/config_831.xml
+++ b/share/regions/config_831.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33f" SimName="831" SimLocationX="1031" SimLocationY="1025" Datastore="store_831_x15_y51.yap" SimListenPort="9931" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf33f" SimName="831" SimLocationX="1031" SimLocationY="1025" Datastore="store_831_x15_y51.yap" SimListenPort="9931" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-36.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_832.xml b/share/regions/config_832.xml
index 7578fa6..709a7a6 100644
--- a/share/regions/config_832.xml
+++ b/share/regions/config_832.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf340" SimName="832" SimLocationX="1000" SimLocationY="1026" Datastore="store_832_x00_y52.yap" SimListenPort="9932" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf340" SimName="832" SimLocationX="1000" SimLocationY="1026" Datastore="store_832_x00_y52.yap" SimListenPort="9932" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_833.xml b/share/regions/config_833.xml
index e526d62..64e6368 100644
--- a/share/regions/config_833.xml
+++ b/share/regions/config_833.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf341" SimName="833" SimLocationX="1001" SimLocationY="1026" Datastore="store_833_x01_y52.yap" SimListenPort="9933" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf341" SimName="833" SimLocationX="1001" SimLocationY="1026" Datastore="store_833_x01_y52.yap" SimListenPort="9933" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_834.xml b/share/regions/config_834.xml
index d7b6c57..7a4c586 100644
--- a/share/regions/config_834.xml
+++ b/share/regions/config_834.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf342" SimName="834" SimLocationX="1002" SimLocationY="1026" Datastore="store_834_x02_y52.yap" SimListenPort="9934" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf342" SimName="834" SimLocationX="1002" SimLocationY="1026" Datastore="store_834_x02_y52.yap" SimListenPort="9934" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_835.xml b/share/regions/config_835.xml
index 0dc42d2..989d1c9 100644
--- a/share/regions/config_835.xml
+++ b/share/regions/config_835.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf343" SimName="835" SimLocationX="1003" SimLocationY="1026" Datastore="store_835_x03_y52.yap" SimListenPort="9935" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf343" SimName="835" SimLocationX="1003" SimLocationY="1026" Datastore="store_835_x03_y52.yap" SimListenPort="9935" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_836.xml b/share/regions/config_836.xml
index a937d60..b7e3a2d 100644
--- a/share/regions/config_836.xml
+++ b/share/regions/config_836.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf344" SimName="836" SimLocationX="1004" SimLocationY="1026" Datastore="store_836_x04_y52.yap" SimListenPort="9936" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf344" SimName="836" SimLocationX="1004" SimLocationY="1026" Datastore="store_836_x04_y52.yap" SimListenPort="9936" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_837.xml b/share/regions/config_837.xml
index b9900fc..f01454e 100644
--- a/share/regions/config_837.xml
+++ b/share/regions/config_837.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf345" SimName="837" SimLocationX="1005" SimLocationY="1026" Datastore="store_837_x05_y52.yap" SimListenPort="9937" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf345" SimName="837" SimLocationX="1005" SimLocationY="1026" Datastore="store_837_x05_y52.yap" SimListenPort="9937" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_838.xml b/share/regions/config_838.xml
index 9c4c909..720dd8c 100644
--- a/share/regions/config_838.xml
+++ b/share/regions/config_838.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf346" SimName="838" SimLocationX="1006" SimLocationY="1026" Datastore="store_838_x06_y52.yap" SimListenPort="9938" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf346" SimName="838" SimLocationX="1006" SimLocationY="1026" Datastore="store_838_x06_y52.yap" SimListenPort="9938" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_839.xml b/share/regions/config_839.xml
index b9e76e6..61a1e69 100644
--- a/share/regions/config_839.xml
+++ b/share/regions/config_839.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf347" SimName="839" SimLocationX="1007" SimLocationY="1026" Datastore="store_839_x07_y52.yap" SimListenPort="9939" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf347" SimName="839" SimLocationX="1007" SimLocationY="1026" Datastore="store_839_x07_y52.yap" SimListenPort="9939" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_84.xml b/share/regions/config_84.xml
index c5ecb24..7ed7e1f 100644
--- a/share/regions/config_84.xml
+++ b/share/regions/config_84.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf054" SimName="84" SimLocationX="1020" SimLocationY="1002" Datastore="store_84_x04_y05.yap" SimListenPort="9184" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf054" SimName="84" SimLocationX="1020" SimLocationY="1002" Datastore="store_84_x04_y05.yap" SimListenPort="9184" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_840.xml b/share/regions/config_840.xml
index 89d5da2..8ec0053 100644
--- a/share/regions/config_840.xml
+++ b/share/regions/config_840.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf348" SimName="840" SimLocationX="1008" SimLocationY="1026" Datastore="store_840_x08_y52.yap" SimListenPort="9940" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf348" SimName="840" SimLocationX="1008" SimLocationY="1026" Datastore="store_840_x08_y52.yap" SimListenPort="9940" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_841.xml b/share/regions/config_841.xml
index f1727da..29c4116 100644
--- a/share/regions/config_841.xml
+++ b/share/regions/config_841.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf349" SimName="841" SimLocationX="1009" SimLocationY="1026" Datastore="store_841_x09_y52.yap" SimListenPort="9941" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf349" SimName="841" SimLocationX="1009" SimLocationY="1026" Datastore="store_841_x09_y52.yap" SimListenPort="9941" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_842.xml b/share/regions/config_842.xml
index b3cb8c3..ac337d2 100644
--- a/share/regions/config_842.xml
+++ b/share/regions/config_842.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34a" SimName="842" SimLocationX="1010" SimLocationY="1026" Datastore="store_842_x10_y52.yap" SimListenPort="9942" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34a" SimName="842" SimLocationX="1010" SimLocationY="1026" Datastore="store_842_x10_y52.yap" SimListenPort="9942" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_843.xml b/share/regions/config_843.xml
index aca572c..65bcbee 100644
--- a/share/regions/config_843.xml
+++ b/share/regions/config_843.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34b" SimName="843" SimLocationX="1011" SimLocationY="1026" Datastore="store_843_x11_y52.yap" SimListenPort="9943" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34b" SimName="843" SimLocationX="1011" SimLocationY="1026" Datastore="store_843_x11_y52.yap" SimListenPort="9943" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_844.xml b/share/regions/config_844.xml
index 7fddd7e..3edfda5 100644
--- a/share/regions/config_844.xml
+++ b/share/regions/config_844.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34c" SimName="844" SimLocationX="1012" SimLocationY="1026" Datastore="store_844_x12_y52.yap" SimListenPort="9944" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34c" SimName="844" SimLocationX="1012" SimLocationY="1026" Datastore="store_844_x12_y52.yap" SimListenPort="9944" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_845.xml b/share/regions/config_845.xml
index fe70502..1ad151f 100644
--- a/share/regions/config_845.xml
+++ b/share/regions/config_845.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34d" SimName="845" SimLocationX="1013" SimLocationY="1026" Datastore="store_845_x13_y52.yap" SimListenPort="9945" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34d" SimName="845" SimLocationX="1013" SimLocationY="1026" Datastore="store_845_x13_y52.yap" SimListenPort="9945" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_846.xml b/share/regions/config_846.xml
index f2230ff..c45b223 100644
--- a/share/regions/config_846.xml
+++ b/share/regions/config_846.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34e" SimName="846" SimLocationX="1014" SimLocationY="1026" Datastore="store_846_x14_y52.yap" SimListenPort="9946" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34e" SimName="846" SimLocationX="1014" SimLocationY="1026" Datastore="store_846_x14_y52.yap" SimListenPort="9946" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_847.xml b/share/regions/config_847.xml
index 433bbc0..31f03d8 100644
--- a/share/regions/config_847.xml
+++ b/share/regions/config_847.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34f" SimName="847" SimLocationX="1015" SimLocationY="1026" Datastore="store_847_x15_y52.yap" SimListenPort="9947" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf34f" SimName="847" SimLocationX="1015" SimLocationY="1026" Datastore="store_847_x15_y52.yap" SimListenPort="9947" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-37.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_848.xml b/share/regions/config_848.xml
index ef82380..89630a9 100644
--- a/share/regions/config_848.xml
+++ b/share/regions/config_848.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf350" SimName="848" SimLocationX="1016" SimLocationY="1026" Datastore="store_848_x00_y53.yap" SimListenPort="9948" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf350" SimName="848" SimLocationX="1016" SimLocationY="1026" Datastore="store_848_x00_y53.yap" SimListenPort="9948" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_849.xml b/share/regions/config_849.xml
index 991e279..3238711 100644
--- a/share/regions/config_849.xml
+++ b/share/regions/config_849.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf351" SimName="849" SimLocationX="1017" SimLocationY="1026" Datastore="store_849_x01_y53.yap" SimListenPort="9949" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf351" SimName="849" SimLocationX="1017" SimLocationY="1026" Datastore="store_849_x01_y53.yap" SimListenPort="9949" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_85.xml b/share/regions/config_85.xml
index c180750..5d86230 100644
--- a/share/regions/config_85.xml
+++ b/share/regions/config_85.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf055" SimName="85" SimLocationX="1021" SimLocationY="1002" Datastore="store_85_x05_y05.yap" SimListenPort="9185" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf055" SimName="85" SimLocationX="1021" SimLocationY="1002" Datastore="store_85_x05_y05.yap" SimListenPort="9185" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_850.xml b/share/regions/config_850.xml
index 440eb71..5b579b2 100644
--- a/share/regions/config_850.xml
+++ b/share/regions/config_850.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf352" SimName="850" SimLocationX="1018" SimLocationY="1026" Datastore="store_850_x02_y53.yap" SimListenPort="9950" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf352" SimName="850" SimLocationX="1018" SimLocationY="1026" Datastore="store_850_x02_y53.yap" SimListenPort="9950" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_851.xml b/share/regions/config_851.xml
index 5fe3b64..d6848fe 100644
--- a/share/regions/config_851.xml
+++ b/share/regions/config_851.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf353" SimName="851" SimLocationX="1019" SimLocationY="1026" Datastore="store_851_x03_y53.yap" SimListenPort="9951" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf353" SimName="851" SimLocationX="1019" SimLocationY="1026" Datastore="store_851_x03_y53.yap" SimListenPort="9951" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_852.xml b/share/regions/config_852.xml
index a1513ba..b7b971f 100644
--- a/share/regions/config_852.xml
+++ b/share/regions/config_852.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf354" SimName="852" SimLocationX="1020" SimLocationY="1026" Datastore="store_852_x04_y53.yap" SimListenPort="9952" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf354" SimName="852" SimLocationX="1020" SimLocationY="1026" Datastore="store_852_x04_y53.yap" SimListenPort="9952" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_853.xml b/share/regions/config_853.xml
index b2e572a..bbbada8 100644
--- a/share/regions/config_853.xml
+++ b/share/regions/config_853.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf355" SimName="853" SimLocationX="1021" SimLocationY="1026" Datastore="store_853_x05_y53.yap" SimListenPort="9953" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf355" SimName="853" SimLocationX="1021" SimLocationY="1026" Datastore="store_853_x05_y53.yap" SimListenPort="9953" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_854.xml b/share/regions/config_854.xml
index aff8b91..a262d21 100644
--- a/share/regions/config_854.xml
+++ b/share/regions/config_854.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf356" SimName="854" SimLocationX="1022" SimLocationY="1026" Datastore="store_854_x06_y53.yap" SimListenPort="9954" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf356" SimName="854" SimLocationX="1022" SimLocationY="1026" Datastore="store_854_x06_y53.yap" SimListenPort="9954" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_855.xml b/share/regions/config_855.xml
index 115e960..f1046b3 100644
--- a/share/regions/config_855.xml
+++ b/share/regions/config_855.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf357" SimName="855" SimLocationX="1023" SimLocationY="1026" Datastore="store_855_x07_y53.yap" SimListenPort="9955" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf357" SimName="855" SimLocationX="1023" SimLocationY="1026" Datastore="store_855_x07_y53.yap" SimListenPort="9955" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_856.xml b/share/regions/config_856.xml
index 40b79fd..227270e 100644
--- a/share/regions/config_856.xml
+++ b/share/regions/config_856.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf358" SimName="856" SimLocationX="1024" SimLocationY="1026" Datastore="store_856_x08_y53.yap" SimListenPort="9956" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf358" SimName="856" SimLocationX="1024" SimLocationY="1026" Datastore="store_856_x08_y53.yap" SimListenPort="9956" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_857.xml b/share/regions/config_857.xml
index a4e114c..ce64205 100644
--- a/share/regions/config_857.xml
+++ b/share/regions/config_857.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf359" SimName="857" SimLocationX="1025" SimLocationY="1026" Datastore="store_857_x09_y53.yap" SimListenPort="9957" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf359" SimName="857" SimLocationX="1025" SimLocationY="1026" Datastore="store_857_x09_y53.yap" SimListenPort="9957" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_858.xml b/share/regions/config_858.xml
index 2881865..8f6e76b 100644
--- a/share/regions/config_858.xml
+++ b/share/regions/config_858.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35a" SimName="858" SimLocationX="1026" SimLocationY="1026" Datastore="store_858_x10_y53.yap" SimListenPort="9958" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35a" SimName="858" SimLocationX="1026" SimLocationY="1026" Datastore="store_858_x10_y53.yap" SimListenPort="9958" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_859.xml b/share/regions/config_859.xml
index 865a470..4bbc67d 100644
--- a/share/regions/config_859.xml
+++ b/share/regions/config_859.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35b" SimName="859" SimLocationX="1027" SimLocationY="1026" Datastore="store_859_x11_y53.yap" SimListenPort="9959" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35b" SimName="859" SimLocationX="1027" SimLocationY="1026" Datastore="store_859_x11_y53.yap" SimListenPort="9959" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_86.xml b/share/regions/config_86.xml
index 9b14bb1..925a636 100644
--- a/share/regions/config_86.xml
+++ b/share/regions/config_86.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf056" SimName="86" SimLocationX="1022" SimLocationY="1002" Datastore="store_86_x06_y05.yap" SimListenPort="9186" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf056" SimName="86" SimLocationX="1022" SimLocationY="1002" Datastore="store_86_x06_y05.yap" SimListenPort="9186" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_860.xml b/share/regions/config_860.xml
index 71062cd..0903676 100644
--- a/share/regions/config_860.xml
+++ b/share/regions/config_860.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35c" SimName="860" SimLocationX="1028" SimLocationY="1026" Datastore="store_860_x12_y53.yap" SimListenPort="9960" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35c" SimName="860" SimLocationX="1028" SimLocationY="1026" Datastore="store_860_x12_y53.yap" SimListenPort="9960" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_861.xml b/share/regions/config_861.xml
index d828145..91088da 100644
--- a/share/regions/config_861.xml
+++ b/share/regions/config_861.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35d" SimName="861" SimLocationX="1029" SimLocationY="1026" Datastore="store_861_x13_y53.yap" SimListenPort="9961" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35d" SimName="861" SimLocationX="1029" SimLocationY="1026" Datastore="store_861_x13_y53.yap" SimListenPort="9961" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_862.xml b/share/regions/config_862.xml
index 0700999..fb64d96 100644
--- a/share/regions/config_862.xml
+++ b/share/regions/config_862.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35e" SimName="862" SimLocationX="1030" SimLocationY="1026" Datastore="store_862_x14_y53.yap" SimListenPort="9962" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35e" SimName="862" SimLocationX="1030" SimLocationY="1026" Datastore="store_862_x14_y53.yap" SimListenPort="9962" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_863.xml b/share/regions/config_863.xml
index 954d08c..491aebd 100644
--- a/share/regions/config_863.xml
+++ b/share/regions/config_863.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35f" SimName="863" SimLocationX="1031" SimLocationY="1026" Datastore="store_863_x15_y53.yap" SimListenPort="9963" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf35f" SimName="863" SimLocationX="1031" SimLocationY="1026" Datastore="store_863_x15_y53.yap" SimListenPort="9963" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-38.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_864.xml b/share/regions/config_864.xml
index 68918af..7d87fb6 100644
--- a/share/regions/config_864.xml
+++ b/share/regions/config_864.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf360" SimName="864" SimLocationX="1000" SimLocationY="1027" Datastore="store_864_x00_y54.yap" SimListenPort="9964" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf360" SimName="864" SimLocationX="1000" SimLocationY="1027" Datastore="store_864_x00_y54.yap" SimListenPort="9964" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_865.xml b/share/regions/config_865.xml
index adff624..6aeebe8 100644
--- a/share/regions/config_865.xml
+++ b/share/regions/config_865.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf361" SimName="865" SimLocationX="1001" SimLocationY="1027" Datastore="store_865_x01_y54.yap" SimListenPort="9965" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf361" SimName="865" SimLocationX="1001" SimLocationY="1027" Datastore="store_865_x01_y54.yap" SimListenPort="9965" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_866.xml b/share/regions/config_866.xml
index 0ffd723..cf1c47d 100644
--- a/share/regions/config_866.xml
+++ b/share/regions/config_866.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf362" SimName="866" SimLocationX="1002" SimLocationY="1027" Datastore="store_866_x02_y54.yap" SimListenPort="9966" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf362" SimName="866" SimLocationX="1002" SimLocationY="1027" Datastore="store_866_x02_y54.yap" SimListenPort="9966" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_867.xml b/share/regions/config_867.xml
index 94e112f..797cb25 100644
--- a/share/regions/config_867.xml
+++ b/share/regions/config_867.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf363" SimName="867" SimLocationX="1003" SimLocationY="1027" Datastore="store_867_x03_y54.yap" SimListenPort="9967" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf363" SimName="867" SimLocationX="1003" SimLocationY="1027" Datastore="store_867_x03_y54.yap" SimListenPort="9967" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_868.xml b/share/regions/config_868.xml
index 9b794ed..5f6bd8c 100644
--- a/share/regions/config_868.xml
+++ b/share/regions/config_868.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf364" SimName="868" SimLocationX="1004" SimLocationY="1027" Datastore="store_868_x04_y54.yap" SimListenPort="9968" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf364" SimName="868" SimLocationX="1004" SimLocationY="1027" Datastore="store_868_x04_y54.yap" SimListenPort="9968" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_869.xml b/share/regions/config_869.xml
index c2b5405..d6a192b 100644
--- a/share/regions/config_869.xml
+++ b/share/regions/config_869.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf365" SimName="869" SimLocationX="1005" SimLocationY="1027" Datastore="store_869_x05_y54.yap" SimListenPort="9969" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf365" SimName="869" SimLocationX="1005" SimLocationY="1027" Datastore="store_869_x05_y54.yap" SimListenPort="9969" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_87.xml b/share/regions/config_87.xml
index bd39935..3c330bf 100644
--- a/share/regions/config_87.xml
+++ b/share/regions/config_87.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf057" SimName="87" SimLocationX="1023" SimLocationY="1002" Datastore="store_87_x07_y05.yap" SimListenPort="9187" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf057" SimName="87" SimLocationX="1023" SimLocationY="1002" Datastore="store_87_x07_y05.yap" SimListenPort="9187" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_870.xml b/share/regions/config_870.xml
index 6220e45..27e1252 100644
--- a/share/regions/config_870.xml
+++ b/share/regions/config_870.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf366" SimName="870" SimLocationX="1006" SimLocationY="1027" Datastore="store_870_x06_y54.yap" SimListenPort="9970" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf366" SimName="870" SimLocationX="1006" SimLocationY="1027" Datastore="store_870_x06_y54.yap" SimListenPort="9970" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_871.xml b/share/regions/config_871.xml
index 79be33d..12c0701 100644
--- a/share/regions/config_871.xml
+++ b/share/regions/config_871.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf367" SimName="871" SimLocationX="1007" SimLocationY="1027" Datastore="store_871_x07_y54.yap" SimListenPort="9971" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf367" SimName="871" SimLocationX="1007" SimLocationY="1027" Datastore="store_871_x07_y54.yap" SimListenPort="9971" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_872.xml b/share/regions/config_872.xml
index 4d864d5..863a1a6 100644
--- a/share/regions/config_872.xml
+++ b/share/regions/config_872.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf368" SimName="872" SimLocationX="1008" SimLocationY="1027" Datastore="store_872_x08_y54.yap" SimListenPort="9972" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf368" SimName="872" SimLocationX="1008" SimLocationY="1027" Datastore="store_872_x08_y54.yap" SimListenPort="9972" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_873.xml b/share/regions/config_873.xml
index 592fa53..28aa157 100644
--- a/share/regions/config_873.xml
+++ b/share/regions/config_873.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf369" SimName="873" SimLocationX="1009" SimLocationY="1027" Datastore="store_873_x09_y54.yap" SimListenPort="9973" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf369" SimName="873" SimLocationX="1009" SimLocationY="1027" Datastore="store_873_x09_y54.yap" SimListenPort="9973" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_874.xml b/share/regions/config_874.xml
index 6347776..bb66453 100644
--- a/share/regions/config_874.xml
+++ b/share/regions/config_874.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36a" SimName="874" SimLocationX="1010" SimLocationY="1027" Datastore="store_874_x10_y54.yap" SimListenPort="9974" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36a" SimName="874" SimLocationX="1010" SimLocationY="1027" Datastore="store_874_x10_y54.yap" SimListenPort="9974" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_875.xml b/share/regions/config_875.xml
index 2c91a9f..200bc8b 100644
--- a/share/regions/config_875.xml
+++ b/share/regions/config_875.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36b" SimName="875" SimLocationX="1011" SimLocationY="1027" Datastore="store_875_x11_y54.yap" SimListenPort="9975" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36b" SimName="875" SimLocationX="1011" SimLocationY="1027" Datastore="store_875_x11_y54.yap" SimListenPort="9975" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_876.xml b/share/regions/config_876.xml
index 662ece3..e4a32ab 100644
--- a/share/regions/config_876.xml
+++ b/share/regions/config_876.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36c" SimName="876" SimLocationX="1012" SimLocationY="1027" Datastore="store_876_x12_y54.yap" SimListenPort="9976" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36c" SimName="876" SimLocationX="1012" SimLocationY="1027" Datastore="store_876_x12_y54.yap" SimListenPort="9976" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_877.xml b/share/regions/config_877.xml
index 4015a98..6b1ccd3 100644
--- a/share/regions/config_877.xml
+++ b/share/regions/config_877.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36d" SimName="877" SimLocationX="1013" SimLocationY="1027" Datastore="store_877_x13_y54.yap" SimListenPort="9977" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36d" SimName="877" SimLocationX="1013" SimLocationY="1027" Datastore="store_877_x13_y54.yap" SimListenPort="9977" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_878.xml b/share/regions/config_878.xml
index 49d452c..15874cf 100644
--- a/share/regions/config_878.xml
+++ b/share/regions/config_878.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36e" SimName="878" SimLocationX="1014" SimLocationY="1027" Datastore="store_878_x14_y54.yap" SimListenPort="9978" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36e" SimName="878" SimLocationX="1014" SimLocationY="1027" Datastore="store_878_x14_y54.yap" SimListenPort="9978" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_879.xml b/share/regions/config_879.xml
index 363e9b0..7cd7643 100644
--- a/share/regions/config_879.xml
+++ b/share/regions/config_879.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36f" SimName="879" SimLocationX="1015" SimLocationY="1027" Datastore="store_879_x15_y54.yap" SimListenPort="9979" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf36f" SimName="879" SimLocationX="1015" SimLocationY="1027" Datastore="store_879_x15_y54.yap" SimListenPort="9979" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-39.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_88.xml b/share/regions/config_88.xml
index a180aee..0864844 100644
--- a/share/regions/config_88.xml
+++ b/share/regions/config_88.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf058" SimName="88" SimLocationX="1024" SimLocationY="1002" Datastore="store_88_x08_y05.yap" SimListenPort="9188" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf058" SimName="88" SimLocationX="1024" SimLocationY="1002" Datastore="store_88_x08_y05.yap" SimListenPort="9188" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_880.xml b/share/regions/config_880.xml
index 8f00bd3..c9a3515 100644
--- a/share/regions/config_880.xml
+++ b/share/regions/config_880.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf370" SimName="880" SimLocationX="1016" SimLocationY="1027" Datastore="store_880_x00_y55.yap" SimListenPort="9980" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf370" SimName="880" SimLocationX="1016" SimLocationY="1027" Datastore="store_880_x00_y55.yap" SimListenPort="9980" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_881.xml b/share/regions/config_881.xml
index bec63f2..5871afd 100644
--- a/share/regions/config_881.xml
+++ b/share/regions/config_881.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf371" SimName="881" SimLocationX="1017" SimLocationY="1027" Datastore="store_881_x01_y55.yap" SimListenPort="9981" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf371" SimName="881" SimLocationX="1017" SimLocationY="1027" Datastore="store_881_x01_y55.yap" SimListenPort="9981" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_882.xml b/share/regions/config_882.xml
index 745f1b2..70c7899 100644
--- a/share/regions/config_882.xml
+++ b/share/regions/config_882.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf372" SimName="882" SimLocationX="1018" SimLocationY="1027" Datastore="store_882_x02_y55.yap" SimListenPort="9982" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf372" SimName="882" SimLocationX="1018" SimLocationY="1027" Datastore="store_882_x02_y55.yap" SimListenPort="9982" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_883.xml b/share/regions/config_883.xml
index 4d88d25..2b89571 100644
--- a/share/regions/config_883.xml
+++ b/share/regions/config_883.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf373" SimName="883" SimLocationX="1019" SimLocationY="1027" Datastore="store_883_x03_y55.yap" SimListenPort="9983" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf373" SimName="883" SimLocationX="1019" SimLocationY="1027" Datastore="store_883_x03_y55.yap" SimListenPort="9983" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_884.xml b/share/regions/config_884.xml
index bc1e55b..d6beb53 100644
--- a/share/regions/config_884.xml
+++ b/share/regions/config_884.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf374" SimName="884" SimLocationX="1020" SimLocationY="1027" Datastore="store_884_x04_y55.yap" SimListenPort="9984" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf374" SimName="884" SimLocationX="1020" SimLocationY="1027" Datastore="store_884_x04_y55.yap" SimListenPort="9984" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_885.xml b/share/regions/config_885.xml
index e0e94a8..662e684 100644
--- a/share/regions/config_885.xml
+++ b/share/regions/config_885.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf375" SimName="885" SimLocationX="1021" SimLocationY="1027" Datastore="store_885_x05_y55.yap" SimListenPort="9985" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf375" SimName="885" SimLocationX="1021" SimLocationY="1027" Datastore="store_885_x05_y55.yap" SimListenPort="9985" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_886.xml b/share/regions/config_886.xml
index 1f18106..d110533 100644
--- a/share/regions/config_886.xml
+++ b/share/regions/config_886.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf376" SimName="886" SimLocationX="1022" SimLocationY="1027" Datastore="store_886_x06_y55.yap" SimListenPort="9986" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf376" SimName="886" SimLocationX="1022" SimLocationY="1027" Datastore="store_886_x06_y55.yap" SimListenPort="9986" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_887.xml b/share/regions/config_887.xml
index 318304a..5d66f9a 100644
--- a/share/regions/config_887.xml
+++ b/share/regions/config_887.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf377" SimName="887" SimLocationX="1023" SimLocationY="1027" Datastore="store_887_x07_y55.yap" SimListenPort="9987" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf377" SimName="887" SimLocationX="1023" SimLocationY="1027" Datastore="store_887_x07_y55.yap" SimListenPort="9987" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_888.xml b/share/regions/config_888.xml
index c073f6d..976a5c5 100644
--- a/share/regions/config_888.xml
+++ b/share/regions/config_888.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf378" SimName="888" SimLocationX="1024" SimLocationY="1027" Datastore="store_888_x08_y55.yap" SimListenPort="9988" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf378" SimName="888" SimLocationX="1024" SimLocationY="1027" Datastore="store_888_x08_y55.yap" SimListenPort="9988" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_889.xml b/share/regions/config_889.xml
index 944bff7..98fee09 100644
--- a/share/regions/config_889.xml
+++ b/share/regions/config_889.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf379" SimName="889" SimLocationX="1025" SimLocationY="1027" Datastore="store_889_x09_y55.yap" SimListenPort="9989" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf379" SimName="889" SimLocationX="1025" SimLocationY="1027" Datastore="store_889_x09_y55.yap" SimListenPort="9989" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_89.xml b/share/regions/config_89.xml
index 8a50594..08d8b7e 100644
--- a/share/regions/config_89.xml
+++ b/share/regions/config_89.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf059" SimName="89" SimLocationX="1025" SimLocationY="1002" Datastore="store_89_x09_y05.yap" SimListenPort="9189" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf059" SimName="89" SimLocationX="1025" SimLocationY="1002" Datastore="store_89_x09_y05.yap" SimListenPort="9189" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_890.xml b/share/regions/config_890.xml
index a587c10..1bf9032 100644
--- a/share/regions/config_890.xml
+++ b/share/regions/config_890.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37a" SimName="890" SimLocationX="1026" SimLocationY="1027" Datastore="store_890_x10_y55.yap" SimListenPort="9990" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37a" SimName="890" SimLocationX="1026" SimLocationY="1027" Datastore="store_890_x10_y55.yap" SimListenPort="9990" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_891.xml b/share/regions/config_891.xml
index 16b1c82..e2d6c29 100644
--- a/share/regions/config_891.xml
+++ b/share/regions/config_891.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37b" SimName="891" SimLocationX="1027" SimLocationY="1027" Datastore="store_891_x11_y55.yap" SimListenPort="9991" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37b" SimName="891" SimLocationX="1027" SimLocationY="1027" Datastore="store_891_x11_y55.yap" SimListenPort="9991" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_892.xml b/share/regions/config_892.xml
index d1b3545..1c65f30 100644
--- a/share/regions/config_892.xml
+++ b/share/regions/config_892.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37c" SimName="892" SimLocationX="1028" SimLocationY="1027" Datastore="store_892_x12_y55.yap" SimListenPort="9992" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37c" SimName="892" SimLocationX="1028" SimLocationY="1027" Datastore="store_892_x12_y55.yap" SimListenPort="9992" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_893.xml b/share/regions/config_893.xml
index 77e3e51..0caf3b9 100644
--- a/share/regions/config_893.xml
+++ b/share/regions/config_893.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37d" SimName="893" SimLocationX="1029" SimLocationY="1027" Datastore="store_893_x13_y55.yap" SimListenPort="9993" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37d" SimName="893" SimLocationX="1029" SimLocationY="1027" Datastore="store_893_x13_y55.yap" SimListenPort="9993" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_894.xml b/share/regions/config_894.xml
index f313e48..dddf48e 100644
--- a/share/regions/config_894.xml
+++ b/share/regions/config_894.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37e" SimName="894" SimLocationX="1030" SimLocationY="1027" Datastore="store_894_x14_y55.yap" SimListenPort="9994" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37e" SimName="894" SimLocationX="1030" SimLocationY="1027" Datastore="store_894_x14_y55.yap" SimListenPort="9994" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_895.xml b/share/regions/config_895.xml
index 4e5204c..3bdda06 100644
--- a/share/regions/config_895.xml
+++ b/share/regions/config_895.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37f" SimName="895" SimLocationX="1031" SimLocationY="1027" Datastore="store_895_x15_y55.yap" SimListenPort="9995" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf37f" SimName="895" SimLocationX="1031" SimLocationY="1027" Datastore="store_895_x15_y55.yap" SimListenPort="9995" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-40.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_896.xml b/share/regions/config_896.xml
index 54de294..0f69a81 100644
--- a/share/regions/config_896.xml
+++ b/share/regions/config_896.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf380" SimName="896" SimLocationX="1000" SimLocationY="1028" Datastore="store_896_x00_y56.yap" SimListenPort="9996" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf380" SimName="896" SimLocationX="1000" SimLocationY="1028" Datastore="store_896_x00_y56.yap" SimListenPort="9996" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_897.xml b/share/regions/config_897.xml
index 0a7ca98..9e1304e 100644
--- a/share/regions/config_897.xml
+++ b/share/regions/config_897.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf381" SimName="897" SimLocationX="1001" SimLocationY="1028" Datastore="store_897_x01_y56.yap" SimListenPort="9997" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf381" SimName="897" SimLocationX="1001" SimLocationY="1028" Datastore="store_897_x01_y56.yap" SimListenPort="9997" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_898.xml b/share/regions/config_898.xml
index 919b69e..a07a02a 100644
--- a/share/regions/config_898.xml
+++ b/share/regions/config_898.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf382" SimName="898" SimLocationX="1002" SimLocationY="1028" Datastore="store_898_x02_y56.yap" SimListenPort="9998" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf382" SimName="898" SimLocationX="1002" SimLocationY="1028" Datastore="store_898_x02_y56.yap" SimListenPort="9998" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_899.xml b/share/regions/config_899.xml
index b379919..83b0cbb 100644
--- a/share/regions/config_899.xml
+++ b/share/regions/config_899.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf383" SimName="899" SimLocationX="1003" SimLocationY="1028" Datastore="store_899_x03_y56.yap" SimListenPort="9999" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf383" SimName="899" SimLocationX="1003" SimLocationY="1028" Datastore="store_899_x03_y56.yap" SimListenPort="9999" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_9.xml b/share/regions/config_9.xml
index ab795c9..83f2895 100644
--- a/share/regions/config_9.xml
+++ b/share/regions/config_9.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf009" SimName="9" SimLocationX="1009" SimLocationY="1000" Datastore="store_9_x09_y00.yap" SimListenPort="9109" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf009" SimName="9" SimLocationX="1009" SimLocationY="1000" Datastore="store_9_x09_y00.yap" SimListenPort="9109" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y15.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_90.xml b/share/regions/config_90.xml
index 1493d48..e1784d3 100644
--- a/share/regions/config_90.xml
+++ b/share/regions/config_90.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05a" SimName="90" SimLocationX="1026" SimLocationY="1002" Datastore="store_90_x10_y05.yap" SimListenPort="9190" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05a" SimName="90" SimLocationX="1026" SimLocationY="1002" Datastore="store_90_x10_y05.yap" SimListenPort="9190" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_900.xml b/share/regions/config_900.xml
index 9f0b217..b2bd852 100644
--- a/share/regions/config_900.xml
+++ b/share/regions/config_900.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf384" SimName="900" SimLocationX="1004" SimLocationY="1028" Datastore="store_900_x04_y56.yap" SimListenPort="10000" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf384" SimName="900" SimLocationX="1004" SimLocationY="1028" Datastore="store_900_x04_y56.yap" SimListenPort="10000" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_901.xml b/share/regions/config_901.xml
index 2c7f4d0..8c3a0e3 100644
--- a/share/regions/config_901.xml
+++ b/share/regions/config_901.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf385" SimName="901" SimLocationX="1005" SimLocationY="1028" Datastore="store_901_x05_y56.yap" SimListenPort="10001" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf385" SimName="901" SimLocationX="1005" SimLocationY="1028" Datastore="store_901_x05_y56.yap" SimListenPort="10001" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_902.xml b/share/regions/config_902.xml
index 4e353df..140e7c6 100644
--- a/share/regions/config_902.xml
+++ b/share/regions/config_902.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf386" SimName="902" SimLocationX="1006" SimLocationY="1028" Datastore="store_902_x06_y56.yap" SimListenPort="10002" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf386" SimName="902" SimLocationX="1006" SimLocationY="1028" Datastore="store_902_x06_y56.yap" SimListenPort="10002" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_903.xml b/share/regions/config_903.xml
index 1c95582..77cd4e0 100644
--- a/share/regions/config_903.xml
+++ b/share/regions/config_903.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf387" SimName="903" SimLocationX="1007" SimLocationY="1028" Datastore="store_903_x07_y56.yap" SimListenPort="10003" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf387" SimName="903" SimLocationX="1007" SimLocationY="1028" Datastore="store_903_x07_y56.yap" SimListenPort="10003" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_904.xml b/share/regions/config_904.xml
index 7e007a7..7ebc959 100644
--- a/share/regions/config_904.xml
+++ b/share/regions/config_904.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf388" SimName="904" SimLocationX="1008" SimLocationY="1028" Datastore="store_904_x08_y56.yap" SimListenPort="10004" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf388" SimName="904" SimLocationX="1008" SimLocationY="1028" Datastore="store_904_x08_y56.yap" SimListenPort="10004" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_905.xml b/share/regions/config_905.xml
index fe91207..7c69e90 100644
--- a/share/regions/config_905.xml
+++ b/share/regions/config_905.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf389" SimName="905" SimLocationX="1009" SimLocationY="1028" Datastore="store_905_x09_y56.yap" SimListenPort="10005" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf389" SimName="905" SimLocationX="1009" SimLocationY="1028" Datastore="store_905_x09_y56.yap" SimListenPort="10005" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_906.xml b/share/regions/config_906.xml
index 5d69d23..54032f5 100644
--- a/share/regions/config_906.xml
+++ b/share/regions/config_906.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38a" SimName="906" SimLocationX="1010" SimLocationY="1028" Datastore="store_906_x10_y56.yap" SimListenPort="10006" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38a" SimName="906" SimLocationX="1010" SimLocationY="1028" Datastore="store_906_x10_y56.yap" SimListenPort="10006" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_907.xml b/share/regions/config_907.xml
index f8efb84..820da51 100644
--- a/share/regions/config_907.xml
+++ b/share/regions/config_907.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38b" SimName="907" SimLocationX="1011" SimLocationY="1028" Datastore="store_907_x11_y56.yap" SimListenPort="10007" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38b" SimName="907" SimLocationX="1011" SimLocationY="1028" Datastore="store_907_x11_y56.yap" SimListenPort="10007" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_908.xml b/share/regions/config_908.xml
index f17d7b3..76dab3f 100644
--- a/share/regions/config_908.xml
+++ b/share/regions/config_908.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38c" SimName="908" SimLocationX="1012" SimLocationY="1028" Datastore="store_908_x12_y56.yap" SimListenPort="10008" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38c" SimName="908" SimLocationX="1012" SimLocationY="1028" Datastore="store_908_x12_y56.yap" SimListenPort="10008" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_909.xml b/share/regions/config_909.xml
index cfd5fb1..a0db045 100644
--- a/share/regions/config_909.xml
+++ b/share/regions/config_909.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38d" SimName="909" SimLocationX="1013" SimLocationY="1028" Datastore="store_909_x13_y56.yap" SimListenPort="10009" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38d" SimName="909" SimLocationX="1013" SimLocationY="1028" Datastore="store_909_x13_y56.yap" SimListenPort="10009" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_91.xml b/share/regions/config_91.xml
index 3d25728..75bced8 100644
--- a/share/regions/config_91.xml
+++ b/share/regions/config_91.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05b" SimName="91" SimLocationX="1027" SimLocationY="1002" Datastore="store_91_x11_y05.yap" SimListenPort="9191" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05b" SimName="91" SimLocationX="1027" SimLocationY="1002" Datastore="store_91_x11_y05.yap" SimListenPort="9191" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_910.xml b/share/regions/config_910.xml
index ddaa044..d9d0e72 100644
--- a/share/regions/config_910.xml
+++ b/share/regions/config_910.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38e" SimName="910" SimLocationX="1014" SimLocationY="1028" Datastore="store_910_x14_y56.yap" SimListenPort="10010" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38e" SimName="910" SimLocationX="1014" SimLocationY="1028" Datastore="store_910_x14_y56.yap" SimListenPort="10010" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_911.xml b/share/regions/config_911.xml
index 405cf70..778b38a 100644
--- a/share/regions/config_911.xml
+++ b/share/regions/config_911.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38f" SimName="911" SimLocationX="1015" SimLocationY="1028" Datastore="store_911_x15_y56.yap" SimListenPort="10011" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf38f" SimName="911" SimLocationX="1015" SimLocationY="1028" Datastore="store_911_x15_y56.yap" SimListenPort="10011" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-41.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_912.xml b/share/regions/config_912.xml
index 88298bd..1908b61 100644
--- a/share/regions/config_912.xml
+++ b/share/regions/config_912.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf390" SimName="912" SimLocationX="1016" SimLocationY="1028" Datastore="store_912_x00_y57.yap" SimListenPort="10012" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf390" SimName="912" SimLocationX="1016" SimLocationY="1028" Datastore="store_912_x00_y57.yap" SimListenPort="10012" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_913.xml b/share/regions/config_913.xml
index ae50f3f..b41952c 100644
--- a/share/regions/config_913.xml
+++ b/share/regions/config_913.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf391" SimName="913" SimLocationX="1017" SimLocationY="1028" Datastore="store_913_x01_y57.yap" SimListenPort="10013" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf391" SimName="913" SimLocationX="1017" SimLocationY="1028" Datastore="store_913_x01_y57.yap" SimListenPort="10013" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_914.xml b/share/regions/config_914.xml
index bc51b2d..7449505 100644
--- a/share/regions/config_914.xml
+++ b/share/regions/config_914.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf392" SimName="914" SimLocationX="1018" SimLocationY="1028" Datastore="store_914_x02_y57.yap" SimListenPort="10014" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf392" SimName="914" SimLocationX="1018" SimLocationY="1028" Datastore="store_914_x02_y57.yap" SimListenPort="10014" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_915.xml b/share/regions/config_915.xml
index 492a463..5113c74 100644
--- a/share/regions/config_915.xml
+++ b/share/regions/config_915.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf393" SimName="915" SimLocationX="1019" SimLocationY="1028" Datastore="store_915_x03_y57.yap" SimListenPort="10015" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf393" SimName="915" SimLocationX="1019" SimLocationY="1028" Datastore="store_915_x03_y57.yap" SimListenPort="10015" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_916.xml b/share/regions/config_916.xml
index 2d11875..16939e0 100644
--- a/share/regions/config_916.xml
+++ b/share/regions/config_916.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf394" SimName="916" SimLocationX="1020" SimLocationY="1028" Datastore="store_916_x04_y57.yap" SimListenPort="10016" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf394" SimName="916" SimLocationX="1020" SimLocationY="1028" Datastore="store_916_x04_y57.yap" SimListenPort="10016" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_917.xml b/share/regions/config_917.xml
index 4ff3d2d..e29cdd0 100644
--- a/share/regions/config_917.xml
+++ b/share/regions/config_917.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf395" SimName="917" SimLocationX="1021" SimLocationY="1028" Datastore="store_917_x05_y57.yap" SimListenPort="10017" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf395" SimName="917" SimLocationX="1021" SimLocationY="1028" Datastore="store_917_x05_y57.yap" SimListenPort="10017" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_918.xml b/share/regions/config_918.xml
index 985dd0f..0dfd9cc 100644
--- a/share/regions/config_918.xml
+++ b/share/regions/config_918.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf396" SimName="918" SimLocationX="1022" SimLocationY="1028" Datastore="store_918_x06_y57.yap" SimListenPort="10018" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf396" SimName="918" SimLocationX="1022" SimLocationY="1028" Datastore="store_918_x06_y57.yap" SimListenPort="10018" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_919.xml b/share/regions/config_919.xml
index 6fdace3..e9820c4 100644
--- a/share/regions/config_919.xml
+++ b/share/regions/config_919.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf397" SimName="919" SimLocationX="1023" SimLocationY="1028" Datastore="store_919_x07_y57.yap" SimListenPort="10019" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf397" SimName="919" SimLocationX="1023" SimLocationY="1028" Datastore="store_919_x07_y57.yap" SimListenPort="10019" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_92.xml b/share/regions/config_92.xml
index 7484e94..969e14a 100644
--- a/share/regions/config_92.xml
+++ b/share/regions/config_92.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05c" SimName="92" SimLocationX="1028" SimLocationY="1002" Datastore="store_92_x12_y05.yap" SimListenPort="9192" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05c" SimName="92" SimLocationX="1028" SimLocationY="1002" Datastore="store_92_x12_y05.yap" SimListenPort="9192" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_920.xml b/share/regions/config_920.xml
index a1ae514..6f54ceb 100644
--- a/share/regions/config_920.xml
+++ b/share/regions/config_920.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf398" SimName="920" SimLocationX="1024" SimLocationY="1028" Datastore="store_920_x08_y57.yap" SimListenPort="10020" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf398" SimName="920" SimLocationX="1024" SimLocationY="1028" Datastore="store_920_x08_y57.yap" SimListenPort="10020" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_921.xml b/share/regions/config_921.xml
index 44e612a..f4814af 100644
--- a/share/regions/config_921.xml
+++ b/share/regions/config_921.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf399" SimName="921" SimLocationX="1025" SimLocationY="1028" Datastore="store_921_x09_y57.yap" SimListenPort="10021" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf399" SimName="921" SimLocationX="1025" SimLocationY="1028" Datastore="store_921_x09_y57.yap" SimListenPort="10021" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_922.xml b/share/regions/config_922.xml
index 3d19b64..3d76f95 100644
--- a/share/regions/config_922.xml
+++ b/share/regions/config_922.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39a" SimName="922" SimLocationX="1026" SimLocationY="1028" Datastore="store_922_x10_y57.yap" SimListenPort="10022" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39a" SimName="922" SimLocationX="1026" SimLocationY="1028" Datastore="store_922_x10_y57.yap" SimListenPort="10022" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_923.xml b/share/regions/config_923.xml
index 343ac3f..7fb897e 100644
--- a/share/regions/config_923.xml
+++ b/share/regions/config_923.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39b" SimName="923" SimLocationX="1027" SimLocationY="1028" Datastore="store_923_x11_y57.yap" SimListenPort="10023" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39b" SimName="923" SimLocationX="1027" SimLocationY="1028" Datastore="store_923_x11_y57.yap" SimListenPort="10023" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_924.xml b/share/regions/config_924.xml
index ddcfa10..0552768 100644
--- a/share/regions/config_924.xml
+++ b/share/regions/config_924.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39c" SimName="924" SimLocationX="1028" SimLocationY="1028" Datastore="store_924_x12_y57.yap" SimListenPort="10024" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39c" SimName="924" SimLocationX="1028" SimLocationY="1028" Datastore="store_924_x12_y57.yap" SimListenPort="10024" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_925.xml b/share/regions/config_925.xml
index bd8308a..068a659 100644
--- a/share/regions/config_925.xml
+++ b/share/regions/config_925.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39d" SimName="925" SimLocationX="1029" SimLocationY="1028" Datastore="store_925_x13_y57.yap" SimListenPort="10025" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39d" SimName="925" SimLocationX="1029" SimLocationY="1028" Datastore="store_925_x13_y57.yap" SimListenPort="10025" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_926.xml b/share/regions/config_926.xml
index 8771df5..203a9da 100644
--- a/share/regions/config_926.xml
+++ b/share/regions/config_926.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39e" SimName="926" SimLocationX="1030" SimLocationY="1028" Datastore="store_926_x14_y57.yap" SimListenPort="10026" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39e" SimName="926" SimLocationX="1030" SimLocationY="1028" Datastore="store_926_x14_y57.yap" SimListenPort="10026" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_927.xml b/share/regions/config_927.xml
index 2275d3a..f30ff6e 100644
--- a/share/regions/config_927.xml
+++ b/share/regions/config_927.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39f" SimName="927" SimLocationX="1031" SimLocationY="1028" Datastore="store_927_x15_y57.yap" SimListenPort="10027" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf39f" SimName="927" SimLocationX="1031" SimLocationY="1028" Datastore="store_927_x15_y57.yap" SimListenPort="10027" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-42.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_928.xml b/share/regions/config_928.xml
index 347bf87..34c70df 100644
--- a/share/regions/config_928.xml
+++ b/share/regions/config_928.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a0" SimName="928" SimLocationX="1000" SimLocationY="1029" Datastore="store_928_x00_y58.yap" SimListenPort="10028" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a0" SimName="928" SimLocationX="1000" SimLocationY="1029" Datastore="store_928_x00_y58.yap" SimListenPort="10028" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_929.xml b/share/regions/config_929.xml
index a7ed82b..a07b2e6 100644
--- a/share/regions/config_929.xml
+++ b/share/regions/config_929.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a1" SimName="929" SimLocationX="1001" SimLocationY="1029" Datastore="store_929_x01_y58.yap" SimListenPort="10029" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a1" SimName="929" SimLocationX="1001" SimLocationY="1029" Datastore="store_929_x01_y58.yap" SimListenPort="10029" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_93.xml b/share/regions/config_93.xml
index 922e9c8..de494e8 100644
--- a/share/regions/config_93.xml
+++ b/share/regions/config_93.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05d" SimName="93" SimLocationX="1029" SimLocationY="1002" Datastore="store_93_x13_y05.yap" SimListenPort="9193" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05d" SimName="93" SimLocationX="1029" SimLocationY="1002" Datastore="store_93_x13_y05.yap" SimListenPort="9193" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_930.xml b/share/regions/config_930.xml
index 0aa90f7..046e60a 100644
--- a/share/regions/config_930.xml
+++ b/share/regions/config_930.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a2" SimName="930" SimLocationX="1002" SimLocationY="1029" Datastore="store_930_x02_y58.yap" SimListenPort="10030" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a2" SimName="930" SimLocationX="1002" SimLocationY="1029" Datastore="store_930_x02_y58.yap" SimListenPort="10030" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_931.xml b/share/regions/config_931.xml
index b8f520b..dc7ea54 100644
--- a/share/regions/config_931.xml
+++ b/share/regions/config_931.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a3" SimName="931" SimLocationX="1003" SimLocationY="1029" Datastore="store_931_x03_y58.yap" SimListenPort="10031" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a3" SimName="931" SimLocationX="1003" SimLocationY="1029" Datastore="store_931_x03_y58.yap" SimListenPort="10031" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_932.xml b/share/regions/config_932.xml
index 2bc2aea..e2252b1 100644
--- a/share/regions/config_932.xml
+++ b/share/regions/config_932.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a4" SimName="932" SimLocationX="1004" SimLocationY="1029" Datastore="store_932_x04_y58.yap" SimListenPort="10032" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a4" SimName="932" SimLocationX="1004" SimLocationY="1029" Datastore="store_932_x04_y58.yap" SimListenPort="10032" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_933.xml b/share/regions/config_933.xml
index a1cdc75..b84af15 100644
--- a/share/regions/config_933.xml
+++ b/share/regions/config_933.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a5" SimName="933" SimLocationX="1005" SimLocationY="1029" Datastore="store_933_x05_y58.yap" SimListenPort="10033" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a5" SimName="933" SimLocationX="1005" SimLocationY="1029" Datastore="store_933_x05_y58.yap" SimListenPort="10033" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_934.xml b/share/regions/config_934.xml
index 0a893c1..7331ace 100644
--- a/share/regions/config_934.xml
+++ b/share/regions/config_934.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a6" SimName="934" SimLocationX="1006" SimLocationY="1029" Datastore="store_934_x06_y58.yap" SimListenPort="10034" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a6" SimName="934" SimLocationX="1006" SimLocationY="1029" Datastore="store_934_x06_y58.yap" SimListenPort="10034" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_935.xml b/share/regions/config_935.xml
index d4de084..1473c4a 100644
--- a/share/regions/config_935.xml
+++ b/share/regions/config_935.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a7" SimName="935" SimLocationX="1007" SimLocationY="1029" Datastore="store_935_x07_y58.yap" SimListenPort="10035" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a7" SimName="935" SimLocationX="1007" SimLocationY="1029" Datastore="store_935_x07_y58.yap" SimListenPort="10035" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_936.xml b/share/regions/config_936.xml
index 70b40b4..2ec323a 100644
--- a/share/regions/config_936.xml
+++ b/share/regions/config_936.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a8" SimName="936" SimLocationX="1008" SimLocationY="1029" Datastore="store_936_x08_y58.yap" SimListenPort="10036" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a8" SimName="936" SimLocationX="1008" SimLocationY="1029" Datastore="store_936_x08_y58.yap" SimListenPort="10036" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_937.xml b/share/regions/config_937.xml
index 6fd7316..849e7df 100644
--- a/share/regions/config_937.xml
+++ b/share/regions/config_937.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a9" SimName="937" SimLocationX="1009" SimLocationY="1029" Datastore="store_937_x09_y58.yap" SimListenPort="10037" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3a9" SimName="937" SimLocationX="1009" SimLocationY="1029" Datastore="store_937_x09_y58.yap" SimListenPort="10037" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_938.xml b/share/regions/config_938.xml
index cf8d865..f0c6c8e 100644
--- a/share/regions/config_938.xml
+++ b/share/regions/config_938.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3aa" SimName="938" SimLocationX="1010" SimLocationY="1029" Datastore="store_938_x10_y58.yap" SimListenPort="10038" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3aa" SimName="938" SimLocationX="1010" SimLocationY="1029" Datastore="store_938_x10_y58.yap" SimListenPort="10038" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_939.xml b/share/regions/config_939.xml
index 18e724e..849b3fa 100644
--- a/share/regions/config_939.xml
+++ b/share/regions/config_939.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ab" SimName="939" SimLocationX="1011" SimLocationY="1029" Datastore="store_939_x11_y58.yap" SimListenPort="10039" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ab" SimName="939" SimLocationX="1011" SimLocationY="1029" Datastore="store_939_x11_y58.yap" SimListenPort="10039" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_94.xml b/share/regions/config_94.xml
index 47e8187..a499be8 100644
--- a/share/regions/config_94.xml
+++ b/share/regions/config_94.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05e" SimName="94" SimLocationX="1030" SimLocationY="1002" Datastore="store_94_x14_y05.yap" SimListenPort="9194" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05e" SimName="94" SimLocationX="1030" SimLocationY="1002" Datastore="store_94_x14_y05.yap" SimListenPort="9194" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_940.xml b/share/regions/config_940.xml
index 5803c20..2abf0c8 100644
--- a/share/regions/config_940.xml
+++ b/share/regions/config_940.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ac" SimName="940" SimLocationX="1012" SimLocationY="1029" Datastore="store_940_x12_y58.yap" SimListenPort="10040" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ac" SimName="940" SimLocationX="1012" SimLocationY="1029" Datastore="store_940_x12_y58.yap" SimListenPort="10040" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_941.xml b/share/regions/config_941.xml
index 186feff..da8041c 100644
--- a/share/regions/config_941.xml
+++ b/share/regions/config_941.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ad" SimName="941" SimLocationX="1013" SimLocationY="1029" Datastore="store_941_x13_y58.yap" SimListenPort="10041" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ad" SimName="941" SimLocationX="1013" SimLocationY="1029" Datastore="store_941_x13_y58.yap" SimListenPort="10041" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_942.xml b/share/regions/config_942.xml
index 264557b..4ebeb47 100644
--- a/share/regions/config_942.xml
+++ b/share/regions/config_942.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ae" SimName="942" SimLocationX="1014" SimLocationY="1029" Datastore="store_942_x14_y58.yap" SimListenPort="10042" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ae" SimName="942" SimLocationX="1014" SimLocationY="1029" Datastore="store_942_x14_y58.yap" SimListenPort="10042" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_943.xml b/share/regions/config_943.xml
index 3f6a272..a140d50 100644
--- a/share/regions/config_943.xml
+++ b/share/regions/config_943.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3af" SimName="943" SimLocationX="1015" SimLocationY="1029" Datastore="store_943_x15_y58.yap" SimListenPort="10043" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3af" SimName="943" SimLocationX="1015" SimLocationY="1029" Datastore="store_943_x15_y58.yap" SimListenPort="10043" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-43.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_944.xml b/share/regions/config_944.xml
index f244937..b133e44 100644
--- a/share/regions/config_944.xml
+++ b/share/regions/config_944.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b0" SimName="944" SimLocationX="1016" SimLocationY="1029" Datastore="store_944_x00_y59.yap" SimListenPort="10044" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b0" SimName="944" SimLocationX="1016" SimLocationY="1029" Datastore="store_944_x00_y59.yap" SimListenPort="10044" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_945.xml b/share/regions/config_945.xml
index 0a0e9e6..31365e6 100644
--- a/share/regions/config_945.xml
+++ b/share/regions/config_945.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b1" SimName="945" SimLocationX="1017" SimLocationY="1029" Datastore="store_945_x01_y59.yap" SimListenPort="10045" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b1" SimName="945" SimLocationX="1017" SimLocationY="1029" Datastore="store_945_x01_y59.yap" SimListenPort="10045" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_946.xml b/share/regions/config_946.xml
index dbca9e1..17dfa11 100644
--- a/share/regions/config_946.xml
+++ b/share/regions/config_946.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b2" SimName="946" SimLocationX="1018" SimLocationY="1029" Datastore="store_946_x02_y59.yap" SimListenPort="10046" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b2" SimName="946" SimLocationX="1018" SimLocationY="1029" Datastore="store_946_x02_y59.yap" SimListenPort="10046" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_947.xml b/share/regions/config_947.xml
index e0d2ef5..238dbb7 100644
--- a/share/regions/config_947.xml
+++ b/share/regions/config_947.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b3" SimName="947" SimLocationX="1019" SimLocationY="1029" Datastore="store_947_x03_y59.yap" SimListenPort="10047" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b3" SimName="947" SimLocationX="1019" SimLocationY="1029" Datastore="store_947_x03_y59.yap" SimListenPort="10047" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_948.xml b/share/regions/config_948.xml
index 92476ef..c03d17c 100644
--- a/share/regions/config_948.xml
+++ b/share/regions/config_948.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b4" SimName="948" SimLocationX="1020" SimLocationY="1029" Datastore="store_948_x04_y59.yap" SimListenPort="10048" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b4" SimName="948" SimLocationX="1020" SimLocationY="1029" Datastore="store_948_x04_y59.yap" SimListenPort="10048" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_949.xml b/share/regions/config_949.xml
index 41a97e7..70effae 100644
--- a/share/regions/config_949.xml
+++ b/share/regions/config_949.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b5" SimName="949" SimLocationX="1021" SimLocationY="1029" Datastore="store_949_x05_y59.yap" SimListenPort="10049" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b5" SimName="949" SimLocationX="1021" SimLocationY="1029" Datastore="store_949_x05_y59.yap" SimListenPort="10049" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_95.xml b/share/regions/config_95.xml
index 930a609..45daef0 100644
--- a/share/regions/config_95.xml
+++ b/share/regions/config_95.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05f" SimName="95" SimLocationX="1031" SimLocationY="1002" Datastore="store_95_x15_y05.yap" SimListenPort="9195" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf05f" SimName="95" SimLocationX="1031" SimLocationY="1002" Datastore="store_95_x15_y05.yap" SimListenPort="9195" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y10.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_950.xml b/share/regions/config_950.xml
index e772291..56a0d9a 100644
--- a/share/regions/config_950.xml
+++ b/share/regions/config_950.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b6" SimName="950" SimLocationX="1022" SimLocationY="1029" Datastore="store_950_x06_y59.yap" SimListenPort="10050" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b6" SimName="950" SimLocationX="1022" SimLocationY="1029" Datastore="store_950_x06_y59.yap" SimListenPort="10050" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_951.xml b/share/regions/config_951.xml
index 50a0631..5187a55 100644
--- a/share/regions/config_951.xml
+++ b/share/regions/config_951.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b7" SimName="951" SimLocationX="1023" SimLocationY="1029" Datastore="store_951_x07_y59.yap" SimListenPort="10051" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b7" SimName="951" SimLocationX="1023" SimLocationY="1029" Datastore="store_951_x07_y59.yap" SimListenPort="10051" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_952.xml b/share/regions/config_952.xml
index 9c2bc5e..ed7a748 100644
--- a/share/regions/config_952.xml
+++ b/share/regions/config_952.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b8" SimName="952" SimLocationX="1024" SimLocationY="1029" Datastore="store_952_x08_y59.yap" SimListenPort="10052" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b8" SimName="952" SimLocationX="1024" SimLocationY="1029" Datastore="store_952_x08_y59.yap" SimListenPort="10052" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_953.xml b/share/regions/config_953.xml
index d8342fc..0d643eb 100644
--- a/share/regions/config_953.xml
+++ b/share/regions/config_953.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b9" SimName="953" SimLocationX="1025" SimLocationY="1029" Datastore="store_953_x09_y59.yap" SimListenPort="10053" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3b9" SimName="953" SimLocationX="1025" SimLocationY="1029" Datastore="store_953_x09_y59.yap" SimListenPort="10053" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_954.xml b/share/regions/config_954.xml
index 685d074..afeda51 100644
--- a/share/regions/config_954.xml
+++ b/share/regions/config_954.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ba" SimName="954" SimLocationX="1026" SimLocationY="1029" Datastore="store_954_x10_y59.yap" SimListenPort="10054" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ba" SimName="954" SimLocationX="1026" SimLocationY="1029" Datastore="store_954_x10_y59.yap" SimListenPort="10054" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_955.xml b/share/regions/config_955.xml
index 52dfa18..5db5629 100644
--- a/share/regions/config_955.xml
+++ b/share/regions/config_955.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bb" SimName="955" SimLocationX="1027" SimLocationY="1029" Datastore="store_955_x11_y59.yap" SimListenPort="10055" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bb" SimName="955" SimLocationX="1027" SimLocationY="1029" Datastore="store_955_x11_y59.yap" SimListenPort="10055" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_956.xml b/share/regions/config_956.xml
index 8ed9e2b..1533b85 100644
--- a/share/regions/config_956.xml
+++ b/share/regions/config_956.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bc" SimName="956" SimLocationX="1028" SimLocationY="1029" Datastore="store_956_x12_y59.yap" SimListenPort="10056" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bc" SimName="956" SimLocationX="1028" SimLocationY="1029" Datastore="store_956_x12_y59.yap" SimListenPort="10056" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_957.xml b/share/regions/config_957.xml
index 3e9fe73..cf2f316 100644
--- a/share/regions/config_957.xml
+++ b/share/regions/config_957.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bd" SimName="957" SimLocationX="1029" SimLocationY="1029" Datastore="store_957_x13_y59.yap" SimListenPort="10057" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bd" SimName="957" SimLocationX="1029" SimLocationY="1029" Datastore="store_957_x13_y59.yap" SimListenPort="10057" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_958.xml b/share/regions/config_958.xml
index 3636698..a5c717e 100644
--- a/share/regions/config_958.xml
+++ b/share/regions/config_958.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3be" SimName="958" SimLocationX="1030" SimLocationY="1029" Datastore="store_958_x14_y59.yap" SimListenPort="10058" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3be" SimName="958" SimLocationX="1030" SimLocationY="1029" Datastore="store_958_x14_y59.yap" SimListenPort="10058" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_959.xml b/share/regions/config_959.xml
index 3202187..420ef24 100644
--- a/share/regions/config_959.xml
+++ b/share/regions/config_959.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bf" SimName="959" SimLocationX="1031" SimLocationY="1029" Datastore="store_959_x15_y59.yap" SimListenPort="10059" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3bf" SimName="959" SimLocationX="1031" SimLocationY="1029" Datastore="store_959_x15_y59.yap" SimListenPort="10059" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-44.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_96.xml b/share/regions/config_96.xml
index 9227a91..a0b2c6d 100644
--- a/share/regions/config_96.xml
+++ b/share/regions/config_96.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf060" SimName="96" SimLocationX="1000" SimLocationY="1003" Datastore="store_96_x00_y06.yap" SimListenPort="9196" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf060" SimName="96" SimLocationX="1000" SimLocationY="1003" Datastore="store_96_x00_y06.yap" SimListenPort="9196" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_960.xml b/share/regions/config_960.xml
index 8bf372c..9f3cfab 100644
--- a/share/regions/config_960.xml
+++ b/share/regions/config_960.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c0" SimName="960" SimLocationX="1000" SimLocationY="1030" Datastore="store_960_x00_y60.yap" SimListenPort="10060" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c0" SimName="960" SimLocationX="1000" SimLocationY="1030" Datastore="store_960_x00_y60.yap" SimListenPort="10060" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_961.xml b/share/regions/config_961.xml
index 2bc4c13..a9cf48f 100644
--- a/share/regions/config_961.xml
+++ b/share/regions/config_961.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c1" SimName="961" SimLocationX="1001" SimLocationY="1030" Datastore="store_961_x01_y60.yap" SimListenPort="10061" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c1" SimName="961" SimLocationX="1001" SimLocationY="1030" Datastore="store_961_x01_y60.yap" SimListenPort="10061" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_962.xml b/share/regions/config_962.xml
index 80a3554..26b6297 100644
--- a/share/regions/config_962.xml
+++ b/share/regions/config_962.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c2" SimName="962" SimLocationX="1002" SimLocationY="1030" Datastore="store_962_x02_y60.yap" SimListenPort="10062" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c2" SimName="962" SimLocationX="1002" SimLocationY="1030" Datastore="store_962_x02_y60.yap" SimListenPort="10062" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_963.xml b/share/regions/config_963.xml
index 17b9f93..0dcdf62 100644
--- a/share/regions/config_963.xml
+++ b/share/regions/config_963.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c3" SimName="963" SimLocationX="1003" SimLocationY="1030" Datastore="store_963_x03_y60.yap" SimListenPort="10063" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c3" SimName="963" SimLocationX="1003" SimLocationY="1030" Datastore="store_963_x03_y60.yap" SimListenPort="10063" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_964.xml b/share/regions/config_964.xml
index 823730e..1636c2c 100644
--- a/share/regions/config_964.xml
+++ b/share/regions/config_964.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c4" SimName="964" SimLocationX="1004" SimLocationY="1030" Datastore="store_964_x04_y60.yap" SimListenPort="10064" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c4" SimName="964" SimLocationX="1004" SimLocationY="1030" Datastore="store_964_x04_y60.yap" SimListenPort="10064" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_965.xml b/share/regions/config_965.xml
index 8260f46..9a44669 100644
--- a/share/regions/config_965.xml
+++ b/share/regions/config_965.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c5" SimName="965" SimLocationX="1005" SimLocationY="1030" Datastore="store_965_x05_y60.yap" SimListenPort="10065" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c5" SimName="965" SimLocationX="1005" SimLocationY="1030" Datastore="store_965_x05_y60.yap" SimListenPort="10065" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_966.xml b/share/regions/config_966.xml
index 16afa28..416ebee 100644
--- a/share/regions/config_966.xml
+++ b/share/regions/config_966.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c6" SimName="966" SimLocationX="1006" SimLocationY="1030" Datastore="store_966_x06_y60.yap" SimListenPort="10066" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c6" SimName="966" SimLocationX="1006" SimLocationY="1030" Datastore="store_966_x06_y60.yap" SimListenPort="10066" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_967.xml b/share/regions/config_967.xml
index dd7876a..777c1aa 100644
--- a/share/regions/config_967.xml
+++ b/share/regions/config_967.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c7" SimName="967" SimLocationX="1007" SimLocationY="1030" Datastore="store_967_x07_y60.yap" SimListenPort="10067" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c7" SimName="967" SimLocationX="1007" SimLocationY="1030" Datastore="store_967_x07_y60.yap" SimListenPort="10067" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_968.xml b/share/regions/config_968.xml
index 0e62f7b..015ae81 100644
--- a/share/regions/config_968.xml
+++ b/share/regions/config_968.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c8" SimName="968" SimLocationX="1008" SimLocationY="1030" Datastore="store_968_x08_y60.yap" SimListenPort="10068" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c8" SimName="968" SimLocationX="1008" SimLocationY="1030" Datastore="store_968_x08_y60.yap" SimListenPort="10068" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_969.xml b/share/regions/config_969.xml
index 69c6091..7c5e50a 100644
--- a/share/regions/config_969.xml
+++ b/share/regions/config_969.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c9" SimName="969" SimLocationX="1009" SimLocationY="1030" Datastore="store_969_x09_y60.yap" SimListenPort="10069" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3c9" SimName="969" SimLocationX="1009" SimLocationY="1030" Datastore="store_969_x09_y60.yap" SimListenPort="10069" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_97.xml b/share/regions/config_97.xml
index 533c926..373926a 100644
--- a/share/regions/config_97.xml
+++ b/share/regions/config_97.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf061" SimName="97" SimLocationX="1001" SimLocationY="1003" Datastore="store_97_x01_y06.yap" SimListenPort="9197" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf061" SimName="97" SimLocationX="1001" SimLocationY="1003" Datastore="store_97_x01_y06.yap" SimListenPort="9197" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_970.xml b/share/regions/config_970.xml
index 738b338..c541a7c 100644
--- a/share/regions/config_970.xml
+++ b/share/regions/config_970.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ca" SimName="970" SimLocationX="1010" SimLocationY="1030" Datastore="store_970_x10_y60.yap" SimListenPort="10070" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ca" SimName="970" SimLocationX="1010" SimLocationY="1030" Datastore="store_970_x10_y60.yap" SimListenPort="10070" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_971.xml b/share/regions/config_971.xml
index 814ec0b..96817b7 100644
--- a/share/regions/config_971.xml
+++ b/share/regions/config_971.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cb" SimName="971" SimLocationX="1011" SimLocationY="1030" Datastore="store_971_x11_y60.yap" SimListenPort="10071" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cb" SimName="971" SimLocationX="1011" SimLocationY="1030" Datastore="store_971_x11_y60.yap" SimListenPort="10071" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_972.xml b/share/regions/config_972.xml
index 5c6c9f2..881de37 100644
--- a/share/regions/config_972.xml
+++ b/share/regions/config_972.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cc" SimName="972" SimLocationX="1012" SimLocationY="1030" Datastore="store_972_x12_y60.yap" SimListenPort="10072" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cc" SimName="972" SimLocationX="1012" SimLocationY="1030" Datastore="store_972_x12_y60.yap" SimListenPort="10072" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_973.xml b/share/regions/config_973.xml
index c21e807..0925952 100644
--- a/share/regions/config_973.xml
+++ b/share/regions/config_973.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cd" SimName="973" SimLocationX="1013" SimLocationY="1030" Datastore="store_973_x13_y60.yap" SimListenPort="10073" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cd" SimName="973" SimLocationX="1013" SimLocationY="1030" Datastore="store_973_x13_y60.yap" SimListenPort="10073" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_974.xml b/share/regions/config_974.xml
index 159cfc7..b96a01b 100644
--- a/share/regions/config_974.xml
+++ b/share/regions/config_974.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ce" SimName="974" SimLocationX="1014" SimLocationY="1030" Datastore="store_974_x14_y60.yap" SimListenPort="10074" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3ce" SimName="974" SimLocationX="1014" SimLocationY="1030" Datastore="store_974_x14_y60.yap" SimListenPort="10074" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_975.xml b/share/regions/config_975.xml
index 117a250..86cfecb 100644
--- a/share/regions/config_975.xml
+++ b/share/regions/config_975.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cf" SimName="975" SimLocationX="1015" SimLocationY="1030" Datastore="store_975_x15_y60.yap" SimListenPort="10075" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3cf" SimName="975" SimLocationX="1015" SimLocationY="1030" Datastore="store_975_x15_y60.yap" SimListenPort="10075" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-45.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_976.xml b/share/regions/config_976.xml
index a910b53..7ed1331 100644
--- a/share/regions/config_976.xml
+++ b/share/regions/config_976.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d0" SimName="976" SimLocationX="1016" SimLocationY="1030" Datastore="store_976_x00_y61.yap" SimListenPort="10076" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d0" SimName="976" SimLocationX="1016" SimLocationY="1030" Datastore="store_976_x00_y61.yap" SimListenPort="10076" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_977.xml b/share/regions/config_977.xml
index 67e5c69..801846b 100644
--- a/share/regions/config_977.xml
+++ b/share/regions/config_977.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d1" SimName="977" SimLocationX="1017" SimLocationY="1030" Datastore="store_977_x01_y61.yap" SimListenPort="10077" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d1" SimName="977" SimLocationX="1017" SimLocationY="1030" Datastore="store_977_x01_y61.yap" SimListenPort="10077" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_978.xml b/share/regions/config_978.xml
index 5dc48dd..d18aa07 100644
--- a/share/regions/config_978.xml
+++ b/share/regions/config_978.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d2" SimName="978" SimLocationX="1018" SimLocationY="1030" Datastore="store_978_x02_y61.yap" SimListenPort="10078" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d2" SimName="978" SimLocationX="1018" SimLocationY="1030" Datastore="store_978_x02_y61.yap" SimListenPort="10078" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_979.xml b/share/regions/config_979.xml
index 4054954..348d1f0 100644
--- a/share/regions/config_979.xml
+++ b/share/regions/config_979.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d3" SimName="979" SimLocationX="1019" SimLocationY="1030" Datastore="store_979_x03_y61.yap" SimListenPort="10079" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d3" SimName="979" SimLocationX="1019" SimLocationY="1030" Datastore="store_979_x03_y61.yap" SimListenPort="10079" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_98.xml b/share/regions/config_98.xml
index 111c4a9..630f757 100644
--- a/share/regions/config_98.xml
+++ b/share/regions/config_98.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf062" SimName="98" SimLocationX="1002" SimLocationY="1003" Datastore="store_98_x02_y06.yap" SimListenPort="9198" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf062" SimName="98" SimLocationX="1002" SimLocationY="1003" Datastore="store_98_x02_y06.yap" SimListenPort="9198" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_980.xml b/share/regions/config_980.xml
index 75b036f..b65167e 100644
--- a/share/regions/config_980.xml
+++ b/share/regions/config_980.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d4" SimName="980" SimLocationX="1020" SimLocationY="1030" Datastore="store_980_x04_y61.yap" SimListenPort="10080" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d4" SimName="980" SimLocationX="1020" SimLocationY="1030" Datastore="store_980_x04_y61.yap" SimListenPort="10080" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_981.xml b/share/regions/config_981.xml
index fd71c85..fccc8e8 100644
--- a/share/regions/config_981.xml
+++ b/share/regions/config_981.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d5" SimName="981" SimLocationX="1021" SimLocationY="1030" Datastore="store_981_x05_y61.yap" SimListenPort="10081" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d5" SimName="981" SimLocationX="1021" SimLocationY="1030" Datastore="store_981_x05_y61.yap" SimListenPort="10081" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_982.xml b/share/regions/config_982.xml
index c33fcec..842ca5b 100644
--- a/share/regions/config_982.xml
+++ b/share/regions/config_982.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d6" SimName="982" SimLocationX="1022" SimLocationY="1030" Datastore="store_982_x06_y61.yap" SimListenPort="10082" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d6" SimName="982" SimLocationX="1022" SimLocationY="1030" Datastore="store_982_x06_y61.yap" SimListenPort="10082" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_983.xml b/share/regions/config_983.xml
index a989801..e238e51 100644
--- a/share/regions/config_983.xml
+++ b/share/regions/config_983.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d7" SimName="983" SimLocationX="1023" SimLocationY="1030" Datastore="store_983_x07_y61.yap" SimListenPort="10083" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d7" SimName="983" SimLocationX="1023" SimLocationY="1030" Datastore="store_983_x07_y61.yap" SimListenPort="10083" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_984.xml b/share/regions/config_984.xml
index d494071..b66275e 100644
--- a/share/regions/config_984.xml
+++ b/share/regions/config_984.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d8" SimName="984" SimLocationX="1024" SimLocationY="1030" Datastore="store_984_x08_y61.yap" SimListenPort="10084" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d8" SimName="984" SimLocationX="1024" SimLocationY="1030" Datastore="store_984_x08_y61.yap" SimListenPort="10084" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x08_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_985.xml b/share/regions/config_985.xml
index 2239f97..3c2347b 100644
--- a/share/regions/config_985.xml
+++ b/share/regions/config_985.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d9" SimName="985" SimLocationX="1025" SimLocationY="1030" Datastore="store_985_x09_y61.yap" SimListenPort="10085" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3d9" SimName="985" SimLocationX="1025" SimLocationY="1030" Datastore="store_985_x09_y61.yap" SimListenPort="10085" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x09_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_986.xml b/share/regions/config_986.xml
index 67bc5b5..9e3e6bb 100644
--- a/share/regions/config_986.xml
+++ b/share/regions/config_986.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3da" SimName="986" SimLocationX="1026" SimLocationY="1030" Datastore="store_986_x10_y61.yap" SimListenPort="10086" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3da" SimName="986" SimLocationX="1026" SimLocationY="1030" Datastore="store_986_x10_y61.yap" SimListenPort="10086" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x10_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_987.xml b/share/regions/config_987.xml
index f4d52bb..ac64e39 100644
--- a/share/regions/config_987.xml
+++ b/share/regions/config_987.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3db" SimName="987" SimLocationX="1027" SimLocationY="1030" Datastore="store_987_x11_y61.yap" SimListenPort="10087" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3db" SimName="987" SimLocationX="1027" SimLocationY="1030" Datastore="store_987_x11_y61.yap" SimListenPort="10087" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x11_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_988.xml b/share/regions/config_988.xml
index ce12b39..7c8e890 100644
--- a/share/regions/config_988.xml
+++ b/share/regions/config_988.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3dc" SimName="988" SimLocationX="1028" SimLocationY="1030" Datastore="store_988_x12_y61.yap" SimListenPort="10088" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3dc" SimName="988" SimLocationX="1028" SimLocationY="1030" Datastore="store_988_x12_y61.yap" SimListenPort="10088" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x12_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_989.xml b/share/regions/config_989.xml
index dc2c44a..515c375 100644
--- a/share/regions/config_989.xml
+++ b/share/regions/config_989.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3dd" SimName="989" SimLocationX="1029" SimLocationY="1030" Datastore="store_989_x13_y61.yap" SimListenPort="10089" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3dd" SimName="989" SimLocationX="1029" SimLocationY="1030" Datastore="store_989_x13_y61.yap" SimListenPort="10089" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x13_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_99.xml b/share/regions/config_99.xml
index 4be94a1..fb01835 100644
--- a/share/regions/config_99.xml
+++ b/share/regions/config_99.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf063" SimName="99" SimLocationX="1003" SimLocationY="1003" Datastore="store_99_x03_y06.yap" SimListenPort="9199" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf063" SimName="99" SimLocationX="1003" SimLocationY="1003" Datastore="store_99_x03_y06.yap" SimListenPort="9199" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y09.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_990.xml b/share/regions/config_990.xml
index 79c26ac..1cfadec 100644
--- a/share/regions/config_990.xml
+++ b/share/regions/config_990.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3de" SimName="990" SimLocationX="1030" SimLocationY="1030" Datastore="store_990_x14_y61.yap" SimListenPort="10090" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3de" SimName="990" SimLocationX="1030" SimLocationY="1030" Datastore="store_990_x14_y61.yap" SimListenPort="10090" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x14_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_991.xml b/share/regions/config_991.xml
index aefaa04..10e7682 100644
--- a/share/regions/config_991.xml
+++ b/share/regions/config_991.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3df" SimName="991" SimLocationX="1031" SimLocationY="1030" Datastore="store_991_x15_y61.yap" SimListenPort="10091" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3df" SimName="991" SimLocationX="1031" SimLocationY="1030" Datastore="store_991_x15_y61.yap" SimListenPort="10091" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x15_y-46.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_992.xml b/share/regions/config_992.xml
index 5b777ac..75d86cf 100644
--- a/share/regions/config_992.xml
+++ b/share/regions/config_992.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e0" SimName="992" SimLocationX="1000" SimLocationY="1031" Datastore="store_992_x00_y62.yap" SimListenPort="10092" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e0" SimName="992" SimLocationX="1000" SimLocationY="1031" Datastore="store_992_x00_y62.yap" SimListenPort="10092" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x00_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_993.xml b/share/regions/config_993.xml
index 193dc0f..2b5d64c 100644
--- a/share/regions/config_993.xml
+++ b/share/regions/config_993.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e1" SimName="993" SimLocationX="1001" SimLocationY="1031" Datastore="store_993_x01_y62.yap" SimListenPort="10093" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e1" SimName="993" SimLocationX="1001" SimLocationY="1031" Datastore="store_993_x01_y62.yap" SimListenPort="10093" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x01_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_994.xml b/share/regions/config_994.xml
index 2481ec9..0137029 100644
--- a/share/regions/config_994.xml
+++ b/share/regions/config_994.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e2" SimName="994" SimLocationX="1002" SimLocationY="1031" Datastore="store_994_x02_y62.yap" SimListenPort="10094" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e2" SimName="994" SimLocationX="1002" SimLocationY="1031" Datastore="store_994_x02_y62.yap" SimListenPort="10094" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x02_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_995.xml b/share/regions/config_995.xml
index 0947860..ad6d72f 100644
--- a/share/regions/config_995.xml
+++ b/share/regions/config_995.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e3" SimName="995" SimLocationX="1003" SimLocationY="1031" Datastore="store_995_x03_y62.yap" SimListenPort="10095" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e3" SimName="995" SimLocationX="1003" SimLocationY="1031" Datastore="store_995_x03_y62.yap" SimListenPort="10095" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x03_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_996.xml b/share/regions/config_996.xml
index 94e92ab..c88f0d5 100644
--- a/share/regions/config_996.xml
+++ b/share/regions/config_996.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e4" SimName="996" SimLocationX="1004" SimLocationY="1031" Datastore="store_996_x04_y62.yap" SimListenPort="10096" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e4" SimName="996" SimLocationX="1004" SimLocationY="1031" Datastore="store_996_x04_y62.yap" SimListenPort="10096" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x04_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_997.xml b/share/regions/config_997.xml
index 59f280a..7e42eb0 100644
--- a/share/regions/config_997.xml
+++ b/share/regions/config_997.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e5" SimName="997" SimLocationX="1005" SimLocationY="1031" Datastore="store_997_x05_y62.yap" SimListenPort="10097" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e5" SimName="997" SimLocationX="1005" SimLocationY="1031" Datastore="store_997_x05_y62.yap" SimListenPort="10097" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x05_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_998.xml b/share/regions/config_998.xml
index ec78c85..74954b8 100644
--- a/share/regions/config_998.xml
+++ b/share/regions/config_998.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e6" SimName="998" SimLocationX="1006" SimLocationY="1031" Datastore="store_998_x06_y62.yap" SimListenPort="10098" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e6" SimName="998" SimLocationX="1006" SimLocationY="1031" Datastore="store_998_x06_y62.yap" SimListenPort="10098" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x06_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/regions/config_999.xml b/share/regions/config_999.xml
index 4ec70e4..5c5f820 100644
--- a/share/regions/config_999.xml
+++ b/share/regions/config_999.xml
@@ -1,3 +1,3 @@
1<Root> 1<Root>
2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e7" SimName="999" SimLocationX="1007" SimLocationY="1031" Datastore="store_999_x07_y62.yap" SimListenPort="10099" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" /> 2 <Config SimUUID="e24110fd35684a8ba79651a8c81bf3e7" SimName="999" SimLocationX="1007" SimLocationY="1031" Datastore="store_999_x07_y62.yap" SimListenPort="10099" SimListenAddress="SYSTEMIP" TerrainFile="terrain_x07_y-47.r32" TerrainMultiplier="177.8" MasterAvatarFirstName="Adam" MasterAvatarLastName="Omega" MasterAvatarSandboxPassword="bork" />
3</Root> 3</Root>
diff --git a/share/sql/mysql-inventoryfolders.sql b/share/sql/mysql-inventoryfolders.sql
index c30239e..8704702 100644
--- a/share/sql/mysql-inventoryfolders.sql
+++ b/share/sql/mysql-inventoryfolders.sql
@@ -1,9 +1,9 @@
1CREATE TABLE `inventoryfolders` ( 1CREATE TABLE `inventoryfolders` (
2 `folderID` varchar(36) NOT NULL default '', 2 `folderID` varchar(36) NOT NULL default '',
3 `agentID` varchar(36) default NULL, 3 `agentID` varchar(36) default NULL,
4 `parentFolderID` varchar(36) default NULL, 4 `parentFolderID` varchar(36) default NULL,
5 `folderName` varchar(64) default NULL, 5 `folderName` varchar(64) default NULL,
6 PRIMARY KEY (`folderID`), 6 PRIMARY KEY (`folderID`),
7 KEY `owner` (`agentID`), 7 KEY `owner` (`agentID`),
8 KEY `parent` (`parentFolderID`) 8 KEY `parent` (`parentFolderID`)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8; 9) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/share/sql/mysql-inventoryitems.sql b/share/sql/mysql-inventoryitems.sql
index 6e90005..5e03b8d 100644
--- a/share/sql/mysql-inventoryitems.sql
+++ b/share/sql/mysql-inventoryitems.sql
@@ -1,14 +1,14 @@
1CREATE TABLE `inventoryitems` ( 1CREATE TABLE `inventoryitems` (
2 `inventoryID` varchar(36) NOT NULL default '', 2 `inventoryID` varchar(36) NOT NULL default '',
3 `assetID` varchar(36) default NULL, 3 `assetID` varchar(36) default NULL,
4 `type` int(11) default NULL, 4 `type` int(11) default NULL,
5 `parentFolderID` varchar(36) default NULL, 5 `parentFolderID` varchar(36) default NULL,
6 `avatarID` varchar(36) default NULL, 6 `avatarID` varchar(36) default NULL,
7 `inventoryName` varchar(64) default NULL, 7 `inventoryName` varchar(64) default NULL,
8 `inventoryDescription` varchar(64) default NULL, 8 `inventoryDescription` varchar(64) default NULL,
9 `inventoryNextPermissions` int(10) unsigned default NULL, 9 `inventoryNextPermissions` int(10) unsigned default NULL,
10 `inventoryCurrentPermissions` int(10) unsigned default NULL, 10 `inventoryCurrentPermissions` int(10) unsigned default NULL,
11 PRIMARY KEY (`inventoryID`), 11 PRIMARY KEY (`inventoryID`),
12 KEY `owner` (`avatarID`), 12 KEY `owner` (`avatarID`),
13 KEY `folder` (`parentFolderID`) 13 KEY `folder` (`parentFolderID`)
14) ENGINE=InnoDB DEFAULT CHARSET=utf8; 14) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/share/sql/mysql-reservations.txt b/share/sql/mysql-reservations.txt
index d6d84b9..9dab31d 100644
--- a/share/sql/mysql-reservations.txt
+++ b/share/sql/mysql-reservations.txt
@@ -1,16 +1,16 @@
1CREATE TABLE `reservations` ( 1CREATE TABLE `reservations` (
2 `resID` int(10) unsigned NOT NULL auto_increment, 2 `resID` int(10) unsigned NOT NULL auto_increment,
3 `userUUID` varchar(36) default NULL, 3 `userUUID` varchar(36) default NULL,
4 `gridSendKey` varchar(64) default NULL, 4 `gridSendKey` varchar(64) default NULL,
5 `gridRecvKey` varchar(64) default NULL, 5 `gridRecvKey` varchar(64) default NULL,
6 `resName` varchar(255) default NULL, 6 `resName` varchar(255) default NULL,
7 `resCompany` varchar(128) default NULL, 7 `resCompany` varchar(128) default NULL,
8 `resXMin` int(10) unsigned default NULL, 8 `resXMin` int(10) unsigned default NULL,
9 `resXMax` int(10) unsigned default NULL, 9 `resXMax` int(10) unsigned default NULL,
10 `resYMin` int(10) unsigned default NULL, 10 `resYMin` int(10) unsigned default NULL,
11 `resYMax` int(10) unsigned default NULL, 11 `resYMax` int(10) unsigned default NULL,
12 `status` int(10) unsigned default NULL, 12 `status` int(10) unsigned default NULL,
13 PRIMARY KEY (`resID`), 13 PRIMARY KEY (`resID`),
14 KEY `resident` (`userUUID`), 14 KEY `resident` (`userUUID`),
15 KEY `coords` (`resXMin`,`resXMax`,`resYMin`,`resYMax`) 15 KEY `coords` (`resXMin`,`resXMax`,`resYMin`,`resYMax`)
16) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ; 16) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ;