aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/Application.cs58
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs14
-rw-r--r--OpenSim/Region/Application/IApplicationPlugin.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs76
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs84
-rw-r--r--OpenSim/Region/Application/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/Application/RegionApplicationBase.cs12
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs60
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs30
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs38
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs30
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs16
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs242
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs36
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs76
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs52
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs82
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs44
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs58
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs52
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs14
-rw-r--r--OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs22
-rw-r--r--OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs70
-rw-r--r--OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs78
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs42
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs52
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs160
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs38
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs114
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs84
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs60
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs74
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs44
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs178
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs60
-rw-r--r--OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs48
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs104
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs46
-rw-r--r--OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs20
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs78
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs62
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs10
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs22
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs38
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs56
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs28
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs20
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs16
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs66
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs22
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs10
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Access/AccessModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs46
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs52
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs46
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs98
-rw-r--r--OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs38
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs60
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateModule.cs30
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs74
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs50
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs138
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs40
-rw-r--r--OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs224
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs252
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs36
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs54
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs214
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RestartModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Sun/SunModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs22
-rw-r--r--OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Wind/WindModule.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IBuySellModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICloudModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICommander.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityCreator.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityInventory.cs20
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEventQueue.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGodsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IHttpRequests.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IMoapModule.cs8
-rw-r--r--OpenSim/Region/Framework/Interfaces/INPCModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IPresenceModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs28
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs8
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISnmpModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainModule.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IUrlModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IVoiceModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWindModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWorldComm.cs2
-rw-r--r--OpenSim/Region/Framework/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/CollisionSounds.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityManager.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs260
-rw-r--r--OpenSim/Region/Framework/Scenes/KeyframeMotion.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs30
-rw-r--r--OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPMaterial.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPVehicle.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs82
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs58
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs192
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs6
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SceneGraph.cs58
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs192
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs244
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs58
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs278
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs60
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs28
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SimStatsReporter.cs46
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainCompressor.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs22
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs38
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs54
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs32
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/UndoState.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs254
-rw-r--r--OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs182
-rw-r--r--OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs42
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs22
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs40
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs22
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs118
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs48
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs94
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs22
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs4
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs40
-rwxr-xr-xOpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs18
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs130
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs78
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs102
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs80
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs28
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs36
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs8
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs34
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs10
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs18
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs4
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs12
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs2
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs10
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs8
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs36
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs20
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs60
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs32
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs32
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs18
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs16
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs16
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs8
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs310
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs120
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs6
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs2
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSParam.cs210
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSScene.cs10
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs8
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs26
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs16
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs168
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs20
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEApi.cs2470
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs20
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEModule.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs92
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs14
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/OdeScene.cs78
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSCharacter.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs14
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs2470
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs50
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs12
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs38
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs64
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs6
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs58
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs18
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs118
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs74
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs106
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs26
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs76
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs1710
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs76
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs14
-rwxr-xr-xOpenSim/Region/ScriptEngine/XEngine/XEngine.cs82
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs2
489 files changed, 9584 insertions, 9584 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index e441cc8..5cb6a88 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -86,9 +86,9 @@ namespace OpenSim
86 if (logConfigFile != String.Empty) 86 if (logConfigFile != String.Empty)
87 { 87 {
88 XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile)); 88 XmlConfigurator.Configure(new System.IO.FileInfo(logConfigFile));
89 m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file", 89 m_log.InfoFormat("[OPENSIM MAIN]: configured log4net using \"{0}\" as configuration file",
90 logConfigFile); 90 logConfigFile);
91 } 91 }
92 else 92 else
93 { 93 {
94 XmlConfigurator.Configure(); 94 XmlConfigurator.Configure();
@@ -104,22 +104,22 @@ namespace OpenSim
104 "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); 104 "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset");
105 105
106 // Verify the Threadpool allocates or uses enough worker and IO completion threads 106 // Verify the Threadpool allocates or uses enough worker and IO completion threads
107 // .NET 2.0, workerthreads default to 50 * numcores 107 // .NET 2.0, workerthreads default to 50 * numcores
108 // .NET 3.0, workerthreads defaults to 250 * numcores 108 // .NET 3.0, workerthreads defaults to 250 * numcores
109 // .NET 4.0, workerthreads are dynamic based on bitness and OS resources 109 // .NET 4.0, workerthreads are dynamic based on bitness and OS resources
110 // Max IO Completion threads are 1000 on all 3 CLRs 110 // Max IO Completion threads are 1000 on all 3 CLRs
111 // 111 //
112 // Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores 112 // Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores
113 int workerThreadsMin = 500; 113 int workerThreadsMin = 500;
114 int workerThreadsMax = 1000; // may need further adjustment to match other CLR 114 int workerThreadsMax = 1000; // may need further adjustment to match other CLR
115 int iocpThreadsMin = 1000; 115 int iocpThreadsMin = 1000;
116 int iocpThreadsMax = 2000; // may need further adjustment to match other CLR 116 int iocpThreadsMax = 2000; // may need further adjustment to match other CLR
117 117
118 { 118 {
119 int currentMinWorkerThreads, currentMinIocpThreads; 119 int currentMinWorkerThreads, currentMinIocpThreads;
120 System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads); 120 System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads);
121 m_log.InfoFormat( 121 m_log.InfoFormat(
122 "[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads", 122 "[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads",
123 currentMinWorkerThreads, currentMinIocpThreads); 123 currentMinWorkerThreads, currentMinIocpThreads);
124 } 124 }
125 125
@@ -138,30 +138,30 @@ namespace OpenSim
138 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads); 138 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads);
139 } 139 }
140 140
141 // Increase the number of IOCP threads available. 141 // Increase the number of IOCP threads available.
142 // Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17) 142 // Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17)
143 if (iocpThreads < iocpThreadsMin) 143 if (iocpThreads < iocpThreadsMin)
144 { 144 {
145 iocpThreads = iocpThreadsMin; 145 iocpThreads = iocpThreadsMin;
146 m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IOCP threads to {0}",iocpThreads); 146 m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IOCP threads to {0}",iocpThreads);
147 } 147 }
148 // Make sure we don't overallocate IOCP threads and thrash system resources 148 // Make sure we don't overallocate IOCP threads and thrash system resources
149 if ( iocpThreads > iocpThreadsMax ) 149 if ( iocpThreads > iocpThreadsMax )
150 { 150 {
151 iocpThreads = iocpThreadsMax; 151 iocpThreads = iocpThreadsMax;
152 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IOCP completion threads to {0}",iocpThreads); 152 m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IOCP completion threads to {0}",iocpThreads);
153 } 153 }
154 // set the resulting worker and IO completion thread counts back to ThreadPool 154 // set the resulting worker and IO completion thread counts back to ThreadPool
155 if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) ) 155 if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) )
156 { 156 {
157 m_log.InfoFormat( 157 m_log.InfoFormat(
158 "[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IOCP threads", 158 "[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IOCP threads",
159 workerThreads, iocpThreads); 159 workerThreads, iocpThreads);
160 } 160 }
161 else 161 else
162 { 162 {
163 m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect."); 163 m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect.");
164 } 164 }
165 165
166 // Check if the system is compatible with OpenSimulator. 166 // Check if the system is compatible with OpenSimulator.
167 // Ensures that the minimum system requirements are met 167 // Ensures that the minimum system requirements are met
@@ -179,7 +179,7 @@ namespace OpenSim
179 Culture.SetCurrentCulture(); 179 Culture.SetCurrentCulture();
180 180
181 // Validate that the user has the most basic configuration done 181 // Validate that the user has the most basic configuration done
182 // If not, offer to do the most basic configuration for them warning them along the way of the importance of 182 // If not, offer to do the most basic configuration for them warning them along the way of the importance of
183 // reading these files. 183 // reading these files.
184 /* 184 /*
185 m_log.Info("Checking for reguired configuration...\n"); 185 m_log.Info("Checking for reguired configuration...\n");
@@ -188,13 +188,13 @@ namespace OpenSim
188 || (File.Exists(Path.Combine(Util.configDir(), "opensim.ini"))) 188 || (File.Exists(Path.Combine(Util.configDir(), "opensim.ini")))
189 || (File.Exists(Path.Combine(Util.configDir(), "openSim.ini"))) 189 || (File.Exists(Path.Combine(Util.configDir(), "openSim.ini")))
190 || (File.Exists(Path.Combine(Util.configDir(), "Opensim.ini"))); 190 || (File.Exists(Path.Combine(Util.configDir(), "Opensim.ini")));
191 191
192 bool StanaloneCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "StandaloneCommon.ini")); 192 bool StanaloneCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "StandaloneCommon.ini"));
193 bool StanaloneCommon_lowercased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "standalonecommon.ini")); 193 bool StanaloneCommon_lowercased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "standalonecommon.ini"));
194 bool GridCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "GridCommon.ini")); 194 bool GridCommon_ProperCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "GridCommon.ini"));
195 bool GridCommon_lowerCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "gridcommon.ini")); 195 bool GridCommon_lowerCased = File.Exists(Path.Combine(Path.Combine(Util.configDir(), "config-include"), "gridcommon.ini"));
196 196
197 if ((OpenSim_Ini) 197 if ((OpenSim_Ini)
198 && ( 198 && (
199 (StanaloneCommon_ProperCased 199 (StanaloneCommon_ProperCased
200 || StanaloneCommon_lowercased 200 || StanaloneCommon_lowercased
@@ -212,7 +212,7 @@ namespace OpenSim
212 "yes"); 212 "yes");
213 if (resp == "yes") 213 if (resp == "yes")
214 { 214 {
215 215
216 if (!(OpenSim_Ini)) 216 if (!(OpenSim_Ini))
217 { 217 {
218 try 218 try
@@ -312,7 +312,7 @@ namespace OpenSim
312 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false); 312 m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
313 313
314 // load Crash directory config 314 // load Crash directory config
315 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir); 315 m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
316 316
317 if (background) 317 if (background)
318 { 318 {
@@ -320,9 +320,9 @@ namespace OpenSim
320 m_sim.Startup(); 320 m_sim.Startup();
321 } 321 }
322 else 322 else
323 { 323 {
324 m_sim = new OpenSim(configSource); 324 m_sim = new OpenSim(configSource);
325 325
326 m_sim.Startup(); 326 m_sim.Startup();
327 327
328 while (true) 328 while (true)
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 4f141a6..62bd4f4 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -43,10 +43,10 @@ namespace OpenSim
43 public class ConfigurationLoader 43 public class ConfigurationLoader
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 /// <summary> 47 /// <summary>
48 /// Various Config settings the region needs to start 48 /// Various Config settings the region needs to start
49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor, 49 /// Physics Engine, Mesh Engine, GridMode, PhysicsPrim allowed, Neighbor,
50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack 50 /// StorageDLL, Storage Connection String, Estate connection String, Client Stack
51 /// Standalone settings. 51 /// Standalone settings.
52 /// </summary> 52 /// </summary>
@@ -188,7 +188,7 @@ namespace OpenSim
188 { 188 {
189 iniFileExists = true; 189 iniFileExists = true;
190 AddIncludes(overrideConfig, overrideSources); 190 AddIncludes(overrideConfig, overrideSources);
191 } 191 }
192 } 192 }
193 m_config.Source.Merge(overrideConfig.Source); 193 m_config.Source.Merge(overrideConfig.Source);
194 } 194 }
@@ -198,7 +198,7 @@ namespace OpenSim
198 { 198 {
199 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 199 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
200 Environment.Exit(1); 200 Environment.Exit(1);
201 } 201 }
202 else if (!iniFileExists) 202 else if (!iniFileExists)
203 { 203 {
204 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 204 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
@@ -257,14 +257,14 @@ namespace OpenSim
257 string path = Path.Combine(basepath, chunkWithoutWildcards); 257 string path = Path.Combine(basepath, chunkWithoutWildcards);
258 path = Path.GetFullPath(path) + chunkWithWildcards; 258 path = Path.GetFullPath(path) + chunkWithWildcards;
259 string[] paths = Util.Glob(path); 259 string[] paths = Util.Glob(path);
260 260
261 // If the include path contains no wildcards, then warn the user that it wasn't found. 261 // If the include path contains no wildcards, then warn the user that it wasn't found.
262 if (wildcardIndex == -1 && paths.Length == 0) 262 if (wildcardIndex == -1 && paths.Length == 0)
263 { 263 {
264 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path); 264 m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path);
265 } 265 }
266 else 266 else
267 { 267 {
268 foreach (string p in paths) 268 foreach (string p in paths)
269 { 269 {
270 if (!sources.Contains(p)) 270 if (!sources.Contains(p))
@@ -377,7 +377,7 @@ namespace OpenSim
377 m_configSettings.PhysicsEngine = startupConfig.GetString("physics"); 377 m_configSettings.PhysicsEngine = startupConfig.GetString("physics");
378 m_configSettings.MeshEngineName = startupConfig.GetString("meshing"); 378 m_configSettings.MeshEngineName = startupConfig.GetString("meshing");
379 379
380 m_configSettings.ClientstackDll 380 m_configSettings.ClientstackDll
381 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 381 = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
382 } 382 }
383 383
diff --git a/OpenSim/Region/Application/IApplicationPlugin.cs b/OpenSim/Region/Application/IApplicationPlugin.cs
index a3fa66c..ff3f5d7 100644
--- a/OpenSim/Region/Application/IApplicationPlugin.cs
+++ b/OpenSim/Region/Application/IApplicationPlugin.cs
@@ -43,7 +43,7 @@ namespace OpenSim
43 void Initialise(OpenSimBase openSim); 43 void Initialise(OpenSimBase openSim);
44 44
45 /// <summary> 45 /// <summary>
46 /// Called when the application loading is completed 46 /// Called when the application loading is completed
47 /// </summary> 47 /// </summary>
48 void PostInitialise(); 48 void PostInitialise();
49 } 49 }
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index d9fdcde..8022b1e 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -135,7 +135,7 @@ namespace OpenSim
135 { 135 {
136 // Wait for a signal to be delivered 136 // Wait for a signal to be delivered
137 int index = Mono.Unix.UnixSignal.WaitAny (signals, -1); 137 int index = Mono.Unix.UnixSignal.WaitAny (signals, -1);
138 138
139 //Mono.Unix.Native.Signum signal = signals [index].Signum; 139 //Mono.Unix.Native.Signum signal = signals [index].Signum;
140 MainConsole.Instance.RunCommand("shutdown"); 140 MainConsole.Instance.RunCommand("shutdown");
141 } 141 }
@@ -273,17 +273,17 @@ namespace OpenSim
273 273
274 m_console.Commands.AddCommand("General", false, "change region", 274 m_console.Commands.AddCommand("General", false, "change region",
275 "change region <region name>", 275 "change region <region name>",
276 "Change current console region", 276 "Change current console region",
277 ChangeSelectedRegion); 277 ChangeSelectedRegion);
278 278
279 m_console.Commands.AddCommand("Archiving", false, "save xml", 279 m_console.Commands.AddCommand("Archiving", false, "save xml",
280 "save xml [<file name>]", 280 "save xml [<file name>]",
281 "Save a region's data in XML format", 281 "Save a region's data in XML format",
282 SaveXml); 282 SaveXml);
283 283
284 m_console.Commands.AddCommand("Archiving", false, "save xml2", 284 m_console.Commands.AddCommand("Archiving", false, "save xml2",
285 "save xml2 [<file name>]", 285 "save xml2 [<file name>]",
286 "Save a region's data in XML2 format", 286 "Save a region's data in XML2 format",
287 SaveXml2); 287 SaveXml2);
288 288
289 m_console.Commands.AddCommand("Archiving", false, "load xml", 289 m_console.Commands.AddCommand("Archiving", false, "load xml",
@@ -293,12 +293,12 @@ namespace OpenSim
293 293
294 m_console.Commands.AddCommand("Archiving", false, "load xml2", 294 m_console.Commands.AddCommand("Archiving", false, "load xml2",
295 "load xml2 [<file name>]", 295 "load xml2 [<file name>]",
296 "Load a region's data from XML2 format", 296 "Load a region's data from XML2 format",
297 LoadXml2); 297 LoadXml2);
298 298
299 m_console.Commands.AddCommand("Archiving", false, "save prims xml2", 299 m_console.Commands.AddCommand("Archiving", false, "save prims xml2",
300 "save prims xml2 [<prim name> <file name>]", 300 "save prims xml2 [<prim name> <file name>]",
301 "Save named prim to XML2", 301 "Save named prim to XML2",
302 SavePrimsXml2); 302 SavePrimsXml2);
303 303
304 m_console.Commands.AddCommand("Archiving", false, "load oar", 304 m_console.Commands.AddCommand("Archiving", false, "load oar",
@@ -352,7 +352,7 @@ namespace OpenSim
352 352
353 m_console.Commands.AddCommand("Objects", false, "edit scale", 353 m_console.Commands.AddCommand("Objects", false, "edit scale",
354 "edit scale <name> <x> <y> <z>", 354 "edit scale <name> <x> <y> <z>",
355 "Change the scale of a named prim", 355 "Change the scale of a named prim",
356 HandleEditScale); 356 HandleEditScale);
357 357
358 m_console.Commands.AddCommand("Objects", false, "rotate scene", 358 m_console.Commands.AddCommand("Objects", false, "rotate scene",
@@ -379,44 +379,44 @@ namespace OpenSim
379 379
380 m_console.Commands.AddCommand("Users", false, "show users", 380 m_console.Commands.AddCommand("Users", false, "show users",
381 "show users [full]", 381 "show users [full]",
382 "Show user data for users currently on the region", 382 "Show user data for users currently on the region",
383 "Without the 'full' option, only users actually on the region are shown." 383 "Without the 'full' option, only users actually on the region are shown."
384 + " With the 'full' option child agents of users in neighbouring regions are also shown.", 384 + " With the 'full' option child agents of users in neighbouring regions are also shown.",
385 HandleShow); 385 HandleShow);
386 386
387 m_console.Commands.AddCommand("Comms", false, "show connections", 387 m_console.Commands.AddCommand("Comms", false, "show connections",
388 "show connections", 388 "show connections",
389 "Show connection data", 389 "Show connection data",
390 HandleShow); 390 HandleShow);
391 391
392 m_console.Commands.AddCommand("Comms", false, "show circuits", 392 m_console.Commands.AddCommand("Comms", false, "show circuits",
393 "show circuits", 393 "show circuits",
394 "Show agent circuit data", 394 "Show agent circuit data",
395 HandleShow); 395 HandleShow);
396 396
397 m_console.Commands.AddCommand("Comms", false, "show pending-objects", 397 m_console.Commands.AddCommand("Comms", false, "show pending-objects",
398 "show pending-objects", 398 "show pending-objects",
399 "Show # of objects on the pending queues of all scene viewers", 399 "Show # of objects on the pending queues of all scene viewers",
400 HandleShow); 400 HandleShow);
401 401
402 m_console.Commands.AddCommand("General", false, "show modules", 402 m_console.Commands.AddCommand("General", false, "show modules",
403 "show modules", 403 "show modules",
404 "Show module data", 404 "Show module data",
405 HandleShow); 405 HandleShow);
406 406
407 m_console.Commands.AddCommand("Regions", false, "show regions", 407 m_console.Commands.AddCommand("Regions", false, "show regions",
408 "show regions", 408 "show regions",
409 "Show region data", 409 "Show region data",
410 HandleShow); 410 HandleShow);
411 411
412 m_console.Commands.AddCommand("Regions", false, "show ratings", 412 m_console.Commands.AddCommand("Regions", false, "show ratings",
413 "show ratings", 413 "show ratings",
414 "Show rating data", 414 "Show rating data",
415 HandleShow); 415 HandleShow);
416 416
417 m_console.Commands.AddCommand("Objects", false, "backup", 417 m_console.Commands.AddCommand("Objects", false, "backup",
418 "backup", 418 "backup",
419 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.", 419 "Persist currently unsaved object changes immediately instead of waiting for the normal persistence call.",
420 RunCommand); 420 RunCommand);
421 421
422 m_console.Commands.AddCommand("Regions", false, "create region", 422 m_console.Commands.AddCommand("Regions", false, "create region",
@@ -430,22 +430,22 @@ namespace OpenSim
430 430
431 m_console.Commands.AddCommand("Regions", false, "restart", 431 m_console.Commands.AddCommand("Regions", false, "restart",
432 "restart", 432 "restart",
433 "Restart the currently selected region(s) in this instance", 433 "Restart the currently selected region(s) in this instance",
434 RunCommand); 434 RunCommand);
435 435
436 m_console.Commands.AddCommand("General", false, "command-script", 436 m_console.Commands.AddCommand("General", false, "command-script",
437 "command-script <script>", 437 "command-script <script>",
438 "Run a command script from file", 438 "Run a command script from file",
439 RunCommand); 439 RunCommand);
440 440
441 m_console.Commands.AddCommand("Regions", false, "remove-region", 441 m_console.Commands.AddCommand("Regions", false, "remove-region",
442 "remove-region <name>", 442 "remove-region <name>",
443 "Remove a region from this simulator", 443 "Remove a region from this simulator",
444 RunCommand); 444 RunCommand);
445 445
446 m_console.Commands.AddCommand("Regions", false, "delete-region", 446 m_console.Commands.AddCommand("Regions", false, "delete-region",
447 "delete-region <name>", 447 "delete-region <name>",
448 "Delete a region from disk", 448 "Delete a region from disk",
449 RunCommand); 449 RunCommand);
450 450
451 m_console.Commands.AddCommand("Estates", false, "estate create", 451 m_console.Commands.AddCommand("Estates", false, "estate create",
@@ -476,7 +476,7 @@ namespace OpenSim
476 { 476 {
477 RunCommandScript(m_shutdownCommandsFile); 477 RunCommandScript(m_shutdownCommandsFile);
478 } 478 }
479 479
480 base.ShutdownSpecific(); 480 base.ShutdownSpecific();
481 } 481 }
482 482
@@ -515,7 +515,7 @@ namespace OpenSim
515 private void KickUserCommand(string module, string[] cmdparams) 515 private void KickUserCommand(string module, string[] cmdparams)
516 { 516 {
517 bool force = false; 517 bool force = false;
518 518
519 OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; }); 519 OptionSet options = new OptionSet().Add("f|force", delegate (string v) { force = v != null; });
520 520
521 List<string> mainParams = options.Parse(cmdparams); 521 List<string> mainParams = options.Parse(cmdparams);
@@ -612,7 +612,7 @@ namespace OpenSim
612 MainConsole.Instance.Output(usage); 612 MainConsole.Instance.Output(usage);
613 return; 613 return;
614 } 614 }
615 615
616 float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI); 616 float angle = (float)(Convert.ToSingle(args[2]) / 180.0 * Math.PI);
617 OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle); 617 OpenMetaverse.Quaternion rot = OpenMetaverse.Quaternion.CreateFromAxisAngle(0, 0, 1, angle);
618 618
@@ -624,7 +624,7 @@ namespace OpenSim
624 624
625 Vector3 center = new Vector3(centerX, centerY, 0.0f); 625 Vector3 center = new Vector3(centerX, centerY, 0.0f);
626 626
627 SceneManager.ForEachSelectedScene(delegate(Scene scene) 627 SceneManager.ForEachSelectedScene(delegate(Scene scene)
628 { 628 {
629 scene.ForEachSOG(delegate(SceneObjectGroup sog) 629 scene.ForEachSOG(delegate(SceneObjectGroup sog)
630 { 630 {
@@ -776,8 +776,8 @@ namespace OpenSim
776 CreateRegion(regInfo, true, out scene); 776 CreateRegion(regInfo, true, out scene);
777 777
778 if (changed) 778 if (changed)
779 m_estateDataService.StoreEstateSettings(regInfo.EstateSettings); 779 m_estateDataService.StoreEstateSettings(regInfo.EstateSettings);
780 780
781 scene.Start(); 781 scene.Start();
782 } 782 }
783 783
@@ -880,8 +880,8 @@ namespace OpenSim
880 protected override void HandleRestartRegion(RegionInfo whichRegion) 880 protected override void HandleRestartRegion(RegionInfo whichRegion)
881 { 881 {
882 base.HandleRestartRegion(whichRegion); 882 base.HandleRestartRegion(whichRegion);
883 883
884 // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the 884 // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the
885 // m_console.ConsoleScene to null (indicating all scenes). 885 // m_console.ConsoleScene to null (indicating all scenes).
886 if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name) 886 if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name)
887 SceneManager.TrySetCurrentScene(whichRegion.RegionName); 887 SceneManager.TrySetCurrentScene(whichRegion.RegionName);
@@ -914,7 +914,7 @@ namespace OpenSim
914 { 914 {
915 agents = SceneManager.GetCurrentSceneAvatars(); 915 agents = SceneManager.GetCurrentSceneAvatars();
916 } 916 }
917 917
918 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); 918 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count));
919 919
920 MainConsole.Instance.Output( 920 MainConsole.Instance.Output(
@@ -960,7 +960,7 @@ namespace OpenSim
960 960
961 case "modules": 961 case "modules":
962 SceneManager.ForEachSelectedScene( 962 SceneManager.ForEachSelectedScene(
963 scene => 963 scene =>
964 { 964 {
965 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); 965 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
966 966
@@ -996,16 +996,16 @@ namespace OpenSim
996 cdt.AddColumn("Ready?", 6); 996 cdt.AddColumn("Ready?", 6);
997 cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize); 997 cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize);
998 SceneManager.ForEachScene( 998 SceneManager.ForEachScene(
999 scene => 999 scene =>
1000 { 1000 {
1001 RegionInfo ri = scene.RegionInfo; 1001 RegionInfo ri = scene.RegionInfo;
1002 cdt.AddRow( 1002 cdt.AddRow(
1003 ri.RegionName, 1003 ri.RegionName,
1004 ri.RegionID, 1004 ri.RegionID,
1005 string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY), 1005 string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY),
1006 string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY), 1006 string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY),
1007 ri.InternalEndPoint.Port, 1007 ri.InternalEndPoint.Port,
1008 scene.Ready ? "Yes" : "No", 1008 scene.Ready ? "Yes" : "No",
1009 ri.EstateSettings.EstateName); 1009 ri.EstateSettings.EstateName);
1010 } 1010 }
1011 ); 1011 );
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 8499a90..b33e2c2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -85,7 +85,7 @@ namespace OpenSim
85 85
86 protected string proxyUrl; 86 protected string proxyUrl;
87 protected int proxyOffset = 0; 87 protected int proxyOffset = 0;
88 88
89 public string userStatsURI = String.Empty; 89 public string userStatsURI = String.Empty;
90 public string managedStatsURI = String.Empty; 90 public string managedStatsURI = String.Empty;
91 91
@@ -125,7 +125,7 @@ namespace OpenSim
125 { 125 {
126 get { return m_EnvConfigSource; } 126 get { return m_EnvConfigSource; }
127 } 127 }
128 128
129 public uint HttpServerPort 129 public uint HttpServerPort
130 { 130 {
131 get { return m_httpServerPort; } 131 get { return m_httpServerPort; }
@@ -210,7 +210,7 @@ namespace OpenSim
210 } 210 }
211 211
212 /// <summary> 212 /// <summary>
213 /// Performs startup specific to the region server, including initialization of the scene 213 /// Performs startup specific to the region server, including initialization of the scene
214 /// such as loading configuration from disk. 214 /// such as loading configuration from disk.
215 /// </summary> 215 /// </summary>
216 protected override void StartupSpecific() 216 protected override void StartupSpecific()
@@ -228,7 +228,7 @@ namespace OpenSim
228 string pidFile = startupConfig.GetString("PIDFile", String.Empty); 228 string pidFile = startupConfig.GetString("PIDFile", String.Empty);
229 if (pidFile != String.Empty) 229 if (pidFile != String.Empty)
230 CreatePIDFile(pidFile); 230 CreatePIDFile(pidFile);
231 231
232 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 232 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
233 233
234 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); 234 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
@@ -254,11 +254,11 @@ namespace OpenSim
254 if (m_simulationDataService == null) 254 if (m_simulationDataService == null)
255 throw new Exception( 255 throw new Exception(
256 string.Format( 256 string.Format(
257 "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.", 257 "Could not load an ISimulationDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [SimulationDataStore] config section.",
258 module)); 258 module));
259 259
260 // Load the estate data service 260 // Load the estate data service
261 module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty); 261 module = Util.GetConfigVarFromSections<string>(Config, "LocalServiceModule", new string[]{"EstateDataStore", "EstateService"}, String.Empty);
262 if (String.IsNullOrEmpty(module)) 262 if (String.IsNullOrEmpty(module))
263 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section"); 263 throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] or [EstateService] section");
264 264
@@ -268,7 +268,7 @@ namespace OpenSim
268 if (m_estateDataService == null) 268 if (m_estateDataService == null)
269 throw new Exception( 269 throw new Exception(
270 string.Format( 270 string.Format(
271 "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.", 271 "Could not load an IEstateDataService implementation from {0}, as configured in the LocalServiceModule parameter of the [EstateDataStore] config section.",
272 module)); 272 module));
273 } 273 }
274 274
@@ -405,9 +405,9 @@ namespace OpenSim
405 // set initial ServerURI 405 // set initial ServerURI
406 regionInfo.HttpPort = m_httpServerPort; 406 regionInfo.HttpPort = m_httpServerPort;
407 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; 407 regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
408 408
409 regionInfo.osSecret = m_osSecret; 409 regionInfo.osSecret = m_osSecret;
410 410
411 if ((proxyUrl.Length > 0) && (portadd_flag)) 411 if ((proxyUrl.Length > 0) && (portadd_flag))
412 { 412 {
413 // set proxy url to RegionInfo 413 // set proxy url to RegionInfo
@@ -461,17 +461,17 @@ namespace OpenSim
461 461
462 // Prims have to be loaded after module configuration since some modules may be invoked during the load 462 // Prims have to be loaded after module configuration since some modules may be invoked during the load
463 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 463 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
464 464
465 // TODO : Try setting resource for region xstats here on scene 465 // TODO : Try setting resource for region xstats here on scene
466 MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo)); 466 MainServer.Instance.AddStreamHandler(new RegionStatsHandler(regionInfo));
467 467
468 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 468 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
469 scene.EventManager.TriggerParcelPrimCountUpdate(); 469 scene.EventManager.TriggerParcelPrimCountUpdate();
470 470
471 if (scene.SnmpService != null) 471 if (scene.SnmpService != null)
472 { 472 {
473 scene.SnmpService.BootInfo("Grid Registration in progress", scene); 473 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
474 } 474 }
475 475
476 try 476 try
477 { 477 {
@@ -480,7 +480,7 @@ namespace OpenSim
480 catch (Exception e) 480 catch (Exception e)
481 { 481 {
482 m_log.ErrorFormat( 482 m_log.ErrorFormat(
483 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 483 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
484 e.Message, e.StackTrace); 484 e.Message, e.StackTrace);
485 485
486 if (scene.SnmpService != null) 486 if (scene.SnmpService != null)
@@ -608,7 +608,7 @@ namespace OpenSim
608 608
609 if (rawEstateOwnerUuid == null) 609 if (rawEstateOwnerUuid == null)
610 rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString()); 610 rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
611 611
612 UUID estateOwnerUuid = UUID.Zero; 612 UUID estateOwnerUuid = UUID.Zero;
613 if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid)) 613 if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
614 { 614 {
@@ -671,7 +671,7 @@ namespace OpenSim
671 scene.DeleteAllSceneObjects(); 671 scene.DeleteAllSceneObjects();
672 SceneManager.CloseScene(scene); 672 SceneManager.CloseScene(scene);
673 //ShutdownClientServer(scene.RegionInfo); 673 //ShutdownClientServer(scene.RegionInfo);
674 674
675 if (!cleanup) 675 if (!cleanup)
676 return; 676 return;
677 677
@@ -733,7 +733,7 @@ namespace OpenSim
733 SceneManager.CloseScene(scene); 733 SceneManager.CloseScene(scene);
734 //ShutdownClientServer(scene.RegionInfo); 734 //ShutdownClientServer(scene.RegionInfo);
735 } 735 }
736 736
737 /// <summary> 737 /// <summary>
738 /// Remove a region from the simulator without deleting it permanently. 738 /// Remove a region from the simulator without deleting it permanently.
739 /// </summary> 739 /// </summary>
@@ -745,7 +745,7 @@ namespace OpenSim
745 if (SceneManager.TryGetScene(name, out target)) 745 if (SceneManager.TryGetScene(name, out target))
746 CloseRegion(target); 746 CloseRegion(target);
747 } 747 }
748 748
749 /// <summary> 749 /// <summary>
750 /// Create a scene and its initial base structures. 750 /// Create a scene and its initial base structures.
751 /// </summary> 751 /// </summary>
@@ -781,15 +781,15 @@ namespace OpenSim
781 IEstateDataService estateDataService, AgentCircuitManager circuitManager) 781 IEstateDataService estateDataService, AgentCircuitManager circuitManager)
782 { 782 {
783 return new Scene( 783 return new Scene(
784 regionInfo, circuitManager, 784 regionInfo, circuitManager,
785 simDataService, estateDataService, 785 simDataService, estateDataService,
786 Config, m_version); 786 Config, m_version);
787 } 787 }
788 788
789 protected virtual void HandleRestartRegion(RegionInfo whichRegion) 789 protected virtual void HandleRestartRegion(RegionInfo whichRegion)
790 { 790 {
791 m_log.InfoFormat( 791 m_log.InfoFormat(
792 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})", 792 "[OPENSIM]: Got restart signal from SceneManager for region {0} ({1},{2})",
793 whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY); 793 whichRegion.RegionName, whichRegion.RegionLocX, whichRegion.RegionLocY);
794 794
795 //ShutdownClientServer(whichRegion); 795 //ShutdownClientServer(whichRegion);
@@ -824,18 +824,18 @@ namespace OpenSim
824 824
825 /// <summary> 825 /// <summary>
826 /// Handler to supply the current extended status of this sim 826 /// Handler to supply the current extended status of this sim
827 /// Sends the statistical data in a json serialization 827 /// Sends the statistical data in a json serialization
828 /// </summary> 828 /// </summary>
829 public class XSimStatusHandler : BaseStreamHandler 829 public class XSimStatusHandler : BaseStreamHandler
830 { 830 {
831 OpenSimBase m_opensim; 831 OpenSimBase m_opensim;
832 832
833 public XSimStatusHandler(OpenSimBase sim) 833 public XSimStatusHandler(OpenSimBase sim)
834 : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus") 834 : base("GET", "/" + Util.SHA1Hash(sim.osSecret), "XSimStatus", "Simulator XStatus")
835 { 835 {
836 m_opensim = sim; 836 m_opensim = sim;
837 } 837 }
838 838
839 protected override byte[] ProcessRequest(string path, Stream request, 839 protected override byte[] ProcessRequest(string path, Stream request,
840 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 840 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
841 { 841 {
@@ -850,20 +850,20 @@ namespace OpenSim
850 850
851 /// <summary> 851 /// <summary>
852 /// Handler to supply the current extended status of this sim to a user configured URI 852 /// Handler to supply the current extended status of this sim to a user configured URI
853 /// Sends the statistical data in a json serialization 853 /// Sends the statistical data in a json serialization
854 /// If the request contains a key, "callback" the response will be wrappend in the 854 /// If the request contains a key, "callback" the response will be wrappend in the
855 /// associated value for jsonp used with ajax/javascript 855 /// associated value for jsonp used with ajax/javascript
856 /// </summary> 856 /// </summary>
857 protected class UXSimStatusHandler : BaseStreamHandler 857 protected class UXSimStatusHandler : BaseStreamHandler
858 { 858 {
859 OpenSimBase m_opensim; 859 OpenSimBase m_opensim;
860 860
861 public UXSimStatusHandler(OpenSimBase sim) 861 public UXSimStatusHandler(OpenSimBase sim)
862 : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus") 862 : base("GET", "/" + sim.userStatsURI, "UXSimStatus", "Simulator UXStatus")
863 { 863 {
864 m_opensim = sim; 864 m_opensim = sim;
865 } 865 }
866 866
867 protected override byte[] ProcessRequest(string path, Stream request, 867 protected override byte[] ProcessRequest(string path, Stream request,
868 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 868 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
869 { 869 {
@@ -956,7 +956,7 @@ namespace OpenSim
956 { 956 {
957 regionnum = SceneManager.Scenes.Count; 957 regionnum = SceneManager.Scenes.Count;
958 } 958 }
959 959
960 /// <summary> 960 /// <summary>
961 /// Create an estate with an initial region. 961 /// Create an estate with an initial region.
962 /// </summary> 962 /// </summary>
@@ -983,19 +983,19 @@ namespace OpenSim
983 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName); 983 MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
984 return false; 984 return false;
985 } 985 }
986 986
987 regInfo.EstateSettings.EstateName = newName; 987 regInfo.EstateSettings.EstateName = newName;
988 988
989 // FIXME: Later on, the scene constructor will reload the estate settings no matter what. 989 // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
990 // Therefore, we need to do an initial save here otherwise the new estate name will be reset 990 // Therefore, we need to do an initial save here otherwise the new estate name will be reset
991 // back to the default. The reloading of estate settings by scene could be eliminated if it 991 // back to the default. The reloading of estate settings by scene could be eliminated if it
992 // knows that the passed in settings in RegionInfo are already valid. Also, it might be 992 // knows that the passed in settings in RegionInfo are already valid. Also, it might be
993 // possible to eliminate some additional later saves made by callers of this method. 993 // possible to eliminate some additional later saves made by callers of this method.
994 EstateDataService.StoreEstateSettings(regInfo.EstateSettings); 994 EstateDataService.StoreEstateSettings(regInfo.EstateSettings);
995 995
996 return true; 996 return true;
997 } 997 }
998 998
999 /// <summary> 999 /// <summary>
1000 /// Load the estate information for the provided RegionInfo object. 1000 /// Load the estate information for the provided RegionInfo object.
1001 /// </summary> 1001 /// </summary>
@@ -1009,8 +1009,8 @@ namespace OpenSim
1009 return false; // estate info in the database did not change 1009 return false; // estate info in the database did not change
1010 1010
1011 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName); 1011 m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
1012 1012
1013 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll(); 1013 List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
1014 Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>(); 1014 Dictionary<string, EstateSettings> estatesByName = new Dictionary<string, EstateSettings>();
1015 1015
1016 foreach (EstateSettings estate in estates) 1016 foreach (EstateSettings estate in estates)
@@ -1103,12 +1103,12 @@ namespace OpenSim
1103 MainConsole.Instance.Output("Joining the estate failed. Please try again."); 1103 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
1104 } 1104 }
1105 } 1105 }
1106 } 1106 }
1107 1107
1108 return true; // need to update the database 1108 return true; // need to update the database
1109 } 1109 }
1110 } 1110 }
1111 1111
1112 public class OpenSimConfigSource 1112 public class OpenSimConfigSource
1113 { 1113 {
1114 public IConfigSource Source; 1114 public IConfigSource Source;
diff --git a/OpenSim/Region/Application/Properties/AssemblyInfo.cs b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
index b3efce0..09772d3 100644
--- a/OpenSim/Region/Application/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Application/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim")] 9[assembly: AssemblyTitle("OpenSim")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs
index ba92fd6..83a9fff 100644
--- a/OpenSim/Region/Application/RegionApplicationBase.cs
+++ b/OpenSim/Region/Application/RegionApplicationBase.cs
@@ -57,9 +57,9 @@ namespace OpenSim
57 public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } } 57 public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } }
58 public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } } 58 public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } }
59 public IEstateDataService EstateDataService { get { return m_estateDataService; } } 59 public IEstateDataService EstateDataService { get { return m_estateDataService; } }
60 60
61 protected abstract void Initialize(); 61 protected abstract void Initialize();
62 62
63 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); 63 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
64 64
65 protected override void StartupSpecific() 65 protected override void StartupSpecific()
@@ -68,11 +68,11 @@ namespace OpenSim
68 68
69 Initialize(); 69 Initialize();
70 70
71 m_httpServer 71 m_httpServer
72 = new BaseHttpServer( 72 = new BaseHttpServer(
73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, 73 m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort,
74 m_networkServersInfo.HttpSSLCN); 74 m_networkServersInfo.HttpSSLCN);
75 75
76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) 76 if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort))
77 { 77 {
78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); 78 m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports");
@@ -107,7 +107,7 @@ namespace OpenSim
107 server.Start(); 107 server.Start();
108 } 108 }
109 } 109 }
110 110
111 base.StartupSpecific(); 111 base.StartupSpecific();
112 } 112 }
113 113
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
index aabdb51..8f65a69 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/AgentPreferencesModule.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.LindenCaps
133 { 133 {
134 data = new AgentPrefs(agent); 134 data = new AgentPrefs(agent);
135 } 135 }
136 136
137 if (req.ContainsKey("access_prefs")) 137 if (req.ContainsKey("access_prefs"))
138 { 138 {
139 OSDMap accessPrefs = (OSDMap)req["access_prefs"]; // We could check with ContainsKey... 139 OSDMap accessPrefs = (OSDMap)req["access_prefs"]; // We could check with ContainsKey...
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
index bbadc55..e3c430c 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/AvatarPickerSearchModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden
53 public class AvatarPickerSearchModule : INonSharedRegionModule 53 public class AvatarPickerSearchModule : INonSharedRegionModule
54 { 54 {
55// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 private Scene m_scene; 57 private Scene m_scene;
58 private IPeople m_People; 58 private IPeople m_People;
59 private bool m_Enabled = false; 59 private bool m_Enabled = false;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 14a4873..8cb40e1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.ClientStack.Linden
97 private ModelCost m_ModelCost; 97 private ModelCost m_ModelCost;
98 98
99 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. 99 // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
100 100
101 // These are callbacks which will be setup by the scene so that we can update scene data when we 101 // These are callbacks which will be setup by the scene so that we can update scene data when we
102 // receive capability calls 102 // receive capability calls
103 public NewInventoryItem AddNewInventoryItem = null; 103 public NewInventoryItem AddNewInventoryItem = null;
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack.Linden
119 119
120 private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory 120 private bool m_enableModelUploadTextureToInventory = false; // place uploaded textures also in inventory
121 // may not be visible till relog 121 // may not be visible till relog
122 122
123 private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!! 123 private bool m_RestrictFreeTestUploadPerms = false; // reduces also the permitions. Needs a creator defined!!
124 private UUID m_testAssetsCreatorID = UUID.Zero; 124 private UUID m_testAssetsCreatorID = UUID.Zero;
125 125
@@ -138,7 +138,7 @@ namespace OpenSim.Region.ClientStack.Linden
138 processUpload = 3 138 processUpload = 3
139 } 139 }
140 private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle; 140 private FileAgentInventoryState m_FileAgentInventoryState = FileAgentInventoryState.idle;
141 141
142 public BunchOfCaps(Scene scene, UUID agentID, Caps caps) 142 public BunchOfCaps(Scene scene, UUID agentID, Caps caps)
143 { 143 {
144 m_Scene = scene; 144 m_Scene = scene;
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ClientStack.Linden
147 147
148 // create a model upload cost provider 148 // create a model upload cost provider
149 m_ModelCost = new ModelCost(scene); 149 m_ModelCost = new ModelCost(scene);
150 150
151 m_PrimScaleMin = m_ModelCost.PrimScaleMin; 151 m_PrimScaleMin = m_ModelCost.PrimScaleMin;
152 152
153 IConfigSource config = m_Scene.Config; 153 IConfigSource config = m_Scene.Config;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.ClientStack.Linden
216 216
217 public string GetNewCapPath() 217 public string GetNewCapPath()
218 { 218 {
219 return "/CAPS/" + UUID.Random(); 219 return "/CAPS/" + UUID.Random();
220 } 220 }
221 221
222 /// <summary> 222 /// <summary>
@@ -271,7 +271,7 @@ namespace OpenSim.Region.ClientStack.Linden
271 "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null); 271 "POST", GetNewCapPath(), HomeLocation, "HomeLocation", null);
272 m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler); 272 m_HostCapsObj.RegisterHandler("HomeLocation", HomeLocationHandler);
273 } 273 }
274 274
275 if(m_AllowCapGroupMemberData) 275 if(m_AllowCapGroupMemberData)
276 { 276 {
277 IRequestHandler GroupMemberDataHandler = new RestStreamHandler( 277 IRequestHandler GroupMemberDataHandler = new RestStreamHandler(
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ClientStack.Linden
314 IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler( 314 IRequestHandler CopyInventoryFromNotecardHandler = new RestStreamHandler(
315 "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null); 315 "POST", GetNewCapPath(), CopyInventoryFromNotecard, "CopyInventoryFromNotecard", null);
316 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler); 316 m_HostCapsObj.RegisterHandler("CopyInventoryFromNotecard", CopyInventoryFromNotecardHandler);
317 317
318 } 318 }
319 catch (Exception e) 319 catch (Exception e)
320 { 320 {
@@ -568,8 +568,8 @@ namespace OpenSim.Region.ClientStack.Linden
568 { 568 {
569 string error; 569 string error;
570 int modelcost; 570 int modelcost;
571 571
572 572
573 if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost, 573 if (!m_ModelCost.MeshModelCost(llsdRequest.asset_resources, baseCost, out modelcost,
574 meshcostdata, out error, ref warning)) 574 meshcostdata, out error, ref warning))
575 { 575 {
@@ -639,7 +639,7 @@ namespace OpenSim.Region.ClientStack.Linden
639 client.SendAgentAlertMessage(warning, true); 639 client.SendAgentAlertMessage(warning, true);
640 } 640 }
641 } 641 }
642 642
643 string assetDes = llsdRequest.description; 643 string assetDes = llsdRequest.description;
644 UUID newAsset = UUID.Random(); 644 UUID newAsset = UUID.Random();
645 UUID newInvItem = UUID.Random(); 645 UUID newInvItem = UUID.Random();
@@ -813,7 +813,7 @@ namespace OpenSim.Region.ClientStack.Linden
813 813
814 List<UUID> textures = new List<UUID>(); 814 List<UUID> textures = new List<UUID>();
815 815
816 816
817// if (doTextInv) 817// if (doTextInv)
818 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); 818 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
819 819
@@ -895,7 +895,7 @@ namespace OpenSim.Region.ClientStack.Linden
895 meshAvatarSkeletons.Add(curAvSkeleton); 895 meshAvatarSkeletons.Add(curAvSkeleton);
896 meshAvatarColliders.Add(curAvCollider); 896 meshAvatarColliders.Add(curAvCollider);
897 897
898 // test code 898 // test code
899 if (curAvSkeleton && client != null) 899 if (curAvSkeleton && client != null)
900 { 900 {
901 string name = assetName; 901 string name = assetName;
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.ClientStack.Linden
1054 prim.LastOwnerID = creatorID; 1054 prim.LastOwnerID = creatorID;
1055 prim.RezzerID = creatorID; 1055 prim.RezzerID = creatorID;
1056 prim.CreationDate = Util.UnixTimeSinceEpoch(); 1056 prim.CreationDate = Util.UnixTimeSinceEpoch();
1057 1057
1058 if (grp == null) 1058 if (grp == null)
1059 prim.Name = assetName; 1059 prim.Name = assetName;
1060 else 1060 else
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.ClientStack.Linden
1437 public string GetObjectCost(string request, string path, 1437 public string GetObjectCost(string request, string path,
1438 string param, IOSHttpRequest httpRequest, 1438 string param, IOSHttpRequest httpRequest,
1439 IOSHttpResponse httpResponse) 1439 IOSHttpResponse httpResponse)
1440 { 1440 {
1441 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1441 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
1442 OSDMap resp = new OSDMap(); 1442 OSDMap resp = new OSDMap();
1443 1443
@@ -1446,7 +1446,7 @@ namespace OpenSim.Region.ClientStack.Linden
1446 for (int i = 0; i < object_ids.Count; i++) 1446 for (int i = 0; i < object_ids.Count; i++)
1447 { 1447 {
1448 UUID uuid = object_ids[i].AsUUID(); 1448 UUID uuid = object_ids[i].AsUUID();
1449 1449
1450 SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid); 1450 SceneObjectPart part = m_Scene.GetSceneObjectPart(uuid);
1451 SceneObjectGroup grp = null; 1451 SceneObjectGroup grp = null;
1452 if (part != null) 1452 if (part != null)
@@ -1479,7 +1479,7 @@ namespace OpenSim.Region.ClientStack.Linden
1479 resp[UUID.Zero.ToString()] = object_data; 1479 resp[UUID.Zero.ToString()] = object_data;
1480 } 1480 }
1481 string response = OSDParser.SerializeLLSDXmlString(resp); 1481 string response = OSDParser.SerializeLLSDXmlString(resp);
1482 return response; 1482 return response;
1483 } 1483 }
1484 1484
1485 public string ResourceCostSelected(string request, string path, 1485 public string ResourceCostSelected(string request, string path,
@@ -1548,7 +1548,7 @@ namespace OpenSim.Region.ClientStack.Linden
1548 resp["selected"] = object_data; 1548 resp["selected"] = object_data;
1549// resp["transaction_id"] = "undef"; 1549// resp["transaction_id"] = "undef";
1550 string response = OSDParser.SerializeLLSDXmlString(resp); 1550 string response = OSDParser.SerializeLLSDXmlString(resp);
1551 return response; 1551 return response;
1552 } 1552 }
1553 1553
1554 public string UpdateAgentInformation(string request, string path, 1554 public string UpdateAgentInformation(string request, string path,
@@ -1564,7 +1564,7 @@ namespace OpenSim.Region.ClientStack.Linden
1564 resp["access_prefs"] = accessPrefs; 1564 resp["access_prefs"] = accessPrefs;
1565 1565
1566 string response = OSDParser.SerializeLLSDXmlString(resp); 1566 string response = OSDParser.SerializeLLSDXmlString(resp);
1567 return response; 1567 return response;
1568 } 1568 }
1569 1569
1570 public bool OSDMapTOVector3(OSDMap map, out Vector3 v) 1570 public bool OSDMapTOVector3(OSDMap map, out Vector3 v)
@@ -1598,19 +1598,19 @@ namespace OpenSim.Region.ClientStack.Linden
1598 1598
1599 IClientAPI client = null; 1599 IClientAPI client = null;
1600 ScenePresence sp; 1600 ScenePresence sp;
1601 1601
1602 while(true) 1602 while(true)
1603 { 1603 {
1604 if(m_Scene.GridUserService == null) 1604 if(m_Scene.GridUserService == null)
1605 break; 1605 break;
1606 1606
1607 if(m_Scene.UserManagementModule == null) 1607 if(m_Scene.UserManagementModule == null)
1608 break; 1608 break;
1609 1609
1610 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1610 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1611 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1611 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
1612 break; 1612 break;
1613 1613
1614 client = sp.ControllingClient; 1614 client = sp.ControllingClient;
1615 1615
1616 if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID)) 1616 if(!m_Scene.UserManagementModule.IsLocalGridUser(m_AgentID))
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.ClientStack.Linden
1637 ILandObject land = m_Scene.LandChannel.GetLandObject(pos); 1637 ILandObject land = m_Scene.LandChannel.GetLandObject(pos);
1638 if(land == null) 1638 if(land == null)
1639 break; 1639 break;
1640 1640
1641 ulong gpowers = client.GetGroupPowers(land.LandData.GroupID); 1641 ulong gpowers = client.GetGroupPowers(land.LandData.GroupID);
1642 SceneObjectGroup telehub = null; 1642 SceneObjectGroup telehub = null;
1643 if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) 1643 if (m_Scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.Linden
1648 !m_Scene.Permissions.IsGod(m_AgentID) && 1648 !m_Scene.Permissions.IsGod(m_AgentID) &&
1649 m_AgentID != land.LandData.OwnerID && // (b) land owners can set home 1649 m_AgentID != land.LandData.OwnerID && // (b) land owners can set home
1650 // (c) members of the land-associated group in roles that can set home 1650 // (c) members of the land-associated group in roles that can set home
1651 ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) && 1651 ((gpowers & (ulong)GroupPowers.AllowSetHome) != (ulong)GroupPowers.AllowSetHome) &&
1652 // (d) parcels with telehubs can be the home of anyone 1652 // (d) parcels with telehubs can be the home of anyone
1653 (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) 1653 (telehub == null || !land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))
1654 { 1654 {
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.ClientStack.Linden
1675 1675
1676 break; 1676 break;
1677 } 1677 }
1678 1678
1679 string response; 1679 string response;
1680 1680
1681 if(fail) 1681 if(fail)
@@ -1728,11 +1728,11 @@ namespace OpenSim.Region.ClientStack.Linden
1728 m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>(); 1728 m_GroupsModule = m_Scene.RequestModuleInterface<IGroupsModule>();
1729 if(m_GroupsModule == null) 1729 if(m_GroupsModule == null)
1730 break; 1730 break;
1731 1731
1732 m_Scene.TryGetScenePresence(m_AgentID, out sp); 1732 m_Scene.TryGetScenePresence(m_AgentID, out sp);
1733 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit) 1733 if(sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit)
1734 break; 1734 break;
1735 1735
1736 client = sp.ControllingClient; 1736 client = sp.ControllingClient;
1737 1737
1738 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); 1738 OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@@ -1866,12 +1866,12 @@ namespace OpenSim.Region.ClientStack.Linden
1866 OSDMap osdname = new OSDMap(); 1866 OSDMap osdname = new OSDMap();
1867 if(parts[0] == "Unknown") 1867 if(parts[0] == "Unknown")
1868 { 1868 {
1869 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); 1869 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1));
1870 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); 1870 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2));
1871 } 1871 }
1872 else 1872 else
1873 { 1873 {
1874 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); 1874 osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8));
1875 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); 1875 osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1));
1876 } 1876 }
1877 osdname["display_name"] = OSD.FromString(kvp.Value); 1877 osdname["display_name"] = OSD.FromString(kvp.Value);
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.ClientStack.Linden
1916 private string m_assetType = String.Empty; 1916 private string m_assetType = String.Empty;
1917 private int m_cost; 1917 private int m_cost;
1918 private string m_error = String.Empty; 1918 private string m_error = String.Empty;
1919 1919
1920 private Timer m_timeoutTimer = new Timer(); 1920 private Timer m_timeoutTimer = new Timer();
1921 private UUID m_texturesFolder; 1921 private UUID m_texturesFolder;
1922 private int m_nreqtextures; 1922 private int m_nreqtextures;
@@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.Linden
1928 private int m_groupMask; 1928 private int m_groupMask;
1929 private int m_everyoneMask; 1929 private int m_everyoneMask;
1930 1930
1931 1931
1932 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, 1932 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
1933 UUID parentFolderID, string invType, string assetType, string path, 1933 UUID parentFolderID, string invType, string assetType, string path,
1934 IHttpServer httpServer, bool dumpAssetsToFile, 1934 IHttpServer httpServer, bool dumpAssetsToFile,
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
index 5b4e0da..683c3d5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.Linden
63 { 63 {
64 } 64 }
65 65
66 public void Close() { } 66 public void Close() { }
67 67
68 public void AddRegion(Scene scene) 68 public void AddRegion(Scene scene)
69 { 69 {
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.Linden
80 } 80 }
81 81
82 public void PostInitialise() { } 82 public void PostInitialise() { }
83 #endregion 83 #endregion
84 84
85 private void OnRegisterCaps(UUID agentID, Caps caps) 85 private void OnRegisterCaps(UUID agentID, Caps caps)
86 { 86 {
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
index fb22694..eb1ab45 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.Linden
51{ 51{
52 public struct ModelPrimLimits 52 public struct ModelPrimLimits
53 { 53 {
54 54
55 } 55 }
56 56
57 public class ModelCost 57 public class ModelCost
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden
82 const float lowestSizeWth = 2f; // 3x 82 const float lowestSizeWth = 2f; // 3x
83 // favor potencially physical optimized meshs versus automatic decomposition 83 // favor potencially physical optimized meshs versus automatic decomposition
84 const float physMeshSizeWth = 6f; // counts 7x 84 const float physMeshSizeWth = 6f; // counts 7x
85 const float physHullSizeWth = 8f; // counts 9x 85 const float physHullSizeWth = 8f; // counts 9x
86 86
87 // stream cost area factors 87 // stream cost area factors
88 // more or less like SL 88 // more or less like SL
89 const float highLodFactor = 17.36f; 89 const float highLodFactor = 17.36f;
90 const float midLodFactor = 277.78f; 90 const float midLodFactor = 277.78f;
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden
108 PrimScaleMin = scene.m_minNonphys; 108 PrimScaleMin = scene.m_minNonphys;
109 NonPhysicalPrimScaleMax = scene.m_maxNonphys; 109 NonPhysicalPrimScaleMax = scene.m_maxNonphys;
110 PhysicalPrimScaleMax = scene.m_maxPhys; 110 PhysicalPrimScaleMax = scene.m_maxPhys;
111 ObjectLinkedPartsMax = scene.m_linksetCapacity; 111 ObjectLinkedPartsMax = scene.m_linksetCapacity;
112 } 112 }
113 113
114 public void Econfig(IConfig EconomyConfig) 114 public void Econfig(IConfig EconomyConfig)
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden
121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); 121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost);
122 } 122 }
123 123
124 // storage for a single mesh asset cost parameters 124 // storage for a single mesh asset cost parameters
125 private class ameshCostParam 125 private class ameshCostParam
126 { 126 {
127 // LOD sizes for size dependent streaming cost 127 // LOD sizes for size dependent streaming cost
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden
140 // resources input LLSD request 140 // resources input LLSD request
141 // basicCost input region assets upload cost 141 // basicCost input region assets upload cost
142 // totalcost returns model total upload fee 142 // totalcost returns model total upload fee
143 // meshcostdata returns detailed costs for viewer 143 // meshcostdata returns detailed costs for viewer
144 // avatarSkeleton if mesh includes a avatar skeleton 144 // avatarSkeleton if mesh includes a avatar skeleton
145 // useAvatarCollider if we should use physics mesh for avatar 145 // useAvatarCollider if we should use physics mesh for avatar
146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, 146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost,
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden
150 error = string.Empty; 150 error = string.Empty;
151 151
152 bool avatarSkeleton = false; 152 bool avatarSkeleton = false;
153 153
154 if (resources == null || 154 if (resources == null ||
155 resources.instance_list == null || 155 resources.instance_list == null ||
156 resources.instance_list.Array.Count == 0) 156 resources.instance_list.Array.Count == 0)
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden
203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) 203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0)
204 { 204 {
205 numberMeshs = resources.mesh_list.Array.Count; 205 numberMeshs = resources.mesh_list.Array.Count;
206 206
207 for (int i = 0; i < numberMeshs; i++) 207 for (int i = 0; i < numberMeshs; i++)
208 { 208 {
209 ameshCostParam curCost = new ameshCostParam(); 209 ameshCostParam curCost = new ameshCostParam();
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden
230 } 230 }
231 231
232 // instances (prims) cost 232 // instances (prims) cost
233 233
234 234
235 int mesh; 235 int mesh;
236 int skipedSmall = 0; 236 int skipedSmall = 0;
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden
331 331
332 // breakdown prices 332 // breakdown prices
333 // don't seem to be in use so removed code for now 333 // don't seem to be in use so removed code for now
334 334
335 return true; 335 return true;
336 } 336 }
337 337
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden
404 int sksize = tmpmap["size"].AsInteger(); 404 int sksize = tmpmap["size"].AsInteger();
405 if(sksize > 0) 405 if(sksize > 0)
406 skeleton = true; 406 skeleton = true;
407 } 407 }
408 } 408 }
409 409
410 if (map.ContainsKey("physics_convex")) 410 if (map.ContainsKey("physics_convex"))
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden
429 } 429 }
430 430
431 submesh_offset = -1; 431 submesh_offset = -1;
432 432
433 // only look for LOD meshs sizes 433 // only look for LOD meshs sizes
434 434
435 if (map.ContainsKey("high_lod")) 435 if (map.ContainsKey("high_lod"))
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 cost.physicsCost = 0.04f * phys_hullsvertices; 518 cost.physicsCost = 0.04f * phys_hullsvertices;
519 519
520 float sfee; 520 float sfee;
521 521
522 sfee = data.Length; // start with total compressed data size 522 sfee = data.Length; // start with total compressed data size
523 523
524 // penalize lod meshs that should be more builder optimized 524 // penalize lod meshs that should be more builder optimized
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden
535 535
536 // bytes to money 536 // bytes to money
537 sfee *= bytecost; 537 sfee *= bytecost;
538 538
539 cost.costFee = sfee; 539 cost.costFee = sfee;
540 return true; 540 return true;
541 } 541 }
@@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden
675 return true; 675 return true;
676 } 676 }
677 677
678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length 678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length
679 private float streamingCost(ameshCostParam curCost, float sqdiam) 679 private float streamingCost(ameshCostParam curCost, float sqdiam)
680 { 680 {
681 // compute efective areas 681 // compute efective areas
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index ba3edd6..1feece1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -74,12 +74,12 @@ namespace OpenSim.Region.ClientStack.Linden
74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000); 74 private const int SERVER_EQ_TIME_NO_EVENTS = VIEWER_TIMEOUT - (10 * 1000);
75 75
76 protected Scene m_scene; 76 protected Scene m_scene;
77 77
78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 78 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
79 79
80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>(); 80 private Dictionary<UUID, Queue<OSD>> queues = new Dictionary<UUID, Queue<OSD>>();
81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); 81 private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>();
82 82
83 #region INonSharedRegionModule methods 83 #region INonSharedRegionModule methods
84 public virtual void Initialise(IConfigSource config) 84 public virtual void Initialise(IConfigSource config)
85 { 85 {
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ClientStack.Linden
170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues) 170 foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
171 { 171 {
172 MainConsole.Instance.OutputFormat( 172 MainConsole.Instance.OutputFormat(
173 "For agent {0} there are {1} messages queued for send.", 173 "For agent {0} there are {1} messages queued for send.",
174 kvp.Key, kvp.Value.Count); 174 kvp.Key, kvp.Value.Count);
175 } 175 }
176 } 176 }
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
189 { 189 {
190 if (DebugLevel > 0) 190 if (DebugLevel > 0)
191 m_log.DebugFormat( 191 m_log.DebugFormat(
192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", 192 "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}",
193 agentId, m_scene.RegionInfo.RegionName); 193 agentId, m_scene.RegionInfo.RegionName);
194 194
195 queues[agentId] = new Queue<OSD>(); 195 queues[agentId] = new Queue<OSD>();
@@ -238,13 +238,13 @@ namespace OpenSim.Region.ClientStack.Linden
238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}", 238 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} when placing message {1} in region {2}",
239 avatarID, evMap["message"], m_scene.Name); 239 avatarID, evMap["message"], m_scene.Name);
240 } 240 }
241 } 241 }
242 catch (NullReferenceException e) 242 catch (NullReferenceException e)
243 { 243 {
244 m_log.Error("[EVENTQUEUE] Caught exception: " + e); 244 m_log.Error("[EVENTQUEUE] Caught exception: " + e);
245 return false; 245 return false;
246 } 246 }
247 247
248 return true; 248 return true;
249 } 249 }
250 250
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ClientStack.Linden
309 309
310 // push markers to handle old responses still waiting 310 // push markers to handle old responses still waiting
311 // this will cost at most viewer getting two forced noevents 311 // this will cost at most viewer getting two forced noevents
312 // even being a new queue better be safe 312 // even being a new queue better be safe
313 queue.Enqueue(null); 313 queue.Enqueue(null);
314 queue.Enqueue(null); // one should be enough 314 queue.Enqueue(null); // one should be enough
315 315
316 lock (m_AvatarQueueUUIDMapping) 316 lock (m_AvatarQueueUUIDMapping)
317 { 317 {
318 eventQueueGetUUID = UUID.Random(); 318 eventQueueGetUUID = UUID.Random();
@@ -336,7 +336,7 @@ namespace OpenSim.Region.ClientStack.Linden
336 { 336 {
337 // push markers to handle old responses still waiting 337 // push markers to handle old responses still waiting
338 // this will cost at most viewer getting two forced noevents 338 // this will cost at most viewer getting two forced noevents
339 // even being a new queue better be safe 339 // even being a new queue better be safe
340 queue.Enqueue(null); 340 queue.Enqueue(null);
341 queue.Enqueue(null); // one should be enough 341 queue.Enqueue(null); // one should be enough
342 342
@@ -405,7 +405,7 @@ namespace OpenSim.Region.ClientStack.Linden
405 } 405 }
406 public void Drop(UUID requestID, UUID pAgentId) 406 public void Drop(UUID requestID, UUID pAgentId)
407 { 407 {
408 // do nothing for now, hope client close will do it 408 // do nothing for now, hope client close will do it
409 } 409 }
410 410
411 public Hashtable GetEvents(UUID requestID, UUID pAgentId) 411 public Hashtable GetEvents(UUID requestID, UUID pAgentId)
@@ -437,7 +437,7 @@ namespace OpenSim.Region.ClientStack.Linden
437 negativeID = true; 437 negativeID = true;
438 thisID = -thisID; 438 thisID = -thisID;
439 } 439 }
440 440
441 while (queue.Count > 0) 441 while (queue.Count > 0)
442 { 442 {
443 element = queue.Dequeue(); 443 element = queue.Dequeue();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.ClientStack.Linden
477 // if there where no elements before a marker send a NoEvents 477 // if there where no elements before a marker send a NoEvents
478 if (array.Count == 0) 478 if (array.Count == 0)
479 return NoEvents(requestID, pAgentId); 479 return NoEvents(requestID, pAgentId);
480 480
481 Hashtable responsedata = new Hashtable(); 481 Hashtable responsedata = new Hashtable();
482 responsedata["int_response_code"] = 200; 482 responsedata["int_response_code"] = 200;
483 responsedata["content_type"] = "application/xml"; 483 responsedata["content_type"] = "application/xml";
@@ -500,7 +500,7 @@ namespace OpenSim.Region.ClientStack.Linden
500 responsedata["http_protocol_version"] = "HTTP/1.0"; 500 responsedata["http_protocol_version"] = "HTTP/1.0";
501 return responsedata; 501 return responsedata;
502 } 502 }
503 503
504 public void DisableSimulator(ulong handle, UUID avatarID) 504 public void DisableSimulator(ulong handle, UUID avatarID)
505 { 505 {
506 OSD item = EventQueueHelper.DisableSimulator(handle); 506 OSD item = EventQueueHelper.DisableSimulator(handle);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 } 518 }
519 519
520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, 520 public virtual void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath,
521 ulong regionHandle, int regionSizeX, int regionSizeY) 521 ulong regionHandle, int regionSizeX, int regionSizeY)
522 { 522 {
523 if (DebugLevel > 0) 523 if (DebugLevel > 0)
524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}", 524 m_log.DebugFormat("{0} EstablishAgentCommunication. handle={1}, endPoint={2}, avatarID={3}",
@@ -528,9 +528,9 @@ namespace OpenSim.Region.ClientStack.Linden
528 Enqueue(item, avatarID); 528 Enqueue(item, avatarID);
529 } 529 }
530 530
531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess, 531 public virtual void TeleportFinishEvent(ulong regionHandle, byte simAccess,
532 IPEndPoint regionExternalEndPoint, 532 IPEndPoint regionExternalEndPoint,
533 uint locationID, uint flags, string capsURL, 533 uint locationID, uint flags, string capsURL,
534 UUID avatarID, int regionSizeX, int regionSizeY) 534 UUID avatarID, int regionSizeX, int regionSizeY)
535 { 535 {
536 if (DebugLevel > 0) 536 if (DebugLevel > 0)
@@ -560,15 +560,15 @@ namespace OpenSim.Region.ClientStack.Linden
560 uint timeStamp, bool offline, int parentEstateID, Vector3 position, 560 uint timeStamp, bool offline, int parentEstateID, Vector3 position,
561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket) 561 uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
562 { 562 {
563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog, 563 OSD item = EventQueueHelper.ChatterboxInvitation(sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
564 timeStamp, offline, parentEstateID, position, ttl, transactionID, 564 timeStamp, offline, parentEstateID, position, ttl, transactionID,
565 fromGroup, binaryBucket); 565 fromGroup, binaryBucket);
566 Enqueue(item, toAgent); 566 Enqueue(item, toAgent);
567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item); 567 //m_log.InfoFormat("########### eq ChatterboxInvitation #############\n{0}", item);
568 568
569 } 569 }
570 570
571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, 571 public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
572 bool isModerator, bool textMute, bool isEnterorLeave) 572 bool isModerator, bool textMute, bool isEnterorLeave)
573 { 573 {
574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat, 574 OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
index 5e0bd71..e1e88ae 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ClientStack.Linden
105 105
106 return BuildEvent("DisableSimulator", llsdBody); 106 return BuildEvent("DisableSimulator", llsdBody);
107 } 107 }
108 108
109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, 109 public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
110 IPEndPoint newRegionExternalEndPoint, 110 IPEndPoint newRegionExternalEndPoint,
111 string capsURL, UUID agentID, UUID sessionID, 111 string capsURL, UUID agentID, UUID sessionID,
@@ -194,13 +194,13 @@ namespace OpenSim.Region.ClientStack.Linden
194 script.Add("ItemID", OSD.FromUUID(itemID)); 194 script.Add("ItemID", OSD.FromUUID(itemID));
195 script.Add("Running", OSD.FromBoolean(running)); 195 script.Add("Running", OSD.FromBoolean(running));
196 script.Add("Mono", OSD.FromBoolean(mono)); 196 script.Add("Mono", OSD.FromBoolean(mono));
197 197
198 OSDArray scriptArr = new OSDArray(); 198 OSDArray scriptArr = new OSDArray();
199 scriptArr.Add(script); 199 scriptArr.Add(script);
200 200
201 OSDMap body = new OSDMap(); 201 OSDMap body = new OSDMap();
202 body.Add("Script", scriptArr); 202 body.Add("Script", scriptArr);
203 203
204 return BuildEvent("ScriptRunningReply", body); 204 return BuildEvent("ScriptRunningReply", body);
205 } 205 }
206 206
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ClientStack.Linden
243 { 243 {
244 OSDMap messageParams = new OSDMap(15); 244 OSDMap messageParams = new OSDMap(15);
245 messageParams.Add("type", new OSDInteger((int)dialog)); 245 messageParams.Add("type", new OSDInteger((int)dialog));
246 246
247 OSDArray positionArray = new OSDArray(3); 247 OSDArray positionArray = new OSDArray(3);
248 positionArray.Add(OSD.FromReal(position.X)); 248 positionArray.Add(OSD.FromReal(position.X));
249 positionArray.Add(OSD.FromReal(position.Y)); 249 positionArray.Add(OSD.FromReal(position.Y));
@@ -423,7 +423,7 @@ namespace OpenSim.Region.ClientStack.Linden
423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); 423 QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID));
424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); 424 QueryDataMap.Add("ProductSku", OSD.FromInteger(0));
425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); 425 QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price));
426 426
427 QueryData.Add(QueryDataMap); 427 QueryData.Add(QueryDataMap);
428 } 428 }
429 body.Add("QueryData", QueryData); 429 body.Add("QueryData", QueryData);
@@ -444,7 +444,7 @@ namespace OpenSim.Region.ClientStack.Linden
444 public static OSD partPhysicsProperties(uint localID, byte physhapetype, 444 public static OSD partPhysicsProperties(uint localID, byte physhapetype,
445 float density, float friction, float bounce, float gravmod) 445 float density, float friction, float bounce, float gravmod)
446 { 446 {
447 447
448 OSDMap physinfo = new OSDMap(6); 448 OSDMap physinfo = new OSDMap(6);
449 physinfo["LocalID"] = localID; 449 physinfo["LocalID"] = localID;
450 physinfo["Density"] = density; 450 physinfo["Density"] = density;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
index 1e629bd..ee3f4f1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
180 TestHelpers.InMethod(); 180 TestHelpers.InMethod();
181// TestHelpers.EnableLogging(); 181// TestHelpers.EnableLogging();
182 182
183 UUID npcId 183 UUID npcId
184 = m_npcMod.CreateNPC( 184 = m_npcMod.CreateNPC(
185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance()); 185 "John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, new AvatarAppearance());
186 186
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
index f66ef57..ae18bc1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.Linden
55 { 55 {
56// private static readonly ILog m_log = 56// private static readonly ILog m_log =
57// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
58 58
59 private Scene m_scene; 59 private Scene m_scene;
60 private IAssetService m_AssetService; 60 private IAssetService m_AssetService;
61 private bool m_Enabled = true; 61 private bool m_Enabled = true;
@@ -64,7 +64,7 @@ namespace OpenSim.Region.ClientStack.Linden
64 private string m_URL2; 64 private string m_URL2;
65 private string m_RedirectURL = null; 65 private string m_RedirectURL = null;
66 private string m_RedirectURL2 = null; 66 private string m_RedirectURL2 = null;
67 67
68 struct aPollRequest 68 struct aPollRequest
69 { 69 {
70 public PollServiceMeshEventArgs thepoll; 70 public PollServiceMeshEventArgs thepoll;
@@ -132,7 +132,7 @@ namespace OpenSim.Region.ClientStack.Linden
132 return; 132 return;
133 133
134 m_scene = pScene; 134 m_scene = pScene;
135 135
136 m_assetService = pScene.AssetService; 136 m_assetService = pScene.AssetService;
137 } 137 }
138 138
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ClientStack.Linden
342 { 342 {
343 string capUrl = "/CAPS/" + UUID.Random() + "/"; 343 string capUrl = "/CAPS/" + UUID.Random() + "/";
344 344
345 // Register this as a poll service 345 // Register this as a poll service
346 PollServiceMeshEventArgs args = new PollServiceMeshEventArgs(capUrl, agentID, m_scene); 346 PollServiceMeshEventArgs args = new PollServiceMeshEventArgs(capUrl, agentID, m_scene);
347 347
348 args.Type = PollServiceEventArgs.EventType.Mesh; 348 args.Type = PollServiceEventArgs.EventType.Mesh;
@@ -394,7 +394,7 @@ namespace OpenSim.Region.ClientStack.Linden
394 private readonly Scene m_scene; 394 private readonly Scene m_scene;
395 private ThrottleOutPacketType Throttle; 395 private ThrottleOutPacketType Throttle;
396 private readonly UUID User; 396 private readonly UUID User;
397 397
398 public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser) 398 public MeshCapsDataThrottler(int pBytes, int max, int min, Scene pScene, UUID puser)
399 { 399 {
400 ThrottleBytes = pBytes; 400 ThrottleBytes = pBytes;
@@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
422 // Normal 422 // Normal
423 if (BytesSent <= ThrottleBytes) 423 if (BytesSent <= ThrottleBytes)
424 { 424 {
425 BytesSent += response.bytes; 425 BytesSent += response.bytes;
426 return true; 426 return true;
427 } 427 }
428 else 428 else
@@ -432,7 +432,7 @@ namespace OpenSim.Region.ClientStack.Linden
432 } 432 }
433 return haskey; 433 return haskey;
434 } 434 }
435 435
436 public void ProcessTime() 436 public void ProcessTime()
437 { 437 {
438 PassTime(); 438 PassTime();
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 14a59fe..0c20e04 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.Linden
81 new OpenMetaverse.BlockingQueue<aPollRequest>(); 81 new OpenMetaverse.BlockingQueue<aPollRequest>();
82 82
83 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>(); 83 private Dictionary<UUID,PollServiceTextureEventArgs> m_pollservices = new Dictionary<UUID,PollServiceTextureEventArgs>();
84 84
85 private string m_Url = "localhost"; 85 private string m_Url = "localhost";
86 86
87 #region ISharedRegionModule Members 87 #region ISharedRegionModule Members
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.Linden
148 } 148 }
149 private int ExtractImageThrottle(byte[] pthrottles) 149 private int ExtractImageThrottle(byte[] pthrottles)
150 { 150 {
151 151
152 byte[] adjData; 152 byte[] adjData;
153 int pos = 0; 153 int pos = 0;
154 154
@@ -195,10 +195,10 @@ namespace OpenSim.Region.ClientStack.Linden
195 if(m_NumberScenes <= 0 && m_workerThreads != null) 195 if(m_NumberScenes <= 0 && m_workerThreads != null)
196 { 196 {
197 m_log.DebugFormat("[GetTextureModule] Closing"); 197 m_log.DebugFormat("[GetTextureModule] Closing");
198 198
199 foreach (Thread t in m_workerThreads) 199 foreach (Thread t in m_workerThreads)
200 Watchdog.AbortThread(t.ManagedThreadId); 200 Watchdog.AbortThread(t.ManagedThreadId);
201 201
202 m_queue.Clear(); 202 m_queue.Clear();
203 } 203 }
204 } 204 }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.Linden
222 private Scene m_scene; 222 private Scene m_scene;
223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); 223 private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000);
224 public PollServiceTextureEventArgs(UUID pId, Scene scene) : 224 public PollServiceTextureEventArgs(UUID pId, Scene scene) :
225 base(null, "", null, null, null, pId, int.MaxValue) 225 base(null, "", null, null, null, pId, int.MaxValue)
226 { 226 {
227 m_scene = scene; 227 m_scene = scene;
228 // x is request id, y is userid 228 // x is request id, y is userid
@@ -258,7 +258,7 @@ namespace OpenSim.Region.ClientStack.Linden
258 reqinfo.reqID = x; 258 reqinfo.reqID = x;
259 reqinfo.request = y; 259 reqinfo.request = y;
260 reqinfo.send503 = false; 260 reqinfo.send503 = false;
261 261
262 lock (responses) 262 lock (responses)
263 { 263 {
264 if (responses.Count > 0) 264 if (responses.Count > 0)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.ClientStack.Linden
317 Hashtable headers = new Hashtable(); 317 Hashtable headers = new Hashtable();
318 headers["Retry-After"] = 30; 318 headers["Retry-After"] = 30;
319 response["headers"] = headers; 319 response["headers"] = headers;
320 320
321 lock (responses) 321 lock (responses)
322 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 322 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
323 323
@@ -334,13 +334,13 @@ namespace OpenSim.Region.ClientStack.Linden
334 response["content_type"] = "text/plain"; 334 response["content_type"] = "text/plain";
335 response["keepalive"] = false; 335 response["keepalive"] = false;
336 response["reusecontext"] = false; 336 response["reusecontext"] = false;
337 337
338 lock (responses) 338 lock (responses)
339 responses[requestID] = new aPollResponse() {bytes = 0, response = response}; 339 responses[requestID] = new aPollResponse() {bytes = 0, response = response};
340 340
341 return; 341 return;
342 } 342 }
343 343
344 response = m_getTextureHandler.Handle(requestinfo.request); 344 response = m_getTextureHandler.Handle(requestinfo.request);
345 lock (responses) 345 lock (responses)
346 { 346 {
@@ -349,8 +349,8 @@ namespace OpenSim.Region.ClientStack.Linden
349 bytes = (int) response["int_bytes"], 349 bytes = (int) response["int_bytes"],
350 response = response 350 response = response
351 }; 351 };
352 352
353 } 353 }
354 m_throttler.ProcessTime(); 354 m_throttler.ProcessTime();
355 } 355 }
356 356
@@ -368,16 +368,16 @@ namespace OpenSim.Region.ClientStack.Linden
368 { 368 {
369 string capUrl = "/CAPS/" + UUID.Random() + "/"; 369 string capUrl = "/CAPS/" + UUID.Random() + "/";
370 370
371 // Register this as a poll service 371 // Register this as a poll service
372 PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); 372 PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
373 373
374 args.Type = PollServiceEventArgs.EventType.Texture; 374 args.Type = PollServiceEventArgs.EventType.Texture;
375 MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); 375 MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
376 376
377 string hostName = m_scene.RegionInfo.ExternalHostName; 377 string hostName = m_scene.RegionInfo.ExternalHostName;
378 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; 378 uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
379 string protocol = "http"; 379 string protocol = "http";
380 380
381 if (MainServer.Instance.UseSSL) 381 if (MainServer.Instance.UseSSL)
382 { 382 {
383 hostName = MainServer.Instance.SSLCommonName; 383 hostName = MainServer.Instance.SSLCommonName;
@@ -484,5 +484,5 @@ namespace OpenSim.Region.ClientStack.Linden
484 } 484 }
485 public int ThrottleBytes; 485 public int ThrottleBytes;
486 } 486 }
487 } 487 }
488} 488}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
index 1b68603..44bf1a5 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.ClientStack.Linden
133// data["username"] = sp.Firstname + "." + sp.Lastname; 133// data["username"] = sp.Firstname + "." + sp.Lastname;
134// data["display_name_next_update"] = new OSDDate(DateTime.Now); 134// data["display_name_next_update"] = new OSDDate(DateTime.Now);
135// data["legacy_first_name"] = sp.Firstname; 135// data["legacy_first_name"] = sp.Firstname;
136 data["mesh_upload_status"] = "valid"; 136 data["mesh_upload_status"] = "valid";
137// data["display_name"] = sp.Firstname + " " + sp.Lastname; 137// data["display_name"] = sp.Firstname + " " + sp.Lastname;
138// data["legacy_last_name"] = sp.Lastname; 138// data["legacy_last_name"] = sp.Lastname;
139// data["id"] = m_agentID; 139// data["id"] = m_agentID;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.ClientStack.Linden
141 141
142 //Send back data 142 //Send back data
143 Hashtable responsedata = new Hashtable(); 143 Hashtable responsedata = new Hashtable();
144 responsedata["int_response_code"] = 200; 144 responsedata["int_response_code"] = 200;
145 responsedata["content_type"] = "text/plain"; 145 responsedata["content_type"] = "text/plain";
146 responsedata["keepalive"] = false; 146 responsedata["keepalive"] = false;
147 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data); 147 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index 94f8bc1..189fa36 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ClientStack.Linden
47 { 47 {
48// private static readonly ILog m_log = 48// private static readonly ILog m_log =
49// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51 private Scene m_scene; 51 private Scene m_scene;
52 52
53 #region INonSharedRegionModule Members 53 #region INonSharedRegionModule Members
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.Linden
76 } 76 }
77 77
78 public void Close() 78 public void Close()
79 { 79 {
80 } 80 }
81 81
82 public string Name 82 public string Name
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 713125c..6874662 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.Linden
189 if (i == 0) 189 if (i == 0)
190 { 190 {
191 rootpos = obj.Position; 191 rootpos = obj.Position;
192// rootrot = obj.Rotation; 192// rootrot = obj.Rotation;
193 } 193 }
194 194
195 // Combine the extraparams data into it's ugly blob again.... 195 // Combine the extraparams data into it's ugly blob again....
@@ -321,7 +321,7 @@ namespace OpenSim.Region.ClientStack.Linden
321 pbs.TextureEntry = tmp.GetBytes(); 321 pbs.TextureEntry = tmp.GetBytes();
322 prim.Shape = pbs; 322 prim.Shape = pbs;
323 prim.Scale = obj.Scale; 323 prim.Scale = obj.Scale;
324 324
325 SceneObjectGroup grp = new SceneObjectGroup(); 325 SceneObjectGroup grp = new SceneObjectGroup();
326 326
327 grp.SetRootPart(prim); 327 grp.SetRootPart(prim);
@@ -329,21 +329,21 @@ namespace OpenSim.Region.ClientStack.Linden
329 if (i == 0) 329 if (i == 0)
330 { 330 {
331 rootGroup = grp; 331 rootGroup = grp;
332 332
333 } 333 }
334 grp.AttachToScene(m_scene); 334 grp.AttachToScene(m_scene);
335 grp.AbsolutePosition = obj.Position; 335 grp.AbsolutePosition = obj.Position;
336 prim.RotationOffset = obj.Rotation; 336 prim.RotationOffset = obj.Rotation;
337 337
338 // Required for linking 338 // Required for linking
339 grp.RootPart.ClearUpdateSchedule(); 339 grp.RootPart.ClearUpdateSchedule();
340 340
341 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) 341 if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos))
342 { 342 {
343 m_scene.AddSceneObject(grp); 343 m_scene.AddSceneObject(grp);
344 grp.AbsolutePosition = obj.Position; 344 grp.AbsolutePosition = obj.Position;
345 } 345 }
346 346
347 allparts[i] = grp; 347 allparts[i] = grp;
348 } 348 }
349 349
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack.Linden
359 pos 359 pos
360 = m_scene.GetNewRezLocation( 360 = m_scene.GetNewRezLocation(
361 Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false); 361 Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale, false);
362 362
363 responsedata["int_response_code"] = 200; //501; //410; //404; 363 responsedata["int_response_code"] = 200; //501; //410; //404;
364 responsedata["content_type"] = "text/plain"; 364 responsedata["content_type"] = "text/plain";
365 responsedata["keepalive"] = false; 365 responsedata["keepalive"] = false;
@@ -367,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden
367 367
368 return responsedata; 368 return responsedata;
369 } 369 }
370 370
371 private string ConvertUintToBytes(uint val) 371 private string ConvertUintToBytes(uint val)
372 { 372 {
373 byte[] resultbytes = Utils.UIntToBytes(val); 373 byte[] resultbytes = Utils.UIntToBytes(val);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
index 67272dd..f36826b 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ClientStack.LindenCaps")] 8[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
index 5196368..b3e3ac3 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
58 { 58 {
59// private static readonly ILog m_log = 59// private static readonly ILog m_log =
60// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 private Scene m_scene; 62 private Scene m_scene;
63 private IEventQueue m_eventQueue; 63 private IEventQueue m_eventQueue;
64 private Commands m_commands = new Commands(); 64 private Commands m_commands = new Commands();
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.Linden
155 155
156 SendConsoleOutput(agentID, reply); 156 SendConsoleOutput(agentID, reply);
157 } 157 }
158 158
159 public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn) 159 public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn)
160 { 160 {
161 m_commands.AddCommand(module, shared, command, help, longhelp, fn); 161 m_commands.AddCommand(module, shared, command, help, longhelp, fn);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
index f7259a6..39f5baf 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden
50 /// This is required for uploading Mesh. 50 /// This is required for uploading Mesh.
51 /// Since is accepts an open-ended response, we also send more information 51 /// Since is accepts an open-ended response, we also send more information
52 /// for viewers that care to interpret it. 52 /// for viewers that care to interpret it.
53 /// 53 ///
54 /// NOTE: Part of this code was adapted from the Aurora project, specifically 54 /// NOTE: Part of this code was adapted from the Aurora project, specifically
55 /// the normal part of the response in the capability handler. 55 /// the normal part of the response in the capability handler.
56 /// </remarks> 56 /// </remarks>
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.Linden
82 IConfig config = source.Configs["SimulatorFeatures"]; 82 IConfig config = source.Configs["SimulatorFeatures"];
83 83
84 if (config != null) 84 if (config != null)
85 { 85 {
86 // 86 //
87 // All this is obsolete since getting these features from the grid service!! 87 // All this is obsolete since getting these features from the grid service!!
88 // Will be removed after the next release 88 // Will be removed after the next release
@@ -251,7 +251,7 @@ namespace OpenSim.Region.ClientStack.Linden
251 251
252 //Send back data 252 //Send back data
253 Hashtable responsedata = new Hashtable(); 253 Hashtable responsedata = new Hashtable();
254 responsedata["int_response_code"] = 200; 254 responsedata["int_response_code"] = 200;
255 responsedata["content_type"] = "text/plain"; 255 responsedata["content_type"] = "text/plain";
256 responsedata["keepalive"] = false; 256 responsedata["keepalive"] = false;
257 257
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
index db16ccb..6ffed4d 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/Tests/WebFetchInvDescModuleTests.cs
@@ -151,7 +151,7 @@ namespace OpenSim.Region.ClientStack.Linden.Caps.Tests
151 OSDMap responseOsd = (OSDMap)OSDParser.DeserializeLLSDXml(context.ResponseBody); 151 OSDMap responseOsd = (OSDMap)OSDParser.DeserializeLLSDXml(context.ResponseBody);
152 OSDArray foldersOsd = (OSDArray)responseOsd["folders"]; 152 OSDArray foldersOsd = (OSDArray)responseOsd["folders"];
153 OSDMap folderOsd = (OSDMap)foldersOsd[0]; 153 OSDMap folderOsd = (OSDMap)foldersOsd[0];
154 154
155 // A sanity check that the response has the expected number of descendents for a default inventory 155 // A sanity check that the response has the expected number of descendents for a default inventory
156 // TODO: Need a more thorough check. 156 // TODO: Need a more thorough check.
157 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16)); 157 Assert.That((int)folderOsd["descendents"], Is.EqualTo(16));
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
index 8fd8d1f..dfe097e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ClientStack.Linden
84 public void AddRegion(Scene s) 84 public void AddRegion(Scene s)
85 { 85 {
86 m_scene = s; 86 m_scene = s;
87 87
88 } 88 }
89 89
90 public void RemoveRegion(Scene s) 90 public void RemoveRegion(Scene s)
@@ -94,14 +94,14 @@ namespace OpenSim.Region.ClientStack.Linden
94 s.EventManager.OnRemovePresence -= DeRegisterPresence; 94 s.EventManager.OnRemovePresence -= DeRegisterPresence;
95 m_BakedTextureModule = null; 95 m_BakedTextureModule = null;
96 m_scene = null; 96 m_scene = null;
97 } 97 }
98 98
99 public void RegionLoaded(Scene s) 99 public void RegionLoaded(Scene s)
100 { 100 {
101 m_scene.EventManager.OnRegisterCaps += RegisterCaps; 101 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
102 m_scene.EventManager.OnNewPresence += RegisterNewPresence; 102 m_scene.EventManager.OnNewPresence += RegisterNewPresence;
103 m_scene.EventManager.OnRemovePresence += DeRegisterPresence; 103 m_scene.EventManager.OnRemovePresence += DeRegisterPresence;
104 104
105 } 105 }
106 106
107 private void DeRegisterPresence(UUID agentId) 107 private void DeRegisterPresence(UUID agentId)
@@ -205,7 +205,7 @@ namespace OpenSim.Region.ClientStack.Linden
205 } 205 }
206 } 206 }
207 else 207 else
208 { 208 {
209 for (int i = 0; i < maxCacheitemsLoop; i++) 209 for (int i = 0; i < maxCacheitemsLoop; i++)
210 { 210 {
211 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) 211 if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex)
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ClientStack.Linden
285 avatarhandler.UploadBakedTexture, 285 avatarhandler.UploadBakedTexture,
286 "UploadBakedTexture", 286 "UploadBakedTexture",
287 agentID.ToString())); 287 agentID.ToString()));
288 288
289 } 289 }
290 else 290 else
291 { 291 {
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index ba4fb76..e0ec842 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -456,7 +456,7 @@ namespace OpenSim.Region.ClientStack.Linden
456 catch (Exception e) 456 catch (Exception e)
457 { 457 {
458 m_log.ErrorFormat( 458 m_log.ErrorFormat(
459 "[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}", 459 "[INVENTORY]: Failed to process queued inventory request {0} for {1}. Exception {3}",
460 poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e); 460 poolreq.reqID, poolreq.presence != null ? poolreq.presence.Name : "unknown", e);
461 } 461 }
462 } 462 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
index 15d6f7f..0a6785c 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// Sends packets for this texture to a client until packetsToSend is 101 /// Sends packets for this texture to a client until packetsToSend is
102 /// hit or the transfer completes 102 /// hit or the transfer completes
103 /// </summary> 103 /// </summary>
104 /// <param name="client">Reference to the client that the packets are destined for</param> 104 /// <param name="client">Reference to the client that the packets are destined for</param>
@@ -198,7 +198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
198 m_currentPacket = m_stopPacket; 198 m_currentPacket = m_stopPacket;
199 return; 199 return;
200 } 200 }
201 201
202 if (DiscardLevel >= 0 || m_stopPacket == 0) 202 if (DiscardLevel >= 0 || m_stopPacket == 0)
203 { 203 {
204 // This shouldn't happen, but if it does, we really can't proceed 204 // This shouldn't happen, but if it does, we really can't proceed
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 27ca740..dba2872 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -434,7 +434,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
434 /// Entity update queues 434 /// Entity update queues
435 /// </summary> 435 /// </summary>
436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } } 436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } }
437 437
438 /// <summary> 438 /// <summary>
439 /// First name of the agent/avatar represented by the client 439 /// First name of the agent/avatar represented by the client
440 /// </summary> 440 /// </summary>
@@ -478,7 +478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
478 public List<uint> SelectedObjects {get; private set;} 478 public List<uint> SelectedObjects {get; private set;}
479 479
480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } 480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } }
481 481
482 482
483 #endregion Properties 483 #endregion Properties
484 484
@@ -554,7 +554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
554 // there is some unidentified connection problem, not where we have issues due to deadlock 554 // there is some unidentified connection problem, not where we have issues due to deadlock
555 if (!IsActive && !force) 555 if (!IsActive && !force)
556 { 556 {
557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set", 557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set",
558 LogHeader, Name, m_scene.Name); 558 LogHeader, Name, m_scene.Name);
559 559
560 return; 560 return;
@@ -713,13 +713,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
713 /// <param name="packetType"></param> 713 /// <param name="packetType"></param>
714 /// <param name="handler"></param> 714 /// <param name="handler"></param>
715 /// <param name="doAsync"> 715 /// <param name="doAsync">
716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to 716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to
717 /// a threadpool thread or placed in a queue depends on the inEngine parameter. 717 /// a threadpool thread or placed in a queue depends on the inEngine parameter.
718 /// </param> 718 /// </param>
719 /// <param name="inEngine"> 719 /// <param name="inEngine">
720 /// If async is false then this parameter is ignored. 720 /// If async is false then this parameter is ignored.
721 /// If async is true and inEngine is false, then the packet is sent directly to a 721 /// If async is true and inEngine is false, then the packet is sent directly to a
722 /// threadpool thread. 722 /// threadpool thread.
723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine. 723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine.
724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many 724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many
725 /// simultaneous async requests. 725 /// simultaneous async requests.
@@ -820,7 +820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
820 public void ProcessSpecificPacketAsync(object state) 820 public void ProcessSpecificPacketAsync(object state)
821 { 821 {
822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state; 822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state;
823 823
824 try 824 try
825 { 825 {
826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack); 826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack);
@@ -830,7 +830,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
830 // Make sure that we see any exception caused by the asynchronous operation. 830 // Make sure that we see any exception caused by the asynchronous operation.
831 m_log.Error( 831 m_log.Error(
832 string.Format( 832 string.Format(
833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name), 833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name),
834 e); 834 e);
835 } 835 }
836 } 836 }
@@ -976,7 +976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
976 if (im.imSessionID == UUID.Zero.Guid) 976 if (im.imSessionID == UUID.Zero.Guid)
977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID); 977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID);
978 else 978 else
979 msg.MessageBlock.ID = new UUID(im.imSessionID); 979 msg.MessageBlock.ID = new UUID(im.imSessionID);
980 msg.MessageBlock.Offline = im.offline; 980 msg.MessageBlock.Offline = im.offline;
981 msg.MessageBlock.ParentEstateID = im.ParentEstateID; 981 msg.MessageBlock.ParentEstateID = im.ParentEstateID;
982 msg.MessageBlock.Position = im.Position; 982 msg.MessageBlock.Position = im.Position;
@@ -1301,7 +1301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1301 1301
1302 // Legacy form of invocation that passes around a bare data array. 1302 // Legacy form of invocation that passes around a bare data array.
1303 // Just ignore what was passed and use the real terrain info that is part of the scene. 1303 // Just ignore what was passed and use the real terrain info that is part of the scene.
1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI, 1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
1305 // there is a special form for specifying multiple terrain patches to send. 1305 // there is a special form for specifying multiple terrain patches to send.
1306 // The form is to pass 'px' as negative the number of patches to send and to 1306 // The form is to pass 'px' as negative the number of patches to send and to
1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px' 1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px'
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1396 public virtual void SendWindData(int version, Vector2[] windSpeeds) 1396 public virtual void SendWindData(int version, Vector2[] windSpeeds)
1397 { 1397 {
1398// Vector2[] windSpeeds = (Vector2[])o; 1398// Vector2[] windSpeeds = (Vector2[])o;
1399 1399
1400 ulong handle = this.Scene.RegionInfo.RegionHandle; 1400 ulong handle = this.Scene.RegionInfo.RegionHandle;
1401 bool isNewData; 1401 bool isNewData;
1402 lock(lastWindPackets) 1402 lock(lastWindPackets)
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1780 m_entityUpdates.Remove(localIDs); 1780 m_entityUpdates.Remove(localIDs);
1781 1781
1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); 1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
1783 1783
1784 int perpacket = localIDs.Count; 1784 int perpacket = localIDs.Count;
1785 if(perpacket > 200) 1785 if(perpacket > 200)
1786 perpacket = 200; 1786 perpacket = 200;
@@ -2545,7 +2545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2545 for (int i = 0; i < buttonlabels.Length; i++) 2545 for (int i = 0; i < buttonlabels.Length; i++)
2546 { 2546 {
2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock(); 2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock();
2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24); 2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24);
2549 } 2549 }
2550 dialog.Buttons = buttons; 2550 dialog.Buttons = buttons;
2551 2551
@@ -2863,15 +2863,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts) 2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
2864 { 2864 {
2865/* not in use 2865/* not in use
2866 // udp part 2866 // udp part
2867 ObjectPropertiesPacket packet = 2867 ObjectPropertiesPacket packet =
2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count]; 2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count];
2870 2870
2871 int i = 0; 2871 int i = 0;
2872 foreach(SceneObjectPart sop in parts) 2872 foreach(SceneObjectPart sop in parts)
2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop); 2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop);
2874 2874
2875 packet.ObjectData = ObjectData; 2875 packet.ObjectData = ObjectData;
2876 packet.Header.Zerocoded = true; 2876 packet.Header.Zerocoded = true;
2877 // udp send splits this mega packets correctly 2877 // udp send splits this mega packets correctly
@@ -3003,13 +3003,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3003 isWearable = ((AssetType) req.AssetInf.Type == 3003 isWearable = ((AssetType) req.AssetInf.Type ==
3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing); 3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing);
3005 3005
3006 3006
3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); 3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
3008 3008
3009 3009
3010 //if (isWearable) 3010 //if (isWearable)
3011 // m_log.Debug((AssetType)req.AssetInf.Type); 3011 // m_log.Debug((AssetType)req.AssetInf.Type);
3012 3012
3013 TransferInfoPacket Transfer = new TransferInfoPacket(); 3013 TransferInfoPacket Transfer = new TransferInfoPacket();
3014 Transfer.TransferInfo.ChannelType = 2; 3014 Transfer.TransferInfo.ChannelType = 2;
3015 Transfer.TransferInfo.Status = 0; 3015 Transfer.TransferInfo.Status = 0;
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3537 { 3537 {
3538 if(avatarID != AgentId) 3538 if(avatarID != AgentId)
3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId"); 3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId");
3540 3540
3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
3542 if(eq != null) 3542 if(eq != null)
3543 { 3543 {
@@ -3862,7 +3862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; 3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
3863 AgentWearablesUpdatePacket.WearableDataBlock awb; 3863 AgentWearablesUpdatePacket.WearableDataBlock awb;
3864 int idx = 0; 3864 int idx = 0;
3865 3865
3866 for (int i = 0; i < wearables.Length; i++) 3866 for (int i = 0; i < wearables.Length; i++)
3867 { 3867 {
3868 for (int j = 0; j < wearables[i].Count; j++) 3868 for (int j = 0; j < wearables[i].Count; j++)
@@ -3878,7 +3878,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3879 // awb.ItemID, awb.AssetID, i, Name); 3879 // awb.ItemID, awb.AssetID, i, Name);
3880 } 3880 }
3881 } 3881 }
3882 3882
3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3884 } 3884 }
@@ -3955,7 +3955,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3955// m_log.DebugFormat( 3955// m_log.DebugFormat(
3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", 3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}",
3957// avatar.Name, avatar.UUID, Name, AgentId); 3957// avatar.Name, avatar.UUID, Name, AgentId);
3958 3958
3959 ScenePresence presence = avatar as ScenePresence; 3959 ScenePresence presence = avatar as ScenePresence;
3960 if (presence == null) 3960 if (presence == null)
3961 return; 3961 return;
@@ -3965,7 +3965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3965 3965
3966 objupdate.RegionData.RegionHandle = presence.RegionHandle; 3966 objupdate.RegionData.RegionHandle = presence.RegionHandle;
3967// objupdate.RegionData.TimeDilation = ushort.MaxValue; 3967// objupdate.RegionData.TimeDilation = ushort.MaxValue;
3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); 3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
3971 3971
@@ -4021,7 +4021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4021 4021
4022 #region Primitive Packet/Data Sending Methods 4022 #region Primitive Packet/Data Sending Methods
4023 4023
4024 4024
4025 /// <summary> 4025 /// <summary>
4026 /// Generate one of the object update packets based on PrimUpdateFlags 4026 /// Generate one of the object update packets based on PrimUpdateFlags
4027 /// and broadcast the packet to clients 4027 /// and broadcast the packet to clients
@@ -4054,18 +4054,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity); 4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity);
4055 4055
4056 lock (m_entityUpdates.SyncRoot) 4056 lock (m_entityUpdates.SyncRoot)
4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags)); 4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags));
4058 } 4058 }
4059 4059
4060 /// <summary> 4060 /// <summary>
4061 /// Requeue an EntityUpdate when it was not acknowledged by the client. 4061 /// Requeue an EntityUpdate when it was not acknowledged by the client.
4062 /// We will update the priority and put it in the correct queue, merging update flags 4062 /// We will update the priority and put it in the correct queue, merging update flags
4063 /// with any other updates that may be queued for the same entity. 4063 /// with any other updates that may be queued for the same entity.
4064 /// The original update time is used for the merged update. 4064 /// The original update time is used for the merged update.
4065 /// </summary> 4065 /// </summary>
4066 private void ResendPrimUpdate(EntityUpdate update) 4066 private void ResendPrimUpdate(EntityUpdate update)
4067 { 4067 {
4068 // If the update exists in priority queue, it will be updated. 4068 // If the update exists in priority queue, it will be updated.
4069 // If it does not exist then it will be added with the current (rather than its original) priority 4069 // If it does not exist then it will be added with the current (rather than its original) priority
4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity); 4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
4071 4071
@@ -4074,9 +4074,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4074 } 4074 }
4075 4075
4076 /// <summary> 4076 /// <summary>
4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client. 4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
4078 /// We will update the priority and put it in the correct queue, merging update flags 4078 /// We will update the priority and put it in the correct queue, merging update flags
4079 /// with any other updates that may be queued for the same entity. 4079 /// with any other updates that may be queued for the same entity.
4080 /// The original update time is used for the merged update. 4080 /// The original update time is used for the merged update.
4081 /// </summary> 4081 /// </summary>
4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket) 4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
@@ -4140,7 +4140,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4140 lock (m_entityUpdates.SyncRoot) 4140 lock (m_entityUpdates.SyncRoot)
4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) 4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue))
4142 break; 4142 break;
4143 4143
4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; 4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
4145 4145
4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) 4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill))
@@ -4243,7 +4243,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4243 dpos = (float)Math.Sqrt(dpos) - bradius; 4243 dpos = (float)Math.Sqrt(dpos) - bradius;
4244 if(dpos > cullingrange) 4244 if(dpos > cullingrange)
4245 continue; 4245 continue;
4246 4246
4247 GroupsNeedFullUpdate.Add(grp); 4247 GroupsNeedFullUpdate.Add(grp);
4248 continue; 4248 continue;
4249 } 4249 }
@@ -4276,7 +4276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4276 bool canUseCompressed = true; 4276 bool canUseCompressed = true;
4277 bool canUseImproved = true; 4277 bool canUseImproved = true;
4278 4278
4279 4279
4280 // Compressed object updates only make sense for LL primitives 4280 // Compressed object updates only make sense for LL primitives
4281 if (!(update.Entity is SceneObjectPart)) 4281 if (!(update.Entity is SceneObjectPart))
4282 { 4282 {
@@ -4316,14 +4316,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4316 canUseImproved = false; 4316 canUseImproved = false;
4317 } 4317 }
4318 } 4318 }
4319 4319
4320 #endregion UpdateFlags to packet type conversion 4320 #endregion UpdateFlags to packet type conversion
4321 4321
4322 #region Block Construction 4322 #region Block Construction
4323 4323
4324 // TODO: Remove this once we can build compressed updates 4324 // TODO: Remove this once we can build compressed updates
4325 canUseCompressed = false; 4325 canUseCompressed = false;
4326 4326
4327 if (!canUseImproved && !canUseCompressed) 4327 if (!canUseImproved && !canUseCompressed)
4328 { 4328 {
4329 ObjectUpdatePacket.ObjectDataBlock ablock; 4329 ObjectUpdatePacket.ObjectDataBlock ablock;
@@ -4368,7 +4368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4368 } 4368 }
4369 4369
4370 #region Packet Sending 4370 #region Packet Sending
4371 4371
4372 ushort timeDilation; 4372 ushort timeDilation;
4373 4373
4374 if(!IsActive) 4374 if(!IsActive)
@@ -4398,7 +4398,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4399 packet.RegionData.TimeDilation = timeDilation; 4399 packet.RegionData.TimeDilation = timeDilation;
4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count]; 4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count];
4401 4401
4402 for (int i = 0; i < objectUpdateBlocks.Count; i++) 4402 for (int i = 0; i < objectUpdateBlocks.Count; i++)
4403 packet.ObjectData[i] = objectUpdateBlocks[i]; 4403 packet.ObjectData[i] = objectUpdateBlocks[i];
4404 4404
@@ -4406,7 +4406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4406 4406
4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); }); 4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); });
4408 } 4408 }
4409 4409
4410 if (compressedUpdateBlocks.Count > 0) 4410 if (compressedUpdateBlocks.Count > 0)
4411 { 4411 {
4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); 4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
@@ -4421,7 +4421,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4421 4421
4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); }); 4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); });
4423 } 4423 }
4424 4424
4425 if (terseUpdateBlocks.Count > 0) 4425 if (terseUpdateBlocks.Count > 0)
4426 { 4426 {
4427 ImprovedTerseObjectUpdatePacket packet 4427 ImprovedTerseObjectUpdatePacket packet
@@ -4430,7 +4430,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4431 packet.RegionData.TimeDilation = timeDilation; 4431 packet.RegionData.TimeDilation = timeDilation;
4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count]; 4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count];
4433 4433
4434 for (int i = 0; i < terseUpdateBlocks.Count; i++) 4434 for (int i = 0; i < terseUpdateBlocks.Count; i++)
4435 packet.ObjectData[i] = terseUpdateBlocks[i]; 4435 packet.ObjectData[i] = terseUpdateBlocks[i];
4436 4436
@@ -4484,11 +4484,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4484 } 4484 }
4485 4485
4486// m_log.DebugFormat( 4486// m_log.DebugFormat(
4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}", 4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}",
4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); 4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name);
4489// 4489//
4490 } 4490 }
4491 4491
4492 public void ReprioritizeUpdates() 4492 public void ReprioritizeUpdates()
4493 { 4493 {
4494 lock (m_entityUpdates.SyncRoot) 4494 lock (m_entityUpdates.SyncRoot)
@@ -4600,7 +4600,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4600 foreach(SceneObjectPart p in grp.Parts) 4600 foreach(SceneObjectPart p in grp.Parts)
4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill); 4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill);
4602 } 4602 }
4603 } 4603 }
4604 4604
4605 CheckGroupsInViewBusy = false; 4605 CheckGroupsInViewBusy = false;
4606 } 4606 }
@@ -4640,8 +4640,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4640 4640
4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0) 4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0)
4642 { 4642 {
4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30); 4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30);
4644 4644
4645 if (m_entityUpdates.Count > 0) 4645 if (m_entityUpdates.Count > 0)
4646 ProcessEntityUpdates(maxUpdateBytes); 4646 ProcessEntityUpdates(maxUpdateBytes);
4647 4647
@@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4660 if (m_entityUpdates.Count > 0) 4660 if (m_entityUpdates.Count > 0)
4661 return true; 4661 return true;
4662 if (m_entityProps.Count > 0) 4662 if (m_entityProps.Count > 0)
4663 return true; 4663 return true;
4664 } 4664 }
4665 4665
4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) 4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0)
@@ -4775,7 +4775,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4775 { 4775 {
4776 internal bool SendFamilyProps; 4776 internal bool SendFamilyProps;
4777 internal bool SendObjectProps; 4777 internal bool SendObjectProps;
4778 4778
4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) 4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj)
4780 : base(entity,(PrimUpdateFlags)flags) 4780 : base(entity,(PrimUpdateFlags)flags)
4781 { 4781 {
@@ -4790,7 +4790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4790 base.Update(update); 4790 base.Update(update);
4791 } 4791 }
4792 } 4792 }
4793 4793
4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags) 4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags)
4795 { 4795 {
4796 uint priority = 0; // time based ordering only 4796 uint priority = 0; // time based ordering only
@@ -4824,7 +4824,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4824 foreach (ObjectPropertyUpdate update in updates) 4824 foreach (ObjectPropertyUpdate update in updates)
4825 ResendPropertyUpdate(update); 4825 ResendPropertyUpdate(update);
4826 } 4826 }
4827 4827
4828 public void SendObjectPropertiesReply(ISceneEntity entity) 4828 public void SendObjectPropertiesReply(ISceneEntity entity)
4829 { 4829 {
4830 uint priority = 0; // time based ordering only 4830 uint priority = 0; // time based ordering only
@@ -4845,8 +4845,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4845 4845
4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = 4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); 4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4848 4848
4849 4849
4850 EntityUpdate iupdate; 4850 EntityUpdate iupdate;
4851 Int32 timeinqueue; // this is just debugging code & can be dropped later 4851 Int32 timeinqueue; // this is just debugging code & can be dropped later
4852 4852
@@ -4882,7 +4882,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4882 } 4882 }
4883 } 4883 }
4884 } 4884 }
4885 4885
4886 if (objectPropertiesBlocks.Count > 0) 4886 if (objectPropertiesBlocks.Count > 0)
4887 { 4887 {
4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -4890,7 +4890,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++) 4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++)
4891 packet.ObjectData[i] = objectPropertiesBlocks[i]; 4891 packet.ObjectData[i] = objectPropertiesBlocks[i];
4892 4892
4893 4893
4894 objectPropertiesBlocks.Clear(); 4894 objectPropertiesBlocks.Clear();
4895 packet.Header.Zerocoded = true; 4895 packet.Header.Zerocoded = true;
4896 4896
@@ -4907,12 +4907,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4907 // pbcnt += blocks.Count; 4907 // pbcnt += blocks.Count;
4908 // ppcnt++; 4908 // ppcnt++;
4909 } 4909 }
4910 4910
4911 // Int32 fpcnt = 0; 4911 // Int32 fpcnt = 0;
4912 // Int32 fbcnt = 0; 4912 // Int32 fbcnt = 0;
4913 4913
4914 if (objectFamilyBlocks.Count > 0) 4914 if (objectFamilyBlocks.Count > 0)
4915 { 4915 {
4916 // one packet per object block... uggh... 4916 // one packet per object block... uggh...
4917 for (int i = 0; i < objectFamilyBlocks.Count; i++) 4917 for (int i = 0; i < objectFamilyBlocks.Count; i++)
4918 { 4918 {
@@ -4965,7 +4965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4965 } 4965 }
4966 needPhysics.Clear(); 4966 needPhysics.Clear();
4967 } 4967 }
4968 4968
4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); 4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt);
4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt); 4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt);
4971 } 4971 }
@@ -4998,7 +4998,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4998 4998
4999 return block; 4999 return block;
5000 } 5000 }
5001 5001
5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) 5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop)
5003 { 5003 {
5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -5024,7 +5024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5024 block.FolderID = UUID.Zero; // sog.FromFolderID ?? 5024 block.FolderID = UUID.Zero; // sog.FromFolderID ??
5025 block.FromTaskID = UUID.Zero; // ??? 5025 block.FromTaskID = UUID.Zero; // ???
5026 block.InventorySerial = (short)sop.InventorySerial; 5026 block.InventorySerial = (short)sop.InventorySerial;
5027 5027
5028 SceneObjectPart root = sop.ParentGroup.RootPart; 5028 SceneObjectPart root = sop.ParentGroup.RootPart;
5029 5029
5030 block.TouchName = Util.StringToBytes256(root.TouchName); 5030 block.TouchName = Util.StringToBytes256(root.TouchName);
@@ -5036,7 +5036,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5036// { 5036// {
5037// using (BinaryWriter binWriter = new BinaryWriter(memStream)) 5037// using (BinaryWriter binWriter = new BinaryWriter(memStream))
5038// { 5038// {
5039// for (int i = 0; i < sop.GetNumberOfSides(); i++) 5039// for (int i = 0; i < sop.GetNumberOfSides(); i++)
5040// { 5040// {
5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i]; 5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i];
5042// 5042//
@@ -5053,7 +5053,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5053// block.TextureID = memStream.ToArray(); 5053// block.TextureID = memStream.ToArray();
5054// } 5054// }
5055// } 5055// }
5056 5056
5057 block.TextureID = new byte[0]; // TextureID ??? 5057 block.TextureID = new byte[0]; // TextureID ???
5058 block.SitName = Util.StringToBytes256(root.SitName); 5058 block.SitName = Util.StringToBytes256(root.SitName);
5059 block.OwnerMask = root.OwnerMask; 5059 block.OwnerMask = root.OwnerMask;
@@ -5202,7 +5202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5202 public void SendEstateCovenantInformation(UUID covenant) 5202 public void SendEstateCovenantInformation(UUID covenant)
5203 { 5203 {
5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name); 5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name);
5205 5205
5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
5208 edata.CovenantID = covenant; 5208 edata.CovenantID = covenant;
@@ -5219,7 +5219,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5219 { 5219 {
5220// m_log.DebugFormat( 5220// m_log.DebugFormat(
5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant); 5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant);
5222 5222
5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
5224 packet.MethodData.Invoice = invoice; 5224 packet.MethodData.Invoice = invoice;
5225 packet.AgentData.TransactionID = UUID.Random(); 5225 packet.AgentData.TransactionID = UUID.Random();
@@ -5282,13 +5282,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5282 } 5282 }
5283 5283
5284 public void SendLandProperties( 5284 public void SendLandProperties(
5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo, 5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo,
5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
5287 { 5287 {
5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name); 5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name);
5289 5289
5290 LandData landData = lo.LandData; 5290 LandData landData = lo.LandData;
5291 5291
5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); 5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
5293 5293
5294 updateMessage.AABBMax = landData.AABBMax; 5294 updateMessage.AABBMax = landData.AABBMax;
@@ -5301,7 +5301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5301 updateMessage.Category = landData.Category; 5301 updateMessage.Category = landData.Category;
5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); 5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
5303 updateMessage.ClaimPrice = landData.ClaimPrice; 5303 updateMessage.ClaimPrice = landData.ClaimPrice;
5304 updateMessage.GroupID = landData.GroupID; 5304 updateMessage.GroupID = landData.GroupID;
5305 updateMessage.IsGroupOwned = landData.IsGroupOwned; 5305 updateMessage.IsGroupOwned = landData.IsGroupOwned;
5306 updateMessage.LandingType = (LandingType) landData.LandingType; 5306 updateMessage.LandingType = (LandingType) landData.LandingType;
5307 updateMessage.LocalID = landData.LocalID; 5307 updateMessage.LocalID = landData.LocalID;
@@ -5322,7 +5322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5322 updateMessage.Name = landData.Name; 5322 updateMessage.Name = landData.Name;
5323 updateMessage.OtherCleanTime = landData.OtherCleanTime; 5323 updateMessage.OtherCleanTime = landData.OtherCleanTime;
5324 updateMessage.OtherCount = 0; //TODO: Unimplemented 5324 updateMessage.OtherCount = 0; //TODO: Unimplemented
5325 updateMessage.OwnerID = landData.OwnerID; 5325 updateMessage.OwnerID = landData.OwnerID;
5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; 5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor; 5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
5328 updateMessage.PassHours = landData.PassHours; 5328 updateMessage.PassHours = landData.PassHours;
@@ -5337,10 +5337,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5337 5337
5338 updateMessage.RentPrice = 0; 5338 updateMessage.RentPrice = 0;
5339 updateMessage.RequestResult = (ParcelResult) request_result; 5339 updateMessage.RequestResult = (ParcelResult) request_result;
5340 updateMessage.SalePrice = landData.SalePrice; 5340 updateMessage.SalePrice = landData.SalePrice;
5341 updateMessage.SelfCount = 0; //TODO: Unimplemented 5341 updateMessage.SelfCount = 0; //TODO: Unimplemented
5342 updateMessage.SequenceID = sequence_id; 5342 updateMessage.SequenceID = sequence_id;
5343 5343
5344 if (landData.SimwideArea > 0) 5344 if (landData.SimwideArea > 0)
5345 { 5345 {
5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount(); 5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
@@ -5349,7 +5349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5349 { 5349 {
5350 updateMessage.SimWideMaxPrims = 0; 5350 updateMessage.SimWideMaxPrims = 0;
5351 } 5351 }
5352 5352
5353 updateMessage.SnapSelection = snap_selection; 5353 updateMessage.SnapSelection = snap_selection;
5354 updateMessage.SnapshotID = landData.SnapshotID; 5354 updateMessage.SnapshotID = landData.SnapshotID;
5355 updateMessage.Status = (ParcelStatus) landData.Status; 5355 updateMessage.Status = (ParcelStatus) landData.Status;
@@ -5367,11 +5367,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5367 updateMessage.SeeAVs = landData.SeeAVs; 5367 updateMessage.SeeAVs = landData.SeeAVs;
5368 updateMessage.AnyAVSounds = landData.AnyAVSounds; 5368 updateMessage.AnyAVSounds = landData.AnyAVSounds;
5369 updateMessage.GroupAVSounds = landData.GroupAVSounds; 5369 updateMessage.GroupAVSounds = landData.GroupAVSounds;
5370 5370
5371 IPrimCounts pc = lo.PrimCounts; 5371 IPrimCounts pc = lo.PrimCounts;
5372 updateMessage.OwnerPrims = pc.Owner; 5372 updateMessage.OwnerPrims = pc.Owner;
5373 updateMessage.GroupPrims = pc.Group; 5373 updateMessage.GroupPrims = pc.Group;
5374 updateMessage.OtherPrims = pc.Others; 5374 updateMessage.OtherPrims = pc.Others;
5375 updateMessage.SelectedPrims = pc.Selected; 5375 updateMessage.SelectedPrims = pc.Selected;
5376 updateMessage.TotalPrims = pc.Total; 5376 updateMessage.TotalPrims = pc.Total;
5377 updateMessage.SimWideTotalPrims = pc.Simulator; 5377 updateMessage.SimWideTotalPrims = pc.Simulator;
@@ -5384,8 +5384,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5384 if (eq != null) 5384 if (eq != null)
5385 { 5385 {
5386 eq.ParcelProperties(updateMessage, this.AgentId); 5386 eq.ParcelProperties(updateMessage, this.AgentId);
5387 } 5387 }
5388 else 5388 else
5389 { 5389 {
5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data."); 5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data.");
5391 } 5391 }
@@ -5422,7 +5422,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs) 5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs)
5423 { 5423 {
5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count); 5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count);
5425 5425
5426 bool firstCall = true; 5426 bool firstCall = true;
5427 const int MAX_OBJECTS_PER_PACKET = 251; 5427 const int MAX_OBJECTS_PER_PACKET = 251;
5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect); 5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect);
@@ -5634,7 +5634,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5634 5634
5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block 5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
5637 5637
5638 block.Data = data; 5638 block.Data = data;
5639 5639
5640 if (textureEntry != null && textureEntry.Length > 0) 5640 if (textureEntry != null && textureEntry.Length > 0)
@@ -5661,7 +5661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5661 Vector3 offsetPosition = data.OffsetPosition; 5661 Vector3 offsetPosition = data.OffsetPosition;
5662 Quaternion rotation = data.Rotation; 5662 Quaternion rotation = data.Rotation;
5663 uint parentID = data.ParentID; 5663 uint parentID = data.ParentID;
5664 5664
5665// m_log.DebugFormat( 5665// m_log.DebugFormat(
5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name); 5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name);
5667 5667
@@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5752/* 5752/*
5753 if (data.ParentGroup.IsAttachment) 5753 if (data.ParentGroup.IsAttachment)
5754 { 5754 {
5755 update.NameValue 5755 update.NameValue
5756 = Util.StringToBytes256( 5756 = Util.StringToBytes256(
5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID)); 5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID));
5758 5758
@@ -5906,7 +5906,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5906 { 5906 {
5907 m_groupPowers.Clear(); 5907 m_groupPowers.Clear();
5908 m_groupPowers = powers; 5908 m_groupPowers = powers;
5909 } 5909 }
5910 } 5910 }
5911 5911
5912 public ulong GetGroupPowers(UUID groupID) 5912 public ulong GetGroupPowers(UUID groupID)
@@ -6193,7 +6193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6193 { 6193 {
6194 if( 6194 if(
6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed 6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed
6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 && 6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 &&
6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly 6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly
6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass 6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass
6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed 6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed
@@ -6208,7 +6208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6208 if( 6208 if(
6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold 6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold
6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack 6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold 6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold
6212 ) 6212 )
6213 return true; 6213 return true;
6214 6214
@@ -6257,7 +6257,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6257 6257
6258 TotalAgentUpdates++; 6258 TotalAgentUpdates++;
6259 // dont let ignored updates pollute this throttles 6259 // dont let ignored updates pollute this throttles
6260 if(SceneAgent == null || SceneAgent.IsChildAgent || 6260 if(SceneAgent == null || SceneAgent.IsChildAgent ||
6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence ) 6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence )
6262 { 6262 {
6263 // throttle reset is done at MoveAgentIntoRegion() 6263 // throttle reset is done at MoveAgentIntoRegion()
@@ -6476,7 +6476,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6476 } 6476 }
6477 } 6477 }
6478 } 6478 }
6479 6479
6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method); 6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
6481 return false; 6481 return false;
6482 } 6482 }
@@ -6922,7 +6922,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6922 //m_log.Info("[LAND]: LAND:" + modify.ToString()); 6922 //m_log.Info("[LAND]: LAND:" + modify.ToString());
6923 if (modify.ParcelData.Length > 0) 6923 if (modify.ParcelData.Length > 0)
6924 { 6924 {
6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore, 6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore,
6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit. 6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit.
6927 if (OnModifyTerrain != null) 6927 if (OnModifyTerrain != null)
6928 { 6928 {
@@ -6999,20 +6999,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6999 byte[] visualparams = new byte[appear.VisualParam.Length]; 6999 byte[] visualparams = new byte[appear.VisualParam.Length];
7000 for (int i = 0; i < appear.VisualParam.Length; i++) 7000 for (int i = 0; i < appear.VisualParam.Length; i++)
7001 visualparams[i] = appear.VisualParam[i].ParamValue; 7001 visualparams[i] = appear.VisualParam[i].ParamValue;
7002 //var b = appear.WearableData[0]; 7002 //var b = appear.WearableData[0];
7003 7003
7004 Primitive.TextureEntry te = null; 7004 Primitive.TextureEntry te = null;
7005 if (appear.ObjectData.TextureEntry.Length > 1) 7005 if (appear.ObjectData.TextureEntry.Length > 1)
7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); 7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
7007 7007
7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length]; 7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length];
7009 for (int i=0; i<appear.WearableData.Length;i++) 7009 for (int i=0; i<appear.WearableData.Length;i++)
7010 cacheitems[i] = new WearableCacheItem(){ 7010 cacheitems[i] = new WearableCacheItem(){
7011 CacheId = appear.WearableData[i].CacheID, 7011 CacheId = appear.WearableData[i].CacheID,
7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex) 7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex)
7013 }; 7013 };
7014 7014
7015 7015
7016 7016
7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems); 7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems);
7018 } 7018 }
@@ -7970,7 +7970,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7970 physdata.Bounce = phsblock.Restitution; 7970 physdata.Bounce = phsblock.Restitution;
7971 physdata.Density = phsblock.Density; 7971 physdata.Density = phsblock.Density;
7972 physdata.Friction = phsblock.Friction; 7972 physdata.Friction = phsblock.Friction;
7973 physdata.GravitationModifier = phsblock.GravityMultiplier; 7973 physdata.GravitationModifier = phsblock.GravityMultiplier;
7974 } 7974 }
7975 7975
7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this); 7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this);
@@ -8381,7 +8381,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay; 8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay;
8382 if (handlerObjectDuplicateOnRay != null) 8382 if (handlerObjectDuplicateOnRay != null)
8383 { 8383 {
8384 8384
8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID; 8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID;
8386 if(!IsGroupMember(rezGroupID)) 8386 if(!IsGroupMember(rezGroupID))
8387 rezGroupID = UUID.Zero; 8387 rezGroupID = UUID.Zero;
@@ -10198,7 +10198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10199 { 10199 {
10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); 10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
10201 10201
10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); 10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
10203 10203
10204 } 10204 }
@@ -10234,7 +10234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter); 10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
10235 } 10235 }
10236 else 10236 else
10237 { 10237 {
10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); 10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); 10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); 10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
@@ -10376,7 +10376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10376 return true; 10376 return true;
10377 10377
10378 case "kickestate": 10378 case "kickestate":
10379 10379
10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10381 { 10381 {
10382 UUID invoice = messagePacket.MethodData.Invoice; 10382 UUID invoice = messagePacket.MethodData.Invoice;
@@ -10459,7 +10459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10459 if (rglpPack.AgentData.SessionID != SessionId || 10459 if (rglpPack.AgentData.SessionID != SessionId ||
10460 rglpPack.AgentData.AgentID != AgentId) 10460 rglpPack.AgentData.AgentID != AgentId)
10461 return true; 10461 return true;
10462 10462
10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
10464 UUID token = rblock.Token; 10464 UUID token = rblock.Token;
10465 10465
@@ -10975,7 +10975,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10975 { 10975 {
10976 return true; 10976 return true;
10977 } 10977 }
10978 10978
10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack) 10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack)
10980 { 10980 {
10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack; 10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
@@ -11012,7 +11012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11012 return true; 11012 return true;
11013 } 11013 }
11014 11014
11015 11015
11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack) 11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack)
11017 { 11017 {
11018 return true; 11018 return true;
@@ -11402,7 +11402,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11402 GroupProfileRequestPacket groupProfileRequest = 11402 GroupProfileRequestPacket groupProfileRequest =
11403 (GroupProfileRequestPacket)Pack; 11403 (GroupProfileRequestPacket)Pack;
11404 11404
11405 11405
11406 #region Packet Session and User Check 11406 #region Packet Session and User Check
11407 if (m_checkPackets) 11407 if (m_checkPackets)
11408 { 11408 {
@@ -11464,7 +11464,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11464 } 11464 }
11465 11465
11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task); 11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
11467 11467
11468 if(grpID == lastGroupProfileRequestID) 11468 if(grpID == lastGroupProfileRequestID)
11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000; 11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
11470 11470
@@ -12398,10 +12398,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12398 ScenePresence sp = (ScenePresence)SceneAgent; 12398 ScenePresence sp = (ScenePresence)SceneAgent;
12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit) 12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit)
12400 { 12400 {
12401 UUID objectID = pkt.Data.ObjectID; 12401 UUID objectID = pkt.Data.ObjectID;
12402 uint permissions = pkt.Data.ObjectPermissions; 12402 uint permissions = pkt.Data.ObjectPermissions;
12403 12403
12404 sp.HandleRevokePermissions(objectID , permissions); 12404 sp.HandleRevokePermissions(objectID , permissions);
12405 } 12405 }
12406 return true; 12406 return true;
12407 } 12407 }
@@ -12437,7 +12437,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12437 scriptQuestion.Data.Questions = question; 12437 scriptQuestion.Data.Questions = question;
12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName); 12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName);
12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName); 12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName);
12440 12440
12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
12442 } 12442 }
12443 12443
@@ -12629,7 +12629,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12629 * 0x01 position 12629 * 0x01 position
12630 * 0x02 rotation 12630 * 0x02 rotation
12631 * 0x04 scale 12631 * 0x04 scale
12632 12632
12633 * 0x08 LINK_SET 12633 * 0x08 LINK_SET
12634 * 0x10 UNIFORM for scale 12634 * 0x10 UNIFORM for scale
12635 */ 12635 */
@@ -12668,7 +12668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12668 updatehandler(localId, udata, this); 12668 updatehandler(localId, udata, this);
12669 break; 12669 break;
12670 12670
12671 case 0x14: // uniform scale sp 12671 case 0x14: // uniform scale sp
12672 udata.scale = new Vector3(block.Data, 0); 12672 udata.scale = new Vector3(block.Data, 0);
12673 12673
12674 udata.change = ObjectChangeType.primUS; 12674 udata.change = ObjectChangeType.primUS;
@@ -12938,7 +12938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12938 12938
12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) 12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
12940 logPacket = false; 12940 logPacket = false;
12941 12941
12942 if (DebugPacketLevel <= 50 12942 if (DebugPacketLevel <= 50
12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) 12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate))
12944 logPacket = false; 12944 logPacket = false;
@@ -12951,7 +12951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}", 12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}",
12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); 12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
12953 } 12953 }
12954 12954
12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
12956 } 12956 }
12957 12957
@@ -13198,9 +13198,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13198 { 13198 {
13199 GroupMembershipData[] GroupMembership = 13199 GroupMembershipData[] GroupMembership =
13200 m_GroupsModule.GetMembershipData(AgentId); 13200 m_GroupsModule.GetMembershipData(AgentId);
13201 13201
13202 m_groupPowers.Clear(); 13202 m_groupPowers.Clear();
13203 13203
13204 if (GroupMembership != null) 13204 if (GroupMembership != null)
13205 { 13205 {
13206 for (int i = 0; i < GroupMembership.Length; i++) 13206 for (int i = 0; i < GroupMembership.Length; i++)
@@ -13220,7 +13220,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13220 m_activeGroupName = activeMembership.GroupName; 13220 m_activeGroupName = activeMembership.GroupName;
13221 m_activeGroupPowers = ActiveGroupPowers; 13221 m_activeGroupPowers = ActiveGroupPowers;
13222 } 13222 }
13223 } 13223 }
13224 } 13224 }
13225 13225
13226 if(activeMembership == null) 13226 if(activeMembership == null)
@@ -13237,7 +13237,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13237 lock(m_groupPowers) 13237 lock(m_groupPowers)
13238 { 13238 {
13239 m_groupPowers.Clear(); 13239 m_groupPowers.Clear();
13240 13240
13241 if (data != null) 13241 if (data != null)
13242 { 13242 {
13243 for (int i = 0; i < data.Length; i++) 13243 for (int i = 0; i < data.Length; i++)
@@ -13522,7 +13522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13522 if (p is ScenePresence) 13522 if (p is ScenePresence)
13523 { 13523 {
13524// m_log.DebugFormat( 13524// m_log.DebugFormat(
13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}", 13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}",
13526// p.Name, Name, Scene.Name); 13526// p.Name, Name, Scene.Name);
13527 13527
13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities 13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
@@ -13559,7 +13559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13559 PlacesReplyData[] data) 13559 PlacesReplyData[] data)
13560 { 13560 {
13561 PlacesReplyPacket reply = null; 13561 PlacesReplyPacket reply = null;
13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks = 13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks =
13563 new PlacesReplyPacket.QueryDataBlock[0]; 13563 new PlacesReplyPacket.QueryDataBlock[0];
13564 13564
13565 for (int i = 0 ; i < data.Length ; i++) 13565 for (int i = 0 ; i < data.Length ; i++)
@@ -13737,7 +13737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13737 foreach (InventoryItemBase item in items) 13737 foreach (InventoryItemBase item in items)
13738 { 13738 {
13739 OSDMap ItemDataMap = new OSDMap(); 13739 OSDMap ItemDataMap = new OSDMap();
13740 13740
13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); 13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID));
13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); 13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder));
13743 13743
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
index 41dd4d1..deefd40 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
82 82
83 if (pAssetCache != null) 83 if (pAssetCache != null)
84 m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f"); 84 m_missingImage = pAssetCache.Get("5748decc-f629-461c-9a36-a35a221fe21f");
85 85
86 if (m_missingImage == null) 86 if (m_missingImage == null)
87 m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client"); 87 m_log.Error("[ClientView] - Couldn't set missing image asset, falling back to missing image packet. This is known to crash the client");
88 88
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index dc8ac3c..439621a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
52 /// are waiting on ACKs for</param> 52 /// are waiting on ACKs for</param>
53 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); 53 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
54 /// <summary> 54 /// <summary>
55 /// Fired when the queue for one or more packet categories is empty. This 55 /// Fired when the queue for one or more packet categories is empty. This
56 /// event can be hooked to put more data on the empty queues 56 /// event can be hooked to put more data on the empty queues
57 /// </summary> 57 /// </summary>
58 /// <param name="category">Categories of the packet queues that are empty</param> 58 /// <param name="category">Categories of the packet queues that are empty</param>
@@ -86,8 +86,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
86 /// Controls whether information is logged about each outbound packet immediately before it is sent. For debug purposes. 86 /// Controls whether information is logged about each outbound packet immediately before it is sent. For debug purposes.
87 /// </summary> 87 /// </summary>
88 /// <remarks>Any level above 0 will turn on logging.</remarks> 88 /// <remarks>Any level above 0 will turn on logging.</remarks>
89 public int ThrottleDebugLevel 89 public int ThrottleDebugLevel
90 { 90 {
91 get 91 get
92 { 92 {
93 return m_throttleDebugLevel; 93 return m_throttleDebugLevel;
@@ -157,7 +157,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
157 /// <summary>Number of packets sent to this client</summary> 157 /// <summary>Number of packets sent to this client</summary>
158 public int PacketsSent; 158 public int PacketsSent;
159 /// <summary>Number of packets resent to this client</summary> 159 /// <summary>Number of packets resent to this client</summary>
160 public int PacketsResent; 160 public int PacketsResent;
161 /// <summary>Total byte count of unacked packets sent to this client</summary> 161 /// <summary>Total byte count of unacked packets sent to this client</summary>
162 public int UnackedBytes; 162 public int UnackedBytes;
163 163
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
215 /// textures are now generally handled through http. 215 /// textures are now generally handled through http.
216 /// </summary> 216 /// </summary>
217 private double m_cannibalrate = 0.0; 217 private double m_cannibalrate = 0.0;
218 218
219 private ClientInfo m_info = new ClientInfo(); 219 private ClientInfo m_info = new ClientInfo();
220 220
221 /// <summary> 221 /// <summary>
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
276 276
277 // Initialize this to a sane value to prevent early disconnects 277 // Initialize this to a sane value to prevent early disconnects
278 TickLastPacketReceived = Environment.TickCount & Int32.MaxValue; 278 TickLastPacketReceived = Environment.TickCount & Int32.MaxValue;
279 m_pingMS = (int)(3.0 * server.TickCountResolution); // so filter doesnt start at 0; 279 m_pingMS = (int)(3.0 * server.TickCountResolution); // so filter doesnt start at 0;
280 } 280 }
281 281
282 /// <summary> 282 /// <summary>
@@ -370,7 +370,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
370 return string.Format( 370 return string.Format(
371 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}", 371 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
372 Util.EnvironmentTickCountSubtract(TickLastPacketReceived), 372 Util.EnvironmentTickCountSubtract(TickLastPacketReceived),
373 PacketsReceived, 373 PacketsReceived,
374 PacketsSent, 374 PacketsSent,
375 PacketsResent, 375 PacketsResent,
376 UnackedBytes, 376 UnackedBytes,
@@ -540,7 +540,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
540 540
541 return data; 541 return data;
542 } 542 }
543 543
544 public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS) 544 public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS)
545 { 545 {
546 int icat = (int)cat; 546 int icat = (int)cat;
@@ -559,7 +559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
559 /// <param name="packet"></param> 559 /// <param name="packet"></param>
560 /// <param name="forceQueue">Always queue the packet if at all possible.</param> 560 /// <param name="forceQueue">Always queue the packet if at all possible.</param>
561 /// <returns> 561 /// <returns>
562 /// true if the packet has been queued, 562 /// true if the packet has been queued,
563 /// false if the packet has not been queued and should be sent immediately. 563 /// false if the packet has not been queued and should be sent immediately.
564 /// </returns> 564 /// </returns>
565 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue) 565 public bool EnqueueOutgoing(OutgoingPacket packet, bool forceQueue)
@@ -589,7 +589,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
589 queue.Enqueue(packet, highPriority); 589 queue.Enqueue(packet, highPriority);
590 return true; 590 return true;
591 } 591 }
592 592
593 if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength)) 593 if (!forceQueue && bucket.CheckTokens(packet.Buffer.DataLength))
594 { 594 {
595 // enough tokens so it can be sent imediatly by caller 595 // enough tokens so it can be sent imediatly by caller
@@ -608,24 +608,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
608 // We don't have a token bucket for this category, so it will not be queued 608 // We don't have a token bucket for this category, so it will not be queued
609 return false; 609 return false;
610 } 610 }
611 611
612 } 612 }
613 613
614 /// <summary> 614 /// <summary>
615 /// Loops through all of the packet queues for this client and tries to send 615 /// Loops through all of the packet queues for this client and tries to send
616 /// an outgoing packet from each, obeying the throttling bucket limits 616 /// an outgoing packet from each, obeying the throttling bucket limits
617 /// </summary> 617 /// </summary>
618 /// 618 ///
619 /// <remarks> 619 /// <remarks>
620 /// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower 620 /// Packet queues are inspected in ascending numerical order starting from 0. Therefore, queues with a lower
621 /// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have 621 /// ThrottleOutPacketType number will see their packet get sent first (e.g. if both Land and Wind queues have
622 /// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the 622 /// packets, then the packet at the front of the Land queue will be sent before the packet at the front of the
623 /// wind queue). 623 /// wind queue).
624 /// 624 ///
625 /// This function is only called from a synchronous loop in the 625 /// This function is only called from a synchronous loop in the
626 /// UDPServer so we don't need to bother making this thread safe 626 /// UDPServer so we don't need to bother making this thread safe
627 /// </remarks> 627 /// </remarks>
628 /// 628 ///
629 /// <returns>True if any packets were sent, otherwise false</returns> 629 /// <returns>True if any packets were sent, otherwise false</returns>
630 public bool DequeueOutgoing() 630 public bool DequeueOutgoing()
631 { 631 {
@@ -791,7 +791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
791 double start = Util.GetTimeStampMS(); 791 double start = Util.GetTimeStampMS();
792 if (start < m_nextOnQueueEmpty) 792 if (start < m_nextOnQueueEmpty)
793 return; 793 return;
794 794
795 m_isQueueEmptyRunning = true; 795 m_isQueueEmptyRunning = true;
796 m_nextOnQueueEmpty = start + MIN_CALLBACK_MS; 796 m_nextOnQueueEmpty = start + MIN_CALLBACK_MS;
797 797
@@ -803,7 +803,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
803 } 803 }
804 } 804 }
805 805
806 806
807 807
808 /// <summary> 808 /// <summary>
809 /// Fires the OnQueueEmpty callback and sets the minimum time that it 809 /// Fires the OnQueueEmpty callback and sets the minimum time that it
@@ -820,7 +820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
820 if (callback != null) 820 if (callback != null)
821 { 821 {
822 // if (m_udpServer.IsRunningOutbound) 822 // if (m_udpServer.IsRunningOutbound)
823 // { 823 // {
824 try { callback(categories); } 824 try { callback(categories); }
825 catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + categories + ") threw an exception: " + e.Message, e); } 825 catch (Exception e) { m_log.Error("[LLUDPCLIENT]: OnQueueEmpty(" + categories + ") threw an exception: " + e.Message, e); }
826 // } 826 // }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index cedb9b4..ec51e28 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
222 StatType.Pull, 222 StatType.Pull,
223 MeasuresOfInterest.None, 223 MeasuresOfInterest.None,
224 stat => stat.Value = m_udpServer.AverageReceiveTicksForLastSamplePeriod, 224 stat => stat.Value = m_udpServer.AverageReceiveTicksForLastSamplePeriod,
225// stat => 225// stat =>
226// stat.Value = Math.Round(m_udpServer.AverageReceiveTicksForLastSamplePeriod, 7), 226// stat.Value = Math.Round(m_udpServer.AverageReceiveTicksForLastSamplePeriod, 7),
227 StatVerbosity.Debug)); 227 StatVerbosity.Debug));
228 } 228 }
@@ -272,7 +272,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
272 /// <summary>The measured resolution of Environment.TickCount</summary> 272 /// <summary>The measured resolution of Environment.TickCount</summary>
273 public readonly float TickCountResolution; 273 public readonly float TickCountResolution;
274 274
275 /// <summary>Number of prim updates to put on the queue each time the 275 /// <summary>Number of prim updates to put on the queue each time the
276 /// OnQueueEmpty event is triggered for updates</summary> 276 /// OnQueueEmpty event is triggered for updates</summary>
277 public readonly int PrimUpdatesPerCallback; 277 public readonly int PrimUpdatesPerCallback;
278 278
@@ -289,7 +289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
289 289
290 /// <summary>Bandwidth throttle for this UDP server</summary> 290 /// <summary>Bandwidth throttle for this UDP server</summary>
291 public TokenBucket Throttle { get; protected set; } 291 public TokenBucket Throttle { get; protected set; }
292 292
293 /// <summary>Per client throttle rates enforced by this server</summary> 293 /// <summary>Per client throttle rates enforced by this server</summary>
294 /// <remarks> 294 /// <remarks>
295 /// If the total rate is non-zero, then this is the maximum total throttle setting that any client can ever have. 295 /// If the total rate is non-zero, then this is the maximum total throttle setting that any client can ever have.
@@ -297,7 +297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
297 /// do get changed immediately). They do not need to sum to the total. 297 /// do get changed immediately). They do not need to sum to the total.
298 /// </remarks> 298 /// </remarks>
299 public ThrottleRates ThrottleRates { get; protected set; } 299 public ThrottleRates ThrottleRates { get; protected set; }
300 300
301 /// <summary>Manages authentication for agent circuits</summary> 301 /// <summary>Manages authentication for agent circuits</summary>
302 protected AgentCircuitManager m_circuitManager; 302 protected AgentCircuitManager m_circuitManager;
303 303
@@ -436,8 +436,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
436 { 436 {
437 #region Environment.TickCount Measurement 437 #region Environment.TickCount Measurement
438 438
439 // Update the port with the one we actually got 439 // Update the port with the one we actually got
440 port = (uint)Port; 440 port = (uint)Port;
441 441
442 // Measure the resolution of Environment.TickCount 442 // Measure the resolution of Environment.TickCount
443 TickCountResolution = 0f; 443 TickCountResolution = 0f;
@@ -696,15 +696,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
696 696
697 Scene = (Scene)scene; 697 Scene = (Scene)scene;
698 m_location = new Location(Scene.RegionInfo.RegionHandle); 698 m_location = new Location(Scene.RegionInfo.RegionHandle);
699 699
700 IpahEngine 700 IpahEngine
701 = new JobEngine( 701 = new JobEngine(
702 string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name), 702 string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name),
703 "INCOMING PACKET ASYNC HANDLING ENGINE"); 703 "INCOMING PACKET ASYNC HANDLING ENGINE");
704 704
705 OqrEngine 705 OqrEngine
706 = new JobEngine( 706 = new JobEngine(
707 string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name), 707 string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
708 "OUTGOING QUEUE REFILL ENGINE"); 708 "OUTGOING QUEUE REFILL ENGINE");
709 709
710 StatsManager.RegisterStat( 710 StatsManager.RegisterStat(
@@ -730,9 +730,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
730 "clientstack", 730 "clientstack",
731 Scene.Name, 731 Scene.Name,
732 StatType.Pull, 732 StatType.Pull,
733 stat => 733 stat =>
734 { PercentageStat pstat = (PercentageStat)stat; 734 { PercentageStat pstat = (PercentageStat)stat;
735 pstat.Consequent = PacketPool.Instance.PacketsRequested; 735 pstat.Consequent = PacketPool.Instance.PacketsRequested;
736 pstat.Antecedent = PacketPool.Instance.PacketsReused; }, 736 pstat.Antecedent = PacketPool.Instance.PacketsReused; },
737 StatVerbosity.Debug)); 737 StatVerbosity.Debug));
738 738
@@ -745,8 +745,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
745 Scene.Name, 745 Scene.Name,
746 StatType.Pull, 746 StatType.Pull,
747 stat => 747 stat =>
748 { PercentageStat pstat = (PercentageStat)stat; 748 { PercentageStat pstat = (PercentageStat)stat;
749 pstat.Consequent = PacketPool.Instance.BlocksRequested; 749 pstat.Consequent = PacketPool.Instance.BlocksRequested;
750 pstat.Antecedent = PacketPool.Instance.BlocksReused; }, 750 pstat.Antecedent = PacketPool.Instance.BlocksReused; },
751 StatVerbosity.Debug)); 751 StatVerbosity.Debug));
752 752
@@ -799,7 +799,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
799 MeasuresOfInterest.None, 799 MeasuresOfInterest.None,
800 stat => stat.Value = IpahEngine.JobsWaiting, 800 stat => stat.Value = IpahEngine.JobsWaiting,
801 StatVerbosity.Debug)); 801 StatVerbosity.Debug));
802 802
803 StatsManager.RegisterStat( 803 StatsManager.RegisterStat(
804 new Stat( 804 new Stat(
805 "OQRERequestsWaiting", 805 "OQRERequestsWaiting",
@@ -812,7 +812,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
812 MeasuresOfInterest.None, 812 MeasuresOfInterest.None,
813 stat => stat.Value = OqrEngine.JobsWaiting, 813 stat => stat.Value = OqrEngine.JobsWaiting,
814 StatVerbosity.Debug)); 814 StatVerbosity.Debug));
815 815
816 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by 816 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by
817 // scene name 817 // scene name
818 if (UsePools) 818 if (UsePools)
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1012 if ((outgoingPacket.Buffer.Data[0] & Helpers.MSG_RELIABLE) != 0) 1012 if ((outgoingPacket.Buffer.Data[0] & Helpers.MSG_RELIABLE) != 0)
1013 outgoingPacket.UnackedMethod = ((method == null) ? delegate(OutgoingPacket oPacket) { ResendUnacked(oPacket); } : method); 1013 outgoingPacket.UnackedMethod = ((method == null) ? delegate(OutgoingPacket oPacket) { ResendUnacked(oPacket); } : method);
1014 1014
1015 // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will 1015 // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will
1016 // continue to display the deleted object until relog. Therefore, we need to always queue a kill object 1016 // continue to display the deleted object until relog. Therefore, we need to always queue a kill object
1017 // packet so that it isn't sent before a queued update packet. 1017 // packet so that it isn't sent before a queued update packet.
1018 1018
@@ -1242,7 +1242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1242 1242
1243 if ((IncomingMalformedPacketCount % 10000) == 0) 1243 if ((IncomingMalformedPacketCount % 10000) == 0)
1244 m_log.WarnFormat( 1244 m_log.WarnFormat(
1245 "[LLUDPSERVER]: Received {0} malformed packets so far, probable network attack. Last was from {1}", 1245 "[LLUDPSERVER]: Received {0} malformed packets so far, probable network attack. Last was from {1}",
1246 IncomingMalformedPacketCount, endPoint); 1246 IncomingMalformedPacketCount, endPoint);
1247 } 1247 }
1248 1248
@@ -1391,7 +1391,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1391 1391
1392 if ((IncomingOrphanedPacketCount % 10000) == 0) 1392 if ((IncomingOrphanedPacketCount % 10000) == 0)
1393 m_log.WarnFormat( 1393 m_log.WarnFormat(
1394 "[LLUDPSERVER]: Received {0} orphaned packets so far. Last was from {1}", 1394 "[LLUDPSERVER]: Received {0} orphaned packets so far. Last was from {1}",
1395 IncomingOrphanedPacketCount, endPoint); 1395 IncomingOrphanedPacketCount, endPoint);
1396 1396
1397 return; 1397 return;
@@ -1482,7 +1482,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1482 { 1482 {
1483 if (packet.Header.Resent) 1483 if (packet.Header.Resent)
1484 m_log.DebugFormat( 1484 m_log.DebugFormat(
1485 "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}", 1485 "[LLUDPSERVER]: Received a resend of already processed packet #{0}, type {1} from {2}",
1486 packet.Header.Sequence, packet.Type, client.Name); 1486 packet.Header.Sequence, packet.Type, client.Name);
1487 else 1487 else
1488 m_log.WarnFormat( 1488 m_log.WarnFormat(
@@ -1512,7 +1512,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1512 // We don't need to do anything else with ping checks 1512 // We don't need to do anything else with ping checks
1513 StartPingCheckPacket startPing = (StartPingCheckPacket)packet; 1513 StartPingCheckPacket startPing = (StartPingCheckPacket)packet;
1514 CompletePing(udpClient, startPing.PingID.PingID); 1514 CompletePing(udpClient, startPing.PingID.PingID);
1515 1515
1516 if ((Environment.TickCount - m_elapsedMSSinceLastStatReport) >= 3000) 1516 if ((Environment.TickCount - m_elapsedMSSinceLastStatReport) >= 3000)
1517 { 1517 {
1518 udpClient.SendPacketStats(); 1518 udpClient.SendPacketStats();
@@ -1677,7 +1677,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1677 m_log.DebugFormat( 1677 m_log.DebugFormat(
1678 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} to {1} from IP {2}", 1678 "[LLUDPSERVER]: Handling UseCircuitCode request for circuit {0} to {1} from IP {2}",
1679 uccp.CircuitCode.Code, Scene.RegionInfo.RegionName, endPoint); 1679 uccp.CircuitCode.Code, Scene.RegionInfo.RegionName, endPoint);
1680 1680
1681 AuthenticateResponse sessionInfo; 1681 AuthenticateResponse sessionInfo;
1682 if (IsClientAuthorized(uccp, out sessionInfo)) 1682 if (IsClientAuthorized(uccp, out sessionInfo))
1683 { 1683 {
@@ -1752,10 +1752,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1752 1752
1753 lock (m_pendingCache) 1753 lock (m_pendingCache)
1754 m_pendingCache.Remove(endPoint); 1754 m_pendingCache.Remove(endPoint);
1755 } 1755 }
1756 1756
1757 // m_log.DebugFormat( 1757 // m_log.DebugFormat(
1758 // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", 1758 // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
1759 // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); 1759 // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
1760 1760
1761 } 1761 }
@@ -1787,9 +1787,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1787 1787
1788 // Determine which agent this packet came from 1788 // Determine which agent this packet came from
1789 // We need to wait here because in when using the OpenSimulator V2 teleport protocol to travel to a destination 1789 // We need to wait here because in when using the OpenSimulator V2 teleport protocol to travel to a destination
1790 // simulator with no existing child presence, the viewer (at least LL 3.3.4) will send UseCircuitCode 1790 // simulator with no existing child presence, the viewer (at least LL 3.3.4) will send UseCircuitCode
1791 // and then CompleteAgentMovement immediately without waiting for an ack. As we are now handling these 1791 // and then CompleteAgentMovement immediately without waiting for an ack. As we are now handling these
1792 // packets asynchronously, we need to account for this thread proceeding more quickly than the 1792 // packets asynchronously, we need to account for this thread proceeding more quickly than the
1793 // UseCircuitCode thread. 1793 // UseCircuitCode thread.
1794 int count = 40; 1794 int count = 40;
1795 while (count-- > 0) 1795 while (count-- > 0)
@@ -1811,7 +1811,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1811 // manager but the SceneAgent has not yet been set in Scene.AddNewAgent(). If we are too 1811 // manager but the SceneAgent has not yet been set in Scene.AddNewAgent(). If we are too
1812 // eager, then the new ScenePresence may not have registered a listener for this messsage 1812 // eager, then the new ScenePresence may not have registered a listener for this messsage
1813 // before we try to process it. 1813 // before we try to process it.
1814 // XXX: A better long term fix may be to add the SceneAgent before the client is added to 1814 // XXX: A better long term fix may be to add the SceneAgent before the client is added to
1815 // the client manager 1815 // the client manager
1816 m_log.DebugFormat( 1816 m_log.DebugFormat(
1817 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} for {1} in {2} but client SceneAgent not set yet. Waiting.", 1817 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} for {1} in {2} but client SceneAgent not set yet. Waiting.",
@@ -1825,7 +1825,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1825 else 1825 else
1826 { 1826 {
1827 m_log.DebugFormat( 1827 m_log.DebugFormat(
1828 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} in {1} but no client exists yet. Waiting.", 1828 "[LLUDPSERVER]: Received a CompleteAgentMovement from {0} in {1} but no client exists yet. Waiting.",
1829 endPoint, Scene.Name); 1829 endPoint, Scene.Name);
1830 } 1830 }
1831 1831
@@ -1962,13 +1962,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1962 { 1962 {
1963 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); 1963 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
1964 1964
1965 1965
1966 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); 1966 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
1967 client.OnLogout += LogoutHandler; 1967 client.OnLogout += LogoutHandler;
1968 client.DebugPacketLevel = DefaultClientPacketDebugLevel; 1968 client.DebugPacketLevel = DefaultClientPacketDebugLevel;
1969 1969
1970 ((LLClientView)client).DisableFacelights = m_disableFacelights; 1970 ((LLClientView)client).DisableFacelights = m_disableFacelights;
1971 1971
1972 client.Start(); 1972 client.Start();
1973 } 1973 }
1974 } 1974 }
@@ -1988,7 +1988,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1988 protected void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks) 1988 protected void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks)
1989 { 1989 {
1990 lock (client.CloseSyncLock) 1990 lock (client.CloseSyncLock)
1991 { 1991 {
1992 ClientLogoutsDueToNoReceives++; 1992 ClientLogoutsDueToNoReceives++;
1993 1993
1994 if (client.SceneAgent != null) 1994 if (client.SceneAgent != null)
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1996 m_log.WarnFormat( 1996 m_log.WarnFormat(
1997 "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", 1997 "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.",
1998 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); 1998 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name);
1999 1999
2000 if (!client.SceneAgent.IsChildAgent) 2000 if (!client.SceneAgent.IsChildAgent)
2001 client.Kick("Simulator logged you out due to connection timeout."); 2001 client.Kick("Simulator logged you out due to connection timeout.");
2002 } 2002 }
@@ -2020,11 +2020,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2020 try 2020 try
2021 { 2021 {
2022 incomingPacket = packetInbox.Dequeue(250); 2022 incomingPacket = packetInbox.Dequeue(250);
2023 2023
2024 if (incomingPacket != null && IsRunningInbound) 2024 if (incomingPacket != null && IsRunningInbound)
2025 { 2025 {
2026 ProcessInPacket(incomingPacket); 2026 ProcessInPacket(incomingPacket);
2027 2027
2028 if (UsePools) 2028 if (UsePools)
2029 { 2029 {
2030 incomingPacket.Client = null; 2030 incomingPacket.Client = null;
@@ -2192,7 +2192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2192 /// </summary> 2192 /// </summary>
2193 public long IncomingPacketsProcessed { get; protected set; } 2193 public long IncomingPacketsProcessed { get; protected set; }
2194 2194
2195 #endregion 2195 #endregion
2196 2196
2197 protected void ProcessInPacket(IncomingPacket incomingPacket) 2197 protected void ProcessInPacket(IncomingPacket incomingPacket)
2198 { 2198 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index 6e6a2d1..012a57d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
53 "Comms", false, "show server throttles", 53 "Comms", false, "show server throttles",
54 "show server throttles", 54 "show server throttles",
55 "Show information about server throttles", 55 "Show information about server throttles",
56 HandleShowServerThrottlesCommand); 56 HandleShowServerThrottlesCommand);
57 57
58 m_console.Commands.AddCommand( 58 m_console.Commands.AddCommand(
59 "Debug", false, "debug lludp packet", 59 "Debug", false, "debug lludp packet",
@@ -207,8 +207,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
207 HandleClientGetCommand); 207 HandleClientGetCommand);
208 208
209 m_console.Commands.AddCommand( 209 m_console.Commands.AddCommand(
210 "Debug", 210 "Debug",
211 false, 211 false,
212 "debug lludp client set", 212 "debug lludp client set",
213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]", 213 "debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]",
214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.", 214 "Set a debug parameter for a particular client. If no name is given then the value is set on all clients.",
@@ -228,22 +228,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 228
229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 229 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
230 cdl.AddRow( 230 cdl.AddRow(
231 "Max scene throttle", 231 "Max scene throttle",
232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 232 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
233 233
234 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 234 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
235 cdl.AddRow( 235 cdl.AddRow(
236 "Max new client throttle", 236 "Max new client throttle",
237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 237 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
238 238
239 m_console.Output(cdl.ToString()); 239 m_console.Output(cdl.ToString());
240 240
241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer)); 241 m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer));
242 } 242 }
243 243
244 private string GetServerThrottlesReport(LLUDPServer udpServer) 244 private string GetServerThrottlesReport(LLUDPServer udpServer)
245 { 245 {
246 StringBuilder report = new StringBuilder(); 246 StringBuilder report = new StringBuilder();
247 247
248 report.AppendFormat( 248 report.AppendFormat(
249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 249 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
254 "Cloud", 254 "Cloud",
255 "Task", 255 "Task",
256 "Texture", 256 "Texture",
257 "Asset"); 257 "Asset");
258 258
259 report.AppendFormat( 259 report.AppendFormat(
260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", 260 "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n",
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
265 "kb/s", 265 "kb/s",
266 "kb/s", 266 "kb/s",
267 "kb/s", 267 "kb/s",
268 "kb/s"); 268 "kb/s");
269 269
270 ThrottleRates throttleRates = udpServer.ThrottleRates; 270 ThrottleRates throttleRates = udpServer.ThrottleRates;
271 report.AppendFormat( 271 report.AppendFormat(
@@ -277,16 +277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
277 (throttleRates.Cloud * 8) / 1000, 277 (throttleRates.Cloud * 8) / 1000,
278 (throttleRates.Task * 8) / 1000, 278 (throttleRates.Task * 8) / 1000,
279 (throttleRates.Texture * 8) / 1000, 279 (throttleRates.Texture * 8) / 1000,
280 (throttleRates.Asset * 8) / 1000); 280 (throttleRates.Asset * 8) / 1000);
281 281
282 return report.ToString(); 282 return report.ToString();
283 } 283 }
284 284
285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding) 285 protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
286 { 286 {
287 return string.Format( 287 return string.Format(
288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}", 288 "{0,-" + maxLength + "}{1,-" + columnPadding + "}",
289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, 289 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
290 ""); 290 "");
291 } 291 }
292 292
@@ -375,7 +375,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
375 MainConsole.Instance.OutputFormat( 375 MainConsole.Instance.OutputFormat(
376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 376 "Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]");
377 return; 377 return;
378 } 378 }
379 379
380 string param = args[4]; 380 string param = args[4];
381 string rawValue = args[5]; 381 string rawValue = args[5];
@@ -467,7 +467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
467 MainConsole.Instance.OutputFormat( 467 MainConsole.Instance.OutputFormat(
468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]"); 468 "Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]");
469 return; 469 return;
470 } 470 }
471 471
472 string firstName = null; 472 string firstName = null;
473 string lastName = null; 473 string lastName = null;
@@ -491,7 +491,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
491 ConsoleDisplayList cdl = new ConsoleDisplayList(); 491 ConsoleDisplayList cdl = new ConsoleDisplayList();
492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled); 492 cdl.AddRow("adaptive", udpClient.FlowThrottle.AdaptiveEnabled);
493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000)); 493 cdl.AddRow("current", string.Format("{0} kbps", udpClient.FlowThrottle.DripRate * 8 / 1000));
494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000)); 494 cdl.AddRow("request", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000));
495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000)); 495 cdl.AddRow("max", string.Format("{0} kbps", udpClient.FlowThrottle.MaxDripRate * 8 / 1000));
496 496
497 m_console.Output(cdl.ToString()); 497 m_console.Output(cdl.ToString());
@@ -509,12 +509,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
509 509
510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate; 510 long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
511 cdl.AddRow( 511 cdl.AddRow(
512 "max-scene-throttle", 512 "max-scene-throttle",
513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset"); 513 maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
514 514
515 int maxClientDripRate = m_udpServer.ThrottleRates.Total; 515 int maxClientDripRate = m_udpServer.ThrottleRates.Total;
516 cdl.AddRow( 516 cdl.AddRow(
517 "max-new-client-throttle", 517 "max-new-client-throttle",
518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset"); 518 maxClientDripRate != 0 ? string.Format("{0} kbps", maxClientDripRate * 8 / 1000) : "unset");
519 519
520 m_console.Output(cdl.ToString()); 520 m_console.Output(cdl.ToString());
@@ -529,7 +529,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
529 { 529 {
530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>"); 530 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>");
531 return; 531 return;
532 } 532 }
533 533
534 string param = args[3]; 534 string param = args[3];
535 string rawValue = args[4]; 535 string rawValue = args[4];
@@ -552,7 +552,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
552 } 552 }
553 else 553 else
554 { 554 {
555 return; 555 return;
556 } 556 }
557 557
558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name); 558 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
@@ -598,7 +598,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
598 { 598 {
599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]"); 599 MainConsole.Instance.OutputFormat("Usage: debug lludp client set <param> <value> [<avatar-first-name> <avatar-last-name>]");
600 return; 600 return;
601 } 601 }
602 602
603 string param = args[4]; 603 string param = args[4];
604 string rawValue = args[5]; 604 string rawValue = args[5];
@@ -697,12 +697,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
697 697
698 string direction = args[3]; 698 string direction = args[3];
699 string subCommand = args[4]; 699 string subCommand = args[4];
700 string packetName = args[5]; 700 string packetName = args[5];
701 701
702 if (subCommand == "add") 702 if (subCommand == "add")
703 { 703 {
704 MainConsole.Instance.OutputFormat( 704 MainConsole.Instance.OutputFormat(
705 "Adding packet {0} to {1} drop list for all connections in {2}", 705 "Adding packet {0} to {1} drop list for all connections in {2}",
706 direction, packetName, m_udpServer.Scene.Name); 706 direction, packetName, m_udpServer.Scene.Name);
707 707
708 m_udpServer.Scene.ForEachScenePresence( 708 m_udpServer.Scene.ForEachScenePresence(
@@ -720,7 +720,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
720 else if (subCommand == "remove") 720 else if (subCommand == "remove")
721 { 721 {
722 MainConsole.Instance.OutputFormat( 722 MainConsole.Instance.OutputFormat(
723 "Removing packet {0} from {1} drop list for all connections in {2}", 723 "Removing packet {0} from {1} drop list for all connections in {2}",
724 direction, packetName, m_udpServer.Scene.Name); 724 direction, packetName, m_udpServer.Scene.Name);
725 725
726 m_udpServer.Scene.ForEachScenePresence( 726 m_udpServer.Scene.ForEachScenePresence(
@@ -868,10 +868,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name); 868 MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name);
869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning); 869 MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning);
870 MainConsole.Instance.OutputFormat( 870 MainConsole.Instance.OutputFormat(
871 "Requests waiting: {0}", 871 "Requests waiting: {0}",
872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a"); 872 m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
873 } 873 }
874 else 874 else
875 { 875 {
876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand); 876 MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand);
877 } 877 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 831381e..35a0711 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -3,25 +3,25 @@
3 * Original Author: Jeff Cesnik 3 * Original Author: Jeff Cesnik
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * - Redistribution and use in source and binary forms, with or without 6 * - Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * - Redistributions of source code must retain the above copyright notice, this 9 * - Redistributions of source code must retain the above copyright notice, this
10 * list of conditions and the following disclaimer. 10 * list of conditions and the following disclaimer.
11 * - Neither the name of the openmetaverse.org nor the names 11 * - Neither the name of the openmetaverse.org nor the names
12 * of its contributors may be used to endorse or promote products derived from 12 * of its contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission. 13 * this software without specific prior written permission.
14 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
@@ -107,10 +107,10 @@ namespace OpenMetaverse
107 /// </summary> 107 /// </summary>
108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; } 108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
109 109
110 public int Port 110 public int Port
111 { 111 {
112 get { return m_udpPort; } 112 get { return m_udpPort; }
113 } 113 }
114 114
115 #region PacketDropDebugging 115 #region PacketDropDebugging
116 /// <summary> 116 /// <summary>
@@ -118,7 +118,7 @@ namespace OpenMetaverse
118 /// outbound packets. 118 /// outbound packets.
119 /// </summary> 119 /// </summary>
120 private Random m_dropRandomGenerator = new Random(); 120 private Random m_dropRandomGenerator = new Random();
121 121
122 /// <summary> 122 /// <summary>
123 /// For debugging purposes only... parameters for a simplified 123 /// For debugging purposes only... parameters for a simplified
124 /// model of packet loss with bursts, overall drop rate should 124 /// model of packet loss with bursts, overall drop rate should
@@ -137,7 +137,7 @@ namespace OpenMetaverse
137 /// </summary> 137 /// </summary>
138 private int m_dropLastTick = 0; 138 private int m_dropLastTick = 0;
139 private int m_dropResetTicks = 500; 139 private int m_dropResetTicks = 500;
140 140
141 /// <summary> 141 /// <summary>
142 /// Debugging code used to simulate dropped packets with bursts 142 /// Debugging code used to simulate dropped packets with bursts
143 /// </summary> 143 /// </summary>
@@ -187,13 +187,13 @@ namespace OpenMetaverse
187 ~OpenSimUDPBase() 187 ~OpenSimUDPBase()
188 { 188 {
189 if(m_udpSocket !=null) 189 if(m_udpSocket !=null)
190 try { m_udpSocket.Close(); } catch { } 190 try { m_udpSocket.Close(); } catch { }
191 } 191 }
192 /// <summary> 192 /// <summary>
193 /// Start inbound UDP packet handling. 193 /// Start inbound UDP packet handling.
194 /// </summary> 194 /// </summary>
195 /// <param name="recvBufferSize">The size of the receive buffer for 195 /// <param name="recvBufferSize">The size of the receive buffer for
196 /// the UDP socket. This value is passed up to the operating system 196 /// the UDP socket. This value is passed up to the operating system
197 /// and used in the system networking stack. Use zero to leave this 197 /// and used in the system networking stack. Use zero to leave this
198 /// value as the default</param> 198 /// value as the default</param>
199 /// <param name="asyncPacketHandling">Set this to true to start 199 /// <param name="asyncPacketHandling">Set this to true to start
@@ -235,7 +235,7 @@ namespace OpenMetaverse
235 } 235 }
236 try 236 try
237 { 237 {
238 // This udp socket flag is not supported under mono, 238 // This udp socket flag is not supported under mono,
239 // so we'll catch the exception and continue 239 // so we'll catch the exception and continue
240 m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); 240 m_udpSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null);
241 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set"); 241 m_log.Debug("[UDPBASE]: SIO_UDP_CONNRESET flag set");
@@ -249,12 +249,12 @@ namespace OpenMetaverse
249 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages, 249 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
250 // leading to a confusing bug. 250 // leading to a confusing bug.
251 // By default, Windows does not allow two sockets to bind to the same port. 251 // By default, Windows does not allow two sockets to bind to the same port.
252 // 252 //
253 // Unfortunately, this also causes a crashed sim to leave the socket in a state 253 // Unfortunately, this also causes a crashed sim to leave the socket in a state
254 // where it appears to be in use but is really just hung from the old process 254 // where it appears to be in use but is really just hung from the old process
255 // crashing rather than closing it. While this protects agains misconfiguration, 255 // crashing rather than closing it. While this protects agains misconfiguration,
256 // allowing crashed sims to be started up again right away, rather than having to 256 // allowing crashed sims to be started up again right away, rather than having to
257 // wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016 257 // wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016
258 // m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); 258 // m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
259 259
260 if (recvBufferSize != 0) 260 if (recvBufferSize != 0)
@@ -262,8 +262,8 @@ namespace OpenMetaverse
262 262
263 m_udpSocket.Bind(ipep); 263 m_udpSocket.Bind(ipep);
264 264
265 if (m_udpPort == 0) 265 if (m_udpPort == 0)
266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port; 266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
267 267
268 IsRunningInbound = true; 268 IsRunningInbound = true;
269 269
@@ -334,7 +334,7 @@ namespace OpenMetaverse
334 { 334 {
335 UDPPacketBuffer buf; 335 UDPPacketBuffer buf;
336 336
337 // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other 337 // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other
338 // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux. 338 // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux.
339 // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation. 339 // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation.
340// if (UsePools) 340// if (UsePools)
@@ -387,8 +387,8 @@ namespace OpenMetaverse
387 m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort); 387 m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort);
388 } 388 }
389 } 389 }
390 catch (ObjectDisposedException e) 390 catch (ObjectDisposedException e)
391 { 391 {
392 m_log.Error( 392 m_log.Error(
393 string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e); 393 string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e);
394 } 394 }
@@ -434,7 +434,7 @@ namespace OpenMetaverse
434 // since this should be rare and won't cause a runtime problem. 434 // since this should be rare and won't cause a runtime problem.
435 if (m_currentReceiveTimeSamples >= s_receiveTimeSamples) 435 if (m_currentReceiveTimeSamples >= s_receiveTimeSamples)
436 { 436 {
437 AverageReceiveTicksForLastSamplePeriod 437 AverageReceiveTicksForLastSamplePeriod
438 = (float)m_receiveTicksInCurrentSamplePeriod / s_receiveTimeSamples; 438 = (float)m_receiveTicksInCurrentSamplePeriod / s_receiveTimeSamples;
439 439
440 m_receiveTicksInCurrentSamplePeriod = 0; 440 m_receiveTicksInCurrentSamplePeriod = 0;
@@ -446,16 +446,16 @@ namespace OpenMetaverse
446 m_currentReceiveTimeSamples++; 446 m_currentReceiveTimeSamples++;
447 } 447 }
448 } 448 }
449 catch (SocketException se) 449 catch (SocketException se)
450 { 450 {
451 m_log.Error( 451 m_log.Error(
452 string.Format( 452 string.Format(
453 "[UDPBASE]: Error processing UDP end receive {0}, socket error code {1}. Exception ", 453 "[UDPBASE]: Error processing UDP end receive {0}, socket error code {1}. Exception ",
454 UdpReceives, se.ErrorCode), 454 UdpReceives, se.ErrorCode),
455 se); 455 se);
456 } 456 }
457 catch (ObjectDisposedException e) 457 catch (ObjectDisposedException e)
458 { 458 {
459 m_log.Error( 459 m_log.Error(
460 string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e); 460 string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e);
461 } 461 }
@@ -486,7 +486,7 @@ namespace OpenMetaverse
486 // packets when testing throttles & retransmission code 486 // packets when testing throttles & retransmission code
487 // if (DropOutgoingPacket()) 487 // if (DropOutgoingPacket())
488 // return; 488 // return;
489 489
490 try 490 try
491 { 491 {
492 m_udpSocket.BeginSendTo( 492 m_udpSocket.BeginSendTo(
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
index 5a2bcee..f585bea 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
62 /// </summary> 62 /// </summary>
63 public int PacketsPooled 63 public int PacketsPooled
64 { 64 {
65 get 65 get
66 { 66 {
67 lock (pool) 67 lock (pool)
68 return pool.Count; 68 return pool.Count;
@@ -74,9 +74,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
74 /// </summary> 74 /// </summary>
75 public int BlocksPooled 75 public int BlocksPooled
76 { 76 {
77 get 77 get
78 { 78 {
79 lock (DataBlocks) 79 lock (DataBlocks)
80 return DataBlocks.Count; 80 return DataBlocks.Count;
81 } 81 }
82 } 82 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
248 } 248 }
249 } 249 }
250 break; 250 break;
251 251
252 // Other packets wont pool 252 // Other packets wont pool
253 default: 253 default:
254 return; 254 return;
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
276 { 276 {
277 DataBlocks[typeof(T)] = new Stack<Object>(); 277 DataBlocks[typeof(T)] = new Stack<Object>();
278 } 278 }
279 279
280 return new T(); 280 return new T();
281 } 281 }
282 } 282 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
index 1443477..4a8f16d 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenUDP")] 9[assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenUDP")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
index a935dd2..0e1a9e3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
70 m_scene = new SceneHelpers().SetupScene(); 70 m_scene = new SceneHelpers().SetupScene();
71 StatsManager.SimExtraStats = new SimExtraStatsCollector(); 71 StatsManager.SimExtraStats = new SimExtraStatsCollector();
72 } 72 }
73 73
74// /// <summary> 74// /// <summary>
75// /// Build an object name packet for test purposes 75// /// Build an object name packet for test purposes
76// /// </summary> 76// /// </summary>
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
84// odb.Name = Utils.StringToBytes(objectName); 84// odb.Name = Utils.StringToBytes(objectName);
85// onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb }; 85// onp.ObjectData = new ObjectNamePacket.ObjectDataBlock[] { odb };
86// onp.Header.Zerocoded = false; 86// onp.Header.Zerocoded = false;
87// 87//
88// return onp; 88// return onp;
89// } 89// }
90// 90//
@@ -156,7 +156,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
156 config.Set("AckTimeout", -1); 156 config.Set("AckTimeout", -1);
157 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(m_scene, ics); 157 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(m_scene, ics);
158 158
159 ScenePresence sp 159 ScenePresence sp
160 = ClientStackHelpers.AddChildClient( 160 = ClientStackHelpers.AddChildClient(
161 m_scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 161 m_scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
162 162
@@ -175,21 +175,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
175// TestHelper.InMethod(); 175// TestHelper.InMethod();
176// 176//
177// uint myCircuitCode = 123457; 177// uint myCircuitCode = 123457;
178// 178//
179// TestLLUDPServer testLLUDPServer; 179// TestLLUDPServer testLLUDPServer;
180// TestLLPacketServer testLLPacketServer; 180// TestLLPacketServer testLLPacketServer;
181// AgentCircuitManager acm; 181// AgentCircuitManager acm;
182// SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm); 182// SetupStack(new MockScene(), out testLLUDPServer, out testLLPacketServer, out acm);
183// AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm); 183// AddClient(myCircuitCode, new IPEndPoint(IPAddress.Loopback, 1000), testLLUDPServer, acm);
184// 184//
185// testLLUDPServer.RemoveClientCircuit(myCircuitCode); 185// testLLUDPServer.RemoveClientCircuit(myCircuitCode);
186// Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode)); 186// Assert.IsFalse(testLLUDPServer.HasCircuit(myCircuitCode));
187// 187//
188// // Check that removing a non-existent circuit doesn't have any bad effects 188// // Check that removing a non-existent circuit doesn't have any bad effects
189// testLLUDPServer.RemoveClientCircuit(101); 189// testLLUDPServer.RemoveClientCircuit(101);
190// Assert.IsFalse(testLLUDPServer.HasCircuit(101)); 190// Assert.IsFalse(testLLUDPServer.HasCircuit(101));
191// } 191// }
192// 192//
193// /// <summary> 193// /// <summary>
194// /// Make sure that the client stack reacts okay to malformed packets 194// /// Make sure that the client stack reacts okay to malformed packets
195// /// </summary> 195// /// </summary>
@@ -200,8 +200,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
200// 200//
201// uint myCircuitCode = 123458; 201// uint myCircuitCode = 123458;
202// EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 1001); 202// EndPoint testEp = new IPEndPoint(IPAddress.Loopback, 1001);
203// MockScene scene = new MockScene(); 203// MockScene scene = new MockScene();
204// 204//
205// TestLLUDPServer testLLUDPServer; 205// TestLLUDPServer testLLUDPServer;
206// TestLLPacketServer testLLPacketServer; 206// TestLLPacketServer testLLPacketServer;
207// AgentCircuitManager acm; 207// AgentCircuitManager acm;
@@ -213,24 +213,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
213// // Send two garbled 'packets' in succession 213// // Send two garbled 'packets' in succession
214// testLLUDPServer.LoadReceive(data, testEp); 214// testLLUDPServer.LoadReceive(data, testEp);
215// testLLUDPServer.LoadReceive(data, testEp); 215// testLLUDPServer.LoadReceive(data, testEp);
216// testLLUDPServer.ReceiveData(null); 216// testLLUDPServer.ReceiveData(null);
217// 217//
218// // Check that we are still here 218// // Check that we are still here
219// Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode)); 219// Assert.IsTrue(testLLUDPServer.HasCircuit(myCircuitCode));
220// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(0)); 220// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(0));
221// 221//
222// // Check that sending a valid packet to same circuit still succeeds 222// // Check that sending a valid packet to same circuit still succeeds
223// Assert.That(scene.ObjectNameCallsReceived, Is.EqualTo(0)); 223// Assert.That(scene.ObjectNameCallsReceived, Is.EqualTo(0));
224// 224//
225// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp); 225// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "helloooo"), testEp);
226// testLLUDPServer.ReceiveData(null); 226// testLLUDPServer.ReceiveData(null);
227// 227//
228// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1)); 228// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(1));
229// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1)); 229// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(1));
230// } 230// }
231// 231//
232// /// <summary> 232// /// <summary>
233// /// Test that the stack continues to work even if some client has caused a 233// /// Test that the stack continues to work even if some client has caused a
234// /// SocketException on Socket.BeginReceive() 234// /// SocketException on Socket.BeginReceive()
235// /// </summary> 235// /// </summary>
236// [Test] 236// [Test]
@@ -239,32 +239,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
239// TestHelper.InMethod(); 239// TestHelper.InMethod();
240// 240//
241// MockScene scene = new MockScene(); 241// MockScene scene = new MockScene();
242// 242//
243// uint circuitCodeA = 130000; 243// uint circuitCodeA = 130000;
244// EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300); 244// EndPoint epA = new IPEndPoint(IPAddress.Loopback, 1300);
245// UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300"); 245// UUID agentIdA = UUID.Parse("00000000-0000-0000-0000-000000001300");
246// UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300"); 246// UUID sessionIdA = UUID.Parse("00000000-0000-0000-0000-000000002300");
247// 247//
248// uint circuitCodeB = 130001; 248// uint circuitCodeB = 130001;
249// EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301); 249// EndPoint epB = new IPEndPoint(IPAddress.Loopback, 1301);
250// UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301"); 250// UUID agentIdB = UUID.Parse("00000000-0000-0000-0000-000000001301");
251// UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301"); 251// UUID sessionIdB = UUID.Parse("00000000-0000-0000-0000-000000002301");
252// 252//
253// TestLLUDPServer testLLUDPServer; 253// TestLLUDPServer testLLUDPServer;
254// TestLLPacketServer testLLPacketServer; 254// TestLLPacketServer testLLPacketServer;
255// AgentCircuitManager acm; 255// AgentCircuitManager acm;
256// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); 256// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
257// AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm); 257// AddClient(circuitCodeA, epA, agentIdA, sessionIdA, testLLUDPServer, acm);
258// AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm); 258// AddClient(circuitCodeB, epB, agentIdB, sessionIdB, testLLUDPServer, acm);
259// 259//
260// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet1"), epA); 260// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet1"), epA);
261// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet2"), epB); 261// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(1, "packet2"), epB);
262// testLLUDPServer.LoadReceiveWithBeginException(epA); 262// testLLUDPServer.LoadReceiveWithBeginException(epA);
263// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(2, "packet3"), epB); 263// testLLUDPServer.LoadReceive(BuildTestObjectNamePacket(2, "packet3"), epB);
264// testLLUDPServer.ReceiveData(null); 264// testLLUDPServer.ReceiveData(null);
265// 265//
266// Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA)); 266// Assert.IsFalse(testLLUDPServer.HasCircuit(circuitCodeA));
267// 267//
268// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3)); 268// Assert.That(testLLPacketServer.GetTotalPacketsReceived(), Is.EqualTo(3));
269// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3)); 269// Assert.That(testLLPacketServer.GetPacketsReceivedFor(PacketType.ObjectName), Is.EqualTo(3));
270// } 270// }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
index 92f1fc3..1731aa9 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
59// agent.InventoryFolder = UUID.Zero; 59// agent.InventoryFolder = UUID.Zero;
60// agent.startpos = Vector3.Zero; 60// agent.startpos = Vector3.Zero;
61// agent.CapsPath = "http://wibble.com"; 61// agent.CapsPath = "http://wibble.com";
62// 62//
63// TestLLUDPServer testLLUDPServer; 63// TestLLUDPServer testLLUDPServer;
64// TestLLPacketServer testLLPacketServer; 64// TestLLPacketServer testLLPacketServer;
65// AgentCircuitManager acm; 65// AgentCircuitManager acm;
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
67// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm); 67// SetupStack(scene, out testLLUDPServer, out testLLPacketServer, out acm);
68// 68//
69// TestClient testClient = new TestClient(agent, scene); 69// TestClient testClient = new TestClient(agent, scene);
70// 70//
71// LLPacketHandler packetHandler 71// LLPacketHandler packetHandler
72// = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings()); 72// = new LLPacketHandler(testClient, testLLPacketServer, new ClientStackUserSettings());
73// 73//
@@ -87,14 +87,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
87// /// <param name="testPacketServer"></param> 87// /// <param name="testPacketServer"></param>
88// /// <param name="acm">Agent circuit manager used in setting up the stack</param> 88// /// <param name="acm">Agent circuit manager used in setting up the stack</param>
89// protected void SetupStack( 89// protected void SetupStack(
90// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, 90// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
91// out AgentCircuitManager acm) 91// out AgentCircuitManager acm)
92// { 92// {
93// IConfigSource configSource = new IniConfigSource(); 93// IConfigSource configSource = new IniConfigSource();
94// ClientStackUserSettings userSettings = new ClientStackUserSettings(); 94// ClientStackUserSettings userSettings = new ClientStackUserSettings();
95// testLLUDPServer = new TestLLUDPServer(); 95// testLLUDPServer = new TestLLUDPServer();
96// acm = new AgentCircuitManager(); 96// acm = new AgentCircuitManager();
97// 97//
98// uint port = 666; 98// uint port = 666;
99// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); 99// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm);
100// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); 100// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
index 5e41dbd..873b1e5 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/ThrottleTests.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
137 Scene scene = new SceneHelpers().SetupScene(); 137 Scene scene = new SceneHelpers().SetupScene();
138 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 138 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
139 139
140 ScenePresence sp 140 ScenePresence sp
141 = ClientStackHelpers.AddChildClient( 141 = ClientStackHelpers.AddChildClient(
142 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 142 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
143 143
@@ -145,7 +145,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
145 145
146 udpServer.Throttle.DebugLevel = 1; 146 udpServer.Throttle.DebugLevel = 1;
147 udpClient.ThrottleDebugLevel = 1; 147 udpClient.ThrottleDebugLevel = 1;
148 148
149 int resendBytes = 1000; 149 int resendBytes = 1000;
150 int landBytes = 2000; 150 int landBytes = 2000;
151 int windBytes = 3000; 151 int windBytes = 3000;
@@ -161,8 +161,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
161 int totalBytes = LLUDPServer.MTU + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes; 161 int totalBytes = LLUDPServer.MTU + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes;
162 162
163 AssertThrottles( 163 AssertThrottles(
164 udpClient, 164 udpClient,
165 LLUDPServer.MTU, landBytes, windBytes, cloudBytes, taskBytes, 165 LLUDPServer.MTU, landBytes, windBytes, cloudBytes, taskBytes,
166 textureBytes, assetBytes, totalBytes, 0, 0); 166 textureBytes, assetBytes, totalBytes, 0, 0);
167 } 167 }
168 168
@@ -181,7 +181,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
181 181
182 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene, ics); 182 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene, ics);
183 183
184 ScenePresence sp 184 ScenePresence sp
185 = ClientStackHelpers.AddChildClient( 185 = ClientStackHelpers.AddChildClient(
186 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 186 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
187 187
@@ -207,7 +207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
207 double commitRatio = 32000.0 / totalBytes; 207 double commitRatio = 32000.0 / totalBytes;
208 208
209 AssertThrottles( 209 AssertThrottles(
210 udpClient, 210 udpClient,
211 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 211 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
212 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 212 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
213 213
@@ -217,7 +217,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
217 commitRatio = (32000.0 + 20.0 * LLUDPServer.MTU) / totalBytes; 217 commitRatio = (32000.0 + 20.0 * LLUDPServer.MTU) / totalBytes;
218 218
219 AssertThrottles( 219 AssertThrottles(
220 udpClient, 220 udpClient,
221 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 221 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
222 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 222 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
223 223
@@ -227,7 +227,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
227 commitRatio = (32000.0 + (20.0 * LLUDPServer.MTU)/Math.Pow(2,1)) / totalBytes; 227 commitRatio = (32000.0 + (20.0 * LLUDPServer.MTU)/Math.Pow(2,1)) / totalBytes;
228 228
229 AssertThrottles( 229 AssertThrottles(
230 udpClient, 230 udpClient,
231 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio, 231 LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
232 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0); 232 textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
233 } 233 }
@@ -248,14 +248,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
248 int taskBytes = 14000; 248 int taskBytes = 14000;
249 int textureBytes = 16000; 249 int textureBytes = 16000;
250 int assetBytes = 18000; 250 int assetBytes = 18000;
251 int totalBytes 251 int totalBytes
252 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2); 252 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2);
253 253
254 Scene scene = new SceneHelpers().SetupScene(); 254 Scene scene = new SceneHelpers().SetupScene();
255 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 255 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
256 udpServer.Throttle.RequestedDripRate = totalBytes; 256 udpServer.Throttle.RequestedDripRate = totalBytes;
257 257
258 ScenePresence sp1 258 ScenePresence sp1
259 = ClientStackHelpers.AddChildClient( 259 = ClientStackHelpers.AddChildClient(
260 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 260 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
261 261
@@ -265,8 +265,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
265 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 265 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
266 266
267 AssertThrottles( 267 AssertThrottles(
268 udpClient1, 268 udpClient1,
269 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2, 269 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2,
270 textureBytes / 2, assetBytes / 2, totalBytes, 0, 0); 270 textureBytes / 2, assetBytes / 2, totalBytes, 0, 0);
271 271
272 // Test: Now add another client 272 // Test: Now add another client
@@ -281,13 +281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
281 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 281 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
282 282
283 AssertThrottles( 283 AssertThrottles(
284 udpClient1, 284 udpClient1,
285 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4, 285 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4,
286 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0); 286 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0);
287 287
288 AssertThrottles( 288 AssertThrottles(
289 udpClient2, 289 udpClient2,
290 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4, 290 resendBytes / 4, landBytes / 4, windBytes / 4, cloudBytes / 4, taskBytes / 4,
291 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0); 291 textureBytes / 4, assetBytes / 4, totalBytes / 2, 0, 0);
292 } 292 }
293 293
@@ -307,14 +307,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
307 int taskBytes = 12000; 307 int taskBytes = 12000;
308 int textureBytes = 14000; 308 int textureBytes = 14000;
309 int assetBytes = 16000; 309 int assetBytes = 16000;
310 int totalBytes 310 int totalBytes
311 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2); 311 = (int)((resendBytes + landBytes + windBytes + cloudBytes + taskBytes + textureBytes + assetBytes) / 2);
312 312
313 Scene scene = new SceneHelpers().SetupScene(); 313 Scene scene = new SceneHelpers().SetupScene();
314 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene); 314 TestLLUDPServer udpServer = ClientStackHelpers.AddUdpServer(scene);
315 udpServer.ThrottleRates.Total = totalBytes; 315 udpServer.ThrottleRates.Total = totalBytes;
316 316
317 ScenePresence sp 317 ScenePresence sp
318 = ClientStackHelpers.AddChildClient( 318 = ClientStackHelpers.AddChildClient(
319 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 319 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
320 320
@@ -325,8 +325,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
325 udpClient, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 325 udpClient, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
326 326
327 AssertThrottles( 327 AssertThrottles(
328 udpClient, 328 udpClient,
329 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2, 329 resendBytes / 2, landBytes / 2, windBytes / 2, cloudBytes / 2, taskBytes / 2,
330 textureBytes / 2, assetBytes / 2, totalBytes, 0, totalBytes); 330 textureBytes / 2, assetBytes / 2, totalBytes, 0, totalBytes);
331 } 331 }
332 332
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
352 udpServer.ThrottleRates.Total = (int)(totalBytes * 1.1); 352 udpServer.ThrottleRates.Total = (int)(totalBytes * 1.1);
353 udpServer.Throttle.RequestedDripRate = (int)(totalBytes * 1.5); 353 udpServer.Throttle.RequestedDripRate = (int)(totalBytes * 1.5);
354 354
355 ScenePresence sp1 355 ScenePresence sp1
356 = ClientStackHelpers.AddChildClient( 356 = ClientStackHelpers.AddChildClient(
357 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456); 357 scene, udpServer, TestHelpers.ParseTail(0x1), TestHelpers.ParseTail(0x2), 123456);
358 358
@@ -363,8 +363,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
363 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 363 udpClient1, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
364 364
365 AssertThrottles( 365 AssertThrottles(
366 udpClient1, 366 udpClient1,
367 resendBytes, landBytes, windBytes, cloudBytes, taskBytes, 367 resendBytes, landBytes, windBytes, cloudBytes, taskBytes,
368 textureBytes, assetBytes, totalBytes, 0, totalBytes * 1.1); 368 textureBytes, assetBytes, totalBytes, 0, totalBytes * 1.1);
369 369
370 // Now add another client 370 // Now add another client
@@ -379,25 +379,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
379 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes); 379 udpClient2, resendBytes, landBytes, windBytes, cloudBytes, taskBytes, textureBytes, assetBytes);
380 380
381 AssertThrottles( 381 AssertThrottles(
382 udpClient1, 382 udpClient1,
383 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75, 383 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75,
384 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1); 384 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1);
385 385
386 AssertThrottles( 386 AssertThrottles(
387 udpClient2, 387 udpClient2,
388 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75, 388 resendBytes * 0.75, landBytes * 0.75, windBytes * 0.75, cloudBytes * 0.75, taskBytes * 0.75,
389 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1); 389 textureBytes * 0.75, assetBytes * 0.75, totalBytes * 0.75, 0, totalBytes * 1.1);
390 } 390 }
391 391
392 private void AssertThrottles( 392 private void AssertThrottles(
393 LLUDPClient udpClient, 393 LLUDPClient udpClient,
394 double resendBytes, double landBytes, double windBytes, double cloudBytes, double taskBytes, double textureBytes, double assetBytes, 394 double resendBytes, double landBytes, double windBytes, double cloudBytes, double taskBytes, double textureBytes, double assetBytes,
395 double totalBytes, double targetBytes, double maxBytes) 395 double totalBytes, double targetBytes, double maxBytes)
396 { 396 {
397 ClientInfo ci = udpClient.GetClientInfo(); 397 ClientInfo ci = udpClient.GetClientInfo();
398 398
399// Console.WriteLine( 399// Console.WriteLine(
400// "Resend={0}, Land={1}, Wind={2}, Cloud={3}, Task={4}, Texture={5}, Asset={6}, TOTAL = {7}", 400// "Resend={0}, Land={1}, Wind={2}, Cloud={3}, Task={4}, Texture={5}, Asset={6}, TOTAL = {7}",
401// ci.resendThrottle, ci.landThrottle, ci.windThrottle, ci.cloudThrottle, ci.taskThrottle, ci.textureThrottle, ci.assetThrottle, ci.totalThrottle); 401// ci.resendThrottle, ci.landThrottle, ci.windThrottle, ci.cloudThrottle, ci.taskThrottle, ci.textureThrottle, ci.assetThrottle, ci.totalThrottle);
402 402
403 Assert.AreEqual((int)resendBytes, ci.resendThrottle, "Resend"); 403 Assert.AreEqual((int)resendBytes, ci.resendThrottle, "Resend");
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
index 6278e36..f8ec97a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
@@ -58,14 +58,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
58 58
59 /// <summary>Flag used to enable adaptive throttles</summary> 59 /// <summary>Flag used to enable adaptive throttles</summary>
60 public bool AdaptiveThrottlesEnabled; 60 public bool AdaptiveThrottlesEnabled;
61 61
62 /// <summary> 62 /// <summary>
63 /// Set the minimum rate that the adaptive throttles can set. The viewer 63 /// Set the minimum rate that the adaptive throttles can set. The viewer
64 /// can still throttle lower than this, but the adaptive throttles will 64 /// can still throttle lower than this, but the adaptive throttles will
65 /// never decrease rates below this no matter how many packets are dropped 65 /// never decrease rates below this no matter how many packets are dropped
66 /// </summary> 66 /// </summary>
67 public Int64 MinimumAdaptiveThrottleRate; 67 public Int64 MinimumAdaptiveThrottleRate;
68 68
69 /// <summary>Amount of the texture throttle to steal for the task throttle</summary> 69 /// <summary>Amount of the texture throttle to steal for the task throttle</summary>
70 public double CannibalizeTextureRate; 70 public double CannibalizeTextureRate;
71 71
@@ -109,7 +109,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
109// CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f); 109// CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f);
110// CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9); 110// CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9);
111 CannibalizeTextureRate = 0f; 111 CannibalizeTextureRate = 0f;
112 112
113 } 113 }
114 catch (Exception) { } 114 catch (Exception) { }
115 } 115 }
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
index cac57b2..1daf091 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
@@ -44,24 +44,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private static Int32 m_counter = 0; 46 private static Int32 m_counter = 0;
47 47
48// private Int32 m_identifier; 48// private Int32 m_identifier;
49 49
50 protected const float m_timeScale = 1e-3f; 50 protected const float m_timeScale = 1e-3f;
51 51
52 /// <summary> 52 /// <summary>
53 /// This is the number of m_minimumDripRate bytes 53 /// This is the number of m_minimumDripRate bytes
54 /// allowed in a burst 54 /// allowed in a burst
55 /// roughtly, with this settings, the maximum time system will take 55 /// roughtly, with this settings, the maximum time system will take
56 /// to recheck a bucket in ms 56 /// to recheck a bucket in ms
57 /// 57 ///
58 /// </summary> 58 /// </summary>
59 protected const float m_quantumsPerBurst = 5; 59 protected const float m_quantumsPerBurst = 5;
60 60
61 /// <summary> 61 /// <summary>
62 /// </summary> 62 /// </summary>
63 protected const float m_minimumDripRate = 1500; 63 protected const float m_minimumDripRate = 1500;
64 64
65 /// <summary>Time of the last drip</summary> 65 /// <summary>Time of the last drip</summary>
66 protected double m_lastDrip; 66 protected double m_lastDrip;
67 67
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
76 /// </summary> 76 /// </summary>
77 77
78 protected Dictionary<TokenBucket, float> m_children = new Dictionary<TokenBucket, float>(); 78 protected Dictionary<TokenBucket, float> m_children = new Dictionary<TokenBucket, float>();
79 79
80#region Properties 80#region Properties
81 81
82 /// <summary> 82 /// <summary>
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
92 } 92 }
93 /// <summary> 93 /// <summary>
94 /// This is the maximum number 94 /// This is the maximum number
95 /// of tokens that can accumulate in the bucket at any one time. This 95 /// of tokens that can accumulate in the bucket at any one time. This
96 /// also sets the total request for leaf nodes 96 /// also sets the total request for leaf nodes
97 /// </summary> 97 /// </summary>
98 protected float m_burst; 98 protected float m_burst;
@@ -127,14 +127,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
127 return (float)rate; 127 return (float)rate;
128 } 128 }
129 } 129 }
130 130
131 /// <summary> 131 /// <summary>
132 /// The requested drip rate for this particular bucket. 132 /// The requested drip rate for this particular bucket.
133 /// </summary> 133 /// </summary>
134 /// <remarks> 134 /// <remarks>
135 /// 0 then TotalDripRequest is used instead. 135 /// 0 then TotalDripRequest is used instead.
136 /// Can never be above MaxDripRate. 136 /// Can never be above MaxDripRate.
137 /// Tokens are added to the bucket at any time 137 /// Tokens are added to the bucket at any time
138 /// <seealso cref="RemoveTokens"/> is called, at the granularity of 138 /// <seealso cref="RemoveTokens"/> is called, at the granularity of
139 /// the system tick interval (typically around 15-22ms)</remarks> 139 /// the system tick interval (typically around 15-22ms)</remarks>
140 protected float m_dripRate; 140 protected float m_dripRate;
@@ -170,12 +170,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
170 /// The current total of the requested maximum burst rates of children buckets. 170 /// The current total of the requested maximum burst rates of children buckets.
171 /// </summary> 171 /// </summary>
172 protected float m_totalDripRequest; 172 protected float m_totalDripRequest;
173 public float TotalDripRequest 173 public float TotalDripRequest
174 { 174 {
175 get { return m_totalDripRequest; } 175 get { return m_totalDripRequest; }
176 set { m_totalDripRequest = value; } 176 set { m_totalDripRequest = value; }
177 } 177 }
178 178
179#endregion Properties 179#endregion Properties
180 180
181#region Constructor 181#region Constructor
@@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
191 /// zero if this bucket has no maximum capacity</param> 191 /// zero if this bucket has no maximum capacity</param>
192 /// <param name="dripRate">Rate that the bucket fills, in bytes per 192 /// <param name="dripRate">Rate that the bucket fills, in bytes per
193 /// second. If zero, the bucket always remains full</param> 193 /// second. If zero, the bucket always remains full</param>
194 public TokenBucket(TokenBucket parent, float dripRate, float MaxBurst) 194 public TokenBucket(TokenBucket parent, float dripRate, float MaxBurst)
195 { 195 {
196 m_counter++; 196 m_counter++;
197 197
@@ -240,7 +240,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
240 foreach (KeyValuePair<TokenBucket, float> cref in m_children) 240 foreach (KeyValuePair<TokenBucket, float> cref in m_children)
241 m_totalDripRequest += cref.Value; 241 m_totalDripRequest += cref.Value;
242 } 242 }
243 243
244 // Pass the new values up to the parent 244 // Pass the new values up to the parent
245 if (m_parent != null) 245 if (m_parent != null)
246 m_parent.RegisterRequest(this, Math.Min(RequestedDripRate, TotalDripRequest)); 246 m_parent.RegisterRequest(this, Math.Min(RequestedDripRate, TotalDripRequest));
@@ -265,7 +265,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
265 if (Parent != null) 265 if (Parent != null)
266 Parent.RegisterRequest(this,Math.Min(RequestedDripRate, TotalDripRequest)); 266 Parent.RegisterRequest(this,Math.Min(RequestedDripRate, TotalDripRequest));
267 } 267 }
268 268
269 /// <summary> 269 /// <summary>
270 /// Remove a given number of tokens from the bucket 270 /// Remove a given number of tokens from the bucket
271 /// </summary> 271 /// </summary>
@@ -302,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
302 302
303 /// <summary> 303 /// <summary>
304 /// Add tokens to the bucket over time. The number of tokens added each 304 /// Add tokens to the bucket over time. The number of tokens added each
305 /// call depends on the length of time that has passed since the last 305 /// call depends on the length of time that has passed since the last
306 /// call to Drip 306 /// call to Drip
307 /// </summary> 307 /// </summary>
308 /// <returns>True if tokens were added to the bucket, otherwise false</returns> 308 /// <returns>True if tokens were added to the bucket, otherwise false</returns>
@@ -315,7 +315,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
315 m_log.WarnFormat("[TOKENBUCKET] something odd is happening and drip rate is 0 for {0}", m_counter); 315 m_log.WarnFormat("[TOKENBUCKET] something odd is happening and drip rate is 0 for {0}", m_counter);
316 return; 316 return;
317 } 317 }
318 318
319 double now = Util.GetTimeStampMS(); 319 double now = Util.GetTimeStampMS();
320 double deltaMS = now - m_lastDrip; 320 double deltaMS = now - m_lastDrip;
321 m_lastDrip = now; 321 m_lastDrip = now;
@@ -333,13 +333,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
333 333
334 public class AdaptiveTokenBucket : TokenBucket 334 public class AdaptiveTokenBucket : TokenBucket
335 { 335 {
336 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 336 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
337 337
338 public bool AdaptiveEnabled { get; set; } 338 public bool AdaptiveEnabled { get; set; }
339 339
340 /// <summary> 340 /// <summary>
341 /// The minimum rate for flow control. Minimum drip rate is one 341 /// The minimum rate for flow control. Minimum drip rate is one
342 /// packet per second. 342 /// packet per second.
343 /// </summary> 343 /// </summary>
344 344
345 protected const float m_minimumFlow = 50000; 345 protected const float m_minimumFlow = 50000;
@@ -361,7 +361,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
361 private bool m_enabled = false; 361 private bool m_enabled = false;
362 362
363 // <summary> 363 // <summary>
364 // Adjust drip rate in response to network conditions. 364 // Adjust drip rate in response to network conditions.
365 // </summary> 365 // </summary>
366 public float AdjustedDripRate 366 public float AdjustedDripRate
367 { 367 {
@@ -374,10 +374,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
374 m_parent.RegisterRequest(this, m_dripRate); 374 m_parent.RegisterRequest(this, m_dripRate);
375 } 375 }
376 } 376 }
377 377
378 378
379 // <summary> 379 // <summary>
380 // 380 //
381 // </summary> 381 // </summary>
382 public AdaptiveTokenBucket(TokenBucket parent, float maxDripRate, float maxBurst, bool enabled) 382 public AdaptiveTokenBucket(TokenBucket parent, float maxDripRate, float maxBurst, bool enabled)
383 : base(parent, maxDripRate, maxBurst) 383 : base(parent, maxDripRate, maxBurst)
@@ -393,7 +393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
393 if (m_parent != null) 393 if (m_parent != null)
394 m_parent.RegisterRequest(this, m_dripRate); 394 m_parent.RegisterRequest(this, m_dripRate);
395 } 395 }
396 396
397 /// <summary> 397 /// <summary>
398 /// Reliable packets sent to the client for which we never received an ack adjust the drip rate down. 398 /// Reliable packets sent to the client for which we never received an ack adjust the drip rate down.
399 /// <param name="packets">Number of packets that expired without successful delivery</param> 399 /// <param name="packets">Number of packets that expired without successful delivery</param>
@@ -406,7 +406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
406 } 406 }
407 407
408 // <summary> 408 // <summary>
409 // 409 //
410 // </summary> 410 // </summary>
411 public void AcknowledgePackets(Int32 count) 411 public void AcknowledgePackets(Int32 count)
412 { 412 {
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
index c9d5697..76f4c6f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
80 m_packets.Clear(); 80 m_packets.Clear();
81 m_pendingAdds = null; 81 m_pendingAdds = null;
82 m_pendingAcknowledgements = null; 82 m_pendingAcknowledgements = null;
83 m_pendingRemoves = null; 83 m_pendingRemoves = null;
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
94 public void Add(OutgoingPacket packet) 94 public void Add(OutgoingPacket packet)
95 { 95 {
96 m_pendingAdds.Enqueue(packet); 96 m_pendingAdds.Enqueue(packet);
97 Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength); 97 Interlocked.Add(ref packet.Client.UnackedBytes, packet.Buffer.DataLength);
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
@@ -116,7 +116,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
116 /// <summary> 116 /// <summary>
117 /// Marks a packet as no longer needing acknowledgement without a received acknowledgement. 117 /// Marks a packet as no longer needing acknowledgement without a received acknowledgement.
118 /// This method is called when a packet expires and we no longer need an acknowledgement. 118 /// This method is called when a packet expires and we no longer need an acknowledgement.
119 /// When some reliable packet types expire, they are handled in a way other than simply 119 /// When some reliable packet types expire, they are handled in a way other than simply
120 /// resending them. The only effect of removal this way is to update unacked byte count. 120 /// resending them. The only effect of removal this way is to update unacked byte count.
121 /// </summary> 121 /// </summary>
122 /// <param name="sequenceNumber">Sequence number of the packet to 122 /// <param name="sequenceNumber">Sequence number of the packet to
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
155 155
156 foreach (OutgoingPacket packet in m_packets.Values) 156 foreach (OutgoingPacket packet in m_packets.Values)
157 { 157 {
158 // TickCount of zero means a packet is in the resend queue 158 // TickCount of zero means a packet is in the resend queue
159 // but hasn't actually been sent over the wire yet 159 // but hasn't actually been sent over the wire yet
160 if (packet.TickCount == 0) 160 if (packet.TickCount == 0)
161 continue; 161 continue;
@@ -172,7 +172,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
172 // As with other network applications, assume that an expired packet is 172 // As with other network applications, assume that an expired packet is
173 // an indication of some network problem, slow transmission 173 // an indication of some network problem, slow transmission
174 packet.Client.FlowThrottle.ExpirePackets(1); 174 packet.Client.FlowThrottle.ExpirePackets(1);
175 175
176 expiredPackets.Add(packet); 176 expiredPackets.Add(packet);
177 } 177 }
178 } 178 }
@@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
191 while (m_pendingAdds.TryDequeue(out pendingAdd)) 191 while (m_pendingAdds.TryDequeue(out pendingAdd))
192 if (pendingAdd != null) 192 if (pendingAdd != null)
193 m_packets[pendingAdd.SequenceNumber] = pendingAdd; 193 m_packets[pendingAdd.SequenceNumber] = pendingAdd;
194 194
195 // Process all the pending removes, including updating statistics and round-trip times 195 // Process all the pending removes, including updating statistics and round-trip times
196 PendingAck pendingAcknowledgement; 196 PendingAck pendingAcknowledgement;
197 while (m_pendingAcknowledgements.TryDequeue(out pendingAcknowledgement)) 197 while (m_pendingAcknowledgements.TryDequeue(out pendingAcknowledgement))
@@ -228,7 +228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
228 else 228 else
229 { 229 {
230 // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", 230 // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack",
231 // pendingAcknowledgement.SequenceNumber); 231 // pendingAcknowledgement.SequenceNumber);
232 } 232 }
233 } 233 }
234 234
diff --git a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
index 0b6ee2f..e859653 100644
--- a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ClientStack")] 8[assembly: AssemblyTitle("OpenSim.Region.ClientStack")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index 1a19585..f48710f 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
127 if (estateModule.IsTerrainXfer(xferID)) 127 if (estateModule.IsTerrainXfer(xferID))
128 return; 128 return;
129 } 129 }
130 130
131 m_log.ErrorFormat( 131 m_log.ErrorFormat(
132 "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}", 132 "[AGENT ASSET TRANSACTIONS]: Could not find uploader for xfer id {0}, packet id {1}, data length {2}",
133 xferID, packetID, data.Length); 133 xferID, packetID, data.Length);
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
index f489262..89fdf09 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
43 IAgentAssetTransactions 43 IAgentAssetTransactions
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 protected Scene m_Scene; 47 protected Scene m_Scene;
48 private bool m_dumpAssetsToFile = false; 48 private bool m_dumpAssetsToFile = false;
49 private int m_levelUpload = 0; 49 private int m_levelUpload = 0;
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
53 /// </summary> 53 /// </summary>
54 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions = 54 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
55 new Dictionary<UUID, AgentAssetTransactions>(); 55 new Dictionary<UUID, AgentAssetTransactions>();
56 56
57 #region Region Module interface 57 #region Region Module interface
58 58
59 public void Initialise(IConfigSource source) 59 public void Initialise(IConfigSource source)
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
241// m_log.DebugFormat( 241// m_log.DebugFormat(
242// "[ASSET TRANSACTION MODULE]: HandleUDPUploadRequest - assetID: {0}, transaction {1}, type {2}, storeLocal {3}, tempFile {4}, data.Length {5}", 242// "[ASSET TRANSACTION MODULE]: HandleUDPUploadRequest - assetID: {0}, transaction {1}, type {2}, storeLocal {3}, tempFile {4}, data.Length {5}",
243// assetID, transactionID, type, storeLocal, tempFile, data.Length); 243// assetID, transactionID, type, storeLocal, tempFile, data.Length);
244 244
245 if (((AssetType)type == AssetType.Texture || 245 if (((AssetType)type == AssetType.Texture ||
246 (AssetType)type == AssetType.Sound || 246 (AssetType)type == AssetType.Sound ||
247 (AssetType)type == AssetType.TextureTGA || 247 (AssetType)type == AssetType.TextureTGA ||
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index 60a254e..d2aa177 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
41{ 41{
42 public class AssetXferUploader 42 public class AssetXferUploader
43 { 43 {
44 44
45 private List<UUID> defaultIDs = new List<UUID> { 45 private List<UUID> defaultIDs = new List<UUID> {
46 // Viewer's notion of the default texture 46 // Viewer's notion of the default texture
47 new UUID("5748decc-f629-461c-9a36-a35a221fe21f"), // others == default blank 47 new UUID("5748decc-f629-461c-9a36-a35a221fe21f"), // others == default blank
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
index 4b457b1..ff71593 100644
--- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
@@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes;
38namespace OpenSim.Region.CoreModules.Agent.IPBan 38namespace OpenSim.Region.CoreModules.Agent.IPBan
39{ 39{
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IPBanModule")]
41 public class IPBanModule : ISharedRegionModule 41 public class IPBanModule : ISharedRegionModule
42 { 42 {
43 #region Implementation of ISharedRegionModule 43 #region Implementation of ISharedRegionModule
44 44
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
86 86
87 public void Close() 87 public void Close()
88 { 88 {
89 89
90 } 90 }
91 91
92 public string Name 92 public string Name
@@ -107,9 +107,9 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
107 /// matching domain (including "betasomewhere.com", "beta.somewhere.com", 107 /// matching domain (including "betasomewhere.com", "beta.somewhere.com",
108 /// "somewhere.com.beta") - make sure to be reasonably specific in DNS 108 /// "somewhere.com.beta") - make sure to be reasonably specific in DNS
109 /// bans. 109 /// bans.
110 /// 110 ///
111 /// IP address bans match on first characters, so, 111 /// IP address bans match on first characters, so,
112 /// "127.0.0.1" will ban only that address, 112 /// "127.0.0.1" will ban only that address,
113 /// "127.0.1" will ban "127.0.10.0" 113 /// "127.0.1" will ban "127.0.10.0"
114 /// but "127.0.1." will ban only the "127.0.1.*" network 114 /// but "127.0.1." will ban only the "127.0.1.*" network
115 /// </summary> 115 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 6d1f0c2..2242e42 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
285 // Cache Decoded layers 285 // Cache Decoded layers
286 SaveFileCacheForAsset(assetID, layers); 286 SaveFileCacheForAsset(assetID, layers);
287 } 287 }
288 288
289 // Notify Interested Parties 289 // Notify Interested Parties
290 lock (m_notifyList) 290 lock (m_notifyList)
291 { 291 {
diff --git a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
index 1391013..1b6401a 100644
--- a/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Xfer/XferModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
53 private double lastTimeTick = 0.0; 53 private double lastTimeTick = 0.0;
54 private double lastFilesExpire = 0.0; 54 private double lastFilesExpire = 0.0;
55 private bool inTimeTick = false; 55 private bool inTimeTick = false;
56 56
57 public struct XferRequest 57 public struct XferRequest
58 { 58 {
59 public IClientAPI remoteClient; 59 public IClientAPI remoteClient;
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
68 public int refsCount; 68 public int refsCount;
69 public double timeStampMS; 69 public double timeStampMS;
70 } 70 }
71 71
72 #region INonSharedRegionModule Members 72 #region INonSharedRegionModule Members
73 73
74 public void Initialise(IConfigSource config) 74 public void Initialise(IConfigSource config)
@@ -202,7 +202,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 public void NewClient(IClientAPI client) 206 public void NewClient(IClientAPI client)
207 { 207 {
208 client.OnRequestXfer += RequestXfer; 208 client.OnRequestXfer += RequestXfer;
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
275 int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11; 275 int burstSize = remoteClient.GetAgentThrottleSilent((int)ThrottleOutPacketType.Asset) >> 11;
276 if(Transfers.Count > 1) 276 if(Transfers.Count > 1)
277 burstSize /= Transfers.Count; 277 burstSize /= Transfers.Count;
278 XferDownLoad transaction = 278 XferDownLoad transaction =
279 new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize); 279 new XferDownLoad(fileName, fileData, xferID, remoteClient, burstSize);
280 280
281 Transfers.Add(xferID, transaction); 281 Transfers.Add(xferID, transaction);
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
288 } 288 }
289 } 289 }
290 else 290 else
291 m_log.WarnFormat("[Xfer]: {0} not found", fileName); 291 m_log.WarnFormat("[Xfer]: {0} not found", fileName);
292 } 292 }
293 } 293 }
294 294
@@ -381,9 +381,9 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
381 lastBytes = 1024; 381 lastBytes = 1024;
382 LastPacket--; 382 LastPacket--;
383 } 383 }
384 384
385 } 385 }
386 386
387 lastAckPacket = -1; 387 lastAckPacket = -1;
388 lastSentPacket = -1; 388 lastSentPacket = -1;
389 389
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index 14b0280..23c1f03 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -41,16 +41,16 @@ namespace OpenSim.Region.CoreModules.Asset
41 /// </summary> 41 /// </summary>
42 /// <remarks> 42 /// <remarks>
43 /// <para> 43 /// <para>
44 /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache". 44 /// Cache is enabled by setting "AssetCaching" configuration to value "CenomeMemoryAssetCache".
45 /// When cache is successfully enable log should have message 45 /// When cache is successfully enable log should have message
46 /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)". 46 /// "[ASSET CACHE]: Cenome asset cache enabled (MaxSize = XXX bytes, MaxCount = XXX, ExpirationTime = XXX)".
47 /// </para> 47 /// </para>
48 /// <para> 48 /// <para>
49 /// Cache's size is limited by two parameters: 49 /// Cache's size is limited by two parameters:
50 /// maximal allowed size in bytes and maximal allowed asset count. When new asset 50 /// maximal allowed size in bytes and maximal allowed asset count. When new asset
51 /// is added to cache that have achieved either size or count limitation, cache 51 /// is added to cache that have achieved either size or count limitation, cache
52 /// will automatically remove less recently used assets from cache. Additionally 52 /// will automatically remove less recently used assets from cache. Additionally
53 /// asset's lifetime is controlled by expiration time. 53 /// asset's lifetime is controlled by expiration time.
54 /// </para> 54 /// </para>
55 /// <para> 55 /// <para>
56 /// <list type="table"> 56 /// <list type="table">
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Asset
94 public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule 94 public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule
95 { 95 {
96 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 96 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
97 97
98 /// <summary> 98 /// <summary>
99 /// Cache's default maximal asset count. 99 /// Cache's default maximal asset count.
100 /// </summary> 100 /// </summary>
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Asset
119 /// Asset's default expiration time in the cache. 119 /// Asset's default expiration time in the cache.
120 /// </summary> 120 /// </summary>
121 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0); 121 public static readonly TimeSpan DefaultExpirationTime = TimeSpan.FromMinutes(30.0);
122 122
123 /// <summary> 123 /// <summary>
124 /// Cache object. 124 /// Cache object.
125 /// </summary> 125 /// </summary>
@@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Asset
213 if (asset != null) 213 if (asset != null)
214 { 214 {
215// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID); 215// m_log.DebugFormat("[CENOME ASSET CACHE]: Caching asset {0}", asset.ID);
216 216
217 long size = asset.Data != null ? asset.Data.Length : 1; 217 long size = asset.Data != null ? asset.Data.Length : 1;
218 m_cache.Set(asset.ID, asset, size); 218 m_cache.Set(asset.ID, asset, size);
219 m_cachedCount++; 219 m_cachedCount++;
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Asset
246 } 246 }
247 247
248 /// <summary> 248 /// <summary>
249 /// Get asset stored 249 /// Get asset stored
250 /// </summary> 250 /// </summary>
251 /// <param name="id"> 251 /// <param name="id">
252 /// The asset's id. 252 /// The asset's id.
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Asset
283 283
284// if (null == assetBase) 284// if (null == assetBase)
285// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id); 285// m_log.DebugFormat("[CENOME ASSET CACHE]: Asset {0} not in cache", id);
286 286
287 return assetBase; 287 return assetBase;
288 } 288 }
289 289
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.Asset
299 get { return "CenomeMemoryAssetCache"; } 299 get { return "CenomeMemoryAssetCache"; }
300 } 300 }
301 301
302 public Type ReplaceableInterface 302 public Type ReplaceableInterface
303 { 303 {
304 get { return null; } 304 get { return null; }
305 } 305 }
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Asset
349 349
350 if (name != Name) 350 if (name != Name)
351 return; 351 return;
352 352
353 long maxSize = DefaultMaxSize; 353 long maxSize = DefaultMaxSize;
354 int maxCount = DefaultMaxCount; 354 int maxCount = DefaultMaxCount;
355 TimeSpan expirationTime = DefaultExpirationTime; 355 TimeSpan expirationTime = DefaultExpirationTime;
diff --git a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
index 82bc5cc..51fc3d1 100644
--- a/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CoreAssetCache.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Asset
54 get { return "CoreAssetCache"; } 54 get { return "CoreAssetCache"; }
55 } 55 }
56 56
57 public Type ReplaceableInterface 57 public Type ReplaceableInterface
58 { 58 {
59 get { return null; } 59 get { return null; }
60 } 60 }
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 84e13a0..187f090 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -25,7 +25,7 @@
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// Uncomment to make asset Get requests for existing 28// Uncomment to make asset Get requests for existing
29// #define WAIT_ON_INPROGRESS_REQUESTS 29// #define WAIT_ON_INPROGRESS_REQUESTS
30 30
31using System; 31using System;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.Asset
113 private IAssetService m_AssetService; 113 private IAssetService m_AssetService;
114 private List<Scene> m_Scenes = new List<Scene>(); 114 private List<Scene> m_Scenes = new List<Scene>();
115 private object timerLock = new object(); 115 private object timerLock = new object();
116 116
117 private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>(); 117 private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>();
118 private object weakAssetReferencesLock = new object(); 118 private object weakAssetReferencesLock = new object();
119 private bool m_updateFileTimeOnCacheHit = false; 119 private bool m_updateFileTimeOnCacheHit = false;
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Asset
124 m_InvalidChars.AddRange(Path.GetInvalidFileNameChars()); 124 m_InvalidChars.AddRange(Path.GetInvalidFileNameChars());
125 } 125 }
126 126
127 public Type ReplaceableInterface 127 public Type ReplaceableInterface
128 { 128 {
129 get { return null; } 129 get { return null; }
130 } 130 }
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Asset
137 public void Initialise(IConfigSource source) 137 public void Initialise(IConfigSource source)
138 { 138 {
139 IConfig moduleConfig = source.Configs["Modules"]; 139 IConfig moduleConfig = source.Configs["Modules"];
140 140
141 if (moduleConfig != null) 141 if (moduleConfig != null)
142 { 142 {
143 string name = moduleConfig.GetString("AssetCaching", String.Empty); 143 string name = moduleConfig.GetString("AssetCaching", String.Empty);
@@ -169,11 +169,11 @@ namespace OpenSim.Region.CoreModules.Asset
169 m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration); 169 m_negativeExpiration = assetConfig.GetInt("NegativeCacheTimeout", m_negativeExpiration);
170 m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding); 170 m_negativeCacheSliding = assetConfig.GetBoolean("NegativeCacheSliding", m_negativeCacheSliding);
171 m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit); 171 m_updateFileTimeOnCacheHit = assetConfig.GetBoolean("UpdateFileTimeOnCacheHit", m_updateFileTimeOnCacheHit);
172 172
173 #if WAIT_ON_INPROGRESS_REQUESTS 173 #if WAIT_ON_INPROGRESS_REQUESTS
174 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000); 174 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
175 #endif 175 #endif
176 176
177 m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel); 177 m_LogLevel = assetConfig.GetInt("LogLevel", m_LogLevel);
178 m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay); 178 m_HitRateDisplay = (ulong)assetConfig.GetLong("HitRateDisplay", (long)m_HitRateDisplay);
179 179
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.Asset
266 { 266 {
267 m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds); 267 m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds);
268 m_CacheCleanTimer.AutoReset = false; 268 m_CacheCleanTimer.AutoReset = false;
269 m_CacheCleanTimer.Elapsed += CleanupExpiredFiles; 269 m_CacheCleanTimer.Elapsed += CleanupExpiredFiles;
270 m_CacheCleanTimer.Start(); 270 m_CacheCleanTimer.Start();
271 m_timerRunning = true; 271 m_timerRunning = true;
272 } 272 }
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.Asset
274 } 274 }
275 if (m_MemoryCacheEnabled) 275 if (m_MemoryCacheEnabled)
276 m_MemoryCache = new ExpiringCache<string, AssetBase>(); 276 m_MemoryCache = new ExpiringCache<string, AssetBase>();
277 277
278 lock(weakAssetReferencesLock) 278 lock(weakAssetReferencesLock)
279 weakAssetReferences = new Dictionary<string, WeakReference>(); 279 weakAssetReferences = new Dictionary<string, WeakReference>();
280 } 280 }
@@ -306,11 +306,11 @@ namespace OpenSim.Region.CoreModules.Asset
306 if (File.Exists(filename)) 306 if (File.Exists(filename))
307 { 307 {
308 UpdateFileLastAccessTime(filename); 308 UpdateFileLastAccessTime(filename);
309 } 309 }
310 else 310 else
311 { 311 {
312 // Once we start writing, make sure we flag that we're writing 312 // Once we start writing, make sure we flag that we're writing
313 // that object to the cache so that we don't try to write the 313 // that object to the cache so that we don't try to write the
314 // same file multiple times. 314 // same file multiple times.
315 lock (m_CurrentlyWriting) 315 lock (m_CurrentlyWriting)
316 { 316 {
@@ -439,7 +439,7 @@ namespace OpenSim.Region.CoreModules.Asset
439 /// <param name="id"></param> 439 /// <param name="id"></param>
440 /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns> 440 /// <returns>An asset retrieved from the file cache. null if there was a problem retrieving an asset.</returns>
441 private AssetBase GetFromFileCache(string id) 441 private AssetBase GetFromFileCache(string id)
442 { 442 {
443 string filename = GetFileName(id); 443 string filename = GetFileName(id);
444 444
445#if WAIT_ON_INPROGRESS_REQUESTS 445#if WAIT_ON_INPROGRESS_REQUESTS
@@ -649,7 +649,7 @@ namespace OpenSim.Region.CoreModules.Asset
649 m_MemoryCache = new ExpiringCache<string, AssetBase>(); 649 m_MemoryCache = new ExpiringCache<string, AssetBase>();
650 if (m_negativeCacheEnabled) 650 if (m_negativeCacheEnabled)
651 m_negativeCache = new ExpiringCache<string, object>(); 651 m_negativeCache = new ExpiringCache<string, object>();
652 652
653 lock(weakAssetReferencesLock) 653 lock(weakAssetReferencesLock)
654 weakAssetReferences = new Dictionary<string, WeakReference>(); 654 weakAssetReferences = new Dictionary<string, WeakReference>();
655 } 655 }
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Asset
659 if (m_LogLevel >= 2) 659 if (m_LogLevel >= 2)
660 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration); 660 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Checking for expired files older then {0}.", m_FileExpiration);
661 661
662 lock(timerLock) 662 lock(timerLock)
663 { 663 {
664 if(!m_timerRunning || m_cleanupRunning) 664 if(!m_timerRunning || m_cleanupRunning)
665 return; 665 return;
@@ -687,8 +687,8 @@ namespace OpenSim.Region.CoreModules.Asset
687 } 687 }
688 688
689 /// <summary> 689 /// <summary>
690 /// Recurses through specified directory checking for asset files last 690 /// Recurses through specified directory checking for asset files last
691 /// accessed prior to the specified purge line and deletes them. Also 691 /// accessed prior to the specified purge line and deletes them. Also
692 /// removes empty tier directories. 692 /// removes empty tier directories.
693 /// </summary> 693 /// </summary>
694 /// <param name="dir"></param> 694 /// <param name="dir"></param>
@@ -720,7 +720,7 @@ namespace OpenSim.Region.CoreModules.Asset
720 else if (dirSize >= m_CacheWarnAt) 720 else if (dirSize >= m_CacheWarnAt)
721 { 721 {
722 m_log.WarnFormat( 722 m_log.WarnFormat(
723 "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration", 723 "[FLOTSAM ASSET CACHE]: Cache folder exceeded CacheWarnAt limit {0} {1}. Suggest increasing tiers, tier length, or reducing cache expiration",
724 dir, dirSize); 724 dir, dirSize);
725 } 725 }
726 } 726 }
@@ -760,7 +760,7 @@ namespace OpenSim.Region.CoreModules.Asset
760 } 760 }
761 761
762 /// <summary> 762 /// <summary>
763 /// Writes a file to the file cache, creating any nessesary 763 /// Writes a file to the file cache, creating any nessesary
764 /// tier directories along the way 764 /// tier directories along the way
765 /// </summary> 765 /// </summary>
766 /// <param name="filename"></param> 766 /// <param name="filename"></param>
@@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Asset
772 // Make sure the target cache directory exists 772 // Make sure the target cache directory exists
773 string directory = Path.GetDirectoryName(filename); 773 string directory = Path.GetDirectoryName(filename);
774 774
775 // Write file first to a temp name, so that it doesn't look 775 // Write file first to a temp name, so that it doesn't look
776 // like it's already cached while it's still writing. 776 // like it's already cached while it's still writing.
777 string tempname = Path.Combine(directory, Path.GetRandomFileName()); 777 string tempname = Path.Combine(directory, Path.GetRandomFileName());
778 778
@@ -784,7 +784,7 @@ namespace OpenSim.Region.CoreModules.Asset
784 { 784 {
785 Directory.CreateDirectory(directory); 785 Directory.CreateDirectory(directory);
786 } 786 }
787 787
788 stream = File.Open(tempname, FileMode.Create); 788 stream = File.Open(tempname, FileMode.Create);
789 BinaryFormatter bformatter = new BinaryFormatter(); 789 BinaryFormatter bformatter = new BinaryFormatter();
790 bformatter.Serialize(stream, asset); 790 bformatter.Serialize(stream, asset);
@@ -818,7 +818,7 @@ namespace OpenSim.Region.CoreModules.Asset
818 // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the 818 // This situation occurs fairly rarely anyway. We assume in this that moves are atomic on the
819 // filesystem. 819 // filesystem.
820 File.Move(tempname, filename); 820 File.Move(tempname, filename);
821 821
822 if (m_LogLevel >= 2) 822 if (m_LogLevel >= 2)
823 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID); 823 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Cache Stored :: {0}", asset.ID);
824 } 824 }
@@ -875,7 +875,7 @@ namespace OpenSim.Region.CoreModules.Asset
875 { 875 {
876 string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac"); 876 string RegionCacheStatusFile = Path.Combine(m_CacheDirectory, "RegionStatus_" + regionID.ToString() + ".fac");
877 877
878 try 878 try
879 { 879 {
880 if (File.Exists(RegionCacheStatusFile)) 880 if (File.Exists(RegionCacheStatusFile))
881 { 881 {
@@ -884,7 +884,7 @@ namespace OpenSim.Region.CoreModules.Asset
884 else 884 else
885 { 885 {
886 File.WriteAllText( 886 File.WriteAllText(
887 RegionCacheStatusFile, 887 RegionCacheStatusFile,
888 "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache."); 888 "Please do not delete this file unless you are manually clearing your Flotsam Asset Cache.");
889 } 889 }
890 } 890 }
@@ -892,14 +892,14 @@ namespace OpenSim.Region.CoreModules.Asset
892 { 892 {
893 m_log.Warn( 893 m_log.Warn(
894 string.Format( 894 string.Format(
895 "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ", 895 "[FLOTSAM ASSET CACHE]: Could not stamp region status file for region {0}. Exception ",
896 regionID), 896 regionID),
897 e); 897 e);
898 } 898 }
899 } 899 }
900 900
901 /// <summary> 901 /// <summary>
902 /// Iterates through all Scenes, doing a deep scan through assets 902 /// Iterates through all Scenes, doing a deep scan through assets
903 /// to update the access time of all assets present in the scene or referenced by assets 903 /// to update the access time of all assets present in the scene or referenced by assets
904 /// in the scene. 904 /// in the scene.
905 /// </summary> 905 /// </summary>
@@ -918,7 +918,7 @@ namespace OpenSim.Region.CoreModules.Asset
918 StampRegionStatusFile(s.RegionInfo.RegionID); 918 StampRegionStatusFile(s.RegionInfo.RegionID);
919 919
920 s.ForEachSOG(delegate(SceneObjectGroup e) 920 s.ForEachSOG(delegate(SceneObjectGroup e)
921 { 921 {
922 if(!m_timerRunning && !storeUncached) 922 if(!m_timerRunning && !storeUncached)
923 return; 923 return;
924 924
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.Asset
1012 1012
1013 double weakHitRate = m_weakRefHits * invReq; 1013 double weakHitRate = m_weakRefHits * invReq;
1014 int weakEntries = weakAssetReferences.Count; 1014 int weakEntries = weakAssetReferences.Count;
1015 1015
1016 double fileHitRate = m_DiskHits * invReq; 1016 double fileHitRate = m_DiskHits * invReq;
1017 double TotalHitRate = weakHitRate + fileHitRate; 1017 double TotalHitRate = weakHitRate + fileHitRate;
1018 1018
@@ -1073,9 +1073,9 @@ namespace OpenSim.Region.CoreModules.Asset
1073 if (m_FileCacheEnabled) 1073 if (m_FileCacheEnabled)
1074 { 1074 {
1075 con.Output("Deep scans have previously been performed on the following regions:"); 1075 con.Output("Deep scans have previously been performed on the following regions:");
1076 1076
1077 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) 1077 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac"))
1078 { 1078 {
1079 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); 1079 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
1080 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); 1080 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
1081 con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss")); 1081 con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss"));
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.CoreModules.Asset
1118 con.Output("Memory cache not enabled."); 1118 con.Output("Memory cache not enabled.");
1119 } 1119 }
1120 } 1120 }
1121 1121
1122 if (clearFile) 1122 if (clearFile)
1123 { 1123 {
1124 if (m_FileCacheEnabled) 1124 if (m_FileCacheEnabled)
@@ -1147,7 +1147,7 @@ namespace OpenSim.Region.CoreModules.Asset
1147 1147
1148 con.Output("FloatSam Ensuring assets are cached for all scenes."); 1148 con.Output("FloatSam Ensuring assets are cached for all scenes.");
1149 1149
1150 WorkManager.RunInThread(delegate 1150 WorkManager.RunInThread(delegate
1151 { 1151 {
1152 bool wasRunning= false; 1152 bool wasRunning= false;
1153 lock(timerLock) 1153 lock(timerLock)
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.CoreModules.Asset
1167 if(wasRunning) 1167 if(wasRunning)
1168 { 1168 {
1169 m_CacheCleanTimer.Start(); 1169 m_CacheCleanTimer.Start();
1170 m_timerRunning = true; 1170 m_timerRunning = true;
1171 } 1171 }
1172 m_cleanupRunning = false; 1172 m_cleanupRunning = false;
1173 } 1173 }
@@ -1247,12 +1247,12 @@ namespace OpenSim.Region.CoreModules.Asset
1247 public bool[] AssetsExist(string[] ids) 1247 public bool[] AssetsExist(string[] ids)
1248 { 1248 {
1249 bool[] exist = new bool[ids.Length]; 1249 bool[] exist = new bool[ids.Length];
1250 1250
1251 for (int i = 0; i < ids.Length; i++) 1251 for (int i = 0; i < ids.Length; i++)
1252 { 1252 {
1253 exist[i] = Check(ids[i]); 1253 exist[i] = Check(ids[i]);
1254 } 1254 }
1255 1255
1256 return exist; 1256 return exist;
1257 } 1257 }
1258 1258
diff --git a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
index 195bdaa..208963d 100644
--- a/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/GlynnTuckerAssetCache.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Asset
55 // Instrumentation 55 // Instrumentation
56 private uint m_DebugRate; 56 private uint m_DebugRate;
57 57
58 public Type ReplaceableInterface 58 public Type ReplaceableInterface
59 { 59 {
60 get { return null; } 60 get { return null; }
61 } 61 }
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
index 73e4431..dbb7941 100644
--- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
+++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.Asset.Tests
112 { 112 {
113 TestHelpers.InMethod(); 113 TestHelpers.InMethod();
114// log4net.Config.XmlConfigurator.Configure(); 114// log4net.Config.XmlConfigurator.Configure();
115 115
116 AssetBase asset = AssetHelpers.CreateNotecardAsset(); 116 AssetBase asset = AssetHelpers.CreateNotecardAsset();
117 asset.ID = TestHelpers.ParseTail(0x2).ToString(); 117 asset.ID = TestHelpers.ParseTail(0x2).ToString();
118 118
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index d5c81ce..f4a8a6b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
61 /// A value of 0 will apply no pause. The pause is specified in milliseconds. 61 /// A value of 0 will apply no pause. The pause is specified in milliseconds.
62 /// </remarks> 62 /// </remarks>
63 public int ThrottlePer100PrimsRezzed { get; set; } 63 public int ThrottlePer100PrimsRezzed { get; set; }
64 64
65 private Scene m_scene; 65 private Scene m_scene;
66 private IInventoryAccessModule m_invAccessModule; 66 private IInventoryAccessModule m_invAccessModule;
67 67
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
69 /// Are attachments enabled? 69 /// Are attachments enabled?
70 /// </summary> 70 /// </summary>
71 public bool Enabled { get; private set; } 71 public bool Enabled { get; private set; }
72 72
73 public string Name { get { return "Attachments Module"; } } 73 public string Name { get { return "Attachments Module"; } }
74 public Type ReplaceableInterface { get { return null; } } 74 public Type ReplaceableInterface { get { return null; } }
75 75
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
87 Enabled = true; 87 Enabled = true;
88 } 88 }
89 } 89 }
90 90
91 public void AddRegion(Scene scene) 91 public void AddRegion(Scene scene)
92 { 92 {
93 m_scene = scene; 93 m_scene = scene;
94 if (Enabled) 94 if (Enabled)
95 { 95 {
96 // Only register module with scene if it is enabled. All callers check for a null attachments module. 96 // Only register module with scene if it is enabled. All callers check for a null attachments module.
97 // Ideally, there should be a null attachments module for when this core attachments module has been 97 // Ideally, there should be a null attachments module for when this core attachments module has been
98 // disabled. Registering only when enabled allows for other attachments module implementations. 98 // disabled. Registering only when enabled allows for other attachments module implementations.
99 m_scene.RegisterModuleInterface<IAttachmentsModule>(this); 99 m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
100 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 100 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
181 private void HandleScriptStateChange(uint localID, bool started) 181 private void HandleScriptStateChange(uint localID, bool started)
182 { 182 {
183 SceneObjectGroup sog = m_scene.GetGroupByPrim(localID); 183 SceneObjectGroup sog = m_scene.GetGroupByPrim(localID);
184 if (sog != null && sog.IsAttachment) 184 if (sog != null && sog.IsAttachment)
185 { 185 {
186 if (!started) 186 if (!started)
187 { 187 {
@@ -198,21 +198,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
198 } 198 }
199 } 199 }
200 } 200 }
201 201
202 public void RemoveRegion(Scene scene) 202 public void RemoveRegion(Scene scene)
203 { 203 {
204 m_scene.UnregisterModuleInterface<IAttachmentsModule>(this); 204 m_scene.UnregisterModuleInterface<IAttachmentsModule>(this);
205 205
206 if (Enabled) 206 if (Enabled)
207 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; 207 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
208 } 208 }
209 209
210 public void RegionLoaded(Scene scene) 210 public void RegionLoaded(Scene scene)
211 { 211 {
212 m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>(); 212 m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>();
213 } 213 }
214 214
215 public void Close() 215 public void Close()
216 { 216 {
217 RemoveRegion(m_scene); 217 RemoveRegion(m_scene);
218 } 218 }
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
270 ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule(); 270 ((SceneObjectGroup)so).RootPart.ClearUpdateSchedule();
271 271
272// m_log.DebugFormat( 272// m_log.DebugFormat(
273// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}", 273// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}",
274// ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name); 274// ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name);
275 275
276 so.SetState(ad.AttachmentObjectStates[i++], m_scene); 276 so.SetState(ad.AttachmentObjectStates[i++], m_scene);
@@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
295 { 295 {
296 if (DebugLevel > 0) 296 if (DebugLevel > 0)
297 m_log.DebugFormat( 297 m_log.DebugFormat(
298 "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments", 298 "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments",
299 m_scene.Name, sp.Name); 299 m_scene.Name, sp.Name);
300 300
301 return; 301 return;
@@ -357,7 +357,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
357 357
358 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down 358 // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
359 // But they're not used anyway, the item is being looked up for now, so let's proceed. 359 // But they're not used anyway, the item is being looked up for now, so let's proceed.
360 //if (UUID.Zero == assetID) 360 //if (UUID.Zero == assetID)
361 //{ 361 //{
362 // m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID); 362 // m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID);
363 // continue; 363 // continue;
@@ -434,7 +434,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
434 UpdateDetachedObject(sp, so, String.Empty); 434 UpdateDetachedObject(sp, so, String.Empty);
435 sp.ClearAttachments(); 435 sp.ClearAttachments();
436 } 436 }
437 } 437 }
438 } 438 }
439 439
440 public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent) 440 public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent)
@@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
445 if (DebugLevel > 0) 445 if (DebugLevel > 0)
446 m_log.DebugFormat( 446 m_log.DebugFormat(
447 "[ATTACHMENTS MODULE]: Deleting attachments from scene {0} for {1}, silent = {2}", 447 "[ATTACHMENTS MODULE]: Deleting attachments from scene {0} for {1}, silent = {2}",
448 m_scene.RegionInfo.RegionName, sp.Name, silent); 448 m_scene.RegionInfo.RegionName, sp.Name, silent);
449 449
450 foreach (SceneObjectGroup sop in sp.GetAttachments()) 450 foreach (SceneObjectGroup sop in sp.GetAttachments())
451 { 451 {
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
454 454
455 sp.ClearAttachments(); 455 sp.ClearAttachments();
456 } 456 }
457 457
458 public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, 458 public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent,
459 bool addToInventory, bool append) 459 bool addToInventory, bool append)
460 { 460 {
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
505 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should 505 // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
506 // be removed when that functionality is implemented in opensim 506 // be removed when that functionality is implemented in opensim
507 attachmentPt &= 0x7f; 507 attachmentPt &= 0x7f;
508 508
509 // If the attachment point isn't the same as the one previously used 509 // If the attachment point isn't the same as the one previously used
510 // set it's offset position = 0 so that it appears on the attachment point 510 // set it's offset position = 0 so that it appears on the attachment point
511 // and not in a weird location somewhere unknown. 511 // and not in a weird location somewhere unknown.
@@ -583,7 +583,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
583 583
584 if (addToInventory && sp.PresenceType != PresenceType.Npc) 584 if (addToInventory && sp.PresenceType != PresenceType.Npc)
585 UpdateUserInventoryWithAttachment(sp, group, attachmentPt, append); 585 UpdateUserInventoryWithAttachment(sp, group, attachmentPt, append);
586 586
587 AttachToAgent(sp, group, attachmentPt, attachPos, silent); 587 AttachToAgent(sp, group, attachmentPt, attachPos, silent);
588 588
589 if (resumeScripts) 589 if (resumeScripts)
@@ -616,11 +616,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
616 } 616 }
617 617
618 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) 618 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt)
619 { 619 {
620 return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null); 620 return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null);
621 } 621 }
622 622
623 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc) 623 public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc)
624 { 624 {
625 if (!Enabled) 625 if (!Enabled)
626 return null; 626 return null;
@@ -631,8 +631,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
631 (AttachmentPoint)AttachmentPt, itemID, sp.Name, m_scene.Name); 631 (AttachmentPoint)AttachmentPt, itemID, sp.Name, m_scene.Name);
632 632
633 // We check the attachments in the avatar appearance here rather than the objects attached to the 633 // We check the attachments in the avatar appearance here rather than the objects attached to the
634 // ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are 634 // ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are
635 // already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done 635 // already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done
636 // because pre-outfit folder viewers (most version 1 viewers) require it. 636 // because pre-outfit folder viewers (most version 1 viewers) require it.
637 bool alreadyOn = false; 637 bool alreadyOn = false;
638 List<AvatarAttachment> existingAttachments = sp.Appearance.GetAttachments(); 638 List<AvatarAttachment> existingAttachments = sp.Appearance.GetAttachments();
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
668 668
669 if (DebugLevel > 0) 669 if (DebugLevel > 0)
670 m_log.DebugFormat( 670 m_log.DebugFormat(
671 "[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}", 671 "[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}",
672 rezlist.Count, sp.Name, m_scene.Name); 672 rezlist.Count, sp.Name, m_scene.Name);
673 673
674 foreach (KeyValuePair<UUID, uint> rez in rezlist) 674 foreach (KeyValuePair<UUID, uint> rez in rezlist)
@@ -727,7 +727,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
727 m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); 727 m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
728 728
729 so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint; 729 so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint;
730 730
731 sp.RemoveAttachment(so); 731 sp.RemoveAttachment(so);
732 so.FromItemID = UUID.Zero; 732 so.FromItemID = UUID.Zero;
733 733
@@ -744,7 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
744 } 744 }
745 745
746 rootPart.RemFlag(PrimFlags.TemporaryOnRez); 746 rootPart.RemFlag(PrimFlags.TemporaryOnRez);
747 747
748 so.ApplyPhysics(); 748 so.ApplyPhysics();
749 749
750 rootPart.Rezzed = DateTime.Now; 750 rootPart.Rezzed = DateTime.Now;
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
804 804
805 if (DebugLevel > 0) 805 if (DebugLevel > 0)
806 m_log.DebugFormat( 806 m_log.DebugFormat(
807 "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}", 807 "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}",
808 so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name); 808 so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name);
809 809
810 // Scripts MUST be snapshotted before the object is 810 // Scripts MUST be snapshotted before the object is
@@ -827,14 +827,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
827 UpdateDetachedObject(sp, so, scriptedState); 827 UpdateDetachedObject(sp, so, scriptedState);
828 } 828 }
829 } 829 }
830 830
831 public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos) 831 public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
832 { 832 {
833 if (!Enabled) 833 if (!Enabled)
834 return; 834 return;
835 835
836 sog.UpdateGroupPosition(pos); 836 sog.UpdateGroupPosition(pos);
837 sog.HasGroupChanged = true; 837 sog.HasGroupChanged = true;
838 } 838 }
839 839
840 #endregion 840 #endregion
@@ -843,7 +843,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
843 843
844 // This is public but is not part of the IAttachmentsModule interface. 844 // This is public but is not part of the IAttachmentsModule interface.
845 // RegionCombiner module needs to poke at it to deliver client events. 845 // RegionCombiner module needs to poke at it to deliver client events.
846 // This breaks the encapsulation of the module and should get fixed somehow. 846 // This breaks the encapsulation of the module and should get fixed somehow.
847 public void SubscribeToClientEvents(IClientAPI client) 847 public void SubscribeToClientEvents(IClientAPI client)
848 { 848 {
849 client.OnRezSingleAttachmentFromInv += Client_OnRezSingleAttachmentFromInv; 849 client.OnRezSingleAttachmentFromInv += Client_OnRezSingleAttachmentFromInv;
@@ -856,7 +856,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
856 856
857 // This is public but is not part of the IAttachmentsModule interface. 857 // This is public but is not part of the IAttachmentsModule interface.
858 // RegionCombiner module needs to poke at it to deliver client events. 858 // RegionCombiner module needs to poke at it to deliver client events.
859 // This breaks the encapsulation of the module and should get fixed somehow. 859 // This breaks the encapsulation of the module and should get fixed somehow.
860 public void UnsubscribeFromClientEvents(IClientAPI client) 860 public void UnsubscribeFromClientEvents(IClientAPI client)
861 { 861 {
862 client.OnRezSingleAttachmentFromInv -= Client_OnRezSingleAttachmentFromInv; 862 client.OnRezSingleAttachmentFromInv -= Client_OnRezSingleAttachmentFromInv;
@@ -936,7 +936,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
936 /// Attach this scene object to the given avatar. 936 /// Attach this scene object to the given avatar.
937 /// </summary> 937 /// </summary>
938 /// <remarks> 938 /// <remarks>
939 /// This isn't publicly available since attachments should always perform the corresponding inventory 939 /// This isn't publicly available since attachments should always perform the corresponding inventory
940 /// operation (to show the attach in user inventory and update the asset with positional information). 940 /// operation (to show the attach in user inventory and update the asset with positional information).
941 /// </remarks> 941 /// </remarks>
942 /// <param name="sp"></param> 942 /// <param name="sp"></param>
@@ -997,7 +997,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
997 997
998 // Fudge below is an extremely unhelpful comment. It's probably here so that the scheduled full update 998 // Fudge below is an extremely unhelpful comment. It's probably here so that the scheduled full update
999 // will succeed, as that will not update if an attachment is selected. 999 // will succeed, as that will not update if an attachment is selected.
1000 so.IsSelected = false; // fudge.... 1000 so.IsSelected = false; // fudge....
1001 1001
1002 so.ScheduleGroupForFullUpdate(); 1002 so.ScheduleGroupForFullUpdate();
1003 } 1003 }
@@ -1041,7 +1041,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1041 /// </summary> 1041 /// </summary>
1042 /// <remarks> 1042 /// <remarks>
1043 /// This involves triggering the detach event and getting the script state (which also stops the script) 1043 /// This involves triggering the detach event and getting the script state (which also stops the script)
1044 /// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a 1044 /// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a
1045 /// running script is performing attachment operations. 1045 /// running script is performing attachment operations.
1046 /// </remarks> 1046 /// </remarks>
1047 /// <returns> 1047 /// <returns>
@@ -1088,7 +1088,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1088 // Remove the object from the scene so no more updates 1088 // Remove the object from the scene so no more updates
1089 // are sent. Doing this before the below changes will ensure 1089 // are sent. Doing this before the below changes will ensure
1090 // updates can't cause "HUD artefacts" 1090 // updates can't cause "HUD artefacts"
1091 1091
1092 m_scene.DeleteSceneObject(so, false, false); 1092 m_scene.DeleteSceneObject(so, false, false);
1093 1093
1094 // Prepare sog for storage 1094 // Prepare sog for storage
@@ -1125,7 +1125,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1125 itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1125 itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1126 false, false, sp.UUID, true); 1126 false, false, sp.UUID, true);
1127 else 1127 else
1128 objatt = m_invAccessModule.RezObject(sp.ControllingClient, 1128 objatt = m_invAccessModule.RezObject(sp.ControllingClient,
1129 null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 1129 null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
1130 false, false, sp.UUID, true); 1130 false, false, sp.UUID, true);
1131 1131
@@ -1139,7 +1139,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1139 } 1139 }
1140 else if (itemID == UUID.Zero) 1140 else if (itemID == UUID.Zero)
1141 { 1141 {
1142 // We need to have a FromItemID for multiple attachments on a single attach point to appear. This is 1142 // We need to have a FromItemID for multiple attachments on a single attach point to appear. This is
1143 // true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory 1143 // true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory
1144 // we will satisfy this requirement by inserting a random UUID. 1144 // we will satisfy this requirement by inserting a random UUID.
1145 objatt.FromItemID = UUID.Random(); 1145 objatt.FromItemID = UUID.Random();
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1185 } 1185 }
1186 1186
1187 if (tainted) 1187 if (tainted)
1188 objatt.HasGroupChanged = true; 1188 objatt.HasGroupChanged = true;
1189 1189
1190 if (ThrottlePer100PrimsRezzed > 0) 1190 if (ThrottlePer100PrimsRezzed > 0)
1191 { 1191 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 16f1952..941853c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -485,7 +485,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
485 485
486 // Test wearing a second attachment at the same position 486 // Test wearing a second attachment at the same position
487 // Until multiple attachments at one point is implemented, this will remove the first attachment 487 // Until multiple attachments at one point is implemented, this will remove the first attachment
488 // This test relies on both attachments having the same default attachment point (in this case LeftHand 488 // This test relies on both attachments having the same default attachment point (in this case LeftHand
489 // since none other has been set). 489 // since none other has been set).
490 { 490 {
491 scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, attItem2.ID, (uint)AttachmentPoint.Default); 491 scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, attItem2.ID, (uint)AttachmentPoint.Default);
@@ -975,8 +975,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
975 // Both these operations will occur on different threads and will wait for each other. 975 // Both these operations will occur on different threads and will wait for each other.
976 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 976 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1
977 // test protocol, where we are trying to avoid unpredictable async operations in regression tests. 977 // test protocol, where we are trying to avoid unpredictable async operations in regression tests.
978 tc.OnTestClientSendRegionTeleport 978 tc.OnTestClientSendRegionTeleport
979 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) 979 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL)
980 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); 980 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null);
981 981
982 m_numberOfAttachEventsFired = 0; 982 m_numberOfAttachEventsFired = 0;
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 67256ee..0826a08 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); 75 m_savetime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime)));
76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); 76 m_sendtime = Convert.ToInt32(appearanceConfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime)));
77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures); 77 m_reusetextures = appearanceConfig.GetBoolean("ReuseTextures",m_reusetextures);
78 78
79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); 79 // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime);
80 } 80 }
81 81
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
166 } 166 }
167 167
168 /// <summary> 168 /// <summary>
169 /// Set appearance data (texture asset IDs and slider settings) 169 /// Set appearance data (texture asset IDs and slider settings)
170 /// </summary> 170 /// </summary>
171 /// <param name="sp"></param> 171 /// <param name="sp"></param>
172 /// <param name="texture"></param> 172 /// <param name="texture"></param>
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
190 { 190 {
191 changed = sp.Appearance.SetVisualParams(visualParams); 191 changed = sp.Appearance.SetVisualParams(visualParams);
192 } 192 }
193 193
194 // Process the baked texture array 194 // Process the baked texture array
195 if (textureEntry != null) 195 if (textureEntry != null)
196 { 196 {
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems; 267 WearableCacheItem[] items = sp.Appearance.WearableCacheItems;
268 //foreach (WearableCacheItem item in items) 268 //foreach (WearableCacheItem item in items)
269 //{ 269 //{
270 270
271 //} 271 //}
272 return items; 272 return items;
273 } 273 }
@@ -468,7 +468,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
468 } 468 }
469 469
470 sp.Appearance.WearableCacheItems = wearableCache; 470 sp.Appearance.WearableCacheItems = wearableCache;
471 471
472 if (missing.Count > 0) 472 if (missing.Count > 0)
473 { 473 {
474 foreach (UUID id in missing) 474 foreach (UUID id in missing)
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) 493 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++)
494 { 494 {
495 int j = AvatarAppearance.BAKE_INDICES[iter]; 495 int j = AvatarAppearance.BAKE_INDICES[iter];
496 m_log.Debug("[UpdateBCache] {" + iter + "/" + 496 m_log.Debug("[UpdateBCache] {" + iter + "/" +
497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" + 497 sp.Appearance.WearableCacheItems[j].TextureIndex + "}: c-" +
498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" + 498 sp.Appearance.WearableCacheItems[j].CacheId + ", t-" +
499 sp.Appearance.WearableCacheItems[j].TextureID); 499 sp.Appearance.WearableCacheItems[j].TextureID);
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
588 wearableCacheValid = false; 588 wearableCacheValid = false;
589 } 589 }
590 } 590 }
591 591
592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1)); 592 wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1));
593 if (wearableCacheValid) 593 if (wearableCacheValid)
594 m_log.Debug("[ValidateBakedCache] have valid local cache"); 594 m_log.Debug("[ValidateBakedCache] have valid local cache");
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
601 if (!wearableCacheValid) 601 if (!wearableCacheValid)
602 { 602 {
603 hits = 0; 603 hits = 0;
604 // only use external bake module on login condition check 604 // only use external bake module on login condition check
605// ScenePresence ssp = null; 605// ScenePresence ssp = null;
606// if (sp is ScenePresence) 606// if (sp is ScenePresence)
607 { 607 {
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
816 foreach (KeyValuePair<UUID, long> kvp in saves) 816 foreach (KeyValuePair<UUID, long> kvp in saves)
817 { 817 {
818 // We have to load the key and value into local parameters to avoid a race condition if we loop 818 // We have to load the key and value into local parameters to avoid a race condition if we loop
819 // around and load kvp with a different value before FireAndForget has launched its thread. 819 // around and load kvp with a different value before FireAndForget has launched its thread.
820 UUID avatarID = kvp.Key; 820 UUID avatarID = kvp.Key;
821 long sendTime = kvp.Value; 821 long sendTime = kvp.Value;
822 822
@@ -869,13 +869,13 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
869 869
870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance); 870 m_scene.AvatarService.SetAppearance(agentid, sp.Appearance);
871 871
872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting. 872 // Trigger this here because it's the final step in the set/queue/save process for appearance setting.
873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes). 873 // Everything has been updated and stored. Ensures bakes have been persisted (if option is set to persist bakes).
874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp); 874 m_scene.EventManager.TriggerAvatarAppearanceChanged(sp);
875 } 875 }
876 876
877 /// <summary> 877 /// <summary>
878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to 878 /// For a given set of appearance items, check whether the items are valid and add their asset IDs to
879 /// appearance data. 879 /// appearance data.
880 /// </summary> 880 /// </summary>
881 /// <param name='userID'></param> 881 /// <param name='userID'></param>
@@ -893,7 +893,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
893 if (appearance.Wearables[i][j].ItemID == UUID.Zero) 893 if (appearance.Wearables[i][j].ItemID == UUID.Zero)
894 { 894 {
895 m_log.WarnFormat( 895 m_log.WarnFormat(
896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.", 896 "[AVFACTORY]: Wearable item {0}:{1} for user {2} unexpectedly UUID.Zero. Ignoring.",
897 i, j, userID); 897 i, j, userID);
898 898
899 continue; 899 continue;
@@ -967,7 +967,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
967// case WearableType.Skin: 967// case WearableType.Skin:
968// //case WearableType.Underpants: 968// //case WearableType.Underpants:
969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 969// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
970// 970//
971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i); 971// m_log.WarnFormat("[AVFACTORY]: {0} Default Wearables, passing existing values.", (WearableType)i);
972// resetwearable = true; 972// resetwearable = true;
973// break; 973// break;
@@ -975,7 +975,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
975// } 975// }
976// continue; 976// continue;
977// } 977// }
978// 978//
979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); 979// InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
980// baseItem = invService.GetItem(baseItem); 980// baseItem = invService.GetItem(baseItem);
981// 981//
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1002// 1002//
1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance); 1003// TryAndRepairBrokenWearable((WearableType)i, invService, userID, appearance);
1004// resetwearable = true; 1004// resetwearable = true;
1005// 1005//
1006// } 1006// }
1007// } 1007// }
1008// } 1008// }
@@ -1011,7 +1011,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1011// if (appearance.Wearables[(int) WearableType.Eyes] == null) 1011// if (appearance.Wearables[(int) WearableType.Eyes] == null)
1012// { 1012// {
1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes)); 1013// m_log.WarnFormat("[AVFACTORY]: {0} Eyes are Null, passing existing values.", (WearableType.Eyes));
1014// 1014//
1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance); 1015// TryAndRepairBrokenWearable(WearableType.Eyes, invService, userID, appearance);
1016// resetwearable = true; 1016// resetwearable = true;
1017// } 1017// }
@@ -1213,7 +1213,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId); 1213 m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId);
1214 }, null, "AvatarFactoryModule.OnClientRequestWearables"); 1214 }, null, "AvatarFactoryModule.OnClientRequestWearables");
1215 } 1215 }
1216 1216
1217 /// <summary> 1217 /// <summary>
1218 /// Set appearance data (texture asset IDs and slider settings) received from a client 1218 /// Set appearance data (texture asset IDs and slider settings) received from a client
1219 /// </summary> 1219 /// </summary>
@@ -1299,12 +1299,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1299 { 1299 {
1300 UUID texture = UUID.Zero; 1300 UUID texture = UUID.Zero;
1301 int index = request.BakedTextureIndex; 1301 int index = request.BakedTextureIndex;
1302 1302
1303 if (m_reusetextures) 1303 if (m_reusetextures)
1304 { 1304 {
1305 // this is the most insanely dumb way to do this... however it seems to 1305 // this is the most insanely dumb way to do this... however it seems to
1306 // actually work. if the appearance has been reset because wearables have 1306 // actually work. if the appearance has been reset because wearables have
1307 // changed then the texture entries are zero'd out until the bakes are 1307 // changed then the texture entries are zero'd out until the bakes are
1308 // uploaded. on login, if the textures exist in the cache (eg if you logged 1308 // uploaded. on login, if the textures exist in the cache (eg if you logged
1309 // into the simulator recently, then the appearance will pull those and send 1309 // into the simulator recently, then the appearance will pull those and send
1310 // them back in the packet and you won't have to rebake. if the textures aren't 1310 // them back in the packet and you won't have to rebake. if the textures aren't
@@ -1320,7 +1320,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1320 1320
1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index); 1321 // m_log.WarnFormat("[AVFACTORY]: reuse texture {0} for index {1}",texture,index);
1322 } 1322 }
1323 1323
1324 CachedTextureResponseArg response = new CachedTextureResponseArg(); 1324 CachedTextureResponseArg response = new CachedTextureResponseArg();
1325 response.BakedTextureIndex = index; 1325 response.BakedTextureIndex = index;
1326 response.BakedTextureID = texture; 1326 response.BakedTextureID = texture;
@@ -1328,7 +1328,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
1328 1328
1329 cachedTextureResponse.Add(response); 1329 cachedTextureResponse.Add(response);
1330 } 1330 }
1331 1331
1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial); 1332 // m_log.WarnFormat("[AVFACTORY]: serial is {0}",serial);
1333 // The serial number appears to be used to match requests and responses 1333 // The serial number appears to be used to match requests and responses
1334 // in the texture transaction. We just send back the serial number 1334 // in the texture transaction. We just send back the serial number
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
index dd93449..33489d1 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
55 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 55 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
56 // to the AssetService, which will then store temporary and local assets permanently 56 // to the AssetService, which will then store temporary and local assets permanently
57 CoreAssetCache assetCache = new CoreAssetCache(); 57 CoreAssetCache assetCache = new CoreAssetCache();
58 58
59 AvatarFactoryModule afm = new AvatarFactoryModule(); 59 AvatarFactoryModule afm = new AvatarFactoryModule();
60 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 60 TestScene scene = new SceneHelpers(assetCache).SetupScene();
61 SceneHelpers.SetupSceneModules(scene, afm); 61 SceneHelpers.SetupSceneModules(scene, afm);
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
63 63
64 // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules 64 // TODO: Use the actual BunchOfCaps functionality once we slot in the CapabilitiesModules
65 AssetBase bakedTextureAsset; 65 AssetBase bakedTextureAsset;
66 bakedTextureAsset 66 bakedTextureAsset
67 = new AssetBase( 67 = new AssetBase(
68 bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString()); 68 bakedTextureID, "Test Baked Texture", (sbyte)AssetType.Texture, userId.ToString());
69 bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet 69 bakedTextureAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
85 // This is the alpha texture 85 // This is the alpha texture
86 eyesFace.TextureID = bakedTextureID; 86 eyesFace.TextureID = bakedTextureID;
87 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); 87 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null);
88 88
89 Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); 89 Assert.That(rebakeRequestsReceived, Is.EqualTo(0));
90 90
91 AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString()); 91 AssetBase eyesBake = scene.AssetService.Get(bakedTextureID.ToString());
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
98 /// Test appearance setting where the baked texture UUID are library alpha textures. 98 /// Test appearance setting where the baked texture UUID are library alpha textures.
99 /// </summary> 99 /// </summary>
100 /// <remarks> 100 /// <remarks>
101 /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to 101 /// For a mesh avatar, it appears these 'baked textures' are used. So these should not trigger a request to
102 /// rebake. 102 /// rebake.
103 /// </remarks> 103 /// </remarks>
104 [Test] 104 [Test]
@@ -113,14 +113,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
113 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 113 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
114 // to the AssetService, which will then store temporary and local assets permanently 114 // to the AssetService, which will then store temporary and local assets permanently
115 CoreAssetCache assetCache = new CoreAssetCache(); 115 CoreAssetCache assetCache = new CoreAssetCache();
116 116
117 AvatarFactoryModule afm = new AvatarFactoryModule(); 117 AvatarFactoryModule afm = new AvatarFactoryModule();
118 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 118 TestScene scene = new SceneHelpers(assetCache).SetupScene();
119 SceneHelpers.SetupSceneModules(scene, afm); 119 SceneHelpers.SetupSceneModules(scene, afm);
120 ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId); 120 ScenePresence sp = SceneHelpers.AddScenePresence(scene, userId);
121 121
122 AssetBase libraryAsset; 122 AssetBase libraryAsset;
123 libraryAsset 123 libraryAsset
124 = new AssetBase( 124 = new AssetBase(
125 alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString()); 125 alphaTextureID, "Default Alpha Layer Texture", (sbyte)AssetType.Texture, userId.ToString());
126 libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet 126 libraryAsset.Data = new byte[] { 2 }; // Not necessary to have a genuine JPEG2000 asset here yet
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
142 // This is the alpha texture 142 // This is the alpha texture
143 eyesFace.TextureID = alphaTextureID; 143 eyesFace.TextureID = alphaTextureID;
144 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null); 144 afm.SetAppearance(sp, bakedTextureEntry, visualParams, null);
145 145
146 Assert.That(rebakeRequestsReceived, Is.EqualTo(0)); 146 Assert.That(rebakeRequestsReceived, Is.EqualTo(0));
147 } 147 }
148 148
@@ -158,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
158 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly 158 // We need an asset cache because otherwise the LocalAssetServiceConnector will short-circuit directly
159 // to the AssetService, which will then store temporary and local assets permanently 159 // to the AssetService, which will then store temporary and local assets permanently
160 CoreAssetCache assetCache = new CoreAssetCache(); 160 CoreAssetCache assetCache = new CoreAssetCache();
161 161
162 AvatarFactoryModule afm = new AvatarFactoryModule(); 162 AvatarFactoryModule afm = new AvatarFactoryModule();
163 TestScene scene = new SceneHelpers(assetCache).SetupScene(); 163 TestScene scene = new SceneHelpers(assetCache).SetupScene();
164 SceneHelpers.SetupSceneModules(scene, afm); 164 SceneHelpers.SetupSceneModules(scene, afm);
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
index 6d97251..27e84b0 100644
--- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
53 private UTF8Encoding enc = new UTF8Encoding(); 53 private UTF8Encoding enc = new UTF8Encoding();
54 private string m_URL = String.Empty; 54 private string m_URL = String.Empty;
55 private static XmlSerializer m_serializer = new XmlSerializer(typeof(AssetBase)); 55 private static XmlSerializer m_serializer = new XmlSerializer(typeof(AssetBase));
56 private static bool m_enabled = false; 56 private static bool m_enabled = false;
57 57
58 private static IServiceAuth m_Auth; 58 private static IServiceAuth m_Auth;
59 59
@@ -64,18 +64,18 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
64 return; 64 return;
65 65
66 m_URL = config.GetString("URL", String.Empty); 66 m_URL = config.GetString("URL", String.Empty);
67 if (m_URL == String.Empty) 67 if (m_URL == String.Empty)
68 return; 68 return;
69 69
70 m_enabled = true; 70 m_enabled = true;
71 71
72 m_Auth = ServiceAuth.Create(configSource, "XBakes"); 72 m_Auth = ServiceAuth.Create(configSource, "XBakes");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77 if (!m_enabled) 77 if (!m_enabled)
78 return; 78 return;
79 79
80 // m_log.InfoFormat("[XBakes]: Enabled for region {0}", scene.RegionInfo.RegionName); 80 // m_log.InfoFormat("[XBakes]: Enabled for region {0}", scene.RegionInfo.RegionName);
81 m_Scene = scene; 81 m_Scene = scene;
@@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
177 177
178 int numberWears = 0; 178 int numberWears = 0;
179 MemoryStream reqStream; 179 MemoryStream reqStream;
180 180
181 using (MemoryStream bakeStream = new MemoryStream()) 181 using (MemoryStream bakeStream = new MemoryStream())
182 using (XmlTextWriter bakeWriter = new XmlTextWriter(bakeStream, null)) 182 using (XmlTextWriter bakeWriter = new XmlTextWriter(bakeStream, null))
183 { 183 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 5164289..53800bb 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
69 m_enabled = false; 69 m_enabled = false;
70 return; 70 return;
71 } 71 }
72 72
73 m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance); 73 m_whisperdistance = m_config.GetInt("whisper_distance", m_whisperdistance);
74 m_saydistance = m_config.GetInt("say_distance", m_saydistance); 74 m_saydistance = m_config.GetInt("say_distance", m_saydistance);
75 m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance); 75 m_shoutdistance = m_config.GetInt("shout_distance", m_shoutdistance);
@@ -123,7 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
123 } 123 }
124 } 124 }
125 } 125 }
126 126
127 public virtual void Close() 127 public virtual void Close()
128 { 128 {
129 } 129 }
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
132 { 132 {
133 } 133 }
134 134
135 public virtual Type ReplaceableInterface 135 public virtual Type ReplaceableInterface
136 { 136 {
137 get { return null; } 137 get { return null; }
138 } 138 }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
222 return; 222 return;
223 } 223 }
224 224
225 switch (sourceType) 225 switch (sourceType)
226 { 226 {
227 case ChatSourceType.Agent: 227 case ChatSourceType.Agent:
228 ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId); 228 ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId);
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
240 } 240 }
241 destination = UUID.Zero; // Avatars cant "SayTo" 241 destination = UUID.Zero; // Avatars cant "SayTo"
242 ownerID = c.Sender.AgentId; 242 ownerID = c.Sender.AgentId;
243 243
244 hidePos = fromPos; 244 hidePos = fromPos;
245 break; 245 break;
246 246
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
264 message = message.Substring(0, 1000); 264 message = message.Substring(0, 1000);
265 265
266// m_log.DebugFormat( 266// m_log.DebugFormat(
267// "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}", 267// "[CHAT]: DCTA: fromID {0} fromName {1}, region{2}, cType {3}, sType {4}",
268// fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType); 268// fromID, fromName, scene.RegionInfo.RegionName, c.Type, sourceType);
269 269
270 HashSet<UUID> receiverIDs = new HashSet<UUID>(); 270 HashSet<UUID> receiverIDs = new HashSet<UUID>();
@@ -317,13 +317,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
317 } 317 }
318 } 318 }
319 }); 319 });
320 320
321 scene.EventManager.TriggerOnChatToClients( 321 scene.EventManager.TriggerOnChatToClients(
322 fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully); 322 fromID, receiverIDs, message, c.Type, fromPos, fromName, sourceType, ChatAudibleLevel.Fully);
323 } 323 }
324 324
325 static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30); 325 static protected Vector3 CenterOfRegion = new Vector3(128, 128, 30);
326 326
327 public virtual void OnChatBroadcast(Object sender, OSChatMessage c) 327 public virtual void OnChatBroadcast(Object sender, OSChatMessage c)
328 { 328 {
329 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return; 329 if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
@@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
341 // broadcast chat works by redistributing every incoming chat 341 // broadcast chat works by redistributing every incoming chat
342 // message to each avatar in the scene. 342 // message to each avatar in the scene.
343 string fromName = c.From; 343 string fromName = c.From;
344 344
345 UUID fromID = UUID.Zero; 345 UUID fromID = UUID.Zero;
346 UUID ownerID = UUID.Zero; 346 UUID ownerID = UUID.Zero;
347 ChatSourceType sourceType = ChatSourceType.Object; 347 ChatSourceType sourceType = ChatSourceType.Object;
@@ -353,15 +353,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
353 ownerID = c.Sender.AgentId; 353 ownerID = c.Sender.AgentId;
354 sourceType = ChatSourceType.Agent; 354 sourceType = ChatSourceType.Agent;
355 } 355 }
356 else if (c.SenderUUID != UUID.Zero) 356 else if (c.SenderUUID != UUID.Zero)
357 { 357 {
358 fromID = c.SenderUUID; 358 fromID = c.SenderUUID;
359 ownerID = ((SceneObjectPart)c.SenderObject).OwnerID; 359 ownerID = ((SceneObjectPart)c.SenderObject).OwnerID;
360 } 360 }
361 361
362 // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); 362 // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
363 HashSet<UUID> receiverIDs = new HashSet<UUID>(); 363 HashSet<UUID> receiverIDs = new HashSet<UUID>();
364 364
365 if (c.Scene != null) 365 if (c.Scene != null)
366 { 366 {
367 ((Scene)c.Scene).ForEachRootClient 367 ((Scene)c.Scene).ForEachRootClient
@@ -374,7 +374,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
374 (null != c.SenderObject) && 374 (null != c.SenderObject) &&
375 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) 375 (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
376 return; 376 return;
377 377
378 client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID, 378 client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID,
379 (byte)sourceType, (byte)ChatAudibleLevel.Fully); 379 (byte)sourceType, (byte)ChatAudibleLevel.Fully);
380 receiverIDs.Add(client.AgentId); 380 receiverIDs.Add(client.AgentId);
@@ -400,7 +400,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
400 /// <param name="type"></param> 400 /// <param name="type"></param>
401 /// <param name="message"></param> 401 /// <param name="message"></param>
402 /// <param name="src"></param> 402 /// <param name="src"></param>
403 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a 403 /// <returns>true if the message was sent to the receiver, false if it was not sent due to failing a
404 /// precondition</returns> 404 /// precondition</returns>
405 protected virtual bool TrySendChatMessage( 405 protected virtual bool TrySendChatMessage(
406 ScenePresence presence, Vector3 fromPos, Vector3 regionPos, 406 ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
430 presence.ControllingClient.SendChatMessage( 430 presence.ControllingClient.SendChatMessage(
431 message, (byte) type, fromPos, fromName, 431 message, (byte) type, fromPos, fromName,
432 fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully); 432 fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully);
433 433
434 return true; 434 return true;
435 } 435 }
436 436
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
index a720ad9..5457dc3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/Tests/ChatModuleTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
47{ 47{
48 [TestFixture] 48 [TestFixture]
49 public class ChatModuleTests : OpenSimTestCase 49 public class ChatModuleTests : OpenSimTestCase
50 { 50 {
51 [TestFixtureSetUp] 51 [TestFixtureSetUp]
52 public void FixtureInit() 52 public void FixtureInit()
53 { 53 {
@@ -66,14 +66,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
66 } 66 }
67 67
68 private void SetupNeighbourRegions(TestScene sceneA, TestScene sceneB) 68 private void SetupNeighbourRegions(TestScene sceneA, TestScene sceneB)
69 { 69 {
70 // XXX: HTTP server is not (and should not be) necessary for this test, though it's absence makes the 70 // XXX: HTTP server is not (and should not be) necessary for this test, though it's absence makes the
71 // CapabilitiesModule complain when it can't set up HTTP endpoints. 71 // CapabilitiesModule complain when it can't set up HTTP endpoints.
72 BaseHttpServer httpServer = new BaseHttpServer(99999); 72 BaseHttpServer httpServer = new BaseHttpServer(99999);
73 MainServer.AddHttpServer(httpServer); 73 MainServer.AddHttpServer(httpServer);
74 MainServer.Instance = httpServer; 74 MainServer.Instance = httpServer;
75 75
76 // We need entity transfer modules so that when sp2 logs into the east region, the region calls 76 // We need entity transfer modules so that when sp2 logs into the east region, the region calls
77 // EntityTransferModuleto set up a child agent on the west region. 77 // EntityTransferModuleto set up a child agent on the west region.
78 // XXX: However, this is not an entity transfer so is misleading. 78 // XXX: However, this is not an entity transfer so is misleading.
79 EntityTransferModule etmA = new EntityTransferModule(); 79 EntityTransferModule etmA = new EntityTransferModule();
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
87 modulesConfig.Set("SimulationServices", lscm.Name); 87 modulesConfig.Set("SimulationServices", lscm.Name);
88 88
89 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 89 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
90 SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA, new ChatModule()); 90 SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA, new ChatModule());
91 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB, new ChatModule()); 91 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB, new ChatModule());
92 } 92 }
93 93
@@ -111,8 +111,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
111 Vector3 sp2Position = new Vector3(250, 128, 20); 111 Vector3 sp2Position = new Vector3(250, 128, 20);
112 112
113 SceneHelpers sh = new SceneHelpers(); 113 SceneHelpers sh = new SceneHelpers();
114 TestScene sceneWest = sh.SetupScene("sceneWest", TestHelpers.ParseTail(0x1), 1000, 1000); 114 TestScene sceneWest = sh.SetupScene("sceneWest", TestHelpers.ParseTail(0x1), 1000, 1000);
115 TestScene sceneEast = sh.SetupScene("sceneEast", TestHelpers.ParseTail(0x2), 1001, 1000); 115 TestScene sceneEast = sh.SetupScene("sceneEast", TestHelpers.ParseTail(0x2), 1001, 1000);
116 116
117 SetupNeighbourRegions(sceneWest, sceneEast); 117 SetupNeighbourRegions(sceneWest, sceneEast);
118 118
@@ -124,12 +124,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
124 // physics is irrelevant to this test. 124 // physics is irrelevant to this test.
125 sp1.Flying = true; 125 sp1.Flying = true;
126 126
127 // When sp1 logs in to sceneEast, it sets up a child agent in sceneWest and informs the sp2 client to 127 // When sp1 logs in to sceneEast, it sets up a child agent in sceneWest and informs the sp2 client to
128 // make the connection. For this test, will simplify this chain by making the connection directly. 128 // make the connection. For this test, will simplify this chain by making the connection directly.
129 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneWest, sp1Uuid); 129 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneWest, sp1Uuid);
130 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient; 130 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient;
131 131
132 sp1.AbsolutePosition = sp1Position; 132 sp1.AbsolutePosition = sp1Position;
133 133
134 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid); 134 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneWest, sp2Uuid);
135 TestClient sp2Client = (TestClient)sp2.ControllingClient; 135 TestClient sp2Client = (TestClient)sp2.ControllingClient;
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
138 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid); 138 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneEast, sp2Uuid);
139 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient; 139 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient;
140 140
141 sp2.AbsolutePosition = sp2Position; 141 sp2.AbsolutePosition = sp2Position;
142 142
143 // We must update the scenes in order to make the root new root agents trigger position updates in their 143 // We must update the scenes in order to make the root new root agents trigger position updates in their
144 // children. 144 // children.
@@ -147,19 +147,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
147 147
148 // Check child positions are correct. 148 // Check child positions are correct.
149 Assert.AreEqual( 149 Assert.AreEqual(
150 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z), 150 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z),
151 sp1ChildClient.SceneAgent.AbsolutePosition); 151 sp1ChildClient.SceneAgent.AbsolutePosition);
152 152
153 Assert.AreEqual( 153 Assert.AreEqual(
154 new Vector3(sp2Position.X - sceneWest.RegionInfo.RegionSizeX, sp2Position.Y, sp2Position.Z), 154 new Vector3(sp2Position.X - sceneWest.RegionInfo.RegionSizeX, sp2Position.Y, sp2Position.Z),
155 sp2ChildClient.SceneAgent.AbsolutePosition); 155 sp2ChildClient.SceneAgent.AbsolutePosition);
156 156
157 string receivedSp1ChatMessage = ""; 157 string receivedSp1ChatMessage = "";
158 string receivedSp2ChatMessage = ""; 158 string receivedSp2ChatMessage = "";
159 159
160 sp1ChildClient.OnReceivedChatMessage 160 sp1ChildClient.OnReceivedChatMessage
161 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message; 161 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message;
162 sp2ChildClient.OnReceivedChatMessage 162 sp2ChildClient.OnReceivedChatMessage
163 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message; 163 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message;
164 164
165 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage); 165 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage);
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
175 175
176 // Check child position is correct. 176 // Check child position is correct.
177 Assert.AreEqual( 177 Assert.AreEqual(
178 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z), 178 new Vector3(sp1Position.X + sceneEast.RegionInfo.RegionSizeX, sp1Position.Y, sp1Position.Z),
179 sp1ChildClient.SceneAgent.AbsolutePosition); 179 sp1ChildClient.SceneAgent.AbsolutePosition);
180 180
181 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage); 181 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage);
@@ -202,8 +202,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
202 Vector3 sp2Position = new Vector3(128, 6, 20); 202 Vector3 sp2Position = new Vector3(128, 6, 20);
203 203
204 SceneHelpers sh = new SceneHelpers(); 204 SceneHelpers sh = new SceneHelpers();
205 TestScene sceneNorth = sh.SetupScene("sceneNorth", TestHelpers.ParseTail(0x1), 1000, 1000); 205 TestScene sceneNorth = sh.SetupScene("sceneNorth", TestHelpers.ParseTail(0x1), 1000, 1000);
206 TestScene sceneSouth = sh.SetupScene("sceneSouth", TestHelpers.ParseTail(0x2), 1000, 1001); 206 TestScene sceneSouth = sh.SetupScene("sceneSouth", TestHelpers.ParseTail(0x2), 1000, 1001);
207 207
208 SetupNeighbourRegions(sceneNorth, sceneSouth); 208 SetupNeighbourRegions(sceneNorth, sceneSouth);
209 209
@@ -215,12 +215,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
215 // physics is irrelevant to this test. 215 // physics is irrelevant to this test.
216 sp1.Flying = true; 216 sp1.Flying = true;
217 217
218 // When sp1 logs in to sceneEast, it sets up a child agent in sceneNorth and informs the sp2 client to 218 // When sp1 logs in to sceneEast, it sets up a child agent in sceneNorth and informs the sp2 client to
219 // make the connection. For this test, will simplify this chain by making the connection directly. 219 // make the connection. For this test, will simplify this chain by making the connection directly.
220 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneSouth, sp1Uuid); 220 ScenePresence sp1Child = SceneHelpers.AddChildScenePresence(sceneSouth, sp1Uuid);
221 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient; 221 TestClient sp1ChildClient = (TestClient)sp1Child.ControllingClient;
222 222
223 sp1.AbsolutePosition = sp1Position; 223 sp1.AbsolutePosition = sp1Position;
224 224
225 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneSouth, sp2Uuid); 225 ScenePresence sp2 = SceneHelpers.AddScenePresence(sceneSouth, sp2Uuid);
226 TestClient sp2Client = (TestClient)sp2.ControllingClient; 226 TestClient sp2Client = (TestClient)sp2.ControllingClient;
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
229 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneNorth, sp2Uuid); 229 ScenePresence sp2Child = SceneHelpers.AddChildScenePresence(sceneNorth, sp2Uuid);
230 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient; 230 TestClient sp2ChildClient = (TestClient)sp2Child.ControllingClient;
231 231
232 sp2.AbsolutePosition = sp2Position; 232 sp2.AbsolutePosition = sp2Position;
233 233
234 // We must update the scenes in order to make the root new root agents trigger position updates in their 234 // We must update the scenes in order to make the root new root agents trigger position updates in their
235 // children. 235 // children.
@@ -238,19 +238,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
238 238
239 // Check child positions are correct. 239 // Check child positions are correct.
240 Assert.AreEqual( 240 Assert.AreEqual(
241 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z), 241 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z),
242 sp1ChildClient.SceneAgent.AbsolutePosition); 242 sp1ChildClient.SceneAgent.AbsolutePosition);
243 243
244 Assert.AreEqual( 244 Assert.AreEqual(
245 new Vector3(sp2Position.X, sp2Position.Y + sceneSouth.RegionInfo.RegionSizeY, sp2Position.Z), 245 new Vector3(sp2Position.X, sp2Position.Y + sceneSouth.RegionInfo.RegionSizeY, sp2Position.Z),
246 sp2ChildClient.SceneAgent.AbsolutePosition); 246 sp2ChildClient.SceneAgent.AbsolutePosition);
247 247
248 string receivedSp1ChatMessage = ""; 248 string receivedSp1ChatMessage = "";
249 string receivedSp2ChatMessage = ""; 249 string receivedSp2ChatMessage = "";
250 250
251 sp1ChildClient.OnReceivedChatMessage 251 sp1ChildClient.OnReceivedChatMessage
252 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message; 252 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp1ChatMessage = message;
253 sp2ChildClient.OnReceivedChatMessage 253 sp2ChildClient.OnReceivedChatMessage
254 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message; 254 += (message, type, fromPos, fromName, fromAgentID, ownerID, source, audible) => receivedSp2ChatMessage = message;
255 255
256 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage); 256 TestUserInRange(sp1Client, "ello darling", ref receivedSp2ChatMessage);
@@ -266,13 +266,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat.Tests
266 266
267 // Check child position is correct. 267 // Check child position is correct.
268 Assert.AreEqual( 268 Assert.AreEqual(
269 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z), 269 new Vector3(sp1Position.X, sp1Position.Y - sceneNorth.RegionInfo.RegionSizeY, sp1Position.Z),
270 sp1ChildClient.SceneAgent.AbsolutePosition); 270 sp1ChildClient.SceneAgent.AbsolutePosition);
271 271
272 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage); 272 TestUserOutOfRange(sp1Client, "beef", ref receivedSp2ChatMessage);
273 TestUserOutOfRange(sp2Client, "lentils", ref receivedSp1ChatMessage); 273 TestUserOutOfRange(sp2Client, "lentils", ref receivedSp1ChatMessage);
274 } 274 }
275 275
276 private void TestUserInRange(TestClient speakClient, string testMessage, ref string receivedMessage) 276 private void TestUserInRange(TestClient speakClient, string testMessage, ref string receivedMessage)
277 { 277 {
278 receivedMessage = ""; 278 receivedMessage = "";
diff --git a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
index 764adf9..cf65c47 100644
--- a/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Commands/UserCommandsModule.cs
@@ -62,19 +62,19 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 62 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
63 63
64 public string Name { get { return "User Commands Module"; } } 64 public string Name { get { return "User Commands Module"; } }
65 65
66 public Type ReplaceableInterface { get { return null; } } 66 public Type ReplaceableInterface { get { return null; } }
67 67
68 public void Initialise(IConfigSource source) 68 public void Initialise(IConfigSource source)
69 { 69 {
70// m_log.DebugFormat("[USER COMMANDS MODULE]: INITIALIZED MODULE"); 70// m_log.DebugFormat("[USER COMMANDS MODULE]: INITIALIZED MODULE");
71 } 71 }
72 72
73 public void PostInitialise() 73 public void PostInitialise()
74 { 74 {
75// m_log.DebugFormat("[USER COMMANDS MODULE]: POST INITIALIZED MODULE"); 75// m_log.DebugFormat("[USER COMMANDS MODULE]: POST INITIALIZED MODULE");
76 } 76 }
77 77
78 public void Close() 78 public void Close()
79 { 79 {
80// m_log.DebugFormat("[USER COMMANDS MODULE]: CLOSED MODULE"); 80// m_log.DebugFormat("[USER COMMANDS MODULE]: CLOSED MODULE");
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index aaa331b..7980de3 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
167 m_Enabled = true; 167 m_Enabled = true;
168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name); 168 m_log.DebugFormat("[FRIENDS MODULE]: {0} enabled.", Name);
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 protected virtual void InitModule(IConfigSource config) 173 protected virtual void InitModule(IConfigSource config)
@@ -570,7 +570,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im) 570 protected virtual void OnInstantMessage(IClientAPI client, GridInstantMessage im)
571 { 571 {
572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered) 572 if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered)
573 { 573 {
574 // we got a friendship offer 574 // we got a friendship offer
575 UUID principalID = new UUID(im.fromAgentID); 575 UUID principalID = new UUID(im.fromAgentID);
576 UUID friendID = new UUID(im.toAgentID); 576 UUID friendID = new UUID(im.toAgentID);
@@ -605,7 +605,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
605 im.imSessionID = im.fromAgentID; 605 im.imSessionID = im.fromAgentID;
606 im.fromAgentName = GetFriendshipRequesterName(agentID); 606 im.fromAgentName = GetFriendshipRequesterName(agentID);
607 607
608 // Try the local sim 608 // Try the local sim
609 if (LocalFriendshipOffered(friendID, im)) 609 if (LocalFriendshipOffered(friendID, im))
610 return true; 610 return true;
611 611
@@ -648,7 +648,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero); 648 ccm.CreateCallingCard(client.AgentId, friendID, UUID.Zero);
649 } 649 }
650 650
651 // Update the local cache. 651 // Update the local cache.
652 RecacheFriends(client); 652 RecacheFriends(client);
653 653
654 // 654 //
@@ -704,7 +704,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
704 } 704 }
705 } 705 }
706 } 706 }
707 707
708 public void RemoveFriendship(IClientAPI client, UUID exfriendID) 708 public void RemoveFriendship(IClientAPI client, UUID exfriendID)
709 { 709 {
710 if (!DeleteFriendship(client.AgentId, exfriendID)) 710 if (!DeleteFriendship(client.AgentId, exfriendID))
@@ -732,7 +732,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); 732 GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID); 733 m_FriendsSimConnector.FriendshipTerminated(region, client.AgentId, exfriendID);
734 } 734 }
735 } 735 }
736 } 736 }
737 737
738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID) 738 public void FindFriend(IClientAPI remoteClient,UUID HunterID ,UUID PreyID)
@@ -740,7 +740,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
740 UUID requester = remoteClient.AgentId; 740 UUID requester = remoteClient.AgentId;
741 if(requester != HunterID) // only allow client agent to be the hunter (?) 741 if(requester != HunterID) // only allow client agent to be the hunter (?)
742 return; 742 return;
743 743
744 FriendInfo[] friends = GetFriendsFromCache(requester); 744 FriendInfo[] friends = GetFriendsFromCache(requester);
745 if (friends.Length == 0) 745 if (friends.Length == 0)
746 return; 746 return;
@@ -773,7 +773,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
773 } 773 }
774 774
775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() }); 775 PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { PreyID.ToString() });
776 776
777 if (friendSessions == null || friendSessions.Length == 0) 777 if (friendSessions == null || friendSessions.Length == 0)
778 return; 778 return;
779 779
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index c421740..81aa882 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID); 127 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(UUID.Zero, fromID);
128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName; 128 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName;
129 129
130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID, 130 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID,
131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero); 131 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero);
132 132
133 // !! HACK 133 // !! HACK
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index 9954749..ac05a6e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -539,8 +539,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}", 539 // m_log.DebugFormat("[HGFRIENDS MODULE] HG Friendship! thisUUI={0}; friendUUI={1}; foreignThisFriendService={2}; foreignFriendFriendService={3}",
540 // agentUUI, friendUUI, agentFriendService, friendFriendService); 540 // agentUUI, friendUUI, agentFriendService, friendFriendService);
541 541
542 } 542 }
543 543
544 // Delete any previous friendship relations 544 // Delete any previous friendship relations
545 DeletePreviousRelations(agentID, friendID); 545 DeletePreviousRelations(agentID, friendID);
546 546
@@ -641,11 +641,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
641 FriendsService.Delete(a1, f.Friend); 641 FriendsService.Delete(a1, f.Friend);
642 // and also the converse 642 // and also the converse
643 FriendsService.Delete(f.Friend, a1.ToString()); 643 FriendsService.Delete(f.Friend, a1.ToString());
644 } 644 }
645 } 645 }
646 } 646 }
647 } 647 }
648 648
649 finfos = GetFriendsFromCache(a1); 649 finfos = GetFriendsFromCache(a1);
650 if (finfos != null) 650 if (finfos != null)
651 { 651 {
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
658 FriendsService.Delete(a2, f.Friend); 658 FriendsService.Delete(a2, f.Friend);
659 // and also the converse 659 // and also the converse
660 FriendsService.Delete(f.Friend, a2.ToString()); 660 FriendsService.Delete(f.Friend, a2.ToString());
661 } 661 }
662 } 662 }
663 } 663 }
664 } 664 }
@@ -783,7 +783,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL); 783 m_log.DebugFormat("[HGFRIENDS MODULE]: Forwading friendship from {0} to {1} @ {2}", agentID, friendID, friendsURL);
784 GridRegion region = new GridRegion(); 784 GridRegion region = new GridRegion();
785 region.ServerURI = friendsURL; 785 region.ServerURI = friendsURL;
786 786
787 string name = im.fromAgentName; 787 string name = im.fromAgentName;
788 if (m_uMan.IsLocalGridUser(agentID)) 788 if (m_uMan.IsLocalGridUser(agentID))
789 { 789 {
@@ -815,7 +815,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
815 } 815 }
816 816
817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name); 817 m_HGFriendsConnector.FriendshipOffered(region, agentID, friendID, im.message, name);
818 818
819 return true; 819 return true;
820 } 820 }
821 } 821 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
index 1fa4dd6..3fae271 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGStatusNotifier.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
32 { 32 {
33 if (kvp.Key != "local") 33 if (kvp.Key != "local")
34 { 34 {
35 // For the others, call the user agent service 35 // For the others, call the user agent service
36 List<string> ids = new List<string>(); 36 List<string> ids = new List<string>();
37 foreach (FriendInfo f in kvp.Value) 37 foreach (FriendInfo f in kvp.Value)
38 ids.Add(f.Friend); 38 ids.Add(f.Friend);
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
index e6fd54e..3d9bd35 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible 67 // so that different services and simulator can share the data in standalone mode. This is pretty horrible
68 // effectively the statics are global variables. 68 // effectively the statics are global variables.
69 NullFriendsData.Clear(); 69 NullFriendsData.Clear();
70 70
71 IConfigSource config = new IniConfigSource(); 71 IConfigSource config = new IniConfigSource();
72 config.AddConfig("Modules"); 72 config.AddConfig("Modules");
73 // Not strictly necessary since FriendsModule assumes it is the default (!) 73 // Not strictly necessary since FriendsModule assumes it is the default (!)
diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
index 4efcd3b..03e2c5a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs
@@ -42,11 +42,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
42{ 42{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")] 43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GesturesModule")]
44 public class GesturesModule : INonSharedRegionModule 44 public class GesturesModule : INonSharedRegionModule
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected Scene m_scene; 48 protected Scene m_scene;
49 49
50 public void Initialise(IConfigSource source) 50 public void Initialise(IConfigSource source)
51 { 51 {
52 } 52 }
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
67 m_scene.EventManager.OnNewClient -= OnNewClient; 67 m_scene.EventManager.OnNewClient -= OnNewClient;
68 m_scene = null; 68 m_scene = null;
69 } 69 }
70 70
71 public void Close() {} 71 public void Close() {}
72 public string Name { get { return "Gestures Module"; } } 72 public string Name { get { return "Gestures Module"; } }
73 73
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
81 client.OnActivateGesture += ActivateGesture; 81 client.OnActivateGesture += ActivateGesture;
82 client.OnDeactivateGesture += DeactivateGesture; 82 client.OnDeactivateGesture += DeactivateGesture;
83 } 83 }
84 84
85 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId) 85 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId)
86 { 86 {
87 IInventoryService invService = m_scene.InventoryService; 87 IInventoryService invService = m_scene.InventoryService;
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
92 item.Flags |= 1; 92 item.Flags |= 1;
93 invService.UpdateItem(item); 93 invService.UpdateItem(item);
94 } 94 }
95 else 95 else
96 m_log.WarnFormat( 96 m_log.WarnFormat(
97 "[GESTURES]: Unable to find gesture {0} to activate for {1}", gestureId, client.Name); 97 "[GESTURES]: Unable to find gesture {0} to activate for {1}", gestureId, client.Name);
98 } 98 }
@@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures
107 item.Flags &= ~(uint)1; 107 item.Flags &= ~(uint)1;
108 invService.UpdateItem(item); 108 invService.UpdateItem(item);
109 } 109 }
110 else 110 else
111 m_log.ErrorFormat( 111 m_log.ErrorFormat(
112 "[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name); 112 "[GESTURES]: Unable to find gesture to deactivate {0} for {1}", gestureId, client.Name);
113 } 113 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index db02379..8d3c10d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -112,19 +112,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
112 client.OnGodKickUser += KickUser; 112 client.OnGodKickUser += KickUser;
113 client.OnRequestGodlikePowers += RequestGodlikePowers; 113 client.OnRequestGodlikePowers += RequestGodlikePowers;
114 } 114 }
115 115
116 public void UnsubscribeFromClientEvents(IClientAPI client) 116 public void UnsubscribeFromClientEvents(IClientAPI client)
117 { 117 {
118 client.OnGodKickUser -= KickUser; 118 client.OnGodKickUser -= KickUser;
119 client.OnRequestGodlikePowers -= RequestGodlikePowers; 119 client.OnRequestGodlikePowers -= RequestGodlikePowers;
120 } 120 }
121 121
122 private void OnRegisterCaps(UUID agentID, Caps caps) 122 private void OnRegisterCaps(UUID agentID, Caps caps)
123 { 123 {
124 string uri = "/CAPS/" + UUID.Random(); 124 string uri = "/CAPS/" + UUID.Random();
125 125
126 caps.RegisterHandler( 126 caps.RegisterHandler(
127 "UntrustedSimulatorMessage", 127 "UntrustedSimulatorMessage",
128 new RestStreamHandler("POST", uri, HandleUntrustedSimulatorMessage, "UntrustedSimulatorMessage", null)); 128 new RestStreamHandler("POST", uri, HandleUntrustedSimulatorMessage, "UntrustedSimulatorMessage", null));
129 } 129 }
130 130
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
176 if (godLike && sp.GodLevel < 200 && DialogModule != null) 176 if (godLike && sp.GodLevel < 200 && DialogModule != null)
177 DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); 177 DialogModule.SendAlertToUser(agentID, "Request for god powers denied");
178 } 178 }
179 179
180 /// <summary> 180 /// <summary>
181 /// Kicks or freezes User specified from the simulator. This logs them off of the grid 181 /// Kicks or freezes User specified from the simulator. This logs them off of the grid
182 /// </summary> 182 /// </summary>
@@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
261 if(sp.IsDeleted || sp.IsChildAgent) 261 if(sp.IsDeleted || sp.IsChildAgent)
262 return; 262 return;
263 sp.ControllingClient.Kick(reason); 263 sp.ControllingClient.Kick(reason);
264 sp.Scene.CloseAgent(sp.UUID, true); 264 sp.Scene.CloseAgent(sp.UUID, true);
265 } 265 }
266 266
267 private void OnIncomingInstantMessage(GridInstantMessage msg) 267 private void OnIncomingInstantMessage(GridInstantMessage msg)
diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
index 543410e..7f91a61 100644
--- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups
145 return; 145 return;
146 146
147// m_log.Debug("[GROUPS]: Shutting down group module."); 147// m_log.Debug("[GROUPS]: Shutting down group module.");
148 148
149 lock (m_ClientMap) 149 lock (m_ClientMap)
150 { 150 {
151 m_ClientMap.Clear(); 151 m_ClientMap.Clear();
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
index 63b3dba..16e2ec3 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/HGMessageTransferModule.cs
@@ -144,11 +144,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
144 foreach (Scene scene in m_Scenes) 144 foreach (Scene scene in m_Scenes)
145 { 145 {
146// m_log.DebugFormat( 146// m_log.DebugFormat(
147// "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}", 147// "[HG INSTANT MESSAGE]: Looking for root agent {0} in {1}",
148// toAgentID.ToString(), scene.RegionInfo.RegionName); 148// toAgentID.ToString(), scene.RegionInfo.RegionName);
149 ScenePresence sp = scene.GetScenePresence(toAgentID); 149 ScenePresence sp = scene.GetScenePresence(toAgentID);
150 if (sp != null && !sp.IsChildAgent && !sp.IsDeleted) 150 if (sp != null && !sp.IsChildAgent && !sp.IsDeleted)
151 { 151 {
152 // Local message 152 // Local message
153// m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID); 153// m_log.DebugFormat("[HG INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", user.Name, toAgentID);
154 sp.ControllingClient.SendInstantMessage(im); 154 sp.ControllingClient.SendInstantMessage(im);
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
index 7d54a00..71c0a8a 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
49 /// Is this module enabled? 49 /// Is this module enabled?
50 /// </value> 50 /// </value>
51 protected bool m_enabled = false; 51 protected bool m_enabled = false;
52 52
53 protected readonly List<Scene> m_scenes = new List<Scene>(); 53 protected readonly List<Scene> m_scenes = new List<Scene>();
54 54
55 #region Region Module interface 55 #region Region Module interface
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
65 "InstantMessageModule") 65 "InstantMessageModule")
66 return; 66 return;
67 } 67 }
68 68
69 m_enabled = true; 69 m_enabled = true;
70 } 70 }
71 71
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 6b120fb..efb9421 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -207,10 +207,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
207 protected virtual XmlRpcResponse processXMLRPCGridInstantMessage(XmlRpcRequest request, IPEndPoint remoteClient) 207 protected virtual XmlRpcResponse processXMLRPCGridInstantMessage(XmlRpcRequest request, IPEndPoint remoteClient)
208 { 208 {
209 bool successful = false; 209 bool successful = false;
210 210
211 // TODO: For now, as IMs seem to be a bit unreliable on OSGrid, catch all exception that 211 // TODO: For now, as IMs seem to be a bit unreliable on OSGrid, catch all exception that
212 // happen here and aren't caught and log them. 212 // happen here and aren't caught and log them.
213 try 213 try
214 { 214 {
215 // various rational defaults 215 // various rational defaults
216 UUID fromAgentID = UUID.Zero; 216 UUID fromAgentID = UUID.Zero;
@@ -475,7 +475,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
475 /// </summary> 475 /// </summary>
476 476
477 /// <param name="prevRegionHandle"> 477 /// <param name="prevRegionHandle">
478 /// Pass in 0 the first time this method is called. It will be called recursively with the last 478 /// Pass in 0 the first time this method is called. It will be called recursively with the last
479 /// regionhandle tried 479 /// regionhandle tried
480 /// </param> 480 /// </param>
481 private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result) 481 private void SendGridInstantMessageViaXMLRPCAsyncMain(GridInstantMessage im, MessageResultNotification result)
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
index 315d372..2d57193 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs
@@ -118,11 +118,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
118 { 118 {
119 get { return null; } 119 get { return null; }
120 } 120 }
121 121
122 public void Close() 122 public void Close()
123 { 123 {
124 } 124 }
125 125
126 private void OnNewClient(IClientAPI client) 126 private void OnNewClient(IClientAPI client)
127 { 127 {
128 client.OnMuteListRequest += OnMuteListRequest; 128 client.OnMuteListRequest += OnMuteListRequest;
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 369d480..d1f6054 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
146 { 146 {
147 get { return null; } 147 get { return null; }
148 } 148 }
149 149
150 public void Close() 150 public void Close()
151 { 151 {
152 } 152 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index 4a06fd1..3838316 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
56 /// bumps here should be compatible. 56 /// bumps here should be compatible.
57 /// </summary> 57 /// </summary>
58 public static int MAX_MAJOR_VERSION = 1; 58 public static int MAX_MAJOR_VERSION = 1;
59 59
60 protected TarArchiveReader archive; 60 protected TarArchiveReader archive;
61 61
62 private UserAccount m_userInfo; 62 private UserAccount m_userInfo;
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
66 /// ID of this request 66 /// ID of this request
67 /// </value> 67 /// </value>
68 protected UUID m_id; 68 protected UUID m_id;
69 69
70 /// <summary> 70 /// <summary>
71 /// Do we want to merge this load with existing inventory? 71 /// Do we want to merge this load with existing inventory?
72 /// </summary> 72 /// </summary>
@@ -82,41 +82,41 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
82 /// The stream from which the inventory archive will be loaded. 82 /// The stream from which the inventory archive will be loaded.
83 /// </value> 83 /// </value>
84 private Stream m_loadStream; 84 private Stream m_loadStream;
85 85
86 /// <summary> 86 /// <summary>
87 /// Has the control file been loaded for this archive? 87 /// Has the control file been loaded for this archive?
88 /// </summary> 88 /// </summary>
89 public bool ControlFileLoaded { get; private set; } 89 public bool ControlFileLoaded { get; private set; }
90 90
91 /// <summary> 91 /// <summary>
92 /// Do we want to enforce the check. IAR versions before 0.2 and 1.1 do not guarantee this order, so we can't 92 /// Do we want to enforce the check. IAR versions before 0.2 and 1.1 do not guarantee this order, so we can't
93 /// enforce. 93 /// enforce.
94 /// </summary> 94 /// </summary>
95 public bool EnforceControlFileCheck { get; private set; } 95 public bool EnforceControlFileCheck { get; private set; }
96 96
97 protected bool m_assetsLoaded; 97 protected bool m_assetsLoaded;
98 protected bool m_inventoryNodesLoaded; 98 protected bool m_inventoryNodesLoaded;
99 99
100 protected int m_successfulAssetRestores; 100 protected int m_successfulAssetRestores;
101 protected int m_failedAssetRestores; 101 protected int m_failedAssetRestores;
102 protected int m_successfulItemRestores; 102 protected int m_successfulItemRestores;
103 103
104 /// <summary> 104 /// <summary>
105 /// Root destination folder for the IAR load. 105 /// Root destination folder for the IAR load.
106 /// </summary> 106 /// </summary>
107 protected InventoryFolderBase m_rootDestinationFolder; 107 protected InventoryFolderBase m_rootDestinationFolder;
108 108
109 /// <summary> 109 /// <summary>
110 /// Inventory nodes loaded from the iar. 110 /// Inventory nodes loaded from the iar.
111 /// </summary> 111 /// </summary>
112 protected HashSet<InventoryNodeBase> m_loadedNodes = new HashSet<InventoryNodeBase>(); 112 protected HashSet<InventoryNodeBase> m_loadedNodes = new HashSet<InventoryNodeBase>();
113 113
114 /// <summary> 114 /// <summary>
115 /// In order to load identically named folders, we need to keep track of the folders that we have already 115 /// In order to load identically named folders, we need to keep track of the folders that we have already
116 /// resolved. 116 /// resolved.
117 /// </summary> 117 /// </summary>
118 Dictionary <string, InventoryFolderBase> m_resolvedFolders = new Dictionary<string, InventoryFolderBase>(); 118 Dictionary <string, InventoryFolderBase> m_resolvedFolders = new Dictionary<string, InventoryFolderBase>();
119 119
120 /// <summary> 120 /// <summary>
121 /// Record the creator id that should be associated with an asset. This is used to adjust asset creator ids 121 /// Record the creator id that should be associated with an asset. This is used to adjust asset creator ids
122 /// after OSP resolution (since OSP creators are only stored in the item 122 /// after OSP resolution (since OSP creators are only stored in the item
@@ -163,9 +163,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
163 m_invPath = invPath; 163 m_invPath = invPath;
164 m_loadStream = loadStream; 164 m_loadStream = loadStream;
165 m_module = module; 165 m_module = module;
166 166
167 // FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things 167 // FIXME: Do not perform this check since older versions of OpenSim do save the control file after other things
168 // (I thought they weren't). We will need to bump the version number and perform this check on all 168 // (I thought they weren't). We will need to bump the version number and perform this check on all
169 // subsequent IAR versions only 169 // subsequent IAR versions only
170 ControlFileLoaded = true; 170 ControlFileLoaded = true;
171 } 171 }
@@ -188,19 +188,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
188 Exception reportedException = null; 188 Exception reportedException = null;
189 189
190 string filePath = "ERROR"; 190 string filePath = "ERROR";
191 191
192 List<InventoryFolderBase> folderCandidates 192 List<InventoryFolderBase> folderCandidates
193 = InventoryArchiveUtils.FindFoldersByPath( 193 = InventoryArchiveUtils.FindFoldersByPath(
194 m_InventoryService, m_userInfo.PrincipalID, m_invPath); 194 m_InventoryService, m_userInfo.PrincipalID, m_invPath);
195 195
196 if (folderCandidates.Count == 0) 196 if (folderCandidates.Count == 0)
197 { 197 {
198 // Possibly provide an option later on to automatically create this folder if it does not exist 198 // Possibly provide an option later on to automatically create this folder if it does not exist
199 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath); 199 m_log.ErrorFormat("[INVENTORY ARCHIVER]: Inventory path {0} does not exist", m_invPath);
200 200
201 return m_loadedNodes; 201 return m_loadedNodes;
202 } 202 }
203 203
204 m_rootDestinationFolder = folderCandidates[0]; 204 m_rootDestinationFolder = folderCandidates[0];
205 archive = new TarArchiveReader(m_loadStream); 205 archive = new TarArchiveReader(m_loadStream);
206 byte[] data; 206 byte[] data;
@@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
211 if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 211 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
212 { 212 {
213 LoadControlFile(filePath, data); 213 LoadControlFile(filePath, data);
214 } 214 }
215 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 215 else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
216 { 216 {
217 LoadAssetFile(filePath, data); 217 LoadAssetFile(filePath, data);
@@ -221,17 +221,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
221 LoadInventoryFile(filePath, entryType, data); 221 LoadInventoryFile(filePath, entryType, data);
222 } 222 }
223 } 223 }
224 224
225 archive.Close(); 225 archive.Close();
226 226
227 m_log.DebugFormat( 227 m_log.DebugFormat(
228 "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", 228 "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures",
229 m_successfulAssetRestores, m_failedAssetRestores); 229 m_successfulAssetRestores, m_failedAssetRestores);
230 230
231 //Alicia: When this is called by LibraryModule or Tests, m_module will be null as event is not required 231 //Alicia: When this is called by LibraryModule or Tests, m_module will be null as event is not required
232 if(m_module != null) 232 if(m_module != null)
233 m_module.TriggerInventoryArchiveLoaded(m_id, true, m_userInfo, m_invPath, m_loadStream, reportedException, m_successfulItemRestores); 233 m_module.TriggerInventoryArchiveLoaded(m_id, true, m_userInfo, m_invPath, m_loadStream, reportedException, m_successfulItemRestores);
234 234
235 return m_loadedNodes; 235 return m_loadedNodes;
236 } 236 }
237 catch(Exception Ex) 237 catch(Exception Ex)
@@ -268,8 +268,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
268 /// </param> 268 /// </param>
269 /// <returns>The last user inventory folder created or found for the archive path</returns> 269 /// <returns>The last user inventory folder created or found for the archive path</returns>
270 public InventoryFolderBase ReplicateArchivePathToUserInventory( 270 public InventoryFolderBase ReplicateArchivePathToUserInventory(
271 string iarPath, 271 string iarPath,
272 InventoryFolderBase rootDestFolder, 272 InventoryFolderBase rootDestFolder,
273 Dictionary <string, InventoryFolderBase> resolvedFolders, 273 Dictionary <string, InventoryFolderBase> resolvedFolders,
274 HashSet<InventoryNodeBase> loadedNodes) 274 HashSet<InventoryNodeBase> loadedNodes)
275 { 275 {
@@ -277,27 +277,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
277 277
278// m_log.DebugFormat( 278// m_log.DebugFormat(
279// "[INVENTORY ARCHIVER]: Loading folder {0} {1}", rootDestFolder.Name, rootDestFolder.ID); 279// "[INVENTORY ARCHIVER]: Loading folder {0} {1}", rootDestFolder.Name, rootDestFolder.ID);
280 280
281 InventoryFolderBase destFolder 281 InventoryFolderBase destFolder
282 = ResolveDestinationFolder(rootDestFolder, ref iarPathExisting, resolvedFolders); 282 = ResolveDestinationFolder(rootDestFolder, ref iarPathExisting, resolvedFolders);
283 283
284// m_log.DebugFormat( 284// m_log.DebugFormat(
285// "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]", 285// "[INVENTORY ARCHIVER]: originalArchivePath [{0}], section already loaded [{1}]",
286// iarPath, iarPathExisting); 286// iarPath, iarPathExisting);
287 287
288 string iarPathToCreate = iarPath.Substring(iarPathExisting.Length); 288 string iarPathToCreate = iarPath.Substring(iarPathExisting.Length);
289 CreateFoldersForPath(destFolder, iarPathExisting, iarPathToCreate, resolvedFolders, loadedNodes); 289 CreateFoldersForPath(destFolder, iarPathExisting, iarPathToCreate, resolvedFolders, loadedNodes);
290 290
291 return destFolder; 291 return destFolder;
292 } 292 }
293 293
294 /// <summary> 294 /// <summary>
295 /// Resolve a destination folder 295 /// Resolve a destination folder
296 /// </summary> 296 /// </summary>
297 /// 297 ///
298 /// We require here a root destination folder (usually the root of the user's inventory) and the archive 298 /// We require here a root destination folder (usually the root of the user's inventory) and the archive
299 /// path. We also pass in a list of previously resolved folders in case we've found this one previously. 299 /// path. We also pass in a list of previously resolved folders in case we've found this one previously.
300 /// 300 ///
301 /// <param name="archivePath"> 301 /// <param name="archivePath">
302 /// The item archive path to resolve. The portion of the path passed back is that 302 /// The item archive path to resolve. The portion of the path passed back is that
303 /// which corresponds to the resolved desintation folder. 303 /// which corresponds to the resolved desintation folder.
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
321 while (archivePath.Length > 0) 321 while (archivePath.Length > 0)
322 { 322 {
323// m_log.DebugFormat("[INVENTORY ARCHIVER]: Trying to resolve destination folder {0}", archivePath); 323// m_log.DebugFormat("[INVENTORY ARCHIVER]: Trying to resolve destination folder {0}", archivePath);
324 324
325 if (resolvedFolders.ContainsKey(archivePath)) 325 if (resolvedFolders.ContainsKey(archivePath))
326 { 326 {
327// m_log.DebugFormat( 327// m_log.DebugFormat(
@@ -332,13 +332,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
332 { 332 {
333 if (m_merge) 333 if (m_merge)
334 { 334 {
335 // TODO: Using m_invPath is totally wrong - what we need to do is strip the uuid from the 335 // TODO: Using m_invPath is totally wrong - what we need to do is strip the uuid from the
336 // iar name and try to find that instead. 336 // iar name and try to find that instead.
337 string plainPath = ArchiveConstants.ExtractPlainPathFromIarPath(archivePath); 337 string plainPath = ArchiveConstants.ExtractPlainPathFromIarPath(archivePath);
338 List<InventoryFolderBase> folderCandidates 338 List<InventoryFolderBase> folderCandidates
339 = InventoryArchiveUtils.FindFoldersByPath( 339 = InventoryArchiveUtils.FindFoldersByPath(
340 m_InventoryService, m_userInfo.PrincipalID, plainPath); 340 m_InventoryService, m_userInfo.PrincipalID, plainPath);
341 341
342 if (folderCandidates.Count != 0) 342 if (folderCandidates.Count != 0)
343 { 343 {
344 InventoryFolderBase destFolder = folderCandidates[0]; 344 InventoryFolderBase destFolder = folderCandidates[0];
@@ -346,7 +346,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
346 return destFolder; 346 return destFolder;
347 } 347 }
348 } 348 }
349 349
350 // Don't include the last slash so find the penultimate one 350 // Don't include the last slash so find the penultimate one
351 int penultimateSlashIndex = archivePath.LastIndexOf("/", archivePath.Length - 2); 351 int penultimateSlashIndex = archivePath.LastIndexOf("/", archivePath.Length - 2);
352 352
@@ -365,10 +365,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
365 } 365 }
366 } 366 }
367 } 367 }
368 368
369 return rootDestFolder; 369 return rootDestFolder;
370 } 370 }
371 371
372 /// <summary> 372 /// <summary>
373 /// Create a set of folders for the given path. 373 /// Create a set of folders for the given path.
374 /// </summary> 374 /// </summary>
@@ -388,10 +388,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
388 /// Track the inventory nodes created. 388 /// Track the inventory nodes created.
389 /// </param> 389 /// </param>
390 protected void CreateFoldersForPath( 390 protected void CreateFoldersForPath(
391 InventoryFolderBase destFolder, 391 InventoryFolderBase destFolder,
392 string iarPathExisting, 392 string iarPathExisting,
393 string iarPathToReplicate, 393 string iarPathToReplicate,
394 Dictionary <string, InventoryFolderBase> resolvedFolders, 394 Dictionary <string, InventoryFolderBase> resolvedFolders,
395 HashSet<InventoryNodeBase> loadedNodes) 395 HashSet<InventoryNodeBase> loadedNodes)
396 { 396 {
397 string[] rawDirsToCreate = iarPathToReplicate.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); 397 string[] rawDirsToCreate = iarPathToReplicate.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
@@ -402,7 +402,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
402 402
403 if (!rawDirsToCreate[i].Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) 403 if (!rawDirsToCreate[i].Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR))
404 continue; 404 continue;
405 405
406 int identicalNameIdentifierIndex 406 int identicalNameIdentifierIndex
407 = rawDirsToCreate[i].LastIndexOf( 407 = rawDirsToCreate[i].LastIndexOf(
408 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); 408 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR);
@@ -412,7 +412,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
412 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); 412 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName);
413 UUID newFolderId = UUID.Random(); 413 UUID newFolderId = UUID.Random();
414 414
415 destFolder 415 destFolder
416 = new InventoryFolderBase( 416 = new InventoryFolderBase(
417 newFolderId, newFolderName, m_userInfo.PrincipalID, 417 newFolderId, newFolderName, m_userInfo.PrincipalID,
418 (short)FolderType.None, destFolder.ID, 1); 418 (short)FolderType.None, destFolder.ID, 1);
@@ -427,7 +427,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
427 loadedNodes.Add(destFolder); 427 loadedNodes.Add(destFolder);
428 } 428 }
429 } 429 }
430 430
431 /// <summary> 431 /// <summary>
432 /// Load an item from the archive 432 /// Load an item from the archive
433 /// </summary> 433 /// </summary>
@@ -438,7 +438,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
438 protected InventoryItemBase LoadItem(byte[] data, InventoryFolderBase loadFolder) 438 protected InventoryItemBase LoadItem(byte[] data, InventoryFolderBase loadFolder)
439 { 439 {
440 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data); 440 InventoryItemBase item = UserInventoryItemSerializer.Deserialize(data);
441 441
442 // Don't use the item ID that's in the file 442 // Don't use the item ID that's in the file
443 item.ID = UUID.Random(); 443 item.ID = UUID.Random();
444 444
@@ -446,7 +446,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
446 if (UUID.Zero != ospResolvedId) // The user exists in this grid 446 if (UUID.Zero != ospResolvedId) // The user exists in this grid
447 { 447 {
448// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId); 448// m_log.DebugFormat("[INVENTORY ARCHIVER]: Found creator {0} via OSPA resolution", ospResolvedId);
449 449
450// item.CreatorIdAsUuid = ospResolvedId; 450// item.CreatorIdAsUuid = ospResolvedId;
451 451
452 // Don't preserve the OSPA in the creator id (which actually gets persisted to the 452 // Don't preserve the OSPA in the creator id (which actually gets persisted to the
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
474 474
475 if (!m_InventoryService.AddItem(item)) 475 if (!m_InventoryService.AddItem(item))
476 m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}", item.Name, item.Folder); 476 m_log.WarnFormat("[INVENTORY ARCHIVER]: Unable to save item {0} in folder {1}", item.Name, item.Folder);
477 477
478 return item; 478 return item;
479 } 479 }
480 480
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
519 data = SceneObjectSerializer.ModifySerializedObject(assetId, data, 519 data = SceneObjectSerializer.ModifySerializedObject(assetId, data,
520 sog => { 520 sog => {
521 bool modified = false; 521 bool modified = false;
522 522
523 foreach (SceneObjectPart sop in sog.Parts) 523 foreach (SceneObjectPart sop in sog.Parts)
524 { 524 {
525 if (string.IsNullOrEmpty(sop.CreatorData)) 525 if (string.IsNullOrEmpty(sop.CreatorData))
@@ -528,10 +528,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
528 modified = true; 528 modified = true;
529 } 529 }
530 } 530 }
531 531
532 return modified; 532 return modified;
533 }); 533 });
534 534
535 if (data == null) 535 if (data == null)
536 return false; 536 return false;
537 } 537 }
@@ -568,7 +568,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
568 int majorVersion = int.Parse(archiveElement.Attribute("major_version").Value); 568 int majorVersion = int.Parse(archiveElement.Attribute("major_version").Value);
569 int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value); 569 int minorVersion = int.Parse(archiveElement.Attribute("minor_version").Value);
570 string version = string.Format("{0}.{1}", majorVersion, minorVersion); 570 string version = string.Format("{0}.{1}", majorVersion, minorVersion);
571 571
572 if (majorVersion > MAX_MAJOR_VERSION) 572 if (majorVersion > MAX_MAJOR_VERSION)
573 { 573 {
574 throw new Exception( 574 throw new Exception(
@@ -576,38 +576,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
576 "The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below", 576 "The IAR you are trying to load has major version number of {0} but this version of OpenSim can only load IARs with major version number {1} and below",
577 majorVersion, MAX_MAJOR_VERSION)); 577 majorVersion, MAX_MAJOR_VERSION));
578 } 578 }
579 579
580 ControlFileLoaded = true; 580 ControlFileLoaded = true;
581 m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version); 581 m_log.InfoFormat("[INVENTORY ARCHIVER]: Loading IAR with version {0}", version);
582 } 582 }
583 583
584 /// <summary> 584 /// <summary>
585 /// Load inventory file 585 /// Load inventory file
586 /// </summary> 586 /// </summary>
587 /// <param name="path"></param> 587 /// <param name="path"></param>
588 /// <param name="entryType"></param> 588 /// <param name="entryType"></param>
589 /// <param name="data"></param> 589 /// <param name="data"></param>
590 protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data) 590 protected void LoadInventoryFile(string path, TarArchiveReader.TarEntryType entryType, byte[] data)
591 { 591 {
592 if (!ControlFileLoaded) 592 if (!ControlFileLoaded)
593 throw new Exception( 593 throw new Exception(
594 string.Format( 594 string.Format(
595 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 595 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
596 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH)); 596 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.INVENTORY_PATH));
597 597
598 if (m_assetsLoaded) 598 if (m_assetsLoaded)
599 throw new Exception( 599 throw new Exception(
600 string.Format( 600 string.Format(
601 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 601 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
602 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH)); 602 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
603 603
604 path = path.Substring(ArchiveConstants.INVENTORY_PATH.Length); 604 path = path.Substring(ArchiveConstants.INVENTORY_PATH.Length);
605 605
606 // Trim off the file portion if we aren't already dealing with a directory path 606 // Trim off the file portion if we aren't already dealing with a directory path
607 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) 607 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType)
608 path = path.Remove(path.LastIndexOf("/") + 1); 608 path = path.Remove(path.LastIndexOf("/") + 1);
609 609
610 InventoryFolderBase foundFolder 610 InventoryFolderBase foundFolder
611 = ReplicateArchivePathToUserInventory( 611 = ReplicateArchivePathToUserInventory(
612 path, m_rootDestinationFolder, m_resolvedFolders, m_loadedNodes); 612 path, m_rootDestinationFolder, m_resolvedFolders, m_loadedNodes);
613 613
@@ -618,17 +618,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
618 if (item != null) 618 if (item != null)
619 { 619 {
620 m_successfulItemRestores++; 620 m_successfulItemRestores++;
621 621
622 // If we aren't loading the folder containing the item then well need to update the 622 // If we aren't loading the folder containing the item then well need to update the
623 // viewer separately for that item. 623 // viewer separately for that item.
624 if (!m_loadedNodes.Contains(foundFolder)) 624 if (!m_loadedNodes.Contains(foundFolder))
625 m_loadedNodes.Add(item); 625 m_loadedNodes.Add(item);
626 } 626 }
627 } 627 }
628 628
629 m_inventoryNodesLoaded = true; 629 m_inventoryNodesLoaded = true;
630 } 630 }
631 631
632 /// <summary> 632 /// <summary>
633 /// Load asset file 633 /// Load asset file
634 /// </summary> 634 /// </summary>
@@ -639,15 +639,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
639 if (!ControlFileLoaded) 639 if (!ControlFileLoaded)
640 throw new Exception( 640 throw new Exception(
641 string.Format( 641 string.Format(
642 "The IAR you are trying to load does not list {0} before {1}. Aborting load", 642 "The IAR you are trying to load does not list {0} before {1}. Aborting load",
643 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH)); 643 ArchiveConstants.CONTROL_FILE_PATH, ArchiveConstants.ASSETS_PATH));
644 644
645 if (!m_inventoryNodesLoaded) 645 if (!m_inventoryNodesLoaded)
646 throw new Exception( 646 throw new Exception(
647 string.Format( 647 string.Format(
648 "The IAR you are trying to load does not list all {0} before {1}. Aborting load", 648 "The IAR you are trying to load does not list all {0} before {1}. Aborting load",
649 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH)); 649 ArchiveConstants.INVENTORY_PATH, ArchiveConstants.ASSETS_PATH));
650 650
651 if (LoadAsset(path, data)) 651 if (LoadAsset(path, data))
652 m_successfulAssetRestores++; 652 m_successfulAssetRestores++;
653 else 653 else
@@ -655,10 +655,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
655 655
656 if ((m_successfulAssetRestores) % 50 == 0) 656 if ((m_successfulAssetRestores) % 50 == 0)
657 m_log.DebugFormat( 657 m_log.DebugFormat(
658 "[INVENTORY ARCHIVER]: Loaded {0} assets...", 658 "[INVENTORY ARCHIVER]: Loaded {0} assets...",
659 m_successfulAssetRestores); 659 m_successfulAssetRestores);
660 660
661 m_assetsLoaded = true; 661 m_assetsLoaded = true;
662 } 662 }
663 } 663 }
664} 664}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
index dbaf2aa..b66aad5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
69 /// The path to the required folder. 69 /// The path to the required folder.
70 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 70 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
71 /// </param> 71 /// </param>
72 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an 72 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an
73 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns> 73 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns>
74 public static InventoryFolderBase FindFolderByPath( 74 public static InventoryFolderBase FindFolderByPath(
75 IInventoryService inventoryService, UUID userId, string path) 75 IInventoryService inventoryService, UUID userId, string path)
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
102 /// The path to the required folder. 102 /// The path to the required folder.
103 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 103 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
104 /// </param> 104 /// </param>
105 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an 105 /// <returns>The folder found. Please note that if there are multiple folders with the same name then an
106 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns> 106 /// unspecified one will be returned. If no such folder eixsts then null is returned</returns>
107 public static InventoryFolderBase FindFolderByPath( 107 public static InventoryFolderBase FindFolderByPath(
108 IInventoryService inventoryService, InventoryFolderBase startFolder, string path) 108 IInventoryService inventoryService, InventoryFolderBase startFolder, string path)
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
149 149
150 return FindFoldersByPath(inventoryService, rootFolder, path); 150 return FindFoldersByPath(inventoryService, rootFolder, path);
151 } 151 }
152 152
153 /// <summary> 153 /// <summary>
154 /// Find a set of folders given a PATH_DELIMITER delimited path starting from this folder 154 /// Find a set of folders given a PATH_DELIMITER delimited path starting from this folder
155 /// </summary> 155 /// </summary>
@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
175 IInventoryService inventoryService, InventoryFolderBase startFolder, string path) 175 IInventoryService inventoryService, InventoryFolderBase startFolder, string path)
176 { 176 {
177 List<InventoryFolderBase> foundFolders = new List<InventoryFolderBase>(); 177 List<InventoryFolderBase> foundFolders = new List<InventoryFolderBase>();
178 178
179 if (path == string.Empty) 179 if (path == string.Empty)
180 { 180 {
181 foundFolders.Add(startFolder); 181 foundFolders.Add(startFolder);
@@ -189,17 +189,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
189 foundFolders.Add(startFolder); 189 foundFolders.Add(startFolder);
190 return foundFolders; 190 return foundFolders;
191 } 191 }
192 192
193 // If the path isn't just / then trim any starting extraneous slashes 193 // If the path isn't just / then trim any starting extraneous slashes
194 path = path.TrimStart(new char[] { PATH_DELIMITER }); 194 path = path.TrimStart(new char[] { PATH_DELIMITER });
195 195
196// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Adjusted path in FindFolderByPath() is [{0}]", path); 196// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Adjusted path in FindFolderByPath() is [{0}]", path);
197 197
198 string[] components = SplitEscapedPath(path); 198 string[] components = SplitEscapedPath(path);
199 components[0] = UnescapePath(components[0]); 199 components[0] = UnescapePath(components[0]);
200 200
201 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None); 201 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None);
202 202
203 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID); 203 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID);
204 204
205// m_log.DebugFormat( 205// m_log.DebugFormat(
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
230 /// 230 ///
231 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 231 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
232 /// </remarks> 232 /// </remarks>
233 /// 233 ///
234 /// <param name="inventoryService"> 234 /// <param name="inventoryService">
235 /// Inventory service to query 235 /// Inventory service to query
236 /// </param> 236 /// </param>
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
301 /// 301 ///
302 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 302 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
303 /// </remarks> 303 /// </remarks>
304 /// 304 ///
305 /// <param name="inventoryService">Inventory service to query</param> 305 /// <param name="inventoryService">Inventory service to query</param>
306 /// <param name="startFolder">The folder from which the path starts</param> 306 /// <param name="startFolder">The folder from which the path starts</param>
307 /// <param name="path">The path to the required item.</param> 307 /// <param name="path">The path to the required item.</param>
@@ -313,10 +313,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
313 313
314 // If the path isn't just / then trim any starting extraneous slashes 314 // If the path isn't just / then trim any starting extraneous slashes
315 path = path.TrimStart(new char[] { PATH_DELIMITER }); 315 path = path.TrimStart(new char[] { PATH_DELIMITER });
316 316
317 string[] components = SplitEscapedPath(path); 317 string[] components = SplitEscapedPath(path);
318 components[0] = UnescapePath(components[0]); 318 components[0] = UnescapePath(components[0]);
319 319
320 //string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); 320 //string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None);
321 321
322 if (components.Length == 1) 322 if (components.Length == 1)
@@ -324,15 +324,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}", 325// "FOUND SINGLE COMPONENT [{0}]. Looking for this in [{1}] {2}",
326// components[0], startFolder.Name, startFolder.ID); 326// components[0], startFolder.Name, startFolder.ID);
327 327
328 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID); 328 List<InventoryItemBase> items = inventoryService.GetFolderItems(startFolder.Owner, startFolder.ID);
329 329
330// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count); 330// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Found {0} items in FindItemByPath()", items.Count);
331 331
332 foreach (InventoryItemBase item in items) 332 foreach (InventoryItemBase item in items)
333 { 333 {
334// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Inspecting item {0} {1}", item.Name, item.ID); 334// m_log.DebugFormat("[INVENTORY ARCHIVE UTILS]: Inspecting item {0} {1}", item.Name, item.ID);
335 335
336 if (item.Name == components[0]) 336 if (item.Name == components[0])
337 foundItems.Add(item); 337 foundItems.Add(item);
338 } 338 }
@@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
342// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]); 342// m_log.DebugFormat("FOUND COMPONENTS [{0}] and [{1}]", components[0], components[1]);
343 343
344 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID); 344 InventoryCollection contents = inventoryService.GetFolderContent(startFolder.Owner, startFolder.ID);
345 345
346 foreach (InventoryFolderBase folder in contents.Folders) 346 foreach (InventoryFolderBase folder in contents.Folders)
347 { 347 {
348 if (folder.Name == components[0]) 348 if (folder.Name == components[0])
@@ -365,9 +365,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
365 public static string[] SplitEscapedPath(string path) 365 public static string[] SplitEscapedPath(string path)
366 { 366 {
367// m_log.DebugFormat("SPLITTING PATH {0}", path); 367// m_log.DebugFormat("SPLITTING PATH {0}", path);
368 368
369 bool singleEscapeChar = false; 369 bool singleEscapeChar = false;
370 370
371 for (int i = 0; i < path.Length; i++) 371 for (int i = 0; i < path.Length; i++)
372 { 372 {
373 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar) 373 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
@@ -395,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
395 public static string UnescapePath(string path) 395 public static string UnescapePath(string path)
396 { 396 {
397// m_log.DebugFormat("ESCAPING PATH {0}", path); 397// m_log.DebugFormat("ESCAPING PATH {0}", path);
398 398
399 StringBuilder sb = new StringBuilder(); 399 StringBuilder sb = new StringBuilder();
400 400
401 bool singleEscapeChar = false; 401 bool singleEscapeChar = false;
@@ -418,7 +418,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
418 } 418 }
419 419
420// m_log.DebugFormat("ESCAPED PATH TO {0}", sb); 420// m_log.DebugFormat("ESCAPED PATH TO {0}", sb);
421 421
422 return sb.ToString(); 422 return sb.ToString();
423 } 423 }
424 424
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index 8847414..be59eb5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -172,7 +172,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
172 172
173 public string Name { get { return "Inventory Archiver Module"; } } 173 public string Name { get { return "Inventory Archiver Module"; } }
174 174
175 #endregion 175 #endregion
176 176
177 /// <summary> 177 /// <summary>
178 /// Trigger the inventory archive saved event. 178 /// Trigger the inventory archive saved event.
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
index c2e645f..f559c2e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadPathTests.cs
@@ -56,23 +56,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
56 { 56 {
57 TestHelpers.InMethod(); 57 TestHelpers.InMethod();
58// log4net.Config.XmlConfigurator.Configure(); 58// log4net.Config.XmlConfigurator.Configure();
59 59
60 SerialiserModule serialiserModule = new SerialiserModule(); 60 SerialiserModule serialiserModule = new SerialiserModule();
61 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 61 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
62 62
63 // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene 63 // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
64 Scene scene = new SceneHelpers().SetupScene(); 64 Scene scene = new SceneHelpers().SetupScene();
65 65
66 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 66 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
67 67
68 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "meowfood"); 68 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "meowfood");
69 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 69 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
70 70
71 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 71 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
72 InventoryItemBase foundItem1 72 InventoryItemBase foundItem1
73 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 73 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
74 74
75 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 75 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
76 76
77 // Now try loading to a root child folder 77 // Now try loading to a root child folder
78 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA", false); 78 UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, m_uaMT.PrincipalID, "xA", false);
@@ -90,9 +90,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
90 90
91 InventoryItemBase foundItem3 91 InventoryItemBase foundItem3
92 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC/" + m_item1Name); 92 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, m_uaMT.PrincipalID, "xB/xC/" + m_item1Name);
93 Assert.That(foundItem3, Is.Not.Null, "Didn't find loaded item 3"); 93 Assert.That(foundItem3, Is.Not.Null, "Didn't find loaded item 3");
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Test that things work when the load path specified starts with a slash 97 /// Test that things work when the load path specified starts with a slash
98 /// </summary> 98 /// </summary>
@@ -101,22 +101,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
101 { 101 {
102 TestHelpers.InMethod(); 102 TestHelpers.InMethod();
103// log4net.Config.XmlConfigurator.Configure(); 103// log4net.Config.XmlConfigurator.Configure();
104 104
105 SerialiserModule serialiserModule = new SerialiserModule(); 105 SerialiserModule serialiserModule = new SerialiserModule();
106 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 106 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
107 Scene scene = new SceneHelpers().SetupScene(); 107 Scene scene = new SceneHelpers().SetupScene();
108 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); 108 SceneHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
109 109
110 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password"); 110 UserAccountHelpers.CreateUserWithInventory(scene, m_uaMT, "password");
111 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream); 111 archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/Objects", "password", m_iarStream);
112 112
113 InventoryItemBase foundItem1 113 InventoryItemBase foundItem1
114 = InventoryArchiveUtils.FindItemByPath( 114 = InventoryArchiveUtils.FindItemByPath(
115 scene.InventoryService, m_uaMT.PrincipalID, "/Objects/" + m_item1Name); 115 scene.InventoryService, m_uaMT.PrincipalID, "/Objects/" + m_item1Name);
116 116
117 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); 117 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()");
118 } 118 }
119 119
120 [Test] 120 [Test]
121 public void TestLoadIarPathWithEscapedChars() 121 public void TestLoadIarPathWithEscapedChars()
122 { 122 {
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
137 string userLastName = "Stirrup"; 137 string userLastName = "Stirrup";
138 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 138 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
139 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); 139 UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood");
140 140
141 // Create asset 141 // Create asset
142 SceneObjectGroup object1; 142 SceneObjectGroup object1;
143 SceneObjectPart part1; 143 SceneObjectPart part1;
@@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
168 item1.Name = itemName; 168 item1.Name = itemName;
169 item1.AssetID = asset1.FullID; 169 item1.AssetID = asset1.FullID;
170 item1.ID = item1Id; 170 item1.ID = item1Id;
171 InventoryFolderBase objsFolder 171 InventoryFolderBase objsFolder
172 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, "Objects")[0]; 172 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, "Objects")[0];
173 item1.Folder = objsFolder.ID; 173 item1.Folder = objsFolder.ID;
174 scene.AddInventoryItem(item1); 174 scene.AddInventoryItem(item1);
@@ -189,16 +189,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
189 InventoryItemBase foundItem1 189 InventoryItemBase foundItem1
190 = InventoryArchiveUtils.FindItemByPath( 190 = InventoryArchiveUtils.FindItemByPath(
191 scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName); 191 scene.InventoryService, userId, "Scripts/Objects/" + humanEscapedItemName);
192 192
193 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 193 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
194// Assert.That( 194// Assert.That(
195// foundItem1.CreatorId, Is.EqualTo(userUuid), 195// foundItem1.CreatorId, Is.EqualTo(userUuid),
196// "Loaded item non-uuid creator doesn't match that of the loading user"); 196// "Loaded item non-uuid creator doesn't match that of the loading user");
197 Assert.That( 197 Assert.That(
198 foundItem1.Name, Is.EqualTo(itemName), 198 foundItem1.Name, Is.EqualTo(itemName),
199 "Loaded item name doesn't match saved name"); 199 "Loaded item name doesn't match saved name");
200 } 200 }
201 201
202 /// <summary> 202 /// <summary>
203 /// Test replication of an archive path to the user's inventory. 203 /// Test replication of an archive path to the user's inventory.
204 /// </summary> 204 /// </summary>
@@ -207,21 +207,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
207 { 207 {
208 TestHelpers.InMethod(); 208 TestHelpers.InMethod();
209// log4net.Config.XmlConfigurator.Configure(); 209// log4net.Config.XmlConfigurator.Configure();
210 210
211 Scene scene = new SceneHelpers().SetupScene(); 211 Scene scene = new SceneHelpers().SetupScene();
212 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 212 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
213 213
214 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>(); 214 Dictionary <string, InventoryFolderBase> foldersCreated = new Dictionary<string, InventoryFolderBase>();
215 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>(); 215 HashSet<InventoryNodeBase> nodesLoaded = new HashSet<InventoryNodeBase>();
216 216
217 string folder1Name = "1"; 217 string folder1Name = "1";
218 string folder2aName = "2a"; 218 string folder2aName = "2a";
219 string folder2bName = "2b"; 219 string folder2bName = "2b";
220 220
221 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random()); 221 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1Name, UUID.Random());
222 string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); 222 string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random());
223 string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); 223 string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random());
224 224
225 string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); 225 string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName });
226 string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); 226 string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName });
227 227
@@ -229,42 +229,42 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
229 // Test replication of path1 229 // Test replication of path1
230 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 230 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
231 .ReplicateArchivePathToUserInventory( 231 .ReplicateArchivePathToUserInventory(
232 iarPath1, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 232 iarPath1, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
233 foldersCreated, nodesLoaded); 233 foldersCreated, nodesLoaded);
234 234
235 List<InventoryFolderBase> folder1Candidates 235 List<InventoryFolderBase> folder1Candidates
236 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); 236 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
237 Assert.That(folder1Candidates.Count, Is.EqualTo(1)); 237 Assert.That(folder1Candidates.Count, Is.EqualTo(1));
238 238
239 InventoryFolderBase folder1 = folder1Candidates[0]; 239 InventoryFolderBase folder1 = folder1Candidates[0];
240 List<InventoryFolderBase> folder2aCandidates 240 List<InventoryFolderBase> folder2aCandidates
241 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName); 241 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName);
242 Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); 242 Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
243 } 243 }
244 244
245 { 245 {
246 // Test replication of path2 246 // Test replication of path2
247 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 247 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
248 .ReplicateArchivePathToUserInventory( 248 .ReplicateArchivePathToUserInventory(
249 iarPath2, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 249 iarPath2, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
250 foldersCreated, nodesLoaded); 250 foldersCreated, nodesLoaded);
251 251
252 List<InventoryFolderBase> folder1Candidates 252 List<InventoryFolderBase> folder1Candidates
253 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); 253 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1Name);
254 Assert.That(folder1Candidates.Count, Is.EqualTo(1)); 254 Assert.That(folder1Candidates.Count, Is.EqualTo(1));
255 255
256 InventoryFolderBase folder1 = folder1Candidates[0]; 256 InventoryFolderBase folder1 = folder1Candidates[0];
257 257
258 List<InventoryFolderBase> folder2aCandidates 258 List<InventoryFolderBase> folder2aCandidates
259 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName); 259 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2aName);
260 Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); 260 Assert.That(folder2aCandidates.Count, Is.EqualTo(1));
261 261
262 List<InventoryFolderBase> folder2bCandidates 262 List<InventoryFolderBase> folder2bCandidates
263 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2bName); 263 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1, folder2bName);
264 Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); 264 Assert.That(folder2bCandidates.Count, Is.EqualTo(1));
265 } 265 }
266 } 266 }
267 267
268 /// <summary> 268 /// <summary>
269 /// Test replication of a partly existing archive path to the user's inventory. This should create 269 /// Test replication of a partly existing archive path to the user's inventory. This should create
270 /// a duplicate path without the merge option. 270 /// a duplicate path without the merge option.
@@ -274,31 +274,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
274 { 274 {
275 TestHelpers.InMethod(); 275 TestHelpers.InMethod();
276 //log4net.Config.XmlConfigurator.Configure(); 276 //log4net.Config.XmlConfigurator.Configure();
277 277
278 Scene scene = new SceneHelpers().SetupScene(); 278 Scene scene = new SceneHelpers().SetupScene();
279 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 279 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
280 280
281 string folder1ExistingName = "a"; 281 string folder1ExistingName = "a";
282 string folder2Name = "b"; 282 string folder2Name = "b";
283 283
284 InventoryFolderBase folder1 284 InventoryFolderBase folder1
285 = UserInventoryHelpers.CreateInventoryFolder( 285 = UserInventoryHelpers.CreateInventoryFolder(
286 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false); 286 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false);
287 287
288 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 288 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
289 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); 289 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
290 290
291 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName }); 291 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName });
292 292
293 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false) 293 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, null, (Stream)null, false)
294 .ReplicateArchivePathToUserInventory( 294 .ReplicateArchivePathToUserInventory(
295 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 295 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
296 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>()); 296 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>());
297 297
298 List<InventoryFolderBase> folder1PostCandidates 298 List<InventoryFolderBase> folder1PostCandidates
299 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 299 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
300 Assert.That(folder1PostCandidates.Count, Is.EqualTo(2)); 300 Assert.That(folder1PostCandidates.Count, Is.EqualTo(2));
301 301
302 // FIXME: Temporarily, we're going to do something messy to make sure we pick up the created folder. 302 // FIXME: Temporarily, we're going to do something messy to make sure we pick up the created folder.
303 InventoryFolderBase folder1Post = null; 303 InventoryFolderBase folder1Post = null;
304 foreach (InventoryFolderBase folder in folder1PostCandidates) 304 foreach (InventoryFolderBase folder in folder1PostCandidates)
@@ -311,11 +311,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
311 } 311 }
312// Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); 312// Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID));
313 313
314 List<InventoryFolderBase> folder2PostCandidates 314 List<InventoryFolderBase> folder2PostCandidates
315 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1Post, "b"); 315 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1Post, "b");
316 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); 316 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
317 } 317 }
318 318
319 /// <summary> 319 /// <summary>
320 /// Test replication of a partly existing archive path to the user's inventory. This should create 320 /// Test replication of a partly existing archive path to the user's inventory. This should create
321 /// a merged path. 321 /// a merged path.
@@ -325,33 +325,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
325 { 325 {
326 TestHelpers.InMethod(); 326 TestHelpers.InMethod();
327// log4net.Config.XmlConfigurator.Configure(); 327// log4net.Config.XmlConfigurator.Configure();
328 328
329 Scene scene = new SceneHelpers().SetupScene(); 329 Scene scene = new SceneHelpers().SetupScene();
330 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene); 330 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene);
331 331
332 string folder1ExistingName = "a"; 332 string folder1ExistingName = "a";
333 string folder2Name = "b"; 333 string folder2Name = "b";
334 334
335 InventoryFolderBase folder1 335 InventoryFolderBase folder1
336 = UserInventoryHelpers.CreateInventoryFolder( 336 = UserInventoryHelpers.CreateInventoryFolder(
337 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false); 337 scene.InventoryService, ua1.PrincipalID, folder1ExistingName, false);
338 338
339 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); 339 string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random());
340 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); 340 string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random());
341 341
342 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName }); 342 string itemArchivePath = string.Join("", new string[] { folder1ArchiveName, folder2ArchiveName });
343 343
344 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, folder1ExistingName, (Stream)null, true) 344 new InventoryArchiveReadRequest(UUID.Random(), null, scene.InventoryService, scene.AssetService, scene.UserAccountService, ua1, folder1ExistingName, (Stream)null, true)
345 .ReplicateArchivePathToUserInventory( 345 .ReplicateArchivePathToUserInventory(
346 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), 346 itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID),
347 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>()); 347 new Dictionary<string, InventoryFolderBase>(), new HashSet<InventoryNodeBase>());
348 348
349 List<InventoryFolderBase> folder1PostCandidates 349 List<InventoryFolderBase> folder1PostCandidates
350 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); 350 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName);
351 Assert.That(folder1PostCandidates.Count, Is.EqualTo(1)); 351 Assert.That(folder1PostCandidates.Count, Is.EqualTo(1));
352 Assert.That(folder1PostCandidates[0].ID, Is.EqualTo(folder1.ID)); 352 Assert.That(folder1PostCandidates[0].ID, Is.EqualTo(folder1.ID));
353 353
354 List<InventoryFolderBase> folder2PostCandidates 354 List<InventoryFolderBase> folder2PostCandidates
355 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1PostCandidates[0], "b"); 355 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, folder1PostCandidates[0], "b");
356 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); 356 Assert.That(folder2PostCandidates.Count, Is.EqualTo(1));
357 } 357 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
index 57b4f80..d0bdc91 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveLoadTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
47{ 47{
48 [TestFixture] 48 [TestFixture]
49 public class InventoryArchiveLoadTests : InventoryArchiveTestCase 49 public class InventoryArchiveLoadTests : InventoryArchiveTestCase
50 { 50 {
51 protected TestScene m_scene; 51 protected TestScene m_scene;
52 protected InventoryArchiverModule m_archiverModule; 52 protected InventoryArchiverModule m_archiverModule;
53 53
@@ -55,12 +55,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
55 public override void SetUp() 55 public override void SetUp()
56 { 56 {
57 base.SetUp(); 57 base.SetUp();
58 58
59 SerialiserModule serialiserModule = new SerialiserModule(); 59 SerialiserModule serialiserModule = new SerialiserModule();
60 m_archiverModule = new InventoryArchiverModule(); 60 m_archiverModule = new InventoryArchiverModule();
61 61
62 m_scene = new SceneHelpers().SetupScene(); 62 m_scene = new SceneHelpers().SetupScene();
63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); 63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule);
64 } 64 }
65 65
66 [Test] 66 [Test]
@@ -68,35 +68,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
68 { 68 {
69 TestHelpers.InMethod(); 69 TestHelpers.InMethod();
70// TestHelpers.EnableLogging(); 70// TestHelpers.EnableLogging();
71 71
72 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password"); 72 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "password");
73 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream); 73 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "password", m_iarStream);
74 74
75 InventoryItemBase coaItem 75 InventoryItemBase coaItem
76 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName); 76 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_coaItemName);
77 77
78 Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1"); 78 Assert.That(coaItem, Is.Not.Null, "Didn't find loaded item 1");
79 79
80 string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID); 80 string assetXml = AssetHelpers.ReadAssetAsString(m_scene.AssetService, coaItem.AssetID);
81 81
82 CoalescedSceneObjects coa; 82 CoalescedSceneObjects coa;
83 bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa); 83 bool readResult = CoalescedSceneObjectsSerializer.TryFromXml(assetXml, out coa);
84 84
85 Assert.That(readResult, Is.True); 85 Assert.That(readResult, Is.True);
86 Assert.That(coa.Count, Is.EqualTo(2)); 86 Assert.That(coa.Count, Is.EqualTo(2));
87 87
88 List<SceneObjectGroup> coaObjects = coa.Objects; 88 List<SceneObjectGroup> coaObjects = coa.Objects;
89 Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120"))); 89 Assert.That(coaObjects[0].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000120")));
90 Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45))); 90 Assert.That(coaObjects[0].AbsolutePosition, Is.EqualTo(new Vector3(15, 30, 45)));
91 91
92 Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140"))); 92 Assert.That(coaObjects[1].UUID, Is.EqualTo(UUID.Parse("00000000-0000-0000-0000-000000000140")));
93 Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75))); 93 Assert.That(coaObjects[1].AbsolutePosition, Is.EqualTo(new Vector3(25, 50, 75)));
94 } 94 }
95 95
96 /// <summary> 96 /// <summary>
97 /// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized 97 /// Test case where a creator account exists for the creator UUID embedded in item metadata and serialized
98 /// objects. 98 /// objects.
99 /// </summary> 99 /// </summary>
100 [Test] 100 [Test]
101 public void TestLoadIarCreatorAccountPresent() 101 public void TestLoadIarCreatorAccountPresent()
102 { 102 {
@@ -105,26 +105,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
105 105
106 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood"); 106 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL1, "meowfood");
107 107
108 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream); 108 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/", "meowfood", m_iarStream);
109 InventoryItemBase foundItem1 109 InventoryItemBase foundItem1
110 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name); 110 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaLL1.PrincipalID, m_item1Name);
111 111
112 Assert.That( 112 Assert.That(
113 foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()), 113 foundItem1.CreatorId, Is.EqualTo(m_uaLL1.PrincipalID.ToString()),
114 "Loaded item non-uuid creator doesn't match original"); 114 "Loaded item non-uuid creator doesn't match original");
115 Assert.That( 115 Assert.That(
116 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID), 116 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL1.PrincipalID),
117 "Loaded item uuid creator doesn't match original"); 117 "Loaded item uuid creator doesn't match original");
118 Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID), 118 Assert.That(foundItem1.Owner, Is.EqualTo(m_uaLL1.PrincipalID),
119 "Loaded item owner doesn't match inventory reciever"); 119 "Loaded item owner doesn't match inventory reciever");
120 120
121 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 121 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
122 string xmlData = Utils.BytesToString(asset1.Data); 122 string xmlData = Utils.BytesToString(asset1.Data);
123 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 123 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
124 124
125 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID)); 125 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL1.PrincipalID));
126 } 126 }
127 127
128// /// <summary> 128// /// <summary>
129// /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where 129// /// Test loading a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet) where
130// /// an account exists with the same name as the creator, though not the same id. 130// /// an account exists with the same name as the creator, though not the same id.
@@ -137,24 +137,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
137// 137//
138// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "meowfood"); 138// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "meowfood");
139// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire"); 139// UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaLL2, "hampshire");
140// 140//
141// m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream); 141// m_archiverModule.DearchiveInventory(m_uaMT.FirstName, m_uaMT.LastName, "/", "meowfood", m_iarStream);
142// InventoryItemBase foundItem1 142// InventoryItemBase foundItem1
143// = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 143// = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
144// 144//
145// Assert.That( 145// Assert.That(
146// foundItem1.CreatorId, Is.EqualTo(m_uaLL2.PrincipalID.ToString()), 146// foundItem1.CreatorId, Is.EqualTo(m_uaLL2.PrincipalID.ToString()),
147// "Loaded item non-uuid creator doesn't match original"); 147// "Loaded item non-uuid creator doesn't match original");
148// Assert.That( 148// Assert.That(
149// foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL2.PrincipalID), 149// foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaLL2.PrincipalID),
150// "Loaded item uuid creator doesn't match original"); 150// "Loaded item uuid creator doesn't match original");
151// Assert.That(foundItem1.Owner, Is.EqualTo(m_uaMT.PrincipalID), 151// Assert.That(foundItem1.Owner, Is.EqualTo(m_uaMT.PrincipalID),
152// "Loaded item owner doesn't match inventory reciever"); 152// "Loaded item owner doesn't match inventory reciever");
153// 153//
154// AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 154// AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
155// string xmlData = Utils.BytesToString(asset1.Data); 155// string xmlData = Utils.BytesToString(asset1.Data);
156// SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 156// SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
157// 157//
158// Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL2.PrincipalID)); 158// Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaLL2.PrincipalID));
159// } 159// }
160 160
@@ -167,26 +167,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
167 { 167 {
168 TestHelpers.InMethod(); 168 TestHelpers.InMethod();
169// log4net.Config.XmlConfigurator.Configure(); 169// log4net.Config.XmlConfigurator.Configure();
170 170
171 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "password"); 171 UserAccountHelpers.CreateUserWithInventory(m_scene, m_uaMT, "password");
172 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream); 172 m_archiverModule.DearchiveInventory(UUID.Random(), m_uaMT.FirstName, m_uaMT.LastName, "/", "password", m_iarStream);
173 173
174 InventoryItemBase foundItem1 174 InventoryItemBase foundItem1
175 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name); 175 = InventoryArchiveUtils.FindItemByPath(m_scene.InventoryService, m_uaMT.PrincipalID, m_item1Name);
176 176
177 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); 177 Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1");
178 Assert.That( 178 Assert.That(
179 foundItem1.CreatorId, Is.EqualTo(m_uaMT.PrincipalID.ToString()), 179 foundItem1.CreatorId, Is.EqualTo(m_uaMT.PrincipalID.ToString()),
180 "Loaded item non-uuid creator doesn't match that of the loading user"); 180 "Loaded item non-uuid creator doesn't match that of the loading user");
181 Assert.That( 181 Assert.That(
182 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaMT.PrincipalID), 182 foundItem1.CreatorIdAsUuid, Is.EqualTo(m_uaMT.PrincipalID),
183 "Loaded item uuid creator doesn't match that of the loading user"); 183 "Loaded item uuid creator doesn't match that of the loading user");
184 184
185 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString()); 185 AssetBase asset1 = m_scene.AssetService.Get(foundItem1.AssetID.ToString());
186 string xmlData = Utils.BytesToString(asset1.Data); 186 string xmlData = Utils.BytesToString(asset1.Data);
187 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); 187 SceneObjectGroup sog1 = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
188 188
189 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID)); 189 Assert.That(sog1.RootPart.CreatorID, Is.EqualTo(m_uaMT.PrincipalID));
190 } 190 }
191 } 191 }
192} \ No newline at end of file 192} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
index 7265405..bd112b4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveSaveTests.cs
@@ -50,19 +50,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
50 { 50 {
51 protected TestScene m_scene; 51 protected TestScene m_scene;
52 protected InventoryArchiverModule m_archiverModule; 52 protected InventoryArchiverModule m_archiverModule;
53 53
54 [SetUp] 54 [SetUp]
55 public override void SetUp() 55 public override void SetUp()
56 { 56 {
57 base.SetUp(); 57 base.SetUp();
58 58
59 SerialiserModule serialiserModule = new SerialiserModule(); 59 SerialiserModule serialiserModule = new SerialiserModule();
60 m_archiverModule = new InventoryArchiverModule(); 60 m_archiverModule = new InventoryArchiverModule();
61 61
62 m_scene = new SceneHelpers().SetupScene(); 62 m_scene = new SceneHelpers().SetupScene();
63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule); 63 SceneHelpers.SetupSceneModules(m_scene, serialiserModule, m_archiverModule);
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Test that the IAR has the required files in the right order. 67 /// Test that the IAR has the required files in the right order.
68 /// </summary> 68 /// </summary>
@@ -73,20 +73,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
73 public void TestOrder() 73 public void TestOrder()
74 { 74 {
75 TestHelpers.InMethod(); 75 TestHelpers.InMethod();
76// log4net.Config.XmlConfigurator.Configure(); 76// log4net.Config.XmlConfigurator.Configure();
77 77
78 MemoryStream archiveReadStream = new MemoryStream(m_iarStreamBytes); 78 MemoryStream archiveReadStream = new MemoryStream(m_iarStreamBytes);
79 TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 79 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
80 string filePath; 80 string filePath;
81 TarArchiveReader.TarEntryType tarEntryType; 81 TarArchiveReader.TarEntryType tarEntryType;
82 82
83 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 83 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
84 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 84 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
85 85
86 InventoryArchiveReadRequest iarr 86 InventoryArchiveReadRequest iarr
87 = new InventoryArchiveReadRequest(UUID.Random(), null, null, null, null, null, null, (Stream)null, false); 87 = new InventoryArchiveReadRequest(UUID.Random(), null, null, null, null, null, null, (Stream)null, false);
88 iarr.LoadControlFile(filePath, data); 88 iarr.LoadControlFile(filePath, data);
89 89
90 Assert.That(iarr.ControlFileLoaded, Is.True); 90 Assert.That(iarr.ControlFileLoaded, Is.True);
91 } 91 }
92 92
@@ -119,22 +119,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
119// InventoryArchiveUtils. 119// InventoryArchiveUtils.
120 bool gotObjectsFolder = false; 120 bool gotObjectsFolder = false;
121 121
122 string objectsFolderName 122 string objectsFolderName
123 = string.Format( 123 = string.Format(
124 "{0}{1}", 124 "{0}{1}",
125 ArchiveConstants.INVENTORY_PATH, 125 ArchiveConstants.INVENTORY_PATH,
126 InventoryArchiveWriteRequest.CreateArchiveFolderName( 126 InventoryArchiveWriteRequest.CreateArchiveFolderName(
127 UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, userId, "Objects"))); 127 UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, userId, "Objects")));
128 128
129 string filePath; 129 string filePath;
130 TarArchiveReader.TarEntryType tarEntryType; 130 TarArchiveReader.TarEntryType tarEntryType;
131 131
132 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 132 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
133 { 133 {
134// Console.WriteLine("Got {0}", filePath); 134// Console.WriteLine("Got {0}", filePath);
135 135
136 // Lazily, we only bother to look for the system objects folder created when we call CreateUserWithInventory() 136 // Lazily, we only bother to look for the system objects folder created when we call CreateUserWithInventory()
137 // XXX: But really we need to stop all that stuff being created in tests or check for such folders 137 // XXX: But really we need to stop all that stuff being created in tests or check for such folders
138 // more thoroughly 138 // more thoroughly
139 if (filePath == objectsFolderName) 139 if (filePath == objectsFolderName)
140 gotObjectsFolder = true; 140 gotObjectsFolder = true;
@@ -157,19 +157,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
157 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); 157 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword);
158 158
159 // Create base folder 159 // Create base folder
160 InventoryFolderBase f1 160 InventoryFolderBase f1
161 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1", true); 161 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1", true);
162 162
163 // Create item1 163 // Create item1
164 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Dog Object", 0x5); 164 SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Dog Object", 0x5);
165 InventoryItemBase i1 = UserInventoryHelpers.AddInventoryItem(m_scene, so1, 0x50, 0x60, "f1"); 165 InventoryItemBase i1 = UserInventoryHelpers.AddInventoryItem(m_scene, so1, 0x50, 0x60, "f1");
166 166
167 // Create embedded folder 167 // Create embedded folder
168 InventoryFolderBase f1_1 168 InventoryFolderBase f1_1
169 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1/f1.1", true); 169 = UserInventoryHelpers.CreateInventoryFolder(m_scene.InventoryService, userId, "f1/f1.1", true);
170 170
171 // Create embedded item 171 // Create embedded item
172 SceneObjectGroup so1_1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Cat Object", 0x6); 172 SceneObjectGroup so1_1 = SceneHelpers.CreateSceneObject(1, userId, "My Little Cat Object", 0x6);
173 InventoryItemBase i2 = UserInventoryHelpers.AddInventoryItem(m_scene, so1_1, 0x500, 0x600, "f1/f1.1"); 173 InventoryItemBase i2 = UserInventoryHelpers.AddInventoryItem(m_scene, so1_1, 0x500, 0x600, "f1/f1.1");
174 174
175 MemoryStream archiveWriteStream = new MemoryStream(); 175 MemoryStream archiveWriteStream = new MemoryStream();
@@ -188,18 +188,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
188// InventoryArchiveUtils. 188// InventoryArchiveUtils.
189 bool gotf1 = false, gotf1_1 = false, gotso1 = false, gotso2 = false; 189 bool gotf1 = false, gotf1_1 = false, gotso1 = false, gotso2 = false;
190 190
191 string f1FileName 191 string f1FileName
192 = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1)); 192 = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1));
193 string f1_1FileName 193 string f1_1FileName
194 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1_1)); 194 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveFolderName(f1_1));
195 string so1FileName 195 string so1FileName
196 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i1)); 196 = string.Format("{0}{1}", f1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i1));
197 string so2FileName 197 string so2FileName
198 = string.Format("{0}{1}", f1_1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i2)); 198 = string.Format("{0}{1}", f1_1FileName, InventoryArchiveWriteRequest.CreateArchiveItemName(i2));
199 199
200 string filePath; 200 string filePath;
201 TarArchiveReader.TarEntryType tarEntryType; 201 TarArchiveReader.TarEntryType tarEntryType;
202 202
203 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 203 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
204 { 204 {
205// Console.WriteLine("Got {0}", filePath); 205// Console.WriteLine("Got {0}", filePath);
@@ -222,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
222 222
223 // TODO: Test presence of more files and contents of files. 223 // TODO: Test presence of more files and contents of files.
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
227 /// Test saving a single inventory item to an IAR 227 /// Test saving a single inventory item to an IAR
228 /// (subject to change since there is no fixed format yet). 228 /// (subject to change since there is no fixed format yet).
@@ -239,10 +239,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
239 string userPassword = "troll"; 239 string userPassword = "troll";
240 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 240 UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
241 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword); 241 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, userId, userPassword);
242 242
243 // Create asset 243 // Create asset
244 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 244 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
245 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50); 245 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "My Little Dog Object", 0x50);
246 246
247 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 247 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
248 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 248 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
@@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
255 item1.Name = item1Name; 255 item1.Name = item1Name;
256 item1.AssetID = asset1.FullID; 256 item1.AssetID = asset1.FullID;
257 item1.ID = item1Id; 257 item1.ID = item1Id;
258 InventoryFolderBase objsFolder 258 InventoryFolderBase objsFolder
259 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, userId, "Objects")[0]; 259 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, userId, "Objects")[0];
260 item1.Folder = objsFolder.ID; 260 item1.Folder = objsFolder.ID;
261 m_scene.AddInventoryItem(item1); 261 m_scene.AddInventoryItem(item1);
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
285 TarArchiveReader.TarEntryType tarEntryType; 285 TarArchiveReader.TarEntryType tarEntryType;
286 286
287// Console.WriteLine("Reading archive"); 287// Console.WriteLine("Reading archive");
288 288
289 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 289 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
290 { 290 {
291 Console.WriteLine("Got {0}", filePath); 291 Console.WriteLine("Got {0}", filePath);
@@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
294// { 294// {
295// gotControlFile = true; 295// gotControlFile = true;
296// } 296// }
297 297
298 if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml")) 298 if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
299 { 299 {
300// string fileName = filePath.Remove(0, "Objects/".Length); 300// string fileName = filePath.Remove(0, "Objects/".Length);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
index 519c697..0b65829 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiveTestCase.cs
@@ -49,35 +49,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
49 public class InventoryArchiveTestCase : OpenSimTestCase 49 public class InventoryArchiveTestCase : OpenSimTestCase
50 { 50 {
51 protected ManualResetEvent mre = new ManualResetEvent(false); 51 protected ManualResetEvent mre = new ManualResetEvent(false);
52 52
53 /// <summary> 53 /// <summary>
54 /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test. 54 /// A raw array of bytes that we'll use to create an IAR memory stream suitable for isolated use in each test.
55 /// </summary> 55 /// </summary>
56 protected byte[] m_iarStreamBytes; 56 protected byte[] m_iarStreamBytes;
57 57
58 /// <summary> 58 /// <summary>
59 /// Stream of data representing a common IAR for load tests. 59 /// Stream of data representing a common IAR for load tests.
60 /// </summary> 60 /// </summary>
61 protected MemoryStream m_iarStream; 61 protected MemoryStream m_iarStream;
62 62
63 protected UserAccount m_uaMT 63 protected UserAccount m_uaMT
64 = new UserAccount { 64 = new UserAccount {
65 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), 65 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"),
66 FirstName = "Mr", 66 FirstName = "Mr",
67 LastName = "Tiddles" }; 67 LastName = "Tiddles" };
68 68
69 protected UserAccount m_uaLL1 69 protected UserAccount m_uaLL1
70 = new UserAccount { 70 = new UserAccount {
71 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), 71 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"),
72 FirstName = "Lord", 72 FirstName = "Lord",
73 LastName = "Lucan" }; 73 LastName = "Lucan" };
74 74
75 protected UserAccount m_uaLL2 75 protected UserAccount m_uaLL2
76 = new UserAccount { 76 = new UserAccount {
77 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"), 77 PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000777"),
78 FirstName = "Lord", 78 FirstName = "Lord",
79 LastName = "Lucan" }; 79 LastName = "Lucan" };
80 80
81 protected string m_item1Name = "Ray Gun Item"; 81 protected string m_item1Name = "Ray Gun Item";
82 protected string m_coaItemName = "Coalesced Item"; 82 protected string m_coaItemName = "Coalesced Item";
83 83
@@ -105,72 +105,72 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
105 base.SetUp(); 105 base.SetUp();
106 m_iarStream = new MemoryStream(m_iarStreamBytes); 106 m_iarStream = new MemoryStream(m_iarStreamBytes);
107 } 107 }
108 108
109 protected void ConstructDefaultIarBytesForTestLoad() 109 protected void ConstructDefaultIarBytesForTestLoad()
110 { 110 {
111// log4net.Config.XmlConfigurator.Configure(); 111// log4net.Config.XmlConfigurator.Configure();
112 112
113 InventoryArchiverModule archiverModule = new InventoryArchiverModule(); 113 InventoryArchiverModule archiverModule = new InventoryArchiverModule();
114 Scene scene = new SceneHelpers().SetupScene(); 114 Scene scene = new SceneHelpers().SetupScene();
115 SceneHelpers.SetupSceneModules(scene, archiverModule); 115 SceneHelpers.SetupSceneModules(scene, archiverModule);
116 116
117 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire"); 117 UserAccountHelpers.CreateUserWithInventory(scene, m_uaLL1, "hampshire");
118 118
119 MemoryStream archiveWriteStream = new MemoryStream(); 119 MemoryStream archiveWriteStream = new MemoryStream();
120 120
121 // Create scene object asset 121 // Create scene object asset
122 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040"); 122 UUID ownerId = UUID.Parse("00000000-0000-0000-0000-000000000040");
123 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50); 123 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, ownerId, "Ray Gun Object", 0x50);
124 124
125 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 125 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
126 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 126 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
127 scene.AssetService.Store(asset1); 127 scene.AssetService.Store(asset1);
128 128
129 // Create scene object item 129 // Create scene object item
130 InventoryItemBase item1 = new InventoryItemBase(); 130 InventoryItemBase item1 = new InventoryItemBase();
131 item1.Name = m_item1Name; 131 item1.Name = m_item1Name;
132 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020"); 132 item1.ID = UUID.Parse("00000000-0000-0000-0000-000000000020");
133 item1.AssetID = asset1.FullID; 133 item1.AssetID = asset1.FullID;
134 item1.GroupID = UUID.Random(); 134 item1.GroupID = UUID.Random();
135 item1.CreatorId = m_uaLL1.PrincipalID.ToString(); 135 item1.CreatorId = m_uaLL1.PrincipalID.ToString();
136 item1.Owner = m_uaLL1.PrincipalID; 136 item1.Owner = m_uaLL1.PrincipalID;
137 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 137 item1.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
138 scene.AddInventoryItem(item1); 138 scene.AddInventoryItem(item1);
139 139
140 // Create coalesced objects asset 140 // Create coalesced objects asset
141 SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120); 141 SceneObjectGroup cobj1 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object1", 0x120);
142 cobj1.AbsolutePosition = new Vector3(15, 30, 45); 142 cobj1.AbsolutePosition = new Vector3(15, 30, 45);
143 143
144 SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140); 144 SceneObjectGroup cobj2 = SceneHelpers.CreateSceneObject(1, m_uaLL1.PrincipalID, "Object2", 0x140);
145 cobj2.AbsolutePosition = new Vector3(25, 50, 75); 145 cobj2.AbsolutePosition = new Vector3(25, 50, 75);
146 146
147 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2); 147 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_uaLL1.PrincipalID, cobj1, cobj2);
148 148
149 AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa); 149 AssetBase coaAsset = AssetHelpers.CreateAsset(0x160, coa);
150 scene.AssetService.Store(coaAsset); 150 scene.AssetService.Store(coaAsset);
151 151
152 // Create coalesced objects inventory item 152 // Create coalesced objects inventory item
153 InventoryItemBase coaItem = new InventoryItemBase(); 153 InventoryItemBase coaItem = new InventoryItemBase();
154 coaItem.Name = m_coaItemName; 154 coaItem.Name = m_coaItemName;
155 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180"); 155 coaItem.ID = UUID.Parse("00000000-0000-0000-0000-000000000180");
156 coaItem.AssetID = coaAsset.FullID; 156 coaItem.AssetID = coaAsset.FullID;
157 coaItem.GroupID = UUID.Random(); 157 coaItem.GroupID = UUID.Random();
158 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString(); 158 coaItem.CreatorId = m_uaLL1.PrincipalID.ToString();
159 coaItem.Owner = m_uaLL1.PrincipalID; 159 coaItem.Owner = m_uaLL1.PrincipalID;
160 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID; 160 coaItem.Folder = scene.InventoryService.GetRootFolder(m_uaLL1.PrincipalID).ID;
161 scene.AddInventoryItem(coaItem); 161 scene.AddInventoryItem(coaItem);
162 162
163 archiverModule.ArchiveInventory( 163 archiverModule.ArchiveInventory(
164 UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream); 164 UUID.Random(), m_uaLL1.FirstName, m_uaLL1.LastName, "/*", "hampshire", archiveWriteStream);
165 165
166 m_iarStreamBytes = archiveWriteStream.ToArray(); 166 m_iarStreamBytes = archiveWriteStream.ToArray();
167 } 167 }
168 168
169 protected void SaveCompleted( 169 protected void SaveCompleted(
170 UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, 170 UUID id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream,
171 Exception reportedException, int SaveCount, int FilterCount) 171 Exception reportedException, int SaveCount, int FilterCount)
172 { 172 {
173 mre.Set(); 173 mre.Set();
174 } 174 }
175 } 175 }
176} \ No newline at end of file 176} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 46da5a9..5d7f25c 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -149,10 +149,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
149 private void OnInstantMessage(IClientAPI client, GridInstantMessage im) 149 private void OnInstantMessage(IClientAPI client, GridInstantMessage im)
150 { 150 {
151// m_log.DebugFormat( 151// m_log.DebugFormat(
152// "[INVENTORY TRANSFER]: {0} IM type received from client {1}. From={2} ({3}), To={4}", 152// "[INVENTORY TRANSFER]: {0} IM type received from client {1}. From={2} ({3}), To={4}",
153// (InstantMessageDialog)im.dialog, client.Name, 153// (InstantMessageDialog)im.dialog, client.Name,
154// im.fromAgentID, im.fromAgentName, im.toAgentID); 154// im.fromAgentID, im.fromAgentName, im.toAgentID);
155 155
156 Scene scene = FindClientScene(client.AgentId); 156 Scene scene = FindClientScene(client.AgentId);
157 157
158 if (scene == null) // Something seriously wrong here. 158 if (scene == null) // Something seriously wrong here.
@@ -164,31 +164,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
164 164
165 if (im.binaryBucket.Length < 17) // Invalid 165 if (im.binaryBucket.Length < 17) // Invalid
166 return; 166 return;
167 167
168 UUID recipientID = new UUID(im.toAgentID); 168 UUID recipientID = new UUID(im.toAgentID);
169 ScenePresence user = scene.GetScenePresence(recipientID); 169 ScenePresence user = scene.GetScenePresence(recipientID);
170 UUID copyID; 170 UUID copyID;
171 171
172 // First byte is the asset type 172 // First byte is the asset type
173 AssetType assetType = (AssetType)im.binaryBucket[0]; 173 AssetType assetType = (AssetType)im.binaryBucket[0];
174 174
175 if (AssetType.Folder == assetType) 175 if (AssetType.Folder == assetType)
176 { 176 {
177 UUID folderID = new UUID(im.binaryBucket, 1); 177 UUID folderID = new UUID(im.binaryBucket, 1);
178 178
179 m_log.DebugFormat( 179 m_log.DebugFormat(
180 "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory", 180 "[INVENTORY TRANSFER]: Inserting original folder {0} into agent {1}'s inventory",
181 folderID, new UUID(im.toAgentID)); 181 folderID, new UUID(im.toAgentID));
182 182
183 InventoryFolderBase folderCopy 183 InventoryFolderBase folderCopy
184 = scene.GiveInventoryFolder(client, recipientID, client.AgentId, folderID, UUID.Zero); 184 = scene.GiveInventoryFolder(client, recipientID, client.AgentId, folderID, UUID.Zero);
185 185
186 if (folderCopy == null) 186 if (folderCopy == null)
187 { 187 {
188 client.SendAgentAlertMessage("Can't find folder to give. Nothing given.", false); 188 client.SendAgentAlertMessage("Can't find folder to give. Nothing given.", false);
189 return; 189 return;
190 } 190 }
191 191
192 // The outgoing binary bucket should contain only the byte which signals an asset folder is 192 // The outgoing binary bucket should contain only the byte which signals an asset folder is
193 // being copied and the following bytes for the copied folder's UUID 193 // being copied and the following bytes for the copied folder's UUID
194 copyID = folderCopy.ID; 194 copyID = folderCopy.ID;
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
196 im.binaryBucket = new byte[1 + copyIDBytes.Length]; 196 im.binaryBucket = new byte[1 + copyIDBytes.Length];
197 im.binaryBucket[0] = (byte)AssetType.Folder; 197 im.binaryBucket[0] = (byte)AssetType.Folder;
198 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length); 198 Array.Copy(copyIDBytes, 0, im.binaryBucket, 1, copyIDBytes.Length);
199 199
200 if (user != null) 200 if (user != null)
201 user.ControllingClient.SendBulkUpdateInventory(folderCopy); 201 user.ControllingClient.SendBulkUpdateInventory(folderCopy);
202 202
@@ -225,10 +225,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
225 client.SendAgentAlertMessage(message, false); 225 client.SendAgentAlertMessage(message, false);
226 return; 226 return;
227 } 227 }
228 228
229 copyID = itemCopy.ID; 229 copyID = itemCopy.ID;
230 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16); 230 Array.Copy(copyID.GetBytes(), 0, im.binaryBucket, 1, 16);
231 231
232 if (user != null) 232 if (user != null)
233 user.ControllingClient.SendBulkUpdateInventory(itemCopy); 233 user.ControllingClient.SendBulkUpdateInventory(itemCopy);
234 234
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
253 else 253 else
254 { 254 {
255 if (m_TransferModule != null) 255 if (m_TransferModule != null)
256 m_TransferModule.SendInstantMessage(im, delegate(bool success) 256 m_TransferModule.SendInstantMessage(im, delegate(bool success)
257 { 257 {
258 if (!success) 258 if (!success)
259 client.SendAlertMessage("User not online. Inventory has been saved"); 259 client.SendAlertMessage("User not online. Inventory has been saved");
@@ -308,8 +308,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
308 } 308 }
309 309
310 // XXX: This code was placed here to try and accomodate RLV which moves given folders named #RLV/~<name> 310 // XXX: This code was placed here to try and accomodate RLV which moves given folders named #RLV/~<name>
311 // to the requested folder, which in this case is #RLV. However, it is the viewer that appears to be 311 // to the requested folder, which in this case is #RLV. However, it is the viewer that appears to be
312 // response from renaming the #RLV/~example folder to ~example. For some reason this is not yet 312 // response from renaming the #RLV/~example folder to ~example. For some reason this is not yet
313 // happening, possibly because we are not sending the correct inventory update messages with the correct 313 // happening, possibly because we are not sending the correct inventory update messages with the correct
314 // transaction IDs 314 // transaction IDs
315 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) 315 else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted)
@@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
380 InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID); 380 InventoryItemBase item = invService.GetItem(client.AgentId, inventoryID);
381 InventoryFolderBase folder = null; 381 InventoryFolderBase folder = null;
382 UUID? previousParentFolderID = null; 382 UUID? previousParentFolderID = null;
383 383
384 if (item != null && trashFolder != null) 384 if (item != null && trashFolder != null)
385 { 385 {
386 previousParentFolderID = item.Folder; 386 previousParentFolderID = item.Folder;
@@ -404,18 +404,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
404 client.SendBulkUpdateInventory(folder); 404 client.SendBulkUpdateInventory(folder);
405 } 405 }
406 } 406 }
407 407
408 if ((null == item && null == folder) | null == trashFolder) 408 if ((null == item && null == folder) | null == trashFolder)
409 { 409 {
410 string reason = String.Empty; 410 string reason = String.Empty;
411 411
412 if (trashFolder == null) 412 if (trashFolder == null)
413 reason += " Trash folder not found."; 413 reason += " Trash folder not found.";
414 if (item == null) 414 if (item == null)
415 reason += " Item not found."; 415 reason += " Item not found.";
416 if (folder == null) 416 if (folder == null)
417 reason += " Folder not found."; 417 reason += " Folder not found.";
418 418
419 client.SendAgentAlertMessage("Unable to delete "+ 419 client.SendAgentAlertMessage("Unable to delete "+
420 "received inventory" + reason, false); 420 "received inventory" + reason, false);
421 } 421 }
@@ -471,12 +471,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
471 { 471 {
472 if (im.binaryBucket.Length < 17) // Invalid 472 if (im.binaryBucket.Length < 17) // Invalid
473 return; 473 return;
474 474
475 UUID recipientID = new UUID(im.toAgentID); 475 UUID recipientID = new UUID(im.toAgentID);
476 476
477 // First byte is the asset type 477 // First byte is the asset type
478 AssetType assetType = (AssetType)im.binaryBucket[0]; 478 AssetType assetType = (AssetType)im.binaryBucket[0];
479 479
480 if (AssetType.Folder == assetType) 480 if (AssetType.Folder == assetType)
481 { 481 {
482 UUID folderID = new UUID(im.binaryBucket, 1); 482 UUID folderID = new UUID(im.binaryBucket, 1);
@@ -505,12 +505,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
505 { 505 {
506 if (im.binaryBucket.Length < 1) // Invalid 506 if (im.binaryBucket.Length < 1) // Invalid
507 return; 507 return;
508 508
509 UUID recipientID = new UUID(im.toAgentID); 509 UUID recipientID = new UUID(im.toAgentID);
510 510
511 // Bucket is the asset type 511 // Bucket is the asset type
512 AssetType assetType = (AssetType)im.binaryBucket[0]; 512 AssetType assetType = (AssetType)im.binaryBucket[0];
513 513
514 if (AssetType.Folder == assetType) 514 if (AssetType.Folder == assetType)
515 { 515 {
516 UUID folderID = new UUID(im.imSessionID); 516 UUID folderID = new UUID(im.imSessionID);
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
index 7ddc396..82ed091 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/Tests/InventoryTransferModuleTests.cs
@@ -44,9 +44,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
44{ 44{
45 [TestFixture] 45 [TestFixture]
46 public class InventoryTransferModuleTests : OpenSimTestCase 46 public class InventoryTransferModuleTests : OpenSimTestCase
47 { 47 {
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 49
50 [SetUp] 50 [SetUp]
51 public override void SetUp() 51 public override void SetUp()
52 { 52 {
@@ -56,9 +56,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
56 config.AddConfig("Messaging"); 56 config.AddConfig("Messaging");
57 config.Configs["Messaging"].Set("InventoryTransferModule", "InventoryTransferModule"); 57 config.Configs["Messaging"].Set("InventoryTransferModule", "InventoryTransferModule");
58 58
59 m_scene = new SceneHelpers().SetupScene(); 59 m_scene = new SceneHelpers().SetupScene();
60 SceneHelpers.SetupSceneModules(m_scene, config, new InventoryTransferModule()); 60 SceneHelpers.SetupSceneModules(m_scene, config, new InventoryTransferModule());
61 } 61 }
62 62
63 [Test] 63 [Test]
64 public void TestAcceptGivenItem() 64 public void TestAcceptGivenItem()
@@ -69,9 +69,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
69 UUID itemId = TestHelpers.ParseTail(0x100); 69 UUID itemId = TestHelpers.ParseTail(0x100);
70 UUID assetId = TestHelpers.ParseTail(0x200); 70 UUID assetId = TestHelpers.ParseTail(0x200);
71 71
72 UserAccount ua1 72 UserAccount ua1
73 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 73 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
74 UserAccount ua2 74 UserAccount ua2
75 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 75 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
76 76
77 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 77 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
81 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 81 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
82 82
83 // Create the object to test give 83 // Create the object to test give
84 InventoryItemBase originalItem 84 InventoryItemBase originalItem
85 = UserInventoryHelpers.CreateInventoryItem( 85 = UserInventoryHelpers.CreateInventoryItem(
86 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object); 86 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object);
87 87
@@ -89,35 +89,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
89 byte[] itemIdBytes = itemId.GetBytes(); 89 byte[] itemIdBytes = itemId.GetBytes();
90 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 90 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
91 91
92 GridInstantMessage giveIm 92 GridInstantMessage giveIm
93 = new GridInstantMessage( 93 = new GridInstantMessage(
94 m_scene, 94 m_scene,
95 giverSp.UUID, 95 giverSp.UUID,
96 giverSp.Name, 96 giverSp.Name,
97 receiverSp.UUID, 97 receiverSp.UUID,
98 (byte)InstantMessageDialog.InventoryOffered, 98 (byte)InstantMessageDialog.InventoryOffered,
99 false, 99 false,
100 "inventory offered msg", 100 "inventory offered msg",
101 initialSessionId, 101 initialSessionId,
102 false, 102 false,
103 Vector3.Zero, 103 Vector3.Zero,
104 giveImBinaryBucket, 104 giveImBinaryBucket,
105 true); 105 true);
106 106
107 giverClient.HandleImprovedInstantMessage(giveIm); 107 giverClient.HandleImprovedInstantMessage(giveIm);
108 108
109 // These details might not all be correct. 109 // These details might not all be correct.
110 GridInstantMessage acceptIm 110 GridInstantMessage acceptIm
111 = new GridInstantMessage( 111 = new GridInstantMessage(
112 m_scene, 112 m_scene,
113 receiverSp.UUID, 113 receiverSp.UUID,
114 receiverSp.Name, 114 receiverSp.Name,
115 giverSp.UUID, 115 giverSp.UUID,
116 (byte)InstantMessageDialog.InventoryAccepted, 116 (byte)InstantMessageDialog.InventoryAccepted,
117 false, 117 false,
118 "inventory accepted msg", 118 "inventory accepted msg",
119 initialSessionId, 119 initialSessionId,
120 false, 120 false,
121 Vector3.Zero, 121 Vector3.Zero,
122 null, 122 null,
123 true); 123 true);
@@ -133,7 +133,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
133 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID)); 133 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID));
134 134
135 // Test for item successfully making it into the receiver's inventory 135 // Test for item successfully making it into the receiver's inventory
136 InventoryItemBase receivedItem 136 InventoryItemBase receivedItem
137 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Objects/givenObj"); 137 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Objects/givenObj");
138 138
139 Assert.That(receivedItem, Is.Not.Null); 139 Assert.That(receivedItem, Is.Not.Null);
@@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
148 Assert.That(originalItemAfterDelete, Is.Not.Null); 148 Assert.That(originalItemAfterDelete, Is.Not.Null);
149 149
150 // TODO: Test scenario where giver deletes their item first. 150 // TODO: Test scenario where giver deletes their item first.
151 } 151 }
152 152
153 /// <summary> 153 /// <summary>
154 /// Test user rejection of a given item. 154 /// Test user rejection of a given item.
@@ -165,9 +165,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
165 UUID itemId = TestHelpers.ParseTail(0x100); 165 UUID itemId = TestHelpers.ParseTail(0x100);
166 UUID assetId = TestHelpers.ParseTail(0x200); 166 UUID assetId = TestHelpers.ParseTail(0x200);
167 167
168 UserAccount ua1 168 UserAccount ua1
169 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 169 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
170 UserAccount ua2 170 UserAccount ua2
171 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 171 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
172 172
173 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 173 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -177,7 +177,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
177 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 177 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
178 178
179 // Create the object to test give 179 // Create the object to test give
180 InventoryItemBase originalItem 180 InventoryItemBase originalItem
181 = UserInventoryHelpers.CreateInventoryItem( 181 = UserInventoryHelpers.CreateInventoryItem(
182 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object); 182 m_scene, "givenObj", itemId, assetId, giverSp.UUID, InventoryType.Object);
183 183
@@ -188,36 +188,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
188 byte[] itemIdBytes = itemId.GetBytes(); 188 byte[] itemIdBytes = itemId.GetBytes();
189 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 189 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
190 190
191 GridInstantMessage giveIm 191 GridInstantMessage giveIm
192 = new GridInstantMessage( 192 = new GridInstantMessage(
193 m_scene, 193 m_scene,
194 giverSp.UUID, 194 giverSp.UUID,
195 giverSp.Name, 195 giverSp.Name,
196 receiverSp.UUID, 196 receiverSp.UUID,
197 (byte)InstantMessageDialog.InventoryOffered, 197 (byte)InstantMessageDialog.InventoryOffered,
198 false, 198 false,
199 "inventory offered msg", 199 "inventory offered msg",
200 initialSessionId, 200 initialSessionId,
201 false, 201 false,
202 Vector3.Zero, 202 Vector3.Zero,
203 giveImBinaryBucket, 203 giveImBinaryBucket,
204 true); 204 true);
205 205
206 giverClient.HandleImprovedInstantMessage(giveIm); 206 giverClient.HandleImprovedInstantMessage(giveIm);
207 207
208 // These details might not all be correct. 208 // These details might not all be correct.
209 // Session ID is now the created item ID (!) 209 // Session ID is now the created item ID (!)
210 GridInstantMessage rejectIm 210 GridInstantMessage rejectIm
211 = new GridInstantMessage( 211 = new GridInstantMessage(
212 m_scene, 212 m_scene,
213 receiverSp.UUID, 213 receiverSp.UUID,
214 receiverSp.Name, 214 receiverSp.Name,
215 giverSp.UUID, 215 giverSp.UUID,
216 (byte)InstantMessageDialog.InventoryDeclined, 216 (byte)InstantMessageDialog.InventoryDeclined,
217 false, 217 false,
218 "inventory declined msg", 218 "inventory declined msg",
219 new UUID(receivedIm.imSessionID), 219 new UUID(receivedIm.imSessionID),
220 false, 220 false,
221 Vector3.Zero, 221 Vector3.Zero,
222 null, 222 null,
223 true); 223 true);
@@ -233,7 +233,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
233 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID)); 233 Assert.That(originalItemAfterGive.ID, Is.EqualTo(originalItem.ID));
234 234
235 // Test for item successfully making it into the receiver's inventory 235 // Test for item successfully making it into the receiver's inventory
236 InventoryItemBase receivedItem 236 InventoryItemBase receivedItem
237 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Trash/givenObj"); 237 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, receiverSp.UUID, "Trash/givenObj");
238 238
239 InventoryFolderBase trashFolder 239 InventoryFolderBase trashFolder
@@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
250 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, giverSp.UUID, "Objects/givenObj"); 250 = UserInventoryHelpers.GetInventoryItem(m_scene.InventoryService, giverSp.UUID, "Objects/givenObj");
251 251
252 Assert.That(originalItemAfterDelete, Is.Not.Null); 252 Assert.That(originalItemAfterDelete, Is.Not.Null);
253 } 253 }
254 254
255 [Test] 255 [Test]
256 public void TestAcceptGivenFolder() 256 public void TestAcceptGivenFolder()
@@ -261,9 +261,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
261 UUID initialSessionId = TestHelpers.ParseTail(0x10); 261 UUID initialSessionId = TestHelpers.ParseTail(0x10);
262 UUID folderId = TestHelpers.ParseTail(0x100); 262 UUID folderId = TestHelpers.ParseTail(0x100);
263 263
264 UserAccount ua1 264 UserAccount ua1
265 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 265 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
266 UserAccount ua2 266 UserAccount ua2
267 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 267 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
268 268
269 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 269 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
272 ScenePresence receiverSp = SceneHelpers.AddScenePresence(m_scene, ua2); 272 ScenePresence receiverSp = SceneHelpers.AddScenePresence(m_scene, ua2);
273 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 273 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
274 274
275 InventoryFolderBase originalFolder 275 InventoryFolderBase originalFolder
276 = UserInventoryHelpers.CreateInventoryFolder( 276 = UserInventoryHelpers.CreateInventoryFolder(
277 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true); 277 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true);
278 278
@@ -281,35 +281,35 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
281 byte[] itemIdBytes = folderId.GetBytes(); 281 byte[] itemIdBytes = folderId.GetBytes();
282 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 282 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
283 283
284 GridInstantMessage giveIm 284 GridInstantMessage giveIm
285 = new GridInstantMessage( 285 = new GridInstantMessage(
286 m_scene, 286 m_scene,
287 giverSp.UUID, 287 giverSp.UUID,
288 giverSp.Name, 288 giverSp.Name,
289 receiverSp.UUID, 289 receiverSp.UUID,
290 (byte)InstantMessageDialog.InventoryOffered, 290 (byte)InstantMessageDialog.InventoryOffered,
291 false, 291 false,
292 "inventory offered msg", 292 "inventory offered msg",
293 initialSessionId, 293 initialSessionId,
294 false, 294 false,
295 Vector3.Zero, 295 Vector3.Zero,
296 giveImBinaryBucket, 296 giveImBinaryBucket,
297 true); 297 true);
298 298
299 giverClient.HandleImprovedInstantMessage(giveIm); 299 giverClient.HandleImprovedInstantMessage(giveIm);
300 300
301 // These details might not all be correct. 301 // These details might not all be correct.
302 GridInstantMessage acceptIm 302 GridInstantMessage acceptIm
303 = new GridInstantMessage( 303 = new GridInstantMessage(
304 m_scene, 304 m_scene,
305 receiverSp.UUID, 305 receiverSp.UUID,
306 receiverSp.Name, 306 receiverSp.Name,
307 giverSp.UUID, 307 giverSp.UUID,
308 (byte)InstantMessageDialog.InventoryAccepted, 308 (byte)InstantMessageDialog.InventoryAccepted,
309 false, 309 false,
310 "inventory accepted msg", 310 "inventory accepted msg",
311 initialSessionId, 311 initialSessionId,
312 false, 312 false,
313 Vector3.Zero, 313 Vector3.Zero,
314 null, 314 null,
315 true); 315 true);
@@ -325,7 +325,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
325 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID)); 325 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID));
326 326
327 // Test for item successfully making it into the receiver's inventory 327 // Test for item successfully making it into the receiver's inventory
328 InventoryFolderBase receivedFolder 328 InventoryFolderBase receivedFolder
329 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "f1"); 329 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "f1");
330 330
331 Assert.That(receivedFolder, Is.Not.Null); 331 Assert.That(receivedFolder, Is.Not.Null);
@@ -340,7 +340,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
340 Assert.That(originalFolderAfterDelete, Is.Not.Null); 340 Assert.That(originalFolderAfterDelete, Is.Not.Null);
341 341
342 // TODO: Test scenario where giver deletes their item first. 342 // TODO: Test scenario where giver deletes their item first.
343 } 343 }
344 344
345 /// <summary> 345 /// <summary>
346 /// Test user rejection of a given item. 346 /// Test user rejection of a given item.
@@ -357,9 +357,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
357 UUID initialSessionId = TestHelpers.ParseTail(0x10); 357 UUID initialSessionId = TestHelpers.ParseTail(0x10);
358 UUID folderId = TestHelpers.ParseTail(0x100); 358 UUID folderId = TestHelpers.ParseTail(0x100);
359 359
360 UserAccount ua1 360 UserAccount ua1
361 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw"); 361 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "One", TestHelpers.ParseTail(0x1), "pw");
362 UserAccount ua2 362 UserAccount ua2
363 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw"); 363 = UserAccountHelpers.CreateUserWithInventory(m_scene, "User", "Two", TestHelpers.ParseTail(0x2), "pw");
364 364
365 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1); 365 ScenePresence giverSp = SceneHelpers.AddScenePresence(m_scene, ua1);
@@ -369,7 +369,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
369 TestClient receiverClient = (TestClient)receiverSp.ControllingClient; 369 TestClient receiverClient = (TestClient)receiverSp.ControllingClient;
370 370
371 // Create the folder to test give 371 // Create the folder to test give
372 InventoryFolderBase originalFolder 372 InventoryFolderBase originalFolder
373 = UserInventoryHelpers.CreateInventoryFolder( 373 = UserInventoryHelpers.CreateInventoryFolder(
374 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true); 374 m_scene.InventoryService, giverSp.UUID, folderId, "f1", true);
375 375
@@ -381,36 +381,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
381 byte[] itemIdBytes = folderId.GetBytes(); 381 byte[] itemIdBytes = folderId.GetBytes();
382 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length); 382 Array.Copy(itemIdBytes, 0, giveImBinaryBucket, 1, itemIdBytes.Length);
383 383
384 GridInstantMessage giveIm 384 GridInstantMessage giveIm
385 = new GridInstantMessage( 385 = new GridInstantMessage(
386 m_scene, 386 m_scene,
387 giverSp.UUID, 387 giverSp.UUID,
388 giverSp.Name, 388 giverSp.Name,
389 receiverSp.UUID, 389 receiverSp.UUID,
390 (byte)InstantMessageDialog.InventoryOffered, 390 (byte)InstantMessageDialog.InventoryOffered,
391 false, 391 false,
392 "inventory offered msg", 392 "inventory offered msg",
393 initialSessionId, 393 initialSessionId,
394 false, 394 false,
395 Vector3.Zero, 395 Vector3.Zero,
396 giveImBinaryBucket, 396 giveImBinaryBucket,
397 true); 397 true);
398 398
399 giverClient.HandleImprovedInstantMessage(giveIm); 399 giverClient.HandleImprovedInstantMessage(giveIm);
400 400
401 // These details might not all be correct. 401 // These details might not all be correct.
402 // Session ID is now the created item ID (!) 402 // Session ID is now the created item ID (!)
403 GridInstantMessage rejectIm 403 GridInstantMessage rejectIm
404 = new GridInstantMessage( 404 = new GridInstantMessage(
405 m_scene, 405 m_scene,
406 receiverSp.UUID, 406 receiverSp.UUID,
407 receiverSp.Name, 407 receiverSp.Name,
408 giverSp.UUID, 408 giverSp.UUID,
409 (byte)InstantMessageDialog.InventoryDeclined, 409 (byte)InstantMessageDialog.InventoryDeclined,
410 false, 410 false,
411 "inventory declined msg", 411 "inventory declined msg",
412 new UUID(receivedIm.imSessionID), 412 new UUID(receivedIm.imSessionID),
413 false, 413 false,
414 Vector3.Zero, 414 Vector3.Zero,
415 null, 415 null,
416 true); 416 true);
@@ -426,7 +426,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
426 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID)); 426 Assert.That(originalFolderAfterGive.ID, Is.EqualTo(originalFolder.ID));
427 427
428 // Test for folder successfully making it into the receiver's inventory 428 // Test for folder successfully making it into the receiver's inventory
429 InventoryFolderBase receivedFolder 429 InventoryFolderBase receivedFolder
430 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "Trash/f1"); 430 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, receiverSp.UUID, "Trash/f1");
431 431
432 InventoryFolderBase trashFolder 432 InventoryFolderBase trashFolder
@@ -443,6 +443,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.Tests
443 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, giverSp.UUID, "f1"); 443 = UserInventoryHelpers.GetInventoryFolder(m_scene.InventoryService, giverSp.UUID, "f1");
444 444
445 Assert.That(originalFolderAfterDelete, Is.Not.Null); 445 Assert.That(originalFolderAfterDelete, Is.Not.Null);
446 } 446 }
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
index 24286a4..10781e9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/HGLureModule.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
65 { 65 {
66 m_Enabled = true; 66 m_Enabled = true;
67 67
68 m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", 68 m_ThisGridURL = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI",
69 new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty); 69 new string[] { "Startup", "Hypergrid", "Messaging" }, String.Empty);
70 // Legacy. Remove soon! 70 // Legacy. Remove soon!
71 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL); 71 m_ThisGridURL = config.Configs["Messaging"].GetString("Gatekeeper", m_ThisGridURL);
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
154 154
155 void OnIncomingInstantMessage(GridInstantMessage im) 155 void OnIncomingInstantMessage(GridInstantMessage im)
156 { 156 {
157 if (im.dialog == (byte)InstantMessageDialog.RequestTeleport 157 if (im.dialog == (byte)InstantMessageDialog.RequestTeleport
158 || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport) 158 || im.dialog == (byte)InstantMessageDialog.GodLikeRequestTeleport)
159 { 159 {
160 UUID sessionID = new UUID(im.imSessionID); 160 UUID sessionID = new UUID(im.imSessionID);
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
195 195
196 m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message); 196 m_log.DebugFormat("[HG LURE MODULE]: RequestTeleport sessionID={0}, regionID={1}, message={2}", m.imSessionID, m.RegionID, m.message);
197 m_PendingLures.Add(sessionID, m, 7200); // 2 hours 197 m_PendingLures.Add(sessionID, m, 7200); // 2 hours
198 198
199 if (m_TransferModule != null) 199 if (m_TransferModule != null)
200 { 200 {
201 m_TransferModule.SendInstantMessage(m, 201 m_TransferModule.SendInstantMessage(m,
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
index 0b1dbc7..1e1caca 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
68 { 68 {
69 if (!m_Enabled) 69 if (!m_Enabled)
70 return; 70 return;
71 71
72 lock (m_Scenes) 72 lock (m_Scenes)
73 { 73 {
74 if (!m_Scenes.Contains(scene)) 74 if (!m_Scenes.Contains(scene))
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index df5265c..138c0f7 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
85 /// <value> 85 /// <value>
86 /// The configuration 86 /// The configuration
87 /// </value> 87 /// </value>
88 public IConfigSource Config 88 public IConfigSource Config
89 { 89 {
90 get; 90 get;
91 set; 91 set;
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
97 /// <value> 97 /// <value>
98 /// The profile server URI. 98 /// The profile server URI.
99 /// </value> 99 /// </value>
100 public string ProfileServerUri 100 public string ProfileServerUri
101 { 101 {
102 get; 102 get;
103 set; 103 set;
@@ -120,13 +120,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
120 /// <value> 120 /// <value>
121 /// <c>true</c> if enabled; otherwise, <c>false</c>. 121 /// <c>true</c> if enabled; otherwise, <c>false</c>.
122 /// </value> 122 /// </value>
123 public bool Enabled 123 public bool Enabled
124 { 124 {
125 get; 125 get;
126 set; 126 set;
127 } 127 }
128 128
129 public string MyGatekeeper 129 public string MyGatekeeper
130 { 130 {
131 get; private set; 131 get; private set;
132 } 132 }
@@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
135 /// <summary> 135 /// <summary>
136 /// This is called to initialize the region module. For shared modules, this is called exactly once, after 136 /// This is called to initialize the region module. For shared modules, this is called exactly once, after
137 /// creating the single (shared) instance. For non-shared modules, this is called once on each instance, after 137 /// creating the single (shared) instance. For non-shared modules, this is called once on each instance, after
138 /// the instace for the region has been created. 138 /// the instace for the region has been created.
139 /// </summary> 139 /// </summary>
140 /// <param name='source'> 140 /// <param name='source'>
141 /// Source. 141 /// Source.
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
162 Enabled = false; 162 Enabled = false;
163 return; 163 return;
164 } 164 }
165 165
166 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs); 166 m_allowUserProfileWebURLs = profileConfig.GetBoolean("AllowUserProfileWebURLs", m_allowUserProfileWebURLs);
167 167
168 m_log.Debug("[PROFILES]: Full Profiles Enabled"); 168 m_log.Debug("[PROFILES]: Full Profiles Enabled");
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
212 /// This will be called once for every scene loaded. In a shared module this will be multiple times in one 212 /// This will be called once for every scene loaded. In a shared module this will be multiple times in one
213 /// instance, while a nonshared module instance will only be called once. This method is called after AddRegion 213 /// instance, while a nonshared module instance will only be called once. This method is called after AddRegion
214 /// has been called in all modules for that scene, providing an opportunity to request another module's 214 /// has been called in all modules for that scene, providing an opportunity to request another module's
215 /// interface, or hook an event from another module. 215 /// interface, or hook an event from another module.
216 /// </summary> 216 /// </summary>
217 /// <param name='scene'> 217 /// <param name='scene'>
218 /// Scene. 218 /// Scene.
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
230 /// module has registered the interface by then, this module will be activated, else it will remain inactive, 230 /// module has registered the interface by then, this module will be activated, else it will remain inactive,
231 /// letting the other module take over. This should return non-null ONLY in modules that are intended to be 231 /// letting the other module take over. This should return non-null ONLY in modules that are intended to be
232 /// easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party 232 /// easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party
233 /// provided modules. 233 /// provided modules.
234 /// </summary> 234 /// </summary>
235 /// <value> 235 /// <value>
236 /// The replaceable interface. 236 /// The replaceable interface.
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
248 } 248 }
249 249
250 /// <value> 250 /// <value>
251 /// The name of the module 251 /// The name of the module
252 /// </value> 252 /// </value>
253 /// <summary> 253 /// <summary>
254 /// Gets the module name. 254 /// Gets the module name.
@@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
451 } 451 }
452 452
453 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient) 453 public void ClassifiedInfoRequest(UUID queryClassifiedID, IClientAPI remoteClient)
454 { 454 {
455 UUID target = remoteClient.AgentId; 455 UUID target = remoteClient.AgentId;
456 UserClassifiedAdd ad = new UserClassifiedAdd(); 456 UserClassifiedAdd ad = new UserClassifiedAdd();
457 ad.ClassifiedId = queryClassifiedID; 457 ad.ClassifiedId = queryClassifiedID;
@@ -459,7 +459,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
459 lock (m_classifiedCache) 459 lock (m_classifiedCache)
460 { 460 {
461 if (m_classifiedCache.ContainsKey(queryClassifiedID)) 461 if (m_classifiedCache.ContainsKey(queryClassifiedID))
462 { 462 {
463 target = m_classifiedCache[queryClassifiedID]; 463 target = m_classifiedCache[queryClassifiedID];
464 464
465 m_classifiedInterest[queryClassifiedID] --; 465 m_classifiedInterest[queryClassifiedID] --;
@@ -870,7 +870,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
870 870
871 string theirGatekeeperURI; 871 string theirGatekeeperURI;
872 GetUserGatekeeperURI(targetID, out theirGatekeeperURI); 872 GetUserGatekeeperURI(targetID, out theirGatekeeperURI);
873 873
874 object Pick = (object)pick; 874 object Pick = (object)pick;
875 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) { 875 if (!rpc.JsonRpcRequest (ref Pick, "pickinforequest", serverURI, UUID.Random ().ToString ())) {
876 remoteClient.SendAgentAlertMessage ( 876 remoteClient.SendAgentAlertMessage (
@@ -880,11 +880,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
880 pick = (UserProfilePick)Pick; 880 pick = (UserProfilePick)Pick;
881 if(foreign) 881 if(foreign)
882 cacheForeignImage(targetID, pick.SnapshotId); 882 cacheForeignImage(targetID, pick.SnapshotId);
883 883
884 Vector3 globalPos = new Vector3(Vector3.Zero); 884 Vector3 globalPos = new Vector3(Vector3.Zero);
885 Vector3.TryParse(pick.GlobalPos, out globalPos); 885 Vector3.TryParse(pick.GlobalPos, out globalPos);
886 886
887 if (!string.IsNullOrWhiteSpace(MyGatekeeper) && pick.Gatekeeper != MyGatekeeper) 887 if (!string.IsNullOrWhiteSpace(MyGatekeeper) && pick.Gatekeeper != MyGatekeeper)
888 { 888 {
889 // Setup the illusion 889 // Setup the illusion
890 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName); 890 string region = string.Format("{0} {1}",pick.Gatekeeper,pick.SimName);
@@ -896,7 +896,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
896 } 896 }
897 else 897 else
898 { 898 {
899 // we have a proxy on map 899 // we have a proxy on map
900 ulong oriHandle; 900 ulong oriHandle;
901 uint oriX; 901 uint oriX;
902 uint oriY; 902 uint oriY;
@@ -909,7 +909,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
909 } 909 }
910 else 910 else
911 { 911 {
912 // this is a fail on large regions 912 // this is a fail on large regions
913 uint gtmp = (uint)globalPos.X >> 8; 913 uint gtmp = (uint)globalPos.X >> 8;
914 globalPos.X -= (gtmp << 8); 914 globalPos.X -= (gtmp << 8);
915 915
@@ -975,7 +975,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
975 /// Enabled. 975 /// Enabled.
976 /// </param> 976 /// </param>
977 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled) 977 public void PickInfoUpdate(IClientAPI remoteClient, UUID pickID, UUID creatorID, bool topPick, string name, string desc, UUID snapshotID, int sortOrder, bool enabled)
978 { 978 {
979 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); 979 m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString());
980 980
981 UserProfilePick pick = new UserProfilePick(); 981 UserProfilePick pick = new UserProfilePick();
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1012 else 1012 else
1013 { 1013 {
1014 m_log.WarnFormat( 1014 m_log.WarnFormat(
1015 "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}", 1015 "[PROFILES]: PickInfoUpdate found no parcel info at {0},{1} in {2}",
1016 avaPos.X, avaPos.Y, p.Scene.Name); 1016 avaPos.X, avaPos.Y, p.Scene.Name);
1017 } 1017 }
1018 1018
@@ -1146,7 +1146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1146 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 1146 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
1147 return; 1147 return;
1148 } 1148 }
1149 note = (UserProfileNotes) Note; 1149 note = (UserProfileNotes) Note;
1150 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes); 1150 remoteClient.SendAvatarNotesReply(note.TargetId, note.Notes);
1151 } 1151 }
1152 1152
@@ -1225,10 +1225,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1225 { 1225 {
1226 m_log.InfoFormat("[PROFILES]: UserPreferences update error"); 1226 m_log.InfoFormat("[PROFILES]: UserPreferences update error");
1227 remoteClient.SendAgentAlertMessage("Error updating preferences", false); 1227 remoteClient.SendAgentAlertMessage("Error updating preferences", false);
1228 return; 1228 return;
1229 } 1229 }
1230 } 1230 }
1231 1231
1232 /// <summary> 1232 /// <summary>
1233 /// Users the preferences request. 1233 /// Users the preferences request.
1234 /// </summary> 1234 /// </summary>
@@ -1256,7 +1256,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1256 pref = (UserPreferences) Pref; 1256 pref = (UserPreferences) Pref;
1257 1257
1258 remoteClient.SendUserInfoReply(pref.IMViaEmail, pref.Visible, pref.EMail); 1258 remoteClient.SendUserInfoReply(pref.IMViaEmail, pref.Visible, pref.EMail);
1259 1259
1260 } 1260 }
1261 #endregion User Preferences 1261 #endregion User Preferences
1262 1262
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1437 { 1437 {
1438 props.AboutText ="Profile not available at this time. User may still be unknown to this grid"; 1438 props.AboutText ="Profile not available at this time. User may still be unknown to this grid";
1439 } 1439 }
1440 1440
1441 if(!m_allowUserProfileWebURLs) 1441 if(!m_allowUserProfileWebURLs)
1442 props.WebUrl =""; 1442 props.WebUrl ="";
1443 1443
@@ -1568,7 +1568,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1568 { 1568 {
1569 m_log.Debug( 1569 m_log.Debug(
1570 string.Format( 1570 string.Format(
1571 "[PROFILES]: Request using the OpenProfile API for user {0} to {1} failed", 1571 "[PROFILES]: Request using the OpenProfile API for user {0} to {1} failed",
1572 properties.UserId, serverURI), 1572 properties.UserId, serverURI),
1573 e); 1573 e);
1574 1574
@@ -1586,7 +1586,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1586 return false; 1586 return false;
1587 } 1587 }
1588 } 1588 }
1589 1589
1590 properties = (UserProfileProperties)Prop; 1590 properties = (UserProfileProperties)Prop;
1591 if(foreign) 1591 if(foreign)
1592 { 1592 {
@@ -1704,7 +1704,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1704 { 1704 {
1705 bool local; 1705 bool local;
1706 local = UserManagementModule.IsLocalGridUser(userID); 1706 local = UserManagementModule.IsLocalGridUser(userID);
1707 1707
1708 if (!local) 1708 if (!local)
1709 { 1709 {
1710 serverURI = UserManagementModule.GetUserServerURL(userID, "GatekeeperURI"); 1710 serverURI = UserManagementModule.GetUserServerURL(userID, "GatekeeperURI");
@@ -1761,13 +1761,13 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1761 1761
1762 string imageIDstr = imageID.ToString(); 1762 string imageIDstr = imageID.ToString();
1763 1763
1764 1764
1765 if(m_assetCache != null && m_assetCache.Check(imageIDstr)) 1765 if(m_assetCache != null && m_assetCache.Check(imageIDstr))
1766 return; 1766 return;
1767 1767
1768 if(Scene.AssetService.Get(imageIDstr) != null) 1768 if(Scene.AssetService.Get(imageIDstr) != null)
1769 return; 1769 return;
1770 1770
1771 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, imageIDstr)); 1771 Scene.AssetService.Get(string.Format("{0}/{1}", assetServerURI, imageIDstr));
1772 } 1772 }
1773 1773
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1876 1876
1877 if (mret.ContainsKey("error")) 1877 if (mret.ContainsKey("error"))
1878 return false; 1878 return false;
1879 1879
1880 // get params... 1880 // get params...
1881 OSD.DeserializeMembers(ref parameters, (OSDMap) mret["result"]); 1881 OSD.DeserializeMembers(ref parameters, (OSDMap) mret["result"]);
1882 return true; 1882 return true;
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
index 386694a..292099d 100644
--- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
@@ -47,23 +47,23 @@ namespace OpenSim.Region.CoreModules.Framework
47{ 47{
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CapabilitiesModule")]
49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule 49 public class CapabilitiesModule : INonSharedRegionModule, ICapabilitiesModule
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n"; 53 private string m_showCapsCommandFormat = " {0,-38} {1,-60}\n";
54 54
55 protected Scene m_scene; 55 protected Scene m_scene;
56 56
57 /// <summary> 57 /// <summary>
58 /// Each agent has its own capabilities handler. 58 /// Each agent has its own capabilities handler.
59 /// </summary> 59 /// </summary>
60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>(); 60 protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>();
61 61
62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>(); 62 protected Dictionary<UUID, string> m_capsPaths = new Dictionary<UUID, string>();
63 63
64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds 64 protected Dictionary<UUID, Dictionary<ulong, string>> m_childrenSeeds
65 = new Dictionary<UUID, Dictionary<ulong, string>>(); 65 = new Dictionary<UUID, Dictionary<ulong, string>>();
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 } 69 }
@@ -101,16 +101,16 @@ namespace OpenSim.Region.CoreModules.Framework
101 { 101 {
102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this); 102 m_scene.UnregisterModuleInterface<ICapabilitiesModule>(this);
103 } 103 }
104 104
105 public void PostInitialise() 105 public void PostInitialise()
106 { 106 {
107 } 107 }
108 108
109 public void Close() {} 109 public void Close() {}
110 110
111 public string Name 111 public string Name
112 { 112 {
113 get { return "Capabilities Module"; } 113 get { return "Capabilities Module"; }
114 } 114 }
115 115
116 public Type ReplaceableInterface 116 public Type ReplaceableInterface
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Framework
154 // new object created below 154 // new object created below
155 oldCaps.DeregisterHandlers(); 155 oldCaps.DeregisterHandlers();
156 156
157 // Better safe ... should not be needed but also 157 // Better safe ... should not be needed but also
158 // no big deal 158 // no big deal
159 m_capsObjects.Remove(circuitCode); 159 m_capsObjects.Remove(circuitCode);
160 } 160 }
@@ -215,7 +215,7 @@ namespace OpenSim.Region.CoreModules.Framework
215 } 215 }
216 } 216 }
217 } 217 }
218 218
219 public Caps GetCapsForUser(uint circuitCode) 219 public Caps GetCapsForUser(uint circuitCode)
220 { 220 {
221 lock (m_capsObjects) 221 lock (m_capsObjects)
@@ -225,10 +225,10 @@ namespace OpenSim.Region.CoreModules.Framework
225 return m_capsObjects[circuitCode]; 225 return m_capsObjects[circuitCode];
226 } 226 }
227 } 227 }
228 228
229 return null; 229 return null;
230 } 230 }
231 231
232 public void ActivateCaps(uint circuitCode) 232 public void ActivateCaps(uint circuitCode)
233 { 233 {
234 lock (m_capsObjects) 234 lock (m_capsObjects)
@@ -246,10 +246,10 @@ namespace OpenSim.Region.CoreModules.Framework
246 m_capsPaths[agent.AgentID] = agent.CapsPath; 246 m_capsPaths[agent.AgentID] = agent.CapsPath;
247 247
248 lock (m_childrenSeeds) 248 lock (m_childrenSeeds)
249 m_childrenSeeds[agent.AgentID] 249 m_childrenSeeds[agent.AgentID]
250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); 250 = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds);
251 } 251 }
252 252
253 public string GetCapsPath(UUID agentId) 253 public string GetCapsPath(UUID agentId)
254 { 254 {
255 lock (m_capsPaths) 255 lock (m_capsPaths)
@@ -262,7 +262,7 @@ namespace OpenSim.Region.CoreModules.Framework
262 262
263 return null; 263 return null;
264 } 264 }
265 265
266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID) 266 public Dictionary<ulong, string> GetChildrenSeeds(UUID agentID)
267 { 267 {
268 Dictionary<ulong, string> seeds = null; 268 Dictionary<ulong, string> seeds = null;
@@ -414,8 +414,8 @@ namespace OpenSim.Region.CoreModules.Framework
414 { 414 {
415 receivedStats[sp.Name] = reqHandler.RequestsReceived; 415 receivedStats[sp.Name] = reqHandler.RequestsReceived;
416 handledStats[sp.Name] = reqHandler.RequestsHandled; 416 handledStats[sp.Name] = reqHandler.RequestsHandled;
417 } 417 }
418 else 418 else
419 { 419 {
420 PollServiceEventArgs pollHandler = null; 420 PollServiceEventArgs pollHandler = null;
421 if (caps.TryGetPollHandler(capName, out pollHandler)) 421 if (caps.TryGetPollHandler(capName, out pollHandler))
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Framework
454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID); 454 Caps caps = m_scene.CapsModule.GetCapsForUser(sp.UUID);
455 455
456 if (caps == null) 456 if (caps == null)
457 return; 457 return;
458 458
459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values) 459 foreach (IRequestHandler reqHandler in caps.CapsHandlers.GetCapsHandlers().Values)
460 { 460 {
@@ -490,7 +490,7 @@ namespace OpenSim.Region.CoreModules.Framework
490 } 490 }
491 } 491 }
492 ); 492 );
493 493
494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value)) 494 foreach (KeyValuePair<string, int> kvp in receivedStats.OrderByDescending(kp => kp.Value))
495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]); 495 cdt.AddRow(kvp.Key, kvp.Value, handledStats[kvp.Key]);
496 496
@@ -559,7 +559,7 @@ namespace OpenSim.Region.CoreModules.Framework
559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled)); 559 capRows.Add(new CapTableRow(kvp.Key, kvp.Value.RequestsReceived, kvp.Value.RequestsHandled));
560 560
561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived)) 561 foreach (CapTableRow ctr in capRows.OrderByDescending(ctr => ctr.RequestsReceived))
562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled); 562 cdt.AddRow(ctr.Name, ctr.RequestsReceived, ctr.RequestsHandled);
563 563
564 sb.Append(cdt.ToString()); 564 sb.Append(cdt.ToString());
565 */ 565 */
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Framework
601 totalRequestsReceived += handler.RequestsReceived; 601 totalRequestsReceived += handler.RequestsReceived;
602 totalRequestsHandled += handler.RequestsHandled; 602 totalRequestsHandled += handler.RequestsHandled;
603 } 603 }
604 604
605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled); 605 cdt.AddRow(sp.Name, sp.IsChildAgent ? "child" : "root", totalRequestsReceived, totalRequestsHandled);
606 } 606 }
607 ); 607 );
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index 0c632b1..d652f43 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -53,12 +53,12 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
53 53
54 protected Scene m_scene; 54 protected Scene m_scene;
55 protected IDialogModule m_dialogMod; 55 protected IDialogModule m_dialogMod;
56 56
57 public string Name { get { return "DAExample Module"; } } 57 public string Name { get { return "DAExample Module"; } }
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) {} 60 public void Initialise(IConfigSource source) {}
61 61
62 public void AddRegion(Scene scene) 62 public void AddRegion(Scene scene)
63 { 63 {
64 if (ENABLED) 64 if (ENABLED)
@@ -70,22 +70,22 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name); 70 m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
71 } 71 }
72 } 72 }
73 73
74 public void RemoveRegion(Scene scene) 74 public void RemoveRegion(Scene scene)
75 { 75 {
76 if (ENABLED) 76 if (ENABLED)
77 { 77 {
78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 78 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
79 } 79 }
80 } 80 }
81 81
82 public void RegionLoaded(Scene scene) {} 82 public void RegionLoaded(Scene scene) {}
83 83
84 public void Close() 84 public void Close()
85 { 85 {
86 RemoveRegion(m_scene); 86 RemoveRegion(m_scene);
87 } 87 }
88 88
89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta) 89 protected bool OnSceneGroupMove(UUID groupId, Vector3 delta)
90 { 90 {
91 OSDMap attrs = null; 91 OSDMap attrs = null;
@@ -96,28 +96,28 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
96 96
97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs)) 97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs))
98 attrs = new OSDMap(); 98 attrs = new OSDMap();
99 99
100 OSDInteger newValue; 100 OSDInteger newValue;
101 101
102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code. 102 // We have to lock on the entire dynamic attributes map to avoid race conditions with serialization code.
103 lock (sop.DynAttrs) 103 lock (sop.DynAttrs)
104 { 104 {
105 if (!attrs.ContainsKey("moves")) 105 if (!attrs.ContainsKey("moves"))
106 newValue = new OSDInteger(1); 106 newValue = new OSDInteger(1);
107 else 107 else
108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1); 108 newValue = new OSDInteger(attrs["moves"].AsInteger() + 1);
109 109
110 attrs["moves"] = newValue; 110 attrs["moves"] = newValue;
111 111
112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs); 112 sop.DynAttrs.SetStore(Namespace, StoreName, attrs);
113 } 113 }
114 114
115 sop.ParentGroup.HasGroupChanged = true; 115 sop.ParentGroup.HasGroupChanged = true;
116 116
117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue); 117 string msg = string.Format("{0} {1} moved {2} times", sop.Name, sop.UUID, newValue);
118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg); 118 m_log.DebugFormat("[DA EXAMPLE MODULE]: {0}", msg);
119 m_dialogMod.SendGeneralAlert(msg); 119 m_dialogMod.SendGeneralAlert(msg);
120 120
121 return true; 121 return true;
122 } 122 }
123 } 123 }
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
index 166a994..3364cbc 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
65 private Scene m_scene; 65 private Scene m_scene;
66 private IDialogModule m_dialogMod; 66 private IDialogModule m_dialogMod;
67 67
68 public string Name { get { return "DO"; } } 68 public string Name { get { return "DO"; } }
69 public Type ReplaceableInterface { get { return null; } } 69 public Type ReplaceableInterface { get { return null; } }
70 70
71 public void Initialise(IConfigSource source) {} 71 public void Initialise(IConfigSource source) {}
72 72
73 public void AddRegion(Scene scene) 73 public void AddRegion(Scene scene)
74 { 74 {
75 if (ENABLED) 75 if (ENABLED)
@@ -80,18 +80,18 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); 80 m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
81 } 81 }
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86 if (ENABLED) 86 if (ENABLED)
87 { 87 {
88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove; 88 m_scene.EventManager.OnSceneGroupMove -= OnSceneGroupMove;
89 } 89 }
90 } 90 }
91 91
92 public void RegionLoaded(Scene scene) {} 92 public void RegionLoaded(Scene scene) {}
93 93
94 public void Close() 94 public void Close()
95 { 95 {
96 RemoveRegion(m_scene); 96 RemoveRegion(m_scene);
97 } 97 }
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
116 116
117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar)); 117 rootPart.DynObjs.Add(DAExampleModule.Namespace, Name, new MyObject(movesSoFar));
118 } 118 }
119 119
120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta) 120 private bool OnSceneGroupMove(UUID groupId, Vector3 delta)
121 { 121 {
122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId); 122 SceneObjectGroup so = m_scene.GetSceneObjectGroup(groupId);
@@ -129,11 +129,11 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
129 if (rawObj != null) 129 if (rawObj != null)
130 { 130 {
131 MyObject myObj = (MyObject)rawObj; 131 MyObject myObj = (MyObject)rawObj;
132 132
133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves)); 133 m_dialogMod.SendGeneralAlert(string.Format("{0} {1} moved {2} times", so.Name, so.UUID, ++myObj.Moves));
134 } 134 }
135 135
136 return true; 136 return true;
137 } 137 }
138 } 138 }
139} \ No newline at end of file 139} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 58d6cf2..6b1eb54 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -72,9 +72,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests. 72 /// If true then we ask the viewer to disable teleport cancellation and ignore teleport requests.
73 /// </summary> 73 /// </summary>
74 /// <remarks> 74 /// <remarks>
75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a 75 /// This is useful in situations where teleport is very likely to always succeed and we want to avoid a
76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the 76 /// situation where avatars can be come 'stuck' due to a failed teleport cancellation. Unfortunately, the
77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport 77 /// nature of the teleport protocol makes it extremely difficult (maybe impossible) to make teleport
78 /// cancellation consistently suceed. 78 /// cancellation consistently suceed.
79 /// </remarks> 79 /// </remarks>
80 public bool DisableInterRegionTeleportCancellation { get; set; } 80 public bool DisableInterRegionTeleportCancellation { get; set; }
@@ -221,12 +221,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
221 IConfig transferConfig = source.Configs["EntityTransfer"]; 221 IConfig transferConfig = source.Configs["EntityTransfer"];
222 if (transferConfig != null) 222 if (transferConfig != null)
223 { 223 {
224 DisableInterRegionTeleportCancellation 224 DisableInterRegionTeleportCancellation
225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); 225 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
226 226
227 WaitForAgentArrivedAtDestination 227 WaitForAgentArrivedAtDestination
228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); 228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault);
229 229
230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance); 230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance);
231 } 231 }
232 else 232 else
@@ -250,7 +250,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
250 250
251 Scene = scene; 251 Scene = scene;
252 252
253 m_interRegionTeleportAttempts = 253 m_interRegionTeleportAttempts =
254 new Stat( 254 new Stat(
255 "InterRegionTeleportAttempts", 255 "InterRegionTeleportAttempts",
256 "Number of inter-region teleports attempted.", 256 "Number of inter-region teleports attempted.",
@@ -263,7 +263,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
263 null, 263 null,
264 StatVerbosity.Debug); 264 StatVerbosity.Debug);
265 265
266 m_interRegionTeleportAborts = 266 m_interRegionTeleportAborts =
267 new Stat( 267 new Stat(
268 "InterRegionTeleportAborts", 268 "InterRegionTeleportAborts",
269 "Number of inter-region teleports aborted due to client actions.", 269 "Number of inter-region teleports aborted due to client actions.",
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
275 null, 275 null,
276 StatVerbosity.Debug); 276 StatVerbosity.Debug);
277 277
278 m_interRegionTeleportCancels = 278 m_interRegionTeleportCancels =
279 new Stat( 279 new Stat(
280 "InterRegionTeleportCancels", 280 "InterRegionTeleportCancels",
281 "Number of inter-region teleports cancelled by the client.", 281 "Number of inter-region teleports cancelled by the client.",
@@ -287,7 +287,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
287 null, 287 null,
288 StatVerbosity.Debug); 288 StatVerbosity.Debug);
289 289
290 m_interRegionTeleportFailures = 290 m_interRegionTeleportFailures =
291 new Stat( 291 new Stat(
292 "InterRegionTeleportFailures", 292 "InterRegionTeleportFailures",
293 "Number of inter-region teleports that failed due to server/client/network issues.", 293 "Number of inter-region teleports that failed due to server/client/network issues.",
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
321 321
322 public virtual void Close() {} 322 public virtual void Close() {}
323 323
324 public virtual void RemoveRegion(Scene scene) 324 public virtual void RemoveRegion(Scene scene)
325 { 325 {
326 if (m_Enabled) 326 if (m_Enabled)
327 { 327 {
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting)) 349 if (client.IsLoggingOut && m_entityTransferStateMachine.UpdateInTransit(client.AgentId, AgentTransferState.Aborting))
350 { 350 {
351 m_log.DebugFormat( 351 m_log.DebugFormat(
352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout", 352 "[ENTITY TRANSFER MODULE]: Aborted teleport request from {0} in {1} due to simultaneous logout",
353 client.Name, Scene.Name); 353 client.Name, Scene.Name);
354 } 354 }
355 } 355 }
@@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit."); 672 sp.ControllingClient.SendTeleportFailed("Agent is already in transit.");
673 return; 673 return;
674 } 674 }
675 675
676 try 676 try
677 { 677 {
678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags); 678 DoTeleportInternal(sp, reg, finalDestination, position, lookAt, teleportFlags);
@@ -766,7 +766,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
766 m_interRegionTeleportAttempts.Value++; 766 m_interRegionTeleportAttempts.Value++;
767 767
768 m_log.DebugFormat( 768 m_log.DebugFormat(
769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}", 769 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}",
770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion); 770 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion);
771 771
772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 772 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
@@ -797,7 +797,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo(); 797 AgentCircuitData agentCircuit = sp.ControllingClient.RequestClientInfo();
798 agentCircuit.startpos = position; 798 agentCircuit.startpos = position;
799 agentCircuit.child = true; 799 agentCircuit.child = true;
800 800
801// agentCircuit.Appearance = sp.Appearance; 801// agentCircuit.Appearance = sp.Appearance;
802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false); 802// agentCircuit.Appearance = new AvatarAppearance(sp.Appearance, true, false);
803 agentCircuit.Appearance = new AvatarAppearance(); 803 agentCircuit.Appearance = new AvatarAppearance();
@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
814 } 814 }
815 815
816 IClientIPEndpoint ipepClient; 816 IClientIPEndpoint ipepClient;
817 817
818 uint newRegionX, newRegionY, oldRegionX, oldRegionY; 818 uint newRegionX, newRegionY, oldRegionX, oldRegionY;
819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY); 819 Util.RegionHandleToRegionLoc(destinationHandle, out newRegionX, out newRegionY);
820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY); 820 Util.RegionHandleToRegionLoc(sourceRegion.RegionHandle, out oldRegionX, out oldRegionY);
@@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
853 if (ctx.OutboundVersion >= 0.2f) 853 if (ctx.OutboundVersion >= 0.2f)
854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason); 854 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason);
855 else 855 else
856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason); 856 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason);
857 } 857 }
858 858
859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 859 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
@@ -863,12 +863,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 863 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
864 864
865 m_log.DebugFormat( 865 m_log.DebugFormat(
866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}", 866 "[ENTITY TRANSFER MODULE]: Using TP V1 for {0} going from {1} to {2}",
867 sp.Name, Scene.Name, finalDestination.RegionName); 867 sp.Name, Scene.Name, finalDestination.RegionName);
868 868
869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 869 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
870 870
871 // Let's create an agent there if one doesn't exist yet. 871 // Let's create an agent there if one doesn't exist yet.
872 // NOTE: logout will always be false for a non-HG teleport. 872 // NOTE: logout will always be false for a non-HG teleport.
873 bool logout = false; 873 bool logout = false;
874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 874 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -953,7 +953,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
953 SetCallbackURL(agent, sp.Scene.RegionInfo); 953 SetCallbackURL(agent, sp.Scene.RegionInfo);
954 954
955 955
956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to 956 // We will check for an abort before UpdateAgent since UpdateAgent will require an active viewer to
957 // establish th econnection to the destination which makes it return true. 957 // establish th econnection to the destination which makes it return true.
958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting) 958 if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
959 { 959 {
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
966 return; 966 return;
967 } 967 }
968 968
969 // A common teleport failure occurs when we can send CreateAgent to the 969 // A common teleport failure occurs when we can send CreateAgent to the
970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between 970 // destination region but the viewer cannot establish the connection (e.g. due to network issues between
971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then 971 // the viewer and the destination). In this case, UpdateAgent timesout after 10 seconds, although then
972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail(). 972 // there's a further 10 second wait whilst we attempt to tell the destination to delete the agent in Fail().
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1010 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1011 1011
1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1012 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1013 // where that neighbour simulator could otherwise request a child agent create on the source which then 1013 // where that neighbour simulator could otherwise request a child agent create on the source which then
1014 // closes our existing agent which is still signalled as root. 1014 // closes our existing agent which is still signalled as root.
1015 sp.IsChildAgent = true; 1015 sp.IsChildAgent = true;
1016 1016
@@ -1071,7 +1071,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1071 AgentHasMovedAway(sp, logout); 1071 AgentHasMovedAway(sp, logout);
1072 1072
1073 sp.HasMovedAway(!(OutSideViewRange || logout)); 1073 sp.HasMovedAway(!(OutSideViewRange || logout));
1074 1074
1075// ulong sourceRegionHandle = sp.RegionHandle; 1075// ulong sourceRegionHandle = sp.RegionHandle;
1076 1076
1077 // Now let's make it officially a child agent 1077 // Now let's make it officially a child agent
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1107 1107
1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);; 1108 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);;
1109 1109
1110 // Let's create an agent there if one doesn't exist yet. 1110 // Let's create an agent there if one doesn't exist yet.
1111 // NOTE: logout will always be false for a non-HG teleport. 1111 // NOTE: logout will always be false for a non-HG teleport.
1112 bool logout = false; 1112 bool logout = false;
1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout)) 1113 if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, ctx, out reason, out logout))
@@ -1150,7 +1150,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); 1150 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring);
1151 1151
1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator, 1152 // We need to set this here to avoid an unlikely race condition when teleporting to a neighbour simulator,
1153 // where that neighbour simulator could otherwise request a child agent create on the source which then 1153 // where that neighbour simulator could otherwise request a child agent create on the source which then
1154 // closes our existing agent which is still signalled as root. 1154 // closes our existing agent which is still signalled as root.
1155 //sp.IsChildAgent = true; 1155 //sp.IsChildAgent = true;
1156 1156
@@ -1166,7 +1166,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}", 1166 "[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} from {1} to {2}",
1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name); 1167 capsPath, sp.Scene.RegionInfo.RegionName, sp.Name);
1168 1168
1169 // Let's send a full update of the agent. 1169 // Let's send a full update of the agent.
1170 AgentData agent = new AgentData(); 1170 AgentData agent = new AgentData();
1171 sp.CopyTo(agent,false); 1171 sp.CopyTo(agent,false);
1172 agent.Position = agentCircuit.startpos; 1172 agent.Position = agentCircuit.startpos;
@@ -1207,7 +1207,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1207 sp.IsInTransit = false; 1207 sp.IsInTransit = false;
1208 return; 1208 return;
1209 } 1209 }
1210 1210
1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1211 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1212 1212
1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this 1213 // Need to signal neighbours whether child agents may need closing irrespective of whether this
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1248// Thread.Sleep(1000); 1248// Thread.Sleep(1000);
1249 1249
1250 // OK, it got this agent. Let's close everything 1250 // OK, it got this agent. Let's close everything
1251 // If we shouldn't close the agent due to some other region renewing the connection 1251 // If we shouldn't close the agent due to some other region renewing the connection
1252 // then this will be handled in IncomingCloseAgent under lock conditions 1252 // then this will be handled in IncomingCloseAgent under lock conditions
1253 m_log.DebugFormat( 1253 m_log.DebugFormat(
1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1254 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
@@ -1258,7 +1258,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1258/* 1258/*
1259 else 1259 else
1260 { 1260 {
1261 // now we have a child agent in this region. 1261 // now we have a child agent in this region.
1262 sp.Reset(); 1262 sp.Reset();
1263 } 1263 }
1264 */ 1264 */
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1343 /// </summary> 1343 /// </summary>
1344 /// <param name='sp'></param> 1344 /// <param name='sp'></param>
1345 /// <param name='logout'></param> 1345 /// <param name='logout'></param>
1346 /// 1346 ///
1347 /// now just a HG hook 1347 /// now just a HG hook
1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) 1348 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout)
1349 { 1349 {
@@ -1375,7 +1375,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1375 1375
1376 // HG Hook 1376 // HG Hook
1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange) 1377 protected virtual bool NeedsClosing(GridRegion reg, bool OutViewRange)
1378 1378
1379 { 1379 {
1380 return OutViewRange; 1380 return OutViewRange;
1381 } 1381 }
@@ -1399,11 +1399,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1399 remoteClient.SendTeleportFailed("The teleport destination could not be found."); 1399 remoteClient.SendTeleportFailed("The teleport destination could not be found.");
1400 return; 1400 return;
1401 } 1401 }
1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position, 1402 ((Scene)(remoteClient.Scene)).RequestTeleportLocation(remoteClient, info.RegionHandle, lm.Position,
1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 1403 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
1404 } 1404 }
1405 1405
1406 #endregion 1406 #endregion
1407 1407
1408 #region Teleport Home 1408 #region Teleport Home
1409 1409
@@ -1437,7 +1437,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1437 client.SendTeleportFailed("Your home region could not be found."); 1437 client.SendTeleportFailed("Your home region could not be found.");
1438 return false; 1438 return false;
1439 } 1439 }
1440 1440
1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", 1441 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})",
1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY); 1442 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY);
1443 1443
@@ -1475,7 +1475,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1475 1475
1476 Scene ascene = agent.Scene; 1476 Scene ascene = agent.Scene;
1477 string homeURI = ascene.GetAgentHomeURI(agentID); 1477 string homeURI = ascene.GetAgentHomeURI(agentID);
1478 1478
1479 1479
1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position, 1480 if (!ascene.SimulationService.QueryAccess(destiny, agentID, homeURI, false, position,
1481 agent.Scene.GetFormatsOffered(), ctx, out reason)) 1481 agent.Scene.GetFormatsOffered(), ctx, out reason))
@@ -1489,7 +1489,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1489 1489
1490 // Given a position relative to the current region and outside of it 1490 // Given a position relative to the current region and outside of it
1491 // find the new region that the point is actually in. 1491 // find the new region that the point is actually in.
1492 // returns 'null' if new region not found or if information 1492 // returns 'null' if new region not found or if information
1493 // and new position relative to it 1493 // and new position relative to it
1494 // now only works for crossings 1494 // now only works for crossings
1495 1495
@@ -1611,14 +1611,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1611 Thread.Sleep(10000); 1611 Thread.Sleep(10000);
1612 1612
1613 m_log.DebugFormat( 1613 m_log.DebugFormat(
1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}", 1614 "[ENTITY TRANSFER MODULE]: Auto-reteleporting {0} to correct megaregion location {1},{2},{3} from {4}",
1615 agent.Name, regionX, regionY, position, initiatingScene.Name); 1615 agent.Name, regionX, regionY, position, initiatingScene.Name);
1616 1616
1617 agent.Scene.RequestTeleportLocation( 1617 agent.Scene.RequestTeleportLocation(
1618 agent.ControllingClient, 1618 agent.ControllingClient,
1619 Util.RegionGridLocToHandle(regionX, regionY), 1619 Util.RegionGridLocToHandle(regionX, regionY),
1620 position, 1620 position,
1621 agent.Lookat, 1621 agent.Lookat,
1622 (uint)Constants.TeleportFlags.ViaLocation); 1622 (uint)Constants.TeleportFlags.ViaLocation);
1623 1623
1624 /* 1624 /*
@@ -1662,7 +1662,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1662 icon.EndInvoke(iar); 1662 icon.EndInvoke(iar);
1663 } 1663 }
1664 1664
1665 1665
1666 1666
1667 /// <summary> 1667 /// <summary>
1668 /// This Closes child agents on neighbouring regions 1668 /// This Closes child agents on neighbouring regions
@@ -1708,7 +1708,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1708 int ts = Util.EnvironmentTickCount(); 1708 int ts = Util.EnvironmentTickCount();
1709 try 1709 try
1710 { 1710 {
1711 AgentData cAgent = new AgentData(); 1711 AgentData cAgent = new AgentData();
1712 agent.CopyTo(cAgent,true); 1712 agent.CopyTo(cAgent,true);
1713 1713
1714// agent.Appearance.WearableCacheItems = null; 1714// agent.Appearance.WearableCacheItems = null;
@@ -1731,7 +1731,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); 1731 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
1732 1732
1733 m_log.WarnFormat( 1733 m_log.WarnFormat(
1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.", 1734 "[ENTITY TRANSFER MODULE]: Region {0} would not accept update for agent {1} on cross attempt. Returning to original region.",
1735 neighbourRegion.RegionName, agent.Name); 1735 neighbourRegion.RegionName, agent.Name);
1736 1736
1737 ReInstantiateScripts(agent); 1737 ReInstantiateScripts(agent);
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1827 1827
1828 return; 1828 return;
1829 } 1829 }
1830 1830
1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar) 1831 private void CrossAgentToNewRegionCompleted(IAsyncResult iar)
1832 { 1832 {
1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState; 1833 CrossAgentToNewRegionDelegate icon = (CrossAgentToNewRegionDelegate)iar.AsyncState;
@@ -2167,7 +2167,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2167 return false; 2167 return false;
2168 } 2168 }
2169 } 2169 }
2170 2170
2171 private void DoExpiration() 2171 private void DoExpiration()
2172 { 2172 {
2173 List<ulong> m_toRemove = new List<ulong>();; 2173 List<ulong> m_toRemove = new List<ulong>();;
@@ -2179,7 +2179,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2179 if (kvp.Value < now) 2179 if (kvp.Value < now)
2180 m_toRemove.Add(kvp.Key); 2180 m_toRemove.Add(kvp.Key);
2181 } 2181 }
2182 2182
2183 if (m_toRemove.Count > 0) 2183 if (m_toRemove.Count > 0)
2184 { 2184 {
2185 foreach (ulong u in m_toRemove) 2185 foreach (ulong u in m_toRemove)
@@ -2199,7 +2199,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2199 // to find possible regions. 2199 // to find possible regions.
2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize); 2200 return GetRegionContainingWorldLocation(pGridService, pScopeID, px, py, Constants.MaximumRegionSize);
2201 } 2201 }
2202 2202
2203 // Given a world position, get the GridRegion info for 2203 // Given a world position, get the GridRegion info for
2204 // the region containing that point. 2204 // the region containing that point.
2205 // for compatibility with old grids it does a scan to find large regions 2205 // for compatibility with old grids it does a scan to find large regions
@@ -2285,7 +2285,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2285 if (newAgent) 2285 if (newAgent)
2286 { 2286 {
2287 // we may already had lost this sp 2287 // we may already had lost this sp
2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2288 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2289 return; 2289 return;
2290 2290
2291 Scene scene = sp.Scene; 2291 Scene scene = sp.Scene;
@@ -2303,13 +2303,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2303 2303
2304 if (regionAccepted) 2304 if (regionAccepted)
2305 { 2305 {
2306 // give time for createAgent to finish, since it is async and does grid services access 2306 // give time for createAgent to finish, since it is async and does grid services access
2307 Thread.Sleep(500); 2307 Thread.Sleep(500);
2308 2308
2309 if (m_eqModule != null) 2309 if (m_eqModule != null)
2310 { 2310 {
2311 #region IP Translation for NAT 2311 #region IP Translation for NAT
2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened 2312 if(sp == null || sp.IsDeleted || sp.ClientView == null) // something bad already happened
2313 return; 2313 return;
2314 2314
2315 IClientIPEndpoint ipepClient; 2315 IClientIPEndpoint ipepClient;
@@ -2344,7 +2344,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2344 reg.RegionName, sp.Name, sp.UUID, reason); 2344 reg.RegionName, sp.Name, sp.UUID, reason);
2345 } 2345 }
2346 } 2346 }
2347 2347
2348 } 2348 }
2349 2349
2350 /// <summary> 2350 /// <summary>
@@ -2353,7 +2353,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2353 /// <param name="avatar"></param> 2353 /// <param name="avatar"></param>
2354 /// <param name="pRegionLocX"></param> 2354 /// <param name="pRegionLocX"></param>
2355 /// <param name="pRegionLocY"></param> 2355 /// <param name="pRegionLocY"></param>
2356 /// <returns></returns> 2356 /// <returns></returns>
2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY) 2357 protected List<GridRegion> GetNeighbors(ScenePresence avatar, uint pRegionLocX, uint pRegionLocY)
2358 { 2358 {
2359 Scene pScene = avatar.Scene; 2359 Scene pScene = avatar.Scene;
@@ -2588,7 +2588,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID)) 2588 if (Scene.RegionInfo.EstateSettings.IsBanned(so.OwnerID))
2589 { 2589 {
2590 m_log.DebugFormat( 2590 m_log.DebugFormat(
2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}", 2591 "[ENTITY TRANSFER MODULE]: Denied prim crossing of {0} {1} into {2} for banned avatar {3}",
2592 so.Name, so.UUID, Scene.Name, so.OwnerID); 2592 so.Name, so.UUID, Scene.Name, so.OwnerID);
2593 2593
2594 return false; 2594 return false;
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2600 if (!Scene.AddSceneObject(so)) 2600 if (!Scene.AddSceneObject(so))
2601 { 2601 {
2602 m_log.DebugFormat( 2602 m_log.DebugFormat(
2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ", 2603 "[ENTITY TRANSFER MODULE]: Problem adding scene object {0} {1} into {2} ",
2604 so.Name, so.UUID, Scene.Name); 2604 so.Name, so.UUID, Scene.Name);
2605 2605
2606 return false; 2606 return false;
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
index acfdaef..0a24555 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferStateMachine.cs
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
169 } 169 }
170 else 170 else
171 { 171 {
172 if (newState == AgentTransferState.Cancelling 172 if (newState == AgentTransferState.Cancelling
173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring)) 173 && (oldState == AgentTransferState.Preparing || oldState == AgentTransferState.Transferring))
174 { 174 {
175 transitionOkay = true; 175 transitionOkay = true;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
181 } 181 }
182 182
183 if (!transitionOkay) 183 if (!transitionOkay)
184 failureMessage 184 failureMessage
185 = string.Format( 185 = string.Format(
186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}", 186 "Agent with ID {0} is not allowed to move from old transit state {1} to new state {2} in {3}",
187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName); 187 id, oldState, newState, m_mod.Scene.RegionInfo.RegionName);
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
192 m_agentsInTransit[id] = newState; 192 m_agentsInTransit[id] = newState;
193 193
194// m_log.DebugFormat( 194// m_log.DebugFormat(
195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}", 195// "[ENTITY TRANSFER STATE MACHINE]: Changed agent with id {0} from state {1} to {2} in {3}",
196// id, oldState, newState, m_mod.Scene.Name); 196// id, oldState, newState, m_mod.Scene.Name);
197 } 197 }
198 else if (failIfNotOkay) 198 else if (failIfNotOkay)
@@ -204,11 +204,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
204// { 204// {
205// if (oldState != null) 205// if (oldState != null)
206// m_log.DebugFormat( 206// m_log.DebugFormat(
207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}", 207// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} from state {1} to {2} in {3}",
208// id, oldState, newState, m_mod.Scene.Name); 208// id, oldState, newState, m_mod.Scene.Name);
209// else 209// else
210// m_log.DebugFormat( 210// m_log.DebugFormat(
211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit", 211// "[ENTITY TRANSFER STATE MACHINE]: Ignored change of agent with id {0} to state {1} in {2} since agent not in transit",
212// id, newState, m_mod.Scene.Name); 212// id, newState, m_mod.Scene.Name);
213// } 213// }
214 } 214 }
@@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
281 { 281 {
282 if (!m_mod.WaitForAgentArrivedAtDestination) 282 if (!m_mod.WaitForAgentArrivedAtDestination)
283 return true; 283 return true;
284 284
285 lock (m_agentsInTransit) 285 lock (m_agentsInTransit)
286 { 286 {
287 AgentTransferState? currentState = GetAgentTransferState(id); 287 AgentTransferState? currentState = GetAgentTransferState(id);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index a9aaf12..4ad500a 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this); 160 scene.RegisterModuleInterface<IUserAgentVerificationModule>(this);
161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject; 161 //scene.EventManager.OnIncomingSceneObject += OnIncomingSceneObject;
162 162
163 m_incomingSceneObjectEngine 163 m_incomingSceneObjectEngine
164 = new JobEngine( 164 = new JobEngine(
165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name), 165 string.Format("HG Incoming Scene Object Engine ({0})", scene.Name),
166 "HG INCOMING SCENE OBJECT ENGINE"); 166 "HG INCOMING SCENE OBJECT ENGINE");
167 167
168 StatsManager.RegisterStat( 168 StatsManager.RegisterStat(
@@ -291,7 +291,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
291 291
292 GridRegion source = new GridRegion(Scene.RegionInfo); 292 GridRegion source = new GridRegion(Scene.RegionInfo);
293 source.RawServerURI = m_GatekeeperURI; 293 source.RawServerURI = m_GatekeeperURI;
294 294
295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason); 295 bool success = connector.LoginAgentToGrid(source, agentCircuit, reg, finalDestination, false, out reason);
296 logout = success; // flag for later logout from this grid; this is an HG TP 296 logout = success; // flag for later logout from this grid; this is an HG TP
297 297
@@ -347,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
347 break; 347 break;
348 } 348 }
349 349
350 if (!found) 350 if (!found)
351 { 351 {
352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i); 352 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Wearable not allowed to go outside {0}", i);
353 return false; 353 return false;
@@ -416,7 +416,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
416 // // Rez needed npc attachments 416 // // Rez needed npc attachments
417 // Scene.AttachmentsModule.RezAttachments(sp); 417 // Scene.AttachmentsModule.RezAttachments(sp);
418 418
419 419
420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>(); 420 // IAvatarFactoryModule module = Scene.RequestModuleInterface<IAvatarFactoryModule>();
421 // //module.SendAppearance(sp.UUID); 421 // //module.SendAppearance(sp.UUID);
422 // module.RequestRebake(sp, false); 422 // module.RequestRebake(sp, false);
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
433 // return base.UpdateAgent(reg, finalDestination, agentData, sp); 433 // return base.UpdateAgent(reg, finalDestination, agentData, sp);
434 //} 434 //}
435 435
436 436
437 public override bool TeleportHome(UUID id, IClientAPI client) 437 public override bool TeleportHome(UUID id, IClientAPI client)
438 { 438 {
439 m_log.DebugFormat( 439 m_log.DebugFormat(
@@ -449,7 +449,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
449 } 449 }
450 450
451 // Foreign user wants to go home 451 // Foreign user wants to go home
452 // 452 //
453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); 453 AgentCircuitData aCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode);
454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI"))) 454 if (aCircuit == null || (aCircuit != null && !aCircuit.ServiceURLs.ContainsKey("HomeURI")))
455 { 455 {
@@ -470,7 +470,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
470 { 470 {
471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e); 471 m_log.Debug("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e);
472 } 472 }
473 473
474 if (finalDestination == null) 474 if (finalDestination == null)
475 { 475 {
476 client.SendTeleportFailed("Your home region could not be found"); 476 client.SendTeleportFailed("Your home region could not be found");
@@ -487,7 +487,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
487 } 487 }
488 488
489 GridRegion homeGatekeeper = MakeRegion(aCircuit); 489 GridRegion homeGatekeeper = MakeRegion(aCircuit);
490 490
491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}", 491 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}",
492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); 492 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName);
493 493
@@ -503,7 +503,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
503 /// <param name="position"></param> 503 /// <param name="position"></param>
504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm) 504 public override void RequestTeleportLandmark(IClientAPI remoteClient, AssetLandmark lm)
505 { 505 {
506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}", 506 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Teleporting agent via landmark to {0} region {1} position {2}",
507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position); 507 (lm.Gatekeeper == string.Empty) ? "local" : lm.Gatekeeper, lm.RegionID, lm.Position);
508 508
509 if (lm.Gatekeeper == string.Empty) 509 if (lm.Gatekeeper == string.Empty)
@@ -521,7 +521,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
521 remoteClient, info.RegionHandle, lm.Position, 521 remoteClient, info.RegionHandle, lm.Position,
522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); 522 Vector3.Zero, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark));
523 } 523 }
524 else 524 else
525 { 525 {
526 // Foreign region 526 // Foreign region
527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); 527 GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
@@ -581,7 +581,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count); 581 jobsRemoved, commonIdToRemove, jobsToReinsert.Count);
582 582
583 if (jobsToReinsert.Count > 0) 583 if (jobsToReinsert.Count > 0)
584 { 584 {
585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert) 585 foreach (JobEngine.Job jobToReinsert in jobsToReinsert)
586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert); 586 m_incomingSceneObjectEngine.QueueJob(jobToReinsert);
587 } 587 }
@@ -611,16 +611,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) 611 if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
612 { 612 {
613 m_incomingSceneObjectEngine.QueueJob( 613 m_incomingSceneObjectEngine.QueueJob(
614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name), 614 string.Format("HG UUID Gather for attachment {0} for {1}", so.Name, aCircuit.Name),
615 () => 615 () =>
616 { 616 {
617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); 617 string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
618 // m_log.DebugFormat( 618 // m_log.DebugFormat(
619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}", 619 // "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset service {2}",
620 // so.Name, so.AttachedAvatar, url); 620 // so.Name, so.AttachedAvatar, url);
621 621
622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>(); 622 IDictionary<UUID, sbyte> ids = new Dictionary<UUID, sbyte>();
623 HGUuidGatherer uuidGatherer 623 HGUuidGatherer uuidGatherer
624 = new HGUuidGatherer(Scene.AssetService, url, ids); 624 = new HGUuidGatherer(Scene.AssetService, url, ids);
625 uuidGatherer.AddForInspection(so); 625 uuidGatherer.AddForInspection(so);
626 626
@@ -646,7 +646,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 646 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
647 647
648 return; 648 return;
649 } 649 }
650 } 650 }
651 651
652 // m_log.DebugFormat( 652 // m_log.DebugFormat(
@@ -657,7 +657,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
657 { 657 {
658 int tickStart = Util.EnvironmentTickCount(); 658 int tickStart = Util.EnvironmentTickCount();
659 659
660 uuidGatherer.FetchAsset(kvp.Key); 660 uuidGatherer.FetchAsset(kvp.Key);
661 661
662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart); 662 int ticksElapsed = Util.EnvironmentTickCountSubtract(tickStart);
663 663
@@ -670,15 +670,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString()); 670 RemoveIncomingSceneObjectJobs(so.OwnerID.ToString());
671 671
672 return; 672 return;
673 } 673 }
674 } 674 }
675 675
676 base.HandleIncomingSceneObject(so, newPosition); 676 base.HandleIncomingSceneObject(so, newPosition);
677 677
678 // m_log.DebugFormat( 678 // m_log.DebugFormat(
679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}", 679 // "[HG ENTITY TRANSFER MODULE]: Completed incoming attachment {0} for HG user {1} with asset server {2}",
680 // so.Name, so.OwnerID, url); 680 // so.Name, so.OwnerID, url);
681 }, 681 },
682 so.OwnerID.ToString()); 682 so.OwnerID.ToString());
683 } 683 }
684 } 684 }
@@ -698,7 +698,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
698 string url = aCircuit.ServiceURLs["HomeURI"].ToString(); 698 string url = aCircuit.ServiceURLs["HomeURI"].ToString();
699 IUserAgentService security = new UserAgentServiceConnector(url); 699 IUserAgentService security = new UserAgentServiceConnector(url);
700 return security.VerifyClient(aCircuit.SessionID, token); 700 return security.VerifyClient(aCircuit.SessionID, token);
701 } 701 }
702 else 702 else
703 { 703 {
704 m_log.DebugFormat( 704 m_log.DebugFormat(
@@ -746,7 +746,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
746 GridRegion region = new GridRegion(); 746 GridRegion region = new GridRegion();
747 747
748 Uri uri = null; 748 Uri uri = null;
749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") || 749 if (!aCircuit.ServiceURLs.ContainsKey("HomeURI") ||
750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri))) 750 (aCircuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(aCircuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri)))
751 return null; 751 return null;
752 752
diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
index b5a4005..63dbb19 100644
--- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
+++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Commander.cs
@@ -41,34 +41,34 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
41 public class Commander : ICommander 41 public class Commander : ICommander
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 /// <value> 45 /// <value>
46 /// Used in runtime class generation 46 /// Used in runtime class generation
47 /// </summary> 47 /// </summary>
48 private string m_generatedApiClassName; 48 private string m_generatedApiClassName;
49 49
50 public string Name 50 public string Name
51 { 51 {
52 get { return m_name; } 52 get { return m_name; }
53 } 53 }
54 private string m_name; 54 private string m_name;
55 55
56 public string Help 56 public string Help
57 { 57 {
58 get 58 get
59 { 59 {
60 StringBuilder sb = new StringBuilder(); 60 StringBuilder sb = new StringBuilder();
61 61
62 sb.AppendLine("=== " + m_name + " ==="); 62 sb.AppendLine("=== " + m_name + " ===");
63 63
64 foreach (ICommand com in m_commands.Values) 64 foreach (ICommand com in m_commands.Values)
65 { 65 {
66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help); 66 sb.AppendLine("* " + Name + " " + com.Name + " - " + com.Help);
67 } 67 }
68 68
69 return sb.ToString(); 69 return sb.ToString();
70 } 70 }
71 } 71 }
72 72
73 /// <summary> 73 /// <summary>
74 /// Constructor 74 /// Constructor
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
78 { 78 {
79 m_name = name; 79 m_name = name;
80 m_generatedApiClassName = m_name[0].ToString().ToUpper(); 80 m_generatedApiClassName = m_name[0].ToString().ToUpper();
81 81
82 if (m_name.Length > 1) 82 if (m_name.Length > 1)
83 m_generatedApiClassName += m_name.Substring(1); 83 m_generatedApiClassName += m_name.Substring(1);
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
87 { 87 {
88 get { return m_commands; } 88 get { return m_commands; }
89 } 89 }
90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); 90 private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>();
91 91
92 #region ICommander Members 92 #region ICommander Members
93 93
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
162 { 162 {
163 if (function != "help") 163 if (function != "help")
164 Console.WriteLine("ERROR: Invalid command - No such command exists"); 164 Console.WriteLine("ERROR: Invalid command - No such command exists");
165 165
166 Console.Write(Help); 166 Console.Write(Help);
167 } 167 }
168 } 168 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
index f54298c..51ae217 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
178 { 178 {
179 UUID uuid = UUID.Zero; 179 UUID uuid = UUID.Zero;
180 UUID.TryParse(meta.CreatorID, out uuid); 180 UUID.TryParse(meta.CreatorID, out uuid);
181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); 181 UserAccount creator = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid);
182 if (creator != null) 182 if (creator != null)
183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName; 183 meta.CreatorID = m_HomeURI + ";" + creator.FirstName + " " + creator.LastName;
184 } 184 }
@@ -300,8 +300,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
300 { 300 {
301 m_log.Error( 301 m_log.Error(
302 string.Format( 302 string.Format(
303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ", 303 "[HG ASSET MAPPER]: Failed to post asset {0} (type {1}, length {2}) referenced from {3} to {4} with exception ",
304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL), 304 asset.ID, asset.Type, asset.Data.Length, assetID, userAssetURL),
305 e); 305 e);
306 306
307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after 307 // For debugging purposes for now we will continue to throw the exception up the stack as was already happening. However, after
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
315 else 315 else
316 { 316 {
317 m_log.DebugFormat( 317 m_log.DebugFormat(
318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}", 318 "[HG ASSET MAPPER]: Didn't post asset {0} referenced from {1} because it already exists in asset server {2}",
319 uuid, assetID, userAssetURL); 319 uuid, assetID, userAssetURL);
320 } 320 }
321 } 321 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 4d7c25b..f89e446 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -91,9 +91,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
91 if (name == Name) 91 if (name == Name)
92 { 92 {
93 m_Enabled = true; 93 m_Enabled = true;
94 94
95 InitialiseCommon(source); 95 InitialiseCommon(source);
96 96
97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name); 97 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
98 98
99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 99 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); 117 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
118 118
119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions", 119 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(source, "serverside_object_permissions",
120 new string[] { "Startup", "Permissions" }, true); 120 new string[] { "Startup", "Permissions" }, true);
121 121
122 } 122 }
123 } 123 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
248 } 248 }
249 249
250 250
251 /// 251 ///
252 /// CapsUpdateInventoryItemAsset 252 /// CapsUpdateInventoryItemAsset
253 /// 253 ///
254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data) 254 public override UUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, UUID itemID, byte[] data)
@@ -268,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
268 return newAssetID; 268 return newAssetID;
269 } 269 }
270 270
271 /// 271 ///
272 /// UpdateInventoryItemAsset 272 /// UpdateInventoryItemAsset
273 /// 273 ///
274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset) 274 public override bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset)
@@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
317 RezSelected, RemoveItem, fromTaskID, attachment); 317 RezSelected, RemoveItem, fromTaskID, attachment);
318 } 318 }
319 319
320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, 320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID,
321 UUID groupID, Vector3 RayEnd, Vector3 RayStart, 321 UUID groupID, Vector3 RayEnd, Vector3 RayStart,
322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
@@ -386,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
386 if (!m_CheckSeparateAssets) 386 if (!m_CheckSeparateAssets)
387 { 387 {
388 if (!UserManagementModule.IsLocalGridUser(userID)) 388 if (!UserManagementModule.IsLocalGridUser(userID))
389 { // foreign 389 { // foreign
390 ScenePresence sp = null; 390 ScenePresence sp = null;
391 if (m_Scene.TryGetScenePresence(userID, out sp)) 391 if (m_Scene.TryGetScenePresence(userID, out sp))
392 { 392 {
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
524 foreach (InventoryItemBase it in content.Items) 524 foreach (InventoryItemBase it in content.Items)
525 it.Name = it.Name + " (Unavailable)"; ; 525 it.Name = it.Name + " (Unavailable)"; ;
526 526
527 // Send the new names 527 // Send the new names
528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray()); 528 inv.SendBulkUpdateInventory(keep.ToArray(), content.Items.ToArray());
529 529
530 } 530 }
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 771e5fe..fcf373b 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
68 return m_UserManagement; 68 return m_UserManagement;
69 } 69 }
70 } 70 }
71 71
72 public bool CoalesceMultipleObjectsToInventory { get; set; } 72 public bool CoalesceMultipleObjectsToInventory { get; set; }
73 73
74 #region INonSharedRegionModule 74 #region INonSharedRegionModule
@@ -92,14 +92,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
92 if (name == Name) 92 if (name == Name)
93 { 93 {
94 m_Enabled = true; 94 m_Enabled = true;
95 95
96 InitialiseCommon(source); 96 InitialiseCommon(source);
97 97
98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name); 98 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
99 } 99 }
100 } 100 }
101 } 101 }
102 102
103 /// <summary> 103 /// <summary>
104 /// Common module config for both this and descendant classes. 104 /// Common module config for both this and descendant classes.
105 /// </summary> 105 /// </summary>
@@ -107,9 +107,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
107 protected virtual void InitialiseCommon(IConfigSource source) 107 protected virtual void InitialiseCommon(IConfigSource source)
108 { 108 {
109 IConfig inventoryConfig = source.Configs["Inventory"]; 109 IConfig inventoryConfig = source.Configs["Inventory"];
110 110
111 if (inventoryConfig != null) 111 if (inventoryConfig != null)
112 CoalesceMultipleObjectsToInventory 112 CoalesceMultipleObjectsToInventory
113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true); 113 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
114 else 114 else
115 CoalesceMultipleObjectsToInventory = true; 115 CoalesceMultipleObjectsToInventory = true;
@@ -322,7 +322,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
322 if (item != null && item.Owner == ownerID && asset != null) 322 if (item != null && item.Owner == ownerID && asset != null)
323 { 323 {
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}", 325// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
326// item.Name, item.ID, asset.ID); 326// item.Name, item.ID, asset.ID);
327 327
328 item.AssetID = asset.FullID; 328 item.AssetID = asset.FullID;
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>(); 351 List<InventoryItemBase> copiedItems = new List<InventoryItemBase>();
352 352
353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>(); 353 Dictionary<UUID, List<SceneObjectGroup>> bundlesToCopy = new Dictionary<UUID, List<SceneObjectGroup>>();
354 354
355 if (CoalesceMultipleObjectsToInventory) 355 if (CoalesceMultipleObjectsToInventory)
356 { 356 {
357 // The following code groups the SOG's by owner. No objects 357 // The following code groups the SOG's by owner. No objects
@@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
361 { 361 {
362 if (!bundlesToCopy.ContainsKey(g.OwnerID)) 362 if (!bundlesToCopy.ContainsKey(g.OwnerID))
363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>(); 363 bundlesToCopy[g.OwnerID] = new List<SceneObjectGroup>();
364 364
365 bundlesToCopy[g.OwnerID].Add(g); 365 bundlesToCopy[g.OwnerID].Add(g);
366 } 366 }
367 } 367 }
@@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
372 { 372 {
373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>(); 373 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>();
374 bundle.Add(g); 374 bundle.Add(g);
375 bundlesToCopy[g.UUID] = bundle; 375 bundlesToCopy[g.UUID] = bundle;
376 } 376 }
377 } 377 }
378 378
@@ -384,10 +384,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
384 // with distinct destinations as well. 384 // with distinct destinations as well.
385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values) 385 foreach (List<SceneObjectGroup> bundle in bundlesToCopy.Values)
386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment)); 386 copiedItems.Add(CopyBundleToInventory(action, folderID, bundle, remoteClient, asAttachment));
387 387
388 return copiedItems; 388 return copiedItems;
389 } 389 }
390 390
391 /// <summary> 391 /// <summary>
392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object 392 /// Copy a bundle of objects to inventory. If there is only one object, then this will create an object
393 /// item. If there are multiple objects then these will be saved as a single coalesced item. 393 /// item. If there are multiple objects then these will be saved as a single coalesced item.
@@ -408,7 +408,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>(); 408 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>();
409 // this possible is not needed if keyframes are saved 409 // this possible is not needed if keyframes are saved
410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>(); 410 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>();
411 411
412 foreach (SceneObjectGroup objectGroup in objlist) 412 foreach (SceneObjectGroup objectGroup in objlist)
413 { 413 {
414 if (objectGroup.RootPart.KeyframeMotion != null) 414 if (objectGroup.RootPart.KeyframeMotion != null)
@@ -457,7 +457,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
457 (uint)PermissionMask.Export); 457 (uint)PermissionMask.Export);
458 objectGroup.RootPart.NextOwnerMask |= 458 objectGroup.RootPart.NextOwnerMask |=
459 (uint)PermissionMask.Move; 459 (uint)PermissionMask.Move;
460 460
461 coa.Add(objectGroup); 461 coa.Add(objectGroup);
462 } 462 }
463 463
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment); 471 itemXml = CoalescedSceneObjectsSerializer.ToXml(coa, !asAttachment);
472 else 472 else
473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment); 473 itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment);
474 474
475 // Restore the position of each group now that it has been stored to inventory. 475 // Restore the position of each group now that it has been stored to inventory.
476 foreach (SceneObjectGroup objectGroup in objlist) 476 foreach (SceneObjectGroup objectGroup in objlist)
477 { 477 {
@@ -493,11 +493,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
493 493
494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); 494 item.CreatorId = objlist[0].RootPart.CreatorID.ToString();
495 item.CreatorData = objlist[0].RootPart.CreatorData; 495 item.CreatorData = objlist[0].RootPart.CreatorData;
496 496
497 if (objlist.Count > 1) 497 if (objlist.Count > 1)
498 { 498 {
499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems; 499 item.Flags = (uint)InventoryItemFlags.ObjectHasMultipleItems;
500 500
501 // If the objects have different creators then don't specify a creator at all 501 // If the objects have different creators then don't specify a creator at all
502 foreach (SceneObjectGroup objectGroup in objlist) 502 foreach (SceneObjectGroup objectGroup in objlist)
503 { 503 {
@@ -513,8 +513,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
513 else 513 else
514 { 514 {
515 item.SaleType = objlist[0].RootPart.ObjectSaleType; 515 item.SaleType = objlist[0].RootPart.ObjectSaleType;
516 item.SalePrice = objlist[0].RootPart.SalePrice; 516 item.SalePrice = objlist[0].RootPart.SalePrice;
517 } 517 }
518 518
519 AssetBase asset = CreateAsset( 519 AssetBase asset = CreateAsset(
520 objlist[0].GetPartName(objlist[0].RootPart.LocalId), 520 objlist[0].GetPartName(objlist[0].RootPart.LocalId),
@@ -523,7 +523,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
523 Utils.StringToBytes(itemXml), 523 Utils.StringToBytes(itemXml),
524 objlist[0].OwnerID.ToString()); 524 objlist[0].OwnerID.ToString());
525 m_Scene.AssetService.Store(asset); 525 m_Scene.AssetService.Store(asset);
526 526
527 item.AssetID = asset.FullID; 527 item.AssetID = asset.FullID;
528 528
529 if (DeRezAction.SaveToExistingUserInventoryItem == action) 529 if (DeRezAction.SaveToExistingUserInventoryItem == action)
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
562 // This is a hook to do some per-asset post-processing for subclasses that need that 562 // This is a hook to do some per-asset post-processing for subclasses that need that
563 if (remoteClient != null && action != DeRezAction.Delete) 563 if (remoteClient != null && action != DeRezAction.Delete)
564 ExportAsset(remoteClient.AgentId, asset.FullID); 564 ExportAsset(remoteClient.AgentId, asset.FullID);
565 565
566 return item; 566 return item;
567 } 567 }
568 568
@@ -580,7 +580,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
580 /// <param name="remoteClient"></param> 580 /// <param name="remoteClient"></param>
581 /// <returns></returns> 581 /// <returns></returns>
582 protected InventoryItemBase AddPermissions( 582 protected InventoryItemBase AddPermissions(
583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions, 583 InventoryItemBase item, SceneObjectGroup so, List<SceneObjectGroup> objsForEffectivePermissions,
584 IClientAPI remoteClient) 584 IClientAPI remoteClient)
585 { 585 {
586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7; 586 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export) | 7;
@@ -614,7 +614,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
614 item.NextPermissions = perms & so.RootPart.NextOwnerMask; 614 item.NextPermissions = perms & so.RootPart.NextOwnerMask;
615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; 615 item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask;
616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; 616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
617 617
618 // apply next owner perms on rez 618 // apply next owner perms on rez
619 item.CurrentPermissions |= SceneObjectGroup.SLAM; 619 item.CurrentPermissions |= SceneObjectGroup.SLAM;
620 } 620 }
@@ -642,11 +642,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
642 7); // Preserve folded permissions 642 7); // Preserve folded permissions
643 } 643 }
644 644
645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions); 645 //PermissionsUtil.LogPermissions(item.Name, "After AddPermissions", item.BasePermissions, item.CurrentPermissions, item.NextPermissions);
646 646
647 return item; 647 return item;
648 } 648 }
649 649
650 /// <summary> 650 /// <summary>
651 /// Create an item using details for the given scene object. 651 /// Create an item using details for the given scene object.
652 /// </summary> 652 /// </summary>
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID) 659 DeRezAction action, IClientAPI remoteClient, SceneObjectGroup so, UUID folderID)
660 { 660 {
661// m_log.DebugFormat( 661// m_log.DebugFormat(
662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}", 662// "[BASIC INVENTORY ACCESS MODULE]: Creating item for object {0} {1} for folder {2}, action {3}",
663// so.Name, so.UUID, folderID, action); 663// so.Name, so.UUID, folderID, action);
664// 664//
665 // Get the user info of the item destination 665 // Get the user info of the item destination
@@ -707,7 +707,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
707 // Delete is treated like return in this case 707 // Delete is treated like return in this case
708 // Deleting your own items makes them go to trash 708 // Deleting your own items makes them go to trash
709 // 709 //
710 710
711 InventoryFolderBase folder = null; 711 InventoryFolderBase folder = null;
712 InventoryItemBase item = null; 712 InventoryItemBase item = null;
713 713
@@ -723,7 +723,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
723 m_log.DebugFormat( 723 m_log.DebugFormat(
724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.", 724 "[INVENTORY ACCESS MODULE]: Object {0} {1} scheduled for save to inventory has already been deleted.",
725 so.Name, so.UUID); 725 so.Name, so.UUID);
726 726
727 return null; 727 return null;
728 } 728 }
729 } 729 }
@@ -805,13 +805,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
805 } 805 }
806 } 806 }
807 807
808 item = new InventoryItemBase(); 808 item = new InventoryItemBase();
809 item.ID = UUID.Random(); 809 item.ID = UUID.Random();
810 item.InvType = (int)InventoryType.Object; 810 item.InvType = (int)InventoryType.Object;
811 item.Folder = folder.ID; 811 item.Folder = folder.ID;
812 item.Owner = userID; 812 item.Owner = userID;
813 } 813 }
814 814
815 return item; 815 return item;
816 } 816 }
817 // compatibility do not use 817 // compatibility do not use
@@ -863,7 +863,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
863 byte BypassRayCast, bool RayEndIsIntersection, 863 byte BypassRayCast, bool RayEndIsIntersection,
864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 864 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
865 { 865 {
866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString()); 866 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString());
867 867
868 if (rezAsset == null) 868 if (rezAsset == null)
869 { 869 {
@@ -891,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()", 891 "[INVENTORY ACCESS MODULE]: missing data in asset {0} to RezObject()",
892 assetID, remoteClient.Name); 892 assetID, remoteClient.Name);
893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false); 893 remoteClient.SendAgentAlertMessage(string.Format("Unable to rez: missing data in asset {0} ", assetID), false);
894 return null; 894 return null;
895 } 895 }
896 896
897 SceneObjectGroup group = null; 897 SceneObjectGroup group = null;
@@ -903,7 +903,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 903 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
904 Vector3 pos; 904 Vector3 pos;
905 905
906 bool single 906 bool single
907 = m_Scene.GetObjectsToRez( 907 = m_Scene.GetObjectsToRez(
908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight); 908 rezAsset.Data, attachment, out objlist, out veclist, out bbox, out offsetHeight);
909 909
@@ -1055,7 +1055,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1055 /// <param name="isAttachment"></param> 1055 /// <param name="isAttachment"></param>
1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns> 1056 /// <returns>true if we can processed with rezzing, false if we need to abort</returns>
1057 private bool DoPreRezWhenFromItem( 1057 private bool DoPreRezWhenFromItem(
1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, 1058 IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist,
1059 Vector3 pos, List<Vector3> veclist, bool isAttachment) 1059 Vector3 pos, List<Vector3> veclist, bool isAttachment)
1060 { 1060 {
1061 UUID fromUserInventoryItemId = UUID.Zero; 1061 UUID fromUserInventoryItemId = UUID.Zero;
@@ -1142,7 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1142 //Need to kill the for sale here 1142 //Need to kill the for sale here
1143 rootPart.ObjectSaleType = 0; 1143 rootPart.ObjectSaleType = 0;
1144 rootPart.SalePrice = 10; 1144 rootPart.SalePrice = 10;
1145 1145
1146 if (m_Scene.Permissions.PropagatePermissions()) 1146 if (m_Scene.Permissions.PropagatePermissions())
1147 { 1147 {
1148 foreach (SceneObjectPart part in so.Parts) 1148 foreach (SceneObjectPart part in so.Parts)
@@ -1154,7 +1154,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1154 part.RezzerID = item.Owner; 1154 part.RezzerID = item.Owner;
1155 part.Inventory.ChangeInventoryOwner(item.Owner); 1155 part.Inventory.ChangeInventoryOwner(item.Owner);
1156 } 1156 }
1157 1157
1158 so.ApplyNextOwnerPermissions(); 1158 so.ApplyNextOwnerPermissions();
1159 1159
1160 // In case the user has changed flags on a received item 1160 // In case the user has changed flags on a received item
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1312 { 1312 {
1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>(); 1313 IInventoryService invService = m_Scene.RequestModuleInterface<IInventoryService>();
1314 InventoryItemBase item = invService.GetItem(agentID, itemID); 1314 InventoryItemBase item = invService.GetItem(agentID, itemID);
1315 1315
1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty) 1316 if (item != null && item.CreatorData != null && item.CreatorData != string.Empty)
1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData); 1317 UserManagementModule.AddUser(item.CreatorIdAsUuid, item.CreatorData);
1318 1318
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
index 007ff63..8f12331 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
77 scene.StartScripts(); 77 scene.StartScripts();
78 78
79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl); 79 HGAssetMapper hgam = new HGAssetMapper(scene, homeUrl);
80 UserAccount ua 80 UserAccount ua
81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password"); 81 = UserAccountHelpers.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "password");
82 82
83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail); 83 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, soPartsCount, ua.PrincipalID, "part", soIdTail);
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID"); 116 XmlNode uuidAttribute = savedScriptStateNodes[0].Attributes.GetNamedItem("UUID");
117 Assert.NotNull(uuidAttribute); 117 Assert.NotNull(uuidAttribute);
118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task 118 // XXX: To check the actual UUID attribute we would have to do some work to retreive the UUID of the task
119 // item created earlier. 119 // item created earlier.
120 } 120 }
121 121
122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId) 122 private void RezScript(Scene scene, UUID soId, string script, string itemName, UUID userId)
@@ -131,9 +131,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
131 // immediately for tests rather than chunter through it's threaded mechanisms. 131 // immediately for tests rather than chunter through it's threaded mechanisms.
132 AutoResetEvent chatEvent = new AutoResetEvent(false); 132 AutoResetEvent chatEvent = new AutoResetEvent(false);
133 133
134 scene.EventManager.OnChatFromWorld += (s, c) => 134 scene.EventManager.OnChatFromWorld += (s, c) =>
135 { 135 {
136// Console.WriteLine("Got chat [{0}]", c.Message); 136// Console.WriteLine("Got chat [{0}]", c.Message);
137 chatEvent.Set(); 137 chatEvent.Set();
138 }; 138 };
139 139
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index b31d4df..de29ae9 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -48,12 +48,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
48{ 48{
49 [TestFixture] 49 [TestFixture]
50 public class InventoryAccessModuleTests : OpenSimTestCase 50 public class InventoryAccessModuleTests : OpenSimTestCase
51 { 51 {
52 protected TestScene m_scene; 52 protected TestScene m_scene;
53 protected BasicInventoryAccessModule m_iam; 53 protected BasicInventoryAccessModule m_iam;
54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); 54 protected UUID m_userId = UUID.Parse("00000000-0000-0000-0000-000000000020");
55 protected TestClient m_tc; 55 protected TestClient m_tc;
56 56
57 [SetUp] 57 [SetUp]
58 public override void SetUp() 58 public override void SetUp()
59 { 59 {
@@ -68,32 +68,32 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
68 SceneHelpers sceneHelpers = new SceneHelpers(); 68 SceneHelpers sceneHelpers = new SceneHelpers();
69 m_scene = sceneHelpers.SetupScene(); 69 m_scene = sceneHelpers.SetupScene();
70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam); 70 SceneHelpers.SetupSceneModules(m_scene, config, m_iam);
71 71
72 // Create user 72 // Create user
73 string userFirstName = "Jock"; 73 string userFirstName = "Jock";
74 string userLastName = "Stirrup"; 74 string userLastName = "Stirrup";
75 string userPassword = "troll"; 75 string userPassword = "troll";
76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword); 76 UserAccountHelpers.CreateUserWithInventory(m_scene, userFirstName, userLastName, m_userId, userPassword);
77 77
78 AgentCircuitData acd = new AgentCircuitData(); 78 AgentCircuitData acd = new AgentCircuitData();
79 acd.AgentID = m_userId; 79 acd.AgentID = m_userId;
80 m_tc = new TestClient(acd, m_scene); 80 m_tc = new TestClient(acd, m_scene);
81 } 81 }
82 82
83 [Test] 83 [Test]
84 public void TestRezCoalescedObject() 84 public void TestRezCoalescedObject()
85 { 85 {
86/* 86/*
87 TestHelpers.InMethod(); 87 TestHelpers.InMethod();
88// log4net.Config.XmlConfigurator.Configure(); 88// log4net.Config.XmlConfigurator.Configure();
89 89
90 // Create asset 90 // Create asset
91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); 91 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20);
92 object1.AbsolutePosition = new Vector3(15, 30, 45); 92 object1.AbsolutePosition = new Vector3(15, 30, 45);
93 93
94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); 94 SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40);
95 object2.AbsolutePosition = new Vector3(25, 50, 75); 95 object2.AbsolutePosition = new Vector3(25, 50, 75);
96 96
97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); 97 CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2);
98 98
99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 99 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
@@ -107,46 +107,46 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
107 item1.Name = item1Name; 107 item1.Name = item1Name;
108 item1.AssetID = asset1.FullID; 108 item1.AssetID = asset1.FullID;
109 item1.ID = item1Id; 109 item1.ID = item1Id;
110 InventoryFolderBase objsFolder 110 InventoryFolderBase objsFolder
111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 111 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
112 item1.Folder = objsFolder.ID; 112 item1.Folder = objsFolder.ID;
113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems; 113 item1.Flags |= (uint)InventoryItemFlags.ObjectHasMultipleItems;
114 m_scene.AddInventoryItem(item1); 114 m_scene.AddInventoryItem(item1);
115 115
116 SceneObjectGroup so 116 SceneObjectGroup so
117 = m_iam.RezObject( 117 = m_iam.RezObject(
118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 118 m_tc, item1Id, new Vector3(100, 100, 100), Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
119 119
120 Assert.That(so, Is.Not.Null); 120 Assert.That(so, Is.Not.Null);
121 121
122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2)); 122 Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(2));
123 123
124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name); 124 SceneObjectPart retrievedObj1Part = m_scene.GetSceneObjectPart(object1.Name);
125 Assert.That(retrievedObj1Part, Is.Null); 125 Assert.That(retrievedObj1Part, Is.Null);
126 126
127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name); 127 retrievedObj1Part = m_scene.GetSceneObjectPart(item1.Name);
128 Assert.That(retrievedObj1Part, Is.Not.Null); 128 Assert.That(retrievedObj1Part, Is.Not.Null);
129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); 129 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name));
130 130
131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom 131 // Bottom of coalescence is placed on ground, hence we end up with 100.5 rather than 85 since the bottom
132 // object is unit square. 132 // object is unit square.
133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f))); 133 Assert.That(retrievedObj1Part.AbsolutePosition, Is.EqualTo(new Vector3(95, 90, 100.5f)));
134 134
135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); 135 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name);
136 Assert.That(retrievedObj2Part, Is.Not.Null); 136 Assert.That(retrievedObj2Part, Is.Not.Null);
137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name)); 137 Assert.That(retrievedObj2Part.Name, Is.EqualTo(object2.Name));
138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f))); 138 Assert.That(retrievedObj2Part.AbsolutePosition, Is.EqualTo(new Vector3(105, 110, 130.5f)));
139*/ 139*/
140 } 140 }
141 141
142 [Test] 142 [Test]
143 public void TestRezObject() 143 public void TestRezObject()
144 { 144 {
145 TestHelpers.InMethod(); 145 TestHelpers.InMethod();
146// log4net.Config.XmlConfigurator.Configure(); 146// log4net.Config.XmlConfigurator.Configure();
147 147
148 // Create asset 148 // Create asset
149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); 149 SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40);
150 150
151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); 151 UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060");
152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); 152 AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1);
@@ -159,17 +159,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
159 item1.Name = item1Name; 159 item1.Name = item1Name;
160 item1.AssetID = asset1.FullID; 160 item1.AssetID = asset1.FullID;
161 item1.ID = item1Id; 161 item1.ID = item1Id;
162 InventoryFolderBase objsFolder 162 InventoryFolderBase objsFolder
163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0]; 163 = InventoryArchiveUtils.FindFoldersByPath(m_scene.InventoryService, m_userId, "Objects")[0];
164 item1.Folder = objsFolder.ID; 164 item1.Folder = objsFolder.ID;
165 m_scene.AddInventoryItem(item1); 165 m_scene.AddInventoryItem(item1);
166 166
167 SceneObjectGroup so 167 SceneObjectGroup so
168 = m_iam.RezObject( 168 = m_iam.RezObject(
169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
170 170
171 Assert.That(so, Is.Not.Null); 171 Assert.That(so, Is.Not.Null);
172 172
173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID); 173 SceneObjectPart retrievedPart = m_scene.GetSceneObjectPart(so.UUID);
174 Assert.That(retrievedPart, Is.Not.Null); 174 Assert.That(retrievedPart, Is.Not.Null);
175 } 175 }
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index 862f0b7..df9d4f9 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
126 return; 126 return;
127 127
128 // This will never run more than once, even if the region is restarted 128 // This will never run more than once, even if the region is restarted
129 if (!m_HasRunOnce) 129 if (!m_HasRunOnce)
130 { 130 {
131 LoadLibrariesFromArchives(); 131 LoadLibrariesFromArchives();
132 //DumpLibrary(); 132 //DumpLibrary();
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
index 21e00b2..c1a9457 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LocalInventoryService.cs
@@ -259,11 +259,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library
259 259
260 /// <summary> 260 /// <summary>
261 /// Get the union of permissions of all inventory items 261 /// Get the union of permissions of all inventory items
262 /// that hold the given assetID. 262 /// that hold the given assetID.
263 /// </summary> 263 /// </summary>
264 /// <param name="userID"></param> 264 /// <param name="userID"></param>
265 /// <param name="assetID"></param> 265 /// <param name="assetID"></param>
266 /// <returns>The permissions or 0 if no such asset is found in 266 /// <returns>The permissions or 0 if no such asset is found in
267 /// the user's inventory</returns> 267 /// the user's inventory</returns>
268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; } 268 public int GetAssetPermissions(UUID userID, UUID assetID) { return 0; }
269 } 269 }
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index 93a7cf2..fb3d31c 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -44,7 +44,7 @@ using Mono.Addins;
44namespace OpenSim.Region.CoreModules.Framework.Monitoring 44namespace OpenSim.Region.CoreModules.Framework.Monitoring
45{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MonitorModule")]
47 public class MonitorModule : INonSharedRegionModule 47 public class MonitorModule : INonSharedRegionModule
48 { 48 {
49 /// <summary> 49 /// <summary>
50 /// Is this module enabled? 50 /// Is this module enabled?
@@ -78,7 +78,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
78 78
79 if (cnfg != null) 79 if (cnfg != null)
80 Enabled = cnfg.GetBoolean("Enabled", true); 80 Enabled = cnfg.GetBoolean("Enabled", true);
81 81
82 if (!Enabled) 82 if (!Enabled)
83 return; 83 return;
84 84
@@ -433,7 +433,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; }); 433 MakeStat("ScriptLines", "lines/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[20]; });
434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; }); 434 MakeStat("SimSpareMS", "ms/sec", (s) => { s.Value = m_scene.StatsReporter.LastReportedSimStats[21]; });
435 } 435 }
436 436
437 private void UnRegisterStatsManagerRegionStatistics() 437 private void UnRegisterStatsManagerRegionStatistics()
438 { 438 {
439 foreach (Stat stat in registeredStats) 439 foreach (Stat stat in registeredStats)
@@ -443,6 +443,6 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
443 } 443 }
444 registeredStats.Clear(); 444 registeredStats.Clear();
445 } 445 }
446 446
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
index 3849996..c04d856 100644
--- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Framework.Search
135 135
136 #endregion ISharedRegionModule 136 #endregion ISharedRegionModule
137 137
138 138
139 #region Event Handlers 139 #region Event Handlers
140 140
141 void EventManager_OnMakeRootAgent(ScenePresence sp) 141 void EventManager_OnMakeRootAgent(ScenePresence sp)
diff --git a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
index 36fb57a..924a1a3 100644
--- a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Framework
49 49
50 private readonly List<Scene> m_scenes = new List<Scene>(); 50 private readonly List<Scene> m_scenes = new List<Scene>();
51 private JobEngine m_processorJobEngine; 51 private JobEngine m_processorJobEngine;
52 52
53 #region ISharedRegionModule 53 #region ISharedRegionModule
54 54
55 public void Initialise(IConfigSource config) 55 public void Initialise(IConfigSource config)
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
index f3436d1..3e6c8b5 100644
--- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
45 public class BinaryLoggingModule : INonSharedRegionModule 45 public class BinaryLoggingModule : INonSharedRegionModule
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 protected bool m_collectStats; 49 protected bool m_collectStats;
50 protected Scene m_scene = null; 50 protected Scene m_scene = null;
51 51
52 public string Name { get { return "Binary Statistics Logging Module"; } } 52 public string Name { get { return "Binary Statistics Logging Module"; } }
53 public Type ReplaceableInterface { get { return null; } } 53 public Type ReplaceableInterface { get { return null; } }
54 54
55 public void Initialise(IConfigSource source) 55 public void Initialise(IConfigSource source)
56 { 56 {
57 try 57 try
58 { 58 {
@@ -81,23 +81,23 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
81 // if it doesn't work, we don't collect anything 81 // if it doesn't work, we don't collect anything
82 } 82 }
83 } 83 }
84 84
85 public void AddRegion(Scene scene) 85 public void AddRegion(Scene scene)
86 { 86 {
87 m_scene = scene; 87 m_scene = scene;
88 } 88 }
89 89
90 public void RemoveRegion(Scene scene) 90 public void RemoveRegion(Scene scene)
91 { 91 {
92 } 92 }
93 93
94 public void RegionLoaded(Scene scene) 94 public void RegionLoaded(Scene scene)
95 { 95 {
96 if (m_collectStats) 96 if (m_collectStats)
97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats; 97 m_scene.StatsReporter.OnSendStatsResult += LogSimStats;
98 } 98 }
99 99
100 public void Close() 100 public void Close()
101 { 101 {
102 } 102 }
103 103
@@ -107,12 +107,12 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
107 public string Path; 107 public string Path;
108 public System.IO.BinaryWriter Log; 108 public System.IO.BinaryWriter Log;
109 } 109 }
110 110
111 static StatLogger m_statLog = null; 111 static StatLogger m_statLog = null;
112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300); 112 static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300);
113 static string m_statsDir = String.Empty; 113 static string m_statsDir = String.Empty;
114 static Object m_statLockObject = new Object(); 114 static Object m_statLockObject = new Object();
115 115
116 private void LogSimStats(SimStats stats) 116 private void LogSimStats(SimStats stats)
117 { 117 {
118 SimStatsPacket pack = new SimStatsPacket(); 118 SimStatsPacket pack = new SimStatsPacket();
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
index ea3bbe7..3e0a610 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/HGUserManagementModule.cs
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
111 } 111 }
112 112
113 // This is it! Let's ask the other world 113 // This is it! Let's ask the other world
114 if (words[0].Contains(".")) 114 if (words[0].Contains("."))
115 { 115 {
116 string[] names = words[0].Split(new char[] { '.' }); 116 string[] names = words[0].Split(new char[] { '.' });
117 if (names.Length >= 2) 117 if (names.Length >= 2)
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
130 } 130 }
131 131
132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr); 132 UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr);
133 133
134 UUID userID = UUID.Zero; 134 UUID userID = UUID.Zero;
135 try 135 try
136 { 136 {
@@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
140 { 140 {
141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e); 141 m_log.Debug("[USER MANAGEMENT MODULE]: GetUUID call failed ", e);
142 } 142 }
143 143
144 if (!userID.Equals(UUID.Zero)) 144 if (!userID.Equals(UUID.Zero))
145 { 145 {
146 UserData ud = new UserData(); 146 UserData ud = new UserData();
@@ -163,8 +163,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
163 //{ 163 //{
164 // foreach (UserData d in m_UserCache.Values) 164 // foreach (UserData d in m_UserCache.Values)
165 // { 165 // {
166 // if (d.LastName.StartsWith("@") && 166 // if (d.LastName.StartsWith("@") &&
167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) || 167 // (d.FirstName.ToLower().StartsWith(query.ToLower()) ||
168 // d.LastName.ToLower().StartsWith(query.ToLower()))) 168 // d.LastName.ToLower().StartsWith(query.ToLower())))
169 // users.Add(d); 169 // users.Add(d);
170 // } 170 // }
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
index 4e3b7e5..9d91aa3 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/Tests/HGUserManagementModuleTests.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement.Tests
37{ 37{
38 [TestFixture] 38 [TestFixture]
39 public class HGUserManagementModuleTests : OpenSimTestCase 39 public class HGUserManagementModuleTests : OpenSimTestCase
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation. 42 /// Test that a new HG agent (i.e. one without a user account) has their name cached in the UMM upon creation.
43 /// </summary> 43 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 2701912..51f973a 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -345,7 +345,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
345 } 345 }
346 346
347 /// <summary> 347 /// <summary>
348 /// 348 ///
349 /// </summary> 349 /// </summary>
350 /// <param name="uuid"></param> 350 /// <param name="uuid"></param>
351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param> 351 /// <param name="names">Caller please provide a properly instantiated array for names, string[2]</param>
@@ -557,7 +557,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
557 return ret; 557 return ret;
558 558
559 // try grid user service 559 // try grid user service
560 560
561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray()); 561 GridUserInfo[] pinfos = m_Scenes[0].GridUserService.GetGridUserInfo(missing.ToArray());
562 if(pinfos.Length > 0) 562 if(pinfos.Length > 0)
563 { 563 {
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
index a5c7543..5d66d34 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
46 public class HGWorldMapModule : WorldMapModule 46 public class HGWorldMapModule : WorldMapModule
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 // Remember the map area that each client has been exposed to in this region 50 // Remember the map area that each client has been exposed to in this region
51 private Dictionary<UUID, List<MapBlockData>> m_SeenMapBlocks = new Dictionary<UUID, List<MapBlockData>>(); 51 private Dictionary<UUID, List<MapBlockData>> m_SeenMapBlocks = new Dictionary<UUID, List<MapBlockData>>();
52 52
diff --git a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
index 74dcaae..2e3ac8e 100644
--- a/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/CoreModules/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.CoreModules")] 9[assembly: AssemblyTitle("OpenSim.Region.CoreModules")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 665d7f7..c369d87 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -181,12 +181,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
181 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 181 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
182 { 182 {
183 return AddDynamicTextureURL(simID, primID, contentType, url, 183 return AddDynamicTextureURL(simID, primID, contentType, url,
184 extraParams, updateTimer, SetBlending, 184 extraParams, updateTimer, SetBlending,
185 (int)(DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); 185 (int)(DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES);
186 } 186 }
187 187
188 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, 188 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
189 string extraParams, int updateTimer, bool SetBlending, 189 string extraParams, int updateTimer, bool SetBlending,
190 int disp, byte AlphaValue, int face) 190 int disp, byte AlphaValue, int face)
191 { 191 {
192 if (RenderPlugins.ContainsKey(contentType)) 192 if (RenderPlugins.ContainsKey(contentType))
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
227 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, 227 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
228 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 228 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
229 { 229 {
230 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, SetBlending, 230 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, SetBlending,
231 (int) (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES); 231 (int) (DISP_TEMP|DISP_EXPIRE), AlphaValue, ALL_SIDES);
232 } 232 }
233 233
@@ -478,17 +478,17 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
478 478
479 if (part == null || data == null || data.Length <= 1) 479 if (part == null || data == null || data.Length <= 1)
480 { 480 {
481 string msg = 481 string msg =
482 String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url); 482 String.Format("DynamicTextureModule: Error preparing image using URL {0}", Url);
483 scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say, 483 scene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,
484 0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false); 484 0, part.ParentGroup.RootPart.AbsolutePosition, part.Name, part.UUID, false);
485 485
486 return UUID.Zero; 486 return UUID.Zero;
487 } 487 }
488 488
489 byte[] assetData = null; 489 byte[] assetData = null;
490 AssetBase oldAsset = null; 490 AssetBase oldAsset = null;
491 491
492 if (BlendWithOldTexture) 492 if (BlendWithOldTexture)
493 { 493 {
494 Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture; 494 Primitive.TextureEntryFace defaultFace = part.Shape.Textures.DefaultTexture;
@@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
558 558
559 Bitmap image1 = new Bitmap(image); 559 Bitmap image1 = new Bitmap(image);
560 image.Dispose(); 560 image.Dispose();
561 561
562 if (!OpenJPEG.DecodeToImage(backImage, out managedImage, out image) || image == null) 562 if (!OpenJPEG.DecodeToImage(backImage, out managedImage, out image) || image == null)
563 { 563 {
564 image1.Dispose(); 564 image1.Dispose();
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 3948667..09891f7 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -246,7 +246,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 htc.RequestModule = this; 250 htc.RequestModule = this;
251 htc.LocalID = localID; 251 htc.LocalID = localID;
252 htc.ItemID = itemID; 252 htc.ItemID = itemID;
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
283 } 283 }
284 284
285 public bool StartHttpRequest(HttpRequestClass req) 285 public bool StartHttpRequest(HttpRequestClass req)
286 { 286 {
287 if (!CheckAllowed(new Uri(req.Url))) 287 if (!CheckAllowed(new Uri(req.Url)))
288 return false; 288 return false;
289 289
@@ -541,7 +541,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
541 try 541 try
542 { 542 {
543 Request = (HttpWebRequest)WebRequest.Create(Url); 543 Request = (HttpWebRequest)WebRequest.Create(Url);
544 Request.AllowAutoRedirect = false; 544 Request.AllowAutoRedirect = false;
545 545
546 //This works around some buggy HTTP Servers like Lighttpd 546 //This works around some buggy HTTP Servers like Lighttpd
547 Request.ServicePoint.Expect100Continue = false; 547 Request.ServicePoint.Expect100Continue = false;
@@ -684,9 +684,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
684 resStream.Close(); 684 resStream.Close();
685 if (response != null) 685 if (response != null)
686 response.Close(); 686 response.Close();
687
688 687
689 // We need to resubmit 688
689 // We need to resubmit
690 if ( 690 if (
691 (Status == (int)HttpStatusCode.MovedPermanently 691 (Status == (int)HttpStatusCode.MovedPermanently
692 || Status == (int)HttpStatusCode.Found 692 || Status == (int)HttpStatusCode.Found
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
index d22487e..7e223d7 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/Tests/ScriptsHttpRequestsTests.cs
@@ -45,7 +45,7 @@ using OpenSim.Tests.Common;
45namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests 45namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
46{ 46{
47 class TestWebRequestCreate : IWebRequestCreate 47 class TestWebRequestCreate : IWebRequestCreate
48 { 48 {
49 public TestWebRequest NextRequest { get; set; } 49 public TestWebRequest NextRequest { get; set; }
50 50
51 public WebRequest Create(Uri uri) 51 public WebRequest Create(Uri uri)
@@ -65,13 +65,13 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
65 65
66 public Func<IAsyncResult, WebResponse> OnEndGetResponse { get; set; } 66 public Func<IAsyncResult, WebResponse> OnEndGetResponse { get; set; }
67 67
68 public TestWebRequest() : base() 68 public TestWebRequest() : base()
69 { 69 {
70// Console.WriteLine("created"); 70// Console.WriteLine("created");
71 } 71 }
72 72
73// public TestWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) 73// public TestWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext)
74// : base(serializationInfo, streamingContext) 74// : base(serializationInfo, streamingContext)
75// { 75// {
76// Console.WriteLine("created"); 76// Console.WriteLine("created");
77// } 77// }
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
97 public string Response { get; set; } 97 public string Response { get; set; }
98 98
99#pragma warning disable 0618 99#pragma warning disable 0618
100 public TestHttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) 100 public TestHttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext)
101 : base(serializationInfo, streamingContext) {} 101 : base(serializationInfo, streamingContext) {}
102#pragma warning restore 0618 102#pragma warning restore 0618
103 103
@@ -111,24 +111,24 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
111 { 111 {
112 WaitHandle m_wh = new ManualResetEvent(true); 112 WaitHandle m_wh = new ManualResetEvent(true);
113 113
114 object IAsyncResult.AsyncState 114 object IAsyncResult.AsyncState
115 { 115 {
116 get { 116 get {
117 throw new System.NotImplementedException (); 117 throw new System.NotImplementedException ();
118 } 118 }
119 } 119 }
120 120
121 WaitHandle IAsyncResult.AsyncWaitHandle 121 WaitHandle IAsyncResult.AsyncWaitHandle
122 { 122 {
123 get { return m_wh; } 123 get { return m_wh; }
124 } 124 }
125 125
126 bool IAsyncResult.CompletedSynchronously 126 bool IAsyncResult.CompletedSynchronously
127 { 127 {
128 get { return false; } 128 get { return false; }
129 } 129 }
130 130
131 bool IAsyncResult.IsCompleted 131 bool IAsyncResult.IsCompleted
132 { 132 {
133 get { return true; } 133 get { return true; }
134 } 134 }
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
155 TestHelpers.EnableLogging(); 155 TestHelpers.EnableLogging();
156 156
157 if (!Util.IsPlatformMono) 157 if (!Util.IsPlatformMono)
158 Assert.Ignore("Ignoring test since can only currently run on Mono"); 158 Assert.Ignore("Ignoring test since can only currently run on Mono");
159 159
160 string rawResponse = "boom"; 160 string rawResponse = "boom";
161 161
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest.Tests
163 163
164 TestWebRequest twr = new TestWebRequest(); 164 TestWebRequest twr = new TestWebRequest();
165 //twr.OnEndGetResponse += ar => new TestHttpWebResponse(null, new StreamingContext()); 165 //twr.OnEndGetResponse += ar => new TestHttpWebResponse(null, new StreamingContext());
166 twr.OnEndGetResponse += ar => 166 twr.OnEndGetResponse += ar =>
167 { 167 {
168 SerializationInfo si = new SerializationInfo(typeof(HttpWebResponse), new FormatterConverter()); 168 SerializationInfo si = new SerializationInfo(typeof(HttpWebResponse), new FormatterConverter());
169 StreamingContext sc = new StreamingContext(); 169 StreamingContext sc = new StreamingContext();
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index f563c68..bb80a88 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
105 /// </summary> 105 /// </summary>
106 public int TotalUrls { get; set; } 106 public int TotalUrls { get; set; }
107 107
108 public Type ReplaceableInterface 108 public Type ReplaceableInterface
109 { 109 {
110 get { return null; } 110 get { return null; }
111 } 111 }
@@ -221,10 +221,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
221 urlData.allowXss = true; 221 urlData.allowXss = true;
222 222
223 m_UrlMap[url] = urlData; 223 m_UrlMap[url] = urlData;
224 224
225 string uri = "/lslhttp/" + urlcode.ToString() + "/"; 225 string uri = "/lslhttp/" + urlcode.ToString() + "/";
226 226
227 PollServiceEventArgs args 227 PollServiceEventArgs args
228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 228 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000);
229 args.Type = PollServiceEventArgs.EventType.LslHttp; 229 args.Type = PollServiceEventArgs.EventType.LslHttp;
230 m_HttpServer.AddPollServiceHTTPHandler(uri, args); 230 m_HttpServer.AddPollServiceHTTPHandler(uri, args);
@@ -270,12 +270,12 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
270 270
271 if (options != null && options["allowXss"] != null) 271 if (options != null && options["allowXss"] != null)
272 urlData.allowXss = true; 272 urlData.allowXss = true;
273 273
274 m_UrlMap[url] = urlData; 274 m_UrlMap[url] = urlData;
275 275
276 string uri = "/lslhttps/" + urlcode.ToString() + "/"; 276 string uri = "/lslhttps/" + urlcode.ToString() + "/";
277 277
278 PollServiceEventArgs args 278 PollServiceEventArgs args
279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); 279 = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000);
280 args.Type = PollServiceEventArgs.EventType.LslHttp; 280 args.Type = PollServiceEventArgs.EventType.LslHttp;
281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args); 281 m_HttpsServer.AddPollServiceHTTPHandler(uri, args);
@@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
306 foreach (UUID req in data.requests.Keys) 306 foreach (UUID req in data.requests.Keys)
307 m_RequestMap.Remove(req); 307 m_RequestMap.Remove(req);
308 } 308 }
309 309
310// m_log.DebugFormat( 310// m_log.DebugFormat(
311// "[URL MODULE]: Releasing url {0} for {1} in {2}", 311// "[URL MODULE]: Releasing url {0} for {1} in {2}",
312// url, data.itemID, data.hostID); 312// url, data.itemID, data.hostID);
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
315 m_UrlMap.Remove(url); 315 m_UrlMap.Remove(url);
316 } 316 }
317 } 317 }
318 318
319 public void HttpContentType(UUID request, string type) 319 public void HttpContentType(UUID request, string type)
320 { 320 {
321 lock (m_UrlMap) 321 lock (m_UrlMap)
@@ -331,7 +331,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
331 } 331 }
332 } 332 }
333 } 333 }
334 334
335 public void HttpResponse(UUID request, int status, string body) 335 public void HttpResponse(UUID request, int status, string body)
336 { 336 {
337 lock (m_RequestMap) 337 lock (m_RequestMap)
@@ -403,7 +403,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
403 public void ScriptRemoved(UUID itemID) 403 public void ScriptRemoved(UUID itemID)
404 { 404 {
405// m_log.DebugFormat("[URL MODULE]: Removing script {0}", itemID); 405// m_log.DebugFormat("[URL MODULE]: Removing script {0}", itemID);
406 406
407 lock (m_UrlMap) 407 lock (m_UrlMap)
408 { 408 {
409 List<string> removeURLs = new List<string>(); 409 List<string> removeURLs = new List<string>();
@@ -495,14 +495,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
495 return response; 495 return response;
496 } 496 }
497 497
498 498
499 return response; 499 return response;
500 } 500 }
501 501
502 private bool HasEvents(UUID requestID, UUID sessionID) 502 private bool HasEvents(UUID requestID, UUID sessionID)
503 { 503 {
504 UrlData url=null; 504 UrlData url=null;
505 505
506 lock (m_RequestMap) 506 lock (m_RequestMap)
507 { 507 {
508 if (!m_RequestMap.ContainsKey(requestID)) 508 if (!m_RequestMap.ContainsKey(requestID))
@@ -545,10 +545,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
545 { 545 {
546 requestData = url.requests[requestID]; 546 requestData = url.requests[requestID];
547 } 547 }
548 548
549 if (!requestData.requestDone) 549 if (!requestData.requestDone)
550 return NoEvents(requestID,sessionID); 550 return NoEvents(requestID,sessionID);
551 551
552 Hashtable response = new Hashtable(); 552 Hashtable response = new Hashtable();
553 553
554 if (System.Environment.TickCount - requestData.startTime > 25000) 554 if (System.Environment.TickCount - requestData.startTime > 25000)
@@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
569 569
570 if (url.allowXss) 570 if (url.allowXss)
571 response["access_control_allow_origin"] = "*"; 571 response["access_control_allow_origin"] = "*";
572 572
573 //remove from map 573 //remove from map
574 lock (url.requests) 574 lock (url.requests)
575 { 575 {
@@ -627,7 +627,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
627 } 627 }
628 628
629 //for llGetHttpHeader support we need to store original URI here 629 //for llGetHttpHeader support we need to store original URI here
630 //to make x-path-info / x-query-string / x-script-url / x-remote-ip headers 630 //to make x-path-info / x-query-string / x-script-url / x-remote-ip headers
631 //as per http://wiki.secondlife.com/wiki/LlGetHTTPHeader 631 //as per http://wiki.secondlife.com/wiki/LlGetHTTPHeader
632 632
633 RequestData requestData = new RequestData(); 633 RequestData requestData = new RequestData();
@@ -689,7 +689,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
689 else 689 else
690 { 690 {
691 queryString = queryString + val + "&"; 691 queryString = queryString + val + "&";
692 } 692 }
693 } 693 }
694 } 694 }
695 if (queryString.Length > 1) 695 if (queryString.Length > 1)
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 7267515..673a453 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
98 return false; 98 return false;
99 } 99 }
100 100
101 public void GetDrawStringSize(string text, string fontName, int fontSize, 101 public void GetDrawStringSize(string text, string fontName, int fontSize,
102 out double xSize, out double ySize) 102 out double xSize, out double ySize)
103 { 103 {
104 xSize = 0; 104 xSize = 0;
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
124 { 124 {
125 if (m_scene == null) 125 if (m_scene == null)
126 m_scene = scene; 126 m_scene = scene;
127 127
128 } 128 }
129 129
130 public void RemoveRegion(Scene scene) 130 public void RemoveRegion(Scene scene)
@@ -166,15 +166,15 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
166 166
167 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); 167 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
168 request.AllowAutoRedirect = false; 168 request.AllowAutoRedirect = false;
169 169
170 if (!string.IsNullOrEmpty(m_proxyurl)) 170 if (!string.IsNullOrEmpty(m_proxyurl))
171 { 171 {
172 if (!string.IsNullOrEmpty(m_proxyexcepts)) 172 if (!string.IsNullOrEmpty(m_proxyexcepts))
173 { 173 {
174 string[] elist = m_proxyexcepts.Split(';'); 174 string[] elist = m_proxyexcepts.Split(';');
175 request.Proxy = new WebProxy(m_proxyurl, true, elist); 175 request.Proxy = new WebProxy(m_proxyurl, true, elist);
176 } 176 }
177 else 177 else
178 { 178 {
179 request.Proxy = new WebProxy(m_proxyurl, true); 179 request.Proxy = new WebProxy(m_proxyurl, true);
180 } 180 }
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
253 { 253 {
254 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); 254 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
255 } 255 }
256 } 256 }
257 catch (Exception) 257 catch (Exception)
258 { 258 {
259 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!"); 259 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index ad33f23..9c3f08e 100644
--- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91 m_scriptModule = scene.RequestModuleInterface<IScriptModule>(); 91 m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
92 92
93 if (m_scriptModule != null) 93 if (m_scriptModule != null)
94 m_log.Info("[MODULE COMMANDS]: Script engine found, module active"); 94 m_log.Info("[MODULE COMMANDS]: Script engine found, module active");
95 } 95 }
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
237 } 237 }
238 } 238 }
239 } 239 }
240 240
241 public Delegate[] GetScriptInvocationList() 241 public Delegate[] GetScriptInvocationList()
242 { 242 {
243 List<Delegate> ret = new List<Delegate>(); 243 List<Delegate> ret = new List<Delegate>();
@@ -361,14 +361,14 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
361 public object LookupModConstant(string cname) 361 public object LookupModConstant(string cname)
362 { 362 {
363 // m_log.DebugFormat("[MODULE COMMANDS] lookup constant <{0}>",cname); 363 // m_log.DebugFormat("[MODULE COMMANDS] lookup constant <{0}>",cname);
364 364
365 lock (m_constants) 365 lock (m_constants)
366 { 366 {
367 object value = null; 367 object value = null;
368 if (m_constants.TryGetValue(cname,out value)) 368 if (m_constants.TryGetValue(cname,out value))
369 return value; 369 return value;
370 } 370 }
371 371
372 return null; 372 return null;
373 } 373 }
374 374
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 2fc89fc..f12286d 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
117 return true; 117 return true;
118 } 118 }
119 119
120 public void GetDrawStringSize(string text, string fontName, int fontSize, 120 public void GetDrawStringSize(string text, string fontName, int fontSize,
121 out double xSize, out double ySize) 121 out double xSize, out double ySize)
122 { 122 {
123 lock (this) 123 lock (this)
@@ -209,32 +209,32 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
209 int alpha = 255; // 0 is transparent 209 int alpha = 255; // 0 is transparent
210 Color bgColor = Color.White; // Default background color 210 Color bgColor = Color.White; // Default background color
211 char altDataDelim = ';'; 211 char altDataDelim = ';';
212 212
213 char[] paramDelimiter = { ',' }; 213 char[] paramDelimiter = { ',' };
214 char[] nvpDelimiter = { ':' }; 214 char[] nvpDelimiter = { ':' };
215 215
216 extraParams = extraParams.Trim(); 216 extraParams = extraParams.Trim();
217 extraParams = extraParams.ToLower(); 217 extraParams = extraParams.ToLower();
218 218
219 string[] nvps = extraParams.Split(paramDelimiter); 219 string[] nvps = extraParams.Split(paramDelimiter);
220 220
221 int temp = -1; 221 int temp = -1;
222 foreach (string pair in nvps) 222 foreach (string pair in nvps)
223 { 223 {
224 string[] nvp = pair.Split(nvpDelimiter); 224 string[] nvp = pair.Split(nvpDelimiter);
225 string name = ""; 225 string name = "";
226 string value = ""; 226 string value = "";
227 227
228 if (nvp[0] != null) 228 if (nvp[0] != null)
229 { 229 {
230 name = nvp[0].Trim(); 230 name = nvp[0].Trim();
231 } 231 }
232 232
233 if (nvp.Length == 2) 233 if (nvp.Length == 2)
234 { 234 {
235 value = nvp[1].Trim(); 235 value = nvp[1].Trim();
236 } 236 }
237 237
238 switch (name) 238 switch (name)
239 { 239 {
240 case "width": 240 case "width":
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
301 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) 301 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
302 { 302 {
303 bgColor = Color.FromArgb(hex); 303 bgColor = Color.FromArgb(hex);
304 } 304 }
305 else 305 else
306 { 306 {
307 bgColor = Color.FromName(value); 307 bgColor = Color.FromName(value);
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
321 } 321 }
322 else 322 else
323 { 323 {
324 // this function used to accept an int on its own that represented both 324 // this function used to accept an int on its own that represented both
325 // width and height, this is to maintain backwards compat, could be removed 325 // width and height, this is to maintain backwards compat, could be removed
326 // but would break existing scripts 326 // but would break existing scripts
327 temp = parseIntParam(name); 327 temp = parseIntParam(name);
@@ -329,10 +329,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
329 { 329 {
330 if (temp > 1024) 330 if (temp > 1024)
331 temp = 1024; 331 temp = 1024;
332 332
333 if (temp < 128) 333 if (temp < 128)
334 temp = 128; 334 temp = 128;
335 335
336 width = temp; 336 width = temp;
337 height = temp; 337 height = temp;
338 } 338 }
@@ -358,10 +358,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
358 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); 358 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb);
359 else 359 else
360 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); 360 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
361 361
362 graph = Graphics.FromImage(bitmap); 362 graph = Graphics.FromImage(bitmap);
363 363
364 // this is really just to save people filling the 364 // this is really just to save people filling the
365 // background color in their scripts, only do when fully opaque 365 // background color in their scripts, only do when fully opaque
366 if (alpha >= 255) 366 if (alpha >= 255)
367 { 367 {
@@ -370,10 +370,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
370 graph.FillRectangle(bgFillBrush, 0, 0, width, height); 370 graph.FillRectangle(bgFillBrush, 0, 0, width, height);
371 } 371 }
372 } 372 }
373 373
374 for (int w = 0; w < bitmap.Width; w++) 374 for (int w = 0; w < bitmap.Width; w++)
375 { 375 {
376 if (alpha <= 255) 376 if (alpha <= 255)
377 { 377 {
378 for (int h = 0; h < bitmap.Height; h++) 378 for (int h = 0; h < bitmap.Height; h++)
379 { 379 {
@@ -381,10 +381,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
381 } 381 }
382 } 382 }
383 } 383 }
384 384
385 GDIDraw(data, graph, altDataDelim, out reuseable); 385 GDIDraw(data, graph, altDataDelim, out reuseable);
386 } 386 }
387 387
388 byte[] imageJ2000 = new byte[0]; 388 byte[] imageJ2000 = new byte[0];
389 389
390 // This code exists for testing purposes, please do not remove. 390 // This code exists for testing purposes, please do not remove.
@@ -394,7 +394,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
394// imageJ2000 = s_asset2Data; 394// imageJ2000 = s_asset2Data;
395// 395//
396// s_flipper = !s_flipper; 396// s_flipper = !s_flipper;
397 397
398 try 398 try
399 { 399 {
400 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); 400 imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true);
@@ -420,13 +420,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
420 { 420 {
421 if (graph != null) 421 if (graph != null)
422 graph.Dispose(); 422 graph.Dispose();
423 423
424 if (bitmap != null) 424 if (bitmap != null)
425 bitmap.Dispose(); 425 bitmap.Dispose();
426 } 426 }
427 } 427 }
428 } 428 }
429 429
430 private int parseIntParam(string strInt) 430 private int parseIntParam(string strInt)
431 { 431 {
432 int parsed; 432 int parsed;
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
440 // m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString()); 440 // m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString());
441 parsed = -1; 441 parsed = -1;
442 } 442 }
443 443
444 return parsed; 444 return parsed;
445 } 445 }
446 446
@@ -572,7 +572,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
572 graph.DrawString("not an image. Please check URL.", errorFont, 572 graph.DrawString("not an image. Please check URL.", errorFont,
573 myBrush, new Point(startPoint.X, 12 + startPoint.Y)); 573 myBrush, new Point(startPoint.X, 12 + startPoint.Y));
574 } 574 }
575 575
576 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); 576 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y);
577 } 577 }
578 } 578 }
@@ -638,11 +638,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
638 { 638 {
639 nextLine = nextLine.Remove(0, 8); 639 nextLine = nextLine.Remove(0, 8);
640 nextLine = nextLine.Trim(); 640 nextLine = nextLine.Trim();
641 641
642 string[] fprops = nextLine.Split(partsDelimiter); 642 string[] fprops = nextLine.Split(partsDelimiter);
643 foreach (string prop in fprops) 643 foreach (string prop in fprops)
644 { 644 {
645 645
646 switch (prop) 646 switch (prop)
647 { 647 {
648 case "B": 648 case "B":
@@ -717,7 +717,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
717 else if (cap[0].ToLower() != "both") 717 else if (cap[0].ToLower() != "both")
718 return; 718 return;
719 string type = cap[1].ToLower(); 719 string type = cap[1].ToLower();
720 720
721 if (end) 721 if (end)
722 { 722 {
723 switch (type) 723 switch (type)
@@ -760,7 +760,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
760 nextLine = nextLine.Remove(0, 9); 760 nextLine = nextLine.Remove(0, 9);
761 nextLine = nextLine.Trim(); 761 nextLine = nextLine.Trim();
762 int hex = 0; 762 int hex = 0;
763 763
764 Color newColor; 764 Color newColor;
765 if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) 765 if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
766 { 766 {
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index e1c0cd7..660e03f 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
417 continue; 417 continue;
418 if (m_scene.GetSceneObjectPart(liHostID) == null) 418 if (m_scene.GetSceneObjectPart(liHostID) == null)
419 continue; 419 continue;
420 420
421 if (targets.Contains(liHostID)) 421 if (targets.Contains(liHostID))
422 QueueMessage(new ListenerInfo(li, name, id, msg)); 422 QueueMessage(new ListenerInfo(li, name, id, msg));
423 } 423 }
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index 87f4277..aed1372 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -621,7 +621,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
621 private Thread httpThread; 621 private Thread httpThread;
622 public int Idata; 622 public int Idata;
623 private UUID _itemID; 623 private UUID _itemID;
624 public UUID ItemID 624 public UUID ItemID
625 { 625 {
626 get { return _itemID; } 626 get { return _itemID; }
627 set { _itemID = value; } 627 set { _itemID = value; }
@@ -633,7 +633,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
633 set { _localID = value; } 633 set { _localID = value; }
634 } 634 }
635 private UUID _reqID; 635 private UUID _reqID;
636 public UUID ReqID 636 public UUID ReqID
637 { 637 {
638 get { return _reqID; } 638 get { return _reqID; }
639 set { _reqID = value; } 639 set { _reqID = value; }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
index 7b4668a..2c882e6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 private static bool m_Enabled = false; 47 private static bool m_Enabled = false;
48 48
49 private IConfigSource m_Config; 49 private IConfigSource m_Config;
50 bool m_Registered = false; 50 bool m_Registered = false;
51 51
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
74 { 74 {
75 } 75 }
76 76
77 public Type ReplaceableInterface 77 public Type ReplaceableInterface
78 { 78 {
79 get { return null; } 79 get { return null; }
80 } 80 }
@@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
95 95
96 m_log.Info("[HGAssetService]: Starting..."); 96 m_log.Info("[HGAssetService]: Starting...");
97 97
98 98
99 Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" }; 99 Object[] args = new Object[] { m_Config, MainServer.Instance, "HGAssetService" };
100 100
101 ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args); 101 ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
index 2cdffe6..a8c4e3c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/AuthenticationServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 bool m_Registered = false; 52 bool m_Registered = false;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
index 22857d0..834cbb7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/GridInfoServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 bool m_Registered = false; 52 bool m_Registered = false;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
index f749295..4f87595 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
48 { 48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 private static bool m_Enabled = false; 50 private static bool m_Enabled = false;
51 51
52 private IConfigSource m_Config; 52 private IConfigSource m_Config;
53 private bool m_Registered = false; 53 private bool m_Registered = false;
54 private string m_LocalServiceDll = String.Empty; 54 private string m_LocalServiceDll = String.Empty;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
88 { 88 {
89 } 89 }
90 90
91 public Type ReplaceableInterface 91 public Type ReplaceableInterface
92 { 92 {
93 get { return null; } 93 get { return null; }
94 } 94 }
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid
130 m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); 130 m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService);
131 131
132 m_UASHandler = new UserAgentServerConnector(m_Config, MainServer.Instance, friendsConn); 132 m_UASHandler = new UserAgentServerConnector(m_Config, MainServer.Instance, friendsConn);
133 133
134 new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService"); 134 new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService");
135 135
136 new HGFriendsServerConnector(m_Config, MainServer.Instance, "HGFriendsService", friendsConn); 136 new HGFriendsServerConnector(m_Config, MainServer.Instance, "HGFriendsService", friendsConn);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
index 0a4e736..61e37a9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 private static bool m_Enabled = false; 47 private static bool m_Enabled = false;
48 48
49 private IConfigSource m_Config; 49 private IConfigSource m_Config;
50 bool m_Registered = false; 50 bool m_Registered = false;
51 51
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
73 { 73 {
74 } 74 }
75 75
76 public Type ReplaceableInterface 76 public Type ReplaceableInterface
77 { 77 {
78 get { return null; } 78 get { return null; }
79 } 79 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
index 1273f0d..21483c5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
84 { 84 {
85 } 85 }
86 86
87 public Type ReplaceableInterface 87 public Type ReplaceableInterface
88 { 88 {
89 get { return null; } 89 get { return null; }
90 } 90 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
index 425febd..065dd94 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login
84 { 84 {
85 } 85 }
86 86
87 public Type ReplaceableInterface 87 public Type ReplaceableInterface
88 { 88 {
89 get { return null; } 89 get { return null; }
90 } 90 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login
113 { 113 {
114 if (!m_Enabled) 114 if (!m_Enabled)
115 return; 115 return;
116 116
117 if (!m_Registered) 117 if (!m_Registered)
118 { 118 {
119 m_Registered = true; 119 m_Registered = true;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
index c14bce7..a75a156 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/MapImage/MapImageServiceInConnectorModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 private static bool m_Enabled = false; 49 private static bool m_Enabled = false;
50 50
51 private IConfigSource m_Config; 51 private IConfigSource m_Config;
52 52
53 #region Region Module interface 53 #region Region Module interface
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.MapImage
75 { 75 {
76 } 76 }
77 77
78 public Type ReplaceableInterface 78 public Type ReplaceableInterface
79 { 79 {
80 get { return null; } 80 get { return null; }
81 } 81 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
index 6bf47cb..09c545c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
83 { 83 {
84 } 84 }
85 85
86 public Type ReplaceableInterface 86 public Type ReplaceableInterface
87 { 87 {
88 get { return null; } 88 get { return null; }
89 } 89 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
index 57d1132..7ba39d4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
77 { 77 {
78 } 78 }
79 79
80 public Type ReplaceableInterface 80 public Type ReplaceableInterface
81 { 81 {
82 get { return null; } 82 get { return null; }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
index 4701ee6..9e75ee2 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs
@@ -77,8 +77,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
77 { 77 {
78 get; private set; 78 get; private set;
79 } 79 }
80 80
81 public Type ReplaceableInterface 81 public Type ReplaceableInterface
82 { 82 {
83 get { return null; } 83 get { return null; }
84 } 84 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
87 { 87 {
88 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params"); 88 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector no params");
89 } 89 }
90 90
91 public LocalUserProfilesServicesConnector(IConfigSource source) 91 public LocalUserProfilesServicesConnector(IConfigSource source)
92 { 92 {
93 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly."); 93 m_log.Debug("[LOCAL USERPROFILES SERVICE CONNECTOR]: LocalUserProfileServicesConnector instantiated directly.");
@@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
97 public void InitialiseService(IConfigSource source) 97 public void InitialiseService(IConfigSource source)
98 { 98 {
99 ConfigName = "UserProfilesService"; 99 ConfigName = "UserProfilesService";
100 100
101 // Instantiate the request handler 101 // Instantiate the request handler
102 IHttpServer Server = MainServer.Instance; 102 IHttpServer Server = MainServer.Instance;
103 103
@@ -107,35 +107,35 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
107 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini"); 107 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: UserProfilesService missing from OpenSim.ini");
108 return; 108 return;
109 } 109 }
110 110
111 if(!config.GetBoolean("Enabled",false)) 111 if(!config.GetBoolean("Enabled",false))
112 { 112 {
113 Enabled = false; 113 Enabled = false;
114 return; 114 return;
115 } 115 }
116 116
117 Enabled = true; 117 Enabled = true;
118 118
119 string serviceDll = config.GetString("LocalServiceModule", 119 string serviceDll = config.GetString("LocalServiceModule",
120 String.Empty); 120 String.Empty);
121 121
122 if (serviceDll == String.Empty) 122 if (serviceDll == String.Empty)
123 { 123 {
124 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: No LocalServiceModule named in section UserProfilesService"); 124 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: No LocalServiceModule named in section UserProfilesService");
125 return; 125 return;
126 } 126 }
127 127
128 Object[] args = new Object[] { source, ConfigName }; 128 Object[] args = new Object[] { source, ConfigName };
129 ServiceModule = 129 ServiceModule =
130 ServerUtils.LoadPlugin<IUserProfilesService>(serviceDll, 130 ServerUtils.LoadPlugin<IUserProfilesService>(serviceDll,
131 args); 131 args);
132 132
133 if (ServiceModule == null) 133 if (ServiceModule == null)
134 { 134 {
135 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: Can't load user profiles service"); 135 m_log.Error("[LOCAL USERPROFILES SERVICE CONNECTOR]: Can't load user profiles service");
136 return; 136 return;
137 } 137 }
138 138
139 Enabled = true; 139 Enabled = true;
140 140
141 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule); 141 JsonRpcProfileHandlers handler = new JsonRpcProfileHandlers(ServiceModule);
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
196 { 196 {
197 if (!Enabled) 197 if (!Enabled)
198 return; 198 return;
199 199
200 lock (regions) 200 lock (regions)
201 { 201 {
202 if (regions.ContainsKey(scene.RegionInfo.RegionID)) 202 if (regions.ContainsKey(scene.RegionInfo.RegionID))
@@ -209,7 +209,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
209 void IRegionModuleBase.RemoveRegion(Scene scene) 209 void IRegionModuleBase.RemoveRegion(Scene scene)
210 { 210 {
211 if (!Enabled) 211 if (!Enabled)
212 return; 212 return;
213 213
214 lock (regions) 214 lock (regions)
215 { 215 {
@@ -221,7 +221,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile
221 void IRegionModuleBase.RegionLoaded(Scene scene) 221 void IRegionModuleBase.RegionLoaded(Scene scene)
222 { 222 {
223 if (!Enabled) 223 if (!Enabled)
224 return; 224 return;
225 } 225 }
226 #endregion 226 #endregion
227 } 227 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
index 41ae53f..5cd68d9 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/LocalAgentPreferencesServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
50 50
51 #region ISharedRegionModule 51 #region ISharedRegionModule
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
index a827c4c..d60236a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/AgentPreferences/RemoteAgentPreferencesServiceConnector.cs
@@ -44,14 +44,14 @@ using Nini.Config;
44namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences 44namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.AgentPreferences
45{ 45{
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAgentPreferencesServicesConnector")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteAgentPreferencesServicesConnector")]
47 public class RemoteAgentPreferencesServicesConnector : AgentPreferencesServicesConnector, 47 public class RemoteAgentPreferencesServicesConnector : AgentPreferencesServicesConnector,
48 ISharedRegionModule, IAgentPreferencesService 48 ISharedRegionModule, IAgentPreferencesService
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private bool m_Enabled = false; 52 private bool m_Enabled = false;
53 53
54 public Type ReplaceableInterface 54 public Type ReplaceableInterface
55 { 55 {
56 get { return null; } 56 get { return null; }
57 } 57 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
index 31d1129..f5aa971 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/HGAssetBroker.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
59 59
60 private AssetPermissions m_AssetPerms; 60 private AssetPermissions m_AssetPerms;
61 61
62 public Type ReplaceableInterface 62 public Type ReplaceableInterface
63 { 63 {
64 get { return null; } 64 get { return null; }
65 } 65 }
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
159 { 159 {
160 if (!m_Enabled) 160 if (!m_Enabled)
161 return; 161 return;
162 162
163 m_aScene = scene; 163 m_aScene = scene;
164 164
165 m_aScene.RegisterModuleInterface<IAssetService>(this); 165 m_aScene.RegisterModuleInterface<IAssetService>(this);
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
180 180
181 if (!(m_Cache is ISharedRegionModule)) 181 if (!(m_Cache is ISharedRegionModule))
182 m_Cache = null; 182 m_Cache = null;
183 183
184 } 184 }
185 185
186 m_log.InfoFormat("[HG ASSET CONNECTOR]: Enabled hypergrid asset broker for region {0}", scene.RegionInfo.RegionName); 186 m_log.InfoFormat("[HG ASSET CONNECTOR]: Enabled hypergrid asset broker for region {0}", scene.RegionInfo.RegionName);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
206 { 206 {
207 //m_log.DebugFormat("[HG ASSET CONNECTOR]: Get {0}", id); 207 //m_log.DebugFormat("[HG ASSET CONNECTOR]: Get {0}", id);
208 AssetBase asset = null; 208 AssetBase asset = null;
209 209
210 if (m_Cache != null) 210 if (m_Cache != null)
211 { 211 {
212 asset = m_Cache.Get(id); 212 asset = m_Cache.Get(id);
@@ -247,7 +247,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
247 public AssetMetadata GetMetadata(string id) 247 public AssetMetadata GetMetadata(string id)
248 { 248 {
249 AssetBase asset = null; 249 AssetBase asset = null;
250 250
251 if (m_Cache != null) 251 if (m_Cache != null)
252 { 252 {
253 if (m_Cache != null) 253 if (m_Cache != null)
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
270 public byte[] GetData(string id) 270 public byte[] GetData(string id)
271 { 271 {
272 AssetBase asset = null; 272 AssetBase asset = null;
273 273
274 if (m_Cache != null) 274 if (m_Cache != null)
275 { 275 {
276 if (m_Cache != null) 276 if (m_Cache != null)
@@ -290,7 +290,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
290 public bool Get(string id, Object sender, AssetRetrieved handler) 290 public bool Get(string id, Object sender, AssetRetrieved handler)
291 { 291 {
292 AssetBase asset = null; 292 AssetBase asset = null;
293 293
294 if (m_Cache != null) 294 if (m_Cache != null)
295 asset = m_Cache.Get(id); 295 asset = m_Cache.Get(id);
296 296
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
348 348
349 bool isHG = IsHG(asset.ID); 349 bool isHG = IsHG(asset.ID);
350 if ((m_Cache != null) && !isHG) 350 if ((m_Cache != null) && !isHG)
351 // Don't store it in the cache if the asset is to 351 // Don't store it in the cache if the asset is to
352 // be sent to the other grid, because this is already 352 // be sent to the other grid, because this is already
353 // a copy of the local asset. 353 // a copy of the local asset.
354 m_Cache.Cache(asset); 354 m_Cache.Cache(asset);
@@ -366,7 +366,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
366 366
367 if (String.IsNullOrEmpty(id)) 367 if (String.IsNullOrEmpty(id))
368 return string.Empty; 368 return string.Empty;
369 369
370 if(asset.ID != id) 370 if(asset.ID != id)
371 { 371 {
372 asset.ID = id; 372 asset.ID = id;
@@ -380,7 +380,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
380 public bool UpdateContent(string id, byte[] data) 380 public bool UpdateContent(string id, byte[] data)
381 { 381 {
382 AssetBase asset = null; 382 AssetBase asset = null;
383 383
384 if (m_Cache != null) 384 if (m_Cache != null)
385 asset = m_Cache.Get(id); 385 asset = m_Cache.Get(id);
386 386
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index d5d6667..7190aa0 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
50 50
51 private bool m_Enabled = false; 51 private bool m_Enabled = false;
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
155 public AssetBase Get(string id) 155 public AssetBase Get(string id)
156 { 156 {
157// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id); 157// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Synchronously requesting asset {0}", id);
158 158
159 AssetBase asset = null; 159 AssetBase asset = null;
160 if (m_Cache != null) 160 if (m_Cache != null)
161 asset = m_Cache.Get(id); 161 asset = m_Cache.Get(id);
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
169// if (null == asset) 169// if (null == asset)
170// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id); 170// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not synchronously find asset with id {0}", id);
171 } 171 }
172 172
173 return asset; 173 return asset;
174 } 174 }
175 175
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
193 return asset.Metadata; 193 return asset.Metadata;
194 194
195 asset = m_AssetService.Get(id); 195 asset = m_AssetService.Get(id);
196 if (asset != null) 196 if (asset != null)
197 { 197 {
198 if (m_Cache != null) 198 if (m_Cache != null)
199 m_Cache.Cache(asset); 199 m_Cache.Cache(asset);
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
229 public bool Get(string id, Object sender, AssetRetrieved handler) 229 public bool Get(string id, Object sender, AssetRetrieved handler)
230 { 230 {
231// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id); 231// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Asynchronously requesting asset {0}", id);
232 232
233 if (m_Cache != null) 233 if (m_Cache != null)
234 { 234 {
235 AssetBase asset = m_Cache.Get(id); 235 AssetBase asset = m_Cache.Get(id);
@@ -264,7 +264,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
264 { 264 {
265 if (m_Cache != null) 265 if (m_Cache != null)
266 m_Cache.Cache(asset); 266 m_Cache.Cache(asset);
267 267
268 if (asset.Local) 268 if (asset.Local)
269 { 269 {
270// m_log.DebugFormat( 270// m_log.DebugFormat(
@@ -278,7 +278,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
278// m_log.DebugFormat( 278// m_log.DebugFormat(
279// "[LOCAL ASSET SERVICE CONNECTOR]: Passing {0} {1} on to asset service for storage, status Temporary = {2}, Local = {3}", 279// "[LOCAL ASSET SERVICE CONNECTOR]: Passing {0} {1} on to asset service for storage, status Temporary = {2}, Local = {3}",
280// asset.Name, asset.ID, asset.Temporary, asset.Local); 280// asset.Name, asset.ID, asset.Temporary, asset.Local);
281 281
282 return m_AssetService.Store(asset); 282 return m_AssetService.Store(asset);
283 } 283 }
284 } 284 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
index ff04f9d..1225ab5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/RemoteAssetServiceConnector.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
50 private bool m_Enabled = false; 50 private bool m_Enabled = false;
51 private IAssetCache m_Cache; 51 private IAssetCache m_Cache;
52 52
53 public Type ReplaceableInterface 53 public Type ReplaceableInterface
54 { 54 {
55 get { return null; } 55 get { return null; }
56 } 56 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
index f027810..8017245 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/LocalAuthenticationServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
53 53
54 #region ISharedRegionModule 54 #region ISharedRegionModule
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
@@ -143,13 +143,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
143 { 143 {
144 // Not implemented at the regions 144 // Not implemented at the regions
145 realID = UUID.Zero; 145 realID = UUID.Zero;
146 return string.Empty; 146 return string.Empty;
147 } 147 }
148 148
149 public string Authenticate(UUID principalID, string password, int lifetime) 149 public string Authenticate(UUID principalID, string password, int lifetime)
150 { 150 {
151 // Not implemented at the regions 151 // Not implemented at the regions
152 return string.Empty; 152 return string.Empty;
153 } 153 }
154 154
155 public bool Verify(UUID principalID, string token, int lifetime) 155 public bool Verify(UUID principalID, string token, int lifetime)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
index 7cb8b22..fd1d802 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authentication/RemoteAuthenticationServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authentication
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 49
50 public Type ReplaceableInterface 50 public Type ReplaceableInterface
51 { 51 {
52 get { return null; } 52 get { return null; }
53 } 53 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index 1acb695..0be0676 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
53 53
54 private bool m_Enabled = false; 54 private bool m_Enabled = false;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
66 public void Initialise(IConfigSource source) 66 public void Initialise(IConfigSource source)
67 { 67 {
68 m_log.Info("[AUTHORIZATION CONNECTOR]: Initialise"); 68 m_log.Info("[AUTHORIZATION CONNECTOR]: Initialise");
69 69
70 IConfig moduleConfig = source.Configs["Modules"]; 70 IConfig moduleConfig = source.Configs["Modules"];
71 if (moduleConfig != null) 71 if (moduleConfig != null)
72 { 72 {
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index b8d409d..f312b0d 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
51 private bool m_Enabled = false; 51 private bool m_Enabled = false;
52 private List<Scene> m_scenes = new List<Scene>(); 52 private List<Scene> m_scenes = new List<Scene>();
53 53
54 public Type ReplaceableInterface 54 public Type ReplaceableInterface
55 { 55 {
56 get { return null; } 56 get { return null; }
57 } 57 }
@@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
103 m_scenes.Add(scene); 103 m_scenes.Add(scene);
104 scene.RegisterModuleInterface<IAuthorizationService>(this); 104 scene.RegisterModuleInterface<IAuthorizationService>(this);
105 } 105 }
106 106
107 } 107 }
108 108
109 public void RemoveRegion(Scene scene) 109 public void RemoveRegion(Scene scene)
@@ -118,16 +118,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName); 118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName);
119 119
120 } 120 }
121 121
122 public bool IsAuthorizedForRegion( 122 public bool IsAuthorizedForRegion(
123 string userID, string firstName, string lastName, string regionID, out string message) 123 string userID, string firstName, string lastName, string regionID, out string message)
124 { 124 {
125 m_log.InfoFormat( 125 m_log.InfoFormat(
126 "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 126 "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
127 127
128 bool isAuthorized = true; 128 bool isAuthorized = true;
129 message = String.Empty; 129 message = String.Empty;
130 130
131 // get the scene this call is being made for 131 // get the scene this call is being made for
132 Scene scene = null; 132 Scene scene = null;
133 lock (m_scenes) 133 lock (m_scenes)
@@ -140,11 +140,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 } 140 }
141 } 141 }
142 } 142 }
143 143
144 if (scene != null) 144 if (scene != null)
145 { 145 {
146 string mail = String.Empty; 146 string mail = String.Empty;
147 147
148 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID)); 148 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
149 149
150 //if account not found, we assume its a foreign visitor from HG, else use account data... 150 //if account not found, we assume its a foreign visitor from HG, else use account data...
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
165 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}", 165 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}",
166 regionID); 166 regionID);
167 } 167 }
168 168
169 return isAuthorized; 169 return isAuthorized;
170 } 170 }
171 } 171 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
index c3ef588..42f6c3f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/LocalAvatarServiceConnector.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
54 54
55 #region ISharedRegionModule 55 #region ISharedRegionModule
56 56
57 public Type ReplaceableInterface 57 public Type ReplaceableInterface
58 { 58 {
59 get { return null; } 59 get { return null; }
60 } 60 }
@@ -144,12 +144,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
144 { 144 {
145 return m_AvatarService.GetAppearance(userID); 145 return m_AvatarService.GetAppearance(userID);
146 } 146 }
147 147
148 public bool SetAppearance(UUID userID, AvatarAppearance appearance) 148 public bool SetAppearance(UUID userID, AvatarAppearance appearance)
149 { 149 {
150 return m_AvatarService.SetAppearance(userID,appearance); 150 return m_AvatarService.SetAppearance(userID,appearance);
151 } 151 }
152 152
153 public AvatarData GetAvatar(UUID userID) 153 public AvatarData GetAvatar(UUID userID)
154 { 154 {
155 return m_AvatarService.GetAvatar(userID); 155 return m_AvatarService.GetAvatar(userID);
@@ -174,7 +174,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
174 { 174 {
175 return m_AvatarService.RemoveItems(userID, names); 175 return m_AvatarService.RemoveItems(userID, names);
176 } 176 }
177 177
178 #endregion 178 #endregion
179 179
180 } 180 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
index a087aea..37cfbbc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Avatar/RemoteAvatarServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Avatar
47 47
48 private bool m_Enabled = false; 48 private bool m_Enabled = false;
49 49
50 public Type ReplaceableInterface 50 public Type ReplaceableInterface
51 { 51 {
52 get { return null; } 52 get { return null; }
53 } 53 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
index 70733fc..d220568 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
64 public LocalGridServicesConnector(IConfigSource source) 64 public LocalGridServicesConnector(IConfigSource source)
65 { 65 {
66 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader); 66 m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
67 InitialiseService(source, null); 67 InitialiseService(source, null);
68 } 68 }
69 69
70 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache) 70 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
75 75
76 #region ISharedRegionModule 76 #region ISharedRegionModule
77 77
78 public Type ReplaceableInterface 78 public Type ReplaceableInterface
79 { 79 {
80 get { return null; } 80 get { return null; }
81 } 81 }
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
92 { 92 {
93 string name = moduleConfig.GetString("GridServices", ""); 93 string name = moduleConfig.GetString("GridServices", "");
94 if (name == Name) 94 if (name == Name)
95 { 95 {
96 if(InitialiseService(source, null)) 96 if(InitialiseService(source, null))
97 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled"); 97 m_log.Info("[LOCAL GRID SERVICE CONNECTOR]: Local grid connector enabled");
98 } 98 }
@@ -190,8 +190,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
190 // This shouldn't happen 190 // This shouldn't happen
191 if (region == null) 191 if (region == null)
192 return; 192 return;
193 193
194 m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region); 194 m_RegionInfoCache.CacheNearNeighbour(region.ScopeID, region);
195 } 195 }
196 196
197 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 197 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
206 206
207 public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID) 207 public List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
208 { 208 {
209 return m_GridService.GetNeighbours(scopeID, regionID); 209 return m_GridService.GetNeighbours(scopeID, regionID);
210 } 210 }
211 211
212 public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) 212 public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
@@ -282,7 +282,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
282 { 282 {
283 return m_GridService.GetHyperlinks(scopeID); 283 return m_GridService.GetHyperlinks(scopeID);
284 } 284 }
285 285
286 public int GetRegionFlags(UUID scopeID, UUID regionID) 286 public int GetRegionFlags(UUID scopeID, UUID regionID)
287 { 287 {
288 return m_GridService.GetRegionFlags(scopeID, regionID); 288 return m_GridService.GetRegionFlags(scopeID, regionID);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
index 5eb525b..84e52f7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
44// private static readonly ILog m_log = 44// private static readonly ILog m_log =
45// LogManager.GetLogger( 45// LogManager.GetLogger(
46// MethodBase.GetCurrentMethod().DeclaringType); 46// MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private static RegionsExpiringCache m_Cache; 48 private static RegionsExpiringCache m_Cache;
49 private int numberInstances; 49 private int numberInstances;
50 50
@@ -60,12 +60,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
60 if (rinfo != null) 60 if (rinfo != null)
61 this.Cache(rinfo.ScopeID, rinfo); 61 this.Cache(rinfo.ScopeID, rinfo);
62 } 62 }
63 63
64 public void Cache(UUID scopeID, GridRegion rinfo) 64 public void Cache(UUID scopeID, GridRegion rinfo)
65 { 65 {
66 if (rinfo == null) 66 if (rinfo == null)
67 return; 67 return;
68 68
69 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); 69 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS);
70 } 70 }
71 71
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
73 { 73 {
74 if (rinfo == null) 74 if (rinfo == null)
75 return; 75 return;
76 76
77 m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f); 77 m_Cache.AddOrUpdate(rinfo.ScopeID, rinfo, 1e7f);
78 } 78 }
79 79
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
81 { 81 {
82 if (rinfo == null) 82 if (rinfo == null)
83 return; 83 return;
84 84
85 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS); 85 m_Cache.AddOrUpdate(scopeID, rinfo, CACHE_EXPIRATION_SECONDS);
86 } 86 }
87 87
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
89 { 89 {
90 if (rinfo == null) 90 if (rinfo == null)
91 return; 91 return;
92 92
93 m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds); 93 m_Cache.AddOrUpdate(scopeID, rinfo, expireSeconds);
94 } 94 }
95 95
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
141 inCache = true; 141 inCache = true;
142 return rinfo; 142 return rinfo;
143 } 143 }
144 144
145 return null; 145 return null;
146 } 146 }
147 147
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
155 inCache = true; 155 inCache = true;
156 return rinfo; 156 return rinfo;
157 } 157 }
158 158
159 return null; 159 return null;
160 } 160 }
161 } 161 }
@@ -300,7 +300,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
300 private Dictionary<string, ulong> byname; 300 private Dictionary<string, ulong> byname;
301 private Dictionary<UUID, ulong> byuuid; 301 private Dictionary<UUID, ulong> byuuid;
302 // includes handles to the inside of large regions 302 // includes handles to the inside of large regions
303 private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>(); 303 private Dictionary<ulong, ulong> innerHandles = new Dictionary<ulong, ulong>();
304 304
305 public RegionInfoForScope() 305 public RegionInfoForScope()
306 { 306 {
@@ -342,7 +342,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
342 byuuid = new Dictionary<UUID, ulong>(); 342 byuuid = new Dictionary<UUID, ulong>();
343 343
344 storage[handle] = region; 344 storage[handle] = region;
345 expires[handle] = expire; 345 expires[handle] = expire;
346 byname[region.RegionName] = handle; 346 byname[region.RegionName] = handle;
347 byuuid[region.RegionID] = handle; 347 byuuid[region.RegionID] = handle;
348 348
@@ -385,7 +385,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
385 storage[handle] = region; 385 storage[handle] = region;
386 byname[region.RegionName] = handle; 386 byname[region.RegionName] = handle;
387 byuuid[region.RegionID] = handle; 387 byuuid[region.RegionID] = handle;
388 388
389 } 389 }
390 390
391 public void Remove(GridRegion region) 391 public void Remove(GridRegion region)
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
483 483
484 if(!innerHandles.ContainsKey(handle)) 484 if(!innerHandles.ContainsKey(handle))
485 return null; 485 return null;
486 486
487 ulong rhandle = innerHandles[handle]; 487 ulong rhandle = innerHandles[handle];
488 if(storage.ContainsKey(rhandle)) 488 if(storage.ContainsKey(rhandle))
489 return storage[rhandle]; 489 return storage[rhandle];
@@ -495,7 +495,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
495 { 495 {
496 if(byname == null || !byname.ContainsKey(name)) 496 if(byname == null || !byname.ContainsKey(name))
497 return null; 497 return null;
498 498
499 ulong handle = byname[name]; 499 ulong handle = byname[name];
500 if(storage.ContainsKey(handle)) 500 if(storage.ContainsKey(handle))
501 return storage[handle]; 501 return storage[handle];
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
528 528
529 if(!innerHandles.ContainsKey(handle)) 529 if(!innerHandles.ContainsKey(handle))
530 return null; 530 return null;
531 531
532 ulong rhandle = innerHandles[handle]; 532 ulong rhandle = innerHandles[handle];
533 if(!storage.ContainsKey(rhandle)) 533 if(!storage.ContainsKey(rhandle))
534 return null; 534 return null;
@@ -536,7 +536,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
536 GridRegion r = storage[rhandle]; 536 GridRegion r = storage[rhandle];
537 if(r == null) 537 if(r == null)
538 return null; 538 return null;
539 539
540 // extra check, possible redundant 540 // extra check, possible redundant
541 541
542 int test = r.RegionLocX; 542 int test = r.RegionLocX;
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
552 if (y < test) 552 if (y < test)
553 return r; 553 return r;
554 554
555/* 555/*
556 // next do the harder work 556 // next do the harder work
557 foreach(KeyValuePair<ulong, GridRegion> kvp in storage) 557 foreach(KeyValuePair<ulong, GridRegion> kvp in storage)
558 { 558 {
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
588 if(kvp.Value < now) 588 if(kvp.Value < now)
589 toexpire.Add(kvp.Key); 589 toexpire.Add(kvp.Key);
590 } 590 }
591 591
592 if(toexpire.Count == 0) 592 if(toexpire.Count == 0)
593 return expires.Count; 593 return expires.Count;
594 594
@@ -597,7 +597,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
597 Clear(); 597 Clear();
598 return 0; 598 return 0;
599 } 599 }
600 600
601 foreach(ulong h in toexpire) 601 foreach(ulong h in toexpire)
602 { 602 {
603 if(storage != null) 603 if(storage != null)
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
658 innerHandles[fh.toHandle()] = handle; 658 innerHandles[fh.toHandle()] = handle;
659 fh.y += 256; 659 fh.y += 256;
660 } 660 }
661 661
662 fh.y = startY; 662 fh.y = startY;
663 fh.x += 256; 663 fh.x += 256;
664 } 664 }
@@ -684,18 +684,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
684 innerHandles.Remove(fh.toHandle()); 684 innerHandles.Remove(fh.toHandle());
685 fh.y += 256; 685 fh.y += 256;
686 } 686 }
687 687
688 fh.y = startY; 688 fh.y = startY;
689 fh.x += 256; 689 fh.x += 256;
690 } 690 }
691 } 691 }
692 } 692 }
693 693
694 public class RegionsExpiringCache 694 public class RegionsExpiringCache
695 { 695 {
696 const double CACHE_PURGE_HZ = 60; // seconds 696 const double CACHE_PURGE_HZ = 60; // seconds
697 const int MAX_LOCK_WAIT = 10000; // milliseconds 697 const int MAX_LOCK_WAIT = 10000; // milliseconds
698 698
699 /// <summary>For thread safety</summary> 699 /// <summary>For thread safety</summary>
700 object syncRoot = new object(); 700 object syncRoot = new object();
701 /// <summary>For thread safety</summary> 701 /// <summary>For thread safety</summary>
@@ -728,7 +728,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
728 ris = new RegionInfoForScope(region, expire); 728 ris = new RegionInfoForScope(region, expire);
729 InfobyScope[scope] = ris; 729 InfobyScope[scope] = ris;
730 } 730 }
731 else 731 else
732 ris.AddUpdate(region, expire); 732 ris.AddUpdate(region, expire);
733 733
734 return true; 734 return true;
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
748 } 748 }
749 finally { Monitor.Exit(syncRoot); } 749 finally { Monitor.Exit(syncRoot); }
750 } 750 }
751 751
752 public bool Contains(UUID scope, GridRegion region) 752 public bool Contains(UUID scope, GridRegion region)
753 { 753 {
754 if(region == null) 754 if(region == null)
@@ -758,11 +758,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
758 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 758 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
759 759
760 try 760 try
761 { 761 {
762 RegionInfoForScope ris = null; 762 RegionInfoForScope ris = null;
763 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 763 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
764 return false; 764 return false;
765 765
766 return ris.Contains(region); 766 return ris.Contains(region);
767 } 767 }
768 finally { Monitor.Exit(syncRoot); } 768 finally { Monitor.Exit(syncRoot); }
@@ -774,11 +774,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
774 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 774 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
775 775
776 try 776 try
777 { 777 {
778 RegionInfoForScope ris = null; 778 RegionInfoForScope ris = null;
779 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 779 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
780 return false; 780 return false;
781 781
782 return ris.Contains(handle); 782 return ris.Contains(handle);
783 } 783 }
784 finally { Monitor.Exit(syncRoot); } 784 finally { Monitor.Exit(syncRoot); }
@@ -790,7 +790,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
790 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 790 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
791 791
792 try 792 try
793 { 793 {
794 int count = 0; 794 int count = 0;
795 foreach(RegionInfoForScope ris in InfobyScope.Values) 795 foreach(RegionInfoForScope ris in InfobyScope.Values)
796 count += ris.Count(); 796 count += ris.Count();
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
804 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) 804 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT))
805 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 805 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
806 try 806 try
807 { 807 {
808 RegionInfoForScope ris = null; 808 RegionInfoForScope ris = null;
809 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 809 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
810 return false; 810 return false;
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
825 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT)) 825 if (!Monitor.TryEnter(syncRoot, MAX_LOCK_WAIT))
826 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms"); 826 throw new ApplicationException("Lock could not be acquired after " + MAX_LOCK_WAIT + "ms");
827 try 827 try
828 { 828 {
829 RegionInfoForScope ris = null; 829 RegionInfoForScope ris = null;
830 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null) 830 if(!InfobyScope.TryGetValue(scope, out ris) || ris == null)
831 return false; 831 return false;
@@ -940,7 +940,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
940 private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e) 940 private void PurgeCache(object sender, System.Timers.ElapsedEventArgs e)
941 { 941 {
942 // Only let one thread purge at once - a buildup could cause a crash 942 // Only let one thread purge at once - a buildup could cause a crash
943 // This could cause the purge to be delayed while there are lots of read/write ops 943 // This could cause the purge to be delayed while there are lots of read/write ops
944 // happening on the cache 944 // happening on the cache
945 if (!Monitor.TryEnter(isPurging)) 945 if (!Monitor.TryEnter(isPurging))
946 return; 946 return;
@@ -961,7 +961,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
961 if (kvp.Value.expire(now) == 0) 961 if (kvp.Value.expire(now) == 0)
962 expiredscopes.Add(kvp.Key); 962 expiredscopes.Add(kvp.Key);
963 } 963 }
964 964
965 if (expiredscopes.Count > 0) 965 if (expiredscopes.Count > 0)
966 { 966 {
967 foreach (UUID sid in expiredscopes) 967 foreach (UUID sid in expiredscopes)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index 50e4c8a..ee17093 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
58 private IGridService m_RemoteGridService; 58 private IGridService m_RemoteGridService;
59 59
60 private RegionInfoCache m_RegionInfoCache; 60 private RegionInfoCache m_RegionInfoCache;
61 61
62 public RemoteGridServicesConnector() 62 public RemoteGridServicesConnector()
63 { 63 {
64 } 64 }
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
70 70
71 #region ISharedRegionmodule 71 #region ISharedRegionmodule
72 72
73 public Type ReplaceableInterface 73 public Type ReplaceableInterface
74 { 74 {
75 get { return null; } 75 get { return null; }
76 } 76 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
113 return false; 113 return false;
114 } 114 }
115 115
116 Object[] args = new Object[] { source }; 116 Object[] args = new Object[] { source };
117 m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args); 117 m_RemoteGridService = ServerUtils.LoadPlugin<IGridService>(networkConnector, args);
118 118
119 m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache); 119 m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache);
@@ -130,11 +130,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
130 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); 130 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);
131 // Legacy. Remove soon! 131 // Legacy. Remove soon!
132 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper); 132 m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper);
133 133
134 Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper); 134 Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper);
135 135
136 return true; 136 return true;
137 } 137 }
138 138
139 public void PostInitialise() 139 public void PostInitialise()
140 { 140 {
@@ -249,14 +249,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
249 { 249 {
250 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) 250 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper))
251 return rinfo; // no HG 251 return rinfo; // no HG
252 252
253 string regionURI = ""; 253 string regionURI = "";
254 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) 254 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName))
255 return rinfo; // invalid 255 return rinfo; // invalid
256 if(m_ThisGatekeeper != regionURI) 256 if(m_ThisGatekeeper != regionURI)
257 return rinfo; // not local grid 257 return rinfo; // not local grid
258 } 258 }
259 259
260 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); 260 rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName);
261 m_RegionInfoCache.Cache(scopeID, rinfo); 261 m_RegionInfoCache.Cache(scopeID, rinfo);
262 return rinfo; 262 return rinfo;
@@ -275,10 +275,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
275 { 275 {
276 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper)) 276 if(string.IsNullOrWhiteSpace(m_ThisGatekeeper))
277 return rinfo; // no HG 277 return rinfo; // no HG
278 278
279 string regionURI = ""; 279 string regionURI = "";
280 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName)) 280 if(!Util.buildHGRegionURI(name, out regionURI, out regionName) || string.IsNullOrWhiteSpace(regionName))
281 return rinfo; // invalid 281 return rinfo; // invalid
282 if(m_ThisGatekeeper != regionURI) 282 if(m_ThisGatekeeper != regionURI)
283 return rinfo; // not local grid 283 return rinfo; // not local grid
284 } 284 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
index 044e0e5..1378368 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
88 Scene s = new Scene(new RegionInfo()); 88 Scene s = new Scene(new RegionInfo());
89 s.RegionInfo.RegionID = r1.RegionID; 89 s.RegionInfo.RegionID = r1.RegionID;
90 m_LocalConnector.AddRegion(s); 90 m_LocalConnector.AddRegion(s);
91 91
92 GridRegion r2 = new GridRegion(); 92 GridRegion r2 = new GridRegion();
93 r2.RegionName = "Test Region 2"; 93 r2.RegionName = "Test Region 2";
94 r2.RegionID = new UUID(2); 94 r2.RegionID = new UUID(2);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
index 98ccc95..c780bcd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs
@@ -37,7 +37,7 @@ using log4net;
37 37
38namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser 38namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
39{ 39{
40 public class ActivityDetector 40 public class ActivityDetector
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
67 { 67 {
68 if (sp.isNPC) 68 if (sp.isNPC)
69 return; 69 return;
70 70
71 if(sp.gotCrossUpdate) 71 if(sp.gotCrossUpdate)
72 { 72 {
73 Util.FireAndForget(delegate 73 Util.FireAndForget(delegate
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index c48186f..5efdd9b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
86 } 86 }
87 } 87 }
88 88
89 public Type ReplaceableInterface 89 public Type ReplaceableInterface
90 { 90 {
91 get { return null; } 91 get { return null; }
92 } 92 }
@@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
299 return m_InventoryURLs[userID]; 299 return m_InventoryURLs[userID];
300 300
301 return null; //it means that the methods should forward to local grid's inventory 301 return null; //it means that the methods should forward to local grid's inventory
302 302
303 } 303 }
304 #endregion 304 #endregion
305 305
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
index 0d36725..fa36b66 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
72 72
73 private bool m_Enabled = false; 73 private bool m_Enabled = false;
74 74
75 public Type ReplaceableInterface 75 public Type ReplaceableInterface
76 { 76 {
77 get { return null; } 77 get { return null; }
78 } 78 }
@@ -134,7 +134,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
134 { 134 {
135 if (!m_Enabled) 135 if (!m_Enabled)
136 return; 136 return;
137 137
138 scene.RegisterModuleInterface<IInventoryService>(this); 138 scene.RegisterModuleInterface<IInventoryService>(this);
139 139
140 if (Scene == null) 140 if (Scene == null)
@@ -261,9 +261,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
261 public bool AddItem(InventoryItemBase item) 261 public bool AddItem(InventoryItemBase item)
262 { 262 {
263// m_log.DebugFormat( 263// m_log.DebugFormat(
264// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", 264// "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}",
265// item.Name, item.Owner, item.Folder); 265// item.Name, item.Owner, item.Folder);
266 266
267 return m_InventoryService.AddItem(item); 267 return m_InventoryService.AddItem(item);
268 } 268 }
269 269
@@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
297// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); 297// m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID);
298 298
299// UUID requestedItemId = item.ID; 299// UUID requestedItemId = item.ID;
300 300
301 InventoryItemBase item = m_InventoryService.GetItem(principalID, itemID); 301 InventoryItemBase item = m_InventoryService.GetItem(principalID, itemID);
302 302
303// if (null == item) 303// if (null == item)
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
index 62b44b1..d8ae2c4 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
74 } 74 }
75 } 75 }
76 76
77 public Type ReplaceableInterface 77 public Type ReplaceableInterface
78 { 78 {
79 get { return null; } 79 get { return null; }
80 } 80 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
index 9e251aa..cad2061 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/LocalLandServiceConnector.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
62 62
63 #region ISharedRegionModule 63 #region ISharedRegionModule
64 64
65 public Type ReplaceableInterface 65 public Type ReplaceableInterface
66 { 66 {
67 get { return null; } 67 get { return null; }
68 } 68 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
index 77dfa4a..68c5b64 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Land/RemoteLandServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land
53 private bool m_Enabled = false; 53 private bool m_Enabled = false;
54 private LocalLandServicesConnector m_LocalService; 54 private LocalLandServicesConnector m_LocalService;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index 1357825..9888c3b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -68,11 +68,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
68 private int m_refreshtime = 0; 68 private int m_refreshtime = 0;
69 private int m_lastrefresh = 0; 69 private int m_lastrefresh = 0;
70 private System.Timers.Timer m_refreshTimer; 70 private System.Timers.Timer m_refreshTimer;
71 71
72 #region ISharedRegionModule 72 #region ISharedRegionModule
73 73
74 public Type ReplaceableInterface { get { return null; } } 74 public Type ReplaceableInterface { get { return null; } }
75 public string Name { get { return "MapImageServiceModule"; } } 75 public string Name { get { return "MapImageServiceModule"; } }
76 public void RegionLoaded(Scene scene) { } 76 public void RegionLoaded(Scene scene) { }
77 public void Close() { } 77 public void Close() { }
78 public void PostInitialise() { } 78 public void PostInitialise() { }
@@ -115,12 +115,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
115 m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service); 115 m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service);
116 return; 116 return;
117 } 117 }
118 118
119 // we don't want the timer if the interval is zero, but we still want this module enables 119 // we don't want the timer if the interval is zero, but we still want this module enables
120 if(refreshminutes > 0) 120 if(refreshminutes > 0)
121 { 121 {
122 m_refreshtime = refreshminutes * 60 * 1000; // convert from minutes to ms 122 m_refreshtime = refreshminutes * 60 * 1000; // convert from minutes to ms
123 123
124 m_refreshTimer = new System.Timers.Timer(); 124 m_refreshTimer = new System.Timers.Timer();
125 m_refreshTimer.Enabled = true; 125 m_refreshTimer.Enabled = true;
126 m_refreshTimer.AutoReset = true; 126 m_refreshTimer.AutoReset = true;
@@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
131 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}", 131 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with refresh time {0} min and service object {1}",
132 refreshminutes, service); 132 refreshminutes, service);
133 } 133 }
134 else 134 else
135 { 135 {
136 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with no refresh and service object {0}", service); 136 m_log.InfoFormat("[MAP IMAGE SERVICE MODULE]: enabled with no refresh and service object {0}", service);
137 } 137 }
@@ -171,7 +171,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
171 } 171 }
172 172
173 #endregion ISharedRegionModule 173 #endregion ISharedRegionModule
174 174
175 ///<summary> 175 ///<summary>
176 /// 176 ///
177 ///</summary> 177 ///</summary>
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
index bda354f..e8d01b0 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/LocalNeighbourServiceConnector.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
63 63
64 #region ISharedRegionModule 64 #region ISharedRegionModule
65 65
66 public Type ReplaceableInterface 66 public Type ReplaceableInterface
67 { 67 {
68 get { return null; } 68 get { return null; }
69 } 69 }
@@ -113,7 +113,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
113 113
114 public void RemoveRegion(Scene scene) 114 public void RemoveRegion(Scene scene)
115 { 115 {
116 // Always remove 116 // Always remove
117 if (m_Scenes.Contains(scene)) 117 if (m_Scenes.Contains(scene))
118 m_Scenes.Remove(scene); 118 m_Scenes.Remove(scene);
119 } 119 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
index e6772f3..fcb5521 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Neighbour/RemoteNeighourServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour
53 //private string serviceDll; 53 //private string serviceDll;
54 //private List<Scene> m_Scenes = new List<Scene>(); 54 //private List<Scene> m_Scenes = new List<Scene>();
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
index 117f02c..aafd047 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs
@@ -35,7 +35,7 @@ using OpenSim.Services.Interfaces;
35 35
36namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence 36namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
37{ 37{
38 public class PresenceDetector 38 public class PresenceDetector
39 { 39 {
40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
70 { 70 {
71 if (sp.isNPC) 71 if (sp.isNPC)
72 return; 72 return;
73 73
74 if(sp.gotCrossUpdate) 74 if(sp.gotCrossUpdate)
75 { 75 {
76 Util.FireAndForget(delegate 76 Util.FireAndForget(delegate
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
index 69bac82..7838d12 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests
72 public void TestPresenceV0_1() 72 public void TestPresenceV0_1()
73 { 73 {
74 SetUp(); 74 SetUp();
75 75
76 // Let's stick in a test presence 76 // Let's stick in a test presence
77 /* 77 /*
78 PresenceData p = new PresenceData(); 78 PresenceData p = new PresenceData();
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 3755650..57aba05 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
219 } 219 }
220 220
221// m_log.DebugFormat( 221// m_log.DebugFormat(
222// "[LOCAL COMMS]: Did not find region {0} {1} for ChildAgentUpdate", 222// "[LOCAL COMMS]: Did not find region {0} {1} for ChildAgentUpdate",
223// destination.RegionName, destination.RegionID); 223// destination.RegionName, destination.RegionID);
224 224
225 return false; 225 return false;
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied"); 266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
267 return false; 267 return false;
268 268
269 } 269 }
270 270
271 271
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 0ebdbce..b402d2a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
137 } 137 }
138 138
139 protected virtual void InitOnce(Scene scene) 139 protected virtual void InitOnce(Scene scene)
140 { 140 {
141 m_aScene = scene; 141 m_aScene = scene;
142 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); 142 //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService);
143 } 143 }
@@ -248,7 +248,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
248 // else do the remote thing 248 // else do the remote thing
249 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 249 if (!m_localBackend.IsLocalRegion(destination.RegionID))
250 return m_remoteConnector.CloseAgent(destination, id, auth_token); 250 return m_remoteConnector.CloseAgent(destination, id, auth_token);
251 251
252 return false; 252 return false;
253 } 253 }
254 254
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index b72ffbb..77fd70b 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
59 59
60 #region ISharedRegionModule 60 #region ISharedRegionModule
61 61
62 public Type ReplaceableInterface 62 public Type ReplaceableInterface
63 { 63 {
64 get { return null; } 64 get { return null; }
65 } 65 }
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
200 account = m_Cache.Get(uuid, out inCache); 200 account = m_Cache.Get(uuid, out inCache);
201 if (inCache) 201 if (inCache)
202 ret.Add(account); 202 ret.Add(account);
203 else 203 else
204 missing.Add(id); 204 missing.Add(id);
205 } 205 }
206 } 206 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
index f5eda11..b510d0a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/RemoteUserAccountServiceConnector.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
53 private bool m_Enabled = false; 53 private bool m_Enabled = false;
54 private UserAccountCache m_Cache; 54 private UserAccountCache m_Cache;
55 55
56 public Type ReplaceableInterface 56 public Type ReplaceableInterface
57 { 57 {
58 get { return null; } 58 get { return null; }
59 } 59 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
index 2afd74e..f3572a2 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
43// private static readonly ILog m_log = 43// private static readonly ILog m_log =
44// LogManager.GetLogger( 44// LogManager.GetLogger(
45// MethodBase.GetCurrentMethod().DeclaringType); 45// MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 private ExpiringCache<UUID, UserAccount> m_UUIDCache; 47 private ExpiringCache<UUID, UserAccount> m_UUIDCache;
48 private ExpiringCache<string, UUID> m_NameCache; 48 private ExpiringCache<string, UUID> m_NameCache;
49 private object accessLock = new object(); 49 private object accessLock = new object();
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
51 public UserAccountCache() 51 public UserAccountCache()
52 { 52 {
53 m_UUIDCache = new ExpiringCache<UUID, UserAccount>(); 53 m_UUIDCache = new ExpiringCache<UUID, UserAccount>();
54 m_NameCache = new ExpiringCache<string, UUID>(); 54 m_NameCache = new ExpiringCache<string, UUID>();
55 } 55 }
56 56
57 public void Cache(UUID userID, UserAccount account) 57 public void Cache(UUID userID, UserAccount account)
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
70 { 70 {
71 m_UUIDCache.AddOrUpdate(userID, account, CACHE_ALIEN_EXPIRATION_SECONDS); 71 m_UUIDCache.AddOrUpdate(userID, account, CACHE_ALIEN_EXPIRATION_SECONDS);
72 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_ALIEN_EXPIRATION_SECONDS); 72 m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, CACHE_ALIEN_EXPIRATION_SECONDS);
73 } 73 }
74 //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); 74 //m_log.DebugFormat("[USER CACHE]: cached user {0}", userID);
75 } 75 }
76 } 76 }
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
index f567cab..081439a 100644
--- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
+++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.World
44 public class AccessModule : ISharedRegionModule 44 public class AccessModule : ISharedRegionModule
45 { 45 {
46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private List<Scene> m_SceneList = new List<Scene>(); 48 private List<Scene> m_SceneList = new List<Scene>();
49 49
50 public void Initialise(IConfigSource config) 50 public void Initialise(IConfigSource config)
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index f523af1..6ba8cec 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -77,14 +77,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
77 SceneObjects = new List<SceneObjectGroup>(); 77 SceneObjects = new List<SceneObjectGroup>();
78 } 78 }
79 } 79 }
80 80
81 81
82 /// <summary> 82 /// <summary>
83 /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version 83 /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version
84 /// bumps here should be compatible. 84 /// bumps here should be compatible.
85 /// </summary> 85 /// </summary>
86 public static int MAX_MAJOR_VERSION = 1; 86 public static int MAX_MAJOR_VERSION = 1;
87 87
88 /// <summary> 88 /// <summary>
89 /// Has the control file been loaded for this archive? 89 /// Has the control file been loaded for this archive?
90 /// </summary> 90 /// </summary>
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
220 220
221 m_boundingOrigin = Vector3.Zero; 221 m_boundingOrigin = Vector3.Zero;
222 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue); 222 m_boundingSize = new Vector3(scene.RegionInfo.RegionSizeX, scene.RegionInfo.RegionSizeY, float.MaxValue);
223 223
224 if (options.ContainsKey("bounding-origin")) 224 if (options.ContainsKey("bounding-origin"))
225 { 225 {
226 Vector3 boOption = (Vector3)options["bounding-origin"]; 226 Vector3 boOption = (Vector3)options["bounding-origin"];
@@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
308 { 308 {
309 //m_log.DebugFormat( 309 //m_log.DebugFormat(
310 // "[ARCHIVER]: Successfully read {0} ({1} bytes)", filePath, data.Length); 310 // "[ARCHIVER]: Successfully read {0} ({1} bytes)", filePath, data.Length);
311 311
312 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) 312 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType)
313 continue; 313 continue;
314 314
@@ -354,11 +354,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
354 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH)) 354 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
355 { 355 {
356 LoadRegionSettings(scene, filePath, data, dearchivedScenes); 356 LoadRegionSettings(scene, filePath, data, dearchivedScenes);
357 } 357 }
358 else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels)) 358 else if (filePath.StartsWith(ArchiveConstants.LANDDATA_PATH) && (!m_merge || m_forceParcels))
359 { 359 {
360 sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data)); 360 sceneContext.SerialisedParcels.Add(Encoding.UTF8.GetString(data));
361 } 361 }
362 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 362 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
363 { 363 {
364 // Ignore, because we already read the control file 364 // Ignore, because we already read the control file
@@ -406,7 +406,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
406 { 406 {
407 LoadParcels(sceneContext.Scene, sceneContext.SerialisedParcels); 407 LoadParcels(sceneContext.Scene, sceneContext.SerialisedParcels);
408 LoadObjects(sceneContext.Scene, sceneContext.SerialisedSceneObjects, sceneContext.SceneObjects); 408 LoadObjects(sceneContext.Scene, sceneContext.SerialisedSceneObjects, sceneContext.SceneObjects);
409 409
410 // Inform any interested parties that the region has changed. We waited until now so that all 410 // Inform any interested parties that the region has changed. We waited until now so that all
411 // of the region's objects will be loaded when we send this notification. 411 // of the region's objects will be loaded when we send this notification.
412 IEstateModule estateModule = sceneContext.Scene.RequestModuleInterface<IEstateModule>(); 412 IEstateModule estateModule = sceneContext.Scene.RequestModuleInterface<IEstateModule>();
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
471 { 471 {
472 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) 472 if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType)
473 continue; 473 continue;
474 474
475 if (filePath == ArchiveConstants.CONTROL_FILE_PATH) 475 if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
476 { 476 {
477 LoadControlFile(filePath, data, dearchivedScenes); 477 LoadControlFile(filePath, data, dearchivedScenes);
@@ -517,7 +517,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
517 517
518 throw new Exception("[ARCHIVER]: Control file not found"); 518 throw new Exception("[ARCHIVER]: Control file not found");
519 } 519 }
520 520
521 /// <summary> 521 /// <summary>
522 /// Load serialized scene objects. 522 /// Load serialized scene objects.
523 /// </summary> 523 /// </summary>
@@ -545,7 +545,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
545 // Really large xml files (multi megabyte) appear to cause 545 // Really large xml files (multi megabyte) appear to cause
546 // memory problems 546 // memory problems
547 // when loading the xml. But don't enable this check yet 547 // when loading the xml. But don't enable this check yet
548 548
549 if (serialisedSceneObject.Length > 5000000) 549 if (serialisedSceneObject.Length > 5000000)
550 { 550 {
551 m_log.Error("[ARCHIVER]: Ignoring xml since size > 5000000);"); 551 m_log.Error("[ARCHIVER]: Ignoring xml since size > 5000000);");
@@ -745,7 +745,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
745 Vector3 AABBMax; 745 Vector3 AABBMax;
746 746
747 // create a new LandObject that we can use to manipulate the incoming source parcel data 747 // create a new LandObject that we can use to manipulate the incoming source parcel data
748 // this is ok, but just beware that some of the LandObject functions (that we haven't used here) still 748 // this is ok, but just beware that some of the LandObject functions (that we haven't used here) still
749 // assume we're always using the destination region size 749 // assume we're always using the destination region size
750 LandData ld = new LandData(); 750 LandData ld = new LandData();
751 landObject = new LandObject(ld, scene); 751 landObject = new LandObject(ld, scene);
@@ -839,7 +839,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
839 } 839 }
840 parcel.ParcelAccessList = accessList; 840 parcel.ParcelAccessList = accessList;
841 841
842 if (m_debug) m_log.DebugFormat("[ARCHIVER]: Adding parcel {0}, local id {1}, owner {2}, group {3}, isGroupOwned {4}, area {5}", 842 if (m_debug) m_log.DebugFormat("[ARCHIVER]: Adding parcel {0}, local id {1}, owner {2}, group {3}, isGroupOwned {4}, area {5}",
843 parcel.Name, parcel.LocalID, parcel.OwnerID, parcel.GroupID, parcel.IsGroupOwned, parcel.Area); 843 parcel.Name, parcel.LocalID, parcel.OwnerID, parcel.GroupID, parcel.IsGroupOwned, parcel.Area);
844 844
845 landData.Add(parcel); 845 landData.Add(parcel);
@@ -939,20 +939,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver
939 sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; 939 sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
940 if(asype == -2) 940 if(asype == -2)
941 { 941 {
942 942
943 } 943 }
944 944
945 // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); 945 // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid);
946 return true; 946 return true;
947 } 947 }
948 948
949 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) 949 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))
950 { 950 {
951 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; 951 sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension];
952 952
953 if(assetType == -2) 953 if(assetType == -2)
954 { 954 {
955 955
956 } 956 }
957 if (assetType == (sbyte)AssetType.Unknown) 957 if (assetType == (sbyte)AssetType.Unknown)
958 { 958 {
@@ -966,7 +966,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
966 ModifySceneObject(m_rootScene, sog); 966 ModifySceneObject(m_rootScene, sog);
967 return true; 967 return true;
968 }); 968 });
969 969
970 if (data == null) 970 if (data == null)
971 return false; 971 return false;
972 } 972 }
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1072 currentRegionSettings.Save(); 1072 currentRegionSettings.Save();
1073 1073
1074 scene.TriggerEstateSunUpdate(); 1074 scene.TriggerEstateSunUpdate();
1075 1075
1076 IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>(); 1076 IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>();
1077 if (estateModule != null) 1077 if (estateModule != null)
1078 estateModule.sendRegionHandshakeToAll(); 1078 estateModule.sendRegionHandshakeToAll();
@@ -1129,16 +1129,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1129 1129
1130 bool multiRegion = false; 1130 bool multiRegion = false;
1131 1131
1132 while (xtr.Read()) 1132 while (xtr.Read())
1133 { 1133 {
1134 if (xtr.NodeType == XmlNodeType.Element) 1134 if (xtr.NodeType == XmlNodeType.Element)
1135 { 1135 {
1136 if (xtr.Name.ToString() == "archive") 1136 if (xtr.Name.ToString() == "archive")
1137 { 1137 {
1138 int majorVersion = int.Parse(xtr["major_version"]); 1138 int majorVersion = int.Parse(xtr["major_version"]);
1139 int minorVersion = int.Parse(xtr["minor_version"]); 1139 int minorVersion = int.Parse(xtr["minor_version"]);
1140 string version = string.Format("{0}.{1}", majorVersion, minorVersion); 1140 string version = string.Format("{0}.{1}", majorVersion, minorVersion);
1141 1141
1142 if (majorVersion > MAX_MAJOR_VERSION) 1142 if (majorVersion > MAX_MAJOR_VERSION)
1143 { 1143 {
1144 throw new Exception( 1144 throw new Exception(
@@ -1146,15 +1146,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
1146 "The OAR you are trying to load has major version number of {0} but this version of OpenSim can only load OARs with major version number {1} and below", 1146 "The OAR you are trying to load has major version number of {0} but this version of OpenSim can only load OARs with major version number {1} and below",
1147 majorVersion, MAX_MAJOR_VERSION)); 1147 majorVersion, MAX_MAJOR_VERSION));
1148 } 1148 }
1149 1149
1150 m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version); 1150 m_log.InfoFormat("[ARCHIVER]: Loading OAR with version {0}", version);
1151 } 1151 }
1152 else if (xtr.Name.ToString() == "datetime") 1152 else if (xtr.Name.ToString() == "datetime")
1153 { 1153 {
1154 int value; 1154 int value;
1155 if (Int32.TryParse(xtr.ReadElementContentAsString(), out value)) 1155 if (Int32.TryParse(xtr.ReadElementContentAsString(), out value))
1156 dearchivedScenes.LoadedCreationDateTime = value; 1156 dearchivedScenes.LoadedCreationDateTime = value;
1157 } 1157 }
1158 else if (xtr.Name.ToString() == "row") 1158 else if (xtr.Name.ToString() == "row")
1159 { 1159 {
1160 multiRegion = true; 1160 multiRegion = true;
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
index d8dace2..2fb4426 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveScenesGroup.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
50 /// The inner dictionaries contain each row's regions (key: X coordinate). 50 /// The inner dictionaries contain each row's regions (key: X coordinate).
51 /// </summary> 51 /// </summary>
52 public SortedDictionary<uint, SortedDictionary<uint, Scene>> Regions { get; set; } 52 public SortedDictionary<uint, SortedDictionary<uint, Scene>> Regions { get; set; }
53 53
54 /// <summary> 54 /// <summary>
55 /// The subdirectory where each region is stored in the archive. 55 /// The subdirectory where each region is stored in the archive.
56 /// </summary> 56 /// </summary>
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
152 } 152 }
153 } 153 }
154 } 154 }
155 155
156 /// <summary> 156 /// <summary>
157 /// Returns the scene at position 'location'. 157 /// Returns the scene at position 'location'.
158 /// </summary> 158 /// </summary>
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
index 6c8f37b..8dabcee 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs
@@ -60,8 +60,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
60 /// <summary> 60 /// <summary>
61 /// The minimum major version of OAR that we can write. 61 /// The minimum major version of OAR that we can write.
62 /// </summary> 62 /// </summary>
63 public static int MIN_MAJOR_VERSION = 0; 63 public static int MIN_MAJOR_VERSION = 0;
64 64
65 /// <summary> 65 /// <summary>
66 /// The maximum major version of OAR that we can write. 66 /// The maximum major version of OAR that we can write.
67 /// </summary> 67 /// </summary>
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
112 m_log.ErrorFormat("{0} {1}", e.Message, e.StackTrace); 112 m_log.ErrorFormat("{0} {1}", e.Message, e.StackTrace);
113 } 113 }
114 } 114 }
115 115
116 /// <summary> 116 /// <summary>
117 /// Constructor. 117 /// Constructor.
118 /// </summary> 118 /// </summary>
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
226 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 226 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
227 227
228 int numObjectsSkippedPermissions = 0; 228 int numObjectsSkippedPermissions = 0;
229 229
230 // Filter entities so that we only have scene objects. 230 // Filter entities so that we only have scene objects.
231 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods 231 // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods
232 // end up having to do this 232 // end up having to do this
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
256 { 256 {
257 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids); 257 UuidGatherer assetGatherer = new UuidGatherer(scene.AssetService, assetUuids);
258 int prevAssets = assetUuids.Count; 258 int prevAssets = assetUuids.Count;
259 259
260 foreach (SceneObjectGroup sceneObject in sceneObjects) 260 foreach (SceneObjectGroup sceneObject in sceneObjects)
261 assetGatherer.AddForInspection(sceneObject); 261 assetGatherer.AddForInspection(sceneObject);
262 262
@@ -276,16 +276,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
276 276
277 // Make sure that we also request terrain texture assets 277 // Make sure that we also request terrain texture assets
278 RegionSettings regionSettings = scene.RegionInfo.RegionSettings; 278 RegionSettings regionSettings = scene.RegionInfo.RegionSettings;
279 279
280 if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) 280 if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1)
281 assetUuids[regionSettings.TerrainTexture1] = (sbyte)AssetType.Texture; 281 assetUuids[regionSettings.TerrainTexture1] = (sbyte)AssetType.Texture;
282 282
283 if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) 283 if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2)
284 assetUuids[regionSettings.TerrainTexture2] = (sbyte)AssetType.Texture; 284 assetUuids[regionSettings.TerrainTexture2] = (sbyte)AssetType.Texture;
285 285
286 if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) 286 if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3)
287 assetUuids[regionSettings.TerrainTexture3] = (sbyte)AssetType.Texture; 287 assetUuids[regionSettings.TerrainTexture3] = (sbyte)AssetType.Texture;
288 288
289 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) 289 if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4)
290 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture; 290 assetUuids[regionSettings.TerrainTexture4] = (sbyte)AssetType.Texture;
291 291
@@ -398,18 +398,18 @@ namespace OpenSim.Region.CoreModules.World.Archiver
398// string[] parts = m_options["version"].ToString().Split('.'); 398// string[] parts = m_options["version"].ToString().Split('.');
399// if (parts.Length >= 1) 399// if (parts.Length >= 1)
400// { 400// {
401// majorVersion = Int32.Parse(parts[0]); 401// majorVersion = Int32.Parse(parts[0]);
402// 402//
403// if (parts.Length >= 2) 403// if (parts.Length >= 2)
404// minorVersion = Int32.Parse(parts[1]); 404// minorVersion = Int32.Parse(parts[1]);
405// } 405// }
406// } 406// }
407// 407//
408// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) 408// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION)
409// { 409// {
410// throw new Exception( 410// throw new Exception(
411// string.Format( 411// string.Format(
412// "OAR version number for save must be between {0} and {1}", 412// "OAR version number for save must be between {0} and {1}",
413// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); 413// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION));
414// } 414// }
415// else if (majorVersion == MAX_MAJOR_VERSION) 415// else if (majorVersion == MAX_MAJOR_VERSION)
@@ -420,9 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
420// else if (majorVersion == MIN_MAJOR_VERSION) 420// else if (majorVersion == MIN_MAJOR_VERSION)
421// { 421// {
422// // Force 0.4 422// // Force 0.4
423// minorVersion = 4; 423// minorVersion = 4;
424// } 424// }
425 425
426 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); 426 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
427 if (majorVersion == 1) 427 if (majorVersion == 1)
428 { 428 {
@@ -430,7 +430,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
430 } 430 }
431 431
432 String s; 432 String s;
433 433
434 using (StringWriter sw = new StringWriter()) 434 using (StringWriter sw = new StringWriter())
435 { 435 {
436 using (XmlTextWriter xtw = new XmlTextWriter(sw)) 436 using (XmlTextWriter xtw = new XmlTextWriter(sw))
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
440 xtw.WriteStartElement("archive"); 440 xtw.WriteStartElement("archive");
441 xtw.WriteAttributeString("major_version", majorVersion.ToString()); 441 xtw.WriteAttributeString("major_version", majorVersion.ToString());
442 xtw.WriteAttributeString("minor_version", minorVersion.ToString()); 442 xtw.WriteAttributeString("minor_version", minorVersion.ToString());
443 443
444 xtw.WriteStartElement("creation_info"); 444 xtw.WriteStartElement("creation_info");
445 DateTime now = DateTime.UtcNow; 445 DateTime now = DateTime.UtcNow;
446 TimeSpan t = now - new DateTime(1970, 1, 1); 446 TimeSpan t = now - new DateTime(1970, 1, 1);
@@ -448,7 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
448 if (!MultiRegionFormat) 448 if (!MultiRegionFormat)
449 xtw.WriteElementString("id", m_rootScene.RegionInfo.RegionID.ToString()); 449 xtw.WriteElementString("id", m_rootScene.RegionInfo.RegionID.ToString());
450 xtw.WriteEndElement(); 450 xtw.WriteEndElement();
451 451
452 xtw.WriteElementString("assets_included", SaveAssets.ToString()); 452 xtw.WriteElementString("assets_included", SaveAssets.ToString());
453 453
454 if (MultiRegionFormat) 454 if (MultiRegionFormat)
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
463 } 463 }
464 464
465 xtw.WriteEndElement(); 465 xtw.WriteEndElement();
466 466
467 xtw.Flush(); 467 xtw.Flush();
468 } 468 }
469 469
@@ -525,7 +525,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
525 Vector2 size; 525 Vector2 size;
526 526
527 size = new Vector2((float)scene.RegionInfo.RegionSizeX, (float)scene.RegionInfo.RegionSizeY); 527 size = new Vector2((float)scene.RegionInfo.RegionSizeX, (float)scene.RegionInfo.RegionSizeY);
528 528
529 xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y)); 529 xtw.WriteElementString("size_in_meters", string.Format("{0},{1}", size.X, size.Y));
530 } 530 }
531 531
@@ -548,7 +548,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
548 foreach (ILandObject lo in landObjects) 548 foreach (ILandObject lo in landObjects)
549 { 549 {
550 LandData landData = lo.LandData; 550 LandData landData = lo.LandData;
551 string landDataPath 551 string landDataPath
552 = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData)); 552 = String.Format("{0}{1}", regionDir, ArchiveConstants.CreateOarLandDataPath(landData));
553 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options)); 553 m_archiveWriter.WriteFile(landDataPath, LandDataSerializer.Serialize(landData, m_options));
554 } 554 }
@@ -578,11 +578,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
578 m_archiveWriter.WriteFile(objectPath, serializedObject); 578 m_archiveWriter.WriteFile(objectPath, serializedObject);
579 } 579 }
580 } 580 }
581 581
582 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut) 582 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut)
583 { 583 {
584 string errorMessage; 584 string errorMessage;
585 585
586 if (timedOut) 586 if (timedOut)
587 { 587 {
588 errorMessage = "Loading assets timed out"; 588 errorMessage = "Loading assets timed out";
@@ -600,10 +600,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
600 600
601 errorMessage = String.Empty; 601 errorMessage = String.Empty;
602 } 602 }
603 603
604 CloseArchive(errorMessage); 604 CloseArchive(errorMessage);
605 } 605 }
606 606
607 /// <summary> 607 /// <summary>
608 /// Closes the archive and notifies that we're done. 608 /// Closes the archive and notifies that we're done.
609 /// </summary> 609 /// </summary>
@@ -622,7 +622,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
622 if (errorMessage == string.Empty) 622 if (errorMessage == string.Empty)
623 errorMessage = e.Message; 623 errorMessage = e.Message;
624 } 624 }
625 625
626 m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_rootScene.RegionInfo.RegionName); 626 m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_rootScene.RegionInfo.RegionName);
627 627
628 m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage); 628 m_rootScene.EventManager.TriggerOarFileSaved(m_requestId, errorMessage);
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
index 150d4ec..1305545 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")] 49 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ArchiverModule")]
50 public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule 50 public class ArchiverModule : INonSharedRegionModule, IRegionArchiverModule
51 { 51 {
52 private static readonly ILog m_log = 52 private static readonly ILog m_log =
53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 53 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54 54
55 public Scene Scene { get; private set; } 55 public Scene Scene { get; private set; }
@@ -59,13 +59,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
59 /// </value> 59 /// </value>
60 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; 60 protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar";
61 61
62 public string Name 62 public string Name
63 { 63 {
64 get { return "RegionArchiverModule"; } 64 get { return "RegionArchiverModule"; }
65 } 65 }
66 66
67 public Type ReplaceableInterface 67 public Type ReplaceableInterface
68 { 68 {
69 get { return null; } 69 get { return null; }
70 } 70 }
71 71
@@ -201,9 +201,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
201 rready.OarLoadingAlert("load"); 201 rready.OarLoadingAlert("load");
202 } 202 }
203 */ 203 */
204 204
205 List<string> mainParams = options.Parse(cmdparams); 205 List<string> mainParams = options.Parse(cmdparams);
206 206
207// m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); 207// m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar);
208// 208//
209// foreach (string param in mainParams) 209// foreach (string param in mainParams)
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
288 288
289 ArchiveRegion(path, options); 289 ArchiveRegion(path, options);
290 } 290 }
291 291
292 public void ArchiveRegion(string savePath, Dictionary<string, object> options) 292 public void ArchiveRegion(string savePath, Dictionary<string, object> options)
293 { 293 {
294 ArchiveRegion(savePath, Guid.Empty, options); 294 ArchiveRegion(savePath, Guid.Empty, options);
@@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
298 { 298 {
299 m_log.InfoFormat( 299 m_log.InfoFormat(
300 "[ARCHIVER]: Writing archive for region {0} to {1}", Scene.RegionInfo.RegionName, savePath); 300 "[ARCHIVER]: Writing archive for region {0} to {1}", Scene.RegionInfo.RegionName, savePath);
301 301
302 new ArchiveWriteRequest(Scene, savePath, requestId).ArchiveRegion(options); 302 new ArchiveWriteRequest(Scene, savePath, requestId).ArchiveRegion(options);
303 } 303 }
304 304
@@ -330,7 +330,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
330 330
331 new ArchiveReadRequest(Scene, loadPath, requestId, options).DearchiveRegion(); 331 new ArchiveReadRequest(Scene, loadPath, requestId, options).DearchiveRegion();
332 } 332 }
333 333
334 public void DearchiveRegion(Stream loadStream) 334 public void DearchiveRegion(Stream loadStream)
335 { 335 {
336 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 336 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
index c1ff94d..efacae3 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsArchiver.cs
@@ -51,8 +51,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
51 /// <value> 51 /// <value>
52 /// Keep a count of the number of assets written so that we can provide status updates 52 /// Keep a count of the number of assets written so that we can provide status updates
53 /// </value> 53 /// </value>
54 protected int m_assetsWritten; 54 protected int m_assetsWritten;
55 55
56 protected TarArchiveWriter m_archiveWriter; 56 protected TarArchiveWriter m_archiveWriter;
57 57
58 public AssetsArchiver(TarArchiveWriter archiveWriter) 58 public AssetsArchiver(TarArchiveWriter archiveWriter)
@@ -145,7 +145,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
145 m_assetsWritten++; 145 m_assetsWritten++;
146 146
147 //m_log.DebugFormat("[ARCHIVER]: Added asset {0}", m_assetsWritten); 147 //m_log.DebugFormat("[ARCHIVER]: Added asset {0}", m_assetsWritten);
148 148
149 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0) 149 if (m_assetsWritten % LOG_ASSET_LOAD_NOTIFICATION_INTERVAL == 0)
150 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten); 150 m_log.InfoFormat("[ARCHIVER]: Added {0} assets to archive", m_assetsWritten);
151 } 151 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
index 1526b1c..d380da8 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
60 Completed, 60 Completed,
61 Aborted 61 Aborted
62 }; 62 };
63 63
64 /// <value> 64 /// <value>
65 /// Timeout threshold if we still need assets or missing asset notifications but have stopped receiving them 65 /// Timeout threshold if we still need assets or missing asset notifications but have stopped receiving them
66 /// from the asset service 66 /// from the asset service
@@ -71,14 +71,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
71 /// If a timeout does occur, limit the amount of UUID information put to the console. 71 /// If a timeout does occur, limit the amount of UUID information put to the console.
72 /// </value> 72 /// </value>
73 protected const int MAX_UUID_DISPLAY_ON_TIMEOUT = 3; 73 protected const int MAX_UUID_DISPLAY_ON_TIMEOUT = 3;
74 74
75 protected System.Timers.Timer m_requestCallbackTimer; 75 protected System.Timers.Timer m_requestCallbackTimer;
76 76
77 /// <value> 77 /// <value>
78 /// State of this request 78 /// State of this request
79 /// </value> 79 /// </value>
80 private RequestState m_requestState = RequestState.Initial; 80 private RequestState m_requestState = RequestState.Initial;
81 81
82 /// <value> 82 /// <value>
83 /// uuids to request 83 /// uuids to request
84 /// </value> 84 /// </value>
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
93 /// List of assets that were found. This will be passed back to the requester. 93 /// List of assets that were found. This will be passed back to the requester.
94 /// </value> 94 /// </value>
95 protected List<UUID> m_foundAssetUuids = new List<UUID>(); 95 protected List<UUID> m_foundAssetUuids = new List<UUID>();
96 96
97 /// <value> 97 /// <value>
98 /// Maintain a list of assets that could not be found. This will be passed back to the requester. 98 /// Maintain a list of assets that could not be found. This will be passed back to the requester.
99 /// </value> 99 /// </value>
@@ -109,16 +109,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
109 /// </value> 109 /// </value>
110 protected IAssetService m_assetService; 110 protected IAssetService m_assetService;
111 protected IUserAccountService m_userAccountService; 111 protected IUserAccountService m_userAccountService;
112 protected UUID m_scopeID; // the grid ID 112 protected UUID m_scopeID; // the grid ID
113 113
114 protected AssetsArchiver m_assetsArchiver; 114 protected AssetsArchiver m_assetsArchiver;
115 115
116 protected Dictionary<string, object> m_options; 116 protected Dictionary<string, object> m_options;
117 117
118 protected internal AssetsRequest( 118 protected internal AssetsRequest(
119 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids, 119 AssetsArchiver assetsArchiver, IDictionary<UUID, sbyte> uuids,
120 IAssetService assetService, IUserAccountService userService, 120 IAssetService assetService, IUserAccountService userService,
121 UUID scope, Dictionary<string, object> options, 121 UUID scope, Dictionary<string, object> options,
122 AssetsRequestCallback assetsRequestCallback) 122 AssetsRequestCallback assetsRequestCallback)
123 { 123 {
124 m_assetsArchiver = assetsArchiver; 124 m_assetsArchiver = assetsArchiver;
@@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
142 protected internal void Execute() 142 protected internal void Execute()
143 { 143 {
144 m_requestState = RequestState.Running; 144 m_requestState = RequestState.Running;
145 145
146 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired); 146 m_log.DebugFormat("[ARCHIVER]: AssetsRequest executed looking for {0} possible assets", m_repliesRequired);
147 147
148 // We can stop here if there are no assets to fetch 148 // We can stop here if there are no assets to fetch
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
180 timedOut = false; 180 timedOut = false;
181 return; 181 return;
182 } 182 }
183 183
184 m_requestState = RequestState.Aborted; 184 m_requestState = RequestState.Aborted;
185 } 185 }
186 186
@@ -196,24 +196,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver
196 { 196 {
197 uuids.Remove(uuid); 197 uuids.Remove(uuid);
198 } 198 }
199 199
200 foreach (UUID uuid in m_notFoundAssetUuids) 200 foreach (UUID uuid in m_notFoundAssetUuids)
201 { 201 {
202 uuids.Remove(uuid); 202 uuids.Remove(uuid);
203 } 203 }
204 204
205 m_log.ErrorFormat( 205 m_log.ErrorFormat(
206 "[ARCHIVER]: Asset service failed to return information about {0} requested assets", uuids.Count); 206 "[ARCHIVER]: Asset service failed to return information about {0} requested assets", uuids.Count);
207 207
208 int i = 0; 208 int i = 0;
209 foreach (UUID uuid in uuids) 209 foreach (UUID uuid in uuids)
210 { 210 {
211 m_log.ErrorFormat("[ARCHIVER]: No information about asset {0} received", uuid); 211 m_log.ErrorFormat("[ARCHIVER]: No information about asset {0} received", uuid);
212 212
213 if (++i >= MAX_UUID_DISPLAY_ON_TIMEOUT) 213 if (++i >= MAX_UUID_DISPLAY_ON_TIMEOUT)
214 break; 214 break;
215 } 215 }
216 216
217 if (uuids.Count > MAX_UUID_DISPLAY_ON_TIMEOUT) 217 if (uuids.Count > MAX_UUID_DISPLAY_ON_TIMEOUT)
218 m_log.ErrorFormat( 218 m_log.ErrorFormat(
219 "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); 219 "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT);
@@ -251,24 +251,24 @@ namespace OpenSim.Region.CoreModules.World.Archiver
251 public void AssetRequestCallback(string id, object sender, AssetBase asset) 251 public void AssetRequestCallback(string id, object sender, AssetBase asset)
252 { 252 {
253 Culture.SetCurrentCulture(); 253 Culture.SetCurrentCulture();
254 254
255 try 255 try
256 { 256 {
257 lock (this) 257 lock (this)
258 { 258 {
259 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", id); 259 //m_log.DebugFormat("[ARCHIVER]: Received callback for asset {0}", id);
260 260
261 m_requestCallbackTimer.Stop(); 261 m_requestCallbackTimer.Stop();
262 262
263 if ((m_requestState == RequestState.Aborted) || (m_requestState == RequestState.Completed)) 263 if ((m_requestState == RequestState.Aborted) || (m_requestState == RequestState.Completed))
264 { 264 {
265 m_log.WarnFormat( 265 m_log.WarnFormat(
266 "[ARCHIVER]: Received information about asset {0} while in state {1}. Ignoring.", 266 "[ARCHIVER]: Received information about asset {0} while in state {1}. Ignoring.",
267 id, m_requestState); 267 id, m_requestState);
268 268
269 return; 269 return;
270 } 270 }
271 271
272 if (asset != null) 272 if (asset != null)
273 { 273 {
274// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id); 274// m_log.DebugFormat("[ARCHIVER]: Writing asset {0}", id);
@@ -281,7 +281,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
281// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id); 281// m_log.DebugFormat("[ARCHIVER]: Recording asset {0} as not found", id);
282 m_notFoundAssetUuids.Add(new UUID(id)); 282 m_notFoundAssetUuids.Add(new UUID(id));
283 } 283 }
284 284
285 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count >= m_repliesRequired) 285 if (m_foundAssetUuids.Count + m_notFoundAssetUuids.Count >= m_repliesRequired)
286 { 286 {
287 m_requestState = RequestState.Completed; 287 m_requestState = RequestState.Completed;
@@ -294,8 +294,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
294 "[ARCHIVER]: Successfully added {0} assets ({1} assets not found but these may be expected invalid references)", 294 "[ARCHIVER]: Successfully added {0} assets ({1} assets not found but these may be expected invalid references)",
295 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count); 295 m_foundAssetUuids.Count, m_notFoundAssetUuids.Count);
296 296
297 297
298 // We want to stop using the asset cache thread asap 298 // We want to stop using the asset cache thread asap
299 // as we now need to do the work of producing the rest of the archive 299 // as we now need to do the work of producing the rest of the archive
300 WorkManager.RunInThread(PerformAssetsRequestCallback, false, "Archive Assets Request Callback"); 300 WorkManager.RunInThread(PerformAssetsRequestCallback, false, "Archive Assets Request Callback");
301 } 301 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
index e2222fe..809d863 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/DearchiveScenesGroup.cs
@@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
214 return false; 214 return false;
215 string regionDirectory = parts[1]; 215 string regionDirectory = parts[1];
216 relativePath = parts[2]; 216 relativePath = parts[2];
217 217
218 RegionInfo region; 218 RegionInfo region;
219 if (m_directory2region.TryGetValue(regionDirectory, out region)) 219 if (m_directory2region.TryGetValue(regionDirectory, out region))
220 { 220 {
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index caa22f7..6885299 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -65,9 +65,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
65 protected SerialiserModule m_serialiserModule; 65 protected SerialiserModule m_serialiserModule;
66 66
67 protected TaskInventoryItem m_soundItem; 67 protected TaskInventoryItem m_soundItem;
68 68
69 private AutoResetEvent m_oarEvent = new AutoResetEvent(false); 69 private AutoResetEvent m_oarEvent = new AutoResetEvent(false);
70 70
71 [SetUp] 71 [SetUp]
72 public override void SetUp() 72 public override void SetUp()
73 { 73 {
@@ -89,10 +89,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
89 m_lastRequestId = requestId; 89 m_lastRequestId = requestId;
90 m_lastErrorMessage = errorMessage; 90 m_lastErrorMessage = errorMessage;
91 Console.WriteLine("About to pulse ArchiverTests on LoadCompleted"); 91 Console.WriteLine("About to pulse ArchiverTests on LoadCompleted");
92 m_oarEvent.Set(); 92 m_oarEvent.Set();
93 } 93 }
94 } 94 }
95 95
96 private void SaveCompleted(Guid requestId, string errorMessage) 96 private void SaveCompleted(Guid requestId, string errorMessage)
97 { 97 {
98 lock (this) 98 lock (this)
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
100 m_lastRequestId = requestId; 100 m_lastRequestId = requestId;
101 m_lastErrorMessage = errorMessage; 101 m_lastErrorMessage = errorMessage;
102 Console.WriteLine("About to pulse ArchiverTests on SaveCompleted"); 102 Console.WriteLine("About to pulse ArchiverTests on SaveCompleted");
103 m_oarEvent.Set(); 103 m_oarEvent.Set();
104 } 104 }
105 } 105 }
106 106
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
129 129
130 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName }; 130 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
131 } 131 }
132 132
133 private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid) 133 private void CreateTestObjects(Scene scene, out SceneObjectGroup sog1, out SceneObjectGroup sog2, out UUID ncAssetUuid)
134 { 134 {
135 SceneObjectPart part1 = CreateSceneObjectPart1(); 135 SceneObjectPart part1 = CreateSceneObjectPart1();
@@ -200,10 +200,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId); 200 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId);
201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer; 201 //AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
202 //while (assetServer.HasWaitingRequests()) 202 //while (assetServer.HasWaitingRequests())
203 // assetServer.ProcessNextRequest(); 203 // assetServer.ProcessNextRequest();
204 204
205 m_oarEvent.WaitOne(60000); 205 m_oarEvent.WaitOne(60000);
206 206
207 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 207 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
208 208
209 byte[] archive = archiveWriteStream.ToArray(); 209 byte[] archive = archiveWriteStream.ToArray();
@@ -211,7 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
211 TarArchiveReader tar = new TarArchiveReader(archiveReadStream); 211 TarArchiveReader tar = new TarArchiveReader(archiveReadStream);
212 212
213 bool gotNcAssetFile = false; 213 bool gotNcAssetFile = false;
214 214
215 string expectedNcAssetFileName = string.Format("{0}_{1}", ncAssetUuid, "notecard.txt"); 215 string expectedNcAssetFileName = string.Format("{0}_{1}", ncAssetUuid, "notecard.txt");
216 216
217 List<string> foundPaths = new List<string>(); 217 List<string> foundPaths = new List<string>();
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
220 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2)); 220 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2));
221 221
222 string filePath; 222 string filePath;
223 TarArchiveReader.TarEntryType tarEntryType; 223 TarArchiveReader.TarEntryType tarEntryType;
224 224
225 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 225 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
226 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 226 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
@@ -228,9 +228,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
228 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 228 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
229 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions); 229 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions);
230 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo()); 230 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo());
231 231
232 Assert.That(arr.ControlFileLoaded, Is.True); 232 Assert.That(arr.ControlFileLoaded, Is.True);
233 233
234 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 234 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
235 { 235 {
236 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 236 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
@@ -266,7 +266,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
266 m_scene.AddNewSceneObject(sog1, false); 266 m_scene.AddNewSceneObject(sog1, false);
267 267
268 SceneObjectPart part2 = CreateSceneObjectPart2(); 268 SceneObjectPart part2 = CreateSceneObjectPart2();
269 269
270 AssetNotecard nc = new AssetNotecard(); 270 AssetNotecard nc = new AssetNotecard();
271 nc.BodyText = "Hello World!"; 271 nc.BodyText = "Hello World!";
272 nc.Encode(); 272 nc.Encode();
@@ -276,10 +276,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
276 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); 276 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
277 m_scene.AssetService.Store(ncAsset); 277 m_scene.AssetService.Store(ncAsset);
278 SceneObjectGroup sog2 = new SceneObjectGroup(part2); 278 SceneObjectGroup sog2 = new SceneObjectGroup(part2);
279 TaskInventoryItem ncItem 279 TaskInventoryItem ncItem
280 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid }; 280 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
281 part2.Inventory.AddInventoryItem(ncItem, true); 281 part2.Inventory.AddInventoryItem(ncItem, true);
282 282
283 m_scene.AddNewSceneObject(sog2, false); 283 m_scene.AddNewSceneObject(sog2, false);
284 284
285 MemoryStream archiveWriteStream = new MemoryStream(); 285 MemoryStream archiveWriteStream = new MemoryStream();
@@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
306 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2)); 306 expectedPaths.Add(ArchiveHelpers.CreateObjectPath(sog2));
307 307
308 string filePath; 308 string filePath;
309 TarArchiveReader.TarEntryType tarEntryType; 309 TarArchiveReader.TarEntryType tarEntryType;
310 310
311 byte[] data = tar.ReadEntry(out filePath, out tarEntryType); 311 byte[] data = tar.ReadEntry(out filePath, out tarEntryType);
312 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH)); 312 Assert.That(filePath, Is.EqualTo(ArchiveConstants.CONTROL_FILE_PATH));
@@ -314,9 +314,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
314 Dictionary<string, object> archiveOptions = new Dictionary<string, object>(); 314 Dictionary<string, object> archiveOptions = new Dictionary<string, object>();
315 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions); 315 ArchiveReadRequest arr = new ArchiveReadRequest(m_scene, (Stream)null, Guid.Empty, archiveOptions);
316 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo()); 316 arr.LoadControlFile(filePath, data, new DearchiveScenesInfo());
317 317
318 Assert.That(arr.ControlFileLoaded, Is.True); 318 Assert.That(arr.ControlFileLoaded, Is.True);
319 319
320 while (tar.ReadEntry(out filePath, out tarEntryType) != null) 320 while (tar.ReadEntry(out filePath, out tarEntryType) != null)
321 { 321 {
322 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) 322 if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH))
@@ -345,11 +345,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
345 345
346 MemoryStream archiveWriteStream = new MemoryStream(); 346 MemoryStream archiveWriteStream = new MemoryStream();
347 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); 347 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
348 348
349 // Put in a random blank directory to check that this doesn't upset the load process 349 // Put in a random blank directory to check that this doesn't upset the load process
350 tar.WriteDir("ignoreme"); 350 tar.WriteDir("ignoreme");
351 351
352 // Also check that direct entries which will also have a file entry containing that directory doesn't 352 // Also check that direct entries which will also have a file entry containing that directory doesn't
353 // upset load 353 // upset load
354 tar.WriteDir(ArchiveConstants.TERRAINS_PATH); 354 tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
355 355
@@ -392,7 +392,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
392 Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z), 392 Math.Round(part1.GroupPosition.X), Math.Round(part1.GroupPosition.Y), Math.Round(part1.GroupPosition.Z),
393 part1.UUID); 393 part1.UUID);
394 tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, SceneObjectSerializer.ToXml2Format(object1)); 394 tar.WriteFile(ArchiveConstants.OBJECTS_PATH + object1FileName, SceneObjectSerializer.ToXml2Format(object1));
395 395
396 tar.Close(); 396 tar.Close();
397 397
398 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); 398 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
@@ -400,9 +400,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
400 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 400 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
401 m_oarEvent.Reset(); 401 m_oarEvent.Reset();
402 m_archiverModule.DearchiveRegion(archiveReadStream); 402 m_archiverModule.DearchiveRegion(archiveReadStream);
403 403
404 m_oarEvent.WaitOne(60000); 404 m_oarEvent.WaitOne(60000);
405 405
406 Assert.That(m_lastErrorMessage, Is.Null); 406 Assert.That(m_lastErrorMessage, Is.Null);
407 407
408 TestLoadedRegion(part1, soundItemName, soundData); 408 TestLoadedRegion(part1, soundItemName, soundData);
@@ -475,31 +475,31 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
475 m_scene.AddNewSceneObject(sog1, false); 475 m_scene.AddNewSceneObject(sog1, false);
476 476
477 SceneObjectPart part2 = CreateSceneObjectPart2(); 477 SceneObjectPart part2 = CreateSceneObjectPart2();
478 478
479 AssetNotecard nc = new AssetNotecard(); 479 AssetNotecard nc = new AssetNotecard();
480 nc.BodyText = "Hello World!"; 480 nc.BodyText = "Hello World!";
481 nc.Encode(); 481 nc.Encode();
482 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); 482 UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000");
483 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); 483 UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000");
484 AssetBase ncAsset 484 AssetBase ncAsset
485 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); 485 = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero);
486 m_scene.AssetService.Store(ncAsset); 486 m_scene.AssetService.Store(ncAsset);
487 SceneObjectGroup sog2 = new SceneObjectGroup(part2); 487 SceneObjectGroup sog2 = new SceneObjectGroup(part2);
488 TaskInventoryItem ncItem 488 TaskInventoryItem ncItem
489 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid }; 489 = new TaskInventoryItem { Name = "ncItem", AssetID = ncAssetUuid, ItemID = ncItemUuid };
490 part2.Inventory.AddInventoryItem(ncItem, true); 490 part2.Inventory.AddInventoryItem(ncItem, true);
491 491
492 m_scene.AddNewSceneObject(sog2, false); 492 m_scene.AddNewSceneObject(sog2, false);
493 493
494 MemoryStream archiveWriteStream = new MemoryStream(); 494 MemoryStream archiveWriteStream = new MemoryStream();
495 m_scene.EventManager.OnOarFileSaved += SaveCompleted; 495 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
496 496
497 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080"); 497 Guid requestId = new Guid("00000000-0000-0000-0000-808080808080");
498 498
499 m_oarEvent.Reset(); 499 m_oarEvent.Reset();
500 m_archiverModule.ArchiveRegion( 500 m_archiverModule.ArchiveRegion(
501 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } }); 501 archiveWriteStream, requestId, new Dictionary<string, Object>() { { "wipe-owners", Boolean.TrueString } });
502 502
503 m_oarEvent.WaitOne(60000); 503 m_oarEvent.WaitOne(60000);
504 504
505 Assert.That(m_lastRequestId, Is.EqualTo(requestId)); 505 Assert.That(m_lastRequestId, Is.EqualTo(requestId));
@@ -529,7 +529,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
529 scene2.EventManager.OnOarFileLoaded += LoadCompleted; 529 scene2.EventManager.OnOarFileLoaded += LoadCompleted;
530 m_oarEvent.Reset(); 530 m_oarEvent.Reset();
531 archiverModule.DearchiveRegion(archiveReadStream); 531 archiverModule.DearchiveRegion(archiveReadStream);
532 532
533 m_oarEvent.WaitOne(60000); 533 m_oarEvent.WaitOne(60000);
534 534
535 Assert.That(m_lastErrorMessage, Is.Null); 535 Assert.That(m_lastErrorMessage, Is.Null);
@@ -557,16 +557,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
557 MockGroupsServicesConnector groupsService = new MockGroupsServicesConnector(); 557 MockGroupsServicesConnector groupsService = new MockGroupsServicesConnector();
558 558
559 IConfigSource configSource = new IniConfigSource(); 559 IConfigSource configSource = new IniConfigSource();
560 IConfig config = configSource.AddConfig("Groups"); 560 IConfig config = configSource.AddConfig("Groups");
561 config.Set("Enabled", true); 561 config.Set("Enabled", true);
562 config.Set("Module", "GroupsModule"); 562 config.Set("Module", "GroupsModule");
563 config.Set("DebugEnabled", true); 563 config.Set("DebugEnabled", true);
564 SceneHelpers.SetupSceneModules( 564 SceneHelpers.SetupSceneModules(
565 m_scene, configSource, new object[] { new GroupsModule(), groupsService, new LandManagementModule() }); 565 m_scene, configSource, new object[] { new GroupsModule(), groupsService, new LandManagementModule() });
566 566
567 // Create group in scene for loading 567 // Create group in scene for loading
568 // FIXME: For now we'll put up with the issue that we'll get a group ID that varies across tests. 568 // FIXME: For now we'll put up with the issue that we'll get a group ID that varies across tests.
569 UUID groupID 569 UUID groupID
570 = groupsService.CreateGroup(UUID.Zero, "group1", "", true, UUID.Zero, 3, true, true, true, UUID.Zero); 570 = groupsService.CreateGroup(UUID.Zero, "group1", "", true, UUID.Zero, 3, true, true, true, UUID.Zero);
571 571
572 // Construct OAR 572 // Construct OAR
@@ -594,7 +594,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
594 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 594 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
595 m_oarEvent.Reset(); 595 m_oarEvent.Reset();
596 m_archiverModule.DearchiveRegion(oarStream); 596 m_archiverModule.DearchiveRegion(oarStream);
597 597
598 m_oarEvent.WaitOne(60000); 598 m_oarEvent.WaitOne(60000);
599 599
600 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16); 600 ILandObject rLo = m_scene.LandChannel.GetLandObject(16, 16);
@@ -617,7 +617,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
617 617
618 MemoryStream archiveWriteStream = new MemoryStream(); 618 MemoryStream archiveWriteStream = new MemoryStream();
619 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); 619 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
620 620
621 tar.WriteDir(ArchiveConstants.TERRAINS_PATH); 621 tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
622 tar.WriteFile( 622 tar.WriteFile(
623 ArchiveConstants.CONTROL_FILE_PATH, 623 ArchiveConstants.CONTROL_FILE_PATH,
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
658 rs.AddSpawnPoint(SpawnPoint.Parse("1,-2,0.33")); 658 rs.AddSpawnPoint(SpawnPoint.Parse("1,-2,0.33"));
659 659
660 tar.WriteFile(ArchiveConstants.SETTINGS_PATH + "region1.xml", RegionSettingsSerializer.Serialize(rs)); 660 tar.WriteFile(ArchiveConstants.SETTINGS_PATH + "region1.xml", RegionSettingsSerializer.Serialize(rs));
661 661
662 tar.Close(); 662 tar.Close();
663 663
664 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); 664 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
@@ -666,9 +666,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
666 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 666 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
667 m_oarEvent.Reset(); 667 m_oarEvent.Reset();
668 m_archiverModule.DearchiveRegion(archiveReadStream); 668 m_archiverModule.DearchiveRegion(archiveReadStream);
669 669
670 m_oarEvent.WaitOne(60000); 670 m_oarEvent.WaitOne(60000);
671 671
672 Assert.That(m_lastErrorMessage, Is.Null); 672 Assert.That(m_lastErrorMessage, Is.Null);
673 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings; 673 RegionSettings loadedRs = m_scene.RegionInfo.RegionSettings;
674 674
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
705 Assert.AreEqual(UUID.Zero, loadedRs.TelehubObject); // because no object was found with the original UUID 705 Assert.AreEqual(UUID.Zero, loadedRs.TelehubObject); // because no object was found with the original UUID
706 Assert.AreEqual(0, loadedRs.SpawnPoints().Count); 706 Assert.AreEqual(0, loadedRs.SpawnPoints().Count);
707 } 707 }
708 708
709 /// <summary> 709 /// <summary>
710 /// Test merging an OpenSim Region Archive into an existing scene 710 /// Test merging an OpenSim Region Archive into an existing scene
711 /// </summary> 711 /// </summary>
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
741 scene.EventManager.OnOarFileSaved += SaveCompleted; 741 scene.EventManager.OnOarFileSaved += SaveCompleted;
742 m_oarEvent.Reset(); 742 m_oarEvent.Reset();
743 m_archiverModule.ArchiveRegion(archiveWriteStream); 743 m_archiverModule.ArchiveRegion(archiveWriteStream);
744 744
745 m_oarEvent.WaitOne(60000); 745 m_oarEvent.WaitOne(60000);
746 } 746 }
747 747
@@ -758,7 +758,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
758 archiveOptions.Add("merge", null); 758 archiveOptions.Add("merge", null);
759 m_oarEvent.Reset(); 759 m_oarEvent.Reset();
760 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions); 760 m_archiverModule.DearchiveRegion(archiveReadStream, Guid.Empty, archiveOptions);
761 761
762 m_oarEvent.WaitOne(60000); 762 m_oarEvent.WaitOne(60000);
763 763
764 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); 764 SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name);
@@ -819,7 +819,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
819 SceneObjectGroup sog1; 819 SceneObjectGroup sog1;
820 SceneObjectGroup sog2; 820 SceneObjectGroup sog2;
821 UUID ncAssetUuid; 821 UUID ncAssetUuid;
822 822
823 CreateTestObjects(scene, out sog1, out sog2, out ncAssetUuid); 823 CreateTestObjects(scene, out sog1, out sog2, out ncAssetUuid);
824 824
825 expectedPaths[scene.RegionInfo.RegionID] = new List<string>(); 825 expectedPaths[scene.RegionInfo.RegionID] = new List<string>();
@@ -841,7 +841,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
841 m_scene.EventManager.OnOarFileSaved += SaveCompleted; 841 m_scene.EventManager.OnOarFileSaved += SaveCompleted;
842 m_oarEvent.Reset(); 842 m_oarEvent.Reset();
843 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options); 843 m_archiverModule.ArchiveRegion(archiveWriteStream, requestId, options);
844 844
845 m_oarEvent.WaitOne(60000); 845 m_oarEvent.WaitOne(60000);
846 846
847 847
@@ -993,7 +993,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
993 993
994 tar.Close(); 994 tar.Close();
995 995
996 996
997 // Delete the current objects, to test that they're loaded from the OAR and didn't 997 // Delete the current objects, to test that they're loaded from the OAR and didn't
998 // just remain in the scene. 998 // just remain in the scene.
999 m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene) 999 m_sceneHelpers.SceneManager.ForEachScene(delegate(Scene scene)
@@ -1012,7 +1012,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
1012 m_scene.EventManager.OnOarFileLoaded += LoadCompleted; 1012 m_scene.EventManager.OnOarFileLoaded += LoadCompleted;
1013 m_oarEvent.Reset(); 1013 m_oarEvent.Reset();
1014 m_archiverModule.DearchiveRegion(archiveReadStream); 1014 m_archiverModule.DearchiveRegion(archiveReadStream);
1015 1015
1016 m_oarEvent.WaitOne(60000); 1016 m_oarEvent.WaitOne(60000);
1017 1017
1018 Assert.That(m_lastErrorMessage, Is.Null); 1018 Assert.That(m_lastErrorMessage, Is.Null);
diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
index 617c348..a450dd6 100644
--- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
+++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.CoreModules.World
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CloudModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CloudModule")]
41 public class CloudModule : ICloudModule, INonSharedRegionModule 41 public class CloudModule : ICloudModule, INonSharedRegionModule
42 { 42 {
43// private static readonly log4net.ILog m_log 43// private static readonly log4net.ILog m_log
44// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 44// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
45 private uint m_frame = 0; 45 private uint m_frame = 0;
46 private int m_frameUpdateRate = 1000; 46 private int m_frameUpdateRate = 1000;
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.World
163 columnRight = 0; 163 columnRight = 0;
164 columnLeft = x - 1; 164 columnLeft = x - 1;
165 } 165 }
166 else 166 else
167 { 167 {
168 columnRight = x + 1; 168 columnRight = x + 1;
169 columnLeft = x - 1; 169 columnLeft = x - 1;
@@ -185,14 +185,14 @@ namespace OpenSim.Region.CoreModules.World
185 rowAbove = y + 1; 185 rowAbove = y + 1;
186 rowBelow = y - 1; 186 rowBelow = y - 1;
187 } 187 }
188 float neighborAverage = (cloudCover[rowBelow * 16 + columnLeft] + 188 float neighborAverage = (cloudCover[rowBelow * 16 + columnLeft] +
189 cloudCover[y * 16 + columnLeft] + 189 cloudCover[y * 16 + columnLeft] +
190 cloudCover[rowAbove * 16 + columnLeft] + 190 cloudCover[rowAbove * 16 + columnLeft] +
191 cloudCover[rowBelow * 16 + x] + 191 cloudCover[rowBelow * 16 + x] +
192 cloudCover[rowAbove * 16 + x] + 192 cloudCover[rowAbove * 16 + x] +
193 cloudCover[rowBelow * 16 + columnRight] + 193 cloudCover[rowBelow * 16 + columnRight] +
194 cloudCover[y * 16 + columnRight] + 194 cloudCover[y * 16 + columnRight] +
195 cloudCover[rowAbove * 16 + columnRight] + 195 cloudCover[rowAbove * 16 + columnRight] +
196 cloudCover[y * 16 + x]) / 9; 196 cloudCover[y * 16 + x]) / 9;
197 newCover[y * 16 + x] = ((neighborAverage / m_cloudDensity) + 0.175f) % 1.0f; 197 newCover[y * 16 + x] = ((neighborAverage / m_cloudDensity) + 0.175f) % 1.0f;
198 newCover[y * 16 + x] *= m_cloudDensity; 198 newCover[y * 16 + x] *= m_cloudDensity;
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.World
201 Array.Copy(newCover, cloudCover, 16 * 16); 201 Array.Copy(newCover, cloudCover, 16 * 16);
202 m_dataVersion++; 202 m_dataVersion++;
203 } 203 }
204 204
205 private void CloudUpdate() 205 private void CloudUpdate()
206 { 206 {
207 if ((!m_ready || m_busy || m_cloudDensity == 0 || 207 if ((!m_ready || m_busy || m_cloudDensity == 0 ||
@@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.World
243 } 243 }
244 } 244 }
245 245
246 246
247 /// <summary> 247 /// <summary>
248 /// Calculate the cloud cover over the region. 248 /// Calculate the cloud cover over the region.
249 /// </summary> 249 /// </summary>
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
index ad561fd..051ff71 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
@@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
149 { 149 {
150 foreach (Scene s in m_EstateModule.Scenes) 150 foreach (Scene s in m_EstateModule.Scenes)
151 { 151 {
152 RegionInfo sreg = s.RegionInfo; 152 RegionInfo sreg = s.RegionInfo;
153 if (regions.Contains(sreg.RegionID)) 153 if (regions.Contains(sreg.RegionID))
154 { 154 {
155 string url = sreg.ExternalHostName + ":" + sreg.HttpPort; 155 string url = sreg.ExternalHostName + ":" + sreg.HttpPort;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 702b503..7879f83 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -49,18 +49,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
49 public class EstateManagementCommands 49 public class EstateManagementCommands
50 { 50 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 protected EstateManagementModule m_module; 53 protected EstateManagementModule m_module;
54 54
55 public EstateManagementCommands(EstateManagementModule module) 55 public EstateManagementCommands(EstateManagementModule module)
56 { 56 {
57 m_module = module; 57 m_module = module;
58 } 58 }
59 59
60 public void Initialise() 60 public void Initialise()
61 { 61 {
62// m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); 62// m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName);
63 63
64 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", 64 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture",
65 "set terrain texture <number> <uuid> [<x>] [<y>]", 65 "set terrain texture <number> <uuid> [<x>] [<y>]",
66 "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + 66 "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " +
@@ -77,14 +77,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
77 77
78 m_module.Scene.AddCommand("Regions", m_module, "set water height", 78 m_module.Scene.AddCommand("Regions", m_module, "set water height",
79 "set water height <height> [<x>] [<y>]", 79 "set water height <height> [<x>] [<y>]",
80 "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " + 80 "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " +
81 "Specify -1 in <x> or <y> to wildcard that coordinate.", 81 "Specify -1 in <x> or <y> to wildcard that coordinate.",
82 consoleSetWaterHeight); 82 consoleSetWaterHeight);
83 83
84 m_module.Scene.AddCommand( 84 m_module.Scene.AddCommand(
85 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); 85 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand);
86 } 86 }
87 87
88 public void Close() {} 88 public void Close() {}
89 89
90 #region CommandHandlers 90 #region CommandHandlers
@@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
120 m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; 120 m_module.Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
121 break; 121 break;
122 } 122 }
123 123
124 m_module.Scene.RegionInfo.RegionSettings.Save(); 124 m_module.Scene.RegionInfo.RegionSettings.Save();
125 m_module.TriggerRegionInfoChange(); 125 m_module.TriggerRegionInfoChange();
126 m_module.sendRegionHandshakeToAll(); 126 m_module.sendRegionHandshakeToAll();
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
130 protected void consoleSetWaterHeight(string module, string[] args) 130 protected void consoleSetWaterHeight(string module, string[] args)
131 { 131 {
132 string heightstring = args[3]; 132 string heightstring = args[3];
133 133
134 int x = (args.Length > 4 ? int.Parse(args[4]) : -1); 134 int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
135 int y = (args.Length > 5 ? int.Parse(args[5]) : -1); 135 int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
136 136
@@ -143,13 +143,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
143 m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " + 143 m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " +
144 string.Format(" {0}", selectedheight)); 144 string.Format(" {0}", selectedheight));
145 m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight; 145 m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight;
146 146
147 m_module.Scene.RegionInfo.RegionSettings.Save(); 147 m_module.Scene.RegionInfo.RegionSettings.Save();
148 m_module.TriggerRegionInfoChange(); 148 m_module.TriggerRegionInfoChange();
149 m_module.sendRegionHandshakeToAll(); 149 m_module.sendRegionHandshakeToAll();
150 } 150 }
151 } 151 }
152 } 152 }
153 protected void consoleSetTerrainHeights(string module, string[] args) 153 protected void consoleSetTerrainHeights(string module, string[] args)
154 { 154 {
155 string num = args[3]; 155 string num = args[3];
@@ -198,31 +198,31 @@ namespace OpenSim.Region.CoreModules.World.Estate
198 m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue; 198 m_module.Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
199 break; 199 break;
200 } 200 }
201 201
202 m_module.Scene.RegionInfo.RegionSettings.Save(); 202 m_module.Scene.RegionInfo.RegionSettings.Save();
203 m_module.TriggerRegionInfoChange(); 203 m_module.TriggerRegionInfoChange();
204 m_module.sendRegionHandshakeToAll(); 204 m_module.sendRegionHandshakeToAll();
205 } 205 }
206 } 206 }
207 } 207 }
208 208
209 protected void ShowEstatesCommand(string module, string[] cmd) 209 protected void ShowEstatesCommand(string module, string[] cmd)
210 { 210 {
211 StringBuilder report = new StringBuilder(); 211 StringBuilder report = new StringBuilder();
212 RegionInfo ri = m_module.Scene.RegionInfo; 212 RegionInfo ri = m_module.Scene.RegionInfo;
213 EstateSettings es = ri.EstateSettings; 213 EstateSettings es = ri.EstateSettings;
214 214
215 report.AppendFormat("Estate information for region {0}\n", ri.RegionName); 215 report.AppendFormat("Estate information for region {0}\n", ri.RegionName);
216 report.AppendFormat( 216 report.AppendFormat(
217 "{0,-20} {1,-7} {2,-20}\n", 217 "{0,-20} {1,-7} {2,-20}\n",
218 "Estate Name", 218 "Estate Name",
219 "ID", 219 "ID",
220 "Owner"); 220 "Owner");
221 221
222 report.AppendFormat( 222 report.AppendFormat(
223 "{0,-20} {1,-7} {2,-20}\n", 223 "{0,-20} {1,-7} {2,-20}\n",
224 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner)); 224 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner));
225 225
226 MainConsole.Instance.Output(report.ToString()); 226 MainConsole.Instance.Output(report.ToString());
227 } 227 }
228 #endregion 228 #endregion
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index efd4ca6..3c45b68 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -57,8 +57,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
57 private Timer m_regionChangeTimer = new Timer(); 57 private Timer m_regionChangeTimer = new Timer();
58 public Scene Scene { get; private set; } 58 public Scene Scene { get; private set; }
59 public IUserManagement UserManager { get; private set; } 59 public IUserManagement UserManager { get; private set; }
60 60
61 protected EstateManagementCommands m_commands; 61 protected EstateManagementCommands m_commands;
62 62
63 /// <summary> 63 /// <summary>
64 /// If false, region restart requests from the client are blocked even if they are otherwise legitimate. 64 /// If false, region restart requests from the client are blocked even if they are otherwise legitimate.
@@ -77,12 +77,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
77 private int m_delayCount = 0; 77 private int m_delayCount = 0;
78 78
79 #region Region Module interface 79 #region Region Module interface
80 80
81 public string Name { get { return "EstateManagementModule"; } } 81 public string Name { get { return "EstateManagementModule"; } }
82
83 public Type ReplaceableInterface { get { return null; } }
84 82
85 public void Initialise(IConfigSource source) 83 public Type ReplaceableInterface { get { return null; } }
84
85 public void Initialise(IConfigSource source)
86 { 86 {
87 AllowRegionRestartFromClient = true; 87 AllowRegionRestartFromClient = true;
88 88
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
91 if (config != null) 91 if (config != null)
92 AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true); 92 AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true);
93 } 93 }
94 94
95 public void AddRegion(Scene scene) 95 public void AddRegion(Scene scene)
96 { 96 {
97 Scene = scene; 97 Scene = scene;
@@ -108,19 +108,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
108 m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; 108 m_regionChangeTimer.Elapsed += RaiseRegionInfoChange;
109 m_regionChangeTimer.AutoReset = false; 109 m_regionChangeTimer.AutoReset = false;
110 } 110 }
111 111
112 public void RemoveRegion(Scene scene) {} 112 public void RemoveRegion(Scene scene) {}
113 113
114 public void RegionLoaded(Scene scene) 114 public void RegionLoaded(Scene scene)
115 { 115 {
116 // Sets up the sun module based no the saved Estate and Region Settings 116 // Sets up the sun module based no the saved Estate and Region Settings
117 // DO NOT REMOVE or the sun will stop working 117 // DO NOT REMOVE or the sun will stop working
118 scene.TriggerEstateSunUpdate(); 118 scene.TriggerEstateSunUpdate();
119 119
120 UserManager = scene.RequestModuleInterface<IUserManagement>(); 120 UserManager = scene.RequestModuleInterface<IUserManagement>();
121 } 121 }
122 122
123 public void Close() 123 public void Close()
124 { 124 {
125 m_commands.Close(); 125 m_commands.Close();
126 } 126 }
@@ -486,7 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
486 486
487 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity) 487 if((byte)maxAgents <= Scene.RegionInfo.AgentCapacity)
488 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; 488 Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents;
489 else 489 else
490 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity; 490 Scene.RegionInfo.RegionSettings.AgentLimit = Scene.RegionInfo.AgentCapacity;
491 491
492 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; 492 Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor;
@@ -640,7 +640,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
640 restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), false); 640 restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), false);
641 641
642 m_log.InfoFormat( 642 m_log.InfoFormat(
643 "User {0} requested restart of region {1} in {2} seconds", 643 "User {0} requested restart of region {1} in {2} seconds",
644 remoteClient.Name, Scene.Name, times.Count != 0 ? times[0] : 0); 644 remoteClient.Name, Scene.Name, times.Count != 0 ? times[0] : 0);
645 } 645 }
646 } 646 }
@@ -648,9 +648,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
648 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) 648 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
649 { 649 {
650// m_log.DebugFormat( 650// m_log.DebugFormat(
651// "[ESTATE MANAGEMENT MODULE]: Handling request from {0} to change estate covenant to {1}", 651// "[ESTATE MANAGEMENT MODULE]: Handling request from {0} to change estate covenant to {1}",
652// remoteClient.Name, estateCovenantID); 652// remoteClient.Name, estateCovenantID);
653 653
654 Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; 654 Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
655 Scene.RegionInfo.RegionSettings.CovenantChangedDateTime = Util.UnixTimeSinceEpoch(); 655 Scene.RegionInfo.RegionSettings.CovenantChangedDateTime = Util.UnixTimeSinceEpoch();
656 Scene.RegionInfo.RegionSettings.Save(); 656 Scene.RegionInfo.RegionSettings.Save();
@@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
694 } 694 }
695 } 695 }
696 } 696 }
697 697
698 private void execDeltaRequests(object o) 698 private void execDeltaRequests(object o)
699 { 699 {
700 IClientAPI remote_client; 700 IClientAPI remote_client;
@@ -720,23 +720,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
720 if(!Scene.IsRunning) 720 if(!Scene.IsRunning)
721 break; 721 break;
722 722
723 if(req == null) 723 if(req == null)
724 { 724 {
725 if(changed.Count > 0) 725 if(changed.Count > 0)
726 { 726 {
727 foreach(EstateSettings est in changed.Values) 727 foreach(EstateSettings est in changed.Values)
728 Scene.EstateDataService.StoreEstateSettings(est); 728 Scene.EstateDataService.StoreEstateSettings(est);
729 729
730 TriggerEstateInfoChange(); 730 TriggerEstateInfoChange();
731 } 731 }
732 732
733 EstateSettings es = Scene.RegionInfo.EstateSettings; 733 EstateSettings es = Scene.RegionInfo.EstateSettings;
734 foreach(KeyValuePair<IClientAPI,UUID> kvp in sendAllowedOrBanList) 734 foreach(KeyValuePair<IClientAPI,UUID> kvp in sendAllowedOrBanList)
735 { 735 {
736 IClientAPI cli = kvp.Key; 736 IClientAPI cli = kvp.Key;
737 UUID invoive = kvp.Value; 737 UUID invoive = kvp.Value;
738 cli.SendEstateList(invoive, (int)Constants.EstateAccessCodex.AllowedAccess, es.EstateAccess, es.EstateID); 738 cli.SendEstateList(invoive, (int)Constants.EstateAccessCodex.AllowedAccess, es.EstateAccess, es.EstateID);
739 cli.SendBannedUserList(invoive, es.EstateBans, es.EstateID); 739 cli.SendBannedUserList(invoive, es.EstateBans, es.EstateID);
740 } 740 }
741 sendAllowedOrBanList.Clear(); 741 sendAllowedOrBanList.Clear();
742 742
@@ -777,7 +777,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
777 bool doOtherEstates = ((estateAccessType & 3) != 0); 777 bool doOtherEstates = ((estateAccessType & 3) != 0);
778 778
779 EstateSettings thisSettings = Scene.RegionInfo.EstateSettings; 779 EstateSettings thisSettings = Scene.RegionInfo.EstateSettings;
780 int thisEstateID =(int)thisSettings.EstateID; 780 int thisEstateID =(int)thisSettings.EstateID;
781 781
782 UUID agentID = remote_client.AgentId; 782 UUID agentID = remote_client.AgentId;
783 783
@@ -811,7 +811,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
811 } 811 }
812 estateIDs.Clear(); 812 estateIDs.Clear();
813 } 813 }
814 814
815 // the commands 815 // the commands
816 // first the ones allowed for estate managers on this region 816 // first the ones allowed for estate managers on this region
817 if ((estateAccessType & 4) != 0) // User add 817 if ((estateAccessType & 4) != 0) // User add
@@ -1020,7 +1020,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1020 break; 1020 break;
1021 } 1021 }
1022 } 1022 }
1023 1023
1024 if (alreadyInList && listitem != null) 1024 if (alreadyInList && listitem != null)
1025 { 1025 {
1026 if (doOtherEstates) // All estates 1026 if (doOtherEstates) // All estates
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1072 if(!isadmin && !estateSettings.IsEstateOwner(agentID)) // redundante check? 1072 if(!isadmin && !estateSettings.IsEstateOwner(agentID)) // redundante check?
1073 continue; 1073 continue;
1074 if(estateSettings.EstateManagersCount() >= (int)Constants.EstateAccessLimits.EstateManagers) 1074 if(estateSettings.EstateManagersCount() >= (int)Constants.EstateAccessLimits.EstateManagers)
1075 continue; 1075 continue;
1076 estateSettings.AddEstateManager(user); 1076 estateSettings.AddEstateManager(user);
1077 changed[(int)estateSettings.EstateID] = estateSettings; 1077 changed[(int)estateSettings.EstateID] = estateSettings;
1078 } 1078 }
@@ -1158,7 +1158,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1158 IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) 1158 IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
1159 { 1159 {
1160 IDialogModule dm = Scene.RequestModuleInterface<IDialogModule>(); 1160 IDialogModule dm = Scene.RequestModuleInterface<IDialogModule>();
1161 1161
1162 if (dm != null) 1162 if (dm != null)
1163 dm.SendNotificationToUsersInRegion(senderID, senderName, message); 1163 dm.SendNotificationToUsersInRegion(senderID, senderName, message);
1164 } 1164 }
@@ -1249,7 +1249,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1249 } 1249 }
1250 }); 1250 });
1251 } 1251 }
1252 1252
1253 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) 1253 private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID)
1254 { 1254 {
1255 lock (this) 1255 lock (this)
@@ -1332,7 +1332,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1332 if (TerrainUploader == null) 1332 if (TerrainUploader == null)
1333 { 1333 {
1334 m_log.DebugFormat( 1334 m_log.DebugFormat(
1335 "[TERRAIN]: Started receiving terrain upload for region {0} from {1}", 1335 "[TERRAIN]: Started receiving terrain upload for region {0} from {1}",
1336 Scene.Name, remote_client.Name); 1336 Scene.Name, remote_client.Name);
1337 1337
1338 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName); 1338 TerrainUploader = new EstateTerrainXferHandler(remote_client, clientFileName);
@@ -1352,7 +1352,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1352 { 1352 {
1353 // Save terrain here 1353 // Save terrain here
1354 ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>(); 1354 ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>();
1355 1355
1356 if (terr != null) 1356 if (terr != null)
1357 { 1357 {
1358// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); 1358// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
index fb4d04f..f3c8aa8 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
52 protected List<Scene> m_Scenes = new List<Scene>(); 52 protected List<Scene> m_Scenes = new List<Scene>();
53 protected bool m_InInfoUpdate = false; 53 protected bool m_InInfoUpdate = false;
54 private string token = "7db8eh2gvgg45jj"; 54 private string token = "7db8eh2gvgg45jj";
55 protected bool m_enabled = false; 55 protected bool m_enabled = false;
56 56
57 public bool InInfoUpdate 57 public bool InInfoUpdate
58 { 58 {
@@ -74,19 +74,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
74 IConfig estateConfig = config.Configs["Estates"]; 74 IConfig estateConfig = config.Configs["Estates"];
75 if (estateConfig != null) 75 if (estateConfig != null)
76 { 76 {
77 if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name) 77 if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name)
78 m_enabled = true; 78 m_enabled = true;
79 else 79 else
80 return; 80 return;
81 81
82 port = (uint)estateConfig.GetInt("Port", 0); 82 port = (uint)estateConfig.GetInt("Port", 0);
83 // this will need to came from somewhere else 83 // this will need to came from somewhere else
84 token = estateConfig.GetString("Token", token); 84 token = estateConfig.GetString("Token", token);
85 } 85 }
86 else 86 else
87 { 87 {
88 m_enabled = true; 88 m_enabled = true;
89 } 89 }
90 90
91 m_EstateConnector = new EstateConnector(this, token, port); 91 m_EstateConnector = new EstateConnector(this, token, port);
92 92
@@ -108,8 +108,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
108 108
109 public void AddRegion(Scene scene) 109 public void AddRegion(Scene scene)
110 { 110 {
111 if (!m_enabled) 111 if (!m_enabled)
112 return; 112 return;
113 113
114 lock (m_Scenes) 114 lock (m_Scenes)
115 m_Scenes.Add(scene); 115 m_Scenes.Add(scene);
@@ -117,8 +117,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
117 117
118 public void RegionLoaded(Scene scene) 118 public void RegionLoaded(Scene scene)
119 { 119 {
120 if (!m_enabled) 120 if (!m_enabled)
121 return; 121 return;
122 122
123 IEstateModule em = scene.RequestModuleInterface<IEstateModule>(); 123 IEstateModule em = scene.RequestModuleInterface<IEstateModule>();
124 124
@@ -131,8 +131,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
131 131
132 public void RemoveRegion(Scene scene) 132 public void RemoveRegion(Scene scene)
133 { 133 {
134 if (!m_enabled) 134 if (!m_enabled)
135 return; 135 return;
136 136
137 lock (m_Scenes) 137 lock (m_Scenes)
138 m_Scenes.Remove(scene); 138 m_Scenes.Remove(scene);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 9de88d9..e4c0373 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Land
51 public const int LAND_SELECT_OBJECTS_GROUP = 4; 51 public const int LAND_SELECT_OBJECTS_GROUP = 4;
52 public const int LAND_SELECT_OBJECTS_OTHER = 8; 52 public const int LAND_SELECT_OBJECTS_OTHER = 8;
53 53
54 54
55 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000 55 public const byte LAND_TYPE_PUBLIC = 0; //Equals 00000000
56 // types 1 to 7 are exclusive 56 // types 1 to 7 are exclusive
57 public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001 57 public const byte LAND_TYPE_OWNED_BY_OTHER = 1; //Equals 00000001
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Land
75 #endregion 75 #endregion
76 76
77 private readonly Scene m_scene; 77 private readonly Scene m_scene;
78 private readonly LandManagementModule m_landManagementModule; 78 private readonly LandManagementModule m_landManagementModule;
79 79
80 public LandChannel(Scene scene, LandManagementModule landManagementMod) 80 public LandChannel(Scene scene, LandManagementModule landManagementMod)
81 { 81 {
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.Land
91 { 91 {
92 return m_landManagementModule.GetLandObject(x_float, y_float); 92 return m_landManagementModule.GetLandObject(x_float, y_float);
93 } 93 }
94 94
95 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 95 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
96 obj.LandData.Name = "NO LAND"; 96 obj.LandData.Name = "NO LAND";
97 return obj; 97 return obj;
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Land
117 { 117 {
118 return m_landManagementModule.GetLandObject(x, y); 118 return m_landManagementModule.GetLandObject(x, y);
119 } 119 }
120 120
121 ILandObject obj = new LandObject(UUID.Zero, false, m_scene); 121 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
122 obj.LandData.Name = "NO LAND"; 122 obj.LandData.Name = "NO LAND";
123 return obj; 123 return obj;
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.Land
132 132
133 return new List<ILandObject>(); 133 return new List<ILandObject>();
134 } 134 }
135 135
136 public void Clear(bool setupDefaultParcel) 136 public void Clear(bool setupDefaultParcel)
137 { 137 {
138 if (m_landManagementModule != null) 138 if (m_landManagementModule != null)
@@ -182,7 +182,7 @@ namespace OpenSim.Region.CoreModules.World.Land
182 m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); 182 m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id);
183 } 183 }
184 } 184 }
185 185
186 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) 186 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
187 { 187 {
188 if (m_landManagementModule != null) 188 if (m_landManagementModule != null)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 22bc49e..63b8de0 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -52,7 +52,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion;
52namespace OpenSim.Region.CoreModules.World.Land 52namespace OpenSim.Region.CoreModules.World.Land
53{ 53{
54 // used for caching 54 // used for caching
55 internal class ExtendedLandData 55 internal class ExtendedLandData
56 { 56 {
57 public LandData LandData; 57 public LandData LandData;
58 public ulong RegionHandle; 58 public ulong RegionHandle;
@@ -151,9 +151,9 @@ namespace OpenSim.Region.CoreModules.World.Land
151 151
152 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; 152 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
153 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; 153 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
154 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; 154 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
155 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; 155 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
156 156
157 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; 157 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
158 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement; 158 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
159 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; 159 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
@@ -163,14 +163,14 @@ namespace OpenSim.Region.CoreModules.World.Land
163 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; 163 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
164 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; 164 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
165 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; 165 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
166 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; 166 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
167 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; 167 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
168 168
169 lock (m_scene) 169 lock (m_scene)
170 { 170 {
171 m_scene.LandChannel = (ILandChannel)landChannel; 171 m_scene.LandChannel = (ILandChannel)landChannel;
172 } 172 }
173 173
174 RegisterCommands(); 174 RegisterCommands();
175 } 175 }
176 176
@@ -183,8 +183,8 @@ namespace OpenSim.Region.CoreModules.World.Land
183 } 183 }
184 184
185 public void RemoveRegion(Scene scene) 185 public void RemoveRegion(Scene scene)
186 { 186 {
187 // TODO: Release event manager listeners here 187 // TODO: Release event manager listeners here
188 } 188 }
189 189
190// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason) 190// private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land
192// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y); 192// ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y);
193// reason = "You are not allowed to enter this sim."; 193// reason = "You are not allowed to enter this sim.";
194// return nearestParcel != null; 194// return nearestParcel != null;
195// } 195// }
196 196
197 void EventManagerOnNewClient(IClientAPI client) 197 void EventManagerOnNewClient(IClientAPI client)
198 { 198 {
@@ -274,7 +274,7 @@ namespace OpenSim.Region.CoreModules.World.Land
274 m_landIDList = new int[m_scene.RegionInfo.RegionSizeX / LandUnit, m_scene.RegionInfo.RegionSizeY / LandUnit]; 274 m_landIDList = new int[m_scene.RegionInfo.RegionSizeX / LandUnit, m_scene.RegionInfo.RegionSizeY / LandUnit];
275 } 275 }
276 } 276 }
277 277
278 /// <summary> 278 /// <summary>
279 /// Create a default parcel that spans the entire region and is owned by the estate owner. 279 /// Create a default parcel that spans the entire region and is owned by the estate owner.
280 /// </summary> 280 /// </summary>
@@ -360,7 +360,7 @@ namespace OpenSim.Region.CoreModules.World.Land
360 return false; 360 return false;
361 } 361 }
362 } 362 }
363 363
364 if(ban) 364 if(ban)
365 { 365 {
366 if (!forcedPosition.Contains(avatar.UUID)) 366 if (!forcedPosition.Contains(avatar.UUID))
@@ -581,13 +581,13 @@ namespace OpenSim.Region.CoreModules.World.Land
581 /// Adds a land object to the stored list and adds them to the landIDList to what they own 581 /// Adds a land object to the stored list and adds them to the landIDList to what they own
582 /// </summary> 582 /// </summary>
583 /// <param name="new_land"> 583 /// <param name="new_land">
584 /// The land object being added. 584 /// The land object being added.
585 /// Will return null if this overlaps with an existing parcel that has not had its bitmap adjusted. 585 /// Will return null if this overlaps with an existing parcel that has not had its bitmap adjusted.
586 /// </param> 586 /// </param>
587 public ILandObject AddLandObject(ILandObject land) 587 public ILandObject AddLandObject(ILandObject land)
588 { 588 {
589 ILandObject new_land = land.Copy(); 589 ILandObject new_land = land.Copy();
590 590
591 // Only now can we add the prim counts to the land object - we rely on the global ID which is generated 591 // Only now can we add the prim counts to the land object - we rely on the global ID which is generated
592 // as a random UUID inside LandData initialization 592 // as a random UUID inside LandData initialization
593 if (m_primCountModule != null) 593 if (m_primCountModule != null)
@@ -607,7 +607,7 @@ namespace OpenSim.Region.CoreModules.World.Land
607 } 607 }
608 else 608 else
609 { 609 {
610 // If other land objects still believe that they occupy any parts of the same space, 610 // If other land objects still believe that they occupy any parts of the same space,
611 // then do not allow the add to proceed. 611 // then do not allow the add to proceed.
612 for (int x = 0; x < landBitmap.GetLength(0); x++) 612 for (int x = 0; x < landBitmap.GetLength(0); x++)
613 { 613 {
@@ -642,7 +642,7 @@ namespace OpenSim.Region.CoreModules.World.Land
642 if (landBitmap[x, y]) 642 if (landBitmap[x, y])
643 { 643 {
644 // m_log.DebugFormat( 644 // m_log.DebugFormat(
645 // "[LAND MANAGEMENT MODULE]: Registering parcel {0} for land co-ord ({1}, {2}) on {3}", 645 // "[LAND MANAGEMENT MODULE]: Registering parcel {0} for land co-ord ({1}, {2}) on {3}",
646 // new_land.LandData.Name, x, y, m_scene.RegionInfo.RegionName); 646 // new_land.LandData.Name, x, y, m_scene.RegionInfo.RegionName);
647 647
648 m_landIDList[x, y] = newLandLocalID; 648 m_landIDList[x, y] = newLandLocalID;
@@ -690,10 +690,10 @@ namespace OpenSim.Region.CoreModules.World.Land
690 690
691 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID); 691 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID);
692 } 692 }
693 693
694 /// <summary> 694 /// <summary>
695 /// Clear the scene of all parcels 695 /// Clear the scene of all parcels
696 /// </summary> 696 /// </summary>
697 public void Clear(bool setupDefaultParcel) 697 public void Clear(bool setupDefaultParcel)
698 { 698 {
699 Dictionary<int, ILandObject> landworkList; 699 Dictionary<int, ILandObject> landworkList;
@@ -1077,7 +1077,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1077 1077
1078 if(maxindex < 0 || selectedLandObjects.Count < 2) 1078 if(maxindex < 0 || selectedLandObjects.Count < 2)
1079 return; 1079 return;
1080 1080
1081 ILandObject masterLandObject = selectedLandObjects[maxindex]; 1081 ILandObject masterLandObject = selectedLandObjects[maxindex];
1082 selectedLandObjects.RemoveAt(maxindex); 1082 selectedLandObjects.RemoveAt(maxindex);
1083 1083
@@ -1146,7 +1146,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1146 1146
1147 if (currentParcelBlock != null) 1147 if (currentParcelBlock != null)
1148 { 1148 {
1149 // types 1149 // types
1150 if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId) 1150 if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId)
1151 { 1151 {
1152 //Owner Flag 1152 //Owner Flag
@@ -1165,7 +1165,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1165 } 1165 }
1166 else if (currentParcelBlock.LandData.OwnerID == UUID.Zero) 1166 else if (currentParcelBlock.LandData.OwnerID == UUID.Zero)
1167 { 1167 {
1168 //Public type 1168 //Public type
1169 tempByte = (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero 1169 tempByte = (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero
1170 } 1170 }
1171 // LAND_TYPE_IS_BEING_AUCTIONED still unsuported 1171 // LAND_TYPE_IS_BEING_AUCTIONED still unsuported
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1402 land.LandData.GroupID = UUID.Zero; 1402 land.LandData.GroupID = UUID.Zero;
1403 land.LandData.IsGroupOwned = false; 1403 land.LandData.IsGroupOwned = false;
1404 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory); 1404 land.LandData.Flags &= ~(uint) (ParcelFlags.ForSale | ParcelFlags.ForSaleObjects | ParcelFlags.SellParcelObjects | ParcelFlags.ShowDirectory);
1405 1405
1406 m_scene.ForEachClient(SendParcelOverlay); 1406 m_scene.ForEachClient(SendParcelOverlay);
1407 land.SendLandUpdateToClient(true, remote_client); 1407 land.SendLandUpdateToClient(true, remote_client);
1408 UpdateLandObject(land.LandData.LocalID, land.LandData); 1408 UpdateLandObject(land.LandData.LocalID, land.LandData);
@@ -1584,7 +1584,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1584 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); 1584 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
1585 new_land.LandData = data.Copy(); 1585 new_land.LandData = data.Copy();
1586 1586
1587 new_land.SetLandBitmapFromByteArray(); 1587 new_land.SetLandBitmapFromByteArray();
1588 AddLandObject(new_land); 1588 AddLandObject(new_land);
1589// new_land.SendLandUpdateToAvatarsOverMe(); 1589// new_land.SendLandUpdateToAvatarsOverMe();
1590 } 1590 }
@@ -1599,7 +1599,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1599 m_landList.TryGetValue(localID, out selectedParcel); 1599 m_landList.TryGetValue(localID, out selectedParcel);
1600 } 1600 }
1601 1601
1602 if (selectedParcel == null) 1602 if (selectedParcel == null)
1603 return; 1603 return;
1604 1604
1605 selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient); 1605 selectedParcel.ReturnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1706 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) 1706 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
1707 { 1707 {
1708 IClientAPI client; 1708 IClientAPI client;
1709 if (!m_scene.TryGetClient(agentID, out client)) 1709 if (!m_scene.TryGetClient(agentID, out client))
1710 { 1710 {
1711 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); 1711 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID);
1712 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); 1712 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
@@ -1765,7 +1765,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1765 1765
1766 if (land != null) 1766 if (land != null)
1767 { 1767 {
1768 UpdateLandProperties(land,land_update, client); 1768 UpdateLandProperties(land,land_update, client);
1769 m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); 1769 m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client);
1770 } 1770 }
1771 else 1771 else
@@ -2103,7 +2103,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2103 targetAvatar.TeleportWithMomentum(pos, null); 2103 targetAvatar.TeleportWithMomentum(pos, null);
2104 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname); 2104 targetAvatar.ControllingClient.SendAlertMessage("You have been ejected by " + parcelManager.Firstname + " " + parcelManager.Lastname);
2105 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected."); 2105 parcelManager.ControllingClient.SendAlertMessage("Avatar Ejected.");
2106 2106
2107 if ((flags & 1) != 0) // Ban TODO: Remove magic number 2107 if ((flags & 1) != 0) // Ban TODO: Remove magic number
2108 { 2108 {
2109 LandAccessEntry entry = new LandAccessEntry(); 2109 LandAccessEntry entry = new LandAccessEntry();
@@ -2144,7 +2144,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2144 if (// Required: local user; foreign users cannot set home 2144 if (// Required: local user; foreign users cannot set home
2145 m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) && 2145 m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) &&
2146 (// (a) gods and land managers can set home 2146 (// (a) gods and land managers can set home
2147 m_scene.Permissions.IsAdministrator(remoteClient.AgentId) || 2147 m_scene.Permissions.IsAdministrator(remoteClient.AgentId) ||
2148 m_scene.Permissions.IsGod(remoteClient.AgentId) || 2148 m_scene.Permissions.IsGod(remoteClient.AgentId) ||
2149 // (b) land owners can set home 2149 // (b) land owners can set home
2150 remoteClient.AgentId == land.LandData.OwnerID || 2150 remoteClient.AgentId == land.LandData.OwnerID ||
@@ -2196,8 +2196,8 @@ namespace OpenSim.Region.CoreModules.World.Land
2196 "If no local land ID is given, then summary information about all the parcels is shown.\n" 2196 "If no local land ID is given, then summary information about all the parcels is shown.\n"
2197 + "If a local land ID is given then full information about that parcel is shown.", 2197 + "If a local land ID is given then full information about that parcel is shown.",
2198 HandleShowCommand); 2198 HandleShowCommand);
2199 } 2199 }
2200 2200
2201 protected void HandleClearCommand(string module, string[] args) 2201 protected void HandleClearCommand(string module, string[] args)
2202 { 2202 {
2203 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene)) 2203 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
@@ -2205,9 +2205,9 @@ namespace OpenSim.Region.CoreModules.World.Land
2205 2205
2206 string response = MainConsole.Instance.CmdPrompt( 2206 string response = MainConsole.Instance.CmdPrompt(
2207 string.Format( 2207 string.Format(
2208 "Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name), 2208 "Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
2209 "n"); 2209 "n");
2210 2210
2211 if (response.ToLower() == "y") 2211 if (response.ToLower() == "y")
2212 { 2212 {
2213 Clear(true); 2213 Clear(true);
@@ -2217,14 +2217,14 @@ namespace OpenSim.Region.CoreModules.World.Land
2217 { 2217 {
2218 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name); 2218 MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name);
2219 } 2219 }
2220 } 2220 }
2221 2221
2222 protected void HandleShowCommand(string module, string[] args) 2222 protected void HandleShowCommand(string module, string[] args)
2223 { 2223 {
2224 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene)) 2224 if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
2225 return; 2225 return;
2226 2226
2227 StringBuilder report = new StringBuilder(); 2227 StringBuilder report = new StringBuilder();
2228 2228
2229 if (args.Length <= 2) 2229 if (args.Length <= 2)
2230 { 2230 {
@@ -2240,7 +2240,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2240 ILandObject lo; 2240 ILandObject lo;
2241 2241
2242 lock (m_landList) 2242 lock (m_landList)
2243 { 2243 {
2244 if (!m_landList.TryGetValue(landLocalId, out lo)) 2244 if (!m_landList.TryGetValue(landLocalId, out lo))
2245 { 2245 {
2246 MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId); 2246 MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId);
@@ -2265,7 +2265,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2265 cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize); 2265 cdt.AddColumn("Starts", ConsoleDisplayUtil.VectorSize);
2266 cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize); 2266 cdt.AddColumn("Ends", ConsoleDisplayUtil.VectorSize);
2267 cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize); 2267 cdt.AddColumn("Owner", ConsoleDisplayUtil.UserNameSize);
2268 2268
2269 lock (m_landList) 2269 lock (m_landList)
2270 { 2270 {
2271 foreach (ILandObject lo in m_landList.Values) 2271 foreach (ILandObject lo in m_landList.Values)
@@ -2316,7 +2316,7 @@ namespace OpenSim.Region.CoreModules.World.Land
2316 cdl.AddRow("GroupID", ld.GroupID); 2316 cdl.AddRow("GroupID", ld.GroupID);
2317 2317
2318 cdl.AddRow("Status", ld.Status); 2318 cdl.AddRow("Status", ld.Status);
2319 cdl.AddRow("Flags", (ParcelFlags)ld.Flags); 2319 cdl.AddRow("Flags", (ParcelFlags)ld.Flags);
2320 2320
2321 cdl.AddRow("Landing Type", (LandingType)ld.LandingType); 2321 cdl.AddRow("Landing Type", (LandingType)ld.LandingType);
2322 cdl.AddRow("User Location", ld.UserLocation); 2322 cdl.AddRow("User Location", ld.UserLocation);
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 4cbc8b8..fc2282d 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Land
75 return free; 75 return free;
76 } 76 }
77 77
78 protected LandData m_landData; 78 protected LandData m_landData;
79 public LandData LandData 79 public LandData LandData
80 { 80 {
81 get { return m_landData; } 81 get { return m_landData; }
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Land
196 else if(testpos.Y >= maxy) 196 else if(testpos.Y >= maxy)
197 return null; // will never get there 197 return null; // will never get there
198 } 198 }
199 199
200 while(!LandBitmap[(int)testpos.X, (int)testpos.Y]) 200 while(!LandBitmap[(int)testpos.X, (int)testpos.Y])
201 { 201 {
202 testpos += direction; 202 testpos += direction;
@@ -278,14 +278,14 @@ namespace OpenSim.Region.CoreModules.World.Land
278 else 278 else
279 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; 279 LandBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit];
280 280
281 LandData = new LandData(); 281 LandData = new LandData();
282 LandData.OwnerID = owner_id; 282 LandData.OwnerID = owner_id;
283 if (is_group_owned) 283 if (is_group_owned)
284 LandData.GroupID = owner_id; 284 LandData.GroupID = owner_id;
285 else 285 else
286 LandData.GroupID = UUID.Zero; 286 LandData.GroupID = UUID.Zero;
287 LandData.IsGroupOwned = is_group_owned; 287 LandData.IsGroupOwned = is_group_owned;
288 288
289 m_scene.EventManager.OnFrame += OnFrame; 289 m_scene.EventManager.OnFrame += OnFrame;
290 } 290 }
291 291
@@ -294,7 +294,7 @@ namespace OpenSim.Region.CoreModules.World.Land
294 #region Member Functions 294 #region Member Functions
295 295
296 #region General Functions 296 #region General Functions
297 297
298 /// <summary> 298 /// <summary>
299 /// Checks to see if this land object contains a point 299 /// Checks to see if this land object contains a point
300 /// </summary> 300 /// </summary>
@@ -373,12 +373,12 @@ namespace OpenSim.Region.CoreModules.World.Land
373 373
374 if(simMax > m_scene.RegionInfo.ObjectCapacity) 374 if(simMax > m_scene.RegionInfo.ObjectCapacity)
375 simMax = m_scene.RegionInfo.ObjectCapacity; 375 simMax = m_scene.RegionInfo.ObjectCapacity;
376 //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}", 376 //m_log.DebugFormat("Simwide Area: {0}, Capacity {1}, SimMax {2}, SimWidePrims {3}",
377 // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims); 377 // LandData.SimwideArea, m_scene.RegionInfo.ObjectCapacity, simMax, LandData.SimwidePrims);
378 return simMax; 378 return simMax;
379 } 379 }
380 } 380 }
381 381
382 #endregion 382 #endregion
383 383
384 #region Packet Request Handling 384 #region Packet Request Handling
@@ -552,7 +552,7 @@ namespace OpenSim.Region.CoreModules.World.Land
552 needOverlay = true; 552 needOverlay = true;
553 553
554 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); 554 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);
555 return true; 555 return true;
556 } 556 }
557 return false; 557 return false;
558 } 558 }
@@ -720,11 +720,11 @@ namespace OpenSim.Region.CoreModules.World.Land
720 720
721 if(sp==null || !sp.isNPC) 721 if(sp==null || !sp.isNPC)
722 return true; 722 return true;
723 723
724 INPC npccli = (INPC)sp.ControllingClient; 724 INPC npccli = (INPC)sp.ControllingClient;
725 if(npccli== null) 725 if(npccli== null)
726 return true; 726 return true;
727 727
728 UUID owner = npccli.Owner; 728 UUID owner = npccli.Owner;
729 729
730 if(owner == UUID.Zero) 730 if(owner == UUID.Zero)
@@ -898,7 +898,7 @@ namespace OpenSim.Region.CoreModules.World.Land
898 // update use lists flags 898 // update use lists flags
899 // rights already checked or we wont be here 899 // rights already checked or we wont be here
900 uint parcelflags = newData.Flags; 900 uint parcelflags = newData.Flags;
901 901
902 if((flags & (uint)AccessList.Access) != 0) 902 if((flags & (uint)AccessList.Access) != 0)
903 parcelflags |= (uint)ParcelFlags.UseAccessList; 903 parcelflags |= (uint)ParcelFlags.UseAccessList;
904 if((flags & (uint)AccessList.Ban) != 0) 904 if((flags & (uint)AccessList.Ban) != 0)
@@ -1024,7 +1024,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1024 LandData.AABBMin = new Vector3(tx, ty, 0f); 1024 LandData.AABBMin = new Vector3(tx, ty, 0f);
1025 else 1025 else
1026 LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]); 1026 LandData.AABBMin = new Vector3(tx, ty, (float)m_scene.Heightmap[tx, ty]);
1027 1027
1028 max_x++; 1028 max_x++;
1029 tx = max_x * landUnit; 1029 tx = max_x * landUnit;
1030 if (tx > regionSizeX) 1030 if (tx > regionSizeX)
@@ -1042,7 +1042,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1042 LandData.AABBMax = new Vector3(tx, ty, 0f); 1042 LandData.AABBMax = new Vector3(tx, ty, 0f);
1043 else 1043 else
1044 LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]); 1044 LandData.AABBMax = new Vector3(tx, ty, (float)m_scene.Heightmap[tx - 1, ty - 1]);
1045 1045
1046 LandData.Area = tempArea * landUnit * landUnit; 1046 LandData.Area = tempArea * landUnit * landUnit;
1047 } 1047 }
1048 1048
@@ -1073,7 +1073,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1073 { 1073 {
1074 return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true); 1074 return GetSquareLandBitmap(0, 0, (int)m_scene.RegionInfo.RegionSizeX, (int) m_scene.RegionInfo.RegionSizeY, true);
1075 } 1075 }
1076 1076
1077 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true) 1077 public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true)
1078 { 1078 {
1079 // Empty bitmap for the whole region 1079 // Empty bitmap for the whole region
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1317 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> 1317 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param>
1318 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt</param> 1318 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt</param>
1319 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param> 1319 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param>
1320 /// <returns>New parcel bitmap</returns> 1320 /// <returns>New parcel bitmap</returns>
1321 public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax) 1321 public bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax)
1322 { 1322 {
1323 // get the size of the incoming bitmaps 1323 // get the size of the incoming bitmaps
@@ -1409,7 +1409,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1409 // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us 1409 // Importing land parcel data from an OAR where the source region is a different size to the dest region requires us
1410 // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes 1410 // to make a LandBitmap that's not derived from the current region's size. We use the LandData.Bitmap size in bytes
1411 // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?) 1411 // to figure out what the OAR's region dimensions are. (Is there a better way to get the src region x and y from the OAR?)
1412 // This method assumes we always will have square regions 1412 // This method assumes we always will have square regions
1413 1413
1414 bitmapLen = LandData.Bitmap.Length; 1414 bitmapLen = LandData.Bitmap.Length;
1415 xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8)); 1415 xLen = (int)Math.Abs(Math.Sqrt(bitmapLen * 8));
@@ -1550,9 +1550,9 @@ namespace OpenSim.Region.CoreModules.World.Land
1550 lock (primsOverMe) 1550 lock (primsOverMe)
1551 { 1551 {
1552// m_log.DebugFormat( 1552// m_log.DebugFormat(
1553// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", 1553// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
1554// remote_client.Name, primsOverMe.Count); 1554// remote_client.Name, primsOverMe.Count);
1555 1555
1556 try 1556 try
1557 { 1557 {
1558 foreach (SceneObjectGroup obj in primsOverMe) 1558 foreach (SceneObjectGroup obj in primsOverMe)
@@ -1593,7 +1593,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1593 public Dictionary<UUID, int> GetLandObjectOwners() 1593 public Dictionary<UUID, int> GetLandObjectOwners()
1594 { 1594 {
1595 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); 1595 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
1596 1596
1597 lock (primsOverMe) 1597 lock (primsOverMe)
1598 { 1598 {
1599 try 1599 try
@@ -1669,7 +1669,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1669 { 1669 {
1670// m_log.DebugFormat( 1670// m_log.DebugFormat(
1671// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); 1671// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
1672 1672
1673 Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); 1673 Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>();
1674 1674
1675 lock (primsOverMe) 1675 lock (primsOverMe)
@@ -1752,7 +1752,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1752 public void AddPrimOverMe(SceneObjectGroup obj) 1752 public void AddPrimOverMe(SceneObjectGroup obj)
1753 { 1753 {
1754// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); 1754// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name);
1755 1755
1756 lock (primsOverMe) 1756 lock (primsOverMe)
1757 primsOverMe.Add(obj); 1757 primsOverMe.Add(obj);
1758 } 1758 }
@@ -1760,13 +1760,13 @@ namespace OpenSim.Region.CoreModules.World.Land
1760 public void RemovePrimFromOverMe(SceneObjectGroup obj) 1760 public void RemovePrimFromOverMe(SceneObjectGroup obj)
1761 { 1761 {
1762// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); 1762// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name);
1763 1763
1764 lock (primsOverMe) 1764 lock (primsOverMe)
1765 primsOverMe.Remove(obj); 1765 primsOverMe.Remove(obj);
1766 } 1766 }
1767 1767
1768 #endregion 1768 #endregion
1769 1769
1770 /// <summary> 1770 /// <summary>
1771 /// Set the media url for this land parcel 1771 /// Set the media url for this land parcel
1772 /// </summary> 1772 /// </summary>
@@ -1777,7 +1777,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1777 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData); 1777 m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
1778 SendLandUpdateToAvatarsOverMe(); 1778 SendLandUpdateToAvatarsOverMe();
1779 } 1779 }
1780 1780
1781 /// <summary> 1781 /// <summary>
1782 /// Set the music url for this land parcel 1782 /// Set the music url for this land parcel
1783 /// </summary> 1783 /// </summary>
@@ -1824,7 +1824,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1824 { 1824 {
1825 LandData.ParcelAccessList.Remove(entry); 1825 LandData.ParcelAccessList.Remove(entry);
1826 ScenePresence presence; 1826 ScenePresence presence;
1827 1827
1828 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent)) 1828 if (m_scene.TryGetScenePresence(entry.AgentID, out presence) && (!presence.IsChildAgent))
1829 { 1829 {
1830 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); 1830 ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index 771fdd2..857f919 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -69,11 +69,11 @@ namespace OpenSim.Region.CoreModules.World.Land
69 /// For now, a simple simwide taint to get this up. Later parcel based 69 /// For now, a simple simwide taint to get this up. Later parcel based
70 /// taint to allow recounting a parcel if only ownership has changed 70 /// taint to allow recounting a parcel if only ownership has changed
71 /// without recounting the whole sim. 71 /// without recounting the whole sim.
72 /// 72 ///
73 /// We start out tainted so that the first get call resets the various prim counts. 73 /// We start out tainted so that the first get call resets the various prim counts.
74 /// </value> 74 /// </value>
75 private bool m_Tainted = true; 75 private bool m_Tainted = true;
76 76
77 private Object m_TaintLock = new Object(); 77 private Object m_TaintLock = new Object();
78 78
79 public Type ReplaceableInterface 79 public Type ReplaceableInterface
@@ -88,10 +88,10 @@ namespace OpenSim.Region.CoreModules.World.Land
88 public void AddRegion(Scene scene) 88 public void AddRegion(Scene scene)
89 { 89 {
90 m_Scene = scene; 90 m_Scene = scene;
91 91
92 m_Scene.RegisterModuleInterface<IPrimCountModule>(this); 92 m_Scene.RegisterModuleInterface<IPrimCountModule>(this);
93 93
94 m_Scene.EventManager.OnObjectAddedToScene += OnParcelPrimCountAdd; 94 m_Scene.EventManager.OnObjectAddedToScene += OnParcelPrimCountAdd;
95 m_Scene.EventManager.OnObjectBeingRemovedFromScene += 95 m_Scene.EventManager.OnObjectBeingRemovedFromScene +=
96 OnObjectBeingRemovedFromScene; 96 OnObjectBeingRemovedFromScene;
97 m_Scene.EventManager.OnParcelPrimCountTainted += 97 m_Scene.EventManager.OnParcelPrimCountTainted +=
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.World.Land
104 } 104 }
105 105
106 public void RemoveRegion(Scene scene) 106 public void RemoveRegion(Scene scene)
107 { 107 {
108 } 108 }
109 109
110 public void Close() 110 public void Close()
@@ -126,7 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Land
126 AddObject(obj); 126 AddObject(obj);
127// else 127// else
128// m_log.DebugFormat( 128// m_log.DebugFormat(
129// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted", 129// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
130// obj.Name, m_Scene.RegionInfo.RegionName); 130// obj.Name, m_Scene.RegionInfo.RegionName);
131 } 131 }
132 } 132 }
@@ -140,16 +140,16 @@ namespace OpenSim.Region.CoreModules.World.Land
140 RemoveObject(obj); 140 RemoveObject(obj);
141// else 141// else
142// m_log.DebugFormat( 142// m_log.DebugFormat(
143// "[PRIM COUNT MODULE]: Ignoring OnObjectBeingRemovedFromScene() for {0} on {1} since count is tainted", 143// "[PRIM COUNT MODULE]: Ignoring OnObjectBeingRemovedFromScene() for {0} on {1} since count is tainted",
144// obj.Name, m_Scene.RegionInfo.RegionName); 144// obj.Name, m_Scene.RegionInfo.RegionName);
145 } 145 }
146 } 146 }
147 147
148 private void OnParcelPrimCountTainted() 148 private void OnParcelPrimCountTainted()
149 { 149 {
150// m_log.DebugFormat( 150// m_log.DebugFormat(
151// "[PRIM COUNT MODULE]: OnParcelPrimCountTainted() called on {0}", m_Scene.RegionInfo.RegionName); 151// "[PRIM COUNT MODULE]: OnParcelPrimCountTainted() called on {0}", m_Scene.RegionInfo.RegionName);
152 152
153 lock (m_TaintLock) 153 lock (m_TaintLock)
154 m_Tainted = true; 154 m_Tainted = true;
155 } 155 }
@@ -174,33 +174,33 @@ namespace OpenSim.Region.CoreModules.World.Land
174 174
175 // NOTE: Call under Taint Lock 175 // NOTE: Call under Taint Lock
176 private void AddObject(SceneObjectGroup obj) 176 private void AddObject(SceneObjectGroup obj)
177 { 177 {
178 if (obj.IsAttachment) 178 if (obj.IsAttachment)
179 return; 179 return;
180 if (((obj.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)) 180 if (((obj.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0))
181 return; 181 return;
182 182
183 Vector3 pos = obj.AbsolutePosition; 183 Vector3 pos = obj.AbsolutePosition;
184 ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); 184 ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y);
185 185
186 // If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it 186 // If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it
187 if (landObject == null) 187 if (landObject == null)
188 { 188 {
189// m_log.WarnFormat( 189// m_log.WarnFormat(
190// "[PRIM COUNT MODULE]: Found no land object for {0} at position ({1}, {2}) on {3}", 190// "[PRIM COUNT MODULE]: Found no land object for {0} at position ({1}, {2}) on {3}",
191// obj.Name, pos.X, pos.Y, m_Scene.RegionInfo.RegionName); 191// obj.Name, pos.X, pos.Y, m_Scene.RegionInfo.RegionName);
192 192
193 return; 193 return;
194 } 194 }
195 195
196 LandData landData = landObject.LandData; 196 LandData landData = landObject.LandData;
197 197
198// m_log.DebugFormat( 198// m_log.DebugFormat(
199// "[PRIM COUNT MODULE]: Adding object {0} with {1} parts to prim count for parcel {2} on {3}", 199// "[PRIM COUNT MODULE]: Adding object {0} with {1} parts to prim count for parcel {2} on {3}",
200// obj.Name, obj.Parts.Length, landData.Name, m_Scene.RegionInfo.RegionName); 200// obj.Name, obj.Parts.Length, landData.Name, m_Scene.RegionInfo.RegionName);
201 201
202// m_log.DebugFormat( 202// m_log.DebugFormat(
203// "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}", 203// "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}",
204// obj.Name, obj.OwnerID, landData.OwnerID); 204// obj.Name, obj.OwnerID, landData.OwnerID);
205 205
206 ParcelCounts parcelCounts; 206 ParcelCounts parcelCounts;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.CoreModules.World.Land
217 217
218 if (obj.IsSelected) 218 if (obj.IsSelected)
219 { 219 {
220 parcelCounts.Selected += partCount; 220 parcelCounts.Selected += partCount;
221 } 221 }
222 else 222 else
223 { 223 {
@@ -244,8 +244,8 @@ namespace OpenSim.Region.CoreModules.World.Land
244 // NOTE: Call under Taint Lock 244 // NOTE: Call under Taint Lock
245 private void RemoveObject(SceneObjectGroup obj) 245 private void RemoveObject(SceneObjectGroup obj)
246 { 246 {
247// m_log.DebugFormat("[PRIM COUNT MODULE]: Removing object {0} {1} from prim count", obj.Name, obj.UUID); 247// m_log.DebugFormat("[PRIM COUNT MODULE]: Removing object {0} {1} from prim count", obj.Name, obj.UUID);
248 248
249 // Currently this is being done by tainting the count instead. 249 // Currently this is being done by tainting the count instead.
250 } 250 }
251 251
@@ -253,7 +253,7 @@ namespace OpenSim.Region.CoreModules.World.Land
253 { 253 {
254// m_log.DebugFormat( 254// m_log.DebugFormat(
255// "[PRIM COUNT MODULE]: GetPrimCounts for parcel {0} in {1}", parcelID, m_Scene.RegionInfo.RegionName); 255// "[PRIM COUNT MODULE]: GetPrimCounts for parcel {0} in {1}", parcelID, m_Scene.RegionInfo.RegionName);
256 256
257 PrimCounts primCounts; 257 PrimCounts primCounts;
258 258
259 lock (m_PrimCounts) 259 lock (m_PrimCounts)
@@ -267,7 +267,7 @@ namespace OpenSim.Region.CoreModules.World.Land
267 return primCounts; 267 return primCounts;
268 } 268 }
269 269
270 270
271 /// <summary> 271 /// <summary>
272 /// Get the number of prims on the parcel that are owned by the parcel owner. 272 /// Get the number of prims on the parcel that are owned by the parcel owner.
273 /// </summary> 273 /// </summary>
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.World.Land
276 public int GetOwnerCount(UUID parcelID) 276 public int GetOwnerCount(UUID parcelID)
277 { 277 {
278 int count = 0; 278 int count = 0;
279 279
280 lock (m_TaintLock) 280 lock (m_TaintLock)
281 { 281 {
282 if (m_Tainted) 282 if (m_Tainted)
@@ -286,11 +286,11 @@ namespace OpenSim.Region.CoreModules.World.Land
286 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 286 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
287 count = counts.Owner; 287 count = counts.Owner;
288 } 288 }
289 289
290// m_log.DebugFormat( 290// m_log.DebugFormat(
291// "[PRIM COUNT MODULE]: GetOwnerCount for parcel {0} in {1} returning {2}", 291// "[PRIM COUNT MODULE]: GetOwnerCount for parcel {0} in {1} returning {2}",
292// parcelID, m_Scene.RegionInfo.RegionName, count); 292// parcelID, m_Scene.RegionInfo.RegionName, count);
293 293
294 return count; 294 return count;
295 } 295 }
296 296
@@ -298,11 +298,11 @@ namespace OpenSim.Region.CoreModules.World.Land
298 /// Get the number of prims on the parcel that have been set to the group that owns the parcel. 298 /// Get the number of prims on the parcel that have been set to the group that owns the parcel.
299 /// </summary> 299 /// </summary>
300 /// <param name="parcelID"></param> 300 /// <param name="parcelID"></param>
301 /// <returns></returns> 301 /// <returns></returns>
302 public int GetGroupCount(UUID parcelID) 302 public int GetGroupCount(UUID parcelID)
303 { 303 {
304 int count = 0; 304 int count = 0;
305 305
306 lock (m_TaintLock) 306 lock (m_TaintLock)
307 { 307 {
308 if (m_Tainted) 308 if (m_Tainted)
@@ -312,11 +312,11 @@ namespace OpenSim.Region.CoreModules.World.Land
312 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 312 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
313 count = counts.Group; 313 count = counts.Group;
314 } 314 }
315 315
316// m_log.DebugFormat( 316// m_log.DebugFormat(
317// "[PRIM COUNT MODULE]: GetGroupCount for parcel {0} in {1} returning {2}", 317// "[PRIM COUNT MODULE]: GetGroupCount for parcel {0} in {1} returning {2}",
318// parcelID, m_Scene.RegionInfo.RegionName, count); 318// parcelID, m_Scene.RegionInfo.RegionName, count);
319 319
320 return count; 320 return count;
321 } 321 }
322 322
@@ -324,11 +324,11 @@ namespace OpenSim.Region.CoreModules.World.Land
324 /// Get the number of prims on the parcel that are not owned by the parcel owner or set to the parcel group. 324 /// Get the number of prims on the parcel that are not owned by the parcel owner or set to the parcel group.
325 /// </summary> 325 /// </summary>
326 /// <param name="parcelID"></param> 326 /// <param name="parcelID"></param>
327 /// <returns></returns> 327 /// <returns></returns>
328 public int GetOthersCount(UUID parcelID) 328 public int GetOthersCount(UUID parcelID)
329 { 329 {
330 int count = 0; 330 int count = 0;
331 331
332 lock (m_TaintLock) 332 lock (m_TaintLock)
333 { 333 {
334 if (m_Tainted) 334 if (m_Tainted)
@@ -338,23 +338,23 @@ namespace OpenSim.Region.CoreModules.World.Land
338 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 338 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
339 count = counts.Others; 339 count = counts.Others;
340 } 340 }
341 341
342// m_log.DebugFormat( 342// m_log.DebugFormat(
343// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}", 343// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}",
344// parcelID, m_Scene.RegionInfo.RegionName, count); 344// parcelID, m_Scene.RegionInfo.RegionName, count);
345 345
346 return count; 346 return count;
347 } 347 }
348 348
349 /// <summary> 349 /// <summary>
350 /// Get the number of selected prims. 350 /// Get the number of selected prims.
351 /// </summary> 351 /// </summary>
352 /// <param name="parcelID"></param> 352 /// <param name="parcelID"></param>
353 /// <returns></returns> 353 /// <returns></returns>
354 public int GetSelectedCount(UUID parcelID) 354 public int GetSelectedCount(UUID parcelID)
355 { 355 {
356 int count = 0; 356 int count = 0;
357 357
358 lock (m_TaintLock) 358 lock (m_TaintLock)
359 { 359 {
360 if (m_Tainted) 360 if (m_Tainted)
@@ -364,24 +364,24 @@ namespace OpenSim.Region.CoreModules.World.Land
364 if (m_ParcelCounts.TryGetValue(parcelID, out counts)) 364 if (m_ParcelCounts.TryGetValue(parcelID, out counts))
365 count = counts.Selected; 365 count = counts.Selected;
366 } 366 }
367 367
368// m_log.DebugFormat( 368// m_log.DebugFormat(
369// "[PRIM COUNT MODULE]: GetSelectedCount for parcel {0} in {1} returning {2}", 369// "[PRIM COUNT MODULE]: GetSelectedCount for parcel {0} in {1} returning {2}",
370// parcelID, m_Scene.RegionInfo.RegionName, count); 370// parcelID, m_Scene.RegionInfo.RegionName, count);
371 371
372 return count; 372 return count;
373 } 373 }
374 374
375 /// <summary> 375 /// <summary>
376 /// Get the total count of owner, group and others prims on the parcel. 376 /// Get the total count of owner, group and others prims on the parcel.
377 /// FIXME: Need to do selected prims once this is reimplemented. 377 /// FIXME: Need to do selected prims once this is reimplemented.
378 /// </summary> 378 /// </summary>
379 /// <param name="parcelID"></param> 379 /// <param name="parcelID"></param>
380 /// <returns></returns> 380 /// <returns></returns>
381 public int GetTotalCount(UUID parcelID) 381 public int GetTotalCount(UUID parcelID)
382 { 382 {
383 int count = 0; 383 int count = 0;
384 384
385 lock (m_TaintLock) 385 lock (m_TaintLock)
386 { 386 {
387 if (m_Tainted) 387 if (m_Tainted)
@@ -396,28 +396,28 @@ namespace OpenSim.Region.CoreModules.World.Land
396 count += counts.Selected; 396 count += counts.Selected;
397 } 397 }
398 } 398 }
399 399
400// m_log.DebugFormat( 400// m_log.DebugFormat(
401// "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}", 401// "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}",
402// parcelID, m_Scene.RegionInfo.RegionName, count); 402// parcelID, m_Scene.RegionInfo.RegionName, count);
403 403
404 return count; 404 return count;
405 } 405 }
406 406
407 /// <summary> 407 /// <summary>
408 /// Get the number of prims that are in the entire simulator for the owner of this parcel. 408 /// Get the number of prims that are in the entire simulator for the owner of this parcel.
409 /// </summary> 409 /// </summary>
410 /// <param name="parcelID"></param> 410 /// <param name="parcelID"></param>
411 /// <returns></returns> 411 /// <returns></returns>
412 public int GetSimulatorCount(UUID parcelID) 412 public int GetSimulatorCount(UUID parcelID)
413 { 413 {
414 int count = 0; 414 int count = 0;
415 415
416 lock (m_TaintLock) 416 lock (m_TaintLock)
417 { 417 {
418 if (m_Tainted) 418 if (m_Tainted)
419 Recount(); 419 Recount();
420 420
421 UUID owner; 421 UUID owner;
422 if (m_OwnerMap.TryGetValue(parcelID, out owner)) 422 if (m_OwnerMap.TryGetValue(parcelID, out owner))
423 { 423 {
@@ -426,11 +426,11 @@ namespace OpenSim.Region.CoreModules.World.Land
426 count = val; 426 count = val;
427 } 427 }
428 } 428 }
429 429
430// m_log.DebugFormat( 430// m_log.DebugFormat(
431// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}", 431// "[PRIM COUNT MODULE]: GetOthersCount for parcel {0} in {1} returning {2}",
432// parcelID, m_Scene.RegionInfo.RegionName, count); 432// parcelID, m_Scene.RegionInfo.RegionName, count);
433 433
434 return count; 434 return count;
435 } 435 }
436 436
@@ -439,11 +439,11 @@ namespace OpenSim.Region.CoreModules.World.Land
439 /// </summary> 439 /// </summary>
440 /// <param name="parcelID"></param> 440 /// <param name="parcelID"></param>
441 /// <param name="userID"></param> 441 /// <param name="userID"></param>
442 /// <returns></returns> 442 /// <returns></returns>
443 public int GetUserCount(UUID parcelID, UUID userID) 443 public int GetUserCount(UUID parcelID, UUID userID)
444 { 444 {
445 int count = 0; 445 int count = 0;
446 446
447 lock (m_TaintLock) 447 lock (m_TaintLock)
448 { 448 {
449 if (m_Tainted) 449 if (m_Tainted)
@@ -459,9 +459,9 @@ namespace OpenSim.Region.CoreModules.World.Land
459 } 459 }
460 460
461// m_log.DebugFormat( 461// m_log.DebugFormat(
462// "[PRIM COUNT MODULE]: GetUserCount for user {0} in parcel {1} in region {2} returning {3}", 462// "[PRIM COUNT MODULE]: GetUserCount for user {0} in parcel {1} in region {2} returning {3}",
463// userID, parcelID, m_Scene.RegionInfo.RegionName, count); 463// userID, parcelID, m_Scene.RegionInfo.RegionName, count);
464 464
465 return count; 465 return count;
466 } 466 }
467 467
@@ -469,13 +469,13 @@ namespace OpenSim.Region.CoreModules.World.Land
469 private void Recount() 469 private void Recount()
470 { 470 {
471// m_log.DebugFormat("[PRIM COUNT MODULE]: Recounting prims on {0}", m_Scene.RegionInfo.RegionName); 471// m_log.DebugFormat("[PRIM COUNT MODULE]: Recounting prims on {0}", m_Scene.RegionInfo.RegionName);
472 472
473 m_OwnerMap.Clear(); 473 m_OwnerMap.Clear();
474 m_SimwideCounts.Clear(); 474 m_SimwideCounts.Clear();
475 m_ParcelCounts.Clear(); 475 m_ParcelCounts.Clear();
476 476
477 List<ILandObject> land = m_Scene.LandChannel.AllParcels(); 477 List<ILandObject> land = m_Scene.LandChannel.AllParcels();
478 478
479 foreach (ILandObject l in land) 479 foreach (ILandObject l in land)
480 { 480 {
481 LandData landData = l.LandData; 481 LandData landData = l.LandData;
@@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.World.Land
483 m_OwnerMap[landData.GlobalID] = landData.OwnerID; 483 m_OwnerMap[landData.GlobalID] = landData.OwnerID;
484 m_SimwideCounts[landData.OwnerID] = 0; 484 m_SimwideCounts[landData.OwnerID] = 0;
485// m_log.DebugFormat( 485// m_log.DebugFormat(
486// "[PRIM COUNT MODULE]: Initializing parcel count for {0} on {1}", 486// "[PRIM COUNT MODULE]: Initializing parcel count for {0} on {1}",
487// landData.Name, m_Scene.RegionInfo.RegionName); 487// landData.Name, m_Scene.RegionInfo.RegionName);
488 m_ParcelCounts[landData.GlobalID] = new ParcelCounts(); 488 m_ParcelCounts[landData.GlobalID] = new ParcelCounts();
489 } 489 }
@@ -499,7 +499,7 @@ namespace OpenSim.Region.CoreModules.World.Land
499 m_PrimCounts.Remove(k); 499 m_PrimCounts.Remove(k);
500 } 500 }
501 } 501 }
502 502
503 m_Tainted = false; 503 m_Tainted = false;
504 } 504 }
505 } 505 }
@@ -541,7 +541,7 @@ namespace OpenSim.Region.CoreModules.World.Land
541 return m_Parent.GetOthersCount(m_ParcelID); 541 return m_Parent.GetOthersCount(m_ParcelID);
542 } 542 }
543 } 543 }
544 544
545 public int Selected 545 public int Selected
546 { 546 {
547 get 547 get
@@ -549,7 +549,7 @@ namespace OpenSim.Region.CoreModules.World.Land
549 return m_Parent.GetSelectedCount(m_ParcelID); 549 return m_Parent.GetSelectedCount(m_ParcelID);
550 } 550 }
551 } 551 }
552 552
553 public int Total 553 public int Total
554 { 554 {
555 get 555 get
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
index 4ed67f3..d6a3ded 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/LandManagementModuleTests.cs
@@ -45,14 +45,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
45 UUID userId = TestHelpers.ParseTail(0x1); 45 UUID userId = TestHelpers.ParseTail(0x1);
46 46
47 LandManagementModule lmm = new LandManagementModule(); 47 LandManagementModule lmm = new LandManagementModule();
48 Scene scene = new SceneHelpers().SetupScene(); 48 Scene scene = new SceneHelpers().SetupScene();
49 SceneHelpers.SetupSceneModules(scene, lmm); 49 SceneHelpers.SetupSceneModules(scene, lmm);
50 50
51 ILandObject lo = new LandObject(userId, false, scene); 51 ILandObject lo = new LandObject(userId, false, scene);
52 lo.LandData.Name = "lo1"; 52 lo.LandData.Name = "lo1";
53 lo.SetLandBitmap( 53 lo.SetLandBitmap(
54 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 54 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
55 lo = lmm.AddLandObject(lo); 55 lo = lmm.AddLandObject(lo);
56 56
57 // TODO: Should add asserts to check that land object was added properly. 57 // TODO: Should add asserts to check that land object was added properly.
58 58
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
67 { 67 {
68 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 68 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
69 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID)); 69 Assert.That(loAtCoord.LandData.LocalID, Is.EqualTo(lo.LandData.LocalID));
70 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID)); 70 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(lo.LandData.GlobalID));
71 } 71 }
72 72
73 { 73 {
@@ -88,8 +88,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
88 88
89 SceneHelpers sh = new SceneHelpers(); 89 SceneHelpers sh = new SceneHelpers();
90 LandManagementModule lmm = new LandManagementModule(); 90 LandManagementModule lmm = new LandManagementModule();
91 Scene scene = sh.SetupScene(); 91 Scene scene = sh.SetupScene();
92 SceneHelpers.SetupSceneModules(scene, lmm); 92 SceneHelpers.SetupSceneModules(scene, lmm);
93 93
94 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID); 94 scene.loadAllLandObjectsFromStorage(scene.RegionInfo.RegionID);
95 95
@@ -115,8 +115,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
115 115
116 SceneHelpers sh = new SceneHelpers(); 116 SceneHelpers sh = new SceneHelpers();
117 LandManagementModule lmm = new LandManagementModule(); 117 LandManagementModule lmm = new LandManagementModule();
118 Scene scene = sh.SetupScene(); 118 Scene scene = sh.SetupScene();
119 SceneHelpers.SetupSceneModules(scene, lmm); 119 SceneHelpers.SetupSceneModules(scene, lmm);
120 120
121 ILandObject originalLo1 = new LandObject(userId, false, scene); 121 ILandObject originalLo1 = new LandObject(userId, false, scene);
122 originalLo1.LandData.Name = "lo1"; 122 originalLo1.LandData.Name = "lo1";
@@ -149,8 +149,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
149 149
150 SceneHelpers sh = new SceneHelpers(); 150 SceneHelpers sh = new SceneHelpers();
151 LandManagementModule lmm = new LandManagementModule(); 151 LandManagementModule lmm = new LandManagementModule();
152 Scene scene = sh.SetupScene(); 152 Scene scene = sh.SetupScene();
153 SceneHelpers.SetupSceneModules(scene, lmm); 153 SceneHelpers.SetupSceneModules(scene, lmm);
154 154
155 ILandObject originalLo1 = new LandObject(userId, false, scene); 155 ILandObject originalLo1 = new LandObject(userId, false, scene);
156 originalLo1.LandData.Name = "lo1"; 156 originalLo1.LandData.Name = "lo1";
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
173 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name)); 173 Assert.That(loAtCoord1.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
174 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID)); 174 Assert.That(loAtCoord1.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
175 175
176 ILandObject loAtCoord2 176 ILandObject loAtCoord2
177 = lmm.GetLandObject((int)Constants.RegionSize - 1, (((int)Constants.RegionSize / 4) * 3) - 1); 177 = lmm.GetLandObject((int)Constants.RegionSize - 1, (((int)Constants.RegionSize / 4) * 3) - 1);
178 Assert.That(loAtCoord2.LandData.Name, Is.EqualTo(originalLo2.LandData.Name)); 178 Assert.That(loAtCoord2.LandData.Name, Is.EqualTo(originalLo2.LandData.Name));
179 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID)); 179 Assert.That(loAtCoord2.LandData.GlobalID, Is.EqualTo(originalLo2.LandData.GlobalID));
@@ -198,8 +198,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
198 198
199 SceneHelpers sh = new SceneHelpers(); 199 SceneHelpers sh = new SceneHelpers();
200 LandManagementModule lmm = new LandManagementModule(); 200 LandManagementModule lmm = new LandManagementModule();
201 Scene scene = sh.SetupScene(); 201 Scene scene = sh.SetupScene();
202 SceneHelpers.SetupSceneModules(scene, lmm); 202 SceneHelpers.SetupSceneModules(scene, lmm);
203 203
204 ILandObject originalLo1 = new LandObject(userId, false, scene); 204 ILandObject originalLo1 = new LandObject(userId, false, scene);
205 originalLo1.LandData.Name = "lo1"; 205 originalLo1.LandData.Name = "lo1";
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
220 { 220 {
221 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 221 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
222 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo1.LandData.Name)); 222 Assert.That(loAtCoord.LandData.Name, Is.EqualTo(originalLo1.LandData.Name));
223 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID)); 223 Assert.That(loAtCoord.LandData.GlobalID, Is.EqualTo(originalLo1.LandData.GlobalID));
224 } 224 }
225 225
226 { 226 {
@@ -239,21 +239,21 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
239 UUID userId = TestHelpers.ParseTail(0x1); 239 UUID userId = TestHelpers.ParseTail(0x1);
240 240
241 LandManagementModule lmm = new LandManagementModule(); 241 LandManagementModule lmm = new LandManagementModule();
242 Scene scene = new SceneHelpers().SetupScene(); 242 Scene scene = new SceneHelpers().SetupScene();
243 SceneHelpers.SetupSceneModules(scene, lmm); 243 SceneHelpers.SetupSceneModules(scene, lmm);
244 244
245 ILandObject lo = new LandObject(userId, false, scene); 245 ILandObject lo = new LandObject(userId, false, scene);
246 lo.LandData.Name = "lo1"; 246 lo.LandData.Name = "lo1";
247 lo.SetLandBitmap( 247 lo.SetLandBitmap(
248 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 248 lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
249 lo = lmm.AddLandObject(lo); 249 lo = lmm.AddLandObject(lo);
250 250
251 lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId); 251 lmm.Subdivide(0, 0, LandManagementModule.LandUnit, LandManagementModule.LandUnit, userId);
252 252
253 { 253 {
254 ILandObject loAtCoord = lmm.GetLandObject(0, 0); 254 ILandObject loAtCoord = lmm.GetLandObject(0, 0);
255 Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID)); 255 Assert.That(loAtCoord.LandData.LocalID, Is.Not.EqualTo(lo.LandData.LocalID));
256 Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID)); 256 Assert.That(loAtCoord.LandData.GlobalID, Is.Not.EqualTo(lo.LandData.GlobalID));
257 } 257 }
258 258
259 { 259 {
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index 949acb6..0d8ece7 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -43,21 +43,21 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
43 public class PrimCountModuleTests : OpenSimTestCase 43 public class PrimCountModuleTests : OpenSimTestCase
44 { 44 {
45 protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); 45 protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000");
46 protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000"); 46 protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000");
47 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999"); 47 protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999");
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 protected PrimCountModule m_pcm; 49 protected PrimCountModule m_pcm;
50 50
51 /// <summary> 51 /// <summary>
52 /// A parcel that covers the entire sim except for a 1 unit wide strip on the eastern side. 52 /// A parcel that covers the entire sim except for a 1 unit wide strip on the eastern side.
53 /// </summary> 53 /// </summary>
54 protected ILandObject m_lo; 54 protected ILandObject m_lo;
55 55
56 /// <summary> 56 /// <summary>
57 /// A parcel that covers just the eastern strip of the sim. 57 /// A parcel that covers just the eastern strip of the sim.
58 /// </summary> 58 /// </summary>
59 protected ILandObject m_lo2; 59 protected ILandObject m_lo2;
60 60
61 [SetUp] 61 [SetUp]
62 public override void SetUp() 62 public override void SetUp()
63 { 63 {
@@ -65,24 +65,24 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
65 65
66 m_pcm = new PrimCountModule(); 66 m_pcm = new PrimCountModule();
67 LandManagementModule lmm = new LandManagementModule(); 67 LandManagementModule lmm = new LandManagementModule();
68 m_scene = new SceneHelpers().SetupScene(); 68 m_scene = new SceneHelpers().SetupScene();
69 SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm); 69 SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
70 70
71 int xParcelDivider = (int)Constants.RegionSize - 1; 71 int xParcelDivider = (int)Constants.RegionSize - 1;
72 72
73 ILandObject lo = new LandObject(m_userId, false, m_scene); 73 ILandObject lo = new LandObject(m_userId, false, m_scene);
74 lo.LandData.Name = "m_lo"; 74 lo.LandData.Name = "m_lo";
75 lo.SetLandBitmap( 75 lo.SetLandBitmap(
76 lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize)); 76 lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize));
77 m_lo = lmm.AddLandObject(lo); 77 m_lo = lmm.AddLandObject(lo);
78 78
79 ILandObject lo2 = new LandObject(m_userId, false, m_scene); 79 ILandObject lo2 = new LandObject(m_userId, false, m_scene);
80 lo2.SetLandBitmap( 80 lo2.SetLandBitmap(
81 lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 81 lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
82 lo2.LandData.Name = "m_lo2"; 82 lo2.LandData.Name = "m_lo2";
83 m_lo2 = lmm.AddLandObject(lo2); 83 m_lo2 = lmm.AddLandObject(lo2);
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
87 /// Test that counts before we do anything are correct. 87 /// Test that counts before we do anything are correct.
88 /// </summary> 88 /// </summary>
@@ -90,7 +90,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
90 public void TestInitialCounts() 90 public void TestInitialCounts()
91 { 91 {
92 IPrimCounts pc = m_lo.PrimCounts; 92 IPrimCounts pc = m_lo.PrimCounts;
93 93
94 Assert.That(pc.Owner, Is.EqualTo(0)); 94 Assert.That(pc.Owner, Is.EqualTo(0));
95 Assert.That(pc.Group, Is.EqualTo(0)); 95 Assert.That(pc.Group, Is.EqualTo(0));
96 Assert.That(pc.Others, Is.EqualTo(0)); 96 Assert.That(pc.Others, Is.EqualTo(0));
@@ -98,9 +98,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
98 Assert.That(pc.Selected, Is.EqualTo(0)); 98 Assert.That(pc.Selected, Is.EqualTo(0));
99 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 99 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
100 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 100 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
101 Assert.That(pc.Simulator, Is.EqualTo(0)); 101 Assert.That(pc.Simulator, Is.EqualTo(0));
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// Test count after a parcel owner owned object is added. 105 /// Test count after a parcel owner owned object is added.
106 /// </summary> 106 /// </summary>
@@ -108,13 +108,13 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
108 public void TestAddOwnerObject() 108 public void TestAddOwnerObject()
109 { 109 {
110 TestHelpers.InMethod(); 110 TestHelpers.InMethod();
111// log4net.Config.XmlConfigurator.Configure(); 111// log4net.Config.XmlConfigurator.Configure();
112 112
113 IPrimCounts pc = m_lo.PrimCounts; 113 IPrimCounts pc = m_lo.PrimCounts;
114 114
115 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 115 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
116 m_scene.AddNewSceneObject(sog, false); 116 m_scene.AddNewSceneObject(sog, false);
117 117
118 Assert.That(pc.Owner, Is.EqualTo(3)); 118 Assert.That(pc.Owner, Is.EqualTo(3));
119 Assert.That(pc.Group, Is.EqualTo(0)); 119 Assert.That(pc.Group, Is.EqualTo(0));
120 Assert.That(pc.Others, Is.EqualTo(0)); 120 Assert.That(pc.Others, Is.EqualTo(0));
@@ -122,12 +122,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
122 Assert.That(pc.Selected, Is.EqualTo(0)); 122 Assert.That(pc.Selected, Is.EqualTo(0));
123 Assert.That(pc.Users[m_userId], Is.EqualTo(3)); 123 Assert.That(pc.Users[m_userId], Is.EqualTo(3));
124 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 124 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
125 Assert.That(pc.Simulator, Is.EqualTo(3)); 125 Assert.That(pc.Simulator, Is.EqualTo(3));
126 126
127 // Add a second object and retest 127 // Add a second object and retest
128 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); 128 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
129 m_scene.AddNewSceneObject(sog2, false); 129 m_scene.AddNewSceneObject(sog2, false);
130 130
131 Assert.That(pc.Owner, Is.EqualTo(5)); 131 Assert.That(pc.Owner, Is.EqualTo(5));
132 Assert.That(pc.Group, Is.EqualTo(0)); 132 Assert.That(pc.Group, Is.EqualTo(0));
133 Assert.That(pc.Others, Is.EqualTo(0)); 133 Assert.That(pc.Others, Is.EqualTo(0));
@@ -135,9 +135,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
135 Assert.That(pc.Selected, Is.EqualTo(0)); 135 Assert.That(pc.Selected, Is.EqualTo(0));
136 Assert.That(pc.Users[m_userId], Is.EqualTo(5)); 136 Assert.That(pc.Users[m_userId], Is.EqualTo(5));
137 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 137 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
138 Assert.That(pc.Simulator, Is.EqualTo(5)); 138 Assert.That(pc.Simulator, Is.EqualTo(5));
139 } 139 }
140 140
141 /// <summary> 141 /// <summary>
142 /// Test count after a parcel owner owned copied object is added. 142 /// Test count after a parcel owner owned copied object is added.
143 /// </summary> 143 /// </summary>
@@ -145,14 +145,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
145 public void TestCopyOwnerObject() 145 public void TestCopyOwnerObject()
146 { 146 {
147 TestHelpers.InMethod(); 147 TestHelpers.InMethod();
148// log4net.Config.XmlConfigurator.Configure(); 148// log4net.Config.XmlConfigurator.Configure();
149 149
150 IPrimCounts pc = m_lo.PrimCounts; 150 IPrimCounts pc = m_lo.PrimCounts;
151 151
152 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 152 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
153 m_scene.AddNewSceneObject(sog, false); 153 m_scene.AddNewSceneObject(sog, false);
154 m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); 154 m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
155 155
156 Assert.That(pc.Owner, Is.EqualTo(6)); 156 Assert.That(pc.Owner, Is.EqualTo(6));
157 Assert.That(pc.Group, Is.EqualTo(0)); 157 Assert.That(pc.Group, Is.EqualTo(0));
158 Assert.That(pc.Others, Is.EqualTo(0)); 158 Assert.That(pc.Others, Is.EqualTo(0));
@@ -160,9 +160,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
160 Assert.That(pc.Selected, Is.EqualTo(0)); 160 Assert.That(pc.Selected, Is.EqualTo(0));
161 Assert.That(pc.Users[m_userId], Is.EqualTo(6)); 161 Assert.That(pc.Users[m_userId], Is.EqualTo(6));
162 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 162 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
163 Assert.That(pc.Simulator, Is.EqualTo(6)); 163 Assert.That(pc.Simulator, Is.EqualTo(6));
164 } 164 }
165 165
166 /// <summary> 166 /// <summary>
167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement 167 /// Test that parcel counts update correctly when an object is moved between parcels, where that movement
168 /// is not done directly by the user/ 168 /// is not done directly by the user/
@@ -171,18 +171,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
171 public void TestMoveOwnerObject() 171 public void TestMoveOwnerObject()
172 { 172 {
173 TestHelpers.InMethod(); 173 TestHelpers.InMethod();
174// log4net.Config.XmlConfigurator.Configure(); 174// log4net.Config.XmlConfigurator.Configure();
175 175
176 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 176 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
177 m_scene.AddNewSceneObject(sog, false); 177 m_scene.AddNewSceneObject(sog, false);
178 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10); 178 SceneObjectGroup sog2 = SceneHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
179 m_scene.AddNewSceneObject(sog2, false); 179 m_scene.AddNewSceneObject(sog2, false);
180 180
181 // Move the first scene object to the eastern strip parcel 181 // Move the first scene object to the eastern strip parcel
182 sog.AbsolutePosition = new Vector3(254, 2, 2); 182 sog.AbsolutePosition = new Vector3(254, 2, 2);
183 183
184 IPrimCounts pclo1 = m_lo.PrimCounts; 184 IPrimCounts pclo1 = m_lo.PrimCounts;
185 185
186 Assert.That(pclo1.Owner, Is.EqualTo(2)); 186 Assert.That(pclo1.Owner, Is.EqualTo(2));
187 Assert.That(pclo1.Group, Is.EqualTo(0)); 187 Assert.That(pclo1.Group, Is.EqualTo(0));
188 Assert.That(pclo1.Others, Is.EqualTo(0)); 188 Assert.That(pclo1.Others, Is.EqualTo(0));
@@ -190,10 +190,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
190 Assert.That(pclo1.Selected, Is.EqualTo(0)); 190 Assert.That(pclo1.Selected, Is.EqualTo(0));
191 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2)); 191 Assert.That(pclo1.Users[m_userId], Is.EqualTo(2));
192 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0)); 192 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
193 Assert.That(pclo1.Simulator, Is.EqualTo(5)); 193 Assert.That(pclo1.Simulator, Is.EqualTo(5));
194 194
195 IPrimCounts pclo2 = m_lo2.PrimCounts; 195 IPrimCounts pclo2 = m_lo2.PrimCounts;
196 196
197 Assert.That(pclo2.Owner, Is.EqualTo(3)); 197 Assert.That(pclo2.Owner, Is.EqualTo(3));
198 Assert.That(pclo2.Group, Is.EqualTo(0)); 198 Assert.That(pclo2.Group, Is.EqualTo(0));
199 Assert.That(pclo2.Others, Is.EqualTo(0)); 199 Assert.That(pclo2.Others, Is.EqualTo(0));
@@ -201,11 +201,11 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
201 Assert.That(pclo2.Selected, Is.EqualTo(0)); 201 Assert.That(pclo2.Selected, Is.EqualTo(0));
202 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3)); 202 Assert.That(pclo2.Users[m_userId], Is.EqualTo(3));
203 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0)); 203 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
204 Assert.That(pclo2.Simulator, Is.EqualTo(5)); 204 Assert.That(pclo2.Simulator, Is.EqualTo(5));
205 205
206 // Now move it back again 206 // Now move it back again
207 sog.AbsolutePosition = new Vector3(2, 2, 2); 207 sog.AbsolutePosition = new Vector3(2, 2, 2);
208 208
209 Assert.That(pclo1.Owner, Is.EqualTo(5)); 209 Assert.That(pclo1.Owner, Is.EqualTo(5));
210 Assert.That(pclo1.Group, Is.EqualTo(0)); 210 Assert.That(pclo1.Group, Is.EqualTo(0));
211 Assert.That(pclo1.Others, Is.EqualTo(0)); 211 Assert.That(pclo1.Others, Is.EqualTo(0));
@@ -213,8 +213,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
213 Assert.That(pclo1.Selected, Is.EqualTo(0)); 213 Assert.That(pclo1.Selected, Is.EqualTo(0));
214 Assert.That(pclo1.Users[m_userId], Is.EqualTo(5)); 214 Assert.That(pclo1.Users[m_userId], Is.EqualTo(5));
215 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0)); 215 Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
216 Assert.That(pclo1.Simulator, Is.EqualTo(5)); 216 Assert.That(pclo1.Simulator, Is.EqualTo(5));
217 217
218 Assert.That(pclo2.Owner, Is.EqualTo(0)); 218 Assert.That(pclo2.Owner, Is.EqualTo(0));
219 Assert.That(pclo2.Group, Is.EqualTo(0)); 219 Assert.That(pclo2.Group, Is.EqualTo(0));
220 Assert.That(pclo2.Others, Is.EqualTo(0)); 220 Assert.That(pclo2.Others, Is.EqualTo(0));
@@ -222,9 +222,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
222 Assert.That(pclo2.Selected, Is.EqualTo(0)); 222 Assert.That(pclo2.Selected, Is.EqualTo(0));
223 Assert.That(pclo2.Users[m_userId], Is.EqualTo(0)); 223 Assert.That(pclo2.Users[m_userId], Is.EqualTo(0));
224 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0)); 224 Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
225 Assert.That(pclo2.Simulator, Is.EqualTo(5)); 225 Assert.That(pclo2.Simulator, Is.EqualTo(5));
226 } 226 }
227 227
228 /// <summary> 228 /// <summary>
229 /// Test count after a parcel owner owned object is removed. 229 /// Test count after a parcel owner owned object is removed.
230 /// </summary> 230 /// </summary>
@@ -233,14 +233,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
233 { 233 {
234 TestHelpers.InMethod(); 234 TestHelpers.InMethod();
235// log4net.Config.XmlConfigurator.Configure(); 235// log4net.Config.XmlConfigurator.Configure();
236 236
237 IPrimCounts pc = m_lo.PrimCounts; 237 IPrimCounts pc = m_lo.PrimCounts;
238 238
239 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false); 239 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false);
240 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); 240 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
241 m_scene.AddNewSceneObject(sogToDelete, false); 241 m_scene.AddNewSceneObject(sogToDelete, false);
242 m_scene.DeleteSceneObject(sogToDelete, false); 242 m_scene.DeleteSceneObject(sogToDelete, false);
243 243
244 Assert.That(pc.Owner, Is.EqualTo(1)); 244 Assert.That(pc.Owner, Is.EqualTo(1));
245 Assert.That(pc.Group, Is.EqualTo(0)); 245 Assert.That(pc.Group, Is.EqualTo(0));
246 Assert.That(pc.Others, Is.EqualTo(0)); 246 Assert.That(pc.Others, Is.EqualTo(0));
@@ -248,37 +248,37 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
248 Assert.That(pc.Selected, Is.EqualTo(0)); 248 Assert.That(pc.Selected, Is.EqualTo(0));
249 Assert.That(pc.Users[m_userId], Is.EqualTo(1)); 249 Assert.That(pc.Users[m_userId], Is.EqualTo(1));
250 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 250 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
251 Assert.That(pc.Simulator, Is.EqualTo(1)); 251 Assert.That(pc.Simulator, Is.EqualTo(1));
252 } 252 }
253 253
254 [Test] 254 [Test]
255 public void TestAddGroupObject() 255 public void TestAddGroupObject()
256 { 256 {
257 TestHelpers.InMethod(); 257 TestHelpers.InMethod();
258// log4net.Config.XmlConfigurator.Configure(); 258// log4net.Config.XmlConfigurator.Configure();
259 259
260 m_lo.DeedToGroup(m_groupId); 260 m_lo.DeedToGroup(m_groupId);
261 261
262 IPrimCounts pc = m_lo.PrimCounts; 262 IPrimCounts pc = m_lo.PrimCounts;
263 263
264 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); 264 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
265 sog.GroupID = m_groupId; 265 sog.GroupID = m_groupId;
266 m_scene.AddNewSceneObject(sog, false); 266 m_scene.AddNewSceneObject(sog, false);
267 267
268 Assert.That(pc.Owner, Is.EqualTo(0)); 268 Assert.That(pc.Owner, Is.EqualTo(0));
269 Assert.That(pc.Group, Is.EqualTo(3)); 269 Assert.That(pc.Group, Is.EqualTo(3));
270 Assert.That(pc.Others, Is.EqualTo(0)); 270 Assert.That(pc.Others, Is.EqualTo(0));
271 Assert.That(pc.Total, Is.EqualTo(3)); 271 Assert.That(pc.Total, Is.EqualTo(3));
272 Assert.That(pc.Selected, Is.EqualTo(0)); 272 Assert.That(pc.Selected, Is.EqualTo(0));
273 273
274 // Is this desired behaviour? Not totally sure. 274 // Is this desired behaviour? Not totally sure.
275 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 275 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
276 Assert.That(pc.Users[m_groupId], Is.EqualTo(0)); 276 Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
277 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3)); 277 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
278 278
279 Assert.That(pc.Simulator, Is.EqualTo(3)); 279 Assert.That(pc.Simulator, Is.EqualTo(3));
280 } 280 }
281 281
282 /// <summary> 282 /// <summary>
283 /// Test count after a parcel owner owned object is removed. 283 /// Test count after a parcel owner owned object is removed.
284 /// </summary> 284 /// </summary>
@@ -287,19 +287,19 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
287 { 287 {
288 TestHelpers.InMethod(); 288 TestHelpers.InMethod();
289// log4net.Config.XmlConfigurator.Configure(); 289// log4net.Config.XmlConfigurator.Configure();
290 290
291 m_lo.DeedToGroup(m_groupId); 291 m_lo.DeedToGroup(m_groupId);
292 292
293 IPrimCounts pc = m_lo.PrimCounts; 293 IPrimCounts pc = m_lo.PrimCounts;
294 294
295 SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1); 295 SceneObjectGroup sogToKeep = SceneHelpers.CreateSceneObject(1, m_userId, "a", 0x1);
296 sogToKeep.GroupID = m_groupId; 296 sogToKeep.GroupID = m_groupId;
297 m_scene.AddNewSceneObject(sogToKeep, false); 297 m_scene.AddNewSceneObject(sogToKeep, false);
298 298
299 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10); 299 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
300 m_scene.AddNewSceneObject(sogToDelete, false); 300 m_scene.AddNewSceneObject(sogToDelete, false);
301 m_scene.DeleteSceneObject(sogToDelete, false); 301 m_scene.DeleteSceneObject(sogToDelete, false);
302 302
303 Assert.That(pc.Owner, Is.EqualTo(0)); 303 Assert.That(pc.Owner, Is.EqualTo(0));
304 Assert.That(pc.Group, Is.EqualTo(1)); 304 Assert.That(pc.Group, Is.EqualTo(1));
305 Assert.That(pc.Others, Is.EqualTo(0)); 305 Assert.That(pc.Others, Is.EqualTo(0));
@@ -308,20 +308,20 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
308 Assert.That(pc.Users[m_userId], Is.EqualTo(1)); 308 Assert.That(pc.Users[m_userId], Is.EqualTo(1));
309 Assert.That(pc.Users[m_groupId], Is.EqualTo(0)); 309 Assert.That(pc.Users[m_groupId], Is.EqualTo(0));
310 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 310 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
311 Assert.That(pc.Simulator, Is.EqualTo(1)); 311 Assert.That(pc.Simulator, Is.EqualTo(1));
312 } 312 }
313 313
314 [Test] 314 [Test]
315 public void TestAddOthersObject() 315 public void TestAddOthersObject()
316 { 316 {
317 TestHelpers.InMethod(); 317 TestHelpers.InMethod();
318// log4net.Config.XmlConfigurator.Configure(); 318// log4net.Config.XmlConfigurator.Configure();
319 319
320 IPrimCounts pc = m_lo.PrimCounts; 320 IPrimCounts pc = m_lo.PrimCounts;
321 321
322 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01); 322 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
323 m_scene.AddNewSceneObject(sog, false); 323 m_scene.AddNewSceneObject(sog, false);
324 324
325 Assert.That(pc.Owner, Is.EqualTo(0)); 325 Assert.That(pc.Owner, Is.EqualTo(0));
326 Assert.That(pc.Group, Is.EqualTo(0)); 326 Assert.That(pc.Group, Is.EqualTo(0));
327 Assert.That(pc.Others, Is.EqualTo(3)); 327 Assert.That(pc.Others, Is.EqualTo(3));
@@ -329,22 +329,22 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
329 Assert.That(pc.Selected, Is.EqualTo(0)); 329 Assert.That(pc.Selected, Is.EqualTo(0));
330 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 330 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
331 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3)); 331 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(3));
332 Assert.That(pc.Simulator, Is.EqualTo(3)); 332 Assert.That(pc.Simulator, Is.EqualTo(3));
333 } 333 }
334 334
335 [Test] 335 [Test]
336 public void TestRemoveOthersObject() 336 public void TestRemoveOthersObject()
337 { 337 {
338 TestHelpers.InMethod(); 338 TestHelpers.InMethod();
339// log4net.Config.XmlConfigurator.Configure(); 339// log4net.Config.XmlConfigurator.Configure();
340 340
341 IPrimCounts pc = m_lo.PrimCounts; 341 IPrimCounts pc = m_lo.PrimCounts;
342 342
343 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false); 343 m_scene.AddNewSceneObject(SceneHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false);
344 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10); 344 SceneObjectGroup sogToDelete = SceneHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10);
345 m_scene.AddNewSceneObject(sogToDelete, false); 345 m_scene.AddNewSceneObject(sogToDelete, false);
346 m_scene.DeleteSceneObject(sogToDelete, false); 346 m_scene.DeleteSceneObject(sogToDelete, false);
347 347
348 Assert.That(pc.Owner, Is.EqualTo(0)); 348 Assert.That(pc.Owner, Is.EqualTo(0));
349 Assert.That(pc.Group, Is.EqualTo(0)); 349 Assert.That(pc.Group, Is.EqualTo(0));
350 Assert.That(pc.Others, Is.EqualTo(1)); 350 Assert.That(pc.Others, Is.EqualTo(1));
@@ -352,9 +352,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
352 Assert.That(pc.Selected, Is.EqualTo(0)); 352 Assert.That(pc.Selected, Is.EqualTo(0));
353 Assert.That(pc.Users[m_userId], Is.EqualTo(0)); 353 Assert.That(pc.Users[m_userId], Is.EqualTo(0));
354 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(1)); 354 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(1));
355 Assert.That(pc.Simulator, Is.EqualTo(1)); 355 Assert.That(pc.Simulator, Is.EqualTo(1));
356 } 356 }
357 357
358 /// <summary> 358 /// <summary>
359 /// Test the count is correct after is has been tainted. 359 /// Test the count is correct after is has been tainted.
360 /// </summary> 360 /// </summary>
@@ -363,12 +363,12 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
363 { 363 {
364 TestHelpers.InMethod(); 364 TestHelpers.InMethod();
365 IPrimCounts pc = m_lo.PrimCounts; 365 IPrimCounts pc = m_lo.PrimCounts;
366 366
367 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01); 367 SceneObjectGroup sog = SceneHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
368 m_scene.AddNewSceneObject(sog, false); 368 m_scene.AddNewSceneObject(sog, false);
369 369
370 m_pcm.TaintPrimCount(); 370 m_pcm.TaintPrimCount();
371 371
372 Assert.That(pc.Owner, Is.EqualTo(3)); 372 Assert.That(pc.Owner, Is.EqualTo(3));
373 Assert.That(pc.Group, Is.EqualTo(0)); 373 Assert.That(pc.Group, Is.EqualTo(0));
374 Assert.That(pc.Others, Is.EqualTo(0)); 374 Assert.That(pc.Others, Is.EqualTo(0));
@@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
376 Assert.That(pc.Selected, Is.EqualTo(0)); 376 Assert.That(pc.Selected, Is.EqualTo(0));
377 Assert.That(pc.Users[m_userId], Is.EqualTo(3)); 377 Assert.That(pc.Users[m_userId], Is.EqualTo(3));
378 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0)); 378 Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
379 Assert.That(pc.Simulator, Is.EqualTo(3)); 379 Assert.That(pc.Simulator, Is.EqualTo(3));
380 } 380 }
381 } 381 }
382} \ No newline at end of file 382} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 1f2b7c4..b927cfa 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -82,11 +82,11 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
82 82
83 string[] configSections = new string[] { "Map", "Startup" }; 83 string[] configSections = new string[] { "Map", "Startup" };
84 84
85 drawPrimVolume 85 drawPrimVolume
86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume); 86 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, drawPrimVolume);
87 textureTerrain 87 textureTerrain
88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain); 88 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, textureTerrain);
89 generateMaptiles 89 generateMaptiles
90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles); 90 = Util.GetConfigVarFromSections<bool>(m_config, "GenerateMaptiles", configSections, generateMaptiles);
91 91
92 if (generateMaptiles) 92 if (generateMaptiles)
@@ -126,15 +126,15 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
126 catch (Exception) 126 catch (Exception)
127 { 127 {
128 m_log.ErrorFormat( 128 m_log.ErrorFormat(
129 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", 129 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}",
130 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 130 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
131 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); 131 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
132 mapbmp = null; 132 mapbmp = null;
133 } 133 }
134 134
135 if (mapbmp != null) 135 if (mapbmp != null)
136 m_log.DebugFormat( 136 m_log.DebugFormat(
137 "[MAPTILE]: Static map image texture file {0} found for {1}", 137 "[MAPTILE]: Static map image texture file {0} found for {1}",
138 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name); 138 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
139 } 139 }
140 } 140 }
@@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
308 List<uint> z_localIDs = new List<uint>(); 308 List<uint> z_localIDs = new List<uint>();
309 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); 309 Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>();
310 310
311 try 311 try
312 { 312 {
313 lock (objs) 313 lock (objs)
314 { 314 {
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
index 0ec2053..4b3ee18 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/TexturedMapTileRenderer.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
180 180
181 ManagedImage managedImage; 181 ManagedImage managedImage;
182 Image image; 182 Image image;
183 183
184 try 184 try
185 { 185 {
186 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image)) 186 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
201 m_log.ErrorFormat("{0} OpenJpeg was unable to encode this. Asset Data is empty for {1}", LogHeader, id); 201 m_log.ErrorFormat("{0} OpenJpeg was unable to encode this. Asset Data is empty for {1}", LogHeader, id);
202 } 202 }
203 return null; 203 return null;
204 204
205 } 205 }
206 206
207 // Compute the average color of a texture. 207 // Compute the average color of a texture.
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 46b0470..1070ae6 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
56 public class MoapModule : INonSharedRegionModule, IMoapModule 56 public class MoapModule : INonSharedRegionModule, IMoapModule
57 { 57 {
58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 58 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
59 59
60 public string Name { get { return "MoapModule"; } } 60 public string Name { get { return "MoapModule"; } }
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
@@ -64,33 +64,33 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
64 /// Is this module enabled? 64 /// Is this module enabled?
65 /// </summary> 65 /// </summary>
66 protected bool m_isEnabled = true; 66 protected bool m_isEnabled = true;
67 67
68 /// <summary> 68 /// <summary>
69 /// The scene to which this module is attached 69 /// The scene to which this module is attached
70 /// </summary> 70 /// </summary>
71 protected Scene m_scene; 71 protected Scene m_scene;
72 72
73 /// <summary> 73 /// <summary>
74 /// Track the ObjectMedia capabilities given to users keyed by path 74 /// Track the ObjectMedia capabilities given to users keyed by path
75 /// </summary> 75 /// </summary>
76 protected Dictionary<string, UUID> m_omCapUsers = new Dictionary<string, UUID>(); 76 protected Dictionary<string, UUID> m_omCapUsers = new Dictionary<string, UUID>();
77 77
78 /// <summary> 78 /// <summary>
79 /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. 79 /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate.
80 /// </summary> 80 /// </summary>
81 protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); 81 protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
82 82
83 /// <summary> 83 /// <summary>
84 /// Track the ObjectMediaUpdate capabilities given to users keyed by path 84 /// Track the ObjectMediaUpdate capabilities given to users keyed by path
85 /// </summary> 85 /// </summary>
86 protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); 86 protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>();
87 87
88 /// <summary> 88 /// <summary>
89 /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate 89 /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate
90 /// </summary> 90 /// </summary>
91 protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); 91 protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
92 92
93 public void Initialise(IConfigSource configSource) 93 public void Initialise(IConfigSource configSource)
94 { 94 {
95 IConfig config = configSource.Configs["MediaOnAPrim"]; 95 IConfig config = configSource.Configs["MediaOnAPrim"];
96 96
@@ -100,63 +100,63 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
100// m_log.Debug("[MOAP]: Initialised module.")l 100// m_log.Debug("[MOAP]: Initialised module.")l
101 } 101 }
102 102
103 public void AddRegion(Scene scene) 103 public void AddRegion(Scene scene)
104 { 104 {
105 if (!m_isEnabled) 105 if (!m_isEnabled)
106 return; 106 return;
107 107
108 m_scene = scene; 108 m_scene = scene;
109 m_scene.RegisterModuleInterface<IMoapModule>(this); 109 m_scene.RegisterModuleInterface<IMoapModule>(this);
110 } 110 }
111 111
112 public void RemoveRegion(Scene scene) {} 112 public void RemoveRegion(Scene scene) {}
113 113
114 public void RegionLoaded(Scene scene) 114 public void RegionLoaded(Scene scene)
115 { 115 {
116 if (!m_isEnabled) 116 if (!m_isEnabled)
117 return; 117 return;
118 118
119 m_scene.EventManager.OnRegisterCaps += OnRegisterCaps; 119 m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
120 m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps; 120 m_scene.EventManager.OnDeregisterCaps += OnDeregisterCaps;
121 m_scene.EventManager.OnSceneObjectPartCopy += OnSceneObjectPartCopy; 121 m_scene.EventManager.OnSceneObjectPartCopy += OnSceneObjectPartCopy;
122 } 122 }
123 123
124 public void Close() 124 public void Close()
125 { 125 {
126 if (!m_isEnabled) 126 if (!m_isEnabled)
127 return; 127 return;
128 128
129 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; 129 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
130 m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; 130 m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps;
131 m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; 131 m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy;
132 } 132 }
133 133
134 public void OnRegisterCaps(UUID agentID, Caps caps) 134 public void OnRegisterCaps(UUID agentID, Caps caps)
135 { 135 {
136// m_log.DebugFormat( 136// m_log.DebugFormat(
137// "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID); 137// "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID);
138 138
139 string omCapUrl = "/CAPS/" + UUID.Random(); 139 string omCapUrl = "/CAPS/" + UUID.Random();
140 140
141 lock (m_omCapUsers) 141 lock (m_omCapUsers)
142 { 142 {
143 m_omCapUsers[omCapUrl] = agentID; 143 m_omCapUsers[omCapUrl] = agentID;
144 m_omCapUrls[agentID] = omCapUrl; 144 m_omCapUrls[agentID] = omCapUrl;
145 145
146 // Even though we're registering for POST we're going to get GETS and UPDATES too 146 // Even though we're registering for POST we're going to get GETS and UPDATES too
147 caps.RegisterHandler( 147 caps.RegisterHandler(
148 "ObjectMedia", 148 "ObjectMedia",
149 new RestStreamHandler( 149 new RestStreamHandler(
150 "POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString())); 150 "POST", omCapUrl, HandleObjectMediaMessage, "ObjectMedia", agentID.ToString()));
151 } 151 }
152 152
153 string omuCapUrl = "/CAPS/" + UUID.Random(); 153 string omuCapUrl = "/CAPS/" + UUID.Random();
154 154
155 lock (m_omuCapUsers) 155 lock (m_omuCapUsers)
156 { 156 {
157 m_omuCapUsers[omuCapUrl] = agentID; 157 m_omuCapUsers[omuCapUrl] = agentID;
158 m_omuCapUrls[agentID] = omuCapUrl; 158 m_omuCapUrls[agentID] = omuCapUrl;
159 159
160 // Even though we're registering for POST we're going to get GETS and UPDATES too 160 // Even though we're registering for POST we're going to get GETS and UPDATES too
161 caps.RegisterHandler( 161 caps.RegisterHandler(
162 "ObjectMediaNavigate", 162 "ObjectMediaNavigate",
@@ -164,7 +164,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
164 "POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString())); 164 "POST", omuCapUrl, HandleObjectMediaNavigateMessage, "ObjectMediaNavigate", agentID.ToString()));
165 } 165 }
166 } 166 }
167 167
168 public void OnDeregisterCaps(UUID agentID, Caps caps) 168 public void OnDeregisterCaps(UUID agentID, Caps caps)
169 { 169 {
170 lock (m_omCapUsers) 170 lock (m_omCapUsers)
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
173 m_omCapUrls.Remove(agentID); 173 m_omCapUrls.Remove(agentID);
174 m_omCapUsers.Remove(path); 174 m_omCapUsers.Remove(path);
175 } 175 }
176 176
177 lock (m_omuCapUsers) 177 lock (m_omuCapUsers)
178 { 178 {
179 string path = m_omuCapUrls[agentID]; 179 string path = m_omuCapUrls[agentID];
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
181 m_omuCapUsers.Remove(path); 181 m_omuCapUsers.Remove(path);
182 } 182 }
183 } 183 }
184 184
185 protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) 185 protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
186 { 186 {
187 if (original.Shape.Media != null) 187 if (original.Shape.Media != null)
@@ -197,19 +197,19 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
197 dupeMedia.Add(null); 197 dupeMedia.Add(null);
198 } 198 }
199 } 199 }
200 200
201 copy.Shape.Media = dupeMedia; 201 copy.Shape.Media = dupeMedia;
202 } 202 }
203 } 203 }
204 204
205 public MediaEntry GetMediaEntry(SceneObjectPart part, int face) 205 public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
206 { 206 {
207 MediaEntry me = null; 207 MediaEntry me = null;
208 208
209 CheckFaceParam(part, face); 209 CheckFaceParam(part, face);
210 210
211 List<MediaEntry> media = part.Shape.Media; 211 List<MediaEntry> media = part.Shape.Media;
212 212
213 if (null == media) 213 if (null == media)
214 { 214 {
215 me = null; 215 me = null;
@@ -218,17 +218,17 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
218 { 218 {
219 lock (media) 219 lock (media)
220 me = media[face]; 220 me = media[face];
221 221
222 // TODO: Really need a proper copy constructor down in libopenmetaverse 222 // TODO: Really need a proper copy constructor down in libopenmetaverse
223 if (me != null) 223 if (me != null)
224 me = MediaEntry.FromOSD(me.GetOSD()); 224 me = MediaEntry.FromOSD(me.GetOSD());
225 } 225 }
226 226
227// m_log.DebugFormat("[MOAP]: GetMediaEntry for {0} face {1} found {2}", part.Name, face, me); 227// m_log.DebugFormat("[MOAP]: GetMediaEntry for {0} face {1} found {2}", part.Name, face, me);
228 228
229 return me; 229 return me;
230 } 230 }
231 231
232 /// <summary> 232 /// <summary>
233 /// Set the media entry on the face of the given part. 233 /// Set the media entry on the face of the given part.
234 /// </summary> 234 /// </summary>
@@ -238,28 +238,28 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
238 public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) 238 public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
239 { 239 {
240// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face); 240// m_log.DebugFormat("[MOAP]: SetMediaEntry for {0}, face {1}", part.Name, face);
241 241
242 CheckFaceParam(part, face); 242 CheckFaceParam(part, face);
243 243
244 if (null == part.Shape.Media) 244 if (null == part.Shape.Media)
245 { 245 {
246 if (me == null) 246 if (me == null)
247 return; 247 return;
248 else 248 else
249 part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); 249 part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
250 } 250 }
251 251
252 lock (part.Shape.Media) 252 lock (part.Shape.Media)
253 part.Shape.Media[face] = me; 253 part.Shape.Media[face] = me;
254 254
255 UpdateMediaUrl(part, UUID.Zero); 255 UpdateMediaUrl(part, UUID.Zero);
256 256
257 SetPartMediaFlags(part, face, me != null); 257 SetPartMediaFlags(part, face, me != null);
258 258
259 part.ScheduleFullUpdate(); 259 part.ScheduleFullUpdate();
260 part.TriggerScriptChangedEvent(Changed.MEDIA); 260 part.TriggerScriptChangedEvent(Changed.MEDIA);
261 } 261 }
262 262
263 /// <summary> 263 /// <summary>
264 /// Clear the media entry from the face of the given part. 264 /// Clear the media entry from the face of the given part.
265 /// </summary> 265 /// </summary>
@@ -267,9 +267,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
267 /// <param name="face"></param> 267 /// <param name="face"></param>
268 public void ClearMediaEntry(SceneObjectPart part, int face) 268 public void ClearMediaEntry(SceneObjectPart part, int face)
269 { 269 {
270 SetMediaEntry(part, face, null); 270 SetMediaEntry(part, face, null);
271 } 271 }
272 272
273 /// <summary> 273 /// <summary>
274 /// Set the media flags on the texture face of the given part. 274 /// Set the media flags on the texture face of the given part.
275 /// </summary> 275 /// </summary>
@@ -284,9 +284,9 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
284 Primitive.TextureEntry te = part.Shape.Textures; 284 Primitive.TextureEntry te = part.Shape.Textures;
285 Primitive.TextureEntryFace teFace = te.CreateFace((uint)face); 285 Primitive.TextureEntryFace teFace = te.CreateFace((uint)face);
286 teFace.MediaFlags = flag; 286 teFace.MediaFlags = flag;
287 part.Shape.Textures = te; 287 part.Shape.Textures = te;
288 } 288 }
289 289
290 /// <summary> 290 /// <summary>
291 /// Sets or gets per face media textures. 291 /// Sets or gets per face media textures.
292 /// </summary> 292 /// </summary>
@@ -300,11 +300,11 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
300 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 300 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
301 { 301 {
302// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); 302// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
303 303
304 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); 304 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
305 ObjectMediaMessage omm = new ObjectMediaMessage(); 305 ObjectMediaMessage omm = new ObjectMediaMessage();
306 omm.Deserialize(osd); 306 omm.Deserialize(osd);
307 307
308 if (omm.Request is ObjectMediaRequest) 308 if (omm.Request is ObjectMediaRequest)
309 return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); 309 return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest);
310 else if (omm.Request is ObjectMediaUpdate) 310 else if (omm.Request is ObjectMediaUpdate)
@@ -312,10 +312,10 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
312 312
313 throw new Exception( 313 throw new Exception(
314 string.Format( 314 string.Format(
315 "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", 315 "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}",
316 omm.Request.GetType())); 316 omm.Request.GetType()));
317 } 317 }
318 318
319 /// <summary> 319 /// <summary>
320 /// Handle a fetch request for media textures 320 /// Handle a fetch request for media textures
321 /// </summary> 321 /// </summary>
@@ -324,36 +324,36 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
324 protected string HandleObjectMediaRequest(ObjectMediaRequest omr) 324 protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
325 { 325 {
326 UUID primId = omr.PrimID; 326 UUID primId = omr.PrimID;
327 327
328 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 328 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
329 329
330 if (null == part) 330 if (null == part)
331 { 331 {
332 m_log.WarnFormat( 332 m_log.WarnFormat(
333 "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", 333 "[MOAP]: Received a GET ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
334 primId, m_scene.RegionInfo.RegionName); 334 primId, m_scene.RegionInfo.RegionName);
335 return string.Empty; 335 return string.Empty;
336 } 336 }
337 337
338 if (null == part.Shape.Media) 338 if (null == part.Shape.Media)
339 return string.Empty; 339 return string.Empty;
340 340
341 ObjectMediaResponse resp = new ObjectMediaResponse(); 341 ObjectMediaResponse resp = new ObjectMediaResponse();
342 342
343 resp.PrimID = primId; 343 resp.PrimID = primId;
344 344
345 lock (part.Shape.Media) 345 lock (part.Shape.Media)
346 resp.FaceMedia = part.Shape.Media.ToArray(); 346 resp.FaceMedia = part.Shape.Media.ToArray();
347 347
348 resp.Version = part.MediaUrl; 348 resp.Version = part.MediaUrl;
349 349
350 string rawResp = OSDParser.SerializeLLSDXmlString(resp.Serialize()); 350 string rawResp = OSDParser.SerializeLLSDXmlString(resp.Serialize());
351 351
352// m_log.DebugFormat("[MOAP]: Got HandleObjectMediaRequestGet raw response is [{0}]", rawResp); 352// m_log.DebugFormat("[MOAP]: Got HandleObjectMediaRequestGet raw response is [{0}]", rawResp);
353 353
354 return rawResp; 354 return rawResp;
355 } 355 }
356 356
357 /// <summary> 357 /// <summary>
358 /// Handle an update of media textures. 358 /// Handle an update of media textures.
359 /// </summary> 359 /// </summary>
@@ -363,46 +363,46 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
363 protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) 363 protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
364 { 364 {
365 UUID primId = omu.PrimID; 365 UUID primId = omu.PrimID;
366 366
367 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 367 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
368 368
369 if (null == part) 369 if (null == part)
370 { 370 {
371 m_log.WarnFormat( 371 m_log.WarnFormat(
372 "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", 372 "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
373 primId, m_scene.RegionInfo.RegionName); 373 primId, m_scene.RegionInfo.RegionName);
374 return string.Empty; 374 return string.Empty;
375 } 375 }
376 376
377// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); 377// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
378// 378//
379// for (int i = 0; i < omu.FaceMedia.Length; i++) 379// for (int i = 0; i < omu.FaceMedia.Length; i++)
380// { 380// {
381// MediaEntry me = omu.FaceMedia[i]; 381// MediaEntry me = omu.FaceMedia[i];
382// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD())); 382// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD()));
383// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); 383// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v);
384// } 384// }
385 385
386 if (omu.FaceMedia.Length > part.GetNumberOfSides()) 386 if (omu.FaceMedia.Length > part.GetNumberOfSides())
387 { 387 {
388 m_log.WarnFormat( 388 m_log.WarnFormat(
389 "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.", 389 "[MOAP]: Received {0} media entries from client for prim {1} {2} but this prim has only {3} faces. Dropping request.",
390 omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides()); 390 omu.FaceMedia.Length, part.Name, part.UUID, part.GetNumberOfSides());
391 return string.Empty; 391 return string.Empty;
392 } 392 }
393 393
394 UUID agentId = default(UUID); 394 UUID agentId = default(UUID);
395 395
396 lock (m_omCapUsers) 396 lock (m_omCapUsers)
397 agentId = m_omCapUsers[path]; 397 agentId = m_omCapUsers[path];
398 398
399 List<MediaEntry> media = part.Shape.Media; 399 List<MediaEntry> media = part.Shape.Media;
400 400
401 if (null == media) 401 if (null == media)
402 { 402 {
403// m_log.DebugFormat("[MOAP]: Setting all new media list for {0}", part.Name); 403// m_log.DebugFormat("[MOAP]: Setting all new media list for {0}", part.Name);
404 part.Shape.Media = new PrimitiveBaseShape.MediaList(omu.FaceMedia); 404 part.Shape.Media = new PrimitiveBaseShape.MediaList(omu.FaceMedia);
405 405
406 for (int i = 0; i < omu.FaceMedia.Length; i++) 406 for (int i = 0; i < omu.FaceMedia.Length; i++)
407 { 407 {
408 if (omu.FaceMedia[i] != null) 408 if (omu.FaceMedia[i] != null)
@@ -412,7 +412,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
412 // directly. 412 // directly.
413 SetPartMediaFlags(part, i, true); 413 SetPartMediaFlags(part, i, true);
414// m_log.DebugFormat( 414// m_log.DebugFormat(
415// "[MOAP]: Media flags for face {0} is {1}", 415// "[MOAP]: Media flags for face {0} is {1}",
416// i, part.Shape.Textures.FaceTextures[i].MediaFlags); 416// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
417 } 417 }
418 } 418 }
@@ -420,15 +420,15 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
420 else 420 else
421 { 421 {
422// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name); 422// m_log.DebugFormat("[MOAP]: Setting existing media list for {0}", part.Name);
423 423
424 // We need to go through the media textures one at a time to make sure that we have permission 424 // We need to go through the media textures one at a time to make sure that we have permission
425 // to change them 425 // to change them
426 426
427 // FIXME: Race condition here since some other texture entry manipulator may overwrite/get 427 // FIXME: Race condition here since some other texture entry manipulator may overwrite/get
428 // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry 428 // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry
429 // directly. 429 // directly.
430 Primitive.TextureEntry te = part.Shape.Textures; 430 Primitive.TextureEntry te = part.Shape.Textures;
431 431
432 lock (media) 432 lock (media)
433 { 433 {
434 for (int i = 0; i < media.Count; i++) 434 for (int i = 0; i < media.Count; i++)
@@ -436,38 +436,38 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
436 if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) 436 if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i))
437 { 437 {
438 media[i] = omu.FaceMedia[i]; 438 media[i] = omu.FaceMedia[i];
439 439
440 // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal 440 // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal
441 // texture update, so we don't need to worry about clearing MediaFlags here. 441 // texture update, so we don't need to worry about clearing MediaFlags here.
442 if (null == media[i]) 442 if (null == media[i])
443 continue; 443 continue;
444 444
445 SetPartMediaFlags(part, i, true); 445 SetPartMediaFlags(part, i, true);
446 446
447 // m_log.DebugFormat( 447 // m_log.DebugFormat(
448 // "[MOAP]: Media flags for face {0} is {1}", 448 // "[MOAP]: Media flags for face {0} is {1}",
449 // i, face.MediaFlags); 449 // i, face.MediaFlags);
450 // m_log.DebugFormat("[MOAP]: Set media entry for face {0} on {1}", i, part.Name); 450 // m_log.DebugFormat("[MOAP]: Set media entry for face {0} on {1}", i, part.Name);
451 } 451 }
452 } 452 }
453 } 453 }
454 454
455 part.Shape.Textures = te; 455 part.Shape.Textures = te;
456 456
457// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) 457// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++)
458// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); 458// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]);
459 } 459 }
460 460
461 UpdateMediaUrl(part, agentId); 461 UpdateMediaUrl(part, agentId);
462 462
463 // Arguably, we could avoid sending a full update to the avatar that just changed the texture. 463 // Arguably, we could avoid sending a full update to the avatar that just changed the texture.
464 part.ScheduleFullUpdate(); 464 part.ScheduleFullUpdate();
465 465
466 part.TriggerScriptChangedEvent(Changed.MEDIA); 466 part.TriggerScriptChangedEvent(Changed.MEDIA);
467 467
468 return string.Empty; 468 return string.Empty;
469 } 469 }
470 470
471 /// <summary> 471 /// <summary>
472 /// Received from the viewer if a user has changed the url of a media texture. 472 /// Received from the viewer if a user has changed the url of a media texture.
473 /// </summary> 473 /// </summary>
@@ -481,71 +481,71 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
481 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 481 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
482 { 482 {
483// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); 483// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
484 484
485 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); 485 OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
486 ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); 486 ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage();
487 omn.Deserialize(osd); 487 omn.Deserialize(osd);
488 488
489 UUID primId = omn.PrimID; 489 UUID primId = omn.PrimID;
490 490
491 SceneObjectPart part = m_scene.GetSceneObjectPart(primId); 491 SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
492 492
493 if (null == part) 493 if (null == part)
494 { 494 {
495 m_log.WarnFormat( 495 m_log.WarnFormat(
496 "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", 496 "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}",
497 primId, m_scene.RegionInfo.RegionName); 497 primId, m_scene.RegionInfo.RegionName);
498 return string.Empty; 498 return string.Empty;
499 } 499 }
500 500
501 UUID agentId = default(UUID); 501 UUID agentId = default(UUID);
502 502
503 lock (m_omuCapUsers) 503 lock (m_omuCapUsers)
504 agentId = m_omuCapUsers[path]; 504 agentId = m_omuCapUsers[path];
505 505
506 if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) 506 if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face))
507 return string.Empty; 507 return string.Empty;
508 508
509// m_log.DebugFormat( 509// m_log.DebugFormat(
510// "[MOAP]: Received request to update media entry for face {0} on prim {1} {2} to {3}", 510// "[MOAP]: Received request to update media entry for face {0} on prim {1} {2} to {3}",
511// omn.Face, part.Name, part.UUID, omn.URL); 511// omn.Face, part.Name, part.UUID, omn.URL);
512 512
513 // If media has never been set for this prim, then just return. 513 // If media has never been set for this prim, then just return.
514 if (null == part.Shape.Media) 514 if (null == part.Shape.Media)
515 return string.Empty; 515 return string.Empty;
516 516
517 MediaEntry me = null; 517 MediaEntry me = null;
518 518
519 lock (part.Shape.Media) 519 lock (part.Shape.Media)
520 me = part.Shape.Media[omn.Face]; 520 me = part.Shape.Media[omn.Face];
521 521
522 // Do the same if media has not been set up for a specific face 522 // Do the same if media has not been set up for a specific face
523 if (null == me) 523 if (null == me)
524 return string.Empty; 524 return string.Empty;
525 525
526 if (me.EnableWhiteList) 526 if (me.EnableWhiteList)
527 { 527 {
528 if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) 528 if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList))
529 { 529 {
530// m_log.DebugFormat( 530// m_log.DebugFormat(
531// "[MOAP]: Blocking change of face {0} on prim {1} {2} to {3} since it's not on the enabled whitelist", 531// "[MOAP]: Blocking change of face {0} on prim {1} {2} to {3} since it's not on the enabled whitelist",
532// omn.Face, part.Name, part.UUID, omn.URL); 532// omn.Face, part.Name, part.UUID, omn.URL);
533 533
534 return string.Empty; 534 return string.Empty;
535 } 535 }
536 } 536 }
537 537
538 me.CurrentURL = omn.URL; 538 me.CurrentURL = omn.URL;
539 539
540 UpdateMediaUrl(part, agentId); 540 UpdateMediaUrl(part, agentId);
541 541
542 part.ScheduleFullUpdate(); 542 part.ScheduleFullUpdate();
543 543
544 part.TriggerScriptChangedEvent(Changed.MEDIA); 544 part.TriggerScriptChangedEvent(Changed.MEDIA);
545 545
546 return OSDParser.SerializeLLSDXmlString(new OSD()); 546 return OSDParser.SerializeLLSDXmlString(new OSD());
547 } 547 }
548 548
549 /// <summary> 549 /// <summary>
550 /// Check that the face number is valid for the given prim. 550 /// Check that the face number is valid for the given prim.
551 /// </summary> 551 /// </summary>
@@ -555,13 +555,13 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
555 { 555 {
556 if (face < 0) 556 if (face < 0)
557 throw new ArgumentException("Face cannot be less than zero"); 557 throw new ArgumentException("Face cannot be less than zero");
558 558
559 int maxFaces = part.GetNumberOfSides() - 1; 559 int maxFaces = part.GetNumberOfSides() - 1;
560 if (face > maxFaces) 560 if (face > maxFaces)
561 throw new ArgumentException( 561 throw new ArgumentException(
562 string.Format("Face argument was {0} but max is {1}", face, maxFaces)); 562 string.Format("Face argument was {0} but max is {1}", face, maxFaces));
563 } 563 }
564 564
565 /// <summary> 565 /// <summary>
566 /// Update the media url of the given part 566 /// Update the media url of the given part
567 /// </summary> 567 /// </summary>
@@ -583,10 +583,10 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
583 int version = int.Parse(rawVersion); 583 int version = int.Parse(rawVersion);
584 part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); 584 part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId);
585 } 585 }
586 586
587// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); 587// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID);
588 } 588 }
589 589
590 /// <summary> 590 /// <summary>
591 /// Check the given url against the given whitelist. 591 /// Check the given url against the given whitelist.
592 /// </summary> 592 /// </summary>
@@ -599,22 +599,22 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
599 return false; 599 return false;
600 600
601 Uri url = new Uri(rawUrl); 601 Uri url = new Uri(rawUrl);
602 602
603 foreach (string origWlUrl in whitelist) 603 foreach (string origWlUrl in whitelist)
604 { 604 {
605 string wlUrl = origWlUrl; 605 string wlUrl = origWlUrl;
606 606
607 // Deal with a line-ending wildcard 607 // Deal with a line-ending wildcard
608 if (wlUrl.EndsWith("*")) 608 if (wlUrl.EndsWith("*"))
609 wlUrl = wlUrl.Remove(wlUrl.Length - 1); 609 wlUrl = wlUrl.Remove(wlUrl.Length - 1);
610 610
611// m_log.DebugFormat("[MOAP]: Checking whitelist URL pattern {0}", origWlUrl); 611// m_log.DebugFormat("[MOAP]: Checking whitelist URL pattern {0}", origWlUrl);
612 612
613 // Handle a line starting wildcard slightly differently since this can only match the domain, not the path 613 // Handle a line starting wildcard slightly differently since this can only match the domain, not the path
614 if (wlUrl.StartsWith("*")) 614 if (wlUrl.StartsWith("*"))
615 { 615 {
616 wlUrl = wlUrl.Substring(1); 616 wlUrl = wlUrl.Substring(1);
617 617
618 if (url.Host.Contains(wlUrl)) 618 if (url.Host.Contains(wlUrl))
619 { 619 {
620// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); 620// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
@@ -624,7 +624,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
624 else 624 else
625 { 625 {
626 string urlToMatch = url.Authority + url.AbsolutePath; 626 string urlToMatch = url.Authority + url.AbsolutePath;
627 627
628 if (urlToMatch.StartsWith(wlUrl)) 628 if (urlToMatch.StartsWith(wlUrl))
629 { 629 {
630// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); 630// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
@@ -632,7 +632,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
632 } 632 }
633 } 633 }
634 } 634 }
635 635
636 return false; 636 return false;
637 } 637 }
638 } 638 }
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
index ee57aed..7080705 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/Tests/MoapTests.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
47 { 47 {
48 protected TestScene m_scene; 48 protected TestScene m_scene;
49 protected MoapModule m_module; 49 protected MoapModule m_module;
50 50
51 [SetUp] 51 [SetUp]
52 public override void SetUp() 52 public override void SetUp()
53 { 53 {
@@ -55,45 +55,45 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap.Tests
55 55
56 m_module = new MoapModule(); 56 m_module = new MoapModule();
57 m_scene = new SceneHelpers().SetupScene(); 57 m_scene = new SceneHelpers().SetupScene();
58 SceneHelpers.SetupSceneModules(m_scene, m_module); 58 SceneHelpers.SetupSceneModules(m_scene, m_module);
59 } 59 }
60 60
61 [Test] 61 [Test]
62 public void TestClearMediaUrl() 62 public void TestClearMediaUrl()
63 { 63 {
64 TestHelpers.InMethod(); 64 TestHelpers.InMethod();
65// log4net.Config.XmlConfigurator.Configure(); 65// log4net.Config.XmlConfigurator.Configure();
66 66
67 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; 67 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
68 MediaEntry me = new MediaEntry(); 68 MediaEntry me = new MediaEntry();
69 69
70 m_module.SetMediaEntry(part, 1, me); 70 m_module.SetMediaEntry(part, 1, me);
71 m_module.ClearMediaEntry(part, 1); 71 m_module.ClearMediaEntry(part, 1);
72 72
73 Assert.That(part.Shape.Media[1], Is.EqualTo(null)); 73 Assert.That(part.Shape.Media[1], Is.EqualTo(null));
74 74
75 // Although we've cleared one face, other faces may still be present. So we need to check for an 75 // Although we've cleared one face, other faces may still be present. So we need to check for an
76 // update media url version 76 // update media url version
77 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero)); 77 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000001/" + UUID.Zero));
78 78
79 // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture. 79 // By changing media flag to false, the face texture once again becomes identical to the DefaultTexture.
80 // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot. 80 // Therefore, when libOMV reserializes it, it disappears and we are left with no face texture in this slot.
81 // Not at all confusing, eh? 81 // Not at all confusing, eh?
82 Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null); 82 Assert.That(part.Shape.Textures.FaceTextures[1], Is.Null);
83 } 83 }
84 84
85 [Test] 85 [Test]
86 public void TestSetMediaUrl() 86 public void TestSetMediaUrl()
87 { 87 {
88 TestHelpers.InMethod(); 88 TestHelpers.InMethod();
89 89
90 string homeUrl = "opensimulator.org"; 90 string homeUrl = "opensimulator.org";
91 91
92 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; 92 SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart;
93 MediaEntry me = new MediaEntry() { HomeURL = homeUrl }; 93 MediaEntry me = new MediaEntry() { HomeURL = homeUrl };
94 94
95 m_module.SetMediaEntry(part, 1, me); 95 m_module.SetMediaEntry(part, 1, me);
96 96
97 Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl)); 97 Assert.That(part.Shape.Media[1].HomeURL, Is.EqualTo(homeUrl));
98 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero)); 98 Assert.That(part.MediaUrl, Is.EqualTo("x-mv:0000000000/" + UUID.Zero));
99 Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True); 99 Assert.That(part.Shape.Textures.FaceTextures[1].MediaFlags, Is.True);
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 42141e4..b7f01be 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -49,34 +49,34 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
49 49
50 protected Scene m_scene = null; 50 protected Scene m_scene = null;
51 protected IDialogModule m_dialogModule; 51 protected IDialogModule m_dialogModule;
52 52
53 public string Name { get { return "Object BuySell Module"; } } 53 public string Name { get { return "Object BuySell Module"; } }
54 public Type ReplaceableInterface { get { return null; } } 54 public Type ReplaceableInterface { get { return null; } }
55 55
56 public void Initialise(IConfigSource source) {} 56 public void Initialise(IConfigSource source) {}
57 57
58 public void AddRegion(Scene scene) 58 public void AddRegion(Scene scene)
59 { 59 {
60 m_scene = scene; 60 m_scene = scene;
61 m_scene.RegisterModuleInterface<IBuySellModule>(this); 61 m_scene.RegisterModuleInterface<IBuySellModule>(this);
62 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 62 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
63 } 63 }
64 64
65 public void RemoveRegion(Scene scene) 65 public void RemoveRegion(Scene scene)
66 { 66 {
67 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; 67 m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
68 } 68 }
69 69
70 public void RegionLoaded(Scene scene) 70 public void RegionLoaded(Scene scene)
71 { 71 {
72 m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); 72 m_dialogModule = scene.RequestModuleInterface<IDialogModule>();
73 } 73 }
74 74
75 public void Close() 75 public void Close()
76 { 76 {
77 RemoveRegion(m_scene); 77 RemoveRegion(m_scene);
78 } 78 }
79 79
80 public void SubscribeToClientEvents(IClientAPI client) 80 public void SubscribeToClientEvents(IClientAPI client)
81 { 81 {
82 client.OnObjectSaleInfo += ObjectSaleInfo; 82 client.OnObjectSaleInfo += ObjectSaleInfo;
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index e53ab95..79c4713 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -53,30 +53,30 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectCommandsModule")] 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectCommandsModule")]
54 public class ObjectCommandsModule : INonSharedRegionModule 54 public class ObjectCommandsModule : INonSharedRegionModule
55 { 55 {
56// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
58 private Scene m_scene; 58 private Scene m_scene;
59 private ICommandConsole m_console; 59 private ICommandConsole m_console;
60 60
61 public string Name { get { return "Object Commands Module"; } } 61 public string Name { get { return "Object Commands Module"; } }
62 62
63 public Type ReplaceableInterface { get { return null; } } 63 public Type ReplaceableInterface { get { return null; } }
64 64
65 public void Initialise(IConfigSource source) 65 public void Initialise(IConfigSource source)
66 { 66 {
67// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: INITIALIZED MODULE"); 67// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: INITIALIZED MODULE");
68 } 68 }
69 69
70 public void PostInitialise() 70 public void PostInitialise()
71 { 71 {
72// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: POST INITIALIZED MODULE"); 72// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: POST INITIALIZED MODULE");
73 } 73 }
74 74
75 public void Close() 75 public void Close()
76 { 76 {
77// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: CLOSED MODULE"); 77// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: CLOSED MODULE");
78 } 78 }
79 79
80 public void AddRegion(Scene scene) 80 public void AddRegion(Scene scene)
81 { 81 {
82// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 82// m_log.DebugFormat("[OBJECT COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
@@ -539,13 +539,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
539 539
540 if (!ConsoleUtil.CheckFileDoesNotExist(m_console, fileName)) 540 if (!ConsoleUtil.CheckFileDoesNotExist(m_console, fileName))
541 return; 541 return;
542 542
543 using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8)) 543 using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8))
544 { 544 {
545 xtw.Formatting = Formatting.Indented; 545 xtw.Formatting = Formatting.Indented;
546 SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true); 546 SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true);
547 } 547 }
548 548
549 m_console.OutputFormat("Object dumped to file {0}", fileName); 549 m_console.OutputFormat("Object dumped to file {0}", fileName);
550 } 550 }
551 551
@@ -625,7 +625,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
625 cdl.AddRow("FlexiSoftness", s.FlexiSoftness); 625 cdl.AddRow("FlexiSoftness", s.FlexiSoftness);
626 cdl.AddRow("HollowShape", s.HollowShape); 626 cdl.AddRow("HollowShape", s.HollowShape);
627 cdl.AddRow( 627 cdl.AddRow(
628 "LightColor", 628 "LightColor",
629 string.Format("<{0},{1},{2},{3}>", s.LightColorR, s.LightColorB, s.LightColorG, s.LightColorA)); 629 string.Format("<{0},{1},{2},{3}>", s.LightColorR, s.LightColorB, s.LightColorG, s.LightColorA));
630 cdl.AddRow("LightCutoff", s.LightCutoff); 630 cdl.AddRow("LightCutoff", s.LightCutoff);
631 cdl.AddRow("LightEntry", s.LightEntry); 631 cdl.AddRow("LightEntry", s.LightEntry);
@@ -659,7 +659,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
659 cdl.AddRow("Rotation (World)", sop.GetWorldRotation()); 659 cdl.AddRow("Rotation (World)", sop.GetWorldRotation());
660 cdl.AddRow("Scale", s.Scale); 660 cdl.AddRow("Scale", s.Scale);
661 cdl.AddRow( 661 cdl.AddRow(
662 "SculptData", 662 "SculptData",
663 string.Format("{0} bytes", s.SculptData != null ? s.SculptData.Length.ToString() : "n/a")); 663 string.Format("{0} bytes", s.SculptData != null ? s.SculptData.Length.ToString() : "n/a"));
664 cdl.AddRow("SculptEntry", s.SculptEntry); 664 cdl.AddRow("SculptEntry", s.SculptEntry);
665 cdl.AddRow("SculptTexture", s.SculptTexture); 665 cdl.AddRow("SculptTexture", s.SculptTexture);
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
668 668
669 // TODO, need to display more information about textures but in a compact format 669 // TODO, need to display more information about textures but in a compact format
670 // to stop output becoming huge. 670 // to stop output becoming huge.
671 for (int i = 0; i < sop.GetNumberOfSides(); i++) 671 for (int i = 0; i < sop.GetNumberOfSides(); i++)
672 { 672 {
673 Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i]; 673 Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i];
674 674
@@ -765,12 +765,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
765 if (g.OwnerID == match && !g.IsAttachment) 765 if (g.OwnerID == match && !g.IsAttachment)
766 deletes.Add(g); 766 deletes.Add(g);
767 }); 767 });
768 768
769 // if (deletes.Count == 0) 769 // if (deletes.Count == 0)
770 // m_console.OutputFormat("No objects were found with owner {0}", match); 770 // m_console.OutputFormat("No objects were found with owner {0}", match);
771 771
772 break; 772 break;
773 773
774 case "creator": 774 case "creator":
775 if (!UUID.TryParse(o, out match)) 775 if (!UUID.TryParse(o, out match))
776 return; 776 return;
@@ -782,12 +782,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
782 if (g.RootPart.CreatorID == match && !g.IsAttachment) 782 if (g.RootPart.CreatorID == match && !g.IsAttachment)
783 deletes.Add(g); 783 deletes.Add(g);
784 }); 784 });
785 785
786 // if (deletes.Count == 0) 786 // if (deletes.Count == 0)
787 // m_console.OutputFormat("No objects were found with creator {0}", match); 787 // m_console.OutputFormat("No objects were found with creator {0}", match);
788 788
789 break; 789 break;
790 790
791 case "id": 791 case "id":
792 UUID uuid; 792 UUID uuid;
793 uint localId; 793 uint localId;
@@ -808,13 +808,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
808 808
809 // if (deletes.Count == 0) 809 // if (deletes.Count == 0)
810 // m_console.OutputFormat("No objects were found with uuid {0}", match); 810 // m_console.OutputFormat("No objects were found with uuid {0}", match);
811 811
812 break; 812 break;
813 813
814 case "name": 814 case "name":
815 deletes = GetDeleteCandidatesByName(module, cmd); 815 deletes = GetDeleteCandidatesByName(module, cmd);
816 break; 816 break;
817 817
818 case "outside": 818 case "outside":
819 deletes = new List<SceneObjectGroup>(); 819 deletes = new List<SceneObjectGroup>();
820 820
@@ -822,7 +822,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
822 { 822 {
823 SceneObjectPart rootPart = g.RootPart; 823 SceneObjectPart rootPart = g.RootPart;
824 bool delete = false; 824 bool delete = false;
825 825
826 if (rootPart.GroupPosition.Z < 0.0 || rootPart.GroupPosition.Z > 10000.0) 826 if (rootPart.GroupPosition.Z < 0.0 || rootPart.GroupPosition.Z > 10000.0)
827 { 827 {
828 delete = true; 828 delete = true;
@@ -831,18 +831,18 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
831 { 831 {
832 ILandObject parcel 832 ILandObject parcel
833 = m_scene.LandChannel.GetLandObject(rootPart.GroupPosition.X, rootPart.GroupPosition.Y); 833 = m_scene.LandChannel.GetLandObject(rootPart.GroupPosition.X, rootPart.GroupPosition.Y);
834 834
835 if (parcel == null || parcel.LandData.Name == "NO LAND") 835 if (parcel == null || parcel.LandData.Name == "NO LAND")
836 delete = true; 836 delete = true;
837 } 837 }
838 838
839 if (delete && !g.IsAttachment && !deletes.Contains(g)) 839 if (delete && !g.IsAttachment && !deletes.Contains(g))
840 deletes.Add(g); 840 deletes.Add(g);
841 }); 841 });
842 842
843 if (deletes.Count == 0) 843 if (deletes.Count == 0)
844 m_console.OutputFormat("No objects were found outside region bounds"); 844 m_console.OutputFormat("No objects were found outside region bounds");
845 845
846 break; 846 break;
847 847
848 case "pos": 848 case "pos":
@@ -864,7 +864,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
864 "Are you sure that you want to delete {0} objects from {1}", 864 "Are you sure that you want to delete {0} objects from {1}",
865 deletes.Count, m_scene.RegionInfo.RegionName), 865 deletes.Count, m_scene.RegionInfo.RegionName),
866 "y/N"); 866 "y/N");
867 867
868 if (response.ToLower() != "y") 868 if (response.ToLower() != "y")
869 { 869 {
870 MainConsole.Instance.OutputFormat( 870 MainConsole.Instance.OutputFormat(
@@ -951,7 +951,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
951 { 951 {
952 m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); 952 m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
953 endVector = Vector3.Zero; 953 endVector = Vector3.Zero;
954 954
955 return false; 955 return false;
956 } 956 }
957 957
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 06900f0..1a61771 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
47 public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule 47 public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule
48 { 48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51 protected Scene m_scene; 51 protected Scene m_scene;
52 protected bool m_Enabled; 52 protected bool m_Enabled;
53 53
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
77 private uint PERM_MOVE = (uint)524288; 77 private uint PERM_MOVE = (uint)524288;
78 private uint PERM_TRANS = (uint)8192; 78 private uint PERM_TRANS = (uint)8192;
79 private uint PERM_LOCKED = (uint)540672; 79 private uint PERM_LOCKED = (uint)540672;
80 80
81 /// <value> 81 /// <value>
82 /// Different user set names that come in from the configuration file. 82 /// Different user set names that come in from the configuration file.
83 /// </value> 83 /// </value>
@@ -110,17 +110,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions
110 private UserSet m_allowedScriptCreators = UserSet.All; 110 private UserSet m_allowedScriptCreators = UserSet.All;
111 111
112 /// <value> 112 /// <value>
113 /// The set of users that are allowed to edit (save) scripts. This is only active if 113 /// The set of users that are allowed to edit (save) scripts. This is only active if
114 /// permissions are not being bypassed. This overrides normal permissions.- 114 /// permissions are not being bypassed. This overrides normal permissions.-
115 /// </value> 115 /// </value>
116 private UserSet m_allowedScriptEditors = UserSet.All; 116 private UserSet m_allowedScriptEditors = UserSet.All;
117 117
118 private Dictionary<string, bool> GrantLSL = new Dictionary<string, bool>(); 118 private Dictionary<string, bool> GrantLSL = new Dictionary<string, bool>();
119 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>(); 119 private Dictionary<string, bool> GrantCS = new Dictionary<string, bool>();
120 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>(); 120 private Dictionary<string, bool> GrantVB = new Dictionary<string, bool>();
121 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>(); 121 private Dictionary<string, bool> GrantJS = new Dictionary<string, bool>();
122 private Dictionary<string, bool> GrantYP = new Dictionary<string, bool>(); 122 private Dictionary<string, bool> GrantYP = new Dictionary<string, bool>();
123 123
124 private IFriendsModule m_friendsModule; 124 private IFriendsModule m_friendsModule;
125 private IFriendsModule FriendsModule 125 private IFriendsModule FriendsModule
126 { 126 {
@@ -169,20 +169,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions
169 m_Enabled = true; 169 m_Enabled = true;
170 170
171 m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods", 171 m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods",
172 new string[] { "Startup", "Permissions" }, false); 172 new string[] { "Startup", "Permissions" }, false);
173 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions", 173 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions",
174 new string[] { "Startup", "Permissions" }, true); 174 new string[] { "Startup", "Permissions" }, true);
175 m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions", 175 m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions",
176 new string[] { "Startup", "Permissions" }, true); 176 new string[] { "Startup", "Permissions" }, true);
177 m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god", 177 m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",
178 new string[] { "Startup", "Permissions" }, true); 178 new string[] { "Startup", "Permissions" }, true);
179 m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god", 179 m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",
180 new string[] { "Startup", "Permissions" }, false); 180 new string[] { "Startup", "Permissions" }, false);
181 m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god", 181 m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god",
182 new string[] { "Startup", "Permissions" }, false); 182 new string[] { "Startup", "Permissions" }, false);
183 183
184 m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions", 184 m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions",
185 new string[] { "Startup", "Permissions" }, false); 185 new string[] { "Startup", "Permissions" }, false);
186 186
187 m_allowedScriptCreators 187 m_allowedScriptCreators
188 = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators); 188 = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
206 } 206 }
207 207
208 grant = Util.GetConfigVarFromSections<string>(config, "GrantCS", 208 grant = Util.GetConfigVarFromSections<string>(config, "GrantCS",
209 new string[] { "Startup", "Permissions" }, string.Empty); 209 new string[] { "Startup", "Permissions" }, string.Empty);
210 if (grant.Length > 0) 210 if (grant.Length > 0)
211 { 211 {
212 foreach (string uuidl in grant.Split(',')) 212 foreach (string uuidl in grant.Split(','))
@@ -273,46 +273,46 @@ namespace OpenSim.Region.CoreModules.World.Permissions
273 m_scene.Permissions.OnIsAdministrator += IsAdministrator; 273 m_scene.Permissions.OnIsAdministrator += IsAdministrator;
274 m_scene.Permissions.OnIsEstateManager += IsEstateManager; 274 m_scene.Permissions.OnIsEstateManager += IsEstateManager;
275 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; 275 m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
276 m_scene.Permissions.OnDeleteObject += CanDeleteObject; 276 m_scene.Permissions.OnDeleteObject += CanDeleteObject;
277 m_scene.Permissions.OnEditObject += CanEditObject; 277 m_scene.Permissions.OnEditObject += CanEditObject;
278 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; 278 m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties;
279 m_scene.Permissions.OnInstantMessage += CanInstantMessage; 279 m_scene.Permissions.OnInstantMessage += CanInstantMessage;
280 m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; 280 m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer;
281 m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; 281 m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand;
282 m_scene.Permissions.OnMoveObject += CanMoveObject; 282 m_scene.Permissions.OnMoveObject += CanMoveObject;
283 m_scene.Permissions.OnObjectEntry += CanObjectEntry; 283 m_scene.Permissions.OnObjectEntry += CanObjectEntry;
284 m_scene.Permissions.OnReturnObjects += CanReturnObjects; 284 m_scene.Permissions.OnReturnObjects += CanReturnObjects;
285 m_scene.Permissions.OnRezObject += CanRezObject; 285 m_scene.Permissions.OnRezObject += CanRezObject;
286 m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; 286 m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand;
287 m_scene.Permissions.OnRunScript += CanRunScript; 287 m_scene.Permissions.OnRunScript += CanRunScript;
288 m_scene.Permissions.OnCompileScript += CanCompileScript; 288 m_scene.Permissions.OnCompileScript += CanCompileScript;
289 m_scene.Permissions.OnSellParcel += CanSellParcel; 289 m_scene.Permissions.OnSellParcel += CanSellParcel;
290 m_scene.Permissions.OnTakeObject += CanTakeObject; 290 m_scene.Permissions.OnTakeObject += CanTakeObject;
291 m_scene.Permissions.OnSellGroupObject += CanSellGroupObject; 291 m_scene.Permissions.OnSellGroupObject += CanSellGroupObject;
292 m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject; 292 m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject;
293 m_scene.Permissions.OnTerraformLand += CanTerraformLand; 293 m_scene.Permissions.OnTerraformLand += CanTerraformLand;
294 m_scene.Permissions.OnLinkObject += CanLinkObject; 294 m_scene.Permissions.OnLinkObject += CanLinkObject;
295 m_scene.Permissions.OnDelinkObject += CanDelinkObject; 295 m_scene.Permissions.OnDelinkObject += CanDelinkObject;
296 m_scene.Permissions.OnBuyLand += CanBuyLand; 296 m_scene.Permissions.OnBuyLand += CanBuyLand;
297 297
298 m_scene.Permissions.OnViewNotecard += CanViewNotecard; 298 m_scene.Permissions.OnViewNotecard += CanViewNotecard;
299 m_scene.Permissions.OnViewScript += CanViewScript; 299 m_scene.Permissions.OnViewScript += CanViewScript;
300 m_scene.Permissions.OnEditNotecard += CanEditNotecard; 300 m_scene.Permissions.OnEditNotecard += CanEditNotecard;
301 m_scene.Permissions.OnEditScript += CanEditScript; 301 m_scene.Permissions.OnEditScript += CanEditScript;
302 302
303 m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory; 303 m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory;
304 m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory; 304 m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;
305 m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; 305 m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory;
306 m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; 306 m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory;
307 m_scene.Permissions.OnResetScript += CanResetScript; 307 m_scene.Permissions.OnResetScript += CanResetScript;
308 308
309 m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory; 309 m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory;
310 m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory; 310 m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory;
311 m_scene.Permissions.OnEditUserInventory += CanEditUserInventory; 311 m_scene.Permissions.OnEditUserInventory += CanEditUserInventory;
312 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; 312 m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory;
313 313
314 m_scene.Permissions.OnTeleport += CanTeleport; 314 m_scene.Permissions.OnTeleport += CanTeleport;
315 315
316 m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; 316 m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia;
317 m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; 317 m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia;
318 318
@@ -329,8 +329,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
329 m_scene.AddCommand("Debug", this, "debug permissions", 329 m_scene.AddCommand("Debug", this, "debug permissions",
330 "debug permissions <true / false>", 330 "debug permissions <true / false>",
331 "Turn on permissions debugging", 331 "Turn on permissions debugging",
332 HandleDebugPermissions); 332 HandleDebugPermissions);
333 333
334 } 334 }
335 335
336 public void RegionLoaded(Scene scene) 336 public void RegionLoaded(Scene scene)
@@ -441,7 +441,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
441 { 441 {
442 m_scene.EventManager.TriggerPermissionError(user, reason); 442 m_scene.EventManager.TriggerPermissionError(user, reason);
443 } 443 }
444 444
445 protected void DebugPermissionInformation(string permissionCalled) 445 protected void DebugPermissionInformation(string permissionCalled)
446 { 446 {
447 if (m_debugPermissions) 447 if (m_debugPermissions)
@@ -471,7 +471,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
471 471
472 return false; 472 return false;
473 } 473 }
474 474
475 /// <summary> 475 /// <summary>
476 /// Parse a user set configuration setting 476 /// Parse a user set configuration setting
477 /// </summary> 477 /// </summary>
@@ -483,28 +483,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
483 { 483 {
484 UserSet userSet = defaultValue; 484 UserSet userSet = defaultValue;
485 485
486 string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName, 486 string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName,
487 new string[] {"Startup", "Permissions"}, defaultValue.ToString()); 487 new string[] {"Startup", "Permissions"}, defaultValue.ToString());
488 488
489 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term 489 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term
490 // this should disappear. 490 // this should disappear.
491 if ("gods" == rawSetting.ToLower()) 491 if ("gods" == rawSetting.ToLower())
492 rawSetting = UserSet.Administrators.ToString(); 492 rawSetting = UserSet.Administrators.ToString();
493 493
494 // Doing it this was so that we can do a case insensitive conversion 494 // Doing it this was so that we can do a case insensitive conversion
495 try 495 try
496 { 496 {
497 userSet = (UserSet)Enum.Parse(typeof(UserSet), rawSetting, true); 497 userSet = (UserSet)Enum.Parse(typeof(UserSet), rawSetting, true);
498 } 498 }
499 catch 499 catch
500 { 500 {
501 m_log.ErrorFormat( 501 m_log.ErrorFormat(
502 "[PERMISSIONS]: {0} is not a valid {1} value, setting to {2}", 502 "[PERMISSIONS]: {0} is not a valid {1} value, setting to {2}",
503 rawSetting, settingName, userSet); 503 rawSetting, settingName, userSet);
504 } 504 }
505 505
506 m_log.DebugFormat("[PERMISSIONS]: {0} {1}", settingName, userSet); 506 m_log.DebugFormat("[PERMISSIONS]: {0} {1}", settingName, userSet);
507 507
508 return userSet; 508 return userSet;
509 } 509 }
510 510
@@ -520,7 +520,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
520 520
521 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) 521 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod)
522 return true; 522 return true;
523 523
524 if (IsEstateManager(user) && m_RegionManagerIsGod) 524 if (IsEstateManager(user) && m_RegionManagerIsGod)
525 return true; 525 return true;
526 526
@@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
558 } 558 }
559 559
560 protected bool IsFriendWithPerms(UUID user, UUID objectOwner) 560 protected bool IsFriendWithPerms(UUID user, UUID objectOwner)
561 { 561 {
562 if (user == UUID.Zero) 562 if (user == UUID.Zero)
563 return false; 563 return false;
564 564
@@ -572,7 +572,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
572 protected bool IsEstateManager(UUID user) 572 protected bool IsEstateManager(UUID user)
573 { 573 {
574 if (user == UUID.Zero) return false; 574 if (user == UUID.Zero) return false;
575 575
576 return m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(user); 576 return m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(user);
577 } 577 }
578 578
@@ -777,7 +777,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
777 // so just return true immediately and short circuit the more 777 // so just return true immediately and short circuit the more
778 // expensive group checks 778 // expensive group checks
779 return true; 779 return true;
780 780
781 //permission = true; 781 //permission = true;
782 } 782 }
783 else if (group.IsAttachment) 783 else if (group.IsAttachment)
@@ -786,15 +786,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
786 } 786 }
787 787
788// m_log.DebugFormat( 788// m_log.DebugFormat(
789// "[PERMISSIONS]: group.GroupID = {0}, part.GroupMask = {1}, isGroupMember = {2} for {3}", 789// "[PERMISSIONS]: group.GroupID = {0}, part.GroupMask = {1}, isGroupMember = {2} for {3}",
790// group.GroupID, 790// group.GroupID,
791// m_scene.GetSceneObjectPart(objId).GroupMask, 791// m_scene.GetSceneObjectPart(objId).GroupMask,
792// IsGroupMember(group.GroupID, currentUser, 0), 792// IsGroupMember(group.GroupID, currentUser, 0),
793// currentUser); 793// currentUser);
794 794
795 // Group members should be able to edit group objects 795 // Group members should be able to edit group objects
796 if ((group.GroupID != UUID.Zero) 796 if ((group.GroupID != UUID.Zero)
797 && ((m_scene.GetSceneObjectPart(objId).GroupMask & (uint)PermissionMask.Modify) != 0) 797 && ((m_scene.GetSceneObjectPart(objId).GroupMask & (uint)PermissionMask.Modify) != 0)
798 && IsGroupMember(group.GroupID, currentUser, 0)) 798 && IsGroupMember(group.GroupID, currentUser, 0))
799 { 799 {
800 // Return immediately, so that the administrator can shares group objects 800 // Return immediately, so that the administrator can shares group objects
@@ -807,7 +807,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
807 // Return immediately, so that the administrator can share objects with friends 807 // Return immediately, so that the administrator can share objects with friends
808 return true; 808 return true;
809 } 809 }
810 810
811 // Users should be able to edit what is over their land. 811 // Users should be able to edit what is over their land.
812 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); 812 ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
813 if ((parcel != null) && (parcel.LandData.OwnerID == currentUser)) 813 if ((parcel != null) && (parcel.LandData.OwnerID == currentUser))
@@ -904,7 +904,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
904 904
905 return permission; 905 return permission;
906 } 906 }
907 907
908 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers, bool allowEstateManager) 908 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers, bool allowEstateManager)
909 { 909 {
910 if (parcel.LandData.OwnerID == user) 910 if (parcel.LandData.OwnerID == user)
@@ -919,7 +919,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
919 { 919 {
920 return true; 920 return true;
921 } 921 }
922 922
923 if (allowEstateManager && IsEstateManager(user)) 923 if (allowEstateManager && IsEstateManager(user))
924 { 924 {
925 return true; 925 return true;
@@ -946,7 +946,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
946 { 946 {
947 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 947 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
948 if (m_bypassPermissions) return m_bypassPermissionsValue; 948 if (m_bypassPermissions) return m_bypassPermissionsValue;
949 949
950 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false); 950 return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false);
951 } 951 }
952 952
@@ -1007,7 +1007,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1007 //They can't even edit the object 1007 //They can't even edit the object
1008 return false; 1008 return false;
1009 } 1009 }
1010 1010
1011 SceneObjectPart part = scene.GetSceneObjectPart(objectID); 1011 SceneObjectPart part = scene.GetSceneObjectPart(objectID);
1012 if (part == null) 1012 if (part == null)
1013 return false; 1013 return false;
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1025 if ((part.GroupMask & PERM_COPY) == 0) 1025 if ((part.GroupMask & PERM_COPY) == 0)
1026 return false; 1026 return false;
1027 } 1027 }
1028 1028
1029 //If they can rez, they can duplicate 1029 //If they can rez, they can duplicate
1030 return CanRezObject(objectCount, owner, objectPosition, scene); 1030 return CanRezObject(objectCount, owner, objectPosition, scene);
1031 } 1031 }
@@ -1074,10 +1074,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1074 { 1074 {
1075 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 1075 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
1076 if (m_bypassPermissions) return m_bypassPermissionsValue; 1076 if (m_bypassPermissions) return m_bypassPermissionsValue;
1077 1077
1078 if (m_allowedScriptEditors == UserSet.Administrators && !IsAdministrator(user)) 1078 if (m_allowedScriptEditors == UserSet.Administrators && !IsAdministrator(user))
1079 return false; 1079 return false;
1080 1080
1081 // Ordinarily, if you can view it, you can edit it 1081 // Ordinarily, if you can view it, you can edit it
1082 // There is no viewing a no mod script 1082 // There is no viewing a no mod script
1083 // 1083 //
@@ -1135,10 +1135,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1135 1135
1136 if (!IsGroupMember(part.GroupID, user, 0)) 1136 if (!IsGroupMember(part.GroupID, user, 0))
1137 return false; 1137 return false;
1138 1138
1139 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1139 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1140 return false; 1140 return false;
1141 } 1141 }
1142 else 1142 else
1143 { 1143 {
1144 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1144 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
@@ -1572,7 +1572,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1572 if ((so.GetEffectivePermissions() & PERM_COPY) != PERM_COPY) 1572 if ((so.GetEffectivePermissions() & PERM_COPY) != PERM_COPY)
1573 permission = false; 1573 permission = false;
1574 } 1574 }
1575 1575
1576 return permission; 1576 return permission;
1577 } 1577 }
1578 1578
@@ -1662,7 +1662,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1662 1662
1663 if (part == null) 1663 if (part == null)
1664 return false; 1664 return false;
1665 1665
1666 if (part.OwnerID != user) 1666 if (part.OwnerID != user)
1667 { 1667 {
1668 if (part.GroupID == UUID.Zero) 1668 if (part.GroupID == UUID.Zero)
@@ -1670,11 +1670,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1670 1670
1671 if (!IsGroupMember(part.GroupID, user, 0)) 1671 if (!IsGroupMember(part.GroupID, user, 0))
1672 return false; 1672 return false;
1673 1673
1674 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) 1674 if ((part.GroupMask & (uint)PermissionMask.Modify) == 0)
1675 return false; 1675 return false;
1676 } 1676 }
1677 else 1677 else
1678 { 1678 {
1679 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1679 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1680 return false; 1680 return false;
@@ -1684,12 +1684,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1684 1684
1685 if (ti == null) 1685 if (ti == null)
1686 return false; 1686 return false;
1687 1687
1688 if (ti.OwnerID != user) 1688 if (ti.OwnerID != user)
1689 { 1689 {
1690 if (ti.GroupID == UUID.Zero) 1690 if (ti.GroupID == UUID.Zero)
1691 return false; 1691 return false;
1692 1692
1693 if (!IsGroupMember(ti.GroupID, user, 0)) 1693 if (!IsGroupMember(ti.GroupID, user, 0))
1694 return false; 1694 return false;
1695 } 1695 }
@@ -1746,12 +1746,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1746 1746
1747 if (part == null) 1747 if (part == null)
1748 return false; 1748 return false;
1749 1749
1750 if (part.OwnerID != user) 1750 if (part.OwnerID != user)
1751 { 1751 {
1752 if (part.GroupID == UUID.Zero) 1752 if (part.GroupID == UUID.Zero)
1753 return false; 1753 return false;
1754 1754
1755 if (!IsGroupMember(part.GroupID, user, 0)) 1755 if (!IsGroupMember(part.GroupID, user, 0))
1756 return false; 1756 return false;
1757 } 1757 }
@@ -1768,7 +1768,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1768 { 1768 {
1769 if (ti.GroupID == UUID.Zero) 1769 if (ti.GroupID == UUID.Zero)
1770 return false; 1770 return false;
1771 1771
1772 if (!IsGroupMember(ti.GroupID, user, 0)) 1772 if (!IsGroupMember(ti.GroupID, user, 0))
1773 return false; 1773 return false;
1774 } 1774 }
@@ -1863,7 +1863,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1863 1863
1864 return true; 1864 return true;
1865 } 1865 }
1866 1866
1867 /// <summary> 1867 /// <summary>
1868 /// Check whether the specified user is allowed to create the given inventory type in their inventory. 1868 /// Check whether the specified user is allowed to create the given inventory type in their inventory.
1869 /// </summary> 1869 /// </summary>
@@ -1878,10 +1878,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1878 if ((int)InventoryType.LSL == invType) 1878 if ((int)InventoryType.LSL == invType)
1879 if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID)) 1879 if (m_allowedScriptCreators == UserSet.Administrators && !IsAdministrator(userID))
1880 return false; 1880 return false;
1881 1881
1882 return true; 1882 return true;
1883 } 1883 }
1884 1884
1885 /// <summary> 1885 /// <summary>
1886 /// Check whether the specified user is allowed to copy the given inventory type in their inventory. 1886 /// Check whether the specified user is allowed to copy the given inventory type in their inventory.
1887 /// </summary> 1887 /// </summary>
@@ -1895,7 +1895,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1895 1895
1896 return true; 1896 return true;
1897 } 1897 }
1898 1898
1899 /// <summary> 1899 /// <summary>
1900 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1900 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1901 /// </summary> 1901 /// </summary>
@@ -1909,7 +1909,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1909 1909
1910 return true; 1910 return true;
1911 } 1911 }
1912 1912
1913 /// <summary> 1913 /// <summary>
1914 /// Check whether the specified user is allowed to delete the given inventory item from their own inventory. 1914 /// Check whether the specified user is allowed to delete the given inventory item from their own inventory.
1915 /// </summary> 1915 /// </summary>
@@ -1947,7 +1947,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1947 return GenericObjectPermission(agentID, prim, false); 1947 return GenericObjectPermission(agentID, prim, false);
1948 } 1948 }
1949 1949
1950 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) 1950 private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene)
1951 { 1951 {
1952 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); 1952 //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType);
1953 switch (scriptType) { 1953 switch (scriptType) {
@@ -1981,64 +1981,64 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1981 } 1981 }
1982 return(false); 1982 return(false);
1983 } 1983 }
1984 1984
1985 private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) 1985 private bool CanControlPrimMedia(UUID agentID, UUID primID, int face)
1986 { 1986 {
1987// m_log.DebugFormat( 1987// m_log.DebugFormat(
1988// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", 1988// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}",
1989// agentID, primID, face); 1989// agentID, primID, face);
1990 1990
1991 if (null == MoapModule) 1991 if (null == MoapModule)
1992 return false; 1992 return false;
1993 1993
1994 SceneObjectPart part = m_scene.GetSceneObjectPart(primID); 1994 SceneObjectPart part = m_scene.GetSceneObjectPart(primID);
1995 if (null == part) 1995 if (null == part)
1996 return false; 1996 return false;
1997 1997
1998 MediaEntry me = MoapModule.GetMediaEntry(part, face); 1998 MediaEntry me = MoapModule.GetMediaEntry(part, face);
1999 1999
2000 // If there is no existing media entry then it can be controlled (in this context, created). 2000 // If there is no existing media entry then it can be controlled (in this context, created).
2001 if (null == me) 2001 if (null == me)
2002 return true; 2002 return true;
2003 2003
2004// m_log.DebugFormat( 2004// m_log.DebugFormat(
2005// "[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}", 2005// "[PERMISSIONS]: Checking CanControlPrimMedia for {0} on {1} face {2} with control permissions {3}",
2006// agentID, primID, face, me.ControlPermissions); 2006// agentID, primID, face, me.ControlPermissions);
2007 2007
2008 return GenericObjectPermission(agentID, part.ParentGroup.UUID, true); 2008 return GenericObjectPermission(agentID, part.ParentGroup.UUID, true);
2009 } 2009 }
2010 2010
2011 private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) 2011 private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face)
2012 { 2012 {
2013// m_log.DebugFormat( 2013// m_log.DebugFormat(
2014// "[PERMISSONS]: Performing CanInteractWithPrimMedia check with agentID {0}, primID {1}, face {2}", 2014// "[PERMISSONS]: Performing CanInteractWithPrimMedia check with agentID {0}, primID {1}, face {2}",
2015// agentID, primID, face); 2015// agentID, primID, face);
2016 2016
2017 if (null == MoapModule) 2017 if (null == MoapModule)
2018 return false; 2018 return false;
2019 2019
2020 SceneObjectPart part = m_scene.GetSceneObjectPart(primID); 2020 SceneObjectPart part = m_scene.GetSceneObjectPart(primID);
2021 if (null == part) 2021 if (null == part)
2022 return false; 2022 return false;
2023 2023
2024 MediaEntry me = MoapModule.GetMediaEntry(part, face); 2024 MediaEntry me = MoapModule.GetMediaEntry(part, face);
2025 2025
2026 // If there is no existing media entry then it can be controlled (in this context, created). 2026 // If there is no existing media entry then it can be controlled (in this context, created).
2027 if (null == me) 2027 if (null == me)
2028 return true; 2028 return true;
2029 2029
2030// m_log.DebugFormat( 2030// m_log.DebugFormat(
2031// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", 2031// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
2032// agentID, primID, face, me.InteractPermissions); 2032// agentID, primID, face, me.InteractPermissions);
2033 2033
2034 return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); 2034 return GenericPrimMediaPermission(part, agentID, me.InteractPermissions);
2035 } 2035 }
2036 2036
2037 private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) 2037 private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
2038 { 2038 {
2039// if (IsAdministrator(agentID)) 2039// if (IsAdministrator(agentID))
2040// return true; 2040// return true;
2041 2041
2042 if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) 2042 if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
2043 return true; 2043 return true;
2044 2044
@@ -2047,13 +2047,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
2047 if (agentID == part.OwnerID) 2047 if (agentID == part.OwnerID)
2048 return true; 2048 return true;
2049 } 2049 }
2050 2050
2051 if ((perms & MediaPermission.Group) == MediaPermission.Group) 2051 if ((perms & MediaPermission.Group) == MediaPermission.Group)
2052 { 2052 {
2053 if (IsGroupMember(part.GroupID, agentID, 0)) 2053 if (IsGroupMember(part.GroupID, agentID, 0))
2054 return true; 2054 return true;
2055 } 2055 }
2056 2056
2057 return false; 2057 return false;
2058 } 2058 }
2059 } 2059 }
diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
index 411c4d6..49246a2 100644
--- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
@@ -54,24 +54,24 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
54 private ICommandConsole m_console; 54 private ICommandConsole m_console;
55 55
56 public string Name { get { return "Region Commands Module"; } } 56 public string Name { get { return "Region Commands Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[REGION COMMANDS MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[REGION COMMANDS MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[REGION COMMANDS MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[REGION COMMANDS MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[REGION COMMANDS MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[REGION COMMANDS MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[REGION COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[REGION COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
87 m_console.Commands.AddCommand( 87 m_console.Commands.AddCommand(
88 "Regions", false, "show region", 88 "Regions", false, "show region",
89 "show region", 89 "show region",
90 "Show control information for the currently selected region (host name, max physical prim size, etc).", 90 "Show control information for the currently selected region (host name, max physical prim size, etc).",
91 "A synonym for \"region get\"", 91 "A synonym for \"region get\"",
92 HandleShowRegion); 92 HandleShowRegion);
93 93
94 m_console.Commands.AddCommand( 94 m_console.Commands.AddCommand(
95 "Regions", false, "region get", 95 "Regions", false, "region get",
96 "region get", 96 "region get",
97 "Show control information for the currently selected region (host name, max physical prim size, etc).", 97 "Show control information for the currently selected region (host name, max physical prim size, etc).",
98 "Some parameters can be set with the \"region set\" command.\n" 98 "Some parameters can be set with the \"region set\" command.\n"
99 + "Others must be changed via a viewer (usually via the region/estate dialog box).", 99 + "Others must be changed via a viewer (usually via the region/estate dialog box).",
100 HandleShowRegion); 100 HandleShowRegion);
@@ -204,7 +204,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
204 { 204 {
205 MainConsole.Instance.OutputFormat("Usage: region set <param> <value>"); 205 MainConsole.Instance.OutputFormat("Usage: region set <param> <value>");
206 return; 206 return;
207 } 207 }
208 208
209 string param = args[2]; 209 string param = args[2];
210 string rawValue = args[3]; 210 string rawValue = args[3];
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
225 if (newValue > ri.AgentCapacity) 225 if (newValue > ri.AgentCapacity)
226 { 226 {
227 MainConsole.Instance.OutputFormat( 227 MainConsole.Instance.OutputFormat(
228 "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit", 228 "Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit",
229 newValue, m_scene.Name, ri.AgentCapacity); 229 newValue, m_scene.Name, ri.AgentCapacity);
230 } 230 }
231 else 231 else
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
index e6a0205..8bac9e6 100644
--- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs
@@ -78,22 +78,22 @@ namespace OpenSim.Region.CoreModules.World.Region
78 scene.RegionInfo.RegionID.ToString())); 78 scene.RegionInfo.RegionID.ToString()));
79 79
80 m_Scene = scene; 80 m_Scene = scene;
81 81
82 scene.RegisterModuleInterface<IRestartModule>(this); 82 scene.RegisterModuleInterface<IRestartModule>(this);
83 MainConsole.Instance.Commands.AddCommand("Regions", 83 MainConsole.Instance.Commands.AddCommand("Regions",
84 false, "region restart bluebox", 84 false, "region restart bluebox",
85 "region restart bluebox <message> <delta seconds>+", 85 "region restart bluebox <message> <delta seconds>+",
86 "Schedule a region restart", 86 "Schedule a region restart",
87 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", 87 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.",
88 HandleRegionRestart); 88 HandleRegionRestart);
89 89
90 MainConsole.Instance.Commands.AddCommand("Regions", 90 MainConsole.Instance.Commands.AddCommand("Regions",
91 false, "region restart notice", 91 false, "region restart notice",
92 "region restart notice <message> <delta seconds>+", 92 "region restart notice <message> <delta seconds>+",
93 "Schedule a region restart", 93 "Schedule a region restart",
94 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", 94 "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.",
95 HandleRegionRestart); 95 HandleRegionRestart);
96 96
97 MainConsole.Instance.Commands.AddCommand("Regions", 97 MainConsole.Instance.Commands.AddCommand("Regions",
98 false, "region restart abort", 98 false, "region restart abort",
99 "region restart abort [<message>]", 99 "region restart abort [<message>]",
@@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.World.Region
183 nextAlert = m_Alerts[1]; 183 nextAlert = m_Alerts[1];
184 break; 184 break;
185 } 185 }
186 186
187 int currentAlert = m_Alerts[0]; 187 int currentAlert = m_Alerts[0];
188 188
189 m_Alerts.RemoveAt(0); 189 m_Alerts.RemoveAt(0);
@@ -242,7 +242,7 @@ namespace OpenSim.Region.CoreModules.World.Region
242 else 242 else
243 { 243 {
244 m_log.WarnFormat( 244 m_log.WarnFormat(
245 "[RESTART MODULE]: Tried to set restart timer to {0} in {1}, which is not a valid interval", 245 "[RESTART MODULE]: Tried to set restart timer to {0} in {1}, which is not a valid interval",
246 intervalSeconds, m_Scene.Name); 246 intervalSeconds, m_Scene.Name);
247 } 247 }
248 } 248 }
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Region
286 File.Delete(Path.Combine(m_MarkerPath, 286 File.Delete(Path.Combine(m_MarkerPath,
287 m_Scene.RegionInfo.RegionID.ToString())); 287 m_Scene.RegionInfo.RegionID.ToString()));
288 } 288 }
289 289
290 private void HandleRegionRestart(string module, string[] args) 290 private void HandleRegionRestart(string module, string[] args)
291 { 291 {
292 if (!(MainConsole.Instance.ConsoleScene is Scene)) 292 if (!(MainConsole.Instance.ConsoleScene is Scene))
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
index e0247d9..c9bc335 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")] 45 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SerialiserModule")]
46 public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule 46 public class SerialiserModule : ISharedRegionModule, IRegionSerialiserModule
47 { 47 {
48 private static readonly ILog m_log = 48 private static readonly ILog m_log =
49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 50
51// private Commander m_commander = new Commander("export"); 51// private Commander m_commander = new Commander("export");
@@ -55,15 +55,15 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
55 55
56 #region ISharedRegionModule Members 56 #region ISharedRegionModule Members
57 57
58 public Type ReplaceableInterface 58 public Type ReplaceableInterface
59 { 59 {
60 get { return null; } 60 get { return null; }
61 } 61 }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65 IConfig config = source.Configs["Serialiser"]; 65 IConfig config = source.Configs["Serialiser"];
66 if (config != null) 66 if (config != null)
67 { 67 {
68 m_savedir = config.GetString("save_dir", m_savedir); 68 m_savedir = config.GetString("save_dir", m_savedir);
69 } 69 }
@@ -150,7 +150,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
150 { 150 {
151 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max); 151 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max);
152 } 152 }
153 153
154 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) 154 public void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName)
155 { 155 {
156 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName); 156 SceneXmlLoader.SaveNamedPrimsToXml2(scene, primName, fileName);
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
index a5bb1a7..c9e3141 100644
--- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
+++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
43 [TestFixture] 43 [TestFixture]
44 public class SerialiserTests : OpenSimTestCase 44 public class SerialiserTests : OpenSimTestCase
45 { 45 {
46 private const string ObjectRootPartStubXml = 46 private const string ObjectRootPartStubXml =
47@"<SceneObjectGroup> 47@"<SceneObjectGroup>
48 <RootPart> 48 <RootPart>
49 <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> 49 <SceneObjectPart xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
@@ -149,9 +149,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
149 <llsd> 149 <llsd>
150 <map> 150 <map>
151 <key>MyNamespace</key> 151 <key>MyNamespace</key>
152 <map> 152 <map>
153 <key>MyStore</key> 153 <key>MyStore</key>
154 <map> 154 <map>
155 <key>the answer</key> 155 <key>the answer</key>
156 <integer>42</integer> 156 <integer>42</integer>
157 </map> 157 </map>
@@ -162,12 +162,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
162 </SceneObjectPart> 162 </SceneObjectPart>
163 </RootPart>"; 163 </RootPart>";
164 164
165 private const string ObjectWithNoOtherPartsXml = ObjectRootPartStubXml + 165 private const string ObjectWithNoOtherPartsXml = ObjectRootPartStubXml +
166@" 166@"
167 <OtherParts /> 167 <OtherParts />
168</SceneObjectGroup>"; 168</SceneObjectGroup>";
169 169
170 private const string ObjectWithOtherPartsXml = ObjectRootPartStubXml + 170 private const string ObjectWithOtherPartsXml = ObjectRootPartStubXml +
171@" 171@"
172 <OtherParts> 172 <OtherParts>
173 <Part> 173 <Part>
@@ -574,9 +574,9 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
574 <llsd> 574 <llsd>
575 <map> 575 <map>
576 <key>MyNamespace</key> 576 <key>MyNamespace</key>
577 <map> 577 <map>
578 <key>MyStore</key> 578 <key>MyStore</key>
579 <map> 579 <map>
580 <key>last words</key> 580 <key>last words</key>
581 <string>Rosebud</string> 581 <string>Rosebud</string>
582 </map> 582 </map>
@@ -636,7 +636,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
636 Assert.That(part.Name, Is.EqualTo("PrimMyRide")); 636 Assert.That(part.Name, Is.EqualTo("PrimMyRide"));
637 OSDMap store = part.DynAttrs.GetStore("MyNamespace", "MyStore"); 637 OSDMap store = part.DynAttrs.GetStore("MyNamespace", "MyStore");
638 Assert.AreEqual(42, store["the answer"].AsInteger()); 638 Assert.AreEqual(42, store["the answer"].AsInteger());
639 } 639 }
640 640
641 { 641 {
642 SceneObjectPart part = parts[1]; 642 SceneObjectPart part = parts[1];
@@ -723,7 +723,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
723 xtr.ReadStartElement("SceneObjectGroup"); 723 xtr.ReadStartElement("SceneObjectGroup");
724 xtr.ReadStartElement("RootPart"); 724 xtr.ReadStartElement("RootPart");
725 xtr.ReadStartElement("SceneObjectPart"); 725 xtr.ReadStartElement("SceneObjectPart");
726 726
727 UUID uuid = UUID.Zero; 727 UUID uuid = UUID.Zero;
728 string name = null; 728 string name = null;
729 UUID creatorId = UUID.Zero; 729 UUID creatorId = UUID.Zero;
@@ -733,7 +733,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
733 { 733 {
734 if (xtr.NodeType != XmlNodeType.Element) 734 if (xtr.NodeType != XmlNodeType.Element)
735 continue; 735 continue;
736 736
737 switch (xtr.Name) 737 switch (xtr.Name)
738 { 738 {
739 case "UUID": 739 case "UUID":
@@ -833,7 +833,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
833 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); 833 XmlTextReader xtr = new XmlTextReader(new StringReader(xml2));
834 xtr.ReadStartElement("SceneObjectGroup"); 834 xtr.ReadStartElement("SceneObjectGroup");
835 xtr.ReadStartElement("SceneObjectPart"); 835 xtr.ReadStartElement("SceneObjectPart");
836 836
837 UUID uuid = UUID.Zero; 837 UUID uuid = UUID.Zero;
838 string name = null; 838 string name = null;
839 UUID creatorId = UUID.Zero; 839 UUID creatorId = UUID.Zero;
@@ -843,7 +843,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests
843 { 843 {
844 if (xtr.NodeType != XmlNodeType.Element) 844 if (xtr.NodeType != XmlNodeType.Element)
845 continue; 845 continue;
846 846
847 switch (xtr.Name) 847 switch (xtr.Name)
848 { 848 {
849 case "UUID": 849 case "UUID":
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index 45f3ccf..2b7db18 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.World.Sound
279 279
280 m_host.Sound = soundID; 280 m_host.Sound = soundID;
281 m_host.SoundGain = volume; 281 m_host.SoundGain = volume;
282 m_host.SoundFlags = iflags; 282 m_host.SoundFlags = iflags;
283 m_host.SoundRadius = radius; 283 m_host.SoundRadius = radius;
284 284
285 m_host.ScheduleFullUpdate(); 285 m_host.ScheduleFullUpdate();
@@ -309,14 +309,14 @@ namespace OpenSim.Region.CoreModules.World.Sound
309 else 309 else
310 { 310 {
311 byte bflags = 0; 311 byte bflags = 0;
312 312
313 if (isMaster) 313 if (isMaster)
314 bflags |= (byte)SoundFlags.SYNC_MASTER; 314 bflags |= (byte)SoundFlags.SYNC_MASTER;
315 // TODO check viewer seems to accept both 315 // TODO check viewer seems to accept both
316 if (useMaster) 316 if (useMaster)
317 bflags |= (byte)SoundFlags.SYNC_SLAVE; 317 bflags |= (byte)SoundFlags.SYNC_SLAVE;
318 PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags, radius); 318 PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags, radius);
319 } 319 }
320 } 320 }
321 321
322 public void TriggerSoundLimited(UUID objectID, UUID sound, 322 public void TriggerSoundLimited(UUID objectID, UUID sound,
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
index d0318eb..e2b3487 100644
--- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules
77 // Number of virtual days to a virtual year 77 // Number of virtual days to a virtual year
78 private int m_YearLengthDays = 0; 78 private int m_YearLengthDays = 0;
79 79
80 // Ratio of Daylight hours to Night time hours. This is accomplished by shifting the 80 // Ratio of Daylight hours to Night time hours. This is accomplished by shifting the
81 // sun's orbit above the horizon 81 // sun's orbit above the horizon
82 private double m_HorizonShift = 0; 82 private double m_HorizonShift = 0;
83 83
@@ -162,7 +162,7 @@ namespace OpenSim.Region.CoreModules
162 // Determine the current "day" from current time, so we can use "today" 162 // Determine the current "day" from current time, so we can use "today"
163 // to determine Seasonal Tilt and what'not 163 // to determine Seasonal Tilt and what'not
164 164
165 // Integer math rounded is on purpose to drop fractional day, determines number 165 // Integer math rounded is on purpose to drop fractional day, determines number
166 // of virtual days since Epoch 166 // of virtual days since Epoch
167 PosTime = CurrentTime / SecondsPerSunCycle; 167 PosTime = CurrentTime / SecondsPerSunCycle;
168 168
@@ -343,7 +343,7 @@ namespace OpenSim.Region.CoreModules
343 m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames"); 343 m_log.Debug("[SUN]: Positional data updated every " + m_UpdateInterval + " frames");
344 } 344 }
345 345
346 public Type ReplaceableInterface 346 public Type ReplaceableInterface
347 { 347 {
348 get { return null; } 348 get { return null; }
349 } 349 }
@@ -417,7 +417,7 @@ namespace OpenSim.Region.CoreModules
417 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); 417 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
418 } 418 }
419 } 419 }
420 } 420 }
421 421
422 public void SunUpdate() 422 public void SunUpdate()
423 { 423 {
@@ -464,7 +464,7 @@ namespace OpenSim.Region.CoreModules
464 464
465 while (sunFixedHour < 0) 465 while (sunFixedHour < 0)
466 sunFixedHour += 24; 466 sunFixedHour += 24;
467 467
468 m_SunFixedHour = sunFixedHour; 468 m_SunFixedHour = sunFixedHour;
469 m_SunFixed = fixedSun; 469 m_SunFixed = fixedSun;
470 470
@@ -516,7 +516,7 @@ namespace OpenSim.Region.CoreModules
516 516
517 case "current_time": 517 case "current_time":
518 return GetCurrentTimeAsLindenSunHour(); 518 return GetCurrentTimeAsLindenSunHour();
519 519
520 default: 520 default:
521 throw new Exception("Unknown sun parameter."); 521 throw new Exception("Unknown sun parameter.");
522 } 522 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index 1e67f72..bcd9dcd 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -247,4 +247,4 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
247 } 247 }
248} 248}
249 249
250 250
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
index 36c2bbf..d604dc7 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs
@@ -104,10 +104,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
104 using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png")) 104 using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png"))
105 { 105 {
106 pallete = gradientmapLd.Height; 106 pallete = gradientmapLd.Height;
107 107
108 bmp = new Bitmap(map.Width, map.Height); 108 bmp = new Bitmap(map.Width, map.Height);
109 colours = new Color[pallete]; 109 colours = new Color[pallete];
110 110
111 for (int i = 0; i < pallete; i++) 111 for (int i = 0; i < pallete; i++)
112 { 112 {
113 colours[i] = gradientmapLd.GetPixel(0, i); 113 colours[i] = gradientmapLd.GetPixel(0, i);
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
index 59994e4..68d6ed2 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs
@@ -275,6 +275,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
275 public bool SupportsTileSave() 275 public bool SupportsTileSave()
276 { 276 {
277 return false; 277 return false;
278 } 278 }
279 } 279 }
280} \ No newline at end of file 280} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
index 6324aca..f7be25f 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
32{ 32{
33 public interface ITerrainFloodEffect 33 public interface ITerrainFloodEffect
34 { 34 {
35 void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength, 35 void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength,
36 int startX, int endX, int startY, int endY); 36 int startX, int endX, int startY, int endY);
37 } 37 }
38} \ No newline at end of file 38} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
index 3ba3657..855d131 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
33 public interface ITerrainLoader 33 public interface ITerrainLoader
34 { 34 {
35 // Returns true if that extension can be used for terrain save-tile 35 // Returns true if that extension can be used for terrain save-tile
36 // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders) 36 // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders)
37 bool SupportsTileSave(); 37 bool SupportsTileSave();
38 38
39 string FileExtension { get; } 39 string FileExtension { get; }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
index 8937f63..9d3d4cb 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
77 { 77 {
78 map[x, y] += delta; 78 map[x, y] += delta;
79 } 79 }
80 80
81 } 81 }
82 } 82 }
83 } 83 }
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
index bbf9407..a88a022 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
58 map[x, y] = 0.0; 58 map[x, y] = 0.0;
59 else 59 else
60 map[x, y] = newz; 60 map[x, y] = newz;
61 } 61 }
62 } 62 }
63 } 63 }
64 64
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
index 1b704bb..5305cb4 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
33 public class RaiseSphere : ITerrainPaintableEffect 33 public class RaiseSphere : ITerrainPaintableEffect
34 { 34 {
35 #region ITerrainPaintableEffect Members 35 #region ITerrainPaintableEffect Members
36 36
37 37
38 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, 38 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz,
39 double strength, double duration, int startX, int endX, int startY, int endY) 39 double strength, double duration, int startX, int endX, int startY, int endY)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
index efc5324..ca30e9e 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
46 { 46 {
47 strength = TerrainUtil.MetersToSphericalStrength(strength); 47 strength = TerrainUtil.MetersToSphericalStrength(strength);
48 duration = 0.03; //MCP Should be read from ini file 48 duration = 0.03; //MCP Should be read from ini file
49 49
50 if (duration > 1.0) 50 if (duration > 1.0)
51 duration = 1.0; 51 duration = 1.0;
52 if (duration < 0) 52 if (duration < 0)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
index 65dd0a6..0342962 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs
@@ -42,10 +42,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
42 int x, y; 42 int x, y;
43 double[,] tweak = new double[map.Width,map.Height]; 43 double[,] tweak = new double[map.Width,map.Height];
44 44
45 double area = strength; 45 double area = strength;
46 double step = strength / 4.0; 46 double step = strength / 4.0;
47 duration = 0.03; //MCP Should be read from ini file 47 duration = 0.03; //MCP Should be read from ini file
48 48
49 49
50 // compute delta map 50 // compute delta map
51 for (x = startX; x <= endX; x++) 51 for (x = startX; x <= endX; x++)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index e21681d..65d4c4a 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -218,7 +218,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
218 if (terrainConfig != null) 218 if (terrainConfig != null)
219 { 219 {
220 m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); 220 m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain);
221 m_sendTerrainUpdatesByViewDistance = 221 m_sendTerrainUpdatesByViewDistance =
222 terrainConfig.GetBoolean( 222 terrainConfig.GetBoolean(
223 "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance); 223 "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance);
224 } 224 }
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
240 if(m_baked != null) 240 if(m_baked != null)
241 m_channel = m_baked.MakeCopy(); 241 m_channel = m_baked.MakeCopy();
242 else 242 else
243 m_channel = new TerrainChannel(m_InitialTerrain, 243 m_channel = new TerrainChannel(m_InitialTerrain,
244 (int)m_scene.RegionInfo.RegionSizeX, 244 (int)m_scene.RegionInfo.RegionSizeX,
245 (int)m_scene.RegionInfo.RegionSizeY, 245 (int)m_scene.RegionInfo.RegionSizeY,
246 (int)m_scene.RegionInfo.RegionSizeZ); 246 (int)m_scene.RegionInfo.RegionSizeZ);
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
463 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); 463 throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename));
464 } 464 }
465 465
466 public void LoadFromStream(string filename, Vector3 displacement, 466 public void LoadFromStream(string filename, Vector3 displacement,
467 float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream) 467 float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream)
468 { 468 {
469 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) 469 foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders)
@@ -724,7 +724,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
724 724
725 /// <summary> 725 /// <summary>
726 /// Saves the current state of the region into the baked map buffer. 726 /// Saves the current state of the region into the baked map buffer.
727 727
728 /// </summary> 728 /// </summary>
729 public void UpdateBakedMap() 729 public void UpdateBakedMap()
730 { 730 {
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
825 m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); 825 m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
826 } 826 }
827 827
828 828
829 /// <summary> 829 /// <summary>
830 /// This is used to check to see of any of the terrain is tainted and, if so, schedule 830 /// This is used to check to see of any of the terrain is tainted and, if so, schedule
831 /// updates for all the presences. 831 /// updates for all the presences.
@@ -945,7 +945,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
945 lock (m_perClientPatchUpdates) 945 lock (m_perClientPatchUpdates)
946 m_perClientPatchUpdates.Remove(client); 946 m_perClientPatchUpdates.Remove(client);
947 } 947 }
948 948
949 /// <summary> 949 /// <summary>
950 /// Scan over changes in the terrain and limit height changes. This enforces the 950 /// Scan over changes in the terrain and limit height changes. This enforces the
951 /// non-estate owner limits on rate of terrain editting. 951 /// non-estate owner limits on rate of terrain editting.
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1312 } 1312 }
1313 } 1313 }
1314 return ret; 1314 return ret;
1315 } 1315 }
1316 1316
1317 private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action, 1317 private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action,
1318 float north, float west, float south, float east, UUID agentId) 1318 float north, float west, float south, float east, UUID agentId)
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
index 0563ad0..6a832bc 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs
@@ -45,8 +45,8 @@ namespace OpenSim.Region.CoreModules.Terrain.Tests
45 //UUID userId = TestHelpers.ParseTail(0x1); 45 //UUID userId = TestHelpers.ParseTail(0x1);
46 46
47 TerrainModule tm = new TerrainModule(); 47 TerrainModule tm = new TerrainModule();
48 Scene scene = new SceneHelpers().SetupScene(); 48 Scene scene = new SceneHelpers().SetupScene();
49 SceneHelpers.SetupSceneModules(scene, tm); 49 SceneHelpers.SetupSceneModules(scene, tm);
50 50
51 // Fillheight of 30 51 // Fillheight of 30
52 { 52 {
diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
index 3f5d375..04b6f00 100644
--- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
+++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs
@@ -39,14 +39,14 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
39{ 39{
40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")] 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "VegetationModule")]
41 public class VegetationModule : INonSharedRegionModule, IVegetationModule 41 public class VegetationModule : INonSharedRegionModule, IVegetationModule
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 protected Scene m_scene; 45 protected Scene m_scene;
46 46
47 protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree }; 47 protected static readonly PCode[] creationCapabilities = new PCode[] { PCode.Grass, PCode.NewTree, PCode.Tree };
48 public PCode[] CreationCapabilities { get { return creationCapabilities; } } 48 public PCode[] CreationCapabilities { get { return creationCapabilities; } }
49 49
50 public void Initialise(IConfigSource source) 50 public void Initialise(IConfigSource source)
51 { 51 {
52 } 52 }
@@ -83,10 +83,10 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
83 treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree; 83 treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree;
84 treeShape.Scale = scale; 84 treeShape.Scale = scale;
85 treeShape.State = (byte)treeType; 85 treeShape.State = (byte)treeType;
86 86
87 return m_scene.AddNewPrim(uuid, groupID, position, rotation, treeShape); 87 return m_scene.AddNewPrim(uuid, groupID, position, rotation, treeShape);
88 } 88 }
89 89
90 public SceneObjectGroup CreateEntity( 90 public SceneObjectGroup CreateEntity(
91 UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape) 91 UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
92 { 92 {
@@ -95,22 +95,22 @@ namespace OpenSim.Region.CoreModules.World.Vegetation
95 m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name); 95 m_log.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
96 return null; 96 return null;
97 } 97 }
98 98
99 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape); 99 SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape);
100 SceneObjectPart rootPart = sceneObject.GetPart(sceneObject.UUID); 100 SceneObjectPart rootPart = sceneObject.GetPart(sceneObject.UUID);
101 101
102 // if grass or tree, make phantom 102 // if grass or tree, make phantom
103 //rootPart.TrimPermissions(); 103 //rootPart.TrimPermissions();
104 rootPart.AddFlag(PrimFlags.Phantom); 104 rootPart.AddFlag(PrimFlags.Phantom);
105 if (rootPart.Shape.PCode != (byte)PCode.Grass) 105 if (rootPart.Shape.PCode != (byte)PCode.Grass)
106 AdaptTree(ref shape); 106 AdaptTree(ref shape);
107 107
108 m_scene.AddNewSceneObject(sceneObject, true); 108 m_scene.AddNewSceneObject(sceneObject, true);
109 sceneObject.SetGroup(groupID, null); 109 sceneObject.SetGroup(groupID, null);
110 110
111 return sceneObject; 111 return sceneObject;
112 } 112 }
113 113
114 protected void AdaptTree(ref PrimitiveBaseShape tree) 114 protected void AdaptTree(ref PrimitiveBaseShape tree)
115 { 115 {
116 // Tree size has to be adapted depending on its type 116 // Tree size has to be adapted depending on its type
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
index 4719ba3..226b330 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/TerrainSplat.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
226 float pctX = (float)x / 255f; 226 float pctX = (float)x / 255f;
227 float pctY = (float)y / 255f; 227 float pctY = (float)y / 255f;
228 228
229 // Use bilinear interpolation between the four corners of start height and 229 // Use bilinear interpolation between the four corners of start height and
230 // height range to select the current values at this position 230 // height range to select the current values at this position
231 float startHeight = ImageUtils.Bilinear( 231 float startHeight = ImageUtils.Bilinear(
232 startHeights[0], 232 startHeights[0],
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
257 float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f; 257 float highFreq = Perlin.turbulence2(vec.X, vec.Y, 2f) * 2.25f;
258 float noise = (lowFreq + highFreq) * 2f; 258 float noise = (lowFreq + highFreq) * 2f;
259 259
260 // Combine the current height, generated noise, start height, and height range parameters, then scale all of it 260 // Combine the current height, generated noise, start height, and height range parameters, then scale all of it
261 float layer = ((height + noise - startHeight) / heightRange) * 4f; 261 float layer = ((height + noise - startHeight) / heightRange) * 4f;
262 if (Single.IsNaN(layer)) 262 if (Single.IsNaN(layer))
263 layer = 0f; 263 layer = 0f;
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
index cb37067..4934ebd 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
96 96
97 m_Enabled = true; 97 m_Enabled = true;
98 98
99 m_drawPrimVolume 99 m_drawPrimVolume
100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume); 100 = Util.GetConfigVarFromSections<bool>(m_config, "DrawPrimOnMapTile", configSections, m_drawPrimVolume);
101 m_textureTerrain 101 m_textureTerrain
102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain); 102 = Util.GetConfigVarFromSections<bool>(m_config, "TextureOnMapTile", configSections, m_textureTerrain);
103 m_texturePrims 103 m_texturePrims
104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims); 104 = Util.GetConfigVarFromSections<bool>(m_config, "TexturePrims", configSections, m_texturePrims);
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f); 277 m_scene.RegionInfo.RegionSizeY * 0.5f - 0.5f);
278 278
279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR)); 279 warp_Material waterColorMaterial = new warp_Material(ConvertColor(WATER_COLOR));
280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif 280 waterColorMaterial.setReflectivity(0); // match water color with standard map module thanks lkalif
281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); 281 waterColorMaterial.setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial); 282 renderer.Scene.addMaterial("WaterColor", waterColorMaterial);
283 renderer.SetObjectMaterial("Water", "WaterColor"); 283 renderer.SetObjectMaterial("Water", "WaterColor");
@@ -292,7 +292,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
292 292
293 float regionsx = m_scene.RegionInfo.RegionSizeX; 293 float regionsx = m_scene.RegionInfo.RegionSizeX;
294 float regionsy = m_scene.RegionInfo.RegionSizeY; 294 float regionsy = m_scene.RegionInfo.RegionSizeY;
295 295
296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding 296 // 'diff' is the difference in scale between the real region size and the size of terrain we're buiding
297 float diff = regionsx / 256f; 297 float diff = regionsx / 256f;
298 298
@@ -377,7 +377,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
377 warp_Material material = new warp_Material(texture); 377 warp_Material material = new warp_Material(texture);
378 material.setReflectivity(50); 378 material.setReflectivity(50);
379 renderer.Scene.addMaterial("TerrainColor", material); 379 renderer.Scene.addMaterial("TerrainColor", material);
380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif 380 renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif
381 renderer.SetObjectMaterial("Terrain", "TerrainColor"); 381 renderer.SetObjectMaterial("Terrain", "TerrainColor");
382 } 382 }
383 383
@@ -530,7 +530,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
530 530
531 if (!fetched) 531 if (!fetched)
532 { 532 {
533 // Fetch the texture, decode and get the average color, 533 // Fetch the texture, decode and get the average color,
534 // then save it to a temporary metadata asset 534 // then save it to a temporary metadata asset
535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); 535 AssetBase textureAsset = m_scene.AssetService.Get(face.TextureID.ToString());
536 if (textureAsset != null) 536 if (textureAsset != null)
@@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
616 catch (Exception e) 616 catch (Exception e)
617 { 617 {
618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); 618 m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e);
619 } 619 }
620 } 620 }
621 621
622 return ret; 622 return ret;
@@ -678,10 +678,10 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
678 { 678 {
679 width = bitmap.Width; 679 width = bitmap.Width;
680 height = bitmap.Height; 680 height = bitmap.Height;
681 681
682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat); 682 BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4; 683 pixelBytes = (bitmap.PixelFormat == PixelFormat.Format24bppRgb) ? 3 : 4;
684 684
685 // Sum up the individual channels 685 // Sum up the individual channels
686 unsafe 686 unsafe
687 { 687 {
@@ -690,7 +690,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
690 for (int y = 0; y < height; y++) 690 for (int y = 0; y < height; y++)
691 { 691 {
692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 692 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
693 693
694 for (int x = 0; x < width; x++) 694 for (int x = 0; x < width; x++)
695 { 695 {
696 b += row[x * pixelBytes + 0]; 696 b += row[x * pixelBytes + 0];
@@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
705 for (int y = 0; y < height; y++) 705 for (int y = 0; y < height; y++)
706 { 706 {
707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride); 707 byte* row = (byte*)bitmapData.Scan0 + (y * bitmapData.Stride);
708 708
709 for (int x = 0; x < width; x++) 709 for (int x = 0; x < width; x++)
710 { 710 {
711 b += row[x * pixelBytes + 0]; 711 b += row[x * pixelBytes + 0];
diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
index 65691fe..a2b44df 100644
--- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
+++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
50 private float m_avgDirection = 0.0f; // Average direction of the wind in degrees 50 private float m_avgDirection = 0.0f; // Average direction of the wind in degrees
51 private float m_varStrength = 5.0f; // Max Strength Variance 51 private float m_varStrength = 5.0f; // Max Strength Variance
52 private float m_varDirection = 30.0f;// Max Direction Variance 52 private float m_varDirection = 30.0f;// Max Direction Variance
53 private float m_rateChange = 1.0f; // 53 private float m_rateChange = 1.0f; //
54 54
55 private Vector2 m_curPredominateWind = new Vector2(); 55 private Vector2 m_curPredominateWind = new Vector2();
56 56
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
70 70
71 public void Initialise() 71 public void Initialise()
72 { 72 {
73 73
74 } 74 }
75 75
76 #endregion 76 #endregion
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
111 // Prevailing wind algorithm 111 // Prevailing wind algorithm
112 // Inspired by Kanker Greenacre 112 // Inspired by Kanker Greenacre
113 113
114 // TODO: 114 // TODO:
115 // * This should probably be based on in-world time. 115 // * This should probably be based on in-world time.
116 // * should probably move all these local variables to class members and constants 116 // * should probably move all these local variables to class members and constants
117 double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f; 117 double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
125 offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3); 125 offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3);
126 double windSpeed = m_avgStrength + (m_varStrength * offset); 126 double windSpeed = m_avgStrength + (m_varStrength * offset);
127 127
128 if (windSpeed < 0) 128 if (windSpeed < 0)
129 windSpeed = -windSpeed; 129 windSpeed = -windSpeed;
130 130
131 m_curPredominateWind.X = (float)Math.Cos(windDir); 131 m_curPredominateWind.X = (float)Math.Cos(windDir);
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
157 157
158 public string Description 158 public string Description
159 { 159 {
160 get 160 get
161 { 161 {
162 return "Provides a predominate wind direction that can change within configured variances for direction and speed."; 162 return "Provides a predominate wind direction that can change within configured variances for direction and speed.";
163 } 163 }
164 } 164 }
165 165
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
index 95cf57d..a1fff62 100644
--- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
+++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules
155 // Register event handlers for when Avatars enter the region, and frame ticks 155 // Register event handlers for when Avatars enter the region, and frame ticks
156 m_scene.EventManager.OnFrame += WindUpdate; 156 m_scene.EventManager.OnFrame += WindUpdate;
157 157
158 // Register the wind module 158 // Register the wind module
159 m_scene.RegisterModuleInterface<IWindModule>(this); 159 m_scene.RegisterModuleInterface<IWindModule>(this);
160 160
161 // Generate initial wind values 161 // Generate initial wind values
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules
351 #region IWindModule Methods 351 #region IWindModule Methods
352 352
353 /// <summary> 353 /// <summary>
354 /// Retrieve the wind speed at the given region coordinate. This 354 /// Retrieve the wind speed at the given region coordinate. This
355 /// implimentation ignores Z. 355 /// implimentation ignores Z.
356 /// </summary> 356 /// </summary>
357 /// <param name="x">0...255</param> 357 /// <param name="x">0...255</param>
@@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules
396 396
397 public string WindActiveModelPluginName 397 public string WindActiveModelPluginName
398 { 398 {
399 get 399 get
400 { 400 {
401 if (m_activeWindPlugin != null) 401 if (m_activeWindPlugin != null)
402 { 402 {
@@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules
429 { 429 {
430 client.SendWindData(m_dataVersion, windSpeeds); 430 client.SendWindData(m_dataVersion, windSpeeds);
431 }); 431 });
432 432
433 } 433 }
434 finally 434 finally
435 { 435 {
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules
440 } 440 }
441 441
442 /// <summary> 442 /// <summary>
443 /// Calculate new wind 443 /// Calculate new wind
444 /// returns false if no change 444 /// returns false if no change
445 /// </summary> 445 /// </summary>
446 446
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index fb63c6a..5876df3 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -186,7 +186,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
186 // remoteClient.SendAlertMessage("Hyperlink could not be established."); 186 // remoteClient.SendAlertMessage("Hyperlink could not be established.");
187 187
188 //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count); 188 //m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions", mapName, regionInfos.Count);
189 189
190 MapBlockData data; 190 MapBlockData data;
191 if (regionInfos != null && regionInfos.Count > 0) 191 if (regionInfos != null && regionInfos.Count > 0)
192 { 192 {
@@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
214 // send extra user messages for V3 214 // send extra user messages for V3
215 // because the UI is very confusing 215 // because the UI is very confusing
216 // while we don't fix the hard-coded urls 216 // while we don't fix the hard-coded urls
217 if (flags == 2) 217 if (flags == 2)
218 { 218 {
219 if (regionInfos == null || regionInfos.Count == 0) 219 if (regionInfos == null || regionInfos.Count == 0)
220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true); 220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index c249e9d..5dcf326 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
68 private static readonly UUID STOP_UUID = UUID.Random(); 68 private static readonly UUID STOP_UUID = UUID.Random();
69 69
70 private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); 70 private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>();
71 71
72 private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false); 72 private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false);
73 private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>(); 73 private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>();
74 74
@@ -729,7 +729,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
729 break; 729 break;
730 730
731 // agent gone? 731 // agent gone?
732 732
733 m_scene.TryGetScenePresence(st.agentID, out av); 733 m_scene.TryGetScenePresence(st.agentID, out av);
734 if (av == null || av.IsChildAgent || av.IsDeleted || av.IsInTransit) 734 if (av == null || av.IsChildAgent || av.IsDeleted || av.IsInTransit)
735 continue; 735 continue;
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
748 { 748 {
749 m_cachedRegionMapItemsResponses.TryGetValue(st.regionhandle, out responseMap); 749 m_cachedRegionMapItemsResponses.TryGetValue(st.regionhandle, out responseMap);
750 dorequest = false; 750 dorequest = false;
751 } 751 }
752 else 752 else
753 m_cachedRegionMapItemsResponses.Add(st.regionhandle, null, expireResponsesTime); // a bit more time for the access 753 m_cachedRegionMapItemsResponses.Add(st.regionhandle, null, expireResponsesTime); // a bit more time for the access
754 } 754 }
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1133 if(m_mapBlockRequests[agentID].Count < 150 ) 1133 if(m_mapBlockRequests[agentID].Count < 150 )
1134 m_mapBlockRequests[agentID].Enqueue(req); 1134 m_mapBlockRequests[agentID].Enqueue(req);
1135 else 1135 else
1136 { 1136 {
1137 spamBlocked[agentID] = now + SPAMBLOCKTIMEms; 1137 spamBlocked[agentID] = now + SPAMBLOCKTIMEms;
1138 m_log.DebugFormat("[WoldMapModule] RequestMapBlocks blocking spammer {0} for {1} s",agentID, SPAMBLOCKTIMEms/1000.0); 1138 m_log.DebugFormat("[WoldMapModule] RequestMapBlocks blocking spammer {0} for {1} s",agentID, SPAMBLOCKTIMEms/1000.0);
1139 } 1139 }
@@ -1193,7 +1193,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1193 maxY * (int)Constants.RegionSize); 1193 maxY * (int)Constants.RegionSize);
1194 1194
1195 // only send a negative answer for a single region request 1195 // only send a negative answer for a single region request
1196 // corresponding to a click on the map. Current viewers 1196 // corresponding to a click on the map. Current viewers
1197 // keep displaying "loading.." without this 1197 // keep displaying "loading.." without this
1198 if (regions.Count == 0 && (flag & 0x10000) != 0 && minX == maxX && minY == maxY) 1198 if (regions.Count == 0 && (flag & 0x10000) != 0 && minX == maxX && minY == maxY)
1199 { 1199 {
@@ -1539,7 +1539,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1539 responsemap["10"] = responsearr; 1539 responsemap["10"] = responsearr;
1540 else 1540 else
1541 responsemap["7"] = responsearr; 1541 responsemap["7"] = responsearr;
1542 } 1542 }
1543 } 1543 }
1544 1544
1545 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) 1545 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
diff --git a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
index e0aad2b..b8278d6 100644
--- a/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAgentAssetTransactions.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Framework.Interfaces
39 bool HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID, 39 bool HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
40 uint callbackID, string description, string name, sbyte invType, 40 uint callbackID, string description, string name, sbyte invType,
41 sbyte type, byte wearableType, uint nextOwnerMask); 41 sbyte type, byte wearableType, uint nextOwnerMask);
42 42
43 void HandleTaskItemUpdateFromTransaction( 43 void HandleTaskItemUpdateFromTransaction(
44 IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item); 44 IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item);
45 45
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index b008068..2f5ff9b 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Interfaces
112 /// <param name="sp"></param> 112 /// <param name="sp"></param>
113 /// <param name="rezlist"></param> 113 /// <param name="rezlist"></param>
114 void RezMultipleAttachmentsFromInventory(IScenePresence sp,List<KeyValuePair<UUID, uint>> rezlist); 114 void RezMultipleAttachmentsFromInventory(IScenePresence sp,List<KeyValuePair<UUID, uint>> rezlist);
115 115
116 /// <summary> 116 /// <summary>
117 /// Detach the given item to the ground. 117 /// Detach the given item to the ground.
118 /// </summary> 118 /// </summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Interfaces
135 /// <param name="sp">/param> 135 /// <param name="sp">/param>
136 /// <param name="grp">The attachment to detach.</param> 136 /// <param name="grp">The attachment to detach.</param>
137 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp); 137 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp);
138 138
139 /// Update the position of an attachment. 139 /// Update the position of an attachment.
140 /// </summary> 140 /// </summary>
141 /// <param name="sog"></param> 141 /// <param name="sog"></param>
diff --git a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
index d1ce4c0..1bbf10e 100644
--- a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs
@@ -31,7 +31,7 @@ using OpenSim.Framework;
31namespace OpenSim.Region.Framework.Interfaces 31namespace OpenSim.Region.Framework.Interfaces
32{ 32{
33 public interface IBuySellModule 33 public interface IBuySellModule
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// Try to buy an object 36 /// Try to buy an object
37 /// </summary> 37 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
index 30d404e..761b1bb 100644
--- a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs
@@ -41,13 +41,13 @@ namespace OpenSim.Region.Framework.Interfaces
41 /// <param name="agentId"></param> 41 /// <param name="agentId"></param>
42 /// <param name="capsObjectPath"></param> 42 /// <param name="capsObjectPath"></param>
43 void CreateCaps(UUID agentId, uint circuitCode); 43 void CreateCaps(UUID agentId, uint circuitCode);
44 44
45 /// <summary> 45 /// <summary>
46 /// Remove the caps handler for a given agent. 46 /// Remove the caps handler for a given agent.
47 /// </summary> 47 /// </summary>
48 /// <param name="agentId"></param> 48 /// <param name="agentId"></param>
49 void RemoveCaps(UUID agentId, uint circuitCode); 49 void RemoveCaps(UUID agentId, uint circuitCode);
50 50
51 /// <summary> 51 /// <summary>
52 /// Will return null if the agent doesn't have a caps handler registered 52 /// Will return null if the agent doesn't have a caps handler registered
53 /// </summary> 53 /// </summary>
@@ -55,13 +55,13 @@ namespace OpenSim.Region.Framework.Interfaces
55 Caps GetCapsForUser(uint circuitCode); 55 Caps GetCapsForUser(uint circuitCode);
56 56
57 void SetAgentCapsSeeds(AgentCircuitData agent); 57 void SetAgentCapsSeeds(AgentCircuitData agent);
58 58
59 Dictionary<ulong, string> GetChildrenSeeds(UUID agentID); 59 Dictionary<ulong, string> GetChildrenSeeds(UUID agentID);
60 60
61 string GetChildSeed(UUID agentID, ulong handle); 61 string GetChildSeed(UUID agentID, ulong handle);
62 62
63 void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds); 63 void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds);
64 64
65 void DropChildSeed(UUID agentID, ulong handle); 65 void DropChildSeed(UUID agentID, ulong handle);
66 66
67 string GetCapsPath(UUID agentId); 67 string GetCapsPath(UUID agentId);
diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
index 54172bd..a73b564 100644
--- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
@@ -27,7 +27,7 @@
27 27
28namespace OpenSim.Region.Framework.Interfaces 28namespace OpenSim.Region.Framework.Interfaces
29{ 29{
30 public interface ICloudModule 30 public interface ICloudModule
31 { 31 {
32 /// <summary> 32 /// <summary>
33 /// Retrieves the cloud density at the given region coordinates 33 /// Retrieves the cloud density at the given region coordinates
diff --git a/OpenSim/Region/Framework/Interfaces/ICommander.cs b/OpenSim/Region/Framework/Interfaces/ICommander.cs
index 6b872c1..5d6428a 100644
--- a/OpenSim/Region/Framework/Interfaces/ICommander.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICommander.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Framework.Interfaces
40 /// Provide general help information about this commander. 40 /// Provide general help information about this commander.
41 /// </value> 41 /// </value>
42 string Help { get; } 42 string Help { get; }
43 43
44 /// <summary> 44 /// <summary>
45 /// The commands available for this commander 45 /// The commands available for this commander
46 /// </summary> 46 /// </summary>
47 Dictionary<string, ICommand> Commands { get; } 47 Dictionary<string, ICommand> Commands { get; }
48 48
49 void ProcessConsoleCommand(string function, string[] args); 49 void ProcessConsoleCommand(string function, string[] args);
50 void RegisterCommand(string commandName, ICommand command); 50 void RegisterCommand(string commandName, ICommand command);
51 void Run(string function, object[] args); 51 void Run(string function, object[] args);
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
index 7684ce3..1ff8fd2 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Framework.Interfaces
36 36
37 public abstract class FloaterData 37 public abstract class FloaterData
38 { 38 {
39 public abstract int Channel { get; } 39 public abstract int Channel { get; }
40 public abstract string FloaterName { get; set; } 40 public abstract string FloaterName { get; set; }
41 public virtual string XmlName { get; set; } 41 public virtual string XmlName { get; set; }
42 public virtual string XmlText { get; set; } 42 public virtual string XmlText { get; set; }
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
index 6df5cc2..441076d 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Interfaces
112 UUID AddDynamicTextureData( 112 UUID AddDynamicTextureData(
113 UUID simID, UUID primID, string contentType, string data, string extraParams, 113 UUID simID, UUID primID, string contentType, string data, string extraParams,
114 int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face); 114 int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face);
115 115
116 void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, 116 void GetDrawStringSize(string contentType, string text, string fontName, int fontSize,
117 out double xSize, out double ySize); 117 out double xSize, out double ySize);
118 } 118 }
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Interfaces
140 bool AsyncConvertUrl(UUID id, string url, string extraParams); 140 bool AsyncConvertUrl(UUID id, string url, string extraParams);
141 bool AsyncConvertData(UUID id, string bodyData, string extraParams); 141 bool AsyncConvertData(UUID id, string bodyData, string extraParams);
142 142
143 void GetDrawStringSize(string text, string fontName, int fontSize, 143 void GetDrawStringSize(string text, string fontName, int fontSize,
144 out double xSize, out double ySize); 144 out double xSize, out double ySize);
145 } 145 }
146 146
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
index c39627c..1df6486 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityCreator.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
41 /// </summary> 41 /// </summary>
42 /// <returns></returns> 42 /// <returns></returns>
43 PCode[] CreationCapabilities { get; } 43 PCode[] CreationCapabilities { get; }
44 44
45 /// <summary> 45 /// <summary>
46 /// Create an entity 46 /// Create an entity
47 /// </summary> 47 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index b85fd8b..0c4017e 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -36,8 +36,8 @@ namespace OpenSim.Region.Framework.Interfaces
36 /// <summary> 36 /// <summary>
37 /// Interface to an entity's (SceneObjectPart's) inventory 37 /// Interface to an entity's (SceneObjectPart's) inventory
38 /// </summary> 38 /// </summary>
39 /// 39 ///
40 /// This is not a finished 1.0 candidate interface 40 /// This is not a finished 1.0 candidate interface
41 public interface IEntityInventory 41 public interface IEntityInventory
42 { 42 {
43 /// <summary> 43 /// <summary>
@@ -48,21 +48,21 @@ namespace OpenSim.Region.Framework.Interfaces
48 /// <summary> 48 /// <summary>
49 /// Reset UUIDs for all the items in the prim's inventory. 49 /// Reset UUIDs for all the items in the prim's inventory.
50 /// </summary> 50 /// </summary>
51 /// 51 ///
52 /// This involves either generating 52 /// This involves either generating
53 /// new ones or setting existing UUIDs to the correct parent UUIDs. 53 /// new ones or setting existing UUIDs to the correct parent UUIDs.
54 /// 54 ///
55 /// If this method is called and there are inventory items, then we regard the inventory as having changed. 55 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
56 /// 56 ///
57 /// <param name="linkNum">Link number for the part</param> 57 /// <param name="linkNum">Link number for the part</param>
58 void ResetInventoryIDs(); 58 void ResetInventoryIDs();
59 59
60 /// <summary> 60 /// <summary>
61 /// Reset parent object UUID for all the items in the prim's inventory. 61 /// Reset parent object UUID for all the items in the prim's inventory.
62 /// </summary> 62 /// </summary>
63 /// 63 ///
64 /// If this method is called and there are inventory items, then we regard the inventory as having changed. 64 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
65 /// 65 ///
66 /// <param name="linkNum">Link number for the part</param> 66 /// <param name="linkNum">Link number for the part</param>
67 void ResetObjectID(); 67 void ResetObjectID();
68 68
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Interfaces
87 /// <param name="stateSource"></param> 87 /// <param name="stateSource"></param>
88 /// <returns>Number of scripts started.</returns> 88 /// <returns>Number of scripts started.</returns>
89 int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource); 89 int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource);
90 90
91 ArrayList GetScriptErrors(UUID itemID); 91 ArrayList GetScriptErrors(UUID itemID);
92 void ResumeScripts(); 92 void ResumeScripts();
93 93
@@ -238,10 +238,10 @@ namespace OpenSim.Region.Framework.Interfaces
238 /// <summary> 238 /// <summary>
239 /// Get the scene object(s) referenced by an inventory item. 239 /// Get the scene object(s) referenced by an inventory item.
240 /// </summary> 240 /// </summary>
241 /// 241 ///
242 /// This is returned in a 'rez ready' state. That is, name, description, permissions and other details have 242 /// This is returned in a 'rez ready' state. That is, name, description, permissions and other details have
243 /// been adjusted to reflect the part and item from which it originates. 243 /// been adjusted to reflect the part and item from which it originates.
244 /// 244 ///
245 /// <param name="item">Inventory item</param> 245 /// <param name="item">Inventory item</param>
246 /// <param name="objlist">The scene objects</param> 246 /// <param name="objlist">The scene objects</param>
247 /// <param name="veclist">Relative offsets for each object</param> 247 /// <param name="veclist">Relative offsets for each object</param>
@@ -312,7 +312,7 @@ namespace OpenSim.Region.Framework.Interfaces
312 /// </summary> 312 /// </summary>
313 /// <returns></returns> 313 /// <returns></returns>
314 List<UUID> GetInventoryList(); 314 List<UUID> GetInventoryList();
315 315
316 /// <summary> 316 /// <summary>
317 /// Get the xml representing the saved states of scripts in this inventory. 317 /// Get the xml representing the saved states of scripts in this inventory.
318 /// </summary> 318 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index d172780..9585082 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Interfaces
83 /// </summary> 83 /// </summary>
84 /// <param name='id'>The agent ID</para></param> 84 /// <param name='id'>The agent ID</para></param>
85 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns> 85 /// <returns>true if the agent is in the process of being teleported, false otherwise.</returns>
86 bool IsInTransit(UUID id); 86 bool IsInTransit(UUID id);
87 87
88 bool Cross(ScenePresence agent, bool isFlying); 88 bool Cross(ScenePresence agent, bool isFlying);
89 89
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Interfaces
95 95
96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx, 96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx,
97 out Vector3 newpos, out string reason); 97 out Vector3 newpos, out string reason);
98 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos); 98 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos);
99 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, EntityTransferContext ctx, out string reason); 99 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, EntityTransferContext ctx, out string reason);
100 100
101 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts); 101 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts);
diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
index 3f54ea5..7af56cb 100644
--- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Framework.Interfaces
41 // These are required to decouple Scenes from EventQueueHelper 41 // These are required to decouple Scenes from EventQueueHelper
42 void DisableSimulator(ulong handle, UUID avatarID); 42 void DisableSimulator(ulong handle, UUID avatarID);
43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY); 43 void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY);
44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, 44 void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint,
45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY); 45 string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY);
46 void TeleportFinishEvent(ulong regionHandle, byte simAccess, 46 void TeleportFinishEvent(ulong regionHandle, byte simAccess,
47 IPEndPoint regionExternalEndPoint, 47 IPEndPoint regionExternalEndPoint,
48 uint locationID, uint flags, string capsURL, 48 uint locationID, uint flags, string capsURL,
49 UUID agentID, int regionSizeX, int regionSizeY); 49 UUID agentID, int regionSizeX, int regionSizeY);
50 void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, 50 void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt,
51 IPEndPoint newRegionExternalEndPoint, 51 IPEndPoint newRegionExternalEndPoint,
diff --git a/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs b/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
index a730cfd..4ce150f 100644
--- a/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IExternalCapsModule.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces
37 /// <summary> 37 /// <summary>
38 /// This function extends the simple URL configuration in the caps handlers 38 /// This function extends the simple URL configuration in the caps handlers
39 /// to facilitate more interesting computation when an external handler is 39 /// to facilitate more interesting computation when an external handler is
40 /// sent to the viewer. 40 /// sent to the viewer.
41 /// </summary> 41 /// </summary>
42 /// <param name="agentID">New user UUID</param> 42 /// <param name="agentID">New user UUID</param>
43 /// <param name="caps">Internal caps registry, where the external handler will be registered</param> 43 /// <param name="caps">Internal caps registry, where the external handler will be registered</param>
diff --git a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
index 1cb9a30..52615e3 100644
--- a/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGodsModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Interfaces
44 /// <param name="godLike"></param> 44 /// <param name="godLike"></param>
45 /// <param name="controllingClient"></param> 45 /// <param name="controllingClient"></param>
46 void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike); 46 void RequestGodlikePowers(UUID agentID, UUID sessionID, UUID token, bool godLike);
47 47
48 /// <summary> 48 /// <summary>
49 /// Kicks User specified from the simulator. This logs them off of the grid. 49 /// Kicks User specified from the simulator. This logs them off of the grid.
50 /// </summary> 50 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
index 7dc1552..46d6863 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsMessagingModule.cs
@@ -34,9 +34,9 @@ namespace OpenSim.Region.Framework.Interfaces
34 /// <summary> 34 /// <summary>
35 /// Provide mechanisms for messaging groups. 35 /// Provide mechanisms for messaging groups.
36 /// </summary> 36 /// </summary>
37 /// 37 ///
38 /// TODO: Provide a mechanism for receiving group messages as well as sending them 38 /// TODO: Provide a mechanism for receiving group messages as well as sending them
39 /// 39 ///
40 public interface IGroupsMessagingModule 40 public interface IGroupsMessagingModule
41 { 41 {
42 /// <summary> 42 /// <summary>
@@ -56,13 +56,13 @@ namespace OpenSim.Region.Framework.Interfaces
56 /// True if the chat session was started successfully, false otherwise. 56 /// True if the chat session was started successfully, false otherwise.
57 /// </returns> 57 /// </returns>
58 bool StartGroupChatSession(UUID agentID, UUID groupID); 58 bool StartGroupChatSession(UUID agentID, UUID groupID);
59 59
60 /// <summary> 60 /// <summary>
61 /// Send a message to each member of a group whose chat session is active. 61 /// Send a message to each member of a group whose chat session is active.
62 /// </summary> 62 /// </summary>
63 /// <param name="im"> 63 /// <param name="im">
64 /// The message itself. The fields that must be populated are 64 /// The message itself. The fields that must be populated are
65 /// 65 ///
66 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical) 66 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
67 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog 67 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
68 /// message - The message itself 68 /// message - The message itself
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Interfaces
76 /// </summary> 76 /// </summary>
77 /// <param name="im"> 77 /// <param name="im">
78 /// The message itself. The fields that must be populated are 78 /// The message itself. The fields that must be populated are
79 /// 79 ///
80 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical) 80 /// imSessionID - Populate this with the group ID (session ID and group ID are currently identical)
81 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog 81 /// fromAgentName - Populate this with whatever arbitrary name you want to show up in the chat dialog
82 /// message - The message itself 82 /// message - The message itself
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Framework.Interfaces
84 /// </param> 84 /// </param>
85 /// <param name="groupID"></param> 85 /// <param name="groupID"></param>
86 /// <param name="sendingAgentForGroupCalls"> 86 /// <param name="sendingAgentForGroupCalls">
87 /// The requesting agent to use when querying the groups service. Sometimes this is different from 87 /// The requesting agent to use when querying the groups service. Sometimes this is different from
88 /// im.fromAgentID, with group notices, for example. 88 /// im.fromAgentID, with group notices, for example.
89 /// </param> 89 /// </param>
90 /// <param name="sendCondition"> 90 /// <param name="sendCondition">
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
index 110cb00..0d1f4f4 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Interfaces
51 /// <param name="maturePublish"></param> 51 /// <param name="maturePublish"></param>
52 /// <returns>The UUID of the created group</returns> 52 /// <returns>The UUID of the created group</returns>
53 UUID CreateGroup( 53 UUID CreateGroup(
54 IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, 54 IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
55 bool openEnrollment, bool allowPublish, bool maturePublish); 55 bool openEnrollment, bool allowPublish, bool maturePublish);
56 56
57 /// <summary> 57 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Interfaces
67 /// <param name="GroupID">ID of the group</param> 67 /// <param name="GroupID">ID of the group</param>
68 /// <returns>The group's data. Null if there is no such group.</returns> 68 /// <returns>The group's data. Null if there is no such group.</returns>
69 GroupRecord GetGroupRecord(UUID GroupID); 69 GroupRecord GetGroupRecord(UUID GroupID);
70 70
71 void ActivateGroup(IClientAPI remoteClient, UUID groupID); 71 void ActivateGroup(IClientAPI remoteClient, UUID groupID);
72 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); 72 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID);
73 List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID); 73 List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Interfaces
83 void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); 83 void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile);
84 84
85 void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); 85 void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
86 86
87 GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); 87 GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
88 string GetGroupTitle(UUID avatarID); 88 string GetGroupTitle(UUID avatarID);
89 void GroupRoleUpdate(IClientAPI remoteClient, UUID GroupID, UUID RoleID, string name, string description, string title, ulong powers, byte updateType); 89 void GroupRoleUpdate(IClientAPI remoteClient, UUID GroupID, UUID RoleID, string name, string description, string title, ulong powers, byte updateType);
diff --git a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
index efc9ddc..978c248 100644
--- a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
+++ b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// then returned via IServiceRequest when the response is asynchronously fetched. 77 /// then returned via IServiceRequest when the response is asynchronously fetched.
78 /// </param> 78 /// </param>
79 UUID StartHttpRequest( 79 UUID StartHttpRequest(
80 uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body, 80 uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body,
81 out HttpInitialRequestStatus status); 81 out HttpInitialRequestStatus status);
82 82
83 /// <summary> 83 /// <summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
index 1a89721..86aca8e 100644
--- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
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
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Interfaces
40 Array = 2, 40 Array = 2,
41 Value = 3 41 Value = 3
42 } 42 }
43 43
44 public enum JsonStoreValueType 44 public enum JsonStoreValueType
45 { 45 {
46 Undefined = 0, 46 Undefined = 0,
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Interfaces
50 String = 4, 50 String = 4,
51 UUID = 5 51 UUID = 5
52 } 52 }
53 53
54 public struct JsonStoreStats 54 public struct JsonStoreStats
55 { 55 {
56 public int StoreCount; 56 public int StoreCount;
diff --git a/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
index 290b826..b06ff2b 100644
--- a/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IMessageTransferModule.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public delegate void MessageResultNotification(bool success); 32 public delegate void MessageResultNotification(bool success);
33 public delegate void UndeliveredMessage(GridInstantMessage im); 33 public delegate void UndeliveredMessage(GridInstantMessage im);
34 34
35 public interface IMessageTransferModule 35 public interface IMessageTransferModule
36 { 36 {
37 event UndeliveredMessage OnUndeliveredMessage; 37 event UndeliveredMessage OnUndeliveredMessage;
diff --git a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
index 1d3d240..e8be70f 100644
--- a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Interfaces
45 /// <param name="face"></param> 45 /// <param name="face"></param>
46 /// <returns></returns> 46 /// <returns></returns>
47 MediaEntry GetMediaEntry(SceneObjectPart part, int face); 47 MediaEntry GetMediaEntry(SceneObjectPart part, int face);
48 48
49 /// <summary> 49 /// <summary>
50 /// Set the media entry for a given prim face. 50 /// Set the media entry for a given prim face.
51 /// </summary> 51 /// </summary>
@@ -53,13 +53,13 @@ namespace OpenSim.Region.Framework.Interfaces
53 /// <param name="face"></param> 53 /// <param name="face"></param>
54 /// <param name="me"></param> 54 /// <param name="me"></param>
55 void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me); 55 void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me);
56 56
57 /// <summary> 57 /// <summary>
58 /// Clear the media entry for a given prim face. 58 /// Clear the media entry for a given prim face.
59 /// </summary> 59 /// </summary>
60 /// 60 ///
61 /// This is the equivalent of setting a media entry of null 61 /// This is the equivalent of setting a media entry of null
62 /// 62 ///
63 /// <param name="part"></param> 63 /// <param name="part"></param>
64 /// <param name="face">/param> 64 /// <param name="face">/param>
65 void ClearMediaEntry(SceneObjectPart part, int face); 65 void ClearMediaEntry(SceneObjectPart part, int face);
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 813be4f..df872f4 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Interfaces
49 /// </summary> 49 /// </summary>
50 public interface INPC 50 public interface INPC
51 { 51 {
52 52
53 /// <summary> 53 /// <summary>
54 /// Should this NPC be sensed by LSL sensors as an 'agent' 54 /// Should this NPC be sensed by LSL sensors as an 'agent'
55 /// (interpreted here to mean a normal user) rather than an OpenSim 55 /// (interpreted here to mean a normal user) rather than an OpenSim
@@ -301,7 +301,7 @@ namespace OpenSim.Region.Framework.Interfaces
301 /// agent, the agent is unowned or the agent was not an NPC. 301 /// agent, the agent is unowned or the agent was not an NPC.
302 /// </returns> 302 /// </returns>
303 UUID GetOwner(UUID agentID); 303 UUID GetOwner(UUID agentID);
304 304
305 NPCOptionsFlags NPCOptionFlags {get;} 305 NPCOptionsFlags NPCOptionFlags {get;}
306 } 306 }
307} 307}
diff --git a/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
index 1ed978b..933ca14 100644
--- a/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Interfaces
42 42
43 public interface IPermissionsModule 43 public interface IPermissionsModule
44 { 44 {
45 45
46 /// <summary> 46 /// <summary>
47 /// Returns the type of permissions that the user has over an object. 47 /// Returns the type of permissions that the user has over an object.
48 /// </summary> 48 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
index d44c1e1..fb5933c 100644
--- a/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IPresenceModule.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Framework.Interfaces
33 { 33 {
34 public string UserID; 34 public string UserID;
35 public UUID RegionID; 35 public UUID RegionID;
36 36
37 public PresenceInfo(string userID, UUID regionID) 37 public PresenceInfo(string userID, UUID regionID)
38 { 38 {
39 UserID = userID; 39 UserID = userID;
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
index 99bc87d..9370ccd 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs
@@ -40,17 +40,17 @@ namespace OpenSim.Region.Framework.Interfaces
40 { 40 {
41 void HandleLoadOarConsoleCommand(string module, string[] cmdparams); 41 void HandleLoadOarConsoleCommand(string module, string[] cmdparams);
42 void HandleSaveOarConsoleCommand(string module, string[] cmdparams); 42 void HandleSaveOarConsoleCommand(string module, string[] cmdparams);
43 43
44 /// <summary> 44 /// <summary>
45 /// Archive the region to the given path 45 /// Archive the region to the given path
46 /// </summary> 46 /// </summary>
47 /// 47 ///
48 /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to 48 /// This method occurs asynchronously. If you want notification of when it has completed then subscribe to
49 /// the EventManager.OnOarFileSaved event. 49 /// the EventManager.OnOarFileSaved event.
50 /// 50 ///
51 /// <param name="savePath"></param> 51 /// <param name="savePath"></param>
52 void ArchiveRegion(string savePath, Dictionary<string, object> options); 52 void ArchiveRegion(string savePath, Dictionary<string, object> options);
53 53
54 /// <summary> 54 /// <summary>
55 /// Archive the region to the given path 55 /// Archive the region to the given path
56 /// </summary> 56 /// </summary>
@@ -94,35 +94,35 @@ namespace OpenSim.Region.Framework.Interfaces
94 /// </remarks> 94 /// </remarks>
95 /// <param name="loadPath"></param> 95 /// <param name="loadPath"></param>
96 void DearchiveRegion(string loadPath); 96 void DearchiveRegion(string loadPath);
97 97
98 /// <summary> 98 /// <summary>
99 /// Dearchive the given region archive. This replaces the existing scene. 99 /// Dearchive the given region archive. This replaces the existing scene.
100 /// </summary> 100 /// </summary>
101 /// 101 ///
102 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 102 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
103 /// 103 ///
104 /// <param name="loadPath"></param> 104 /// <param name="loadPath"></param>
105 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param> 105 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
106 /// <param name="options"> 106 /// <param name="options">
107 /// Dictionary of options. 107 /// Dictionary of options.
108 /// </param> 108 /// </param>
109 void DearchiveRegion(string loadPath, Guid requestId, Dictionary<string,object> options); 109 void DearchiveRegion(string loadPath, Guid requestId, Dictionary<string,object> options);
110 110
111 /// <summary> 111 /// <summary>
112 /// Dearchive a region from a stream. This replaces the existing scene. 112 /// Dearchive a region from a stream. This replaces the existing scene.
113 /// </summary> 113 /// </summary>
114 /// 114 ///
115 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 115 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
116 /// 116 ///
117 /// <param name="loadStream"></param> 117 /// <param name="loadStream"></param>
118 void DearchiveRegion(Stream loadStream); 118 void DearchiveRegion(Stream loadStream);
119 119
120 /// <summary> 120 /// <summary>
121 /// Dearchive a region from a stream. This replaces the existing scene. 121 /// Dearchive a region from a stream. This replaces the existing scene.
122 /// </summary> 122 /// </summary>
123 /// 123 ///
124 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event. 124 /// If you want notification of when it has completed then subscribe to the EventManager.OnOarFileLoaded event.
125 /// 125 ///
126 /// <param name="loadStream"></param> 126 /// <param name="loadStream"></param>
127 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param> 127 /// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
128 /// <param name="options"> 128 /// <param name="options">
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
index 2089bce..5b8f0f0 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Interfaces
92 /// this will be multiple times in one instance, while a nonshared 92 /// this will be multiple times in one instance, while a nonshared
93 /// module instance will only be called once. 93 /// module instance will only be called once.
94 /// This method is called after AddRegion has been called in all 94 /// This method is called after AddRegion has been called in all
95 /// modules for that scene, providing an opportunity to request 95 /// modules for that scene, providing an opportunity to request
96 /// another module's interface, or hook an event from another module. 96 /// another module's interface, or hook an event from another module.
97 /// </summary> 97 /// </summary>
98 /// <param name="scene"> 98 /// <param name="scene">
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
index c5b21a8..60586ff 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs
@@ -102,9 +102,9 @@ namespace OpenSim.Region.Framework.Interfaces
102 /// <param name="min"></param> 102 /// <param name="min"></param>
103 /// <param name="max"></param> 103 /// <param name="max"></param>
104 void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max); 104 void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max);
105 105
106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName); 106 void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName);
107 107
108 /// <summary> 108 /// <summary>
109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene. 109 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
110 /// </summary> 110 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index 8536db0..19ba787 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Interfaces
45 /// Dispose the database 45 /// Dispose the database
46 /// </summary> 46 /// </summary>
47 void Dispose(); 47 void Dispose();
48 48
49 /// <summary> 49 /// <summary>
50 /// Stores all object's details apart from inventory 50 /// Stores all object's details apart from inventory
51 /// </summary> 51 /// </summary>
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Interfaces
91 91
92 // Legacy version kept for downward compabibility 92 // Legacy version kept for downward compabibility
93 void StoreTerrain(double[,] terrain, UUID regionID); 93 void StoreTerrain(double[,] terrain, UUID regionID);
94 94
95 /// <summary> 95 /// <summary>
96 /// Load terrain from region storage 96 /// Load terrain from region storage
97 /// </summary> 97 /// </summary>
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Interfaces
107 double[,] LoadTerrain(UUID regionID); 107 double[,] LoadTerrain(UUID regionID);
108 108
109 void StoreLandObject(ILandObject Parcel); 109 void StoreLandObject(ILandObject Parcel);
110 110
111 /// <summary> 111 /// <summary>
112 /// <list type="bullet"> 112 /// <list type="bullet">
113 /// <item>delete from land where UUID=globalID</item> 113 /// <item>delete from land where UUID=globalID</item>
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Interfaces
116 /// </summary> 116 /// </summary>
117 /// <param name="globalID"></param> 117 /// <param name="globalID"></param>
118 void RemoveLandObject(UUID globalID); 118 void RemoveLandObject(UUID globalID);
119 119
120 List<LandData> LoadLandObjects(UUID regionUUID); 120 List<LandData> LoadLandObjects(UUID regionUUID);
121 121
122 void StoreRegionSettings(RegionSettings rs); 122 void StoreRegionSettings(RegionSettings rs);
diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
index f805863..10f421b 100644
--- a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs
@@ -35,9 +35,9 @@ public interface ISnmpModule
35 void Major(string Message, Scene scene); 35 void Major(string Message, Scene scene);
36 void ColdStart(int step , Scene scene); 36 void ColdStart(int step , Scene scene);
37 void Shutdown(int step , Scene scene); 37 void Shutdown(int step , Scene scene);
38 // 38 //
39 // Node Start/stop events 39 // Node Start/stop events
40 // 40 //
41 void LinkUp(Scene scene); 41 void LinkUp(Scene scene);
42 void LinkDown(Scene scene); 42 void LinkDown(Scene scene);
43 void BootInfo(string data, Scene scene); 43 void BootInfo(string data, Scene scene);
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
index 2d33f51..3fc5ce7 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Framework.Interfaces
48 /// This call causes all the terrain patches to be sent to the client. 48 /// This call causes all the terrain patches to be sent to the client.
49 /// </summary> 49 /// </summary>
50 void PushTerrain(IClientAPI pClient); 50 void PushTerrain(IClientAPI pClient);
51 51
52 /// <summary> 52 /// <summary>
53 /// Load a terrain from a stream. 53 /// Load a terrain from a stream.
54 /// </summary> 54 /// </summary>
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces
60 void LoadFromStream(string filename, System.Uri pathToTerrainHeightmap); 60 void LoadFromStream(string filename, System.Uri pathToTerrainHeightmap);
61 void LoadFromStream(string filename, Vector3 displacement, 61 void LoadFromStream(string filename, Vector3 displacement,
62 float radianRotation, Vector2 rotationDisplacement, Stream stream); 62 float radianRotation, Vector2 rotationDisplacement, Stream stream);
63 void LoadFromStream(string filename, Vector3 displacement, 63 void LoadFromStream(string filename, Vector3 displacement,
64 float rotationDegress, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream); 64 float rotationDegress, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream);
65 /// <summary> 65 /// <summary>
66 /// Save a terrain to a stream. 66 /// Save a terrain to a stream.
diff --git a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
index 2987184..3fc0c44 100644
--- a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
41 void ReleaseURL(string url); 41 void ReleaseURL(string url);
42 void HttpResponse(UUID request, int status, string body); 42 void HttpResponse(UUID request, int status, string body);
43 void HttpContentType(UUID request, string type); 43 void HttpContentType(UUID request, string type);
44 44
45 string GetHttpHeader(UUID request, string header); 45 string GetHttpHeader(UUID request, string header);
46 int GetFreeUrls(); 46 int GetFreeUrls();
47 47
diff --git a/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs b/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
index 2e555fa..2fe7454 100644
--- a/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IVoiceModule.cs
@@ -40,6 +40,6 @@ namespace OpenSim.Region.Framework.Interfaces
40 /// This is used by osSetParcelSIPAddress 40 /// This is used by osSetParcelSIPAddress
41 /// </summary> 41 /// </summary>
42 void setLandSIPAddress(string SIPAddress,UUID GlobalID); 42 void setLandSIPAddress(string SIPAddress,UUID GlobalID);
43 43
44 } 44 }
45} 45}
diff --git a/OpenSim/Region/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
index 4a26a71..424df87 100644
--- a/OpenSim/Region/Framework/Interfaces/IWindModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public interface IWindModule : INonSharedRegionModule 32 public interface IWindModule : INonSharedRegionModule
33 { 33 {
34 34
35 /// <summary> 35 /// <summary>
36 /// Retrieves the current wind speed at the given Region Coordinates 36 /// Retrieves the current wind speed at the given Region Coordinates
37 /// </summary> 37 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
index d76a0d7..3da4130 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Interfaces
140 /// </summary> 140 /// </summary>
141 /// <returns>ListenerInfo with filter filled in</returns> 141 /// <returns>ListenerInfo with filter filled in</returns>
142 IWorldCommListenerInfo GetNextMessage(); 142 IWorldCommListenerInfo GetNextMessage();
143 143
144 void ListenControl(UUID itemID, int handle, int active); 144 void ListenControl(UUID itemID, int handle, int active);
145 void ListenRemove(UUID itemID, int handle); 145 void ListenRemove(UUID itemID, int handle);
146 void DeleteListener(UUID itemID); 146 void DeleteListener(UUID itemID);
diff --git a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
index a6965ba..f91dfd3 100644
--- a/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Framework/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.Framework")] 9[assembly: AssemblyTitle("OpenSim.Region.Framework")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -27,7 +27,7 @@ using Mono.Addins;
27// Version information for an assembly consists of the following four values: 27// Version information for an assembly consists of the following four values:
28// 28//
29// Major Version 29// Major Version
30// Minor Version 30// Minor Version
31// Build Number 31// Build Number
32// Revision 32// Revision
33// 33//
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index eb1a970..4d350dd 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -48,16 +48,16 @@ namespace OpenSim.Region.Framework.Scenes.Animation
48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); 48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); 49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
50 50
51 public OpenSim.Framework.Animation DefaultAnimation 51 public OpenSim.Framework.Animation DefaultAnimation
52 { 52 {
53 get { return m_defaultAnimation; } 53 get { return m_defaultAnimation; }
54 } 54 }
55 55
56 public OpenSim.Framework.Animation ImplicitDefaultAnimation 56 public OpenSim.Framework.Animation ImplicitDefaultAnimation
57 { 57 {
58 get { return m_implicitDefaultAnimation; } 58 get { return m_implicitDefaultAnimation; }
59 } 59 }
60 60
61 public AnimationSet() 61 public AnimationSet()
62 { 62 {
63 ResetDefaultAnimation(); 63 ResetDefaultAnimation();
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
101 /// </summary> 101 /// </summary>
102 /// <param name='animID'></param> 102 /// <param name='animID'></param>
103 /// <param name='allowNoDefault'> 103 /// <param name='allowNoDefault'>
104 /// If true, then the default animation can be entirely removed. 104 /// If true, then the default animation can be entirely removed.
105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
106 /// </param> 106 /// </param>
107 public bool Remove(UUID animID, bool allowNoDefault) 107 public bool Remove(UUID animID, bool allowNoDefault)
@@ -215,9 +215,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
215 foreach (OpenSim.Framework.Animation anim in m_animations) 215 foreach (OpenSim.Framework.Animation anim in m_animations)
216 theArray[i++] = anim; 216 theArray[i++] = anim;
217 } 217 }
218 catch 218 catch
219 { 219 {
220 /* S%^t happens. Ignore. */ 220 /* S%^t happens. Ignore. */
221 } 221 }
222 return theArray; 222 return theArray;
223 } 223 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
index b3b38b2..def993f 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
@@ -33,8 +33,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// Written to decode and encode a binary animation asset. 35 /// Written to decode and encode a binary animation asset.
36 /// The SecondLife Client reads in a BVH file and converts 36 /// The SecondLife Client reads in a BVH file and converts
37 /// it to the format described here. This isn't 37 /// it to the format described here. This isn't
38 /// </summary> 38 /// </summary>
39 public class BinBVHAnimation 39 public class BinBVHAnimation
40 { 40 {
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
109 /// Contains an array of joints 109 /// Contains an array of joints
110 /// </summary> 110 /// </summary>
111 public binBVHJoint[] Joints; 111 public binBVHJoint[] Joints;
112 112
113 113
114 public byte[] ToBytes() 114 public byte[] ToBytes()
115 { 115 {
@@ -136,14 +136,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint); 136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint);
137 } 137 }
138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0))); 138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0)));
139 139
140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream) 140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream)
141 outputbytes = ms2.ToArray(); 141 outputbytes = ms2.ToArray();
142 } 142 }
143 143
144 return outputbytes; 144 return outputbytes;
145 } 145 }
146 146
147 public BinBVHAnimation() 147 public BinBVHAnimation()
148 { 148 {
149 rotationkeys = 0; 149 rotationkeys = 0;
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
160 EaseOutTime = 0; 160 EaseOutTime = 0;
161 HandPose = 1; 161 HandPose = 1;
162 m_jointCount = 0; 162 m_jointCount = 0;
163 163
164 Joints = new binBVHJoint[1]; 164 Joints = new binBVHJoint[1];
165 Joints[0] = new binBVHJoint(); 165 Joints[0] = new binBVHJoint();
166 Joints[0].Name = "mPelvis"; 166 Joints[0].Name = "mPelvis";
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1); 180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1);
181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1); 181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1);
182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1); 182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1);
183 183
184 184
185 } 185 }
186 186
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
235 } 235 }
236 } 236 }
237 237
238 238
239 /// <summary> 239 /// <summary>
240 /// Variable length strings seem to be null terminated in the animation asset.. but.. 240 /// Variable length strings seem to be null terminated in the animation asset.. but..
241 /// use with caution, home grown. 241 /// use with caution, home grown.
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns> 294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns>
295 private binBVHJoint readJoint(byte[] data, ref int i) 295 private binBVHJoint readJoint(byte[] data, ref int i)
296 { 296 {
297 297
298 binBVHJointKey[] positions; 298 binBVHJointKey[] positions;
299 binBVHJointKey[] rotations; 299 binBVHJointKey[] rotations;
300 300
@@ -312,14 +312,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
312 312
313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name 313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name
314 314
315 /* 315 /*
316 2 <- Priority Revisited 316 2 <- Priority Revisited
317 0 317 0
318 0 318 0
319 0 319 0
320 */ 320 */
321 321
322 /* 322 /*
323 5 <-- 5 keyframes 323 5 <-- 5 keyframes
324 0 324 0
325 0 325 0
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
327 ... 5 Keyframe data blocks 327 ... 5 Keyframe data blocks
328 */ 328 */
329 329
330 /* 330 /*
331 2 <-- 2 keyframes 331 2 <-- 2 keyframes
332 0 332 0
333 0 333 0
@@ -428,8 +428,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
428 } 428 }
429 return m_keys; 429 return m_keys;
430 } 430 }
431 431
432 432
433 433
434 } 434 }
435 /// <summary> 435 /// <summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
443 public string Name; 443 public string Name;
444 444
445 /// <summary> 445 /// <summary>
446 /// Joint Animation Override? Was the same as the Priority in testing.. 446 /// Joint Animation Override? Was the same as the Priority in testing..
447 /// </summary> 447 /// </summary>
448 public int Priority; 448 public int Priority;
449 449
@@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
523 public static class BinBVHUtil 523 public static class BinBVHUtil
524 { 524 {
525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue; 525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue;
526 526
527 public static UInt16 FloatToUInt16(float val, float lower, float upper) 527 public static UInt16 FloatToUInt16(float val, float lower, float upper)
528 { 528 {
529 UInt16 uival = 0; 529 UInt16 uival = 0;
@@ -536,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
536 { 536 {
537 upper -= lower; 537 upper -= lower;
538 val = val - lower; 538 val = val - lower;
539 539
540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value 540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value
541 } 541 }
542 else //if (lower < 0 && upper > 0) 542 else //if (lower < 0 && upper > 0)
@@ -558,8 +558,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
558 558
559 return uival; 559 return uival;
560 } 560 }
561 561
562 562
563 /// <summary> 563 /// <summary>
564 /// Endian Swap 564 /// Endian Swap
565 /// Swaps endianness if necessary 565 /// Swaps endianness if necessary
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
590 output[i] = Convert.ToByte(chr[i]); 590 output[i] = Convert.ToByte(chr[i]);
591 591
592 } 592 }
593 593
594 output[i] = Convert.ToByte('\0'); 594 output[i] = Convert.ToByte('\0');
595 return output; 595 return output;
596 } 596 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
index b79dd8f..b8db3a9 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
55 private static void LoadAnimations(string path) 55 private static void LoadAnimations(string path)
56 { 56 {
57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); 57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>();
58 58
59 using (XmlTextReader reader = new XmlTextReader(path)) 59 using (XmlTextReader reader = new XmlTextReader(path))
60 { 60 {
61 XmlDocument doc = new XmlDocument(); 61 XmlDocument doc = new XmlDocument();
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 13d4562..6b31555 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
123 /// </summary> 123 /// </summary>
124 /// <param name='animID'></param> 124 /// <param name='animID'></param>
125 /// <param name='allowNoDefault'> 125 /// <param name='allowNoDefault'>
126 /// If true, then the default animation can be entirely removed. 126 /// If true, then the default animation can be entirely removed.
127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
128 /// </param> 128 /// </param>
129 public void RemoveAnimation(UUID animID, bool allowNoDefault) 129 public void RemoveAnimation(UUID animID, bool allowNoDefault)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
192 /// that are mutually exclusive, e.g. flying and sitting. 192 /// that are mutually exclusive, e.g. flying and sitting.
193 /// </summary> 193 /// </summary>
194 /// <returns>'true' if the animation was updated</returns> 194 /// <returns>'true' if the animation was updated</returns>
195 /// 195 ///
196 196
197 197
198 198
@@ -488,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
488 m_animTickLand = Environment.TickCount; 488 m_animTickLand = Environment.TickCount;
489 // TODO: SOFT_LAND support 489 // TODO: SOFT_LAND support
490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity; 490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity;
491 if (fallVsq > 300f) // aprox 20*h 491 if (fallVsq > 300f) // aprox 20*h
492 return "STANDUP"; 492 return "STANDUP";
493 else if (fallVsq > 160f) 493 else if (fallVsq > 160f)
494 return "SOFT_LAND"; 494 return "SOFT_LAND";
diff --git a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
index 4362e28..c874fdb 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncInventorySender.cs
@@ -144,10 +144,10 @@ namespace OpenSim.Region.Framework.Scenes
144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID); 144// "[ASYNC INVENTORY SENDER]: Handling request from {0} for {1} on queue", fh.Client.Name, fh.ItemID);
145 145
146 InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID); 146 InventoryItemBase item = m_scene.InventoryService.GetItem(fh.Client.AgentId, fh.ItemID);
147 147
148 if (item != null) 148 if (item != null)
149 fh.Client.SendInventoryItemDetails(item.Owner, item); 149 fh.Client.SendInventoryItemDetails(item.Owner, item);
150 150
151 // TODO: Possibly log any failure 151 // TODO: Possibly log any failure
152 } 152 }
153 } 153 }
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index 11a0146..7509686 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -44,29 +44,29 @@ namespace OpenSim.Region.Framework.Scenes
44 public UUID folderID; 44 public UUID folderID;
45 public bool permissionToDelete; 45 public bool permissionToDelete;
46 } 46 }
47 47
48 /// <summary> 48 /// <summary>
49 /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding 49 /// Asynchronously derez objects. This is used to derez large number of objects to inventory without holding
50 /// up the main client thread. 50 /// up the main client thread.
51 /// </summary> 51 /// </summary>
52 public class AsyncSceneObjectGroupDeleter 52 public class AsyncSceneObjectGroupDeleter
53 { 53 {
54 private static readonly ILog m_log 54 private static readonly ILog m_log
55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 /// <value> 57 /// <value>
58 /// Is the deleter currently enabled? 58 /// Is the deleter currently enabled?
59 /// </value> 59 /// </value>
60 public bool Enabled; 60 public bool Enabled;
61 61
62 private Timer m_inventoryTicker = new Timer(2000); 62 private Timer m_inventoryTicker = new Timer(2000);
63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); 63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
64 private Scene m_scene; 64 private Scene m_scene;
65 65
66 public AsyncSceneObjectGroupDeleter(Scene scene) 66 public AsyncSceneObjectGroupDeleter(Scene scene)
67 { 67 {
68 m_scene = scene; 68 m_scene = scene;
69 69
70 m_inventoryTicker.AutoReset = false; 70 m_inventoryTicker.AutoReset = false;
71 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; 71 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
72 } 72 }
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes
75 /// Delete the given object from the scene 75 /// Delete the given object from the scene
76 /// </summary> 76 /// </summary>
77 public void DeleteToInventory(DeRezAction action, UUID folderID, 77 public void DeleteToInventory(DeRezAction action, UUID folderID,
78 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient, 78 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient,
79 bool permissionToDelete) 79 bool permissionToDelete)
80 { 80 {
81 if (Enabled) 81 if (Enabled)
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Scenes
97 if (Enabled) 97 if (Enabled)
98 lock (m_inventoryTicker) 98 lock (m_inventoryTicker)
99 m_inventoryTicker.Start(); 99 m_inventoryTicker.Start();
100 100
101 // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object 101 // Visually remove it, even if it isnt really gone yet. This means that if we crash before the object
102 // has gone to inventory, it will reappear in the region again on restart instead of being lost. 102 // has gone to inventory, it will reappear in the region again on restart instead of being lost.
103 // This is not ideal since the object will still be available for manipulation when it should be, but it's 103 // This is not ideal since the object will still be available for manipulation when it should be, but it's
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 g.DeleteGroupFromScene(false); 108 g.DeleteGroupFromScene(false);
109 } 109 }
110 } 110 }
111 111
112 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e) 112 private void InventoryRunDeleteTimer(object sender, ElapsedEventArgs e)
113 { 113 {
114// m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop"); 114// m_log.Debug("[ASYNC DELETER]: Starting send to inventory loop");
@@ -116,8 +116,8 @@ namespace OpenSim.Region.Framework.Scenes
116 // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved 116 // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved
117 // in a culture where decimal points are commas and then reloaded in a culture which just treats them as 117 // in a culture where decimal points are commas and then reloaded in a culture which just treats them as
118 // number seperators. 118 // number seperators.
119 Culture.SetCurrentCulture(); 119 Culture.SetCurrentCulture();
120 120
121 while (InventoryDeQueueAndDelete()) 121 while (InventoryDeQueueAndDelete())
122 { 122 {
123 //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing..."); 123 //m_log.Debug("[ASYNC DELETER]: Sent item successfully to inventory, continuing...");
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Framework.Scenes
131 public bool InventoryDeQueueAndDelete() 131 public bool InventoryDeQueueAndDelete()
132 { 132 {
133 DeleteToInventoryHolder x = null; 133 DeleteToInventoryHolder x = null;
134 134
135 try 135 try
136 { 136 {
137 lock (m_inventoryDeletes) 137 lock (m_inventoryDeletes)
@@ -144,13 +144,13 @@ namespace OpenSim.Region.Framework.Scenes
144// m_log.DebugFormat( 144// m_log.DebugFormat(
145// "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.", 145// "[ASYNC DELETER]: Sending object to user's inventory, action {1}, count {2}, {0} item(s) remaining.",
146// left, x.action, x.objectGroups.Count); 146// left, x.action, x.objectGroups.Count);
147 147
148 try 148 try
149 { 149 {
150 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); 150 IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>();
151 if (invAccess != null) 151 if (invAccess != null)
152 invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false); 152 invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false);
153 153
154 if (x.permissionToDelete) 154 if (x.permissionToDelete)
155 { 155 {
156 foreach (SceneObjectGroup g in x.objectGroups) 156 foreach (SceneObjectGroup g in x.objectGroups)
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Framework.Scenes
162 m_log.ErrorFormat( 162 m_log.ErrorFormat(
163 "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace); 163 "[ASYNC DELETER]: Exception background sending object: {0}{1}", e.Message, e.StackTrace);
164 } 164 }
165 165
166 return true; 166 return true;
167 } 167 }
168 } 168 }
@@ -173,14 +173,14 @@ namespace OpenSim.Region.Framework.Scenes
173 // FIXME: This needs to be fixed. 173 // FIXME: This needs to be fixed.
174 m_log.ErrorFormat( 174 m_log.ErrorFormat(
175 "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}", 175 "[ASYNC DELETER]: Queued sending of scene object to agent {0} {1} failed: {2} {3}",
176 (x != null ? x.remoteClient.Name : "unavailable"), 176 (x != null ? x.remoteClient.Name : "unavailable"),
177 (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"), 177 (x != null ? x.remoteClient.AgentId.ToString() : "unavailable"),
178 e.Message, 178 e.Message,
179 e.StackTrace); 179 e.StackTrace);
180 } 180 }
181 181
182// m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue."); 182// m_log.Debug("[ASYNC DELETER]: No objects left in inventory send queue.");
183 183
184 return false; 184 return false;
185 } 185 }
186 } 186 }
diff --git a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
index af8ccda..8831764 100644
--- a/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
+++ b/OpenSim/Region/Framework/Scenes/CoalescedSceneObjects.cs
@@ -37,12 +37,12 @@ namespace OpenSim.Region.Framework.Scenes
37 /// are grouped together. 37 /// are grouped together.
38 /// </summary> 38 /// </summary>
39 public class CoalescedSceneObjects 39 public class CoalescedSceneObjects
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// The creator of this coalesence, though not necessarily the objects within it. 42 /// The creator of this coalesence, though not necessarily the objects within it.
43 /// </summary> 43 /// </summary>
44 public UUID CreatorId { get; set; } 44 public UUID CreatorId { get; set; }
45 45
46 /// <summary> 46 /// <summary>
47 /// The number of objects in this coalesence 47 /// The number of objects in this coalesence
48 /// </summary> 48 /// </summary>
@@ -54,12 +54,12 @@ namespace OpenSim.Region.Framework.Scenes
54 return m_memberObjects.Count; 54 return m_memberObjects.Count;
55 } 55 }
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Does this coalesence have any member objects? 59 /// Does this coalesence have any member objects?
60 /// </summary> 60 /// </summary>
61 public bool HasObjects { get { return Count > 0; } } 61 public bool HasObjects { get { return Count > 0; } }
62 62
63 /// <summary> 63 /// <summary>
64 /// Get the objects currently in this coalescence 64 /// Get the objects currently in this coalescence
65 /// </summary> 65 /// </summary>
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Framework.Scenes
70 lock (m_memberObjects) 70 lock (m_memberObjects)
71 return new List<SceneObjectGroup>(m_memberObjects); 71 return new List<SceneObjectGroup>(m_memberObjects);
72 } 72 }
73 } 73 }
74 74
75 /// <summary> 75 /// <summary>
76 /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned. 76 /// Get the scene that contains the objects in this coalescence. If there are no objects then null is returned.
77 /// </summary> 77 /// </summary>
78 public Scene Scene 78 public Scene Scene
79 { 79 {
80 get 80 get
81 { 81 {
82 if (!HasObjects) 82 if (!HasObjects)
@@ -85,24 +85,24 @@ namespace OpenSim.Region.Framework.Scenes
85 return Objects[0].Scene; 85 return Objects[0].Scene;
86 } 86 }
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// At this point, we need to preserve the order of objects added to the coalescence, since the first 90 /// At this point, we need to preserve the order of objects added to the coalescence, since the first
91 /// one will end up matching the item name when rerezzed. 91 /// one will end up matching the item name when rerezzed.
92 /// </summary> 92 /// </summary>
93 protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>(); 93 protected List<SceneObjectGroup> m_memberObjects = new List<SceneObjectGroup>();
94 94
95 public CoalescedSceneObjects(UUID creatorId) 95 public CoalescedSceneObjects(UUID creatorId)
96 { 96 {
97 CreatorId = creatorId; 97 CreatorId = creatorId;
98 } 98 }
99 99
100 public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId) 100 public CoalescedSceneObjects(UUID creatorId, params SceneObjectGroup[] objs) : this(creatorId)
101 { 101 {
102 foreach (SceneObjectGroup obj in objs) 102 foreach (SceneObjectGroup obj in objs)
103 Add(obj); 103 Add(obj);
104 } 104 }
105 105
106 /// <summary> 106 /// <summary>
107 /// Add an object to the coalescence. 107 /// Add an object to the coalescence.
108 /// </summary> 108 /// </summary>
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
113 lock (m_memberObjects) 113 lock (m_memberObjects)
114 m_memberObjects.Add(obj); 114 m_memberObjects.Add(obj);
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Removes a scene object from the coalescene 118 /// Removes a scene object from the coalescene
119 /// </summary> 119 /// </summary>
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
124 lock (m_memberObjects) 124 lock (m_memberObjects)
125 return m_memberObjects.Remove(obj); 125 return m_memberObjects.Remove(obj);
126 } 126 }
127 127
128 /// <summary> 128 /// <summary>
129 /// Get the total size of the coalescence (the size required to cover all the objects within it) and the 129 /// Get the total size of the coalescence (the size required to cover all the objects within it) and the
130 /// offsets of each of those objects. 130 /// offsets of each of those objects.
@@ -138,16 +138,16 @@ namespace OpenSim.Region.Framework.Scenes
138 float minX, minY, minZ; 138 float minX, minY, minZ;
139 float maxX, maxY, maxZ; 139 float maxX, maxY, maxZ;
140 140
141 Vector3[] offsets 141 Vector3[] offsets
142 = Scene.GetCombinedBoundingBox( 142 = Scene.GetCombinedBoundingBox(
143 Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ); 143 Objects, out minX, out maxX, out minY, out maxY, out minZ, out maxZ);
144 144
145 float sizeX = maxX - minX; 145 float sizeX = maxX - minX;
146 float sizeY = maxY - minY; 146 float sizeY = maxY - minY;
147 float sizeZ = maxZ - minZ; 147 float sizeZ = maxZ - minZ;
148 148
149 size = new Vector3(sizeX, sizeY, sizeZ); 149 size = new Vector3(sizeX, sizeY, sizeZ);
150 150
151 return offsets; 151 return offsets;
152 } 152 }
153 } 153 }
diff --git a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
index 84817a0..e76fef4 100644
--- a/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
+++ b/OpenSim/Region/Framework/Scenes/CollisionSounds.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
113 snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber, 113 snd_StonePlastic, snd_MetalPlastic, snd_GlassPlastic, snd_WoodPlastic, snd_FleshPlastic, snd_PlasticPlastic, snd_PlasticRubber,
114 snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber 114 snd_StoneRubber, snd_MetalRubber, snd_GlassRubber, snd_WoodRubber, snd_FleshRubber, snd_PlasticRubber, snd_RubberRubber
115 }; 115 };
116 116
117 public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist) 117 public static void PartCollisionSound(SceneObjectPart part, List<CollisionForSoundInfo> collidersinfolist)
118 { 118 {
119 if (collidersinfolist.Count == 0 || part == null) 119 if (collidersinfolist.Count == 0 || part == null)
diff --git a/OpenSim/Region/Framework/Scenes/EntityManager.cs b/OpenSim/Region/Framework/Scenes/EntityManager.cs
index 7181313..4654efe 100644
--- a/OpenSim/Region/Framework/Scenes/EntityManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityManager.cs
@@ -38,8 +38,8 @@ namespace OpenSim.Region.Framework.Scenes
38 public class EntityManager 38 public class EntityManager
39 { 39 {
40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities 42 private readonly DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase> m_entities
43 = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>(); 43 = new DoubleDictionaryThreadAbortSafe<UUID, uint, EntityBase>();
44 44
45 public int Count 45 public int Count
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 6ff3049..1e9711d 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes
44 public class EventManager 44 public class EventManager
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 public delegate void OnFrameDelegate(); 48 public delegate void OnFrameDelegate();
49 49
50 /// <summary> 50 /// <summary>
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Scenes
121 public event OnClientConnectCoreDelegate OnClientConnect; 121 public event OnClientConnectCoreDelegate OnClientConnect;
122 122
123 public delegate void OnNewClientDelegate(IClientAPI client); 123 public delegate void OnNewClientDelegate(IClientAPI client);
124 124
125 /// <summary> 125 /// <summary>
126 /// Triggered when a new client is added to the scene. 126 /// Triggered when a new client is added to the scene.
127 /// </summary> 127 /// </summary>
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Framework.Scenes
163 /// <remarks> 163 /// <remarks>
164 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both 164 /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewAgent"/> which is used by both
165 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> 165 /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see>
166 /// 166 ///
167 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please 167 /// Triggered under per-agent lock. So if you want to perform any long-running operations, please
168 /// do this on a separate thread. 168 /// do this on a separate thread.
169 /// </remarks> 169 /// </remarks>
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes
223 /// Triggered when the entire simulator is shutdown. 223 /// Triggered when the entire simulator is shutdown.
224 /// </summary> 224 /// </summary>
225 public event Action OnShutdown; 225 public event Action OnShutdown;
226 226
227 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 227 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
228 public delegate void ScriptResetDelegate(uint localID, UUID itemID); 228 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
229 229
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Framework.Scenes
276 /// </remarks> 276 /// </remarks>
277 public event ObjectGrabDelegate OnObjectGrab; 277 public event ObjectGrabDelegate OnObjectGrab;
278 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 278 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
279 279
280 /// <summary> 280 /// <summary>
281 /// Triggered when an object is being touched/grabbed continuously. 281 /// Triggered when an object is being touched/grabbed continuously.
282 /// </summary> 282 /// </summary>
@@ -503,7 +503,7 @@ namespace OpenSim.Region.Framework.Scenes
503 /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/> 503 /// via <see cref="OpenSim.Region.ClientStack.Linden.TaskInventoryScriptUpdater.uploaderCaps"/>
504 /// </remarks> 504 /// </remarks>
505 public event UpdateScript OnUpdateScript; 505 public event UpdateScript OnUpdateScript;
506 506
507 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID) 507 public virtual void TriggerUpdateScript(UUID clientId, UUID itemId, UUID primId, bool isScriptRunning, UUID newAssetID)
508 { 508 {
509 UpdateScript handlerUpdateScript = OnUpdateScript; 509 UpdateScript handlerUpdateScript = OnUpdateScript;
@@ -523,16 +523,16 @@ namespace OpenSim.Region.Framework.Scenes
523 } 523 }
524 } 524 }
525 } 525 }
526 } 526 }
527 527
528 /// <summary> 528 /// <summary>
529 /// Triggered when some scene object properties change. 529 /// Triggered when some scene object properties change.
530 /// </summary> 530 /// </summary>
531 /// <remarks> 531 /// <remarks>
532 /// ScriptChangedEvent is fired when a scene object property that a script might be interested 532 /// ScriptChangedEvent is fired when a scene object property that a script might be interested
533 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. 533 /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event.
534 /// This is not an indication that the script has changed (see OnUpdateScript for that). 534 /// This is not an indication that the script has changed (see OnUpdateScript for that).
535 /// This event is sent to a script to tell it that some property changed on 535 /// This event is sent to a script to tell it that some property changed on
536 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . 536 /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed .
537 /// Triggered by <see cref="TriggerOnScriptChangedEvent"/> 537 /// Triggered by <see cref="TriggerOnScriptChangedEvent"/>
538 /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>, 538 /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>,
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Framework.Scenes
561 /// TODO: Should be triggered when a physics object starts moving. 561 /// TODO: Should be triggered when a physics object starts moving.
562 /// </summary> 562 /// </summary>
563 public event ScriptMovingStartEvent OnScriptMovingStartEvent; 563 public event ScriptMovingStartEvent OnScriptMovingStartEvent;
564 564
565 public delegate void ScriptMovingEndEvent(uint localID); 565 public delegate void ScriptMovingEndEvent(uint localID);
566 566
567 /// <summary> 567 /// <summary>
@@ -738,7 +738,7 @@ namespace OpenSim.Region.Framework.Scenes
738 /// and <see cref="ScenePresence.CompleteMovement"/> 738 /// and <see cref="ScenePresence.CompleteMovement"/>
739 /// </remarks> 739 /// </remarks>
740 public event Action<ScenePresence> OnMakeRootAgent; 740 public event Action<ScenePresence> OnMakeRootAgent;
741 741
742 public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted; 742 public event OnSendNewWindlightProfileTargetedDelegate OnSendNewWindlightProfileTargeted;
743 public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile; 743 public event OnSaveNewWindlightProfileDelegate OnSaveNewWindlightProfile;
744 744
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Framework.Scenes
755 public delegate void RequestChangeWaterHeight(float height); 755 public delegate void RequestChangeWaterHeight(float height);
756 756
757 public event RequestChangeWaterHeight OnRequestChangeWaterHeight; 757 public event RequestChangeWaterHeight OnRequestChangeWaterHeight;
758 758
759 /// <summary> 759 /// <summary>
760 /// Fired if any avatar is 'killed' due to its health falling to zero 760 /// Fired if any avatar is 'killed' due to its health falling to zero
761 /// </summary> 761 /// </summary>
@@ -778,7 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
778 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); 778 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID);
779 779
780 public event EstateToolsSunUpdate OnEstateToolsSunUpdate; 780 public event EstateToolsSunUpdate OnEstateToolsSunUpdate;
781 781
782 /// <summary> 782 /// <summary>
783 /// Triggered when an object is added to the scene. 783 /// Triggered when an object is added to the scene.
784 /// </summary> 784 /// </summary>
@@ -789,7 +789,7 @@ namespace OpenSim.Region.Framework.Scenes
789 /// <see cref="Scene.doObjectDuplicateOnRay"/> 789 /// <see cref="Scene.doObjectDuplicateOnRay"/>
790 /// </remarks> 790 /// </remarks>
791 public event Action<SceneObjectGroup> OnObjectAddedToScene; 791 public event Action<SceneObjectGroup> OnObjectAddedToScene;
792 792
793 /// <summary> 793 /// <summary>
794 /// When a client sends a derez request for an object inworld 794 /// When a client sends a derez request for an object inworld
795 /// but before the object is deleted 795 /// but before the object is deleted
@@ -872,21 +872,21 @@ namespace OpenSim.Region.Framework.Scenes
872 /// </summary> 872 /// </summary>
873 public delegate void RegisterCapsEvent(UUID agentID, Caps caps); 873 public delegate void RegisterCapsEvent(UUID agentID, Caps caps);
874 public event RegisterCapsEvent OnRegisterCaps; 874 public event RegisterCapsEvent OnRegisterCaps;
875 875
876 /// <summary> 876 /// <summary>
877 /// DeregisterCapsEvent is called by Scene when the caps 877 /// DeregisterCapsEvent is called by Scene when the caps
878 /// handler for an agent are removed. 878 /// handler for an agent are removed.
879 /// </summary> 879 /// </summary>
880 public delegate void DeregisterCapsEvent(UUID agentID, Caps caps); 880 public delegate void DeregisterCapsEvent(UUID agentID, Caps caps);
881 public event DeregisterCapsEvent OnDeregisterCaps; 881 public event DeregisterCapsEvent OnDeregisterCaps;
882 882
883 /// <summary> 883 /// <summary>
884 /// ChatFromWorldEvent is called via Scene when a chat message 884 /// ChatFromWorldEvent is called via Scene when a chat message
885 /// from world comes in. 885 /// from world comes in.
886 /// </summary> 886 /// </summary>
887 public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat); 887 public delegate void ChatFromWorldEvent(Object sender, OSChatMessage chat);
888 public event ChatFromWorldEvent OnChatFromWorld; 888 public event ChatFromWorldEvent OnChatFromWorld;
889 889
890 /// <summary> 890 /// <summary>
891 /// ChatFromClientEvent is triggered via ChatModule (or 891 /// ChatFromClientEvent is triggered via ChatModule (or
892 /// substitutes thereof) when a chat message 892 /// substitutes thereof) when a chat message
@@ -894,18 +894,18 @@ namespace OpenSim.Region.Framework.Scenes
894 /// </summary> 894 /// </summary>
895 public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat); 895 public delegate void ChatFromClientEvent(Object sender, OSChatMessage chat);
896 public event ChatFromClientEvent OnChatFromClient; 896 public event ChatFromClientEvent OnChatFromClient;
897 897
898 /// <summary> 898 /// <summary>
899 /// ChatToClientsEvent is triggered via ChatModule (or 899 /// ChatToClientsEvent is triggered via ChatModule (or
900 /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a 900 /// substitutes thereof) when a chat message is actually sent to clients. Clients will only be sent a
901 /// received chat message if they satisfy various conditions (within audible range, etc.) 901 /// received chat message if they satisfy various conditions (within audible range, etc.)
902 /// </summary> 902 /// </summary>
903 public delegate void ChatToClientsEvent( 903 public delegate void ChatToClientsEvent(
904 UUID senderID, HashSet<UUID> receiverIDs, 904 UUID senderID, HashSet<UUID> receiverIDs,
905 string message, ChatTypeEnum type, Vector3 fromPos, string fromName, 905 string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
906 ChatSourceType src, ChatAudibleLevel level); 906 ChatSourceType src, ChatAudibleLevel level);
907 public event ChatToClientsEvent OnChatToClients; 907 public event ChatToClientsEvent OnChatToClients;
908 908
909 /// <summary> 909 /// <summary>
910 /// ChatBroadcastEvent is called via Scene when a broadcast chat message 910 /// ChatBroadcastEvent is called via Scene when a broadcast chat message
911 /// from world comes in 911 /// from world comes in
@@ -923,11 +923,11 @@ namespace OpenSim.Region.Framework.Scenes
923 /// </summary> 923 /// </summary>
924 public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message); 924 public delegate void OarFileLoaded(Guid guid, List<UUID> loadedScenes, string message);
925 public event OarFileLoaded OnOarFileLoaded; 925 public event OarFileLoaded OnOarFileLoaded;
926 926
927 /// <summary> 927 /// <summary>
928 /// Called when an oar file has finished saving 928 /// Called when an oar file has finished saving
929 /// Message is non empty string if there were problems saving the oar file 929 /// Message is non empty string if there were problems saving the oar file
930 /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise 930 /// If a guid was supplied on the original call to identify, the request, this is returned. Otherwise
931 /// Guid.Empty is returned. 931 /// Guid.Empty is returned.
932 /// </summary> 932 /// </summary>
933 public delegate void OarFileSaved(Guid guid, string message); 933 public delegate void OarFileSaved(Guid guid, string message);
@@ -947,14 +947,14 @@ namespace OpenSim.Region.Framework.Scenes
947 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). 947 /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical).
948 public delegate void Attach(uint localID, UUID itemID, UUID avatarID); 948 public delegate void Attach(uint localID, UUID itemID, UUID avatarID);
949 public event Attach OnAttach; 949 public event Attach OnAttach;
950 950
951 951
952 /// <summary> 952 /// <summary>
953 /// Called immediately after an object is loaded from storage. 953 /// Called immediately after an object is loaded from storage.
954 /// </summary> 954 /// </summary>
955 public event SceneObjectDelegate OnSceneObjectLoaded; 955 public event SceneObjectDelegate OnSceneObjectLoaded;
956 public delegate void SceneObjectDelegate(SceneObjectGroup so); 956 public delegate void SceneObjectDelegate(SceneObjectGroup so);
957 957
958 /// <summary> 958 /// <summary>
959 /// Called immediately before an object is saved to storage. 959 /// Called immediately before an object is saved to storage.
960 /// </summary> 960 /// </summary>
@@ -967,7 +967,7 @@ namespace OpenSim.Region.Framework.Scenes
967 /// </param> 967 /// </param>
968 public event SceneObjectPreSaveDelegate OnSceneObjectPreSave; 968 public event SceneObjectPreSaveDelegate OnSceneObjectPreSave;
969 public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo); 969 public delegate void SceneObjectPreSaveDelegate(SceneObjectGroup persistingSo, SceneObjectGroup originalSo);
970 970
971 /// <summary> 971 /// <summary>
972 /// Called when a scene object part is cloned within the region. 972 /// Called when a scene object part is cloned within the region.
973 /// </summary> 973 /// </summary>
@@ -1001,7 +1001,7 @@ namespace OpenSim.Region.Framework.Scenes
1001 /// Fired when logins to a region are enabled or disabled. 1001 /// Fired when logins to a region are enabled or disabled.
1002 /// </summary> 1002 /// </summary>
1003 /// <remarks> 1003 /// <remarks>
1004 /// 1004 ///
1005 /// </remarks> 1005 /// </remarks>
1006 /// Fired 1006 /// Fired
1007 public event RegionLoginsStatusChange OnRegionLoginsStatusChange; 1007 public event RegionLoginsStatusChange OnRegionLoginsStatusChange;
@@ -1157,7 +1157,7 @@ namespace OpenSim.Region.Framework.Scenes
1157 catch (Exception e) 1157 catch (Exception e)
1158 { 1158 {
1159 m_log.ErrorFormat( 1159 m_log.ErrorFormat(
1160 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 1160 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
1161 e.Message, e.StackTrace); 1161 e.Message, e.StackTrace);
1162 } 1162 }
1163 } 1163 }
@@ -1178,7 +1178,7 @@ namespace OpenSim.Region.Framework.Scenes
1178 catch (Exception e) 1178 catch (Exception e)
1179 { 1179 {
1180 m_log.ErrorFormat( 1180 m_log.ErrorFormat(
1181 "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}", 1181 "[EVENT MANAGER]: Delegate for TriggerGetScriptRunning failed - continuing. {0} {1}",
1182 e.Message, e.StackTrace); 1182 e.Message, e.StackTrace);
1183 } 1183 }
1184 } 1184 }
@@ -1199,7 +1199,7 @@ namespace OpenSim.Region.Framework.Scenes
1199 catch (Exception e) 1199 catch (Exception e)
1200 { 1200 {
1201 m_log.ErrorFormat( 1201 m_log.ErrorFormat(
1202 "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}", 1202 "[EVENT MANAGER]: Delegate for TriggerOnScriptChangedEvent failed - continuing. {0} {1}",
1203 e.Message, e.StackTrace); 1203 e.Message, e.StackTrace);
1204 } 1204 }
1205 } 1205 }
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.Framework.Scenes
1220 catch (Exception e) 1220 catch (Exception e)
1221 { 1221 {
1222 m_log.ErrorFormat( 1222 m_log.ErrorFormat(
1223 "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}", 1223 "[EVENT MANAGER]: Delegate for TriggerOnClientMovement failed - continuing. {0} {1}",
1224 e.Message, e.StackTrace); 1224 e.Message, e.StackTrace);
1225 } 1225 }
1226 } 1226 }
@@ -1241,7 +1241,7 @@ namespace OpenSim.Region.Framework.Scenes
1241 catch (Exception e) 1241 catch (Exception e)
1242 { 1242 {
1243 m_log.ErrorFormat( 1243 m_log.ErrorFormat(
1244 "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}", 1244 "[EVENT MANAGER]: Delegate for TriggerPermissionError failed - continuing. {0} {1}",
1245 e.Message, e.StackTrace); 1245 e.Message, e.StackTrace);
1246 } 1246 }
1247 } 1247 }
@@ -1262,7 +1262,7 @@ namespace OpenSim.Region.Framework.Scenes
1262 catch (Exception e) 1262 catch (Exception e)
1263 { 1263 {
1264 m_log.ErrorFormat( 1264 m_log.ErrorFormat(
1265 "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}", 1265 "[EVENT MANAGER]: Delegate for TriggerOnPluginConsole failed - continuing. {0} {1}",
1266 e.Message, e.StackTrace); 1266 e.Message, e.StackTrace);
1267 } 1267 }
1268 } 1268 }
@@ -1283,7 +1283,7 @@ namespace OpenSim.Region.Framework.Scenes
1283 catch (Exception e) 1283 catch (Exception e)
1284 { 1284 {
1285 m_log.ErrorFormat( 1285 m_log.ErrorFormat(
1286 "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}", 1286 "[EVENT MANAGER]: Delegate for TriggerOnFrame failed - continuing. {0} {1}",
1287 e.Message, e.StackTrace); 1287 e.Message, e.StackTrace);
1288 } 1288 }
1289 } 1289 }
@@ -1304,7 +1304,7 @@ namespace OpenSim.Region.Framework.Scenes
1304 catch (Exception e) 1304 catch (Exception e)
1305 { 1305 {
1306 m_log.ErrorFormat( 1306 m_log.ErrorFormat(
1307 "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}", 1307 "[EVENT MANAGER]: Delegate for TriggerOnNewClient failed - continuing. {0} {1}",
1308 e.Message, e.StackTrace); 1308 e.Message, e.StackTrace);
1309 } 1309 }
1310 } 1310 }
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.Framework.Scenes
1324 catch (Exception e) 1324 catch (Exception e)
1325 { 1325 {
1326 m_log.ErrorFormat( 1326 m_log.ErrorFormat(
1327 "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}", 1327 "[EVENT MANAGER]: Delegate for TriggerOnNewClient (IClientCore) failed - continuing. {0} {1}",
1328 e.Message, e.StackTrace); 1328 e.Message, e.StackTrace);
1329 } 1329 }
1330 } 1330 }
@@ -1368,7 +1368,7 @@ namespace OpenSim.Region.Framework.Scenes
1368 catch (Exception e) 1368 catch (Exception e)
1369 { 1369 {
1370 m_log.ErrorFormat( 1370 m_log.ErrorFormat(
1371 "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}", 1371 "[EVENT MANAGER]: Delegate for TriggerOnNewPresence failed - continuing. {0} {1}",
1372 e.Message, e.StackTrace); 1372 e.Message, e.StackTrace);
1373 } 1373 }
1374 } 1374 }
@@ -1391,7 +1391,7 @@ namespace OpenSim.Region.Framework.Scenes
1391 catch (Exception e) 1391 catch (Exception e)
1392 { 1392 {
1393 m_log.ErrorFormat( 1393 m_log.ErrorFormat(
1394 "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}", 1394 "[EVENT MANAGER]: Delegate for TriggerOnRemovePresence failed - continuing. {0} {1}",
1395 e.Message, e.StackTrace); 1395 e.Message, e.StackTrace);
1396 } 1396 }
1397 } 1397 }
@@ -1412,7 +1412,7 @@ namespace OpenSim.Region.Framework.Scenes
1412 catch (Exception e) 1412 catch (Exception e)
1413 { 1413 {
1414 m_log.ErrorFormat( 1414 m_log.ErrorFormat(
1415 "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}", 1415 "[EVENT MANAGER]: Delegate for TriggerOnBackup failed - continuing. {0} {1}",
1416 e.Message, e.StackTrace); 1416 e.Message, e.StackTrace);
1417 } 1417 }
1418 } 1418 }
@@ -1433,7 +1433,7 @@ namespace OpenSim.Region.Framework.Scenes
1433 catch (Exception e) 1433 catch (Exception e)
1434 { 1434 {
1435 m_log.ErrorFormat( 1435 m_log.ErrorFormat(
1436 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}", 1436 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountUpdate failed - continuing. {0} {1}",
1437 e.Message, e.StackTrace); 1437 e.Message, e.StackTrace);
1438 } 1438 }
1439 } 1439 }
@@ -1454,7 +1454,7 @@ namespace OpenSim.Region.Framework.Scenes
1454 catch (Exception e) 1454 catch (Exception e)
1455 { 1455 {
1456 m_log.ErrorFormat( 1456 m_log.ErrorFormat(
1457 "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}", 1457 "[EVENT MANAGER]: Delegate for TriggerMoneyTransfer failed - continuing. {0} {1}",
1458 e.Message, e.StackTrace); 1458 e.Message, e.StackTrace);
1459 } 1459 }
1460 } 1460 }
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes
1495 catch (Exception e) 1495 catch (Exception e)
1496 { 1496 {
1497 m_log.ErrorFormat( 1497 m_log.ErrorFormat(
1498 "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}", 1498 "[EVENT MANAGER]: Delegate for TriggerTerrainTick failed - continuing. {0} {1}",
1499 e.Message, e.StackTrace); 1499 e.Message, e.StackTrace);
1500 } 1500 }
1501 } 1501 }
@@ -1558,7 +1558,7 @@ namespace OpenSim.Region.Framework.Scenes
1558 catch (Exception e) 1558 catch (Exception e)
1559 { 1559 {
1560 m_log.ErrorFormat( 1560 m_log.ErrorFormat(
1561 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}", 1561 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountAdd failed - continuing. {0} {1}",
1562 e.Message, e.StackTrace); 1562 e.Message, e.StackTrace);
1563 } 1563 }
1564 } 1564 }
@@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Framework.Scenes
1579 catch (Exception e) 1579 catch (Exception e)
1580 { 1580 {
1581 m_log.ErrorFormat( 1581 m_log.ErrorFormat(
1582 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}", 1582 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}",
1583 e.Message, e.StackTrace); 1583 e.Message, e.StackTrace);
1584 } 1584 }
1585 } 1585 }
@@ -1625,7 +1625,7 @@ namespace OpenSim.Region.Framework.Scenes
1625 catch (Exception e) 1625 catch (Exception e)
1626 { 1626 {
1627 m_log.ErrorFormat( 1627 m_log.ErrorFormat(
1628 "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}", 1628 "[EVENT MANAGER]: Delegate for TriggerObjectBeingRemovedFromScene failed - continuing. {0} {1}",
1629 e.Message, e.StackTrace); 1629 e.Message, e.StackTrace);
1630 } 1630 }
1631 } 1631 }
@@ -1646,7 +1646,7 @@ namespace OpenSim.Region.Framework.Scenes
1646 catch (Exception e) 1646 catch (Exception e)
1647 { 1647 {
1648 m_log.ErrorFormat( 1648 m_log.ErrorFormat(
1649 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}", 1649 "[EVENT MANAGER]: Delegate for TriggerObjectAddedToPhysicalScene failed - continuing. {0} {1}",
1650 e.Message, e.StackTrace); 1650 e.Message, e.StackTrace);
1651 } 1651 }
1652 } 1652 }
@@ -1667,7 +1667,7 @@ namespace OpenSim.Region.Framework.Scenes
1667 catch (Exception e) 1667 catch (Exception e)
1668 { 1668 {
1669 m_log.ErrorFormat( 1669 m_log.ErrorFormat(
1670 "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}", 1670 "[EVENT MANAGER]: Delegate for TriggerObjectRemovedFromPhysicalScene failed - continuing. {0} {1}",
1671 e.Message, e.StackTrace); 1671 e.Message, e.StackTrace);
1672 } 1672 }
1673 } 1673 }
@@ -1688,7 +1688,7 @@ namespace OpenSim.Region.Framework.Scenes
1688 catch (Exception e) 1688 catch (Exception e)
1689 { 1689 {
1690 m_log.ErrorFormat( 1690 m_log.ErrorFormat(
1691 "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}", 1691 "[EVENT MANAGER]: Delegate for TriggerShutdown failed - continuing. {0} {1}",
1692 e.Message, e.StackTrace); 1692 e.Message, e.StackTrace);
1693 } 1693 }
1694 } 1694 }
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes
1709 catch (Exception e) 1709 catch (Exception e)
1710 { 1710 {
1711 m_log.ErrorFormat( 1711 m_log.ErrorFormat(
1712 "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}", 1712 "[EVENT MANAGER]: Delegate for TriggerObjectGrab failed - continuing. {0} {1}",
1713 e.Message, e.StackTrace); 1713 e.Message, e.StackTrace);
1714 } 1714 }
1715 } 1715 }
@@ -1730,7 +1730,7 @@ namespace OpenSim.Region.Framework.Scenes
1730 catch (Exception e) 1730 catch (Exception e)
1731 { 1731 {
1732 m_log.ErrorFormat( 1732 m_log.ErrorFormat(
1733 "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}", 1733 "[EVENT MANAGER]: Delegate for TriggerObjectGrabbing failed - continuing. {0} {1}",
1734 e.Message, e.StackTrace); 1734 e.Message, e.StackTrace);
1735 } 1735 }
1736 } 1736 }
@@ -1751,7 +1751,7 @@ namespace OpenSim.Region.Framework.Scenes
1751 catch (Exception e) 1751 catch (Exception e)
1752 { 1752 {
1753 m_log.ErrorFormat( 1753 m_log.ErrorFormat(
1754 "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}", 1754 "[EVENT MANAGER]: Delegate for TriggerObjectDeGrab failed - continuing. {0} {1}",
1755 e.Message, e.StackTrace); 1755 e.Message, e.StackTrace);
1756 } 1756 }
1757 } 1757 }
@@ -1772,7 +1772,7 @@ namespace OpenSim.Region.Framework.Scenes
1772 catch (Exception e) 1772 catch (Exception e)
1773 { 1773 {
1774 m_log.ErrorFormat( 1774 m_log.ErrorFormat(
1775 "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}", 1775 "[EVENT MANAGER]: Delegate for TriggerScriptReset failed - continuing. {0} {1}",
1776 e.Message, e.StackTrace); 1776 e.Message, e.StackTrace);
1777 } 1777 }
1778 } 1778 }
@@ -1793,7 +1793,7 @@ namespace OpenSim.Region.Framework.Scenes
1793 catch (Exception e) 1793 catch (Exception e)
1794 { 1794 {
1795 m_log.ErrorFormat( 1795 m_log.ErrorFormat(
1796 "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}", 1796 "[EVENT MANAGER]: Delegate for TriggerRezScript failed - continuing. {0} {1}",
1797 e.Message, e.StackTrace); 1797 e.Message, e.StackTrace);
1798 } 1798 }
1799 } 1799 }
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Framework.Scenes
1814 catch (Exception e) 1814 catch (Exception e)
1815 { 1815 {
1816 m_log.ErrorFormat( 1816 m_log.ErrorFormat(
1817 "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}", 1817 "[EVENT MANAGER]: Delegate for TriggerStartScript failed - continuing. {0} {1}",
1818 e.Message, e.StackTrace); 1818 e.Message, e.StackTrace);
1819 } 1819 }
1820 } 1820 }
@@ -1835,7 +1835,7 @@ namespace OpenSim.Region.Framework.Scenes
1835 catch (Exception e) 1835 catch (Exception e)
1836 { 1836 {
1837 m_log.ErrorFormat( 1837 m_log.ErrorFormat(
1838 "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}", 1838 "[EVENT MANAGER]: Delegate for TriggerStopScript failed - continuing. {0} {1}",
1839 e.Message, e.StackTrace); 1839 e.Message, e.StackTrace);
1840 } 1840 }
1841 } 1841 }
@@ -1856,7 +1856,7 @@ namespace OpenSim.Region.Framework.Scenes
1856 catch (Exception e) 1856 catch (Exception e)
1857 { 1857 {
1858 m_log.ErrorFormat( 1858 m_log.ErrorFormat(
1859 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1859 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1860 e.Message, e.StackTrace); 1860 e.Message, e.StackTrace);
1861 m_log.ErrorFormat(Environment.StackTrace); 1861 m_log.ErrorFormat(Environment.StackTrace);
1862 } 1862 }
@@ -1867,7 +1867,7 @@ namespace OpenSim.Region.Framework.Scenes
1867 public bool TriggerGroupMove(UUID groupID, Vector3 delta) 1867 public bool TriggerGroupMove(UUID groupID, Vector3 delta)
1868 { 1868 {
1869 bool result = true; 1869 bool result = true;
1870 1870
1871 SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove; 1871 SceneGroupMoved handlerSceneGroupMove = OnSceneGroupMove;
1872 if (handlerSceneGroupMove != null) 1872 if (handlerSceneGroupMove != null)
1873 { 1873 {
@@ -1881,19 +1881,19 @@ namespace OpenSim.Region.Framework.Scenes
1881 catch (Exception e) 1881 catch (Exception e)
1882 { 1882 {
1883 m_log.ErrorFormat( 1883 m_log.ErrorFormat(
1884 "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}", 1884 "[EVENT MANAGER]: Delegate for TriggerGroupMove failed - continuing. {0} {1}",
1885 e.Message, e.StackTrace); 1885 e.Message, e.StackTrace);
1886 } 1886 }
1887 } 1887 }
1888 } 1888 }
1889 1889
1890 return result; 1890 return result;
1891 } 1891 }
1892 1892
1893 public bool TriggerGroupSpinStart(UUID groupID) 1893 public bool TriggerGroupSpinStart(UUID groupID)
1894 { 1894 {
1895 bool result = true; 1895 bool result = true;
1896 1896
1897 SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart; 1897 SceneGroupSpinStarted handlerSceneGroupSpinStarted = OnSceneGroupSpinStart;
1898 if (handlerSceneGroupSpinStarted != null) 1898 if (handlerSceneGroupSpinStarted != null)
1899 { 1899 {
@@ -1907,19 +1907,19 @@ namespace OpenSim.Region.Framework.Scenes
1907 catch (Exception e) 1907 catch (Exception e)
1908 { 1908 {
1909 m_log.ErrorFormat( 1909 m_log.ErrorFormat(
1910 "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}", 1910 "[EVENT MANAGER]: Delegate for TriggerGroupSpinStart failed - continuing. {0} {1}",
1911 e.Message, e.StackTrace); 1911 e.Message, e.StackTrace);
1912 } 1912 }
1913 } 1913 }
1914 } 1914 }
1915 1915
1916 return result; 1916 return result;
1917 } 1917 }
1918 1918
1919 public bool TriggerGroupSpin(UUID groupID, Quaternion rotation) 1919 public bool TriggerGroupSpin(UUID groupID, Quaternion rotation)
1920 { 1920 {
1921 bool result = true; 1921 bool result = true;
1922 1922
1923 SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin; 1923 SceneGroupSpun handlerSceneGroupSpin = OnSceneGroupSpin;
1924 if (handlerSceneGroupSpin != null) 1924 if (handlerSceneGroupSpin != null)
1925 { 1925 {
@@ -1933,12 +1933,12 @@ namespace OpenSim.Region.Framework.Scenes
1933 catch (Exception e) 1933 catch (Exception e)
1934 { 1934 {
1935 m_log.ErrorFormat( 1935 m_log.ErrorFormat(
1936 "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}", 1936 "[EVENT MANAGER]: Delegate for TriggerGroupSpin failed - continuing. {0} {1}",
1937 e.Message, e.StackTrace); 1937 e.Message, e.StackTrace);
1938 } 1938 }
1939 } 1939 }
1940 } 1940 }
1941 1941
1942 return result; 1942 return result;
1943 } 1943 }
1944 1944
@@ -1956,7 +1956,7 @@ namespace OpenSim.Region.Framework.Scenes
1956 catch (Exception e) 1956 catch (Exception e)
1957 { 1957 {
1958 m_log.ErrorFormat( 1958 m_log.ErrorFormat(
1959 "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}", 1959 "[EVENT MANAGER]: Delegate for TriggerGroupGrab failed - continuing. {0} {1}",
1960 e.Message, e.StackTrace); 1960 e.Message, e.StackTrace);
1961 } 1961 }
1962 } 1962 }
@@ -1977,7 +1977,7 @@ namespace OpenSim.Region.Framework.Scenes
1977 catch (Exception e) 1977 catch (Exception e)
1978 { 1978 {
1979 m_log.ErrorFormat( 1979 m_log.ErrorFormat(
1980 "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}", 1980 "[EVENT MANAGER]: Delegate for TriggerLandObjectAdded failed - continuing. {0} {1}",
1981 e.Message, e.StackTrace); 1981 e.Message, e.StackTrace);
1982 } 1982 }
1983 } 1983 }
@@ -1998,7 +1998,7 @@ namespace OpenSim.Region.Framework.Scenes
1998 catch (Exception e) 1998 catch (Exception e)
1999 { 1999 {
2000 m_log.ErrorFormat( 2000 m_log.ErrorFormat(
2001 "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}", 2001 "[EVENT MANAGER]: Delegate for TriggerLandObjectRemoved failed - continuing. {0} {1}",
2002 e.Message, e.StackTrace); 2002 e.Message, e.StackTrace);
2003 } 2003 }
2004 } 2004 }
@@ -2024,7 +2024,7 @@ namespace OpenSim.Region.Framework.Scenes
2024 catch (Exception e) 2024 catch (Exception e)
2025 { 2025 {
2026 m_log.ErrorFormat( 2026 m_log.ErrorFormat(
2027 "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}", 2027 "[EVENT MANAGER]: Delegate for TriggerAvatarEnteringNewParcel failed - continuing. {0} {1}",
2028 e.Message, e.StackTrace); 2028 e.Message, e.StackTrace);
2029 } 2029 }
2030 } 2030 }
@@ -2045,7 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes
2045 catch (Exception e) 2045 catch (Exception e)
2046 { 2046 {
2047 m_log.ErrorFormat( 2047 m_log.ErrorFormat(
2048 "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}", 2048 "[EVENT MANAGER]: Delegate for TriggerAvatarAppearanceChanged failed - continuing. {0} {1}",
2049 e.Message, e.StackTrace); 2049 e.Message, e.StackTrace);
2050 } 2050 }
2051 } 2051 }
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Framework.Scenes
2087 catch (Exception e) 2087 catch (Exception e)
2088 { 2088 {
2089 m_log.ErrorFormat( 2089 m_log.ErrorFormat(
2090 "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}", 2090 "[EVENT MANAGER]: Delegate for TriggerIncomingInstantMessage failed - continuing. {0} {1}",
2091 e.Message, e.StackTrace); 2091 e.Message, e.StackTrace);
2092 } 2092 }
2093 } 2093 }
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.Framework.Scenes
2108 catch (Exception e) 2108 catch (Exception e)
2109 { 2109 {
2110 m_log.ErrorFormat( 2110 m_log.ErrorFormat(
2111 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 2111 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2112 e.Message, e.StackTrace); 2112 e.Message, e.StackTrace);
2113 } 2113 }
2114 } 2114 }
@@ -2127,12 +2127,12 @@ namespace OpenSim.Region.Framework.Scenes
2127// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); 2127// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString());
2128 d(ClientID, scene); 2128 d(ClientID, scene);
2129// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); 2129// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done ");
2130 2130
2131 } 2131 }
2132 catch (Exception e) 2132 catch (Exception e)
2133 { 2133 {
2134 m_log.ErrorFormat( 2134 m_log.ErrorFormat(
2135 "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}", 2135 "[EVENT MANAGER]: Delegate for TriggerClientClosed failed - continuing. {0} {1}",
2136 e.Message, e.StackTrace); 2136 e.Message, e.StackTrace);
2137 } 2137 }
2138 } 2138 }
@@ -2153,7 +2153,7 @@ namespace OpenSim.Region.Framework.Scenes
2153 catch (Exception e) 2153 catch (Exception e)
2154 { 2154 {
2155 m_log.ErrorFormat( 2155 m_log.ErrorFormat(
2156 "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}", 2156 "[EVENT MANAGER]: Delegate for TriggerOnMakeChildAgent failed - continuing. {0} {1}",
2157 e.Message, e.StackTrace); 2157 e.Message, e.StackTrace);
2158 } 2158 }
2159 } 2159 }
@@ -2192,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes
2192 catch (Exception e) 2192 catch (Exception e)
2193 { 2193 {
2194 m_log.ErrorFormat( 2194 m_log.ErrorFormat(
2195 "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}", 2195 "[EVENT MANAGER]: Delegate for TriggerOnMakeRootAgent failed - continuing. {0} {1}",
2196 e.Message, e.StackTrace); 2196 e.Message, e.StackTrace);
2197 } 2197 }
2198 } 2198 }
@@ -2213,7 +2213,7 @@ namespace OpenSim.Region.Framework.Scenes
2213 catch (Exception e) 2213 catch (Exception e)
2214 { 2214 {
2215 m_log.ErrorFormat( 2215 m_log.ErrorFormat(
2216 "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}", 2216 "[EVENT MANAGER]: Delegate for TriggerOnIncomingSceneObject failed - continuing. {0} {1}",
2217 e.Message, e.StackTrace); 2217 e.Message, e.StackTrace);
2218 } 2218 }
2219 } 2219 }
@@ -2234,7 +2234,7 @@ namespace OpenSim.Region.Framework.Scenes
2234 catch (Exception e) 2234 catch (Exception e)
2235 { 2235 {
2236 m_log.ErrorFormat( 2236 m_log.ErrorFormat(
2237 "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}", 2237 "[EVENT MANAGER]: Delegate for TriggerOnRegisterCaps failed - continuing. {0} {1}",
2238 e.Message, e.StackTrace); 2238 e.Message, e.StackTrace);
2239 } 2239 }
2240 } 2240 }
@@ -2255,7 +2255,7 @@ namespace OpenSim.Region.Framework.Scenes
2255 catch (Exception e) 2255 catch (Exception e)
2256 { 2256 {
2257 m_log.ErrorFormat( 2257 m_log.ErrorFormat(
2258 "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}", 2258 "[EVENT MANAGER]: Delegate for TriggerOnDeregisterCaps failed - continuing. {0} {1}",
2259 e.Message, e.StackTrace); 2259 e.Message, e.StackTrace);
2260 } 2260 }
2261 } 2261 }
@@ -2276,7 +2276,7 @@ namespace OpenSim.Region.Framework.Scenes
2276 catch (Exception e) 2276 catch (Exception e)
2277 { 2277 {
2278 m_log.ErrorFormat( 2278 m_log.ErrorFormat(
2279 "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}", 2279 "[EVENT MANAGER]: Delegate for TriggerOnNewInventoryItemUploadComplete failed - continuing. {0} {1}",
2280 e.Message, e.StackTrace); 2280 e.Message, e.StackTrace);
2281 } 2281 }
2282 } 2282 }
@@ -2297,7 +2297,7 @@ namespace OpenSim.Region.Framework.Scenes
2297 catch (Exception e) 2297 catch (Exception e)
2298 { 2298 {
2299 m_log.ErrorFormat( 2299 m_log.ErrorFormat(
2300 "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}", 2300 "[EVENT MANAGER]: Delegate for TriggerLandBuy failed - continuing. {0} {1}",
2301 e.Message, e.StackTrace); 2301 e.Message, e.StackTrace);
2302 } 2302 }
2303 } 2303 }
@@ -2318,7 +2318,7 @@ namespace OpenSim.Region.Framework.Scenes
2318 catch (Exception e) 2318 catch (Exception e)
2319 { 2319 {
2320 m_log.ErrorFormat( 2320 m_log.ErrorFormat(
2321 "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}", 2321 "[EVENT MANAGER]: Delegate for TriggerValidateLandBuy failed - continuing. {0} {1}",
2322 e.Message, e.StackTrace); 2322 e.Message, e.StackTrace);
2323 } 2323 }
2324 } 2324 }
@@ -2339,7 +2339,7 @@ namespace OpenSim.Region.Framework.Scenes
2339 catch (Exception e) 2339 catch (Exception e)
2340 { 2340 {
2341 m_log.ErrorFormat( 2341 m_log.ErrorFormat(
2342 "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}", 2342 "[EVENT MANAGER]: Delegate for TriggerAtTargetEvent failed - continuing. {0} {1}",
2343 e.Message, e.StackTrace); 2343 e.Message, e.StackTrace);
2344 } 2344 }
2345 } 2345 }
@@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Framework.Scenes
2360 catch (Exception e) 2360 catch (Exception e)
2361 { 2361 {
2362 m_log.ErrorFormat( 2362 m_log.ErrorFormat(
2363 "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}", 2363 "[EVENT MANAGER]: Delegate for TriggerNotAtTargetEvent failed - continuing. {0} {1}",
2364 e.Message, e.StackTrace); 2364 e.Message, e.StackTrace);
2365 } 2365 }
2366 } 2366 }
@@ -2381,7 +2381,7 @@ namespace OpenSim.Region.Framework.Scenes
2381 catch (Exception e) 2381 catch (Exception e)
2382 { 2382 {
2383 m_log.ErrorFormat( 2383 m_log.ErrorFormat(
2384 "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}", 2384 "[EVENT MANAGER]: Delegate for TriggerAtRotTargetEvent failed - continuing. {0} {1}",
2385 e.Message, e.StackTrace); 2385 e.Message, e.StackTrace);
2386 } 2386 }
2387 } 2387 }
@@ -2402,7 +2402,7 @@ namespace OpenSim.Region.Framework.Scenes
2402 catch (Exception e) 2402 catch (Exception e)
2403 { 2403 {
2404 m_log.ErrorFormat( 2404 m_log.ErrorFormat(
2405 "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}", 2405 "[EVENT MANAGER]: Delegate for TriggerNotAtRotTargetEvent failed - continuing. {0} {1}",
2406 e.Message, e.StackTrace); 2406 e.Message, e.StackTrace);
2407 } 2407 }
2408 } 2408 }
@@ -2471,7 +2471,7 @@ namespace OpenSim.Region.Framework.Scenes
2471 catch (Exception e) 2471 catch (Exception e)
2472 { 2472 {
2473 m_log.ErrorFormat( 2473 m_log.ErrorFormat(
2474 "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}", 2474 "[EVENT MANAGER]: Delegate for TriggerRequestChangeWaterHeight failed - continuing. {0} {1}",
2475 e.Message, e.StackTrace); 2475 e.Message, e.StackTrace);
2476 } 2476 }
2477 } 2477 }
@@ -2492,7 +2492,7 @@ namespace OpenSim.Region.Framework.Scenes
2492 catch (Exception e) 2492 catch (Exception e)
2493 { 2493 {
2494 m_log.ErrorFormat( 2494 m_log.ErrorFormat(
2495 "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}", 2495 "[EVENT MANAGER]: Delegate for TriggerAvatarKill failed - continuing. {0} {1}",
2496 e.Message, e.StackTrace); 2496 e.Message, e.StackTrace);
2497 } 2497 }
2498 } 2498 }
@@ -2513,7 +2513,7 @@ namespace OpenSim.Region.Framework.Scenes
2513 catch (Exception e) 2513 catch (Exception e)
2514 { 2514 {
2515 m_log.ErrorFormat( 2515 m_log.ErrorFormat(
2516 "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}", 2516 "[EVENT MANAGER]: Delegate for TriggerSignificantClientMovement failed - continuing. {0} {1}",
2517 e.Message, e.StackTrace); 2517 e.Message, e.StackTrace);
2518 } 2518 }
2519 } 2519 }
@@ -2534,7 +2534,7 @@ namespace OpenSim.Region.Framework.Scenes
2534 catch (Exception e) 2534 catch (Exception e)
2535 { 2535 {
2536 m_log.ErrorFormat( 2536 m_log.ErrorFormat(
2537 "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}", 2537 "[EVENT MANAGER]: Delegate for TriggerOnChatFromWorld failed - continuing. {0} {1}",
2538 e.Message, e.StackTrace); 2538 e.Message, e.StackTrace);
2539 } 2539 }
2540 } 2540 }
@@ -2555,16 +2555,16 @@ namespace OpenSim.Region.Framework.Scenes
2555 catch (Exception e) 2555 catch (Exception e)
2556 { 2556 {
2557 m_log.ErrorFormat( 2557 m_log.ErrorFormat(
2558 "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}", 2558 "[EVENT MANAGER]: Delegate for TriggerOnChatFromClient failed - continuing. {0} {1}",
2559 e.Message, e.StackTrace); 2559 e.Message, e.StackTrace);
2560 } 2560 }
2561 } 2561 }
2562 } 2562 }
2563 } 2563 }
2564 2564
2565 public void TriggerOnChatToClients( 2565 public void TriggerOnChatToClients(
2566 UUID senderID, HashSet<UUID> receiverIDs, 2566 UUID senderID, HashSet<UUID> receiverIDs,
2567 string message, ChatTypeEnum type, Vector3 fromPos, string fromName, 2567 string message, ChatTypeEnum type, Vector3 fromPos, string fromName,
2568 ChatSourceType src, ChatAudibleLevel level) 2568 ChatSourceType src, ChatAudibleLevel level)
2569 { 2569 {
2570 ChatToClientsEvent handler = OnChatToClients; 2570 ChatToClientsEvent handler = OnChatToClients;
@@ -2579,7 +2579,7 @@ namespace OpenSim.Region.Framework.Scenes
2579 catch (Exception e) 2579 catch (Exception e)
2580 { 2580 {
2581 m_log.ErrorFormat( 2581 m_log.ErrorFormat(
2582 "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}", 2582 "[EVENT MANAGER]: Delegate for TriggerOnChatToClients failed - continuing. {0} {1}",
2583 e.Message, e.StackTrace); 2583 e.Message, e.StackTrace);
2584 } 2584 }
2585 } 2585 }
@@ -2600,7 +2600,7 @@ namespace OpenSim.Region.Framework.Scenes
2600 catch (Exception e) 2600 catch (Exception e)
2601 { 2601 {
2602 m_log.ErrorFormat( 2602 m_log.ErrorFormat(
2603 "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}", 2603 "[EVENT MANAGER]: Delegate for TriggerOnChatBroadcast failed - continuing. {0} {1}",
2604 e.Message, e.StackTrace); 2604 e.Message, e.StackTrace);
2605 } 2605 }
2606 } 2606 }
@@ -2621,7 +2621,7 @@ namespace OpenSim.Region.Framework.Scenes
2621 catch (Exception e) 2621 catch (Exception e)
2622 { 2622 {
2623 m_log.ErrorFormat( 2623 m_log.ErrorFormat(
2624 "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}", 2624 "[EVENT MANAGER]: Delegate for TriggerControlEvent failed - continuing. {0} {1}",
2625 e.Message, e.StackTrace); 2625 e.Message, e.StackTrace);
2626 } 2626 }
2627 } 2627 }
@@ -2642,7 +2642,7 @@ namespace OpenSim.Region.Framework.Scenes
2642 catch (Exception e) 2642 catch (Exception e)
2643 { 2643 {
2644 m_log.ErrorFormat( 2644 m_log.ErrorFormat(
2645 "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}", 2645 "[EVENT MANAGER]: Delegate for TriggerNoticeNoLandDataFromStorage failed - continuing. {0} {1}",
2646 e.Message, e.StackTrace); 2646 e.Message, e.StackTrace);
2647 } 2647 }
2648 } 2648 }
@@ -2663,7 +2663,7 @@ namespace OpenSim.Region.Framework.Scenes
2663 catch (Exception e) 2663 catch (Exception e)
2664 { 2664 {
2665 m_log.ErrorFormat( 2665 m_log.ErrorFormat(
2666 "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}", 2666 "[EVENT MANAGER]: Delegate for TriggerIncomingLandDataFromStorage failed - continuing. {0} {1}",
2667 e.Message, e.StackTrace); 2667 e.Message, e.StackTrace);
2668 } 2668 }
2669 } 2669 }
@@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes
2684 catch (Exception e) 2684 catch (Exception e)
2685 { 2685 {
2686 m_log.ErrorFormat( 2686 m_log.ErrorFormat(
2687 "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}", 2687 "[EVENT MANAGER]: Delegate for TriggerSetAllowForcefulBan failed - continuing. {0} {1}",
2688 e.Message, e.StackTrace); 2688 e.Message, e.StackTrace);
2689 } 2689 }
2690 } 2690 }
@@ -2705,7 +2705,7 @@ namespace OpenSim.Region.Framework.Scenes
2705 catch (Exception e) 2705 catch (Exception e)
2706 { 2706 {
2707 m_log.ErrorFormat( 2707 m_log.ErrorFormat(
2708 "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}", 2708 "[EVENT MANAGER]: Delegate for TriggerRequestParcelPrimCountUpdate failed - continuing. {0} {1}",
2709 e.Message, e.StackTrace); 2709 e.Message, e.StackTrace);
2710 } 2710 }
2711 } 2711 }
@@ -2726,7 +2726,7 @@ namespace OpenSim.Region.Framework.Scenes
2726 catch (Exception e) 2726 catch (Exception e)
2727 { 2727 {
2728 m_log.ErrorFormat( 2728 m_log.ErrorFormat(
2729 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}", 2729 "[EVENT MANAGER]: Delegate for TriggerParcelPrimCountTainted failed - continuing. {0} {1}",
2730 e.Message, e.StackTrace); 2730 e.Message, e.StackTrace);
2731 } 2731 }
2732 } 2732 }
@@ -2766,7 +2766,7 @@ namespace OpenSim.Region.Framework.Scenes
2766 catch (Exception e) 2766 catch (Exception e)
2767 { 2767 {
2768 m_log.ErrorFormat( 2768 m_log.ErrorFormat(
2769 "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}", 2769 "[EVENT MANAGER]: Delegate for TriggerEstateToolsSunUpdate failed - continuing. {0} {1}",
2770 e.Message, e.StackTrace); 2770 e.Message, e.StackTrace);
2771 } 2771 }
2772 } 2772 }
@@ -2787,12 +2787,12 @@ namespace OpenSim.Region.Framework.Scenes
2787 catch (Exception e) 2787 catch (Exception e)
2788 { 2788 {
2789 m_log.ErrorFormat( 2789 m_log.ErrorFormat(
2790 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}", 2790 "[EVENT MANAGER]: Delegate for TriggerOnAttach failed - continuing. {0} {1}",
2791 e.Message, e.StackTrace); 2791 e.Message, e.StackTrace);
2792 } 2792 }
2793 } 2793 }
2794 } 2794 }
2795 2795
2796 return 6; 2796 return 6;
2797 } 2797 }
2798 2798
@@ -2810,13 +2810,13 @@ namespace OpenSim.Region.Framework.Scenes
2810 catch (Exception e) 2810 catch (Exception e)
2811 { 2811 {
2812 m_log.ErrorFormat( 2812 m_log.ErrorFormat(
2813 "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}", 2813 "[EVENT MANAGER]: Delegate for TriggerOarFileLoaded failed - continuing. {0} {1}",
2814 e.Message, e.StackTrace); 2814 e.Message, e.StackTrace);
2815 } 2815 }
2816 } 2816 }
2817 } 2817 }
2818 } 2818 }
2819 2819
2820 public void TriggerOarFileSaved(Guid requestId, string message) 2820 public void TriggerOarFileSaved(Guid requestId, string message)
2821 { 2821 {
2822 OarFileSaved handlerOarFileSaved = OnOarFileSaved; 2822 OarFileSaved handlerOarFileSaved = OnOarFileSaved;
@@ -2831,7 +2831,7 @@ namespace OpenSim.Region.Framework.Scenes
2831 catch (Exception e) 2831 catch (Exception e)
2832 { 2832 {
2833 m_log.ErrorFormat( 2833 m_log.ErrorFormat(
2834 "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}", 2834 "[EVENT MANAGER]: Delegate for TriggerOarFileSaved failed - continuing. {0} {1}",
2835 e.Message, e.StackTrace); 2835 e.Message, e.StackTrace);
2836 } 2836 }
2837 } 2837 }
@@ -2852,7 +2852,7 @@ namespace OpenSim.Region.Framework.Scenes
2852 catch (Exception e) 2852 catch (Exception e)
2853 { 2853 {
2854 m_log.ErrorFormat( 2854 m_log.ErrorFormat(
2855 "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}", 2855 "[EVENT MANAGER]: Delegate for TriggerEmptyScriptCompileQueue failed - continuing. {0} {1}",
2856 e.Message, e.StackTrace); 2856 e.Message, e.StackTrace);
2857 } 2857 }
2858 } 2858 }
@@ -2873,7 +2873,7 @@ namespace OpenSim.Region.Framework.Scenes
2873 catch (Exception e) 2873 catch (Exception e)
2874 { 2874 {
2875 m_log.ErrorFormat( 2875 m_log.ErrorFormat(
2876 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}", 2876 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingStart failed - continuing. {0} {1}",
2877 e.Message, e.StackTrace); 2877 e.Message, e.StackTrace);
2878 } 2878 }
2879 } 2879 }
@@ -2894,7 +2894,7 @@ namespace OpenSim.Region.Framework.Scenes
2894 catch (Exception e) 2894 catch (Exception e)
2895 { 2895 {
2896 m_log.ErrorFormat( 2896 m_log.ErrorFormat(
2897 "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}", 2897 "[EVENT MANAGER]: Delegate for TriggerScriptColliding failed - continuing. {0} {1}",
2898 e.Message, e.StackTrace); 2898 e.Message, e.StackTrace);
2899 } 2899 }
2900 } 2900 }
@@ -2915,7 +2915,7 @@ namespace OpenSim.Region.Framework.Scenes
2915 catch (Exception e) 2915 catch (Exception e)
2916 { 2916 {
2917 m_log.ErrorFormat( 2917 m_log.ErrorFormat(
2918 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}", 2918 "[EVENT MANAGER]: Delegate for TriggerScriptCollidingEnd failed - continuing. {0} {1}",
2919 e.Message, e.StackTrace); 2919 e.Message, e.StackTrace);
2920 } 2920 }
2921 } 2921 }
@@ -2936,7 +2936,7 @@ namespace OpenSim.Region.Framework.Scenes
2936 catch (Exception e) 2936 catch (Exception e)
2937 { 2937 {
2938 m_log.ErrorFormat( 2938 m_log.ErrorFormat(
2939 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}", 2939 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingStart failed - continuing. {0} {1}",
2940 e.Message, e.StackTrace); 2940 e.Message, e.StackTrace);
2941 } 2941 }
2942 } 2942 }
@@ -2957,7 +2957,7 @@ namespace OpenSim.Region.Framework.Scenes
2957 catch (Exception e) 2957 catch (Exception e)
2958 { 2958 {
2959 m_log.ErrorFormat( 2959 m_log.ErrorFormat(
2960 "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}", 2960 "[EVENT MANAGER]: Delegate for TriggerScriptLandColliding failed - continuing. {0} {1}",
2961 e.Message, e.StackTrace); 2961 e.Message, e.StackTrace);
2962 } 2962 }
2963 } 2963 }
@@ -2978,7 +2978,7 @@ namespace OpenSim.Region.Framework.Scenes
2978 catch (Exception e) 2978 catch (Exception e)
2979 { 2979 {
2980 m_log.ErrorFormat( 2980 m_log.ErrorFormat(
2981 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}", 2981 "[EVENT MANAGER]: Delegate for TriggerScriptLandCollidingEnd failed - continuing. {0} {1}",
2982 e.Message, e.StackTrace); 2982 e.Message, e.StackTrace);
2983 } 2983 }
2984 } 2984 }
@@ -2999,7 +2999,7 @@ namespace OpenSim.Region.Framework.Scenes
2999 catch (Exception e) 2999 catch (Exception e)
3000 { 3000 {
3001 m_log.ErrorFormat( 3001 m_log.ErrorFormat(
3002 "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}", 3002 "[EVENT MANAGER]: Delegate for TriggerSetRootAgentScene failed - continuing. {0} {1}",
3003 e.Message, e.StackTrace); 3003 e.Message, e.StackTrace);
3004 } 3004 }
3005 } 3005 }
@@ -3020,13 +3020,13 @@ namespace OpenSim.Region.Framework.Scenes
3020 catch (Exception e) 3020 catch (Exception e)
3021 { 3021 {
3022 m_log.ErrorFormat( 3022 m_log.ErrorFormat(
3023 "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}", 3023 "[EVENT MANAGER]: Delegate for TriggerOnRegionUp failed - continuing. {0} {1}",
3024 e.Message, e.StackTrace); 3024 e.Message, e.StackTrace);
3025 } 3025 }
3026 } 3026 }
3027 } 3027 }
3028 } 3028 }
3029 3029
3030 public void TriggerOnSceneObjectLoaded(SceneObjectGroup so) 3030 public void TriggerOnSceneObjectLoaded(SceneObjectGroup so)
3031 { 3031 {
3032 SceneObjectDelegate handler = OnSceneObjectLoaded; 3032 SceneObjectDelegate handler = OnSceneObjectLoaded;
@@ -3041,13 +3041,13 @@ namespace OpenSim.Region.Framework.Scenes
3041 catch (Exception e) 3041 catch (Exception e)
3042 { 3042 {
3043 m_log.ErrorFormat( 3043 m_log.ErrorFormat(
3044 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}", 3044 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectLoaded failed - continuing. {0} {1}",
3045 e.Message, e.StackTrace); 3045 e.Message, e.StackTrace);
3046 } 3046 }
3047 } 3047 }
3048 } 3048 }
3049 } 3049 }
3050 3050
3051 public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) 3051 public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo)
3052 { 3052 {
3053 SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave; 3053 SceneObjectPreSaveDelegate handler = OnSceneObjectPreSave;
@@ -3062,13 +3062,13 @@ namespace OpenSim.Region.Framework.Scenes
3062 catch (Exception e) 3062 catch (Exception e)
3063 { 3063 {
3064 m_log.ErrorFormat( 3064 m_log.ErrorFormat(
3065 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}", 3065 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPreSave failed - continuing. {0} {1}",
3066 e.Message, e.StackTrace); 3066 e.Message, e.StackTrace);
3067 } 3067 }
3068 } 3068 }
3069 } 3069 }
3070 } 3070 }
3071 3071
3072 public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) 3072 public void TriggerOnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
3073 { 3073 {
3074 SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy; 3074 SceneObjectPartCopyDelegate handler = OnSceneObjectPartCopy;
@@ -3083,7 +3083,7 @@ namespace OpenSim.Region.Framework.Scenes
3083 catch (Exception e) 3083 catch (Exception e)
3084 { 3084 {
3085 m_log.ErrorFormat( 3085 m_log.ErrorFormat(
3086 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", 3086 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3087 e.Message, e.StackTrace); 3087 e.Message, e.StackTrace);
3088 } 3088 }
3089 } 3089 }
@@ -3104,7 +3104,7 @@ namespace OpenSim.Region.Framework.Scenes
3104 catch (Exception e) 3104 catch (Exception e)
3105 { 3105 {
3106 m_log.ErrorFormat( 3106 m_log.ErrorFormat(
3107 "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", 3107 "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}",
3108 e.Message, e.StackTrace); 3108 e.Message, e.StackTrace);
3109 } 3109 }
3110 } 3110 }
@@ -3147,7 +3147,7 @@ namespace OpenSim.Region.Framework.Scenes
3147 catch (Exception e) 3147 catch (Exception e)
3148 { 3148 {
3149 m_log.ErrorFormat( 3149 m_log.ErrorFormat(
3150 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}", 3150 "[EVENT MANAGER]: Delegate for TriggerOnSceneObjectPartCopy failed - continuing. {0} {1}",
3151 e.Message, e.StackTrace); 3151 e.Message, e.StackTrace);
3152 } 3152 }
3153 } 3153 }
@@ -3169,7 +3169,7 @@ namespace OpenSim.Region.Framework.Scenes
3169 catch (Exception e) 3169 catch (Exception e)
3170 { 3170 {
3171 m_log.ErrorFormat( 3171 m_log.ErrorFormat(
3172 "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", 3172 "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}",
3173 e.Message, e.StackTrace); 3173 e.Message, e.StackTrace);
3174 } 3174 }
3175 } 3175 }
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index cdd8d2d..e4aa196 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
140 timer.Start(); 140 timer.Start();
141 }; 141 };
142 } 142 }
143 143
144 // Check again, in case the regions were started while we were adding the event handler 144 // Check again, in case the regions were started while we were adding the event handler
145 if (SceneManager.Instance.AllRegionsReady) 145 if (SceneManager.Instance.AllRegionsReady)
146 { 146 {
@@ -821,7 +821,7 @@ namespace OpenSim.Region.Framework.Scenes
821 821
822 SceneObjectGroup tmp = m_group; 822 SceneObjectGroup tmp = m_group;
823 m_group = null; 823 m_group = null;
824 824
825 using (MemoryStream ms = new MemoryStream()) 825 using (MemoryStream ms = new MemoryStream())
826 { 826 {
827 BinaryFormatter fmt = new BinaryFormatter(); 827 BinaryFormatter fmt = new BinaryFormatter();
@@ -839,10 +839,10 @@ namespace OpenSim.Region.Framework.Scenes
839 public void StartCrossingCheck() 839 public void StartCrossingCheck()
840 { 840 {
841 // timer will be restart by crossingFailure 841 // timer will be restart by crossingFailure
842 // or never since crossing worked and this 842 // or never since crossing worked and this
843 // should be deleted 843 // should be deleted
844 StopTimer(); 844 StopTimer();
845 845
846 m_isCrossing = true; 846 m_isCrossing = true;
847 m_waitingCrossing = true; 847 m_waitingCrossing = true;
848 848
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 97009a0..cbf40c8 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.PhysicsModules.SharedBase;
35 35
36/* 36/*
37 * Steps to add a new prioritization policy: 37 * Steps to add a new prioritization policy:
38 * 38 *
39 * - Add a new value to the UpdatePrioritizationSchemes enum. 39 * - Add a new value to the UpdatePrioritizationSchemes enum.
40 * - Specify this new value in the [InterestManagement] section of your 40 * - Specify this new value in the [InterestManagement] section of your
41 * OpenSim.ini. The name in the config file must match the enum value name 41 * OpenSim.ini. The name in the config file must match the enum value name
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Framework.Scenes
59 public class Prioritizer 59 public class Prioritizer
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 private Scene m_scene; 63 private Scene m_scene;
64 64
65 public Prioritizer(Scene scene) 65 public Prioritizer(Scene scene)
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes
91 return 0; 91 return 0;
92 92
93 uint priority; 93 uint priority;
94 94
95 switch (m_scene.UpdatePrioritizationScheme) 95 switch (m_scene.UpdatePrioritizationScheme)
96 { 96 {
97/* 97/*
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Scenes
116 priority = GetPriorityByBestAvatarResponsiveness(client, entity); 116 priority = GetPriorityByBestAvatarResponsiveness(client, entity);
117 break; 117 break;
118 } 118 }
119 119
120 return priority; 120 return priority;
121 } 121 }
122 122
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes
145 145
146 return ComputeDistancePriority(client,entity,false); 146 return ComputeDistancePriority(client,entity,false);
147 } 147 }
148 148
149 private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity) 149 private uint GetPriorityByFrontBack(IClientAPI client, ISceneEntity entity)
150 { 150 {
151 // And anything attached to this avatar gets top priority as well 151 // And anything attached to this avatar gets top priority as well
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Framework.Scenes
172 172
173 if (entity is SceneObjectPart) 173 if (entity is SceneObjectPart)
174 { 174 {
175 // Attachments are high priority, 175 // Attachments are high priority,
176 if (((SceneObjectPart)entity).ParentGroup.IsAttachment) 176 if (((SceneObjectPart)entity).ParentGroup.IsAttachment)
177 return 2; 177 return 2;
178 178
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Framework.Scenes
196 ScenePresence presence = m_scene.GetScenePresence(client.AgentId); 196 ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
197 if (presence == null) 197 if (presence == null)
198 { 198 {
199 // this shouldn't happen, it basically means that we are prioritizing 199 // this shouldn't happen, it basically means that we are prioritizing
200 // updates to send to a client that doesn't have a presence in the scene 200 // updates to send to a client that doesn't have a presence in the scene
201 // seems like there's race condition here... 201 // seems like there's race condition here...
202 202
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Framework.Scenes
204 // throw new InvalidOperationException("Prioritization agent not defined"); 204 // throw new InvalidOperationException("Prioritization agent not defined");
205 return PriorityQueue.NumberOfQueues - 1; 205 return PriorityQueue.NumberOfQueues - 1;
206 } 206 }
207 207
208 // Use group position for child prims, since we are putting child prims in 208 // Use group position for child prims, since we are putting child prims in
209 // the same queue with the root of the group, the root prim (which goes into 209 // the same queue with the root of the group, the root prim (which goes into
210 // the queue first) should always be sent first, no need to adjust child prim 210 // the queue first) should always be sent first, no need to adjust child prim
@@ -227,14 +227,14 @@ namespace OpenSim.Region.Framework.Scenes
227 227
228 Vector3 presencePos = presence.AbsolutePosition; 228 Vector3 presencePos = presence.AbsolutePosition;
229 229
230 // Compute the distance... 230 // Compute the distance...
231 double distance = Vector3.Distance(presencePos, entityPos); 231 double distance = Vector3.Distance(presencePos, entityPos);
232 232
233 // And convert the distance to a priority queue, this computation gives queues 233 // And convert the distance to a priority queue, this computation gives queues
234 // at 10, 20, 40, 80, 160, 320, 640, and 1280m 234 // at 10, 20, 40, 80, 160, 320, 640, and 1280m
235 uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue 235 uint pqueue = PriorityQueue.NumberOfImmediateQueues + 1; // reserve attachments queue
236 uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues; 236 uint queues = PriorityQueue.NumberOfQueues - PriorityQueue.NumberOfImmediateQueues;
237/* 237/*
238 for (int i = 0; i < queues - 1; i++) 238 for (int i = 0; i < queues - 1; i++)
239 { 239 {
240 if (distance < 30 * Math.Pow(2.0,i)) 240 if (distance < 30 * Math.Pow(2.0,i))
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Framework.Scenes
246 { 246 {
247 float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f; 247 float tmp = (float)Math.Log((double)distance) * 1.442695f - 3.321928f;
248 // for a map identical to original: 248 // for a map identical to original:
249 // now 249 // now
250 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) 250 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance)
251 // 2st constant makes it be log2(distance/10) 251 // 2st constant makes it be log2(distance/10)
252 pqueue += (uint)tmp; 252 pqueue += (uint)tmp;
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Framework.Scenes
265 // Plane equation 265 // Plane equation
266 float d = -Vector3.Dot(camPosition, camAtAxis); 266 float d = -Vector3.Dot(camPosition, camAtAxis);
267 float p = Vector3.Dot(camAtAxis, entityPos) + d; 267 float p = Vector3.Dot(camAtAxis, entityPos) + d;
268 if (p < 0.0f) 268 if (p < 0.0f)
269 pqueue++; 269 pqueue++;
270 } 270 }
271 271
@@ -291,7 +291,7 @@ namespace OpenSim.Region.Framework.Scenes
291// uint pqueue = minpqueue; 291// uint pqueue = minpqueue;
292 uint pqueue = PriorityQueue.NumberOfImmediateQueues; 292 uint pqueue = PriorityQueue.NumberOfImmediateQueues;
293 float distance; 293 float distance;
294 294
295 Vector3 presencePos = presence.AbsolutePosition; 295 Vector3 presencePos = presence.AbsolutePosition;
296 if(entity is ScenePresence) 296 if(entity is ScenePresence)
297 { 297 {
@@ -319,10 +319,10 @@ namespace OpenSim.Region.Framework.Scenes
319 { 319 {
320 float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f; 320 float tmp = (float)Math.Log(distance) * 1.442695f - 3.321928f;
321 // for a map identical to original: 321 // for a map identical to original:
322 // now 322 // now
323 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance) 323 // 1st constant is 1/(log(2)) (natural log) so we get log2(distance)
324 // 2st constant makes it be log2(distance/10) 324 // 2st constant makes it be log2(distance/10)
325 325
326 pqueue += (uint)tmp; 326 pqueue += (uint)tmp;
327 if (pqueue > maxqueue) 327 if (pqueue > maxqueue)
328 pqueue = maxqueue; 328 pqueue = maxqueue;
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
index 3b31281..bf58885 100644
--- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
+++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
@@ -55,13 +55,13 @@ namespace OpenSim.Region.Framework.Scenes
55 public string localZone = TimeZone.CurrentTimeZone.StandardName; 55 public string localZone = TimeZone.CurrentTimeZone.StandardName;
56 public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now); 56 public TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
57 57
58 public RegionStatsHandler(RegionInfo region_info) 58 public RegionStatsHandler(RegionInfo region_info)
59 : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics") 59 : base("GET", "/" + Util.SHA1Hash(region_info.regionSecret), "RegionStats", "Region Statistics")
60 { 60 {
61 regionInfo = region_info; 61 regionInfo = region_info;
62 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); 62 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
63 } 63 }
64 64
65 protected override byte[] ProcessRequest( 65 protected override byte[] ProcessRequest(
66 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 66 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
67 { 67 {
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Framework.Scenes
72 { 72 {
73 get { return "text/plain"; } 73 get { return "text/plain"; }
74 } 74 }
75 75
76 private string Report() 76 private string Report()
77 { 77 {
78 OSDMap args = new OSDMap(30); 78 OSDMap args = new OSDMap(30);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes
83 args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now)); 83 args["UxTime"] = OSD.FromInteger(Util.ToUnixTime(DateTime.Now));
84 args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); 84 args["Memory"] = OSD.FromReal(Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
85 args["Version"] = OSD.FromString(VersionInfo.Version); 85 args["Version"] = OSD.FromString(VersionInfo.Version);
86 86
87 string strBuffer = ""; 87 string strBuffer = "";
88 strBuffer = OSDParser.SerializeJsonString(args); 88 strBuffer = OSDParser.SerializeJsonString(args);
89 89
diff --git a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
index 10ac37c..651c52e 100644
--- a/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPMaterial.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Framework.Scenes
34{ 34{
35 public static class SOPMaterialData 35 public static class SOPMaterialData
36 { 36 {
37 public enum SopMaterial : int // redundante and not in use for now 37 public enum SopMaterial : int // redundante and not in use for now
38 { 38 {
39 Stone = 0, 39 Stone = 0,
40 Metal = 1, 40 Metal = 1,
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
index 897918a..8d11331 100644
--- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Framework.Scenes
571 return errors; 571 return errors;
572 } 572 }
573 573
574 574
575 public string ToXml2() 575 public string ToXml2()
576 { 576 {
577 using (StringWriter sw = new StringWriter()) 577 using (StringWriter sw = new StringWriter())
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 61ea8ac..e3ccf96 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes
164 m_log.DebugFormat( 164 m_log.DebugFormat(
165 "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}", 165 "[AGENT INVENTORY]: Found folder {0} type {1} for item {2}",
166 f.Name, (AssetType)f.Type, item.Name); 166 f.Name, (AssetType)f.Type, item.Name);
167 167
168 item.Folder = f.ID; 168 item.Folder = f.ID;
169 } 169 }
170 else 170 else
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes
338 // Update item with new asset 338 // Update item with new asset
339 item.AssetID = asset.FullID; 339 item.AssetID = asset.FullID;
340 group.UpdateInventoryItem(item); 340 group.UpdateInventoryItem(item);
341 341
342 part.SendPropertiesToClient(remoteClient); 342 part.SendPropertiesToClient(remoteClient);
343 343
344 // Trigger rerunning of script (use TriggerRezScript event, see RezScript) 344 // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.Framework.Scenes
519 // needs to be found. If inventory item flags are updated 519 // needs to be found. If inventory item flags are updated
520 // the viewer's notion of the item needs to be refreshed. 520 // the viewer's notion of the item needs to be refreshed.
521 // 521 //
522 // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start 522 // In other situations we cannot send out a bulk update here, since this will cause editing of clothing to start
523 // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. 523 // failing frequently. Possibly this is a race with a separate transaction that uploads the asset.
524 if (sendUpdate) 524 if (sendUpdate)
525 remoteClient.SendBulkUpdateInventory(item); 525 remoteClient.SendBulkUpdateInventory(item);
@@ -734,7 +734,7 @@ namespace OpenSim.Region.Framework.Scenes
734 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions; 734 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
735 itemCopy.BasePermissions = item.BasePermissions; 735 itemCopy.BasePermissions = item.BasePermissions;
736 } 736 }
737 737
738 if (itemCopy.Folder == UUID.Zero) 738 if (itemCopy.Folder == UUID.Zero)
739 { 739 {
740 InventoryFolderBase folder = null; 740 InventoryFolderBase folder = null;
@@ -826,7 +826,7 @@ namespace OpenSim.Region.Framework.Scenes
826 } 826 }
827 827
828 UUID newFolderId = UUID.Random(); 828 UUID newFolderId = UUID.Random();
829 InventoryFolderBase newFolder 829 InventoryFolderBase newFolder
830 = new InventoryFolderBase( 830 = new InventoryFolderBase(
831 newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version); 831 newFolderId, folder.Name, recipientId, folder.Type, recipientParentFolderId, folder.Version);
832 InventoryService.AddFolder(newFolder); 832 InventoryService.AddFolder(newFolder);
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Framework.Scenes
906 item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false); 906 item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch(), false);
907 } 907 }
908 else 908 else
909 { 909 {
910 // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item. 910 // If item is transfer or permissions are off or calling agent is allowed to copy item owner's inventory item.
911 if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0) 911 if (((item.CurrentPermissions & (uint)PermissionMask.Transfer) != 0)
912 && (m_permissions.BypassPermissions() 912 && (m_permissions.BypassPermissions()
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes
954 moveitems.Add(n); 954 moveitems.Add(n);
955 remoteClient.SendInventoryItemCreateUpdate(n, 0); 955 remoteClient.SendInventoryItemCreateUpdate(n, 0);
956 } 956 }
957 957
958 MoveInventoryItem(remoteClient, moveitems); 958 MoveInventoryItem(remoteClient, moveitems);
959 } 959 }
960 960
@@ -1308,9 +1308,9 @@ namespace OpenSim.Region.Framework.Scenes
1308 public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message) 1308 public InventoryItemBase MoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, SceneObjectPart part, UUID itemId, out string message)
1309 { 1309 {
1310 m_log.DebugFormat( 1310 m_log.DebugFormat(
1311 "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}", 1311 "[PRIM INVENTORY]: Adding item {0} from {1} to folder {2} for {3}",
1312 itemId, part.Name, folderId, remoteClient.Name); 1312 itemId, part.Name, folderId, remoteClient.Name);
1313 1313
1314 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message); 1314 InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(remoteClient.AgentId, part, itemId, out message);
1315 if (agentItem == null) 1315 if (agentItem == null)
1316 return null; 1316 return null;
@@ -1377,7 +1377,7 @@ namespace OpenSim.Region.Framework.Scenes
1377 1377
1378 string message; 1378 string message;
1379 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message); 1379 InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message);
1380 1380
1381 if (item == null) 1381 if (item == null)
1382 remoteClient.SendAgentAlertMessage(message, false); 1382 remoteClient.SendAgentAlertMessage(message, false);
1383 } 1383 }
@@ -1712,7 +1712,7 @@ namespace OpenSim.Region.Framework.Scenes
1712 else // Updating existing item with new perms etc 1712 else // Updating existing item with new perms etc
1713 { 1713 {
1714// m_log.DebugFormat( 1714// m_log.DebugFormat(
1715// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", 1715// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()",
1716// currentItem.Name, part.Name); 1716// currentItem.Name, part.Name);
1717 1717
1718 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the 1718 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
@@ -1924,12 +1924,12 @@ namespace OpenSim.Region.Framework.Scenes
1924 return null; 1924 return null;
1925 } 1925 }
1926 1926
1927 AssetBase asset 1927 AssetBase asset
1928 = CreateAsset( 1928 = CreateAsset(
1929 itemBase.Name, 1929 itemBase.Name,
1930 itemBase.Description, 1930 itemBase.Description,
1931 (sbyte)itemBase.AssetType, 1931 (sbyte)itemBase.AssetType,
1932 Encoding.ASCII.GetBytes(scriptText), 1932 Encoding.ASCII.GetBytes(scriptText),
1933 agentID); 1933 agentID);
1934 1934
1935 AssetService.Store(asset); 1935 AssetService.Store(asset);
@@ -2008,8 +2008,8 @@ namespace OpenSim.Region.Framework.Scenes
2008 if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || 2008 if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) ||
2009 ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) 2009 ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0))
2010 return; 2010 return;
2011 } 2011 }
2012 else 2012 else
2013 { 2013 {
2014 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 2014 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
2015 return; 2015 return;
@@ -2102,7 +2102,7 @@ namespace OpenSim.Region.Framework.Scenes
2102 List<uint> deleteIDs = new List<uint>(); 2102 List<uint> deleteIDs = new List<uint>();
2103 List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>(); 2103 List<SceneObjectGroup> deleteGroups = new List<SceneObjectGroup>();
2104 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>(); 2104 List<SceneObjectGroup> takeGroups = new List<SceneObjectGroup>();
2105 2105
2106 // Start with true for both, then remove the flags if objects 2106 // Start with true for both, then remove the flags if objects
2107 // that we can't derez are part of the selection 2107 // that we can't derez are part of the selection
2108 bool permissionToTake = true; 2108 bool permissionToTake = true;
@@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes
2146 if (action != DeRezAction.Return) 2146 if (action != DeRezAction.Return)
2147 { 2147 {
2148 m_log.WarnFormat( 2148 m_log.WarnFormat(
2149 "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client", 2149 "[AGENT INVENTORY]: Ignoring attempt to {0} {1} {2} without a client",
2150 action, grp.Name, grp.UUID); 2150 action, grp.Name, grp.UUID);
2151 return; 2151 return;
2152 } 2152 }
@@ -2166,7 +2166,7 @@ namespace OpenSim.Region.Framework.Scenes
2166 } 2166 }
2167 if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) 2167 if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
2168 permissionToTake = false; 2168 permissionToTake = false;
2169 2169
2170 if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) 2170 if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
2171 permissionToDelete = false; 2171 permissionToDelete = false;
2172 } 2172 }
@@ -2471,9 +2471,9 @@ namespace OpenSim.Region.Framework.Scenes
2471 bool RezSelected, bool RemoveItem, UUID fromTaskID) 2471 bool RezSelected, bool RemoveItem, UUID fromTaskID)
2472 { 2472 {
2473// m_log.DebugFormat( 2473// m_log.DebugFormat(
2474// "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}", 2474// "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}",
2475// remoteClient.Name, itemID, fromTaskID); 2475// remoteClient.Name, itemID, fromTaskID);
2476 2476
2477 if (fromTaskID == UUID.Zero) 2477 if (fromTaskID == UUID.Zero)
2478 { 2478 {
2479 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); 2479 IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>();
@@ -2483,37 +2483,37 @@ namespace OpenSim.Region.Framework.Scenes
2483 RezSelected, RemoveItem, fromTaskID, false); 2483 RezSelected, RemoveItem, fromTaskID, false);
2484 } 2484 }
2485 else 2485 else
2486 { 2486 {
2487 SceneObjectPart part = GetSceneObjectPart(fromTaskID); 2487 SceneObjectPart part = GetSceneObjectPart(fromTaskID);
2488 if (part == null) 2488 if (part == null)
2489 { 2489 {
2490 m_log.ErrorFormat( 2490 m_log.ErrorFormat(
2491 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object", 2491 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object",
2492 remoteClient.Name, itemID, fromTaskID); 2492 remoteClient.Name, itemID, fromTaskID);
2493 2493
2494 return; 2494 return;
2495 } 2495 }
2496 2496
2497 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); 2497 TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID);
2498 if (item == null) 2498 if (item == null)
2499 { 2499 {
2500 m_log.ErrorFormat( 2500 m_log.ErrorFormat(
2501 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item", 2501 "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item",
2502 remoteClient.Name, itemID, fromTaskID); 2502 remoteClient.Name, itemID, fromTaskID);
2503 2503
2504 return; 2504 return;
2505 } 2505 }
2506 2506
2507 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 2507 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
2508 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); 2508 Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f);
2509 Vector3 pos = GetNewRezLocation( 2509 Vector3 pos = GetNewRezLocation(
2510 RayStart, RayEnd, RayTargetID, Quaternion.Identity, 2510 RayStart, RayEnd, RayTargetID, Quaternion.Identity,
2511 BypassRayCast, bRayEndIsIntersection, true, scale, false); 2511 BypassRayCast, bRayEndIsIntersection, true, scale, false);
2512 2512
2513 RezObject(part, item, pos, null, Vector3.Zero, 0, false); 2513 RezObject(part, item, pos, null, Vector3.Zero, 0, false);
2514 } 2514 }
2515 } 2515 }
2516 2516
2517 /// <summary> 2517 /// <summary>
2518 /// Rez an object into the scene from a prim's inventory. 2518 /// Rez an object into the scene from a prim's inventory.
2519 /// </summary> 2519 /// </summary>
@@ -2691,7 +2691,7 @@ namespace OpenSim.Region.Framework.Scenes
2691 { 2691 {
2692 if (ownerID != UUID.Zero) 2692 if (ownerID != UUID.Zero)
2693 return; 2693 return;
2694 2694
2695 if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID)) 2695 if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID))
2696 return; 2696 return;
2697 } 2697 }
@@ -2701,8 +2701,8 @@ namespace OpenSim.Region.Framework.Scenes
2701 foreach (uint localID in localIDs) 2701 foreach (uint localID in localIDs)
2702 { 2702 {
2703 SceneObjectPart part = GetSceneObjectPart(localID); 2703 SceneObjectPart part = GetSceneObjectPart(localID);
2704 if (part == null) 2704 if (part == null)
2705 continue; 2705 continue;
2706 2706
2707 if (!groups.Contains(part.ParentGroup)) 2707 if (!groups.Contains(part.ParentGroup))
2708 groups.Add(part.ParentGroup); 2708 groups.Add(part.ParentGroup);
@@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Framework.Scenes
2717 sog.ScheduleGroupForFullUpdate(); 2717 sog.ScheduleGroupForFullUpdate();
2718 2718
2719 SceneObjectPart[] partList = sog.Parts; 2719 SceneObjectPart[] partList = sog.Parts;
2720 2720
2721 foreach (SceneObjectPart child in partList) 2721 foreach (SceneObjectPart child in partList)
2722 { 2722 {
2723 child.Inventory.ChangeInventoryOwner(ownerID); 2723 child.Inventory.ChangeInventoryOwner(ownerID);
@@ -2756,8 +2756,8 @@ namespace OpenSim.Region.Framework.Scenes
2756 foreach (uint localID in localIDs) 2756 foreach (uint localID in localIDs)
2757 { 2757 {
2758 SceneObjectPart part = GetSceneObjectPart(localID); 2758 SceneObjectPart part = GetSceneObjectPart(localID);
2759 if (part == null) 2759 if (part == null)
2760 continue; 2760 continue;
2761 part.SendPropertiesToClient(remoteClient); 2761 part.SendPropertiesToClient(remoteClient);
2762 } 2762 }
2763 } 2763 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 24a2db7..2d62b50 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Framework.Scenes
86 else 86 else
87 EventManager.TriggerOnChatFromWorld(this, args); 87 EventManager.TriggerOnChatFromWorld(this, args);
88 } 88 }
89 89
90 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, 90 protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
91 UUID fromID, bool fromAgent, bool broadcast) 91 UUID fromID, bool fromAgent, bool broadcast)
92 { 92 {
@@ -212,13 +212,13 @@ namespace OpenSim.Region.Framework.Scenes
212 if (groupID != UUID.Zero) 212 if (groupID != UUID.Zero)
213 { 213 {
214 GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId); 214 GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId);
215 215
216 if (gmd == null) 216 if (gmd == null)
217 { 217 {
218// m_log.WarnFormat( 218// m_log.WarnFormat(
219// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", 219// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
220// remoteClient.Name, GroupID, objectLocalID); 220// remoteClient.Name, GroupID, objectLocalID);
221 221
222 return; 222 return;
223 } 223 }
224 } 224 }
@@ -243,7 +243,7 @@ namespace OpenSim.Region.Framework.Scenes
243 SceneObjectPart part = GetSceneObjectPart(primLocalID); 243 SceneObjectPart part = GetSceneObjectPart(primLocalID);
244 if (part == null) 244 if (part == null)
245 return; 245 return;
246 246
247 bool oldgprSelect = part.ParentGroup.IsSelected; 247 bool oldgprSelect = part.ParentGroup.IsSelected;
248 248
249 // This is wrong, wrong, wrong. Selection should not be 249 // This is wrong, wrong, wrong. Selection should not be
@@ -259,14 +259,14 @@ namespace OpenSim.Region.Framework.Scenes
259 259
260 // restore targetOmega 260 // restore targetOmega
261 if (part.AngularVelocity != Vector3.Zero) 261 if (part.AngularVelocity != Vector3.Zero)
262 part.ScheduleTerseUpdate(); 262 part.ScheduleTerseUpdate();
263 } 263 }
264 } 264 }
265 265
266 public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount, 266 public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount,
267 int transactiontype, string description) 267 int transactiontype, string description)
268 { 268 {
269 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount, 269 EventManager.MoneyTransferArgs args = new EventManager.MoneyTransferArgs(source, destination, amount,
270 transactiontype, description); 270 transactiontype, description);
271 271
272 EventManager.TriggerMoneyTransfer(this, args); 272 EventManager.TriggerMoneyTransfer(this, args);
@@ -275,8 +275,8 @@ namespace OpenSim.Region.Framework.Scenes
275 public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned, 275 public virtual void ProcessParcelBuy(UUID agentId, UUID groupId, bool final, bool groupOwned,
276 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated) 276 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
277 { 277 {
278 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned, 278 EventManager.LandBuyArgs args = new EventManager.LandBuyArgs(agentId, groupId, final, groupOwned,
279 removeContribution, parcelLocalID, parcelArea, 279 removeContribution, parcelLocalID, parcelArea,
280 parcelPrice, authenticated); 280 parcelPrice, authenticated);
281 281
282 // First, allow all validators a stab at it 282 // First, allow all validators a stab at it
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes
289 public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) 289 public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
290 { 290 {
291 SceneObjectPart part = GetSceneObjectPart(localID); 291 SceneObjectPart part = GetSceneObjectPart(localID);
292 292
293 if (part == null) 293 if (part == null)
294 return; 294 return;
295 295
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Framework.Scenes
302 // Currently only grab/touch for the single prim 302 // Currently only grab/touch for the single prim
303 // the client handles rez correctly 303 // the client handles rez correctly
304 obj.ObjectGrabHandler(localID, offsetPos, remoteClient); 304 obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
305 305
306 // If the touched prim handles touches, deliver it 306 // If the touched prim handles touches, deliver it
307 if ((part.ScriptEvents & scriptEvents.touch_start) != 0) 307 if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
308 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 308 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Framework.Scenes
310 // Deliver to the root prim if the touched prim doesn't handle touches 310 // Deliver to the root prim if the touched prim doesn't handle touches
311 // or if we're meant to pass on touches anyway. 311 // or if we're meant to pass on touches anyway.
312 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || 312 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
313 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) 313 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
314 { 314 {
315 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 315 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
316 } 316 }
@@ -337,7 +337,7 @@ namespace OpenSim.Region.Framework.Scenes
337 // get's it's position on the simulator even if it was the same as before 337 // get's it's position on the simulator even if it was the same as before
338 // This keeps the moving user's client in sync with the rest of the world. 338 // This keeps the moving user's client in sync with the rest of the world.
339 group.SendGroupTerseUpdate(); 339 group.SendGroupTerseUpdate();
340 340
341 SurfaceTouchEventArgs surfaceArg = null; 341 SurfaceTouchEventArgs surfaceArg = null;
342 if (surfaceArgs != null && surfaceArgs.Count > 0) 342 if (surfaceArgs != null && surfaceArgs.Count > 0)
343 surfaceArg = surfaceArgs[0]; 343 surfaceArg = surfaceArgs[0];
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes
483 } 483 }
484 }); 484 });
485 } 485 }
486 486
487 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other) 487 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other)
488 { 488 {
489 return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10; 489 return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10;
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes
603 m_descendentsRequestProcessing = false; 603 m_descendentsRequestProcessing = false;
604 } 604 }
605 } 605 }
606 606
607 /// <summary> 607 /// <summary>
608 /// Handle an inventory folder creation request from the client. 608 /// Handle an inventory folder creation request from the client.
609 /// </summary> 609 /// </summary>
@@ -657,7 +657,7 @@ namespace OpenSim.Region.Framework.Scenes
657 } 657 }
658 } 658 }
659 } 659 }
660 660
661 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) 661 public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
662 { 662 {
663 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID); 663 InventoryFolderBase folder = InventoryService.GetFolder(remoteClient.AgentId, folderID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index b26b789..893b38c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -35,7 +35,7 @@ using OpenSim.Framework;
35using OpenSim.Region.Framework.Interfaces; 35using OpenSim.Region.Framework.Interfaces;
36 36
37namespace OpenSim.Region.Framework.Scenes 37namespace OpenSim.Region.Framework.Scenes
38{ 38{
39 #region Delegates 39 #region Delegates
40 public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID); 40 public delegate uint GenerateClientFlagsHandler(UUID userID, UUID objectID);
41 public delegate void SetBypassPermissionsHandler(bool value); 41 public delegate void SetBypassPermissionsHandler(bool value);
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes
98 public class ScenePermissions 98 public class ScenePermissions
99 { 99 {
100// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 100// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
101 101
102 private Scene m_scene; 102 private Scene m_scene;
103 103
104 public ScenePermissions(Scene scene) 104 public ScenePermissions(Scene scene)
@@ -261,7 +261,7 @@ namespace OpenSim.Region.Framework.Scenes
261 public bool CanDeleteObject(UUID objectID, UUID deleter) 261 public bool CanDeleteObject(UUID objectID, UUID deleter)
262 { 262 {
263 bool result = true; 263 bool result = true;
264 264
265 DeleteObjectHandler handler = OnDeleteObject; 265 DeleteObjectHandler handler = OnDeleteObject;
266 if (handler != null) 266 if (handler != null)
267 { 267 {
@@ -275,14 +275,14 @@ namespace OpenSim.Region.Framework.Scenes
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 return result; 279 return result;
280 } 280 }
281 281
282 public bool CanTransferObject(UUID objectID, UUID recipient) 282 public bool CanTransferObject(UUID objectID, UUID recipient)
283 { 283 {
284 bool result = true; 284 bool result = true;
285 285
286 TransferObjectHandler handler = OnTransferObject; 286 TransferObjectHandler handler = OnTransferObject;
287 if (handler != null) 287 if (handler != null)
288 { 288 {
@@ -296,7 +296,7 @@ namespace OpenSim.Region.Framework.Scenes
296 } 296 }
297 } 297 }
298 } 298 }
299 299
300 return result; 300 return result;
301 } 301 }
302 302
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Framework.Scenes
306 public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID) 306 public bool CanTakeObject(UUID objectID, UUID AvatarTakingUUID)
307 { 307 {
308 bool result = true; 308 bool result = true;
309 309
310 TakeObjectHandler handler = OnTakeObject; 310 TakeObjectHandler handler = OnTakeObject;
311 if (handler != null) 311 if (handler != null)
312 { 312 {
@@ -320,11 +320,11 @@ namespace OpenSim.Region.Framework.Scenes
320 } 320 }
321 } 321 }
322 } 322 }
323 323
324// m_log.DebugFormat( 324// m_log.DebugFormat(
325// "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}", 325// "[SCENE PERMISSIONS]: CanTakeObject() fired for object {0}, taker {1}, result {2}",
326// objectID, AvatarTakingUUID, result); 326// objectID, AvatarTakingUUID, result);
327 327
328 return result; 328 return result;
329 } 329 }
330 330
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Framework.Scenes
363 public bool CanTakeCopyObject(UUID objectID, UUID userID) 363 public bool CanTakeCopyObject(UUID objectID, UUID userID)
364 { 364 {
365 bool result = true; 365 bool result = true;
366 366
367 TakeCopyObjectHandler handler = OnTakeCopyObject; 367 TakeCopyObjectHandler handler = OnTakeCopyObject;
368 if (handler != null) 368 if (handler != null)
369 { 369 {
@@ -377,11 +377,11 @@ namespace OpenSim.Region.Framework.Scenes
377 } 377 }
378 } 378 }
379 } 379 }
380 380
381// m_log.DebugFormat( 381// m_log.DebugFormat(
382// "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}", 382// "[SCENE PERMISSIONS]: CanTakeCopyObject() fired for object {0}, user {1}, result {2}",
383// objectID, userID, result); 383// objectID, userID, result);
384 384
385 return result; 385 return result;
386 } 386 }
387 387
@@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes
478 public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) 478 public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects)
479 { 479 {
480 bool result = true; 480 bool result = true;
481 481
482 ReturnObjectsHandler handler = OnReturnObjects; 482 ReturnObjectsHandler handler = OnReturnObjects;
483 if (handler != null) 483 if (handler != null)
484 { 484 {
@@ -492,11 +492,11 @@ namespace OpenSim.Region.Framework.Scenes
492 } 492 }
493 } 493 }
494 } 494 }
495 495
496// m_log.DebugFormat( 496// m_log.DebugFormat(
497// "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}", 497// "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}",
498// user, objects.Count, land.LandData.Name, result); 498// user, objects.Count, land.LandData.Name, result);
499 499
500 return result; 500 return result;
501 } 501 }
502 502
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.Framework.Scenes
1004 } 1004 }
1005 return true; 1005 return true;
1006 } 1006 }
1007 1007
1008 public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID) 1008 public bool CanTransferObjectInventory(UUID itemID, UUID objectID, UUID userID)
1009 { 1009 {
1010 TransferObjectInventoryHandler handler = OnTransferObjectInventory; 1010 TransferObjectInventoryHandler handler = OnTransferObjectInventory;
@@ -1019,7 +1019,7 @@ namespace OpenSim.Region.Framework.Scenes
1019 } 1019 }
1020 return true; 1020 return true;
1021 } 1021 }
1022 1022
1023 /// <summary> 1023 /// <summary>
1024 /// Check whether the specified user is allowed to create the given inventory type in their inventory. 1024 /// Check whether the specified user is allowed to create the given inventory type in their inventory.
1025 /// </summary> 1025 /// </summary>
@@ -1039,8 +1039,8 @@ namespace OpenSim.Region.Framework.Scenes
1039 } 1039 }
1040 } 1040 }
1041 return true; 1041 return true;
1042 } 1042 }
1043 1043
1044 /// <summary> 1044 /// <summary>
1045 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1045 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1046 /// </summary> 1046 /// </summary>
@@ -1061,7 +1061,7 @@ namespace OpenSim.Region.Framework.Scenes
1061 } 1061 }
1062 return true; 1062 return true;
1063 } 1063 }
1064 1064
1065 /// <summary> 1065 /// <summary>
1066 /// Check whether the specified user is allowed to copy the given inventory item from their own inventory. 1066 /// Check whether the specified user is allowed to copy the given inventory item from their own inventory.
1067 /// </summary> 1067 /// </summary>
@@ -1082,7 +1082,7 @@ namespace OpenSim.Region.Framework.Scenes
1082 } 1082 }
1083 return true; 1083 return true;
1084 } 1084 }
1085 1085
1086 /// <summary> 1086 /// <summary>
1087 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. 1087 /// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
1088 /// </summary> 1088 /// </summary>
@@ -1103,7 +1103,7 @@ namespace OpenSim.Region.Framework.Scenes
1103 } 1103 }
1104 return true; 1104 return true;
1105 } 1105 }
1106 1106
1107 public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID) 1107 public bool CanTransferUserInventory(UUID itemID, UUID userID, UUID recipientID)
1108 { 1108 {
1109 TransferUserInventoryHandler handler = OnTransferUserInventory; 1109 TransferUserInventoryHandler handler = OnTransferUserInventory;
@@ -1118,7 +1118,7 @@ namespace OpenSim.Region.Framework.Scenes
1118 } 1118 }
1119 return true; 1119 return true;
1120 } 1120 }
1121 1121
1122 public bool CanTeleport(UUID userID) 1122 public bool CanTeleport(UUID userID)
1123 { 1123 {
1124 TeleportHandler handler = OnTeleport; 1124 TeleportHandler handler = OnTeleport;
@@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes
1133 } 1133 }
1134 return true; 1134 return true;
1135 } 1135 }
1136 1136
1137 public bool CanControlPrimMedia(UUID userID, UUID primID, int face) 1137 public bool CanControlPrimMedia(UUID userID, UUID primID, int face)
1138 { 1138 {
1139 ControlPrimMediaHandler handler = OnControlPrimMedia; 1139 ControlPrimMediaHandler handler = OnControlPrimMedia;
@@ -1147,8 +1147,8 @@ namespace OpenSim.Region.Framework.Scenes
1147 } 1147 }
1148 } 1148 }
1149 return true; 1149 return true;
1150 } 1150 }
1151 1151
1152 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face) 1152 public bool CanInteractWithPrimMedia(UUID userID, UUID primID, int face)
1153 { 1153 {
1154 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia; 1154 InteractWithPrimMediaHandler handler = OnInteractWithPrimMedia;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d7a4ca4..352bc05 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes
61 { 61 {
62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; 62 private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L;
63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; 63 private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L;
64 64
65 65
66 public delegate void SynchronizeSceneHandler(Scene scene); 66 public delegate void SynchronizeSceneHandler(Scene scene);
67 67
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Scenes
88 /// </summary> 88 /// </summary>
89 /// <remarks> 89 /// <remarks>
90 /// Even if false, the scene will still be saved on clean shutdown. 90 /// Even if false, the scene will still be saved on clean shutdown.
91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels. 91 /// FIXME: Currently, setting this to false will mean that objects are not periodically returned from parcels.
92 /// This needs to be fixed. 92 /// This needs to be fixed.
93 /// </remarks> 93 /// </remarks>
94 public bool PeriodicBackup { get; set; } 94 public bool PeriodicBackup { get; set; }
@@ -103,9 +103,9 @@ namespace OpenSim.Region.Framework.Scenes
103 /// If false then physical objects are disabled, though collisions will continue as normal. 103 /// If false then physical objects are disabled, though collisions will continue as normal.
104 /// </summary> 104 /// </summary>
105 105
106 public bool PhysicsEnabled 106 public bool PhysicsEnabled
107 { 107 {
108 get 108 get
109 { 109 {
110 return m_physicsEnabled; 110 return m_physicsEnabled;
111 } 111 }
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Framework.Scenes
237 /// to compensate for SL bug 237 /// to compensate for SL bug
238 /// </summary> 238 /// </summary>
239 public bool LegacySitOffsets = true; 239 public bool LegacySitOffsets = true;
240 240
241 /// <summary> 241 /// <summary>
242 /// Can avatars cross from and to this region? 242 /// Can avatars cross from and to this region?
243 /// </summary> 243 /// </summary>
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes
245 245
246 /// Max prims an Physical object will hold 246 /// Max prims an Physical object will hold
247 /// </summary> 247 /// </summary>
248 /// 248 ///
249 public int m_linksetPhysCapacity = 0; 249 public int m_linksetPhysCapacity = 0;
250 250
251 /// <summary> 251 /// <summary>
@@ -383,9 +383,9 @@ namespace OpenSim.Region.Framework.Scenes
383 /// <summary> 383 /// <summary>
384 /// Frame time 384 /// Frame time
385 /// </remarks> 385 /// </remarks>
386 public float FrameTime { get; private set; } 386 public float FrameTime { get; private set; }
387 public int FrameTimeWarnPercent { get; private set; } 387 public int FrameTimeWarnPercent { get; private set; }
388 public int FrameTimeCritPercent { get; private set; } 388 public int FrameTimeCritPercent { get; private set; }
389 389
390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option 390 // Normalize the frame related stats to nominal 55fps for viewer and scripts option
391 // see SimStatsReporter.cs 391 // see SimStatsReporter.cs
@@ -397,7 +397,7 @@ namespace OpenSim.Region.Framework.Scenes
397 /// <remarks> 397 /// <remarks>
398 /// Always derived from MinFrameTicks. 398 /// Always derived from MinFrameTicks.
399 /// </remarks> 399 /// </remarks>
400 public float MinMaintenanceTime { get; private set; } 400 public float MinMaintenanceTime { get; private set; }
401 401
402 private int m_update_physics = 1; 402 private int m_update_physics = 1;
403 private int m_update_entitymovement = 1; 403 private int m_update_entitymovement = 1;
@@ -529,7 +529,7 @@ namespace OpenSim.Region.Framework.Scenes
529 529
530// private int m_lastUpdate; 530// private int m_lastUpdate;
531 private bool m_firstHeartbeat = true; 531 private bool m_firstHeartbeat = true;
532 532
533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; 533// private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time;
534// private bool m_reprioritizationEnabled = true; 534// private bool m_reprioritizationEnabled = true;
535// private double m_reprioritizationInterval = 5000.0; 535// private double m_reprioritizationInterval = 5000.0;
@@ -868,7 +868,7 @@ namespace OpenSim.Region.Framework.Scenes
868 868
869 #region Constructors 869 #region Constructors
870 870
871 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 871 public Scene(RegionInfo regInfo, AgentCircuitManager authen,
872 ISimulationDataService simDataService, IEstateDataService estateDataService, 872 ISimulationDataService simDataService, IEstateDataService estateDataService,
873 IConfigSource config, string simulatorVersion) 873 IConfigSource config, string simulatorVersion)
874 : this(regInfo) 874 : this(regInfo)
@@ -951,7 +951,7 @@ namespace OpenSim.Region.Framework.Scenes
951 951
952 RegisterDefaultSceneEvents(); 952 RegisterDefaultSceneEvents();
953 953
954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled 954 // XXX: Don't set the public property since we don't want to activate here. This needs to be handled
955 // better in the future. 955 // better in the future.
956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts; 956 m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
957 957
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.Framework.Scenes
1212 1212
1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 1213 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 1214 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
1215 1215
1216 } 1216 }
1217 1217
1218 public Scene(RegionInfo regInfo) 1218 public Scene(RegionInfo regInfo)
@@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
1549 /// </summary> 1549 /// </summary>
1550 /// <param name='startScripts'> 1550 /// <param name='startScripts'>
1551 /// Start the scripts within the scene. 1551 /// Start the scripts within the scene.
1552 /// </param> 1552 /// </param>
1553 public void Start(bool startScripts) 1553 public void Start(bool startScripts)
1554 { 1554 {
1555 if (IsRunning) 1555 if (IsRunning)
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes
1569 1569
1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 1570//int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
1571//System.Diagnostics.Process proc = new System.Diagnostics.Process(); 1571//System.Diagnostics.Process proc = new System.Diagnostics.Process();
1572//proc.EnableRaisingEvents=false; 1572//proc.EnableRaisingEvents=false;
1573//proc.StartInfo.FileName = "/bin/kill"; 1573//proc.StartInfo.FileName = "/bin/kill";
1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 1574//proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
1575//proc.Start(); 1575//proc.Start();
@@ -1637,7 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes
1637 Update(-1); 1637 Update(-1);
1638 1638
1639 Watchdog.RemoveThread(); 1639 Watchdog.RemoveThread();
1640 } 1640 }
1641 1641
1642 private void Maintenance() 1642 private void Maintenance()
1643 { 1643 {
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes
1706 previousMaintenanceTick = m_lastMaintenanceTick; 1706 previousMaintenanceTick = m_lastMaintenanceTick;
1707 m_lastMaintenanceTick = Util.EnvironmentTickCount(); 1707 m_lastMaintenanceTick = Util.EnvironmentTickCount();
1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc); 1708 runtc = Util.EnvironmentTickCountSubtract(m_lastMaintenanceTick, runtc);
1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc; 1709 runtc = (int)(MinMaintenanceTime * 1000) - runtc;
1710 1710
1711 if (runtc > 0) 1711 if (runtc > 0)
1712 m_maintenanceWaitEvent.WaitOne(runtc); 1712 m_maintenanceWaitEvent.WaitOne(runtc);
@@ -1783,7 +1783,7 @@ namespace OpenSim.Region.Framework.Scenes
1783 if (Frame % m_update_entitymovement == 0) 1783 if (Frame % m_update_entitymovement == 0)
1784 m_sceneGraph.UpdateScenePresenceMovement(); 1784 m_sceneGraph.UpdateScenePresenceMovement();
1785 1785
1786 // Get the simulation frame time that the avatar force input 1786 // Get the simulation frame time that the avatar force input
1787 // took 1787 // took
1788 tmpMS2 = Util.GetTimeStampMS(); 1788 tmpMS2 = Util.GetTimeStampMS();
1789 agentMS = (float)(tmpMS2 - tmpMS); 1789 agentMS = (float)(tmpMS2 - tmpMS);
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 if (SynchronizeScene != null) 1799 if (SynchronizeScene != null)
1800 SynchronizeScene(this); 1800 SynchronizeScene(this);
1801 } 1801 }
1802 1802
1803 tmpMS2 = Util.GetTimeStampMS(); 1803 tmpMS2 = Util.GetTimeStampMS();
1804 physicsMS = (float)(tmpMS2 - tmpMS); 1804 physicsMS = (float)(tmpMS2 - tmpMS);
1805 tmpMS = tmpMS2; 1805 tmpMS = tmpMS2;
@@ -1820,17 +1820,17 @@ namespace OpenSim.Region.Framework.Scenes
1820 tmpMS2 = Util.GetTimeStampMS(); 1820 tmpMS2 = Util.GetTimeStampMS();
1821 agentMS += (float)(tmpMS2 - tmpMS); 1821 agentMS += (float)(tmpMS2 - tmpMS);
1822 tmpMS = tmpMS2; 1822 tmpMS = tmpMS2;
1823 1823
1824 // Delete temp-on-rez stuff 1824 // Delete temp-on-rez stuff
1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps) 1825 if (Frame % m_update_temp_cleaning == 0 && !m_cleaningTemps)
1826 { 1826 {
1827 m_cleaningTemps = true; 1827 m_cleaningTemps = true;
1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; }); 1828 Util.FireAndForget(delegate { CleanTempObjects(); m_cleaningTemps = false; });
1829 tmpMS2 = Util.GetTimeStampMS(); 1829 tmpMS2 = Util.GetTimeStampMS();
1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects 1830 tempOnRezMS = (float)(tmpMS2 - tmpMS); // bad.. counts the FireAndForget, not CleanTempObjects
1831 tmpMS = tmpMS2; 1831 tmpMS = tmpMS2;
1832 } 1832 }
1833 1833
1834 if (Frame % m_update_events == 0) 1834 if (Frame % m_update_events == 0)
1835 { 1835 {
1836 UpdateEvents(); 1836 UpdateEvents();
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
1916 1916
1917 // reuse frameMS as temporary 1917 // reuse frameMS as temporary
1918 frameMS = (float)tmpMS2; 1918 frameMS = (float)tmpMS2;
1919 1919
1920 // sleep if we can 1920 // sleep if we can
1921 if (tmpMS2 > 0) 1921 if (tmpMS2 > 0)
1922 { 1922 {
@@ -1939,9 +1939,9 @@ namespace OpenSim.Region.Framework.Scenes
1939 // script time is not scene frame time, but is displayed per frame 1939 // script time is not scene frame time, but is displayed per frame
1940 float scriptTimeMS = GetAndResetScriptExecutionTime(); 1940 float scriptTimeMS = GetAndResetScriptExecutionTime();
1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS, 1941 StatsReporter.AddFrameStats(TimeDilation, physicsFPS, agentMS,
1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS); 1942 physicsMS + physicsMS2, otherMS , sleepMS, frameMS, scriptTimeMS);
1943 1943
1944 1944
1945 1945
1946 // if (Frame%m_update_avatars == 0) 1946 // if (Frame%m_update_avatars == 0)
1947 // UpdateInWorldTime(); 1947 // UpdateInWorldTime();
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Framework.Scenes
2129 } 2129 }
2130 2130
2131 /// <summary> 2131 /// <summary>
2132 /// Tell an agent that their object has been returned. 2132 /// Tell an agent that their object has been returned.
2133 /// </summary> 2133 /// </summary>
2134 /// <remarks> 2134 /// <remarks>
2135 /// The actual return is handled by the caller. 2135 /// The actual return is handled by the caller.
@@ -2221,7 +2221,7 @@ namespace OpenSim.Region.Framework.Scenes
2221 { 2221 {
2222 if(Bakedmap != null) 2222 if(Bakedmap != null)
2223 { 2223 {
2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain."); 2224 m_log.Warn("[TERRAIN]: terrain not found. Used stored baked terrain.");
2225 Heightmap = Bakedmap.MakeCopy(); 2225 Heightmap = Bakedmap.MakeCopy();
2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID); 2226 SimulationDataService.StoreTerrain(Heightmap.GetTerrainData(), RegionInfo.RegionID);
2227 } 2227 }
@@ -2290,7 +2290,7 @@ namespace OpenSim.Region.Framework.Scenes
2290 GridRegion region = new GridRegion(RegionInfo); 2290 GridRegion region = new GridRegion(RegionInfo);
2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 2291 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>", 2292 // m_log.DebugFormat("[SCENE]: RegisterRegionWithGrid. name={0},id={1},loc=<{2},{3}>,size=<{4},{5}>",
2293 // m_regionName, 2293 // m_regionName,
2294 // RegionInfo.RegionID, 2294 // RegionInfo.RegionID,
2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY, 2295 // RegionInfo.RegionLocX, RegionInfo.RegionLocY,
2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY); 2296 // RegionInfo.RegionSizeX, RegionInfo.RegionSizeY);
@@ -2369,7 +2369,7 @@ namespace OpenSim.Region.Framework.Scenes
2369 return PhysicsScene.SupportsRaycastWorldFiltered(); 2369 return PhysicsScene.SupportsRaycastWorldFiltered();
2370 } 2370 }
2371 2371
2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) 2372 public object RayCastFiltered(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
2373 { 2373 {
2374 if (PhysicsScene == null) 2374 if (PhysicsScene == null)
2375 return null; 2375 return null;
@@ -2463,7 +2463,7 @@ namespace OpenSim.Region.Framework.Scenes
2463 if (wpos.Z > pos.Z) pos = wpos; 2463 if (wpos.Z > pos.Z) pos = wpos;
2464 return pos; 2464 return pos;
2465 } 2465 }
2466 } 2466 }
2467 } 2467 }
2468 // else the first we got 2468 // else the first we got
2469 pos = physresults[0].Normal * scale; 2469 pos = physresults[0].Normal * scale;
@@ -2775,7 +2775,7 @@ namespace OpenSim.Region.Framework.Scenes
2775 } 2775 }
2776 else 2776 else
2777 { 2777 {
2778 toReturn.Add((SceneObjectGroup)e); 2778 toReturn.Add((SceneObjectGroup)e);
2779 } 2779 }
2780 } 2780 }
2781 } 2781 }
@@ -2847,7 +2847,7 @@ namespace OpenSim.Region.Framework.Scenes
2847 if (removeScripts) 2847 if (removeScripts)
2848 group.Clear(); 2848 group.Clear();
2849 partList = null; 2849 partList = null;
2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); 2850 // m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
2851 } 2851 }
2852 2852
2853 /// <summary> 2853 /// <summary>
@@ -3023,7 +3023,7 @@ namespace OpenSim.Region.Framework.Scenes
3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); 3023 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom); 3024// sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
3025 3025
3026 // Don't sent a full update here because this will cause full updates to be sent twice for 3026 // Don't sent a full update here because this will cause full updates to be sent twice for
3027 // attachments on region crossings, resulting in viewer glitches. 3027 // attachments on region crossings, resulting in viewer glitches.
3028 AddRestoredSceneObject(sceneObject, false, false, false); 3028 AddRestoredSceneObject(sceneObject, false, false, false);
3029 3029
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044 3044
3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 3045 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
3046 3046
3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the 3047 // We must currently not resume scripts at this stage since AttachmentsModule does not have the
3048 // information that this is due to a teleport/border cross rather than an ordinary attachment. 3048 // information that this is due to a teleport/border cross rather than an ordinary attachment.
3049 // We currently do this in Scene.MakeRootAgent() instead. 3049 // We currently do this in Scene.MakeRootAgent() instead.
3050 if (AttachmentsModule != null) 3050 if (AttachmentsModule != null)
@@ -3141,7 +3141,7 @@ namespace OpenSim.Region.Framework.Scenes
3141 vialogin 3141 vialogin
3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 3142 = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0
3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 3143 || (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
3144 3144
3145 CheckHeartbeat(); 3145 CheckHeartbeat();
3146 3146
3147 sp = GetScenePresence(client.AgentId); 3147 sp = GetScenePresence(client.AgentId);
@@ -3152,10 +3152,10 @@ namespace OpenSim.Region.Framework.Scenes
3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}", 3152 "[SCENE]: Adding new child scene presence {0} {1} to scene {2} at pos {3}, tpflags: {4}",
3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos, 3153 client.Name, client.AgentId, RegionInfo.RegionName, client.StartPos,
3154 ((TPFlags)aCircuit.teleportFlags).ToString()); 3154 ((TPFlags)aCircuit.teleportFlags).ToString());
3155 3155
3156 m_clientManager.Add(client); 3156 m_clientManager.Add(client);
3157 SubscribeToClientEvents(client); 3157 SubscribeToClientEvents(client);
3158 3158
3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); 3159 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
3160 3160
3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; 3161 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
@@ -3167,9 +3167,9 @@ namespace OpenSim.Region.Framework.Scenes
3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the 3167 // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the
3168 // client is for a root or child agent. 3168 // client is for a root or child agent.
3169 // XXX: This may be better set for a new client before that client is added to the client manager. 3169 // XXX: This may be better set for a new client before that client is added to the client manager.
3170 // But need to know what happens in the case where a ScenePresence is already present (and if this 3170 // But need to know what happens in the case where a ScenePresence is already present (and if this
3171 // actually occurs). 3171 // actually occurs).
3172 3172
3173 3173
3174 m_log.WarnFormat( 3174 m_log.WarnFormat(
3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence", 3175 "[SCENE]: Already found {0} scene presence for {1} in {2} when asked to add new scene presence",
@@ -3177,9 +3177,9 @@ namespace OpenSim.Region.Framework.Scenes
3177 3177
3178 reallyNew = false; 3178 reallyNew = false;
3179 } 3179 }
3180 client.SceneAgent = sp; 3180 client.SceneAgent = sp;
3181 3181
3182 // This is currently also being done earlier in NewUserConnection for real users to see if this 3182 // This is currently also being done earlier in NewUserConnection for real users to see if this
3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other 3183 // resolves problems where HG agents are occasionally seen by others as "Unknown user" in chat and other
3184 // places. However, we still need to do it here for NPCs. 3184 // places. However, we still need to do it here for NPCs.
3185 CacheUserName(sp, aCircuit); 3185 CacheUserName(sp, aCircuit);
@@ -3610,7 +3610,7 @@ namespace OpenSim.Region.Framework.Scenes
3610 } 3610 }
3611 3611
3612 /// <summary> 3612 /// <summary>
3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using 3613 /// Duplicates object specified by localID at position raycasted against RayTargetObject using
3614 /// RayEnd and RayStart to determine what the angle of the ray is 3614 /// RayEnd and RayStart to determine what the angle of the ray is
3615 /// </summary> 3615 /// </summary>
3616 /// <param name="localID">ID of object to duplicate</param> 3616 /// <param name="localID">ID of object to duplicate</param>
@@ -3637,7 +3637,7 @@ namespace OpenSim.Region.Framework.Scenes
3637 if (target != null && target2 != null) 3637 if (target != null && target2 != null)
3638 { 3638 {
3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart); 3639 Vector3 direction = Vector3.Normalize(RayEnd - RayStart);
3640 3640
3641 pos = target2.AbsolutePosition; 3641 pos = target2.AbsolutePosition;
3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString()); 3642 //m_log.Info("[OBJECT_REZ]: TargetPos: " + pos.ToString() + ", RayStart: " + RayStart.ToString() + ", RayEnd: " + RayEnd.ToString() + ", Volume: " + Util.GetDistanceTo(RayStart,RayEnd).ToString() + ", mag1: " + Util.GetMagnitude(RayStart).ToString() + ", mag2: " + Util.GetMagnitude(RayEnd).ToString());
3643 3643
@@ -3715,7 +3715,7 @@ namespace OpenSim.Region.Framework.Scenes
3715 } 3715 }
3716 3716
3717 /// <summary> 3717 /// <summary>
3718 /// Remove the given client from the scene. 3718 /// Remove the given client from the scene.
3719 /// </summary> 3719 /// </summary>
3720 /// <remarks> 3720 /// <remarks>
3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead 3721 /// Only clientstack code should call this directly. All other code should call IncomingCloseAgent() instead
@@ -3726,7 +3726,7 @@ namespace OpenSim.Region.Framework.Scenes
3726 /// <param name='closeChildAgents'> 3726 /// <param name='closeChildAgents'>
3727 /// Close the neighbour child agents associated with this client. 3727 /// Close the neighbour child agents associated with this client.
3728 /// </param> 3728 /// </param>
3729 /// 3729 ///
3730 3730
3731 private object m_removeClientPrivLock = new Object(); 3731 private object m_removeClientPrivLock = new Object();
3732 3732
@@ -3734,7 +3734,7 @@ namespace OpenSim.Region.Framework.Scenes
3734 { 3734 {
3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID); 3735 AgentCircuitData acd = m_authenticateHandler.GetAgentCircuitData(agentID);
3736 3736
3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3737 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3738 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3739 // However, will keep for now just in case. 3739 // However, will keep for now just in case.
3740 if (acd == null) 3740 if (acd == null)
@@ -3747,12 +3747,12 @@ namespace OpenSim.Region.Framework.Scenes
3747 3747
3748 // TODO: Can we now remove this lock? 3748 // TODO: Can we now remove this lock?
3749 lock (m_removeClientPrivLock) 3749 lock (m_removeClientPrivLock)
3750 { 3750 {
3751 bool isChildAgent = false; 3751 bool isChildAgent = false;
3752 3752
3753 ScenePresence avatar = GetScenePresence(agentID); 3753 ScenePresence avatar = GetScenePresence(agentID);
3754 3754
3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which 3755 // Shouldn't be necessary since RemoveClient() is currently only called by IClientAPI.Close() which
3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not 3756 // in turn is only called by Scene.IncomingCloseAgent() which checks whether the presence exists or not
3757 // However, will keep for now just in case. 3757 // However, will keep for now just in case.
3758 if (avatar == null) 3758 if (avatar == null)
@@ -3792,7 +3792,7 @@ namespace OpenSim.Region.Framework.Scenes
3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI 3792 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
3793 if (closeChildAgents && CapsModule != null) 3793 if (closeChildAgents && CapsModule != null)
3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); 3794 CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode);
3795 3795
3796 if (closeChildAgents && !isChildAgent) 3796 if (closeChildAgents && !isChildAgent)
3797 { 3797 {
3798 List<ulong> regions = avatar.KnownRegionHandles; 3798 List<ulong> regions = avatar.KnownRegionHandles;
@@ -3806,7 +3806,7 @@ namespace OpenSim.Region.Framework.Scenes
3806// m_log.Debug("[Scene]TriggerClientClosed done"); 3806// m_log.Debug("[Scene]TriggerClientClosed done");
3807 m_eventManager.TriggerOnRemovePresence(agentID); 3807 m_eventManager.TriggerOnRemovePresence(agentID);
3808// m_log.Debug("[Scene]TriggerOnRemovePresence done"); 3808// m_log.Debug("[Scene]TriggerOnRemovePresence done");
3809 3809
3810 if (!isChildAgent) 3810 if (!isChildAgent)
3811 { 3811 {
3812 if (AttachmentsModule != null) 3812 if (AttachmentsModule != null)
@@ -3865,7 +3865,7 @@ namespace OpenSim.Region.Framework.Scenes
3865 3865
3866 /// <summary> 3866 /// <summary>
3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry. 3867 /// Removes region from an avatar's known region list. This coincides with child agents. For each child agent, there will be a known region entry.
3868 /// 3868 ///
3869 /// </summary> 3869 /// </summary>
3870 /// <param name="avatarID"></param> 3870 /// <param name="avatarID"></param>
3871 /// <param name="regionslst"></param> 3871 /// <param name="regionslst"></param>
@@ -3914,7 +3914,7 @@ namespace OpenSim.Region.Framework.Scenes
3914 /// <param name="teleportFlags"></param> 3914 /// <param name="teleportFlags"></param>
3915 /// <param name="source">Source region (may be null)</param> 3915 /// <param name="source">Source region (may be null)</param>
3916 /// <param name="reason">Outputs the reason for the false response on this string</param> 3916 /// <param name="reason">Outputs the reason for the false response on this string</param>
3917 /// <returns>True if the region accepts this agent. False if it does not. False will 3917 /// <returns>True if the region accepts this agent. False if it does not. False will
3918 /// also return a reason.</returns> 3918 /// also return a reason.</returns>
3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason) 3919 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, GridRegion source, out string reason)
3920 { 3920 {
@@ -3942,9 +3942,9 @@ namespace OpenSim.Region.Framework.Scenes
3942 /// <param name="reason">Outputs the reason for the false response on this string</param> 3942 /// <param name="reason">Outputs the reason for the false response on this string</param>
3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC 3943 /// <param name="requirePresenceLookup">True for normal presence. False for NPC
3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param> 3944 /// or other applications where a full grid/Hypergrid presence may not be required.</param>
3945 /// <returns>True if the region accepts this agent. False if it does not. False will 3945 /// <returns>True if the region accepts this agent. False if it does not. False will
3946 /// also return a reason.</returns> 3946 /// also return a reason.</returns>
3947 /// 3947 ///
3948 private object m_newUserConnLock = new object(); 3948 private object m_newUserConnLock = new object();
3949 3949
3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup) 3950 public bool NewUserConnection(AgentCircuitData acd, uint teleportFlags, GridRegion source, out string reason, bool requirePresenceLookup)
@@ -4037,7 +4037,7 @@ namespace OpenSim.Region.Framework.Scenes
4037 { 4037 {
4038 sp = GetScenePresence(acd.AgentID); 4038 sp = GetScenePresence(acd.AgentID);
4039 4039
4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be 4040 // We need to ensure that we are not already removing the scene presence before we ask it not to be
4041 // closed. 4041 // closed.
4042 if (sp != null && sp.IsChildAgent 4042 if (sp != null && sp.IsChildAgent
4043 && (sp.LifecycleState == ScenePresenceState.Running 4043 && (sp.LifecycleState == ScenePresenceState.Running
@@ -4051,16 +4051,16 @@ namespace OpenSim.Region.Framework.Scenes
4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C 4051 // teleport from A -> D, but then -> C before A has asked B to close its old child agent. When C
4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed. 4052 // renews the lease on the child agent at B, we must make sure that the close from A does not succeed.
4053 // 4053 //
4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on 4054 // XXX: In the end, this should not be necessary if child agents are closed without delay on
4055 // teleport, since realistically, the close request should always be processed before any other 4055 // teleport, since realistically, the close request should always be processed before any other
4056 // region tried to re-establish a child agent. This is much simpler since the logic below is 4056 // region tried to re-establish a child agent. This is much simpler since the logic below is
4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then 4057 // vulnerable to an issue when a viewer quits a region without sending a proper logout but then
4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport 4058 // re-establishes the connection on a relogin. This could wrongly set the DoNotCloseAfterTeleport
4059 // flag when no teleport had taken place (and hence no close was going to come). 4059 // flag when no teleport had taken place (and hence no close was going to come).
4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle)) 4060// if (!acd.ChildrenCapSeeds.ContainsKey(RegionInfo.RegionHandle))
4061// { 4061// {
4062// m_log.DebugFormat( 4062// m_log.DebugFormat(
4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.", 4063// "[SCENE]: Setting DoNotCloseAfterTeleport for child scene presence {0} in {1} because source will attempt close.",
4064// sp.Name, Name); 4064// sp.Name, Name);
4065// 4065//
4066// sp.DoNotCloseAfterTeleport = true; 4066// sp.DoNotCloseAfterTeleport = true;
@@ -4074,7 +4074,7 @@ namespace OpenSim.Region.Framework.Scenes
4074 sp.DoNotCloseAfterTeleport = true; 4074 sp.DoNotCloseAfterTeleport = true;
4075 4075
4076 m_log.DebugFormat( 4076 m_log.DebugFormat(
4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.", 4077 "[SCENE]: Set DoNotCloseAfterTeleport for child scene presence {0} in {1} because this region will attempt end-of-teleport close from a previous close.",
4078 sp.Name, Name); 4078 sp.Name, Name);
4079 } 4079 }
4080 } 4080 }
@@ -4094,7 +4094,7 @@ namespace OpenSim.Region.Framework.Scenes
4094 if (sp.LifecycleState == ScenePresenceState.Removing) 4094 if (sp.LifecycleState == ScenePresenceState.Removing)
4095 { 4095 {
4096 m_log.WarnFormat( 4096 m_log.WarnFormat(
4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.", 4097 "[SCENE]: Agent {0} in {1} was still being removed after {2}s. Aborting NewUserConnection.",
4098 sp.Name, Name, polls * pollInterval / 1000); 4098 sp.Name, Name, polls * pollInterval / 1000);
4099 4099
4100 return false; 4100 return false;
@@ -4115,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes
4115 // We have a root agent. Is it in transit? 4115 // We have a root agent. Is it in transit?
4116 if (!EntityTransferModule.IsInTransit(sp.UUID)) 4116 if (!EntityTransferModule.IsInTransit(sp.UUID))
4117 { 4117 {
4118 // We have a zombie from a crashed session. 4118 // We have a zombie from a crashed session.
4119 // Or the same user is trying to be root twice here, won't work. 4119 // Or the same user is trying to be root twice here, won't work.
4120 // Kill it. 4120 // Kill it.
4121 m_log.WarnFormat( 4121 m_log.WarnFormat(
@@ -4210,7 +4210,7 @@ namespace OpenSim.Region.Framework.Scenes
4210 { 4210 {
4211 m_log.DebugFormat( 4211 m_log.DebugFormat(
4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}", 4212 "[SCENE]: Adjusting known seeds for existing agent {0} in {1}",
4213 acd.AgentID, RegionInfo.RegionName); 4213 acd.AgentID, RegionInfo.RegionName);
4214 4214
4215 if (CapsModule != null) 4215 if (CapsModule != null)
4216 { 4216 {
@@ -4253,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes
4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot 4253 // only check access, actual relocations will happen later on ScenePresence MakeRoot
4254 // allow child agents creation 4254 // allow child agents creation
4255 if(!godlike && teleportFlags != (uint) TPFlags.Default) 4255 if(!godlike && teleportFlags != (uint) TPFlags.Default)
4256 { 4256 {
4257 bool checkTeleHub; 4257 bool checkTeleHub;
4258 4258
4259 // don't check hubs if via home or via lure 4259 // don't check hubs if via home or via lure
@@ -4264,7 +4264,7 @@ namespace OpenSim.Region.Framework.Scenes
4264 checkTeleHub = vialogin 4264 checkTeleHub = vialogin
4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 )) 4265 || (TelehubAllowLandmarks == true ? false : ((teleportFlags & (uint)TPFlags.ViaLandmark) != 0 ))
4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0; 4266 || (teleportFlags & (uint) TPFlags.ViaLocation) != 0;
4267 4267
4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason)) 4268 if(!CheckLandPositionAccess(acd.AgentID, true, checkTeleHub, acd.startpos, out reason))
4269 { 4269 {
4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode); 4270 m_authenticateHandler.RemoveCircuit(acd.circuitcode);
@@ -4351,7 +4351,7 @@ namespace OpenSim.Region.Framework.Scenes
4351 /// </summary> 4351 /// </summary>
4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param> 4352 /// <param name="agent">Circuit Data of the Agent we're verifying</param>
4353 /// <param name="reason">Outputs the reason for the false response on this string</param> 4353 /// <param name="reason">Outputs the reason for the false response on this string</param>
4354 /// <returns>True if the user has a session on the grid. False if it does not. False will 4354 /// <returns>True if the user has a session on the grid. False if it does not. False will
4355 /// also return a reason.</returns> 4355 /// also return a reason.</returns>
4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason) 4356 public virtual bool VerifyUserPresence(AgentCircuitData agent, out string reason)
4357 { 4357 {
@@ -4380,7 +4380,7 @@ namespace OpenSim.Region.Framework.Scenes
4380 /// </summary> 4380 /// </summary>
4381 /// <param name="agent">The circuit data for the agent</param> 4381 /// <param name="agent">The circuit data for the agent</param>
4382 /// <param name="reason">outputs the reason to this string</param> 4382 /// <param name="reason">outputs the reason to this string</param>
4383 /// <returns>True if the region accepts this agent. False if it does not. False will 4383 /// <returns>True if the region accepts this agent. False if it does not. False will
4384 /// also return a reason.</returns> 4384 /// also return a reason.</returns>
4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason) 4385 protected virtual bool AuthorizeUser(AgentCircuitData agent, bool bypassAccessControl, out string reason)
4386 { 4386 {
@@ -4434,7 +4434,7 @@ namespace OpenSim.Region.Framework.Scenes
4434 // in access list / owner / manager 4434 // in access list / owner / manager
4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID)) 4435 if (RegionInfo.EstateSettings.HasAccess(agent.AgentID))
4436 return true; 4436 return true;
4437 4437
4438 // finally test groups 4438 // finally test groups
4439 bool groupAccess = false; 4439 bool groupAccess = false;
4440 4440
@@ -4576,7 +4576,7 @@ Label_GroupsDone:
4576// } 4576// }
4577 4577
4578 /// <summary> 4578 /// <summary>
4579 /// We've got an update about an agent that sees into this region, 4579 /// We've got an update about an agent that sees into this region,
4580 /// send it to ScenePresence for processing It's the full data. 4580 /// send it to ScenePresence for processing It's the full data.
4581 /// </summary> 4581 /// </summary>
4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent. 4582 /// <param name="cAgentData">Agent that contains all of the relevant things about an agent.
@@ -4604,7 +4604,7 @@ Label_GroupsDone:
4604 } 4604 }
4605 4605
4606 // TODO: This check should probably be in QueryAccess(). 4606 // TODO: This check should probably be in QueryAccess().
4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, 4607 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID,
4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f); 4608 (float)RegionInfo.RegionSizeX * 0.5f, (float)RegionInfo.RegionSizeY * 0.5f);
4609 if (nearestParcel == null) 4609 if (nearestParcel == null)
4610 { 4610 {
@@ -4616,12 +4616,12 @@ Label_GroupsDone:
4616 } 4616 }
4617 4617
4618 // We have to wait until the viewer contacts this region 4618 // We have to wait until the viewer contacts this region
4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol) 4619 // after receiving the EnableSimulator HTTP Event Queue message (for the v1 teleport protocol)
4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send 4620 // or TeleportFinish (for the v2 teleport protocol). This triggers the viewer to send
4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence. 4621 // a UseCircuitCode packet which in turn calls AddNewAgent which finally creates the ScenePresence.
4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID); 4622 ScenePresence sp = WaitGetScenePresence(cAgentData.AgentID);
4623 4623
4624 if (sp != null) 4624 if (sp != null)
4625 { 4625 {
4626 if (!sp.IsChildAgent) 4626 if (!sp.IsChildAgent)
4627 { 4627 {
@@ -4632,10 +4632,10 @@ Label_GroupsDone:
4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId) 4632 if (cAgentData.SessionID != sp.ControllingClient.SessionId)
4633 { 4633 {
4634 m_log.WarnFormat( 4634 m_log.WarnFormat(
4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).", 4635 "[SCENE]: Attempt to update agent {0} with invalid session id {1} (possibly from simulator in older version; tell them to update).",
4636 sp.UUID, cAgentData.SessionID); 4636 sp.UUID, cAgentData.SessionID);
4637 4637
4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}", 4638 Console.WriteLine(String.Format("[SCENE]: Attempt to update agent {0} ({1}) with invalid session id {2}",
4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID)); 4639 sp.UUID, sp.ControllingClient.SessionId, cAgentData.SessionID));
4640 } 4640 }
4641 4641
@@ -4667,7 +4667,7 @@ Label_GroupsDone:
4667 } 4667 }
4668 4668
4669 /// <summary> 4669 /// <summary>
4670 /// We've got an update about an agent that sees into this region, 4670 /// We've got an update about an agent that sees into this region,
4671 /// send it to ScenePresence for processing It's only positional data 4671 /// send it to ScenePresence for processing It's only positional data
4672 /// </summary> 4672 /// </summary>
4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param> 4673 /// <param name="cAgentData">AgentPosition that contains agent positional data so we can know what to send</param>
@@ -4675,7 +4675,7 @@ Label_GroupsDone:
4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData) 4675 public virtual bool IncomingUpdateChildAgent(AgentPosition cAgentData)
4676 { 4676 {
4677// m_log.DebugFormat( 4677// m_log.DebugFormat(
4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}", 4678// "[SCENE PRESENCE]: IncomingChildAgentDataUpdate POSITION for {0} in {1}, position {2}",
4679// cAgentData.AgentID, Name, cAgentData.Position); 4679// cAgentData.AgentID, Name, cAgentData.Position);
4680 4680
4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID); 4681 ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
@@ -4683,7 +4683,7 @@ Label_GroupsDone:
4683 { 4683 {
4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID) 4684// if (childAgentUpdate.ControllingClient.SessionId != cAgentData.SessionID)
4685// // Only warn for now 4685// // Only warn for now
4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?", 4686// m_log.WarnFormat("[SCENE]: Attempt at updating position of agent {0} with invalid session id {1}. Neighbor running older version?",
4687// childAgentUpdate.UUID, cAgentData.SessionID); 4687// childAgentUpdate.UUID, cAgentData.SessionID);
4688 4688
4689 // I can't imagine *yet* why we would get an update if the agent is a root agent.. 4689 // I can't imagine *yet* why we would get an update if the agent is a root agent..
@@ -4743,7 +4743,7 @@ Label_GroupsDone:
4743 if (acd == null) 4743 if (acd == null)
4744 { 4744 {
4745 m_log.DebugFormat( 4745 m_log.DebugFormat(
4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.", 4746 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
4747 agentID, Name); 4747 agentID, Name);
4748 4748
4749 return false; 4749 return false;
@@ -4756,7 +4756,7 @@ Label_GroupsDone:
4756 else 4756 else
4757 { 4757 {
4758 m_log.WarnFormat( 4758 m_log.WarnFormat(
4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}", 4759 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
4760 agentID, auth_token, Name); 4760 agentID, auth_token, Name);
4761 } 4761 }
4762 4762
@@ -4850,7 +4850,7 @@ Label_GroupsDone:
4850 return true; 4850 return true;
4851 } 4851 }
4852 m_log.DebugFormat( 4852 m_log.DebugFormat(
4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}", 4853 "[SCENE]: Called CloseClient() with agent ID {0} but no such presence is in {1}",
4854 agentID, Name); 4854 agentID, Name);
4855 4855
4856 return false; 4856 return false;
@@ -5361,7 +5361,7 @@ Label_GroupsDone:
5361 /// Get a scene object group that contains the prim with the given local id 5361 /// Get a scene object group that contains the prim with the given local id
5362 /// </summary> 5362 /// </summary>
5363 /// <param name="localID"></param> 5363 /// <param name="localID"></param>
5364 /// <returns>null if no scene object group containing that prim is found</returns> 5364 /// <returns>null if no scene object group containing that prim is found</returns>
5365 public SceneObjectGroup GetGroupByPrim(uint localID) 5365 public SceneObjectGroup GetGroupByPrim(uint localID)
5366 { 5366 {
5367 return m_sceneGraph.GetGroupByPrim(localID); 5367 return m_sceneGraph.GetGroupByPrim(localID);
@@ -5371,7 +5371,7 @@ Label_GroupsDone:
5371 /// Get a scene object group that contains the prim with the given uuid 5371 /// Get a scene object group that contains the prim with the given uuid
5372 /// </summary> 5372 /// </summary>
5373 /// <param name="fullID"></param> 5373 /// <param name="fullID"></param>
5374 /// <returns>null if no scene object group containing that prim is found</returns> 5374 /// <returns>null if no scene object group containing that prim is found</returns>
5375 public SceneObjectGroup GetGroupByPrim(UUID fullID) 5375 public SceneObjectGroup GetGroupByPrim(UUID fullID)
5376 { 5376 {
5377 return m_sceneGraph.GetGroupByPrim(fullID); 5377 return m_sceneGraph.GetGroupByPrim(fullID);
@@ -5484,7 +5484,7 @@ Label_GroupsDone:
5484 // 1 = sim is up and accepting http requests. The heartbeat has 5484 // 1 = sim is up and accepting http requests. The heartbeat has
5485 // stopped and the sim is probably locked up, but a remote 5485 // stopped and the sim is probably locked up, but a remote
5486 // admin restart may succeed 5486 // admin restart may succeed
5487 // 5487 //
5488 // 2 = Sim is up and the heartbeat is running. The sim is likely 5488 // 2 = Sim is up and the heartbeat is running. The sim is likely
5489 // usable for people within 5489 // usable for people within
5490 // 5490 //
@@ -5533,7 +5533,7 @@ Label_GroupsDone:
5533 { 5533 {
5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id; 5534int pid = System.Diagnostics.Process.GetCurrentProcess().Id;
5535System.Diagnostics.Process proc = new System.Diagnostics.Process(); 5535System.Diagnostics.Process proc = new System.Diagnostics.Process();
5536proc.EnableRaisingEvents=false; 5536proc.EnableRaisingEvents=false;
5537proc.StartInfo.FileName = "/bin/kill"; 5537proc.StartInfo.FileName = "/bin/kill";
5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString(); 5538proc.StartInfo.Arguments = "-QUIT " + pid.ToString();
5539proc.Start(); 5539proc.Start();
@@ -5979,7 +5979,7 @@ Environment.Exit(1);
5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); 5979 g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ);
5980 5980
5981// m_log.DebugFormat( 5981// m_log.DebugFormat(
5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", 5982// "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}",
5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); 5983// g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ));
5984 5984
5985 ominX += vec.X; 5985 ominX += vec.X;
@@ -6175,11 +6175,11 @@ Environment.Exit(1);
6175 reason = "Error authorizing agent: " + e.Message; 6175 reason = "Error authorizing agent: " + e.Message;
6176 return false; 6176 return false;
6177 } 6177 }
6178 6178
6179 // last check aditional land access restrictions and relocations 6179 // last check aditional land access restrictions and relocations
6180 // if crossing (viaTeleport false) check only the specified parcel 6180 // if crossing (viaTeleport false) check only the specified parcel
6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason); 6181 return CheckLandPositionAccess(agentID, viaTeleport, true, position, out reason);
6182 } 6182 }
6183 6183
6184 // check access to land. 6184 // check access to land.
6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason) 6185 public bool CheckLandPositionAccess(UUID agentID, bool NotCrossing, bool checkTeleHub, Vector3 position, out string reason)
@@ -6192,7 +6192,7 @@ Environment.Exit(1);
6192 bool isAdmin = Permissions.IsAdministrator(agentID); 6192 bool isAdmin = Permissions.IsAdministrator(agentID);
6193 if(isAdmin) 6193 if(isAdmin)
6194 return true; 6194 return true;
6195 6195
6196 // also honor estate managers access rights 6196 // also honor estate managers access rights
6197 bool isManager = Permissions.IsEstateManager(agentID); 6197 bool isManager = Permissions.IsEstateManager(agentID);
6198 if(isManager) 6198 if(isManager)
@@ -6204,14 +6204,14 @@ Environment.Exit(1);
6204 { 6204 {
6205 SceneObjectGroup telehub; 6205 SceneObjectGroup telehub;
6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub) 6206 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub)
6207 { 6207 {
6208 bool banned = true; 6208 bool banned = true;
6209 bool validTelehub = false; 6209 bool validTelehub = false;
6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); 6210 List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints();
6211 Vector3 spawnPoint; 6211 Vector3 spawnPoint;
6212 ILandObject land = null; 6212 ILandObject land = null;
6213 Vector3 telehubPosition = telehub.AbsolutePosition; 6213 Vector3 telehubPosition = telehub.AbsolutePosition;
6214 6214
6215 if(spawnPoints.Count == 0) 6215 if(spawnPoints.Count == 0)
6216 { 6216 {
6217 // will this ever happen? 6217 // will this ever happen?
@@ -6225,7 +6225,7 @@ Environment.Exit(1);
6225 } 6225 }
6226 } 6226 }
6227 else 6227 else
6228 { 6228 {
6229 Quaternion telehubRotation = telehub.GroupRotation; 6229 Quaternion telehubRotation = telehub.GroupRotation;
6230 foreach (SpawnPoint spawn in spawnPoints) 6230 foreach (SpawnPoint spawn in spawnPoints)
6231 { 6231 {
@@ -6293,7 +6293,7 @@ Environment.Exit(1);
6293 return true; 6293 return true;
6294 } 6294 }
6295 6295
6296 public void StartTimerWatchdog() 6296 public void StartTimerWatchdog()
6297 { 6297 {
6298 m_timerWatchdog.Interval = 1000; 6298 m_timerWatchdog.Interval = 1000;
6299 m_timerWatchdog.Elapsed += TimerWatchdog; 6299 m_timerWatchdog.Elapsed += TimerWatchdog;
@@ -6304,7 +6304,7 @@ Environment.Exit(1);
6304 public void TimerWatchdog(object sender, ElapsedEventArgs e) 6304 public void TimerWatchdog(object sender, ElapsedEventArgs e)
6305 { 6305 {
6306 CheckHeartbeat(); 6306 CheckHeartbeat();
6307 } 6307 }
6308 6308
6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the 6309 /// This method deals with movement when an avatar is automatically moving (but this is distinct from the
6310 /// autopilot that moves an avatar to a sit target!. 6310 /// autopilot that moves an avatar to a sit target!.
@@ -6391,7 +6391,7 @@ Environment.Exit(1);
6391 } 6391 }
6392 6392
6393 /// <summary> 6393 /// <summary>
6394 /// Wrappers to get physics modules retrieve assets. 6394 /// Wrappers to get physics modules retrieve assets.
6395 /// </summary> 6395 /// </summary>
6396 /// <remarks> 6396 /// <remarks>
6397 /// Has to be done this way 6397 /// Has to be done this way
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index d406625..e3e54e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Framework.Scenes
57 #region Fields 57 #region Fields
58 58
59 public string Name { get { return RegionInfo.RegionName; } } 59 public string Name { get { return RegionInfo.RegionName; } }
60 60
61 public IConfigSource Config 61 public IConfigSource Config
62 { 62 {
63 get { return GetConfig(); } 63 get { return GetConfig(); }
@@ -95,7 +95,7 @@ namespace OpenSim.Region.Framework.Scenes
95 /// The module commanders available from this scene 95 /// The module commanders available from this scene
96 /// </value> 96 /// </value>
97 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); 97 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>();
98 98
99 /// <value> 99 /// <value>
100 /// Registered classes that are capable of creating entities. 100 /// Registered classes that are capable of creating entities.
101 /// </value> 101 /// </value>
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes
108 protected uint m_lastAllocatedLocalId = 720000; 108 protected uint m_lastAllocatedLocalId = 720000;
109 109
110 private readonly Mutex _primAllocateMutex = new Mutex(false); 110 private readonly Mutex _primAllocateMutex = new Mutex(false);
111 111
112 protected readonly ClientManager m_clientManager = new ClientManager(); 112 protected readonly ClientManager m_clientManager = new ClientManager();
113 113
114 public bool LoginsEnabled 114 public bool LoginsEnabled
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Framework.Scenes
264 public virtual RegionInfo RegionInfo { get; private set; } 264 public virtual RegionInfo RegionInfo { get; private set; }
265 265
266 #region admin stuff 266 #region admin stuff
267 267
268 public abstract void OtherRegionUp(GridRegion otherRegion); 268 public abstract void OtherRegionUp(GridRegion otherRegion);
269 269
270 public virtual string GetSimulatorVersion() 270 public virtual string GetSimulatorVersion()
@@ -307,7 +307,7 @@ namespace OpenSim.Region.Framework.Scenes
307 307
308 return myID; 308 return myID;
309 } 309 }
310 310
311 #region Module Methods 311 #region Module Methods
312 312
313 /// <summary> 313 /// <summary>
@@ -366,7 +366,7 @@ namespace OpenSim.Region.Framework.Scenes
366 if (m_moduleCommanders.ContainsKey(name)) 366 if (m_moduleCommanders.ContainsKey(name))
367 return m_moduleCommanders[name]; 367 return m_moduleCommanders[name];
368 } 368 }
369 369
370 return null; 370 return null;
371 } 371 }
372 372
@@ -416,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
416 public void RegisterModuleInterface<M>(M mod) 416 public void RegisterModuleInterface<M>(M mod)
417 { 417 {
418// m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); 418// m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M));
419 419
420 List<Object> l = null; 420 List<Object> l = null;
421 if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) 421 if (!ModuleInterfaces.TryGetValue(typeof(M), out l))
422 { 422 {
@@ -527,9 +527,9 @@ namespace OpenSim.Region.Framework.Scenes
527 return new T[] {}; 527 return new T[] {};
528 } 528 }
529 } 529 }
530 530
531 #endregion 531 #endregion
532 532
533 /// <summary> 533 /// <summary>
534 /// Call this from a region module to add a command to the OpenSim console. 534 /// Call this from a region module to add a command to the OpenSim console.
535 /// </summary> 535 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 3eefd3c..6304778 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Framework.Scenes
115 OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags; 115 OpenSim.Framework.RegionFlags? regionFlags = n.RegionFlags;
116 116
117 // m_log.DebugFormat( 117 // m_log.DebugFormat(
118 // "{0}: Region flags for {1} as seen by {2} are {3}", 118 // "{0}: Region flags for {1} as seen by {2} are {3}",
119 // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present"); 119 // LogHeader, n.RegionName, m_scene.Name, regionFlags != null ? regionFlags.ToString() : "not present");
120 120
121 // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could 121 // Robust services before 2015-01-14 do not return the regionFlags information. In this case, we could
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Framework.Scenes
175 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) 175 public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence)
176 { 176 {
177 // m_log.DebugFormat( 177 // m_log.DebugFormat(
178 // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}", 178 // "[SCENE COMMUNICATION SERVICE]: Sending child agent position updates for {0} in {1}",
179 // presence.Name, m_scene.Name); 179 // presence.Name, m_scene.Name);
180 180
181 // This assumes that we know what our neighbors are. 181 // This assumes that we know what our neighbors are.
@@ -248,7 +248,7 @@ namespace OpenSim.Region.Framework.Scenes
248 } 248 }
249 249
250 /// <summary> 250 /// <summary>
251 /// Closes a child agents in a collection of regions. Does so asynchronously 251 /// Closes a child agents in a collection of regions. Does so asynchronously
252 /// so that the caller doesn't wait. 252 /// so that the caller doesn't wait.
253 /// </summary> 253 /// </summary>
254 /// <param name="agentID"></param> 254 /// <param name="agentID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 579874a..2f65ce2 100755
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -87,21 +87,21 @@ namespace OpenSim.Region.Framework.Scenes
87 protected int m_scriptLPS = 0; 87 protected int m_scriptLPS = 0;
88 88
89 protected internal PhysicsScene _PhyScene; 89 protected internal PhysicsScene _PhyScene;
90 90
91 /// <summary> 91 /// <summary>
92 /// Index the SceneObjectGroup for each part by the root part's UUID. 92 /// Index the SceneObjectGroup for each part by the root part's UUID.
93 /// </summary> 93 /// </summary>
94 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>(); 94 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullID = new Dictionary<UUID, SceneObjectGroup>();
95 95
96 /// <summary> 96 /// <summary>
97 /// Index the SceneObjectGroup for each part by that part's UUID. 97 /// Index the SceneObjectGroup for each part by that part's UUID.
98 /// </summary> 98 /// </summary>
99 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>(); 99 protected internal Dictionary<UUID, SceneObjectGroup> SceneObjectGroupsByFullPartID = new Dictionary<UUID, SceneObjectGroup>();
100 100
101 /// <summary> 101 /// <summary>
102 /// Index the SceneObjectGroup for each part by that part's local ID. 102 /// Index the SceneObjectGroup for each part by that part's local ID.
103 /// </summary> 103 /// </summary>
104 protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>(); 104 protected internal Dictionary<uint, SceneObjectGroup> SceneObjectGroupsByLocalPartID = new Dictionary<uint, SceneObjectGroup>();
105 105
106 /// <summary> 106 /// <summary>
107 /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently. 107 /// Lock to prevent object group update, linking, delinking and duplication operations from running concurrently.
@@ -121,11 +121,11 @@ namespace OpenSim.Region.Framework.Scenes
121 121
122 public PhysicsScene PhysicsScene 122 public PhysicsScene PhysicsScene
123 { 123 {
124 get 124 get
125 { 125 {
126 if (_PhyScene == null) 126 if (_PhyScene == null)
127 _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>(); 127 _PhyScene = m_parentScene.RequestModuleInterface<PhysicsScene>();
128 return _PhyScene; 128 return _PhyScene;
129 } 129 }
130 set 130 set
131 { 131 {
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes
215 // the joint in the Scene does not exist in the PhysicsScene. 215 // the joint in the Scene does not exist in the PhysicsScene.
216 // 216 //
217 // To solve this, we have an event in the PhysicsScene that is fired when a joint 217 // To solve this, we have an event in the PhysicsScene that is fired when a joint
218 // has changed position (because one of its associated PhysicsActors has changed 218 // has changed position (because one of its associated PhysicsActors has changed
219 // position). 219 // position).
220 // 220 //
221 // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). 221 // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate().
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Framework.Scenes
244 244
245 // coarse locations are sent as BYTE, so limited to the 255m max of normal regions 245 // coarse locations are sent as BYTE, so limited to the 255m max of normal regions
246 // try to work around that scale down X and Y acording to region size, so reducing the resolution 246 // try to work around that scale down X and Y acording to region size, so reducing the resolution
247 // 247 //
248 // viewers need to scale up 248 // viewers need to scale up
249 float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize; 249 float scaleX = (float)m_parentScene.RegionInfo.RegionSizeX / (float)Constants.RegionSize;
250 if (scaleX == 0) 250 if (scaleX == 0)
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
259 for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i) 259 for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
260 { 260 {
261 ScenePresence sp = presences[i]; 261 ScenePresence sp = presences[i];
262 262
263 // If this presence is a child agent, we don't want its coarse locations 263 // If this presence is a child agent, we don't want its coarse locations
264 if (sp.IsChildAgent) 264 if (sp.IsChildAgent)
265 continue; 265 continue;
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Framework.Scenes
346 346
347 return ret; 347 return ret;
348 } 348 }
349 349
350 /// <summary> 350 /// <summary>
351 /// Add a newly created object to the scene. This will both update the scene, and send information about the 351 /// Add a newly created object to the scene. This will both update the scene, and send information about the
352 /// new object to all clients interested in the scene. 352 /// new object to all clients interested in the scene.
@@ -372,11 +372,11 @@ namespace OpenSim.Region.Framework.Scenes
372 372
373 return ret; 373 return ret;
374 } 374 }
375 375
376 /// <summary> 376 /// <summary>
377 /// Add a newly created object to the scene. 377 /// Add a newly created object to the scene.
378 /// </summary> 378 /// </summary>
379 /// 379 ///
380 /// This method does not send updates to the client - callers need to handle this themselves. 380 /// This method does not send updates to the client - callers need to handle this themselves.
381 /// Caller should also trigger EventManager.TriggerObjectAddedToScene 381 /// Caller should also trigger EventManager.TriggerObjectAddedToScene
382 /// <param name="sceneObject"></param> 382 /// <param name="sceneObject"></param>
@@ -630,7 +630,7 @@ namespace OpenSim.Region.Framework.Scenes
630 { 630 {
631 List<SceneObjectGroup> updates; 631 List<SceneObjectGroup> updates;
632 632
633 // Some updates add more updates to the updateList. 633 // Some updates add more updates to the updateList.
634 // Get the current list of updates and clear the list before iterating 634 // Get the current list of updates and clear the list before iterating
635 lock (m_updateList) 635 lock (m_updateList)
636 { 636 {
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Framework.Scenes
762 { 762 {
763 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); 763 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
764 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); 764 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
765 765
766 // Remove the presence reference from the dictionary 766 // Remove the presence reference from the dictionary
767 if (newmap.ContainsKey(agentID)) 767 if (newmap.ContainsKey(agentID))
768 { 768 {
@@ -874,7 +874,7 @@ namespace OpenSim.Region.Framework.Scenes
874 #endregion 874 #endregion
875 875
876 #region Get Methods 876 #region Get Methods
877 877
878 /// <summary> 878 /// <summary>
879 /// Get the controlling client for the given avatar, if there is one. 879 /// Get the controlling client for the given avatar, if there is one.
880 /// 880 ///
@@ -1190,7 +1190,7 @@ namespace OpenSim.Region.Framework.Scenes
1190 return null; 1190 return null;
1191 return group.GetPart(localID); 1191 return group.GetPart(localID);
1192 } 1192 }
1193 1193
1194 /// <summary> 1194 /// <summary>
1195 /// Get a prim by name from the scene (will return the first 1195 /// Get a prim by name from the scene (will return the first
1196 /// found, if there are more than one prim with the same name) 1196 /// found, if there are more than one prim with the same name)
@@ -1209,7 +1209,7 @@ namespace OpenSim.Region.Framework.Scenes
1209 foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts) 1209 foreach (SceneObjectPart p in ((SceneObjectGroup)entity).Parts)
1210 { 1210 {
1211// m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name); 1211// m_log.DebugFormat("[SCENE GRAPH]: Part {0} has name {1}", p.UUID, p.Name);
1212 1212
1213 if (p.Name == name) 1213 if (p.Name == name)
1214 { 1214 {
1215 sop = p; 1215 sop = p;
@@ -1308,7 +1308,7 @@ namespace OpenSim.Region.Framework.Scenes
1308 /// <summary> 1308 /// <summary>
1309 /// Performs action on all scene presences. This can ultimately run the actions in parallel but 1309 /// Performs action on all scene presences. This can ultimately run the actions in parallel but
1310 /// any delegates passed in will need to implement their own locking on data they reference and 1310 /// any delegates passed in will need to implement their own locking on data they reference and
1311 /// modify outside of the scope of the delegate. 1311 /// modify outside of the scope of the delegate.
1312 /// </summary> 1312 /// </summary>
1313 /// <param name="action"></param> 1313 /// <param name="action"></param>
1314 public void ForEachScenePresence(Action<ScenePresence> action) 1314 public void ForEachScenePresence(Action<ScenePresence> action)
@@ -1343,7 +1343,7 @@ namespace OpenSim.Region.Framework.Scenes
1343 } 1343 }
1344 } 1344 }
1345 } 1345 }
1346 1346
1347 #endregion 1347 #endregion
1348 1348
1349 #region Client Event handlers 1349 #region Client Event handlers
@@ -1574,7 +1574,7 @@ namespace OpenSim.Region.Framework.Scenes
1574 public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId) 1574 public void UpdatePrimGroupPosition(uint localId, Vector3 pos, UUID updatingAgentId)
1575 { 1575 {
1576 SceneObjectGroup group = GetGroupByPrim(localId); 1576 SceneObjectGroup group = GetGroupByPrim(localId);
1577 1577
1578 if (group != null) 1578 if (group != null)
1579 { 1579 {
1580 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) 1580 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes
1589 } 1589 }
1590 else 1590 else
1591 { 1591 {
1592 if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId) 1592 if (m_parentScene.Permissions.CanMoveObject(group.UUID, updatingAgentId)
1593 && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) 1593 && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos))
1594 { 1594 {
1595 group.UpdateGroupPosition(pos); 1595 group.UpdateGroupPosition(pos);
@@ -1611,7 +1611,7 @@ namespace OpenSim.Region.Framework.Scenes
1611 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 1611 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
1612 { 1612 {
1613 SceneObjectGroup group = GetGroupByPrim(localID); 1613 SceneObjectGroup group = GetGroupByPrim(localID);
1614 1614
1615 if (group != null) 1615 if (group != null)
1616 { 1616 {
1617 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId)) 1617 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId))
@@ -1730,8 +1730,8 @@ namespace OpenSim.Region.Framework.Scenes
1730 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); 1730 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
1731 if (part != null) 1731 if (part != null)
1732 { 1732 {
1733 part.ClickAction = Convert.ToByte(clickAction); 1733 part.ClickAction = Convert.ToByte(clickAction);
1734 group.HasGroupChanged = true; 1734 group.HasGroupChanged = true;
1735 } 1735 }
1736 } 1736 }
1737 } 1737 }
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes
1966 // However, editing linked parts and unlinking may be different 1966 // However, editing linked parts and unlinking may be different
1967 // 1967 //
1968 SceneObjectGroup group = root.ParentGroup; 1968 SceneObjectGroup group = root.ParentGroup;
1969 1969
1970 List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts); 1970 List<SceneObjectPart> newSet = new List<SceneObjectPart>(group.Parts);
1971 1971
1972 newSet.Remove(root); 1972 newSet.Remove(root);
@@ -1978,7 +1978,7 @@ namespace OpenSim.Region.Framework.Scenes
1978 group.DelinkFromGroup(p, false); 1978 group.DelinkFromGroup(p, false);
1979 1979
1980 SceneObjectPart newRoot = newSet[0]; 1980 SceneObjectPart newRoot = newSet[0];
1981 1981
1982 // If there is more than one prim remaining, we 1982 // If there is more than one prim remaining, we
1983 // need to re-link 1983 // need to re-link
1984 // 1984 //
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.Framework.Scenes
1996 { 1996 {
1997 newRoot.TriggerScriptChangedEvent(Changed.LINK); 1997 newRoot.TriggerScriptChangedEvent(Changed.LINK);
1998 newRoot.ParentGroup.HasGroupChanged = true; 1998 newRoot.ParentGroup.HasGroupChanged = true;
1999 newRoot.ParentGroup.ScheduleGroupForFullUpdate(); 1999 newRoot.ParentGroup.ScheduleGroupForFullUpdate();
2000 } 2000 }
2001 } 2001 }
2002 2002
@@ -2089,7 +2089,7 @@ namespace OpenSim.Region.Framework.Scenes
2089 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot) 2089 public SceneObjectGroup DuplicateObject(uint originalPrimID, Vector3 offset, uint flags, UUID AgentID, UUID GroupID, Quaternion rot)
2090 { 2090 {
2091// m_log.DebugFormat( 2091// m_log.DebugFormat(
2092// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", 2092// "[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}",
2093// originalPrimID, offset, AgentID); 2093// originalPrimID, offset, AgentID);
2094 2094
2095 SceneObjectGroup original = GetGroupByPrim(originalPrimID); 2095 SceneObjectGroup original = GetGroupByPrim(originalPrimID);
@@ -2194,6 +2194,6 @@ namespace OpenSim.Region.Framework.Scenes
2194 2194
2195 #endregion 2195 #endregion
2196 2196
2197 2197
2198 } 2198 }
2199} 2199}
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index c5c083a..1e418df 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -91,12 +91,12 @@ namespace OpenSim.Region.Framework.Scenes
91 91
92 private static SceneManager m_instance = null; 92 private static SceneManager m_instance = null;
93 public static SceneManager Instance 93 public static SceneManager Instance
94 { 94 {
95 get { 95 get {
96 if (m_instance == null) 96 if (m_instance == null)
97 m_instance = new SceneManager(); 97 m_instance = new SceneManager();
98 return m_instance; 98 return m_instance;
99 } 99 }
100 } 100 }
101 101
102 private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>(); 102 private readonly DoubleDictionary<UUID, string, Scene> m_localScenes = new DoubleDictionary<UUID, string, Scene>();
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Framework.Scenes
340 340
341 public bool TrySetCurrentScene(string regionName) 341 public bool TrySetCurrentScene(string regionName)
342 { 342 {
343 if ((String.Compare(regionName, "root") == 0) 343 if ((String.Compare(regionName, "root") == 0)
344 || (String.Compare(regionName, "..") == 0) 344 || (String.Compare(regionName, "..") == 0)
345 || (String.Compare(regionName, "/") == 0)) 345 || (String.Compare(regionName, "/") == 0))
346 { 346 {
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes
398 return true; 398 return true;
399 } 399 }
400 } 400 }
401 401
402 scene = null; 402 scene = null;
403 return false; 403 return false;
404 } 404 }
@@ -415,7 +415,7 @@ namespace OpenSim.Region.Framework.Scenes
415 return true; 415 return true;
416 } 416 }
417 } 417 }
418 418
419 scene = null; 419 scene = null;
420 return false; 420 return false;
421 } 421 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 98617d1..9f98554 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -114,9 +114,9 @@ namespace OpenSim.Region.Framework.Scenes
114 public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID) 114 public bool AddInventoryItem(UUID agentID, uint localID, InventoryItemBase item, UUID copyItemID)
115 { 115 {
116// m_log.DebugFormat( 116// m_log.DebugFormat(
117// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}", 117// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}",
118// item.Name, remoteClient.Name, localID); 118// item.Name, remoteClient.Name, localID);
119 119
120 UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; 120 UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID;
121 121
122 SceneObjectPart part = GetPart(localID); 122 SceneObjectPart part = GetPart(localID);
@@ -147,8 +147,8 @@ namespace OpenSim.Region.Framework.Scenes
147 // We're adding this to a prim we don't own. Force 147 // We're adding this to a prim we don't own. Force
148 // owner change 148 // owner change
149 taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 149 taskItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
150 } 150 }
151 else 151 else
152 { 152 {
153 taskItem.BasePermissions = item.BasePermissions; 153 taskItem.BasePermissions = item.BasePermissions;
154 taskItem.CurrentPermissions = item.CurrentPermissions; 154 taskItem.CurrentPermissions = item.CurrentPermissions;
@@ -156,13 +156,13 @@ namespace OpenSim.Region.Framework.Scenes
156 taskItem.GroupPermissions = item.GroupPermissions; 156 taskItem.GroupPermissions = item.GroupPermissions;
157 taskItem.NextPermissions = item.NextPermissions; 157 taskItem.NextPermissions = item.NextPermissions;
158 } 158 }
159 159
160 taskItem.Flags = item.Flags; 160 taskItem.Flags = item.Flags;
161 161
162// m_log.DebugFormat( 162// m_log.DebugFormat(
163// "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}", 163// "[PRIM INVENTORY]: Flags are 0x{0:X} for item {1} added to part {2} by {3}",
164// taskItem.Flags, taskItem.Name, localID, remoteClient.Name); 164// taskItem.Flags, taskItem.Name, localID, remoteClient.Name);
165 165
166 // TODO: These are pending addition of those fields to TaskInventoryItem 166 // TODO: These are pending addition of those fields to TaskInventoryItem
167// taskItem.SalePrice = item.SalePrice; 167// taskItem.SalePrice = item.SalePrice;
168// taskItem.SaleType = item.SaleType; 168// taskItem.SaleType = item.SaleType;
@@ -328,13 +328,13 @@ namespace OpenSim.Region.Framework.Scenes
328 xmldoc.AppendChild(xmlnode); 328 xmldoc.AppendChild(xmlnode);
329 XmlElement rootElement = xmldoc.CreateElement("", "ScriptData", 329 XmlElement rootElement = xmldoc.CreateElement("", "ScriptData",
330 String.Empty); 330 String.Empty);
331 331
332 xmldoc.AppendChild(rootElement); 332 xmldoc.AppendChild(rootElement);
333 333
334 334
335 XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates", 335 XmlElement wrapper = xmldoc.CreateElement("", "ScriptStates",
336 String.Empty); 336 String.Empty);
337 337
338 rootElement.AppendChild(wrapper); 338 rootElement.AppendChild(wrapper);
339 339
340 foreach (KeyValuePair<UUID, string> state in states) 340 foreach (KeyValuePair<UUID, string> state in states)
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Framework.Scenes
362 return; 362 return;
363 363
364 IScriptModule scriptModule = null; 364 IScriptModule scriptModule = null;
365 365
366 foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>()) 366 foreach (IScriptModule sm in s.RequestModuleInterfaces<IScriptModule>())
367 { 367 {
368 if (sm.ScriptEngineName == s.DefaultScriptEngine) 368 if (sm.ScriptEngineName == s.DefaultScriptEngine)
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Framework.Scenes
401 return; 401 return;
402 402
403 XmlElement dataE = (XmlElement)dataL[0]; 403 XmlElement dataE = (XmlElement)dataL[0];
404 404
405 foreach (XmlNode n in dataE.ChildNodes) 405 foreach (XmlNode n in dataE.ChildNodes)
406 { 406 {
407 XmlElement stateE = (XmlElement)n; 407 XmlElement stateE = (XmlElement)n;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e42b675..8fdb0f1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -24,7 +24,7 @@
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.ComponentModel; 29using System.ComponentModel;
30using System.Collections.Generic; 30using System.Collections.Generic;
@@ -46,7 +46,7 @@ using OpenSim.Services.Interfaces;
46 46
47namespace OpenSim.Region.Framework.Scenes 47namespace OpenSim.Region.Framework.Scenes
48{ 48{
49 49
50 [Flags] 50 [Flags]
51 public enum scriptEvents 51 public enum scriptEvents
52 { 52 {
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
148 { 148 {
149 if (value) 149 if (value)
150 { 150 {
151 151
152 if (Backup) 152 if (Backup)
153 { 153 {
154 m_scene.SceneGraph.FireChangeBackup(this); 154 m_scene.SceneGraph.FireChangeBackup(this);
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Framework.Scenes
188 } 188 }
189 } 189 }
190 m_hasGroupChanged = value; 190 m_hasGroupChanged = value;
191 191
192// m_log.DebugFormat( 192// m_log.DebugFormat(
193// "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId); 193// "[SCENE OBJECT GROUP]: HasGroupChanged set to {0} for {1} {2}", m_hasGroupChanged, Name, LocalId);
194 } 194 }
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Framework.Scenes
197 } 197 }
198 198
199 private bool m_groupContainsForeignPrims = false; 199 private bool m_groupContainsForeignPrims = false;
200 200
201 /// <summary> 201 /// <summary>
202 /// Whether the group contains prims that came from a different group. This happens when 202 /// Whether the group contains prims that came from a different group. This happens when
203 /// linking or delinking groups. The implication is that until the group is persisted, 203 /// linking or delinking groups. The implication is that until the group is persisted,
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Framework.Scenes
232 m_maxPersistTime = m_scene.m_persistAfter; 232 m_maxPersistTime = m_scene.m_persistAfter;
233 m_minPersistTime = m_scene.m_dontPersistBefore; 233 m_minPersistTime = m_scene.m_dontPersistBefore;
234 } 234 }
235 235
236 long currentTime = DateTime.UtcNow.Ticks; 236 long currentTime = DateTime.UtcNow.Ticks;
237 237
238 if (timeLastChanged == 0) timeLastChanged = currentTime; 238 if (timeLastChanged == 0) timeLastChanged = currentTime;
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Framework.Scenes
419// { 419// {
420// get { return m_rotation; } 420// get { return m_rotation; }
421// set { 421// set {
422// m_rotation = value; 422// m_rotation = value;
423// } 423// }
424// } 424// }
425 425
@@ -435,27 +435,27 @@ namespace OpenSim.Region.Framework.Scenes
435 Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize); 435 Vector3 minScale = new Vector3(Constants.MaximumRegionSize, Constants.MaximumRegionSize, Constants.MaximumRegionSize);
436 Vector3 maxScale = Vector3.Zero; 436 Vector3 maxScale = Vector3.Zero;
437 Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f); 437 Vector3 finalScale = new Vector3(0.5f, 0.5f, 0.5f);
438 438
439 SceneObjectPart[] parts = m_parts.GetArray(); 439 SceneObjectPart[] parts = m_parts.GetArray();
440 for (int i = 0; i < parts.Length; i++) 440 for (int i = 0; i < parts.Length; i++)
441 { 441 {
442 SceneObjectPart part = parts[i]; 442 SceneObjectPart part = parts[i];
443 Vector3 partscale = part.Scale; 443 Vector3 partscale = part.Scale;
444 Vector3 partoffset = part.OffsetPosition; 444 Vector3 partoffset = part.OffsetPosition;
445 445
446 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X; 446 minScale.X = (partscale.X + partoffset.X < minScale.X) ? partscale.X + partoffset.X : minScale.X;
447 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y; 447 minScale.Y = (partscale.Y + partoffset.Y < minScale.Y) ? partscale.Y + partoffset.Y : minScale.Y;
448 minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z; 448 minScale.Z = (partscale.Z + partoffset.Z < minScale.Z) ? partscale.Z + partoffset.Z : minScale.Z;
449 449
450 maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X; 450 maxScale.X = (partscale.X + partoffset.X > maxScale.X) ? partscale.X + partoffset.X : maxScale.X;
451 maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y; 451 maxScale.Y = (partscale.Y + partoffset.Y > maxScale.Y) ? partscale.Y + partoffset.Y : maxScale.Y;
452 maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z; 452 maxScale.Z = (partscale.Z + partoffset.Z > maxScale.Z) ? partscale.Z + partoffset.Z : maxScale.Z;
453 } 453 }
454 454
455 finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X; 455 finalScale.X = (minScale.X > maxScale.X) ? minScale.X : maxScale.X;
456 finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y; 456 finalScale.Y = (minScale.Y > maxScale.Y) ? minScale.Y : maxScale.Y;
457 finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z; 457 finalScale.Z = (minScale.Z > maxScale.Z) ? minScale.Z : maxScale.Z;
458 458
459 return finalScale; 459 return finalScale;
460 } 460 }
461 } 461 }
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Framework.Scenes
520 /// <remarks> 520 /// <remarks>
521 /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't 521 /// This is necessary in some cases, particularly when a scene object has just crossed into a region and doesn't
522 /// have the IsAttachment property yet checked. 522 /// have the IsAttachment property yet checked.
523 /// 523 ///
524 /// FIXME: However, this should be fixed so that this property 524 /// FIXME: However, this should be fixed so that this property
525 /// propertly reflects the underlying status. 525 /// propertly reflects the underlying status.
526 /// </remarks> 526 /// </remarks>
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Framework.Scenes
530 return (IsAttachment || 530 return (IsAttachment ||
531 (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); 531 (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
532 } 532 }
533 533
534 private struct avtocrossInfo 534 private struct avtocrossInfo
535 { 535 {
536 public ScenePresence av; 536 public ScenePresence av;
@@ -627,7 +627,7 @@ namespace OpenSim.Region.Framework.Scenes
627 OpenSim.Services.Interfaces.GridRegion destination = null; 627 OpenSim.Services.Interfaces.GridRegion destination = null;
628 628
629 if (sog.RootPart.DIE_AT_EDGE) 629 if (sog.RootPart.DIE_AT_EDGE)
630 { 630 {
631 try 631 try
632 { 632 {
633 sogScene.DeleteSceneObject(sog, false); 633 sogScene.DeleteSceneObject(sog, false);
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Framework.Scenes
648 localIDs.Add(sog.RootPart.LocalId); 648 localIDs.Add(sog.RootPart.LocalId);
649 sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition, 649 sogScene.AddReturn(sog.OwnerID, sog.Name, sog.AbsolutePosition,
650 "Returned at region cross"); 650 "Returned at region cross");
651 sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero); 651 sogScene.DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, UUID.Zero);
652 } 652 }
653 catch (Exception) 653 catch (Exception)
654 { 654 {
@@ -754,7 +754,7 @@ namespace OpenSim.Region.Framework.Scenes
754 // avatar cross failed we need do dedicated standUp 754 // avatar cross failed we need do dedicated standUp
755 // part of it was done at CrossAgentToNewRegionAsync 755 // part of it was done at CrossAgentToNewRegionAsync
756 // so for now just remove the sog controls 756 // so for now just remove the sog controls
757 // this may need extra care 757 // this may need extra care
758 av.UnRegisterSeatControls(sog.UUID); 758 av.UnRegisterSeatControls(sog.UUID);
759 } 759 }
760 760
@@ -869,7 +869,7 @@ namespace OpenSim.Region.Framework.Scenes
869 public override UUID UUID 869 public override UUID UUID
870 { 870 {
871 get { return m_rootPart.UUID; } 871 get { return m_rootPart.UUID; }
872 set 872 set
873 { 873 {
874 lock (m_parts.SyncRoot) 874 lock (m_parts.SyncRoot)
875 { 875 {
@@ -931,7 +931,7 @@ namespace OpenSim.Region.Framework.Scenes
931 { 931 {
932 get { return true; } 932 get { return true; }
933 } 933 }
934 934
935 public bool IsSelected 935 public bool IsSelected
936 { 936 {
937 get { return m_isSelected; } 937 get { return m_isSelected; }
@@ -944,7 +944,7 @@ namespace OpenSim.Region.Framework.Scenes
944 // but ode engines should only really need to know about root part 944 // but ode engines should only really need to know about root part
945 // so they can put entire object simulation on hold and not colliding 945 // so they can put entire object simulation on hold and not colliding
946 // keep as was for now 946 // keep as was for now
947 947
948 PhysicsActor pa = m_rootPart.PhysActor; 948 PhysicsActor pa = m_rootPart.PhysActor;
949 if (pa != null) 949 if (pa != null)
950 { 950 {
@@ -1107,7 +1107,7 @@ namespace OpenSim.Region.Framework.Scenes
1107 /// </summary> 1107 /// </summary>
1108 public SceneObjectGroup() 1108 public SceneObjectGroup()
1109 { 1109 {
1110 1110
1111 } 1111 }
1112 1112
1113 /// <summary> 1113 /// <summary>
@@ -1152,7 +1152,7 @@ namespace OpenSim.Region.Framework.Scenes
1152 if (itemid != UUID.Zero) 1152 if (itemid != UUID.Zero)
1153 m_savedScriptState[itemid] = node.InnerXml; 1153 m_savedScriptState[itemid] = node.InnerXml;
1154 } 1154 }
1155 } 1155 }
1156 } 1156 }
1157 } 1157 }
1158 1158
@@ -1211,11 +1211,11 @@ namespace OpenSim.Region.Framework.Scenes
1211 1211
1212 if (!Backup) 1212 if (!Backup)
1213 m_scene.EventManager.OnBackup += ProcessBackup; 1213 m_scene.EventManager.OnBackup += ProcessBackup;
1214 1214
1215 Backup = true; 1215 Backup = true;
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 /// <summary> 1219 /// <summary>
1220 /// Attach this object to a scene. It will also now appear to agents. 1220 /// Attach this object to a scene. It will also now appear to agents.
1221 /// </summary> 1221 /// </summary>
@@ -1378,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes
1378 backBottomRight.Y = orig.Y + (part.Scale.Y / 2); 1378 backBottomRight.Y = orig.Y + (part.Scale.Y / 2);
1379 backBottomRight.Z = orig.Z - (part.Scale.Z / 2); 1379 backBottomRight.Z = orig.Z - (part.Scale.Z / 2);
1380 1380
1381 1381
1382 1382
1383 //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z); 1383 //m_log.InfoFormat("pre corner 1 is {0} {1} {2}", frontTopLeft.X, frontTopLeft.Y, frontTopLeft.Z);
1384 //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z); 1384 //m_log.InfoFormat("pre corner 2 is {0} {1} {2}", frontTopRight.X, frontTopRight.Y, frontTopRight.Z);
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes
1675 } 1675 }
1676 1676
1677 int nparts = parts.Length; 1677 int nparts = parts.Length;
1678 1678
1679 1679
1680 for (int i = 0; i < nparts; i++) 1680 for (int i = 0; i < nparts; i++)
1681 { 1681 {
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.Framework.Scenes
1692 { 1692 {
1693 linksetResCost = 0; 1693 linksetResCost = 0;
1694 linksetPhysCost = 0; 1694 linksetPhysCost = 0;
1695 partCost = 0; 1695 partCost = 0;
1696 partPhysCost = 0; 1696 partPhysCost = 0;
1697 1697
1698 for (int i = 0; i < nparts; i++) 1698 for (int i = 0; i < nparts; i++)
@@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Framework.Scenes
1838 else 1838 else
1839 { 1839 {
1840 m_log.WarnFormat( 1840 m_log.WarnFormat(
1841 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", 1841 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
1842 UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName); 1842 UUID, avatar.ControllingClient.AgentId, Scene.RegionInfo.RegionName);
1843 } 1843 }
1844 } 1844 }
@@ -1925,7 +1925,7 @@ namespace OpenSim.Region.Framework.Scenes
1925 { 1925 {
1926 return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 1926 return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
1927 } 1927 }
1928 1928
1929 /// <summary> 1929 /// <summary>
1930 /// Set a part to act as the root part for this scene object 1930 /// Set a part to act as the root part for this scene object
1931 /// </summary> 1931 /// </summary>
@@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes
1940 if (!IsAttachment) 1940 if (!IsAttachment)
1941 part.ParentID = 0; 1941 part.ParentID = 0;
1942 part.LinkNum = 0; 1942 part.LinkNum = 0;
1943 1943
1944 m_parts.Add(m_rootPart.UUID, m_rootPart); 1944 m_parts.Add(m_rootPart.UUID, m_rootPart);
1945 } 1945 }
1946 1946
@@ -1991,19 +1991,19 @@ namespace OpenSim.Region.Framework.Scenes
1991 // justincc: I don't believe this hack is needed any longer, especially since the physics 1991 // justincc: I don't believe this hack is needed any longer, especially since the physics
1992 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false 1992 // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false
1993 // this method was preventing proper reload of scene objects. 1993 // this method was preventing proper reload of scene objects.
1994 1994
1995 // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects 1995 // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects
1996 // at region startup 1996 // at region startup
1997 1997
1998 // teravus: After this was removed from the linking algorithm, Linked prims no longer collided 1998 // teravus: After this was removed from the linking algorithm, Linked prims no longer collided
1999 // properly when non-physical if they havn't been moved. This breaks ALL builds. 1999 // properly when non-physical if they havn't been moved. This breaks ALL builds.
2000 // see: http://opensimulator.org/mantis/view.php?id=3108 2000 // see: http://opensimulator.org/mantis/view.php?id=3108
2001 2001
2002 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 2002 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
2003 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and 2003 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and
2004 // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute 2004 // unmoved prims! As soon as you move a Prim/group, it will collide properly because Absolute
2005 // Position has been set! 2005 // Position has been set!
2006 2006
2007 public void ResetChildPrimPhysicsPositions() 2007 public void ResetChildPrimPhysicsPositions()
2008 { 2008 {
2009 // Setting this SOG's absolute position also loops through and sets the positions 2009 // Setting this SOG's absolute position also loops through and sets the positions
@@ -2219,9 +2219,9 @@ namespace OpenSim.Region.Framework.Scenes
2219 2219
2220 if (m_rootPart.PhysActor != null) 2220 if (m_rootPart.PhysActor != null)
2221 m_rootPart.PhysActor.Building = false; 2221 m_rootPart.PhysActor.Building = false;
2222 } 2222 }
2223 else 2223 else
2224 { 2224 {
2225 // Apply physics to the root prim 2225 // Apply physics to the root prim
2226 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); 2226 m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false);
2227 } 2227 }
@@ -2309,7 +2309,7 @@ namespace OpenSim.Region.Framework.Scenes
2309 2309
2310 DetachFromBackup(); 2310 DetachFromBackup();
2311 m_log.DebugFormat( 2311 m_log.DebugFormat(
2312 "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", 2312 "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn",
2313 RootPart.UUID); 2313 RootPart.UUID);
2314 m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); 2314 m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn");
2315 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, 2315 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero,
@@ -2364,9 +2364,9 @@ namespace OpenSim.Region.Framework.Scenes
2364 2364
2365 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); 2365 datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
2366 2366
2367 backup_group.ForEachPart(delegate(SceneObjectPart part) 2367 backup_group.ForEachPart(delegate(SceneObjectPart part)
2368 { 2368 {
2369 part.Inventory.ProcessInventoryBackup(datastore); 2369 part.Inventory.ProcessInventoryBackup(datastore);
2370 2370
2371 if(part.KeyframeMotion != null) 2371 if(part.KeyframeMotion != null)
2372 { 2372 {
@@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes
2389 catch (Exception e) 2389 catch (Exception e)
2390 { 2390 {
2391 m_log.ErrorFormat( 2391 m_log.ErrorFormat(
2392 "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}", 2392 "[SCENE]: Storing of {0}, {1} in {2} failed with exception {3}{4}",
2393 Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace); 2393 Name, UUID, m_scene.RegionInfo.RegionName, e.Message, e.StackTrace);
2394 } 2394 }
2395 } 2395 }
@@ -2427,22 +2427,22 @@ namespace OpenSim.Region.Framework.Scenes
2427 { 2427 {
2428 m_dupeInProgress = true; 2428 m_dupeInProgress = true;
2429 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); 2429 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
2430 2430
2431 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>(); 2431 dupe.m_parts = new MapAndArray<OpenMetaverse.UUID, SceneObjectPart>();
2432 2432
2433 // a copy isnt backedup 2433 // a copy isnt backedup
2434 dupe.Backup = false; 2434 dupe.Backup = false;
2435 dupe.InvalidBoundsRadius(); 2435 dupe.InvalidBoundsRadius();
2436 2436
2437 // a copy is not in transit hopefully 2437 // a copy is not in transit hopefully
2438 dupe.inTransit = false; 2438 dupe.inTransit = false;
2439 2439
2440 // new group as no sitting avatars 2440 // new group as no sitting avatars
2441 dupe.m_sittingAvatars = new List<ScenePresence>(); 2441 dupe.m_sittingAvatars = new List<ScenePresence>();
2442 2442
2443 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 2443 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
2444 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 2444 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
2445 2445
2446 2446
2447 if (userExposed) 2447 if (userExposed)
2448 dupe.m_rootPart.TrimPermissions(); 2448 dupe.m_rootPart.TrimPermissions();
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.Framework.Scenes
2587 2587
2588 if (pa != null) 2588 if (pa != null)
2589 { 2589 {
2590 // false to be applied as a impulse 2590 // false to be applied as a impulse
2591 pa.AddForce(impulse, false); 2591 pa.AddForce(impulse, false);
2592 m_scene.PhysicsScene.AddPhysicsActorTaint(pa); 2592 m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
2593 } 2593 }
@@ -2723,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes
2723 if(IsAttachment) 2723 if(IsAttachment)
2724 { 2724 {
2725 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); 2725 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
2726 if (avatar != null) 2726 if (avatar != null)
2727 pa = avatar.PhysicsActor; 2727 pa = avatar.PhysicsActor;
2728 } 2728 }
2729 else 2729 else
@@ -2813,7 +2813,7 @@ namespace OpenSim.Region.Framework.Scenes
2813 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags) 2813 public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, UUID AgentID, uint RequestFlags)
2814 { 2814 {
2815 remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags); 2815 remoteClient.SendObjectPropertiesFamilyData(RootPart, RequestFlags);
2816 2816
2817// remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask, 2817// remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.OwnerID, RootPart.GroupID, RootPart.BaseMask,
2818// RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, 2818// RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask,
2819// RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, 2819// RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category,
@@ -2844,7 +2844,7 @@ namespace OpenSim.Region.Framework.Scenes
2844 // return; 2844 // return;
2845 2845
2846 // If we somehow got here to updating the SOG and its root part is not scheduled for update, 2846 // If we somehow got here to updating the SOG and its root part is not scheduled for update,
2847 // check to see if the physical position or rotation warrant an update. 2847 // check to see if the physical position or rotation warrant an update.
2848 if (m_rootPart.UpdateFlag == UpdateRequired.NONE) 2848 if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
2849 { 2849 {
2850 // rootpart SendScheduledUpdates will check if a update is needed 2850 // rootpart SendScheduledUpdates will check if a update is needed
@@ -2885,7 +2885,7 @@ namespace OpenSim.Region.Framework.Scenes
2885 { 2885 {
2886// if (IsAttachment) 2886// if (IsAttachment)
2887// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId); 2887// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId);
2888 2888
2889 checkAtTargets(); 2889 checkAtTargets();
2890 RootPart.ScheduleFullUpdate(); 2890 RootPart.ScheduleFullUpdate();
2891 2891
@@ -2919,11 +2919,11 @@ namespace OpenSim.Region.Framework.Scenes
2919 /// Immediately send a full update for this scene object. 2919 /// Immediately send a full update for this scene object.
2920 /// </summary> 2920 /// </summary>
2921 public void SendGroupFullUpdate() 2921 public void SendGroupFullUpdate()
2922 { 2922 {
2923 if (IsDeleted) 2923 if (IsDeleted)
2924 return; 2924 return;
2925 2925
2926// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID); 2926// m_log.DebugFormat("[SOG]: Sending immediate full group update for {0} {1}", Name, UUID);
2927 2927
2928 if (IsAttachment) 2928 if (IsAttachment)
2929 { 2929 {
@@ -2964,7 +2964,7 @@ namespace OpenSim.Region.Framework.Scenes
2964 { 2964 {
2965 if (m_scene == null) // Need to check here as it's null during object creation 2965 if (m_scene == null) // Need to check here as it's null during object creation
2966 return; 2966 return;
2967 2967
2968 m_scene.SceneGraph.AddToUpdateList(this); 2968 m_scene.SceneGraph.AddToUpdateList(this);
2969 } 2969 }
2970 2970
@@ -3139,7 +3139,7 @@ namespace OpenSim.Region.Framework.Scenes
3139 Vector3 oldGroupPosition = linkPart.GroupPosition; 3139 Vector3 oldGroupPosition = linkPart.GroupPosition;
3140 Quaternion oldRootRotation = linkPart.RotationOffset; 3140 Quaternion oldRootRotation = linkPart.RotationOffset;
3141 3141
3142 // A linked SOP remembers its location and rotation relative to the root of a group. 3142 // A linked SOP remembers its location and rotation relative to the root of a group.
3143 // Convert the root of the group being linked to be relative to the 3143 // Convert the root of the group being linked to be relative to the
3144 // root of the group being linked to. 3144 // root of the group being linked to.
3145 // Note: Some of the assignments have complex side effects. 3145 // Note: Some of the assignments have complex side effects.
@@ -3247,7 +3247,7 @@ namespace OpenSim.Region.Framework.Scenes
3247 objectGroup.IsDeleted = true; 3247 objectGroup.IsDeleted = true;
3248 3248
3249 objectGroup.m_parts.Clear(); 3249 objectGroup.m_parts.Clear();
3250 3250
3251 // Can't do this yet since backup still makes use of the root part without any synchronization 3251 // Can't do this yet since backup still makes use of the root part without any synchronization
3252// objectGroup.m_rootPart = null; 3252// objectGroup.m_rootPart = null;
3253 3253
@@ -3258,8 +3258,8 @@ namespace OpenSim.Region.Framework.Scenes
3258 3258
3259 AttachToBackup(); 3259 AttachToBackup();
3260 3260
3261 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the 3261 // Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
3262 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and 3262 // position of linkset prims. IF YOU CHANGE THIS, YOU MUST TEST colliding with just linked and
3263 // unmoved prims! 3263 // unmoved prims!
3264 ResetChildPrimPhysicsPositions(); 3264 ResetChildPrimPhysicsPositions();
3265 3265
@@ -3453,7 +3453,7 @@ namespace OpenSim.Region.Framework.Scenes
3453 lock (m_parts.SyncRoot) 3453 lock (m_parts.SyncRoot)
3454 if(!m_parts.Remove(linkPart.UUID)) 3454 if(!m_parts.Remove(linkPart.UUID))
3455 continue; 3455 continue;
3456 3456
3457 linkPart.ClearUndoState(); 3457 linkPart.ClearUndoState();
3458 3458
3459 Vector3 worldPos = linkPart.GetWorldPosition(); 3459 Vector3 worldPos = linkPart.GetWorldPosition();
@@ -3580,7 +3580,7 @@ namespace OpenSim.Region.Framework.Scenes
3580 part.setOffsetPosition(newPos - AbsolutePosition); 3580 part.setOffsetPosition(newPos - AbsolutePosition);
3581 3581
3582 // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times. 3582 // (radams1 20120711: I don't know why part.OffsetPosition is set multiple times.
3583 // It would have the affect of setting the physics engine position multiple 3583 // It would have the affect of setting the physics engine position multiple
3584 // times. In theory, that is not necessary but I don't have a good linkset 3584 // times. In theory, that is not necessary but I don't have a good linkset
3585 // test to know that cleaning up this code wouldn't break things.) 3585 // test to know that cleaning up this code wouldn't break things.)
3586 3586
@@ -3685,29 +3685,29 @@ namespace OpenSim.Region.Framework.Scenes
3685 /// <param name="remoteClient"></param> 3685 /// <param name="remoteClient"></param>
3686 public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient) 3686 public void SpinMovement(Quaternion newOrientation, IClientAPI remoteClient)
3687 { 3687 {
3688 // The incoming newOrientation, sent by the client, "seems" to be the 3688 // The incoming newOrientation, sent by the client, "seems" to be the
3689 // desired target orientation. This needs further verification; in particular, 3689 // desired target orientation. This needs further verification; in particular,
3690 // one would expect that the initial incoming newOrientation should be 3690 // one would expect that the initial incoming newOrientation should be
3691 // fairly close to the original prim's physical orientation, 3691 // fairly close to the original prim's physical orientation,
3692 // m_rootPart.PhysActor.Orientation. This however does not seem to be the 3692 // m_rootPart.PhysActor.Orientation. This however does not seem to be the
3693 // case (might just be an issue with different quaternions representing the 3693 // case (might just be an issue with different quaternions representing the
3694 // same rotation, or it might be a coordinate system issue). 3694 // same rotation, or it might be a coordinate system issue).
3695 // 3695 //
3696 // Since it's not clear what the relationship is between the PhysActor.Orientation 3696 // Since it's not clear what the relationship is between the PhysActor.Orientation
3697 // and the incoming orientations sent by the client, we take an alternative approach 3697 // and the incoming orientations sent by the client, we take an alternative approach
3698 // of calculating the delta rotation between the orientations being sent by the 3698 // of calculating the delta rotation between the orientations being sent by the
3699 // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect 3699 // client. (Since a spin is invoked by ctrl+shift+drag in the client, we expect
3700 // a steady stream of several new orientations coming in from the client.) 3700 // a steady stream of several new orientations coming in from the client.)
3701 // This ensures that the delta rotations are being calculated from self-consistent 3701 // This ensures that the delta rotations are being calculated from self-consistent
3702 // pairs of old/new rotations. Given the delta rotation, we apply a torque around 3702 // pairs of old/new rotations. Given the delta rotation, we apply a torque around
3703 // the delta rotation axis, scaled by the object mass times an arbitrary scaling 3703 // the delta rotation axis, scaled by the object mass times an arbitrary scaling
3704 // factor (to ensure the resulting torque is not "too strong" or "too weak"). 3704 // factor (to ensure the resulting torque is not "too strong" or "too weak").
3705 // 3705 //
3706 // Ideally we need to calculate (probably iteratively) the exact torque or series 3706 // Ideally we need to calculate (probably iteratively) the exact torque or series
3707 // of torques needed to arrive exactly at the destination orientation. However, since 3707 // of torques needed to arrive exactly at the destination orientation. However, since
3708 // it is not yet clear how to map the destination orientation (provided by the viewer) 3708 // it is not yet clear how to map the destination orientation (provided by the viewer)
3709 // into PhysActor orientations (needed by the physics engine), we omit this step. 3709 // into PhysActor orientations (needed by the physics engine), we omit this step.
3710 // This means that the resulting torque will at least be in the correct direction, 3710 // This means that the resulting torque will at least be in the correct direction,
3711 // but it will result in over-shoot or under-shoot of the target orientation. 3711 // but it will result in over-shoot or under-shoot of the target orientation.
3712 // For the end user, this means that ctrl+shift+drag can be used for relative, 3712 // For the end user, this means that ctrl+shift+drag can be used for relative,
3713 // but not absolute, adjustments of orientation for physical prims. 3713 // but not absolute, adjustments of orientation for physical prims.
@@ -3750,7 +3750,7 @@ namespace OpenSim.Region.Framework.Scenes
3750 if(rotationAngle > 0) 3750 if(rotationAngle > 0)
3751 spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor 3751 spinforce = spinforce * pa.Mass * 0.1f; // 0.1 is an arbitrary torque scaling factor
3752 else 3752 else
3753 spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling 3753 spinforce = spinforce * pa.Mass * -0.1f; // 0.1 is an arbitrary torque scaling
3754 pa.AddAngularForce(spinforce,true); 3754 pa.AddAngularForce(spinforce,true);
3755 m_scene.PhysicsScene.AddPhysicsActorTaint(pa); 3755 m_scene.PhysicsScene.AddPhysicsActorTaint(pa);
3756 } 3756 }
@@ -3870,8 +3870,8 @@ namespace OpenSim.Region.Framework.Scenes
3870 if (selectionPart != null) 3870 if (selectionPart != null)
3871 { 3871 {
3872 SceneObjectPart[] parts = m_parts.GetArray(); 3872 SceneObjectPart[] parts = m_parts.GetArray();
3873 3873
3874 if (Scene != null && UsePhysics) 3874 if (Scene != null && UsePhysics)
3875 { 3875 {
3876 int maxprims = m_scene.m_linksetPhysCapacity; 3876 int maxprims = m_scene.m_linksetPhysCapacity;
3877 bool checkShape = (maxprims > 0 && 3877 bool checkShape = (maxprims > 0 &&
@@ -3975,7 +3975,7 @@ namespace OpenSim.Region.Framework.Scenes
3975 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); 3975 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask);
3976 3976
3977// m_log.DebugFormat( 3977// m_log.DebugFormat(
3978// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", 3978// "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}",
3979// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); 3979// (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name);
3980 3980
3981 RootPart.ScheduleFullUpdate(); 3981 RootPart.ScheduleFullUpdate();
@@ -4273,7 +4273,7 @@ namespace OpenSim.Region.Framework.Scenes
4273 { 4273 {
4274 if (Scene == null || IsDeleted || inTransit) 4274 if (Scene == null || IsDeleted || inTransit)
4275 return 1.0f; 4275 return 1.0f;
4276 4276
4277 float maxsize = Scene.m_maxNonphys; 4277 float maxsize = Scene.m_maxNonphys;
4278 PhysicsActor pa = m_rootPart.PhysActor; 4278 PhysicsActor pa = m_rootPart.PhysActor;
4279 // assuming physics is more restrictive 4279 // assuming physics is more restrictive
@@ -4282,7 +4282,7 @@ namespace OpenSim.Region.Framework.Scenes
4282 4282
4283 SceneObjectPart[] parts = m_parts.GetArray(); 4283 SceneObjectPart[] parts = m_parts.GetArray();
4284 float larger = float.MinValue; 4284 float larger = float.MinValue;
4285 4285
4286 for(int i = 0; i < parts.Length; i++) 4286 for(int i = 0; i < parts.Length; i++)
4287 { 4287 {
4288 SceneObjectPart obPart = parts[i]; 4288 SceneObjectPart obPart = parts[i];
@@ -4310,7 +4310,7 @@ namespace OpenSim.Region.Framework.Scenes
4310 { 4310 {
4311 if (Scene == null || IsDeleted || inTransit) 4311 if (Scene == null || IsDeleted || inTransit)
4312 return 1.0f; 4312 return 1.0f;
4313 4313
4314 float minsize = Scene.m_minNonphys; 4314 float minsize = Scene.m_minNonphys;
4315 PhysicsActor pa = m_rootPart.PhysActor; 4315 PhysicsActor pa = m_rootPart.PhysActor;
4316 // assuming physics is more restrictive 4316 // assuming physics is more restrictive
@@ -4319,7 +4319,7 @@ namespace OpenSim.Region.Framework.Scenes
4319 4319
4320 SceneObjectPart[] parts = m_parts.GetArray(); 4320 SceneObjectPart[] parts = m_parts.GetArray();
4321 float smaller = float.MaxValue; 4321 float smaller = float.MaxValue;
4322 4322
4323 for(int i = 0; i < parts.Length; i++) 4323 for(int i = 0; i < parts.Length; i++)
4324 { 4324 {
4325 SceneObjectPart obPart = parts[i]; 4325 SceneObjectPart obPart = parts[i];
@@ -4388,7 +4388,7 @@ namespace OpenSim.Region.Framework.Scenes
4388 /// </summary> 4388 /// </summary>
4389 /// <param name="pos"></param> 4389 /// <param name="pos"></param>
4390 /// <param name="localID"></param> 4390 /// <param name="localID"></param>
4391 /// 4391 ///
4392 4392
4393 public void UpdateSinglePosition(Vector3 pos, uint localID) 4393 public void UpdateSinglePosition(Vector3 pos, uint localID)
4394 { 4394 {
@@ -4443,7 +4443,7 @@ namespace OpenSim.Region.Framework.Scenes
4443 } 4443 }
4444 4444
4445 AbsolutePosition = newPos; 4445 AbsolutePosition = newPos;
4446 4446
4447 if (IsAttachment) 4447 if (IsAttachment)
4448 m_rootPart.AttachedPos = newPos; 4448 m_rootPart.AttachedPos = newPos;
4449 4449
@@ -4469,7 +4469,7 @@ namespace OpenSim.Region.Framework.Scenes
4469 public void UpdateGroupRotationR(Quaternion rot) 4469 public void UpdateGroupRotationR(Quaternion rot)
4470 { 4470 {
4471 m_rootPart.UpdateRotation(rot); 4471 m_rootPart.UpdateRotation(rot);
4472 4472
4473/* this is done by rootpart RotationOffset set called by UpdateRotation 4473/* this is done by rootpart RotationOffset set called by UpdateRotation
4474 PhysicsActor actor = m_rootPart.PhysActor; 4474 PhysicsActor actor = m_rootPart.PhysActor;
4475 if (actor != null) 4475 if (actor != null)
@@ -4747,7 +4747,7 @@ namespace OpenSim.Region.Framework.Scenes
4747 if (setX || setY || setZ) 4747 if (setX || setY || setZ)
4748 { 4748 {
4749 bool lockaxis = (rotate10 == 0); // zero means axis locked 4749 bool lockaxis = (rotate10 == 0); // zero means axis locked
4750 4750
4751 byte locks = RootPart.RotationAxisLocks; 4751 byte locks = RootPart.RotationAxisLocks;
4752 4752
4753 if (setX) 4753 if (setX)
@@ -4757,7 +4757,7 @@ namespace OpenSim.Region.Framework.Scenes
4757 else 4757 else
4758 locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X; 4758 locks &= (byte)SceneObjectGroup.axisSelect.NOT_STATUS_ROTATE_X;
4759 } 4759 }
4760 4760
4761 if (setY) 4761 if (setY)
4762 { 4762 {
4763 if(lockaxis) 4763 if(lockaxis)
@@ -4791,7 +4791,7 @@ namespace OpenSim.Region.Framework.Scenes
4791 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) 4791 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X)
4792 return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0; 4792 return (rotAxislocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) == 0 ? 1:0;
4793 4793
4794 return 0; 4794 return 0;
4795 } 4795 }
4796 4796
4797 public int registerRotTargetWaypoint(Quaternion target, float tolerance) 4797 public int registerRotTargetWaypoint(Quaternion target, float tolerance)
@@ -4837,7 +4837,7 @@ namespace OpenSim.Region.Framework.Scenes
4837 m_scene.AddGroupTarget(this); 4837 m_scene.AddGroupTarget(this);
4838 return (int)handle; 4838 return (int)handle;
4839 } 4839 }
4840 4840
4841 public void unregisterTargetWaypoint(int handle) 4841 public void unregisterTargetWaypoint(int handle)
4842 { 4842 {
4843 lock (m_targets) 4843 lock (m_targets)
@@ -4879,14 +4879,14 @@ namespace OpenSim.Region.Framework.Scenes
4879 } 4879 }
4880 } 4880 }
4881 } 4881 }
4882 4882
4883 if (atTargets.Count > 0) 4883 if (atTargets.Count > 0)
4884 { 4884 {
4885 SceneObjectPart[] parts = m_parts.GetArray(); 4885 SceneObjectPart[] parts = m_parts.GetArray();
4886 uint[] localids = new uint[parts.Length]; 4886 uint[] localids = new uint[parts.Length];
4887 for (int i = 0; i < parts.Length; i++) 4887 for (int i = 0; i < parts.Length; i++)
4888 localids[i] = parts[i].LocalId; 4888 localids[i] = parts[i].LocalId;
4889 4889
4890 for (int ctr = 0; ctr < localids.Length; ctr++) 4890 for (int ctr = 0; ctr < localids.Length; ctr++)
4891 { 4891 {
4892 foreach (uint target in atTargets.Keys) 4892 foreach (uint target in atTargets.Keys)
@@ -4896,10 +4896,10 @@ namespace OpenSim.Region.Framework.Scenes
4896 localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition); 4896 localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition);
4897 } 4897 }
4898 } 4898 }
4899 4899
4900 return; 4900 return;
4901 } 4901 }
4902 4902
4903 if (m_scriptListens_notAtTarget && !at_target) 4903 if (m_scriptListens_notAtTarget && !at_target)
4904 { 4904 {
4905 //trigger not_at_target 4905 //trigger not_at_target
@@ -4907,7 +4907,7 @@ namespace OpenSim.Region.Framework.Scenes
4907 uint[] localids = new uint[parts.Length]; 4907 uint[] localids = new uint[parts.Length];
4908 for (int i = 0; i < parts.Length; i++) 4908 for (int i = 0; i < parts.Length; i++)
4909 localids[i] = parts[i].LocalId; 4909 localids[i] = parts[i].LocalId;
4910 4910
4911 for (int ctr = 0; ctr < localids.Length; ctr++) 4911 for (int ctr = 0; ctr < localids.Length; ctr++)
4912 { 4912 {
4913 m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]); 4913 m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]);
@@ -4994,7 +4994,7 @@ namespace OpenSim.Region.Framework.Scenes
4994 // http://wiki.secondlife.com/wiki/llGetGeometricCenter 4994 // http://wiki.secondlife.com/wiki/llGetGeometricCenter
4995 // ignoring tortured prims details since sl also seems to ignore 4995 // ignoring tortured prims details since sl also seems to ignore
4996 // so no real use in doing it on physics 4996 // so no real use in doing it on physics
4997 4997
4998 Vector3 gc = Vector3.Zero; 4998 Vector3 gc = Vector3.Zero;
4999 4999
5000 SceneObjectPart[] parts = m_parts.GetArray(); 5000 SceneObjectPart[] parts = m_parts.GetArray();
@@ -5034,7 +5034,7 @@ namespace OpenSim.Region.Framework.Scenes
5034 Vector3 tmp = pa.CenterOfMass; 5034 Vector3 tmp = pa.CenterOfMass;
5035 return tmp; 5035 return tmp;
5036 } 5036 }
5037 5037
5038 Vector3 Ptot = Vector3.Zero; 5038 Vector3 Ptot = Vector3.Zero;
5039 float totmass = 0f; 5039 float totmass = 0f;
5040 float m; 5040 float m;
@@ -5072,7 +5072,7 @@ namespace OpenSim.Region.Framework.Scenes
5072 } 5072 }
5073 5073
5074 HasGroupChanged = true; 5074 HasGroupChanged = true;
5075 5075
5076 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled 5076 // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled
5077 // for the same object with very different properties. The caller must schedule the update. 5077 // for the same object with very different properties. The caller must schedule the update.
5078 //ScheduleGroupForFullUpdate(); 5078 //ScheduleGroupForFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b95b5be..b97cceb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134 ); 134 );
135 private const scriptEvents PhyscicsVolumeDtcSubsEvents = ( 135 private const scriptEvents PhyscicsVolumeDtcSubsEvents = (
136 scriptEvents.collision_start | scriptEvents.collision_end 136 scriptEvents.collision_start | scriptEvents.collision_end
137 ); 137 );
138 138
139 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 139 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
140 140
@@ -148,8 +148,8 @@ namespace OpenSim.Region.Framework.Scenes
148 /// <summary> 148 /// <summary>
149 /// Dynamic objects that can be created and deleted as required. 149 /// Dynamic objects that can be created and deleted as required.
150 /// </summary> 150 /// </summary>
151 public DOMap DynObjs 151 public DOMap DynObjs
152 { 152 {
153 get 153 get
154 { 154 {
155 if (m_dynObjs == null) 155 if (m_dynObjs == null)
@@ -163,16 +163,16 @@ namespace OpenSim.Region.Framework.Scenes
163 m_dynObjs = value; 163 m_dynObjs = value;
164 } 164 }
165 } 165 }
166 166
167 /// <value> 167 /// <value>
168 /// Is this a root part? 168 /// Is this a root part?
169 /// </value> 169 /// </value>
170 /// <remarks> 170 /// <remarks>
171 /// This will return true even if the whole object is attached to an avatar. 171 /// This will return true even if the whole object is attached to an avatar.
172 /// </remarks> 172 /// </remarks>
173 public bool IsRoot 173 public bool IsRoot
174 { 174 {
175 get { return Object.ReferenceEquals(ParentGroup.RootPart, this); } 175 get { return Object.ReferenceEquals(ParentGroup.RootPart, this); }
176 } 176 }
177 177
178 /// <summary> 178 /// <summary>
@@ -192,11 +192,11 @@ namespace OpenSim.Region.Framework.Scenes
192 #region Fields 192 #region Fields
193 193
194 public bool AllowedDrop; 194 public bool AllowedDrop;
195 195
196 public bool DIE_AT_EDGE; 196 public bool DIE_AT_EDGE;
197 197
198 public bool RETURN_AT_EDGE; 198 public bool RETURN_AT_EDGE;
199 199
200 public bool BlockGrab { get; set; } 200 public bool BlockGrab { get; set; }
201 201
202 public bool StatusSandbox; 202 public bool StatusSandbox;
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Framework.Scenes
221 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. 221 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
222 // Not a big problem as long as the script that sets it remains in the prim on startup. 222 // Not a big problem as long as the script that sets it remains in the prim on startup.
223 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) 223 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script)
224 224
225 public UUID Sound; 225 public UUID Sound;
226 226
227 public byte SoundFlags; 227 public byte SoundFlags;
@@ -254,7 +254,7 @@ namespace OpenSim.Region.Framework.Scenes
254 254
255 [XmlIgnore] 255 [XmlIgnore]
256 public int STATUS_ROTATE_X; // this should not be used 256 public int STATUS_ROTATE_X; // this should not be used
257 257
258 [XmlIgnore] 258 [XmlIgnore]
259 public int STATUS_ROTATE_Y; // this should not be used 259 public int STATUS_ROTATE_Y; // this should not be used
260 260
@@ -262,13 +262,13 @@ namespace OpenSim.Region.Framework.Scenes
262 public int STATUS_ROTATE_Z; // this should not be used 262 public int STATUS_ROTATE_Z; // this should not be used
263 263
264 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); 264 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>();
265 265
266 /// <value> 266 /// <value>
267 /// The UUID of the user inventory item from which this object was rezzed if this is a root part. 267 /// The UUID of the user inventory item from which this object was rezzed if this is a root part.
268 /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. 268 /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item.
269 /// </value> 269 /// </value>
270 private UUID m_fromUserInventoryItemID; 270 private UUID m_fromUserInventoryItemID;
271 271
272 public UUID FromUserInventoryItemID 272 public UUID FromUserInventoryItemID
273 { 273 {
274 get { return m_fromUserInventoryItemID; } 274 get { return m_fromUserInventoryItemID; }
@@ -289,7 +289,7 @@ namespace OpenSim.Region.Framework.Scenes
289 289
290 public bool VolumeDetectActive 290 public bool VolumeDetectActive
291 { 291 {
292 get 292 get
293 { 293 {
294 return (Flags & (PrimFlags)primFlagVolumeDetect) != 0; 294 return (Flags & (PrimFlags)primFlagVolumeDetect) != 0;
295 } 295 }
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Framework.Scenes
313 313
314 /// <summary> 314 /// <summary>
315 /// This part's inventory 315 /// This part's inventory
316 /// </summary> 316 /// </summary>
317 public IEntityInventory Inventory 317 public IEntityInventory Inventory
318 { 318 {
319 get { return m_inventory; } 319 get { return m_inventory; }
@@ -321,20 +321,20 @@ namespace OpenSim.Region.Framework.Scenes
321 protected SceneObjectPartInventory m_inventory; 321 protected SceneObjectPartInventory m_inventory;
322 322
323 public bool Undoing; 323 public bool Undoing;
324 324
325 public bool IgnoreUndoUpdate = false; 325 public bool IgnoreUndoUpdate = false;
326 326
327 public PrimFlags LocalFlags; 327 public PrimFlags LocalFlags;
328 328
329 private float m_damage = -1.0f; 329 private float m_damage = -1.0f;
330 private byte[] m_TextureAnimation; 330 private byte[] m_TextureAnimation;
331 private byte m_clickAction; 331 private byte m_clickAction;
332 private Color m_color = Color.Black; 332 private Color m_color = Color.Black;
333 private readonly List<uint> m_lastColliders = new List<uint>(); 333 private readonly List<uint> m_lastColliders = new List<uint>();
334 private int m_linkNum; 334 private int m_linkNum;
335 335
336 private int m_scriptAccessPin; 336 private int m_scriptAccessPin;
337 337
338 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); 338 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
339 private string m_sitName = String.Empty; 339 private string m_sitName = String.Empty;
340 private Quaternion m_sitTargetOrientation = Quaternion.Identity; 340 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Framework.Scenes
403 private UUID m_collisionSound; 403 private UUID m_collisionSound;
404 private float m_collisionSoundVolume; 404 private float m_collisionSoundVolume;
405 405
406 private int LastColSoundSentTime; 406 private int LastColSoundSentTime;
407 407
408 private SOPVehicle m_vehicleParams = null; 408 private SOPVehicle m_vehicleParams = null;
409 409
@@ -454,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes
454 /// <param name="rotationOffset"></param> 454 /// <param name="rotationOffset"></param>
455 /// <param name="offsetPosition"></param> 455 /// <param name="offsetPosition"></param>
456 public SceneObjectPart( 456 public SceneObjectPart(
457 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, 457 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
458 Quaternion rotationOffset, Vector3 offsetPosition) : this() 458 Quaternion rotationOffset, Vector3 offsetPosition) : this()
459 { 459 {
460 m_name = "Object"; 460 m_name = "Object";
@@ -505,7 +505,7 @@ namespace OpenSim.Region.Framework.Scenes
505 private bool m_createSelected = false; 505 private bool m_createSelected = false;
506 506
507 private UUID _creatorID; 507 private UUID _creatorID;
508 public UUID CreatorID 508 public UUID CreatorID
509 { 509 {
510 get { return _creatorID; } 510 get { return _creatorID; }
511 set { _creatorID = value; } 511 set { _creatorID = value; }
@@ -515,7 +515,7 @@ namespace OpenSim.Region.Framework.Scenes
515 /// <summary> 515 /// <summary>
516 /// Data about the creator in the form home_url;name 516 /// Data about the creator in the form home_url;name
517 /// </summary> 517 /// </summary>
518 public string CreatorData 518 public string CreatorData
519 { 519 {
520 get { return m_creatorData; } 520 get { return m_creatorData; }
521 set { m_creatorData = value; } 521 set { m_creatorData = value; }
@@ -565,7 +565,7 @@ namespace OpenSim.Region.Framework.Scenes
565 } 565 }
566 566
567 /// <summary> 567 /// <summary>
568 /// A relic from when we we thought that prims contained folder objects. In 568 /// A relic from when we we thought that prims contained folder objects. In
569 /// reality, prim == folder 569 /// reality, prim == folder
570 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see 570 /// Exposing this is not particularly good, but it's one of the least evils at the moment to see
571 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim. 571 /// folder id from prim inventory item data, since it's not (yet) actually stored with the prim.
@@ -611,10 +611,10 @@ namespace OpenSim.Region.Framework.Scenes
611 public UUID UUID 611 public UUID UUID
612 { 612 {
613 get { return m_uuid; } 613 get { return m_uuid; }
614 set 614 set
615 { 615 {
616 m_uuid = value; 616 m_uuid = value;
617 617
618 // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part 618 // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part
619 if (Inventory != null) 619 if (Inventory != null)
620 Inventory.ResetObjectID(); 620 Inventory.ResetObjectID();
@@ -634,8 +634,8 @@ namespace OpenSim.Region.Framework.Scenes
634 public virtual string Name 634 public virtual string Name
635 { 635 {
636 get { return m_name; } 636 get { return m_name; }
637 set 637 set
638 { 638 {
639 m_name = value; 639 m_name = value;
640 640
641 PhysicsActor pa = PhysActor; 641 PhysicsActor pa = PhysActor;
@@ -678,11 +678,11 @@ namespace OpenSim.Region.Framework.Scenes
678 m_isSelected = value; 678 m_isSelected = value;
679 if (ParentGroup != null) 679 if (ParentGroup != null)
680 ParentGroup.PartSelectChanged(value); 680 ParentGroup.PartSelectChanged(value);
681 681
682 } 682 }
683 } 683 }
684 684
685 685
686 public Dictionary<int, string> CollisionFilter 686 public Dictionary<int, string> CollisionFilter
687 { 687 {
688 get { return m_CollisionFilter; } 688 get { return m_CollisionFilter; }
@@ -704,14 +704,14 @@ namespace OpenSim.Region.Framework.Scenes
704 set { m_APIDTarget = value; } 704 set { m_APIDTarget = value; }
705 } 705 }
706 706
707 707
708 protected float APIDDamp 708 protected float APIDDamp
709 { 709 {
710 get { return m_APIDDamp; } 710 get { return m_APIDDamp; }
711 set { m_APIDDamp = value; } 711 set { m_APIDDamp = value; }
712 } 712 }
713 713
714 714
715 protected float APIDStrength 715 protected float APIDStrength
716 { 716 {
717 get { return m_APIDStrength; } 717 get { return m_APIDStrength; }
@@ -769,21 +769,21 @@ namespace OpenSim.Region.Framework.Scenes
769 set { m_particleSystem = value; } 769 set { m_particleSystem = value; }
770 } 770 }
771 771
772 772
773 public DateTime Expires 773 public DateTime Expires
774 { 774 {
775 get { return m_expires; } 775 get { return m_expires; }
776 set { m_expires = value; } 776 set { m_expires = value; }
777 } 777 }
778 778
779 779
780 public DateTime Rezzed 780 public DateTime Rezzed
781 { 781 {
782 get { return m_rezzed; } 782 get { return m_rezzed; }
783 set { m_rezzed = value; } 783 set { m_rezzed = value; }
784 } 784 }
785 785
786 786
787 public float Damage 787 public float Damage
788 { 788 {
789 get { return m_damage; } 789 get { return m_damage; }
@@ -798,7 +798,7 @@ namespace OpenSim.Region.Framework.Scenes
798 /// <summary> 798 /// <summary>
799 /// The position of the entire group that this prim belongs to. 799 /// The position of the entire group that this prim belongs to.
800 /// </summary> 800 /// </summary>
801 /// 801 ///
802 802
803 public Vector3 GroupPosition 803 public Vector3 GroupPosition
804 { 804 {
@@ -837,7 +837,7 @@ namespace OpenSim.Region.Framework.Scenes
837 // Root prim actually goes at Position 837 // Root prim actually goes at Position
838 if (ParentID == 0) 838 if (ParentID == 0)
839 { 839 {
840 actor.Position = value; 840 actor.Position = value;
841 } 841 }
842 else 842 else
843 { 843 {
@@ -955,7 +955,7 @@ namespace OpenSim.Region.Framework.Scenes
955 955
956 return m_rotationOffset; 956 return m_rotationOffset;
957 } 957 }
958 958
959 set 959 set
960 { 960 {
961// StoreUndoState(); 961// StoreUndoState();
@@ -1066,24 +1066,24 @@ namespace OpenSim.Region.Framework.Scenes
1066 if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE) 1066 if ((actor != null) && actor.IsPhysical && ParentGroup.RootPart == this && VehicleType == (int)Vehicle.TYPE_NONE)
1067 { 1067 {
1068 actor.RotationalVelocity = m_angularVelocity; 1068 actor.RotationalVelocity = m_angularVelocity;
1069 } 1069 }
1070 } 1070 }
1071 } 1071 }
1072 1072
1073 /// <summary></summary> 1073 /// <summary></summary>
1074 public Vector3 Acceleration 1074 public Vector3 Acceleration
1075 { 1075 {
1076 get 1076 get
1077 { 1077 {
1078 PhysicsActor actor = PhysActor; 1078 PhysicsActor actor = PhysActor;
1079 if (actor != null) 1079 if (actor != null)
1080 { 1080 {
1081 m_acceleration = actor.Acceleration; 1081 m_acceleration = actor.Acceleration;
1082 } 1082 }
1083 return m_acceleration; 1083 return m_acceleration;
1084 } 1084 }
1085 1085
1086 set 1086 set
1087 { 1087 {
1088 if (Util.IsNanOrInfinity(value)) 1088 if (Util.IsNanOrInfinity(value))
1089 m_acceleration = Vector3.Zero; 1089 m_acceleration = Vector3.Zero;
@@ -1217,23 +1217,23 @@ namespace OpenSim.Region.Framework.Scenes
1217 else 1217 else
1218 b = sz; 1218 b = sz;
1219 } 1219 }
1220 1220
1221 return a * b; 1221 return a * b;
1222 } 1222 }
1223 1223
1224 public UpdateRequired UpdateFlag { get; set; } 1224 public UpdateRequired UpdateFlag { get; set; }
1225 1225
1226 /// <summary> 1226 /// <summary>
1227 /// Used for media on a prim. 1227 /// Used for media on a prim.
1228 /// </summary> 1228 /// </summary>
1229 /// Do not change this value directly - always do it through an IMoapModule. 1229 /// Do not change this value directly - always do it through an IMoapModule.
1230 public string MediaUrl 1230 public string MediaUrl
1231 { 1231 {
1232 get 1232 get
1233 { 1233 {
1234 return m_mediaUrl; 1234 return m_mediaUrl;
1235 } 1235 }
1236 1236
1237 set 1237 set
1238 { 1238 {
1239 m_mediaUrl = value; 1239 m_mediaUrl = value;
@@ -1246,10 +1246,10 @@ namespace OpenSim.Region.Framework.Scenes
1246 public bool CreateSelected 1246 public bool CreateSelected
1247 { 1247 {
1248 get { return m_createSelected; } 1248 get { return m_createSelected; }
1249 set 1249 set
1250 { 1250 {
1251// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); 1251// m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID);
1252 m_createSelected = value; 1252 m_createSelected = value;
1253 } 1253 }
1254 } 1254 }
1255 1255
@@ -1423,7 +1423,7 @@ namespace OpenSim.Region.Framework.Scenes
1423 } 1423 }
1424 1424
1425 /// <summary> 1425 /// <summary>
1426 /// Property flags. See OpenMetaverse.PrimFlags 1426 /// Property flags. See OpenMetaverse.PrimFlags
1427 /// </summary> 1427 /// </summary>
1428 /// <remarks> 1428 /// <remarks>
1429 /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge 1429 /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge
@@ -1431,18 +1431,18 @@ namespace OpenSim.Region.Framework.Scenes
1431 public PrimFlags Flags 1431 public PrimFlags Flags
1432 { 1432 {
1433 get { return _flags; } 1433 get { return _flags; }
1434 set 1434 set
1435 { 1435 {
1436// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); 1436// m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value);
1437 _flags = value; 1437 _flags = value;
1438 } 1438 }
1439 } 1439 }
1440 1440
1441 [XmlIgnore] 1441 [XmlIgnore]
1442 public bool IsOccupied // KF If an av is sittingon this prim 1442 public bool IsOccupied // KF If an av is sittingon this prim
1443 { 1443 {
1444 get { return m_occupied; } 1444 get { return m_occupied; }
1445 set { m_occupied = value; } 1445 set { m_occupied = value; }
1446 } 1446 }
1447 1447
1448 /// <summary> 1448 /// <summary>
@@ -1474,7 +1474,7 @@ namespace OpenSim.Region.Framework.Scenes
1474 } 1474 }
1475 1475
1476 private UUID _parentUUID = UUID.Zero; 1476 private UUID _parentUUID = UUID.Zero;
1477 1477
1478 public UUID ParentUUID 1478 public UUID ParentUUID
1479 { 1479 {
1480 get 1480 get
@@ -1487,7 +1487,7 @@ namespace OpenSim.Region.Framework.Scenes
1487 1487
1488 set { _parentUUID = value; } 1488 set { _parentUUID = value; }
1489 } 1489 }
1490 1490
1491 public string SitAnimation 1491 public string SitAnimation
1492 { 1492 {
1493 get { return m_sitAnimation; } 1493 get { return m_sitAnimation; }
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes
1519 { 1519 {
1520 get { return m_collisionSound; } 1520 get { return m_collisionSound; }
1521 set 1521 set
1522 { 1522 {
1523 m_collisionSound = value; 1523 m_collisionSound = value;
1524 1524
1525 if (value == invalidCollisionSoundUUID) 1525 if (value == invalidCollisionSoundUUID)
@@ -1589,7 +1589,7 @@ namespace OpenSim.Region.Framework.Scenes
1589 { 1589 {
1590 if (ParentGroup.RootPart == this) 1590 if (ParentGroup.RootPart == this)
1591 return m_torque; 1591 return m_torque;
1592 1592
1593 return ParentGroup.RootPart.Torque; 1593 return ParentGroup.RootPart.Torque;
1594 } 1594 }
1595 1595
@@ -1733,7 +1733,7 @@ namespace OpenSim.Region.Framework.Scenes
1733 set 1733 set
1734 { 1734 {
1735 byte oldv = m_physicsShapeType; 1735 byte oldv = m_physicsShapeType;
1736 1736
1737 if (value >= 0 && value <= (byte)PhysShapeType.convex) 1737 if (value >= 0 && value <= (byte)PhysShapeType.convex)
1738 { 1738 {
1739 if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this) 1739 if (value == (byte)PhysShapeType.none && ParentGroup != null && ParentGroup.RootPart == this)
@@ -1966,7 +1966,7 @@ namespace OpenSim.Region.Framework.Scenes
1966 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos); 1966 Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
1967 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4); 1967 Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
1968 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8); 1968 Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
1969 1969
1970 } 1970 }
1971 m_TextureAnimation = data; 1971 m_TextureAnimation = data;
1972 } 1972 }
@@ -2063,7 +2063,7 @@ namespace OpenSim.Region.Framework.Scenes
2063 2063
2064 root.AngularVelocity = pAngVel; 2064 root.AngularVelocity = pAngVel;
2065 } 2065 }
2066 2066
2067 2067
2068 /// <summary> 2068 /// <summary>
2069 /// hook to the physics scene to apply angular impulse 2069 /// hook to the physics scene to apply angular impulse
@@ -2095,7 +2095,7 @@ namespace OpenSim.Region.Framework.Scenes
2095 /// </summary> 2095 /// </summary>
2096 /// <param name="impulsei">Vector force</param> 2096 /// <param name="impulsei">Vector force</param>
2097 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 2097 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
2098 2098
2099 // this is actualy Set Torque.. keeping naming so not to edit lslapi also 2099 // this is actualy Set Torque.. keeping naming so not to edit lslapi also
2100 public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF) 2100 public void SetAngularImpulse(Vector3 torquei, bool localGlobalTF)
2101 { 2101 {
@@ -2116,7 +2116,7 @@ namespace OpenSim.Region.Framework.Scenes
2116 /// <param name="VolumeDetectActive"></param> 2116 /// <param name="VolumeDetectActive"></param>
2117 /// <param name="building"></param> 2117 /// <param name="building"></param>
2118 2118
2119 public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building) 2119 public void ApplyPhysics(uint _ObjectFlags, bool _VolumeDetectActive, bool building)
2120 { 2120 {
2121 VolumeDetectActive = _VolumeDetectActive; 2121 VolumeDetectActive = _VolumeDetectActive;
2122 2122
@@ -2177,7 +2177,7 @@ namespace OpenSim.Region.Framework.Scenes
2177 /// <returns></returns> 2177 /// <returns></returns>
2178 public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) 2178 public SceneObjectPart Copy(uint plocalID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed)
2179 { 2179 {
2180 // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up 2180 // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up
2181 // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator 2181 // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator
2182 // but not between regions on different simulators). Really, all copying should be done explicitly. 2182 // but not between regions on different simulators). Really, all copying should be done explicitly.
2183 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); 2183 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone();
@@ -2242,20 +2242,20 @@ namespace OpenSim.Region.Framework.Scenes
2242 dupe.PayPrice = (int[])PayPrice.Clone(); 2242 dupe.PayPrice = (int[])PayPrice.Clone();
2243 2243
2244 dupe.DynAttrs.CopyFrom(DynAttrs); 2244 dupe.DynAttrs.CopyFrom(DynAttrs);
2245 2245
2246 if (userExposed) 2246 if (userExposed)
2247 { 2247 {
2248 bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); 2248 bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0);
2249 dupe.DoPhysicsPropertyUpdate(UsePhysics, true); 2249 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
2250 } 2250 }
2251 2251
2252 if (dupe.PhysActor != null) 2252 if (dupe.PhysActor != null)
2253 dupe.PhysActor.LocalID = plocalID; 2253 dupe.PhysActor.LocalID = plocalID;
2254 2254
2255 ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); 2255 ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed);
2256 2256
2257// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); 2257// m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID);
2258 2258
2259 return dupe; 2259 return dupe;
2260 } 2260 }
2261 2261
@@ -2428,7 +2428,7 @@ namespace OpenSim.Region.Framework.Scenes
2428 pa.link(parentPa); 2428 pa.link(parentPa);
2429 } 2429 }
2430 } 2430 }
2431 } 2431 }
2432 } 2432 }
2433 2433
2434 bool phan = ((Flags & PrimFlags.Phantom) != 0); 2434 bool phan = ((Flags & PrimFlags.Phantom) != 0);
@@ -2528,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes
2528 2528
2529 public uint GetEffectiveObjectFlags() 2529 public uint GetEffectiveObjectFlags()
2530 { 2530 {
2531 // Commenting this section of code out since it doesn't actually do anything, as enums are handled by 2531 // Commenting this section of code out since it doesn't actually do anything, as enums are handled by
2532 // value rather than reference 2532 // value rather than reference
2533// PrimFlags f = _flags; 2533// PrimFlags f = _flags;
2534// if (m_parentGroup == null || m_parentGroup.RootPart == this) 2534// if (m_parentGroup == null || m_parentGroup.RootPart == this)
@@ -2820,7 +2820,7 @@ namespace OpenSim.Region.Framework.Scenes
2820 2820
2821 ColliderArgs LandCollidingMessage = new ColliderArgs(); 2821 ColliderArgs LandCollidingMessage = new ColliderArgs();
2822 List<DetectedObject> colliding = new List<DetectedObject>(); 2822 List<DetectedObject> colliding = new List<DetectedObject>();
2823 2823
2824 colliding.Add(CreateDetObjectForGround()); 2824 colliding.Add(CreateDetObjectForGround());
2825 LandCollidingMessage.Colliders = colliding; 2825 LandCollidingMessage.Colliders = colliding;
2826 2826
@@ -2969,9 +2969,9 @@ namespace OpenSim.Region.Framework.Scenes
2969 // Note: This is only being called on the root prim at this time. 2969 // Note: This is only being called on the root prim at this time.
2970 2970
2971 m_log.ErrorFormat( 2971 m_log.ErrorFormat(
2972 "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.", 2972 "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.",
2973 Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition); 2973 Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition);
2974 2974
2975 RemFlag(PrimFlags.Physics); 2975 RemFlag(PrimFlags.Physics);
2976 DoPhysicsPropertyUpdate(false, true); 2976 DoPhysicsPropertyUpdate(false, true);
2977 } 2977 }
@@ -3026,7 +3026,7 @@ namespace OpenSim.Region.Framework.Scenes
3026 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 3026 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
3027 //ScheduleFullUpdate(); 3027 //ScheduleFullUpdate();
3028 } 3028 }
3029 3029
3030 public void RemoveScriptEvents(UUID scriptid) 3030 public void RemoveScriptEvents(UUID scriptid)
3031 { 3031 {
3032 lock (m_scriptEvents) 3032 lock (m_scriptEvents)
@@ -3089,7 +3089,7 @@ namespace OpenSim.Region.Framework.Scenes
3089 ParentGroup.HasGroupChanged = true; 3089 ParentGroup.HasGroupChanged = true;
3090 ScheduleFullUpdate(); 3090 ScheduleFullUpdate();
3091 } 3091 }
3092 3092
3093 public void RotLookAt(Quaternion target, float strength, float damping) 3093 public void RotLookAt(Quaternion target, float strength, float damping)
3094 { 3094 {
3095 if(ParentGroup.IsDeleted) 3095 if(ParentGroup.IsDeleted)
@@ -3115,7 +3115,7 @@ namespace OpenSim.Region.Framework.Scenes
3115 m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength); 3115 m_log.WarnFormat("[SceneObjectPart] Invalid rotation strength {0}",APIDStrength);
3116 return; 3116 return;
3117 } 3117 }
3118 3118
3119 APIDActive = true; 3119 APIDActive = true;
3120 3120
3121 // Necessary to get the lookat deltas applied 3121 // Necessary to get the lookat deltas applied
@@ -3357,7 +3357,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3357 // sl Does send them 3357 // sl Does send them
3358 // if (ParentGroup.IsSelected && ParentGroup.IsAttachment) 3358 // if (ParentGroup.IsSelected && ParentGroup.IsAttachment)
3359 // return; 3359 // return;
3360 3360
3361 if (ParentGroup.IsDeleted) 3361 if (ParentGroup.IsDeleted)
3362 return; 3362 return;
3363 3363
@@ -3487,7 +3487,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3487 public void SetBuoyancy(float fvalue) 3487 public void SetBuoyancy(float fvalue)
3488 { 3488 {
3489 Buoyancy = fvalue; 3489 Buoyancy = fvalue;
3490/* 3490/*
3491 if (PhysActor != null) 3491 if (PhysActor != null)
3492 { 3492 {
3493 PhysActor.Buoyancy = fvalue; 3493 PhysActor.Buoyancy = fvalue;
@@ -3547,7 +3547,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3547 public void SetVehicleType(int type) 3547 public void SetVehicleType(int type)
3548 { 3548 {
3549 m_vehicleParams = null; 3549 m_vehicleParams = null;
3550 3550
3551 if (type == (int)Vehicle.TYPE_NONE) 3551 if (type == (int)Vehicle.TYPE_NONE)
3552 { 3552 {
3553 if (_parentID ==0 && PhysActor != null) 3553 if (_parentID ==0 && PhysActor != null)
@@ -3754,7 +3754,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3754 { 3754 {
3755 if (Shape.SculptEntry) 3755 if (Shape.SculptEntry)
3756 return PrimType.SCULPT; 3756 return PrimType.SCULPT;
3757 3757
3758 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) 3758 if ((Shape.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
3759 { 3759 {
3760 if (Shape.PathCurve == (byte)Extrusion.Straight) 3760 if (Shape.PathCurve == (byte)Extrusion.Straight)
@@ -3782,12 +3782,12 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3782 else if (Shape.PathCurve == (byte)Extrusion.Curve1) 3782 else if (Shape.PathCurve == (byte)Extrusion.Curve1)
3783 return PrimType.RING; 3783 return PrimType.RING;
3784 } 3784 }
3785 3785
3786 return PrimType.BOX; 3786 return PrimType.BOX;
3787 } 3787 }
3788 3788
3789 /// <summary> 3789 /// <summary>
3790 /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces 3790 /// Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces
3791 /// </summary> 3791 /// </summary>
3792 /// <param name="primType"></param> 3792 /// <param name="primType"></param>
3793 /// <param name="shape"></param> 3793 /// <param name="shape"></param>
@@ -3812,7 +3812,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3812 hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms 3812 hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms
3813 hasProfileCut = hasDimple; // is it the same thing? 3813 hasProfileCut = hasDimple; // is it the same thing?
3814 } 3814 }
3815 3815
3816 public void SetGroup(UUID groupID, IClientAPI client) 3816 public void SetGroup(UUID groupID, IClientAPI client)
3817 { 3817 {
3818 // Scene.AddNewPrims() calls with client == null so can't use this. 3818 // Scene.AddNewPrims() calls with client == null so can't use this.
@@ -3859,7 +3859,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3859 public void SetScriptEvents(UUID scriptid, int events) 3859 public void SetScriptEvents(UUID scriptid, int events)
3860 { 3860 {
3861// m_log.DebugFormat( 3861// m_log.DebugFormat(
3862// "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}", 3862// "[SCENE OBJECT PART]: Set script events for script with id {0} on {1}/{2} to {3} in {4}",
3863// scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name); 3863// scriptid, Name, ParentGroup.Name, events, ParentGroup.Scene.Name);
3864 3864
3865 // scriptEvents oldparts; 3865 // scriptEvents oldparts;
@@ -3896,7 +3896,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
3896 ScheduleFullUpdate(); 3896 ScheduleFullUpdate();
3897 } 3897 }
3898 } 3898 }
3899 3899
3900 /// <summary> 3900 /// <summary>
3901 /// Set the text displayed for this part. 3901 /// Set the text displayed for this part.
3902 /// </summary> 3902 /// </summary>
@@ -4491,7 +4491,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4491 public bool IsHingeJoint() 4491 public bool IsHingeJoint()
4492 { 4492 {
4493 // For now, we use the NINJA naming scheme for identifying joints. 4493 // For now, we use the NINJA naming scheme for identifying joints.
4494 // In the future, we can support other joint specification schemes such as a 4494 // In the future, we can support other joint specification schemes such as a
4495 // custom checkbox in the viewer GUI. 4495 // custom checkbox in the viewer GUI.
4496 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4496 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4497 { 4497 {
@@ -4507,7 +4507,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4507 public bool IsBallJoint() 4507 public bool IsBallJoint()
4508 { 4508 {
4509 // For now, we use the NINJA naming scheme for identifying joints. 4509 // For now, we use the NINJA naming scheme for identifying joints.
4510 // In the future, we can support other joint specification schemes such as a 4510 // In the future, we can support other joint specification schemes such as a
4511 // custom checkbox in the viewer GUI. 4511 // custom checkbox in the viewer GUI.
4512 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4512 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4513 { 4513 {
@@ -4523,7 +4523,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4523 public bool IsJoint() 4523 public bool IsJoint()
4524 { 4524 {
4525 // For now, we use the NINJA naming scheme for identifying joints. 4525 // For now, we use the NINJA naming scheme for identifying joints.
4526 // In the future, we can support other joint specification schemes such as a 4526 // In the future, we can support other joint specification schemes such as a
4527 // custom checkbox in the viewer GUI. 4527 // custom checkbox in the viewer GUI.
4528 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4528 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4529 { 4529 {
@@ -4616,8 +4616,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4616 4616
4617 Stop(); 4617 Stop();
4618 } 4618 }
4619 4619
4620 else 4620 else
4621 { 4621 {
4622 if (ParentGroup.Scene.CollidablePrims) 4622 if (ParentGroup.Scene.CollidablePrims)
4623 { 4623 {
@@ -4649,7 +4649,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4649 4649
4650 UpdatePhysicsSubscribedEvents(); 4650 UpdatePhysicsSubscribedEvents();
4651 } 4651 }
4652 } 4652 }
4653 4653
4654 // and last in case we have a new actor and not building 4654 // and last in case we have a new actor and not building
4655 4655
@@ -4658,7 +4658,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4658 ParentGroup.HasGroupChanged = true; 4658 ParentGroup.HasGroupChanged = true;
4659 ScheduleFullUpdate(); 4659 ScheduleFullUpdate();
4660 } 4660 }
4661 4661
4662// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); 4662// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags);
4663 } 4663 }
4664 4664
@@ -4671,10 +4671,10 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4671 /// <param name="building">tells physics to delay full construction of object</param> 4671 /// <param name="building">tells physics to delay full construction of object</param>
4672 /// <param name="applyDynamics">applies velocities, force and torque</param> 4672 /// <param name="applyDynamics">applies velocities, force and torque</param>
4673 private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics) 4673 private void AddToPhysics(bool isPhysical, bool isPhantom, bool building, bool applyDynamics)
4674 { 4674 {
4675 PhysicsActor pa; 4675 PhysicsActor pa;
4676 4676
4677 Vector3 velocity = Velocity; 4677 Vector3 velocity = Velocity;
4678 Vector3 rotationalVelocity = AngularVelocity;; 4678 Vector3 rotationalVelocity = AngularVelocity;;
4679 4679
4680 try 4680 try
@@ -4695,7 +4695,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4695 m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e); 4695 m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom. e={1}", m_uuid, e);
4696 pa = null; 4696 pa = null;
4697 } 4697 }
4698 4698
4699 if (pa != null) 4699 if (pa != null)
4700 { 4700 {
4701 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info 4701 pa.SOPName = this.Name; // save object into the PhysActor so ODE internals know the joint/body info
@@ -4709,7 +4709,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4709 4709
4710 if(LocalId == ParentGroup.RootPart.LocalId) 4710 if(LocalId == ParentGroup.RootPart.LocalId)
4711 { 4711 {
4712 pa.LockAngularMotion(RotationAxisLocks); 4712 pa.LockAngularMotion(RotationAxisLocks);
4713 } 4713 }
4714 4714
4715 if (VolumeDetectActive) // change if not the default only 4715 if (VolumeDetectActive) // change if not the default only
@@ -4722,7 +4722,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4722 AddFlag(PrimFlags.CameraDecoupled); 4722 AddFlag(PrimFlags.CameraDecoupled);
4723 else 4723 else
4724 RemFlag(PrimFlags.CameraDecoupled); 4724 RemFlag(PrimFlags.CameraDecoupled);
4725 } 4725 }
4726 else 4726 else
4727 RemFlag(PrimFlags.CameraDecoupled); 4727 RemFlag(PrimFlags.CameraDecoupled);
4728 // we are going to tell rest of code about physics so better have this here 4728 // we are going to tell rest of code about physics so better have this here
@@ -4752,8 +4752,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4752 } 4752 }
4753 } 4753 }
4754 4754
4755 if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId) 4755 if (applyDynamics && LocalId == ParentGroup.RootPart.LocalId)
4756 // do independent of isphysical so parameters get setted (at least some) 4756 // do independent of isphysical so parameters get setted (at least some)
4757 { 4757 {
4758 Velocity = velocity; 4758 Velocity = velocity;
4759 AngularVelocity = rotationalVelocity; 4759 AngularVelocity = rotationalVelocity;
@@ -4941,8 +4941,8 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4941 4941
4942 Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture; 4942 Primitive.TextureEntryFace fallbackNewFace = newTex.DefaultTexture;
4943 Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture; 4943 Primitive.TextureEntryFace fallbackOldFace = oldTex.DefaultTexture;
4944 4944
4945 // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all 4945 // On Incoming packets, sometimes newText.DefaultTexture is null. The assumption is that all
4946 // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point. 4946 // other prim-sides are set, but apparently that's not always the case. Lets assume packet/data corruption at this point.
4947 if (fallbackNewFace == null) 4947 if (fallbackNewFace == null)
4948 { 4948 {
@@ -4958,7 +4958,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
4958 // Materials capable viewers can send a ObjectImage packet 4958 // Materials capable viewers can send a ObjectImage packet
4959 // when nothing in TE has changed. MaterialID should be updated 4959 // when nothing in TE has changed. MaterialID should be updated
4960 // by the RenderMaterials CAP handler, so updating it here may cause a 4960 // by the RenderMaterials CAP handler, so updating it here may cause a
4961 // race condtion. Therefore, if no non-materials TE fields have changed, 4961 // race condtion. Therefore, if no non-materials TE fields have changed,
4962 // we should ignore any changes and not update Shape.TextureEntry 4962 // we should ignore any changes and not update Shape.TextureEntry
4963 4963
4964 bool otherFieldsChanged = false; 4964 bool otherFieldsChanged = false;
@@ -5140,7 +5140,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5140 { 5140 {
5141 return m_forceMouselook; 5141 return m_forceMouselook;
5142 } 5142 }
5143 5143
5144 public override string ToString() 5144 public override string ToString()
5145 { 5145 {
5146 return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup); 5146 return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup);
@@ -5157,7 +5157,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5157 && (ParentGroup.RootPart != this 5157 && (ParentGroup.RootPart != this
5158 || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint)) 5158 || ParentGroup.AttachedAvatar != remoteClient.AgentId && ParentGroup.HasPrivateAttachmentPoint))
5159 return; 5159 return;
5160 5160
5161 // Causes this thread to dig into the Client Thread Data. 5161 // Causes this thread to dig into the Client Thread Data.
5162 // Remember your locking here! 5162 // Remember your locking here!
5163 remoteClient.SendEntityUpdate( 5163 remoteClient.SendEntityUpdate(
@@ -5165,9 +5165,9 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5165 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity 5165 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
5166 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); 5166 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
5167 5167
5168 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1); 5168 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
5169 } 5169 }
5170 5170
5171 public void AddScriptLPS(int count) 5171 public void AddScriptLPS(int count)
5172 { 5172 {
5173 ParentGroup.AddScriptLPS(count); 5173 ParentGroup.AddScriptLPS(count);
@@ -5233,7 +5233,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter
5233 { 5233 {
5234 PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask); 5234 PermissionsUtil.LogPermissions(Name, message, BaseMask, OwnerMask, NextOwnerMask);
5235 } 5235 }
5236 5236
5237 public void ApplyNextOwnerPermissions() 5237 public void ApplyNextOwnerPermissions()
5238 { 5238 {
5239 // Export needs to be preserved in the base and everyone 5239 // Export needs to be preserved in the base and everyone
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 5b64aac..a50f162 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes
55 private object m_inventoryFileLock = new object(); 55 private object m_inventoryFileLock = new object();
56 56
57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>(); 57 private Dictionary<UUID, ArrayList> m_scriptErrors = new Dictionary<UUID, ArrayList>();
58 58
59 /// <value> 59 /// <value>
60 /// The part to which the inventory belongs. 60 /// The part to which the inventory belongs.
61 /// </value> 61 /// </value>
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes
76 /// Tracks whether inventory has changed since the last persistent backup 76 /// Tracks whether inventory has changed since the last persistent backup
77 /// </summary> 77 /// </summary>
78 internal bool HasInventoryChanged; 78 internal bool HasInventoryChanged;
79 79
80 /// <value> 80 /// <value>
81 /// Inventory serial number 81 /// Inventory serial number
82 /// </value> 82 /// </value>
@@ -91,8 +91,8 @@ namespace OpenSim.Region.Framework.Scenes
91 /// </value> 91 /// </value>
92 protected internal TaskInventoryDictionary Items 92 protected internal TaskInventoryDictionary Items
93 { 93 {
94 get { 94 get {
95 return m_items; 95 return m_items;
96 } 96 }
97 set 97 set
98 { 98 {
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Framework.Scenes
110 return m_items.Count; 110 return m_items.Count;
111 } 111 }
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
115 /// Constructor 115 /// Constructor
116 /// </summary> 116 /// </summary>
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 StoreScriptError(item.ItemID, msg); 393 StoreScriptError(item.ItemID, msg);
394 m_log.ErrorFormat( 394 m_log.ErrorFormat(
395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", 395 "[PRIM INVENTORY]: Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
396 item.Name, item.ItemID, m_part.AbsolutePosition, 396 item.Name, item.ItemID, m_part.AbsolutePosition,
397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); 397 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
398 398
399 return false; 399 return false;
@@ -410,7 +410,7 @@ namespace OpenSim.Region.Framework.Scenes
410 m_items[item.ItemID].PermsGranter = UUID.Zero; 410 m_items[item.ItemID].PermsGranter = UUID.Zero;
411 411
412 m_items.LockItemsForWrite(false); 412 m_items.LockItemsForWrite(false);
413 413
414 string script = Utils.BytesToString(asset.Data); 414 string script = Utils.BytesToString(asset.Data);
415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript( 415 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); 416 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
@@ -428,7 +428,7 @@ namespace OpenSim.Region.Framework.Scenes
428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID) 428 private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID)
429 { 429 {
430// m_log.DebugFormat( 430// m_log.DebugFormat(
431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}", 431// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}",
432// newID, oldID, loadedID); 432// newID, oldID, loadedID);
433 433
434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 434 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
477 477
478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml; 478 m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml;
479 } 479 }
480 480
481 foreach (IScriptModule e in engines) 481 foreach (IScriptModule e in engines)
482 { 482 {
483 if (e != null) 483 if (e != null)
@@ -544,7 +544,7 @@ namespace OpenSim.Region.Framework.Scenes
544 { 544 {
545 ArrayList errors; 545 ArrayList errors;
546 546
547 // Indicate to CreateScriptInstanceInternal() we want it to 547 // Indicate to CreateScriptInstanceInternal() we want it to
548 // post any compilation/loading error messages 548 // post any compilation/loading error messages
549 lock (m_scriptErrors) 549 lock (m_scriptErrors)
550 { 550 {
@@ -641,7 +641,7 @@ namespace OpenSim.Region.Framework.Scenes
641 { 641 {
642 if (!sceneObjectBeingDeleted) 642 if (!sceneObjectBeingDeleted)
643 m_part.RemoveScriptEvents(itemId); 643 m_part.RemoveScriptEvents(itemId);
644 644
645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); 645 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
646 m_part.ParentGroup.AddActiveScriptCount(-1); 646 m_part.ParentGroup.AddActiveScriptCount(-1);
647 } 647 }
@@ -650,7 +650,7 @@ namespace OpenSim.Region.Framework.Scenes
650 m_log.WarnFormat( 650 m_log.WarnFormat(
651 "[PRIM INVENTORY]: " + 651 "[PRIM INVENTORY]: " +
652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 652 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
653 itemId, m_part.Name, m_part.UUID, 653 itemId, m_part.Name, m_part.UUID,
654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 654 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
655 } 655 }
656 } 656 }
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Framework.Scenes
679 m_log.WarnFormat( 679 m_log.WarnFormat(
680 "[PRIM INVENTORY]: " + 680 "[PRIM INVENTORY]: " +
681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}", 681 "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2} at {3} in {4}",
682 itemId, m_part.Name, m_part.UUID, 682 itemId, m_part.Name, m_part.UUID,
683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 683 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
684 } 684 }
685 } 685 }
@@ -802,11 +802,11 @@ namespace OpenSim.Region.Framework.Scenes
802 m_items.LockItemsForWrite(true); 802 m_items.LockItemsForWrite(true);
803 m_items.Add(item.ItemID, item); 803 m_items.Add(item.ItemID, item);
804 m_items.LockItemsForWrite(false); 804 m_items.LockItemsForWrite(false);
805 if (allowedDrop) 805 if (allowedDrop)
806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP); 806 m_part.TriggerScriptChangedEvent(Changed.ALLOWED_DROP);
807 else 807 else
808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 808 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
809 809
810 m_inventorySerial++; 810 m_inventorySerial++;
811 //m_inventorySerial += 2; 811 //m_inventorySerial += 2;
812 HasInventoryChanged = true; 812 HasInventoryChanged = true;
@@ -887,7 +887,7 @@ namespace OpenSim.Region.Framework.Scenes
887 if (null == rezAsset) 887 if (null == rezAsset)
888 { 888 {
889 m_log.WarnFormat( 889 m_log.WarnFormat(
890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}", 890 "[PRIM INVENTORY]: Could not find asset {0} for inventory item {1} in {2}",
891 item.AssetID, item.Name, m_part.Name); 891 item.AssetID, item.Name, m_part.Name);
892 objlist = null; 892 objlist = null;
893 veclist = null; 893 veclist = null;
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Framework.Scenes
895 offsetHeight = 0; 895 offsetHeight = 0;
896 return false; 896 return false;
897 } 897 }
898 898
899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); 899 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight);
900 900
901 for (int i = 0; i < objlist.Count; i++) 901 for (int i = 0; i < objlist.Count; i++)
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Framework.Scenes
985 985
986 return true; 986 return true;
987 } 987 }
988 988
989 /// <summary> 989 /// <summary>
990 /// Update an existing inventory item. 990 /// Update an existing inventory item.
991 /// </summary> 991 /// </summary>
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes
1009 if (m_items.ContainsKey(item.ItemID)) 1009 if (m_items.ContainsKey(item.ItemID))
1010 { 1010 {
1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); 1011// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name);
1012 1012
1013 item.ParentID = m_part.UUID; 1013 item.ParentID = m_part.UUID;
1014 item.ParentPartID = m_part.UUID; 1014 item.ParentPartID = m_part.UUID;
1015 1015
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Framework.Scenes
1025 m_inventorySerial++; 1025 m_inventorySerial++;
1026 if (fireScriptEvents) 1026 if (fireScriptEvents)
1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1027 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
1028 1028
1029 if (considerChanged) 1029 if (considerChanged)
1030 { 1030 {
1031 HasInventoryChanged = true; 1031 HasInventoryChanged = true;
@@ -1039,7 +1039,7 @@ namespace OpenSim.Region.Framework.Scenes
1039 m_log.ErrorFormat( 1039 m_log.ErrorFormat(
1040 "[PRIM INVENTORY]: " + 1040 "[PRIM INVENTORY]: " +
1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory", 1041 "Tried to retrieve item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
1042 item.ItemID, m_part.Name, m_part.UUID, 1042 item.ItemID, m_part.Name, m_part.UUID,
1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName); 1043 m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
1044 } 1044 }
1045 m_items.LockItemsForWrite(false); 1045 m_items.LockItemsForWrite(false);
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Framework.Scenes
1084 } 1084 }
1085 } 1085 }
1086 m_items.LockItemsForRead(false); 1086 m_items.LockItemsForRead(false);
1087 1087
1088 1088
1089 if (scriptcount <= 0) 1089 if (scriptcount <= 0)
1090 { 1090 {
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Framework.Scenes
1381 item.CurrentPermissions = perms; 1381 item.CurrentPermissions = perms;
1382 item.BasePermissions = perms; 1382 item.BasePermissions = perms;
1383 } 1383 }
1384 1384
1385 m_inventorySerial++; 1385 m_inventorySerial++;
1386 HasInventoryChanged = true; 1386 HasInventoryChanged = true;
1387 } 1387 }
@@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes
1485 1485
1486 return ret; 1486 return ret;
1487 } 1487 }
1488 1488
1489 public Dictionary<UUID, string> GetScriptStates() 1489 public Dictionary<UUID, string> GetScriptStates()
1490 { 1490 {
1491 return GetScriptStates(false); 1491 return GetScriptStates(false);
@@ -1493,13 +1493,13 @@ namespace OpenSim.Region.Framework.Scenes
1493 1493
1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs) 1494 public Dictionary<UUID, string> GetScriptStates(bool oldIDs)
1495 { 1495 {
1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>(); 1496 Dictionary<UUID, string> ret = new Dictionary<UUID, string>();
1497 1497
1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene 1498 if (m_part.ParentGroup.Scene == null) // Group not in a scene
1499 return ret; 1499 return ret;
1500 1500
1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1501 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
1502 1502
1503 if (engines.Length == 0) // No engine at all 1503 if (engines.Length == 0) // No engine at all
1504 return ret; 1504 return ret;
1505 1505
@@ -1535,7 +1535,7 @@ namespace OpenSim.Region.Framework.Scenes
1535 } 1535 }
1536 return ret; 1536 return ret;
1537 } 1537 }
1538 1538
1539 public void ResumeScripts() 1539 public void ResumeScripts()
1540 { 1540 {
1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); 1541 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index c1b1a63..29e139b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -108,8 +108,8 @@ namespace OpenSim.Region.Framework.Scenes
108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine 108 /// The current state of this presence. Governs only the existence lifecycle. See ScenePresenceStateMachine
109 /// for more details. 109 /// for more details.
110 /// </summary> 110 /// </summary>
111 public ScenePresenceState LifecycleState 111 public ScenePresenceState LifecycleState
112 { 112 {
113 get 113 get
114 { 114 {
115 return m_stateMachine.GetState(); 115 return m_stateMachine.GetState();
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes
126 /// the viewer fires these in quick succession. 126 /// the viewer fires these in quick succession.
127 /// </summary> 127 /// </summary>
128 /// <remarks> 128 /// <remarks>
129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement 129 /// TODO: The child -> agent transition should be folded into LifecycleState and the CompleteMovement
130 /// regulation done there. 130 /// regulation done there.
131 /// </remarks> 131 /// </remarks>
132 private object m_completeMovementLock = new object(); 132 private object m_completeMovementLock = new object();
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes(); 134// private static readonly byte[] DEFAULT_TEXTURE = AvatarAppearance.GetDefaultTexture().GetBytes();
135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags)); 135 private static readonly Array DIR_CONTROL_FLAGS = Enum.GetValues(typeof(Dir_ControlFlags));
136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f); 136 private static readonly Vector3 HEAD_ADJUSTMENT = new Vector3(0f, 0f, 0.3f);
137 137
138 /// <summary> 138 /// <summary>
139 /// Experimentally determined "fudge factor" to make sit-target positions 139 /// Experimentally determined "fudge factor" to make sit-target positions
140 /// the same as in SecondLife. Fudge factor was tested for 36 different 140 /// the same as in SecondLife. Fudge factor was tested for 36 different
@@ -241,7 +241,7 @@ namespace OpenSim.Region.Framework.Scenes
241 return m_currentParcelHide; 241 return m_currentParcelHide;
242 } 242 }
243 } 243 }
244 244
245 /// <value> 245 /// <value>
246 /// The animator for this avatar 246 /// The animator for this avatar
247 /// </value> 247 /// </value>
@@ -356,7 +356,7 @@ namespace OpenSim.Region.Framework.Scenes
356 protected bool m_reprioritizationBusy; 356 protected bool m_reprioritizationBusy;
357 protected Vector3 m_reprioritizationLastPosition; 357 protected Vector3 m_reprioritizationLastPosition;
358 protected float m_reprioritizationLastDrawDistance; 358 protected float m_reprioritizationLastDrawDistance;
359 359
360 private Quaternion m_headrotation = Quaternion.Identity; 360 private Quaternion m_headrotation = Quaternion.Identity;
361 361
362 //PauPaw:Proper PID Controler for autopilot************ 362 //PauPaw:Proper PID Controler for autopilot************
@@ -377,7 +377,7 @@ namespace OpenSim.Region.Framework.Scenes
377 377
378 //private bool m_collisionEventFlag = false; 378 //private bool m_collisionEventFlag = false;
379 private object m_collisionEventLock = new Object(); 379 private object m_collisionEventLock = new Object();
380 380
381 private int m_movementAnimationUpdateCounter = 0; 381 private int m_movementAnimationUpdateCounter = 0;
382 382
383 public Vector3 PrevSitOffset { get; set; } 383 public Vector3 PrevSitOffset { get; set; }
@@ -424,7 +424,7 @@ namespace OpenSim.Region.Framework.Scenes
424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS, 424 DIR_CONTROL_FLAG_UP_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS,
425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG 425 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG
426 } 426 }
427 427
428 /// <summary> 428 /// <summary>
429 /// Position at which a significant movement was made 429 /// Position at which a significant movement was made
430 /// </summary> 430 /// </summary>
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Framework.Scenes
528 m_rootRegionHandle = value; 528 m_rootRegionHandle = value;
529 // position rounded to lower multiple of 256m 529 // position rounded to lower multiple of 256m
530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00); 530 m_rootRegionPosition.X = (float)((m_rootRegionHandle >> 32) & 0xffffff00);
531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00); 531 m_rootRegionPosition.Y = (float)(m_rootRegionHandle & 0xffffff00);
532 } 532 }
533 } 533 }
534 534
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Framework.Scenes
562 return a; 562 return a;
563 } 563 }
564 } 564 }
565 #endregion 565 #endregion
566 566
567 public string Firstname { get; private set; } 567 public string Firstname { get; private set; }
568 public string Lastname { get; private set; } 568 public string Lastname { get; private set; }
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Framework.Scenes
603 public bool AllowMovement { get; set; } 603 public bool AllowMovement { get; set; }
604 604
605 private bool m_setAlwaysRun; 605 private bool m_setAlwaysRun;
606 606
607 public bool SetAlwaysRun 607 public bool SetAlwaysRun
608 { 608 {
609 get 609 get
@@ -689,7 +689,7 @@ namespace OpenSim.Region.Framework.Scenes
689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation()); 689 return rootPart.AbsolutePosition + (m_pos * rootPart.GetWorldRotation());
690 } 690 }
691 } 691 }
692 692
693 return m_pos; 693 return m_pos;
694 } 694 }
695 set 695 set
@@ -777,7 +777,7 @@ namespace OpenSim.Region.Framework.Scenes
777 777
778// m_log.DebugFormat( 778// m_log.DebugFormat(
779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}", 779// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
780// Scene.RegionInfo.RegionName, Name, m_velocity); 780// Scene.RegionInfo.RegionName, Name, m_velocity);
781 } 781 }
782 } 782 }
783 783
@@ -821,9 +821,9 @@ namespace OpenSim.Region.Framework.Scenes
821 /// </remarks> 821 /// </remarks>
822 public Quaternion Rotation 822 public Quaternion Rotation
823 { 823 {
824 get 824 get
825 { 825 {
826 return m_bodyRot; 826 return m_bodyRot;
827 } 827 }
828 828
829 set 829 set
@@ -963,10 +963,10 @@ namespace OpenSim.Region.Framework.Scenes
963 } 963 }
964 964
965 DropOldNeighbours(old); 965 DropOldNeighbours(old);
966 966
967 if (Scene.CapsModule != null) 967 if (Scene.CapsModule != null)
968 Scene.CapsModule.SetChildrenSeed(UUID, seeds); 968 Scene.CapsModule.SetChildrenSeed(UUID, seeds);
969*/ 969*/
970 KnownRegions = seeds; 970 KnownRegions = seeds;
971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ "); 971 //m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
972 //DumpKnownRegions(); 972 //DumpKnownRegions();
@@ -991,13 +991,13 @@ namespace OpenSim.Region.Framework.Scenes
991 /// <summary> 991 /// <summary>
992 /// This signals whether the presence is in transit between neighbouring regions. 992 /// This signals whether the presence is in transit between neighbouring regions.
993 /// </summary> 993 /// </summary>
994 /// <remarks> 994 /// <remarks>
995 /// It is not set when the presence is teleporting or logging in/out directly to a region. 995 /// It is not set when the presence is teleporting or logging in/out directly to a region.
996 /// </remarks> 996 /// </remarks>
997 public bool IsInTransit 997 public bool IsInTransit
998 { 998 {
999 get { return m_inTransit; } 999 get { return m_inTransit; }
1000 set { 1000 set {
1001 if(value) 1001 if(value)
1002 { 1002 {
1003 if (Flying) 1003 if (Flying)
@@ -1051,14 +1051,14 @@ namespace OpenSim.Region.Framework.Scenes
1051 { 1051 {
1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); } 1052 get { return Util.GetViewerName(m_scene.AuthenticateHandler.GetAgentCircuitData(ControllingClient.CircuitCode)); }
1053 } 1053 }
1054 1054
1055 #endregion 1055 #endregion
1056 1056
1057 #region Constructor(s) 1057 #region Constructor(s)
1058 1058
1059 public ScenePresence( 1059 public ScenePresence(
1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) 1060 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
1061 { 1061 {
1062 m_scene = world; 1062 m_scene = world;
1063 AttachmentsSyncLock = new Object(); 1063 AttachmentsSyncLock = new Object();
1064 AllowMovement = true; 1064 AllowMovement = true;
@@ -1092,16 +1092,16 @@ namespace OpenSim.Region.Framework.Scenes
1092 // Grouptitle = gm.GetGroupTitle(m_uuid); 1092 // Grouptitle = gm.GetGroupTitle(m_uuid);
1093 1093
1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>(); 1094 m_scriptEngines = m_scene.RequestModuleInterfaces<IScriptModule>();
1095 1095
1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition = 1096 AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition =
1097 m_reprioritizationLastPosition = ControllingClient.StartPos; 1097 m_reprioritizationLastPosition = ControllingClient.StartPos;
1098 1098
1099 m_reprioritizationLastDrawDistance = DrawDistance; 1099 m_reprioritizationLastDrawDistance = DrawDistance;
1100 1100
1101 // disable updates workjobs for now 1101 // disable updates workjobs for now
1102 childUpdatesBusy = true; 1102 childUpdatesBusy = true;
1103 m_reprioritizationBusy = true; 1103 m_reprioritizationBusy = true;
1104 1104
1105 AdjustKnownSeeds(); 1105 AdjustKnownSeeds();
1106 1106
1107 RegisterToClientEvents(); 1107 RegisterToClientEvents();
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.Framework.Scenes
1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 1189 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 1190 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
1191 } 1191 }
1192 1192
1193 public void RemoveClientEvents() 1193 public void RemoveClientEvents()
1194 { 1194 {
1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; 1195 ControllingClient.OnCompleteMovementToRegion -= CompleteMovement;
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes
1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here 1237 /// This method is on the critical path for transferring an avatar from one region to another. Delay here
1238 /// delays that crossing. 1238 /// delays that crossing.
1239 /// </remarks> 1239 /// </remarks>
1240 1240
1241 // constants for physics position search 1241 // constants for physics position search
1242 const float PhysSearchHeight = 600f; 1242 const float PhysSearchHeight = 600f;
1243 const float PhysMinSkipGap = 50f; 1243 const float PhysMinSkipGap = 50f;
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.Framework.Scenes
1280 // if not actually on the target invalidate it 1280 // if not actually on the target invalidate it
1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0) 1281 if(gotCrossUpdate && (crossingFlags & 0x04) == 0)
1282 part.SitTargetAvatar = UUID.Zero; 1282 part.SitTargetAvatar = UUID.Zero;
1283 1283
1284 ParentID = part.LocalId; 1284 ParentID = part.LocalId;
1285 ParentPart = part; 1285 ParentPart = part;
1286 m_pos = PrevSitOffset; 1286 m_pos = PrevSitOffset;
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.Framework.Scenes
1380 int physcount = PhysNumberCollisions; 1380 int physcount = PhysNumberCollisions;
1381 1381
1382 float dist = physTestHeight - groundHeight + localAVHalfHeight; 1382 float dist = physTestHeight - groundHeight + localAVHalfHeight;
1383 1383
1384 Vector3 direction = new Vector3(0f, 0f, -1f); 1384 Vector3 direction = new Vector3(0f, 0f, -1f);
1385 Vector3 RayStart = pos; 1385 Vector3 RayStart = pos;
1386 RayStart.Z = physTestHeight; 1386 RayStart.Z = physTestHeight;
@@ -1426,7 +1426,7 @@ namespace OpenSim.Region.Framework.Scenes
1426 AbsolutePosition = pos; 1426 AbsolutePosition = pos;
1427 1427
1428// m_log.DebugFormat( 1428// m_log.DebugFormat(
1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent", 1429// "Set pos {0}, vel {1} in {1} to {2} from input position of {3} on MakeRootAgent",
1430// Name, Scene.Name, AbsolutePosition, pos); 1430// Name, Scene.Name, AbsolutePosition, pos);
1431// 1431//
1432 if (m_teleportFlags == TeleportFlags.Default) 1432 if (m_teleportFlags == TeleportFlags.Default)
@@ -1453,8 +1453,8 @@ namespace OpenSim.Region.Framework.Scenes
1453 Flying = false; 1453 Flying = false;
1454 } 1454 }
1455 } 1455 }
1456 1456
1457 1457
1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 1458 m_log.DebugFormat("[MakeRootAgent] position and physical: {0}ms", Util.EnvironmentTickCountSubtract(ts));
1459 m_scene.SwapRootAgentCount(false); 1459 m_scene.SwapRootAgentCount(false);
1460 1460
@@ -1519,7 +1519,7 @@ namespace OpenSim.Region.Framework.Scenes
1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name); 1519 m_log.DebugFormat("[SCENE PRESENCE]: Forcing viewers to update the avatar name for " + Name);
1520 1520
1521 UseFakeGroupTitle = true; 1521 UseFakeGroupTitle = true;
1522 1522
1523 1523
1524 Util.FireAndForget(o => 1524 Util.FireAndForget(o =>
1525 { 1525 {
@@ -1587,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes
1587 else 1587 else
1588 Animator.ResetAnimations(); 1588 Animator.ResetAnimations();
1589 1589
1590 1590
1591// m_log.DebugFormat( 1591// m_log.DebugFormat(
1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}", 1592// "[SCENE PRESENCE]: Downgrading root agent {0}, {1} to a child agent in {2}",
1593// Name, UUID, m_scene.RegionInfo.RegionName); 1593// Name, UUID, m_scene.RegionInfo.RegionName);
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes
1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing, 1595 // Don't zero out the velocity since this can cause problems when an avatar is making a region crossing,
1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated. 1596 // depending on the exact timing. This shouldn't matter anyway since child agent positions are not updated.
1597 //Velocity = new Vector3(0, 0, 0); 1597 //Velocity = new Vector3(0, 0, 0);
1598 1598
1599 IsChildAgent = true; 1599 IsChildAgent = true;
1600 m_scene.SwapRootAgentCount(true); 1600 m_scene.SwapRootAgentCount(true);
1601 RemoveFromPhysicalScene(); 1601 RemoveFromPhysicalScene();
@@ -1656,7 +1656,7 @@ namespace OpenSim.Region.Framework.Scenes
1656 bool isFlying = Flying; 1656 bool isFlying = Flying;
1657 Vector3 vel = Velocity; 1657 Vector3 vel = Velocity;
1658 RemoveFromPhysicalScene(); 1658 RemoveFromPhysicalScene();
1659 1659
1660 AbsolutePosition = pos; 1660 AbsolutePosition = pos;
1661 AddToPhysicalScene(isFlying); 1661 AddToPhysicalScene(isFlying);
1662 if (PhysicsActor != null) 1662 if (PhysicsActor != null)
@@ -1709,7 +1709,7 @@ namespace OpenSim.Region.Framework.Scenes
1709 if (IsInTransit) 1709 if (IsInTransit)
1710 return; 1710 return;
1711 1711
1712 Vector3 pos = AbsolutePosition; 1712 Vector3 pos = AbsolutePosition;
1713 if (Appearance.AvatarHeight != 127.0f) 1713 if (Appearance.AvatarHeight != 127.0f)
1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f)); 1714 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f));
1715 else 1715 else
@@ -1737,7 +1737,7 @@ namespace OpenSim.Region.Framework.Scenes
1737 /// <param name="amount">Postive or negative roll amount in radians</param> 1737 /// <param name="amount">Postive or negative roll amount in radians</param>
1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown) 1738 private void ApplyFlyingRoll(float amount, bool PressingUp, bool PressingDown)
1739 { 1739 {
1740 1740
1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS); 1741 float rollAmount = Util.Clamp(m_AngularVelocity.Z + amount, -FLY_ROLL_MAX_RADIANS, FLY_ROLL_MAX_RADIANS);
1742 m_AngularVelocity.Z = rollAmount; 1742 m_AngularVelocity.Z = rollAmount;
1743 1743
@@ -1789,7 +1789,7 @@ namespace OpenSim.Region.Framework.Scenes
1789 1789
1790 if (m_AngularVelocity.Z > 0) 1790 if (m_AngularVelocity.Z > 0)
1791 { 1791 {
1792 1792
1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians; 1793 float leftOverToMin = m_AngularVelocity.Z - rollMinRadians;
1794 if (amount > leftOverToMin) 1794 if (amount > leftOverToMin)
1795 return -leftOverToMin; 1795 return -leftOverToMin;
@@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
1799 } 1799 }
1800 else 1800 else
1801 { 1801 {
1802 1802
1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians; 1803 float leftOverToMin = -m_AngularVelocity.Z - rollMinRadians;
1804 if (amount > leftOverToMin) 1804 if (amount > leftOverToMin)
1805 return leftOverToMin; 1805 return leftOverToMin;
@@ -1807,7 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes
1807 return amount; 1807 return amount;
1808 } 1808 }
1809 } 1809 }
1810 1810
1811 1811
1812 1812
1813 // neighbouring regions we have enabled a child agent in 1813 // neighbouring regions we have enabled a child agent in
@@ -1943,15 +1943,15 @@ namespace OpenSim.Region.Framework.Scenes
1943 private bool WaitForUpdateAgent(IClientAPI client) 1943 private bool WaitForUpdateAgent(IClientAPI client)
1944 { 1944 {
1945 // Before the source region executes UpdateAgent 1945 // Before the source region executes UpdateAgent
1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination, 1946 // (which triggers Scene.IncomingUpdateChildAgent(AgentData cAgentData) here in the destination,
1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the 1947 // m_originRegionID is UUID.Zero; after, it's non-Zero. The CompleteMovement sequence initiated from the
1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero 1948 // viewer (in turn triggered by the source region sending it a TeleportFinish event) waits until it's non-zero
1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000); 1949// m_updateAgentReceivedAfterTransferEvent.WaitOne(10000);
1950 int count = 50; 1950 int count = 50;
1951 UUID originID = UUID.Zero; 1951 UUID originID = UUID.Zero;
1952 1952
1953 lock (m_originRegionIDAccessLock) 1953 lock (m_originRegionIDAccessLock)
1954 originID = m_originRegionID; 1954 originID = m_originRegionID;
1955 1955
1956 1956
1957 while (originID.Equals(UUID.Zero) && count-- > 0) 1957 while (originID.Equals(UUID.Zero) && count-- > 0)
@@ -2014,7 +2014,7 @@ namespace OpenSim.Region.Framework.Scenes
2014 m_log.InfoFormat( 2014 m_log.InfoFormat(
2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", 2015 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}",
2016 client.Name, Scene.Name, AbsolutePosition); 2016 client.Name, Scene.Name, AbsolutePosition);
2017 2017
2018 m_inTransit = true; 2018 m_inTransit = true;
2019 2019
2020 try 2020 try
@@ -2110,7 +2110,7 @@ namespace OpenSim.Region.Framework.Scenes
2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName); 2110// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
2111// } 2111// }
2112 2112
2113 2113
2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2114 m_log.DebugFormat("[CompleteMovement] ReleaseAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2115 2115
2116 2116
@@ -2138,7 +2138,7 @@ namespace OpenSim.Region.Framework.Scenes
2138 m_currentParcelHide = false; 2138 m_currentParcelHide = false;
2139 m_currentParcelUUID = UUID.Zero; 2139 m_currentParcelUUID = UUID.Zero;
2140 2140
2141 // send initial land overlay and parcel 2141 // send initial land overlay and parcel
2142 ILandChannel landch = m_scene.LandChannel; 2142 ILandChannel landch = m_scene.LandChannel;
2143 if (landch != null) 2143 if (landch != null)
2144 landch.sendClientInitialLandInfo(client); 2144 landch.sendClientInitialLandInfo(client);
@@ -2193,7 +2193,7 @@ namespace OpenSim.Region.Framework.Scenes
2193 2193
2194 // send look and animations to others 2194 // send look and animations to others
2195 // if not cached we send greys 2195 // if not cached we send greys
2196 // uncomented if will wait till avatar does baking 2196 // uncomented if will wait till avatar does baking
2197 //if (cachedbaked) 2197 //if (cachedbaked)
2198 { 2198 {
2199 foreach (ScenePresence p in allpresences) 2199 foreach (ScenePresence p in allpresences)
@@ -2292,7 +2292,7 @@ namespace OpenSim.Region.Framework.Scenes
2292 { 2292 {
2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 2293 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
2294 if (friendsModule != null) 2294 if (friendsModule != null)
2295 { 2295 {
2296 if(gotCrossUpdate) 2296 if(gotCrossUpdate)
2297 friendsModule.IsNowRoot(this); 2297 friendsModule.IsNowRoot(this);
2298 else 2298 else
@@ -2331,7 +2331,7 @@ namespace OpenSim.Region.Framework.Scenes
2331 /// <param name="collisionPoint"></param> 2331 /// <param name="collisionPoint"></param>
2332 /// <param name="localid"></param> 2332 /// <param name="localid"></param>
2333 /// <param name="distance"></param> 2333 /// <param name="distance"></param>
2334 /// 2334 ///
2335 2335
2336 private void checkCameraCollision() 2336 private void checkCameraCollision()
2337 { 2337 {
@@ -2486,7 +2486,7 @@ namespace OpenSim.Region.Framework.Scenes
2486 2486
2487 // The Agent's Draw distance setting 2487 // The Agent's Draw distance setting
2488 // When we get to the point of re-computing neighbors everytime this 2488 // When we get to the point of re-computing neighbors everytime this
2489 // changes, then start using the agent's drawdistance rather than the 2489 // changes, then start using the agent's drawdistance rather than the
2490 // region's draw distance. 2490 // region's draw distance.
2491 2491
2492 DrawDistance = agentData.Far; 2492 DrawDistance = agentData.Far;
@@ -2495,7 +2495,7 @@ namespace OpenSim.Region.Framework.Scenes
2495 2495
2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button 2496 // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button
2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look 2497 // is first pressed, not whilst it is held down. If this is required in the future then need to look
2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not 2498 // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not
2499 // received (e.g. on holding LMB down on the avatar in a viewer). 2499 // received (e.g. on holding LMB down on the avatar in a viewer).
2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; 2500 m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
2501 2501
@@ -2549,7 +2549,7 @@ namespace OpenSim.Region.Framework.Scenes
2549 2549
2550 if (AllowMovement && !SitGround) 2550 if (AllowMovement && !SitGround)
2551 { 2551 {
2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name); 2552// m_log.DebugFormat("[SCENE PRESENCE]: Initial body rotation {0} for {1}", agentData.BodyRotation, Name);
2553 bool update_rotation = false; 2553 bool update_rotation = false;
2554 if (agentData.BodyRotation != Rotation) 2554 if (agentData.BodyRotation != Rotation)
2555 { 2555 {
@@ -2617,7 +2617,7 @@ namespace OpenSim.Region.Framework.Scenes
2617 } 2617 }
2618 2618
2619 if (((MovementFlag & (uint)DCF) == 0)) 2619 if (((MovementFlag & (uint)DCF) == 0))
2620 { 2620 {
2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); 2621 //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF);
2622 MovementFlag |= (uint)DCF; 2622 MovementFlag |= (uint)DCF;
2623 update_movementflag = true; 2623 update_movementflag = true;
@@ -2715,11 +2715,11 @@ namespace OpenSim.Region.Framework.Scenes
2715 if (m_AngularVelocity.Z != 0) 2715 if (m_AngularVelocity.Z != 0)
2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); 2716 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE);
2717 } 2717 }
2718 2718
2719 /* 2719 /*
2720 if (Flying && IsColliding && controlland) 2720 if (Flying && IsColliding && controlland)
2721 { 2721 {
2722 // nesting this check because LengthSquared() is expensive and we don't 2722 // nesting this check because LengthSquared() is expensive and we don't
2723 // want to do it every step when flying. 2723 // want to do it every step when flying.
2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) 2724 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX))
2725 StopFlying(); 2725 StopFlying();
@@ -2730,7 +2730,7 @@ namespace OpenSim.Region.Framework.Scenes
2730 else if (IsColliding && agent_control_v3.Z < 0f) 2730 else if (IsColliding && agent_control_v3.Z < 0f)
2731 agent_control_v3.Z = 0; 2731 agent_control_v3.Z = 0;
2732// else if(AgentControlStopActive %% Velocity.Z <0.01f) 2732// else if(AgentControlStopActive %% Velocity.Z <0.01f)
2733 2733
2734 2734
2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name); 2735// m_log.DebugFormat("[SCENE PRESENCE]: MovementFlag {0} for {1}", MovementFlag, Name);
2736 2736
@@ -2738,9 +2738,9 @@ namespace OpenSim.Region.Framework.Scenes
2738 // which occurs later in the main scene loop 2738 // which occurs later in the main scene loop
2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they 2739 // We also need to update if the user rotates their avatar whilst it is slow walking/running (if they
2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update 2740 // held down AGENT_CONTROL_STOP whilst normal walking/running). However, we do not want to update
2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the 2741 // if the user rotated whilst holding down AGENT_CONTROL_STOP when already still (which locks the
2742 // avatar location in place). 2742 // avatar location in place).
2743 if (update_movementflag 2743 if (update_movementflag
2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0))) 2744 || (update_rotation && DCFlagKeyPressed && (!AgentControlStopActive || MovementFlag != 0)))
2745 { 2745 {
2746 2746
@@ -2810,9 +2810,9 @@ namespace OpenSim.Region.Framework.Scenes
2810 2810
2811 // The Agent's Draw distance setting 2811 // The Agent's Draw distance setting
2812 // When we get to the point of re-computing neighbors everytime this 2812 // When we get to the point of re-computing neighbors everytime this
2813 // changes, then start using the agent's drawdistance rather than the 2813 // changes, then start using the agent's drawdistance rather than the
2814 // region's draw distance. 2814 // region's draw distance.
2815 2815
2816 DrawDistance = agentData.Far; 2816 DrawDistance = agentData.Far;
2817 2817
2818 2818
@@ -2839,7 +2839,7 @@ namespace OpenSim.Region.Framework.Scenes
2839 2839
2840 TriggerScenePresenceUpdated(); 2840 TriggerScenePresenceUpdated();
2841 } 2841 }
2842 2842
2843 /// <summary> 2843 /// <summary>
2844 /// Calculate an update to move the presence to the set target. 2844 /// Calculate an update to move the presence to the set target.
2845 /// </summary> 2845 /// </summary>
@@ -2853,7 +2853,7 @@ namespace OpenSim.Region.Framework.Scenes
2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 2853// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
2854 2854
2855 bool updated = false; 2855 bool updated = false;
2856 2856
2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; 2857 Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition;
2858 2858
2859// m_log.DebugFormat( 2859// m_log.DebugFormat(
@@ -3030,11 +3030,11 @@ namespace OpenSim.Region.Framework.Scenes
3030 || pos.Y < 0 || pos.Y >= regionSize.Y 3030 || pos.Y < 0 || pos.Y >= regionSize.Y
3031 || pos.Z < 0) 3031 || pos.Z < 0)
3032 return; 3032 return;
3033 3033
3034 float terrainHeight; 3034 float terrainHeight;
3035 Scene targetScene = m_scene; 3035 Scene targetScene = m_scene;
3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y); 3036 terrainHeight = m_scene.GetGroundHeight(pos.X, pos.Y);
3037 3037
3038 // dont try to land underground 3038 // dont try to land underground
3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f; 3039 terrainHeight += Appearance.AvatarHeight * 0.5f + 0.2f;
3040 3040
@@ -3044,7 +3044,7 @@ namespace OpenSim.Region.Framework.Scenes
3044// m_log.DebugFormat( 3044// m_log.DebugFormat(
3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", 3045// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); 3046// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
3047 3047
3048 if (noFly) 3048 if (noFly)
3049 Flying = false; 3049 Flying = false;
3050 else if (pos.Z > terrainHeight || Flying) 3050 else if (pos.Z > terrainHeight || Flying)
@@ -3068,7 +3068,7 @@ namespace OpenSim.Region.Framework.Scenes
3068 3068
3069 Rotation = Quaternion.CreateFromEulers(angle); 3069 Rotation = Quaternion.CreateFromEulers(angle);
3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); 3070// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
3071 3071
3072 Vector3 control = Vector3.Zero; 3072 Vector3 control = Vector3.Zero;
3073 if(HandleMoveToTargetUpdate(1f, ref control)) 3073 if(HandleMoveToTargetUpdate(1f, ref control))
3074 AddNewMovement(control); 3074 AddNewMovement(control);
@@ -3162,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes
3162 m_pos = standPos; 3162 m_pos = standPos;
3163 } 3163 }
3164 3164
3165 // We need to wait until we have calculated proper stand positions before sitting up the physical 3165 // We need to wait until we have calculated proper stand positions before sitting up the physical
3166 // avatar to avoid race conditions. 3166 // avatar to avoid race conditions.
3167 if (PhysicsActor == null) 3167 if (PhysicsActor == null)
3168 AddToPhysicalScene(false); 3168 AddToPhysicalScene(false);
@@ -3178,7 +3178,7 @@ namespace OpenSim.Region.Framework.Scenes
3178 3178
3179 // reset to default sitAnimation 3179 // reset to default sitAnimation
3180 sitAnimation = "SIT"; 3180 sitAnimation = "SIT";
3181 3181
3182// Animator.TrySetMovementAnimation("STAND"); 3182// Animator.TrySetMovementAnimation("STAND");
3183 Animator.SetMovementAnimations("STAND"); 3183 Animator.SetMovementAnimations("STAND");
3184 3184
@@ -3244,7 +3244,7 @@ namespace OpenSim.Region.Framework.Scenes
3244 } 3244 }
3245 else 3245 else
3246 { 3246 {
3247 if (PhysicsSit(part,offset)) // physics engine 3247 if (PhysicsSit(part,offset)) // physics engine
3248 return; 3248 return;
3249 3249
3250 Vector3 pos = part.AbsolutePosition + offset; 3250 Vector3 pos = part.AbsolutePosition + offset;
@@ -3275,7 +3275,7 @@ namespace OpenSim.Region.Framework.Scenes
3275 3275
3276 cameraAtOffset = part.GetCameraAtOffset(); 3276 cameraAtOffset = part.GetCameraAtOffset();
3277 cameraEyeOffset = part.GetCameraEyeOffset(); 3277 cameraEyeOffset = part.GetCameraEyeOffset();
3278 3278
3279 forceMouselook = part.GetForceMouselook(); 3279 forceMouselook = part.GetForceMouselook();
3280 3280
3281 if (!part.IsRoot) 3281 if (!part.IsRoot)
@@ -3398,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
3398 if (part == null) 3398 if (part == null)
3399 return; 3399 return;
3400 3400
3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation(); 3401 Vector3 targetPos = part.GetWorldPosition() + offset * part.GetWorldRotation();
3402 if(!CanEnterLandPosition(targetPos)) 3402 if(!CanEnterLandPosition(targetPos))
3403 { 3403 {
3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot"); 3404 ControllingClient.SendAlertMessage(" Sit position on restricted land, try another spot");
@@ -3530,7 +3530,7 @@ namespace OpenSim.Region.Framework.Scenes
3530 else 3530 else
3531 { 3531 {
3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3532 m = r.X * r.X + r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3533 3533
3534 if (Math.Abs(1.0 - m) > 0.000001) 3534 if (Math.Abs(1.0 - m) > 0.000001)
3535 { 3535 {
3536 if(m != 0) 3536 if(m != 0)
@@ -3554,7 +3554,7 @@ namespace OpenSim.Region.Framework.Scenes
3554 x = 2 * (r.X * r.Z + r.Y * r.W); 3554 x = 2 * (r.X * r.Z + r.Y * r.W);
3555 y = 2 * (-r.X * r.W + r.Y * r.Z); 3555 y = 2 * (-r.X * r.W + r.Y * r.Z);
3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W; 3556 z = -r.X * r.X - r.Y * r.Y + r.Z * r.Z + r.W * r.W;
3557 Vector3 up = new Vector3((float)x, (float)y, (float)z); 3557 Vector3 up = new Vector3((float)x, (float)y, (float)z);
3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f; 3558 sitOffset = up * Appearance.AvatarHeight * 0.02638f;
3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; 3559 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT;
3560 } 3560 }
@@ -3670,7 +3670,7 @@ namespace OpenSim.Region.Framework.Scenes
3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false) 3670 public void AddNewMovement(Vector3 vec, float thisAddSpeedModifier = 1, bool breaking = false)
3671 { 3671 {
3672 // m_log.DebugFormat( 3672 // m_log.DebugFormat(
3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}", 3673 // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1}, thisAddSpeedModifier {2} for {3}",
3674 // vec, Rotation, thisAddSpeedModifier, Name); 3674 // vec, Rotation, thisAddSpeedModifier, Name);
3675 3675
3676 // rotate from avatar coord space to world 3676 // rotate from avatar coord space to world
@@ -3792,11 +3792,11 @@ namespace OpenSim.Region.Framework.Scenes
3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE || 3792 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE ||
3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE || 3793 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE ||
3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE || 3794 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE ||
3795 3795
3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE || 3796 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE ||
3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE || 3797 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE ||
3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE) 3798 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE)
3799 && vel.LengthSquared() < LOWVELOCITYSQ 3799 && vel.LengthSquared() < LOWVELOCITYSQ
3800 )) 3800 ))
3801 { 3801 {
3802*/ 3802*/
@@ -3833,7 +3833,7 @@ namespace OpenSim.Region.Framework.Scenes
3833 } 3833 }
3834 3834
3835 // this is diferente from SendTerseUpdateToClient 3835 // this is diferente from SendTerseUpdateToClient
3836 // this sends bypassing entities updates 3836 // this sends bypassing entities updates
3837 public void SendAgentTerseUpdate(ISceneEntity p) 3837 public void SendAgentTerseUpdate(ISceneEntity p)
3838 { 3838 {
3839 ControllingClient.SendAgentTerseUpdate(p); 3839 ControllingClient.SendAgentTerseUpdate(p);
@@ -3982,7 +3982,7 @@ namespace OpenSim.Region.Framework.Scenes
3982 3982
3983 p.SendAppearanceToAgentNF(this); 3983 p.SendAppearanceToAgentNF(this);
3984 p.SendAnimPackToAgentNF(this); 3984 p.SendAnimPackToAgentNF(this);
3985 p.SendAttachmentsToAgentNF(this); 3985 p.SendAttachmentsToAgentNF(this);
3986 count++; 3986 count++;
3987 }); 3987 });
3988 3988
@@ -3991,7 +3991,7 @@ namespace OpenSim.Region.Framework.Scenes
3991 3991
3992 /// <summary> 3992 /// <summary>
3993 /// Send this agent's avatar data to all other root and child agents in the scene 3993 /// Send this agent's avatar data to all other root and child agents in the scene
3994 /// This agent must be root. This avatar will receive its own update. 3994 /// This agent must be root. This avatar will receive its own update.
3995 /// </summary> 3995 /// </summary>
3996 public void SendAvatarDataToAllAgents() 3996 public void SendAvatarDataToAllAgents()
3997 { 3997 {
@@ -4222,7 +4222,7 @@ namespace OpenSim.Region.Framework.Scenes
4222 posLastMove = pos; 4222 posLastMove = pos;
4223 m_scene.EventManager.TriggerOnClientMovement(this); 4223 m_scene.EventManager.TriggerOnClientMovement(this);
4224 } 4224 }
4225 4225
4226 diff = pos - posLastSignificantMove; 4226 diff = pos - posLastSignificantMove;
4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT) 4227 if (diff.LengthSquared() > SIGNIFICANT_MOVEMENT)
4228 { 4228 {
@@ -4235,18 +4235,18 @@ namespace OpenSim.Region.Framework.Scenes
4235 4235
4236 if(childUpdatesBusy) 4236 if(childUpdatesBusy)
4237 return; 4237 return;
4238 4238
4239 //possible KnownRegionHandles always contains current region and this check is not needed 4239 //possible KnownRegionHandles always contains current region and this check is not needed
4240 int minhandles = 0; 4240 int minhandles = 0;
4241 if(KnownRegionHandles.Contains(RegionHandle)) 4241 if(KnownRegionHandles.Contains(RegionHandle))
4242 minhandles++; 4242 minhandles++;
4243 4243
4244 if(KnownRegionHandles.Count > minhandles) 4244 if(KnownRegionHandles.Count > minhandles)
4245 { 4245 {
4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime); 4246 int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime);
4247 if(tdiff > CHILDUPDATES_TIME) 4247 if(tdiff > CHILDUPDATES_TIME)
4248 { 4248 {
4249 diff = pos - m_lastChildAgentUpdatePosition; 4249 diff = pos - m_lastChildAgentUpdatePosition;
4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT) 4250 if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT)
4251 { 4251 {
4252 childUpdatesBusy = true; 4252 childUpdatesBusy = true;
@@ -4268,7 +4268,7 @@ namespace OpenSim.Region.Framework.Scenes
4268 Util.FireAndForget( 4268 Util.FireAndForget(
4269 o => 4269 o =>
4270 { 4270 {
4271 m_scene.SendOutChildAgentUpdates(agentpos, this); 4271 m_scene.SendOutChildAgentUpdates(agentpos, this);
4272 lastChildUpdatesTime = Util.EnvironmentTickCount(); 4272 lastChildUpdatesTime = Util.EnvironmentTickCount();
4273 childUpdatesBusy = false; 4273 childUpdatesBusy = false;
4274 }, null, "ScenePresence.SendOutChildAgentUpdates"); 4274 }, null, "ScenePresence.SendOutChildAgentUpdates");
@@ -4309,7 +4309,7 @@ namespace OpenSim.Region.Framework.Scenes
4309 pos2.Z += vel.Z * timeStep; 4309 pos2.Z += vel.Z * timeStep;
4310 4310
4311// m_log.DebugFormat( 4311// m_log.DebugFormat(
4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", 4312// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
4313// pos2, Name, Scene.Name); 4313// pos2, Name, Scene.Name);
4314 4314
4315 if (Scene.PositionIsInCurrentRegion(pos2)) 4315 if (Scene.PositionIsInCurrentRegion(pos2))
@@ -4399,7 +4399,7 @@ namespace OpenSim.Region.Framework.Scenes
4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); 4399 // m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);
4400 4400
4401 // Put the child agent back at the center 4401 // Put the child agent back at the center
4402 AbsolutePosition 4402 AbsolutePosition
4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70); 4403 = new Vector3(((float)m_scene.RegionInfo.RegionSizeX * 0.5f), ((float)m_scene.RegionInfo.RegionSizeY * 0.5f), 70);
4404 4404
4405 Animator.ResetAnimations(); 4405 Animator.ResetAnimations();
@@ -4511,7 +4511,7 @@ namespace OpenSim.Region.Framework.Scenes
4511 public void GrantGodlikePowers(UUID token, bool godStatus) 4511 public void GrantGodlikePowers(UUID token, bool godStatus)
4512 { 4512 {
4513 int oldgodlevel = GodLevel; 4513 int oldgodlevel = GodLevel;
4514 4514
4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) 4515 if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID))
4516 { 4516 {
4517 GodLevel = 200; 4517 GodLevel = 200;
@@ -4519,7 +4519,7 @@ namespace OpenSim.Region.Framework.Scenes
4519 GodLevel = UserLevel; 4519 GodLevel = UserLevel;
4520 } 4520 }
4521 else 4521 else
4522 GodLevel = 0; 4522 GodLevel = 0;
4523 4523
4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel); 4524 ControllingClient.SendAdminResponse(token, (uint)GodLevel);
4525 if(oldgodlevel != GodLevel) 4525 if(oldgodlevel != GodLevel)
@@ -4535,7 +4535,7 @@ namespace OpenSim.Region.Framework.Scenes
4535 return; 4535 return;
4536 4536
4537 CopyFrom(cAgentData); 4537 CopyFrom(cAgentData);
4538 4538
4539 } 4539 }
4540 4540
4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f); 4541 private static Vector3 marker = new Vector3(-1f, -1f, -1f);
@@ -4621,7 +4621,7 @@ namespace OpenSim.Region.Framework.Scenes
4621 4621
4622 cAgent.Far = DrawDistance; 4622 cAgent.Far = DrawDistance;
4623 4623
4624 // Throttles 4624 // Throttles
4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1); 4625 cAgent.Throttles = ControllingClient.GetThrottlesPacked(1);
4626 4626
4627 cAgent.HeadRotation = m_headrotation; 4627 cAgent.HeadRotation = m_headrotation;
@@ -4630,7 +4630,7 @@ namespace OpenSim.Region.Framework.Scenes
4630 4630
4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4631 if (GodLevel > 200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4632 cAgent.GodLevel = (byte)GodLevel; 4632 cAgent.GodLevel = (byte)GodLevel;
4633 else 4633 else
4634 cAgent.GodLevel = (byte) 0; 4634 cAgent.GodLevel = (byte) 0;
4635 4635
4636 cAgent.AlwaysRun = SetAlwaysRun; 4636 cAgent.AlwaysRun = SetAlwaysRun;
@@ -4640,7 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes
4640 4640
4641 cAgent.ParentPart = ParentUUID; 4641 cAgent.ParentPart = ParentUUID;
4642 cAgent.SitOffset = PrevSitOffset; 4642 cAgent.SitOffset = PrevSitOffset;
4643 4643
4644 lock (scriptedcontrols) 4644 lock (scriptedcontrols)
4645 { 4645 {
4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count]; 4646 ControllerData[] controls = new ControllerData[scriptedcontrols.Count];
@@ -4675,7 +4675,7 @@ namespace OpenSim.Region.Framework.Scenes
4675 cAgent.CrossingFlags |= 1; 4675 cAgent.CrossingFlags |= 1;
4676 } 4676 }
4677 else 4677 else
4678 cAgent.CrossingFlags = 0; 4678 cAgent.CrossingFlags = 0;
4679 4679
4680 if(isCrossUpdate) 4680 if(isCrossUpdate)
4681 { 4681 {
@@ -4708,7 +4708,7 @@ namespace OpenSim.Region.Framework.Scenes
4708 PrevSitOffset = cAgent.SitOffset; 4708 PrevSitOffset = cAgent.SitOffset;
4709 4709
4710 // When we get to the point of re-computing neighbors everytime this 4710 // When we get to the point of re-computing neighbors everytime this
4711 // changes, then start using the agent's drawdistance rather than the 4711 // changes, then start using the agent's drawdistance rather than the
4712 // region's draw distance. 4712 // region's draw distance.
4713 DrawDistance = cAgent.Far; 4713 DrawDistance = cAgent.Far;
4714 //DrawDistance = Scene.DefaultDrawDistance; 4714 //DrawDistance = Scene.DefaultDrawDistance;
@@ -4727,7 +4727,7 @@ namespace OpenSim.Region.Framework.Scenes
4727 4727
4728 m_headrotation = cAgent.HeadRotation; 4728 m_headrotation = cAgent.HeadRotation;
4729 Rotation = cAgent.BodyRotation; 4729 Rotation = cAgent.BodyRotation;
4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; 4730 m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags;
4731 4731
4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID)) 4732 if (cAgent.GodLevel >200 && m_scene.Permissions.IsGod(cAgent.AgentID))
4733 GodLevel = cAgent.GodLevel; 4733 GodLevel = cAgent.GodLevel;
@@ -4738,14 +4738,14 @@ namespace OpenSim.Region.Framework.Scenes
4738 4738
4739 Appearance = new AvatarAppearance(cAgent.Appearance); 4739 Appearance = new AvatarAppearance(cAgent.Appearance);
4740/* 4740/*
4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); 4741 bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
4742 4742
4743 if (PhysicsActor != null) 4743 if (PhysicsActor != null)
4744 { 4744 {
4745 RemoveFromPhysicalScene(); 4745 RemoveFromPhysicalScene();
4746 AddToPhysicalScene(isFlying); 4746 AddToPhysicalScene(isFlying);
4747 } 4747 }
4748*/ 4748*/
4749 try 4749 try
4750 { 4750 {
4751 lock (scriptedcontrols) 4751 lock (scriptedcontrols)
@@ -4800,7 +4800,7 @@ namespace OpenSim.Region.Framework.Scenes
4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID; 4800 ControllingClient.ActiveGroupId = cAgent.ActiveGroupID;
4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName; 4801 ControllingClient.ActiveGroupName = cAgent.ActiveGroupName;
4802 Grouptitle = cAgent.ActiveGroupTitle; 4802 Grouptitle = cAgent.ActiveGroupTitle;
4803 ControllingClient.ActiveGroupPowers = 4803 ControllingClient.ActiveGroupPowers =
4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID); 4804 ControllingClient.GetGroupPowers(cAgent.ActiveGroupID);
4805 } 4805 }
4806 else 4806 else
@@ -4871,7 +4871,7 @@ namespace OpenSim.Region.Framework.Scenes
4871// m_forceToApplyValid = false; 4871// m_forceToApplyValid = false;
4872 4872
4873 PhysicsScene scene = m_scene.PhysicsScene; 4873 PhysicsScene scene = m_scene.PhysicsScene;
4874 Vector3 pVec = AbsolutePosition; 4874 Vector3 pVec = AbsolutePosition;
4875 4875
4876 PhysicsActor = scene.AddAvatar( 4876 PhysicsActor = scene.AddAvatar(
4877 LocalId, Firstname + "." + Lastname, pVec, 4877 LocalId, Firstname + "." + Lastname, pVec,
@@ -5007,7 +5007,7 @@ namespace OpenSim.Region.Framework.Scenes
5007 } 5007 }
5008 else 5008 else
5009 { 5009 {
5010 5010
5011 } 5011 }
5012 } 5012 }
5013 5013
@@ -5040,13 +5040,13 @@ namespace OpenSim.Region.Framework.Scenes
5040 { 5040 {
5041 // Clear known regions 5041 // Clear known regions
5042 KnownRegions = new Dictionary<ulong, string>(); 5042 KnownRegions = new Dictionary<ulong, string>();
5043 5043
5044 // I don't get it but mono crashes when you try to dispose of this timer, 5044 // I don't get it but mono crashes when you try to dispose of this timer,
5045 // unsetting the elapsed callback should be enough to allow for cleanup however. 5045 // unsetting the elapsed callback should be enough to allow for cleanup however.
5046 // m_reprioritizationTimer.Dispose(); 5046 // m_reprioritizationTimer.Dispose();
5047 5047
5048 RemoveFromPhysicalScene(); 5048 RemoveFromPhysicalScene();
5049 5049
5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; 5050 m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd;
5051 RemoveClientEvents(); 5051 RemoveClientEvents();
5052 5052
@@ -5106,7 +5106,7 @@ namespace OpenSim.Region.Framework.Scenes
5106 } 5106 }
5107 } 5107 }
5108 } 5108 }
5109 5109
5110 return attachments; 5110 return attachments;
5111 } 5111 }
5112 5112
@@ -5269,7 +5269,7 @@ namespace OpenSim.Region.Framework.Scenes
5269 foreach (SceneObjectGroup sog in m_attachments) 5269 foreach (SceneObjectGroup sog in m_attachments)
5270 { 5270 {
5271 SendAttachmentFullUpdateToAgentNF(sog, p); 5271 SendAttachmentFullUpdateToAgentNF(sog, p);
5272 } 5272 }
5273 } 5273 }
5274 } 5274 }
5275 5275
@@ -5689,14 +5689,14 @@ namespace OpenSim.Region.Framework.Scenes
5689 return; 5689 return;
5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects 5690 if(objectID == m_scene.RegionInfo.RegionID) // for all objects
5691 { 5691 {
5692 5692
5693 } 5693 }
5694 else 5694 else
5695 { 5695 {
5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); 5696 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
5697 if(part != null) 5697 if(part != null)
5698 { 5698 {
5699 5699
5700 } 5700 }
5701 } 5701 }
5702 } 5702 }
@@ -5759,7 +5759,7 @@ namespace OpenSim.Region.Framework.Scenes
5759 return; 5759 return;
5760 5760
5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO; 5761 ScriptControlled allflags = ScriptControlled.CONTROL_ZERO;
5762 5762
5763 if (MouseDown) 5763 if (MouseDown)
5764 { 5764 {
5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON); 5765 allflags = LastCommands & (ScriptControlled.CONTROL_ML_LBUTTON | ScriptControlled.CONTROL_LBUTTON);
@@ -5769,35 +5769,35 @@ namespace OpenSim.Region.Framework.Scenes
5769 MouseDown = true; 5769 MouseDown = true;
5770 } 5770 }
5771 } 5771 }
5772 5772
5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0) 5773 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_ML_LBUTTON_DOWN) != 0)
5774 { 5774 {
5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON; 5775 allflags |= ScriptControlled.CONTROL_ML_LBUTTON;
5776 MouseDown = true; 5776 MouseDown = true;
5777 } 5777 }
5778 5778
5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0) 5779 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0)
5780 { 5780 {
5781 allflags |= ScriptControlled.CONTROL_LBUTTON; 5781 allflags |= ScriptControlled.CONTROL_LBUTTON;
5782 MouseDown = true; 5782 MouseDown = true;
5783 } 5783 }
5784 5784
5785 // find all activated controls, whether the scripts are interested in them or not 5785 // find all activated controls, whether the scripts are interested in them or not
5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0) 5786 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) != 0)
5787 { 5787 {
5788 allflags |= ScriptControlled.CONTROL_FWD; 5788 allflags |= ScriptControlled.CONTROL_FWD;
5789 } 5789 }
5790 5790
5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0) 5791 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) != 0)
5792 { 5792 {
5793 allflags |= ScriptControlled.CONTROL_BACK; 5793 allflags |= ScriptControlled.CONTROL_BACK;
5794 } 5794 }
5795 5795
5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0) 5796 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS) != 0)
5797 { 5797 {
5798 allflags |= ScriptControlled.CONTROL_UP; 5798 allflags |= ScriptControlled.CONTROL_UP;
5799 } 5799 }
5800 5800
5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0) 5801 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)
5802 { 5802 {
5803 allflags |= ScriptControlled.CONTROL_DOWN; 5803 allflags |= ScriptControlled.CONTROL_DOWN;
@@ -5807,17 +5807,17 @@ namespace OpenSim.Region.Framework.Scenes
5807 { 5807 {
5808 allflags |= ScriptControlled.CONTROL_LEFT; 5808 allflags |= ScriptControlled.CONTROL_LEFT;
5809 } 5809 }
5810 5810
5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0) 5811 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) != 0 || (flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) != 0)
5812 { 5812 {
5813 allflags |= ScriptControlled.CONTROL_RIGHT; 5813 allflags |= ScriptControlled.CONTROL_RIGHT;
5814 } 5814 }
5815 5815
5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) 5816 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)
5817 { 5817 {
5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT; 5818 allflags |= ScriptControlled.CONTROL_ROT_RIGHT;
5819 } 5819 }
5820 5820
5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) 5821 if ((flags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)
5822 { 5822 {
5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT; 5823 allflags |= ScriptControlled.CONTROL_ROT_LEFT;
@@ -5830,7 +5830,7 @@ namespace OpenSim.Region.Framework.Scenes
5830 { 5830 {
5831 UUID scriptUUID = kvp.Key; 5831 UUID scriptUUID = kvp.Key;
5832 ScriptControllers scriptControlData = kvp.Value; 5832 ScriptControllers scriptControlData = kvp.Value;
5833 5833
5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us 5834 ScriptControlled localHeld = allflags & scriptControlData.eventControls; // the flags interesting for us
5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle 5835 ScriptControlled localLast = LastCommands & scriptControlData.eventControls; // the activated controls in the last cycle
5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits 5836 ScriptControlled localChange = localHeld ^ localLast; // the changed bits
@@ -5842,7 +5842,7 @@ namespace OpenSim.Region.Framework.Scenes
5842 } 5842 }
5843 } 5843 }
5844 } 5844 }
5845 5845
5846 LastCommands = allflags; 5846 LastCommands = allflags;
5847 } 5847 }
5848 } 5848 }
@@ -5885,7 +5885,7 @@ namespace OpenSim.Region.Framework.Scenes
5885 } 5885 }
5886 5886
5887 // returns true it local teleport allowed and sets the destiny position into pos 5887 // returns true it local teleport allowed and sets the destiny position into pos
5888 5888
5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos) 5889 private bool CheckLocalTPLandingPoint(ref Vector3 pos)
5890 { 5890 {
5891 // Never constrain lures 5891 // Never constrain lures
@@ -5930,7 +5930,7 @@ namespace OpenSim.Region.Framework.Scenes
5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot); 5930 spawnPos = spawnPoints[0].GetLocation(hubPos, hubRot);
5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos); 5931 spawnDistSQ = Vector3.DistanceSquared(spawnPos, pos);
5932 5932
5933 float testDistSQ; 5933 float testDistSQ;
5934 Vector3 testSpawnPos; 5934 Vector3 testSpawnPos;
5935 for(int i = 1; i< spawnPoints.Length; i++) 5935 for(int i = 1; i< spawnPoints.Length; i++)
5936 { 5936 {
@@ -5960,7 +5960,7 @@ namespace OpenSim.Region.Framework.Scenes
5960 5960
5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 5961 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
5962 5962
5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint 5963 if (land.LandData.LandingType != (byte)LandingType.LandingPoint
5964 || land.LandData.OwnerID == m_uuid) 5964 || land.LandData.OwnerID == m_uuid)
5965 return true; 5965 return true;
5966 5966
@@ -5978,7 +5978,7 @@ namespace OpenSim.Region.Framework.Scenes
5978 return true; 5978 return true;
5979 } 5979 }
5980 5980
5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin 5981 const TeleportFlags TeleHubTPFlags = TeleportFlags.ViaLogin
5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation; 5982 | TeleportFlags.ViaHGLogin | TeleportFlags.ViaLocation;
5983 5983
5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged) 5984 private bool CheckAndAdjustTelehub(SceneObjectGroup telehub, ref Vector3 pos, ref bool positionChanged)
@@ -6011,7 +6011,7 @@ namespace OpenSim.Region.Framework.Scenes
6011 bool selected = false; 6011 bool selected = false;
6012 bool validhub = false; 6012 bool validhub = false;
6013 Vector3 spawnPosition; 6013 Vector3 spawnPosition;
6014 6014
6015 Quaternion teleHubRotation = telehub.GroupRotation; 6015 Quaternion teleHubRotation = telehub.GroupRotation;
6016 6016
6017 switch(m_scene.SpawnPointRouting) 6017 switch(m_scene.SpawnPointRouting)
@@ -6033,14 +6033,14 @@ namespace OpenSim.Region.Framework.Scenes
6033 6033
6034 if(tries <= 0) 6034 if(tries <= 0)
6035 goto case "sequence"; 6035 goto case "sequence";
6036 6036
6037 pos = spawnPosition; 6037 pos = spawnPosition;
6038 return true; 6038 return true;
6039 6039
6040 case "sequence": 6040 case "sequence":
6041 tries = spawnPoints.Length; 6041 tries = spawnPoints.Length;
6042 selected = false; 6042 selected = false;
6043 validhub = false; 6043 validhub = false;
6044 do 6044 do
6045 { 6045 {
6046 index = m_scene.SpawnPoint(); 6046 index = m_scene.SpawnPoint();
@@ -6092,7 +6092,7 @@ namespace OpenSim.Region.Framework.Scenes
6092 closest = i; 6092 closest = i;
6093 } 6093 }
6094 6094
6095 if(!validhub) 6095 if(!validhub)
6096 return false; 6096 return false;
6097 6097
6098 if(closest < 0) 6098 if(closest < 0)
@@ -6437,28 +6437,28 @@ namespace OpenSim.Region.Framework.Scenes
6437 } 6437 }
6438 6438
6439 private void TeleportFlagsDebug() { 6439 private void TeleportFlagsDebug() {
6440 6440
6441 // Some temporary debugging help to show all the TeleportFlags we have... 6441 // Some temporary debugging help to show all the TeleportFlags we have...
6442 bool HG = false; 6442 bool HG = false;
6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin) 6443 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin)
6444 HG = true; 6444 HG = true;
6445 6445
6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6446 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6447 6447
6448 uint i = 0u; 6448 uint i = 0u;
6449 for (int x = 0; x <= 30 ; x++, i = 1u << x) 6449 for (int x = 0; x <= 30 ; x++, i = 1u << x)
6450 { 6450 {
6451 i = 1u << x; 6451 i = 1u << x;
6452 6452
6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i) 6453 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
6454 if (HG == false) 6454 if (HG == false)
6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString()); 6455 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
6456 else 6456 else
6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString()); 6457 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
6458 } 6458 }
6459 6459
6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************"); 6460 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
6461 6461
6462 } 6462 }
6463 6463
6464 private void parcelGodCheck(UUID currentParcelID, bool isGod) 6464 private void parcelGodCheck(UUID currentParcelID, bool isGod)
@@ -6509,7 +6509,7 @@ namespace OpenSim.Region.Framework.Scenes
6509 6509
6510 // those on not on parcel see me 6510 // those on not on parcel see me
6511 if (currentParcelID != p.currentParcelUUID) 6511 if (currentParcelID != p.currentParcelUUID)
6512 { 6512 {
6513 viewsToSendto.Add(p); // they see me 6513 viewsToSendto.Add(p); // they see me
6514 } 6514 }
6515 } 6515 }
@@ -6584,7 +6584,7 @@ namespace OpenSim.Region.Framework.Scenes
6584 } 6584 }
6585 } 6585 }
6586 allpresences.Clear(); 6586 allpresences.Clear();
6587 } // now on a private parcel end 6587 } // now on a private parcel end
6588 6588
6589 else 6589 else
6590 { 6590 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
index cae7fe5..e7b09ea 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresenceStateMachine.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Framework.Scenes
40 /// Running => PreRemove, Removing 40 /// Running => PreRemove, Removing
41 /// PreRemove => Running, Removing 41 /// PreRemove => Running, Removing
42 /// Removing => Removed 42 /// Removing => Removed
43 /// 43 ///
44 /// All other methods should only see the scene presence in running state - this is the normal operational state 44 /// All other methods should only see the scene presence in running state - this is the normal operational state
45 /// Removed state occurs when the presence has been removed. This is the end state with no exit. 45 /// Removed state occurs when the presence has been removed. This is the end state with no exit.
46 /// </remarks> 46 /// </remarks>
@@ -89,13 +89,13 @@ namespace OpenSim.Region.Framework.Scenes
89 else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running) 89 else if (newState == ScenePresenceState.PreRemove && m_state == ScenePresenceState.Running)
90 transitionOkay = true; 90 transitionOkay = true;
91 else if (newState == ScenePresenceState.Removing) 91 else if (newState == ScenePresenceState.Removing)
92 { 92 {
93 if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove) 93 if (m_state == ScenePresenceState.Running || m_state == ScenePresenceState.PreRemove)
94 transitionOkay = true; 94 transitionOkay = true;
95 } 95 }
96 else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing) 96 else if (newState == ScenePresenceState.Removed && m_state == ScenePresenceState.Removing)
97 transitionOkay = true; 97 transitionOkay = true;
98 } 98 }
99 99
100 if (!transitionOkay) 100 if (!transitionOkay)
101 { 101 {
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index 998789d..7f7977e 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -68,54 +68,54 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
68 /// </param> 68 /// </param>
69 /// <returns></returns> 69 /// <returns></returns>
70 public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates) 70 public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates)
71 { 71 {
72 using (StringWriter sw = new StringWriter()) 72 using (StringWriter sw = new StringWriter())
73 { 73 {
74 using (XmlTextWriter writer = new XmlTextWriter(sw)) 74 using (XmlTextWriter writer = new XmlTextWriter(sw))
75 { 75 {
76 Vector3 size; 76 Vector3 size;
77 77
78 List<SceneObjectGroup> coaObjects = coa.Objects; 78 List<SceneObjectGroup> coaObjects = coa.Objects;
79 79
80// m_log.DebugFormat( 80// m_log.DebugFormat(
81// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object", 81// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing {0} objects for coalesced object",
82// coaObjects.Count); 82// coaObjects.Count);
83 83
84 // This is weak - we're relying on the set of coalesced objects still being identical 84 // This is weak - we're relying on the set of coalesced objects still being identical
85 Vector3[] offsets = coa.GetSizeAndOffsets(out size); 85 Vector3[] offsets = coa.GetSizeAndOffsets(out size);
86 86
87 writer.WriteStartElement("CoalescedObject"); 87 writer.WriteStartElement("CoalescedObject");
88 88
89 writer.WriteAttributeString("x", size.X.ToString()); 89 writer.WriteAttributeString("x", size.X.ToString());
90 writer.WriteAttributeString("y", size.Y.ToString()); 90 writer.WriteAttributeString("y", size.Y.ToString());
91 writer.WriteAttributeString("z", size.Z.ToString()); 91 writer.WriteAttributeString("z", size.Z.ToString());
92 92
93 // Embed the offsets into the group XML 93 // Embed the offsets into the group XML
94 for (int i = 0; i < coaObjects.Count; i++) 94 for (int i = 0; i < coaObjects.Count; i++)
95 { 95 {
96 SceneObjectGroup obj = coaObjects[i]; 96 SceneObjectGroup obj = coaObjects[i];
97 97
98// m_log.DebugFormat( 98// m_log.DebugFormat(
99// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}", 99// "[COALESCED SCENE OBJECTS SERIALIZER]: Writing offset for object {0}, {1}",
100// i, obj.Name); 100// i, obj.Name);
101 101
102 writer.WriteStartElement("SceneObjectGroup"); 102 writer.WriteStartElement("SceneObjectGroup");
103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString()); 103 writer.WriteAttributeString("offsetx", offsets[i].X.ToString());
104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); 104 writer.WriteAttributeString("offsety", offsets[i].Y.ToString());
105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); 105 writer.WriteAttributeString("offsetz", offsets[i].Z.ToString());
106 106
107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); 107 SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates);
108 108
109 writer.WriteEndElement(); // SceneObjectGroup 109 writer.WriteEndElement(); // SceneObjectGroup
110 } 110 }
111 111
112 writer.WriteEndElement(); // CoalescedObject 112 writer.WriteEndElement(); // CoalescedObject
113 } 113 }
114 114
115 string output = sw.ToString(); 115 string output = sw.ToString();
116 116
117// Console.WriteLine(output); 117// Console.WriteLine(output);
118 118
119 return output; 119 return output;
120 } 120 }
121 } 121 }
@@ -123,14 +123,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa) 123 public static bool TryFromXml(string xml, out CoalescedSceneObjects coa)
124 { 124 {
125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml); 125// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
126 126
127 coa = null; 127 coa = null;
128 128
129 try 129 try
130 { 130 {
131 // Quickly check if this is a coalesced object, without fully parsing the XML 131 // Quickly check if this is a coalesced object, without fully parsing the XML
132 using (StringReader sr = new StringReader(xml)) 132 using (StringReader sr = new StringReader(xml))
133 { 133 {
134 using (XmlTextReader reader = new XmlTextReader(sr)) 134 using (XmlTextReader reader = new XmlTextReader(sr))
135 { 135 {
136 reader.MoveToContent(); // skip possible xml declaration 136 reader.MoveToContent(); // skip possible xml declaration
@@ -138,9 +138,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
138 if (reader.Name != "CoalescedObject") 138 if (reader.Name != "CoalescedObject")
139 { 139 {
140 // m_log.DebugFormat( 140 // m_log.DebugFormat(
141 // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false", 141 // "[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() root element was {0} so returning false",
142 // reader.Name); 142 // reader.Name);
143 143
144 return false; 144 return false;
145 } 145 }
146 } 146 }
@@ -151,12 +151,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); 151 XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject");
152 if (e == null) 152 if (e == null)
153 return false; 153 return false;
154 154
155 coa = new CoalescedSceneObjects(UUID.Zero); 155 coa = new CoalescedSceneObjects(UUID.Zero);
156 156
157 XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); 157 XmlNodeList groups = e.SelectNodes("SceneObjectGroup");
158 int i = 0; 158 int i = 0;
159 159
160 foreach (XmlNode n in groups) 160 foreach (XmlNode n in groups)
161 { 161 {
162 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); 162 SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
@@ -166,10 +166,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
166 } 166 }
167 else 167 else
168 { 168 {
169 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the 169 // XXX: Possibly we should fail outright here rather than continuing if a particular component of the
170 // coalesced object fails to load. 170 // coalesced object fails to load.
171 m_log.WarnFormat( 171 m_log.WarnFormat(
172 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.", 172 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
173 i); 173 i);
174 } 174 }
175 175
@@ -181,8 +181,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
181 m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e); 181 m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e);
182 Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml); 182 Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml);
183 return false; 183 return false;
184 } 184 }
185 185
186 return true; 186 return true;
187 } 187 }
188 } 188 }
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 0b7379b..b8d210c 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
107 part.LinkNum = linkNum; 107 part.LinkNum = linkNum;
108 part.TrimPermissions(); 108 part.TrimPermissions();
109 } 109 }
110 } 110 }
111 while (reader.ReadToNextSibling("Part")); 111 while (reader.ReadToNextSibling("Part"));
112 } 112 }
113 113
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
156 { 156 {
157 ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false); 157 ToOriginalXmlFormat(sceneObject, writer, doScriptStates, false);
158 } 158 }
159 159
160 public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState) 160 public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject, string scriptedState)
161 { 161 {
162 using (StringWriter sw = new StringWriter()) 162 using (StringWriter sw = new StringWriter())
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
190 190
191 if (!noRootElement) 191 if (!noRootElement)
192 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty); 192 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
193 193
194 writer.WriteStartElement(String.Empty, "RootPart", String.Empty); 194 writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
195 ToXmlFormat(sceneObject.RootPart, writer); 195 ToXmlFormat(sceneObject.RootPart, writer);
196 writer.WriteEndElement(); 196 writer.WriteEndElement();
@@ -212,23 +212,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
212 212
213 if (doScriptStates) 213 if (doScriptStates)
214 sceneObject.SaveScriptedState(writer); 214 sceneObject.SaveScriptedState(writer);
215 215
216 if (!noRootElement) 216 if (!noRootElement)
217 writer.WriteEndElement(); // SceneObjectGroup 217 writer.WriteEndElement(); // SceneObjectGroup
218 218
219// m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time); 219// m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0}, {1}ms", sceneObject.Name, System.Environment.TickCount - time);
220 } 220 }
221 221
222 protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer) 222 protected static void ToXmlFormat(SceneObjectPart part, XmlTextWriter writer)
223 { 223 {
224 SOPToXml2(writer, part, new Dictionary<string, object>()); 224 SOPToXml2(writer, part, new Dictionary<string, object>());
225 } 225 }
226 226
227 public static SceneObjectGroup FromXml2Format(string xmlData) 227 public static SceneObjectGroup FromXml2Format(string xmlData)
228 { 228 {
229 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); 229 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG");
230 //int time = System.Environment.TickCount; 230 //int time = System.Environment.TickCount;
231 231
232 try 232 try
233 { 233 {
234 XmlDocument doc = new XmlDocument(); 234 XmlDocument doc = new XmlDocument();
@@ -780,7 +780,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
780 obj.VehicleParams = vehicle; 780 obj.VehicleParams = vehicle;
781 } 781 }
782 } 782 }
783 783
784 private static void ProcessShape(SceneObjectPart obj, XmlReader reader) 784 private static void ProcessShape(SceneObjectPart obj, XmlReader reader)
785 { 785 {
786 List<string> errorNodeNames; 786 List<string> errorNodeNames;
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1235 { 1235 {
1236 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); 1236 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape");
1237 } 1237 }
1238 1238
1239 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader) 1239 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader)
1240 { 1240 {
1241 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); 1241 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture");
@@ -1367,13 +1367,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1367 1367
1368 if (sog.RootPart.KeyframeMotion != null) 1368 if (sog.RootPart.KeyframeMotion != null)
1369 { 1369 {
1370 Byte[] data = sog.RootPart.KeyframeMotion.Serialize(); 1370 Byte[] data = sog.RootPart.KeyframeMotion.Serialize();
1371 1371
1372 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); 1372 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty);
1373 writer.WriteBase64(data, 0, data.Length); 1373 writer.WriteBase64(data, 0, data.Length);
1374 writer.WriteEndElement(); 1374 writer.WriteEndElement();
1375 } 1375 }
1376 1376
1377 1377
1378 writer.WriteEndElement(); 1378 writer.WriteEndElement();
1379 } 1379 }
@@ -1438,7 +1438,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1438 WriteShape(writer, sop.Shape, options); 1438 WriteShape(writer, sop.Shape, options);
1439 1439
1440 WriteVector(writer, "Scale", sop.Scale); 1440 WriteVector(writer, "Scale", sop.Scale);
1441 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation); 1441 WriteQuaternion(writer, "SitTargetOrientation", sop.SitTargetOrientation);
1442 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition); 1442 WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
1443 WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL); 1443 WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
1444 WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL); 1444 WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL);
@@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1472 if (sop.MediaUrl != null) 1472 if (sop.MediaUrl != null)
1473 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1473 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1474 WriteVector(writer, "AttachedPos", sop.AttachedPos); 1474 WriteVector(writer, "AttachedPos", sop.AttachedPos);
1475 1475
1476 if (sop.DynAttrs.CountNamespaces > 0) 1476 if (sop.DynAttrs.CountNamespaces > 0)
1477 { 1477 {
1478 writer.WriteStartElement("DynAttrs"); 1478 writer.WriteStartElement("DynAttrs");
@@ -1520,7 +1520,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1520 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower()); 1520 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower());
1521 } 1521 }
1522 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); 1522 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower());
1523 1523
1524 writer.WriteEndElement(); 1524 writer.WriteEndElement();
1525 } 1525 }
1526 1526
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index c8f525e..bc440fc 100755
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -113,12 +113,12 @@ namespace OpenSim.Region.Framework.Scenes
113 SimSpareMs = 32, 113 SimSpareMs = 32,
114 SimSleepMs = 33, 114 SimSleepMs = 33,
115 SimIoPumpTime = 34, 115 SimIoPumpTime = 34,
116 SimPCTSscriptsRun = 35, 116 SimPCTSscriptsRun = 35,
117 SimRegionIdle = 36, // dataserver only 117 SimRegionIdle = 36, // dataserver only
118 SimRegionIdlePossible = 37, // dataserver only 118 SimRegionIdlePossible = 37, // dataserver only
119 SimAIStepTimeMS = 38, 119 SimAIStepTimeMS = 38,
120 SimSkippedSillouet_PS = 39, 120 SimSkippedSillouet_PS = 39,
121 SimSkippedCharsPerC = 40, 121 SimSkippedCharsPerC = 40,
122 122
123// extra stats IDs irrelevant, just far from viewer defined ones 123// extra stats IDs irrelevant, just far from viewer defined ones
124 SimExtraCountStart = 1000, 124 SimExtraCountStart = 1000,
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes
129 TotalGeoPrim = 1003, 129 TotalGeoPrim = 1003,
130 TotalMesh = 1004, 130 TotalMesh = 1004,
131 ThreadCount = 1005, 131 ThreadCount = 1005,
132 132
133 SimExtraCountEnd = 1006 133 SimExtraCountEnd = 1006
134 } 134 }
135 135
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Framework.Scenes
199 /// </remarks> 199 /// </remarks>
200 private float m_statisticsFPSfactor = 5.0f; 200 private float m_statisticsFPSfactor = 5.0f;
201 private float m_targetFrameTime = 0.1f; 201 private float m_targetFrameTime = 0.1f;
202 // saved last reported value so there is something available for llGetRegionFPS 202 // saved last reported value so there is something available for llGetRegionFPS
203 private float lastReportedSimFPS; 203 private float lastReportedSimFPS;
204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize]; 204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize];
205 private float m_pfps; 205 private float m_pfps;
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Framework.Scenes
336 { 336 {
337 if (!m_scene.Active) 337 if (!m_scene.Active)
338 return; 338 return;
339 339
340 // dont do it if if still been done 340 // dont do it if if still been done
341 341
342 if(Monitor.TryEnter(m_statsLock)) 342 if(Monitor.TryEnter(m_statsLock))
@@ -367,8 +367,8 @@ namespace OpenSim.Region.Framework.Scenes
367 // factor to consider updates integration time 367 // factor to consider updates integration time
368 float updateTimeFactor = 1.0f / updateElapsed; 368 float updateTimeFactor = 1.0f / updateElapsed;
369 369
370 370
371 // scene frame stats 371 // scene frame stats
372 float reportedFPS; 372 float reportedFPS;
373 float physfps; 373 float physfps;
374 float timeDilation; 374 float timeDilation;
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 sleeptime = m_sleeptimeMS; 393 sleeptime = m_sleeptimeMS;
394 scriptTimeMS = m_scriptTimeMS; 394 scriptTimeMS = m_scriptTimeMS;
395 totalFrameTime = m_frameMS; 395 totalFrameTime = m_frameMS;
396 // still not inv 396 // still not inv
397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0); 397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0);
398 398
399 ResetFrameStats(); 399 ResetFrameStats();
@@ -424,10 +424,10 @@ namespace OpenSim.Region.Framework.Scenes
424 } 424 }
425 425
426 // some engines track frame time with error related to the simulation step size 426 // some engines track frame time with error related to the simulation step size
427 if(physfps > reportedFPS) 427 if(physfps > reportedFPS)
428 physfps = reportedFPS; 428 physfps = reportedFPS;
429 429
430 // save the reported value so there is something available for llGetRegionFPS 430 // save the reported value so there is something available for llGetRegionFPS
431 lastReportedSimFPS = reportedFPS; 431 lastReportedSimFPS = reportedFPS;
432 432
433 // scale frame stats 433 // scale frame stats
@@ -461,13 +461,13 @@ namespace OpenSim.Region.Framework.Scenes
461 461
462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code 462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
463 // so that stat numbers are always consistent. 463 // so that stat numbers are always consistent.
464 CheckStatSanity(); 464 CheckStatSanity();
465 465
466 for (int i = 0; i < m_statisticViewerArraySize; i++) 466 for (int i = 0; i < m_statisticViewerArraySize; i++)
467 { 467 {
468 sb[i] = new SimStatsPacket.StatBlock(); 468 sb[i] = new SimStatsPacket.StatBlock();
469 } 469 }
470 470
471 sb[0].StatID = (uint) Stats.TimeDilation; 471 sb[0].StatID = (uint) Stats.TimeDilation;
472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3); 472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3);
473 473
@@ -546,13 +546,13 @@ namespace OpenSim.Region.Framework.Scenes
546 546
547 sb[24].StatID = (uint)Stats.ResidentSizeKb; 547 sb[24].StatID = (uint)Stats.ResidentSizeKb;
548 sb[24].StatValue = 0; 548 sb[24].StatValue = 0;
549 549
550 sb[25].StatID = (uint)Stats.PendingLocalUploads; 550 sb[25].StatID = (uint)Stats.PendingLocalUploads;
551 sb[25].StatValue = 0; 551 sb[25].StatValue = 0;
552 552
553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks; 553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks;
554 sb[26].StatValue = 0; 554 sb[26].StatValue = 0;
555 555
556 sb[27].StatID = (uint)Stats.PhysicsLodTasks; 556 sb[27].StatID = (uint)Stats.PhysicsLodTasks;
557 sb[27].StatValue = 0; 557 sb[27].StatValue = 0;
558 558
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Framework.Scenes
623 sbex[5].StatValue = m_inUseThreads; 623 sbex[5].StatValue = m_inUseThreads;
624 lastReportedSimStats[43] = m_inUseThreads; 624 lastReportedSimStats[43] = m_inUseThreads;
625 625
626 SimStats simStats 626 SimStats simStats
627 = new SimStats( 627 = new SimStats(
628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, 628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity,
629 rb, sb, sbex, m_scene.RegionInfo.originRegionID); 629 rb, sb, sbex, m_scene.RegionInfo.originRegionID);
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Framework.Scenes
643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value; 643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value;
644 644
645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); 645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
646 646
647 if (physicsStats != null) 647 if (physicsStats != null)
648 { 648 {
649 foreach (KeyValuePair<string, float> tuple in physicsStats) 649 foreach (KeyValuePair<string, float> tuple in physicsStats)
@@ -717,7 +717,7 @@ namespace OpenSim.Region.Framework.Scenes
717 717
718 m_FrameStatsTS = Util.GetTimeStampMS(); 718 m_FrameStatsTS = Util.GetTimeStampMS();
719 } 719 }
720 } 720 }
721 721
722 private void ResetFrameStats() 722 private void ResetFrameStats()
723 { 723 {
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 1aa1194..89d78cf 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Region.Framework.Scenes
158 { 158 {
159 if (Double.IsNaN(value) || Double.IsInfinity(value)) 159 if (Double.IsNaN(value) || Double.IsInfinity(value))
160 return; 160 return;
161 161
162 m_terrainData[x, y] = (float)value; 162 m_terrainData[x, y] = (float)value;
163 } 163 }
164 } 164 }
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Framework.Scenes
486 int index = 0; 486 int index = 0;
487 487
488 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); 488 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight);
489 489
490 for (int y = 0; y < Height; y++) 490 for (int y = 0; y < Height; y++)
491 { 491 {
492 for (int x = 0; x < Width; x++) 492 for (int x = 0; x < Width; x++)
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
index fd65735..9d1f815 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
@@ -400,7 +400,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
400 block[k++] = (terrData[x, y] - sub) * premult; 400 block[k++] = (terrData[x, y] - sub) * premult;
401 } 401 }
402 } 402 }
403 403
404 wbits = (prequant >> 1); 404 wbits = (prequant >> 1);
405 405
406 dct16x16(block, iout, ref wbits); 406 dct16x16(block, iout, ref wbits);
@@ -490,22 +490,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
490 #region DCT 490 #region DCT
491 491
492 /* DCT (Discrete Cosine Transform) 492 /* DCT (Discrete Cosine Transform)
493 adaptation from 493 adaptation from
494 General Purpose 2D,3D FFT (Fast Fourier Transform) Package 494 General Purpose 2D,3D FFT (Fast Fourier Transform) Package
495 by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp) 495 by Takuya OOURA (email: ooura@kurims.kyoto-u.ac.jp)
496 496
497 -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT -------- 497 -------- 16x16 DCT (Discrete Cosine Transform) / Inverse of DCT --------
498 [definition] 498 [definition]
499 <case1> Normalized 16x16 IDCT 499 <case1> Normalized 16x16 IDCT
500 C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15 500 C[k1 + k2] = (1/8) * sum_j1=0^15 sum_j2=0^15
501 tmp[j1 + j2] * s[j1] * s[j2] * 501 tmp[j1 + j2] * s[j1] * s[j2] *
502 cos(pi*j1*(k1+1/2)/16) * 502 cos(pi*j1*(k1+1/2)/16) *
503 cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16 503 cos(pi*j2*(k2+1/2)/16), 0<=k1<16, 0<=k2<16
504 (s[0] = 1/sqrt(2), s[j] = 1, j > 0) 504 (s[0] = 1/sqrt(2), s[j] = 1, j > 0)
505 <case2> Normalized 16x16 DCT 505 <case2> Normalized 16x16 DCT
506 C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15 506 C[k1 + k2] = (1/8) * s[k1] * s[k2] * sum_j1=0^15 sum_j2=0^15
507 tmp[j1 + j2] * 507 tmp[j1 + j2] *
508 cos(pi*(j1+1/2)*k1/16) * 508 cos(pi*(j1+1/2)*k1/16) *
509 cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16 509 cos(pi*(j2+1/2)*k2/16), 0<=k1<16, 0<=k2<16
510 (s[0] = 1/sqrt(2), s[j] = 1, j > 0) 510 (s[0] = 1/sqrt(2), s[j] = 1, j > 0)
511 */ 511 */
diff --git a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
index da18941..fa698a9 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/EntityManagerTests.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
50 public void T010_AddObjects() 50 public void T010_AddObjects()
51 { 51 {
52 TestHelpers.InMethod(); 52 TestHelpers.InMethod();
53 53
54 random = new Random(); 54 random = new Random();
55 SceneObjectGroup found; 55 SceneObjectGroup found;
56 EntityManager entman = new EntityManager(); 56 EntityManager entman = new EntityManager();
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
62 UUID obj2 = sog.UUID; 62 UUID obj2 = sog.UUID;
63 uint li2 = sog.LocalId; 63 uint li2 = sog.LocalId;
64 entman.Add(sog); 64 entman.Add(sog);
65 65
66 found = (SceneObjectGroup)entman[obj1]; 66 found = (SceneObjectGroup)entman[obj1];
67 Assert.That(found.UUID ,Is.EqualTo(obj1)); 67 Assert.That(found.UUID ,Is.EqualTo(obj1));
68 found = (SceneObjectGroup)entman[li1]; 68 found = (SceneObjectGroup)entman[li1];
@@ -85,15 +85,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests
85 public void T011_ThreadAddRemoveTest() 85 public void T011_ThreadAddRemoveTest()
86 { 86 {
87 TestHelpers.InMethod(); 87 TestHelpers.InMethod();
88 88
89 // This test adds and removes with mutiple threads, attempting to break the 89 // This test adds and removes with mutiple threads, attempting to break the
90 // uuid and localid dictionary coherence. 90 // uuid and localid dictionary coherence.
91 EntityManager entman = new EntityManager(); 91 EntityManager entman = new EntityManager();
92 SceneObjectGroup sog = NewSOG(); 92 SceneObjectGroup sog = NewSOG();
93 for (int j=0; j<20; j++) 93 for (int j=0; j<20; j++)
94 { 94 {
95 List<Thread> trdlist = new List<Thread>(); 95 List<Thread> trdlist = new List<Thread>();
96 96
97 for (int i=0; i<4; i++) 97 for (int i=0; i<4; i++)
98 { 98 {
99 // Adds scene object 99 // Adds scene object
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
101 Thread start = new Thread(new ThreadStart(test.TestAddSceneObject)); 101 Thread start = new Thread(new ThreadStart(test.TestAddSceneObject));
102 start.Start(); 102 start.Start();
103 trdlist.Add(start); 103 trdlist.Add(start);
104 104
105 // Removes it 105 // Removes it
106 test = new NewTestThreads(entman,sog); 106 test = new NewTestThreads(entman,sog);
107 start = new Thread(new ThreadStart(test.TestRemoveSceneObject)); 107 start = new Thread(new ThreadStart(test.TestRemoveSceneObject));
108 start.Start(); 108 start.Start();
109 trdlist.Add(start); 109 trdlist.Add(start);
110 } 110 }
111 foreach (Thread thread in trdlist) 111 foreach (Thread thread in trdlist)
112 { 112 {
113 thread.Join(); 113 thread.Join();
114 } 114 }
@@ -133,14 +133,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests
133 133
134 SceneObjectGroup sog = new SceneObjectGroup(sop); 134 SceneObjectGroup sog = new SceneObjectGroup(sop);
135 scene.AddNewSceneObject(sog, false); 135 scene.AddNewSceneObject(sog, false);
136 136
137 return sog; 137 return sog;
138 } 138 }
139 139
140 private static string RandomName() 140 private static string RandomName()
141 { 141 {
142 StringBuilder name = new StringBuilder(); 142 StringBuilder name = new StringBuilder();
143 int size = random.Next(40,80); 143 int size = random.Next(40,80);
144 char ch ; 144 char ch ;
145 for (int i=0; i<size; i++) 145 for (int i=0; i<size; i++)
146 { 146 {
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
156 private EntityManager entman; 156 private EntityManager entman;
157 private SceneObjectGroup sog; 157 private SceneObjectGroup sog;
158 private Random random; 158 private Random random;
159 159
160 public NewTestThreads(EntityManager entman, SceneObjectGroup sog) 160 public NewTestThreads(EntityManager entman, SceneObjectGroup sog)
161 { 161 {
162 this.entman = entman; 162 this.entman = entman;
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
index ee7c8a9..56723bf 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs
@@ -55,29 +55,29 @@ namespace OpenSim.Region.Framework.Scenes.Tests
55 UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); 55 UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002");
56 56
57 SceneObjectPart part1 57 SceneObjectPart part1
58 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 58 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
59 { Name = part1Name, UUID = part1Id }; 59 { Name = part1Name, UUID = part1Id };
60 SceneObjectGroup so = new SceneObjectGroup(part1); 60 SceneObjectGroup so = new SceneObjectGroup(part1);
61 SceneObjectPart part2 61 SceneObjectPart part2
62 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 62 = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
63 { Name = part2Name, UUID = part2Id }; 63 { Name = part2Name, UUID = part2Id };
64 so.AddPart(part2); 64 so.AddPart(part2);
65 65
66 scene.AddNewSceneObject(so, false); 66 scene.AddNewSceneObject(so, false);
67 67
68 SceneObjectGroup dupeSo 68 SceneObjectGroup dupeSo
69 = scene.SceneGraph.DuplicateObject( 69 = scene.SceneGraph.DuplicateObject(
70 part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); 70 part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity);
71 Assert.That(dupeSo.Parts.Length, Is.EqualTo(2)); 71 Assert.That(dupeSo.Parts.Length, Is.EqualTo(2));
72 72
73 SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); 73 SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1);
74 SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); 74 SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2);
75 Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); 75 Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId));
76 Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); 76 Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId));
77 77
78 Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); 78 Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags));
79 Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); 79 Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags));
80 80
81 /* 81 /*
82 Assert.That(part1.PhysActor, Is.Not.Null); 82 Assert.That(part1.PhysActor, Is.Not.Null);
83 Assert.That(part2.PhysActor, Is.Not.Null); 83 Assert.That(part2.PhysActor, Is.Not.Null);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index ac8c32d..8961a26 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
99 Assert.That(scene.AddNewSceneObject(so, false), Is.True); 99 Assert.That(scene.AddNewSceneObject(so, false), Is.True);
100 SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID); 100 SceneObjectGroup retrievedSo = scene.GetSceneObjectGroup(so.UUID);
101 SceneObjectPart[] retrievedParts = retrievedSo.Parts; 101 SceneObjectPart[] retrievedParts = retrievedSo.Parts;
102 102
103 //m_log.Debug("retrievedPart : {0}", retrievedPart); 103 //m_log.Debug("retrievedPart : {0}", retrievedPart);
104 // If the parts have the same UUID then we will consider them as one and the same 104 // If the parts have the same UUID then we will consider them as one and the same
105 Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount)); 105 Assert.That(retrievedSo.PrimCount, Is.EqualTo(partsToTestCount));
@@ -126,19 +126,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests
126 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); 126 UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001");
127 127
128 SceneObjectPart part1 128 SceneObjectPart part1
129 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 129 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
130 { Name = obj1Name, UUID = objUuid }; 130 { Name = obj1Name, UUID = objUuid };
131 131
132 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); 132 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True);
133 133
134 SceneObjectPart part2 134 SceneObjectPart part2
135 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 135 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
136 { Name = obj2Name, UUID = objUuid }; 136 { Name = obj2Name, UUID = objUuid };
137 137
138 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False); 138 Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part2), false), Is.False);
139 139
140 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); 140 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid);
141 141
142 //m_log.Debug("retrievedPart : {0}", retrievedPart); 142 //m_log.Debug("retrievedPart : {0}", retrievedPart);
143 // If the parts have the same UUID then we will consider them as one and the same 143 // If the parts have the same UUID then we will consider them as one and the same
144 Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name)); 144 Assert.That(retrievedPart.Name, Is.EqualTo(obj1Name));
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
180 Assert.That(scene.GetGroupByPrim(soid), Is.Null); 180 Assert.That(scene.GetGroupByPrim(soid), Is.Null);
181 Assert.That(scene.GetGroupByPrim(spid), Is.Null); 181 Assert.That(scene.GetGroupByPrim(spid), Is.Null);
182 } 182 }
183 183
184 /// <summary> 184 /// <summary>
185 /// Test deleting an object from a scene. 185 /// Test deleting an object from a scene.
186 /// </summary> 186 /// </summary>
@@ -205,10 +205,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
205 205
206 Assert.That(retrievedPart, Is.Null); 206 Assert.That(retrievedPart, Is.Null);
207 } 207 }
208 208
209 /// <summary> 209 /// <summary>
210 /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not 210 /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not
211 /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by 211 /// in a scene and is useful if one wants to supply a UUID directly rather than use the one generated by
212 /// OpenSim. 212 /// OpenSim.
213 /// </summary> 213 /// </summary>
214 [Test] 214 [Test]
@@ -218,24 +218,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests
218 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 218 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
219 string childPartName = "childPart"; 219 string childPartName = "childPart";
220 UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 220 UUID childPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
221 221
222 SceneObjectPart rootPart 222 SceneObjectPart rootPart
223 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 223 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
224 { Name = rootPartName, UUID = rootPartUuid }; 224 { Name = rootPartName, UUID = rootPartUuid };
225 SceneObjectPart linkPart 225 SceneObjectPart linkPart
226 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 226 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
227 { Name = childPartName, UUID = childPartUuid }; 227 { Name = childPartName, UUID = childPartUuid };
228 228
229 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 229 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
230 sog.AddPart(linkPart); 230 sog.AddPart(linkPart);
231 231
232 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); 232 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid));
233 Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid)); 233 Assert.That(sog.RootPart.UUID, Is.EqualTo(rootPartUuid));
234 Assert.That(sog.Parts.Length, Is.EqualTo(2)); 234 Assert.That(sog.Parts.Length, Is.EqualTo(2));
235 235
236 UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002"); 236 UUID newRootPartUuid = new UUID("00000000-0000-0000-0000-000000000002");
237 sog.UUID = newRootPartUuid; 237 sog.UUID = newRootPartUuid;
238 238
239 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); 239 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid));
240 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); 240 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid));
241 Assert.That(sog.Parts.Length, Is.EqualTo(2)); 241 Assert.That(sog.Parts.Length, Is.EqualTo(2));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
index dc3b717..c27bc1a 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCopyTests.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
87 87
88 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 88 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
89 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 89 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
90 sogd.Enabled = false; 90 sogd.Enabled = false;
91 91
92 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); 92 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID);
93 uint soLocalId = so.LocalId; 93 uint soLocalId = so.LocalId;
@@ -119,11 +119,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
119 119
120 // Check that object is still there. 120 // Check that object is still there.
121 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 121 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
122 Assert.That(retrievedPart2, Is.Not.Null); 122 Assert.That(retrievedPart2, Is.Not.Null);
123 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 123 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
124 124
125 // Check that we have a copy in inventory 125 // Check that we have a copy in inventory
126 InventoryItemBase item 126 InventoryItemBase item
127 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); 127 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1");
128 Assert.That(item, Is.Not.Null); 128 Assert.That(item, Is.Not.Null);
129 } 129 }
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
145 145
146 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 146 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
147 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 147 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
148 sogd.Enabled = false; 148 sogd.Enabled = false;
149 149
150 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID); 150 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", ua.PrincipalID);
151 uint soLocalId = so.LocalId; 151 uint soLocalId = so.LocalId;
@@ -168,11 +168,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
168 168
169 // Check that object is still there. 169 // Check that object is still there.
170 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 170 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
171 Assert.That(retrievedPart2, Is.Not.Null); 171 Assert.That(retrievedPart2, Is.Not.Null);
172 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 172 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
173 173
174 // Check that we do not have a copy in inventory 174 // Check that we do not have a copy in inventory
175 InventoryItemBase item 175 InventoryItemBase item
176 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1"); 176 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Lost And Found/so1");
177 Assert.That(item, Is.Null); 177 Assert.That(item, Is.Null);
178 } 178 }
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
194 194
195 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 195 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
196 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 196 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
197 sogd.Enabled = false; 197 sogd.Enabled = false;
198 198
199 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); 199 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2));
200 uint soLocalId = so.LocalId; 200 uint soLocalId = so.LocalId;
@@ -219,11 +219,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
219 219
220 // Check that object is still there. 220 // Check that object is still there.
221 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 221 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
222 Assert.That(retrievedPart2, Is.Not.Null); 222 Assert.That(retrievedPart2, Is.Not.Null);
223 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 223 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
224 224
225 // Check that we have a copy in inventory 225 // Check that we have a copy in inventory
226 InventoryItemBase item 226 InventoryItemBase item
227 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 227 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
228 Assert.That(item, Is.Not.Null); 228 Assert.That(item, Is.Not.Null);
229 } 229 }
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
245 245
246 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 246 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
247 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 247 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
248 sogd.Enabled = false; 248 sogd.Enabled = false;
249 249
250 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2)); 250 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", TestHelpers.ParseTail(0x2));
251 uint soLocalId = so.LocalId; 251 uint soLocalId = so.LocalId;
@@ -272,11 +272,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
272 sogd.InventoryDeQueueAndDelete(); 272 sogd.InventoryDeQueueAndDelete();
273 // Check that object is still there. 273 // Check that object is still there.
274 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 274 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
275 Assert.That(retrievedPart2, Is.Not.Null); 275 Assert.That(retrievedPart2, Is.Not.Null);
276 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 276 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
277 277
278 // Check that we have a copy in inventory 278 // Check that we have a copy in inventory
279 InventoryItemBase item 279 InventoryItemBase item
280 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 280 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
281 Assert.That(item, Is.Null); 281 Assert.That(item, Is.Null);
282 } 282 }
@@ -303,11 +303,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
303 sogd.InventoryDeQueueAndDelete(); 303 sogd.InventoryDeQueueAndDelete();
304 // Check that object is still there. 304 // Check that object is still there.
305 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 305 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
306 Assert.That(retrievedPart2, Is.Not.Null); 306 Assert.That(retrievedPart2, Is.Not.Null);
307 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 307 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
308 308
309 // Check that we have a copy in inventory 309 // Check that we have a copy in inventory
310 InventoryItemBase item 310 InventoryItemBase item
311 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 311 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
312 Assert.That(item, Is.Null); 312 Assert.That(item, Is.Null);
313 } 313 }
@@ -334,11 +334,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
334 sogd.InventoryDeQueueAndDelete(); 334 sogd.InventoryDeQueueAndDelete();
335 // Check that object is still there. 335 // Check that object is still there.
336 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 336 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
337 Assert.That(retrievedPart2, Is.Not.Null); 337 Assert.That(retrievedPart2, Is.Not.Null);
338 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0)); 338 Assert.That(client.ReceivedKills.Count, Is.EqualTo(0));
339 339
340 // Check that we have a copy in inventory 340 // Check that we have a copy in inventory
341 InventoryItemBase item 341 InventoryItemBase item
342 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1"); 342 = UserInventoryHelpers.GetInventoryItem(scene.InventoryService, ua.PrincipalID, "Objects/so1");
343 Assert.That(item, Is.Null); 343 Assert.That(item, Is.Null);
344 } 344 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
index 4a98746..e1e973c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectCrossingTests.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
98 98
99 // crossing is async 99 // crossing is async
100 Thread.Sleep(500); 100 Thread.Sleep(500);
101 101
102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id)); 102 Assert.IsNull(sceneA.GetSceneObjectGroup(so1Id));
103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id)); 103 Assert.NotNull(sceneB.GetSceneObjectGroup(so1Id));
104 } 104 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
index f0debd0..b84ecac 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
@@ -77,19 +77,19 @@ namespace OpenSim.Region.Framework.Scenes.Tests
77 public void TestDeRezSceneObject() 77 public void TestDeRezSceneObject()
78 { 78 {
79 TestHelpers.InMethod(); 79 TestHelpers.InMethod();
80 80
81 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 81 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
82 82
83 TestScene scene = new SceneHelpers().SetupScene(); 83 TestScene scene = new SceneHelpers().SetupScene();
84 IConfigSource configSource = new IniConfigSource(); 84 IConfigSource configSource = new IniConfigSource();
85 IConfig config = configSource.AddConfig("Startup"); 85 IConfig config = configSource.AddConfig("Startup");
86 config.Set("serverside_object_permissions", true); 86 config.Set("serverside_object_permissions", true);
87 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); 87 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
88 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 88 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
89 89
90 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 90 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
91 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 91 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
92 sogd.Enabled = false; 92 sogd.Enabled = false;
93 93
94 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId); 94 SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, "so1", userId);
95 uint soLocalId = so.LocalId; 95 uint soLocalId = so.LocalId;
@@ -104,9 +104,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
104// Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False); 104// Assert.That(retrievedPart.ParentGroup.IsDeleted, Is.False);
105 105
106 sogd.InventoryDeQueueAndDelete(); 106 sogd.InventoryDeQueueAndDelete();
107 107
108// SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 108// SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
109 Assert.That(retrievedPart, Is.Null); 109 Assert.That(retrievedPart, Is.Null);
110 } 110 }
111 111
112 /// <summary> 112 /// <summary>
@@ -154,48 +154,48 @@ namespace OpenSim.Region.Framework.Scenes.Tests
154 154
155 sceneA.DeleteSceneObject(so, false); 155 sceneA.DeleteSceneObject(so, false);
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// Test deleting an object from a scene where the deleter is not the owner 159 /// Test deleting an object from a scene where the deleter is not the owner
160 /// </summary> 160 /// </summary>
161 /// <remarks> 161 /// <remarks>
162 /// This test assumes that the deleter is not a god. 162 /// This test assumes that the deleter is not a god.
163 /// </remarks> 163 /// </remarks>
164 [Test] 164 [Test]
165 public void TestDeRezSceneObjectNotOwner() 165 public void TestDeRezSceneObjectNotOwner()
166 { 166 {
167 TestHelpers.InMethod(); 167 TestHelpers.InMethod();
168// log4net.Config.XmlConfigurator.Configure(); 168// log4net.Config.XmlConfigurator.Configure();
169 169
170 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 170 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
171 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); 171 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001");
172 172
173 TestScene scene = new SceneHelpers().SetupScene(); 173 TestScene scene = new SceneHelpers().SetupScene();
174 IConfigSource configSource = new IniConfigSource(); 174 IConfigSource configSource = new IniConfigSource();
175 IConfig config = configSource.AddConfig("Startup"); 175 IConfig config = configSource.AddConfig("Startup");
176 config.Set("serverside_object_permissions", true); 176 config.Set("serverside_object_permissions", true);
177 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); 177 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
178 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 178 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
179 179
180 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 180 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
181 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 181 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
182 sogd.Enabled = false; 182 sogd.Enabled = false;
183 183
184 SceneObjectPart part 184 SceneObjectPart part
185 = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero); 185 = new SceneObjectPart(objectOwnerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero);
186 part.Name = "obj1"; 186 part.Name = "obj1";
187 scene.AddNewSceneObject(new SceneObjectGroup(part), false); 187 scene.AddNewSceneObject(new SceneObjectGroup(part), false);
188 List<uint> localIds = new List<uint>(); 188 List<uint> localIds = new List<uint>();
189 localIds.Add(part.LocalId); 189 localIds.Add(part.LocalId);
190 190
191 scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero); 191 scene.DeRezObjects(client, localIds, UUID.Zero, DeRezAction.Delete, UUID.Zero);
192 sogd.InventoryDeQueueAndDelete(); 192 sogd.InventoryDeQueueAndDelete();
193 193
194 // Object should still be in the scene. 194 // Object should still be in the scene.
195 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); 195 SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
196 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); 196 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
197 } 197 }
198 198
199 /// <summary> 199 /// <summary>
200 /// Test deleting an object asynchronously to user inventory. 200 /// Test deleting an object asynchronously to user inventory.
201 /// </summary> 201 /// </summary>
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
211 TestScene scene = new SceneHelpers().SetupScene(); 211 TestScene scene = new SceneHelpers().SetupScene();
212 212
213 IConfigSource configSource = new IniConfigSource(); 213 IConfigSource configSource = new IniConfigSource();
214 IConfig config = configSource.AddConfig("Modules"); 214 IConfig config = configSource.AddConfig("Modules");
215 config.Set("InventoryAccessModule", "BasicInventoryAccessModule"); 215 config.Set("InventoryAccessModule", "BasicInventoryAccessModule");
216 SceneHelpers.SetupSceneModules( 216 SceneHelpers.SetupSceneModules(
217 scene, configSource, new object[] { new BasicInventoryAccessModule() }); 217 scene, configSource, new object[] { new BasicInventoryAccessModule() });
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
index 1718734..41f61ac 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs
@@ -66,8 +66,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 public void TestLinkDelink2SceneObjects() 66 public void TestLinkDelink2SceneObjects()
67 { 67 {
68 TestHelpers.InMethod(); 68 TestHelpers.InMethod();
69 69
70 bool debugtest = false; 70 bool debugtest = false;
71 71
72 Scene scene = new SceneHelpers().SetupScene(); 72 Scene scene = new SceneHelpers().SetupScene();
73 SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene); 73 SceneObjectGroup grp1 = SceneHelpers.AddSceneObject(scene);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
83 83
84 // <180,0,0> 84 // <180,0,0>
85 grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0)); 85 grp2.UpdateGroupRotationR(Quaternion.CreateFromEulers(180 * Utils.DEG_TO_RAD, 0, 0));
86 86
87 // Required for linking 87 // Required for linking
88 grp1.RootPart.ClearUpdateSchedule(); 88 grp1.RootPart.ClearUpdateSchedule();
89 grp2.RootPart.ClearUpdateSchedule(); 89 grp2.RootPart.ClearUpdateSchedule();
@@ -111,7 +111,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
111 } 111 }
112 112
113 // root part should have no offset position or rotation 113 // root part should have no offset position or rotation
114 Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity, 114 Assert.That(part1.OffsetPosition == Vector3.Zero && part1.RotationOffset == Quaternion.Identity,
115 "root part should have no offset position or rotation"); 115 "root part should have no offset position or rotation");
116 116
117 // offset position should be root part position - part2.absolute position. 117 // offset position should be root part position - part2.absolute position.
@@ -125,13 +125,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
125 // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180. 125 // There's a euler anomoly at 180, 0, 0 so expect 180 to turn into -180.
126 part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); 126 part1.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
127 Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); 127 Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
128 128
129 if (debugtest) 129 if (debugtest)
130 m_log.Debug(rotEuler1); 130 m_log.Debug(rotEuler1);
131 131
132 part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw); 132 part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
133 Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG); 133 Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
134 134
135 if (debugtest) 135 if (debugtest)
136 m_log.Debug(rotEuler2); 136 m_log.Debug(rotEuler2);
137 137
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
153 public void TestLinkDelink2groups4SceneObjects() 153 public void TestLinkDelink2groups4SceneObjects()
154 { 154 {
155 TestHelpers.InMethod(); 155 TestHelpers.InMethod();
156 156
157 bool debugtest = false; 157 bool debugtest = false;
158 158
159 Scene scene = new SceneHelpers().SetupScene(); 159 Scene scene = new SceneHelpers().SetupScene();
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
194 194
195 // Link grp4 to grp3. 195 // Link grp4 to grp3.
196 grp3.LinkToGroup(grp4); 196 grp3.LinkToGroup(grp4);
197 197
198 // At this point we should have 4 parts total in two groups. 198 // At this point we should have 4 parts total in two groups.
199 Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2"); 199 Assert.That(grp1.Parts.Length == 2, "Group1 children count should be 2");
200 Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link."); 200 Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link.");
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
202 Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2"); 202 Assert.That(grp3.Parts.Length == 2, "Group3 children count should be 2");
203 Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link."); 203 Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link.");
204 Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink."); 204 Assert.That(grp4.Parts.Length, Is.EqualTo(0), "Group 4 still contained parts after delink.");
205 205
206 if (debugtest) 206 if (debugtest)
207 { 207 {
208 m_log.Debug("--------After Link-------"); 208 m_log.Debug("--------After Link-------");
@@ -273,13 +273,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
273 Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1"); 273 Assert.That(part2.AbsolutePosition == Vector3.Zero, "Badness 1");
274 Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2"); 274 Assert.That(part4.OffsetPosition == new Vector3(20, 20, 20), "Badness 2");
275 Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f); 275 Quaternion compareQuaternion = new Quaternion(0, 0.7071068f, 0, 0.7071068f);
276 Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003) 276 Assert.That((part4.RotationOffset.X - compareQuaternion.X < 0.00003)
277 && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003) 277 && (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003)
278 && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003) 278 && (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003)
279 && (part4.RotationOffset.W - compareQuaternion.W < 0.00003), 279 && (part4.RotationOffset.W - compareQuaternion.W < 0.00003),
280 "Badness 3"); 280 "Badness 3");
281 } 281 }
282 282
283 /// <summary> 283 /// <summary>
284 /// Test that a new scene object which is already linked is correctly persisted to the persistence layer. 284 /// Test that a new scene object which is already linked is correctly persisted to the persistence layer.
285 /// </summary> 285 /// </summary>
@@ -288,37 +288,37 @@ namespace OpenSim.Region.Framework.Scenes.Tests
288 { 288 {
289 TestHelpers.InMethod(); 289 TestHelpers.InMethod();
290 //log4net.Config.XmlConfigurator.Configure(); 290 //log4net.Config.XmlConfigurator.Configure();
291 291
292 TestScene scene = new SceneHelpers().SetupScene(); 292 TestScene scene = new SceneHelpers().SetupScene();
293 293
294 string rootPartName = "rootpart"; 294 string rootPartName = "rootpart";
295 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 295 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
296 string linkPartName = "linkpart"; 296 string linkPartName = "linkpart";
297 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 297 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
298 298
299 SceneObjectPart rootPart 299 SceneObjectPart rootPart
300 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 300 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
301 { Name = rootPartName, UUID = rootPartUuid }; 301 { Name = rootPartName, UUID = rootPartUuid };
302 SceneObjectPart linkPart 302 SceneObjectPart linkPart
303 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 303 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
304 { Name = linkPartName, UUID = linkPartUuid }; 304 { Name = linkPartName, UUID = linkPartUuid };
305 305
306 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 306 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
307 sog.AddPart(linkPart); 307 sog.AddPart(linkPart);
308 scene.AddNewSceneObject(sog, true); 308 scene.AddNewSceneObject(sog, true);
309 309
310 // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked 310 // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked
311 // scene backup thread. 311 // scene backup thread.
312 scene.Backup(true); 312 scene.Backup(true);
313 313
314 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); 314 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
315 315
316 Assert.That(storedObjects.Count, Is.EqualTo(1)); 316 Assert.That(storedObjects.Count, Is.EqualTo(1));
317 Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2)); 317 Assert.That(storedObjects[0].Parts.Length, Is.EqualTo(2));
318 Assert.That(storedObjects[0].ContainsPart(rootPartUuid)); 318 Assert.That(storedObjects[0].ContainsPart(rootPartUuid));
319 Assert.That(storedObjects[0].ContainsPart(linkPartUuid)); 319 Assert.That(storedObjects[0].ContainsPart(linkPartUuid));
320 } 320 }
321 321
322 /// <summary> 322 /// <summary>
323 /// Test that a delink of a previously linked object is correctly persisted to the database 323 /// Test that a delink of a previously linked object is correctly persisted to the database
324 /// </summary> 324 /// </summary>
@@ -327,20 +327,20 @@ namespace OpenSim.Region.Framework.Scenes.Tests
327 { 327 {
328 TestHelpers.InMethod(); 328 TestHelpers.InMethod();
329 //log4net.Config.XmlConfigurator.Configure(); 329 //log4net.Config.XmlConfigurator.Configure();
330 330
331 TestScene scene = new SceneHelpers().SetupScene(); 331 TestScene scene = new SceneHelpers().SetupScene();
332 332
333 string rootPartName = "rootpart"; 333 string rootPartName = "rootpart";
334 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); 334 UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001");
335 string linkPartName = "linkpart"; 335 string linkPartName = "linkpart";
336 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000"); 336 UUID linkPartUuid = new UUID("00000000-0000-0000-0001-000000000000");
337 337
338 SceneObjectPart rootPart 338 SceneObjectPart rootPart
339 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 339 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
340 { Name = rootPartName, UUID = rootPartUuid }; 340 { Name = rootPartName, UUID = rootPartUuid };
341 341
342 SceneObjectPart linkPart 342 SceneObjectPart linkPart
343 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 343 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
344 { Name = linkPartName, UUID = linkPartUuid }; 344 { Name = linkPartName, UUID = linkPartUuid };
345 SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart); 345 SceneObjectGroup linkGroup = new SceneObjectGroup(linkPart);
346 scene.AddNewSceneObject(linkGroup, true); 346 scene.AddNewSceneObject(linkGroup, true);
@@ -359,7 +359,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
359 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); 359 SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false);
360 Assert.IsFalse(groupToDelete.GroupContainsForeignPrims); 360 Assert.IsFalse(groupToDelete.GroupContainsForeignPrims);
361 361
362/* backup is async 362/* backup is async
363 scene.DeleteSceneObject(groupToDelete, false); 363 scene.DeleteSceneObject(groupToDelete, false);
364 364
365 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); 365 List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
index ec58a5a..c2c7822 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
137 Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition); 137 Vector3 childPosition = new Vector3(rootPartPosition + rotatedChildOffsetPosition);
138 138
139 SceneObjectPart childPart = so.Parts[1]; 139 SceneObjectPart childPart = so.Parts[1];
140 140
141 Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition)); 141 Assert.That(childPart.AbsolutePosition, Is.EqualTo(childPosition));
142 142
143 Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition)); 143 Assert.That(childPart.GroupPosition, Is.EqualTo(rootPartPosition));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
index e98e631..8d88083 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
71 m_so1.ScriptSetTemporaryStatus(false); 71 m_so1.ScriptSetTemporaryStatus(false);
72 72
73 Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); 73 Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None));
74 Assert.That(m_so1.Backup, Is.True); 74 Assert.That(m_so1.Backup, Is.True);
75 } 75 }
76 76
77 [Test] 77 [Test]
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
91 91
92 m_so1.ScriptSetPhantomStatus(false); 92 m_so1.ScriptSetPhantomStatus(false);
93 93
94 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 94 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
95 } 95 }
96 96
97 [Test] 97 [Test]
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
112 112
113 m_so1.ScriptSetVolumeDetect(false); 113 m_so1.ScriptSetVolumeDetect(false);
114 114
115 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 115 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
116 } 116 }
117 117
118 [Test] 118 [Test]
@@ -152,9 +152,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
152 152
153 m_so1.ScriptSetVolumeDetect(false); 153 m_so1.ScriptSetVolumeDetect(false);
154 154
155 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); 155 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
156 } 156 }
157 157
158 [Test] 158 [Test]
159 public void TestSetPhysicsLinkset() 159 public void TestSetPhysicsLinkset()
160 { 160 {
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
index a92e364..4ec69cd 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
@@ -53,30 +53,30 @@ namespace OpenSim.Region.Framework.Scenes.Tests
53 { 53 {
54 TestHelpers.InMethod(); 54 TestHelpers.InMethod();
55// log4net.Config.XmlConfigurator.Configure(); 55// log4net.Config.XmlConfigurator.Configure();
56 56
57 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 57 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
58 58
59 TestScene scene = new SceneHelpers().SetupScene(); 59 TestScene scene = new SceneHelpers().SetupScene();
60 IConfigSource configSource = new IniConfigSource(); 60 IConfigSource configSource = new IniConfigSource();
61 61
62 IConfig startupConfig = configSource.AddConfig("Startup"); 62 IConfig startupConfig = configSource.AddConfig("Startup");
63 startupConfig.Set("serverside_object_permissions", true); 63 startupConfig.Set("serverside_object_permissions", true);
64 64
65 IConfig groupsConfig = configSource.AddConfig("Groups"); 65 IConfig groupsConfig = configSource.AddConfig("Groups");
66 groupsConfig.Set("Enabled", true); 66 groupsConfig.Set("Enabled", true);
67 groupsConfig.Set("Module", "GroupsModule"); 67 groupsConfig.Set("Module", "GroupsModule");
68 groupsConfig.Set("DebugEnabled", true); 68 groupsConfig.Set("DebugEnabled", true);
69 69
70 SceneHelpers.SetupSceneModules( 70 SceneHelpers.SetupSceneModules(
71 scene, configSource, new object[] 71 scene, configSource, new object[]
72 { new DefaultPermissionsModule(), 72 { new DefaultPermissionsModule(),
73 new GroupsModule(), 73 new GroupsModule(),
74 new MockGroupsServicesConnector() }); 74 new MockGroupsServicesConnector() });
75 75
76 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 76 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
77 77
78 IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>(); 78 IGroupsModule groupsModule = scene.RequestModuleInterface<IGroupsModule>();
79 79
80 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); 80 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true);
81 } 81 }
82 } 82 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
index ada407f..0f386bc 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
142 // Check rest of exepcted parameters. 142 // Check rest of exepcted parameters.
143 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null); 143 Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(spUuid), Is.Not.Null);
144 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1)); 144 Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(1));
145 145
146 Assert.That(sp.IsChildAgent, Is.False); 146 Assert.That(sp.IsChildAgent, Is.False);
147 Assert.That(sp.UUID, Is.EqualTo(spUuid)); 147 Assert.That(sp.UUID, Is.EqualTo(spUuid));
148 148
@@ -262,9 +262,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
262 { 262 {
263 TestHelpers.InMethod(); 263 TestHelpers.InMethod();
264// log4net.Config.XmlConfigurator.Configure(); 264// log4net.Config.XmlConfigurator.Configure();
265 265
266// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001"); 266// UUID agent1Id = UUID.Parse("00000000-0000-0000-0000-000000000001");
267 267
268 TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000); 268 TestScene myScene1 = new SceneHelpers().SetupScene("Neighbour y", UUID.Random(), 1000, 1000);
269 TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000); 269 TestScene myScene2 = new SceneHelpers().SetupScene("Neighbour y + 1", UUID.Random(), 1001, 1000);
270 270
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
279 279
280 EventQueueGetModule eqgm2 = new EventQueueGetModule(); 280 EventQueueGetModule eqgm2 = new EventQueueGetModule();
281 SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2); 281 SceneHelpers.SetupSceneModules(myScene2, configSource, etm, eqgm2);
282 282
283// SceneHelpers.AddScenePresence(myScene1, agent1Id); 283// SceneHelpers.AddScenePresence(myScene1, agent1Id);
284// ScenePresence childPresence = myScene2.GetScenePresence(agent1); 284// ScenePresence childPresence = myScene2.GetScenePresence(agent1);
285// 285//
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index b8f7458..86500c7 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -465,7 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
465 teleportLookAt, 465 teleportLookAt,
466 (uint)TeleportFlags.ViaLocation); 466 (uint)TeleportFlags.ViaLocation);
467 467
468 // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate 468 // FIXME: Not setting up InformClientOfNeighbour on the TestClient means that it does not initiate
469 // communication with the destination region. But this is a very non-obvious way of doing it - really we 469 // communication with the destination region. But this is a very non-obvious way of doing it - really we
470 // should be forced to expicitly set this up. 470 // should be forced to expicitly set this up.
471 471
@@ -627,8 +627,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
627 // Both these operations will occur on different threads and will wait for each other. 627 // Both these operations will occur on different threads and will wait for each other.
628 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 628 // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1
629 // test protocol, where we are trying to avoid unpredictable async operations in regression tests. 629 // test protocol, where we are trying to avoid unpredictable async operations in regression tests.
630 tc.OnTestClientSendRegionTeleport 630 tc.OnTestClientSendRegionTeleport
631 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) 631 += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL)
632 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); 632 => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null);
633 633
634 sceneA.RequestTeleportLocation( 634 sceneA.RequestTeleportLocation(
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
index 584a03c..dbb6a37 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTelehubTests.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
70 // Must still be possible to successfully log in 70 // Must still be possible to successfully log in
71 UUID loggingInUserId = TestHelpers.ParseTail(0x2); 71 UUID loggingInUserId = TestHelpers.ParseTail(0x2);
72 72
73 UserAccount ua 73 UserAccount ua
74 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); 74 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password");
75 75
76 SceneHelpers.AddScenePresence(scene, ua); 76 SceneHelpers.AddScenePresence(scene, ua);
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
107 // Must still be possible to successfully log in 107 // Must still be possible to successfully log in
108 UUID loggingInUserId = TestHelpers.ParseTail(0x2); 108 UUID loggingInUserId = TestHelpers.ParseTail(0x2);
109 109
110 UserAccount ua 110 UserAccount ua
111 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password"); 111 = UserAccountHelpers.CreateUserWithInventory(scene, "Test", "User", loggingInUserId, "password");
112 112
113 SceneHelpers.AddScenePresence(scene, ua); 113 SceneHelpers.AddScenePresence(scene, ua);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
index 517faf1..6c0af8f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
66 uint sizeX = 512; 66 uint sizeX = 512;
67 uint sizeY = 512; 67 uint sizeY = 512;
68 68
69 Scene scene 69 Scene scene
70 = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource()); 70 = new SceneHelpers().SetupScene("scene", regionUuid, 1000, 1000, sizeX, sizeY, new IniConfigSource());
71 71
72 Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX); 72 Assert.AreEqual(sizeX, scene.RegionInfo.RegionSizeX);
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
83 83
84 Scene scene = new SceneHelpers().SetupScene(); 84 Scene scene = new SceneHelpers().SetupScene();
85 scene.Update(1); 85 scene.Update(1);
86 86
87 Assert.That(scene.Frame, Is.EqualTo(1)); 87 Assert.That(scene.Frame, Is.EqualTo(1));
88 } 88 }
89 89
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
index eeda84f..c74c83f 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SharedRegionModuleTests.cs
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
105// rmcp.LoadModulesFromAddins = false; 105// rmcp.LoadModulesFromAddins = false;
106//// reg.RegisterInterface<IRegionModulesController>(rmcp); 106//// reg.RegisterInterface<IRegionModulesController>(rmcp);
107// rmcp.Initialise(sim); 107// rmcp.Initialise(sim);
108// rmcp.PostInitialise(); 108// rmcp.PostInitialise();
109// TypeExtensionNode node = new TypeExtensionNode(); 109// TypeExtensionNode node = new TypeExtensionNode();
110// node. 110// node.
111// rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>()); 111// rmcp.AddNode(node, configSource.Configs["Modules"], new Dictionary<RuntimeAddin, IList<int>>());
@@ -120,9 +120,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
120 int expectedEventCount = 6; 120 int expectedEventCount = 6;
121 121
122 Assert.AreEqual( 122 Assert.AreEqual(
123 expectedEventCount, 123 expectedEventCount,
124 co.Count, 124 co.Count,
125 "Expected {0} events but only got {1} ({2})", 125 "Expected {0} events but only got {1} ({2})",
126 expectedEventCount, co.Count, string.Join(",", co)); 126 expectedEventCount, co.Count, string.Join(",", co));
127 Assert.AreEqual("Initialise", co[0]); 127 Assert.AreEqual("Initialise", co[0]);
128 Assert.AreEqual("PostInitialise", co[1]); 128 Assert.AreEqual("PostInitialise", co[1]);
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
137 { 137 {
138 // FIXME: Should really use MethodInfo 138 // FIXME: Should really use MethodInfo
139 public List<string> CallOrder = new List<string>(); 139 public List<string> CallOrder = new List<string>();
140 140
141 public string Name { get { return "TestSharedRegion"; } } 141 public string Name { get { return "TestSharedRegion"; } }
142 142
143 public Type ReplaceableInterface { get { return null; } } 143 public Type ReplaceableInterface { get { return null; } }
@@ -186,13 +186,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
186 186
187 public void Initialise() {} 187 public void Initialise() {}
188 188
189 public void Initialise(OpenSimBase sim) 189 public void Initialise(OpenSimBase sim)
190 { 190 {
191 m_openSim = sim; 191 m_openSim = sim;
192 } 192 }
193 193
194 /// <summary> 194 /// <summary>
195 /// Called when the application loading is completed 195 /// Called when the application loading is completed
196 /// </summary> 196 /// </summary>
197 public void PostInitialise() 197 public void PostInitialise()
198 { 198 {
@@ -228,8 +228,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests
228 } 228 }
229 229
230 scene.RegionModules.Clear(); 230 scene.RegionModules.Clear();
231 } 231 }
232 232
233 public void AddNode(ISharedRegionModule module) 233 public void AddNode(ISharedRegionModule module)
234 { 234 {
235 m_sharedInstances.Add(module); 235 m_sharedInstances.Add(module);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index 33a630c..8273e32 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Tests
55 { 55 {
56 TestHelpers.InMethod(); 56 TestHelpers.InMethod();
57// log4net.Config.XmlConfigurator.Configure(); 57// log4net.Config.XmlConfigurator.Configure();
58 58
59 Scene scene = new SceneHelpers().SetupScene(); 59 Scene scene = new SceneHelpers().SetupScene();
60 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 60 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
61 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 61 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Tests
78 { 78 {
79 TestHelpers.InMethod(); 79 TestHelpers.InMethod();
80// log4net.Config.XmlConfigurator.Configure(); 80// log4net.Config.XmlConfigurator.Configure();
81 81
82 Scene scene = new SceneHelpers().SetupScene(); 82 Scene scene = new SceneHelpers().SetupScene();
83 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 83 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
84 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 84 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Tests
121 { 121 {
122 TestHelpers.InMethod(); 122 TestHelpers.InMethod();
123// log4net.Config.XmlConfigurator.Configure(); 123// log4net.Config.XmlConfigurator.Configure();
124 124
125 Scene scene = new SceneHelpers().SetupScene(); 125 Scene scene = new SceneHelpers().SetupScene();
126 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 126 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
127 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 127 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -130,18 +130,18 @@ namespace OpenSim.Region.Framework.Tests
130 = TaskInventoryHelpers.AddNotecard( 130 = TaskInventoryHelpers.AddNotecard(
131 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 131 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
132 132
133 InventoryFolderBase folder 133 InventoryFolderBase folder
134 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0]; 134 = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, user1.PrincipalID, "Objects")[0];
135 135
136 // Perform test 136 // Perform test
137 string message; 137 string message;
138 scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message); 138 scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID, out message);
139 139
140 InventoryItemBase ncUserItem 140 InventoryItemBase ncUserItem
141 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); 141 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem");
142 Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); 142 Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found");
143 } 143 }
144 144
145 /// <summary> 145 /// <summary>
146 /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned. 146 /// Test MoveTaskInventoryItem from a part inventory to a user inventory where the item has no parent folder assigned.
147 /// </summary> 147 /// </summary>
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Tests
153 { 153 {
154 TestHelpers.InMethod(); 154 TestHelpers.InMethod();
155// log4net.Config.XmlConfigurator.Configure(); 155// log4net.Config.XmlConfigurator.Configure();
156 156
157 Scene scene = new SceneHelpers().SetupScene(); 157 Scene scene = new SceneHelpers().SetupScene();
158 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene); 158 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene);
159 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID); 159 SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, user1.PrincipalID);
@@ -162,11 +162,11 @@ namespace OpenSim.Region.Framework.Tests
162 TaskInventoryItem sopItem1 162 TaskInventoryItem sopItem1
163 = TaskInventoryHelpers.AddNotecard( 163 = TaskInventoryHelpers.AddNotecard(
164 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 164 scene.AssetService, sop1, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
165 165
166 // Perform test 166 // Perform test
167 string message; 167 string message;
168 scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message); 168 scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID, out message);
169 169
170 InventoryItemBase ncUserItem 170 InventoryItemBase ncUserItem
171 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); 171 = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem");
172 Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); 172 Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found");
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
index 142ad84..58e157c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UserInventoryTests.cs
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Tests
113 { 113 {
114 TestHelpers.InMethod(); 114 TestHelpers.InMethod();
115// TestHelpers.EnableLogging(); 115// TestHelpers.EnableLogging();
116 116
117 Scene scene = new SceneHelpers().SetupScene(); 117 Scene scene = new SceneHelpers().SetupScene();
118 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001)); 118 UserAccount user1 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1001));
119 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002)); 119 UserAccount user2 = UserAccountHelpers.CreateUserWithInventory(scene, TestHelpers.ParseTail(1002));
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index 937c414..4ceebc1 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
41 { 41 {
42 protected IAssetService m_assetService; 42 protected IAssetService m_assetService;
43 protected UuidGatherer m_uuidGatherer; 43 protected UuidGatherer m_uuidGatherer;
44 44
45 [SetUp] 45 [SetUp]
46 public void Init() 46 public void Init()
47 { 47 {
@@ -55,9 +55,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
55 public void TestCorruptAsset() 55 public void TestCorruptAsset()
56 { 56 {
57 TestHelpers.InMethod(); 57 TestHelpers.InMethod();
58 58
59 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 59 UUID corruptAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
60 AssetBase corruptAsset 60 AssetBase corruptAsset
61 = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero); 61 = AssetHelpers.CreateAsset(corruptAssetUuid, AssetType.Notecard, "CORRUPT ASSET", UUID.Zero);
62 m_assetService.Store(corruptAsset); 62 m_assetService.Store(corruptAsset);
63 63
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
67 // We count the uuid as gathered even if the asset itself is corrupt. 67 // We count the uuid as gathered even if the asset itself is corrupt.
68 Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1)); 68 Assert.That(m_uuidGatherer.GatheredUuids.Count, Is.EqualTo(1));
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
72 /// Test requests made for non-existent assets while we're gathering 72 /// Test requests made for non-existent assets while we're gathering
73 /// </summary> 73 /// </summary>
@@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
75 public void TestMissingAsset() 75 public void TestMissingAsset()
76 { 76 {
77 TestHelpers.InMethod(); 77 TestHelpers.InMethod();
78 78
79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
80 80
81 m_uuidGatherer.AddForInspection(missingAssetUuid); 81 m_uuidGatherer.AddForInspection(missingAssetUuid);
@@ -89,23 +89,23 @@ namespace OpenSim.Region.Framework.Scenes.Tests
89 { 89 {
90 TestHelpers.InMethod(); 90 TestHelpers.InMethod();
91// TestHelpers.EnableLogging(); 91// TestHelpers.EnableLogging();
92 92
93 UUID ownerId = TestHelpers.ParseTail(0x10); 93 UUID ownerId = TestHelpers.ParseTail(0x10);
94 UUID embeddedId = TestHelpers.ParseTail(0x20); 94 UUID embeddedId = TestHelpers.ParseTail(0x20);
95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21); 95 UUID secondLevelEmbeddedId = TestHelpers.ParseTail(0x21);
96 UUID missingEmbeddedId = TestHelpers.ParseTail(0x22); 96 UUID missingEmbeddedId = TestHelpers.ParseTail(0x22);
97 UUID ncAssetId = TestHelpers.ParseTail(0x30); 97 UUID ncAssetId = TestHelpers.ParseTail(0x30);
98 98
99 AssetBase ncAsset 99 AssetBase ncAsset
100 = AssetHelpers.CreateNotecardAsset( 100 = AssetHelpers.CreateNotecardAsset(
101 ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId)); 101 ncAssetId, string.Format("Hello{0}World{1}", embeddedId, missingEmbeddedId));
102 m_assetService.Store(ncAsset); 102 m_assetService.Store(ncAsset);
103 103
104 AssetBase embeddedAsset 104 AssetBase embeddedAsset
105 = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId)); 105 = AssetHelpers.CreateNotecardAsset(embeddedId, string.Format("{0} We'll meet again.", secondLevelEmbeddedId));
106 m_assetService.Store(embeddedAsset); 106 m_assetService.Store(embeddedAsset);
107 107
108 AssetBase secondLevelEmbeddedAsset 108 AssetBase secondLevelEmbeddedAsset
109 = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when."); 109 = AssetHelpers.CreateNotecardAsset(secondLevelEmbeddedId, "Don't know where, don't know when.");
110 m_assetService.Store(secondLevelEmbeddedAsset); 110 m_assetService.Store(secondLevelEmbeddedAsset);
111 111
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs
index 7bbf1bd..8fff38f 100644
--- a/OpenSim/Region/Framework/Scenes/UndoState.cs
+++ b/OpenSim/Region/Framework/Scenes/UndoState.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Framework.Scenes
46 /// </summary> 46 /// </summary>
47 /// <param name="part"></param> 47 /// <param name="part"></param>
48 /// <param name="change">bit field with what is changed</param> 48 /// <param name="change">bit field with what is changed</param>
49 /// 49 ///
50 public UndoState(SceneObjectPart part, ObjectChangeType change) 50 public UndoState(SceneObjectPart part, ObjectChangeType change)
51 { 51 {
52 data = new ObjectChangeData(); 52 data = new ObjectChangeData();
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
73 } 73 }
74 } 74 }
75 /// <summary> 75 /// <summary>
76 /// check if undo or redo is too old 76 /// check if undo or redo is too old
77 /// </summary> 77 /// </summary>
78 78
79 public bool checkExpire() 79 public bool checkExpire()
@@ -97,8 +97,8 @@ namespace OpenSim.Region.Framework.Scenes
97 /// </summary> 97 /// </summary>
98 /// <param name="part"></param> 98 /// <param name="part"></param>
99 /// <returns>true what fiels and related data are equal, False otherwise.</returns> 99 /// <returns>true what fiels and related data are equal, False otherwise.</returns>
100 /// 100 ///
101 public bool Compare(SceneObjectPart part, ObjectChangeType change) 101 public bool Compare(SceneObjectPart part, ObjectChangeType change)
102 { 102 {
103 if (data.change != change) // if diferent targets, then they are diferent 103 if (data.change != change) // if diferent targets, then they are diferent
104 return false; 104 return false;
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes
130 /// executes the undo or redo to a part or its group 130 /// executes the undo or redo to a part or its group
131 /// </summary> 131 /// </summary>
132 /// <param name="part"></param> 132 /// <param name="part"></param>
133 /// 133 ///
134 134
135 public void PlayState(SceneObjectPart part) 135 public void PlayState(SceneObjectPart part)
136 { 136 {
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
140 140
141 if (grp != null) 141 if (grp != null)
142 { 142 {
143 grp.doChangeObject(part, data); 143 grp.doChangeObject(part, data);
144 } 144 }
145 part.Undoing = false; 145 part.Undoing = false;
146 } 146 }
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 37b91d3..93406cb 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes
92 /// <param name="assetService"> 92 /// <param name="assetService">
93 /// Asset service. 93 /// Asset service.
94 /// </param> 94 /// </param>
95 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {} 95 public UuidGatherer(IAssetService assetService) : this(assetService, new Dictionary<UUID, sbyte>()) {}
96 96
97 /// <summary> 97 /// <summary>
98 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class. 98 /// Initializes a new instance of the <see cref="OpenSim.Region.Framework.Scenes.UuidGatherer"/> class.
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
101 /// Asset service. 101 /// Asset service.
102 /// </param> 102 /// </param>
103 /// <param name="collector"> 103 /// <param name="collector">
104 /// Gathered UUIDs will be collected in this dictinaory. 104 /// Gathered UUIDs will be collected in this dictinaory.
105 /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected. 105 /// It can be pre-populated if you want to stop the gatherer from analyzing assets that have already been fetched and inspected.
106 /// </param> 106 /// </param>
107 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector) 107 public UuidGatherer(IAssetService assetService, IDictionary<UUID, sbyte> collector)
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Framework.Scenes
128 m_assetUuidsToInspect.Enqueue(uuid); 128 m_assetUuidsToInspect.Enqueue(uuid);
129 return true; 129 return true;
130 } 130 }
131 131
132 /// <summary> 132 /// <summary>
133 /// Gather all the asset uuids associated with a given object. 133 /// Gather all the asset uuids associated with a given object.
134 /// </summary> 134 /// </summary>
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes
194 catch (Exception) 194 catch (Exception)
195 { 195 {
196 m_log.WarnFormat( 196 m_log.WarnFormat(
197 "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.", 197 "[UUID GATHERER]: Could not check particle system for part {0} {1} in object {2} {3} since it is corrupt. Continuing.",
198 part.Name, part.UUID, sceneObject.Name, sceneObject.UUID); 198 part.Name, part.UUID, sceneObject.Name, sceneObject.UUID);
199 } 199 }
200 } 200 }
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Framework.Scenes
205 foreach (TaskInventoryItem tii in taskDictionary.Values) 205 foreach (TaskInventoryItem tii in taskDictionary.Values)
206 { 206 {
207 // m_log.DebugFormat( 207 // m_log.DebugFormat(
208 // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}", 208 // "[ARCHIVER]: Analysing item {0} asset type {1} in {2} {3}",
209 // tii.Name, tii.Type, part.Name, part.UUID); 209 // tii.Name, tii.Type, part.Name, part.UUID);
210 210
211 if (!GatheredUuids.ContainsKey(tii.AssetID)) 211 if (!GatheredUuids.ContainsKey(tii.AssetID))
@@ -214,19 +214,19 @@ namespace OpenSim.Region.Framework.Scenes
214 214
215 // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed 215 // FIXME: We need to make gathering modular but we cannot yet, since gatherers are not guaranteed
216 // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and 216 // to be called with scene objects that are in a scene (e.g. in the case of hg asset mapping and
217 // inventory transfer. There needs to be a way for a module to register a method without assuming a 217 // inventory transfer. There needs to be a way for a module to register a method without assuming a
218 // Scene.EventManager is present. 218 // Scene.EventManager is present.
219 // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids); 219 // part.ParentGroup.Scene.EventManager.TriggerGatherUuids(part, assetUuids);
220 220
221 221
222 // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs 222 // still needed to retrieve textures used as materials for any parts containing legacy materials stored in DynAttrs
223 RecordMaterialsUuids(part); 223 RecordMaterialsUuids(part);
224 } 224 }
225 catch (Exception e) 225 catch (Exception e)
226 { 226 {
227 m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e); 227 m_log.ErrorFormat("[UUID GATHERER]: Failed to get part - {0}", e);
228 m_log.DebugFormat( 228 m_log.DebugFormat(
229 "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)", 229 "[UUID GATHERER]: Texture entry length for prim was {0} (min is 46)",
230 part.Shape.TextureEntry.Length); 230 part.Shape.TextureEntry.Length);
231 } 231 }
232 } 232 }
@@ -283,7 +283,7 @@ namespace OpenSim.Region.Framework.Scenes
283 return; 283 return;
284 284
285 try 285 try
286 { 286 {
287 AssetBase assetBase = GetAsset(assetUuid); 287 AssetBase assetBase = GetAsset(assetUuid);
288 288
289 if (null != assetBase) 289 if (null != assetBase)
@@ -322,14 +322,14 @@ namespace OpenSim.Region.Framework.Scenes
322 m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid); 322 m_log.ErrorFormat("[UUID GATHERER]: Failed to gather uuids for asset id {0}", assetUuid);
323 throw; 323 throw;
324 } 324 }
325 } 325 }
326 326
327 private void AddForInspection(UUID assetUuid, sbyte assetType) 327 private void AddForInspection(UUID assetUuid, sbyte assetType)
328 { 328 {
329 // Here, we want to collect uuids which require further asset fetches but mark the others as gathered 329 // Here, we want to collect uuids which require further asset fetches but mark the others as gathered
330 try 330 try
331 { 331 {
332 if ((sbyte)AssetType.Bodypart == assetType 332 if ((sbyte)AssetType.Bodypart == assetType
333 || (sbyte)AssetType.Clothing == assetType 333 || (sbyte)AssetType.Clothing == assetType
334 || (sbyte)AssetType.Gesture == assetType 334 || (sbyte)AssetType.Gesture == assetType
335 || (sbyte)AssetType.Notecard == assetType 335 || (sbyte)AssetType.Notecard == assetType
@@ -347,7 +347,7 @@ namespace OpenSim.Region.Framework.Scenes
347 catch (Exception) 347 catch (Exception)
348 { 348 {
349 m_log.ErrorFormat( 349 m_log.ErrorFormat(
350 "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}", 350 "[UUID GATHERER]: Failed to gather uuids for asset id {0}, type {1}",
351 assetUuid, assetType); 351 assetUuid, assetType);
352 throw; 352 throw;
353 } 353 }
@@ -511,7 +511,7 @@ namespace OpenSim.Region.Framework.Scenes
511 /// </summary> 511 /// </summary>
512 /// <param name="gestureAsset"></param> 512 /// <param name="gestureAsset"></param>
513 private void RecordGestureAssetUuids(AssetBase gestureAsset) 513 private void RecordGestureAssetUuids(AssetBase gestureAsset)
514 { 514 {
515 using (MemoryStream ms = new MemoryStream(gestureAsset.Data)) 515 using (MemoryStream ms = new MemoryStream(gestureAsset.Data))
516 using (StreamReader sr = new StreamReader(ms)) 516 using (StreamReader sr = new StreamReader(ms))
517 { 517 {
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 8b8ebe0..83b534b 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -589,8 +589,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
589 { 589 {
590 return new Dictionary<UUID, ulong>(); 590 return new Dictionary<UUID, ulong>();
591 } 591 }
592 592
593 public void SetGroupPowers(Dictionary<UUID, ulong> powers) { } 593 public void SetGroupPowers(Dictionary<UUID, ulong> powers) { }
594 594
595 public ulong GetGroupPowers(UUID groupID) 595 public ulong GetGroupPowers(UUID groupID)
596 { 596 {
@@ -898,12 +898,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
898 898
899 public void InPacket(object NewPack) 899 public void InPacket(object NewPack)
900 { 900 {
901 901
902 } 902 }
903 903
904 public void ProcessInPacket(Packet NewPack) 904 public void ProcessInPacket(Packet NewPack)
905 { 905 {
906 906
907 } 907 }
908 908
909 public void Close() 909 public void Close()
@@ -953,32 +953,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
953 953
954 public void SendWearables(AvatarWearable[] wearables, int serial) 954 public void SendWearables(AvatarWearable[] wearables, int serial)
955 { 955 {
956 956
957 } 957 }
958 958
959 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) 959 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
960 { 960 {
961 961
962 } 962 }
963 963
964 public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures) 964 public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures)
965 { 965 {
966 966
967 } 967 }
968 968
969 public void SendStartPingCheck(byte seq) 969 public void SendStartPingCheck(byte seq)
970 { 970 {
971 971
972 } 972 }
973 973
974 public void SendKillObject(List<uint> localID) 974 public void SendKillObject(List<uint> localID)
975 { 975 {
976 976
977 } 977 }
978 978
979 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 979 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
980 { 980 {
981 981
982 } 982 }
983 983
984 public void SendChatMessage( 984 public void SendChatMessage(
@@ -1005,7 +1005,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1005 1005
1006 public void SendGenericMessage(string method, UUID invoice, List<byte[]> message) 1006 public void SendGenericMessage(string method, UUID invoice, List<byte[]> message)
1007 { 1007 {
1008 1008
1009 } 1009 }
1010 1010
1011 public virtual bool CanSendLayerData() 1011 public virtual bool CanSendLayerData()
@@ -1015,32 +1015,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1015 1015
1016 public void SendLayerData(float[] map) 1016 public void SendLayerData(float[] map)
1017 { 1017 {
1018 1018
1019 } 1019 }
1020 1020
1021 public void SendLayerData(int px, int py, float[] map) 1021 public void SendLayerData(int px, int py, float[] map)
1022 { 1022 {
1023 1023
1024 } 1024 }
1025 1025
1026 public void SendWindData(int version, Vector2[] windSpeeds) 1026 public void SendWindData(int version, Vector2[] windSpeeds)
1027 { 1027 {
1028 1028
1029 } 1029 }
1030 1030
1031 public void SendCloudData(int version, float[] cloudCover) 1031 public void SendCloudData(int version, float[] cloudCover)
1032 { 1032 {
1033 1033
1034 } 1034 }
1035 1035
1036 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 1036 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
1037 { 1037 {
1038 1038
1039 } 1039 }
1040 1040
1041 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) 1041 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
1042 { 1042 {
1043 1043
1044 } 1044 }
1045 1045
1046 public AgentCircuitData RequestClientInfo() 1046 public AgentCircuitData RequestClientInfo()
@@ -1050,32 +1050,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1050 1050
1051 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) 1051 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
1052 { 1052 {
1053 1053
1054 } 1054 }
1055 1055
1056 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) 1056 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
1057 { 1057 {
1058 1058
1059 } 1059 }
1060 1060
1061 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) 1061 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
1062 { 1062 {
1063 1063
1064 } 1064 }
1065 1065
1066 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) 1066 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
1067 { 1067 {
1068 1068
1069 } 1069 }
1070 1070
1071 public void SendTeleportFailed(string reason) 1071 public void SendTeleportFailed(string reason)
1072 { 1072 {
1073 1073
1074 } 1074 }
1075 1075
1076 public void SendTeleportStart(uint flags) 1076 public void SendTeleportStart(uint flags)
1077 { 1077 {
1078 1078
1079 } 1079 }
1080 1080
1081 public void SendTeleportProgress(uint flags, string message) 1081 public void SendTeleportProgress(uint flags, string message)
@@ -1084,17 +1084,17 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1084 1084
1085 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) 1085 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item)
1086 { 1086 {
1087 1087
1088 } 1088 }
1089 1089
1090 public void SendPayPrice(UUID objectID, int[] payPrice) 1090 public void SendPayPrice(UUID objectID, int[] payPrice)
1091 { 1091 {
1092 1092
1093 } 1093 }
1094 1094
1095 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) 1095 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
1096 { 1096 {
1097 1097
1098 } 1098 }
1099 1099
1100 public void SendAvatarDataImmediate(ISceneEntity avatar) 1100 public void SendAvatarDataImmediate(ISceneEntity avatar)
@@ -1119,12 +1119,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1119 1119
1120 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) 1120 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
1121 { 1121 {
1122 1122
1123 } 1123 }
1124 1124
1125 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 1125 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1126 { 1126 {
1127 1127
1128 } 1128 }
1129 1129
1130 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 1130 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
@@ -1139,72 +1139,72 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1139 1139
1140 public void SendRemoveInventoryItem(UUID itemID) 1140 public void SendRemoveInventoryItem(UUID itemID)
1141 { 1141 {
1142 1142
1143 } 1143 }
1144 1144
1145 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) 1145 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
1146 { 1146 {
1147 1147
1148 } 1148 }
1149 1149
1150 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) 1150 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
1151 { 1151 {
1152 1152
1153 } 1153 }
1154 1154
1155 public void SendBulkUpdateInventory(InventoryNodeBase node) 1155 public void SendBulkUpdateInventory(InventoryNodeBase node)
1156 { 1156 {
1157 1157
1158 } 1158 }
1159 1159
1160 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) 1160 public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory)
1161 { 1161 {
1162 1162
1163 } 1163 }
1164 1164
1165 public void SendAbortXferPacket(ulong xferID) 1165 public void SendAbortXferPacket(ulong xferID)
1166 { 1166 {
1167 1167
1168 } 1168 }
1169 1169
1170 public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) 1170 public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
1171 { 1171 {
1172 1172
1173 } 1173 }
1174 1174
1175 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) 1175 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
1176 { 1176 {
1177 1177
1178 } 1178 }
1179 1179
1180 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 1180 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1181 { 1181 {
1182 1182
1183 } 1183 }
1184 1184
1185 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) 1185 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
1186 { 1186 {
1187 1187
1188 } 1188 }
1189 1189
1190 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) 1190 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
1191 { 1191 {
1192 1192
1193 } 1193 }
1194 1194
1195 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) 1195 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
1196 { 1196 {
1197 1197
1198 } 1198 }
1199 1199
1200 public void SendAttachedSoundGainChange(UUID objectID, float gain) 1200 public void SendAttachedSoundGainChange(UUID objectID, float gain)
1201 { 1201 {
1202 1202
1203 } 1203 }
1204 1204
1205 public void SendNameReply(UUID profileId, string firstname, string lastname) 1205 public void SendNameReply(UUID profileId, string firstname, string lastname)
1206 { 1206 {
1207 1207
1208 } 1208 }
1209 1209
1210 public void SendAlertMessage(string message) 1210 public void SendAlertMessage(string message)
@@ -1214,12 +1214,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1214 1214
1215 public void SendAgentAlertMessage(string message, bool modal) 1215 public void SendAgentAlertMessage(string message, bool modal)
1216 { 1216 {
1217 1217
1218 } 1218 }
1219 1219
1220 public void SendAlertMessage(string message, string info) 1220 public void SendAlertMessage(string message, string info)
1221 { 1221 {
1222 1222
1223 } 1223 }
1224 1224
1225 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 1225 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
@@ -1229,77 +1229,77 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1229 1229
1230 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) 1230 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
1231 { 1231 {
1232 1232
1233 } 1233 }
1234 1234
1235 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 1235 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
1236 { 1236 {
1237 1237
1238 } 1238 }
1239 1239
1240 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 1240 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
1241 { 1241 {
1242 1242
1243 } 1243 }
1244 1244
1245 public void SendViewerTime(int phase) 1245 public void SendViewerTime(int phase)
1246 { 1246 {
1247 1247
1248 } 1248 }
1249 1249
1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) 1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
1251 { 1251 {
1252 1252
1253 } 1253 }
1254 1254
1255 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) 1255 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
1256 { 1256 {
1257 1257
1258 } 1258 }
1259 1259
1260 public void SendHealth(float health) 1260 public void SendHealth(float health)
1261 { 1261 {
1262 1262
1263 } 1263 }
1264 1264
1265 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) 1265 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
1266 { 1266 {
1267 1267
1268 } 1268 }
1269 1269
1270 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) 1270 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
1271 { 1271 {
1272 1272
1273 } 1273 }
1274 1274
1275 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 1275 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
1276 { 1276 {
1277 1277
1278 } 1278 }
1279 1279
1280 public void SendEstateCovenantInformation(UUID covenant) 1280 public void SendEstateCovenantInformation(UUID covenant)
1281 { 1281 {
1282 1282
1283 } 1283 }
1284 1284
1285 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) 1285 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner)
1286 { 1286 {
1287 1287
1288 } 1288 }
1289 1289
1290 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 1290 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
1291 { 1291 {
1292 1292
1293 } 1293 }
1294 1294
1295 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID) 1295 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)
1296 { 1296 {
1297 1297
1298 } 1298 }
1299 1299
1300 public void SendForceClientSelectObjects(List<uint> objectIDs) 1300 public void SendForceClientSelectObjects(List<uint> objectIDs)
1301 { 1301 {
1302 1302
1303 } 1303 }
1304 1304
1305 public void SendCameraConstraint(Vector4 ConstraintPlane) 1305 public void SendCameraConstraint(Vector4 ConstraintPlane)
@@ -1309,57 +1309,57 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1309 1309
1310 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount) 1310 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
1311 { 1311 {
1312 1312
1313 } 1313 }
1314 1314
1315 public void SendLandParcelOverlay(byte[] data, int sequence_id) 1315 public void SendLandParcelOverlay(byte[] data, int sequence_id)
1316 { 1316 {
1317 1317
1318 } 1318 }
1319 1319
1320 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) 1320 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
1321 { 1321 {
1322 1322
1323 } 1323 }
1324 1324
1325 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) 1325 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
1326 { 1326 {
1327 1327
1328 } 1328 }
1329 1329
1330 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 1330 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
1331 { 1331 {
1332 1332
1333 } 1333 }
1334 1334
1335 public void SendConfirmXfer(ulong xferID, uint PacketID) 1335 public void SendConfirmXfer(ulong xferID, uint PacketID)
1336 { 1336 {
1337 1337
1338 } 1338 }
1339 1339
1340 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) 1340 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
1341 { 1341 {
1342 1342
1343 } 1343 }
1344 1344
1345 public void SendInitiateDownload(string simFileName, string clientFileName) 1345 public void SendInitiateDownload(string simFileName, string clientFileName)
1346 { 1346 {
1347 1347
1348 } 1348 }
1349 1349
1350 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 1350 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
1351 { 1351 {
1352 1352
1353 } 1353 }
1354 1354
1355 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 1355 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
1356 { 1356 {
1357 1357
1358 } 1358 }
1359 1359
1360 public void SendImageNotFound(UUID imageid) 1360 public void SendImageNotFound(UUID imageid)
1361 { 1361 {
1362 1362
1363 } 1363 }
1364 1364
1365 public void SendShutdownConnectionNotice() 1365 public void SendShutdownConnectionNotice()
@@ -1369,12 +1369,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1369 1369
1370 public void SendSimStats(SimStats stats) 1370 public void SendSimStats(SimStats stats)
1371 { 1371 {
1372 1372
1373 } 1373 }
1374 1374
1375 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) 1375 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
1376 { 1376 {
1377 1377
1378 } 1378 }
1379 1379
1380 public void SendObjectPropertiesReply(ISceneEntity entity) 1380 public void SendObjectPropertiesReply(ISceneEntity entity)
@@ -1383,12 +1383,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1383 1383
1384 public void SendAgentOffline(UUID[] agentIDs) 1384 public void SendAgentOffline(UUID[] agentIDs)
1385 { 1385 {
1386 1386
1387 } 1387 }
1388 1388
1389 public void SendAgentOnline(UUID[] agentIDs) 1389 public void SendAgentOnline(UUID[] agentIDs)
1390 { 1390 {
1391 1391
1392 } 1392 }
1393 1393
1394 public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) 1394 public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY)
@@ -1397,62 +1397,62 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1397 1397
1398 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 1398 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
1399 { 1399 {
1400 1400
1401 } 1401 }
1402 1402
1403 public void SendAdminResponse(UUID Token, uint AdminLevel) 1403 public void SendAdminResponse(UUID Token, uint AdminLevel)
1404 { 1404 {
1405 1405
1406 } 1406 }
1407 1407
1408 public void SendGroupMembership(GroupMembershipData[] GroupMembership) 1408 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
1409 { 1409 {
1410 1410
1411 } 1411 }
1412 1412
1413 public void SendGroupNameReply(UUID groupLLUID, string GroupName) 1413 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
1414 { 1414 {
1415 1415
1416 } 1416 }
1417 1417
1418 public void SendJoinGroupReply(UUID groupID, bool success) 1418 public void SendJoinGroupReply(UUID groupID, bool success)
1419 { 1419 {
1420 1420
1421 } 1421 }
1422 1422
1423 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 1423 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
1424 { 1424 {
1425 1425
1426 } 1426 }
1427 1427
1428 public void SendLeaveGroupReply(UUID groupID, bool success) 1428 public void SendLeaveGroupReply(UUID groupID, bool success)
1429 { 1429 {
1430 1430
1431 } 1431 }
1432 1432
1433 public void SendCreateGroupReply(UUID groupID, bool success, string message) 1433 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1434 { 1434 {
1435 1435
1436 } 1436 }
1437 1437
1438 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) 1438 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
1439 { 1439 {
1440 1440
1441 } 1441 }
1442 1442
1443 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) 1443 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
1444 { 1444 {
1445 1445
1446 } 1446 }
1447 1447
1448 public void SendAsset(AssetRequestToClient req) 1448 public void SendAsset(AssetRequestToClient req)
1449 { 1449 {
1450 1450
1451 } 1451 }
1452 1452
1453 public void SendTexture(AssetBase TextureAsset) 1453 public void SendTexture(AssetBase TextureAsset)
1454 { 1454 {
1455 1455
1456 } 1456 }
1457 1457
1458 public virtual void SetChildAgentThrottle(byte[] throttle) 1458 public virtual void SetChildAgentThrottle(byte[] throttle)
@@ -1467,7 +1467,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1467 1467
1468 public void SetAgentThrottleSilent(int throttle, int setting) 1468 public void SetAgentThrottleSilent(int throttle, int setting)
1469 { 1469 {
1470 1470
1471 1471
1472 } 1472 }
1473 public byte[] GetThrottlesPacked(float multiplier) 1473 public byte[] GetThrottlesPacked(float multiplier)
@@ -1498,12 +1498,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1498 1498
1499 public void SetClientInfo(ClientInfo info) 1499 public void SetClientInfo(ClientInfo info)
1500 { 1500 {
1501 1501
1502 } 1502 }
1503 1503
1504 public void SetClientOption(string option, string value) 1504 public void SetClientOption(string option, string value)
1505 { 1505 {
1506 1506
1507 } 1507 }
1508 1508
1509 public string GetClientOption(string option) 1509 public string GetClientOption(string option)
@@ -1518,67 +1518,67 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1518 1518
1519 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) 1519 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
1520 { 1520 {
1521 1521
1522 } 1522 }
1523 1523
1524 public void SendClearFollowCamProperties(UUID objectID) 1524 public void SendClearFollowCamProperties(UUID objectID)
1525 { 1525 {
1526 1526
1527 } 1527 }
1528 1528
1529 public void SendRegionHandle(UUID regoinID, ulong handle) 1529 public void SendRegionHandle(UUID regoinID, ulong handle)
1530 { 1530 {
1531 1531
1532 } 1532 }
1533 1533
1534 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) 1534 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
1535 { 1535 {
1536 1536
1537 } 1537 }
1538 1538
1539 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) 1539 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
1540 { 1540 {
1541 1541
1542 } 1542 }
1543 1543
1544 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) 1544 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
1545 { 1545 {
1546 1546
1547 } 1547 }
1548 1548
1549 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) 1549 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
1550 { 1550 {
1551 1551
1552 } 1552 }
1553 1553
1554 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) 1554 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
1555 { 1555 {
1556 1556
1557 } 1557 }
1558 1558
1559 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) 1559 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1560 { 1560 {
1561 1561
1562 } 1562 }
1563 1563
1564 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) 1564 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1565 { 1565 {
1566 1566
1567 } 1567 }
1568 1568
1569 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) 1569 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1570 { 1570 {
1571 1571
1572 } 1572 }
1573 1573
1574 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) 1574 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1575 { 1575 {
1576 1576
1577 } 1577 }
1578 1578
1579 public void SendEventInfoReply(EventData info) 1579 public void SendEventInfoReply(EventData info)
1580 { 1580 {
1581 1581
1582 } 1582 }
1583 1583
1584 public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint) 1584 public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List<Vector3> SpawnPoint)
@@ -1588,7 +1588,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1588 1588
1589 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 1589 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1590 { 1590 {
1591 1591
1592 } 1592 }
1593 1593
1594 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 1594 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
@@ -1603,78 +1603,78 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1603 1603
1604 public void SendOfferCallingCard(UUID srcID, UUID transactionID) 1604 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
1605 { 1605 {
1606 1606
1607 } 1607 }
1608 1608
1609 public void SendAcceptCallingCard(UUID transactionID) 1609 public void SendAcceptCallingCard(UUID transactionID)
1610 { 1610 {
1611 1611
1612 } 1612 }
1613 1613
1614 public void SendDeclineCallingCard(UUID transactionID) 1614 public void SendDeclineCallingCard(UUID transactionID)
1615 { 1615 {
1616 1616
1617 } 1617 }
1618 1618
1619 public void SendTerminateFriend(UUID exFriendID) 1619 public void SendTerminateFriend(UUID exFriendID)
1620 { 1620 {
1621 1621
1622 } 1622 }
1623 1623
1624 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) 1624 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1625 { 1625 {
1626 1626
1627 } 1627 }
1628 1628
1629 public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) 1629 public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price)
1630 { 1630 {
1631 1631
1632 } 1632 }
1633 1633
1634 public void SendAgentDropGroup(UUID groupID) 1634 public void SendAgentDropGroup(UUID groupID)
1635 { 1635 {
1636 1636
1637 } 1637 }
1638 1638
1639 public void RefreshGroupMembership() 1639 public void RefreshGroupMembership()
1640 { 1640 {
1641 1641
1642 } 1642 }
1643 1643
1644 public void UpdateGroupMembership(GroupMembershipData[] data) 1644 public void UpdateGroupMembership(GroupMembershipData[] data)
1645 { 1645 {
1646 1646
1647 } 1647 }
1648 1648
1649 public void GroupMembershipRemove(UUID GroupID) 1649 public void GroupMembershipRemove(UUID GroupID)
1650 { 1650 {
1651 1651
1652 } 1652 }
1653 1653
1654 public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers) 1654 public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
1655 { 1655 {
1656 1656
1657 } 1657 }
1658 1658
1659 1659
1660 public void SendAvatarNotesReply(UUID targetID, string text) 1660 public void SendAvatarNotesReply(UUID targetID, string text)
1661 { 1661 {
1662 1662
1663 } 1663 }
1664 1664
1665 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) 1665 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1666 { 1666 {
1667 1667
1668 } 1668 }
1669 1669
1670 public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) 1670 public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled)
1671 { 1671 {
1672 1672
1673 } 1673 }
1674 1674
1675 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) 1675 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1676 { 1676 {
1677 1677
1678 } 1678 }
1679 1679
1680 public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) 1680 public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages)
@@ -1684,22 +1684,22 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1684 1684
1685 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) 1685 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1686 { 1686 {
1687 1687
1688 } 1688 }
1689 1689
1690 public void SendUserInfoReply(bool imViaEmail, bool visible, string email) 1690 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1691 { 1691 {
1692 1692
1693 } 1693 }
1694 1694
1695 public void SendUseCachedMuteList() 1695 public void SendUseCachedMuteList()
1696 { 1696 {
1697 1697
1698 } 1698 }
1699 1699
1700 public void SendMuteListUpdate(string filename) 1700 public void SendMuteListUpdate(string filename)
1701 { 1701 {
1702 1702
1703 } 1703 }
1704 1704
1705 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) 1705 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
@@ -1716,15 +1716,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1716 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1716 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1717 { 1717 {
1718 } 1718 }
1719 1719
1720 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1720 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1721 { 1721 {
1722 } 1722 }
1723 1723
1724 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1724 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1725 { 1725 {
1726 } 1726 }
1727 1727
1728 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1728 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1729 { 1729 {
1730 } 1730 }
@@ -1748,7 +1748,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1748 public void SendAgentTerseUpdate(ISceneEntity presence) 1748 public void SendAgentTerseUpdate(ISceneEntity presence)
1749 { 1749 {
1750 } 1750 }
1751 1751
1752 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) 1752 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
1753 { 1753 {
1754 } 1754 }
diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
index c897aa5..e93fcdc 100644
--- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
@@ -54,36 +54,36 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
56 private Scene m_scene; 56 private Scene m_scene;
57 57
58 public string Name { get { return "Asset Information Module"; } } 58 public string Name { get { return "Asset Information Module"; } }
59 59
60 public Type ReplaceableInterface { get { return null; } } 60 public Type ReplaceableInterface { get { return null; } }
61 61
62 public void Initialise(IConfigSource source) 62 public void Initialise(IConfigSource source)
63 { 63 {
64// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: INITIALIZED MODULE"); 64// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: INITIALIZED MODULE");
65 } 65 }
66 66
67 public void PostInitialise() 67 public void PostInitialise()
68 { 68 {
69// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: POST INITIALIZED MODULE"); 69// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: POST INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: CLOSED MODULE"); 74// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RegionLoaded(Scene scene) 87 public void RegionLoaded(Scene scene)
88 { 88 {
89// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 89// m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -117,10 +117,10 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
117 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 117 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
118 return; 118 return;
119 } 119 }
120 120
121 AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); 121 AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
122 if (asset == null) 122 if (asset == null)
123 { 123 {
124 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 124 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
125 return; 125 return;
126 } 126 }
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 071530b..3be5a07 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -52,48 +52,48 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
52 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] 52 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")]
53 public class LindenUDPInfoModule : ISharedRegionModule 53 public class LindenUDPInfoModule : ISharedRegionModule
54 { 54 {
55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 57 protected Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
58 58
59 public string Name { get { return "Linden UDP Module"; } } 59 public string Name { get { return "Linden UDP Module"; } }
60 60
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); 65// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE");
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); 70// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE");
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); 75// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE");
76 } 76 }
77 77
78 public void AddRegion(Scene scene) 78 public void AddRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
81 81
82 lock (m_scenes) 82 lock (m_scenes)
83 m_scenes[scene.RegionInfo.RegionID] = scene; 83 m_scenes[scene.RegionInfo.RegionID] = scene;
84 84
85 scene.AddCommand( 85 scene.AddCommand(
86 "Comms", this, "show pqueues", 86 "Comms", this, "show pqueues",
87 "show pqueues [full]", 87 "show pqueues [full]",
88 "Show priority queue data for each client", 88 "Show priority queue data for each client",
89 "Without the 'full' option, only root agents are shown." 89 "Without the 'full' option, only root agents are shown."
90 + " With the 'full' option child agents are also shown.", 90 + " With the 'full' option child agents are also shown.",
91 (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); 91 (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd)));
92 92
93 scene.AddCommand( 93 scene.AddCommand(
94 "Comms", this, "show queues", 94 "Comms", this, "show queues",
95 "show queues [full]", 95 "show queues [full]",
96 "Show queue data for each client", 96 "Show queue data for each client",
97 "Without the 'full' option, only root agents are shown.\n" 97 "Without the 'full' option, only root agents are shown.\n"
98 + "With the 'full' option child agents are also shown.\n\n" 98 + "With the 'full' option child agents are also shown.\n\n"
99 + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n" 99 + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n"
@@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
116 "clear image queues <first-name> <last-name>", 116 "clear image queues <first-name> <last-name>",
117 "Clear the image queues (textures downloaded via UDP) for a particular client.", 117 "Clear the image queues (textures downloaded via UDP) for a particular client.",
118 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); 118 (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd)));
119 119
120 scene.AddCommand( 120 scene.AddCommand(
121 "Comms", this, "show throttles", 121 "Comms", this, "show throttles",
122 "show throttles [full]", 122 "show throttles [full]",
123 "Show throttle settings for each client and for the server overall", 123 "Show throttle settings for each client and for the server overall",
124 "Without the 'full' option, only root agents are shown." 124 "Without the 'full' option, only root agents are shown."
125 + " With the 'full' option child agents are also shown.", 125 + " With the 'full' option child agents are also shown.",
126 (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); 126 (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd)));
127 127
128 scene.AddCommand( 128 scene.AddCommand(
@@ -134,15 +134,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
134 (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); 134 (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd)));
135 135
136 } 136 }
137 137
138 public void RemoveRegion(Scene scene) 138 public void RemoveRegion(Scene scene)
139 { 139 {
140// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 140// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
141 141
142 lock (m_scenes) 142 lock (m_scenes)
143 m_scenes.Remove(scene.RegionInfo.RegionID); 143 m_scenes.Remove(scene.RegionInfo.RegionID);
144 } 144 }
145 145
146 public void RegionLoaded(Scene scene) 146 public void RegionLoaded(Scene scene)
147 { 147 {
148// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 148// m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
176 foreach (ScenePresence agent in foundAgents) 176 foreach (ScenePresence agent in foundAgents)
177 { 177 {
178 LLClientView client = agent.ControllingClient as LLClientView; 178 LLClientView client = agent.ControllingClient as LLClientView;
179 179
180 if (client == null) 180 if (client == null)
181 return "This command is only supported for LLClientView"; 181 return "This command is only supported for LLClientView";
182 182
@@ -191,10 +191,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
191 } 191 }
192 192
193 protected string GetColumnEntry(string entry, int maxLength, int columnPadding) 193 protected string GetColumnEntry(string entry, int maxLength, int columnPadding)
194 { 194 {
195 return string.Format( 195 return string.Format(
196 "{0,-" + maxLength + "}{1,-" + columnPadding + "}", 196 "{0,-" + maxLength + "}{1,-" + columnPadding + "}",
197 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, 197 entry.Length > maxLength ? entry.Substring(0, maxLength) : entry,
198 ""); 198 "");
199 } 199 }
200 200
@@ -207,29 +207,29 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
207 { 207 {
208 bool showChildren = false; 208 bool showChildren = false;
209 string pname = ""; 209 string pname = "";
210 210
211 if (showParams.Length > 2 && showParams[2] == "full") 211 if (showParams.Length > 2 && showParams[2] == "full")
212 showChildren = true; 212 showChildren = true;
213 else if (showParams.Length > 3) 213 else if (showParams.Length > 3)
214 pname = showParams[2] + " " + showParams[3]; 214 pname = showParams[2] + " " + showParams[3];
215 215
216 StringBuilder report = new StringBuilder(); 216 StringBuilder report = new StringBuilder();
217 217
218 int columnPadding = 2; 218 int columnPadding = 2;
219 int maxNameLength = 18; 219 int maxNameLength = 18;
220 int maxRegionNameLength = 14; 220 int maxRegionNameLength = 14;
221 int maxTypeLength = 4; 221 int maxTypeLength = 4;
222// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; 222// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
223 223
224 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 224 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
225 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 225 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
226 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 226 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
227 227
228 report.AppendFormat( 228 report.AppendFormat(
229 "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", 229 "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n",
230 "Pri 0", 230 "Pri 0",
231 "Pri 1", 231 "Pri 1",
232 "Pri 2", 232 "Pri 2",
233 "Pri 3", 233 "Pri 3",
234 "Pri 4", 234 "Pri 4",
235 "Pri 5", 235 "Pri 5",
@@ -252,16 +252,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
252 bool isChild = client.SceneAgent.IsChildAgent; 252 bool isChild = client.SceneAgent.IsChildAgent;
253 if (isChild && !showChildren) 253 if (isChild && !showChildren)
254 return; 254 return;
255 255
256 string name = client.Name; 256 string name = client.Name;
257 if (pname != "" && name != pname) 257 if (pname != "" && name != pname)
258 return; 258 return;
259 259
260 string regionName = scene.RegionInfo.RegionName; 260 string regionName = scene.RegionInfo.RegionName;
261 261
262 report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); 262 report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
263 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 263 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
264 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 264 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
265 report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); 265 report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString());
266 } 266 }
267 }); 267 });
@@ -306,17 +306,17 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
306 foreach (ScenePresence agent in foundAgents) 306 foreach (ScenePresence agent in foundAgents)
307 { 307 {
308 LLClientView client = agent.ControllingClient as LLClientView; 308 LLClientView client = agent.ControllingClient as LLClientView;
309 309
310 if (client == null) 310 if (client == null)
311 return "This command is only supported for LLClientView"; 311 return "This command is only supported for LLClientView";
312 312
313 J2KImage[] images = client.ImageManager.GetImages(); 313 J2KImage[] images = client.ImageManager.GetImages();
314 314
315 report.AppendFormat( 315 report.AppendFormat(
316 "In region {0} ({1} agent)\n", 316 "In region {0} ({1} agent)\n",
317 agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root"); 317 agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root");
318 report.AppendFormat("Images in queue: {0}\n", images.Length); 318 report.AppendFormat("Images in queue: {0}\n", images.Length);
319 319
320 if (images.Length > 0) 320 if (images.Length > 0)
321 { 321 {
322 report.AppendFormat( 322 report.AppendFormat(
@@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
327 "Start Pkt", 327 "Start Pkt",
328 "Has Asset", 328 "Has Asset",
329 "Decoded"); 329 "Decoded");
330 330
331 foreach (J2KImage image in images) 331 foreach (J2KImage image in images)
332 report.AppendFormat( 332 report.AppendFormat(
333 "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", 333 "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n",
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
337 337
338 return report.ToString(); 338 return report.ToString();
339 } 339 }
340 340
341 /// <summary> 341 /// <summary>
342 /// Generate UDP Queue data report for each client 342 /// Generate UDP Queue data report for each client
343 /// </summary> 343 /// </summary>
@@ -347,16 +347,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
347 { 347 {
348 bool showChildren = false; 348 bool showChildren = false;
349 string pname = ""; 349 string pname = "";
350 350
351 if (showParams.Length > 2 && showParams[2] == "full") 351 if (showParams.Length > 2 && showParams[2] == "full")
352 showChildren = true; 352 showChildren = true;
353 else if (showParams.Length > 3) 353 else if (showParams.Length > 3)
354 pname = showParams[2] + " " + showParams[3]; 354 pname = showParams[2] + " " + showParams[3];
355 355
356 StringBuilder report = new StringBuilder(); 356 StringBuilder report = new StringBuilder();
357 357
358 int columnPadding = 2; 358 int columnPadding = 2;
359 int maxNameLength = 18; 359 int maxNameLength = 18;
360 int maxRegionNameLength = 14; 360 int maxRegionNameLength = 14;
361 int maxTypeLength = 4; 361 int maxTypeLength = 4;
362 362
@@ -364,11 +364,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
364 = maxNameLength + columnPadding 364 = maxNameLength + columnPadding
365 + maxRegionNameLength + columnPadding 365 + maxRegionNameLength + columnPadding
366 + maxTypeLength + columnPadding; 366 + maxTypeLength + columnPadding;
367 367
368 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 368 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
369 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 369 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
370 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 370 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
371 371
372 report.AppendFormat( 372 report.AppendFormat(
373 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", 373 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n",
374 "Since", 374 "Since",
@@ -383,7 +383,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
383 "Q Pkts", 383 "Q Pkts",
384 "Q Pkts", 384 "Q Pkts",
385 "Q Pkts"); 385 "Q Pkts");
386 386
387 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 387 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
388 report.AppendFormat( 388 report.AppendFormat(
389 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", 389 "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n",
@@ -398,8 +398,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
398 "Cloud", 398 "Cloud",
399 "Task", 399 "Task",
400 "Texture", 400 "Texture",
401 "Asset"); 401 "Asset");
402 402
403 lock (m_scenes) 403 lock (m_scenes)
404 { 404 {
405 foreach (Scene scene in m_scenes.Values) 405 foreach (Scene scene in m_scenes.Values)
@@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
413 bool isChild = client.SceneAgent.IsChildAgent; 413 bool isChild = client.SceneAgent.IsChildAgent;
414 if (isChild && !showChildren) 414 if (isChild && !showChildren)
415 return; 415 return;
416 416
417 string name = client.Name; 417 string name = client.Name;
418 if (pname != "" && name != pname) 418 if (pname != "" && name != pname)
419 return; 419 return;
@@ -424,7 +424,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
424 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 424 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
425 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 425 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
426 426
427 IStatsCollector stats = (IStatsCollector)client; 427 IStatsCollector stats = (IStatsCollector)client;
428 report.AppendLine(stats.Report()); 428 report.AppendLine(stats.Report());
429 } 429 }
430 }); 430 });
@@ -432,8 +432,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
432 } 432 }
433 433
434 return report.ToString(); 434 return report.ToString();
435 } 435 }
436 436
437 /// <summary> 437 /// <summary>
438 /// Show throttle data 438 /// Show throttle data
439 /// </summary> 439 /// </summary>
@@ -443,28 +443,28 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
443 { 443 {
444 bool showChildren = false; 444 bool showChildren = false;
445 string pname = ""; 445 string pname = "";
446 446
447 if (showParams.Length > 2 && showParams[2] == "full") 447 if (showParams.Length > 2 && showParams[2] == "full")
448 showChildren = true; 448 showChildren = true;
449 else if (showParams.Length > 3) 449 else if (showParams.Length > 3)
450 pname = showParams[2] + " " + showParams[3]; 450 pname = showParams[2] + " " + showParams[3];
451 451
452 StringBuilder report = new StringBuilder(); 452 StringBuilder report = new StringBuilder();
453 453
454 int columnPadding = 2; 454 int columnPadding = 2;
455 int maxNameLength = 18; 455 int maxNameLength = 18;
456 int maxRegionNameLength = 14; 456 int maxRegionNameLength = 14;
457 int maxTypeLength = 4; 457 int maxTypeLength = 4;
458 int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; 458 int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding;
459 459
460 report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); 460 report.Append(GetColumnEntry("User", maxNameLength, columnPadding));
461 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); 461 report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding));
462 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 462 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
463 463
464 report.AppendFormat( 464 report.AppendFormat(
465 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 465 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
466 "Max", 466 "Max",
467 "Target", 467 "Target",
468 "Actual", 468 "Actual",
469 "Resend", 469 "Resend",
470 "Land", 470 "Land",
@@ -472,8 +472,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
472 "Cloud", 472 "Cloud",
473 "Task", 473 "Task",
474 "Texture", 474 "Texture",
475 "Asset"); 475 "Asset");
476 476
477 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 477 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
478 report.AppendFormat( 478 report.AppendFormat(
479 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 479 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
@@ -486,10 +486,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
486 "kb/s", 486 "kb/s",
487 "kb/s", 487 "kb/s",
488 "kb/s", 488 "kb/s",
489 "kb/s"); 489 "kb/s");
490 490
491 report.AppendLine(); 491 report.AppendLine();
492 492
493 lock (m_scenes) 493 lock (m_scenes)
494 { 494 {
495 foreach (Scene scene in m_scenes.Values) 495 foreach (Scene scene in m_scenes.Values)
@@ -504,25 +504,25 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
504 bool isChild = client.SceneAgent.IsChildAgent; 504 bool isChild = client.SceneAgent.IsChildAgent;
505 if (isChild && !showChildren) 505 if (isChild && !showChildren)
506 return; 506 return;
507 507
508 string name = client.Name; 508 string name = client.Name;
509 if (pname != "" && name != pname) 509 if (pname != "" && name != pname)
510 return; 510 return;
511 511
512 string regionName = scene.RegionInfo.RegionName; 512 string regionName = scene.RegionInfo.RegionName;
513 513
514 LLUDPClient llUdpClient = llClient.UDPClient; 514 LLUDPClient llUdpClient = llClient.UDPClient;
515 ClientInfo ci = llUdpClient.GetClientInfo(); 515 ClientInfo ci = llUdpClient.GetClientInfo();
516 516
517 report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); 517 report.Append(GetColumnEntry(name, maxNameLength, columnPadding));
518 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); 518 report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
519 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); 519 report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
520 520
521 report.AppendFormat( 521 report.AppendFormat(
522 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", 522 "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n",
523 ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-", 523 ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-",
524 llUdpClient.FlowThrottle.AdaptiveEnabled 524 llUdpClient.FlowThrottle.AdaptiveEnabled
525 ? ((ci.targetThrottle * 8) / 1000).ToString() 525 ? ((ci.targetThrottle * 8) / 1000).ToString()
526 : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(), 526 : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(),
527 (ci.totalThrottle * 8) / 1000, 527 (ci.totalThrottle * 8) / 1000,
528 (ci.resendThrottle * 8) / 1000, 528 (ci.resendThrottle * 8) / 1000,
@@ -538,7 +538,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
538 } 538 }
539 539
540 return report.ToString(); 540 return report.ToString();
541 } 541 }
542 542
543 /// <summary> 543 /// <summary>
544 /// Show client stats data 544 /// Show client stats data
@@ -568,20 +568,20 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
568 string childAgentStatus; 568 string childAgentStatus;
569 569
570 if (llClient.SceneAgent != null) 570 if (llClient.SceneAgent != null)
571 childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; 571 childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y";
572 else 572 else
573 childAgentStatus = "Off!"; 573 childAgentStatus = "Off!";
574 574
575 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", 575 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}",
576 scene.RegionInfo.RegionName, llClient.Name, 576 scene.RegionInfo.RegionName, llClient.Name,
577 childAgentStatus, 577 childAgentStatus,
578 (DateTime.Now - cinfo.StartedTime).Minutes, 578 (DateTime.Now - cinfo.StartedTime).Minutes,
579 avg_reqs, 579 avg_reqs,
580 string.Format( 580 string.Format(
581 "{0} ({1:0.00}%)", 581 "{0} ({1:0.00}%)",
582 llClient.TotalAgentUpdates, 582 llClient.TotalAgentUpdates,
583 cinfo.SyncRequests.ContainsKey("AgentUpdate") 583 cinfo.SyncRequests.ContainsKey("AgentUpdate")
584 ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 584 ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100
585 : 0)); 585 : 0));
586 } 586 }
587 }); 587 });
diff --git a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
index 7639c6c..906e1ee 100644
--- a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs
@@ -50,36 +50,36 @@ namespace OpenSim.Region.OptionalModules.Asset
50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private Scene m_scene; 52 private Scene m_scene;
53 53
54 public string Name { get { return "Asset Information Module"; } } 54 public string Name { get { return "Asset Information Module"; } }
55 55
56 public Type ReplaceableInterface { get { return null; } } 56 public Type ReplaceableInterface { get { return null; } }
57 57
58 public void Initialise(IConfigSource source) 58 public void Initialise(IConfigSource source)
59 { 59 {
60// m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE"); 60// m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE");
61 } 61 }
62 62
63 public void PostInitialise() 63 public void PostInitialise()
64 { 64 {
65// m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE"); 65// m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE");
66 } 66 }
67 67
68 public void Close() 68 public void Close()
69 { 69 {
70// m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE"); 70// m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE");
71 } 71 }
72 72
73 public void AddRegion(Scene scene) 73 public void AddRegion(Scene scene)
74 { 74 {
75// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 75// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
76 } 76 }
77 77
78 public void RemoveRegion(Scene scene) 78 public void RemoveRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
81 } 81 }
82 82
83 public void RegionLoaded(Scene scene) 83 public void RegionLoaded(Scene scene)
84 { 84 {
85// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 85// m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -118,27 +118,27 @@ namespace OpenSim.Region.OptionalModules.Asset
118 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); 118 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
119 return; 119 return;
120 } 120 }
121 121
122 AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); 122 AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
123 if (asset == null) 123 if (asset == null)
124 { 124 {
125 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); 125 MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
126 return; 126 return;
127 } 127 }
128 128
129 string fileName = rawAssetId; 129 string fileName = rawAssetId;
130 130
131 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) 131 if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName))
132 return; 132 return;
133 133
134 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) 134 using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
135 { 135 {
136 using (BinaryWriter bw = new BinaryWriter(fs)) 136 using (BinaryWriter bw = new BinaryWriter(fs))
137 { 137 {
138 bw.Write(asset.Data); 138 bw.Write(asset.Data);
139 } 139 }
140 } 140 }
141 141
142 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); 142 MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
143 } 143 }
144 144
diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
index 5c45e4d..0698cec 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
@@ -57,41 +57,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
57 private List<Scene> m_scenes = new List<Scene>(); 57 private List<Scene> m_scenes = new List<Scene>();
58 58
59 public string Name { get { return "Animations Command Module"; } } 59 public string Name { get { return "Animations Command Module"; } }
60 60
61 public Type ReplaceableInterface { get { return null; } } 61 public Type ReplaceableInterface { get { return null; } }
62 62
63 public void Initialise(IConfigSource source) 63 public void Initialise(IConfigSource source)
64 { 64 {
65// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); 65// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE");
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); 70// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE");
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); 75// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE");
76 } 76 }
77 77
78 public void AddRegion(Scene scene) 78 public void AddRegion(Scene scene)
79 { 79 {
80// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 80// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
81 } 81 }
82 82
83 public void RemoveRegion(Scene scene) 83 public void RemoveRegion(Scene scene)
84 { 84 {
85// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 85// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
86 86
87 lock (m_scenes) 87 lock (m_scenes)
88 m_scenes.Remove(scene); 88 m_scenes.Remove(scene);
89 } 89 }
90 90
91 public void RegionLoaded(Scene scene) 91 public void RegionLoaded(Scene scene)
92 { 92 {
93// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 93// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
94 94
95 lock (m_scenes) 95 lock (m_scenes)
96 m_scenes.Add(scene); 96 m_scenes.Add(scene);
97 97
@@ -156,18 +156,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
156 156
157 string cma = spa.CurrentMovementAnimation; 157 string cma = spa.CurrentMovementAnimation;
158 cdl.AddRow( 158 cdl.AddRow(
159 "Current movement anim", 159 "Current movement anim",
160 string.Format("{0}, {1}", DefaultAvatarAnimations.GetDefaultAnimation(cma), cma)); 160 string.Format("{0}, {1}", DefaultAvatarAnimations.GetDefaultAnimation(cma), cma));
161 161
162 UUID defaultAnimId = anims.DefaultAnimation.AnimID; 162 UUID defaultAnimId = anims.DefaultAnimation.AnimID;
163 cdl.AddRow( 163 cdl.AddRow(
164 "Default anim", 164 "Default anim",
165 string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId))); 165 string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId)));
166 166
167 UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID; 167 UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID;
168 cdl.AddRow( 168 cdl.AddRow(
169 "Implicit default anim", 169 "Implicit default anim",
170 string.Format("{0}, {1}", 170 string.Format("{0}, {1}",
171 implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId))); 171 implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId)));
172 172
173 cdl.AddToStringBuilder(sb); 173 cdl.AddToStringBuilder(sb);
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 2f9bb1e..60ae0cb 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -54,43 +54,43 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
54 private List<Scene> m_scenes = new List<Scene>(); 54 private List<Scene> m_scenes = new List<Scene>();
55 55
56// private IAvatarFactoryModule m_avatarFactory; 56// private IAvatarFactoryModule m_avatarFactory;
57 57
58 public string Name { get { return "Appearance Information Module"; } } 58 public string Name { get { return "Appearance Information Module"; } }
59 59
60 public Type ReplaceableInterface { get { return null; } } 60 public Type ReplaceableInterface { get { return null; } }
61 61
62 public void Initialise(IConfigSource source) 62 public void Initialise(IConfigSource source)
63 { 63 {
64// m_log.DebugFormat("[APPEARANCE INFO MODULE]: INITIALIZED MODULE"); 64// m_log.DebugFormat("[APPEARANCE INFO MODULE]: INITIALIZED MODULE");
65 } 65 }
66 66
67 public void PostInitialise() 67 public void PostInitialise()
68 { 68 {
69// m_log.DebugFormat("[APPEARANCE INFO MODULE]: POST INITIALIZED MODULE"); 69// m_log.DebugFormat("[APPEARANCE INFO MODULE]: POST INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74// m_log.DebugFormat("[APPEARANCE INFO MODULE]: CLOSED MODULE"); 74// m_log.DebugFormat("[APPEARANCE INFO MODULE]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 85
86 lock (m_scenes) 86 lock (m_scenes)
87 m_scenes.Remove(scene); 87 m_scenes.Remove(scene);
88 } 88 }
89 89
90 public void RegionLoaded(Scene scene) 90 public void RegionLoaded(Scene scene)
91 { 91 {
92// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 92// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
93 93
94 lock (m_scenes) 94 lock (m_scenes)
95 m_scenes.Add(scene); 95 m_scenes.Add(scene);
96 96
@@ -99,7 +99,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
99 "show appearance [<first-name> <last-name>]", 99 "show appearance [<first-name> <last-name>]",
100 "Synonym for 'appearance show'", 100 "Synonym for 'appearance show'",
101 HandleShowAppearanceCommand); 101 HandleShowAppearanceCommand);
102 102
103 scene.AddCommand( 103 scene.AddCommand(
104 "Users", this, "appearance show", 104 "Users", this, "appearance show",
105 "appearance show [<first-name> <last-name>]", 105 "appearance show [<first-name> <last-name>]",
@@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
222 } 222 }
223 223
224 lock (m_scenes) 224 lock (m_scenes)
225 { 225 {
226 foreach (Scene scene in m_scenes) 226 foreach (Scene scene in m_scenes)
227 { 227 {
228 if (targetNameSupplied) 228 if (targetNameSupplied)
@@ -344,7 +344,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
344 344
345 if (targetNameSupplied) 345 if (targetNameSupplied)
346 { 346 {
347 lock (m_scenes) 347 lock (m_scenes)
348 { 348 {
349 foreach (Scene scene in m_scenes) 349 foreach (Scene scene in m_scenes)
350 { 350 {
@@ -360,12 +360,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
360 cdt.AddColumn("Name", ConsoleDisplayUtil.UserNameSize); 360 cdt.AddColumn("Name", ConsoleDisplayUtil.UserNameSize);
361 cdt.AddColumn("Wearables", 2); 361 cdt.AddColumn("Wearables", 2);
362 362
363 lock (m_scenes) 363 lock (m_scenes)
364 { 364 {
365 foreach (Scene scene in m_scenes) 365 foreach (Scene scene in m_scenes)
366 { 366 {
367 scene.ForEachRootScenePresence( 367 scene.ForEachRootScenePresence(
368 sp => 368 sp =>
369 { 369 {
370 int count = 0; 370 int count = 0;
371 371
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
428 428
429 uuidGatherer.AddForInspection(wi.AssetID); 429 uuidGatherer.AddForInspection(wi.AssetID);
430 uuidGatherer.GatherAll(); 430 uuidGatherer.GatherAll();
431 string[] assetStrings 431 string[] assetStrings
432 = Array.ConvertAll<UUID, string>(uuidGatherer.GatheredUuids.Keys.ToArray(), u => u.ToString()); 432 = Array.ConvertAll<UUID, string>(uuidGatherer.GatheredUuids.Keys.ToArray(), u => u.ToString());
433 433
434 bool[] existChecks = scene.AssetService.AssetsExist(assetStrings); 434 bool[] existChecks = scene.AssetService.AssetsExist(assetStrings);
@@ -438,10 +438,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
438 cdt.AddColumn("Type", 10); 438 cdt.AddColumn("Type", 10);
439 cdt.AddColumn("UUID", ConsoleDisplayUtil.UuidSize); 439 cdt.AddColumn("UUID", ConsoleDisplayUtil.UuidSize);
440 cdt.AddColumn("Found", 5); 440 cdt.AddColumn("Found", 5);
441 441
442 for (int k = 0; k < existChecks.Length; k++) 442 for (int k = 0; k < existChecks.Length; k++)
443 cdt.AddRow( 443 cdt.AddRow(
444 (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])], 444 (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])],
445 assetStrings[k], existChecks[k] ? "yes" : "no"); 445 assetStrings[k], existChecks[k] ? "yes" : "no");
446 446
447 sb.Append(cdt.ToString()); 447 sb.Append(cdt.ToString());
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
index a147e9b..3685041 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs
@@ -55,41 +55,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
55// private IAvatarFactoryModule m_avatarFactory; 55// private IAvatarFactoryModule m_avatarFactory;
56 56
57 public string Name { get { return "Attachments Command Module"; } } 57 public string Name { get { return "Attachments Command Module"; } }
58 58
59 public Type ReplaceableInterface { get { return null; } } 59 public Type ReplaceableInterface { get { return null; } }
60 60
61 public void Initialise(IConfigSource source) 61 public void Initialise(IConfigSource source)
62 { 62 {
63// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: INITIALIZED MODULE"); 63// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: INITIALIZED MODULE");
64 } 64 }
65 65
66 public void PostInitialise() 66 public void PostInitialise()
67 { 67 {
68// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: POST INITIALIZED MODULE"); 68// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: POST INITIALIZED MODULE");
69 } 69 }
70 70
71 public void Close() 71 public void Close()
72 { 72 {
73// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: CLOSED MODULE"); 73// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: CLOSED MODULE");
74 } 74 }
75 75
76 public void AddRegion(Scene scene) 76 public void AddRegion(Scene scene)
77 { 77 {
78// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 78// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
79 } 79 }
80 80
81 public void RemoveRegion(Scene scene) 81 public void RemoveRegion(Scene scene)
82 { 82 {
83// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 83// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
84 84
85 lock (m_scenes) 85 lock (m_scenes)
86 m_scenes.Remove(scene); 86 m_scenes.Remove(scene);
87 } 87 }
88 88
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
92 92
93 lock (m_scenes) 93 lock (m_scenes)
94 m_scenes.Add(scene); 94 m_scenes.Add(scene);
95 95
diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
index 535bf67..ed27385 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
125 SendConsoleOutput(agentID, "Command parameter error"); 125 SendConsoleOutput(agentID, "Command parameter error");
126 return; 126 return;
127 } 127 }
128 128
129 m_scene.StoreExtraSetting("auto_grant_attach_perms", val); 129 m_scene.StoreExtraSetting("auto_grant_attach_perms", val);
130 130
131 SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val)); 131 SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val));
@@ -155,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
155 ScenePresence target; 155 ScenePresence target;
156 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) 156 if (!m_scene.TryGetScenePresence(item.PermsGranter, out target))
157 return 0; 157 return 0;
158 158
159 if (target.UUID != hostPart.ParentGroup.OwnerID) 159 if (target.UUID != hostPart.ParentGroup.OwnerID)
160 { 160 {
161 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); 161 uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions();
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
index 73215cb..27ab32f 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs
@@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes;
38namespace OpenSim.Region.OptionalModules.Avatar.Chat 38namespace OpenSim.Region.OptionalModules.Avatar.Chat
39{ 39{
40 40
41 // An instance of this class exists for each unique combination of 41 // An instance of this class exists for each unique combination of
42 // IRC chat interface characteristics, as determined by the supplied 42 // IRC chat interface characteristics, as determined by the supplied
43 // configuration file. 43 // configuration file.
44 44
@@ -266,11 +266,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
266 ChannelState cs = p_cs; 266 ChannelState cs = p_cs;
267 267
268 // Check to see if we have an existing server/channel setup that can be used 268 // Check to see if we have an existing server/channel setup that can be used
269 // In the absence of variable substitution this will always resolve to the 269 // In the absence of variable substitution this will always resolve to the
270 // same ChannelState instance, and the table will only contains a single 270 // same ChannelState instance, and the table will only contains a single
271 // entry, so the performance considerations for the existing behavior are 271 // entry, so the performance considerations for the existing behavior are
272 // zero. Only the IRC connector is shared, the ChannelState still contains 272 // zero. Only the IRC connector is shared, the ChannelState still contains
273 // values that, while independent of the IRC connetion, do still distinguish 273 // values that, while independent of the IRC connetion, do still distinguish
274 // this region's behavior. 274 // this region's behavior.
275 275
276 lock (IRCBridgeModule.m_channels) 276 lock (IRCBridgeModule.m_channels)
@@ -335,7 +335,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
335 335
336 } 336 }
337 337
338 // These routines allow differentiating changes to 338 // These routines allow differentiating changes to
339 // the underlying channel state. If necessary, a 339 // the underlying channel state. If necessary, a
340 // new channel state will be created. 340 // new channel state will be created.
341 341
@@ -426,7 +426,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
426 } 426 }
427 427
428 // This level of obsessive matching allows us to produce 428 // This level of obsessive matching allows us to produce
429 // a minimal overhead int he case of a server which does 429 // a minimal overhead int he case of a server which does
430 // need to differentiate IRC at a region level. 430 // need to differentiate IRC at a region level.
431 431
432 private bool IsAPerfectMatchFor(ChannelState cs) 432 private bool IsAPerfectMatchFor(ChannelState cs)
@@ -447,8 +447,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
447 ); 447 );
448 } 448 }
449 449
450 // This function implements the variable substitution mechanism 450 // This function implements the variable substitution mechanism
451 // for the configuration values. Each string read from the 451 // for the configuration values. Each string read from the
452 // configuration file is scanned for '[...]' enclosures. Each 452 // configuration file is scanned for '[...]' enclosures. Each
453 // one that is found is replaced by either a runtime variable 453 // one that is found is replaced by either a runtime variable
454 // (%xxx) or an existing configuration key. When no further 454 // (%xxx) or an existing configuration key. When no further
@@ -585,7 +585,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
585 585
586 } 586 }
587 587
588 // This function is lifted from the IRCConnector because it 588 // This function is lifted from the IRCConnector because it
589 // contains information that is not differentiating from an 589 // contains information that is not differentiating from an
590 // IRC point-of-view. 590 // IRC point-of-view.
591 591
@@ -598,7 +598,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
598 { 598 {
599 599
600 // Scan through the set of unique channel configuration for those 600 // Scan through the set of unique channel configuration for those
601 // that belong to this connector. And then forward the message to 601 // that belong to this connector. And then forward the message to
602 // all regions known to those channels. 602 // all regions known to those channels.
603 // Note that this code is responsible for completing some of the 603 // Note that this code is responsible for completing some of the
604 // settings for the inbound OSChatMessage 604 // settings for the inbound OSChatMessage
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
index 941379f..ffbebe7 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs
@@ -97,14 +97,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
97 97
98 // How many regions depend upon this connection 98 // How many regions depend upon this connection
99 // This count is updated by the ChannelState object and reflects the sum 99 // This count is updated by the ChannelState object and reflects the sum
100 // of the region clients associated with the set of associated channel 100 // of the region clients associated with the set of associated channel
101 // state instances. That's why it cannot be managed here. 101 // state instances. That's why it cannot be managed here.
102 102
103 internal int depends = 0; 103 internal int depends = 0;
104 104
105 // This variable counts the number of resets that have been performed 105 // This variable counts the number of resets that have been performed
106 // on the connector. When a listener thread terminates, it checks to 106 // on the connector. When a listener thread terminates, it checks to
107 // see of the reset count has changed before it schedules another 107 // see of the reset count has changed before it schedules another
108 // reset. 108 // reset.
109 109
110 internal int m_resetk = 0; 110 internal int m_resetk = 0;
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
428 public void PrivMsg(string pattern, string from, string region, string msg) 428 public void PrivMsg(string pattern, string from, string region, string msg)
429 { 429 {
430 430
431 // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from, 431 // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from,
432 // String.Format(pattern, m_ircChannel, from, region, msg)); 432 // String.Format(pattern, m_ircChannel, from, region, msg));
433 433
434 // One message to the IRC server 434 // One message to the IRC server
@@ -510,7 +510,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
510 c.Sender = null; 510 c.Sender = null;
511 c.SenderUUID = UUID.Zero; 511 c.SenderUUID = UUID.Zero;
512 512
513 // Is message "\001ACTION foo bar\001"? 513 // Is message "\001ACTION foo bar\001"?
514 // Then change to: "/me foo bar" 514 // Then change to: "/me foo bar"
515 515
516 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) 516 if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION"))
@@ -608,8 +608,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
608 string parms = String.Empty; 608 string parms = String.Empty;
609 609
610 // ":" indicates that a prefix is present 610 // ":" indicates that a prefix is present
611 // There are NEVER more than 17 real 611 // There are NEVER more than 17 real
612 // fields. A parameter that starts with 612 // fields. A parameter that starts with
613 // ":" indicates that the remainder of the 613 // ":" indicates that the remainder of the
614 // line is a single parameter value. 614 // line is a single parameter value.
615 615
@@ -873,7 +873,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
873 } 873 }
874 874
875 // Being marked connected is not enough to ping. Socket establishment can sometimes take a long 875 // Being marked connected is not enough to ping. Socket establishment can sometimes take a long
876 // time, in which case the watch dog might try to ping the server before the socket has been 876 // time, in which case the watch dog might try to ping the server before the socket has been
877 // set up, with nasty side-effects. 877 // set up, with nasty side-effects.
878 878
879 else if (_pdk_ == 0) 879 else if (_pdk_ == 0)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
index 5505001..a3ef83b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs
@@ -414,7 +414,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
414 } 414 }
415 } 415 }
416 416
417 // This method gives the region an opportunity to interfere with 417 // This method gives the region an opportunity to interfere with
418 // message delivery. For now we just enforce the enable/disable 418 // message delivery. For now we just enforce the enable/disable
419 // flag. 419 // flag.
420 420
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
428 } 428 }
429 } 429 }
430 430
431 // This supports any local message traffic that might be needed in 431 // This supports any local message traffic that might be needed in
432 // support of command processing. At present there is none. 432 // support of command processing. At present there is none.
433 433
434 internal void LocalChat(string msg) 434 internal void LocalChat(string msg)
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
index 6c147f4..c0de3d9 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
98 // replace it. 98 // replace it.
99 m_replacingChatModule = false; 99 m_replacingChatModule = false;
100 } 100 }
101 else 101 else
102 { 102 {
103 m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); 103 m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true);
104 } 104 }
@@ -107,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
107 { 107 {
108 m_replacingChatModule = false; 108 m_replacingChatModule = false;
109 } 109 }
110 110
111 m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); 111 m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing");
112 112
113 // take note of concierge channel and of identity 113 // take note of concierge channel and of identity
@@ -119,7 +119,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
119 m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); 119 m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword);
120 m_brokerURI = config.GetString("broker", m_brokerURI); 120 m_brokerURI = config.GetString("broker", m_brokerURI);
121 m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); 121 m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout);
122 122
123 m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami); 123 m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami);
124 124
125 // calculate regions Regex 125 // calculate regions Regex
@@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
207 { 207 {
208 } 208 }
209 209
210 new public Type ReplaceableInterface 210 new public Type ReplaceableInterface
211 { 211 {
212 get { return null; } 212 get { return null; }
213 } 213 }
@@ -278,7 +278,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
278 // range of chat to cover the whole 278 // range of chat to cover the whole
279 // region. however, we don't do this for whisper 279 // region. however, we don't do this for whisper
280 // (got to have some privacy) 280 // (got to have some privacy)
281 if (c.Type != ChatTypeEnum.Whisper) 281 if (c.Type != ChatTypeEnum.Whisper)
282 { 282 {
283 base.OnChatBroadcast(sender, c); 283 base.OnChatBroadcast(sender, c);
284 return; 284 return;
@@ -296,17 +296,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
296 { 296 {
297 client.OnLogout += OnClientLoggedOut; 297 client.OnLogout += OnClientLoggedOut;
298 298
299 if (m_replacingChatModule) 299 if (m_replacingChatModule)
300 client.OnChatFromClient += OnChatFromClient; 300 client.OnChatFromClient += OnChatFromClient;
301 } 301 }
302 302
303 303
304 304
305 public void OnClientLoggedOut(IClientAPI client) 305 public void OnClientLoggedOut(IClientAPI client)
306 { 306 {
307 client.OnLogout -= OnClientLoggedOut; 307 client.OnLogout -= OnClientLoggedOut;
308 client.OnConnectionClosed -= OnClientLoggedOut; 308 client.OnConnectionClosed -= OnClientLoggedOut;
309 309
310 if (m_conciergedScenes.Contains(client.Scene)) 310 if (m_conciergedScenes.Contains(client.Scene))
311 { 311 {
312 Scene scene = client.Scene as Scene; 312 Scene scene = client.Scene as Scene;
@@ -324,7 +324,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
324 Scene scene = agent.Scene; 324 Scene scene = agent.Scene;
325 m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName); 325 m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName);
326 WelcomeAvatar(agent, scene); 326 WelcomeAvatar(agent, scene);
327 AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, 327 AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name,
328 scene.RegionInfo.RegionName, scene.GetRootAgentCount())); 328 scene.RegionInfo.RegionName, scene.GetRootAgentCount()));
329 UpdateBroker(scene); 329 UpdateBroker(scene);
330 } 330 }
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
337 { 337 {
338 Scene scene = agent.Scene; 338 Scene scene = agent.Scene;
339 m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName); 339 m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName);
340 AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, 340 AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name,
341 scene.RegionInfo.RegionName, scene.GetRootAgentCount())); 341 scene.RegionInfo.RegionName, scene.GetRootAgentCount()));
342 UpdateBroker(scene); 342 UpdateBroker(scene);
343 } 343 }
@@ -374,7 +374,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
374 374
375 scene.ForEachRootScenePresence(delegate(ScenePresence sp) 375 scene.ForEachRootScenePresence(delegate(ScenePresence sp)
376 { 376 {
377 list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID)); 377 list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID));
378 }); 378 });
379 379
380 list.Append("</avatars>"); 380 list.Append("</avatars>");
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
437 private void UpdateBrokerDone(IAsyncResult result) 437 private void UpdateBrokerDone(IAsyncResult result)
438 { 438 {
439 BrokerState bs = null; 439 BrokerState bs = null;
440 try 440 try
441 { 441 {
442 bs = result.AsyncState as BrokerState; 442 bs = result.AsyncState as BrokerState;
443 HttpWebRequest updatePost = bs.Poster; 443 HttpWebRequest updatePost = bs.Poster;
@@ -450,15 +450,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
450 catch (WebException we) 450 catch (WebException we)
451 { 451 {
452 m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status); 452 m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status);
453 if (null != we.Response) 453 if (null != we.Response)
454 { 454 {
455 using (HttpWebResponse resp = we.Response as HttpWebResponse) 455 using (HttpWebResponse resp = we.Response as HttpWebResponse)
456 { 456 {
457 m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode); 457 m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode);
458 m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription); 458 m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription);
459 m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server); 459 m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server);
460 460
461 if (resp.ContentLength > 0) 461 if (resp.ContentLength > 0)
462 { 462 {
463 StreamReader content = new StreamReader(resp.GetResponseStream()); 463 StreamReader content = new StreamReader(resp.GetResponseStream());
464 m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); 464 m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd());
@@ -476,12 +476,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
476 // welcome file there: if yes, send it to the agent 476 // welcome file there: if yes, send it to the agent
477 if (!String.IsNullOrEmpty(m_welcomes)) 477 if (!String.IsNullOrEmpty(m_welcomes))
478 { 478 {
479 string[] welcomes = new string[] { 479 string[] welcomes = new string[] {
480 Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName), 480 Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName),
481 Path.Combine(m_welcomes, "DEFAULT")}; 481 Path.Combine(m_welcomes, "DEFAULT")};
482 foreach (string welcome in welcomes) 482 foreach (string welcome in welcomes)
483 { 483 {
484 if (File.Exists(welcome)) 484 if (File.Exists(welcome))
485 { 485 {
486 try 486 try
487 { 487 {
@@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
500 { 500 {
501 m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe); 501 m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe);
502 } 502 }
503 } 503 }
504 return; 504 return;
505 } 505 }
506 m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName); 506 m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName);
@@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
512 // protected void AnnounceToAgentsRegion(Scene scene, string msg) 512 // protected void AnnounceToAgentsRegion(Scene scene, string msg)
513 // { 513 // {
514 // ScenePresence agent = null; 514 // ScenePresence agent = null;
515 // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) 515 // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent))
516 // AnnounceToAgentsRegion(agent, msg); 516 // AnnounceToAgentsRegion(agent, msg);
517 // else 517 // else
518 // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); 518 // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name);
@@ -587,7 +587,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
587 587
588 string regionName = (string)requestData["region"]; 588 string regionName = (string)requestData["region"];
589 IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; }); 589 IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; });
590 if (scene == null) 590 if (scene == null)
591 throw new Exception(String.Format("unknown region \"{0}\"", regionName)); 591 throw new Exception(String.Format("unknown region \"{0}\"", regionName));
592 592
593 if (!m_conciergedScenes.Contains(scene)) 593 if (!m_conciergedScenes.Contains(scene))
diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
index 026ceca..31fc56a 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
@@ -61,31 +61,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
61 private IPresenceService m_presenceService; 61 private IPresenceService m_presenceService;
62 62
63// private IAvatarFactoryModule m_avatarFactory; 63// private IAvatarFactoryModule m_avatarFactory;
64 64
65 public string Name { get { return "Appearance Information Module"; } } 65 public string Name { get { return "Appearance Information Module"; } }
66 66
67 public Type ReplaceableInterface { get { return null; } } 67 public Type ReplaceableInterface { get { return null; } }
68 68
69 public void Initialise(IConfigSource source) 69 public void Initialise(IConfigSource source)
70 { 70 {
71// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: INITIALIZED MODULE"); 71// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: INITIALIZED MODULE");
72 } 72 }
73 73
74 public void PostInitialise() 74 public void PostInitialise()
75 { 75 {
76// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: POST INITIALIZED MODULE"); 76// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: POST INITIALIZED MODULE");
77 } 77 }
78 78
79 public void Close() 79 public void Close()
80 { 80 {
81// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: CLOSED MODULE"); 81// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: CLOSED MODULE");
82 } 82 }
83 83
84 public void AddRegion(Scene scene) 84 public void AddRegion(Scene scene)
85 { 85 {
86// m_log.DebugFormat("[FRIENDS COMMANDO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 86// m_log.DebugFormat("[FRIENDS COMMANDO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
87 } 87 }
88 88
89 public void RemoveRegion(Scene scene) 89 public void RemoveRegion(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[FRIENDS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
index 5a6b284..1b5ee04 100644
--- a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
@@ -54,34 +54,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
54 private Scene m_scene; 54 private Scene m_scene;
55 55
56 public string Name { get { return "SitStand Command Module"; } } 56 public string Name { get { return "SitStand Command Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
78 } 78 }
79 79
80 public void RemoveRegion(Scene scene) 80 public void RemoveRegion(Scene scene)
81 { 81 {
82// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 82// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
83 } 83 }
84 84
85 public void RegionLoaded(Scene scene) 85 public void RegionLoaded(Scene scene)
86 { 86 {
87// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 87// m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
143 if (sitPart != null) 143 if (sitPart != null)
144 { 144 {
145 MainConsole.Instance.OutputFormat( 145 MainConsole.Instance.OutputFormat(
146 "Sitting {0} on {1} {2} in {3}", 146 "Sitting {0} on {1} {2} in {3}",
147 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name); 147 sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
148 148
149 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero); 149 sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
@@ -202,14 +202,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
202 202
203 foreach (ScenePresence sp in scenePresences) 203 foreach (ScenePresence sp in scenePresences)
204 { 204 {
205 if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name)) 205 if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name))
206 scenePresencesMatched.Add(sp); 206 scenePresencesMatched.Add(sp);
207 } 207 }
208 } 208 }
209 else 209 else
210 { 210 {
211 ScenePresence sp = m_scene.GetScenePresence(firstName, lastName); 211 ScenePresence sp = m_scene.GetScenePresence(firstName, lastName);
212 212
213 if (sp != null && !sp.IsChildAgent) 213 if (sp != null && !sp.IsChildAgent)
214 scenePresencesMatched.Add(sp); 214 scenePresencesMatched.Add(sp);
215 } 215 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index 3db0781..c6d7fe6 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
143 if (String.IsNullOrEmpty(m_freeSwitchRealm) || 143 if (String.IsNullOrEmpty(m_freeSwitchRealm) ||
144 String.IsNullOrEmpty(m_freeSwitchAPIPrefix)) 144 String.IsNullOrEmpty(m_freeSwitchAPIPrefix))
145 { 145 {
146 m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting."); 146 m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting.");
147 return; 147 return;
148 } 148 }
149 149
@@ -168,9 +168,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
168 168
169 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), 169 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
170 FreeSwitchSLVoiceBuddyHTTPHandler); 170 FreeSwitchSLVoiceBuddyHTTPHandler);
171 171
172 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_watcher.php", m_freeSwitchAPIPrefix), 172 MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_watcher.php", m_freeSwitchAPIPrefix),
173 FreeSwitchSLVoiceWatcherHTTPHandler); 173 FreeSwitchSLVoiceWatcherHTTPHandler);
174 174
175 m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm); 175 m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm);
176 176
@@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
302 public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) 302 public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps)
303 { 303 {
304 m_log.DebugFormat( 304 m_log.DebugFormat(
305 "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}", 305 "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}",
306 agentID, caps, scene.RegionInfo.RegionName); 306 agentID, caps, scene.RegionInfo.RegionName);
307 307
308 string capsBase = "/CAPS/" + caps.CapsObjectPath; 308 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -352,7 +352,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
352 { 352 {
353 m_log.DebugFormat( 353 m_log.DebugFormat(
354 "[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request: {0}, path: {1}, param: {2}", request, path, param); 354 "[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request: {0}, path: {1}, param: {2}", request, path, param);
355 355
356 ScenePresence avatar = scene.GetScenePresence(agentID); 356 ScenePresence avatar = scene.GetScenePresence(agentID);
357 if (avatar == null) 357 if (avatar == null)
358 { 358 {
@@ -423,9 +423,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
423 UUID agentID, Caps caps) 423 UUID agentID, Caps caps)
424 { 424 {
425 m_log.DebugFormat( 425 m_log.DebugFormat(
426 "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", 426 "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}",
427 scene.RegionInfo.RegionName, agentID); 427 scene.RegionInfo.RegionName, agentID);
428 428
429 ScenePresence avatar = scene.GetScenePresence(agentID); 429 ScenePresence avatar = scene.GetScenePresence(agentID);
430 string avatarName = avatar.Name; 430 string avatarName = avatar.Name;
431 431
@@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
512 512
513 m_log.DebugFormat("[FreeSwitchVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", 513 m_log.DebugFormat("[FreeSwitchVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}",
514 avatarName, request, path, param); 514 avatarName, request, path, param);
515 515
516 return "<llsd>true</llsd>"; 516 return "<llsd>true</llsd>";
517 } 517 }
518 518
@@ -610,7 +610,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
610 public Hashtable FreeSwitchSLVoiceBuddyHTTPHandler(Hashtable request) 610 public Hashtable FreeSwitchSLVoiceBuddyHTTPHandler(Hashtable request)
611 { 611 {
612 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceBuddyHTTPHandler called"); 612 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceBuddyHTTPHandler called");
613 613
614 Hashtable response = new Hashtable(); 614 Hashtable response = new Hashtable();
615 response["int_response_code"] = 200; 615 response["int_response_code"] = 200;
616 response["str_response_string"] = string.Empty; 616 response["str_response_string"] = string.Empty;
@@ -678,16 +678,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
678// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); 678// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline);
679// 679//
680// m_log.DebugFormat( 680// m_log.DebugFormat(
681// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}", 681// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}",
682// normalizeEndLines.Replace((string)response["str_response_string"],"")); 682// normalizeEndLines.Replace((string)response["str_response_string"],""));
683 683
684 return response; 684 return response;
685 } 685 }
686 686
687 public Hashtable FreeSwitchSLVoiceWatcherHTTPHandler(Hashtable request) 687 public Hashtable FreeSwitchSLVoiceWatcherHTTPHandler(Hashtable request)
688 { 688 {
689 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceWatcherHTTPHandler called"); 689 m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceWatcherHTTPHandler called");
690 690
691 Hashtable response = new Hashtable(); 691 Hashtable response = new Hashtable();
692 response["int_response_code"] = 200; 692 response["int_response_code"] = 200;
693 response["content-type"] = "text/xml"; 693 response["content-type"] = "text/xml";
@@ -700,8 +700,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
700 700
701 StringBuilder resp = new StringBuilder(); 701 StringBuilder resp = new StringBuilder();
702 resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">"); 702 resp.Append("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><response xmlns=\"http://www.vivox.com\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation= \"/xsd/buddy_list.xsd\">");
703 703
704 // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't 704 // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't
705 // give an OK response, then viewer 2 engages in an continuous viv_signin.php, viv_buddy.php, viv_watcher.php loop 705 // give an OK response, then viewer 2 engages in an continuous viv_signin.php, viv_buddy.php, viv_watcher.php loop
706 // Viewer 1 appeared happy to ignore the lack of reply and still works with this reply. 706 // Viewer 1 appeared happy to ignore the lack of reply and still works with this reply.
707 // 707 //
@@ -711,19 +711,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
711 <cookie_name>lib_session</cookie_name> 711 <cookie_name>lib_session</cookie_name>
712 <cookie>{0}</cookie> 712 <cookie>{0}</cookie>
713 <auth_token>{0}</auth_token> 713 <auth_token>{0}</auth_token>
714 <body/></level0></response>", auth_token)); 714 <body/></level0></response>", auth_token));
715 715
716 response["str_response_string"] = resp.ToString(); 716 response["str_response_string"] = resp.ToString();
717 717
718// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); 718// Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline);
719// 719//
720// m_log.DebugFormat( 720// m_log.DebugFormat(
721// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}", 721// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}",
722// normalizeEndLines.Replace((string)response["str_response_string"],"")); 722// normalizeEndLines.Replace((string)response["str_response_string"],""));
723 723
724 return response; 724 return response;
725 } 725 }
726 726
727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) 727 public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request)
728 { 728 {
729 //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called"); 729 //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called");
@@ -771,10 +771,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
771 </level0> 771 </level0>
772 </response>", userid, pos, avatarName); 772 </response>", userid, pos, avatarName);
773 773
774 response["int_response_code"] = 200; 774 response["int_response_code"] = 200;
775 775
776// m_log.DebugFormat("[FreeSwitchVoice]: Sending FreeSwitchSLVoiceSigninHTTPHandler response"); 776// m_log.DebugFormat("[FreeSwitchVoice]: Sending FreeSwitchSLVoiceSigninHTTPHandler response");
777 777
778 return response; 778 return response;
779 } 779 }
780 780
@@ -859,23 +859,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
859 response["keepalive"] = false; 859 response["keepalive"] = false;
860 response["int_response_code"] = 500; 860 response["int_response_code"] = 500;
861 861
862 Hashtable requestBody = ParseRequestBody((string)request["body"]); 862 Hashtable requestBody = ParseRequestBody((string)request["body"]);
863 863
864 string section = (string) requestBody["section"]; 864 string section = (string) requestBody["section"];
865 865
866 if (section == "directory") 866 if (section == "directory")
867 { 867 {
868 string eventCallingFunction = (string)requestBody["Event-Calling-Function"]; 868 string eventCallingFunction = (string)requestBody["Event-Calling-Function"];
869 m_log.DebugFormat( 869 m_log.DebugFormat(
870 "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'", 870 "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'",
871 eventCallingFunction); 871 eventCallingFunction);
872 872
873 response = m_FreeswitchService.HandleDirectoryRequest(requestBody); 873 response = m_FreeswitchService.HandleDirectoryRequest(requestBody);
874 } 874 }
875 else if (section == "dialplan") 875 else if (section == "dialplan")
876 { 876 {
877 m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section dialplan"); 877 m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section dialplan");
878 878
879 response = m_FreeswitchService.HandleDialplanRequest(requestBody); 879 response = m_FreeswitchService.HandleDialplanRequest(requestBody);
880 } 880 }
881 else 881 else
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index 5ea4a31..57930d7 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -114,7 +114,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
114 114
115 private static Dictionary<string,string> m_parents = new Dictionary<string,string>(); 115 private static Dictionary<string,string> m_parents = new Dictionary<string,string>();
116 private static bool m_dumpXml; 116 private static bool m_dumpXml;
117 117
118 private IConfig m_config; 118 private IConfig m_config;
119 119
120 private object m_Lock; 120 private object m_Lock;
@@ -153,22 +153,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
153 // Validate against constraints and default if necessary 153 // Validate against constraints and default if necessary
154 if (m_vivoxChannelRollOff < CHAN_ROLL_OFF_MIN || m_vivoxChannelRollOff > CHAN_ROLL_OFF_MAX) 154 if (m_vivoxChannelRollOff < CHAN_ROLL_OFF_MIN || m_vivoxChannelRollOff > CHAN_ROLL_OFF_MAX)
155 { 155 {
156 m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.", 156 m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.",
157 m_vivoxChannelRollOff, CHAN_ROLL_OFF_DEFAULT); 157 m_vivoxChannelRollOff, CHAN_ROLL_OFF_DEFAULT);
158 m_vivoxChannelRollOff = CHAN_ROLL_OFF_DEFAULT; 158 m_vivoxChannelRollOff = CHAN_ROLL_OFF_DEFAULT;
159 } 159 }
160 160
161 if (m_vivoxChannelMaximumRange < CHAN_MAX_RANGE_MIN || m_vivoxChannelMaximumRange > CHAN_MAX_RANGE_MAX) 161 if (m_vivoxChannelMaximumRange < CHAN_MAX_RANGE_MIN || m_vivoxChannelMaximumRange > CHAN_MAX_RANGE_MAX)
162 { 162 {
163 m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.", 163 m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.",
164 m_vivoxChannelMaximumRange, CHAN_MAX_RANGE_DEFAULT); 164 m_vivoxChannelMaximumRange, CHAN_MAX_RANGE_DEFAULT);
165 m_vivoxChannelMaximumRange = CHAN_MAX_RANGE_DEFAULT; 165 m_vivoxChannelMaximumRange = CHAN_MAX_RANGE_DEFAULT;
166 } 166 }
167 167
168 if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN || 168 if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN ||
169 m_vivoxChannelClampingDistance > CHAN_CLAMPING_DISTANCE_MAX) 169 m_vivoxChannelClampingDistance > CHAN_CLAMPING_DISTANCE_MAX)
170 { 170 {
171 m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.", 171 m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.",
172 m_vivoxChannelClampingDistance, CHAN_CLAMPING_DISTANCE_DEFAULT); 172 m_vivoxChannelClampingDistance, CHAN_CLAMPING_DISTANCE_DEFAULT);
173 m_vivoxChannelClampingDistance = CHAN_CLAMPING_DISTANCE_DEFAULT; 173 m_vivoxChannelClampingDistance = CHAN_CLAMPING_DISTANCE_DEFAULT;
174 } 174 }
@@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
180 case "presentation" : break; 180 case "presentation" : break;
181 case "auditorium" : break; 181 case "auditorium" : break;
182 default : 182 default :
183 m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.", 183 m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.",
184 m_vivoxChannelMode, CHAN_MODE_DEFAULT); 184 m_vivoxChannelMode, CHAN_MODE_DEFAULT);
185 m_vivoxChannelMode = CHAN_MODE_DEFAULT; 185 m_vivoxChannelMode = CHAN_MODE_DEFAULT;
186 break; 186 break;
@@ -191,7 +191,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
191 case "positional" : break; 191 case "positional" : break;
192 case "channel" : break; 192 case "channel" : break;
193 default : 193 default :
194 m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.", 194 m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.",
195 m_vivoxChannelType, CHAN_TYPE_DEFAULT); 195 m_vivoxChannelType, CHAN_TYPE_DEFAULT);
196 m_vivoxChannelType = CHAN_TYPE_DEFAULT; 196 m_vivoxChannelType = CHAN_TYPE_DEFAULT;
197 break; 197 break;
@@ -230,7 +230,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
230 230
231 public void AddRegion(Scene scene) 231 public void AddRegion(Scene scene)
232 { 232 {
233 if (m_pluginEnabled) 233 if (m_pluginEnabled)
234 { 234 {
235 lock (vlock) 235 lock (vlock)
236 { 236 {
@@ -238,13 +238,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
238 238
239 string sceneUUID = scene.RegionInfo.RegionID.ToString(); 239 string sceneUUID = scene.RegionInfo.RegionID.ToString();
240 string sceneName = scene.RegionInfo.RegionName; 240 string sceneName = scene.RegionInfo.RegionName;
241 241
242 // Make sure that all local channels are deleted. 242 // Make sure that all local channels are deleted.
243 // So we have to search for the children, and then do an 243 // So we have to search for the children, and then do an
244 // iteration over the set of chidren identified. 244 // iteration over the set of chidren identified.
245 // This assumes that there is just one directory per 245 // This assumes that there is just one directory per
246 // region. 246 // region.
247 247
248 if (VivoxTryGetDirectory(sceneUUID + "D", out channelId)) 248 if (VivoxTryGetDirectory(sceneUUID + "D", out channelId))
249 { 249 {
250 m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}", 250 m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}",
@@ -263,7 +263,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
263 { 263 {
264 if (!IsOK(VivoxDeleteChannel(channelId, id))) 264 if (!IsOK(VivoxDeleteChannel(channelId, id)))
265 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); 265 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id);
266 } 266 }
267 } 267 }
268 } 268 }
269 } 269 }
@@ -311,7 +311,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
311 311
312 public void RemoveRegion(Scene scene) 312 public void RemoveRegion(Scene scene)
313 { 313 {
314 if (m_pluginEnabled) 314 if (m_pluginEnabled)
315 { 315 {
316 lock (vlock) 316 lock (vlock)
317 { 317 {
@@ -319,7 +319,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
319 319
320 string sceneUUID = scene.RegionInfo.RegionID.ToString(); 320 string sceneUUID = scene.RegionInfo.RegionID.ToString();
321 string sceneName = scene.RegionInfo.RegionName; 321 string sceneName = scene.RegionInfo.RegionName;
322 322
323 // Make sure that all local channels are deleted. 323 // Make sure that all local channels are deleted.
324 // So we have to search for the children, and then do an 324 // So we have to search for the children, and then do an
325 // iteration over the set of chidren identified. 325 // iteration over the set of chidren identified.
@@ -343,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
343 { 343 {
344 if (!IsOK(VivoxDeleteChannel(channelId, id))) 344 if (!IsOK(VivoxDeleteChannel(channelId, id)))
345 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); 345 m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id);
346 } 346 }
347 } 347 }
348 } 348 }
349 } 349 }
@@ -353,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
353 353
354 // Remove the channel umbrella entry 354 // Remove the channel umbrella entry
355 355
356 lock (m_parents) 356 lock (m_parents)
357 { 357 {
358 if (m_parents.ContainsKey(sceneUUID)) 358 if (m_parents.ContainsKey(sceneUUID))
359 { 359 {
@@ -375,7 +375,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
375 VivoxLogout(); 375 VivoxLogout();
376 } 376 }
377 377
378 public Type ReplaceableInterface 378 public Type ReplaceableInterface
379 { 379 {
380 get { return null; } 380 get { return null; }
381 } 381 }
@@ -396,11 +396,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
396 // (login, region crossing). We contribute two capabilities to 396 // (login, region crossing). We contribute two capabilities to
397 // the set of capabilities handed back to the client: 397 // the set of capabilities handed back to the client:
398 // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. 398 // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest.
399 // 399 //
400 // ProvisionVoiceAccountRequest allows the client to obtain 400 // ProvisionVoiceAccountRequest allows the client to obtain
401 // the voice account credentials for the avatar it is 401 // the voice account credentials for the avatar it is
402 // controlling (e.g., user name, password, etc). 402 // controlling (e.g., user name, password, etc).
403 // 403 //
404 // ParcelVoiceInfoRequest is invoked whenever the client 404 // ParcelVoiceInfoRequest is invoked whenever the client
405 // changes from one region or parcel to another. 405 // changes from one region or parcel to another.
406 // 406 //
@@ -493,9 +493,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
493 493
494 if (XmlFind(resp, "response.level0.status", out code)) 494 if (XmlFind(resp, "response.level0.status", out code))
495 { 495 {
496 if (code != "OK") 496 if (code != "OK")
497 { 497 {
498 if (XmlFind(resp, "response.level0.body.code", out code)) 498 if (XmlFind(resp, "response.level0.body.code", out code))
499 { 499 {
500 // If the request was recognized, then this should be set to something 500 // If the request was recognized, then this should be set to something
501 switch (code) 501 switch (code)
@@ -530,27 +530,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
530 switch (code) 530 switch (code)
531 { 531 {
532 case "201" : // Account expired 532 case "201" : // Account expired
533 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials", 533 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials",
534 avatarName); 534 avatarName);
535 m_adminConnected = false; 535 m_adminConnected = false;
536 retry = DoAdminLogin(); 536 retry = DoAdminLogin();
537 break; 537 break;
538 538
539 case "202" : // Missing credentials 539 case "202" : // Missing credentials
540 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials", 540 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials",
541 avatarName); 541 avatarName);
542 break; 542 break;
543 543
544 case "212" : // Not authorized 544 case "212" : // Not authorized
545 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : not authorized", 545 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : not authorized",
546 avatarName); 546 avatarName);
547 break; 547 break;
548 548
549 case "300" : // Required parameter missing 549 case "300" : // Required parameter missing
550 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing", 550 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing",
551 avatarName); 551 avatarName);
552 break; 552 break;
553 553
554 case "400" : // Create failed 554 case "400" : // Create failed
555 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : create failed", 555 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : create failed",
556 avatarName); 556 avatarName);
@@ -558,7 +558,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
558 } 558 }
559 } 559 }
560 break; 560 break;
561 561
562 case "404" : // Failed to retrieve account 562 case "404" : // Failed to retrieve account
563 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Get account information failed : retrieve failed"); 563 m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Get account information failed : retrieve failed");
564 // [AMW] Sleep and retry for a fixed period? Or just abandon? 564 // [AMW] Sleep and retry for a fixed period? Or just abandon?
@@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
575 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: Get Account Request failed for \"{0}\"", avatarName); 575 m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: Get Account Request failed for \"{0}\"", avatarName);
576 throw new Exception("Unable to execute request"); 576 throw new Exception("Unable to execute request");
577 } 577 }
578 578
579 // Unconditionally change the password on each request 579 // Unconditionally change the password on each request
580 VivoxPassword(agentname, password); 580 VivoxPassword(agentname, password);
581 581
@@ -613,7 +613,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
613 string avatarName = avatar.Name; 613 string avatarName = avatar.Name;
614 614
615 // - check whether we have a region channel in our cache 615 // - check whether we have a region channel in our cache
616 // - if not: 616 // - if not:
617 // create it and cache it 617 // create it and cache it
618 // - send it to the client 618 // - send it to the client
619 // - send channel_uri: as "sip:regionID@m_sipDomain" 619 // - send channel_uri: as "sip:regionID@m_sipDomain"
@@ -622,7 +622,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
622 LLSDParcelVoiceInfoResponse parcelVoiceInfo; 622 LLSDParcelVoiceInfoResponse parcelVoiceInfo;
623 string channel_uri; 623 string channel_uri;
624 624
625 if (null == scene.LandChannel) 625 if (null == scene.LandChannel)
626 throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", 626 throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available",
627 scene.RegionInfo.RegionName, avatarName)); 627 scene.RegionInfo.RegionName, avatarName));
628 628
@@ -667,15 +667,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
667 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); 667 parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds);
668 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); 668 string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo);
669 669
670// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", 670// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}",
671// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); 671// scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r);
672 return r; 672 return r;
673 } 673 }
674 catch (Exception e) 674 catch (Exception e)
675 { 675 {
676 m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", 676 m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later",
677 scene.RegionInfo.RegionName, avatarName, e.Message); 677 scene.RegionInfo.RegionName, avatarName, e.Message);
678 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", 678 m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed",
679 scene.RegionInfo.RegionName, avatarName, e.ToString()); 679 scene.RegionInfo.RegionName, avatarName, e.ToString());
680 680
681 return "<llsd><undef /></llsd>"; 681 return "<llsd><undef /></llsd>";
@@ -721,17 +721,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
721 { 721 {
722 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); 722 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name);
723 landUUID = land.GlobalID.ToString(); 723 landUUID = land.GlobalID.ToString();
724 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", 724 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
725 landName, land.LocalID, landUUID); 725 landName, land.LocalID, landUUID);
726 } 726 }
727 else 727 else
728 { 728 {
729 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); 729 landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName);
730 landUUID = scene.RegionInfo.RegionID.ToString(); 730 landUUID = scene.RegionInfo.RegionID.ToString();
731 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", 731 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}",
732 landName, land.LocalID, landUUID); 732 landName, land.LocalID, landUUID);
733 } 733 }
734 734
735 lock (vlock) 735 lock (vlock)
736 { 736 {
737 // Added by Adam to help debug channel not availible errors. 737 // Added by Adam to help debug channel not availible errors.
@@ -742,7 +742,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
742 else 742 else
743 throw new Exception("vivox channel uri not available"); 743 throw new Exception("vivox channel uri not available");
744 744
745 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ", 745 m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ",
746 landName, parentId, channelUri); 746 landName, parentId, channelUri);
747 } 747 }
748 748
@@ -817,14 +817,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
817 817
818 /// <summary> 818 /// <summary>
819 /// Create a channel. 819 /// Create a channel.
820 /// Once again, there a multitude of options possible. In the simplest case 820 /// Once again, there a multitude of options possible. In the simplest case
821 /// we specify only the name and get a non-persistent cannel in return. Non 821 /// we specify only the name and get a non-persistent cannel in return. Non
822 /// persistent means that the channel gets deleted if no-one uses it for 822 /// persistent means that the channel gets deleted if no-one uses it for
823 /// 5 hours. To accomodate future requirements, it may be a good idea to 823 /// 5 hours. To accomodate future requirements, it may be a good idea to
824 /// initially create channels under the umbrella of a parent ID based upon 824 /// initially create channels under the umbrella of a parent ID based upon
825 /// the region name. That way we have a context for side channels, if those 825 /// the region name. That way we have a context for side channels, if those
826 /// are required in a later phase. 826 /// are required in a later phase.
827 /// 827 ///
828 /// In this case the call handles parent and description as optional values. 828 /// In this case the call handles parent and description as optional values.
829 /// </summary> 829 /// </summary>
830 private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri) 830 private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri)
@@ -846,7 +846,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
846 requrl = String.Format("{0}&chan_dist_model={1}", requrl, m_vivoxChannelDistanceModel); 846 requrl = String.Format("{0}&chan_dist_model={1}", requrl, m_vivoxChannelDistanceModel);
847 requrl = String.Format("{0}&chan_max_range={1}", requrl, m_vivoxChannelMaximumRange); 847 requrl = String.Format("{0}&chan_max_range={1}", requrl, m_vivoxChannelMaximumRange);
848 requrl = String.Format("{0}&chan_clamping_distance={1}", requrl, m_vivoxChannelClampingDistance); 848 requrl = String.Format("{0}&chan_clamping_distance={1}", requrl, m_vivoxChannelClampingDistance);
849 849
850 XmlElement resp = VivoxCall(requrl, true); 850 XmlElement resp = VivoxCall(requrl, true);
851 if (XmlFind(resp, "response.level0.body.chan_uri", out channelUri)) 851 if (XmlFind(resp, "response.level0.body.chan_uri", out channelUri))
852 return true; 852 return true;
@@ -889,7 +889,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
889 889
890 /// <summary> 890 /// <summary>
891 /// Retrieve a channel. 891 /// Retrieve a channel.
892 /// Once again, there a multitude of options possible. In the simplest case 892 /// Once again, there a multitude of options possible. In the simplest case
893 /// we specify only the name and get a non-persistent cannel in return. Non 893 /// we specify only the name and get a non-persistent cannel in return. Non
894 /// persistent means that the channel gets deleted if no-one uses it for 894 /// persistent means that the channel gets deleted if no-one uses it for
895 /// 5 hours. To accomodate future requirements, it may be a good idea to 895 /// 5 hours. To accomodate future requirements, it may be a good idea to
@@ -898,7 +898,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
898 /// are required in a later phase. 898 /// are required in a later phase.
899 /// In this case the call handles parent and description as optional values. 899 /// In this case the call handles parent and description as optional values.
900 /// </summary> 900 /// </summary>
901 private bool VivoxTryGetChannel(string channelParent, string channelName, 901 private bool VivoxTryGetChannel(string channelParent, string channelName,
902 out string channelId, out string channelUri) 902 out string channelId, out string channelUri)
903 { 903 {
904 string count; 904 string count;
@@ -1006,7 +1006,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1006 string type; 1006 string type;
1007 1007
1008 // skip if not a directory 1008 // skip if not a directory
1009 if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) || 1009 if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) ||
1010 type != "dir") 1010 type != "dir")
1011 continue; 1011 continue;
1012 1012
@@ -1044,7 +1044,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1044 1044
1045 /// <summary> 1045 /// <summary>
1046 /// Delete a channel. 1046 /// Delete a channel.
1047 /// Once again, there a multitude of options possible. In the simplest case 1047 /// Once again, there a multitude of options possible. In the simplest case
1048 /// we specify only the name and get a non-persistent cannel in return. Non 1048 /// we specify only the name and get a non-persistent cannel in return. Non
1049 /// persistent means that the channel gets deleted if no-one uses it for 1049 /// persistent means that the channel gets deleted if no-one uses it for
1050 /// 5 hours. To accomodate future requirements, it may be a good idea to 1050 /// 5 hours. To accomodate future requirements, it may be a good idea to
@@ -1098,7 +1098,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1098 // return VivoxGetChannelById(null, id); 1098 // return VivoxGetChannelById(null, id);
1099 // } 1099 // }
1100 // } 1100 // }
1101 // } 1101 // }
1102 // } 1102 // }
1103 // } 1103 // }
1104 1104
@@ -1106,12 +1106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1106 // return VivoxGetChannel(null, Guid.NewGuid().ToString()); 1106 // return VivoxGetChannel(null, Guid.NewGuid().ToString());
1107 1107
1108 // } 1108 // }
1109 1109
1110 /// <summary> 1110 /// <summary>
1111 /// This method handles the WEB side of making a request over the 1111 /// This method handles the WEB side of making a request over the
1112 /// Vivox interface. The returned values are tansferred to a has 1112 /// Vivox interface. The returned values are tansferred to a has
1113 /// table which is returned as the result. 1113 /// table which is returned as the result.
1114 /// The outcome of the call can be determined by examining the 1114 /// The outcome of the call can be determined by examining the
1115 /// status value in the hash table. 1115 /// status value in the hash table.
1116 /// </summary> 1116 /// </summary>
1117 private XmlElement VivoxCall(string requrl, bool admin) 1117 private XmlElement VivoxCall(string requrl, bool admin)
@@ -1127,7 +1127,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1127 doc = new XmlDocument(); 1127 doc = new XmlDocument();
1128 1128
1129 // Let's serialize all calls to Vivox. Most of these are driven by 1129 // Let's serialize all calls to Vivox. Most of these are driven by
1130 // the clients (CAPs), when the user arrives at the region. We don't 1130 // the clients (CAPs), when the user arrives at the region. We don't
1131 // want to issue many simultaneous http requests to Vivox, because mono 1131 // want to issue many simultaneous http requests to Vivox, because mono
1132 // doesn't like that 1132 // doesn't like that
1133 lock (m_Lock) 1133 lock (m_Lock)
@@ -1173,7 +1173,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1173 1173
1174 /// <summary> 1174 /// <summary>
1175 /// Login has been factored in this way because it gets called 1175 /// Login has been factored in this way because it gets called
1176 /// from several places in the module, and we want it to work 1176 /// from several places in the module, and we want it to work
1177 /// the same way each time. 1177 /// the same way each time.
1178 /// </summary> 1178 /// </summary>
1179 private bool DoAdminLogin() 1179 private bool DoAdminLogin()
@@ -1188,15 +1188,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1188 XmlElement resp = null; 1188 XmlElement resp = null;
1189 1189
1190 resp = VivoxLogin(m_vivoxAdminUser, m_vivoxAdminPassword); 1190 resp = VivoxLogin(m_vivoxAdminUser, m_vivoxAdminPassword);
1191 1191
1192 if (XmlFind(resp, "response.level0.body.status", out status)) 1192 if (XmlFind(resp, "response.level0.body.status", out status))
1193 { 1193 {
1194 if (status == "Ok") 1194 if (status == "Ok")
1195 { 1195 {
1196 m_log.Info("[VivoxVoice] Admin connection established"); 1196 m_log.Info("[VivoxVoice] Admin connection established");
1197 if (XmlFind(resp, "response.level0.body.auth_token", out m_authToken)) 1197 if (XmlFind(resp, "response.level0.body.auth_token", out m_authToken))
1198 { 1198 {
1199 if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>", 1199 if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>",
1200 m_authToken); 1200 m_authToken);
1201 m_adminConnected = true; 1201 m_adminConnected = true;
1202 } 1202 }
@@ -1215,9 +1215,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1215 1215
1216 /// <summary> 1216 /// <summary>
1217 /// The XmlScan routine is provided to aid in the 1217 /// The XmlScan routine is provided to aid in the
1218 /// reverse engineering of incompletely 1218 /// reverse engineering of incompletely
1219 /// documented packets returned by the Vivox 1219 /// documented packets returned by the Vivox
1220 /// voice server. It is only called if the 1220 /// voice server. It is only called if the
1221 /// m_dumpXml switch is set. 1221 /// m_dumpXml switch is set.
1222 /// </summary> 1222 /// </summary>
1223 private void XmlScanl(XmlElement e, int index) 1223 private void XmlScanl(XmlElement e, int index)
@@ -1262,7 +1262,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1262 private bool XmlFind(XmlElement root, string tag, int nth, out string result) 1262 private bool XmlFind(XmlElement root, string tag, int nth, out string result)
1263 { 1263 {
1264 if (root == null || tag == null || tag == String.Empty) 1264 if (root == null || tag == null || tag == String.Empty)
1265 { 1265 {
1266 result = String.Empty; 1266 result = String.Empty;
1267 return false; 1267 return false;
1268 } 1268 }
@@ -1273,7 +1273,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1273 { 1273 {
1274 int nth = 0; 1274 int nth = 0;
1275 if (root == null || tag == null || tag == String.Empty) 1275 if (root == null || tag == null || tag == String.Empty)
1276 { 1276 {
1277 result = String.Empty; 1277 result = String.Empty;
1278 return false; 1278 return false;
1279 } 1279 }
@@ -1284,7 +1284,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1284 /// XmlSearch is initially called by XmlFind, and then 1284 /// XmlSearch is initially called by XmlFind, and then
1285 /// recursively called by itself until the document 1285 /// recursively called by itself until the document
1286 /// supplied to XmlFind is either exhausted or the name hierarchy 1286 /// supplied to XmlFind is either exhausted or the name hierarchy
1287 /// is matched. 1287 /// is matched.
1288 /// 1288 ///
1289 /// If the hierarchy is matched, the value is returned in 1289 /// If the hierarchy is matched, the value is returned in
1290 /// result, and true returned as the function's 1290 /// result, and true returned as the function's
@@ -1298,7 +1298,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
1298 result = String.Empty; 1298 result = String.Empty;
1299 return false; 1299 return false;
1300 } 1300 }
1301 1301
1302 if (tags.Length-index == 1) 1302 if (tags.Length-index == 1)
1303 { 1303 {
1304 if (nth == 0) 1304 if (nth == 0)
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 0aaf95c..8791235 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
125 { 125 {
126 if (!m_groupMessagingEnabled) 126 if (!m_groupMessagingEnabled)
127 return; 127 return;
128 128
129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this); 129 scene.RegisterModuleInterface<IGroupsMessagingModule>(this);
130 130
131 scene.AddCommand( 131 scene.AddCommand(
@@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
136 "This setting turns on very verbose groups messaging debugging", 136 "This setting turns on very verbose groups messaging debugging",
137 HandleDebugGroupsMessagingVerbose); 137 HandleDebugGroupsMessagingVerbose);
138 } 138 }
139 139
140 public void RegionLoaded(Scene scene) 140 public void RegionLoaded(Scene scene)
141 { 141 {
142 if (!m_groupMessagingEnabled) 142 if (!m_groupMessagingEnabled)
@@ -205,7 +205,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
205 m_msgTransferModule = null; 205 m_msgTransferModule = null;
206 } 206 }
207 207
208 public Type ReplaceableInterface 208 public Type ReplaceableInterface
209 { 209 {
210 get { return null; } 210 get { return null; }
211 } 211 }
@@ -253,7 +253,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
253 { 253 {
254 if (m_debugEnabled) 254 if (m_debugEnabled)
255 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 255 m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
256 256
257 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); 257 GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null);
258 258
259 if (groupInfo != null) 259 if (groupInfo != null)
@@ -270,7 +270,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
270 { 270 {
271 SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null); 271 SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null);
272 } 272 }
273 273
274 public void SendMessageToGroup( 274 public void SendMessageToGroup(
275 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) 275 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
276 { 276 {
@@ -294,19 +294,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
294 m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds); 294 m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds);
295 } 295 }
296 296
297 attemptDeliveryUuidSet 297 attemptDeliveryUuidSet
298 = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID)); 298 = new HashSet<string>(Array.ConvertAll<PresenceInfo, string>(onlineAgents, pi => pi.UserID));
299 } 299 }
300 else 300 else
301 { 301 {
302 attemptDeliveryUuidSet 302 attemptDeliveryUuidSet
303 = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString())); 303 = new HashSet<string>(groupMembers.ConvertAll<string>(gmd => gmd.AgentID.ToString()));
304 304
305 if (m_debugEnabled) 305 if (m_debugEnabled)
306 m_log.DebugFormat( 306 m_log.DebugFormat(
307 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", 307 "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members",
308 groupID, groupMembers.Count); 308 groupID, groupMembers.Count);
309 } 309 }
310 310
311 foreach (GroupMembersData member in groupMembers) 311 foreach (GroupMembersData member in groupMembers)
312 { 312 {
@@ -314,9 +314,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
314 { 314 {
315 if (!sendCondition(member)) 315 if (!sendCondition(member))
316 { 316 {
317 if (m_debugEnabled) 317 if (m_debugEnabled)
318 m_log.DebugFormat( 318 m_log.DebugFormat(
319 "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", 319 "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition",
320 member.AgentID); 320 member.AgentID);
321 321
322 continue; 322 continue;
@@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
325 else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) 325 else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID))
326 { 326 {
327 // Don't deliver messages to people who have dropped this session 327 // Don't deliver messages to people who have dropped this session
328 if (m_debugEnabled) 328 if (m_debugEnabled)
329 m_log.DebugFormat( 329 m_log.DebugFormat(
330 "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID); 330 "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID);
331 331
@@ -360,9 +360,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
360 // If they're not local, forward across the grid 360 // If they're not local, forward across the grid
361 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); 361 m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { });
362 362
363 if (m_debugEnabled) 363 if (m_debugEnabled)
364 m_log.DebugFormat( 364 m_log.DebugFormat(
365 "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", 365 "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms",
366 member.AgentID, Environment.TickCount - startTick); 366 member.AgentID, Environment.TickCount - startTick);
367 } 367 }
368 else 368 else
@@ -372,9 +372,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
372 ProcessMessageFromGroupSession(msg, client); 372 ProcessMessageFromGroupSession(msg, client);
373 373
374 // Deliver locally, directly 374 // Deliver locally, directly
375 if (m_debugEnabled) 375 if (m_debugEnabled)
376 m_log.DebugFormat( 376 m_log.DebugFormat(
377 "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", 377 "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms",
378 member.AgentID, Environment.TickCount - startTick); 378 member.AgentID, Environment.TickCount - startTick);
379 } 379 }
380 } 380 }
@@ -385,9 +385,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
385 385
386 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); 386 m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { });
387 387
388 if (m_debugEnabled) 388 if (m_debugEnabled)
389 m_log.DebugFormat( 389 m_log.DebugFormat(
390 "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", 390 "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms",
391 member.AgentID, Environment.TickCount - startTick); 391 member.AgentID, Environment.TickCount - startTick);
392 } 392 }
393 } 393 }
@@ -397,7 +397,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
397 "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms", 397 "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms",
398 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); 398 groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick);
399 } 399 }
400 400
401 #region SimGridEventHandlers 401 #region SimGridEventHandlers
402 402
403 void OnClientLogin(IClientAPI client) 403 void OnClientLogin(IClientAPI client)
@@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
417 // The instant message module will only deliver messages of dialog types: 417 // The instant message module will only deliver messages of dialog types:
418 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject 418 // MessageFromAgent, StartTyping, StopTyping, MessageFromObject
419 // 419 //
420 // Any other message type will not be delivered to a client by the 420 // Any other message type will not be delivered to a client by the
421 // Instant Message Module 421 // Instant Message Module
422 422
423 if (m_debugEnabled) 423 if (m_debugEnabled)
@@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
428 } 428 }
429 429
430 // Incoming message from a group 430 // Incoming message from a group
431 if ((msg.fromGroup == true) && 431 if ((msg.fromGroup == true) &&
432 ((msg.dialog == (byte)InstantMessageDialog.SessionSend) 432 ((msg.dialog == (byte)InstantMessageDialog.SessionSend)
433 || (msg.dialog == (byte)InstantMessageDialog.SessionAdd) 433 || (msg.dialog == (byte)InstantMessageDialog.SessionAdd)
434 || (msg.dialog == (byte)InstantMessageDialog.SessionDrop))) 434 || (msg.dialog == (byte)InstantMessageDialog.SessionDrop)))
@@ -450,7 +450,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
450 450
451 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) 451 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client)
452 { 452 {
453 if (m_debugEnabled) 453 if (m_debugEnabled)
454 m_log.DebugFormat( 454 m_log.DebugFormat(
455 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}", 455 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}",
456 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog); 456 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog);
@@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
522 } 522 }
523 } 523 }
524 } 524 }
525 else 525 else
526 { 526 {
527 client.SendInstantMessage(msg); 527 client.SendInstantMessage(msg);
528 } 528 }
@@ -570,7 +570,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
570 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); 570 if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID);
571 571
572 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); 572 GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null);
573 573
574 if (groupInfo != null) 574 if (groupInfo != null)
575 { 575 {
576 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); 576 m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID);
@@ -586,7 +586,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
586 // Send a message from locally connected client to a group 586 // Send a message from locally connected client to a group
587 if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) 587 if ((im.dialog == (byte)InstantMessageDialog.SessionSend))
588 { 588 {
589 if (m_debugEnabled) 589 if (m_debugEnabled)
590 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 590 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
591 591
592 //If this agent is sending a message, then they want to be in the session 592 //If this agent is sending a message, then they want to be in the session
@@ -597,7 +597,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
597 597
598 if ((im.dialog == (byte)InstantMessageDialog.SessionDrop)) 598 if ((im.dialog == (byte)InstantMessageDialog.SessionDrop))
599 { 599 {
600 if (m_debugEnabled) 600 if (m_debugEnabled)
601 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); 601 m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString());
602 602
603 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); 603 m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID);
@@ -659,7 +659,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
659 /// </summary> 659 /// </summary>
660 private IClientAPI GetActiveClient(UUID agentID) 660 private IClientAPI GetActiveClient(UUID agentID)
661 { 661 {
662 if (m_debugEnabled) 662 if (m_debugEnabled)
663 m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); 663 m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID);
664 664
665 IClientAPI child = null; 665 IClientAPI child = null;
@@ -672,14 +672,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
672 { 672 {
673 if (!sp.IsChildAgent) 673 if (!sp.IsChildAgent)
674 { 674 {
675 if (m_debugEnabled) 675 if (m_debugEnabled)
676 m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); 676 m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name);
677 677
678 return sp.ControllingClient; 678 return sp.ControllingClient;
679 } 679 }
680 else 680 else
681 { 681 {
682 if (m_debugEnabled) 682 if (m_debugEnabled)
683 m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); 683 m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name);
684 684
685 child = sp.ControllingClient; 685 child = sp.ControllingClient;
@@ -690,12 +690,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
690 // If we didn't find a root, then just return whichever child we found, or null if none 690 // If we didn't find a root, then just return whichever child we found, or null if none
691 if (child == null) 691 if (child == null)
692 { 692 {
693 if (m_debugEnabled) 693 if (m_debugEnabled)
694 m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); 694 m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID);
695 } 695 }
696 else 696 else
697 { 697 {
698 if (m_debugEnabled) 698 if (m_debugEnabled)
699 m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); 699 m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name);
700 } 700 }
701 701
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 81add13..f0de7d4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -50,19 +50,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
50 /// ; To use this module, you must specify the following in your OpenSim.ini 50 /// ; To use this module, you must specify the following in your OpenSim.ini
51 /// [GROUPS] 51 /// [GROUPS]
52 /// Enabled = true 52 /// Enabled = true
53 /// 53 ///
54 /// Module = GroupsModule 54 /// Module = GroupsModule
55 /// NoticesEnabled = true 55 /// NoticesEnabled = true
56 /// DebugEnabled = true 56 /// DebugEnabled = true
57 /// 57 ///
58 /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector 58 /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector
59 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php 59 /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php
60 /// XmlRpcServiceReadKey = 1234 60 /// XmlRpcServiceReadKey = 1234
61 /// XmlRpcServiceWriteKey = 1234 61 /// XmlRpcServiceWriteKey = 1234
62 /// 62 ///
63 /// MessagingModule = GroupsMessagingModule 63 /// MessagingModule = GroupsMessagingModule
64 /// MessagingEnabled = true 64 /// MessagingEnabled = true
65 /// 65 ///
66 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for 66 /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for
67 /// ; a problem discovered on some Windows based region servers. Only disable 67 /// ; a problem discovered on some Windows based region servers. Only disable
68 /// ; if you see a large number (dozens) of the following Exceptions: 68 /// ; if you see a large number (dozens) of the following Exceptions:
@@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
332 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); 332 remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups);
333 } 333 }
334 334
335 335
336 private void OnClientClosed(UUID AgentId, Scene scene) 336 private void OnClientClosed(UUID AgentId, Scene scene)
337 { 337 {
338 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 338 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -387,7 +387,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
387 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 387 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
388 388
389 string GroupName; 389 string GroupName;
390 390
391 GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null); 391 GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null);
392 if (group != null) 392 if (group != null)
393 { 393 {
@@ -403,9 +403,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
403 403
404 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 404 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
405 { 405 {
406 if (m_debugEnabled) 406 if (m_debugEnabled)
407 m_log.DebugFormat( 407 m_log.DebugFormat(
408 "[GROUPS]: {0} called for {1}, message type {2}", 408 "[GROUPS]: {0} called for {1}, message type {2}",
409 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog); 409 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog);
410 410
411 // Group invitations 411 // Group invitations
@@ -569,20 +569,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
569 if (targetUser != null) 569 if (targetUser != null)
570 { 570 {
571 m_log.DebugFormat( 571 m_log.DebugFormat(
572 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", 572 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})",
573 NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); 573 NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices);
574 } 574 }
575 else 575 else
576 { 576 {
577 m_log.DebugFormat( 577 m_log.DebugFormat(
578 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", 578 "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})",
579 NoticeID, member.AgentID, member.AcceptNotices); 579 NoticeID, member.AgentID, member.AcceptNotices);
580 } 580 }
581 } 581 }
582 } 582 }
583 } 583 }
584 584
585 GridInstantMessage msg 585 GridInstantMessage msg
586 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); 586 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
587 587
588 if (m_groupsMessagingModule != null) 588 if (m_groupsMessagingModule != null)
@@ -599,7 +599,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
599 599
600 UUID noticeID = new UUID(im.imSessionID); 600 UUID noticeID = new UUID(im.imSessionID);
601 601
602 if (m_debugEnabled) 602 if (m_debugEnabled)
603 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId); 603 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId);
604 604
605 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); 605 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID);
@@ -625,10 +625,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
625 } 625 }
626 else 626 else
627 { 627 {
628 if (m_debugEnabled) 628 if (m_debugEnabled)
629 m_log.DebugFormat( 629 m_log.DebugFormat(
630 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", 630 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
631 noticeID, remoteClient.AgentId); 631 noticeID, remoteClient.AgentId);
632 } 632 }
633 } 633 }
634 634
@@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
698 { 698 {
699 return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name); 699 return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name);
700 } 700 }
701 701
702 public void ActivateGroup(IClientAPI remoteClient, UUID groupID) 702 public void ActivateGroup(IClientAPI remoteClient, UUID groupID)
703 { 703 {
704 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 704 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -739,10 +739,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
739 739
740 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID) 740 public List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID)
741 { 741 {
742 if (m_debugEnabled) 742 if (m_debugEnabled)
743 m_log.DebugFormat( 743 m_log.DebugFormat(
744 "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); 744 "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name);
745 745
746 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); 746 List<GroupMembersData> data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID);
747 747
748 if (m_debugEnabled) 748 if (m_debugEnabled)
@@ -829,7 +829,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
829 829
830 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) 830 public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID)
831 { 831 {
832 if (m_debugEnabled) 832 if (m_debugEnabled)
833 m_log.DebugFormat( 833 m_log.DebugFormat(
834 "[GROUPS]: {0} called with groupID={1}, agentID={2}", 834 "[GROUPS]: {0} called with groupID={1}, agentID={2}",
835 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); 835 System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID);
@@ -926,7 +926,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
926 if (membership != null) 926 if (membership != null)
927 { 927 {
928 return membership.GroupTitle; 928 return membership.GroupTitle;
929 } 929 }
930 return string.Empty; 930 return string.Empty;
931 } 931 }
932 932
@@ -999,7 +999,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
999 case 1: 999 case 1:
1000 // Remove 1000 // Remove
1001 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID); 1001 m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID);
1002 1002
1003 break; 1003 break;
1004 default: 1004 default:
1005 m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); 1005 m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes);
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1185 1185
1186 // Send Message to Ejectee 1186 // Send Message to Ejectee
1187 GridInstantMessage msg = new GridInstantMessage(); 1187 GridInstantMessage msg = new GridInstantMessage();
1188 1188
1189 string ejecteeName = "Unknown member"; 1189 string ejecteeName = "Unknown member";
1190 // if local send a normal message 1190 // if local send a normal message
1191 if(ejecteeClient != null) 1191 if(ejecteeClient != null)
@@ -1219,7 +1219,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1219 msg.timestamp = 0; 1219 msg.timestamp = 0;
1220 msg.fromAgentName = agentName; 1220 msg.fromAgentName = agentName;
1221 msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName); 1221 msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName);
1222// 1222//
1223 msg.fromGroup = false; 1223 msg.fromGroup = false;
1224 msg.offline = (byte)0; 1224 msg.offline = (byte)0;
1225 msg.ParentEstateID = 0; 1225 msg.ParentEstateID = 0;
@@ -1470,7 +1470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1470 membershipArray = membershipData.ToArray(); 1470 membershipArray = membershipData.ToArray();
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 if (m_debugEnabled) 1474 if (m_debugEnabled)
1475 { 1475 {
1476 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); 1476 m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
index cff3212..08c7096 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
43 /// <returns></returns> 43 /// <returns></returns>
44 /// <param name='RequestingAgentID'>The UUID of the user making the request.</param> 44 /// <param name='RequestingAgentID'>The UUID of the user making the request.</param>
45 /// <param name='GroupID'> 45 /// <param name='GroupID'>
46 /// The ID of the record to retrieve. 46 /// The ID of the record to retrieve.
47 /// GroupName may be specified instead, in which case this parameter will be UUID.Zero 47 /// GroupName may be specified instead, in which case this parameter will be UUID.Zero
48 /// </param> 48 /// </param>
49 /// <param name='GroupName'> 49 /// <param name='GroupName'>
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
89 /// If the user is a member of the group then the data structure is returned. If not, then null is returned. 89 /// If the user is a member of the group then the data structure is returned. If not, then null is returned.
90 /// </returns> 90 /// </returns>
91 GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); 91 GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID);
92 92
93 /// <summary> 93 /// <summary>
94 /// Get information about the groups to which a user belongs. 94 /// Get information about the groups to which a user belongs.
95 /// </summary> 95 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
index 2c45712..98c7ed4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
@@ -48,16 +48,16 @@ using OpenSim.Services.Interfaces;
48/*************************************************************************** 48/***************************************************************************
49 * Simian Data Map 49 * Simian Data Map
50 * =============== 50 * ===============
51 * 51 *
52 * OwnerID -> Type -> Key 52 * OwnerID -> Type -> Key
53 * ----------------------- 53 * -----------------------
54 * 54 *
55 * UserID -> Group -> ActiveGroup 55 * UserID -> Group -> ActiveGroup
56 * + GroupID 56 * + GroupID
57 * 57 *
58 * UserID -> GroupSessionDropped -> GroupID 58 * UserID -> GroupSessionDropped -> GroupID
59 * UserID -> GroupSessionInvited -> GroupID 59 * UserID -> GroupSessionInvited -> GroupID
60 * 60 *
61 * UserID -> GroupMember -> GroupID 61 * UserID -> GroupMember -> GroupID
62 * + SelectedRoleID [UUID] 62 * + SelectedRoleID [UUID]
63 * + AcceptNotices [bool] 63 * + AcceptNotices [bool]
@@ -65,9 +65,9 @@ using OpenSim.Services.Interfaces;
65 * + Contribution [int] 65 * + Contribution [int]
66 * 66 *
67 * UserID -> GroupRole[GroupID] -> RoleID 67 * UserID -> GroupRole[GroupID] -> RoleID
68 * 68 *
69 * 69 *
70 * GroupID -> Group -> GroupName 70 * GroupID -> Group -> GroupName
71 * + Charter 71 * + Charter
72 * + ShowInList 72 * + ShowInList
73 * + InsigniaID 73 * + InsigniaID
@@ -79,17 +79,17 @@ using OpenSim.Services.Interfaces;
79 * + EveryonePowers 79 * + EveryonePowers
80 * + OwnerRoleID 80 * + OwnerRoleID
81 * + OwnersPowers 81 * + OwnersPowers
82 * 82 *
83 * GroupID -> GroupRole -> RoleID 83 * GroupID -> GroupRole -> RoleID
84 * + Name 84 * + Name
85 * + Description 85 * + Description
86 * + Title 86 * + Title
87 * + Powers 87 * + Powers
88 * 88 *
89 * GroupID -> GroupMemberInvite -> InviteID 89 * GroupID -> GroupMemberInvite -> InviteID
90 * + AgentID 90 * + AgentID
91 * + RoleID 91 * + RoleID
92 * 92 *
93 * GroupID -> GroupNotice -> NoticeID 93 * GroupID -> GroupNotice -> NoticeID
94 * + TimeStamp [uint] 94 * + TimeStamp [uint]
95 * + FromName [string] 95 * + FromName [string]
@@ -106,12 +106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
106 { 106 {
107 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 107 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
108 108
109 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | 109 public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome |
110 GroupPowers.Accountable | 110 GroupPowers.Accountable |
111 GroupPowers.JoinChat | 111 GroupPowers.JoinChat |
112 GroupPowers.AllowVoiceChat | 112 GroupPowers.AllowVoiceChat |
113 GroupPowers.ReceiveNotices | 113 GroupPowers.ReceiveNotices |
114 GroupPowers.StartProposal | 114 GroupPowers.StartProposal |
115 GroupPowers.VoteOnProposal; 115 GroupPowers.VoteOnProposal;
116 116
117 // Would this be cleaner as (GroupPowers)ulong.MaxValue; 117 // Would this be cleaner as (GroupPowers)ulong.MaxValue;
@@ -168,12 +168,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
168 private bool m_debugEnabled = false; 168 private bool m_debugEnabled = false;
169 169
170 private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>(); 170 private Dictionary<string, bool> m_pendingRequests = new Dictionary<string,bool>();
171 171
172 private ExpiringCache<string, OSDMap> m_memoryCache; 172 private ExpiringCache<string, OSDMap> m_memoryCache;
173 private int m_cacheTimeout = 30; 173 private int m_cacheTimeout = 30;
174 174
175 // private IUserAccountService m_accountService = null; 175 // private IUserAccountService m_accountService = null;
176 176
177 177
178 #region Region Module interfaceBase Members 178 #region Region Module interfaceBase Members
179 179
@@ -229,10 +229,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
229 m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout); 229 m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout);
230 } 230 }
231 231
232 232
233 233
234 m_memoryCache = new ExpiringCache<string,OSDMap>(); 234 m_memoryCache = new ExpiringCache<string,OSDMap>();
235 235
236 236
237 // If we got all the config options we need, lets start'er'up 237 // If we got all the config options we need, lets start'er'up
238 m_connectorEnabled = true; 238 m_connectorEnabled = true;
@@ -287,8 +287,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
287 /// <summary> 287 /// <summary>
288 /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. 288 /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role.
289 /// </summary> 289 /// </summary>
290 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, 290 public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID,
291 int membershipFee, bool openEnrollment, bool allowPublish, 291 int membershipFee, bool openEnrollment, bool allowPublish,
292 bool maturePublish, UUID founderID) 292 bool maturePublish, UUID founderID)
293 { 293 {
294 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 294 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -313,7 +313,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
313 { 313 {
314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); 314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers);
315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); 315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers);
316 316
317 AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); 317 AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID);
318 318
319 return GroupID; 319 return GroupID;
@@ -325,8 +325,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
325 } 325 }
326 326
327 327
328 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, 328 public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList,
329 UUID insigniaID, int membershipFee, bool openEnrollment, 329 UUID insigniaID, int membershipFee, bool openEnrollment,
330 bool allowPublish, bool maturePublish) 330 bool allowPublish, bool maturePublish)
331 { 331 {
332 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 332 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
350 } 350 }
351 351
352 352
353 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 353 public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
354 string title, ulong powers) 354 string title, ulong powers)
355 { 355 {
356 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 356 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
393 } 393 }
394 394
395 395
396 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, 396 public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description,
397 string title, ulong powers) 397 string title, ulong powers)
398 { 398 {
399 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 399 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -434,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
434 { 434 {
435 return null; 435 return null;
436 } 436 }
437 } 437 }
438 else if (!string.IsNullOrEmpty(groupName)) 438 else if (!string.IsNullOrEmpty(groupName))
439 { 439 {
440 if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) 440 if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap))
@@ -481,7 +481,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
481 { 481 {
482 MemberGroupProfile.Charter = groupProfile["Charter"].AsString(); 482 MemberGroupProfile.Charter = groupProfile["Charter"].AsString();
483 } 483 }
484 484
485 MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1"; 485 MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1";
486 MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID(); 486 MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID();
487 MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger(); 487 MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger();
@@ -489,7 +489,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
489 MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean(); 489 MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean();
490 MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean(); 490 MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean();
491 MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();; 491 MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();;
492 MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); 492 MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID();
493 493
494 Dictionary<UUID, OSDMap> Members; 494 Dictionary<UUID, OSDMap> Members;
495 if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members)) 495 if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members))
@@ -546,7 +546,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
546 { 546 {
547 GroupMemberInfo = new OSDMap(); 547 GroupMemberInfo = new OSDMap();
548 } 548 }
549 549
550 GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices); 550 GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices);
551 GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile); 551 GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile);
552 GroupMemberInfo["Contribution"] = OSD.FromInteger(0); 552 GroupMemberInfo["Contribution"] = OSD.FromInteger(0);
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
624 // Remove Group Member information for this group 624 // Remove Group Member information for this group
625 SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString()); 625 SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString());
626 626
627 // By using a Simian Generics Type consisting of a prefix and a groupID, 627 // By using a Simian Generics Type consisting of a prefix and a groupID,
628 // combined with RoleID as key allows us to get a list of roles a particular member 628 // combined with RoleID as key allows us to get a list of roles a particular member
629 // of a group is assigned to. 629 // of a group is assigned to.
630 string GroupRoleMemberType = "GroupRole" + groupID.ToString(); 630 string GroupRoleMemberType = "GroupRole" + groupID.ToString();
@@ -696,7 +696,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
696 { 696 {
697 data.members = 0; 697 data.members = 0;
698 } 698 }
699 699
700 // TODO: sort results? 700 // TODO: sort results?
701 // data.searchOrder = order; 701 // data.searchOrder = order;
702 702
@@ -721,8 +721,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
721 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); 721 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
722 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); 722 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
723 data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); 723 data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean();
724 data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); 724 data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID();
725 725
726 /////////////////////////////// 726 ///////////////////////////////
727 // Agent Specific Information: 727 // Agent Specific Information:
728 // 728 //
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
730 if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) 730 if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup))
731 { 731 {
732 data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); 732 data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID);
733 } 733 }
734 734
735 /////////////////////////////// 735 ///////////////////////////////
736 // Role Specific Information: 736 // Role Specific Information:
@@ -740,8 +740,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
740 { 740 {
741 data.GroupTitle = GroupRoleInfo["Title"].AsString(); 741 data.GroupTitle = GroupRoleInfo["Title"].AsString();
742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); 742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
743 } 743 }
744 744
745 /////////////////////////////// 745 ///////////////////////////////
746 // Group Specific Information: 746 // Group Specific Information:
747 // 747 //
@@ -759,7 +759,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
759 data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); 759 data.MembershipFee = GroupInfo["MembershipFee"].AsInteger();
760 data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); 760 data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean();
761 data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); 761 data.ShowInList = GroupInfo["ShowInList"].AsBoolean();
762 } 762 }
763 } 763 }
764 764
765 return data; 765 return data;
@@ -794,7 +794,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
794 memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key))); 794 memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key)));
795 } 795 }
796 } 796 }
797 797
798 return memberships; 798 return memberships;
799 } 799 }
800 800
@@ -1017,7 +1017,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1017 Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket); 1017 Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket);
1018 1018
1019 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); 1019 SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice);
1020 1020
1021 } 1021 }
1022 #endregion 1022 #endregion
1023 1023
@@ -1250,7 +1250,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1250 { "OwnerID", ownerID.ToString() }, 1250 { "OwnerID", ownerID.ToString() },
1251 { "Type", type } 1251 { "Type", type }
1252 }; 1252 };
1253 1253
1254 1254
1255 1255
1256 OSDMap response = CachedPostRequest(requestArgs); 1256 OSDMap response = CachedPostRequest(requestArgs);
@@ -1357,7 +1357,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1357 || requestArgs["RequestMethod"] == "AddGeneric") 1357 || requestArgs["RequestMethod"] == "AddGeneric")
1358 { 1358 {
1359 m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache"); 1359 m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache");
1360 1360
1361 // Any and all updates cause the cache to clear 1361 // Any and all updates cause the cache to clear
1362 m_memoryCache.Clear(); 1362 m_memoryCache.Clear();
1363 1363
@@ -1383,14 +1383,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1383 { 1383 {
1384 if (m_memoryCache.TryGetValue(CacheKey, out response)) 1384 if (m_memoryCache.TryGetValue(CacheKey, out response))
1385 return response; 1385 return response;
1386 1386
1387 if (! m_pendingRequests.ContainsKey(CacheKey)) 1387 if (! m_pendingRequests.ContainsKey(CacheKey))
1388 { 1388 {
1389 m_pendingRequests.Add(CacheKey,true); 1389 m_pendingRequests.Add(CacheKey,true);
1390 firstRequest = true; 1390 firstRequest = true;
1391 } 1391 }
1392 } 1392 }
1393 1393
1394 if (firstRequest) 1394 if (firstRequest)
1395 { 1395 {
1396 // if it wasn't in the cache, pass the request to the Simian Grid Services 1396 // if it wasn't in the cache, pass the request to the Simian Grid Services
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1402 { 1402 {
1403 m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey); 1403 m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey);
1404 } 1404 }
1405 1405
1406 // and cache the response 1406 // and cache the response
1407 lock (m_memoryCache) 1407 lock (m_memoryCache)
1408 { 1408 {
@@ -1420,7 +1420,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1420 // { 1420 // {
1421 // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache"); 1421 // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache");
1422 // Util.PrintCallStack(); 1422 // Util.PrintCallStack();
1423 1423
1424 // // if it wasn't in the cache, pass the request to the Simian Grid Services 1424 // // if it wasn't in the cache, pass the request to the Simian Grid Services
1425 // response = WebUtil.PostToService(m_groupsServerURI, requestArgs); 1425 // response = WebUtil.PostToService(m_groupsServerURI, requestArgs);
1426 1426
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
index a942516..ccfcd8b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
@@ -77,12 +77,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
77/* AgentGroupDataUpdate is udp 77/* AgentGroupDataUpdate is udp
78 TestHelpers.InMethod(); 78 TestHelpers.InMethod();
79// TestHelpers.EnableLogging(); 79// TestHelpers.EnableLogging();
80 80
81 TestScene scene = new SceneHelpers().SetupScene(); 81 TestScene scene = new SceneHelpers().SetupScene();
82 IConfigSource configSource = new IniConfigSource(); 82 IConfigSource configSource = new IniConfigSource();
83 IConfig config = configSource.AddConfig("Groups"); 83 IConfig config = configSource.AddConfig("Groups");
84 config.Set("Enabled", true); 84 config.Set("Enabled", true);
85 config.Set("Module", "GroupsModule"); 85 config.Set("Module", "GroupsModule");
86 config.Set("DebugEnabled", true); 86 config.Set("DebugEnabled", true);
87 87
88 GroupsModule gm = new GroupsModule(); 88 GroupsModule gm = new GroupsModule();
@@ -124,8 +124,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
124 124
125 Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response"); 125 Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response");
126 126
127 // TODO: More checking of more actual event data. 127 // TODO: More checking of more actual event data.
128*/ 128*/
129 } 129 }
130 130
131 [Test] 131 [Test]
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
133 { 133 {
134 TestHelpers.InMethod(); 134 TestHelpers.InMethod();
135// TestHelpers.EnableLogging(); 135// TestHelpers.EnableLogging();
136 136
137 TestScene scene = new SceneHelpers().SetupScene(); 137 TestScene scene = new SceneHelpers().SetupScene();
138 138
139 MessageTransferModule mtm = new MessageTransferModule(); 139 MessageTransferModule mtm = new MessageTransferModule();
@@ -144,12 +144,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
144 IConfigSource configSource = new IniConfigSource(); 144 IConfigSource configSource = new IniConfigSource();
145 145
146 { 146 {
147 IConfig config = configSource.AddConfig("Messaging"); 147 IConfig config = configSource.AddConfig("Messaging");
148 config.Set("MessageTransferModule", mtm.Name); 148 config.Set("MessageTransferModule", mtm.Name);
149 } 149 }
150 150
151 { 151 {
152 IConfig config = configSource.AddConfig("Groups"); 152 IConfig config = configSource.AddConfig("Groups");
153 config.Set("Enabled", true); 153 config.Set("Enabled", true);
154 config.Set("Module", gm.Name); 154 config.Set("Module", gm.Name);
155 config.Set("DebugEnabled", true); 155 config.Set("DebugEnabled", true);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index eb64f71..50d3f94 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -53,17 +53,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
53 53
54 private bool m_debugEnabled = false; 54 private bool m_debugEnabled = false;
55 55
56 public const GroupPowers DefaultEveryonePowers 56 public const GroupPowers DefaultEveryonePowers
57 = GroupPowers.AllowSetHome 57 = GroupPowers.AllowSetHome
58 | GroupPowers.Accountable 58 | GroupPowers.Accountable
59 | GroupPowers.JoinChat 59 | GroupPowers.JoinChat
60 | GroupPowers.AllowVoiceChat 60 | GroupPowers.AllowVoiceChat
61 | GroupPowers.ReceiveNotices 61 | GroupPowers.ReceiveNotices
62 | GroupPowers.StartProposal 62 | GroupPowers.StartProposal
63 | GroupPowers.VoteOnProposal; 63 | GroupPowers.VoteOnProposal;
64 64
65 // Would this be cleaner as (GroupPowers)ulong.MaxValue? 65 // Would this be cleaner as (GroupPowers)ulong.MaxValue?
66 public const GroupPowers DefaultOwnerPowers 66 public const GroupPowers DefaultOwnerPowers
67 = GroupPowers.Accountable 67 = GroupPowers.Accountable
68 | GroupPowers.AllowEditLand 68 | GroupPowers.AllowEditLand
69 | GroupPowers.AllowFly 69 | GroupPowers.AllowFly
@@ -823,7 +823,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
823 823
824 if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID)) 824 if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID))
825 m_groupsAgentsInvitedToChatSession[groupID].Add(agentID); 825 m_groupsAgentsInvitedToChatSession[groupID].Add(agentID);
826 } 826 }
827 827
828 private void CreateGroupChatSessionTracking(UUID groupID) 828 private void CreateGroupChatSessionTracking(UUID groupID)
829 { 829 {
@@ -1051,7 +1051,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1051 private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData) 1051 private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData)
1052 { 1052 {
1053 m_log.ErrorFormat( 1053 m_log.ErrorFormat(
1054 "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", 1054 "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}",
1055 function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData)); 1055 function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData));
1056 } 1056 }
1057 1057
@@ -1151,7 +1151,7 @@ namespace Nwc.XmlRpc
1151 { 1151 {
1152 _serializer.Serialize(xml, this); 1152 _serializer.Serialize(xml, this);
1153 xml.Flush(); 1153 xml.Flush();
1154 } 1154 }
1155 } 1155 }
1156 1156
1157 XmlRpcResponse resp; 1157 XmlRpcResponse resp;
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
index 4e766eb..0436f96 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Region.DataSnapshot
101 101
102 public void Initialise(IConfigSource config) 102 public void Initialise(IConfigSource config)
103 { 103 {
104 if (!m_configLoaded) 104 if (!m_configLoaded)
105 { 105 {
106 m_configLoaded = true; 106 m_configLoaded = true;
107 //m_log.Debug("[DATASNAPSHOT]: Loading configuration"); 107 //m_log.Debug("[DATASNAPSHOT]: Loading configuration");
@@ -248,7 +248,7 @@ namespace OpenSim.Region.DataSnapshot
248 m_snapStore.ForceSceneStale(scene); 248 m_snapStore.ForceSceneStale(scene);
249 } 249 }
250 250
251 public void Close() 251 public void Close()
252 { 252 {
253 if (!m_enabled) 253 if (!m_enabled)
254 return; 254 return;
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
index eb2867d..8e6a30e 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
143 143
144 LandData parcel = land.LandData; 144 LandData parcel = land.LandData;
145 if (m_parent.ExposureLevel.Equals("all") || 145 if (m_parent.ExposureLevel.Equals("all") ||
146 (m_parent.ExposureLevel.Equals("minimum") && 146 (m_parent.ExposureLevel.Equals("minimum") &&
147 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) 147 (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory))
148 { 148 {
149 149
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
index bbf7168..95a2dd6 100644
--- a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs
@@ -46,12 +46,12 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
46 /// </summary> 46 /// </summary>
47 /// <remarks> 47 /// <remarks>
48 /// This module is the simplest possible example of a non-shared region module (a module where each scene/region 48 /// This module is the simplest possible example of a non-shared region module (a module where each scene/region
49 /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then 49 /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then
50 /// please create a separate class. 50 /// please create a separate class.
51 /// 51 ///
52 /// This module is not active by default. If you want to see it in action, 52 /// This module is not active by default. If you want to see it in action,
53 /// then just uncomment the line below starting with [Extension(Path... 53 /// then just uncomment the line below starting with [Extension(Path...
54 /// 54 ///
55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log 55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log
56 /// file. 56 /// file.
57 /// </remarks> 57 /// </remarks>
@@ -59,34 +59,34 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared
59 public class BareBonesNonSharedModule : INonSharedRegionModule 59 public class BareBonesNonSharedModule : INonSharedRegionModule
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 public string Name { get { return "Bare Bones Non Shared Module"; } } 63 public string Name { get { return "Bare Bones Non Shared Module"; } }
64 64
65 public Type ReplaceableInterface { get { return null; } } 65 public Type ReplaceableInterface { get { return null; } }
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE"); 69 m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE");
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74 m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE"); 74 m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE");
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); 79 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName);
80 } 80 }
81 81
82 public void RemoveRegion(Scene scene) 82 public void RemoveRegion(Scene scene)
83 { 83 {
84 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 84 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RegionLoaded(Scene scene) 87 public void RegionLoaded(Scene scene)
88 { 88 {
89 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); 89 m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName);
90 } 90 }
91 } 91 }
92} \ No newline at end of file 92} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
index 46fea3e..1271e3f 100644
--- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
@@ -46,52 +46,52 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
46 /// </summary> 46 /// </summary>
47 /// <remarks> 47 /// <remarks>
48 /// This module is the simplest possible example of a shared region module (a module which is shared by every 48 /// This module is the simplest possible example of a shared region module (a module which is shared by every
49 /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then 49 /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then
50 /// please create a separate class. 50 /// please create a separate class.
51 /// 51 ///
52 /// This module is not active by default. If you want to see it in action, 52 /// This module is not active by default. If you want to see it in action,
53 /// then just uncomment the line below starting with [Extension(Path... 53 /// then just uncomment the line below starting with [Extension(Path...
54 /// 54 ///
55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log 55 /// When the module is enabled it will print messages when it receives certain events to the screen and the log
56 /// file. 56 /// file.
57 /// </remarks> 57 /// </remarks>
58 //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")] 58 //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")]
59 public class BareBonesSharedModule : ISharedRegionModule 59 public class BareBonesSharedModule : ISharedRegionModule
60 { 60 {
61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
62 62
63 public string Name { get { return "Bare Bones Shared Module"; } } 63 public string Name { get { return "Bare Bones Shared Module"; } }
64 64
65 public Type ReplaceableInterface { get { return null; } } 65 public Type ReplaceableInterface { get { return null; } }
66 66
67 public void Initialise(IConfigSource source) 67 public void Initialise(IConfigSource source)
68 { 68 {
69 m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE"); 69 m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE");
70 } 70 }
71 71
72 public void PostInitialise() 72 public void PostInitialise()
73 { 73 {
74 m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE"); 74 m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE");
75 } 75 }
76 76
77 public void Close() 77 public void Close()
78 { 78 {
79 m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE"); 79 m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE");
80 } 80 }
81 81
82 public void AddRegion(Scene scene) 82 public void AddRegion(Scene scene)
83 { 83 {
84 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); 84 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName);
85 } 85 }
86 86
87 public void RemoveRegion(Scene scene) 87 public void RemoveRegion(Scene scene)
88 { 88 {
89 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 89 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
90 } 90 }
91 91
92 public void RegionLoaded(Scene scene) 92 public void RegionLoaded(Scene scene)
93 { 93 {
94 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); 94 m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName);
95 } 95 }
96 } 96 }
97} \ No newline at end of file 97} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
index 5bf0ed4..0747cc0 100644
--- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs
@@ -40,7 +40,7 @@ using OpenSim.Framework.Servers.HttpServer;
40 40
41namespace OpenSim.Region.OptionalModules.WebSocketEchoModule 41namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
42{ 42{
43 43
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")] 44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")]
45 public class WebSocketEchoModule : ISharedRegionModule 45 public class WebSocketEchoModule : ISharedRegionModule
46 { 46 {
@@ -111,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
111 obj.SendPingCheck(); 111 obj.SendPingCheck();
112 } 112 }
113 113
114 114
115 private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata) 115 private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata)
116 { 116 {
117 WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler; 117 WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler;
@@ -136,14 +136,14 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
136 obj.Dispose(); 136 obj.Dispose();
137 } 137 }
138 138
139 // Shutting down.. so shut down all sockets. 139 // Shutting down.. so shut down all sockets.
140 // Note.. this should be done outside of an ienumerable if you're also hook to the close event. 140 // Note.. this should be done outside of an ienumerable if you're also hook to the close event.
141 public void Close() 141 public void Close()
142 { 142 {
143 if (!enabled) 143 if (!enabled)
144 return; 144 return;
145 145
146 // We convert this to a for loop so we're not in in an IEnumerable when the close 146 // We convert this to a for loop so we're not in in an IEnumerable when the close
147 //call triggers an event which then removes item from _activeHandlers that we're enumerating 147 //call triggers an event which then removes item from _activeHandlers that we're enumerating
148 WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count]; 148 WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count];
149 _activeHandlers.CopyTo(items); 149 _activeHandlers.CopyTo(items);
diff --git a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
index a25e034..95bb13e 100644
--- a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
+++ b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs
@@ -48,11 +48,11 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring
48 protected Scene m_scene; 48 protected Scene m_scene;
49 49
50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 public string Name { get { return "Services Health Monitoring Module"; } } 52 public string Name { get { return "Services Health Monitoring Module"; } }
53 53
54 public Type ReplaceableInterface { get { return null; } } 54 public Type ReplaceableInterface { get { return null; } }
55 55
56 public void Initialise(IConfigSource source) 56 public void Initialise(IConfigSource source)
57 { 57 {
58 } 58 }
@@ -64,7 +64,7 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring
64 public void Close() 64 public void Close()
65 { 65 {
66 } 66 }
67 67
68 public void AddRegion(Scene scene) 68 public void AddRegion(Scene scene)
69 { 69 {
70 if (m_scene == null) 70 if (m_scene == null)
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
index b259f52..52fa908 100644
--- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
+++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
@@ -59,8 +59,8 @@ namespace OpenSim.Region.OptionalModules.Materials
59 { 59 {
60 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 60 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 public string Name { get { return "MaterialsModule"; } } 62 public string Name { get { return "MaterialsModule"; } }
63 63
64 public Type ReplaceableInterface { get { return null; } } 64 public Type ReplaceableInterface { get { return null; } }
65 65
66 IAssetCache m_cache; 66 IAssetCache m_cache;
@@ -88,13 +88,13 @@ namespace OpenSim.Region.OptionalModules.Materials
88 if (m_enabled) 88 if (m_enabled)
89 m_log.DebugFormat("[Materials]: Initialized"); 89 m_log.DebugFormat("[Materials]: Initialized");
90 } 90 }
91 91
92 public void Close() 92 public void Close()
93 { 93 {
94 if (!m_enabled) 94 if (!m_enabled)
95 return; 95 return;
96 } 96 }
97 97
98 public void AddRegion(Scene scene) 98 public void AddRegion(Scene scene)
99 { 99 {
100 if (!m_enabled) 100 if (!m_enabled)
@@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Materials
152 m_scene.AssetService.Store(a); 152 m_scene.AssetService.Store(a);
153 } 153 }
154 }); 154 });
155 } 155 }
156 } 156 }
157 157
158 private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj) 158 private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj)
@@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Materials
166 { 166 {
167 string capsBase = "/CAPS/" + caps.CapsObjectPath; 167 string capsBase = "/CAPS/" + caps.CapsObjectPath;
168 168
169 IRequestHandler renderMaterialsPostHandler 169 IRequestHandler renderMaterialsPostHandler
170 = new RestStreamHandler("POST", capsBase + "/", 170 = new RestStreamHandler("POST", capsBase + "/",
171 (request, path, param, httpRequest, httpResponse) 171 (request, path, param, httpRequest, httpResponse)
172 => RenderMaterialsPostCap(request, agentID), 172 => RenderMaterialsPostCap(request, agentID),
@@ -177,7 +177,7 @@ namespace OpenSim.Region.OptionalModules.Materials
177 // and POST handlers, (at least at the time this was originally written), so we first set up a POST 177 // and POST handlers, (at least at the time this was originally written), so we first set up a POST
178 // handler normally and then add a GET handler via MainServer 178 // handler normally and then add a GET handler via MainServer
179 179
180 IRequestHandler renderMaterialsGetHandler 180 IRequestHandler renderMaterialsGetHandler
181 = new RestStreamHandler("GET", capsBase + "/", 181 = new RestStreamHandler("GET", capsBase + "/",
182 (request, path, param, httpRequest, httpResponse) 182 (request, path, param, httpRequest, httpResponse)
183 => RenderMaterialsGetCap(request), 183 => RenderMaterialsGetCap(request),
@@ -185,14 +185,14 @@ namespace OpenSim.Region.OptionalModules.Materials
185 MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); 185 MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler);
186 186
187 // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well 187 // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well
188 IRequestHandler renderMaterialsPutHandler 188 IRequestHandler renderMaterialsPutHandler
189 = new RestStreamHandler("PUT", capsBase + "/", 189 = new RestStreamHandler("PUT", capsBase + "/",
190 (request, path, param, httpRequest, httpResponse) 190 (request, path, param, httpRequest, httpResponse)
191 => RenderMaterialsPutCap(request, agentID), 191 => RenderMaterialsPutCap(request, agentID),
192 "RenderMaterials", null); 192 "RenderMaterials", null);
193 MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); 193 MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler);
194 } 194 }
195 195
196 public void RemoveRegion(Scene scene) 196 public void RemoveRegion(Scene scene)
197 { 197 {
198 if (!m_enabled) 198 if (!m_enabled)
@@ -201,8 +201,8 @@ namespace OpenSim.Region.OptionalModules.Materials
201 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; 201 m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
202 m_scene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene; 202 m_scene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene;
203 m_scene.EventManager.OnBackup -= EventManager_OnBackup; 203 m_scene.EventManager.OnBackup -= EventManager_OnBackup;
204 } 204 }
205 205
206 public void RegionLoaded(Scene scene) 206 public void RegionLoaded(Scene scene)
207 { 207 {
208 if (!m_enabled) return; 208 if (!m_enabled) return;
@@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Materials
285 /// Find the materials used in the SOP, and add them to 'm_regionMaterials'. 285 /// Find the materials used in the SOP, and add them to 'm_regionMaterials'.
286 /// </summary> 286 /// </summary>
287 private void GetStoredMaterialsInPart(SceneObjectPart part) 287 private void GetStoredMaterialsInPart(SceneObjectPart part)
288 { 288 {
289 if (part.Shape == null) 289 if (part.Shape == null)
290 return; 290 return;
291 291
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Materials
299 GetStoredMaterialInFace(part, te.DefaultTexture); 299 GetStoredMaterialInFace(part, te.DefaultTexture);
300 else 300 else
301 m_log.WarnFormat( 301 m_log.WarnFormat(
302 "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.", 302 "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.",
303 part.Name, part.ParentGroup.Name, m_scene.Name); 303 part.Name, part.ParentGroup.Name, m_scene.Name);
304 304
305 foreach (Primitive.TextureEntryFace face in te.FaceTextures) 305 foreach (Primitive.TextureEntryFace face in te.FaceTextures)
@@ -363,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Materials
363 363
364 byte[] inBytes = req["Zipped"].AsBinary(); 364 byte[] inBytes = req["Zipped"].AsBinary();
365 365
366 try 366 try
367 { 367 {
368 osd = ZDecompressBytesToOsd(inBytes); 368 osd = ZDecompressBytesToOsd(inBytes);
369 369
@@ -409,7 +409,7 @@ namespace OpenSim.Region.OptionalModules.Materials
409 //return ""; 409 //return "";
410 } 410 }
411 } 411 }
412 412
413 resp["Zipped"] = ZCompressOSD(respArr, false); 413 resp["Zipped"] = ZCompressOSD(respArr, false);
414 string response = OSDParser.SerializeLLSDXmlString(resp); 414 string response = OSDParser.SerializeLLSDXmlString(resp);
415 415
@@ -435,7 +435,7 @@ namespace OpenSim.Region.OptionalModules.Materials
435 435
436 byte[] inBytes = req["Zipped"].AsBinary(); 436 byte[] inBytes = req["Zipped"].AsBinary();
437 437
438 try 438 try
439 { 439 {
440 osd = ZDecompressBytesToOsd(inBytes); 440 osd = ZDecompressBytesToOsd(inBytes);
441 441
@@ -493,7 +493,7 @@ namespace OpenSim.Region.OptionalModules.Materials
493 m_log.WarnFormat("[Materials]: Error in TextureEntry for SOP {0} {1}", sop.Name, sop.UUID); 493 m_log.WarnFormat("[Materials]: Error in TextureEntry for SOP {0} {1}", sop.Name, sop.UUID);
494 continue; 494 continue;
495 } 495 }
496 496
497 UUID id; 497 UUID id;
498 if (mat == null) 498 if (mat == null)
499 { 499 {
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Materials
588 //return ""; 588 //return "";
589 } 589 }
590 } 590 }
591 591
592 resp["Zipped"] = ZCompressOSD(respArr, false); 592 resp["Zipped"] = ZCompressOSD(respArr, false);
593 string response = OSDParser.SerializeLLSDXmlString(resp); 593 string response = OSDParser.SerializeLLSDXmlString(resp);
594 594
@@ -684,7 +684,7 @@ namespace OpenSim.Region.OptionalModules.Materials
684 684
685 if (sop.Name != "Primitive") 685 if (sop.Name != "Primitive")
686 return sop.Name; 686 return sop.Name;
687 687
688 if ((sop.ParentGroup != null) && (sop.ParentGroup.Name != "Primitive")) 688 if ((sop.ParentGroup != null) && (sop.ParentGroup.Name != "Primitive"))
689 return sop.ParentGroup.Name; 689 return sop.ParentGroup.Name;
690 690
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Materials
748 748
749 using (MemoryStream msSinkCompressed = new MemoryStream()) 749 using (MemoryStream msSinkCompressed = new MemoryStream())
750 { 750 {
751 using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed, 751 using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed,
752 Ionic.Zlib.CompressionMode.Compress, CompressionLevel.BestCompression, true)) 752 Ionic.Zlib.CompressionMode.Compress, CompressionLevel.BestCompression, true))
753 { 753 {
754 zOut.Write(data, 0, data.Length); 754 zOut.Write(data, 0, data.Length);
diff --git a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
index 1d9179c..bcfb34d 100755
--- a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
+++ b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs
@@ -54,10 +54,10 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
54 private static bool m_commandsLoaded = false; 54 private static bool m_commandsLoaded = false;
55 55
56 #region ISharedRegionModule 56 #region ISharedRegionModule
57 public string Name { get { return "Runtime Physics Parameter Module"; } } 57 public string Name { get { return "Runtime Physics Parameter Module"; } }
58 58
59 public Type ReplaceableInterface { get { return null; } } 59 public Type ReplaceableInterface { get { return null; } }
60 60
61 public void Initialise(IConfigSource source) 61 public void Initialise(IConfigSource source)
62 { 62 {
63 // m_log.DebugFormat("{0}: INITIALIZED MODULE", LogHeader); 63 // m_log.DebugFormat("{0}: INITIALIZED MODULE", LogHeader);
@@ -68,29 +68,29 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
68 // m_log.DebugFormat("[{0}: POST INITIALIZED MODULE", LogHeader); 68 // m_log.DebugFormat("[{0}: POST INITIALIZED MODULE", LogHeader);
69 InstallInterfaces(); 69 InstallInterfaces();
70 } 70 }
71 71
72 public void Close() 72 public void Close()
73 { 73 {
74 // m_log.DebugFormat("{0}: CLOSED MODULE", LogHeader); 74 // m_log.DebugFormat("{0}: CLOSED MODULE", LogHeader);
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 // m_log.DebugFormat("{0}: REGION {1} ADDED", LogHeader, scene.RegionInfo.RegionName); 79 // m_log.DebugFormat("{0}: REGION {1} ADDED", LogHeader, scene.RegionInfo.RegionName);
80 m_scenes.Add(scene); 80 m_scenes.Add(scene);
81 } 81 }
82 82
83 public void RemoveRegion(Scene scene) 83 public void RemoveRegion(Scene scene)
84 { 84 {
85 // m_log.DebugFormat("{0}: REGION {1} REMOVED", LogHeader, scene.RegionInfo.RegionName); 85 // m_log.DebugFormat("{0}: REGION {1} REMOVED", LogHeader, scene.RegionInfo.RegionName);
86 if (m_scenes.Contains(scene)) 86 if (m_scenes.Contains(scene))
87 m_scenes.Remove(scene); 87 m_scenes.Remove(scene);
88 } 88 }
89 89
90 public void RegionLoaded(Scene scene) 90 public void RegionLoaded(Scene scene)
91 { 91 {
92 // m_log.DebugFormat("{0}: REGION {1} LOADED", LogHeader, scene.RegionInfo.RegionName); 92 // m_log.DebugFormat("{0}: REGION {1} LOADED", LogHeader, scene.RegionInfo.RegionName);
93 } 93 }
94 #endregion INonSharedRegionModule 94 #endregion INonSharedRegionModule
95 95
96 private const string getInvocation = "physics get [<param>|ALL]"; 96 private const string getInvocation = "physics get [<param>|ALL]";
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index 4ffb03b..9c0fa75 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -52,14 +52,14 @@ namespace OpenSim.Region.OptionalModules
52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
53 private bool m_enabled; 53 private bool m_enabled;
54 54
55 public string Name { get { return "PrimLimitsModule"; } } 55 public string Name { get { return "PrimLimitsModule"; } }
56 56
57 public Type ReplaceableInterface { get { return null; } } 57 public Type ReplaceableInterface { get { return null; } }
58 58
59 public void Initialise(IConfigSource config) 59 public void Initialise(IConfigSource config)
60 { 60 {
61 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules", 61 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
62 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); 62 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
63 63
64 List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim())); 64 List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim()));
65 65
@@ -69,11 +69,11 @@ namespace OpenSim.Region.OptionalModules
69 m_log.DebugFormat("[PRIM LIMITS]: Initialized module"); 69 m_log.DebugFormat("[PRIM LIMITS]: Initialized module");
70 m_enabled = true; 70 m_enabled = true;
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75 } 75 }
76 76
77 public void AddRegion(Scene scene) 77 public void AddRegion(Scene scene)
78 { 78 {
79 if (!m_enabled) 79 if (!m_enabled)
@@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules
86 86
87 m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName); 87 m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName);
88 } 88 }
89 89
90 public void RemoveRegion(Scene scene) 90 public void RemoveRegion(Scene scene)
91 { 91 {
92 if (m_enabled) 92 if (m_enabled)
@@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules
97 scene.Permissions.OnRezObject -= CanRezObject; 97 scene.Permissions.OnRezObject -= CanRezObject;
98 scene.Permissions.OnObjectEntry -= CanObjectEnter; 98 scene.Permissions.OnObjectEntry -= CanObjectEnter;
99 scene.Permissions.OnDuplicateObject -= CanDuplicateObject; 99 scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
100 } 100 }
101 101
102 public void RegionLoaded(Scene scene) 102 public void RegionLoaded(Scene scene)
103 { 103 {
104 m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); 104 m_dialogModule = scene.RequestModuleInterface<IDialogModule>();
@@ -158,7 +158,7 @@ namespace OpenSim.Region.OptionalModules
158 158
159 Vector3 oldPoint = obj.GroupPosition; 159 Vector3 oldPoint = obj.GroupPosition;
160 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); 160 ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y);
161 161
162 // The prim hasn't crossed a region boundry so we don't need to worry 162 // The prim hasn't crossed a region boundry so we don't need to worry
163 // about prim counts here 163 // about prim counts here
164 if(oldParcel != null && oldParcel.Equals(newParcel)) 164 if(oldParcel != null && oldParcel.Equals(newParcel))
diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
index 78a9c58..cbfd2d2 100644
--- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.OptionalModules")] 9[assembly: AssemblyTitle("OpenSim.Region.OptionalModules")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index c38bb3e..9343aab 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
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
@@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
67 67
68 protected List<TakeValueCallbackClass> m_TakeStore; 68 protected List<TakeValueCallbackClass> m_TakeStore;
69 protected List<TakeValueCallbackClass> m_ReadStore; 69 protected List<TakeValueCallbackClass> m_ReadStore;
70 70
71 // add separators for quoted paths and array references 71 // add separators for quoted paths and array references
72 protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); 72 protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])");
73 73
@@ -98,10 +98,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
98 /// </summary> 98 /// </summary>
99 // ----------------------------------------------------------------- 99 // -----------------------------------------------------------------
100 public int StringSpace { get; set; } 100 public int StringSpace { get; set; }
101 101
102 // ----------------------------------------------------------------- 102 // -----------------------------------------------------------------
103 /// <summary> 103 /// <summary>
104 /// 104 ///
105 /// </summary> 105 /// </summary>
106 // ----------------------------------------------------------------- 106 // -----------------------------------------------------------------
107 public static bool CanonicalPathExpression(string ipath, out string opath) 107 public static bool CanonicalPathExpression(string ipath, out string opath)
@@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
116 opath = PathExpressionToKey(path); 116 opath = PathExpressionToKey(path);
117 return true; 117 return true;
118 } 118 }
119 119
120 // ----------------------------------------------------------------- 120 // -----------------------------------------------------------------
121 /// <summary> 121 /// <summary>
122 /// 122 ///
123 /// </summary> 123 /// </summary>
124 // ----------------------------------------------------------------- 124 // -----------------------------------------------------------------
125 public JsonStore() 125 public JsonStore()
126 { 126 {
127 StringSpace = 0; 127 StringSpace = 0;
128 m_TakeStore = new List<TakeValueCallbackClass>(); 128 m_TakeStore = new List<TakeValueCallbackClass>();
@@ -132,17 +132,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
132 public JsonStore(string value) : this() 132 public JsonStore(string value) : this()
133 { 133 {
134 // This is going to throw an exception if the value is not 134 // This is going to throw an exception if the value is not
135 // a valid JSON chunk. Calling routines should catch the 135 // a valid JSON chunk. Calling routines should catch the
136 // exception and handle it appropriately 136 // exception and handle it appropriately
137 if (String.IsNullOrEmpty(value)) 137 if (String.IsNullOrEmpty(value))
138 ValueStore = new OSDMap(); 138 ValueStore = new OSDMap();
139 else 139 else
140 ValueStore = OSDParser.DeserializeJson(value); 140 ValueStore = OSDParser.DeserializeJson(value);
141 } 141 }
142 142
143 // ----------------------------------------------------------------- 143 // -----------------------------------------------------------------
144 /// <summary> 144 /// <summary>
145 /// 145 ///
146 /// </summary> 146 /// </summary>
147 // ----------------------------------------------------------------- 147 // -----------------------------------------------------------------
148 public JsonStoreNodeType GetNodeType(string expr) 148 public JsonStoreNodeType GetNodeType(string expr)
@@ -150,27 +150,27 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
150 Stack<string> path; 150 Stack<string> path;
151 if (! ParsePathExpression(expr,out path)) 151 if (! ParsePathExpression(expr,out path))
152 return JsonStoreNodeType.Undefined; 152 return JsonStoreNodeType.Undefined;
153 153
154 OSD result = ProcessPathExpression(ValueStore,path); 154 OSD result = ProcessPathExpression(ValueStore,path);
155 155
156 if (result == null) 156 if (result == null)
157 return JsonStoreNodeType.Undefined; 157 return JsonStoreNodeType.Undefined;
158 158
159 if (result is OSDMap) 159 if (result is OSDMap)
160 return JsonStoreNodeType.Object; 160 return JsonStoreNodeType.Object;
161 161
162 if (result is OSDArray) 162 if (result is OSDArray)
163 return JsonStoreNodeType.Array; 163 return JsonStoreNodeType.Array;
164 164
165 if (OSDBaseType(result.Type)) 165 if (OSDBaseType(result.Type))
166 return JsonStoreNodeType.Value; 166 return JsonStoreNodeType.Value;
167 167
168 return JsonStoreNodeType.Undefined; 168 return JsonStoreNodeType.Undefined;
169 } 169 }
170 170
171 // ----------------------------------------------------------------- 171 // -----------------------------------------------------------------
172 /// <summary> 172 /// <summary>
173 /// 173 ///
174 /// </summary> 174 /// </summary>
175 // ----------------------------------------------------------------- 175 // -----------------------------------------------------------------
176 public JsonStoreValueType GetValueType(string expr) 176 public JsonStoreValueType GetValueType(string expr)
@@ -178,18 +178,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
178 Stack<string> path; 178 Stack<string> path;
179 if (! ParsePathExpression(expr,out path)) 179 if (! ParsePathExpression(expr,out path))
180 return JsonStoreValueType.Undefined; 180 return JsonStoreValueType.Undefined;
181 181
182 OSD result = ProcessPathExpression(ValueStore,path); 182 OSD result = ProcessPathExpression(ValueStore,path);
183 183
184 if (result == null) 184 if (result == null)
185 return JsonStoreValueType.Undefined; 185 return JsonStoreValueType.Undefined;
186 186
187 if (result is OSDMap) 187 if (result is OSDMap)
188 return JsonStoreValueType.Undefined; 188 return JsonStoreValueType.Undefined;
189 189
190 if (result is OSDArray) 190 if (result is OSDArray)
191 return JsonStoreValueType.Undefined; 191 return JsonStoreValueType.Undefined;
192 192
193 if (result is OSDBoolean) 193 if (result is OSDBoolean)
194 return JsonStoreValueType.Boolean; 194 return JsonStoreValueType.Boolean;
195 195
@@ -204,10 +204,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
204 204
205 return JsonStoreValueType.Undefined; 205 return JsonStoreValueType.Undefined;
206 } 206 }
207 207
208 // ----------------------------------------------------------------- 208 // -----------------------------------------------------------------
209 /// <summary> 209 /// <summary>
210 /// 210 ///
211 /// </summary> 211 /// </summary>
212 // ----------------------------------------------------------------- 212 // -----------------------------------------------------------------
213 public int ArrayLength(string expr) 213 public int ArrayLength(string expr)
@@ -228,7 +228,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
228 228
229 // ----------------------------------------------------------------- 229 // -----------------------------------------------------------------
230 /// <summary> 230 /// <summary>
231 /// 231 ///
232 /// </summary> 232 /// </summary>
233 // ----------------------------------------------------------------- 233 // -----------------------------------------------------------------
234 public bool GetValue(string expr, out string value, bool useJson) 234 public bool GetValue(string expr, out string value, bool useJson)
@@ -241,23 +241,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
241 } 241 }
242 242
243 OSD result = ProcessPathExpression(ValueStore,path); 243 OSD result = ProcessPathExpression(ValueStore,path);
244 return ConvertOutputValue(result,out value,useJson); 244 return ConvertOutputValue(result,out value,useJson);
245 } 245 }
246 246
247 247
248 // ----------------------------------------------------------------- 248 // -----------------------------------------------------------------
249 /// <summary> 249 /// <summary>
250 /// 250 ///
251 /// </summary> 251 /// </summary>
252 // ----------------------------------------------------------------- 252 // -----------------------------------------------------------------
253 public bool RemoveValue(string expr) 253 public bool RemoveValue(string expr)
254 { 254 {
255 return SetValueFromExpression(expr,null); 255 return SetValueFromExpression(expr,null);
256 } 256 }
257 257
258 // ----------------------------------------------------------------- 258 // -----------------------------------------------------------------
259 /// <summary> 259 /// <summary>
260 /// 260 ///
261 /// </summary> 261 /// </summary>
262 // ----------------------------------------------------------------- 262 // -----------------------------------------------------------------
263 public bool SetValue(string expr, string value, bool useJson) 263 public bool SetValue(string expr, string value, bool useJson)
@@ -272,7 +272,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
272 { 272 {
273 // There doesn't appear to be a good way to determine if the 273 // There doesn't appear to be a good way to determine if the
274 // value is valid Json other than to let the parser crash 274 // value is valid Json other than to let the parser crash
275 try 275 try
276 { 276 {
277 ovalue = OSDParser.DeserializeJson(value); 277 ovalue = OSDParser.DeserializeJson(value);
278 } 278 }
@@ -292,13 +292,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
292 { 292 {
293 ovalue = new OSDString(value); 293 ovalue = new OSDString(value);
294 } 294 }
295 295
296 return SetValueFromExpression(expr,ovalue); 296 return SetValueFromExpression(expr,ovalue);
297 } 297 }
298 298
299 // ----------------------------------------------------------------- 299 // -----------------------------------------------------------------
300 /// <summary> 300 /// <summary>
301 /// 301 ///
302 /// </summary> 302 /// </summary>
303 // ----------------------------------------------------------------- 303 // -----------------------------------------------------------------
304 public bool TakeValue(string expr, bool useJson, TakeValueCallback cback) 304 public bool TakeValue(string expr, bool useJson, TakeValueCallback cback)
@@ -315,7 +315,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
315 m_TakeStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); 315 m_TakeStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback));
316 return false; 316 return false;
317 } 317 }
318 318
319 string value = String.Empty; 319 string value = String.Empty;
320 if (! ConvertOutputValue(result,out value,useJson)) 320 if (! ConvertOutputValue(result,out value,useJson))
321 { 321 {
@@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
332 332
333 // ----------------------------------------------------------------- 333 // -----------------------------------------------------------------
334 /// <summary> 334 /// <summary>
335 /// 335 ///
336 /// </summary> 336 /// </summary>
337 // ----------------------------------------------------------------- 337 // -----------------------------------------------------------------
338 public bool ReadValue(string expr, bool useJson, TakeValueCallback cback) 338 public bool ReadValue(string expr, bool useJson, TakeValueCallback cback)
@@ -349,7 +349,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
349 m_ReadStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); 349 m_ReadStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback));
350 return false; 350 return false;
351 } 351 }
352 352
353 string value = String.Empty; 353 string value = String.Empty;
354 if (! ConvertOutputValue(result,out value,useJson)) 354 if (! ConvertOutputValue(result,out value,useJson))
355 { 355 {
@@ -362,10 +362,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
362 362
363 return true; 363 return true;
364 } 364 }
365 365
366 // ----------------------------------------------------------------- 366 // -----------------------------------------------------------------
367 /// <summary> 367 /// <summary>
368 /// 368 ///
369 /// </summary> 369 /// </summary>
370 // ----------------------------------------------------------------- 370 // -----------------------------------------------------------------
371 protected bool SetValueFromExpression(string expr, OSD ovalue) 371 protected bool SetValueFromExpression(string expr, OSD ovalue)
@@ -447,7 +447,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
447 Match match = hmatches[0]; 447 Match match = hmatches[0];
448 GroupCollection groups = match.Groups; 448 GroupCollection groups = match.Groups;
449 string hkey = groups[1].Value; 449 string hkey = groups[1].Value;
450 450
451 if (result is OSDMap) 451 if (result is OSDMap)
452 { 452 {
453 // this is the assignment case 453 // this is the assignment case
@@ -456,7 +456,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
456 { 456 {
457 StringSpace -= ComputeSizeOf(hmap[hkey]); 457 StringSpace -= ComputeSizeOf(hmap[hkey]);
458 StringSpace += ComputeSizeOf(ovalue); 458 StringSpace += ComputeSizeOf(ovalue);
459 459
460 hmap[hkey] = ovalue; 460 hmap[hkey] = ovalue;
461 InvokeNextCallback(pexpr + pkey); 461 InvokeNextCallback(pexpr + pkey);
462 return true; 462 return true;
@@ -483,13 +483,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
483 483
484 // ----------------------------------------------------------------- 484 // -----------------------------------------------------------------
485 /// <summary> 485 /// <summary>
486 /// 486 ///
487 /// </summary> 487 /// </summary>
488 // ----------------------------------------------------------------- 488 // -----------------------------------------------------------------
489 protected bool InvokeNextCallback(string pexpr) 489 protected bool InvokeNextCallback(string pexpr)
490 { 490 {
491 // Process all of the reads that match the expression first 491 // Process all of the reads that match the expression first
492 List<TakeValueCallbackClass> reads = 492 List<TakeValueCallbackClass> reads =
493 m_ReadStore.FindAll(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); 493 m_ReadStore.FindAll(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); });
494 494
495 foreach (TakeValueCallbackClass readcb in reads) 495 foreach (TakeValueCallbackClass readcb in reads)
@@ -501,7 +501,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
501 // Process one take next 501 // Process one take next
502 TakeValueCallbackClass takecb = 502 TakeValueCallbackClass takecb =
503 m_TakeStore.Find(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); 503 m_TakeStore.Find(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); });
504 504
505 if (takecb != null) 505 if (takecb != null)
506 { 506 {
507 m_TakeStore.Remove(takecb); 507 m_TakeStore.Remove(takecb);
@@ -525,13 +525,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
525 525
526 // add front and rear separators 526 // add front and rear separators
527 expr = "." + expr + "."; 527 expr = "." + expr + ".";
528 528
529 // add separators for quoted exprs and array references 529 // add separators for quoted exprs and array references
530 expr = m_ParsePassOne.Replace(expr,".$1.",-1,0); 530 expr = m_ParsePassOne.Replace(expr,".$1.",-1,0);
531 531
532 // add quotes to bare identifier 532 // add quotes to bare identifier
533 expr = m_ParsePassThree.Replace(expr,".{$1}",-1,0); 533 expr = m_ParsePassThree.Replace(expr,".{$1}",-1,0);
534 534
535 // remove extra separators 535 // remove extra separators
536 expr = m_ParsePassFour.Replace(expr,".",-1,0); 536 expr = m_ParsePassFour.Replace(expr,".",-1,0);
537 537
@@ -550,7 +550,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
550 550
551 // ----------------------------------------------------------------- 551 // -----------------------------------------------------------------
552 /// <summary> 552 /// <summary>
553 /// 553 ///
554 /// </summary> 554 /// </summary>
555 /// <param>path is a stack where the top level of the path is at the bottom of the stack</param> 555 /// <param>path is a stack where the top level of the path is at the bottom of the stack</param>
556 // ----------------------------------------------------------------- 556 // -----------------------------------------------------------------
@@ -558,13 +558,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
558 { 558 {
559 if (path.Count == 0) 559 if (path.Count == 0)
560 return map; 560 return map;
561 561
562 string pkey = path.Pop(); 562 string pkey = path.Pop();
563 563
564 OSD rmap = ProcessPathExpression(map,path); 564 OSD rmap = ProcessPathExpression(map,path);
565 if (rmap == null) 565 if (rmap == null)
566 return null; 566 return null;
567 567
568 // ---------- Check for an array index ---------- 568 // ---------- Check for an array index ----------
569 MatchCollection amatches = m_SimpleArrayPattern.Matches(pkey,0); 569 MatchCollection amatches = m_SimpleArrayPattern.Matches(pkey,0);
570 570
@@ -582,7 +582,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
582 GroupCollection groups = match.Groups; 582 GroupCollection groups = match.Groups;
583 string akey = groups[1].Value; 583 string akey = groups[1].Value;
584 int aval = Convert.ToInt32(akey); 584 int aval = Convert.ToInt32(akey);
585 585
586 if (aval < amap.Count) 586 if (aval < amap.Count)
587 return (OSD) amap[aval]; 587 return (OSD) amap[aval];
588 588
@@ -599,13 +599,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
599 m_log.WarnFormat("[JsonStore] wrong type for key {2}, expecting {0}, got {1}",OSDType.Map,rmap.Type,pkey); 599 m_log.WarnFormat("[JsonStore] wrong type for key {2}, expecting {0}, got {1}",OSDType.Map,rmap.Type,pkey);
600 return null; 600 return null;
601 } 601 }
602 602
603 OSDMap hmap = rmap as OSDMap; 603 OSDMap hmap = rmap as OSDMap;
604 604
605 Match match = hmatches[0]; 605 Match match = hmatches[0];
606 GroupCollection groups = match.Groups; 606 GroupCollection groups = match.Groups;
607 string hkey = groups[1].Value; 607 string hkey = groups[1].Value;
608 608
609 if (hmap.ContainsKey(hkey)) 609 if (hmap.ContainsKey(hkey))
610 return (OSD) hmap[hkey]; 610 return (OSD) hmap[hkey];
611 611
@@ -619,13 +619,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
619 619
620 // ----------------------------------------------------------------- 620 // -----------------------------------------------------------------
621 /// <summary> 621 /// <summary>
622 /// 622 ///
623 /// </summary> 623 /// </summary>
624 // ----------------------------------------------------------------- 624 // -----------------------------------------------------------------
625 protected static bool ConvertOutputValue(OSD result, out string value, bool useJson) 625 protected static bool ConvertOutputValue(OSD result, out string value, bool useJson)
626 { 626 {
627 value = String.Empty; 627 value = String.Empty;
628 628
629 // If we couldn't process the path 629 // If we couldn't process the path
630 if (result == null) 630 if (result == null)
631 return false; 631 return false;
@@ -646,13 +646,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
646 return true; 646 return true;
647 } 647 }
648 648
649 value = "'" + result.AsString() + "'"; 649 value = "'" + result.AsString() + "'";
650 return true; 650 return true;
651 } 651 }
652 652
653 if (OSDBaseType(result.Type)) 653 if (OSDBaseType(result.Type))
654 { 654 {
655 value = result.AsString(); 655 value = result.AsString();
656 return true; 656 return true;
657 } 657 }
658 658
@@ -661,24 +661,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
661 661
662 // ----------------------------------------------------------------- 662 // -----------------------------------------------------------------
663 /// <summary> 663 /// <summary>
664 /// 664 ///
665 /// </summary> 665 /// </summary>
666 // ----------------------------------------------------------------- 666 // -----------------------------------------------------------------
667 protected static string PathExpressionToKey(Stack<string> path) 667 protected static string PathExpressionToKey(Stack<string> path)
668 { 668 {
669 if (path.Count == 0) 669 if (path.Count == 0)
670 return ""; 670 return "";
671 671
672 string pkey = ""; 672 string pkey = "";
673 foreach (string k in path) 673 foreach (string k in path)
674 pkey = (pkey == "") ? k : (k + "." + pkey); 674 pkey = (pkey == "") ? k : (k + "." + pkey);
675 675
676 return pkey; 676 return pkey;
677 } 677 }
678 678
679 // ----------------------------------------------------------------- 679 // -----------------------------------------------------------------
680 /// <summary> 680 /// <summary>
681 /// 681 ///
682 /// </summary> 682 /// </summary>
683 // ----------------------------------------------------------------- 683 // -----------------------------------------------------------------
684 protected static bool OSDBaseType(OSDType type) 684 protected static bool OSDBaseType(OSDType type)
@@ -705,7 +705,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
705 705
706 // ----------------------------------------------------------------- 706 // -----------------------------------------------------------------
707 /// <summary> 707 /// <summary>
708 /// 708 ///
709 /// </summary> 709 /// </summary>
710 // ----------------------------------------------------------------- 710 // -----------------------------------------------------------------
711 protected static int ComputeSizeOf(OSD value) 711 protected static int ComputeSizeOf(OSD value)
@@ -731,7 +731,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
731 private Scene m_scene; 731 private Scene m_scene;
732 private UUID m_objectID; 732 private UUID m_objectID;
733 733
734 protected override OSD ValueStore 734 protected override OSD ValueStore
735 { 735 {
736 get 736 get
737 { 737 {
@@ -741,7 +741,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
741 // This is bad 741 // This is bad
742 return null; 742 return null;
743 } 743 }
744 744
745 return sop.DynAttrs.TopLevelMap; 745 return sop.DynAttrs.TopLevelMap;
746 } 746 }
747 747
@@ -761,5 +761,5 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
761 StringSpace = ComputeSizeOf(ValueStore); 761 StringSpace = ComputeSizeOf(ValueStore);
762 } 762 }
763 } 763 }
764 764
765} 765}
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
index d4b19dd..9bf9cb0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
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
@@ -79,7 +79,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
79 // ----------------------------------------------------------------- 79 // -----------------------------------------------------------------
80 public void Initialise(IConfigSource config) 80 public void Initialise(IConfigSource config)
81 { 81 {
82 try 82 try
83 { 83 {
84 if ((m_config = config.Configs["JsonStore"]) == null) 84 if ((m_config = config.Configs["JsonStore"]) == null)
85 { 85 {
@@ -127,7 +127,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
127 if (m_enabled) 127 if (m_enabled)
128 { 128 {
129 m_scene = scene; 129 m_scene = scene;
130 130
131 } 131 }
132 } 132 }
133 133
@@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
143 143
144 // ----------------------------------------------------------------- 144 // -----------------------------------------------------------------
145 /// <summary> 145 /// <summary>
146 /// Called when all modules have been added for a region. This is 146 /// Called when all modules have been added for a region. This is
147 /// where we hook up events 147 /// where we hook up events
148 /// </summary> 148 /// </summary>
149 // ----------------------------------------------------------------- 149 // -----------------------------------------------------------------
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
index 26044f0..ae8341f 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
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
@@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
83 // ----------------------------------------------------------------- 83 // -----------------------------------------------------------------
84 public void Initialise(IConfigSource config) 84 public void Initialise(IConfigSource config)
85 { 85 {
86 try 86 try
87 { 87 {
88 if ((m_config = config.Configs["JsonStore"]) == null) 88 if ((m_config = config.Configs["JsonStore"]) == null)
89 { 89 {
@@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
159 159
160 // ----------------------------------------------------------------- 160 // -----------------------------------------------------------------
161 /// <summary> 161 /// <summary>
162 /// Called when all modules have been added for a region. This is 162 /// Called when all modules have been added for a region. This is
163 /// where we hook up events 163 /// where we hook up events
164 /// </summary> 164 /// </summary>
165 // ----------------------------------------------------------------- 165 // -----------------------------------------------------------------
@@ -184,7 +184,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
184#region SceneEvents 184#region SceneEvents
185 // ----------------------------------------------------------------- 185 // -----------------------------------------------------------------
186 /// <summary> 186 /// <summary>
187 /// 187 ///
188 /// </summary> 188 /// </summary>
189 // ----------------------------------------------------------------- 189 // -----------------------------------------------------------------
190 public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) 190 public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
@@ -196,10 +196,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
196 196
197#region ScriptInvocationInteface 197#region ScriptInvocationInteface
198 198
199 199
200 // ----------------------------------------------------------------- 200 // -----------------------------------------------------------------
201 /// <summary> 201 /// <summary>
202 /// 202 ///
203 /// </summary> 203 /// </summary>
204 // ----------------------------------------------------------------- 204 // -----------------------------------------------------------------
205 public JsonStoreStats GetStoreStats() 205 public JsonStoreStats GetStoreStats()
@@ -210,13 +210,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
210 { 210 {
211 stats.StoreCount = m_JsonValueStore.Count; 211 stats.StoreCount = m_JsonValueStore.Count;
212 } 212 }
213 213
214 return stats; 214 return stats;
215 } 215 }
216 216
217 // ----------------------------------------------------------------- 217 // -----------------------------------------------------------------
218 /// <summary> 218 /// <summary>
219 /// 219 ///
220 /// </summary> 220 /// </summary>
221 // ----------------------------------------------------------------- 221 // -----------------------------------------------------------------
222 public bool AttachObjectStore(UUID objectID) 222 public bool AttachObjectStore(UUID objectID)
@@ -235,17 +235,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
235 { 235 {
236 if (m_JsonValueStore.ContainsKey(objectID)) 236 if (m_JsonValueStore.ContainsKey(objectID))
237 return true; 237 return true;
238 238
239 JsonStore map = new JsonObjectStore(m_scene,objectID); 239 JsonStore map = new JsonObjectStore(m_scene,objectID);
240 m_JsonValueStore.Add(objectID,map); 240 m_JsonValueStore.Add(objectID,map);
241 } 241 }
242 242
243 return true; 243 return true;
244 } 244 }
245 245
246 // ----------------------------------------------------------------- 246 // -----------------------------------------------------------------
247 /// <summary> 247 /// <summary>
248 /// 248 ///
249 /// </summary> 249 /// </summary>
250 // ----------------------------------------------------------------- 250 // -----------------------------------------------------------------
251 public bool CreateStore(string value, ref UUID result) 251 public bool CreateStore(string value, ref UUID result)
@@ -254,12 +254,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
254 result = UUID.Random(); 254 result = UUID.Random();
255 255
256 JsonStore map = null; 256 JsonStore map = null;
257 257
258 if (! m_enabled) return false; 258 if (! m_enabled) return false;
259 259
260 260
261 try 261 try
262 { 262 {
263 map = new JsonStore(value); 263 map = new JsonStore(value);
264 } 264 }
265 catch (Exception) 265 catch (Exception)
@@ -270,13 +270,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
270 270
271 lock (m_JsonValueStore) 271 lock (m_JsonValueStore)
272 m_JsonValueStore.Add(result,map); 272 m_JsonValueStore.Add(result,map);
273 273
274 return true; 274 return true;
275 } 275 }
276 276
277 // ----------------------------------------------------------------- 277 // -----------------------------------------------------------------
278 /// <summary> 278 /// <summary>
279 /// 279 ///
280 /// </summary> 280 /// </summary>
281 // ----------------------------------------------------------------- 281 // -----------------------------------------------------------------
282 public bool DestroyStore(UUID storeID) 282 public bool DestroyStore(UUID storeID)
@@ -289,7 +289,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
289 289
290 // ----------------------------------------------------------------- 290 // -----------------------------------------------------------------
291 /// <summary> 291 /// <summary>
292 /// 292 ///
293 /// </summary> 293 /// </summary>
294 // ----------------------------------------------------------------- 294 // -----------------------------------------------------------------
295 public bool TestStore(UUID storeID) 295 public bool TestStore(UUID storeID)
@@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
302 302
303 // ----------------------------------------------------------------- 303 // -----------------------------------------------------------------
304 /// <summary> 304 /// <summary>
305 /// 305 ///
306 /// </summary> 306 /// </summary>
307 // ----------------------------------------------------------------- 307 // -----------------------------------------------------------------
308 public JsonStoreNodeType GetNodeType(UUID storeID, string path) 308 public JsonStoreNodeType GetNodeType(UUID storeID, string path)
@@ -318,7 +318,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
318 return JsonStoreNodeType.Undefined; 318 return JsonStoreNodeType.Undefined;
319 } 319 }
320 } 320 }
321 321
322 try 322 try
323 { 323 {
324 lock (map) 324 lock (map)
@@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
334 334
335 // ----------------------------------------------------------------- 335 // -----------------------------------------------------------------
336 /// <summary> 336 /// <summary>
337 /// 337 ///
338 /// </summary> 338 /// </summary>
339 // ----------------------------------------------------------------- 339 // -----------------------------------------------------------------
340 public JsonStoreValueType GetValueType(UUID storeID, string path) 340 public JsonStoreValueType GetValueType(UUID storeID, string path)
@@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
350 return JsonStoreValueType.Undefined; 350 return JsonStoreValueType.Undefined;
351 } 351 }
352 } 352 }
353 353
354 try 354 try
355 { 355 {
356 lock (map) 356 lock (map)
@@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
366 366
367 // ----------------------------------------------------------------- 367 // -----------------------------------------------------------------
368 /// <summary> 368 /// <summary>
369 /// 369 ///
370 /// </summary> 370 /// </summary>
371 // ----------------------------------------------------------------- 371 // -----------------------------------------------------------------
372 public bool SetValue(UUID storeID, string path, string value, bool useJson) 372 public bool SetValue(UUID storeID, string path, string value, bool useJson)
@@ -382,7 +382,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
382 return false; 382 return false;
383 } 383 }
384 } 384 }
385 385
386 try 386 try
387 { 387 {
388 lock (map) 388 lock (map)
@@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
393 storeID,map.StringSpace,m_maxStringSpace); 393 storeID,map.StringSpace,m_maxStringSpace);
394 return false; 394 return false;
395 } 395 }
396 396
397 return map.SetValue(path,value,useJson); 397 return map.SetValue(path,value,useJson);
398 } 398 }
399 } 399 }
@@ -404,10 +404,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
404 404
405 return false; 405 return false;
406 } 406 }
407 407
408 // ----------------------------------------------------------------- 408 // -----------------------------------------------------------------
409 /// <summary> 409 /// <summary>
410 /// 410 ///
411 /// </summary> 411 /// </summary>
412 // ----------------------------------------------------------------- 412 // -----------------------------------------------------------------
413 public bool RemoveValue(UUID storeID, string path) 413 public bool RemoveValue(UUID storeID, string path)
@@ -423,7 +423,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
423 return false; 423 return false;
424 } 424 }
425 } 425 }
426 426
427 try 427 try
428 { 428 {
429 lock (map) 429 lock (map)
@@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
436 436
437 return false; 437 return false;
438 } 438 }
439 439
440 // ----------------------------------------------------------------- 440 // -----------------------------------------------------------------
441 /// <summary> 441 /// <summary>
442 /// 442 ///
443 /// </summary> 443 /// </summary>
444 // ----------------------------------------------------------------- 444 // -----------------------------------------------------------------
445 public int GetArrayLength(UUID storeID, string path) 445 public int GetArrayLength(UUID storeID, string path)
@@ -464,19 +464,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
464 { 464 {
465 m_log.Error("[JsonStore]: unable to retrieve value", e); 465 m_log.Error("[JsonStore]: unable to retrieve value", e);
466 } 466 }
467 467
468 return -1; 468 return -1;
469 } 469 }
470 470
471 // ----------------------------------------------------------------- 471 // -----------------------------------------------------------------
472 /// <summary> 472 /// <summary>
473 /// 473 ///
474 /// </summary> 474 /// </summary>
475 // ----------------------------------------------------------------- 475 // -----------------------------------------------------------------
476 public bool GetValue(UUID storeID, string path, bool useJson, out string value) 476 public bool GetValue(UUID storeID, string path, bool useJson, out string value)
477 { 477 {
478 value = String.Empty; 478 value = String.Empty;
479 479
480 if (! m_enabled) return false; 480 if (! m_enabled) return false;
481 481
482 JsonStore map = null; 482 JsonStore map = null;
@@ -497,13 +497,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
497 { 497 {
498 m_log.Error("[JsonStore]: unable to retrieve value", e); 498 m_log.Error("[JsonStore]: unable to retrieve value", e);
499 } 499 }
500 500
501 return false; 501 return false;
502 } 502 }
503 503
504 // ----------------------------------------------------------------- 504 // -----------------------------------------------------------------
505 /// <summary> 505 /// <summary>
506 /// 506 ///
507 /// </summary> 507 /// </summary>
508 // ----------------------------------------------------------------- 508 // -----------------------------------------------------------------
509 public void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) 509 public void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback)
@@ -536,13 +536,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
536 { 536 {
537 m_log.Error("[JsonStore] unable to retrieve value", e); 537 m_log.Error("[JsonStore] unable to retrieve value", e);
538 } 538 }
539 539
540 cback(String.Empty); 540 cback(String.Empty);
541 } 541 }
542 542
543 // ----------------------------------------------------------------- 543 // -----------------------------------------------------------------
544 /// <summary> 544 /// <summary>
545 /// 545 ///
546 /// </summary> 546 /// </summary>
547 // ----------------------------------------------------------------- 547 // -----------------------------------------------------------------
548 public void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) 548 public void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback)
@@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
575 { 575 {
576 m_log.Error("[JsonStore]: unable to retrieve value", e); 576 m_log.Error("[JsonStore]: unable to retrieve value", e);
577 } 577 }
578 578
579 cback(String.Empty); 579 cback(String.Empty);
580 } 580 }
581 581
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
index 7a0370a..a9fdb66 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Contributors 2 * Copyright (c) Contributors
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
@@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
83 // ----------------------------------------------------------------- 83 // -----------------------------------------------------------------
84 public void Initialise(IConfigSource config) 84 public void Initialise(IConfigSource config)
85 { 85 {
86 try 86 try
87 { 87 {
88 if ((m_config = config.Configs["JsonStore"]) == null) 88 if ((m_config = config.Configs["JsonStore"]) == null)
89 { 89 {
@@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
166 166
167 // ----------------------------------------------------------------- 167 // -----------------------------------------------------------------
168 /// <summary> 168 /// <summary>
169 /// Called when all modules have been added for a region. This is 169 /// Called when all modules have been added for a region. This is
170 /// where we hook up events 170 /// where we hook up events
171 /// </summary> 171 /// </summary>
172 // ----------------------------------------------------------------- 172 // -----------------------------------------------------------------
@@ -251,7 +251,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
251#region ScriptInvocationInteface 251#region ScriptInvocationInteface
252 // ----------------------------------------------------------------- 252 // -----------------------------------------------------------------
253 /// <summary> 253 /// <summary>
254 /// 254 ///
255 /// </summary> 255 /// </summary>
256 // ----------------------------------------------------------------- 256 // -----------------------------------------------------------------
257 [ScriptInvocation] 257 [ScriptInvocation]
@@ -260,13 +260,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
260 UUID uuid = UUID.Zero; 260 UUID uuid = UUID.Zero;
261 if (! m_store.AttachObjectStore(hostID)) 261 if (! m_store.AttachObjectStore(hostID))
262 GenerateRuntimeError("Failed to create Json store"); 262 GenerateRuntimeError("Failed to create Json store");
263 263
264 return hostID; 264 return hostID;
265 } 265 }
266 266
267 // ----------------------------------------------------------------- 267 // -----------------------------------------------------------------
268 /// <summary> 268 /// <summary>
269 /// 269 ///
270 /// </summary> 270 /// </summary>
271 // ----------------------------------------------------------------- 271 // -----------------------------------------------------------------
272 [ScriptInvocation] 272 [ScriptInvocation]
@@ -275,12 +275,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
275 UUID uuid = UUID.Zero; 275 UUID uuid = UUID.Zero;
276 if (! m_store.CreateStore(value, ref uuid)) 276 if (! m_store.CreateStore(value, ref uuid))
277 GenerateRuntimeError("Failed to create Json store"); 277 GenerateRuntimeError("Failed to create Json store");
278 278
279 lock (m_scriptStores) 279 lock (m_scriptStores)
280 { 280 {
281 if (! m_scriptStores.ContainsKey(scriptID)) 281 if (! m_scriptStores.ContainsKey(scriptID))
282 m_scriptStores[scriptID] = new HashSet<UUID>(); 282 m_scriptStores[scriptID] = new HashSet<UUID>();
283 283
284 m_scriptStores[scriptID].Add(uuid); 284 m_scriptStores[scriptID].Add(uuid);
285 } 285 }
286 return uuid; 286 return uuid;
@@ -288,7 +288,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
288 288
289 // ----------------------------------------------------------------- 289 // -----------------------------------------------------------------
290 /// <summary> 290 /// <summary>
291 /// 291 ///
292 /// </summary> 292 /// </summary>
293 // ----------------------------------------------------------------- 293 // -----------------------------------------------------------------
294 [ScriptInvocation] 294 [ScriptInvocation]
@@ -305,7 +305,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
305 305
306 // ----------------------------------------------------------------- 306 // -----------------------------------------------------------------
307 /// <summary> 307 /// <summary>
308 /// 308 ///
309 /// </summary> 309 /// </summary>
310 // ----------------------------------------------------------------- 310 // -----------------------------------------------------------------
311 [ScriptInvocation] 311 [ScriptInvocation]
@@ -316,7 +316,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
316 316
317 // ----------------------------------------------------------------- 317 // -----------------------------------------------------------------
318 /// <summary> 318 /// <summary>
319 /// 319 ///
320 /// </summary> 320 /// </summary>
321 // ----------------------------------------------------------------- 321 // -----------------------------------------------------------------
322 [ScriptInvocation] 322 [ScriptInvocation]
@@ -330,7 +330,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
330 330
331 // ----------------------------------------------------------------- 331 // -----------------------------------------------------------------
332 /// <summary> 332 /// <summary>
333 /// 333 ///
334 /// </summary> 334 /// </summary>
335 // ----------------------------------------------------------------- 335 // -----------------------------------------------------------------
336 [ScriptInvocation] 336 [ScriptInvocation]
@@ -341,10 +341,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
341 o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard"); 341 o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard");
342 return reqID; 342 return reqID;
343 } 343 }
344 344
345 // ----------------------------------------------------------------- 345 // -----------------------------------------------------------------
346 /// <summary> 346 /// <summary>
347 /// 347 ///
348 /// </summary> 348 /// </summary>
349 // ----------------------------------------------------------------- 349 // -----------------------------------------------------------------
350 [ScriptInvocation] 350 [ScriptInvocation]
@@ -358,7 +358,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
358 358
359 // ----------------------------------------------------------------- 359 // -----------------------------------------------------------------
360 /// <summary> 360 /// <summary>
361 /// 361 ///
362 /// </summary> 362 /// </summary>
363 // ----------------------------------------------------------------- 363 // -----------------------------------------------------------------
364 [ScriptInvocation] 364 [ScriptInvocation]
@@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
366 { 366 {
367 string ipath = ConvertList2Path(pathlist); 367 string ipath = ConvertList2Path(pathlist);
368 string opath; 368 string opath;
369 369
370 if (JsonStore.CanonicalPathExpression(ipath,out opath)) 370 if (JsonStore.CanonicalPathExpression(ipath,out opath))
371 return opath; 371 return opath;
372 372
@@ -375,10 +375,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
375 // the entire store 375 // the entire store
376 return "**INVALID**"; 376 return "**INVALID**";
377 } 377 }
378 378
379 // ----------------------------------------------------------------- 379 // -----------------------------------------------------------------
380 /// <summary> 380 /// <summary>
381 /// 381 ///
382 /// </summary> 382 /// </summary>
383 // ----------------------------------------------------------------- 383 // -----------------------------------------------------------------
384 [ScriptInvocation] 384 [ScriptInvocation]
@@ -389,7 +389,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
389 389
390 // ----------------------------------------------------------------- 390 // -----------------------------------------------------------------
391 /// <summary> 391 /// <summary>
392 /// 392 ///
393 /// </summary> 393 /// </summary>
394 // ----------------------------------------------------------------- 394 // -----------------------------------------------------------------
395 [ScriptInvocation] 395 [ScriptInvocation]
@@ -400,7 +400,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
400 400
401 // ----------------------------------------------------------------- 401 // -----------------------------------------------------------------
402 /// <summary> 402 /// <summary>
403 /// 403 ///
404 /// </summary> 404 /// </summary>
405 // ----------------------------------------------------------------- 405 // -----------------------------------------------------------------
406 [ScriptInvocation] 406 [ScriptInvocation]
@@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
417 417
418 // ----------------------------------------------------------------- 418 // -----------------------------------------------------------------
419 /// <summary> 419 /// <summary>
420 /// 420 ///
421 /// </summary> 421 /// </summary>
422 // ----------------------------------------------------------------- 422 // -----------------------------------------------------------------
423 [ScriptInvocation] 423 [ScriptInvocation]
@@ -425,10 +425,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
425 { 425 {
426 return m_store.RemoveValue(storeID,path) ? 1 : 0; 426 return m_store.RemoveValue(storeID,path) ? 1 : 0;
427 } 427 }
428 428
429 // ----------------------------------------------------------------- 429 // -----------------------------------------------------------------
430 /// <summary> 430 /// <summary>
431 /// 431 ///
432 /// </summary> 432 /// </summary>
433 // ----------------------------------------------------------------- 433 // -----------------------------------------------------------------
434 [ScriptInvocation] 434 [ScriptInvocation]
@@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
436 { 436 {
437 return m_store.GetArrayLength(storeID,path); 437 return m_store.GetArrayLength(storeID,path);
438 } 438 }
439 439
440 // ----------------------------------------------------------------- 440 // -----------------------------------------------------------------
441 /// <summary> 441 /// <summary>
442 /// 442 ///
443 /// </summary> 443 /// </summary>
444 // ----------------------------------------------------------------- 444 // -----------------------------------------------------------------
445 [ScriptInvocation] 445 [ScriptInvocation]
@@ -457,10 +457,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
457 m_store.GetValue(storeID,path,true, out value); 457 m_store.GetValue(storeID,path,true, out value);
458 return value; 458 return value;
459 } 459 }
460 460
461 // ----------------------------------------------------------------- 461 // -----------------------------------------------------------------
462 /// <summary> 462 /// <summary>
463 /// 463 ///
464 /// </summary> 464 /// </summary>
465 // ----------------------------------------------------------------- 465 // -----------------------------------------------------------------
466 [ScriptInvocation] 466 [ScriptInvocation]
@@ -480,10 +480,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
480 o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson"); 480 o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson");
481 return reqID; 481 return reqID;
482 } 482 }
483 483
484 // ----------------------------------------------------------------- 484 // -----------------------------------------------------------------
485 /// <summary> 485 /// <summary>
486 /// 486 ///
487 /// </summary> 487 /// </summary>
488 // ----------------------------------------------------------------- 488 // -----------------------------------------------------------------
489 [ScriptInvocation] 489 [ScriptInvocation]
@@ -503,12 +503,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
503 o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson"); 503 o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson");
504 return reqID; 504 return reqID;
505 } 505 }
506 506
507#endregion 507#endregion
508 508
509 // ----------------------------------------------------------------- 509 // -----------------------------------------------------------------
510 /// <summary> 510 /// <summary>
511 /// 511 ///
512 /// </summary> 512 /// </summary>
513 // ----------------------------------------------------------------- 513 // -----------------------------------------------------------------
514 protected void GenerateRuntimeError(string msg) 514 protected void GenerateRuntimeError(string msg)
@@ -516,10 +516,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
516 m_log.InfoFormat("[JsonStore] runtime error: {0}",msg); 516 m_log.InfoFormat("[JsonStore] runtime error: {0}",msg);
517 throw new Exception("JsonStore Runtime Error: " + msg); 517 throw new Exception("JsonStore Runtime Error: " + msg);
518 } 518 }
519 519
520 // ----------------------------------------------------------------- 520 // -----------------------------------------------------------------
521 /// <summary> 521 /// <summary>
522 /// 522 ///
523 /// </summary> 523 /// </summary>
524 // ----------------------------------------------------------------- 524 // -----------------------------------------------------------------
525 protected void DispatchValue(UUID scriptID, UUID reqID, string value) 525 protected void DispatchValue(UUID scriptID, UUID reqID, string value)
@@ -529,7 +529,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
529 529
530 // ----------------------------------------------------------------- 530 // -----------------------------------------------------------------
531 /// <summary> 531 /// <summary>
532 /// 532 ///
533 /// </summary> 533 /// </summary>
534 // ----------------------------------------------------------------- 534 // -----------------------------------------------------------------
535 private void DoJsonTakeValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) 535 private void DoJsonTakeValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson)
@@ -543,14 +543,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
543 { 543 {
544 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); 544 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString());
545 } 545 }
546 546
547 DispatchValue(scriptID,reqID,String.Empty); 547 DispatchValue(scriptID,reqID,String.Empty);
548 } 548 }
549 549
550 550
551 // ----------------------------------------------------------------- 551 // -----------------------------------------------------------------
552 /// <summary> 552 /// <summary>
553 /// 553 ///
554 /// </summary> 554 /// </summary>
555 // ----------------------------------------------------------------- 555 // -----------------------------------------------------------------
556 private void DoJsonReadValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) 556 private void DoJsonReadValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson)
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
564 { 564 {
565 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); 565 m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString());
566 } 566 }
567 567
568 DispatchValue(scriptID,reqID,String.Empty); 568 DispatchValue(scriptID,reqID,String.Empty);
569 } 569 }
570 570
571 // ----------------------------------------------------------------- 571 // -----------------------------------------------------------------
572 /// <summary> 572 /// <summary>
573 /// 573 ///
574 /// </summary> 574 /// </summary>
575 // ----------------------------------------------------------------- 575 // -----------------------------------------------------------------
576 private void DoJsonReadNotecard( 576 private void DoJsonReadNotecard(
@@ -580,7 +580,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
580 580
581 if (!UUID.TryParse(notecardIdentifier, out assetID)) 581 if (!UUID.TryParse(notecardIdentifier, out assetID))
582 { 582 {
583 SceneObjectPart part = m_scene.GetSceneObjectPart(hostID); 583 SceneObjectPart part = m_scene.GetSceneObjectPart(hostID);
584 assetID = ScriptUtils.GetAssetIdFromItemName(part, notecardIdentifier, (int)AssetType.Notecard); 584 assetID = ScriptUtils.GetAssetIdFromItemName(part, notecardIdentifier, (int)AssetType.Notecard);
585 } 585 }
586 586
@@ -590,10 +590,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
590 590
591 if (a.Type != (sbyte)AssetType.Notecard) 591 if (a.Type != (sbyte)AssetType.Notecard)
592 GenerateRuntimeError(String.Format("Invalid notecard asset {0}", assetID)); 592 GenerateRuntimeError(String.Format("Invalid notecard asset {0}", assetID));
593 593
594 m_log.DebugFormat("[JsonStoreScripts]: read notecard in context {0}",storeID); 594 m_log.DebugFormat("[JsonStoreScripts]: read notecard in context {0}",storeID);
595 595
596 try 596 try
597 { 597 {
598 string jsondata = SLUtil.ParseNotecardToString(a.Data); 598 string jsondata = SLUtil.ParseNotecardToString(a.Data);
599 int result = m_store.SetValue(storeID, path, jsondata,true) ? 1 : 0; 599 int result = m_store.SetValue(storeID, path, jsondata,true) ? 1 : 0;
@@ -612,10 +612,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
612 GenerateRuntimeError(String.Format("Json parsing failed for {0}", assetID)); 612 GenerateRuntimeError(String.Format("Json parsing failed for {0}", assetID));
613 m_comms.DispatchReply(scriptID, 0, "", reqID.ToString()); 613 m_comms.DispatchReply(scriptID, 0, "", reqID.ToString());
614 } 614 }
615 615
616 // ----------------------------------------------------------------- 616 // -----------------------------------------------------------------
617 /// <summary> 617 /// <summary>
618 /// 618 ///
619 /// </summary> 619 /// </summary>
620 // ----------------------------------------------------------------- 620 // -----------------------------------------------------------------
621 private void DoJsonWriteNotecard(UUID reqID, UUID hostID, UUID scriptID, UUID storeID, string path, string name) 621 private void DoJsonWriteNotecard(UUID reqID, UUID hostID, UUID scriptID, UUID storeID, string path, string name)
@@ -626,9 +626,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
626 m_comms.DispatchReply(scriptID,0,UUID.Zero.ToString(),reqID.ToString()); 626 m_comms.DispatchReply(scriptID,0,UUID.Zero.ToString(),reqID.ToString());
627 return; 627 return;
628 } 628 }
629 629
630 SceneObjectPart host = m_scene.GetSceneObjectPart(hostID); 630 SceneObjectPart host = m_scene.GetSceneObjectPart(hostID);
631 631
632 // Create new asset 632 // Create new asset
633 UUID assetID = UUID.Random(); 633 UUID assetID = UUID.Random();
634 AssetBase asset = new AssetBase(assetID, name, (sbyte)AssetType.Notecard, host.OwnerID.ToString()); 634 AssetBase asset = new AssetBase(assetID, name, (sbyte)AssetType.Notecard, host.OwnerID.ToString());
@@ -681,7 +681,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
681 for (int i = 0; i < pathlist.Length; i++) 681 for (int i = 0; i < pathlist.Length; i++)
682 { 682 {
683 string token = ""; 683 string token = "";
684 684
685 if (pathlist[i] is string) 685 if (pathlist[i] is string)
686 { 686 {
687 token = pathlist[i].ToString(); 687 token = pathlist[i].ToString();
@@ -699,16 +699,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
699 { 699 {
700 token = "." + pathlist[i].ToString() + "."; 700 token = "." + pathlist[i].ToString() + ".";
701 } 701 }
702 702
703 path += token + "."; 703 path += token + ".";
704 } 704 }
705 705
706 return path; 706 return path;
707 } 707 }
708 708
709 // ----------------------------------------------------------------- 709 // -----------------------------------------------------------------
710 /// <summary> 710 /// <summary>
711 /// 711 ///
712 /// </summary> 712 /// </summary>
713 // ----------------------------------------------------------------- 713 // -----------------------------------------------------------------
714 private void DoJsonRezObject(UUID hostID, UUID scriptID, UUID reqID, string name, Vector3 pos, Vector3 vel, Quaternion rot, string param) 714 private void DoJsonRezObject(UUID hostID, UUID scriptID, UUID reqID, string name, Vector3 pos, Vector3 vel, Quaternion rot, string param)
@@ -801,7 +801,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
801 801
802 group.ScheduleGroupForFullUpdate(); 802 group.ScheduleGroupForFullUpdate();
803 803
804 // send the reply back to the host object, use the integer param to indicate the number 804 // send the reply back to the host object, use the integer param to indicate the number
805 // of remaining objects 805 // of remaining objects
806 m_comms.DispatchReply(scriptID, objlist.Count-i-1, group.RootPart.UUID.ToString(), reqID.ToString()); 806 m_comms.DispatchReply(scriptID, objlist.Count-i-1, group.RootPart.UUID.ToString(), reqID.ToString());
807 } 807 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
index 99a7076..77ee785 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs
@@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
180 TestHelpers.InMethod(); 180 TestHelpers.InMethod();
181// TestHelpers.EnableLogging(); 181// TestHelpers.EnableLogging();
182 182
183 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); 183 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }");
184 184
185 { 185 {
186 string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World"); 186 string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World");
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
213 TestHelpers.InMethod(); 213 TestHelpers.InMethod();
214// TestHelpers.EnableLogging(); 214// TestHelpers.EnableLogging();
215 215
216 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); 216 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }");
217 217
218 { 218 {
219 string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World"); 219 string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World");
@@ -246,11 +246,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
246// TestHelpers.InMethod(); 246// TestHelpers.InMethod();
247//// TestHelpers.EnableLogging(); 247//// TestHelpers.EnableLogging();
248// 248//
249// UUID storeId 249// UUID storeId
250// = (UUID)m_smcm.InvokeOperation( 250// = (UUID)m_smcm.InvokeOperation(
251// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); 251// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" });
252// 252//
253// string value 253// string value
254// = (string)m_smcm.InvokeOperation( 254// = (string)m_smcm.InvokeOperation(
255// UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); 255// UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" });
256// 256//
@@ -271,7 +271,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
271 271
272 // Test remove of node in object pointing to a string 272 // Test remove of node in object pointing to a string
273 { 273 {
274 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); 274 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }");
275 275
276 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); 276 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello");
277 Assert.That(returnValue, Is.EqualTo(1)); 277 Assert.That(returnValue, Is.EqualTo(1));
@@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
285 285
286 // Test remove of node in object pointing to another object 286 // Test remove of node in object pointing to another object
287 { 287 {
288 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); 288 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }");
289 289
290 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); 290 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello");
291 Assert.That(returnValue, Is.EqualTo(1)); 291 Assert.That(returnValue, Is.EqualTo(1));
@@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
299 299
300 // Test remove of node in an array 300 // Test remove of node in an array
301 { 301 {
302 UUID storeId 302 UUID storeId
303 = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }"); 303 = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }");
304 304
305 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); 305 int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]");
@@ -320,7 +320,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
320 320
321 // Test remove of non-existing value 321 // Test remove of non-existing value
322 { 322 {
323 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); 323 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }");
324 324
325 int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese"); 325 int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese");
326 Assert.That(fakeValueRemove, Is.EqualTo(0)); 326 Assert.That(fakeValueRemove, Is.EqualTo(0));
@@ -340,7 +340,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
340// TestHelpers.InMethod(); 340// TestHelpers.InMethod();
341//// TestHelpers.EnableLogging(); 341//// TestHelpers.EnableLogging();
342// 342//
343// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); 343// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
344// 344//
345// { 345// {
346// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World"); 346// int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World");
@@ -372,7 +372,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
372// TestHelpers.InMethod(); 372// TestHelpers.InMethod();
373//// TestHelpers.EnableLogging(); 373//// TestHelpers.EnableLogging();
374// 374//
375// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); 375// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }");
376// 376//
377// { 377// {
378// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World"); 378// int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World");
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
437 TestHelpers.InMethod(); 437 TestHelpers.InMethod();
438// TestHelpers.EnableLogging(); 438// TestHelpers.EnableLogging();
439 439
440 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); 440 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }");
441 441
442 { 442 {
443 int result = (int)InvokeOp("JsonGetNodeType", storeId, "."); 443 int result = (int)InvokeOp("JsonGetNodeType", storeId, ".");
@@ -509,7 +509,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
509// TestHelpers.EnableLogging(); 509// TestHelpers.EnableLogging();
510 510
511 { 511 {
512 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 512 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
513 513
514 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times"); 514 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times");
515 Assert.That(result, Is.EqualTo(1)); 515 Assert.That(result, Is.EqualTo(1));
@@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
520 520
521 // Test setting a key containing periods with delineation 521 // Test setting a key containing periods with delineation
522 { 522 {
523 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 523 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
524 524
525 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times"); 525 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times");
526 Assert.That(result, Is.EqualTo(1)); 526 Assert.That(result, Is.EqualTo(1));
@@ -533,7 +533,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
533 533
534 // Test setting a key containing unbalanced ] without delineation. Expecting failure 534 // Test setting a key containing unbalanced ] without delineation. Expecting failure
535 { 535 {
536 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 536 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
537 537
538 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times"); 538 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times");
539 Assert.That(result, Is.EqualTo(0)); 539 Assert.That(result, Is.EqualTo(0));
@@ -544,7 +544,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
544 544
545 // Test setting a key containing unbalanced [ without delineation. Expecting failure 545 // Test setting a key containing unbalanced [ without delineation. Expecting failure
546 { 546 {
547 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 547 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
548 548
549 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times"); 549 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times");
550 Assert.That(result, Is.EqualTo(0)); 550 Assert.That(result, Is.EqualTo(0));
@@ -555,7 +555,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
555 555
556 // Test setting a key containing unbalanced [] without delineation. Expecting failure 556 // Test setting a key containing unbalanced [] without delineation. Expecting failure
557 { 557 {
558 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 558 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
559 559
560 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times"); 560 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times");
561 Assert.That(result, Is.EqualTo(0)); 561 Assert.That(result, Is.EqualTo(0));
@@ -566,7 +566,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
566 566
567 // Test setting a key containing unbalanced ] with delineation 567 // Test setting a key containing unbalanced ] with delineation
568 { 568 {
569 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 569 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
570 570
571 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times"); 571 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times");
572 Assert.That(result, Is.EqualTo(1)); 572 Assert.That(result, Is.EqualTo(1));
@@ -577,7 +577,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
577 577
578 // Test setting a key containing unbalanced [ with delineation 578 // Test setting a key containing unbalanced [ with delineation
579 { 579 {
580 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 580 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
581 581
582 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times"); 582 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times");
583 Assert.That(result, Is.EqualTo(1)); 583 Assert.That(result, Is.EqualTo(1));
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
588 588
589 // Test setting a key containing empty balanced [] with delineation 589 // Test setting a key containing empty balanced [] with delineation
590 { 590 {
591 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 591 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
592 592
593 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times"); 593 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times");
594 Assert.That(result, Is.EqualTo(1)); 594 Assert.That(result, Is.EqualTo(1));
@@ -600,7 +600,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
600// // Commented out as this currently unexpectedly fails. 600// // Commented out as this currently unexpectedly fails.
601// // Test setting a key containing brackets around an integer with delineation 601// // Test setting a key containing brackets around an integer with delineation
602// { 602// {
603// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 603// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
604// 604//
605// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times"); 605// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times");
606// Assert.That(result, Is.EqualTo(1)); 606// Assert.That(result, Is.EqualTo(1));
@@ -610,10 +610,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
610// } 610// }
611 611
612 // *** Test {} *** 612 // *** Test {} ***
613 613
614 // Test setting a key containing unbalanced } without delineation. Expecting failure (?) 614 // Test setting a key containing unbalanced } without delineation. Expecting failure (?)
615 { 615 {
616 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 616 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
617 617
618 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times"); 618 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times");
619 Assert.That(result, Is.EqualTo(0)); 619 Assert.That(result, Is.EqualTo(0));
@@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
624 624
625 // Test setting a key containing unbalanced { without delineation. Expecting failure (?) 625 // Test setting a key containing unbalanced { without delineation. Expecting failure (?)
626 { 626 {
627 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 627 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
628 628
629 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times"); 629 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times");
630 Assert.That(result, Is.EqualTo(0)); 630 Assert.That(result, Is.EqualTo(0));
@@ -636,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
636// // Commented out as this currently unexpectedly fails. 636// // Commented out as this currently unexpectedly fails.
637// // Test setting a key containing unbalanced } 637// // Test setting a key containing unbalanced }
638// { 638// {
639// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 639// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
640// 640//
641// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times"); 641// int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times");
642// Assert.That(result, Is.EqualTo(0)); 642// Assert.That(result, Is.EqualTo(0));
@@ -644,7 +644,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
644 644
645 // Test setting a key containing unbalanced { with delineation 645 // Test setting a key containing unbalanced { with delineation
646 { 646 {
647 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 647 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
648 648
649 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times"); 649 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times");
650 Assert.That(result, Is.EqualTo(1)); 650 Assert.That(result, Is.EqualTo(1));
@@ -655,7 +655,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
655 655
656 // Test setting a key containing balanced {} with delineation. This should fail. 656 // Test setting a key containing balanced {} with delineation. This should fail.
657 { 657 {
658 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 658 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
659 659
660 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times"); 660 int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times");
661 Assert.That(result, Is.EqualTo(0)); 661 Assert.That(result, Is.EqualTo(0));
@@ -666,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
666 666
667 // Test setting to location that does not exist. This should fail. 667 // Test setting to location that does not exist. This should fail.
668 { 668 {
669 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); 669 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}");
670 670
671 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times"); 671 int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times");
672 Assert.That(result, Is.EqualTo(0)); 672 Assert.That(result, Is.EqualTo(0));
@@ -691,7 +691,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
691 691
692 // Single quoted token case 692 // Single quoted token case
693 { 693 {
694 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 694 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
695 695
696 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'"); 696 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'");
697 Assert.That(result, Is.EqualTo(1)); 697 Assert.That(result, Is.EqualTo(1));
@@ -702,7 +702,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
702 702
703 // Sub-tree case 703 // Sub-tree case
704 { 704 {
705 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 705 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
706 706
707 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }"); 707 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }");
708 Assert.That(result, Is.EqualTo(1)); 708 Assert.That(result, Is.EqualTo(1));
@@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
713 713
714 // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings. 714 // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings.
715 { 715 {
716 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 716 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
717 717
718 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times"); 718 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times");
719 Assert.That(result, Is.EqualTo(0)); 719 Assert.That(result, Is.EqualTo(0));
@@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
724 724
725 // Test setting to location that does not exist. This should fail. 725 // Test setting to location that does not exist. This should fail.
726 { 726 {
727 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); 727 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }");
728 728
729 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'"); 729 int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'");
730 Assert.That(result, Is.EqualTo(0)); 730 Assert.That(result, Is.EqualTo(0));
@@ -757,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
757 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); 757 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1));
758 m_scene.AddSceneObject(so); 758 m_scene.AddSceneObject(so);
759 759
760 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); 760 UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }");
761 761
762 { 762 {
763 string notecardName = "nc1"; 763 string notecardName = "nc1";
@@ -820,14 +820,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
820 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); 820 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1));
821 m_scene.AddSceneObject(so); 821 m_scene.AddSceneObject(so);
822 822
823 UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); 823 UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }");
824 824
825 // Write notecard 825 // Write notecard
826 InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName); 826 InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName);
827 827
828 { 828 {
829 // Read notecard 829 // Read notecard
830 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 830 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
831 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName); 831 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName);
832 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 832 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
833 833
@@ -837,10 +837,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
837 837
838 { 838 {
839 // Read notecard to new single component path 839 // Read notecard to new single component path
840 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 840 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
841 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); 841 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName);
842 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 842 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
843 843
844 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); 844 string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello");
845 Assert.That(value, Is.EqualTo("")); 845 Assert.That(value, Is.EqualTo(""));
846 846
@@ -850,7 +850,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
850 850
851 { 851 {
852 // Read notecard to new multi-component path. This should not work. 852 // Read notecard to new multi-component path. This should not work.
853 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); 853 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}");
854 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 854 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
855 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 855 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
856 856
@@ -863,7 +863,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
863 863
864 { 864 {
865 // Read notecard to existing multi-component path. This should work 865 // Read notecard to existing multi-component path. This should work
866 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); 866 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
867 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); 867 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName);
868 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 868 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
869 869
@@ -876,7 +876,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests
876 876
877 { 877 {
878 // Read notecard to invalid path. This should not work. 878 // Read notecard to invalid path. This should not work.
879 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); 879 UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }");
880 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName); 880 UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName);
881 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); 881 Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero));
882 882
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
index 1993948..2368a23 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33 /// Describes where on the avatar the attachment is located 33 /// Describes where on the avatar the attachment is located
34 /// </value> 34 /// </value>
35 int Location { get ; } 35 int Location { get ; }
36 36
37 //// <value> 37 //// <value>
38 /// Accessor to the rez'ed asset, representing the attachment 38 /// Accessor to the rez'ed asset, representing the attachment
39 /// </value> 39 /// </value>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
index a8e545c..d61f52a 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs
@@ -30,7 +30,7 @@ using OpenMetaverse;
30using OpenMetaverse.Assets; 30using OpenMetaverse.Assets;
31 31
32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// This implements the methods needed to operate on individual inventory items. 35 /// This implements the methods needed to operate on individual inventory items.
36 /// </summary> 36 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
index e189489..dc2edd9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -60,19 +60,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
60 /// <summary> 60 /// <summary>
61 /// Returns whether or not this object is still in the world. 61 /// Returns whether or not this object is still in the world.
62 /// Eg, if you store an IObject reference, however the object 62 /// Eg, if you store an IObject reference, however the object
63 /// is deleted before you use it, it will throw a NullReference 63 /// is deleted before you use it, it will throw a NullReference
64 /// exception. 'Exists' allows you to check the object is still 64 /// exception. 'Exists' allows you to check the object is still
65 /// in play before utilizing it. 65 /// in play before utilizing it.
66 /// </summary> 66 /// </summary>
67 /// <example> 67 /// <example>
68 /// IObject deleteMe = World.Objects[0]; 68 /// IObject deleteMe = World.Objects[0];
69 /// 69 ///
70 /// if (deleteMe.Exists) { 70 /// if (deleteMe.Exists) {
71 /// deleteMe.Say("Hello, I still exist!"); 71 /// deleteMe.Say("Hello, I still exist!");
72 /// } 72 /// }
73 /// 73 ///
74 /// World.Objects.Remove(deleteMe); 74 /// World.Objects.Remove(deleteMe);
75 /// 75 ///
76 /// if (!deleteMe.Exists) { 76 /// if (!deleteMe.Exists) {
77 /// Host.Console.Info("I was deleted"); 77 /// Host.Console.Info("I was deleted");
78 /// } 78 /// }
@@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
81 /// Objects should be near-guarunteed to exist for any event which 81 /// Objects should be near-guarunteed to exist for any event which
82 /// passes them as an argument. Storing an object for a longer period 82 /// passes them as an argument. Storing an object for a longer period
83 /// of time however will limit their reliability. 83 /// of time however will limit their reliability.
84 /// 84 ///
85 /// It is a good practice to use Try/Catch blocks handling for 85 /// It is a good practice to use Try/Catch blocks handling for
86 /// NullReferenceException, when accessing remote objects. 86 /// NullReferenceException, when accessing remote objects.
87 /// </remarks> 87 /// </remarks>
@@ -118,8 +118,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
118 IObject[] Children { get; } 118 IObject[] Children { get; }
119 119
120 /// <summary> 120 /// <summary>
121 /// Returns a list of materials attached to this object. Each may contain unique texture 121 /// Returns a list of materials attached to this object. Each may contain unique texture
122 /// and other visual information. For primitive based objects, this correlates with 122 /// and other visual information. For primitive based objects, this correlates with
123 /// Object Faces. For mesh based objects, this correlates with Materials. 123 /// Object Faces. For mesh based objects, this correlates with Materials.
124 /// </summary> 124 /// </summary>
125 IObjectMaterial[] Materials { get; } 125 IObjectMaterial[] Materials { get; }
@@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
152 String TouchText { get; set; } 152 String TouchText { get; set; }
153 153
154 /// <summary> 154 /// <summary>
155 /// Text to be associated with this object, in the 155 /// Text to be associated with this object, in the
156 /// Second Life(r) viewer, this is shown above the 156 /// Second Life(r) viewer, this is shown above the
157 /// object. 157 /// object.
158 /// </summary> 158 /// </summary>
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
index bf85cbc..bec8f38 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
40 { 40 {
41 TaskInventoryItem m_privateItem; 41 TaskInventoryItem m_privateItem;
42 Scene m_rootScene; 42 Scene m_rootScene;
43 43
44 public InventoryItem(Scene rootScene, TaskInventoryItem internalItem) 44 public InventoryItem(Scene rootScene, TaskInventoryItem internalItem)
45 { 45 {
46 m_rootScene = rootScene; 46 m_rootScene = rootScene;
@@ -77,10 +77,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
77 throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem"); 77 throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem");
78 } 78 }
79 } 79 }
80 80
81 public int Type { get { return m_privateItem.Type; } } 81 public int Type { get { return m_privateItem.Type; } }
82 public UUID AssetID { get { return m_privateItem.AssetID; } } 82 public UUID AssetID { get { return m_privateItem.AssetID; } }
83 83
84 // This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM. 84 // This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM.
85 public T RetrieveAsset<T>() where T : OpenMetaverse.Assets.Asset, new() 85 public T RetrieveAsset<T>() where T : OpenMetaverse.Assets.Asset, new()
86 { 86 {
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
89 89
90 if ((sbyte)result.AssetType != a.Type) 90 if ((sbyte)result.AssetType != a.Type)
91 throw new ApplicationException("[MRM] The supplied asset class does not match the found asset"); 91 throw new ApplicationException("[MRM] The supplied asset class does not match the found asset");
92 92
93 result.AssetData = a.Data; 93 result.AssetData = a.Data;
94 result.Decode(); 94 result.Decode();
95 return result; 95 return result;
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
index 73fe8b8..5861486 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces;
35 35
36namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 36namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
37{ 37{
38 public class MicroScheduler : System.MarshalByRefObject, IMicrothreader 38 public class MicroScheduler : System.MarshalByRefObject, IMicrothreader
39 { 39 {
40 private readonly List<IEnumerator> m_threads = new List<IEnumerator>(); 40 private readonly List<IEnumerator> m_threads = new List<IEnumerator>();
41 41
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 47b9c09..5513cd5 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
165 get { return GetSOP().Description; } 165 get { return GetSOP().Description; }
166 set 166 set
167 { 167 {
168 if (CanEdit()) 168 if (CanEdit())
169 GetSOP().Description = value; 169 GetSOP().Description = value;
170 } 170 }
171 } 171 }
@@ -192,7 +192,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
192 rets = new IObject[total]; 192 rets = new IObject[total];
193 193
194 int i = 0; 194 int i = 0;
195 195
196 foreach (SceneObjectPart part in my.ParentGroup.Parts) 196 foreach (SceneObjectPart part in my.ParentGroup.Parts)
197 { 197 {
198 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security); 198 rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security);
@@ -273,8 +273,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
273 public Vector3 SitTarget 273 public Vector3 SitTarget
274 { 274 {
275 get { return GetSOP().SitTargetPosition; } 275 get { return GetSOP().SitTargetPosition; }
276 set 276 set
277 { 277 {
278 if (CanEdit()) 278 if (CanEdit())
279 { 279 {
280 GetSOP().SitTargetPosition = value; 280 GetSOP().SitTargetPosition = value;
@@ -285,8 +285,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
285 public string SitTargetText 285 public string SitTargetText
286 { 286 {
287 get { return GetSOP().SitName; } 287 get { return GetSOP().SitName; }
288 set 288 set
289 { 289 {
290 if (CanEdit()) 290 if (CanEdit())
291 { 291 {
292 GetSOP().SitName = value; 292 GetSOP().SitName = value;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
297 public string TouchText 297 public string TouchText
298 { 298 {
299 get { return GetSOP().TouchName; } 299 get { return GetSOP().TouchName; }
300 set 300 set
301 { 301 {
302 if (CanEdit()) 302 if (CanEdit())
303 { 303 {
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
309 public string Text 309 public string Text
310 { 310 {
311 get { return GetSOP().Text; } 311 get { return GetSOP().Text; }
312 set 312 set
313 { 313 {
314 if (CanEdit()) 314 if (CanEdit())
315 { 315 {
@@ -382,11 +382,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
382 get { return this; } 382 get { return this; }
383 } 383 }
384 384
385 public IObjectInventory Inventory 385 public IObjectInventory Inventory
386 { 386 {
387 get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); } 387 get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); }
388 } 388 }
389 389
390 #region Public Functions 390 #region Public Functions
391 391
392 public void Say(string msg) 392 public void Say(string msg)
@@ -406,7 +406,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
406 SceneObjectPart sop = GetSOP(); 406 SceneObjectPart sop = GetSOP();
407 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); 407 m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false);
408 } 408 }
409 409
410 public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel) 410 public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel)
411 { 411 {
412 if (!CanEdit()) 412 if (!CanEdit())
@@ -445,9 +445,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
445 dm.SendDialogToUser( 445 dm.SendDialogToUser(
446 avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, 446 avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID,
447 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); 447 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons);
448 448
449 } 449 }
450 450
451 #endregion 451 #endregion
452 452
453 453
@@ -540,7 +540,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
540 if (hasCut) ret += 2; 540 if (hasCut) ret += 2;
541 if (hasDimple) ret += 2; 541 if (hasDimple) ret += 2;
542 if (hasHollow) 542 if (hasHollow)
543 ret += 1; // GOTCHA: LSL shows 2 additional sides here. 543 ret += 1; // GOTCHA: LSL shows 2 additional sides here.
544 // This has been fixed, but may cause porting issues. 544 // This has been fixed, but may cause porting issues.
545 break; 545 break;
546 case (int) PrimType.Torus: 546 case (int) PrimType.Torus:
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
index d20f4a4..8c3158c 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs
@@ -61,25 +61,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
61 if (!m_publicInventory.ContainsKey(privateItem.ItemID)) 61 if (!m_publicInventory.ContainsKey(privateItem.ItemID))
62 m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem)); 62 m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem));
63 } 63 }
64 64
65 #region IDictionary<UUID, IInventoryItem> implementation 65 #region IDictionary<UUID, IInventoryItem> implementation
66 public void Add (UUID key, IInventoryItem value) 66 public void Add (UUID key, IInventoryItem value)
67 { 67 {
68 m_publicInventory.Add(key, value); 68 m_publicInventory.Add(key, value);
69 m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem()); 69 m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem());
70 } 70 }
71 71
72 public bool ContainsKey (UUID key) 72 public bool ContainsKey (UUID key)
73 { 73 {
74 return m_privateInventory.ContainsKey(key); 74 return m_privateInventory.ContainsKey(key);
75 } 75 }
76 76
77 public bool Remove (UUID key) 77 public bool Remove (UUID key)
78 { 78 {
79 m_publicInventory.Remove(key); 79 m_publicInventory.Remove(key);
80 return m_privateInventory.Remove(key); 80 return m_privateInventory.Remove(key);
81 } 81 }
82 82
83 public bool TryGetValue (UUID key, out IInventoryItem value) 83 public bool TryGetValue (UUID key, out IInventoryItem value)
84 { 84 {
85 value = null; 85 value = null;
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
89 { 89 {
90 // wasn't found in the public inventory 90 // wasn't found in the public inventory
91 TaskInventoryItem privateItem; 91 TaskInventoryItem privateItem;
92 92
93 result = m_privateInventory.TryGetValue(key, out privateItem); 93 result = m_privateInventory.TryGetValue(key, out privateItem);
94 if (result) 94 if (result)
95 { 95 {
@@ -98,16 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
98 } 98 }
99 } else 99 } else
100 return true; 100 return true;
101 101
102 return result; 102 return result;
103 } 103 }
104 104
105 public ICollection<UUID> Keys { 105 public ICollection<UUID> Keys {
106 get { 106 get {
107 return m_privateInventory.Keys; 107 return m_privateInventory.Keys;
108 } 108 }
109 } 109 }
110 110
111 public ICollection<IInventoryItem> Values { 111 public ICollection<IInventoryItem> Values {
112 get { 112 get {
113 SynchronizeDictionaries(); 113 SynchronizeDictionaries();
@@ -139,41 +139,41 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
139 { 139 {
140 Add(item.Key, item.Value); 140 Add(item.Key, item.Value);
141 } 141 }
142 142
143 public void Clear () 143 public void Clear ()
144 { 144 {
145 m_publicInventory.Clear(); 145 m_publicInventory.Clear();
146 m_privateInventory.Clear(); 146 m_privateInventory.Clear();
147 } 147 }
148 148
149 public bool Contains (KeyValuePair<UUID, IInventoryItem> item) 149 public bool Contains (KeyValuePair<UUID, IInventoryItem> item)
150 { 150 {
151 return m_privateInventory.ContainsKey(item.Key); 151 return m_privateInventory.ContainsKey(item.Key);
152 } 152 }
153 153
154 public void CopyTo (KeyValuePair<UUID, IInventoryItem>[] array, int arrayIndex) 154 public void CopyTo (KeyValuePair<UUID, IInventoryItem>[] array, int arrayIndex)
155 { 155 {
156 throw new NotImplementedException(); 156 throw new NotImplementedException();
157 } 157 }
158 158
159 public bool Remove (KeyValuePair<UUID, IInventoryItem> item) 159 public bool Remove (KeyValuePair<UUID, IInventoryItem> item)
160 { 160 {
161 return Remove(item.Key); 161 return Remove(item.Key);
162 } 162 }
163 163
164 public int Count { 164 public int Count {
165 get { 165 get {
166 return m_privateInventory.Count; 166 return m_privateInventory.Count;
167 } 167 }
168 } 168 }
169 169
170 public bool IsReadOnly { 170 public bool IsReadOnly {
171 get { 171 get {
172 return false; 172 return false;
173 } 173 }
174 } 174 }
175 #endregion 175 #endregion
176 176
177 #region Explicit implementations 177 #region Explicit implementations
178 IInventoryItem System.Collections.Generic.IDictionary<UUID, IInventoryItem>.this[UUID key] 178 IInventoryItem System.Collections.Generic.IDictionary<UUID, IInventoryItem>.this[UUID key]
179 { 179 {
@@ -189,13 +189,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
189 m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem(); 189 m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem();
190 } 190 }
191 } 191 }
192 192
193 void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<UUID, IInventoryItem>>.CopyTo(System.Collections.Generic.KeyValuePair<UUID,IInventoryItem>[] array, int offset) 193 void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<UUID, IInventoryItem>>.CopyTo(System.Collections.Generic.KeyValuePair<UUID,IInventoryItem>[] array, int offset)
194 { 194 {
195 throw new NotImplementedException(); 195 throw new NotImplementedException();
196 } 196 }
197 #endregion 197 #endregion
198 198
199 public IInventoryItem this[string name] 199 public IInventoryItem this[string name]
200 { 200 {
201 get { 201 get {
@@ -204,7 +204,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
204 { 204 {
205 if (!m_publicInventory.ContainsKey(i.ItemID)) 205 if (!m_publicInventory.ContainsKey(i.ItemID))
206 m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i)); 206 m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i));
207 207
208 return m_publicInventory[i.ItemID]; 208 return m_publicInventory[i.ItemID];
209 } 209 }
210 throw new KeyNotFoundException(); 210 throw new KeyNotFoundException();
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index d192309..a380f66 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -70,18 +70,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
70 get { return GetSP().AbsolutePosition; } 70 get { return GetSP().AbsolutePosition; }
71 set { GetSP().Teleport(value); } 71 set { GetSP().Teleport(value); }
72 } 72 }
73 73
74 public bool IsChildAgent 74 public bool IsChildAgent
75 { 75 {
76 get { return GetSP().IsChildAgent; } 76 get { return GetSP().IsChildAgent; }
77 } 77 }
78 78
79 #region IAvatar implementation 79 #region IAvatar implementation
80 public IAvatarAttachment[] Attachments 80 public IAvatarAttachment[] Attachments
81 { 81 {
82 get { 82 get {
83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>(); 83 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
84 84
85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments(); 85 List<AvatarAttachment> internalAttachments = GetSP().Appearance.GetAttachments();
86 foreach (AvatarAttachment attach in internalAttachments) 86 foreach (AvatarAttachment attach in internalAttachments)
87 { 87 {
@@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
89 new UUID(attach.ItemID), 89 new UUID(attach.ItemID),
90 new UUID(attach.AssetID), m_security)); 90 new UUID(attach.AssetID), m_security));
91 } 91 }
92 92
93 return attachments.ToArray(); 93 return attachments.ToArray();
94 } 94 }
95 } 95 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
index 570459a..bcf6053 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
41 private readonly UUID m_assetId; 41 private readonly UUID m_assetId;
42 42
43 private readonly ISecurityCredential m_security; 43 private readonly ISecurityCredential m_security;
44 44
45 public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security) 45 public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security)
46 { 46 {
47 m_rootScene = rootScene; 47 m_rootScene = rootScene;
@@ -51,9 +51,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
51 //m_itemId = itemId; 51 //m_itemId = itemId;
52 m_assetId = assetId; 52 m_assetId = assetId;
53 } 53 }
54 54
55 public int Location { get { return m_location; } } 55 public int Location { get { return m_location; } }
56 56
57 public IObject Asset 57 public IObject Asset
58 { 58 {
59 get 59 get
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
index 13d0140..724c2a9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs
@@ -51,7 +51,7 @@ namespace OpenSim
51 51
52 public void Microthread(IEnumerable thread) 52 public void Microthread(IEnumerable thread)
53 { 53 {
54 54
55 } 55 }
56 56
57 public void RunMicrothread() 57 public void RunMicrothread()
@@ -92,7 +92,7 @@ namespace OpenSim
92 92
93 public override void Stop() 93 public override void Stop()
94 { 94 {
95 95
96 } 96 }
97 } 97 }
98} 98}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
index f2324d2..36f70d0 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs
@@ -34,7 +34,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX;
34 34
35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
36{ 36{
37 public class World : System.MarshalByRefObject, IWorld, IWorldAudio 37 public class World : System.MarshalByRefObject, IWorld, IWorldAudio
38 { 38 {
39 private readonly Scene m_internalScene; 39 private readonly Scene m_internalScene;
40 private readonly ISecurityCredential m_security; 40 private readonly ISecurityCredential m_security;
@@ -149,7 +149,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); 149 e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security);
150 e.Text = chat.Message; 150 e.Text = chat.Message;
151 e.Channel = chat.Channel; 151 e.Channel = chat.Channel;
152 152
153 _OnChat(this, e); 153 _OnChat(this, e);
154 return; 154 return;
155 } 155 }
@@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); 160 e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security);
161 e.Text = chat.Message; 161 e.Text = chat.Message;
162 e.Channel = chat.Channel; 162 e.Channel = chat.Channel;
163 163
164 _OnChat(this, e); 164 _OnChat(this, e);
165 return; 165 return;
166 } 166 }
diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
index 1725eb4..a1dd711 100644
--- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")] 46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")]
47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule 47 public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule
48 { 48 {
49 private static readonly ILog m_log = 49 private static readonly ILog m_log =
50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 private IConfig m_config = null; 52 private IConfig m_config = null;
@@ -57,24 +57,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
57 private bool m_enabled = false; 57 private bool m_enabled = false;
58 private bool m_disable_logins; 58 private bool m_disable_logins;
59 private string m_uri = string.Empty; 59 private string m_uri = string.Empty;
60 60
61 Scene m_scene; 61 Scene m_scene;
62 62
63 #region INonSharedRegionModule interface 63 #region INonSharedRegionModule interface
64 64
65 public Type ReplaceableInterface 65 public Type ReplaceableInterface
66 { 66 {
67 get { return null; } 67 get { return null; }
68 } 68 }
69 69
70 public void Initialise(IConfigSource config) 70 public void Initialise(IConfigSource config)
71 { 71 {
72 m_config = config.Configs["RegionReady"]; 72 m_config = config.Configs["RegionReady"];
73 if (m_config != null) 73 if (m_config != null)
74 { 74 {
75 m_enabled = m_config.GetBoolean("enabled", false); 75 m_enabled = m_config.GetBoolean("enabled", false);
76 76
77 if (m_enabled) 77 if (m_enabled)
78 { 78 {
79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify); 79 m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify);
80 m_disable_logins = m_config.GetBoolean("login_disable", false); 80 m_disable_logins = m_config.GetBoolean("login_disable", false);
@@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; 106 m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue;
107 107
108 // This should always show up to the user but should not trigger warn/errors as these messages are 108 // This should always show up to the user but should not trigger warn/errors as these messages are
109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but 109 // expected and are not simulator problems. Ideally, there would be a status level in log4net but
110 // failing that, we will print out to console instead. 110 // failing that, we will print out to console instead.
111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); 111 MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
112 112
@@ -152,12 +152,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
152 { 152 {
153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!"); 153 m_log.DebugFormat("[RegionReady]: Script compile queue empty!");
154 154
155 if (m_firstEmptyCompileQueue || m_oarFileLoading) 155 if (m_firstEmptyCompileQueue || m_oarFileLoading)
156 { 156 {
157 OSChatMessage c = new OSChatMessage(); 157 OSChatMessage c = new OSChatMessage();
158 if (m_firstEmptyCompileQueue) 158 if (m_firstEmptyCompileQueue)
159 c.Message = "server_startup,"; 159 c.Message = "server_startup,";
160 else 160 else
161 c.Message = "oar_file_load,"; 161 c.Message = "oar_file_load,";
162 m_firstEmptyCompileQueue = false; 162 m_firstEmptyCompileQueue = false;
163 m_oarFileLoading = false; 163 m_oarFileLoading = false;
@@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
165 m_scene.Backup(false); 165 m_scene.Backup(false);
166 166
167 c.From = "RegionReady"; 167 c.From = "RegionReady";
168 if (m_lastOarLoadedOk) 168 if (m_lastOarLoadedOk)
169 c.Message += "1,"; 169 c.Message += "1,";
170 else 170 else
171 c.Message += "0,"; 171 c.Message += "0,";
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
193 { 193 {
194 m_oarFileLoading = true; 194 m_oarFileLoading = true;
195 195
196 if (message==String.Empty) 196 if (message==String.Empty)
197 { 197 {
198 m_lastOarLoadedOk = true; 198 m_lastOarLoadedOk = true;
199 } 199 }
@@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); 226 // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString());
227 227
228 // Putting this out to console to make it eye-catching for people who are running OpenSimulator 228 // Putting this out to console to make it eye-catching for people who are running OpenSimulator
229 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a 229 // without info log messages enabled. Making this a warning is arguably misleading since it isn't a
230 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives. 230 // warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
231 // Arguably, log4net needs a status log level (like Apache). 231 // Arguably, log4net needs a status log level (like Apache).
232 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); 232 MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
@@ -256,7 +256,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
256// m_scene.EventManager.OnRezScript += OnRezScript; 256// m_scene.EventManager.OnRezScript += OnRezScript;
257// m_oarFileLoading = true; 257// m_oarFileLoading = true;
258// m_firstEmptyCompileQueue = true; 258// m_firstEmptyCompileQueue = true;
259// 259//
260// m_scene.LoginsDisabled = true; 260// m_scene.LoginsDisabled = true;
261// m_scene.LoginLock = true; 261// m_scene.LoginLock = true;
262// if ( m_uri != string.Empty ) 262// if ( m_uri != string.Empty )
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
index 4b7295d..bf33996 100644
--- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
54 public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter 54 public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter
55 { 55 {
56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
58 private Dictionary<UUID, UUID> m_Channels = 58 private Dictionary<UUID, UUID> m_Channels =
59 new Dictionary<UUID, UUID>(); 59 new Dictionary<UUID, UUID>();
60 60
@@ -94,7 +94,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
94 { 94 {
95 scriptEngine.OnScriptRemoved += this.ScriptRemoved; 95 scriptEngine.OnScriptRemoved += this.ScriptRemoved;
96 scriptEngine.OnObjectRemoved += this.ObjectRemoved; 96 scriptEngine.OnObjectRemoved += this.ObjectRemoved;
97 97
98 } 98 }
99 } 99 }
100 100
@@ -131,7 +131,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule
131 if (!m_Enabled) 131 if (!m_Enabled)
132 return; 132 return;
133 133
134 m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}", 134 m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}",
135 objectID.ToString(), channel.ToString(), itemID.ToString(), uri); 135 objectID.ToString(), channel.ToString(), itemID.ToString(), uri);
136 136
137 XmlRpcInfo info = new XmlRpcInfo(); 137 XmlRpcInfo info = new XmlRpcInfo();
diff --git a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
index 78c870a..8654896 100644
--- a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 private static bool m_Enabled = false; 46 private static bool m_Enabled = false;
47 47
48 private IConfigSource m_Config; 48 private IConfigSource m_Config;
49 bool m_Registered = false; 49 bool m_Registered = false;
50 50
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch
73 { 73 {
74 } 74 }
75 75
76 public Type ReplaceableInterface 76 public Type ReplaceableInterface
77 { 77 {
78 get { return null; } 78 get { return null; }
79 } 79 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
index 3f36e32..d3b97b1 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Region.UserStatistics
115 udata.fps = Convert.ToSingle(sdr["simfps"]); 115 udata.fps = Convert.ToSingle(sdr["simfps"]);
116 clidata.Add(udata); 116 clidata.Add(udata);
117 totalclients += udata.count; 117 totalclients += udata.count;
118 118
119 } 119 }
120 } 120 }
121 sdr.Close(); 121 sdr.Close();
@@ -126,9 +126,9 @@ namespace OpenSim.Region.UserStatistics
126 sql = 126 sql =
127 "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;"; 127 "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;";
128 cmd = new SqliteCommand(sql, dbConn); 128 cmd = new SqliteCommand(sql, dbConn);
129 129
130 sdr = cmd.ExecuteReader(); 130 sdr = cmd.ExecuteReader();
131 131
132 if (sdr.HasRows) 132 if (sdr.HasRows)
133 { 133 {
134 while (sdr.Read()) 134 while (sdr.Read())
@@ -145,10 +145,10 @@ namespace OpenSim.Region.UserStatistics
145 cmd.Dispose(); 145 cmd.Dispose();
146 } 146 }
147 } 147 }
148 148
149 foreach (ClientVersionData cvd in cliRegData) 149 foreach (ClientVersionData cvd in cliRegData)
150 { 150 {
151 151
152 if (regionTotals.ContainsKey(cvd.region_id)) 152 if (regionTotals.ContainsKey(cvd.region_id))
153 { 153 {
154 int regiontotal = (int)regionTotals[cvd.region_id]; 154 int regiontotal = (int)regionTotals[cvd.region_id];
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
index 8745acd..fcc7cee 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.UserStatistics
61 Hashtable nh = new Hashtable(); 61 Hashtable nh = new Hashtable();
62 nh.Add("hdata", mData); 62 nh.Add("hdata", mData);
63 nh.Add("Reports", pParams["Reports"]); 63 nh.Add("Reports", pParams["Reports"]);
64 64
65 return nh; 65 return nh;
66 } 66 }
67 67
@@ -76,7 +76,7 @@ namespace OpenSim.Region.UserStatistics
76 public string rep_Default_report_view(stats_default_page_values values) 76 public string rep_Default_report_view(stats_default_page_values values)
77 { 77 {
78 78
79 79
80 StringBuilder output = new StringBuilder(); 80 StringBuilder output = new StringBuilder();
81 81
82 82
@@ -105,7 +105,7 @@ TD.align_top { vertical-align: top; }
105</STYLE> 105</STYLE>
106"; 106";
107 HTMLUtil.HtmlHeaders_O(ref output); 107 HTMLUtil.HtmlHeaders_O(ref output);
108 108
109 HTMLUtil.InsertProtoTypeAJAX(ref output); 109 HTMLUtil.InsertProtoTypeAJAX(ref output);
110 string[] ajaxUpdaterDivs = new string[3]; 110 string[] ajaxUpdaterDivs = new string[3];
111 int[] ajaxUpdaterSeconds = new int[3]; 111 int[] ajaxUpdaterSeconds = new int[3];
@@ -124,7 +124,7 @@ TD.align_top { vertical-align: top; }
124 ajaxUpdaterReportFragments[2] = "activelogajax.html"; 124 ajaxUpdaterReportFragments[2] = "activelogajax.html";
125 125
126 HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments); 126 HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments);
127 127
128 output.Append(STYLESHEET); 128 output.Append(STYLESHEET);
129 HTMLUtil.HtmlHeaders_C(ref output); 129 HTMLUtil.HtmlHeaders_C(ref output);
130 HTMLUtil.AddReportLinks(ref output, values.stats_reports, ""); 130 HTMLUtil.AddReportLinks(ref output, values.stats_reports, "");
@@ -200,7 +200,7 @@ TD.align_top { vertical-align: top; }
200 return output.ToString(); 200 return output.ToString();
201 } 201 }
202 202
203 203
204 204
205 public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene) 205 public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene)
206 { 206 {
@@ -208,8 +208,8 @@ TD.align_top { vertical-align: top; }
208 returnstruct.all_scenes = m_scene.ToArray(); 208 returnstruct.all_scenes = m_scene.ToArray();
209 lock (db) 209 lock (db)
210 { 210 {
211 string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, 211 string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps,
212 AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, 212 AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb,
213 SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use 213 SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use
214 FROM stats_session_data;"; 214 FROM stats_session_data;";
215 SqliteCommand cmd = new SqliteCommand(SQL, db); 215 SqliteCommand cmd = new SqliteCommand(SQL, db);
@@ -230,7 +230,7 @@ TD.align_top { vertical-align: top; }
230 sdr.Close(); 230 sdr.Close();
231 cmd.Dispose(); 231 cmd.Dispose();
232 } 232 }
233 233
234 return returnstruct; 234 return returnstruct;
235 } 235 }
236 236
@@ -276,5 +276,5 @@ TD.align_top { vertical-align: top; }
276 public Dictionary<UUID, USimStatsData> sim_stat_data; 276 public Dictionary<UUID, USimStatsData> sim_stat_data;
277 public Dictionary<string, IStatsController> stats_reports; 277 public Dictionary<string, IStatsController> stats_reports;
278 } 278 }
279 279
280} 280}
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
index c07619f..20e045a 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs
@@ -95,7 +95,7 @@ namespace OpenSim.Region.UserStatistics
95 { 95 {
96 o.Append("</table>\n"); 96 o.Append("</table>\n");
97 } 97 }
98 98
99 public static void BLOCKQUOTE_O(ref StringBuilder o, string pclass) 99 public static void BLOCKQUOTE_O(ref StringBuilder o, string pclass)
100 { 100 {
101 o.Append("<blockquote"); 101 o.Append("<blockquote");
@@ -199,7 +199,7 @@ namespace OpenSim.Region.UserStatistics
199"); 199");
200 for (int i = 0; i < divID.Length; i++) 200 for (int i = 0; i < divID.Length; i++)
201 { 201 {
202 202
203 o.Append("new updater('"); 203 o.Append("new updater('");
204 o.Append(divID[i]); 204 o.Append(divID[i]);
205 o.Append("', "); 205 o.Append("', ");
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
index 4d45b80..3e0f45e 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/LogLinesAJAX.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.UserStatistics
66 public string RenderView(Hashtable pModelResult) 66 public string RenderView(Hashtable pModelResult)
67 { 67 {
68 StringBuilder output = new StringBuilder(); 68 StringBuilder output = new StringBuilder();
69 69
70 HTMLUtil.HR(ref output, ""); 70 HTMLUtil.HR(ref output, "");
71 output.Append("<H3>ActiveLog</H3>\n"); 71 output.Append("<H3>ActiveLog</H3>\n");
72 72
@@ -102,13 +102,13 @@ namespace OpenSim.Region.UserStatistics
102 } 102 }
103 } 103 }
104 StringBuilder replaceStr = new StringBuilder(); 104 StringBuilder replaceStr = new StringBuilder();
105 //string titlecolorresults = 105 //string titlecolorresults =
106 106
107 string formatresult = Regex.Replace(TitleColor.Replace(result[i], "$1"), "[^ABCDEFabcdef0-9]", ""); 107 string formatresult = Regex.Replace(TitleColor.Replace(result[i], "$1"), "[^ABCDEFabcdef0-9]", "");
108 if (formatresult.Length > 6) 108 if (formatresult.Length > 6)
109 { 109 {
110 formatresult = formatresult.Substring(0, 6); 110 formatresult = formatresult.Substring(0, 6);
111 111
112 } 112 }
113 for (int j = formatresult.Length; j <= 5; j++) 113 for (int j = formatresult.Length; j <= 5; j++)
114 formatresult += "0"; 114 formatresult += "0";
@@ -116,12 +116,12 @@ namespace OpenSim.Region.UserStatistics
116 replaceStr.Append(formatresult); 116 replaceStr.Append(formatresult);
117 replaceStr.Append("\">$3</font>] $4<br />"); 117 replaceStr.Append("\">$3</font>] $4<br />");
118 string repstr = replaceStr.ToString(); 118 string repstr = replaceStr.ToString();
119 119
120 output.Append(formatopen); 120 output.Append(formatopen);
121 output.Append(webFormat.Replace(result[i], repstr)); 121 output.Append(webFormat.Replace(result[i], repstr));
122 output.Append(formatclose); 122 output.Append(formatclose);
123 } 123 }
124 124
125 125
126 return output.ToString(); 126 return output.ToString();
127 } 127 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
index 6f8b2aa..63dc87e 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.UserStatistics
44 jsFileName = "prototype.js"; 44 jsFileName = "prototype.js";
45 } 45 }
46 46
47 public Prototype_distributor(string jsName) 47 public Prototype_distributor(string jsName)
48 { 48 {
49 jsFileName = jsName; 49 jsFileName = jsName;
50 } 50 }
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
index 74e9c66..8d5434f 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.UserStatistics
52 SqliteConnection dbConn = (SqliteConnection)pParams["DatabaseConnection"]; 52 SqliteConnection dbConn = (SqliteConnection)pParams["DatabaseConnection"];
53 List<SessionList> lstSessions = new List<SessionList>(); 53 List<SessionList> lstSessions = new List<SessionList>();
54 Hashtable requestvars = (Hashtable) pParams["RequestVars"]; 54 Hashtable requestvars = (Hashtable) pParams["RequestVars"];
55 55
56 56
57 string puserUUID = string.Empty; 57 string puserUUID = string.Empty;
58 string clientVersionString = string.Empty; 58 string clientVersionString = string.Empty;
@@ -113,7 +113,7 @@ namespace OpenSim.Region.UserStatistics
113 cmd.Parameters.Add(new SqliteParameter(":client_version", clientVersionString)); 113 cmd.Parameters.Add(new SqliteParameter(":client_version", clientVersionString));
114 114
115 SqliteDataReader sdr = cmd.ExecuteReader(); 115 SqliteDataReader sdr = cmd.ExecuteReader();
116 116
117 if (sdr.HasRows) 117 if (sdr.HasRows)
118 { 118 {
119 UUID userUUID = UUID.Zero; 119 UUID userUUID = UUID.Zero;
@@ -134,7 +134,7 @@ namespace OpenSim.Region.UserStatistics
134 } 134 }
135 135
136 ShortSessionData ssd = new ShortSessionData(); 136 ShortSessionData ssd = new ShortSessionData();
137 137
138 ssd.last_update = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["last_updated"])); 138 ssd.last_update = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["last_updated"]));
139 ssd.start_time = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["start_time"])); 139 ssd.start_time = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["start_time"]));
140 ssd.session_id = UUID.Parse(sdr["session_id"].ToString()); 140 ssd.session_id = UUID.Parse(sdr["session_id"].ToString());
@@ -145,7 +145,7 @@ namespace OpenSim.Region.UserStatistics
145 } 145 }
146 } 146 }
147 sdr.Close(); 147 sdr.Close();
148 cmd.Dispose(); 148 cmd.Dispose();
149 } 149 }
150 modeldata["SessionData"] = lstSessions; 150 modeldata["SessionData"] = lstSessions;
151 return modeldata; 151 return modeldata;
@@ -248,7 +248,7 @@ TD.align_top { vertical-align: top; }
248 output.Append(sesdata.client_version); 248 output.Append(sesdata.client_version);
249 HTMLUtil.TD_C(ref output); 249 HTMLUtil.TD_C(ref output);
250 HTMLUtil.TR_C(ref output); 250 HTMLUtil.TR_C(ref output);
251 251
252 } 252 }
253 HTMLUtil.TR_O(ref output, ""); 253 HTMLUtil.TR_O(ref output, "");
254 HTMLUtil.TD_O(ref output, "align_top", 1, 5); 254 HTMLUtil.TD_O(ref output, "align_top", 1, 5);
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
index 06d9e91..513686d 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.UserStatistics
50 public Hashtable ProcessModel(Hashtable pParams) 50 public Hashtable ProcessModel(Hashtable pParams)
51 { 51 {
52 List<Scene> m_scene = (List<Scene>)pParams["Scenes"]; 52 List<Scene> m_scene = (List<Scene>)pParams["Scenes"];
53 53
54 Hashtable nh = new Hashtable(); 54 Hashtable nh = new Hashtable();
55 nh.Add("hdata", m_scene); 55 nh.Add("hdata", m_scene);
56 nh.Add("simstats", pParams["SimStats"]); 56 nh.Add("simstats", pParams["SimStats"]);
@@ -207,9 +207,9 @@ namespace OpenSim.Region.UserStatistics
207 HTMLUtil.TD_C(ref output); 207 HTMLUtil.TD_C(ref output);
208 HTMLUtil.TR_C(ref output); 208 HTMLUtil.TR_C(ref output);
209 HTMLUtil.TABLE_C(ref output); 209 HTMLUtil.TABLE_C(ref output);
210 210
211 } 211 }
212 212
213 return output.ToString(); 213 return output.ToString();
214 } 214 }
215 215
@@ -218,7 +218,7 @@ namespace OpenSim.Region.UserStatistics
218 /// <pre> 218 /// <pre>
219 /// {"REGIONNAME": { 219 /// {"REGIONNAME": {
220 /// "region": "REGIONNAME", 220 /// "region": "REGIONNAME",
221 /// "timeDilation": "101", 221 /// "timeDilation": "101",
222 /// ... // the rest of the stat info 222 /// ... // the rest of the stat info
223 /// }, 223 /// },
224 /// ... // entries for each region 224 /// ... // entries for each region
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
index bd5289f..c15b194 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.UserStatistics
57 { 57 {
58 private static readonly ILog m_log = 58 private static readonly ILog m_log =
59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 private static SqliteConnection dbConn; 61 private static SqliteConnection dbConn;
62 62
63 /// <summary> 63 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Region.UserStatistics
67 67
68 private List<Scene> m_scenes = new List<Scene>(); 68 private List<Scene> m_scenes = new List<Scene>();
69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>(); 69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>();
70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>(); 70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>();
71 private const int updateStatsMod = 6; 71 private const int updateStatsMod = 6;
72 private int updateLogMod = 1; 72 private int updateLogMod = 1;
73 private volatile int updateLogCounter = 0; 73 private volatile int updateLogCounter = 0;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.UserStatistics
217 { 217 {
218 m_loglines = readLogLines(10); 218 m_loglines = readLogLines(10);
219 219
220 if (updateLogCounter > 10000) 220 if (updateLogCounter > 10000)
221 updateLogCounter = 1; 221 updateLogCounter = 1;
222 } 222 }
223 223
@@ -228,12 +228,12 @@ namespace OpenSim.Region.UserStatistics
228 ss.ConsumeSimStats(stats); 228 ss.ConsumeSimStats(stats);
229 } 229 }
230 } 230 }
231 } 231 }
232 catch (KeyNotFoundException) 232 catch (KeyNotFoundException)
233 { 233 {
234 } 234 }
235 } 235 }
236 236
237 private Hashtable HandleUnknownCAPSRequest(Hashtable request) 237 private Hashtable HandleUnknownCAPSRequest(Hashtable request)
238 { 238 {
239 //string regpath = request["uri"].ToString(); 239 //string regpath = request["uri"].ToString();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.UserStatistics
257 int response_code = 404; 257 int response_code = 404;
258 string contenttype = "text/html"; 258 string contenttype = "text/html";
259 bool jsonFormatOutput = false; 259 bool jsonFormatOutput = false;
260 260
261 string strOut = string.Empty; 261 string strOut = string.Empty;
262 262
263 // The request patch should be "/SStats/reportName" where 'reportName' 263 // The request patch should be "/SStats/reportName" where 'reportName'
@@ -288,15 +288,15 @@ namespace OpenSim.Region.UserStatistics
288 repParams["SimStats"] = m_simstatsCounters; 288 repParams["SimStats"] = m_simstatsCounters;
289 repParams["LogLines"] = m_loglines; 289 repParams["LogLines"] = m_loglines;
290 repParams["Reports"] = reports; 290 repParams["Reports"] = reports;
291 291
292 concurrencyCounter++; 292 concurrencyCounter++;
293 293
294 if (jsonFormatOutput) 294 if (jsonFormatOutput)
295 { 295 {
296 strOut = rep.RenderJson(rep.ProcessModel(repParams)); 296 strOut = rep.RenderJson(rep.ProcessModel(repParams));
297 contenttype = "text/json"; 297 contenttype = "text/json";
298 } 298 }
299 else 299 else
300 { 300 {
301 strOut = rep.RenderView(rep.ProcessModel(repParams)); 301 strOut = rep.RenderView(rep.ProcessModel(repParams));
302 } 302 }
@@ -312,7 +312,7 @@ namespace OpenSim.Region.UserStatistics
312 } 312 }
313 313
314 concurrencyCounter--; 314 concurrencyCounter--;
315 315
316 response_code = 200; 316 response_code = 200;
317 } 317 }
318 else 318 else
@@ -463,7 +463,7 @@ namespace OpenSim.Region.UserStatistics
463 UUID agentID, Caps caps) 463 UUID agentID, Caps caps)
464 { 464 {
465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID); 465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID);
466 466
467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn); 467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn);
468 468
469 return String.Empty; 469 return String.Empty;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.UserStatistics
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 usd = uid.session_data; 529 usd = uid.session_data;
530 530
531 if (message.Type != OSDType.Map) 531 if (message.Type != OSDType.Map)
@@ -747,16 +747,16 @@ namespace OpenSim.Region.UserStatistics
747 );"; 747 );";
748 748
749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data ( 749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data (
750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view, 750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view,
751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping, 751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping,
752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram, 752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram,
753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit, 753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit,
754f_resent, f_send_packet 754f_resent, f_send_packet
755) 755)
756VALUES 756VALUES
757( 757(
758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view, 758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view,
759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping, 759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping,
760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram, 760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram,
761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit, 761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit,
762:f_resent, :f_send_packet 762:f_resent, :f_send_packet
@@ -980,7 +980,7 @@ VALUES
980 980
981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1) 981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1)
982 return 0; 982 return 0;
983 983
984 float freqtest = (float)freq.Length / freq.Rank; 984 float freqtest = (float)freq.Length / freq.Rank;
985 985
986 for (i = 0; i < freqtest; i++) 986 for (i = 0; i < freqtest; i++)
@@ -1116,7 +1116,7 @@ VALUES
1116 public List<float> _sim_fps; 1116 public List<float> _sim_fps;
1117 public List<int> _agents_in_view; 1117 public List<int> _agents_in_view;
1118 } 1118 }
1119 1119
1120 #endregion 1120 #endregion
1121 1121
1122 public class USimStatsData 1122 public class USimStatsData
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
index 770b1f2..54f3ab6 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
@@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
161 { 161 {
162 foreach (SceneObjectGroup sog in attachs) 162 foreach (SceneObjectGroup sog in attachs)
163 { 163 {
164 m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}", 164 m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}",
165 sog.Name, sp.Name, m_scene.RegionInfo.RegionName); 165 sog.Name, sp.Name, m_scene.RegionInfo.RegionName);
166 166
167 m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, sog); 167 m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, sog);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index 709a16d..9833086 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
@@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
159 159
160 if (loc == null) 160 if (loc == null)
161 continue; 161 continue;
162 162
163 loc[d.Title] = OSD.FromString(d.Title); 163 loc[d.Title] = OSD.FromString(d.Title);
164 } 164 }
165 } 165 }
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
193 193
194 if (loc == null) 194 if (loc == null)
195 continue; 195 continue;
196 196
197 loc[d.Title] = OSD.FromString(d.Title); 197 loc[d.Title] = OSD.FromString(d.Title);
198 } 198 }
199 } 199 }
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
index e0537a4..8ed0bb3 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
50 private static List<String> m_lastNames = new List<String>(); 50 private static List<String> m_lastNames = new List<String>();
51 private static List<String> m_fullNames = new List<String>(); 51 private static List<String> m_fullNames = new List<String>();
52 52
53 public void Initialise(IConfigSource config) 53 public void Initialise(IConfigSource config)
54 { 54 {
55 IConfig moduleConfig = config.Configs["GodNames"]; 55 IConfig moduleConfig = config.Configs["GodNames"];
56 56
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
133 fnames.Add(name); 133 fnames.Add(name);
134 } 134 }
135 ((OSDMap)namesmap)["full_names"] = fnames; 135 ((OSDMap)namesmap)["full_names"] = fnames;
136 136
137 OSDArray lnames = new OSDArray(); 137 OSDArray lnames = new OSDArray();
138 foreach (string name in m_lastNames) { 138 foreach (string name in m_lastNames) {
139 lnames.Add(name); 139 lnames.Add(name);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
index 1ae18dd..2c2042d 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
@@ -49,7 +49,7 @@ using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
49 49
50namespace OpenSim.Region.OptionalModules.ViewerSupport 50namespace OpenSim.Region.OptionalModules.ViewerSupport
51{ 51{
52 public class SimulatorFeaturesHelper 52 public class SimulatorFeaturesHelper
53 { 53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 55
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
index ceb3332..79b80f8 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
@@ -63,28 +63,28 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
63 /// If specified in Regions.ini, the settings should be within the region's section name. 63 /// If specified in Regions.ini, the settings should be within the region's section name.
64 /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section. 64 /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section.
65 /// Region-specific settings take precedence. 65 /// Region-specific settings take precedence.
66 /// 66 ///
67 /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis. 67 /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis.
68 /// All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings! 68 /// All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings!
69 /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality. 69 /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality.
70 /// This is the only required option for enabling auto-backup; the other options have sane defaults. 70 /// This is the only required option for enabling auto-backup; the other options have sane defaults.
71 /// If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored. 71 /// If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored.
72 /// If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality. 72 /// If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality.
73 /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours). 73 /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours).
74 /// The number of minutes between each backup attempt. 74 /// The number of minutes between each backup attempt.
75 /// If a negative or zero value is given, it is equivalent to setting AutoBackup = False. 75 /// If a negative or zero value is given, it is equivalent to setting AutoBackup = False.
76 /// AutoBackupBusyCheck: True/False. Default: True. 76 /// AutoBackupBusyCheck: True/False. Default: True.
77 /// If True, we will only take an auto-backup if a set of conditions are met. 77 /// If True, we will only take an auto-backup if a set of conditions are met.
78 /// These conditions are heuristics to try and avoid taking a backup when the sim is busy. 78 /// These conditions are heuristics to try and avoid taking a backup when the sim is busy.
79 /// AutoBackupSkipAssets 79 /// AutoBackupSkipAssets
80 /// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately 80 /// If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately
81 /// AutoBackupKeepFilesForDays 81 /// AutoBackupKeepFilesForDays
82 /// Backup files older than this value (in days) are deleted during the current backup process, 0 will disable this and keep all backup files indefinitely 82 /// Backup files older than this value (in days) are deleted during the current backup process, 0 will disable this and keep all backup files indefinitely
83 /// AutoBackupScript: String. Default: not specified (disabled). 83 /// AutoBackupScript: String. Default: not specified (disabled).
84 /// File path to an executable script or binary to run when an automatic backup is taken. 84 /// File path to an executable script or binary to run when an automatic backup is taken.
85 /// The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary. 85 /// The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary.
86 /// Trying to "run" directories, or things with weird file associations on Win32, might cause unexpected results! 86 /// Trying to "run" directories, or things with weird file associations on Win32, might cause unexpected results!
87 /// argv[1] of the executed file/script will be the file name of the generated OAR. 87 /// argv[1] of the executed file/script will be the file name of the generated OAR.
88 /// If the process can't be spawned for some reason (file not found, no execute permission, etc), write a warning to the console. 88 /// If the process can't be spawned for some reason (file not found, no execute permission, etc), write a warning to the console.
89 /// AutoBackupNaming: string. Default: Time. 89 /// AutoBackupNaming: string. Default: Time.
90 /// One of three strings (case insensitive): 90 /// One of three strings (case insensitive):
@@ -295,7 +295,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
295 if (args.Length != 2) { 295 if (args.Length != 2) {
296 MainConsole.Instance.OutputFormat ("Usage: dobackup <regionname>"); 296 MainConsole.Instance.OutputFormat ("Usage: dobackup <regionname>");
297 return; 297 return;
298 } 298 }
299 bool found = false; 299 bool found = false;
300 string name = args [1]; 300 string name = args [1];
301 lock (m_Scenes) { 301 lock (m_Scenes) {
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index ce7c368..b90f0c4 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque. 35 /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque.
36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation. 36 /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation.
37 /// </summary> 37 /// </summary>
38 /// 38 ///
39 public class AutoBackupModuleState 39 public class AutoBackupModuleState
40 { 40 {
41 private Dictionary<Guid, string> m_liveRequests = null; 41 private Dictionary<Guid, string> m_liveRequests = null;
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 8565f5a..47edeb9 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -151,13 +151,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
151 // to the command line parameters you use to start up your client 151 // to the command line parameters you use to start up your client
152 // This commonly looks like -helperuri http://127.0.0.1:9000/ 152 // This commonly looks like -helperuri http://127.0.0.1:9000/
153 153
154 154
155 // Local Server.. enables functionality only. 155 // Local Server.. enables functionality only.
156 httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func); 156 httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
157 httpServer.AddXmlRPCHandler("buyCurrency", buy_func); 157 httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
158 httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); 158 httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
159 httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func); 159 httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
160 160
161 } 161 }
162 162
163 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle)) 163 if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
@@ -212,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
212 212
213 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); 213 bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
214 214
215 215
216 BalanceUpdate(fromID, toID, give_result, description); 216 BalanceUpdate(fromID, toID, give_result, description);
217 217
218 return give_result; 218 return give_result;
@@ -303,7 +303,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
303 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) 303 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description)
304 { 304 {
305 bool result = true; 305 bool result = true;
306 306
307 return result; 307 return result;
308 } 308 }
309 309
@@ -377,10 +377,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
377 else 377 else
378 { 378 {
379 m_log.ErrorFormat( 379 m_log.ErrorFormat(
380 "[MONEY]: Could not resolve user {0}", 380 "[MONEY]: Could not resolve user {0}",
381 agentID); 381 agentID);
382 } 382 }
383 383
384 return String.Empty; 384 return String.Empty;
385 } 385 }
386 386
@@ -464,7 +464,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
464 Hashtable quoteResponse = new Hashtable(); 464 Hashtable quoteResponse = new Hashtable();
465 XmlRpcResponse returnval = new XmlRpcResponse(); 465 XmlRpcResponse returnval = new XmlRpcResponse();
466 466
467 467
468 Hashtable currencyResponse = new Hashtable(); 468 Hashtable currencyResponse = new Hashtable();
469 currencyResponse.Add("estimatedCost", 0); 469 currencyResponse.Add("estimatedCost", 0);
470 currencyResponse.Add("currencyBuy", amount); 470 currencyResponse.Add("currencyBuy", amount);
@@ -475,7 +475,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
475 475
476 returnval.Value = quoteResponse; 476 returnval.Value = quoteResponse;
477 return returnval; 477 return returnval;
478 478
479 479
480 480
481 } 481 }
@@ -485,7 +485,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
485 // Hashtable requestData = (Hashtable) request.Params[0]; 485 // Hashtable requestData = (Hashtable) request.Params[0];
486 // UUID agentId = UUID.Zero; 486 // UUID agentId = UUID.Zero;
487 // int amount = 0; 487 // int amount = 0;
488 488
489 XmlRpcResponse returnval = new XmlRpcResponse(); 489 XmlRpcResponse returnval = new XmlRpcResponse();
490 Hashtable returnresp = new Hashtable(); 490 Hashtable returnresp = new Hashtable();
491 returnresp.Add("success", true); 491 returnresp.Add("success", true);
@@ -536,7 +536,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
536 536
537 // UUID agentId = UUID.Zero; 537 // UUID agentId = UUID.Zero;
538 // int amount = 0; 538 // int amount = 0;
539 539
540 retparam.Add("success", true); 540 retparam.Add("success", true);
541 ret.Value = retparam; 541 ret.Value = retparam;
542 542
@@ -553,7 +553,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
553 /// <param name="agentID"></param> 553 /// <param name="agentID"></param>
554 private void CheckExistAndRefreshFunds(UUID agentID) 554 private void CheckExistAndRefreshFunds(UUID agentID)
555 { 555 {
556 556
557 } 557 }
558 558
559 /// <summary> 559 /// <summary>
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
564 private int GetFundsForAgentID(UUID AgentID) 564 private int GetFundsForAgentID(UUID AgentID)
565 { 565 {
566 int returnfunds = 0; 566 int returnfunds = 0;
567 567
568 return returnfunds; 568 return returnfunds;
569 } 569 }
570 570
571 // private void SetLocalFundsForAgentID(UUID AgentID, int amount) 571 // private void SetLocalFundsForAgentID(UUID AgentID, int amount)
572 // { 572 // {
573 573
574 // } 574 // }
575 575
576 #endregion 576 #endregion
@@ -689,7 +689,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
689 /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/> 689 /// <see cref="OpenSim.Region.Framework.Scenes.EventManager.ClientClosed"/>
690 public void ClientClosed(UUID AgentID, Scene scene) 690 public void ClientClosed(UUID AgentID, Scene scene)
691 { 691 {
692 692
693 } 693 }
694 694
695 /// <summary> 695 /// <summary>
@@ -708,19 +708,19 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
708 708
709 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e) 709 private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e)
710 { 710 {
711 711
712 712
713 lock (e) 713 lock (e)
714 { 714 {
715 e.economyValidated = true; 715 e.economyValidated = true;
716 } 716 }
717 717
718 718
719 } 719 }
720 720
721 private void processLandBuy(Object osender, EventManager.LandBuyArgs e) 721 private void processLandBuy(Object osender, EventManager.LandBuyArgs e)
722 { 722 {
723 723
724 } 724 }
725 725
726 /// <summary> 726 /// <summary>
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
730 /// <param name="e"></param> 730 /// <param name="e"></param>
731 private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e) 731 private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e)
732 { 732 {
733 733
734 } 734 }
735 735
736 /// <summary> 736 /// <summary>
@@ -739,7 +739,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
739 /// <param name="avatar"></param> 739 /// <param name="avatar"></param>
740 private void MakeChildAgent(ScenePresence avatar) 740 private void MakeChildAgent(ScenePresence avatar)
741 { 741 {
742 742
743 } 743 }
744 744
745 /// <summary> 745 /// <summary>
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
748 /// <param name="AgentId"></param> 748 /// <param name="AgentId"></param>
749 private void ClientLoggedOut(UUID AgentId, Scene scene) 749 private void ClientLoggedOut(UUID AgentId, Scene scene)
750 { 750 {
751 751
752 } 752 }
753 753
754 /// <summary> 754 /// <summary>
@@ -768,7 +768,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
768 /// <param name="regionID"></param> 768 /// <param name="regionID"></param>
769 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) 769 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
770 { 770 {
771 771
772 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString()); 772 //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
773 } 773 }
774 774
@@ -809,12 +809,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
809 809
810 Scene s = LocateSceneClientIn(remoteClient.AgentId); 810 Scene s = LocateSceneClientIn(remoteClient.AgentId);
811 811
812 // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless 812 // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless
813 // combined with other implementations. We're actually validating that the client is sending the data 813 // combined with other implementations. We're actually validating that the client is sending the data
814 // that it should. In theory, the client should already know what to send here because it'll see it when it 814 // that it should. In theory, the client should already know what to send here because it'll see it when it
815 // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an 815 // gets the object data. If the data sent by the client doesn't match the object, the viewer probably has an
816 // old idea of what the object properties are. Viewer developer Hazim informed us that the base module 816 // old idea of what the object properties are. Viewer developer Hazim informed us that the base module
817 // didn't check the client sent data against the object do any. Since the base modules are the 817 // didn't check the client sent data against the object do any. Since the base modules are the
818 // 'crowning glory' examples of good practice.. 818 // 'crowning glory' examples of good practice..
819 819
820 // Validate that the object exists in the scene the user is in 820 // Validate that the object exists in the scene the user is in
@@ -824,15 +824,15 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
824 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); 824 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false);
825 return; 825 return;
826 } 826 }
827 827
828 // Validate that the client sent the price that the object is being sold for 828 // Validate that the client sent the price that the object is being sold for
829 if (part.SalePrice != salePrice) 829 if (part.SalePrice != salePrice)
830 { 830 {
831 remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false); 831 remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false);
832 return; 832 return;
833 } 833 }
834 834
835 // Validate that the client sent the proper sale type the object has set 835 // Validate that the client sent the proper sale type the object has set
836 if (part.ObjectSaleType != saleType) 836 if (part.ObjectSaleType != saleType)
837 { 837 {
838 remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false); 838 remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 0cabe47..6a7c735 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
49 } 49 }
50 50
51 public delegate void ChatToNPC( 51 public delegate void ChatToNPC(
52 string message, byte type, Vector3 fromPos, string fromName, 52 string message, byte type, Vector3 fromPos, string fromName,
53 UUID fromAgentID, UUID ownerID, byte source, byte audible); 53 UUID fromAgentID, UUID ownerID, byte source, byte audible);
54 54
55 /// <summary> 55 /// <summary>
@@ -223,7 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
223 { 223 {
224 224
225 } 225 }
226 226
227 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, 227 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos,
228 Quaternion SitOrientation, bool autopilot, 228 Quaternion SitOrientation, bool autopilot,
229 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 229 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
519 public event AvatarInterestUpdate OnAvatarInterestUpdate; 519 public event AvatarInterestUpdate OnAvatarInterestUpdate;
520 520
521 public event PlacesQuery OnPlacesQuery; 521 public event PlacesQuery OnPlacesQuery;
522 522
523 public event FindAgentUpdate OnFindAgent; 523 public event FindAgentUpdate OnFindAgent;
524 public event TrackAgentUpdate OnTrackAgent; 524 public event TrackAgentUpdate OnTrackAgent;
525 public event NewUserReport OnUserReport; 525 public event NewUserReport OnUserReport;
@@ -931,7 +931,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
931 OnRegionHandShakeReply(this); 931 OnRegionHandShakeReply(this);
932 } 932 }
933 } 933 }
934 934
935 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 935 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
936 { 936 {
937 } 937 }
@@ -951,7 +951,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
951 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 951 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
952 { 952 {
953 } 953 }
954 954
955 public void SendImageNotFound(UUID imageid) 955 public void SendImageNotFound(UUID imageid)
956 { 956 {
957 } 957 }
@@ -959,7 +959,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
959 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 959 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
960 { 960 {
961 } 961 }
962 962
963 public void SendShutdownConnectionNotice() 963 public void SendShutdownConnectionNotice()
964 { 964 {
965 } 965 }
@@ -970,7 +970,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
970 970
971 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) 971 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
972 { 972 {
973 973
974 } 974 }
975 975
976 public void SendObjectPropertiesReply(ISceneEntity entity) 976 public void SendObjectPropertiesReply(ISceneEntity entity)
@@ -984,7 +984,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
984 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 984 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
985 { 985 {
986 } 986 }
987 987
988 public void SendViewerTime(int phase) 988 public void SendViewerTime(int phase)
989 { 989 {
990 } 990 }
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1029 // We never start the client, so always fail. 1029 // We never start the client, so always fail.
1030 throw new NotImplementedException(); 1030 throw new NotImplementedException();
1031 } 1031 }
1032 1032
1033 public void Stop() 1033 public void Stop()
1034 { 1034 {
1035 } 1035 }
@@ -1224,11 +1224,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1224 public void SendJoinGroupReply(UUID groupID, bool success) 1224 public void SendJoinGroupReply(UUID groupID, bool success)
1225 { 1225 {
1226 } 1226 }
1227 1227
1228 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 1228 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
1229 { 1229 {
1230 } 1230 }
1231 1231
1232 public void SendLeaveGroupReply(UUID groupID, bool success) 1232 public void SendLeaveGroupReply(UUID groupID, bool success)
1233 { 1233 {
1234 } 1234 }
@@ -1318,7 +1318,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1318 { 1318 {
1319 } 1319 }
1320 #endregion 1320 #endregion
1321 1321
1322 public void SendRebakeAvatarTextures(UUID textureID) 1322 public void SendRebakeAvatarTextures(UUID textureID)
1323 { 1323 {
1324 } 1324 }
@@ -1326,15 +1326,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1326 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) 1326 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1327 { 1327 {
1328 } 1328 }
1329 1329
1330 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) 1330 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1331 { 1331 {
1332 } 1332 }
1333 1333
1334 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) 1334 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1335 { 1335 {
1336 } 1336 }
1337 1337
1338 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) 1338 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1339 { 1339 {
1340 } 1340 }
@@ -1354,7 +1354,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1354 public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId) 1354 public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
1355 { 1355 {
1356 } 1356 }
1357 1357
1358 public void SendAgentTerseUpdate(ISceneEntity presence) 1358 public void SendAgentTerseUpdate(ISceneEntity presence)
1359 { 1359 {
1360 } 1360 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index a892cf4..9a1ea73 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -209,10 +209,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
209 UserAccountHelpers.CreateUserWithInventory(m_scene, userId); 209 UserAccountHelpers.CreateUserWithInventory(m_scene, userId);
210 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 210 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
211 211
212 InventoryItemBase att1Item 212 InventoryItemBase att1Item
213 = UserInventoryHelpers.CreateInventoryItem( 213 = UserInventoryHelpers.CreateInventoryItem(
214 m_scene, "att1", TestHelpers.ParseTail(0x2), TestHelpers.ParseTail(0x3), sp.UUID, InventoryType.Object); 214 m_scene, "att1", TestHelpers.ParseTail(0x2), TestHelpers.ParseTail(0x3), sp.UUID, InventoryType.Object);
215 InventoryItemBase att2Item 215 InventoryItemBase att2Item
216 = UserInventoryHelpers.CreateInventoryItem( 216 = UserInventoryHelpers.CreateInventoryItem(
217 m_scene, "att2", TestHelpers.ParseTail(0x12), TestHelpers.ParseTail(0x13), sp.UUID, InventoryType.Object); 217 m_scene, "att2", TestHelpers.ParseTail(0x12), TestHelpers.ParseTail(0x13), sp.UUID, InventoryType.Object);
218 218
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index bea3a1e..d0d726c 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -54,38 +54,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
54 private Scene m_scene; 54 private Scene m_scene;
55 55
56 public string Name { get { return "Scene Commands Module"; } } 56 public string Name { get { return "Scene Commands Module"; } }
57 57
58 public Type ReplaceableInterface { get { return null; } } 58 public Type ReplaceableInterface { get { return null; } }
59 59
60 public void Initialise(IConfigSource source) 60 public void Initialise(IConfigSource source)
61 { 61 {
62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE"); 62// m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE");
63 } 63 }
64 64
65 public void PostInitialise() 65 public void PostInitialise()
66 { 66 {
67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE"); 67// m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE");
68 } 68 }
69 69
70 public void Close() 70 public void Close()
71 { 71 {
72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE"); 72// m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE");
73 } 73 }
74 74
75 public void AddRegion(Scene scene) 75 public void AddRegion(Scene scene)
76 { 76 {
77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); 77// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
78 78
79 m_scene = scene; 79 m_scene = scene;
80 80
81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this); 81 m_scene.RegisterModuleInterface<ISceneCommandsModule>(this);
82 } 82 }
83 83
84 public void RemoveRegion(Scene scene) 84 public void RemoveRegion(Scene scene)
85 { 85 {
86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); 86// m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
87 } 87 }
88 88
89 public void RegionLoaded(Scene scene) 89 public void RegionLoaded(Scene scene)
90 { 90 {
91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); 91// m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -101,7 +101,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
101 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n" 101 + "client-rot-upd - the tolerance before clients are updated with new rotation information for an avatar.\n"
102 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n" 102 + "client-vel-upd - the tolerance before clients are updated with new velocity information for an avatar.\n"
103 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n" 103 + "root-upd-per - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n"
104 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n" 104 + "child-upd-per - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
105 + "collisions - if false then collisions with other objects are turned off.\n" 105 + "collisions - if false then collisions with other objects are turned off.\n"
106 + "pbackup - if false then periodic scene backup is turned off.\n" 106 + "pbackup - if false then periodic scene backup is turned off.\n"
107 + "physics - if false then all physics objects are non-physical.\n" 107 + "physics - if false then all physics objects are non-physical.\n"
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
213 213
214 // FIXME: This can only come from the console at the moment but might not always be true. 214 // FIXME: This can only come from the console at the moment but might not always be true.
215 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue)) 215 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue))
216 m_scene.SendPeriodicAppearanceUpdates = newValue; 216 m_scene.SendPeriodicAppearanceUpdates = newValue;
217 } 217 }
218 218
219 if (options.ContainsKey("client-pos-upd")) 219 if (options.ContainsKey("client-pos-upd"))
@@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
222 222
223 // FIXME: This can only come from the console at the moment but might not always be true. 223 // FIXME: This can only come from the console at the moment but might not always be true.
224 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue)) 224 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue))
225 m_scene.RootPositionUpdateTolerance = newValue; 225 m_scene.RootPositionUpdateTolerance = newValue;
226 } 226 }
227 227
228 if (options.ContainsKey("client-rot-upd")) 228 if (options.ContainsKey("client-rot-upd"))
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
231 231
232 // FIXME: This can only come from the console at the moment but might not always be true. 232 // FIXME: This can only come from the console at the moment but might not always be true.
233 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue)) 233 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue))
234 m_scene.RootRotationUpdateTolerance = newValue; 234 m_scene.RootRotationUpdateTolerance = newValue;
235 } 235 }
236 236
237 if (options.ContainsKey("client-vel-upd")) 237 if (options.ContainsKey("client-vel-upd"))
@@ -240,7 +240,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
240 240
241 // FIXME: This can only come from the console at the moment but might not always be true. 241 // FIXME: This can only come from the console at the moment but might not always be true.
242 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue)) 242 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue))
243 m_scene.RootVelocityUpdateTolerance = newValue; 243 m_scene.RootVelocityUpdateTolerance = newValue;
244 } 244 }
245 245
246 if (options.ContainsKey("root-upd-per")) 246 if (options.ContainsKey("root-upd-per"))
@@ -249,7 +249,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
249 249
250 // FIXME: This can only come from the console at the moment but might not always be true. 250 // FIXME: This can only come from the console at the moment but might not always be true.
251 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue)) 251 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue))
252 m_scene.RootTerseUpdatePeriod = newValue; 252 m_scene.RootTerseUpdatePeriod = newValue;
253 } 253 }
254 254
255 if (options.ContainsKey("child-upd-per")) 255 if (options.ContainsKey("child-upd-per"))
@@ -258,7 +258,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
258 258
259 // FIXME: This can only come from the console at the moment but might not always be true. 259 // FIXME: This can only come from the console at the moment but might not always be true.
260 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue)) 260 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue))
261 m_scene.ChildTerseUpdatePeriod = newValue; 261 m_scene.ChildTerseUpdatePeriod = newValue;
262 } 262 }
263 263
264 if (options.ContainsKey("pbackup")) 264 if (options.ContainsKey("pbackup"))
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index e4a3382..e22c6ea 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -45,7 +45,7 @@ using System.IO;
45namespace OpenSim.Region.OptionalModules.World.TreePopulator 45namespace OpenSim.Region.OptionalModules.World.TreePopulator
46{ 46{
47 /// <summary> 47 /// <summary>
48 /// Version 2.02 - Still hacky 48 /// Version 2.02 - Still hacky
49 /// </summary> 49 /// </summary>
50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")] 50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")]
51 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule 51 public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
60 public string m_name; 60 public string m_name;
61 public Boolean m_frozen; 61 public Boolean m_frozen;
62 public Tree m_tree_type; 62 public Tree m_tree_type;
63 public int m_tree_quantity; 63 public int m_tree_quantity;
64 public float m_treeline_low; 64 public float m_treeline_low;
65 public float m_treeline_high; 65 public float m_treeline_high;
66 public Vector3 m_seed_point; 66 public Vector3 m_seed_point;
@@ -78,7 +78,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
78 { 78 {
79 } 79 }
80 80
81 public Copse(string fileName, Boolean planted) 81 public Copse(string fileName, Boolean planted)
82 { 82 {
83 Copse cp = (Copse)DeserializeObject(fileName); 83 Copse cp = (Copse)DeserializeObject(fileName);
84 84
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
139 { 139 {
140 string frozen = (this.m_frozen ? "F" : "A"); 140 string frozen = (this.m_frozen ? "F" : "A");
141 141
142 return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", 142 return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};",
143 frozen, 143 frozen,
144 this.m_name, 144 this.m_name,
145 this.m_tree_quantity, 145 this.m_tree_quantity,
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
156 156
157 private List<Copse> m_copse; 157 private List<Copse> m_copse;
158 158
159 private double m_update_ms = 1000.0; // msec between updates 159 private double m_update_ms = 1000.0; // msec between updates
160 private bool m_active_trees = false; 160 private bool m_active_trees = false;
161 161
162 Timer CalculateTrees; 162 Timer CalculateTrees;
@@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
174 174
175 public void Initialise(IConfigSource config) 175 public void Initialise(IConfigSource config)
176 { 176 {
177 177
178 // ini file settings 178 // ini file settings
179 try 179 try
180 { 180 {
@@ -621,11 +621,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
621 CalculateTrees.Elapsed += CalculateTrees_Elapsed; 621 CalculateTrees.Elapsed += CalculateTrees_Elapsed;
622 CalculateTrees.Start(); 622 CalculateTrees.Start();
623 } 623 }
624 else 624 else
625 { 625 {
626 CalculateTrees.Stop(); 626 CalculateTrees.Stop();
627 } 627 }
628 } 628 }
629 629
630 private void growTrees() 630 private void growTrees()
631 { 631 {
@@ -670,7 +670,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
670 if (copse.m_trees.Count < copse.m_tree_quantity) 670 if (copse.m_trees.Count < copse.m_tree_quantity)
671 { 671 {
672 // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height 672 // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height
673 if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) 673 if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0)
674 { 674 {
675 if (Util.RandomClass.NextDouble() > 0.75) 675 if (Util.RandomClass.NextDouble() > 0.75)
676 { 676 {
diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
index 3944047..67d9207 100644
--- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs
@@ -268,23 +268,23 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
268 set { return; } 268 set { return; }
269 } 269 }
270 270
271 public override Quaternion APIDTarget 271 public override Quaternion APIDTarget
272 { 272 {
273 set { return; } 273 set { return; }
274 } 274 }
275 275
276 public override bool APIDActive 276 public override bool APIDActive
277 { 277 {
278 set { return; } 278 set { return; }
279 } 279 }
280 280
281 public override float APIDStrength 281 public override float APIDStrength
282 { 282 {
283 set { return; } 283 set { return; }
284 } 284 }
285 285
286 public override float APIDDamping 286 public override float APIDDamping
287 { 287 {
288 set { return; } 288 set { return; }
289 } 289 }
290 290
diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
index d2cd028..58c2581 100644
--- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
+++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs
@@ -281,23 +281,23 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
281 set { return; } 281 set { return; }
282 } 282 }
283 283
284 public override Quaternion APIDTarget 284 public override Quaternion APIDTarget
285 { 285 {
286 set { return; } 286 set { return; }
287 } 287 }
288 288
289 public override bool APIDActive 289 public override bool APIDActive
290 { 290 {
291 set { return; } 291 set { return; }
292 } 292 }
293 293
294 public override float APIDStrength 294 public override float APIDStrength
295 { 295 {
296 set { return; } 296 set { return; }
297 } 297 }
298 298
299 public override float APIDDamping 299 public override float APIDDamping
300 { 300 {
301 set { return; } 301 set { return; }
302 } 302 }
303 303
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
index c4a923c..42db7fe 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIUnman.cs
@@ -155,8 +155,8 @@ public BSAPIUnman(string paramName, BSScene physScene)
155 155
156// Initialization and simulation 156// Initialization and simulation
157public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, 157public override BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
158 int maxCollisions, ref CollisionDesc[] collisionArray, 158 int maxCollisions, ref CollisionDesc[] collisionArray,
159 int maxUpdates, ref EntityProperties[] updateArray 159 int maxUpdates, ref EntityProperties[] updateArray
160 ) 160 )
161{ 161{
162 // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code 162 // Pin down the memory that will be used to pass object collisions and updates back from unmanaged code
@@ -1472,8 +1472,8 @@ public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg
1472// Initialization and simulation 1472// Initialization and simulation
1473[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1473[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
1474public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms, 1474public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms,
1475 int maxCollisions, IntPtr collisionArray, 1475 int maxCollisions, IntPtr collisionArray,
1476 int maxUpdates, IntPtr updateArray, 1476 int maxUpdates, IntPtr updateArray,
1477 DebugLogCallback logRoutine); 1477 DebugLogCallback logRoutine);
1478 1478
1479[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 1479[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
index 887311d..37017b0 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSAPIXNA.cs
@@ -815,161 +815,161 @@ private sealed class BulletConstraintXNA : BulletConstraint
815 public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val) 815 public override bool SliderSetLimits(BulletConstraint pConstraint, int lowerUpper, int linAng, float val)
816 { 816 {
817 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 817 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
818 switch (lowerUpper) 818 switch (lowerUpper)
819 { 819 {
820 case SLIDER_LOWER_LIMIT: 820 case SLIDER_LOWER_LIMIT:
821 switch (linAng) 821 switch (linAng)
822 { 822 {
823 case SLIDER_LINEAR: 823 case SLIDER_LINEAR:
824 constraint.SetLowerLinLimit(val); 824 constraint.SetLowerLinLimit(val);
825 break; 825 break;
826 case SLIDER_ANGULAR: 826 case SLIDER_ANGULAR:
827 constraint.SetLowerAngLimit(val); 827 constraint.SetLowerAngLimit(val);
828 break; 828 break;
829 } 829 }
830 break; 830 break;
831 case SLIDER_UPPER_LIMIT: 831 case SLIDER_UPPER_LIMIT:
832 switch (linAng) 832 switch (linAng)
833 { 833 {
834 case SLIDER_LINEAR: 834 case SLIDER_LINEAR:
835 constraint.SetUpperLinLimit(val); 835 constraint.SetUpperLinLimit(val);
836 break; 836 break;
837 case SLIDER_ANGULAR: 837 case SLIDER_ANGULAR:
838 constraint.SetUpperAngLimit(val); 838 constraint.SetUpperAngLimit(val);
839 break; 839 break;
840 } 840 }
841 break; 841 break;
842 } 842 }
843 return true; 843 return true;
844 } 844 }
845 public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val) 845 public override bool SliderSet(BulletConstraint pConstraint, int softRestDamp, int dirLimOrtho, int linAng, float val)
846 { 846 {
847 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 847 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
848 switch (softRestDamp) 848 switch (softRestDamp)
849 { 849 {
850 case SLIDER_SET_SOFTNESS: 850 case SLIDER_SET_SOFTNESS:
851 switch (dirLimOrtho) 851 switch (dirLimOrtho)
852 { 852 {
853 case SLIDER_SET_DIRECTION: 853 case SLIDER_SET_DIRECTION:
854 switch (linAng) 854 switch (linAng)
855 { 855 {
856 case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break; 856 case SLIDER_LINEAR: constraint.SetSoftnessDirLin(val); break;
857 case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break; 857 case SLIDER_ANGULAR: constraint.SetSoftnessDirAng(val); break;
858 } 858 }
859 break; 859 break;
860 case SLIDER_SET_LIMIT: 860 case SLIDER_SET_LIMIT:
861 switch (linAng) 861 switch (linAng)
862 { 862 {
863 case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break; 863 case SLIDER_LINEAR: constraint.SetSoftnessLimLin(val); break;
864 case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break; 864 case SLIDER_ANGULAR: constraint.SetSoftnessLimAng(val); break;
865 } 865 }
866 break; 866 break;
867 case SLIDER_SET_ORTHO: 867 case SLIDER_SET_ORTHO:
868 switch (linAng) 868 switch (linAng)
869 { 869 {
870 case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break; 870 case SLIDER_LINEAR: constraint.SetSoftnessOrthoLin(val); break;
871 case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break; 871 case SLIDER_ANGULAR: constraint.SetSoftnessOrthoAng(val); break;
872 } 872 }
873 break; 873 break;
874 } 874 }
875 break; 875 break;
876 case SLIDER_SET_RESTITUTION: 876 case SLIDER_SET_RESTITUTION:
877 switch (dirLimOrtho) 877 switch (dirLimOrtho)
878 { 878 {
879 case SLIDER_SET_DIRECTION: 879 case SLIDER_SET_DIRECTION:
880 switch (linAng) 880 switch (linAng)
881 { 881 {
882 case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break; 882 case SLIDER_LINEAR: constraint.SetRestitutionDirLin(val); break;
883 case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break; 883 case SLIDER_ANGULAR: constraint.SetRestitutionDirAng(val); break;
884 } 884 }
885 break; 885 break;
886 case SLIDER_SET_LIMIT: 886 case SLIDER_SET_LIMIT:
887 switch (linAng) 887 switch (linAng)
888 { 888 {
889 case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break; 889 case SLIDER_LINEAR: constraint.SetRestitutionLimLin(val); break;
890 case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break; 890 case SLIDER_ANGULAR: constraint.SetRestitutionLimAng(val); break;
891 } 891 }
892 break; 892 break;
893 case SLIDER_SET_ORTHO: 893 case SLIDER_SET_ORTHO:
894 switch (linAng) 894 switch (linAng)
895 { 895 {
896 case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break; 896 case SLIDER_LINEAR: constraint.SetRestitutionOrthoLin(val); break;
897 case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break; 897 case SLIDER_ANGULAR: constraint.SetRestitutionOrthoAng(val); break;
898 } 898 }
899 break; 899 break;
900 } 900 }
901 break; 901 break;
902 case SLIDER_SET_DAMPING: 902 case SLIDER_SET_DAMPING:
903 switch (dirLimOrtho) 903 switch (dirLimOrtho)
904 { 904 {
905 case SLIDER_SET_DIRECTION: 905 case SLIDER_SET_DIRECTION:
906 switch (linAng) 906 switch (linAng)
907 { 907 {
908 case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break; 908 case SLIDER_LINEAR: constraint.SetDampingDirLin(val); break;
909 case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break; 909 case SLIDER_ANGULAR: constraint.SetDampingDirAng(val); break;
910 } 910 }
911 break; 911 break;
912 case SLIDER_SET_LIMIT: 912 case SLIDER_SET_LIMIT:
913 switch (linAng) 913 switch (linAng)
914 { 914 {
915 case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break; 915 case SLIDER_LINEAR: constraint.SetDampingLimLin(val); break;
916 case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break; 916 case SLIDER_ANGULAR: constraint.SetDampingLimAng(val); break;
917 } 917 }
918 break; 918 break;
919 case SLIDER_SET_ORTHO: 919 case SLIDER_SET_ORTHO:
920 switch (linAng) 920 switch (linAng)
921 { 921 {
922 case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break; 922 case SLIDER_LINEAR: constraint.SetDampingOrthoLin(val); break;
923 case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break; 923 case SLIDER_ANGULAR: constraint.SetDampingOrthoAng(val); break;
924 } 924 }
925 break; 925 break;
926 } 926 }
927 break; 927 break;
928 } 928 }
929 return true; 929 return true;
930 } 930 }
931 public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse) 931 public override bool SliderMotorEnable(BulletConstraint pConstraint, int linAng, float numericTrueFalse)
932 { 932 {
933 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 933 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
934 switch (linAng) 934 switch (linAng)
935 { 935 {
936 case SLIDER_LINEAR: 936 case SLIDER_LINEAR:
937 constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true); 937 constraint.SetPoweredLinMotor(numericTrueFalse == 0.0 ? false : true);
938 break; 938 break;
939 case SLIDER_ANGULAR: 939 case SLIDER_ANGULAR:
940 constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true); 940 constraint.SetPoweredAngMotor(numericTrueFalse == 0.0 ? false : true);
941 break; 941 break;
942 } 942 }
943 return true; 943 return true;
944 } 944 }
945 public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val) 945 public override bool SliderMotor(BulletConstraint pConstraint, int forceVel, int linAng, float val)
946 { 946 {
947 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint; 947 SliderConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as SliderConstraint;
948 switch (forceVel) 948 switch (forceVel)
949 { 949 {
950 case SLIDER_MOTOR_VELOCITY: 950 case SLIDER_MOTOR_VELOCITY:
951 switch (linAng) 951 switch (linAng)
952 { 952 {
953 case SLIDER_LINEAR: 953 case SLIDER_LINEAR:
954 constraint.SetTargetLinMotorVelocity(val); 954 constraint.SetTargetLinMotorVelocity(val);
955 break; 955 break;
956 case SLIDER_ANGULAR: 956 case SLIDER_ANGULAR:
957 constraint.SetTargetAngMotorVelocity(val); 957 constraint.SetTargetAngMotorVelocity(val);
958 break; 958 break;
959 } 959 }
960 break; 960 break;
961 case SLIDER_MAX_MOTOR_FORCE: 961 case SLIDER_MAX_MOTOR_FORCE:
962 switch (linAng) 962 switch (linAng)
963 { 963 {
964 case SLIDER_LINEAR: 964 case SLIDER_LINEAR:
965 constraint.SetMaxLinMotorForce(val); 965 constraint.SetMaxLinMotorForce(val);
966 break; 966 break;
967 case SLIDER_ANGULAR: 967 case SLIDER_ANGULAR:
968 constraint.SetMaxAngMotorForce(val); 968 constraint.SetMaxAngMotorForce(val);
969 break; 969 break;
970 } 970 }
971 break; 971 break;
972 } 972 }
973 return true; 973 return true;
974 } 974 }
975 975
@@ -1197,20 +1197,20 @@ private sealed class BulletConstraintXNA : BulletConstraint
1197 }; 1197 };
1198 /* 1198 /*
1199 m_mass = mass; 1199 m_mass = mass;
1200 m_motionState =motionState; 1200 m_motionState =motionState;
1201 m_collisionShape = collisionShape; 1201 m_collisionShape = collisionShape;
1202 m_localInertia = localInertia; 1202 m_localInertia = localInertia;
1203 m_linearDamping = 0f; 1203 m_linearDamping = 0f;
1204 m_angularDamping = 0f; 1204 m_angularDamping = 0f;
1205 m_friction = 0.5f; 1205 m_friction = 0.5f;
1206 m_restitution = 0f; 1206 m_restitution = 0f;
1207 m_linearSleepingThreshold = 0.8f; 1207 m_linearSleepingThreshold = 0.8f;
1208 m_angularSleepingThreshold = 1f; 1208 m_angularSleepingThreshold = 1f;
1209 m_additionalDamping = false; 1209 m_additionalDamping = false;
1210 m_additionalDampingFactor = 0.005f; 1210 m_additionalDampingFactor = 0.005f;
1211 m_additionalLinearDampingThresholdSqr = 0.01f; 1211 m_additionalLinearDampingThresholdSqr = 0.01f;
1212 m_additionalAngularDampingThresholdSqr = 0.01f; 1212 m_additionalAngularDampingThresholdSqr = 0.01f;
1213 m_additionalAngularDampingFactor = 0.01f; 1213 m_additionalAngularDampingFactor = 0.01f;
1214 m_startWorldTransform = IndexedMatrix.Identity; 1214 m_startWorldTransform = IndexedMatrix.Identity;
1215 */ 1215 */
1216 body.SetUserPointer(pLocalID); 1216 body.SetUserPointer(pLocalID);
@@ -2172,7 +2172,7 @@ private sealed class BulletConstraintXNA : BulletConstraint
2172 } 2172 }
2173 2173
2174 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 2174 public override BulletShape CreateTerrainShape(uint id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
2175 float scaleFactor, float collisionMargin) 2175 float scaleFactor, float collisionMargin)
2176 { 2176 {
2177 const int upAxis = 2; 2177 const int upAxis = 2;
2178 HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y, 2178 HeightfieldTerrainShape terrainShape = new HeightfieldTerrainShape((int)size.X, (int)size.Y,
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
index 87cf972..f2019ae 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorMoveToTarget.cs
@@ -205,7 +205,7 @@ public class BSActorMoveToTarget : BSActor
205 addedForce = correctionVector / timeStep; 205 addedForce = correctionVector / timeStep;
206 // Remove the existing velocity (only the moveToTarget force counts) 206 // Remove the existing velocity (only the moveToTarget force counts)
207 addedForce -= m_controllingPrim.RawVelocity; 207 addedForce -= m_controllingPrim.RawVelocity;
208 // Overcome gravity. 208 // Overcome gravity.
209 addedForce -= m_controllingPrim.Gravity; 209 addedForce -= m_controllingPrim.Gravity;
210 210
211 // Add enough force to overcome the mass of the object 211 // Add enough force to overcome the mass of the object
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
index 7756b10..816189f 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
@@ -36,16 +36,16 @@ namespace OpenSim.Region.PhysicsModule.BulletS {
36 // Constraint type values as defined by Bullet 36 // Constraint type values as defined by Bullet
37public enum ConstraintType : int 37public enum ConstraintType : int
38{ 38{
39 POINT2POINT_CONSTRAINT_TYPE = 3, 39 POINT2POINT_CONSTRAINT_TYPE = 3,
40 HINGE_CONSTRAINT_TYPE, 40 HINGE_CONSTRAINT_TYPE,
41 CONETWIST_CONSTRAINT_TYPE, 41 CONETWIST_CONSTRAINT_TYPE,
42 D6_CONSTRAINT_TYPE, 42 D6_CONSTRAINT_TYPE,
43 SLIDER_CONSTRAINT_TYPE, 43 SLIDER_CONSTRAINT_TYPE,
44 CONTACT_CONSTRAINT_TYPE, 44 CONTACT_CONSTRAINT_TYPE,
45 D6_SPRING_CONSTRAINT_TYPE, 45 D6_SPRING_CONSTRAINT_TYPE,
46 GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82 46 GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82
47 FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82 47 FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82
48 MAX_CONSTRAINT_TYPE, // last type defined by Bullet 48 MAX_CONSTRAINT_TYPE, // last type defined by Bullet
49 // 49 //
50 BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving 50 BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving
51} 51}
@@ -54,25 +54,25 @@ public enum ConstraintType : int
54[StructLayout(LayoutKind.Sequential)] 54[StructLayout(LayoutKind.Sequential)]
55public struct ConvexHull 55public struct ConvexHull
56{ 56{
57 Vector3 Offset; 57 Vector3 Offset;
58 int VertexCount; 58 int VertexCount;
59 Vector3[] Vertices; 59 Vector3[] Vertices;
60} 60}
61public enum BSPhysicsShapeType 61public enum BSPhysicsShapeType
62{ 62{
63 SHAPE_UNKNOWN = 0, 63 SHAPE_UNKNOWN = 0,
64 SHAPE_CAPSULE = 1, 64 SHAPE_CAPSULE = 1,
65 SHAPE_BOX = 2, 65 SHAPE_BOX = 2,
66 SHAPE_CONE = 3, 66 SHAPE_CONE = 3,
67 SHAPE_CYLINDER = 4, 67 SHAPE_CYLINDER = 4,
68 SHAPE_SPHERE = 5, 68 SHAPE_SPHERE = 5,
69 SHAPE_MESH = 6, 69 SHAPE_MESH = 6,
70 SHAPE_HULL = 7, 70 SHAPE_HULL = 7,
71 // following defined by BulletSim 71 // following defined by BulletSim
72 SHAPE_GROUNDPLANE = 20, 72 SHAPE_GROUNDPLANE = 20,
73 SHAPE_TERRAIN = 21, 73 SHAPE_TERRAIN = 21,
74 SHAPE_COMPOUND = 22, 74 SHAPE_COMPOUND = 22,
75 SHAPE_HEIGHTMAP = 23, 75 SHAPE_HEIGHTMAP = 23,
76 SHAPE_AVATAR = 24, 76 SHAPE_AVATAR = 24,
77 SHAPE_CONVEXHULL= 25, 77 SHAPE_CONVEXHULL= 25,
78 SHAPE_GIMPACT = 26, 78 SHAPE_GIMPACT = 26,
@@ -180,16 +180,16 @@ public struct ConfigurationParameters
180 public float collisionMargin; 180 public float collisionMargin;
181 public float gravity; 181 public float gravity;
182 182
183 public float maxPersistantManifoldPoolSize; 183 public float maxPersistantManifoldPoolSize;
184 public float maxCollisionAlgorithmPoolSize; 184 public float maxCollisionAlgorithmPoolSize;
185 public float shouldDisableContactPoolDynamicAllocation; 185 public float shouldDisableContactPoolDynamicAllocation;
186 public float shouldForceUpdateAllAabbs; 186 public float shouldForceUpdateAllAabbs;
187 public float shouldRandomizeSolverOrder; 187 public float shouldRandomizeSolverOrder;
188 public float shouldSplitSimulationIslands; 188 public float shouldSplitSimulationIslands;
189 public float shouldEnableFrictionCaching; 189 public float shouldEnableFrictionCaching;
190 public float numberOfSolverIterations; 190 public float numberOfSolverIterations;
191 public float useSingleSidedMeshes; 191 public float useSingleSidedMeshes;
192 public float globalContactBreakingThreshold; 192 public float globalContactBreakingThreshold;
193 193
194 public float physicsLoggingFrames; 194 public float physicsLoggingFrames;
195 195
@@ -202,30 +202,30 @@ public struct ConfigurationParameters
202public struct HACDParams 202public struct HACDParams
203{ 203{
204 // usual default values 204 // usual default values
205 public float maxVerticesPerHull; // 100 205 public float maxVerticesPerHull; // 100
206 public float minClusters; // 2 206 public float minClusters; // 2
207 public float compacityWeight; // 0.1 207 public float compacityWeight; // 0.1
208 public float volumeWeight; // 0.0 208 public float volumeWeight; // 0.0
209 public float concavity; // 100 209 public float concavity; // 100
210 public float addExtraDistPoints; // false 210 public float addExtraDistPoints; // false
211 public float addNeighboursDistPoints; // false 211 public float addNeighboursDistPoints; // false
212 public float addFacesPoints; // false 212 public float addFacesPoints; // false
213 public float shouldAdjustCollisionMargin; // false 213 public float shouldAdjustCollisionMargin; // false
214 // VHACD 214 // VHACD
215 public float whichHACD; // zero if Bullet HACD, non-zero says VHACD 215 public float whichHACD; // zero if Bullet HACD, non-zero says VHACD
216 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html 216 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html
217 public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage 217 public float vHACDresolution; // 100,000 max number of voxels generated during voxelization stage
218 public float vHACDdepth; // 20 max number of clipping stages 218 public float vHACDdepth; // 20 max number of clipping stages
219 public float vHACDconcavity; // 0.0025 maximum concavity 219 public float vHACDconcavity; // 0.0025 maximum concavity
220 public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane 220 public float vHACDplaneDownsampling; // 4 granularity of search for best clipping plane
221 public float vHACDconvexHullDownsampling; // 4 precision of hull gen process 221 public float vHACDconvexHullDownsampling; // 4 precision of hull gen process
222 public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes 222 public float vHACDalpha; // 0.05 bias toward clipping along symmetry planes
223 public float vHACDbeta; // 0.05 bias toward clipping along revolution axis 223 public float vHACDbeta; // 0.05 bias toward clipping along revolution axis
224 public float vHACDgamma; // 0.00125 max concavity when merging 224 public float vHACDgamma; // 0.00125 max concavity when merging
225 public float vHACDpca; // 0 on/off normalizing mesh before decomp 225 public float vHACDpca; // 0 on/off normalizing mesh before decomp
226 public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based 226 public float vHACDmode; // 0 0:voxel based, 1: tetrahedron based
227 public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull 227 public float vHACDmaxNumVerticesPerCH; // 64 max triangles per convex hull
228 public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls 228 public float vHACDminVolumePerCH; // 0.0001 sampling of generated convex hulls
229} 229}
230 230
231// The states a bullet collision object can have 231// The states a bullet collision object can have
@@ -322,8 +322,8 @@ public abstract string BulletEngineVersion { get; protected set;}
322 322
323// Initialization and simulation 323// Initialization and simulation
324public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms, 324public abstract BulletWorld Initialize(Vector3 maxPosition, ConfigurationParameters parms,
325 int maxCollisions, ref CollisionDesc[] collisionArray, 325 int maxCollisions, ref CollisionDesc[] collisionArray,
326 int maxUpdates, ref EntityProperties[] updateArray 326 int maxUpdates, ref EntityProperties[] updateArray
327 ); 327 );
328 328
329public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, 329public abstract int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep,
@@ -398,7 +398,7 @@ public abstract void DestroyObject(BulletWorld sim, BulletBody obj);
398public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin); 398public abstract BulletShape CreateGroundPlaneShape(UInt32 id, float height, float collisionMargin);
399 399
400public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap, 400public abstract BulletShape CreateTerrainShape(UInt32 id, Vector3 size, float minHeight, float maxHeight, float[] heightMap,
401 float scaleFactor, float collisionMargin); 401 float scaleFactor, float collisionMargin);
402 402
403// ===================================================================================== 403// =====================================================================================
404// Constraint creation and helper routines 404// Constraint creation and helper routines
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
index 6322695..57f03fb 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
@@ -64,9 +64,9 @@ public sealed class BSCharacter : BSPhysObject
64 private OMV.Vector3 _PIDTarget; 64 private OMV.Vector3 _PIDTarget;
65 private float _PIDTau; 65 private float _PIDTau;
66 66
67// public override OMV.Vector3 RawVelocity 67// public override OMV.Vector3 RawVelocity
68// { get { return base.RawVelocity; } 68// { get { return base.RawVelocity; }
69// set { 69// set {
70// if (value != base.RawVelocity) 70// if (value != base.RawVelocity)
71// Util.PrintCallStack(); 71// Util.PrintCallStack();
72// Console.WriteLine("Set rawvel to {0}", value); 72// Console.WriteLine("Set rawvel to {0}", value);
@@ -82,7 +82,7 @@ public sealed class BSCharacter : BSPhysObject
82 : base(parent_scene, localID, avName, "BSCharacter") 82 : base(parent_scene, localID, avName, "BSCharacter")
83 { 83 {
84 _physicsActorType = (int)ActorTypes.Agent; 84 _physicsActorType = (int)ActorTypes.Agent;
85 RawPosition = pos; 85 RawPosition = pos;
86 86
87 _flying = isFlying; 87 _flying = isFlying;
88 RawOrientation = OMV.Quaternion.Identity; 88 RawOrientation = OMV.Quaternion.Identity;
@@ -819,7 +819,7 @@ public sealed class BSCharacter : BSPhysObject
819 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many 819 // 0.001m/s. Bullet introduces a lot of jitter in the velocity which causes many
820 // extra updates. 820 // extra updates.
821 // 821 //
822 // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to 822 // XXX: Contrary to the above comment, setting an update threshold here above 0.4 actually introduces jitter to
823 // avatar movement rather than removes it. The larger the threshold, the bigger the jitter. 823 // avatar movement rather than removes it. The larger the threshold, the bigger the jitter.
824 // This is most noticeable in level flight and can be seen with 824 // This is most noticeable in level flight and can be seen with
825 // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower 825 // the "show updates" option in a viewer. With an update threshold, the RawVelocity cycles between a lower
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
index 313c961..c4ccdbe 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSDynamics.cs
@@ -125,8 +125,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
125 125
126 // Just some recomputed constants: 126 // Just some recomputed constants:
127#pragma warning disable 414 127#pragma warning disable 414
128 static readonly float TwoPI = ((float)Math.PI) * 2f; 128 static readonly float TwoPI = ((float)Math.PI) * 2f;
129 static readonly float FourPI = ((float)Math.PI) * 4f; 129 static readonly float FourPI = ((float)Math.PI) * 4f;
130 static readonly float PIOverFour = ((float)Math.PI) / 4f; 130 static readonly float PIOverFour = ((float)Math.PI) / 4f;
131 static readonly float PIOverTwo = ((float)Math.PI) / 2f; 131 static readonly float PIOverTwo = ((float)Math.PI) / 2f;
132#pragma warning restore 414 132#pragma warning restore 414
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
1595 // in that direction. 1595 // in that direction.
1596 // TODO: implement reference frame. 1596 // TODO: implement reference frame.
1597 public void ComputeAngularDeflection() 1597 public void ComputeAngularDeflection()
1598 { 1598 {
1599 1599
1600 if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2) 1600 if (BSParam.VehicleEnableAngularDeflection && m_angularDeflectionEfficiency != 0 && VehicleForwardSpeed > 0.2)
1601 { 1601 {
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
index e73f0e8..13c1361 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinkset.cs
@@ -319,7 +319,7 @@ public abstract class BSLinkset
319 public virtual bool AllPartsComplete 319 public virtual bool AllPartsComplete
320 { 320 {
321 get { 321 get {
322 bool ret = true; 322 bool ret = true;
323 this.ForEachMember((member) => 323 this.ForEachMember((member) =>
324 { 324 {
325 if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) 325 if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting)
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
index 28df2d9..352c03e 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
@@ -90,8 +90,8 @@ public static class BSParam
90 public static float DeactivationTime { get; private set; } 90 public static float DeactivationTime { get; private set; }
91 public static float LinearSleepingThreshold { get; private set; } 91 public static float LinearSleepingThreshold { get; private set; }
92 public static float AngularSleepingThreshold { get; private set; } 92 public static float AngularSleepingThreshold { get; private set; }
93 public static float CcdMotionThreshold { get; private set; } 93 public static float CcdMotionThreshold { get; private set; }
94 public static float CcdSweptSphereRadius { get; private set; } 94 public static float CcdSweptSphereRadius { get; private set; }
95 public static float ContactProcessingThreshold { get; private set; } 95 public static float ContactProcessingThreshold { get; private set; }
96 96
97 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed 97 public static bool ShouldMeshSculptedPrim { get; private set; } // cause scuplted prims to get meshed
@@ -119,14 +119,14 @@ public static class BSParam
119 public static float Gravity { get; private set; } 119 public static float Gravity { get; private set; }
120 120
121 // Physics Engine operation 121 // Physics Engine operation
122 public static float MaxPersistantManifoldPoolSize { get; private set; } 122 public static float MaxPersistantManifoldPoolSize { get; private set; }
123 public static float MaxCollisionAlgorithmPoolSize { get; private set; } 123 public static float MaxCollisionAlgorithmPoolSize { get; private set; }
124 public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; } 124 public static bool ShouldDisableContactPoolDynamicAllocation { get; private set; }
125 public static bool ShouldForceUpdateAllAabbs { get; private set; } 125 public static bool ShouldForceUpdateAllAabbs { get; private set; }
126 public static bool ShouldRandomizeSolverOrder { get; private set; } 126 public static bool ShouldRandomizeSolverOrder { get; private set; }
127 public static bool ShouldSplitSimulationIslands { get; private set; } 127 public static bool ShouldSplitSimulationIslands { get; private set; }
128 public static bool ShouldEnableFrictionCaching { get; private set; } 128 public static bool ShouldEnableFrictionCaching { get; private set; }
129 public static float NumberOfSolverIterations { get; private set; } 129 public static float NumberOfSolverIterations { get; private set; }
130 public static bool UseSingleSidedMeshes { get; private set; } 130 public static bool UseSingleSidedMeshes { get; private set; }
131 public static float GlobalContactBreakingThreshold { get; private set; } 131 public static float GlobalContactBreakingThreshold { get; private set; }
132 public static float PhysicsUnmanLoggingFrames { get; private set; } 132 public static float PhysicsUnmanLoggingFrames { get; private set; }
@@ -149,19 +149,19 @@ public static class BSParam
149 public static float AvatarFlyingGroundMargin { get; private set; } 149 public static float AvatarFlyingGroundMargin { get; private set; }
150 public static float AvatarFlyingGroundUpForce { get; private set; } 150 public static float AvatarFlyingGroundUpForce { get; private set; }
151 public static float AvatarTerminalVelocity { get; private set; } 151 public static float AvatarTerminalVelocity { get; private set; }
152 public static float AvatarContactProcessingThreshold { get; private set; } 152 public static float AvatarContactProcessingThreshold { get; private set; }
153 public static float AvatarAddForcePushFactor { get; private set; } 153 public static float AvatarAddForcePushFactor { get; private set; }
154 public static float AvatarStopZeroThreshold { get; private set; } 154 public static float AvatarStopZeroThreshold { get; private set; }
155 public static float AvatarStopZeroThresholdSquared { get; private set; } 155 public static float AvatarStopZeroThresholdSquared { get; private set; }
156 public static int AvatarJumpFrames { get; private set; } 156 public static int AvatarJumpFrames { get; private set; }
157 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; } 157 public static float AvatarBelowGroundUpCorrectionMeters { get; private set; }
158 public static float AvatarStepHeight { get; private set; } 158 public static float AvatarStepHeight { get; private set; }
159 public static float AvatarStepAngle { get; private set; } 159 public static float AvatarStepAngle { get; private set; }
160 public static float AvatarStepGroundFudge { get; private set; } 160 public static float AvatarStepGroundFudge { get; private set; }
161 public static float AvatarStepApproachFactor { get; private set; } 161 public static float AvatarStepApproachFactor { get; private set; }
162 public static float AvatarStepForceFactor { get; private set; } 162 public static float AvatarStepForceFactor { get; private set; }
163 public static float AvatarStepUpCorrectionFactor { get; private set; } 163 public static float AvatarStepUpCorrectionFactor { get; private set; }
164 public static int AvatarStepSmoothingSteps { get; private set; } 164 public static int AvatarStepSmoothingSteps { get; private set; }
165 165
166 // Vehicle parameters 166 // Vehicle parameters
167 public static float VehicleMaxLinearVelocity { get; private set; } 167 public static float VehicleMaxLinearVelocity { get; private set; }
@@ -193,31 +193,31 @@ public static class BSParam
193 public static float CSHullVolumeConservationThresholdPercent { get; private set; } 193 public static float CSHullVolumeConservationThresholdPercent { get; private set; }
194 public static int CSHullMaxVertices { get; private set; } 194 public static int CSHullMaxVertices { get; private set; }
195 public static float CSHullMaxSkinWidth { get; private set; } 195 public static float CSHullMaxSkinWidth { get; private set; }
196 public static float BHullMaxVerticesPerHull { get; private set; } // 100 196 public static float BHullMaxVerticesPerHull { get; private set; } // 100
197 public static float BHullMinClusters { get; private set; } // 2 197 public static float BHullMinClusters { get; private set; } // 2
198 public static float BHullCompacityWeight { get; private set; } // 0.1 198 public static float BHullCompacityWeight { get; private set; } // 0.1
199 public static float BHullVolumeWeight { get; private set; } // 0.0 199 public static float BHullVolumeWeight { get; private set; } // 0.0
200 public static float BHullConcavity { get; private set; } // 100 200 public static float BHullConcavity { get; private set; } // 100
201 public static bool BHullAddExtraDistPoints { get; private set; } // false 201 public static bool BHullAddExtraDistPoints { get; private set; } // false
202 public static bool BHullAddNeighboursDistPoints { get; private set; } // false 202 public static bool BHullAddNeighboursDistPoints { get; private set; } // false
203 public static bool BHullAddFacesPoints { get; private set; } // false 203 public static bool BHullAddFacesPoints { get; private set; } // false
204 public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false 204 public static bool BHullShouldAdjustCollisionMargin { get; private set; } // false
205 public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD 205 public static float WhichHACD { get; private set; } // zero if Bullet HACD, non-zero says VHACD
206 // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd 206 // Parameters for VHACD 2.0: http://code.google.com/p/v-hacd
207 // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1 207 // To enable, set both ShouldUseBulletHACD=true and WhichHACD=1
208 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html 208 // http://kmamou.blogspot.ca/2014/12/v-hacd-20-parameters-description.html
209 public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage 209 public static float VHACDresolution { get; private set; } // 100,000 max number of voxels generated during voxelization stage
210 public static float VHACDdepth { get; private set; } // 20 max number of clipping stages 210 public static float VHACDdepth { get; private set; } // 20 max number of clipping stages
211 public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity 211 public static float VHACDconcavity { get; private set; } // 0.0025 maximum concavity
212 public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane 212 public static float VHACDplaneDownsampling { get; private set; } // 4 granularity of search for best clipping plane
213 public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process 213 public static float VHACDconvexHullDownsampling { get; private set; } // 4 precision of hull gen process
214 public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes 214 public static float VHACDalpha { get; private set; } // 0.05 bias toward clipping along symmetry planes
215 public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis 215 public static float VHACDbeta { get; private set; } // 0.05 bias toward clipping along revolution axis
216 public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging 216 public static float VHACDgamma { get; private set; } // 0.00125 max concavity when merging
217 public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp 217 public static float VHACDpca { get; private set; } // 0 on/off normalizing mesh before decomp
218 public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based 218 public static float VHACDmode { get; private set; } // 0 0:voxel based, 1: tetrahedron based
219 public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull 219 public static float VHACDmaxNumVerticesPerCH { get; private set; } // 64 max triangles per convex hull
220 public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls 220 public static float VHACDminVolumePerCH { get; private set; } // 0.0001 sampling of generated convex hulls
221 221
222 // Linkset implementation parameters 222 // Linkset implementation parameters
223 public static float LinksetImplementation { get; private set; } 223 public static float LinksetImplementation { get; private set; }
@@ -579,7 +579,7 @@ public static class BSParam
579 (s,v) => { ContactProcessingThreshold = v;}, 579 (s,v) => { ContactProcessingThreshold = v;},
580 (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ), 580 (s,o) => { s.PE.SetContactProcessingThreshold(o.PhysBody, ContactProcessingThreshold); } ),
581 581
582 new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)", 582 new ParameterDefn<float>("TerrainImplementation", "Type of shape to use for terrain (0=heightmap, 1=mesh)",
583 (float)BSTerrainPhys.TerrainImplementation.Heightmap ), 583 (float)BSTerrainPhys.TerrainImplementation.Heightmap ),
584 new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" , 584 new ParameterDefn<int>("TerrainMeshMagnification", "Number of times the 256x256 heightmap is multiplied to create the terrain mesh" ,
585 2 ), 585 2 ),
@@ -631,31 +631,31 @@ public static class BSParam
631 2.0f ), 631 2.0f ),
632 new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar", 632 new ParameterDefn<float>("AvatarTerminalVelocity", "Terminal Velocity of falling avatar",
633 -54.0f ), 633 -54.0f ),
634 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions", 634 new ParameterDefn<float>("AvatarContactProcessingThreshold", "Distance from capsule to check for collisions",
635 0.1f ), 635 0.1f ),
636 new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines", 636 new ParameterDefn<float>("AvatarAddForcePushFactor", "BSCharacter.AddForce is multiplied by this and mass to be like other physics engines",
637 0.315f ), 637 0.315f ),
638 new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped", 638 new ParameterDefn<float>("AvatarStopZeroThreshold", "Movement velocity below which avatar is assumed to be stopped",
639 0.45f, 639 0.45f,
640 (s) => { return (float)AvatarStopZeroThreshold; }, 640 (s) => { return (float)AvatarStopZeroThreshold; },
641 (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ), 641 (s,v) => { AvatarStopZeroThreshold = v; AvatarStopZeroThresholdSquared = v * v; } ),
642 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground", 642 new ParameterDefn<float>("AvatarBelowGroundUpCorrectionMeters", "Meters to move avatar up if it seems to be below ground",
643 1.0f ), 643 1.0f ),
644 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.", 644 new ParameterDefn<int>("AvatarJumpFrames", "Number of frames to allow jump forces. Changes jump height.",
645 4 ), 645 4 ),
646 new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", 646 new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction",
647 0.999f ) , 647 0.999f ) ,
648 new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step", 648 new ParameterDefn<float>("AvatarStepAngle", "The angle (in radians) for a vertical surface to be considered a step",
649 0.3f ) , 649 0.3f ) ,
650 new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height", 650 new ParameterDefn<float>("AvatarStepGroundFudge", "Fudge factor subtracted from avatar base when comparing collision height",
651 0.1f ) , 651 0.1f ) ,
652 new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", 652 new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)",
653 2f ), 653 2f ),
654 new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", 654 new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step",
655 0f ), 655 0f ),
656 new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", 656 new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step",
657 0.8f ), 657 0.8f ),
658 new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", 658 new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs",
659 1 ), 659 1 ),
660 660
661 new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", 661 new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle",
@@ -699,131 +699,131 @@ public static class BSParam
699 new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect", 699 new ParameterDefn<bool>("VehicleEnableAngularBanking", "Turn on/off vehicle angular banking effect",
700 true ), 700 true ),
701 701
702 new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 702 new ParameterDefn<float>("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
703 0f, 703 0f,
704 (s) => { return MaxPersistantManifoldPoolSize; }, 704 (s) => { return MaxPersistantManifoldPoolSize; },
705 (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ), 705 (s,v) => { MaxPersistantManifoldPoolSize = v; s.UnmanagedParams[0].maxPersistantManifoldPoolSize = v; } ),
706 new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", 706 new ParameterDefn<float>("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)",
707 0f, 707 0f,
708 (s) => { return MaxCollisionAlgorithmPoolSize; }, 708 (s) => { return MaxCollisionAlgorithmPoolSize; },
709 (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ), 709 (s,v) => { MaxCollisionAlgorithmPoolSize = v; s.UnmanagedParams[0].maxCollisionAlgorithmPoolSize = v; } ),
710 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count", 710 new ParameterDefn<bool>("ShouldDisableContactPoolDynamicAllocation", "Enable to allow large changes in object count",
711 false, 711 false,
712 (s) => { return ShouldDisableContactPoolDynamicAllocation; }, 712 (s) => { return ShouldDisableContactPoolDynamicAllocation; },
713 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v; 713 (s,v) => { ShouldDisableContactPoolDynamicAllocation = v;
714 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ), 714 s.UnmanagedParams[0].shouldDisableContactPoolDynamicAllocation = NumericBool(v); } ),
715 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step", 715 new ParameterDefn<bool>("ShouldForceUpdateAllAabbs", "Enable to recomputer AABBs every simulator step",
716 false, 716 false,
717 (s) => { return ShouldForceUpdateAllAabbs; }, 717 (s) => { return ShouldForceUpdateAllAabbs; },
718 (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ), 718 (s,v) => { ShouldForceUpdateAllAabbs = v; s.UnmanagedParams[0].shouldForceUpdateAllAabbs = NumericBool(v); } ),
719 new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", 719 new ParameterDefn<bool>("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction",
720 true, 720 true,
721 (s) => { return ShouldRandomizeSolverOrder; }, 721 (s) => { return ShouldRandomizeSolverOrder; },
722 (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ), 722 (s,v) => { ShouldRandomizeSolverOrder = v; s.UnmanagedParams[0].shouldRandomizeSolverOrder = NumericBool(v); } ),
723 new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands", 723 new ParameterDefn<bool>("ShouldSplitSimulationIslands", "Enable splitting active object scanning islands",
724 true, 724 true,
725 (s) => { return ShouldSplitSimulationIslands; }, 725 (s) => { return ShouldSplitSimulationIslands; },
726 (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ), 726 (s,v) => { ShouldSplitSimulationIslands = v; s.UnmanagedParams[0].shouldSplitSimulationIslands = NumericBool(v); } ),
727 new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching", 727 new ParameterDefn<bool>("ShouldEnableFrictionCaching", "Enable friction computation caching",
728 true, 728 true,
729 (s) => { return ShouldEnableFrictionCaching; }, 729 (s) => { return ShouldEnableFrictionCaching; },
730 (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ), 730 (s,v) => { ShouldEnableFrictionCaching = v; s.UnmanagedParams[0].shouldEnableFrictionCaching = NumericBool(v); } ),
731 new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)", 731 new ParameterDefn<float>("NumberOfSolverIterations", "Number of internal iterations (0 means default)",
732 0f, // zero says use Bullet default 732 0f, // zero says use Bullet default
733 (s) => { return NumberOfSolverIterations; }, 733 (s) => { return NumberOfSolverIterations; },
734 (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ), 734 (s,v) => { NumberOfSolverIterations = v; s.UnmanagedParams[0].numberOfSolverIterations = v; } ),
735 new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.", 735 new ParameterDefn<bool>("UseSingleSidedMeshes", "Whether to compute collisions based on single sided meshes.",
736 true, 736 true,
737 (s) => { return UseSingleSidedMeshes; }, 737 (s) => { return UseSingleSidedMeshes; },
738 (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ), 738 (s,v) => { UseSingleSidedMeshes = v; s.UnmanagedParams[0].useSingleSidedMeshes = NumericBool(v); } ),
739 new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))", 739 new ParameterDefn<float>("GlobalContactBreakingThreshold", "Amount of shape radius before breaking a collision contact (0 says Bullet default (0.2))",
740 0f, 740 0f,
741 (s) => { return GlobalContactBreakingThreshold; }, 741 (s) => { return GlobalContactBreakingThreshold; },
742 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), 742 (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ),
743 new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", 743 new ParameterDefn<float>("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics",
744 0f, 744 0f,
745 (s) => { return PhysicsUnmanLoggingFrames; }, 745 (s) => { return PhysicsUnmanLoggingFrames; },
746 (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), 746 (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ),
747 747
748 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", 748 new ParameterDefn<int>("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy",
749 7 ), 749 7 ),
750 new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes", 750 new ParameterDefn<int>("CSHullMaxDepthSplitForSimpleShapes", "CS impl: max depth setting for simple prim shapes",
751 2 ), 751 2 ),
752 new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)", 752 new ParameterDefn<float>("CSHullConcavityThresholdPercent", "CS impl: concavity threshold percent (0-20)",
753 5f ), 753 5f ),
754 new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)", 754 new ParameterDefn<float>("CSHullVolumeConservationThresholdPercent", "percent volume conservation to collapse hulls (0-30)",
755 5f ), 755 5f ),
756 new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.", 756 new ParameterDefn<int>("CSHullMaxVertices", "CS impl: maximum number of vertices in output hulls. Keep < 50.",
757 32 ), 757 32 ),
758 new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.", 758 new ParameterDefn<float>("CSHullMaxSkinWidth", "CS impl: skin width to apply to output hulls.",
759 0f ), 759 0f ),
760 760
761 new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull", 761 new ParameterDefn<float>("BHullMaxVerticesPerHull", "Bullet impl: max number of vertices per created hull",
762 200f ), 762 200f ),
763 new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh", 763 new ParameterDefn<float>("BHullMinClusters", "Bullet impl: minimum number of hulls to create per mesh",
764 10f ), 764 10f ),
765 new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls", 765 new ParameterDefn<float>("BHullCompacityWeight", "Bullet impl: weight factor for how compact to make hulls",
766 20f ), 766 20f ),
767 new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull", 767 new ParameterDefn<float>("BHullVolumeWeight", "Bullet impl: weight factor for volume in created hull",
768 0.1f ), 768 0.1f ),
769 new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be", 769 new ParameterDefn<float>("BHullConcavity", "Bullet impl: weight factor for how convex a created hull can be",
770 10f ), 770 10f ),
771 new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors", 771 new ParameterDefn<bool>("BHullAddExtraDistPoints", "Bullet impl: whether to add extra vertices for long distance vectors",
772 true ), 772 true ),
773 new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls", 773 new ParameterDefn<bool>("BHullAddNeighboursDistPoints", "Bullet impl: whether to add extra vertices between neighbor hulls",
774 true ), 774 true ),
775 new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces", 775 new ParameterDefn<bool>("BHullAddFacesPoints", "Bullet impl: whether to add extra vertices to break up hull faces",
776 true ), 776 true ),
777 new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin", 777 new ParameterDefn<bool>("BHullShouldAdjustCollisionMargin", "Bullet impl: whether to shrink resulting hulls to account for collision margin",
778 false ), 778 false ),
779 779
780 new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD", 780 new ParameterDefn<float>("WhichHACD", "zero if Bullet HACD, non-zero says VHACD",
781 0f ), 781 0f ),
782 new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage", 782 new ParameterDefn<float>("VHACDresolution", "max number of voxels generated during voxelization stage",
783 100000f ), 783 100000f ),
784 new ParameterDefn<float>("VHACDdepth", "max number of clipping stages", 784 new ParameterDefn<float>("VHACDdepth", "max number of clipping stages",
785 20f ), 785 20f ),
786 new ParameterDefn<float>("VHACDconcavity", "maximum concavity", 786 new ParameterDefn<float>("VHACDconcavity", "maximum concavity",
787 0.0025f ), 787 0.0025f ),
788 new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane", 788 new ParameterDefn<float>("VHACDplaneDownsampling", "granularity of search for best clipping plane",
789 4f ), 789 4f ),
790 new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process", 790 new ParameterDefn<float>("VHACDconvexHullDownsampling", "precision of hull gen process",
791 4f ), 791 4f ),
792 new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes", 792 new ParameterDefn<float>("VHACDalpha", "bias toward clipping along symmetry planes",
793 0.05f ), 793 0.05f ),
794 new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis", 794 new ParameterDefn<float>("VHACDbeta", "bias toward clipping along revolution axis",
795 0.05f ), 795 0.05f ),
796 new ParameterDefn<float>("VHACDgamma", "max concavity when merging", 796 new ParameterDefn<float>("VHACDgamma", "max concavity when merging",
797 0.00125f ), 797 0.00125f ),
798 new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp", 798 new ParameterDefn<float>("VHACDpca", "on/off normalizing mesh before decomp",
799 0f ), 799 0f ),
800 new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based", 800 new ParameterDefn<float>("VHACDmode", "0:voxel based, 1: tetrahedron based",
801 0f ), 801 0f ),
802 new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull", 802 new ParameterDefn<float>("VHACDmaxNumVerticesPerCH", "max triangles per convex hull",
803 64f ), 803 64f ),
804 new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls", 804 new ParameterDefn<float>("VHACDminVolumePerCH", "sampling of generated convex hulls",
805 0.0001f ), 805 0.0001f ),
806 806
807 new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", 807 new ParameterDefn<float>("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)",
808 (float)BSLinkset.LinksetImplementation.Compound ), 808 (float)BSLinkset.LinksetImplementation.Compound ),
809 new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same", 809 new ParameterDefn<bool>("LinksetOffsetCenterOfMass", "If 'true', compute linkset center-of-mass and offset linkset position to account for same",
810 true ), 810 true ),
811 new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", 811 new ParameterDefn<bool>("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.",
812 false ), 812 false ),
813 new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints", 813 new ParameterDefn<bool>("LinkConstraintEnableTransMotor", "Whether to enable translational motor on linkset constraints",
814 true ), 814 true ),
815 new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints", 815 new ParameterDefn<float>("LinkConstraintTransMotorMaxVel", "Maximum velocity to be applied by translational motor in linkset constraints",
816 5.0f ), 816 5.0f ),
817 new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints", 817 new ParameterDefn<float>("LinkConstraintTransMotorMaxForce", "Maximum force to be applied by translational motor in linkset constraints",
818 0.1f ), 818 0.1f ),
819 new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1", 819 new ParameterDefn<float>("LinkConstraintCFM", "Amount constraint can be violated. 0=no violation, 1=infinite. Default=0.1",
820 0.1f ), 820 0.1f ),
821 new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2", 821 new ParameterDefn<float>("LinkConstraintERP", "Amount constraint is corrected each tick. 0=none, 1=all. Default = 0.2",
822 0.1f ), 822 0.1f ),
823 new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)", 823 new ParameterDefn<float>("LinkConstraintSolverIterations", "Number of solver iterations when computing constraint. (0 = Bullet default)",
824 40 ), 824 40 ),
825 825
826 new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging", 826 new ParameterDefn<float>("DebugNumber", "A console setable number sometimes used for debugging",
827 1.0f ), 827 1.0f ),
828 828
829 new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)", 829 new ParameterDefn<int>("PhysicsMetricFrames", "Frames between outputting detailed phys metrics. (0 is off)",
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
index a846869..6aa24d5 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs
@@ -317,10 +317,10 @@ public abstract class BSPhysObject : PhysicsActor
317 317
318 public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; } 318 public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; }
319 319
320 public override bool PIDActive 320 public override bool PIDActive
321 { 321 {
322 get { return MoveToTargetActive; } 322 get { return MoveToTargetActive; }
323 set { MoveToTargetActive = value; } 323 set { MoveToTargetActive = value; }
324 } 324 }
325 325
326 public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } } 326 public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } }
@@ -572,7 +572,7 @@ public abstract class BSPhysObject : PhysicsActor
572 newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal); 572 newContact.RelativeSpeed = -OMV.Vector3.Dot(relvel, contactNormal);
573 // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}", 573 // DetailLog("{0},{1}.Collision.AddCollider,vel={2},contee.vel={3},relvel={4},relspeed={5}",
574 // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed); 574 // LocalID, TypeName, RawVelocity, (collidee == null ? OMV.Vector3.Zero : collidee.RawVelocity), relvel, newContact.RelativeSpeed);
575 575
576 lock (PhysScene.CollisionLock) 576 lock (PhysScene.CollisionLock)
577 { 577 {
578 CollisionCollection.AddCollider(collideeLocalID, newContact); 578 CollisionCollection.AddCollider(collideeLocalID, newContact);
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
index db2b9db..b153761 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs
@@ -1144,14 +1144,14 @@ public class BSPrim : BSPhysObject
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 public override bool PIDActive 1147 public override bool PIDActive
1148 { 1148 {
1149 get 1149 get
1150 { 1150 {
1151 return MoveToTargetActive; 1151 return MoveToTargetActive;
1152 } 1152 }
1153 1153
1154 set 1154 set
1155 { 1155 {
1156 MoveToTargetActive = value; 1156 MoveToTargetActive = value;
1157 1157
@@ -1179,13 +1179,13 @@ public class BSPrim : BSPhysObject
1179 // if the actor exists, tell it to refresh its values. 1179 // if the actor exists, tell it to refresh its values.
1180 actor.Refresh(); 1180 actor.Refresh();
1181 } 1181 }
1182 1182
1183 } 1183 }
1184 } 1184 }
1185 // Used for llSetHoverHeight and maybe vehicle height 1185 // Used for llSetHoverHeight and maybe vehicle height
1186 // Hover Height will override MoveTo target's Z 1186 // Hover Height will override MoveTo target's Z
1187 public override bool PIDHoverActive { 1187 public override bool PIDHoverActive {
1188 get 1188 get
1189 { 1189 {
1190 return base.HoverActive; 1190 return base.HoverActive;
1191 } 1191 }
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
index ee57f0c..7ff0a07 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
@@ -351,12 +351,12 @@ namespace OpenSim.Region.PhysicsModule.BulletS
351 if (BSParam.UseSeparatePhysicsThread) 351 if (BSParam.UseSeparatePhysicsThread)
352 { 352 {
353 // The physics simulation should happen independently of the heartbeat loop 353 // The physics simulation should happen independently of the heartbeat loop
354 m_physicsThread 354 m_physicsThread
355 = WorkManager.StartThread( 355 = WorkManager.StartThread(
356 BulletSPluginPhysicsThread, 356 BulletSPluginPhysicsThread,
357 string.Format("{0} ({1})", BulletEngineName, RegionName), 357 string.Format("{0} ({1})", BulletEngineName, RegionName),
358 ThreadPriority.Normal, 358 ThreadPriority.Normal,
359 true, 359 true,
360 true); 360 true);
361 } 361 }
362 } 362 }
diff --git a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
index 2ba3c5a..ab5d4849 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/ExtendedPhysics.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
136 136
137 return; 137 return;
138 } 138 }
139 139
140 // Register as LSL functions all the [ScriptInvocation] marked methods. 140 // Register as LSL functions all the [ScriptInvocation] marked methods.
141 Comms.RegisterScriptInvocations(this); 141 Comms.RegisterScriptInvocations(this);
142 Comms.RegisterConstants(this); 142 Comms.RegisterConstants(this);
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
index 6ed7af1..91ce468 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")] 9[assembly: AssemblyTitle("OpenSim.Region.Physics.BulletSPlugin")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
index 109e19c..3e8c1cd 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/BulletSimTestsUtil.cs
@@ -80,7 +80,7 @@ public static class BulletSimTestsUtil
80 } 80 }
81 81
82 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); 82 Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
83 83
84 RegionInfo info = new RegionInfo(); 84 RegionInfo info = new RegionInfo();
85 info.RegionName = "BSTestRegion"; 85 info.RegionName = "BSTestRegion";
86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; 86 info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize;
diff --git a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
index c0cf19a..c2be568 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/Tests/HullCreation.cs
@@ -146,7 +146,7 @@ public class HullCreation : OpenSimTestCase
146 uint torusLocalID = 125; 146 uint torusLocalID = 125;
147 PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID); 147 PhysicsScene.AddPrimShape("testTorus", pbs, pos, size, rot, isPhys, torusLocalID);
148 BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID]; 148 BSPrim primTypeTorus = (BSPrim)PhysicsScene.PhysObjects[torusLocalID];
149 149
150 // The actual prim shape creation happens at taint time 150 // The actual prim shape creation happens at taint time
151 PhysicsScene.ProcessTaints(); 151 PhysicsScene.ProcessTaints();
152 152
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
index 3d81439..bd1f75e 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/CTri.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -246,13 +246,13 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
246 } 246 }
247 247
248 private static float DistToPt(float3 p, float4 plane) 248 private static float DistToPt(float3 p, float4 plane)
249 { 249 {
250 float x = p.x; 250 float x = p.x;
251 float y = p.y; 251 float y = p.y;
252 float z = p.z; 252 float z = p.z;
253 float d = x*plane.x + y*plane.y + z*plane.z + plane.w; 253 float d = x*plane.x + y*plane.y + z*plane.z + plane.w;
254 return d; 254 return d;
255 } 255 }
256 256
257 private static void intersect(float3 p1, float3 p2, ref float3 split, float4 plane) 257 private static void intersect(float3 p1, float3 p2, ref float3 split, float4 plane)
258 { 258 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
index 6a98535..0d22d71 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Concavity.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
index 4480036..810e95d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexBuilder.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
index e6dc98a..a382f9d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexDecomposition.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
index 09129ed..300fed3 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/ConvexResult.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
index 7d342d1..73fb252 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullClasses.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
index 66457ac..6e73fd5 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullTriangle.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
index 72f2d6d..cf7161a 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/HullUtils.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -763,7 +763,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
763 } 763 }
764 else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0)) 764 else if ((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == (0))
765 { 765 {
766 // both endpoints coplanar 766 // both endpoints coplanar
767 // must check a 3rd point to see if UNDER 767 // must check a 3rd point to see if UNDER
768 int e2 = e1 + 1; 768 int e2 = e1 + 1;
769 if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane) 769 if (e2 >= convex.edges.Count || convex.edges[e2].p != currentplane)
@@ -792,7 +792,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
792 } 792 }
793 else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2)) 793 else if (vertflag[edge0.v].planetest == (1) && vertflag[edge1.v].planetest == (2))
794 { 794 {
795 // first is under 2nd is over 795 // first is under 2nd is over
796 796
797 edgeflag[e0].undermap = (short)under_edge_count; 797 edgeflag[e0].undermap = (short)under_edge_count;
798 tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap; 798 tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap;
@@ -815,7 +815,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
815 vout = vertcountunder++; 815 vout = vertcountunder++;
816 } 816 }
817 under_edge_count++; 817 under_edge_count++;
818 /// hmmm something to think about: i might be able to output this edge regarless of 818 /// hmmm something to think about: i might be able to output this edge regarless of
819 // wheter or not we know v-in yet. ok i;ll try this now: 819 // wheter or not we know v-in yet. ok i;ll try this now:
820 tmpunderedges[under_edge_count].v = (byte)vout; 820 tmpunderedges[under_edge_count].v = (byte)vout;
821 tmpunderedges[under_edge_count].p = (byte)underplanescount; 821 tmpunderedges[under_edge_count].p = (byte)underplanescount;
@@ -834,7 +834,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
834 } 834 }
835 else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2)) 835 else if (vertflag[edge0.v].planetest == (0) && vertflag[edge1.v].planetest == (2))
836 { 836 {
837 // first is coplanar 2nd is over 837 // first is coplanar 2nd is over
838 838
839 edgeflag[e0].undermap = -1; 839 edgeflag[e0].undermap = -1;
840 vout = vertflag[edge0.v].undermap; 840 vout = vertflag[edge0.v].undermap;
@@ -858,7 +858,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
858 } 858 }
859 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1)) 859 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (1))
860 { 860 {
861 // first is over next is under 861 // first is over next is under
862 // new vertex!!! 862 // new vertex!!!
863 Debug.Assert(vin == -1); 863 Debug.Assert(vin == -1);
864 if (e0 < edge0.ea) 864 if (e0 < edge0.ea)
@@ -901,7 +901,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
901 } 901 }
902 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0)) 902 else if (vertflag[edge0.v].planetest == (2) && vertflag[edge1.v].planetest == (0))
903 { 903 {
904 // first is over next is coplanar 904 // first is over next is coplanar
905 905
906 edgeflag[e0].undermap = -1; 906 edgeflag[e0].undermap = -1;
907 vin = vertflag[edge1.v].undermap; 907 vin = vertflag[edge1.v].undermap;
@@ -1543,7 +1543,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
1543 public static bool ComputeHull(List<float3> vertices, out List<int> indices) 1543 public static bool ComputeHull(List<float3> vertices, out List<int> indices)
1544 { 1544 {
1545 List<HullTriangle> tris = new List<HullTriangle>(); 1545 List<HullTriangle> tris = new List<HullTriangle>();
1546 1546
1547 bool ret = calchull(vertices, out indices, 0, tris); 1547 bool ret = calchull(vertices, out indices, 0, tris);
1548 if (ret == false) 1548 if (ret == false)
1549 { 1549 {
@@ -1636,7 +1636,7 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
1636 addPoint(ref vcount, vertices, x2, y2, z2); 1636 addPoint(ref vcount, vertices, x2, y2, z2);
1637 addPoint(ref vcount, vertices, x1, y2, z2); 1637 addPoint(ref vcount, vertices, x1, y2, z2);
1638 1638
1639 return true; // return cube 1639 return true; // return cube
1640 } 1640 }
1641 else 1641 else
1642 { 1642 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
index f58cad6..0f10e5f 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Plane.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
index 8f08ddf..5915c29 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/PlaneTri.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index e9ff26e..9b418d6 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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("ConvexDecompositionDotNet")] 8[assembly: AssemblyTitle("ConvexDecompositionDotNet")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,11 +25,11 @@ using System.Runtime.InteropServices;
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 Build and Revision Numbers 32// You can specify all the values or you can default the Build and Revision Numbers
33// by using the '*' as shown below: 33// by using the '*' as shown below:
34// [assembly: AssemblyVersion("1.0.*")] 34// [assembly: AssemblyVersion("1.0.*")]
35[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)] 35[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)]
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
index 2d72117..571677d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Quaternion.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -126,9 +126,9 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
126 } 126 }
127 127
128 public static Quaternion operator *(Quaternion a, float b) 128 public static Quaternion operator *(Quaternion a, float b)
129 { 129 {
130 return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b); 130 return new Quaternion(a.x *b, a.y *b, a.z *b, a.w *b);
131 } 131 }
132 132
133 public static Quaternion normalize(Quaternion a) 133 public static Quaternion normalize(Quaternion a)
134 { 134 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
index cc5f99c..d8c10c7 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/SplitPlane.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
index da2255e..915bec6 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/VertexLookup.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
index 2a58ec4..c2c8940 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float2.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
index 64a9ef8..1ea003b 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
index 266ed0b..4b6cd5d 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float3x3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
index 058934d..1f2ab02 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
index 58f4f58..85a8cf1 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/float4x4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -127,88 +127,88 @@ namespace OpenSim.Region.PhysicsModules.ConvexDecompositionDotNet
127 } 127 }
128 128
129 public static float4x4 Inverse(float4x4 m) 129 public static float4x4 Inverse(float4x4 m)
130 { 130 {
131 float4x4 d = new float4x4(); 131 float4x4 d = new float4x4();
132 //float dst = d.x.x; 132 //float dst = d.x.x;
133 float[] tmp = new float[12]; // temp array for pairs 133 float[] tmp = new float[12]; // temp array for pairs
134 float[] src = new float[16]; // array of transpose source matrix 134 float[] src = new float[16]; // array of transpose source matrix
135 float det; // determinant 135 float det; // determinant
136 // transpose matrix 136 // transpose matrix
137 for (int i = 0; i < 4; i++) 137 for (int i = 0; i < 4; i++)
138 { 138 {
139 src[i] = m[i].x; 139 src[i] = m[i].x;
140 src[i + 4] = m[i].y; 140 src[i + 4] = m[i].y;
141 src[i + 8] = m[i].z; 141 src[i + 8] = m[i].z;
142 src[i + 12] = m[i].w; 142 src[i + 12] = m[i].w;
143 } 143 }
144 // calculate pairs for first 8 elements (cofactors) 144 // calculate pairs for first 8 elements (cofactors)
145 tmp[0] = src[10] * src[15]; 145 tmp[0] = src[10] * src[15];
146 tmp[1] = src[11] * src[14]; 146 tmp[1] = src[11] * src[14];
147 tmp[2] = src[9] * src[15]; 147 tmp[2] = src[9] * src[15];
148 tmp[3] = src[11] * src[13]; 148 tmp[3] = src[11] * src[13];
149 tmp[4] = src[9] * src[14]; 149 tmp[4] = src[9] * src[14];
150 tmp[5] = src[10] * src[13]; 150 tmp[5] = src[10] * src[13];
151 tmp[6] = src[8] * src[15]; 151 tmp[6] = src[8] * src[15];
152 tmp[7] = src[11] * src[12]; 152 tmp[7] = src[11] * src[12];
153 tmp[8] = src[8] * src[14]; 153 tmp[8] = src[8] * src[14];
154 tmp[9] = src[10] * src[12]; 154 tmp[9] = src[10] * src[12];
155 tmp[10] = src[8] * src[13]; 155 tmp[10] = src[8] * src[13];
156 tmp[11] = src[9] * src[12]; 156 tmp[11] = src[9] * src[12];
157 // calculate first 8 elements (cofactors) 157 // calculate first 8 elements (cofactors)
158 d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7]; 158 d.x.x = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7];
159 d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7]; 159 d.x.x -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7];
160 d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7]; 160 d.x.y = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7];
161 d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7]; 161 d.x.y -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7];
162 d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7]; 162 d.x.z = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7];
163 d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7]; 163 d.x.z -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7];
164 d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6]; 164 d.x.w = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6];
165 d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6]; 165 d.x.w -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6];
166 d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3]; 166 d.y.x = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3];
167 d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3]; 167 d.y.x -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3];
168 d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3]; 168 d.y.y = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3];
169 d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3]; 169 d.y.y -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3];
170 d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3]; 170 d.y.z = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3];
171 d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3]; 171 d.y.z -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3];
172 d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2]; 172 d.y.w = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2];
173 d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2]; 173 d.y.w -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2];
174 // calculate pairs for second 8 elements (cofactors) 174 // calculate pairs for second 8 elements (cofactors)
175 tmp[0] = src[2]*src[7]; 175 tmp[0] = src[2]*src[7];
176 tmp[1] = src[3]*src[6]; 176 tmp[1] = src[3]*src[6];
177 tmp[2] = src[1]*src[7]; 177 tmp[2] = src[1]*src[7];
178 tmp[3] = src[3]*src[5]; 178 tmp[3] = src[3]*src[5];
179 tmp[4] = src[1]*src[6]; 179 tmp[4] = src[1]*src[6];
180 tmp[5] = src[2]*src[5]; 180 tmp[5] = src[2]*src[5];
181 tmp[6] = src[0]*src[7]; 181 tmp[6] = src[0]*src[7];
182 tmp[7] = src[3]*src[4]; 182 tmp[7] = src[3]*src[4];
183 tmp[8] = src[0]*src[6]; 183 tmp[8] = src[0]*src[6];
184 tmp[9] = src[2]*src[4]; 184 tmp[9] = src[2]*src[4];
185 tmp[10] = src[0]*src[5]; 185 tmp[10] = src[0]*src[5];
186 tmp[11] = src[1]*src[4]; 186 tmp[11] = src[1]*src[4];
187 // calculate second 8 elements (cofactors) 187 // calculate second 8 elements (cofactors)
188 d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15]; 188 d.z.x = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15];
189 d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15]; 189 d.z.x -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15];
190 d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15]; 190 d.z.y = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15];
191 d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15]; 191 d.z.y -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15];
192 d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15]; 192 d.z.z = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15];
193 d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15]; 193 d.z.z -= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15];
194 d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14]; 194 d.z.w = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14];
195 d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14]; 195 d.z.w-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14];
196 d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9]; 196 d.w.x = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9];
197 d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10]; 197 d.w.x-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10];
198 d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10]; 198 d.w.y = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10];
199 d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8]; 199 d.w.y-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8];
200 d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8]; 200 d.w.z = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8];
201 d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9]; 201 d.w.z-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9];
202 d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9]; 202 d.w.w = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9];
203 d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8]; 203 d.w.w-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8];
204 // calculate determinant 204 // calculate determinant
205 det = src[0] * d.x.x + src[1] * d.x.y + src[2] * d.x.z + src[3] * d.x.w; 205 det = src[0] * d.x.x + src[1] * d.x.y + src[2] * d.x.z + src[3] * d.x.w;
206 // calculate matrix inverse 206 // calculate matrix inverse
207 det = 1/det; 207 det = 1/det;
208 for (int j = 0; j < 4; j++) 208 for (int j = 0; j < 4; j++)
209 d[j] *= det; 209 d[j] *= det;
210 return d; 210 return d;
211 } 211 }
212 212
213 public static float4x4 MatrixRigidInverse(float4x4 m) 213 public static float4x4 MatrixRigidInverse(float4x4 m)
214 { 214 {
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
index b3d4ecb..e7bb6e7 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int3.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
index 41e0912..9950be2 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/int4.cs
@@ -1,21 +1,21 @@
1/* The MIT License 1/* The MIT License
2 * 2 *
3 * Copyright (c) 2010 Intel Corporation. 3 * Copyright (c) 2010 Intel Corporation.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Based on the convexdecomposition library from 6 * Based on the convexdecomposition library from
7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax. 7 * <http://codesuppository.googlecode.com> by John W. Ratcliff and Stan Melax.
8 * 8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal 10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights 11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is 13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions: 14 * furnished to do so, subject to the following conditions:
15 * 15 *
16 * The above copyright notice and this permission notice shall be included in 16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software. 17 * all copies or substantial portions of the Software.
18 * 18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
index e63ad01..42ba37e 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Mesh.cs
@@ -102,8 +102,8 @@ namespace OpenSim.Region.PhysicsModule.Meshing
102 if ((triangle.v1.X == triangle.v2.X && triangle.v1.Y == triangle.v2.Y && triangle.v1.Z == triangle.v2.Z) 102 if ((triangle.v1.X == triangle.v2.X && triangle.v1.Y == triangle.v2.Y && triangle.v1.Z == triangle.v2.Z)
103 || (triangle.v1.X == triangle.v3.X && triangle.v1.Y == triangle.v3.Y && triangle.v1.Z == triangle.v3.Z) 103 || (triangle.v1.X == triangle.v3.X && triangle.v1.Y == triangle.v3.Y && triangle.v1.Z == triangle.v3.Z)
104 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == triangle.v3.Z) 104 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == triangle.v3.Z)
105 ) 105 )
106 { 106 {
107 return; 107 return;
108 } 108 }
109 109
@@ -259,7 +259,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
259 public void getVertexListAsPtrToFloatArray(out IntPtr vertices, out int vertexStride, out int vertexCount) 259 public void getVertexListAsPtrToFloatArray(out IntPtr vertices, out int vertexStride, out int vertexCount)
260 { 260 {
261 // A vertex is 3 floats 261 // A vertex is 3 floats
262 262
263 vertexStride = 3 * sizeof(float); 263 vertexStride = 3 * sizeof(float);
264 264
265 // If there isn't an unmanaged array allocated yet, do it now 265 // If there isn't an unmanaged array allocated yet, do it now
@@ -299,7 +299,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
299 { 299 {
300 if (m_pinnedIndex.IsAllocated) 300 if (m_pinnedIndex.IsAllocated)
301 return (int[])(m_pinnedIndex.Target); 301 return (int[])(m_pinnedIndex.Target);
302 302
303 int[] result = getIndexListAsInt(); 303 int[] result = getIndexListAsInt();
304 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned); 304 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned);
305 // Inform the garbage collector of this unmanaged allocation so it can schedule 305 // Inform the garbage collector of this unmanaged allocation so it can schedule
@@ -357,7 +357,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
357 { 357 {
358 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 358 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
359 throw new NotSupportedException("Attempt to Append to a pinned Mesh"); 359 throw new NotSupportedException("Attempt to Append to a pinned Mesh");
360 360
361 if (!(newMesh is Mesh)) 361 if (!(newMesh is Mesh))
362 return; 362 return;
363 363
@@ -370,7 +370,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
370 { 370 {
371 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 371 if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
372 throw new NotSupportedException("Attempt to TransformLinear a pinned Mesh"); 372 throw new NotSupportedException("Attempt to TransformLinear a pinned Mesh");
373 373
374 foreach (Vertex v in m_vertices.Keys) 374 foreach (Vertex v in m_vertices.Keys)
375 { 375 {
376 if (v == null) 376 if (v == null)
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
index 0d22e96..4f95554 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
@@ -247,13 +247,13 @@ namespace OpenSim.Region.PhysicsModule.Meshing
247 private void AddSubMesh(OSDMap subMeshData, Vector3 size, List<Coord> coords, List<Face> faces) 247 private void AddSubMesh(OSDMap subMeshData, Vector3 size, List<Coord> coords, List<Face> faces)
248 { 248 {
249 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap)); 249 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap));
250 250
251 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level 251 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level
252 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no 252 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no
253 // geometry for this submesh. 253 // geometry for this submesh.
254 if (subMeshData.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshData["NoGeometry"])) 254 if (subMeshData.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshData["NoGeometry"]))
255 return; 255 return;
256 256
257 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshData["PositionDomain"])["Max"].AsVector3(); 257 OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshData["PositionDomain"])["Max"].AsVector3();
258 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshData["PositionDomain"])["Min"].AsVector3(); 258 OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshData["PositionDomain"])["Min"].AsVector3();
259 ushort faceIndexOffset = (ushort)coords.Count; 259 ushort faceIndexOffset = (ushort)coords.Count;
@@ -264,15 +264,15 @@ namespace OpenSim.Region.PhysicsModule.Meshing
264 ushort uX = Utils.BytesToUInt16(posBytes, i); 264 ushort uX = Utils.BytesToUInt16(posBytes, i);
265 ushort uY = Utils.BytesToUInt16(posBytes, i + 2); 265 ushort uY = Utils.BytesToUInt16(posBytes, i + 2);
266 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4); 266 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4);
267 267
268 Coord c = new Coord( 268 Coord c = new Coord(
269 Utils.UInt16ToFloat(uX, posMin.X, posMax.X) * size.X, 269 Utils.UInt16ToFloat(uX, posMin.X, posMax.X) * size.X,
270 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y) * size.Y, 270 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y) * size.Y,
271 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z) * size.Z); 271 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z) * size.Z);
272 272
273 coords.Add(c); 273 coords.Add(c);
274 } 274 }
275 275
276 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary(); 276 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary();
277 for (int i = 0; i < triangleBytes.Length; i += 6) 277 for (int i = 0; i < triangleBytes.Length; i += 6)
278 { 278 {
@@ -436,9 +436,9 @@ namespace OpenSim.Region.PhysicsModule.Meshing
436 int convexSize = convexBlock["size"].AsInteger(); 436 int convexSize = convexBlock["size"].AsInteger();
437 437
438 byte[] convexBytes = new byte[convexSize]; 438 byte[] convexBytes = new byte[convexSize];
439 439
440 System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize); 440 System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize);
441 441
442 try 442 try
443 { 443 {
444 convexBlockOsd = DecompressOsd(convexBytes); 444 convexBlockOsd = DecompressOsd(convexBytes);
@@ -449,7 +449,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
449 //return false; 449 //return false;
450 } 450 }
451 } 451 }
452 452
453 if (convexBlockOsd != null && convexBlockOsd is OSDMap) 453 if (convexBlockOsd != null && convexBlockOsd is OSDMap)
454 { 454 {
455 convexBlock = convexBlockOsd as OSDMap; 455 convexBlock = convexBlockOsd as OSDMap;
@@ -762,7 +762,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
762 { 762 {
763 PrimMesh primMesh; 763 PrimMesh primMesh;
764 coords = new List<Coord>(); 764 coords = new List<Coord>();
765 faces = new List<Face>(); 765 faces = new List<Face>();
766 766
767 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; 767 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
768 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 768 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
@@ -994,7 +994,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
994 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh) 994 if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
995 { 995 {
996#if SPAM 996#if SPAM
997 m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " + 997 m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
998 minSizeForComplexMesh.ToString() + " - creating simple bounding box"); 998 minSizeForComplexMesh.ToString() + " - creating simple bounding box");
999#endif 999#endif
1000 mesh = CreateBoundingBoxMesh(mesh); 1000 mesh = CreateBoundingBoxMesh(mesh);
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
index 4049ee1..fd2b1ea 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/PrimMesher.cs
@@ -445,7 +445,7 @@ namespace PrimMesher
445 new Angle(1.0f, 1.0f, 0.0f) 445 new Angle(1.0f, 1.0f, 0.0f)
446 }; 446 };
447 447
448 private static Coord[] normals4 = 448 private static Coord[] normals4 =
449 { 449 {
450 new Coord(0.5f, 0.5f, 0.0f).Normalize(), 450 new Coord(0.5f, 0.5f, 0.0f).Normalize(),
451 new Coord(-0.5f, 0.5f, 0.0f).Normalize(), 451 new Coord(-0.5f, 0.5f, 0.0f).Normalize(),
@@ -2066,7 +2066,7 @@ namespace PrimMesher
2066 /// DEPRICATED - use Extrude(PathType.Linear) instead 2066 /// DEPRICATED - use Extrude(PathType.Linear) instead
2067 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism. 2067 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism.
2068 /// </summary> 2068 /// </summary>
2069 /// 2069 ///
2070 public void ExtrudeLinear() 2070 public void ExtrudeLinear()
2071 { 2071 {
2072 this.Extrude(PathType.Linear); 2072 this.Extrude(PathType.Linear);
@@ -2077,7 +2077,7 @@ namespace PrimMesher
2077 /// DEPRICATED - use Extrude(PathType.Circular) instead 2077 /// DEPRICATED - use Extrude(PathType.Circular) instead
2078 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring. 2078 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring.
2079 /// </summary> 2079 /// </summary>
2080 /// 2080 ///
2081 public void ExtrudeCircular() 2081 public void ExtrudeCircular()
2082 { 2082 {
2083 this.Extrude(PathType.Circular); 2083 this.Extrude(PathType.Circular);
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
index b3d9cb6..01d11f4 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/SculptMap.cs
@@ -163,11 +163,11 @@ namespace PrimMesher
163 { 163 {
164 164
165 Bitmap scaledImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb); 165 Bitmap scaledImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb);
166 166
167 Color c; 167 Color c;
168 float xscale = srcImage.Width / destWidth; 168 float xscale = srcImage.Width / destWidth;
169 float yscale = srcImage.Height / destHeight; 169 float yscale = srcImage.Height / destHeight;
170 170
171 float sy = 0.5f; 171 float sy = 0.5f;
172 for (int y = 0; y < destHeight; y++) 172 for (int y = 0; y < destHeight; y++)
173 { 173 {
@@ -191,7 +191,7 @@ namespace PrimMesher
191 return scaledImage; 191 return scaledImage;
192 } 192 }
193 193
194 } 194 }
195 195
196 } 196 }
197#endif 197#endif
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
index 8a842d4..5c257e6 100644
--- a/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/Meshing/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.Meshing")] 9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.Meshing")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
index 12086c8..c851b12 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEApi.cs
@@ -34,8 +34,8 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * 37 *
38 * changes by opensim team; 38 * changes by opensim team;
39 * changes by Aurora team http://www.aurora-sim.org/ 39 * changes by Aurora team http://www.aurora-sim.org/
40 * changes by Ubit Umarov 40 * changes by Ubit Umarov
41 */ 41 */
@@ -52,18 +52,18 @@ namespace OpenSim.Region.PhysicsModule.ODE
52// at least we save same memory and memory access time, FPU performance on intel usually is similar 52// at least we save same memory and memory access time, FPU performance on intel usually is similar
53// using dReal = System.Double; 53// using dReal = System.Double;
54//#else 54//#else
55 using dReal = System.Single; 55 using dReal = System.Single;
56//#endif 56//#endif
57 57
58 public static class d 58 public static class d
59 { 59 {
60 public static dReal Infinity = dReal.MaxValue; 60 public static dReal Infinity = dReal.MaxValue;
61 public static int NTotalBodies = 0; 61 public static int NTotalBodies = 0;
62 public static int NTotalGeoms = 0; 62 public static int NTotalGeoms = 0;
63 63
64 public const uint CONTACTS_UNIMPORTANT = 0x80000000; 64 public const uint CONTACTS_UNIMPORTANT = 0x80000000;
65 65
66 #region Flags and Enumerations 66 #region Flags and Enumerations
67 67
68 [Flags] 68 [Flags]
69 public enum AllocateODEDataFlags : uint 69 public enum AllocateODEDataFlags : uint
@@ -79,101 +79,101 @@ namespace OpenSim.Region.PhysicsModule.ODE
79 dInitFlagManualThreadCleanup = 0x00000001 79 dInitFlagManualThreadCleanup = 0x00000001
80 } 80 }
81 81
82 [Flags] 82 [Flags]
83 public enum ContactFlags : int 83 public enum ContactFlags : int
84 { 84 {
85 Mu2 = 0x001, 85 Mu2 = 0x001,
86 FDir1 = 0x002, 86 FDir1 = 0x002,
87 Bounce = 0x004, 87 Bounce = 0x004,
88 SoftERP = 0x008, 88 SoftERP = 0x008,
89 SoftCFM = 0x010, 89 SoftCFM = 0x010,
90 Motion1 = 0x020, 90 Motion1 = 0x020,
91 Motion2 = 0x040, 91 Motion2 = 0x040,
92 MotionN = 0x080, 92 MotionN = 0x080,
93 Slip1 = 0x100, 93 Slip1 = 0x100,
94 Slip2 = 0x200, 94 Slip2 = 0x200,
95 Approx0 = 0x0000, 95 Approx0 = 0x0000,
96 Approx1_1 = 0x1000, 96 Approx1_1 = 0x1000,
97 Approx1_2 = 0x2000, 97 Approx1_2 = 0x2000,
98 Approx1 = 0x3000 98 Approx1 = 0x3000
99 } 99 }
100 100
101 public enum GeomClassID : int 101 public enum GeomClassID : int
102 { 102 {
103 SphereClass, 103 SphereClass,
104 BoxClass, 104 BoxClass,
105 CapsuleClass, 105 CapsuleClass,
106 CylinderClass, 106 CylinderClass,
107 PlaneClass, 107 PlaneClass,
108 RayClass, 108 RayClass,
109 ConvexClass, 109 ConvexClass,
110 GeomTransformClass, 110 GeomTransformClass,
111 TriMeshClass, 111 TriMeshClass,
112 HeightfieldClass, 112 HeightfieldClass,
113 FirstSpaceClass, 113 FirstSpaceClass,
114 SimpleSpaceClass = FirstSpaceClass, 114 SimpleSpaceClass = FirstSpaceClass,
115 HashSpaceClass, 115 HashSpaceClass,
116 QuadTreeSpaceClass, 116 QuadTreeSpaceClass,
117 LastSpaceClass = QuadTreeSpaceClass, 117 LastSpaceClass = QuadTreeSpaceClass,
118 ubtTerrainClass, 118 ubtTerrainClass,
119 FirstUserClass, 119 FirstUserClass,
120 LastUserClass = FirstUserClass + MaxUserClasses - 1, 120 LastUserClass = FirstUserClass + MaxUserClasses - 1,
121 NumClasses, 121 NumClasses,
122 MaxUserClasses = 5 122 MaxUserClasses = 5
123 } 123 }
124 124
125 public enum JointType : int 125 public enum JointType : int
126 { 126 {
127 None, 127 None,
128 Ball, 128 Ball,
129 Hinge, 129 Hinge,
130 Slider, 130 Slider,
131 Contact, 131 Contact,
132 Universal, 132 Universal,
133 Hinge2, 133 Hinge2,
134 Fixed, 134 Fixed,
135 Null, 135 Null,
136 AMotor, 136 AMotor,
137 LMotor, 137 LMotor,
138 Plane2D 138 Plane2D
139 } 139 }
140 140
141 public enum JointParam : int 141 public enum JointParam : int
142 { 142 {
143 LoStop, 143 LoStop,
144 HiStop, 144 HiStop,
145 Vel, 145 Vel,
146 FMax, 146 FMax,
147 FudgeFactor, 147 FudgeFactor,
148 Bounce, 148 Bounce,
149 CFM, 149 CFM,
150 StopERP, 150 StopERP,
151 StopCFM, 151 StopCFM,
152 SuspensionERP, 152 SuspensionERP,
153 SuspensionCFM, 153 SuspensionCFM,
154 LoStop2 = 256, 154 LoStop2 = 256,
155 HiStop2, 155 HiStop2,
156 Vel2, 156 Vel2,
157 FMax2, 157 FMax2,
158 FudgeFactor2, 158 FudgeFactor2,
159 Bounce2, 159 Bounce2,
160 CFM2, 160 CFM2,
161 StopERP2, 161 StopERP2,
162 StopCFM2, 162 StopCFM2,
163 SuspensionERP2, 163 SuspensionERP2,
164 SuspensionCFM2, 164 SuspensionCFM2,
165 LoStop3 = 512, 165 LoStop3 = 512,
166 HiStop3, 166 HiStop3,
167 Vel3, 167 Vel3,
168 FMax3, 168 FMax3,
169 FudgeFactor3, 169 FudgeFactor3,
170 Bounce3, 170 Bounce3,
171 CFM3, 171 CFM3,
172 StopERP3, 172 StopERP3,
173 StopCFM3, 173 StopCFM3,
174 SuspensionERP3, 174 SuspensionERP3,
175 SuspensionCFM3 175 SuspensionCFM3
176 } 176 }
177 177
178 public enum dSweepAndPruneAxis : int 178 public enum dSweepAndPruneAxis : int
179 { 179 {
@@ -185,24 +185,24 @@ namespace OpenSim.Region.PhysicsModule.ODE
185 ZYX = ((2)|(1<<2)|(0<<4)) 185 ZYX = ((2)|(1<<2)|(0<<4))
186 } 186 }
187 187
188 #endregion 188 #endregion
189 189
190 #region Callbacks 190 #region Callbacks
191 191
192 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 192 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
193 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); 193 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb);
194 194
195 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 195 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
196 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); 196 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip);
197 197
198 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 198 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
199 public delegate void GetAABBFn(IntPtr geom, out AABB aabb); 199 public delegate void GetAABBFn(IntPtr geom, out AABB aabb);
200 200
201 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 201 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
202 public delegate ColliderFn GetColliderFnFn(int num); 202 public delegate ColliderFn GetColliderFnFn(int num);
203 203
204 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 204 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
205 public delegate void GeomDtorFn(IntPtr o); 205 public delegate void GeomDtorFn(IntPtr o);
206 206
207 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 207 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
208 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); 208 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
@@ -210,230 +210,230 @@ namespace OpenSim.Region.PhysicsModule.ODE
210 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 210 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
211 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); 211 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z);
212 212
213 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 213 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
214 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); 214 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
215 215
216 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 216 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
217 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); 217 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex);
218 218
219 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 219 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
220 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); 220 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount);
221 221
222 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 222 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
223 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); 223 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v);
224 224
225 #endregion 225 #endregion
226 226
227 #region Structs 227 #region Structs
228 228
229 [StructLayout(LayoutKind.Sequential)] 229 [StructLayout(LayoutKind.Sequential)]
230 public struct AABB 230 public struct AABB
231 { 231 {
232 public dReal MinX, MaxX; 232 public dReal MinX, MaxX;
233 public dReal MinY, MaxY; 233 public dReal MinY, MaxY;
234 public dReal MinZ, MaxZ; 234 public dReal MinZ, MaxZ;
235 } 235 }
236 236
237 237
238 [StructLayout(LayoutKind.Sequential)] 238 [StructLayout(LayoutKind.Sequential)]
239 public struct Contact 239 public struct Contact
240 { 240 {
241 public SurfaceParameters surface; 241 public SurfaceParameters surface;
242 public ContactGeom geom; 242 public ContactGeom geom;
243 public Vector3 fdir1; 243 public Vector3 fdir1;
244 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); 244 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact));
245 } 245 }
246 246
247 247
248 [StructLayout(LayoutKind.Sequential)] 248 [StructLayout(LayoutKind.Sequential)]
249 public struct ContactGeom 249 public struct ContactGeom
250 { 250 {
251 251
252 public Vector3 pos; 252 public Vector3 pos;
253 public Vector3 normal; 253 public Vector3 normal;
254 public dReal depth; 254 public dReal depth;
255 public IntPtr g1; 255 public IntPtr g1;
256 public IntPtr g2; 256 public IntPtr g2;
257 public int side1; 257 public int side1;
258 public int side2; 258 public int side2;
259 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); 259 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom));
260 } 260 }
261 261
262 [StructLayout(LayoutKind.Sequential)] 262 [StructLayout(LayoutKind.Sequential)]
263 public struct GeomClass 263 public struct GeomClass
264 { 264 {
265 public int bytes; 265 public int bytes;
266 public GetColliderFnFn collider; 266 public GetColliderFnFn collider;
267 public GetAABBFn aabb; 267 public GetAABBFn aabb;
268 public AABBTestFn aabb_test; 268 public AABBTestFn aabb_test;
269 public GeomDtorFn dtor; 269 public GeomDtorFn dtor;
270 } 270 }
271 271
272 272
273 [StructLayout(LayoutKind.Sequential)] 273 [StructLayout(LayoutKind.Sequential)]
274 public struct JointFeedback 274 public struct JointFeedback
275 { 275 {
276 public Vector3 f1; 276 public Vector3 f1;
277 public Vector3 t1; 277 public Vector3 t1;
278 public Vector3 f2; 278 public Vector3 f2;
279 public Vector3 t2; 279 public Vector3 t2;
280 } 280 }
281 281
282 282
283 [StructLayout(LayoutKind.Sequential)] 283 [StructLayout(LayoutKind.Sequential)]
284 public struct Mass 284 public struct Mass
285 { 285 {
286 public dReal mass; 286 public dReal mass;
287 public Vector4 c; 287 public Vector4 c;
288 public Matrix3 I; 288 public Matrix3 I;
289 } 289 }
290 290
291 291
292 [StructLayout(LayoutKind.Sequential)] 292 [StructLayout(LayoutKind.Sequential)]
293 public struct Matrix3 293 public struct Matrix3
294 { 294 {
295 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) 295 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22)
296 { 296 {
297 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; 297 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f;
298 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; 298 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f;
299 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; 299 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f;
300 } 300 }
301 public dReal M00, M10, M20; 301 public dReal M00, M10, M20;
302 private dReal _m30; 302 private dReal _m30;
303 public dReal M01, M11, M21; 303 public dReal M01, M11, M21;
304 private dReal _m31; 304 private dReal _m31;
305 public dReal M02, M12, M22; 305 public dReal M02, M12, M22;
306 private dReal _m32; 306 private dReal _m32;
307 } 307 }
308 308
309 [StructLayout(LayoutKind.Sequential)] 309 [StructLayout(LayoutKind.Sequential)]
310 public struct Matrix4 310 public struct Matrix4
311 { 311 {
312 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, 312 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30,
313 dReal m01, dReal m11, dReal m21, dReal m31, 313 dReal m01, dReal m11, dReal m21, dReal m31,
314 dReal m02, dReal m12, dReal m22, dReal m32, 314 dReal m02, dReal m12, dReal m22, dReal m32,
315 dReal m03, dReal m13, dReal m23, dReal m33) 315 dReal m03, dReal m13, dReal m23, dReal m33)
316 { 316 {
317 M00 = m00; M10 = m10; M20 = m20; M30 = m30; 317 M00 = m00; M10 = m10; M20 = m20; M30 = m30;
318 M01 = m01; M11 = m11; M21 = m21; M31 = m31; 318 M01 = m01; M11 = m11; M21 = m21; M31 = m31;
319 M02 = m02; M12 = m12; M22 = m22; M32 = m32; 319 M02 = m02; M12 = m12; M22 = m22; M32 = m32;
320 M03 = m03; M13 = m13; M23 = m23; M33 = m33; 320 M03 = m03; M13 = m13; M23 = m23; M33 = m33;
321 } 321 }
322 public dReal M00, M10, M20, M30; 322 public dReal M00, M10, M20, M30;
323 public dReal M01, M11, M21, M31; 323 public dReal M01, M11, M21, M31;
324 public dReal M02, M12, M22, M32; 324 public dReal M02, M12, M22, M32;
325 public dReal M03, M13, M23, M33; 325 public dReal M03, M13, M23, M33;
326 } 326 }
327 327
328 [StructLayout(LayoutKind.Sequential)] 328 [StructLayout(LayoutKind.Sequential)]
329 public struct Quaternion 329 public struct Quaternion
330 { 330 {
331 public dReal W, X, Y, Z; 331 public dReal W, X, Y, Z;
332 } 332 }
333 333
334 334
335 [StructLayout(LayoutKind.Sequential)] 335 [StructLayout(LayoutKind.Sequential)]
336 public struct SurfaceParameters 336 public struct SurfaceParameters
337 { 337 {
338 public ContactFlags mode; 338 public ContactFlags mode;
339 public dReal mu; 339 public dReal mu;
340 public dReal mu2; 340 public dReal mu2;
341 public dReal bounce; 341 public dReal bounce;
342 public dReal bounce_vel; 342 public dReal bounce_vel;
343 public dReal soft_erp; 343 public dReal soft_erp;
344 public dReal soft_cfm; 344 public dReal soft_cfm;
345 public dReal motion1; 345 public dReal motion1;
346 public dReal motion2; 346 public dReal motion2;
347 public dReal motionN; 347 public dReal motionN;
348 public dReal slip1; 348 public dReal slip1;
349 public dReal slip2; 349 public dReal slip2;
350 } 350 }
351 351
352 352
353 [StructLayout(LayoutKind.Sequential)] 353 [StructLayout(LayoutKind.Sequential)]
354 public struct Vector3 354 public struct Vector3
355 { 355 {
356 public Vector3(dReal x, dReal y, dReal z) 356 public Vector3(dReal x, dReal y, dReal z)
357 { 357 {
358 X = x; Y = y; Z = z; _w = 0.0f; 358 X = x; Y = y; Z = z; _w = 0.0f;
359 } 359 }
360 public dReal X, Y, Z; 360 public dReal X, Y, Z;
361 private dReal _w; 361 private dReal _w;
362 } 362 }
363 363
364 364
365 [StructLayout(LayoutKind.Sequential)] 365 [StructLayout(LayoutKind.Sequential)]
366 public struct Vector4 366 public struct Vector4
367 { 367 {
368 public Vector4(dReal x, dReal y, dReal z, dReal w) 368 public Vector4(dReal x, dReal y, dReal z, dReal w)
369 { 369 {
370 X = x; Y = y; Z = z; W = w; 370 X = x; Y = y; Z = z; W = w;
371 } 371 }
372 public dReal X, Y, Z, W; 372 public dReal X, Y, Z, W;
373 } 373 }
374 374
375 #endregion 375 #endregion
376 376
377 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] 377 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity]
378 public static extern int AllocateODEDataForThread(uint ODEInitFlags); 378 public static extern int AllocateODEDataForThread(uint ODEInitFlags);
379 379
380 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] 380 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity]
381 public static extern bool AreConnected(IntPtr b1, IntPtr b2); 381 public static extern bool AreConnected(IntPtr b1, IntPtr b2);
382 382
383 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] 383 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity]
384 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); 384 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type);
385 385
386 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] 386 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity]
387 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); 387 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz);
388 388
389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] 389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity]
390 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 390 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
391 391
392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] 392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity]
393 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 393 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
394 394
395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] 395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity]
396 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); 396 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz);
397 397
398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] 398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity]
399 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 399 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
400 400
401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] 401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity]
402 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 402 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
403 403
404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] 404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity]
405 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 405 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
406 406
407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] 407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity]
408 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 408 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
409 409
410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
411 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); 411 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos);
412 412
413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
414 public static extern void BodyCopyPosition(IntPtr body, out dReal X); 414 public static extern void BodyCopyPosition(IntPtr body, out dReal X);
415 415
416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
417 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); 417 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat);
418 418
419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
420 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); 420 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X);
421 421
422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
423 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); 423 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R);
424 424
425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
426 public static extern void BodyCopyRotation(IntPtr body, out dReal M00); 426 public static extern void BodyCopyRotation(IntPtr body, out dReal M00);
427 427
428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] 428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity]
429 public static extern IntPtr BodyiCreate(IntPtr world); 429 public static extern IntPtr BodyiCreate(IntPtr world);
430 public static IntPtr BodyCreate(IntPtr world) 430 public static IntPtr BodyCreate(IntPtr world)
431 { 431 {
432 NTotalBodies++; 432 NTotalBodies++;
433 return BodyiCreate(world); 433 return BodyiCreate(world);
434 } 434 }
435 435
436 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] 436 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity]
437 public static extern void BodyiDestroy(IntPtr body); 437 public static extern void BodyiDestroy(IntPtr body);
438 public static void BodyDestroy(IntPtr body) 438 public static void BodyDestroy(IntPtr body)
439 { 439 {
@@ -441,114 +441,114 @@ namespace OpenSim.Region.PhysicsModule.ODE
441 BodyiDestroy(body); 441 BodyiDestroy(body);
442 } 442 }
443 443
444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] 444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity]
445 public static extern void BodyDisable(IntPtr body); 445 public static extern void BodyDisable(IntPtr body);
446 446
447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] 447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity]
448 public static extern void BodyEnable(IntPtr body); 448 public static extern void BodyEnable(IntPtr body);
449 449
450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
451 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); 451 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body);
452 452
453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
454 public static extern bool BodyGetAutoDisableFlag(IntPtr body); 454 public static extern bool BodyGetAutoDisableFlag(IntPtr body);
455 455
456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
457 public static extern void BodyGetAutoDisableDefaults(IntPtr body); 457 public static extern void BodyGetAutoDisableDefaults(IntPtr body);
458 458
459 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 459 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
460 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); 460 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body);
461 461
462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
463 public static extern int BodyGetAutoDisableSteps(IntPtr body); 463 public static extern int BodyGetAutoDisableSteps(IntPtr body);
464 464
465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
466 public static extern dReal BodyGetAutoDisableTime(IntPtr body); 466 public static extern dReal BodyGetAutoDisableTime(IntPtr body);
467 467
468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] 468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity]
469 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); 469 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body);
470 public static Vector3 BodyGetAngularVel(IntPtr body) 470 public static Vector3 BodyGetAngularVel(IntPtr body)
471 { 471 {
472 unsafe { return *(BodyGetAngularVelUnsafe(body)); } 472 unsafe { return *(BodyGetAngularVelUnsafe(body)); }
473 } 473 }
474 474
475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] 475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity]
476 public static extern IntPtr BodyGetData(IntPtr body); 476 public static extern IntPtr BodyGetData(IntPtr body);
477 477
478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
479 public static extern int BodyGetFiniteRotationMode(IntPtr body); 479 public static extern int BodyGetFiniteRotationMode(IntPtr body);
480 480
481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
482 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); 482 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result);
483 483
484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] 484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity]
485 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); 485 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body);
486 public static Vector3 BodyGetForce(IntPtr body) 486 public static Vector3 BodyGetForce(IntPtr body)
487 { 487 {
488 unsafe { return *(BodyGetForceUnsafe(body)); } 488 unsafe { return *(BodyGetForceUnsafe(body)); }
489 } 489 }
490 490
491 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] 491 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity]
492 public static extern bool BodyGetGravityMode(IntPtr body); 492 public static extern bool BodyGetGravityMode(IntPtr body);
493 493
494 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 494 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
495 public static extern int BodyGetGyroscopicMode(IntPtr body); 495 public static extern int BodyGetGyroscopicMode(IntPtr body);
496 496
497 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] 497 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity]
498 public static extern IntPtr BodyGetJoint(IntPtr body, int index); 498 public static extern IntPtr BodyGetJoint(IntPtr body, int index);
499 499
500 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] 500 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity]
501 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); 501 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body);
502 public static Vector3 BodyGetLinearVel(IntPtr body) 502 public static Vector3 BodyGetLinearVel(IntPtr body)
503 { 503 {
504 unsafe { return *(BodyGetLinearVelUnsafe(body)); } 504 unsafe { return *(BodyGetLinearVelUnsafe(body)); }
505 } 505 }
506 506
507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] 507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity]
508 public static extern void BodyGetMass(IntPtr body, out Mass mass); 508 public static extern void BodyGetMass(IntPtr body, out Mass mass);
509 509
510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] 510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity]
511 public static extern int BodyGetNumJoints(IntPtr body); 511 public static extern int BodyGetNumJoints(IntPtr body);
512 512
513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] 513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity]
514 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 514 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
515 515
516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] 516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity]
517 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); 517 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body);
518 public static Vector3 BodyGetPosition(IntPtr body) 518 public static Vector3 BodyGetPosition(IntPtr body)
519 { 519 {
520 unsafe { return *(BodyGetPositionUnsafe(body)); } 520 unsafe { return *(BodyGetPositionUnsafe(body)); }
521 } 521 }
522 522
523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] 523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity]
524 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 524 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
525 525
526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] 526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity]
527 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); 527 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body);
528 public static Quaternion BodyGetQuaternion(IntPtr body) 528 public static Quaternion BodyGetQuaternion(IntPtr body)
529 { 529 {
530 unsafe { return *(BodyGetQuaternionUnsafe(body)); } 530 unsafe { return *(BodyGetQuaternionUnsafe(body)); }
531 } 531 }
532 532
533 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] 533 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity]
534 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 534 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
535 535
536 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] 536 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity]
537 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 537 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
538 538
539 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] 539 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity]
540 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); 540 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body);
541 public static Matrix3 BodyGetRotation(IntPtr body) 541 public static Matrix3 BodyGetRotation(IntPtr body)
542 { 542 {
543 unsafe { return *(BodyGetRotationUnsafe(body)); } 543 unsafe { return *(BodyGetRotationUnsafe(body)); }
544 } 544 }
545 545
546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] 546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity]
547 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); 547 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body);
548 public static Vector3 BodyGetTorque(IntPtr body) 548 public static Vector3 BodyGetTorque(IntPtr body)
549 { 549 {
550 unsafe { return *(BodyGetTorqueUnsafe(body)); } 550 unsafe { return *(BodyGetTorqueUnsafe(body)); }
551 } 551 }
552 552
553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] 553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity]
554 public static extern IntPtr BodyGetWorld(IntPtr body); 554 public static extern IntPtr BodyGetWorld(IntPtr body);
@@ -560,38 +560,38 @@ namespace OpenSim.Region.PhysicsModule.ODE
560 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom); 560 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom);
561 561
562 562
563 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] 563 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity]
564 public static extern bool BodyIsEnabled(IntPtr body); 564 public static extern bool BodyIsEnabled(IntPtr body);
565 565
566 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] 566 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity]
567 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); 567 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z);
568 568
569 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 569 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
570 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); 570 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold);
571 571
572 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 572 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
573 public static extern void BodySetAutoDisableDefaults(IntPtr body); 573 public static extern void BodySetAutoDisableDefaults(IntPtr body);
574 574
575 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 575 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
576 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); 576 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable);
577 577
578 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 578 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
579 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); 579 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold);
580 580
581 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 581 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
582 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); 582 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps);
583 583
584 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 584 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
585 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); 585 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time);
586 586
587 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] 587 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity]
588 public static extern void BodySetData(IntPtr body, IntPtr data); 588 public static extern void BodySetData(IntPtr body, IntPtr data);
589 589
590 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 590 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
591 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); 591 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode);
592 592
593 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 593 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
594 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); 594 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z);
595 595
596 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] 596 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity]
597 public static extern void BodySetLinearDamping(IntPtr body, dReal scale); 597 public static extern void BodySetLinearDamping(IntPtr body, dReal scale);
@@ -620,11 +620,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
620 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 620 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
621 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); 621 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body);
622 622
623 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] 623 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity]
624 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); 624 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z);
625 625
626 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] 626 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity]
627 public static extern void BodySetGravityMode(IntPtr body, bool mode); 627 public static extern void BodySetGravityMode(IntPtr body, bool mode);
628 628
629 /// <summary> 629 /// <summary>
630 /// Sets the Gyroscopic term status on the body specified. 630 /// Sets the Gyroscopic term status on the body specified.
@@ -634,76 +634,76 @@ namespace OpenSim.Region.PhysicsModule.ODE
634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
635 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); 635 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled);
636 636
637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] 637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity]
638 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); 638 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z);
639 639
640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] 640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity]
641 public static extern void BodySetMass(IntPtr body, ref Mass mass); 641 public static extern void BodySetMass(IntPtr body, ref Mass mass);
642 642
643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] 643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity]
644 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); 644 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z);
645 645
646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
647 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); 647 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q);
648 648
649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
650 public static extern void BodySetQuaternion(IntPtr body, ref dReal w); 650 public static extern void BodySetQuaternion(IntPtr body, ref dReal w);
651 651
652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
653 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); 653 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R);
654 654
655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
656 public static extern void BodySetRotation(IntPtr body, ref dReal M00); 656 public static extern void BodySetRotation(IntPtr body, ref dReal M00);
657 657
658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] 658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity]
659 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); 659 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z);
660 660
661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] 661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity]
662 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 662 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
663 663
664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] 664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity]
665 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 665 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
666 666
667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] 667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity]
668 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, 668 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1,
669 ref Vector3 side1, ref Vector3 p2, 669 ref Vector3 side1, ref Vector3 p2,
670 ref Matrix3 R2, ref Vector3 side2, 670 ref Matrix3 R2, ref Vector3 side2,
671 ref Vector3 normal, out dReal depth, out int return_code, 671 ref Vector3 normal, out dReal depth, out int return_code,
672 int maxc, out ContactGeom contact, int skip); 672 int maxc, out ContactGeom contact, int skip);
673 673
674 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] 674 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity]
675 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, 675 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1,
676 ref Vector3 side1, ref Vector3 _p2, 676 ref Vector3 side1, ref Vector3 _p2,
677 ref Matrix3 R2, ref Vector3 side2); 677 ref Matrix3 R2, ref Vector3 side2);
678 678
679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] 679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity]
680 public static extern void CleanupODEAllDataForThread(); 680 public static extern void CleanupODEAllDataForThread();
681 681
682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] 682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity]
683 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, 683 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2,
684 ref Vector3 b1, ref Vector3 b2, 684 ref Vector3 b1, ref Vector3 b2,
685 ref Vector3 cp1, ref Vector3 cp2); 685 ref Vector3 cp1, ref Vector3 cp2);
686 686
687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] 687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity]
688 public static extern void CloseODE(); 688 public static extern void CloseODE();
689 689
690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
691 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); 691 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip);
692 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 692 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
693 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); 693 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip);
694 694
695 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] 695 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity]
696 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); 696 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2);
697 697
698 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] 698 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity]
699 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); 699 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz);
700 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) 700 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz)
701 { 701 {
702 NTotalGeoms++; 702 NTotalGeoms++;
703 return CreateiBox(space, lx, ly, lz); 703 return CreateiBox(space, lx, ly, lz);
704 } 704 }
705 705
706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] 706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity]
707 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); 707 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length);
708 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) 708 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length)
709 { 709 {
@@ -711,23 +711,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
711 return CreateiCapsule(space, radius, length); 711 return CreateiCapsule(space, radius, length);
712 } 712 }
713 713
714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] 714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity]
715 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 715 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
716 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) 716 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons)
717 { 717 {
718 NTotalGeoms++; 718 NTotalGeoms++;
719 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); 719 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons);
720 } 720 }
721 721
722 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] 722 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity]
723 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); 723 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length);
724 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) 724 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length)
725 { 725 {
726 NTotalGeoms++; 726 NTotalGeoms++;
727 return CreateiCylinder(space, radius, length); 727 return CreateiCylinder(space, radius, length);
728 } 728 }
729 729
730 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] 730 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity]
731 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); 731 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable);
732 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) 732 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable)
733 { 733 {
@@ -745,23 +745,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
745 745
746 746
747 747
748
749 748
750 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] 749
751 public static extern IntPtr CreateiGeom(int classnum); 750 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
751 public static extern IntPtr CreateiGeom(int classnum);
752 public static IntPtr CreateGeom(int classnum) 752 public static IntPtr CreateGeom(int classnum)
753 { 753 {
754 NTotalGeoms++; 754 NTotalGeoms++;
755 return CreateiGeom(classnum); 755 return CreateiGeom(classnum);
756 } 756 }
757 757
758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] 758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity]
759 public static extern int CreateGeomClass(ref GeomClass classptr); 759 public static extern int CreateGeomClass(ref GeomClass classptr);
760 760
761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] 761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity]
762 public static extern IntPtr CreateGeomTransform(IntPtr space); 762 public static extern IntPtr CreateGeomTransform(IntPtr space);
763 763
764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] 764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity]
765 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); 765 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d);
766 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) 766 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d)
767 { 767 {
@@ -769,25 +769,25 @@ namespace OpenSim.Region.PhysicsModule.ODE
769 return CreateiPlane(space, a, b, c, d); 769 return CreateiPlane(space, a, b, c, d);
770 } 770 }
771 771
772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] 772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity]
773 public static extern IntPtr CreateiRay(IntPtr space, dReal length); 773 public static extern IntPtr CreateiRay(IntPtr space, dReal length);
774 public static IntPtr CreateRay(IntPtr space, dReal length) 774 public static IntPtr CreateRay(IntPtr space, dReal length)
775 { 775 {
776 NTotalGeoms++; 776 NTotalGeoms++;
777 return CreateiRay(space, length); 777 return CreateiRay(space, length);
778 } 778 }
779 779
780 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] 780 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity]
781 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius); 781 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius);
782 public static IntPtr CreateSphere(IntPtr space, dReal radius) 782 public static IntPtr CreateSphere(IntPtr space, dReal radius)
783 { 783 {
784 NTotalGeoms++; 784 NTotalGeoms++;
785 return CreateiSphere(space, radius); 785 return CreateiSphere(space, radius);
786 } 786 }
787 787
788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] 788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity]
789 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, 789 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data,
790 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); 790 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback);
791 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data, 791 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data,
792 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) 792 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback)
793 { 793 {
@@ -795,79 +795,79 @@ namespace OpenSim.Region.PhysicsModule.ODE
795 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); 795 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback);
796 } 796 }
797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] 797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity]
798 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); 798 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n);
799 799
800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] 800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity]
801 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); 801 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q);
802 802
803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] 803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity]
804 public static extern int FactorCholesky(ref dReal A00, int n); 804 public static extern int FactorCholesky(ref dReal A00, int n);
805 805
806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] 806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity]
807 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); 807 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip);
808 808
809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
810 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); 810 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len);
811 811
812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
813 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); 813 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x);
814 814
815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] 815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity]
816 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); 816 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z);
817 817
818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] 818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity]
819 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); 819 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z);
820 820
821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] 821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity]
822 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); 822 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length);
823 823
824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] 824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity]
825 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 825 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
826 826
827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] 827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity]
828 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); 828 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length);
829 829
830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] 830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity]
831 public static extern void GeomClearOffset(IntPtr geom); 831 public static extern void GeomClearOffset(IntPtr geom);
832 832
833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
834 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); 834 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos);
835 835
836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
837 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); 837 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X);
838 838
839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
840 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); 840 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q);
841 841
842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
843 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); 843 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X);
844 844
845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
846 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); 846 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R);
847 847
848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
849 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); 849 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00);
850 850
851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
852 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); 852 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos);
853 853
854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
855 public static extern void GeomCopyPosition(IntPtr geom, out dReal X); 855 public static extern void GeomCopyPosition(IntPtr geom, out dReal X);
856 856
857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
858 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); 858 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R);
859 859
860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
861 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); 861 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00);
862 862
863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] 863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity]
864 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); 864 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length);
865 865
866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] 866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity]
867 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); 867 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length);
868 868
869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] 869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity]
870 public static extern void GeomiDestroy(IntPtr geom); 870 public static extern void GeomiDestroy(IntPtr geom);
871 public static void GeomDestroy(IntPtr geom) 871 public static void GeomDestroy(IntPtr geom)
872 { 872 {
873 NTotalGeoms--; 873 NTotalGeoms--;
@@ -875,63 +875,63 @@ namespace OpenSim.Region.PhysicsModule.ODE
875 } 875 }
876 876
877 877
878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] 878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity]
879 public static extern void GeomDisable(IntPtr geom); 879 public static extern void GeomDisable(IntPtr geom);
880 880
881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] 881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity]
882 public static extern void GeomEnable(IntPtr geom); 882 public static extern void GeomEnable(IntPtr geom);
883 883
884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
885 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); 885 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb);
886 886
887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
888 public static extern void GeomGetAABB(IntPtr geom, out dReal minX); 888 public static extern void GeomGetAABB(IntPtr geom, out dReal minX);
889 889
890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] 890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity]
891 public static extern IntPtr GeomGetBody(IntPtr geom); 891 public static extern IntPtr GeomGetBody(IntPtr geom);
892 892
893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] 893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity]
894 public static extern uint GeomGetCategoryBits(IntPtr geom); 894 public static extern uint GeomGetCategoryBits(IntPtr geom);
895 895
896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] 896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity]
897 public static extern IntPtr GeomGetClassData(IntPtr geom); 897 public static extern IntPtr GeomGetClassData(IntPtr geom);
898 898
899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] 899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity]
900 public static extern uint GeomGetCollideBits(IntPtr geom); 900 public static extern uint GeomGetCollideBits(IntPtr geom);
901 901
902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] 902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity]
903 public static extern GeomClassID GeomGetClass(IntPtr geom); 903 public static extern GeomClassID GeomGetClass(IntPtr geom);
904 904
905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] 905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity]
906 public static extern IntPtr GeomGetData(IntPtr geom); 906 public static extern IntPtr GeomGetData(IntPtr geom);
907 907
908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] 908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity]
909 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); 909 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom);
910 public static Vector3 GeomGetOffsetPosition(IntPtr geom) 910 public static Vector3 GeomGetOffsetPosition(IntPtr geom)
911 { 911 {
912 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } 912 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); }
913 } 913 }
914 914
915 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] 915 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity]
916 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); 916 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom);
917 public static Matrix3 GeomGetOffsetRotation(IntPtr geom) 917 public static Matrix3 GeomGetOffsetRotation(IntPtr geom)
918 { 918 {
919 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } 919 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); }
920 } 920 }
921 921
922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] 922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity]
923 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); 923 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom);
924 public static Vector3 GeomGetPosition(IntPtr geom) 924 public static Vector3 GeomGetPosition(IntPtr geom)
925 { 925 {
926 unsafe { return *(GeomGetPositionUnsafe(geom)); } 926 unsafe { return *(GeomGetPositionUnsafe(geom)); }
927 } 927 }
928 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) 928 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom)
929 { 929 {
930 Vector3 vtmp = GeomGetPosition(geom); 930 Vector3 vtmp = GeomGetPosition(geom);
931 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); 931 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z);
932 } 932 }
933 933
934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
935 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); 935 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q);
936 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) 936 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom)
937 { 937 {
@@ -940,85 +940,85 @@ namespace OpenSim.Region.PhysicsModule.ODE
940 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W); 940 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W);
941 } 941 }
942 942
943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
944 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); 944 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X);
945 945
946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] 946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity]
947 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); 947 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom);
948 public static Matrix3 GeomGetRotation(IntPtr geom) 948 public static Matrix3 GeomGetRotation(IntPtr geom)
949 { 949 {
950 unsafe { return *(GeomGetRotationUnsafe(geom)); } 950 unsafe { return *(GeomGetRotationUnsafe(geom)); }
951 } 951 }
952 952
953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] 953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity]
954 public static extern IntPtr GeomGetSpace(IntPtr geom); 954 public static extern IntPtr GeomGetSpace(IntPtr geom);
955 955
956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
957 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, 957 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData,
958 dReal width, dReal depth, int widthSamples, int depthSamples, 958 dReal width, dReal depth, int widthSamples, int depthSamples,
959 dReal scale, dReal offset, dReal thickness, int bWrap); 959 dReal scale, dReal offset, dReal thickness, int bWrap);
960 960
961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
962 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 962 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
963 dReal width, dReal depth, int widthSamples, int depthSamples, 963 dReal width, dReal depth, int widthSamples, int depthSamples,
964 dReal scale, dReal offset, dReal thickness, int bWrap); 964 dReal scale, dReal offset, dReal thickness, int bWrap);
965 965
966 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] 966 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity]
967 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, 967 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback,
968 dReal width, dReal depth, int widthSamples, int depthSamples, 968 dReal width, dReal depth, int widthSamples, int depthSamples,
969 dReal scale, dReal offset, dReal thickness, int bWrap); 969 dReal scale, dReal offset, dReal thickness, int bWrap);
970 970
971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
972 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, 972 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData,
973 dReal width, dReal depth, int widthSamples, int depthSamples, 973 dReal width, dReal depth, int widthSamples, int depthSamples,
974 dReal scale, dReal offset, dReal thickness, int bWrap); 974 dReal scale, dReal offset, dReal thickness, int bWrap);
975 975
976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
977 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, 977 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData,
978 dReal width, dReal depth, int widthSamples, int depthSamples, 978 dReal width, dReal depth, int widthSamples, int depthSamples,
979 dReal scale, dReal offset, dReal thickness, int bWrap); 979 dReal scale, dReal offset, dReal thickness, int bWrap);
980 980
981 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 981 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
982 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 982 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
983 dReal width, dReal depth, int widthSamples, int depthSamples, 983 dReal width, dReal depth, int widthSamples, int depthSamples,
984 dReal scale, dReal offset, dReal thickness, int bWrap); 984 dReal scale, dReal offset, dReal thickness, int bWrap);
985 985
986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
987 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, 987 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData,
988 dReal width, dReal depth, int widthSamples, int depthSamples, 988 dReal width, dReal depth, int widthSamples, int depthSamples,
989 dReal scale, dReal offset, dReal thickness, int bWrap); 989 dReal scale, dReal offset, dReal thickness, int bWrap);
990 990
991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
992 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 992 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
993 dReal width, dReal depth, int widthSamples, int depthSamples, 993 dReal width, dReal depth, int widthSamples, int depthSamples,
994 dReal scale, dReal offset, dReal thickness, int bWrap); 994 dReal scale, dReal offset, dReal thickness, int bWrap);
995 995
996 996
997 997
998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
999 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, 999 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
1000 dReal width, dReal depth, int widthSamples, int depthSamples, 1000 dReal width, dReal depth, int widthSamples, int depthSamples,
1001 dReal scale, dReal offset, dReal thickness, int bWrap); 1001 dReal scale, dReal offset, dReal thickness, int bWrap);
1002 1002
1003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1004 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 1004 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
1005 dReal width, dReal depth, int widthSamples, int depthSamples, 1005 dReal width, dReal depth, int widthSamples, int depthSamples,
1006 dReal scale, dReal offset, dReal thickness, int bWrap); 1006 dReal scale, dReal offset, dReal thickness, int bWrap);
1007 1007
1008 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] 1008 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity]
1009 public static extern IntPtr GeomHeightfieldDataCreate(); 1009 public static extern IntPtr GeomHeightfieldDataCreate();
1010 1010
1011 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] 1011 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity]
1012 public static extern void GeomHeightfieldDataDestroy(IntPtr d); 1012 public static extern void GeomHeightfieldDataDestroy(IntPtr d);
1013 1013
1014 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] 1014 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity]
1015 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); 1015 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
1016 1016
1017 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1017 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1018 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); 1018 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g);
1019 1019
1020 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1020 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1021 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); 1021 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
1022 1022
1023 1023
1024 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] 1024 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
@@ -1047,279 +1047,279 @@ namespace OpenSim.Region.PhysicsModule.ODE
1047 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); 1047 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d);
1048 1048
1049 1049
1050 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] 1050 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
1051 public static extern bool GeomIsEnabled(IntPtr geom); 1051 public static extern bool GeomIsEnabled(IntPtr geom);
1052 1052
1053 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] 1053 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity]
1054 public static extern bool GeomIsOffset(IntPtr geom); 1054 public static extern bool GeomIsOffset(IntPtr geom);
1055 1055
1056 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] 1056 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity]
1057 public static extern bool GeomIsSpace(IntPtr geom); 1057 public static extern bool GeomIsSpace(IntPtr geom);
1058 1058
1059 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1059 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1060 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); 1060 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result);
1061 1061
1062 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1062 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1063 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); 1063 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A);
1064 1064
1065 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] 1065 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity]
1066 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1066 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1067 1067
1068 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] 1068 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity]
1069 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); 1069 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d);
1070 1070
1071 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1071 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1072 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); 1072 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir);
1073 1073
1074 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1074 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1075 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); 1075 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX);
1076 1076
1077 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] 1077 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity]
1078 public static extern int GeomRayGetClosestHit(IntPtr ray); 1078 public static extern int GeomRayGetClosestHit(IntPtr ray);
1079 1079
1080 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] 1080 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity]
1081 public static extern dReal GeomRayGetLength(IntPtr ray); 1081 public static extern dReal GeomRayGetLength(IntPtr ray);
1082 1082
1083 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] 1083 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity]
1084 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); 1084 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull);
1085 1085
1086 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] 1086 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity]
1087 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); 1087 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
1088 1088
1089 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] 1089 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity]
1090 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); 1090 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit);
1091 1091
1092 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] 1092 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity]
1093 public static extern void GeomRaySetLength(IntPtr ray, dReal length); 1093 public static extern void GeomRaySetLength(IntPtr ray, dReal length);
1094 1094
1095 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] 1095 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity]
1096 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); 1096 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull);
1097 1097
1098 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] 1098 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity]
1099 public static extern void GeomSetBody(IntPtr geom, IntPtr body); 1099 public static extern void GeomSetBody(IntPtr geom, IntPtr body);
1100 1100
1101 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] 1101 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity]
1102 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits); 1102 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits);
1103 1103
1104 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] 1104 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity]
1105 public static extern void GeomSetCollideBits(IntPtr geom, uint bits); 1105 public static extern void GeomSetCollideBits(IntPtr geom, uint bits);
1106 1106
1107 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] 1107 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity]
1108 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 1108 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
1109 1109
1110 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] 1110 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity]
1111 public static extern void GeomSetData(IntPtr geom, IntPtr data); 1111 public static extern void GeomSetData(IntPtr geom, IntPtr data);
1112 1112
1113 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] 1113 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity]
1114 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1114 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1115
1116 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1117 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1118
1119 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1120 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1121
1122 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1123 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1124
1125 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1126 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1127 1115
1128 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] 1116 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1129 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); 1117 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1130 1118
1131 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1119 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1132 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); 1120 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1133 1121
1134 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1122 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1135 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); 1123 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1136 1124
1137 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1125 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1138 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); 1126 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1139 1127
1140 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1128 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity]
1141 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); 1129 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z);
1142 1130
1143 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] 1131 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1144 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1132 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q);
1145 1133
1146 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1134 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1147 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); 1135 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X);
1148 1136
1149 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1137 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1150 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); 1138 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R);
1151 1139
1152 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1140 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1153 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); 1141 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00);
1154 1142
1155 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1143 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity]
1156 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); 1144 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1157 1145
1158 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] 1146 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1159 public static extern dReal GeomSphereGetRadius(IntPtr geom); 1147 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat);
1160 1148
1161 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] 1149 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1162 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1150 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w);
1163 1151
1164 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] 1152 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1165 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); 1153 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R);
1166 1154
1167 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] 1155 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1168 public static extern int GeomTransformGetCleanup(IntPtr geom); 1156 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00);
1169 1157
1170 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] 1158 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity]
1171 public static extern IntPtr GeomTransformGetGeom(IntPtr geom); 1159 public static extern dReal GeomSphereGetRadius(IntPtr geom);
1172 1160
1173 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] 1161 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity]
1174 public static extern int GeomTransformGetInfo(IntPtr geom); 1162 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1175 1163
1176 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] 1164 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity]
1177 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); 1165 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius);
1178 1166
1179 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] 1167 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity]
1180 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); 1168 public static extern int GeomTransformGetCleanup(IntPtr geom);
1181 1169
1182 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] 1170 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity]
1183 public static extern void GeomTransformSetInfo(IntPtr geom, int info); 1171 public static extern IntPtr GeomTransformGetGeom(IntPtr geom);
1184 1172
1185 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1173 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity]
1186 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1174 public static extern int GeomTransformGetInfo(IntPtr geom);
1187 double[] vertices, int vertexStride, int vertexCount,
1188 int[] indices, int indexCount, int triStride);
1189 1175
1190 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1176 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity]
1191 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1177 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode);
1192 IntPtr vertices, int vertexStride, int vertexCount,
1193 IntPtr indices, int indexCount, int triStride);
1194 1178
1195 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1179 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity]
1196 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, 1180 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj);
1197 double[] vertices, int vertexStride, int vertexCount,
1198 int[] indices, int indexCount, int triStride,
1199 double[] normals);
1200 1181
1201 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1182 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity]
1202 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1183 public static extern void GeomTransformSetInfo(IntPtr geom, int info);
1203 IntPtr vertices, int vertexStride, int vertexCount,
1204 IntPtr indices, int indexCount, int triStride,
1205 IntPtr normals);
1206 1184
1207 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1185 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1208 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1186 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1209 dReal[] vertices, int vertexStride, int vertexCount, 1187 double[] vertices, int vertexStride, int vertexCount,
1210 int[] indices, int indexCount, int triStride); 1188 int[] indices, int indexCount, int triStride);
1211 1189
1212 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1190 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1213 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1191 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1214 IntPtr vertices, int vertexStride, int vertexCount, 1192 IntPtr vertices, int vertexStride, int vertexCount,
1215 IntPtr indices, int indexCount, int triStride); 1193 IntPtr indices, int indexCount, int triStride);
1216 1194
1217 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1195 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1218 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1196 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d,
1219 dReal[] vertices, int vertexStride, int vertexCount, 1197 double[] vertices, int vertexStride, int vertexCount,
1220 int[] indices, int indexCount, int triStride, 1198 int[] indices, int indexCount, int triStride,
1221 dReal[] normals); 1199 double[] normals);
1222 1200
1223 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1201 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1224 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1202 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1225 IntPtr vertices, int vertexStride, int vertexCount, 1203 IntPtr vertices, int vertexStride, int vertexCount,
1226 IntPtr indices, int indexCount, int triStride, 1204 IntPtr indices, int indexCount, int triStride,
1227 IntPtr normals); 1205 IntPtr normals);
1228 1206
1229 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1207 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1230 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1208 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1231 float[] vertices, int vertexStride, int vertexCount, 1209 dReal[] vertices, int vertexStride, int vertexCount,
1232 int[] indices, int indexCount, int triStride); 1210 int[] indices, int indexCount, int triStride);
1233 1211
1234 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1212 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1235 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1213 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1236 IntPtr vertices, int vertexStride, int vertexCount, 1214 IntPtr vertices, int vertexStride, int vertexCount,
1237 IntPtr indices, int indexCount, int triStride); 1215 IntPtr indices, int indexCount, int triStride);
1238 1216
1239 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1217 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1240 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1218 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1241 float[] vertices, int vertexStride, int vertexCount, 1219 dReal[] vertices, int vertexStride, int vertexCount,
1242 int[] indices, int indexCount, int triStride, 1220 int[] indices, int indexCount, int triStride,
1243 float[] normals); 1221 dReal[] normals);
1244 1222
1245 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1223 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1246 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1224 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1247 IntPtr vertices, int vertexStride, int vertexCount, 1225 IntPtr vertices, int vertexStride, int vertexCount,
1248 IntPtr indices, int indexCount, int triStride, 1226 IntPtr indices, int indexCount, int triStride,
1249 IntPtr normals); 1227 IntPtr normals);
1250 1228
1251 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] 1229 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1252 public static extern void GeomTriMeshClearTCCache(IntPtr g); 1230 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1231 float[] vertices, int vertexStride, int vertexCount,
1232 int[] indices, int indexCount, int triStride);
1253 1233
1254 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] 1234 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1255 public static extern IntPtr GeomTriMeshDataCreate(); 1235 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1236 IntPtr vertices, int vertexStride, int vertexCount,
1237 IntPtr indices, int indexCount, int triStride);
1256 1238
1257 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] 1239 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1258 public static extern void GeomTriMeshDataDestroy(IntPtr d); 1240 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1241 float[] vertices, int vertexStride, int vertexCount,
1242 int[] indices, int indexCount, int triStride,
1243 float[] normals);
1259 1244
1260 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] 1245 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1261 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); 1246 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1247 IntPtr vertices, int vertexStride, int vertexCount,
1248 IntPtr indices, int indexCount, int triStride,
1249 IntPtr normals);
1262 1250
1263 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] 1251 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity]
1264 public static extern void GeomTriMeshDataPreprocess(IntPtr d); 1252 public static extern void GeomTriMeshClearTCCache(IntPtr g);
1265 1253
1266 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] 1254 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity]
1267 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); 1255 public static extern IntPtr GeomTriMeshDataCreate();
1268 1256
1269 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] 1257 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity]
1270 public static extern void GeomTriMeshDataUpdate(IntPtr d); 1258 public static extern void GeomTriMeshDataDestroy(IntPtr d);
1271 1259
1272 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] 1260 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity]
1273 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); 1261 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id);
1274 1262
1275 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] 1263 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity]
1276 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); 1264 public static extern void GeomTriMeshDataPreprocess(IntPtr d);
1277 1265
1278 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] 1266 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity]
1279 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); 1267 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data);
1280 1268
1281 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] 1269 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity]
1282 public static extern IntPtr GeomTriMeshGetData(IntPtr g); 1270 public static extern void GeomTriMeshDataUpdate(IntPtr d);
1283 1271
1284 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] 1272 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity]
1285 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); 1273 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable);
1286 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) 1274
1287 { 1275 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity]
1288 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } 1276 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g);
1289 } 1277
1278 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity]
1279 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g);
1280
1281 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity]
1282 public static extern IntPtr GeomTriMeshGetData(IntPtr g);
1283
1284 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity]
1285 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom);
1286 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom)
1287 {
1288 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); }
1289 }
1290 1290
1291 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] 1291 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity]
1292 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); 1292 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec);
1293 1293
1294 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] 1294 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity]
1295 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); 1295 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g);
1296 1296
1297 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] 1297 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity]
1298 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); 1298 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2);
1299 1299
1300 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] 1300 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity]
1301 public extern static int GeomTriMeshGetTriangleCount(IntPtr g); 1301 public extern static int GeomTriMeshGetTriangleCount(IntPtr g);
1302 1302
1303 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] 1303 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity]
1304 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); 1304 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g);
1305 1305
1306 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] 1306 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity]
1307 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); 1307 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass);
1308 1308
1309 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] 1309 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity]
1310 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); 1310 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback);
1311 1311
1312 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] 1312 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity]
1313 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); 1313 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback);
1314 1314
1315 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] 1315 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity]
1316 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); 1316 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data);
1317 1317
1318 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1318 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1319 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); 1319 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans);
1320 1320
1321 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1321 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1322 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); 1322 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00);
1323 1323
1324 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] 1324 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity]
1325 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); 1325 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback);
@@ -1334,416 +1334,416 @@ namespace OpenSim.Region.PhysicsModule.ODE
1334 return s; 1334 return s;
1335 } 1335 }
1336 1336
1337 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] 1337 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity]
1338 public static extern IntPtr HashSpaceCreate(IntPtr space); 1338 public static extern IntPtr HashSpaceCreate(IntPtr space);
1339 1339
1340 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] 1340 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity]
1341 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); 1341 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel);
1342 1342
1343 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] 1343 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity]
1344 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); 1344 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel);
1345 1345
1346 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] 1346 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity]
1347 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); 1347 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb);
1348 1348
1349 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] 1349 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity]
1350 public static extern void InitODE(); 1350 public static extern void InitODE();
1351 1351
1352 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] 1352 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity]
1353 public static extern int InitODE2(uint ODEInitFlags); 1353 public static extern int InitODE2(uint ODEInitFlags);
1354 1354
1355 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] 1355 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity]
1356 public static extern int IsPositiveDefinite(ref dReal A, int n); 1356 public static extern int IsPositiveDefinite(ref dReal A, int n);
1357 1357
1358 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] 1358 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity]
1359 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); 1359 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n);
1360 1360
1361 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] 1361 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity]
1362 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); 1362 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3);
1363 1363
1364 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] 1364 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity]
1365 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); 1365 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque);
1366 1366
1367 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] 1367 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity]
1368 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); 1368 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2);
1369 1369
1370 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] 1370 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity]
1371 public static extern void JointAddPRTorque(IntPtr joint, dReal torque); 1371 public static extern void JointAddPRTorque(IntPtr joint, dReal torque);
1372 1372
1373 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] 1373 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity]
1374 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); 1374 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2);
1375 1375
1376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] 1376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity]
1377 public static extern void JointAddSliderForce(IntPtr joint, dReal force); 1377 public static extern void JointAddSliderForce(IntPtr joint, dReal force);
1378 1378
1379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] 1379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity]
1380 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); 1380 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2);
1381 1381
1382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] 1382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity]
1383 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); 1383 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group);
1384 1384
1385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] 1385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity]
1386 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); 1386 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group);
1387 1387
1388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1389 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); 1389 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact);
1390 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1390 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1391 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); 1391 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact);
1392 1392
1393 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] 1393 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity]
1394 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); 1394 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group);
1395 1395
1396 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] 1396 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity]
1397 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); 1397 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group);
1398 1398
1399 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] 1399 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity]
1400 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); 1400 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group);
1401 1401
1402 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] 1402 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity]
1403 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); 1403 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group);
1404 1404
1405 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] 1405 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity]
1406 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); 1406 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group);
1407 1407
1408 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] 1408 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity]
1409 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); 1409 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group);
1410 1410
1411 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] 1411 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity]
1412 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); 1412 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group);
1413 1413
1414 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] 1414 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity]
1415 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); 1415 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group);
1416 1416
1417 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] 1417 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity]
1418 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); 1418 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group);
1419 1419
1420 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] 1420 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity]
1421 public static extern void JointDestroy(IntPtr j); 1421 public static extern void JointDestroy(IntPtr j);
1422 1422
1423 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1423 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1424 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); 1424 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum);
1425 1425
1426 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] 1426 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity]
1427 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); 1427 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum);
1428 1428
1429 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1429 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1430 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); 1430 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result);
1431 1431
1432 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] 1432 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity]
1433 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); 1433 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum);
1434 1434
1435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] 1435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity]
1436 public static extern int JointGetAMotorMode(IntPtr j); 1436 public static extern int JointGetAMotorMode(IntPtr j);
1437 1437
1438 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1438 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1439 public static extern int JointGetAMotorNumAxes(IntPtr j); 1439 public static extern int JointGetAMotorNumAxes(IntPtr j);
1440 1440
1441 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] 1441 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity]
1442 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); 1442 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter);
1443 1443
1444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] 1444 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity]
1445 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); 1445 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result);
1446 1446
1447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1447 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1448 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); 1448 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result);
1449 1449
1450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] 1450 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity]
1451 public static extern IntPtr JointGetBody(IntPtr j); 1451 public static extern IntPtr JointGetBody(IntPtr j);
1452 1452
1453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] 1453 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity]
1454 public static extern IntPtr JointGetData(IntPtr j); 1454 public static extern IntPtr JointGetData(IntPtr j);
1455 1455
1456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] 1456 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity]
1457 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); 1457 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j);
1458 public static JointFeedback JointGetFeedback(IntPtr j) 1458 public static JointFeedback JointGetFeedback(IntPtr j)
1459 { 1459 {
1460 unsafe { return *(JointGetFeedbackUnsafe(j)); } 1460 unsafe { return *(JointGetFeedbackUnsafe(j)); }
1461 } 1461 }
1462 1462
1463 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1463 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1464 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); 1464 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result);
1465 1465
1466 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] 1466 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity]
1467 public static extern dReal JointGetHingeAngle(IntPtr j); 1467 public static extern dReal JointGetHingeAngle(IntPtr j);
1468 1468
1469 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] 1469 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity]
1470 public static extern dReal JointGetHingeAngleRate(IntPtr j); 1470 public static extern dReal JointGetHingeAngleRate(IntPtr j);
1471 1471
1472 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] 1472 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity]
1473 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); 1473 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result);
1474 1474
1475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] 1475 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity]
1476 public static extern dReal JointGetHingeParam(IntPtr j, int parameter); 1476 public static extern dReal JointGetHingeParam(IntPtr j, int parameter);
1477 1477
1478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] 1478 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity]
1479 public static extern dReal JointGetHinge2Angle1(IntPtr j); 1479 public static extern dReal JointGetHinge2Angle1(IntPtr j);
1480 1480
1481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] 1481 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity]
1482 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); 1482 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j);
1483 1483
1484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] 1484 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity]
1485 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); 1485 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j);
1486 1486
1487 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] 1487 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity]
1488 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); 1488 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result);
1489 1489
1490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1491 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); 1491 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result);
1492 1492
1493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] 1493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity]
1494 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); 1494 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result);
1495 1495
1496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1497 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); 1497 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result);
1498 1498
1499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1500 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); 1500 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result);
1501 1501
1502 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] 1502 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity]
1503 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); 1503 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter);
1504 1504
1505 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1505 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1506 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); 1506 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result);
1507 1507
1508 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1508 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1509 public static extern int JointGetLMotorNumAxes(IntPtr j); 1509 public static extern int JointGetLMotorNumAxes(IntPtr j);
1510 1510
1511 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] 1511 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity]
1512 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); 1512 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter);
1513 1513
1514 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] 1514 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity]
1515 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); 1515 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result);
1516 1516
1517 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] 1517 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity]
1518 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); 1518 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result);
1519 1519
1520 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] 1520 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity]
1521 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); 1521 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result);
1522 1522
1523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] 1523 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity]
1524 public static extern dReal JointGetPRParam(IntPtr j, int parameter); 1524 public static extern dReal JointGetPRParam(IntPtr j, int parameter);
1525 1525
1526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] 1526 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity]
1527 public static extern dReal JointGetPRPosition(IntPtr j); 1527 public static extern dReal JointGetPRPosition(IntPtr j);
1528 1528
1529 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] 1529 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity]
1530 public static extern dReal JointGetPRPositionRate(IntPtr j); 1530 public static extern dReal JointGetPRPositionRate(IntPtr j);
1531 1531
1532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] 1532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity]
1533 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); 1533 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result);
1534 1534
1535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] 1535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity]
1536 public static extern dReal JointGetSliderParam(IntPtr j, int parameter); 1536 public static extern dReal JointGetSliderParam(IntPtr j, int parameter);
1537 1537
1538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] 1538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity]
1539 public static extern dReal JointGetSliderPosition(IntPtr j); 1539 public static extern dReal JointGetSliderPosition(IntPtr j);
1540 1540
1541 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] 1541 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity]
1542 public static extern dReal JointGetSliderPositionRate(IntPtr j); 1542 public static extern dReal JointGetSliderPositionRate(IntPtr j);
1543 1543
1544 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] 1544 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity]
1545 public static extern JointType JointGetType(IntPtr j); 1545 public static extern JointType JointGetType(IntPtr j);
1546 1546
1547 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1547 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1548 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); 1548 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result);
1549 1549
1550 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] 1550 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity]
1551 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); 1551 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result);
1552 1552
1553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] 1553 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity]
1554 public static extern dReal JointGetUniversalAngle1(IntPtr j); 1554 public static extern dReal JointGetUniversalAngle1(IntPtr j);
1555 1555
1556 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] 1556 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity]
1557 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); 1557 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j);
1558 1558
1559 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] 1559 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity]
1560 public static extern dReal JointGetUniversalAngle2(IntPtr j); 1560 public static extern dReal JointGetUniversalAngle2(IntPtr j);
1561 1561
1562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] 1562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity]
1563 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); 1563 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j);
1564 1564
1565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] 1565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity]
1566 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); 1566 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2);
1567 1567
1568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1569 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); 1569 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result);
1570 1570
1571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1572 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); 1572 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result);
1573 1573
1574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] 1574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity]
1575 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); 1575 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter);
1576 1576
1577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] 1577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity]
1578 public static extern IntPtr JointGroupCreate(int max_size); 1578 public static extern IntPtr JointGroupCreate(int max_size);
1579 1579
1580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] 1580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity]
1581 public static extern void JointGroupDestroy(IntPtr group); 1581 public static extern void JointGroupDestroy(IntPtr group);
1582 1582
1583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] 1583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity]
1584 public static extern void JointGroupEmpty(IntPtr group); 1584 public static extern void JointGroupEmpty(IntPtr group);
1585 1585
1586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1587 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); 1587 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle);
1588 1588
1589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1590 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1590 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1591 1591
1592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] 1592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity]
1593 public static extern void JointSetAMotorMode(IntPtr j, int mode); 1593 public static extern void JointSetAMotorMode(IntPtr j, int mode);
1594 1594
1595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1596 public static extern void JointSetAMotorNumAxes(IntPtr group, int num); 1596 public static extern void JointSetAMotorNumAxes(IntPtr group, int num);
1597 1597
1598 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] 1598 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity]
1599 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); 1599 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value);
1600 1600
1601 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] 1601 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity]
1602 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); 1602 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z);
1603 1603
1604 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1604 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1605 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); 1605 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z);
1606 1606
1607 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] 1607 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity]
1608 public static extern void JointSetData(IntPtr j, IntPtr data); 1608 public static extern void JointSetData(IntPtr j, IntPtr data);
1609 1609
1610 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] 1610 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity]
1611 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); 1611 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback);
1612 1612
1613 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] 1613 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity]
1614 public static extern void JointSetFixed(IntPtr j); 1614 public static extern void JointSetFixed(IntPtr j);
1615 1615
1616 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1616 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1617 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); 1617 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z);
1618 1618
1619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] 1619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity]
1620 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1620 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1621 1621
1622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] 1622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity]
1623 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); 1623 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z);
1624 1624
1625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] 1625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity]
1626 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); 1626 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value);
1627 1627
1628 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1628 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1629 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); 1629 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z);
1630 1630
1631 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1631 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1632 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); 1632 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z);
1633 1633
1634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1634 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1635 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); 1635 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z);
1636 1636
1637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] 1637 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity]
1638 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); 1638 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value);
1639 1639
1640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1640 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1641 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1641 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1642 1642
1643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1643 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1644 public static extern void JointSetLMotorNumAxes(IntPtr j, int num); 1644 public static extern void JointSetLMotorNumAxes(IntPtr j, int num);
1645 1645
1646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] 1646 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity]
1647 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); 1647 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value);
1648 1648
1649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] 1649 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity]
1650 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); 1650 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value);
1651 1651
1652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] 1652 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity]
1653 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); 1653 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value);
1654 1654
1655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] 1655 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity]
1656 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); 1656 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value);
1657 1657
1658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] 1658 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity]
1659 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); 1659 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z);
1660 1660
1661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] 1661 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity]
1662 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); 1662 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z);
1663 1663
1664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] 1664 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity]
1665 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); 1665 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z);
1666 1666
1667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] 1667 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity]
1668 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); 1668 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value);
1669 1669
1670 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] 1670 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity]
1671 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); 1671 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z);
1672 1672
1673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] 1673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity]
1674 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1674 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1675 1675
1676 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] 1676 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity]
1677 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); 1677 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value);
1678 1678
1679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1679 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1680 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); 1680 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z);
1681 1681
1682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1682 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1683 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); 1683 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z);
1684 1684
1685 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1685 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1686 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); 1686 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z);
1687 1687
1688 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] 1688 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity]
1689 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); 1689 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value);
1690 1690
1691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] 1691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity]
1692 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); 1692 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip);
1693 1693
1694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] 1694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity]
1695 public static extern void MassAdd(ref Mass a, ref Mass b); 1695 public static extern void MassAdd(ref Mass a, ref Mass b);
1696 1696
1697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] 1697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity]
1698 public static extern void MassAdjust(ref Mass m, dReal newmass); 1698 public static extern void MassAdjust(ref Mass m, dReal newmass);
1699 1699
1700 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] 1700 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity]
1701 public static extern bool MassCheck(ref Mass m); 1701 public static extern bool MassCheck(ref Mass m);
1702 1702
1703 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1703 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1704 public static extern void MassRotate(ref Mass mass, ref Matrix3 R); 1704 public static extern void MassRotate(ref Mass mass, ref Matrix3 R);
1705 1705
1706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1706 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1707 public static extern void MassRotate(ref Mass mass, ref dReal M00); 1707 public static extern void MassRotate(ref Mass mass, ref dReal M00);
1708 1708
1709 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] 1709 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity]
1710 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); 1710 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz);
1711 1711
1712 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] 1712 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity]
1713 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); 1713 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz);
1714 1714
1715 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] 1715 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity]
1716 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1716 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1717 1717
1718 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] 1718 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity]
1719 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1719 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1720 1720
1721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] 1721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity]
1722 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1722 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1723 1723
1724 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] 1724 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity]
1725 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1725 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1726 1726
1727 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] 1727 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity]
1728 public static extern void MassSetParameters(out Mass mass, dReal themass, 1728 public static extern void MassSetParameters(out Mass mass, dReal themass,
1729 dReal cgx, dReal cgy, dReal cgz, 1729 dReal cgx, dReal cgy, dReal cgz,
1730 dReal i11, dReal i22, dReal i33, 1730 dReal i11, dReal i22, dReal i33,
1731 dReal i12, dReal i13, dReal i23); 1731 dReal i12, dReal i13, dReal i23);
1732 1732
1733 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] 1733 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity]
1734 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); 1734 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius);
1735 1735
1736 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] 1736 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity]
1737 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); 1737 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius);
1738 1738
1739 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] 1739 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity]
1740 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); 1740 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g);
1741 1741
1742 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] 1742 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity]
1743 public static extern void MassSetZero(out Mass mass); 1743 public static extern void MassSetZero(out Mass mass);
1744 1744
1745 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] 1745 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity]
1746 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); 1746 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z);
1747 1747
1748 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] 1748 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
1749 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1749 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
@@ -1755,119 +1755,119 @@ namespace OpenSim.Region.PhysicsModule.ODE
1755 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); 1755 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1);
1756 } 1756 }
1757 1757
1758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] 1758 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity]
1759 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1759 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1760 1760
1761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] 1761 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity]
1762 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1762 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1763 1763
1764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1764 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1765 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); 1765 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle);
1766 1766
1767 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] 1767 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity]
1768 public static extern void QfromR(out Quaternion q, ref Matrix3 R); 1768 public static extern void QfromR(out Quaternion q, ref Matrix3 R);
1769 1769
1770 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] 1770 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity]
1771 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1771 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1772 1772
1773 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] 1773 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity]
1774 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1774 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1775 1775
1776 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] 1776 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity]
1777 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1777 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1778 1778
1779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] 1779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity]
1780 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1780 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1781 1781
1782 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] 1782 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity]
1783 public static extern void QSetIdentity(out Quaternion q); 1783 public static extern void QSetIdentity(out Quaternion q);
1784 1784
1785 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1785 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1786 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); 1786 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth);
1787 1787
1788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1788 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1789 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); 1789 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth);
1790 1790
1791 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] 1791 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity]
1792 public static extern dReal RandReal(); 1792 public static extern dReal RandReal();
1793 1793
1794 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] 1794 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity]
1795 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); 1795 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz);
1796 1796
1797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1797 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1798 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); 1798 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle);
1799 1799
1800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] 1800 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity]
1801 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); 1801 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi);
1802 1802
1803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] 1803 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity]
1804 public static extern void RfromQ(out Matrix3 R, ref Quaternion q); 1804 public static extern void RfromQ(out Matrix3 R, ref Quaternion q);
1805 1805
1806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] 1806 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity]
1807 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); 1807 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az);
1808 1808
1809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] 1809 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity]
1810 public static extern void RSetIdentity(out Matrix3 R); 1810 public static extern void RSetIdentity(out Matrix3 R);
1811 1811
1812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] 1812 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity]
1813 public static extern void SetValue(out dReal a, int n); 1813 public static extern void SetValue(out dReal a, int n);
1814 1814
1815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] 1815 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity]
1816 public static extern void SetZero(out dReal a, int n); 1816 public static extern void SetZero(out dReal a, int n);
1817 1817
1818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] 1818 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity]
1819 public static extern IntPtr SimpleSpaceCreate(IntPtr space); 1819 public static extern IntPtr SimpleSpaceCreate(IntPtr space);
1820 1820
1821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] 1821 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity]
1822 public static extern void SolveCholesky(ref dReal L, out dReal b, int n); 1822 public static extern void SolveCholesky(ref dReal L, out dReal b, int n);
1823 1823
1824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] 1824 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity]
1825 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); 1825 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip);
1826 1826
1827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] 1827 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity]
1828 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); 1828 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip);
1829 1829
1830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] 1830 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity]
1831 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); 1831 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip);
1832 1832
1833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] 1833 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity]
1834 public static extern void SpaceAdd(IntPtr space, IntPtr geom); 1834 public static extern void SpaceAdd(IntPtr space, IntPtr geom);
1835 1835
1836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] 1836 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity]
1837 public static extern bool SpaceLockQuery(IntPtr space); 1837 public static extern bool SpaceLockQuery(IntPtr space);
1838 1838
1839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] 1839 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity]
1840 public static extern void SpaceClean(IntPtr space); 1840 public static extern void SpaceClean(IntPtr space);
1841 1841
1842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] 1842 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity]
1843 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); 1843 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback);
1844 1844
1845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] 1845 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity]
1846 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); 1846 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback);
1847 1847
1848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] 1848 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity]
1849 public static extern void SpaceDestroy(IntPtr space); 1849 public static extern void SpaceDestroy(IntPtr space);
1850 1850
1851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] 1851 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity]
1852 public static extern bool SpaceGetCleanup(IntPtr space); 1852 public static extern bool SpaceGetCleanup(IntPtr space);
1853 1853
1854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] 1854 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity]
1855 public static extern int SpaceGetNumGeoms(IntPtr space); 1855 public static extern int SpaceGetNumGeoms(IntPtr space);
1856 1856
1857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] 1857 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity]
1858 public static extern IntPtr SpaceGetGeom(IntPtr space, int i); 1858 public static extern IntPtr SpaceGetGeom(IntPtr space, int i);
1859 1859
1860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] 1860 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity]
1861 public static extern int SpaceGetSublevel(IntPtr space); 1861 public static extern int SpaceGetSublevel(IntPtr space);
1862 1862
1863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] 1863 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity]
1864 public static extern bool SpaceQuery(IntPtr space, IntPtr geom); 1864 public static extern bool SpaceQuery(IntPtr space, IntPtr geom);
1865 1865
1866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] 1866 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity]
1867 public static extern void SpaceRemove(IntPtr space, IntPtr geom); 1867 public static extern void SpaceRemove(IntPtr space, IntPtr geom);
1868 1868
1869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] 1869 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity]
1870 public static extern void SpaceSetCleanup(IntPtr space, bool mode); 1870 public static extern void SpaceSetCleanup(IntPtr space, bool mode);
1871 1871
1872 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] 1872 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity]
1873 public static extern void SpaceSetSublevel(IntPtr space, int sublevel); 1873 public static extern void SpaceSetSublevel(IntPtr space, int sublevel);
@@ -1875,53 +1875,53 @@ namespace OpenSim.Region.PhysicsModule.ODE
1875 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] 1875 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity]
1876 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); 1876 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder);
1877 1877
1878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] 1878 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity]
1879 public static extern void VectorScale(out dReal a, ref dReal d, int n); 1879 public static extern void VectorScale(out dReal a, ref dReal d, int n);
1880 1880
1881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] 1881 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity]
1882 public static extern IntPtr WorldCreate(); 1882 public static extern IntPtr WorldCreate();
1883 1883
1884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] 1884 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity]
1885 public static extern void WorldDestroy(IntPtr world); 1885 public static extern void WorldDestroy(IntPtr world);
1886 1886
1887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1887 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1888 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); 1888 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world);
1889 1889
1890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1890 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1891 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); 1891 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world);
1892 1892
1893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1893 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1894 public static extern bool WorldGetAutoDisableFlag(IntPtr world); 1894 public static extern bool WorldGetAutoDisableFlag(IntPtr world);
1895 1895
1896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1896 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1897 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); 1897 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world);
1898 1898
1899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1899 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1900 public static extern int WorldGetAutoDisableSteps(IntPtr world); 1900 public static extern int WorldGetAutoDisableSteps(IntPtr world);
1901 1901
1902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1902 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1903 public static extern dReal WorldGetAutoDisableTime(IntPtr world); 1903 public static extern dReal WorldGetAutoDisableTime(IntPtr world);
1904 1904
1905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1905 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1906 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); 1906 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world);
1907 1907
1908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] 1908 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity]
1909 public static extern dReal WorldGetCFM(IntPtr world); 1909 public static extern dReal WorldGetCFM(IntPtr world);
1910 1910
1911 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] 1911 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity]
1912 public static extern dReal WorldGetERP(IntPtr world); 1912 public static extern dReal WorldGetERP(IntPtr world);
1913 1913
1914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1915 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); 1915 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity);
1916 1916
1917 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1917 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1918 public static extern void WorldGetGravity(IntPtr world, out dReal X); 1918 public static extern void WorldGetGravity(IntPtr world, out dReal X);
1919 1919
1920 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1920 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1921 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); 1921 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world);
1922 1922
1923 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1923 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1924 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); 1924 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world);
1925 1925
1926 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] 1926 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity]
1927 public static extern dReal WorldGetAngularDamping(IntPtr world); 1927 public static extern dReal WorldGetAngularDamping(IntPtr world);
@@ -1935,23 +1935,23 @@ namespace OpenSim.Region.PhysicsModule.ODE
1935 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 1935 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
1936 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); 1936 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world);
1937 1937
1938 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 1938 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
1939 public static extern int WorldGetQuickStepNumIterations(IntPtr world); 1939 public static extern int WorldGetQuickStepNumIterations(IntPtr world);
1940 1940
1941 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] 1941 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity]
1942 public static extern dReal WorldGetQuickStepW(IntPtr world); 1942 public static extern dReal WorldGetQuickStepW(IntPtr world);
1943 1943
1944 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 1944 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
1945 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); 1945 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world);
1946 1946
1947 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1947 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1948 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); 1948 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force);
1949 1949
1950 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1950 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1951 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); 1951 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX);
1952 1952
1953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] 1953 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity]
1954 public static extern void WorldQuickStep(IntPtr world, dReal stepsize); 1954 public static extern void WorldQuickStep(IntPtr world, dReal stepsize);
1955 1955
1956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] 1956 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity]
1957 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); 1957 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale);
@@ -1959,67 +1959,67 @@ namespace OpenSim.Region.PhysicsModule.ODE
1959 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 1959 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
1960 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); 1960 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold);
1961 1961
1962 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1962 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1963 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); 1963 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold);
1964 1964
1965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1966 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); 1966 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count);
1967 1967
1968 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1968 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1969 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); 1969 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable);
1970 1970
1971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1971 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1972 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); 1972 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold);
1973 1973
1974 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1974 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1975 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); 1975 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps);
1976 1976
1977 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1977 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1978 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); 1978 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time);
1979 1979
1980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1981 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); 1981 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth);
1982 1982
1983 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] 1983 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity]
1984 public static extern void WorldSetCFM(IntPtr world, dReal cfm); 1984 public static extern void WorldSetCFM(IntPtr world, dReal cfm);
1985 1985
1986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1986 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1987 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); 1987 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel);
1988 1988
1989 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1989 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1990 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); 1990 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth);
1991 1991
1992 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] 1992 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity]
1993 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); 1993 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale);
1994 1994
1995 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] 1995 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity]
1996 public static extern void WorldSetERP(IntPtr world, dReal erp); 1996 public static extern void WorldSetERP(IntPtr world, dReal erp);
1997
1998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1999 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1997 2000
1998 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1999 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
2000
2001 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] 2001 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity]
2002 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); 2002 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale);
2003 2003
2004 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 2004 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
2005 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); 2005 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold);
2006 2006
2007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 2007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
2008 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); 2008 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num);
2009 2009
2010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] 2010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity]
2011 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); 2011 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation);
2012 2012
2013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 2013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
2014 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); 2014 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed);
2015 2015
2016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] 2016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity]
2017 public static extern void WorldStep(IntPtr world, dReal stepsize); 2017 public static extern void WorldStep(IntPtr world, dReal stepsize);
2018 2018
2019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] 2019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity]
2020 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); 2020 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations);
2021 2021
2022 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] 2022 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity]
2023 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); 2023 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix);
2024 } 2024 }
2025} 2025}
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
index aaf90f2..98bfd1c 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODECharacter.cs
@@ -149,7 +149,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
149 /// Collision geometry 149 /// Collision geometry
150 /// </summary> 150 /// </summary>
151 internal IntPtr Shell { get; private set; } 151 internal IntPtr Shell { get; private set; }
152 152
153 private IntPtr Amotor = IntPtr.Zero; 153 private IntPtr Amotor = IntPtr.Zero;
154 private d.Mass ShellMass; 154 private d.Mass ShellMass;
155 155
@@ -237,7 +237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
237 m_tainted_isPhysical = true; // new tainted status: need to create ODE information 237 m_tainted_isPhysical = true; // new tainted status: need to create ODE information
238 238
239 _parent_scene.AddPhysicsActorTaint(this); 239 _parent_scene.AddPhysicsActorTaint(this);
240 240
241 Name = avName; 241 Name = avName;
242 } 242 }
243 243
@@ -461,7 +461,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
461 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; 461 value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5;
462 } 462 }
463 463
464 m_taintPosition = value; 464 m_taintPosition = value;
465 _parent_scene.AddPhysicsActorTaint(this); 465 _parent_scene.AddPhysicsActorTaint(this);
466 } 466 }
467 else 467 else
@@ -796,7 +796,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
796 internal void Move(List<OdeCharacter> defects) 796 internal void Move(List<OdeCharacter> defects)
797 { 797 {
798 // no lock; for now it's only called from within Simulate() 798 // no lock; for now it's only called from within Simulate()
799 799
800 // If the PID Controller isn't active then we set our force 800 // If the PID Controller isn't active then we set our force
801 // calculating base velocity to the current position 801 // calculating base velocity to the current position
802 802
@@ -811,7 +811,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
811 811
812 d.Vector3 localpos = d.BodyGetPosition(Body); 812 d.Vector3 localpos = d.BodyGetPosition(Body);
813 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z); 813 Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z);
814 814
815 if (!localPos.IsFinite()) 815 if (!localPos.IsFinite())
816 { 816 {
817 m_log.WarnFormat( 817 m_log.WarnFormat(
@@ -1248,10 +1248,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1248 } 1248 }
1249 1249
1250 public override Vector3 PIDTarget { set { return; } } 1250 public override Vector3 PIDTarget { set { return; } }
1251 public override bool PIDActive 1251 public override bool PIDActive
1252 { 1252 {
1253 get { return false; } 1253 get { return false; }
1254 set { return; } 1254 set { return; }
1255 } 1255 }
1256 public override float PIDTau { set { return; } } 1256 public override float PIDTau { set { return; } }
1257 1257
@@ -1259,7 +1259,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1259 public override bool PIDHoverActive {get {return false;} set { return; } } 1259 public override bool PIDHoverActive {get {return false;} set { return; } }
1260 public override PIDHoverType PIDHoverType { set { return; } } 1260 public override PIDHoverType PIDHoverType { set { return; } }
1261 public override float PIDHoverTau { set { return; } } 1261 public override float PIDHoverTau { set { return; } }
1262 1262
1263 public override Quaternion APIDTarget{ set { return; } } 1263 public override Quaternion APIDTarget{ set { return; } }
1264 1264
1265 public override bool APIDActive{ set { return; } } 1265 public override bool APIDActive{ set { return; } }
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1369// m_log.DebugFormat( 1369// m_log.DebugFormat(
1370// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}", 1370// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}",
1371// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name); 1371// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name);
1372 1372
1373 m_pidControllerActive = true; 1373 m_pidControllerActive = true;
1374 1374
1375 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate() 1375 // no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate()
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
index ff19384..7e95d7f 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEDynamics.cs
@@ -914,7 +914,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
914 914
915 // Sum velocities 915 // Sum velocities
916 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection 916 m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection
917 917
918 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0) 918 if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0)
919 { 919 {
920 m_lastAngularVelocity.X = 0; 920 m_lastAngularVelocity.X = 0;
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
index d61ee61..22fc84d 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEModule.cs
@@ -9,14 +9,14 @@ using OpenSim.Region.Framework.Interfaces;
9 9
10namespace OpenSim.Region.PhysicsModule.ODE 10namespace OpenSim.Region.PhysicsModule.ODE
11{ 11{
12 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")] 12 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")]
13 public class OdeModule : INonSharedRegionModule 13 public class OdeModule : INonSharedRegionModule
14 { 14 {
15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
16 16
17 private bool m_Enabled = false; 17 private bool m_Enabled = false;
18 private IConfigSource m_config; 18 private IConfigSource m_config;
19 private OdeScene m_scene; 19 private OdeScene m_scene;
20 20
21 #region INonSharedRegionModule 21 #region INonSharedRegionModule
22 22
@@ -84,6 +84,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
84 84
85 m_scene.RegionLoaded(); 85 m_scene.RegionLoaded();
86 } 86 }
87 #endregion 87 #endregion
88 } 88 }
89} 89}
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
index 36546aa..8934330 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
@@ -33,7 +33,7 @@
33 * ODEDynamics.cs contains methods dealing with Prim Physical motion 33 * ODEDynamics.cs contains methods dealing with Prim Physical motion
34 * (dynamics) and the associated settings. Old Linear and angular 34 * (dynamics) and the associated settings. Old Linear and angular
35 * motors for dynamic motion have been replace with MoveLinear() 35 * motors for dynamic motion have been replace with MoveLinear()
36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic 36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic
37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to 37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
38 * switch between 'VEHICLE' parameter use and general dynamics 38 * switch between 'VEHICLE' parameter use and general dynamics
39 * settings use. 39 * settings use.
@@ -133,7 +133,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
133 private float m_targetHoverHeight; 133 private float m_targetHoverHeight;
134 private float m_groundHeight; 134 private float m_groundHeight;
135 private float m_waterHeight; 135 private float m_waterHeight;
136 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 136 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
137 137
138 // private float m_tensor = 5f; 138 // private float m_tensor = 5f;
139 private int body_autodisable_frames = 20; 139 private int body_autodisable_frames = 20;
@@ -170,7 +170,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
170 170
171 private PrimitiveBaseShape _pbs; 171 private PrimitiveBaseShape _pbs;
172 private OdeScene _parent_scene; 172 private OdeScene _parent_scene;
173 173
174 /// <summary> 174 /// <summary>
175 /// The physics space which contains prim geometries 175 /// The physics space which contains prim geometries
176 /// </summary> 176 /// </summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
443 443
444 d.BodySetAutoDisableFlag(Body, true); 444 d.BodySetAutoDisableFlag(Body, true);
445 d.BodySetAutoDisableSteps(Body, body_autodisable_frames); 445 d.BodySetAutoDisableSteps(Body, body_autodisable_frames);
446 446
447 // disconnect from world gravity so we can apply buoyancy 447 // disconnect from world gravity so we can apply buoyancy
448 d.BodySetGravityMode (Body, false); 448 d.BodySetGravityMode (Body, false);
449 449
@@ -474,8 +474,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
474 474
475 float returnMass = 0; 475 float returnMass = 0;
476 float hollowAmount = (float)_pbs.ProfileHollow * 2.0e-5f; 476 float hollowAmount = (float)_pbs.ProfileHollow * 2.0e-5f;
477 float hollowVolume = hollowAmount * hollowAmount; 477 float hollowVolume = hollowAmount * hollowAmount;
478 478
479 switch (_pbs.ProfileShape) 479 switch (_pbs.ProfileShape)
480 { 480 {
481 case ProfileShape.Square: 481 case ProfileShape.Square:
@@ -511,16 +511,16 @@ namespace OpenSim.Region.PhysicsModule.ODE
511 511
512 else if (_pbs.PathCurve == (byte)Extrusion.Curve1) 512 else if (_pbs.PathCurve == (byte)Extrusion.Curve1)
513 { 513 {
514 //a tube 514 //a tube
515 515
516 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX); 516 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX);
517 tmp= 1.0f -2.0e-2f * (float)(200 - _pbs.PathScaleY); 517 tmp= 1.0f -2.0e-2f * (float)(200 - _pbs.PathScaleY);
518 volume -= volume*tmp*tmp; 518 volume -= volume*tmp*tmp;
519 519
520 if (hollowAmount > 0.0) 520 if (hollowAmount > 0.0)
521 { 521 {
522 hollowVolume *= hollowAmount; 522 hollowVolume *= hollowAmount;
523 523
524 switch (_pbs.HollowShape) 524 switch (_pbs.HollowShape)
525 { 525 {
526 case HollowShape.Square: 526 case HollowShape.Square:
@@ -579,7 +579,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
579 volume *= 0.61685027506808491367715568749226e-2f * (float)(200 - _pbs.PathScaleX); 579 volume *= 0.61685027506808491367715568749226e-2f * (float)(200 - _pbs.PathScaleX);
580 tmp = 1.0f - .02f * (float)(200 - _pbs.PathScaleY); 580 tmp = 1.0f - .02f * (float)(200 - _pbs.PathScaleY);
581 volume *= (1.0f - tmp * tmp); 581 volume *= (1.0f - tmp * tmp);
582 582
583 if (hollowAmount > 0.0) 583 if (hollowAmount > 0.0)
584 { 584 {
585 585
@@ -845,7 +845,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
845 else 845 else
846 { 846 {
847 _parent_scene.DeactivatePrim(this); 847 _parent_scene.DeactivatePrim(this);
848 848
849 m_collisionCategories &= ~CollisionCategories.Body; 849 m_collisionCategories &= ~CollisionCategories.Body;
850 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land); 850 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land);
851 851
@@ -916,7 +916,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
916 else 916 else
917 { 917 {
918 _triMeshData = d.GeomTriMeshDataCreate(); 918 _triMeshData = d.GeomTriMeshDataCreate();
919 919
920 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride); 920 d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride);
921 d.GeomTriMeshDataPreprocess(_triMeshData); 921 d.GeomTriMeshDataPreprocess(_triMeshData);
922 m_MeshToTriMeshMap[mesh] = _triMeshData; 922 m_MeshToTriMeshMap[mesh] = _triMeshData;
@@ -974,7 +974,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
974 rotate(); 974 rotate();
975 } 975 }
976 } 976 }
977 977
978 if (m_taintPhysics != IsPhysical && !(m_taintparent != _parent)) 978 if (m_taintPhysics != IsPhysical && !(m_taintparent != _parent))
979 changePhysicsStatus(); 979 changePhysicsStatus();
980 980
@@ -1074,7 +1074,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1074 else if (_parent != null && m_taintparent == null) 1074 else if (_parent != null && m_taintparent == null)
1075 { 1075 {
1076//Console.WriteLine(" changelink B"); 1076//Console.WriteLine(" changelink B");
1077 1077
1078 if (_parent is OdePrim) 1078 if (_parent is OdePrim)
1079 { 1079 {
1080 OdePrim obj = (OdePrim)_parent; 1080 OdePrim obj = (OdePrim)_parent;
@@ -1082,16 +1082,16 @@ Console.WriteLine("ZProcessTaints for " + Name);
1082 childPrim = false; 1082 childPrim = false;
1083 //_parent = null; 1083 //_parent = null;
1084 } 1084 }
1085 1085
1086 /* 1086 /*
1087 if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0) 1087 if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0)
1088 d.JointGroupDestroy(_linkJointGroup); 1088 d.JointGroupDestroy(_linkJointGroup);
1089 1089
1090 _linkJointGroup = (IntPtr)0; 1090 _linkJointGroup = (IntPtr)0;
1091 m_linkJoint = (IntPtr)0; 1091 m_linkJoint = (IntPtr)0;
1092 */ 1092 */
1093 } 1093 }
1094 1094
1095 _parent = m_taintparent; 1095 _parent = m_taintparent;
1096 m_taintPhysics = IsPhysical; 1096 m_taintPhysics = IsPhysical;
1097 } 1097 }
@@ -1345,7 +1345,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1345 // in between the disabling and the collision properties setting 1345 // in between the disabling and the collision properties setting
1346 // which would wake the physical body up from a soft disabling and potentially cause it to fall 1346 // which would wake the physical body up from a soft disabling and potentially cause it to fall
1347 // through the ground. 1347 // through the ground.
1348 1348
1349 // NOTE FOR JOINTS: this doesn't always work for jointed assemblies because if you select 1349 // NOTE FOR JOINTS: this doesn't always work for jointed assemblies because if you select
1350 // just one part of the assembly, the rest of the assembly is non-selected and still simulating, 1350 // just one part of the assembly, the rest of the assembly is non-selected and still simulating,
1351 // so that causes the selected part to wake up and continue moving. 1351 // so that causes the selected part to wake up and continue moving.
@@ -1359,7 +1359,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1359 // e.g. we select 100 prims that are connected by joints. non-atomically, the first 50 are 1359 // e.g. we select 100 prims that are connected by joints. non-atomically, the first 50 are
1360 // selected and disabled. then, due to a thread switch, the selection processing is 1360 // selected and disabled. then, due to a thread switch, the selection processing is
1361 // interrupted and the physics engine continues to simulate, so the last 50 items, whose 1361 // interrupted and the physics engine continues to simulate, so the last 50 items, whose
1362 // selection was not yet processed, continues to simulate. this wakes up ALL of the 1362 // selection was not yet processed, continues to simulate. this wakes up ALL of the
1363 // first 50 again. then the last 50 are disabled. then the first 50, which were just woken 1363 // first 50 again. then the last 50 are disabled. then the first 50, which were just woken
1364 // up, start simulating again, which in turn wakes up the last 50. 1364 // up, start simulating again, which in turn wakes up the last 50.
1365 1365
@@ -1565,7 +1565,7 @@ Console.WriteLine("CreateGeom:");
1565 private void changeadd() 1565 private void changeadd()
1566 { 1566 {
1567// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name); 1567// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name);
1568 1568
1569 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 1569 int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
1570 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); 1570 IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
1571 1571
@@ -1711,10 +1711,10 @@ Console.WriteLine(" JointCreateFixed");
1711// fz = 0f; 1711// fz = 0f;
1712 //m_log.Info(m_collisionFlags.ToString()); 1712 //m_log.Info(m_collisionFlags.ToString());
1713 1713
1714 1714
1715 //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 1715 //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
1716 // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ?? 1716 // would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ??
1717 // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up 1717 // m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up
1718 // gravityz multiplier = 1 - m_buoyancy 1718 // gravityz multiplier = 1 - m_buoyancy
1719 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass; 1719 fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass;
1720 1720
@@ -1729,7 +1729,7 @@ Console.WriteLine(" JointCreateFixed");
1729 fz = 0f; 1729 fz = 0f;
1730 1730
1731 // no lock; for now it's only called from within Simulate() 1731 // no lock; for now it's only called from within Simulate()
1732 1732
1733 // If the PID Controller isn't active then we set our force 1733 // If the PID Controller isn't active then we set our force
1734 // calculating base velocity to the current position 1734 // calculating base velocity to the current position
1735 1735
@@ -1738,7 +1738,7 @@ Console.WriteLine(" JointCreateFixed");
1738 //PID_G = PID_G / m_PIDTau; 1738 //PID_G = PID_G / m_PIDTau;
1739 m_PIDTau = 1; 1739 m_PIDTau = 1;
1740 } 1740 }
1741 1741
1742 if ((PID_G - m_PIDTau) <= 0) 1742 if ((PID_G - m_PIDTau) <= 0)
1743 { 1743 {
1744 PID_G = m_PIDTau + 1; 1744 PID_G = m_PIDTau + 1;
@@ -1761,7 +1761,7 @@ Console.WriteLine(" JointCreateFixed");
1761 if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f)) 1761 if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f))
1762 { 1762 {
1763 // keep track of where we stopped. No more slippin' & slidin' 1763 // keep track of where we stopped. No more slippin' & slidin'
1764 1764
1765 // We only want to deactivate the PID Controller if we think we want to have our surrogate 1765 // We only want to deactivate the PID Controller if we think we want to have our surrogate
1766 // react to the physics scene by moving it's position. 1766 // react to the physics scene by moving it's position.
1767 // Avatar to Avatar collisions 1767 // Avatar to Avatar collisions
@@ -1782,7 +1782,7 @@ Console.WriteLine(" JointCreateFixed");
1782 // We're flying and colliding with something 1782 // We're flying and colliding with something
1783 fx = ((_target_velocity.X) - vel.X) * (PID_D); 1783 fx = ((_target_velocity.X) - vel.X) * (PID_D);
1784 fy = ((_target_velocity.Y) - vel.Y) * (PID_D); 1784 fy = ((_target_velocity.Y) - vel.Y) * (PID_D);
1785 1785
1786 // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P; 1786 // vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P;
1787 1787
1788 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass); 1788 fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass);
@@ -1793,7 +1793,7 @@ Console.WriteLine(" JointCreateFixed");
1793 if (m_useHoverPID && !PIDActive) 1793 if (m_useHoverPID && !PIDActive)
1794 { 1794 {
1795//Console.WriteLine("Hover " + Name); 1795//Console.WriteLine("Hover " + Name);
1796 1796
1797 // If we're using the PID controller, then we have no gravity 1797 // If we're using the PID controller, then we have no gravity
1798 fz = (-1 * _parent_scene.gravityz) * m_mass; 1798 fz = (-1 * _parent_scene.gravityz) * m_mass;
1799 1799
@@ -1850,7 +1850,7 @@ Console.WriteLine(" JointCreateFixed");
1850 if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f)) 1850 if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f))
1851 { 1851 {
1852 // keep track of where we stopped. No more slippin' & slidin' 1852 // keep track of where we stopped. No more slippin' & slidin'
1853 1853
1854 // We only want to deactivate the PID Controller if we think we want to have our surrogate 1854 // We only want to deactivate the PID Controller if we think we want to have our surrogate
1855 // react to the physics scene by moving it's position. 1855 // react to the physics scene by moving it's position.
1856 // Avatar to Avatar collisions 1856 // Avatar to Avatar collisions
@@ -1888,7 +1888,7 @@ Console.WriteLine(" JointCreateFixed");
1888 { 1888 {
1889 // A physical body at rest on a surface will auto-disable after a while, 1889 // A physical body at rest on a surface will auto-disable after a while,
1890 // this appears to re-enable it incase the surface it is upon vanishes, 1890 // this appears to re-enable it incase the surface it is upon vanishes,
1891 // and the body should fall again. 1891 // and the body should fall again.
1892 d.BodySetLinearVel(Body, 0f, 0f, 0f); 1892 d.BodySetLinearVel(Body, 0f, 0f, 0f);
1893 d.BodySetForce(Body, 0, 0, 0); 1893 d.BodySetForce(Body, 0, 0, 0);
1894 enableBodySoft(); 1894 enableBodySoft();
@@ -1897,7 +1897,7 @@ Console.WriteLine(" JointCreateFixed");
1897 // 35x10 = 350n times the mass per second applied maximum. 1897 // 35x10 = 350n times the mass per second applied maximum.
1898 float nmax = 35f * m_mass; 1898 float nmax = 35f * m_mass;
1899 float nmin = -35f * m_mass; 1899 float nmin = -35f * m_mass;
1900 1900
1901 if (fx > nmax) 1901 if (fx > nmax)
1902 fx = nmax; 1902 fx = nmax;
1903 if (fx < nmin) 1903 if (fx < nmin)
@@ -1916,7 +1916,7 @@ Console.WriteLine(" JointCreateFixed");
1916 // _zeroPosition = d.BodyGetPosition(Body); 1916 // _zeroPosition = d.BodyGetPosition(Body);
1917 return; 1917 return;
1918//Console.WriteLine("Nothing " + Name); 1918//Console.WriteLine("Nothing " + Name);
1919 1919
1920 } 1920 }
1921 } 1921 }
1922 1922
@@ -1942,7 +1942,7 @@ Console.WriteLine(" JointCreateFixed");
1942 // daughter prim, do Geom set 1942 // daughter prim, do Geom set
1943 d.GeomSetQuaternion(prim_geom, ref myrot); 1943 d.GeomSetQuaternion(prim_geom, ref myrot);
1944 } 1944 }
1945 1945
1946 resetCollisionAccounting(); 1946 resetCollisionAccounting();
1947 m_taintrot = _orientation; 1947 m_taintrot = _orientation;
1948 } 1948 }
@@ -2080,7 +2080,7 @@ Console.WriteLine(" JointCreateFixed");
2080 else 2080 else
2081 m_assetFailed = false; 2081 m_assetFailed = false;
2082 } 2082 }
2083 2083
2084 } 2084 }
2085 2085
2086 CreateGeom(m_targetSpace, mesh); 2086 CreateGeom(m_targetSpace, mesh);
@@ -2312,7 +2312,7 @@ Console.WriteLine(" JointCreateFixed");
2312 } 2312 }
2313 d.BodyEnable(Body); 2313 d.BodyEnable(Body);
2314 d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z); 2314 d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z);
2315 2315
2316 } 2316 }
2317 m_angularforcelist.Clear(); 2317 m_angularforcelist.Clear();
2318 } 2318 }
@@ -2342,7 +2342,7 @@ Console.WriteLine(" JointCreateFixed");
2342 d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z); 2342 d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z);
2343 } 2343 }
2344 } 2344 }
2345 2345
2346 //resetCollisionAccounting(); 2346 //resetCollisionAccounting();
2347 } 2347 }
2348 2348
@@ -2686,7 +2686,7 @@ Console.WriteLine(" JointCreateFixed");
2686 2686
2687 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 2687 if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
2688 m_vehicle.Stop(); // this also updates vehicle last position from the body position 2688 m_vehicle.Stop(); // this also updates vehicle last position from the body position
2689 2689
2690 enableBodySoft(); 2690 enableBodySoft();
2691 2691
2692 outofBounds = false; 2692 outofBounds = false;
@@ -2899,12 +2899,12 @@ Console.WriteLine(" JointCreateFixed");
2899 _acceleration = ((_velocity - m_lastVelocity) / 0.1f); 2899 _acceleration = ((_velocity - m_lastVelocity) / 0.1f);
2900 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f); 2900 _acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f);
2901 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString()); 2901 //m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString());
2902 2902
2903 // Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing... 2903 // Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing...
2904 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large. 2904 // it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
2905 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles 2905 // reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles
2906 // adding these logical exclusion situations to maintain this where I think it was intended to be. 2906 // adding these logical exclusion situations to maintain this where I think it was intended to be.
2907 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero)) 2907 if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
2908 { 2908 {
2909 m_minvelocity = 0.5f; 2909 m_minvelocity = 0.5f;
2910 } 2910 }
@@ -2973,8 +2973,8 @@ Console.WriteLine(" JointCreateFixed");
2973 { 2973 {
2974 } 2974 }
2975 2975
2976 public override Vector3 PIDTarget 2976 public override Vector3 PIDTarget
2977 { 2977 {
2978 set 2978 set
2979 { 2979 {
2980 if (value.IsFinite()) 2980 if (value.IsFinite())
@@ -2983,7 +2983,7 @@ Console.WriteLine(" JointCreateFixed");
2983 } 2983 }
2984 else 2984 else
2985 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name); 2985 m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
2986 } 2986 }
2987 } 2987 }
2988 2988
2989 public override bool PIDActive { get; set; } 2989 public override bool PIDActive { get; set; }
@@ -2993,7 +2993,7 @@ Console.WriteLine(" JointCreateFixed");
2993 public override bool PIDHoverActive { get { return m_useHoverPID;} set { m_useHoverPID = value; } } 2993 public override bool PIDHoverActive { get { return m_useHoverPID;} set { m_useHoverPID = value; } }
2994 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } } 2994 public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } }
2995 public override float PIDHoverTau { set { m_PIDHoverTau = value; } } 2995 public override float PIDHoverTau { set { m_PIDHoverTau = value; } }
2996 2996
2997 public override Quaternion APIDTarget{ set { return; } } 2997 public override Quaternion APIDTarget{ set { return; } }
2998 2998
2999 public override bool APIDActive{ set { return; } } 2999 public override bool APIDActive{ set { return; } }
@@ -3189,7 +3189,7 @@ Console.WriteLine(" JointCreateFixed");
3189// m_assetFailed = false; 3189// m_assetFailed = false;
3190 3190
3191// m_log.DebugFormat( 3191// m_log.DebugFormat(
3192// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}", 3192// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}",
3193// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name); 3193// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name);
3194 3194
3195 m_taintshape = true; 3195 m_taintshape = true;
@@ -3201,6 +3201,6 @@ Console.WriteLine(" JointCreateFixed");
3201 "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}", 3201 "[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}",
3202 _pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName); 3202 _pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName);
3203 } 3203 }
3204 } 3204 }
3205 } 3205 }
3206} \ No newline at end of file 3206} \ No newline at end of file
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
index a21ec2b..78dd7de 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
75 { 75 {
76 m_scene = pScene; 76 m_scene = pScene;
77 nearCallback = near; 77 nearCallback = near;
78 78
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
136 ODERayCastRequest[] reqs = m_PendingRequests.ToArray(); 136 ODERayCastRequest[] reqs = m_PendingRequests.ToArray();
137 for (int i = 0; i < reqs.Length; i++) 137 for (int i = 0; i < reqs.Length; i++)
138 { 138 {
139 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast 139 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
140 RayCast(reqs[i]); // if there isn't anyone to send results 140 RayCast(reqs[i]); // if there isn't anyone to send results
141 } 141 }
142 142
@@ -151,7 +151,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
151 ODERayRequest[] reqs = m_PendingRayRequests.ToArray(); 151 ODERayRequest[] reqs = m_PendingRayRequests.ToArray();
152 for (int i = 0; i < reqs.Length; i++) 152 for (int i = 0; i < reqs.Length; i++)
153 { 153 {
154 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast 154 if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
155 RayCast(reqs[i]); // if there isn't anyone to send results 155 RayCast(reqs[i]); // if there isn't anyone to send results
156 } 156 }
157 157
@@ -247,7 +247,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
247 req.callbackMethod(m_contactResults); 247 req.callbackMethod(m_contactResults);
248 } 248 }
249 } 249 }
250 250
251 // This is the standard Near. Uses space AABBs to speed up detection. 251 // This is the standard Near. Uses space AABBs to speed up detection.
252 private void near(IntPtr space, IntPtr g1, IntPtr g2) 252 private void near(IntPtr space, IntPtr g1, IntPtr g2)
253 { 253 {
@@ -262,7 +262,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
262 { 262 {
263 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) 263 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
264 return; 264 return;
265 265
266 // Separating static prim geometry spaces. 266 // Separating static prim geometry spaces.
267 // We'll be calling near recursivly if one 267 // We'll be calling near recursivly if one
268 // of them is a space to find all of the 268 // of them is a space to find all of the
@@ -290,7 +290,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
290 int count = 0; 290 int count = 0;
291 try 291 try
292 { 292 {
293 293
294 if (g1 == g2) 294 if (g1 == g2)
295 return; // Can't collide with yourself 295 return; // Can't collide with yourself
296 296
@@ -326,7 +326,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
326 if (p1 is OdePrim) 326 if (p1 is OdePrim)
327 { 327 {
328 ContactResult collisionresult = new ContactResult(); 328 ContactResult collisionresult = new ContactResult();
329 329
330 collisionresult.ConsumerID = p1.LocalID; 330 collisionresult.ConsumerID = p1.LocalID;
331 collisionresult.Pos = new Vector3(contacts[i].pos.X, contacts[i].pos.Y, contacts[i].pos.Z); 331 collisionresult.Pos = new Vector3(contacts[i].pos.X, contacts[i].pos.Y, contacts[i].pos.Z);
332 collisionresult.Depth = contacts[i].depth; 332 collisionresult.Depth = contacts[i].depth;
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index ed2aad4..d15568e 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
126 /// </remarks> 126 /// </remarks>
127 internal static Object UniversalColliderSyncObject = new Object(); 127 internal static Object UniversalColliderSyncObject = new Object();
128 internal static Object SimulationLock = new Object(); 128 internal static Object SimulationLock = new Object();
129 129
130 /// <summary> 130 /// <summary>
131 /// Is stats collecting enabled for this ODE scene? 131 /// Is stats collecting enabled for this ODE scene?
132 /// </summary> 132 /// </summary>
@@ -495,14 +495,14 @@ namespace OpenSim.Region.PhysicsModule.ODE
495 int spaceGridMaxY; 495 int spaceGridMaxY;
496 496
497 private ODERayCastRequestManager m_rayCastManager; 497 private ODERayCastRequestManager m_rayCastManager;
498 498
499 public Scene m_frameWorkScene = null; 499 public Scene m_frameWorkScene = null;
500 500
501 public OdeScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion) 501 public OdeScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion)
502 { 502 {
503 m_config = psourceconfig; 503 m_config = psourceconfig;
504 m_frameWorkScene = pscene; 504 m_frameWorkScene = pscene;
505 505
506 EngineType = pname; 506 EngineType = pname;
507 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 507 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
508 EngineName = pname + " " + pversion; 508 EngineName = pname + " " + pversion;
@@ -513,8 +513,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
513 InitialiseFromConfig(m_config); 513 InitialiseFromConfig(m_config);
514 514
515 // This may not be that good since terrain may not be avaiable at this point 515 // This may not be that good since terrain may not be avaiable at this point
516 base.Initialise(pscene.PhysicsRequestAsset, 516 base.Initialise(pscene.PhysicsRequestAsset,
517 (pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]), 517 (pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]),
518 (float)pscene.RegionInfo.RegionSettings.WaterHeight); 518 (float)pscene.RegionInfo.RegionSettings.WaterHeight);
519 519
520 } 520 }
@@ -524,8 +524,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
524 mesher = m_frameWorkScene.RequestModuleInterface<IMesher>(); 524 mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
525 if (mesher == null) 525 if (mesher == null)
526 m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName); 526 m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName);
527 527
528 m_frameWorkScene.PhysicsEnabled = true; 528 m_frameWorkScene.PhysicsEnabled = true;
529 } 529 }
530 530
531 /// <summary> 531 /// <summary>
@@ -535,11 +535,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
535 /// </summary> 535 /// </summary>
536 private void Initialise(Vector3 regionExtent) 536 private void Initialise(Vector3 regionExtent)
537 { 537 {
538 WorldExtents.X = regionExtent.X; 538 WorldExtents.X = regionExtent.X;
539 m_regionWidth = (uint)regionExtent.X; 539 m_regionWidth = (uint)regionExtent.X;
540 WorldExtents.Y = regionExtent.Y; 540 WorldExtents.Y = regionExtent.Y;
541 m_regionHeight = (uint)regionExtent.Y; 541 m_regionHeight = (uint)regionExtent.Y;
542 542
543 nearCallback = near; 543 nearCallback = near;
544 m_rayCastManager = new ODERayCastRequestManager(this); 544 m_rayCastManager = new ODERayCastRequestManager(this);
545 545
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
671 spacesPerMeterY = spaceGridMaxY / WorldExtents.Y; 671 spacesPerMeterY = spaceGridMaxY / WorldExtents.Y;
672 } 672 }
673 673
674 staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY]; 674 staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];
675 675
676 // make this index limits 676 // make this index limits
677 spaceGridMaxX--; 677 spaceGridMaxX--;
@@ -948,7 +948,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
948 { 948 {
949 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) 949 if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
950 return; 950 return;
951 951
952 // Separating static prim geometry spaces. 952 // Separating static prim geometry spaces.
953 // We'll be calling near recursivly if one 953 // We'll be calling near recursivly if one
954 // of them is a space to find all of the 954 // of them is a space to find all of the
@@ -1027,10 +1027,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1027 1027
1028 PhysicsActor p1; 1028 PhysicsActor p1;
1029 PhysicsActor p2; 1029 PhysicsActor p2;
1030 1030
1031 p1ExpectedPoints = 0; 1031 p1ExpectedPoints = 0;
1032 p2ExpectedPoints = 0; 1032 p2ExpectedPoints = 0;
1033 1033
1034 if (!actor_name_map.TryGetValue(g1, out p1)) 1034 if (!actor_name_map.TryGetValue(g1, out p1))
1035 { 1035 {
1036 p1 = PANull; 1036 p1 = PANull;
@@ -1067,7 +1067,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1067 IntPtr joint; 1067 IntPtr joint;
1068 // If we're colliding with terrain, use 'TerrainContact' instead of contact. 1068 // If we're colliding with terrain, use 'TerrainContact' instead of contact.
1069 // allows us to have different settings 1069 // allows us to have different settings
1070 1070
1071 // We only need to test p2 for 'jump crouch purposes' 1071 // We only need to test p2 for 'jump crouch purposes'
1072 if (p2 is OdeCharacter && p1.PhysicsActorType == (int)ActorTypes.Prim) 1072 if (p2 is OdeCharacter && p1.PhysicsActorType == (int)ActorTypes.Prim)
1073 { 1073 {
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1081 { 1081 {
1082 p2.IsColliding = true; 1082 p2.IsColliding = true;
1083 } 1083 }
1084 1084
1085 //if ((framecount % m_returncollisions) == 0) 1085 //if ((framecount % m_returncollisions) == 0)
1086 1086
1087 switch (p1.PhysicsActorType) 1087 switch (p1.PhysicsActorType)
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1160 1160
1161 // Logic for collision handling 1161 // Logic for collision handling
1162 // Note, that if *all* contacts are skipped (VolumeDetect) 1162 // Note, that if *all* contacts are skipped (VolumeDetect)
1163 // The prim still detects (and forwards) collision events but 1163 // The prim still detects (and forwards) collision events but
1164 // appears to be phantom for the world 1164 // appears to be phantom for the world
1165 Boolean skipThisContact = false; 1165 Boolean skipThisContact = false;
1166 1166
@@ -1235,10 +1235,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1235 material = ((OdePrim) p2).m_material; 1235 material = ((OdePrim) p2).m_material;
1236 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts; 1236 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
1237 } 1237 }
1238 1238
1239 // Unnessesary because p1 is defined above 1239 // Unnessesary because p1 is defined above
1240 //if (p1 is OdePrim) 1240 //if (p1 is OdePrim)
1241 // { 1241 // {
1242 // p1ExpectedPoints = ((OdePrim)p1).ExpectedCollisionContacts; 1242 // p1ExpectedPoints = ((OdePrim)p1).ExpectedCollisionContacts;
1243 // } 1243 // }
1244 //m_log.DebugFormat("Material: {0}", material); 1244 //m_log.DebugFormat("Material: {0}", material);
@@ -1350,7 +1350,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1350 material = ((OdePrim)p2).m_material; 1350 material = ((OdePrim)p2).m_material;
1351 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts; 1351 p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
1352 } 1352 }
1353 1353
1354 //m_log.DebugFormat("Material: {0}", material); 1354 //m_log.DebugFormat("Material: {0}", material);
1355 m_materialContacts[material, 0].geom = curContact; 1355 m_materialContacts[material, 0].geom = curContact;
1356 1356
@@ -1370,7 +1370,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1370 } 1370 }
1371 1371
1372 collision_accounting_events(p1, p2, maxDepthContact); 1372 collision_accounting_events(p1, p2, maxDepthContact);
1373 1373
1374 if (count > ((p1ExpectedPoints + p2ExpectedPoints) * 0.25) + (geomContactPointsStartthrottle)) 1374 if (count > ((p1ExpectedPoints + p2ExpectedPoints) * 0.25) + (geomContactPointsStartthrottle))
1375 { 1375 {
1376 // If there are more then 3 contact points, it's likely 1376 // If there are more then 3 contact points, it's likely
@@ -1410,7 +1410,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1410 break; 1410 break;
1411 } 1411 }
1412 } 1412 }
1413 } 1413 }
1414 else if (at == ActorTypes.Prim) 1414 else if (at == ActorTypes.Prim)
1415 { 1415 {
1416 if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f))) 1416 if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f)))
@@ -1544,11 +1544,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
1544 // since we don't know if we're colliding yet 1544 // since we don't know if we're colliding yet
1545 if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero) 1545 if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero)
1546 continue; 1546 continue;
1547 1547
1548 chr.IsColliding = false; 1548 chr.IsColliding = false;
1549 chr.CollidingGround = false; 1549 chr.CollidingGround = false;
1550 chr.CollidingObj = false; 1550 chr.CollidingObj = false;
1551 1551
1552 // Test the avatar's geometry for collision with the space 1552 // Test the avatar's geometry for collision with the space
1553 // This will return near and the space that they are the closest to 1553 // This will return near and the space that they are the closest to
1554 // And we'll run this again against the avatar and the space segment 1554 // And we'll run this again against the avatar and the space segment
@@ -1562,7 +1562,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1562 { 1562 {
1563 m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName); 1563 m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName);
1564 } 1564 }
1565 1565
1566 //float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y); 1566 //float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y);
1567 //if (chr.Position.Z + (chr.Velocity.Z * timeStep) < terrainheight + 10) 1567 //if (chr.Position.Z + (chr.Velocity.Z * timeStep) < terrainheight + 10)
1568 //{ 1568 //{
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1655 //m_log.DebugFormat("x{0} y{1} = {2}", x, y, (float)TerrainHeightFieldHeights[heightFieldGeom][index]); 1655 //m_log.DebugFormat("x{0} y{1} = {2}", x, y, (float)TerrainHeightFieldHeights[heightFieldGeom][index]);
1656 return (float)TerrainHeightFieldHeights[heightFieldGeom][index]; 1656 return (float)TerrainHeightFieldHeights[heightFieldGeom][index];
1657 } 1657 }
1658 1658
1659 else 1659 else
1660 return 0f; 1660 return 0f;
1661 } 1661 }
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1675 { 1675 {
1676 return 0f; 1676 return 0f;
1677 } 1677 }
1678 } 1678 }
1679// End recovered. Kitto Flora 1679// End recovered. Kitto Flora
1680 1680
1681 /// <summary> 1681 /// <summary>
@@ -1685,7 +1685,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1685 internal void AddCollisionEventReporting(PhysicsActor obj) 1685 internal void AddCollisionEventReporting(PhysicsActor obj)
1686 { 1686 {
1687// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID); 1687// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID);
1688 1688
1689 lock (m_collisionEventActorsChanges) 1689 lock (m_collisionEventActorsChanges)
1690 m_collisionEventActorsChanges[obj.LocalID] = obj; 1690 m_collisionEventActorsChanges[obj.LocalID] = obj;
1691 } 1691 }
@@ -2071,7 +2071,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2071 2071
2072 lock (externalJointRequestsLock) 2072 lock (externalJointRequestsLock)
2073 { 2073 {
2074 if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice 2074 if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice
2075 { 2075 {
2076 requestedJointsToBeCreated.Add(joint); 2076 requestedJointsToBeCreated.Add(joint);
2077 } 2077 }
@@ -2417,7 +2417,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2417// waitForSpaceUnlock(space); 2417// waitForSpaceUnlock(space);
2418 d.SpaceSetSublevel(space, 1); 2418 d.SpaceSetSublevel(space, 1);
2419 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); 2419 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
2420 2420
2421 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; 2421 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
2422 } 2422 }
2423 2423
@@ -2514,7 +2514,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2514 iPropertiesNotSupportedDefault++; 2514 iPropertiesNotSupportedDefault++;
2515 2515
2516 if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0)) 2516 if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0))
2517 iPropertiesNotSupportedDefault++; 2517 iPropertiesNotSupportedDefault++;
2518 2518
2519 if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0) 2519 if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0)
2520 iPropertiesNotSupportedDefault++; 2520 iPropertiesNotSupportedDefault++;
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2587#if SPAM 2587#if SPAM
2588 m_log.Debug("Mesh"); 2588 m_log.Debug("Mesh");
2589#endif 2589#endif
2590 return true; 2590 return true;
2591 } 2591 }
2592 2592
2593 /// <summary> 2593 /// <summary>
@@ -2652,7 +2652,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2652 } 2652 }
2653 _taintedPrims.Clear(); 2653 _taintedPrims.Clear();
2654 } 2654 }
2655 2655
2656 int time = Util.EnvironmentTickCountSubtract(tstart); 2656 int time = Util.EnvironmentTickCountSubtract(tstart);
2657 m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time); 2657 m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time);
2658 } 2658 }
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
2716 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks 2716 CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
2717 } 2717 }
2718 2718
2719 2719
2720 lock (OdeLock) 2720 lock (OdeLock)
2721 { 2721 {
2722 d.AllocateODEDataForThread(~0U); 2722 d.AllocateODEDataForThread(~0U);
@@ -3109,7 +3109,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
3109 // as the axis for the hinge. 3109 // as the axis for the hinge.
3110 3110
3111 // Therefore, we must get the joint's coordinate frame based on the 3111 // Therefore, we must get the joint's coordinate frame based on the
3112 // joint.Rotation field, which originates from the orientation of the 3112 // joint.Rotation field, which originates from the orientation of the
3113 // joint's proxy object in the scene. 3113 // joint's proxy object in the scene.
3114 3114
3115 // The joint's coordinate frame is defined as the transformation matrix 3115 // The joint's coordinate frame is defined as the transformation matrix
@@ -3237,7 +3237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
3237 int startTime = Util.EnvironmentTickCount(); 3237 int startTime = Util.EnvironmentTickCount();
3238 m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset); 3238 m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset);
3239 3239
3240 3240
3241 float[] _heightmap; 3241 float[] _heightmap;
3242 3242
3243 // ok im lasy this are just a aliases 3243 // ok im lasy this are just a aliases
diff --git a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
index 28d2b53..341530e 100644
--- a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs
@@ -273,10 +273,10 @@ namespace OpenSim.Region.PhysicsModule.POS
273 set { return; } 273 set { return; }
274 } 274 }
275 275
276 public override bool PIDActive 276 public override bool PIDActive
277 { 277 {
278 get { return false; } 278 get { return false; }
279 set { return; } 279 set { return; }
280 } 280 }
281 281
282 public override float PIDTau 282 public override float PIDTau
@@ -304,7 +304,7 @@ namespace OpenSim.Region.PhysicsModule.POS
304 { 304 {
305 set { return; } 305 set { return; }
306 } 306 }
307 307
308 public override Quaternion APIDTarget 308 public override Quaternion APIDTarget
309 { 309 {
310 set { return; } 310 set { return; }
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
index 88169bb..1a8409e 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
48 // Values for level of detail to be passed to the mesher. 48 // Values for level of detail to be passed to the mesher.
49 // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture) 49 // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture)
50 // Lower level of detail reduces the number of vertices used to represent the meshed shape. 50 // Lower level of detail reduces the number of vertices used to represent the meshed shape.
51 public enum LevelOfDetail 51 public enum LevelOfDetail
52 { 52 {
53 High = 32, 53 High = 32,
54 Medium = 16, 54 Medium = 16,
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
index 432708c..8079e79 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/NullPhysicsScene.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
37 class NullPhysicsScene : PhysicsScene 37 class NullPhysicsScene : PhysicsScene
38 { 38 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 private static int m_workIndicator; 41 private static int m_workIndicator;
42 42
43 public override PhysicsActor AddAvatar( 43 public override PhysicsActor AddAvatar(
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
index 250b155..33f0337 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
@@ -134,8 +134,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
134 m_objCollisionList.Add(localID, contact); 134 m_objCollisionList.Add(localID, contact);
135 } 135 }
136 else 136 else
137 { 137 {
138 float lastVel = m_objCollisionList[localID].RelativeSpeed; 138 float lastVel = m_objCollisionList[localID].RelativeSpeed;
139 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth) 139 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth)
140 { 140 {
141 if(Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed)) 141 if(Math.Abs(lastVel) > Math.Abs(contact.RelativeSpeed))
@@ -201,7 +201,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
201 { 201 {
202 get { return new NullPhysicsActor(); } 202 get { return new NullPhysicsActor(); }
203 } 203 }
204 204
205 public virtual bool Building { get; set; } 205 public virtual bool Building { get; set; }
206 206
207 public virtual void getContactData(ref ContactData cdata) 207 public virtual void getContactData(ref ContactData cdata)
@@ -263,7 +263,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
263 public abstract void delink(); 263 public abstract void delink();
264 264
265 public abstract void LockAngularMotion(byte axislocks); 265 public abstract void LockAngularMotion(byte axislocks);
266 266
267 public virtual void RequestPhysicsterseUpdate() 267 public virtual void RequestPhysicsterseUpdate()
268 { 268 {
269 // Make a temporary copy of the event to avoid possibility of 269 // Make a temporary copy of the event to avoid possibility of
@@ -326,7 +326,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
326 public abstract void VehicleFlags(int param, bool remove); 326 public abstract void VehicleFlags(int param, bool remove);
327 327
328 // This is an overridable version of SetVehicle() that works for all physics engines. 328 // This is an overridable version of SetVehicle() that works for all physics engines.
329 // This is VERY inefficient. It behoves any physics engine to override this and 329 // This is VERY inefficient. It behoves any physics engine to override this and
330 // implement a more efficient setting of all the vehicle parameters. 330 // implement a more efficient setting of all the vehicle parameters.
331 public virtual void SetVehicle(object pvdata) 331 public virtual void SetVehicle(object pvdata)
332 { 332 {
@@ -453,7 +453,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
453 public abstract bool APIDActive { set;} 453 public abstract bool APIDActive { set;}
454 public abstract float APIDStrength { set;} 454 public abstract float APIDStrength { set;}
455 public abstract float APIDDamping { set;} 455 public abstract float APIDDamping { set;}
456 456
457 public abstract void AddForce(Vector3 force, bool pushforce); 457 public abstract void AddForce(Vector3 force, bool pushforce);
458 public abstract void AddAngularForce(Vector3 force, bool pushforce); 458 public abstract void AddAngularForce(Vector3 force, bool pushforce);
459 public abstract void SetMomentum(Vector3 momentum); 459 public abstract void SetMomentum(Vector3 momentum);
@@ -465,7 +465,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
465 465
466 // Warning in a parent part it returns itself, not null 466 // Warning in a parent part it returns itself, not null
467 public virtual PhysicsActor ParentActor { get { return this; } } 467 public virtual PhysicsActor ParentActor { get { return this; } }
468 468
469 469
470 // Extendable interface for new, physics engine specific operations 470 // Extendable interface for new, physics engine specific operations
471 public virtual object Extension(string pFunct, params object[] pParams) 471 public virtual object Extension(string pFunct, params object[] pParams)
@@ -629,7 +629,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
629 public override int PhysicsActorType 629 public override int PhysicsActorType
630 { 630 {
631 get { return (int)m_actorType; } 631 get { return (int)m_actorType; }
632 set { 632 set {
633 ActorTypes type = (ActorTypes)value; 633 ActorTypes type = (ActorTypes)value;
634 switch (type) 634 switch (type)
635 { 635 {
@@ -664,10 +664,10 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
664 664
665 public override Vector3 PIDTarget { set { return; } } 665 public override Vector3 PIDTarget { set { return; } }
666 666
667 public override bool PIDActive 667 public override bool PIDActive
668 { 668 {
669 get { return false; } 669 get { return false; }
670 set { return; } 670 set { return; }
671 } 671 }
672 672
673 public override float PIDTau { set { return; } } 673 public override float PIDTau { set { return; } }
@@ -676,12 +676,12 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
676 public override bool PIDHoverActive {get {return false;} set { return; } } 676 public override bool PIDHoverActive {get {return false;} set { return; } }
677 public override PIDHoverType PIDHoverType { set { return; } } 677 public override PIDHoverType PIDHoverType { set { return; } }
678 public override float PIDHoverTau { set { return; } } 678 public override float PIDHoverTau { set { return; } }
679 679
680 public override Quaternion APIDTarget { set { return; } } 680 public override Quaternion APIDTarget { set { return; } }
681 public override bool APIDActive { set { return; } } 681 public override bool APIDActive { set { return; } }
682 public override float APIDStrength { set { return; } } 682 public override float APIDStrength { set { return; } }
683 public override float APIDDamping { set { return; } } 683 public override float APIDDamping { set { return; } }
684 684
685 public override void SetMomentum(Vector3 momentum) { } 685 public override void SetMomentum(Vector3 momentum) { }
686 686
687 public override void SubscribeEvents(int ms) { } 687 public override void SubscribeEvents(int ms) { }
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index aa51c4e..e8d6334 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -179,7 +179,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
179 public virtual PhysicsActor AddAvatar( 179 public virtual PhysicsActor AddAvatar(
180 uint localID, string avName, Vector3 position, Vector3 size, bool isFlying) 180 uint localID, string avName, Vector3 position, Vector3 size, bool isFlying)
181 { 181 {
182 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying); 182 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying);
183 return ret; 183 return ret;
184 } 184 }
185 185
@@ -217,7 +217,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
217 return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); 217 return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid);
218 } 218 }
219 219
220 220
221 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 221 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
222 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) 222 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid)
223 { 223 {
@@ -335,16 +335,16 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
335 /// <summary> 335 /// <summary>
336 /// Queue a raycast against the physics scene. 336 /// Queue a raycast against the physics scene.
337 /// The provided callback method will be called when the raycast is complete 337 /// The provided callback method will be called when the raycast is complete
338 /// 338 ///
339 /// Many physics engines don't support collision testing at the same time as 339 /// Many physics engines don't support collision testing at the same time as
340 /// manipulating the physics scene, so we queue the request up and callback 340 /// manipulating the physics scene, so we queue the request up and callback
341 /// a custom method when the raycast is complete. 341 /// a custom method when the raycast is complete.
342 /// This allows physics engines that give an immediate result to callback immediately 342 /// This allows physics engines that give an immediate result to callback immediately
343 /// and ones that don't, to callback when it gets a result back. 343 /// and ones that don't, to callback when it gets a result back.
344 /// 344 ///
345 /// ODE for example will not allow you to change the scene while collision testing or 345 /// ODE for example will not allow you to change the scene while collision testing or
346 /// it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene. 346 /// it asserts, 'opteration not valid for locked space'. This includes adding a ray to the scene.
347 /// 347 ///
348 /// This is named RayCastWorld to not conflict with modrex's Raycast method. 348 /// This is named RayCastWorld to not conflict with modrex's Raycast method.
349 /// </summary> 349 /// </summary>
350 /// <param name="position">Origin of the ray</param> 350 /// <param name="position">Origin of the ray</param>
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
index 76a82fa..5aae42f 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsVector.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
49 public Vector3(Vector3 pv) : this(pv.X, pv.Y, pv.Z) 49 public Vector3(Vector3 pv) : this(pv.X, pv.Y, pv.Z)
50 { 50 {
51 } 51 }
52 52
53 public void setValues(float x, float y, float z) 53 public void setValues(float x, float y, float z)
54 { 54 {
55 X = x; 55 X = x;
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
index e850b11..0b4c8c6 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
38 TYPE_NONE = 0, 38 TYPE_NONE = 0,
39 39
40 /// <summary> 40 /// <summary>
41 /// No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection 41 /// No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection
42 /// no vertical attractor, No banking, Identity rotation frame 42 /// no vertical attractor, No banking, Identity rotation frame
43 /// </summary> 43 /// </summary>
44 TYPE_SLED = 1, 44 TYPE_SLED = 1,
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
index daf3af1..35adf11 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEApi.cs
@@ -34,8 +34,8 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * 37 *
38 * changes by opensim team; 38 * changes by opensim team;
39 * changes by Aurora team http://www.aurora-sim.org/ 39 * changes by Aurora team http://www.aurora-sim.org/
40 * changes by Ubit Umarov 40 * changes by Ubit Umarov
41 */ 41 */
@@ -51,18 +51,18 @@ namespace OdeAPI
51// at least we save same memory and memory access time, FPU performance on intel usually is similar 51// at least we save same memory and memory access time, FPU performance on intel usually is similar
52// using dReal = System.Double; 52// using dReal = System.Double;
53//#else 53//#else
54 using dReal = System.Single; 54 using dReal = System.Single;
55//#endif 55//#endif
56 56
57 public static class d 57 public static class d
58 { 58 {
59 public static dReal Infinity = dReal.MaxValue; 59 public static dReal Infinity = dReal.MaxValue;
60 public static int NTotalBodies = 0; 60 public static int NTotalBodies = 0;
61 public static int NTotalGeoms = 0; 61 public static int NTotalGeoms = 0;
62 62
63 public const uint CONTACTS_UNIMPORTANT = 0x80000000; 63 public const uint CONTACTS_UNIMPORTANT = 0x80000000;
64 64
65 #region Flags and Enumerations 65 #region Flags and Enumerations
66 66
67 [Flags] 67 [Flags]
68 public enum AllocateODEDataFlags : uint 68 public enum AllocateODEDataFlags : uint
@@ -78,101 +78,101 @@ namespace OdeAPI
78 dInitFlagManualThreadCleanup = 0x00000001 78 dInitFlagManualThreadCleanup = 0x00000001
79 } 79 }
80 80
81 [Flags] 81 [Flags]
82 public enum ContactFlags : int 82 public enum ContactFlags : int
83 { 83 {
84 Mu2 = 0x001, 84 Mu2 = 0x001,
85 FDir1 = 0x002, 85 FDir1 = 0x002,
86 Bounce = 0x004, 86 Bounce = 0x004,
87 SoftERP = 0x008, 87 SoftERP = 0x008,
88 SoftCFM = 0x010, 88 SoftCFM = 0x010,
89 Motion1 = 0x020, 89 Motion1 = 0x020,
90 Motion2 = 0x040, 90 Motion2 = 0x040,
91 MotionN = 0x080, 91 MotionN = 0x080,
92 Slip1 = 0x100, 92 Slip1 = 0x100,
93 Slip2 = 0x200, 93 Slip2 = 0x200,
94 Approx0 = 0x0000, 94 Approx0 = 0x0000,
95 Approx1_1 = 0x1000, 95 Approx1_1 = 0x1000,
96 Approx1_2 = 0x2000, 96 Approx1_2 = 0x2000,
97 Approx1 = 0x3000 97 Approx1 = 0x3000
98 } 98 }
99 99
100 public enum GeomClassID : int 100 public enum GeomClassID : int
101 { 101 {
102 SphereClass, 102 SphereClass,
103 BoxClass, 103 BoxClass,
104 CapsuleClass, 104 CapsuleClass,
105 CylinderClass, 105 CylinderClass,
106 PlaneClass, 106 PlaneClass,
107 RayClass, 107 RayClass,
108 ConvexClass, 108 ConvexClass,
109 GeomTransformClass, 109 GeomTransformClass,
110 TriMeshClass, 110 TriMeshClass,
111 HeightfieldClass, 111 HeightfieldClass,
112 FirstSpaceClass, 112 FirstSpaceClass,
113 SimpleSpaceClass = FirstSpaceClass, 113 SimpleSpaceClass = FirstSpaceClass,
114 HashSpaceClass, 114 HashSpaceClass,
115 QuadTreeSpaceClass, 115 QuadTreeSpaceClass,
116 LastSpaceClass = QuadTreeSpaceClass, 116 LastSpaceClass = QuadTreeSpaceClass,
117 ubtTerrainClass, 117 ubtTerrainClass,
118 FirstUserClass, 118 FirstUserClass,
119 LastUserClass = FirstUserClass + MaxUserClasses - 1, 119 LastUserClass = FirstUserClass + MaxUserClasses - 1,
120 NumClasses, 120 NumClasses,
121 MaxUserClasses = 5 121 MaxUserClasses = 5
122 } 122 }
123 123
124 public enum JointType : int 124 public enum JointType : int
125 { 125 {
126 None, 126 None,
127 Ball, 127 Ball,
128 Hinge, 128 Hinge,
129 Slider, 129 Slider,
130 Contact, 130 Contact,
131 Universal, 131 Universal,
132 Hinge2, 132 Hinge2,
133 Fixed, 133 Fixed,
134 Null, 134 Null,
135 AMotor, 135 AMotor,
136 LMotor, 136 LMotor,
137 Plane2D 137 Plane2D
138 } 138 }
139 139
140 public enum JointParam : int 140 public enum JointParam : int
141 { 141 {
142 LoStop, 142 LoStop,
143 HiStop, 143 HiStop,
144 Vel, 144 Vel,
145 FMax, 145 FMax,
146 FudgeFactor, 146 FudgeFactor,
147 Bounce, 147 Bounce,
148 CFM, 148 CFM,
149 StopERP, 149 StopERP,
150 StopCFM, 150 StopCFM,
151 SuspensionERP, 151 SuspensionERP,
152 SuspensionCFM, 152 SuspensionCFM,
153 LoStop2 = 256, 153 LoStop2 = 256,
154 HiStop2, 154 HiStop2,
155 Vel2, 155 Vel2,
156 FMax2, 156 FMax2,
157 FudgeFactor2, 157 FudgeFactor2,
158 Bounce2, 158 Bounce2,
159 CFM2, 159 CFM2,
160 StopERP2, 160 StopERP2,
161 StopCFM2, 161 StopCFM2,
162 SuspensionERP2, 162 SuspensionERP2,
163 SuspensionCFM2, 163 SuspensionCFM2,
164 LoStop3 = 512, 164 LoStop3 = 512,
165 HiStop3, 165 HiStop3,
166 Vel3, 166 Vel3,
167 FMax3, 167 FMax3,
168 FudgeFactor3, 168 FudgeFactor3,
169 Bounce3, 169 Bounce3,
170 CFM3, 170 CFM3,
171 StopERP3, 171 StopERP3,
172 StopCFM3, 172 StopCFM3,
173 SuspensionERP3, 173 SuspensionERP3,
174 SuspensionCFM3 174 SuspensionCFM3
175 } 175 }
176 176
177 public enum dSweepAndPruneAxis : int 177 public enum dSweepAndPruneAxis : int
178 { 178 {
@@ -184,24 +184,24 @@ namespace OdeAPI
184 ZYX = ((2)|(1<<2)|(0<<4)) 184 ZYX = ((2)|(1<<2)|(0<<4))
185 } 185 }
186 186
187 #endregion 187 #endregion
188 188
189 #region Callbacks 189 #region Callbacks
190 190
191 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 191 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
192 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb); 192 public delegate int AABBTestFn(IntPtr o1, IntPtr o2, ref AABB aabb);
193 193
194 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 194 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
195 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip); 195 public delegate int ColliderFn(IntPtr o1, IntPtr o2, int flags, out ContactGeom contact, int skip);
196 196
197 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 197 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
198 public delegate void GetAABBFn(IntPtr geom, out AABB aabb); 198 public delegate void GetAABBFn(IntPtr geom, out AABB aabb);
199 199
200 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 200 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
201 public delegate ColliderFn GetColliderFnFn(int num); 201 public delegate ColliderFn GetColliderFnFn(int num);
202 202
203 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 203 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
204 public delegate void GeomDtorFn(IntPtr o); 204 public delegate void GeomDtorFn(IntPtr o);
205 205
206 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 206 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
207 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); 207 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
@@ -209,230 +209,230 @@ namespace OdeAPI
209 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 209 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
210 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z); 210 public delegate dReal OSTerrainGetHeight(IntPtr p_user_data, int x, int z);
211 211
212 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 212 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
213 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); 213 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
214 214
215 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 215 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
216 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex); 216 public delegate int TriCallback(IntPtr trimesh, IntPtr refObject, int triangleIndex);
217 217
218 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 218 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
219 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount); 219 public delegate int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount);
220 220
221 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 221 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
222 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v); 222 public delegate int TriRayCallback(IntPtr trimesh, IntPtr ray, int triangleIndex, dReal u, dReal v);
223 223
224 #endregion 224 #endregion
225 225
226 #region Structs 226 #region Structs
227 227
228 [StructLayout(LayoutKind.Sequential)] 228 [StructLayout(LayoutKind.Sequential)]
229 public struct AABB 229 public struct AABB
230 { 230 {
231 public dReal MinX, MaxX; 231 public dReal MinX, MaxX;
232 public dReal MinY, MaxY; 232 public dReal MinY, MaxY;
233 public dReal MinZ, MaxZ; 233 public dReal MinZ, MaxZ;
234 } 234 }
235 235
236 236
237 [StructLayout(LayoutKind.Sequential)] 237 [StructLayout(LayoutKind.Sequential)]
238 public struct Contact 238 public struct Contact
239 { 239 {
240 public SurfaceParameters surface; 240 public SurfaceParameters surface;
241 public ContactGeom geom; 241 public ContactGeom geom;
242 public Vector3 fdir1; 242 public Vector3 fdir1;
243 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact)); 243 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(Contact));
244 } 244 }
245 245
246 246
247 [StructLayout(LayoutKind.Sequential)] 247 [StructLayout(LayoutKind.Sequential)]
248 public struct ContactGeom 248 public struct ContactGeom
249 { 249 {
250 250
251 public Vector3 pos; 251 public Vector3 pos;
252 public Vector3 normal; 252 public Vector3 normal;
253 public dReal depth; 253 public dReal depth;
254 public IntPtr g1; 254 public IntPtr g1;
255 public IntPtr g2; 255 public IntPtr g2;
256 public int side1; 256 public int side1;
257 public int side2; 257 public int side2;
258 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom)); 258 public static readonly int unmanagedSizeOf = Marshal.SizeOf(typeof(ContactGeom));
259 } 259 }
260 260
261 [StructLayout(LayoutKind.Sequential)] 261 [StructLayout(LayoutKind.Sequential)]
262 public struct GeomClass 262 public struct GeomClass
263 { 263 {
264 public int bytes; 264 public int bytes;
265 public GetColliderFnFn collider; 265 public GetColliderFnFn collider;
266 public GetAABBFn aabb; 266 public GetAABBFn aabb;
267 public AABBTestFn aabb_test; 267 public AABBTestFn aabb_test;
268 public GeomDtorFn dtor; 268 public GeomDtorFn dtor;
269 } 269 }
270 270
271 271
272 [StructLayout(LayoutKind.Sequential)] 272 [StructLayout(LayoutKind.Sequential)]
273 public struct JointFeedback 273 public struct JointFeedback
274 { 274 {
275 public Vector3 f1; 275 public Vector3 f1;
276 public Vector3 t1; 276 public Vector3 t1;
277 public Vector3 f2; 277 public Vector3 f2;
278 public Vector3 t2; 278 public Vector3 t2;
279 } 279 }
280 280
281 281
282 [StructLayout(LayoutKind.Sequential)] 282 [StructLayout(LayoutKind.Sequential)]
283 public struct Mass 283 public struct Mass
284 { 284 {
285 public dReal mass; 285 public dReal mass;
286 public Vector4 c; 286 public Vector4 c;
287 public Matrix3 I; 287 public Matrix3 I;
288 } 288 }
289 289
290 290
291 [StructLayout(LayoutKind.Sequential)] 291 [StructLayout(LayoutKind.Sequential)]
292 public struct Matrix3 292 public struct Matrix3
293 { 293 {
294 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22) 294 public Matrix3(dReal m00, dReal m10, dReal m20, dReal m01, dReal m11, dReal m21, dReal m02, dReal m12, dReal m22)
295 { 295 {
296 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f; 296 M00 = m00; M10 = m10; M20 = m20; _m30 = 0.0f;
297 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f; 297 M01 = m01; M11 = m11; M21 = m21; _m31 = 0.0f;
298 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f; 298 M02 = m02; M12 = m12; M22 = m22; _m32 = 0.0f;
299 } 299 }
300 public dReal M00, M10, M20; 300 public dReal M00, M10, M20;
301 private dReal _m30; 301 private dReal _m30;
302 public dReal M01, M11, M21; 302 public dReal M01, M11, M21;
303 private dReal _m31; 303 private dReal _m31;
304 public dReal M02, M12, M22; 304 public dReal M02, M12, M22;
305 private dReal _m32; 305 private dReal _m32;
306 } 306 }
307 307
308 [StructLayout(LayoutKind.Sequential)] 308 [StructLayout(LayoutKind.Sequential)]
309 public struct Matrix4 309 public struct Matrix4
310 { 310 {
311 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30, 311 public Matrix4(dReal m00, dReal m10, dReal m20, dReal m30,
312 dReal m01, dReal m11, dReal m21, dReal m31, 312 dReal m01, dReal m11, dReal m21, dReal m31,
313 dReal m02, dReal m12, dReal m22, dReal m32, 313 dReal m02, dReal m12, dReal m22, dReal m32,
314 dReal m03, dReal m13, dReal m23, dReal m33) 314 dReal m03, dReal m13, dReal m23, dReal m33)
315 { 315 {
316 M00 = m00; M10 = m10; M20 = m20; M30 = m30; 316 M00 = m00; M10 = m10; M20 = m20; M30 = m30;
317 M01 = m01; M11 = m11; M21 = m21; M31 = m31; 317 M01 = m01; M11 = m11; M21 = m21; M31 = m31;
318 M02 = m02; M12 = m12; M22 = m22; M32 = m32; 318 M02 = m02; M12 = m12; M22 = m22; M32 = m32;
319 M03 = m03; M13 = m13; M23 = m23; M33 = m33; 319 M03 = m03; M13 = m13; M23 = m23; M33 = m33;
320 } 320 }
321 public dReal M00, M10, M20, M30; 321 public dReal M00, M10, M20, M30;
322 public dReal M01, M11, M21, M31; 322 public dReal M01, M11, M21, M31;
323 public dReal M02, M12, M22, M32; 323 public dReal M02, M12, M22, M32;
324 public dReal M03, M13, M23, M33; 324 public dReal M03, M13, M23, M33;
325 } 325 }
326 326
327 [StructLayout(LayoutKind.Sequential)] 327 [StructLayout(LayoutKind.Sequential)]
328 public struct Quaternion 328 public struct Quaternion
329 { 329 {
330 public dReal W, X, Y, Z; 330 public dReal W, X, Y, Z;
331 } 331 }
332 332
333 333
334 [StructLayout(LayoutKind.Sequential)] 334 [StructLayout(LayoutKind.Sequential)]
335 public struct SurfaceParameters 335 public struct SurfaceParameters
336 { 336 {
337 public ContactFlags mode; 337 public ContactFlags mode;
338 public dReal mu; 338 public dReal mu;
339 public dReal mu2; 339 public dReal mu2;
340 public dReal bounce; 340 public dReal bounce;
341 public dReal bounce_vel; 341 public dReal bounce_vel;
342 public dReal soft_erp; 342 public dReal soft_erp;
343 public dReal soft_cfm; 343 public dReal soft_cfm;
344 public dReal motion1; 344 public dReal motion1;
345 public dReal motion2; 345 public dReal motion2;
346 public dReal motionN; 346 public dReal motionN;
347 public dReal slip1; 347 public dReal slip1;
348 public dReal slip2; 348 public dReal slip2;
349 } 349 }
350 350
351 351
352 [StructLayout(LayoutKind.Sequential)] 352 [StructLayout(LayoutKind.Sequential)]
353 public struct Vector3 353 public struct Vector3
354 { 354 {
355 public Vector3(dReal x, dReal y, dReal z) 355 public Vector3(dReal x, dReal y, dReal z)
356 { 356 {
357 X = x; Y = y; Z = z; _w = 0.0f; 357 X = x; Y = y; Z = z; _w = 0.0f;
358 } 358 }
359 public dReal X, Y, Z; 359 public dReal X, Y, Z;
360 private dReal _w; 360 private dReal _w;
361 } 361 }
362 362
363 363
364 [StructLayout(LayoutKind.Sequential)] 364 [StructLayout(LayoutKind.Sequential)]
365 public struct Vector4 365 public struct Vector4
366 { 366 {
367 public Vector4(dReal x, dReal y, dReal z, dReal w) 367 public Vector4(dReal x, dReal y, dReal z, dReal w)
368 { 368 {
369 X = x; Y = y; Z = z; W = w; 369 X = x; Y = y; Z = z; W = w;
370 } 370 }
371 public dReal X, Y, Z, W; 371 public dReal X, Y, Z, W;
372 } 372 }
373 373
374 #endregion 374 #endregion
375 375
376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity] 376 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAllocateODEDataForThread"), SuppressUnmanagedCodeSecurity]
377 public static extern int AllocateODEDataForThread(uint ODEInitFlags); 377 public static extern int AllocateODEDataForThread(uint ODEInitFlags);
378 378
379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity] 379 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnected"), SuppressUnmanagedCodeSecurity]
380 public static extern bool AreConnected(IntPtr b1, IntPtr b2); 380 public static extern bool AreConnected(IntPtr b1, IntPtr b2);
381 381
382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity] 382 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dAreConnectedExcluding"), SuppressUnmanagedCodeSecurity]
383 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type); 383 public static extern bool AreConnectedExcluding(IntPtr b1, IntPtr b2, JointType joint_type);
384 384
385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity] 385 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForce"), SuppressUnmanagedCodeSecurity]
386 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz); 386 public static extern void BodyAddForce(IntPtr body, dReal fx, dReal fy, dReal fz);
387 387
388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity] 388 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtPos"), SuppressUnmanagedCodeSecurity]
389 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 389 public static extern void BodyAddForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
390 390
391 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity] 391 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddForceAtRelPos"), SuppressUnmanagedCodeSecurity]
392 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 392 public static extern void BodyAddForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
393 393
394 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity] 394 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForce"), SuppressUnmanagedCodeSecurity]
395 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz); 395 public static extern void BodyAddRelForce(IntPtr body, dReal fx, dReal fy, dReal fz);
396 396
397 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity] 397 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtPos"), SuppressUnmanagedCodeSecurity]
398 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 398 public static extern void BodyAddRelForceAtPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
399 399
400 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity] 400 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelForceAtRelPos"), SuppressUnmanagedCodeSecurity]
401 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz); 401 public static extern void BodyAddRelForceAtRelPos(IntPtr body, dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz);
402 402
403 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity] 403 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddRelTorque"), SuppressUnmanagedCodeSecurity]
404 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 404 public static extern void BodyAddRelTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
405 405
406 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity] 406 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyAddTorque"), SuppressUnmanagedCodeSecurity]
407 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz); 407 public static extern void BodyAddTorque(IntPtr body, dReal fx, dReal fy, dReal fz);
408 408
409 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 409 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
410 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos); 410 public static extern void BodyCopyPosition(IntPtr body, out Vector3 pos);
411 411
412 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity] 412 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyPosition"), SuppressUnmanagedCodeSecurity]
413 public static extern void BodyCopyPosition(IntPtr body, out dReal X); 413 public static extern void BodyCopyPosition(IntPtr body, out dReal X);
414 414
415 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 415 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
416 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat); 416 public static extern void BodyCopyQuaternion(IntPtr body, out Quaternion quat);
417 417
418 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity] 418 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyQuaternion"), SuppressUnmanagedCodeSecurity]
419 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X); 419 public static extern void BodyCopyQuaternion(IntPtr body, out dReal X);
420 420
421 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 421 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
422 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R); 422 public static extern void BodyCopyRotation(IntPtr body, out Matrix3 R);
423 423
424 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity] 424 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCopyRotation"), SuppressUnmanagedCodeSecurity]
425 public static extern void BodyCopyRotation(IntPtr body, out dReal M00); 425 public static extern void BodyCopyRotation(IntPtr body, out dReal M00);
426 426
427 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity] 427 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyCreate"), SuppressUnmanagedCodeSecurity]
428 public static extern IntPtr BodyiCreate(IntPtr world); 428 public static extern IntPtr BodyiCreate(IntPtr world);
429 public static IntPtr BodyCreate(IntPtr world) 429 public static IntPtr BodyCreate(IntPtr world)
430 { 430 {
431 NTotalBodies++; 431 NTotalBodies++;
432 return BodyiCreate(world); 432 return BodyiCreate(world);
433 } 433 }
434 434
435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity] 435 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDestroy"), SuppressUnmanagedCodeSecurity]
436 public static extern void BodyiDestroy(IntPtr body); 436 public static extern void BodyiDestroy(IntPtr body);
437 public static void BodyDestroy(IntPtr body) 437 public static void BodyDestroy(IntPtr body)
438 { 438 {
@@ -440,114 +440,114 @@ namespace OdeAPI
440 BodyiDestroy(body); 440 BodyiDestroy(body);
441 } 441 }
442 442
443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity] 443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyDisable"), SuppressUnmanagedCodeSecurity]
444 public static extern void BodyDisable(IntPtr body); 444 public static extern void BodyDisable(IntPtr body);
445 445
446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity] 446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyEnable"), SuppressUnmanagedCodeSecurity]
447 public static extern void BodyEnable(IntPtr body); 447 public static extern void BodyEnable(IntPtr body);
448 448
449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
450 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body); 450 public static extern dReal BodyGetAutoDisableAngularThreshold(IntPtr body);
451 451
452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
453 public static extern bool BodyGetAutoDisableFlag(IntPtr body); 453 public static extern bool BodyGetAutoDisableFlag(IntPtr body);
454 454
455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
456 public static extern void BodyGetAutoDisableDefaults(IntPtr body); 456 public static extern void BodyGetAutoDisableDefaults(IntPtr body);
457 457
458 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 458 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
459 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body); 459 public static extern dReal BodyGetAutoDisableLinearThreshold(IntPtr body);
460 460
461 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 461 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
462 public static extern int BodyGetAutoDisableSteps(IntPtr body); 462 public static extern int BodyGetAutoDisableSteps(IntPtr body);
463 463
464 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 464 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
465 public static extern dReal BodyGetAutoDisableTime(IntPtr body); 465 public static extern dReal BodyGetAutoDisableTime(IntPtr body);
466 466
467 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity] 467 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularVel"), SuppressUnmanagedCodeSecurity]
468 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body); 468 public extern unsafe static Vector3* BodyGetAngularVelUnsafe(IntPtr body);
469 public static Vector3 BodyGetAngularVel(IntPtr body) 469 public static Vector3 BodyGetAngularVel(IntPtr body)
470 { 470 {
471 unsafe { return *(BodyGetAngularVelUnsafe(body)); } 471 unsafe { return *(BodyGetAngularVelUnsafe(body)); }
472 } 472 }
473 473
474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity] 474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetData"), SuppressUnmanagedCodeSecurity]
475 public static extern IntPtr BodyGetData(IntPtr body); 475 public static extern IntPtr BodyGetData(IntPtr body);
476 476
477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
478 public static extern int BodyGetFiniteRotationMode(IntPtr body); 478 public static extern int BodyGetFiniteRotationMode(IntPtr body);
479 479
480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
481 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result); 481 public static extern void BodyGetFiniteRotationAxis(IntPtr body, out Vector3 result);
482 482
483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity] 483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetForce"), SuppressUnmanagedCodeSecurity]
484 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body); 484 public extern unsafe static Vector3* BodyGetForceUnsafe(IntPtr body);
485 public static Vector3 BodyGetForce(IntPtr body) 485 public static Vector3 BodyGetForce(IntPtr body)
486 { 486 {
487 unsafe { return *(BodyGetForceUnsafe(body)); } 487 unsafe { return *(BodyGetForceUnsafe(body)); }
488 } 488 }
489 489
490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity] 490 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGravityMode"), SuppressUnmanagedCodeSecurity]
491 public static extern bool BodyGetGravityMode(IntPtr body); 491 public static extern bool BodyGetGravityMode(IntPtr body);
492 492
493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 493 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
494 public static extern int BodyGetGyroscopicMode(IntPtr body); 494 public static extern int BodyGetGyroscopicMode(IntPtr body);
495 495
496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity] 496 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetJoint"), SuppressUnmanagedCodeSecurity]
497 public static extern IntPtr BodyGetJoint(IntPtr body, int index); 497 public static extern IntPtr BodyGetJoint(IntPtr body, int index);
498 498
499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity] 499 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetLinearVel"), SuppressUnmanagedCodeSecurity]
500 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body); 500 public extern unsafe static Vector3* BodyGetLinearVelUnsafe(IntPtr body);
501 public static Vector3 BodyGetLinearVel(IntPtr body) 501 public static Vector3 BodyGetLinearVel(IntPtr body)
502 { 502 {
503 unsafe { return *(BodyGetLinearVelUnsafe(body)); } 503 unsafe { return *(BodyGetLinearVelUnsafe(body)); }
504 } 504 }
505 505
506 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity] 506 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetMass"), SuppressUnmanagedCodeSecurity]
507 public static extern void BodyGetMass(IntPtr body, out Mass mass); 507 public static extern void BodyGetMass(IntPtr body, out Mass mass);
508 508
509 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity] 509 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetNumJoints"), SuppressUnmanagedCodeSecurity]
510 public static extern int BodyGetNumJoints(IntPtr body); 510 public static extern int BodyGetNumJoints(IntPtr body);
511 511
512 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity] 512 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPointVel"), SuppressUnmanagedCodeSecurity]
513 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 513 public static extern void BodyGetPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
514 514
515 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity] 515 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosition"), SuppressUnmanagedCodeSecurity]
516 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body); 516 public extern unsafe static Vector3* BodyGetPositionUnsafe(IntPtr body);
517 public static Vector3 BodyGetPosition(IntPtr body) 517 public static Vector3 BodyGetPosition(IntPtr body)
518 { 518 {
519 unsafe { return *(BodyGetPositionUnsafe(body)); } 519 unsafe { return *(BodyGetPositionUnsafe(body)); }
520 } 520 }
521 521
522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity] 522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetPosRelPoint"), SuppressUnmanagedCodeSecurity]
523 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 523 public static extern void BodyGetPosRelPoint(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
524 524
525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity] 525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetQuaternion"), SuppressUnmanagedCodeSecurity]
526 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body); 526 public extern unsafe static Quaternion* BodyGetQuaternionUnsafe(IntPtr body);
527 public static Quaternion BodyGetQuaternion(IntPtr body) 527 public static Quaternion BodyGetQuaternion(IntPtr body)
528 { 528 {
529 unsafe { return *(BodyGetQuaternionUnsafe(body)); } 529 unsafe { return *(BodyGetQuaternionUnsafe(body)); }
530 } 530 }
531 531
532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity] 532 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointPos"), SuppressUnmanagedCodeSecurity]
533 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 533 public static extern void BodyGetRelPointPos(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
534 534
535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity] 535 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRelPointVel"), SuppressUnmanagedCodeSecurity]
536 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 536 public static extern void BodyGetRelPointVel(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
537 537
538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity] 538 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetRotation"), SuppressUnmanagedCodeSecurity]
539 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body); 539 public extern unsafe static Matrix3* BodyGetRotationUnsafe(IntPtr body);
540 public static Matrix3 BodyGetRotation(IntPtr body) 540 public static Matrix3 BodyGetRotation(IntPtr body)
541 { 541 {
542 unsafe { return *(BodyGetRotationUnsafe(body)); } 542 unsafe { return *(BodyGetRotationUnsafe(body)); }
543 } 543 }
544 544
545 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity] 545 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetTorque"), SuppressUnmanagedCodeSecurity]
546 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body); 546 public extern unsafe static Vector3* BodyGetTorqueUnsafe(IntPtr body);
547 public static Vector3 BodyGetTorque(IntPtr body) 547 public static Vector3 BodyGetTorque(IntPtr body)
548 { 548 {
549 unsafe { return *(BodyGetTorqueUnsafe(body)); } 549 unsafe { return *(BodyGetTorqueUnsafe(body)); }
550 } 550 }
551 551
552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity] 552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetWorld"), SuppressUnmanagedCodeSecurity]
553 public static extern IntPtr BodyGetWorld(IntPtr body); 553 public static extern IntPtr BodyGetWorld(IntPtr body);
@@ -559,38 +559,38 @@ namespace OdeAPI
559 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom); 559 public static extern IntPtr dBodyGetNextGeom(IntPtr Geom);
560 560
561 561
562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity] 562 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyIsEnabled"), SuppressUnmanagedCodeSecurity]
563 public static extern bool BodyIsEnabled(IntPtr body); 563 public static extern bool BodyIsEnabled(IntPtr body);
564 564
565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity] 565 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAngularVel"), SuppressUnmanagedCodeSecurity]
566 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z); 566 public static extern void BodySetAngularVel(IntPtr body, dReal x, dReal y, dReal z);
567 567
568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 568 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
569 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold); 569 public static extern void BodySetAutoDisableAngularThreshold(IntPtr body, dReal angular_threshold);
570 570
571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity] 571 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableDefaults"), SuppressUnmanagedCodeSecurity]
572 public static extern void BodySetAutoDisableDefaults(IntPtr body); 572 public static extern void BodySetAutoDisableDefaults(IntPtr body);
573 573
574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 574 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
575 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable); 575 public static extern void BodySetAutoDisableFlag(IntPtr body, bool do_auto_disable);
576 576
577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 577 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
578 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold); 578 public static extern void BodySetAutoDisableLinearThreshold(IntPtr body, dReal linear_threshold);
579 579
580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 580 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
581 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps); 581 public static extern void BodySetAutoDisableSteps(IntPtr body, int steps);
582 582
583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 583 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
584 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time); 584 public static extern void BodySetAutoDisableTime(IntPtr body, dReal time);
585 585
586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity] 586 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetData"), SuppressUnmanagedCodeSecurity]
587 public static extern void BodySetData(IntPtr body, IntPtr data); 587 public static extern void BodySetData(IntPtr body, IntPtr data);
588 588
589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity] 589 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationMode"), SuppressUnmanagedCodeSecurity]
590 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode); 590 public static extern void BodySetFiniteRotationMode(IntPtr body, int mode);
591 591
592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity] 592 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetFiniteRotationAxis"), SuppressUnmanagedCodeSecurity]
593 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z); 593 public static extern void BodySetFiniteRotationAxis(IntPtr body, dReal x, dReal y, dReal z);
594 594
595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity] 595 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearDamping"), SuppressUnmanagedCodeSecurity]
596 public static extern void BodySetLinearDamping(IntPtr body, dReal scale); 596 public static extern void BodySetLinearDamping(IntPtr body, dReal scale);
@@ -619,11 +619,11 @@ namespace OdeAPI
619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 619 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyGetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
620 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body); 620 public static extern dReal BodyGetAngularDampingThreshold(IntPtr body);
621 621
622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity] 622 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetForce"), SuppressUnmanagedCodeSecurity]
623 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z); 623 public static extern void BodySetForce(IntPtr body, dReal x, dReal y, dReal z);
624 624
625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity] 625 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGravityMode"), SuppressUnmanagedCodeSecurity]
626 public static extern void BodySetGravityMode(IntPtr body, bool mode); 626 public static extern void BodySetGravityMode(IntPtr body, bool mode);
627 627
628 /// <summary> 628 /// <summary>
629 /// Sets the Gyroscopic term status on the body specified. 629 /// Sets the Gyroscopic term status on the body specified.
@@ -633,76 +633,76 @@ namespace OdeAPI
633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity] 633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetGyroscopicMode"), SuppressUnmanagedCodeSecurity]
634 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled); 634 public static extern void dBodySetGyroscopicMode(IntPtr body, int enabled);
635 635
636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity] 636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetLinearVel"), SuppressUnmanagedCodeSecurity]
637 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z); 637 public static extern void BodySetLinearVel(IntPtr body, dReal x, dReal y, dReal z);
638 638
639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity] 639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetMass"), SuppressUnmanagedCodeSecurity]
640 public static extern void BodySetMass(IntPtr body, ref Mass mass); 640 public static extern void BodySetMass(IntPtr body, ref Mass mass);
641 641
642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity] 642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetPosition"), SuppressUnmanagedCodeSecurity]
643 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z); 643 public static extern void BodySetPosition(IntPtr body, dReal x, dReal y, dReal z);
644 644
645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
646 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q); 646 public static extern void BodySetQuaternion(IntPtr body, ref Quaternion q);
647 647
648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity] 648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetQuaternion"), SuppressUnmanagedCodeSecurity]
649 public static extern void BodySetQuaternion(IntPtr body, ref dReal w); 649 public static extern void BodySetQuaternion(IntPtr body, ref dReal w);
650 650
651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
652 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R); 652 public static extern void BodySetRotation(IntPtr body, ref Matrix3 R);
653 653
654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity] 654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetRotation"), SuppressUnmanagedCodeSecurity]
655 public static extern void BodySetRotation(IntPtr body, ref dReal M00); 655 public static extern void BodySetRotation(IntPtr body, ref dReal M00);
656 656
657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity] 657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodySetTorque"), SuppressUnmanagedCodeSecurity]
658 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z); 658 public static extern void BodySetTorque(IntPtr body, dReal x, dReal y, dReal z);
659 659
660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity] 660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorFromWorld"), SuppressUnmanagedCodeSecurity]
661 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 661 public static extern void BodyVectorFromWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
662 662
663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity] 663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBodyVectorToWorld"), SuppressUnmanagedCodeSecurity]
664 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result); 664 public static extern void BodyVectorToWorld(IntPtr body, dReal px, dReal py, dReal pz, out Vector3 result);
665 665
666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity] 666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxBox"), SuppressUnmanagedCodeSecurity]
667 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1, 667 public static extern void BoxBox(ref Vector3 p1, ref Matrix3 R1,
668 ref Vector3 side1, ref Vector3 p2, 668 ref Vector3 side1, ref Vector3 p2,
669 ref Matrix3 R2, ref Vector3 side2, 669 ref Matrix3 R2, ref Vector3 side2,
670 ref Vector3 normal, out dReal depth, out int return_code, 670 ref Vector3 normal, out dReal depth, out int return_code,
671 int maxc, out ContactGeom contact, int skip); 671 int maxc, out ContactGeom contact, int skip);
672 672
673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity] 673 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dBoxTouchesBox"), SuppressUnmanagedCodeSecurity]
674 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1, 674 public static extern void BoxTouchesBox(ref Vector3 _p1, ref Matrix3 R1,
675 ref Vector3 side1, ref Vector3 _p2, 675 ref Vector3 side1, ref Vector3 _p2,
676 ref Matrix3 R2, ref Vector3 side2); 676 ref Matrix3 R2, ref Vector3 side2);
677 677
678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity] 678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCleanupODEAllDataForThread"), SuppressUnmanagedCodeSecurity]
679 public static extern void CleanupODEAllDataForThread(); 679 public static extern void CleanupODEAllDataForThread();
680 680
681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity] 681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dClosestLineSegmentPoints"), SuppressUnmanagedCodeSecurity]
682 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2, 682 public static extern void ClosestLineSegmentPoints(ref Vector3 a1, ref Vector3 a2,
683 ref Vector3 b1, ref Vector3 b2, 683 ref Vector3 b1, ref Vector3 b2,
684 ref Vector3 cp1, ref Vector3 cp2); 684 ref Vector3 cp1, ref Vector3 cp2);
685 685
686 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity] 686 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCloseODE"), SuppressUnmanagedCodeSecurity]
687 public static extern void CloseODE(); 687 public static extern void CloseODE();
688 688
689 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 689 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
690 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip); 690 public static extern int Collide(IntPtr o1, IntPtr o2, int flags, [In, Out] ContactGeom[] contact, int skip);
691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity] 691 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCollide"), SuppressUnmanagedCodeSecurity]
692 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip); 692 public static extern int CollidePtr(IntPtr o1, IntPtr o2, int flags, IntPtr contactgeomarray, int skip);
693 693
694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity] 694 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dConnectingJoint"), SuppressUnmanagedCodeSecurity]
695 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2); 695 public static extern IntPtr ConnectingJoint(IntPtr j1, IntPtr j2);
696 696
697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity] 697 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateBox"), SuppressUnmanagedCodeSecurity]
698 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz); 698 public static extern IntPtr CreateiBox(IntPtr space, dReal lx, dReal ly, dReal lz);
699 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz) 699 public static IntPtr CreateBox(IntPtr space, dReal lx, dReal ly, dReal lz)
700 { 700 {
701 NTotalGeoms++; 701 NTotalGeoms++;
702 return CreateiBox(space, lx, ly, lz); 702 return CreateiBox(space, lx, ly, lz);
703 } 703 }
704 704
705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity] 705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCapsule"), SuppressUnmanagedCodeSecurity]
706 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length); 706 public static extern IntPtr CreateiCapsule(IntPtr space, dReal radius, dReal length);
707 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length) 707 public static IntPtr CreateCapsule(IntPtr space, dReal radius, dReal length)
708 { 708 {
@@ -710,23 +710,23 @@ namespace OdeAPI
710 return CreateiCapsule(space, radius, length); 710 return CreateiCapsule(space, radius, length);
711 } 711 }
712 712
713 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity] 713 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateConvex"), SuppressUnmanagedCodeSecurity]
714 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 714 public static extern IntPtr CreateiConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
715 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons) 715 public static IntPtr CreateConvex(IntPtr space, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons)
716 { 716 {
717 NTotalGeoms++; 717 NTotalGeoms++;
718 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons); 718 return CreateiConvex(space, planes, planeCount, points, pointCount, polygons);
719 } 719 }
720 720
721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity] 721 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateCylinder"), SuppressUnmanagedCodeSecurity]
722 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length); 722 public static extern IntPtr CreateiCylinder(IntPtr space, dReal radius, dReal length);
723 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length) 723 public static IntPtr CreateCylinder(IntPtr space, dReal radius, dReal length)
724 { 724 {
725 NTotalGeoms++; 725 NTotalGeoms++;
726 return CreateiCylinder(space, radius, length); 726 return CreateiCylinder(space, radius, length);
727 } 727 }
728 728
729 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity] 729 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateHeightfield"), SuppressUnmanagedCodeSecurity]
730 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable); 730 public static extern IntPtr CreateiHeightfield(IntPtr space, IntPtr data, int bPlaceable);
731 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable) 731 public static IntPtr CreateHeightfield(IntPtr space, IntPtr data, int bPlaceable)
732 { 732 {
@@ -744,23 +744,23 @@ namespace OdeAPI
744 744
745 745
746 746
747
748 747
749 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] 748
750 public static extern IntPtr CreateiGeom(int classnum); 749 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
750 public static extern IntPtr CreateiGeom(int classnum);
751 public static IntPtr CreateGeom(int classnum) 751 public static IntPtr CreateGeom(int classnum)
752 { 752 {
753 NTotalGeoms++; 753 NTotalGeoms++;
754 return CreateiGeom(classnum); 754 return CreateiGeom(classnum);
755 } 755 }
756 756
757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity] 757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomClass"), SuppressUnmanagedCodeSecurity]
758 public static extern int CreateGeomClass(ref GeomClass classptr); 758 public static extern int CreateGeomClass(ref GeomClass classptr);
759 759
760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity] 760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeomTransform"), SuppressUnmanagedCodeSecurity]
761 public static extern IntPtr CreateGeomTransform(IntPtr space); 761 public static extern IntPtr CreateGeomTransform(IntPtr space);
762 762
763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity] 763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreatePlane"), SuppressUnmanagedCodeSecurity]
764 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d); 764 public static extern IntPtr CreateiPlane(IntPtr space, dReal a, dReal b, dReal c, dReal d);
765 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d) 765 public static IntPtr CreatePlane(IntPtr space, dReal a, dReal b, dReal c, dReal d)
766 { 766 {
@@ -768,25 +768,25 @@ namespace OdeAPI
768 return CreateiPlane(space, a, b, c, d); 768 return CreateiPlane(space, a, b, c, d);
769 } 769 }
770 770
771 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity] 771 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateRay"), SuppressUnmanagedCodeSecurity]
772 public static extern IntPtr CreateiRay(IntPtr space, dReal length); 772 public static extern IntPtr CreateiRay(IntPtr space, dReal length);
773 public static IntPtr CreateRay(IntPtr space, dReal length) 773 public static IntPtr CreateRay(IntPtr space, dReal length)
774 { 774 {
775 NTotalGeoms++; 775 NTotalGeoms++;
776 return CreateiRay(space, length); 776 return CreateiRay(space, length);
777 } 777 }
778 778
779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity] 779 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateSphere"), SuppressUnmanagedCodeSecurity]
780 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius); 780 public static extern IntPtr CreateiSphere(IntPtr space, dReal radius);
781 public static IntPtr CreateSphere(IntPtr space, dReal radius) 781 public static IntPtr CreateSphere(IntPtr space, dReal radius)
782 { 782 {
783 NTotalGeoms++; 783 NTotalGeoms++;
784 return CreateiSphere(space, radius); 784 return CreateiSphere(space, radius);
785 } 785 }
786 786
787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity] 787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateTriMesh"), SuppressUnmanagedCodeSecurity]
788 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data, 788 public static extern IntPtr CreateiTriMesh(IntPtr space, IntPtr data,
789 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback); 789 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback);
790 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data, 790 public static IntPtr CreateTriMesh(IntPtr space, IntPtr data,
791 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback) 791 TriCallback callback, TriArrayCallback arrayCallback, TriRayCallback rayCallback)
792 { 792 {
@@ -794,79 +794,79 @@ namespace OdeAPI
794 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback); 794 return CreateiTriMesh(space, data, callback, arrayCallback, rayCallback);
795 } 795 }
796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity] 796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDot"), SuppressUnmanagedCodeSecurity]
797 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n); 797 public static extern dReal Dot(ref dReal X0, ref dReal X1, int n);
798 798
799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity] 799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dDQfromW"), SuppressUnmanagedCodeSecurity]
800 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q); 800 public static extern void DQfromW(dReal[] dq, ref Vector3 w, ref Quaternion q);
801 801
802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity] 802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorCholesky"), SuppressUnmanagedCodeSecurity]
803 public static extern int FactorCholesky(ref dReal A00, int n); 803 public static extern int FactorCholesky(ref dReal A00, int n);
804 804
805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity] 805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dFactorLDLT"), SuppressUnmanagedCodeSecurity]
806 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip); 806 public static extern void FactorLDLT(ref dReal A, out dReal d, int n, int nskip);
807 807
808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
809 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len); 809 public static extern void GeomBoxGetLengths(IntPtr geom, out Vector3 len);
810 810
811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity] 811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxGetLengths"), SuppressUnmanagedCodeSecurity]
812 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x); 812 public static extern void GeomBoxGetLengths(IntPtr geom, out dReal x);
813 813
814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity] 814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxPointDepth"), SuppressUnmanagedCodeSecurity]
815 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z); 815 public static extern dReal GeomBoxPointDepth(IntPtr geom, dReal x, dReal y, dReal z);
816 816
817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity] 817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomBoxSetLengths"), SuppressUnmanagedCodeSecurity]
818 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z); 818 public static extern void GeomBoxSetLengths(IntPtr geom, dReal x, dReal y, dReal z);
819 819
820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity] 820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleGetParams"), SuppressUnmanagedCodeSecurity]
821 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length); 821 public static extern void GeomCapsuleGetParams(IntPtr geom, out dReal radius, out dReal length);
822 822
823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity] 823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsulePointDepth"), SuppressUnmanagedCodeSecurity]
824 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 824 public static extern dReal GeomCapsulePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
825 825
826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity] 826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCapsuleSetParams"), SuppressUnmanagedCodeSecurity]
827 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length); 827 public static extern void GeomCapsuleSetParams(IntPtr geom, dReal radius, dReal length);
828 828
829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity] 829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomClearOffset"), SuppressUnmanagedCodeSecurity]
830 public static extern void GeomClearOffset(IntPtr geom); 830 public static extern void GeomClearOffset(IntPtr geom);
831 831
832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
833 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos); 833 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref Vector3 pos);
834 834
835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity] 835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetPosition"), SuppressUnmanagedCodeSecurity]
836 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X); 836 public static extern IntPtr GeomCopyOffsetPosition(IntPtr geom, ref dReal X);
837 837
838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
839 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q); 839 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref Quaternion Q);
840 840
841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity] 841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
842 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X); 842 public static extern void GeomCopyOffsetQuaternion(IntPtr geom, ref dReal X);
843 843
844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
845 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R); 845 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref Matrix3 R);
846 846
847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity] 847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyOffsetRotation"), SuppressUnmanagedCodeSecurity]
848 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00); 848 public static extern IntPtr GeomCopyOffsetRotation(IntPtr geom, ref dReal M00);
849 849
850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
851 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos); 851 public static extern void GeomCopyPosition(IntPtr geom, out Vector3 pos);
852 852
853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity] 853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyPosition"), SuppressUnmanagedCodeSecurity]
854 public static extern void GeomCopyPosition(IntPtr geom, out dReal X); 854 public static extern void GeomCopyPosition(IntPtr geom, out dReal X);
855 855
856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
857 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R); 857 public static extern void GeomCopyRotation(IntPtr geom, out Matrix3 R);
858 858
859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity] 859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCopyRotation"), SuppressUnmanagedCodeSecurity]
860 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00); 860 public static extern void GeomCopyRotation(IntPtr geom, out dReal M00);
861 861
862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity] 862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderGetParams"), SuppressUnmanagedCodeSecurity]
863 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length); 863 public static extern void GeomCylinderGetParams(IntPtr geom, out dReal radius, out dReal length);
864 864
865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity] 865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomCylinderSetParams"), SuppressUnmanagedCodeSecurity]
866 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length); 866 public static extern void GeomCylinderSetParams(IntPtr geom, dReal radius, dReal length);
867 867
868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity] 868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDestroy"), SuppressUnmanagedCodeSecurity]
869 public static extern void GeomiDestroy(IntPtr geom); 869 public static extern void GeomiDestroy(IntPtr geom);
870 public static void GeomDestroy(IntPtr geom) 870 public static void GeomDestroy(IntPtr geom)
871 { 871 {
872 NTotalGeoms--; 872 NTotalGeoms--;
@@ -874,63 +874,63 @@ namespace OdeAPI
874 } 874 }
875 875
876 876
877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity] 877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomDisable"), SuppressUnmanagedCodeSecurity]
878 public static extern void GeomDisable(IntPtr geom); 878 public static extern void GeomDisable(IntPtr geom);
879 879
880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity] 880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomEnable"), SuppressUnmanagedCodeSecurity]
881 public static extern void GeomEnable(IntPtr geom); 881 public static extern void GeomEnable(IntPtr geom);
882 882
883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
884 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb); 884 public static extern void GeomGetAABB(IntPtr geom, out AABB aabb);
885 885
886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity] 886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetAABB"), SuppressUnmanagedCodeSecurity]
887 public static extern void GeomGetAABB(IntPtr geom, out dReal minX); 887 public static extern void GeomGetAABB(IntPtr geom, out dReal minX);
888 888
889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity] 889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetBody"), SuppressUnmanagedCodeSecurity]
890 public static extern IntPtr GeomGetBody(IntPtr geom); 890 public static extern IntPtr GeomGetBody(IntPtr geom);
891 891
892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity] 892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCategoryBits"), SuppressUnmanagedCodeSecurity]
893 public static extern uint GeomGetCategoryBits(IntPtr geom); 893 public static extern uint GeomGetCategoryBits(IntPtr geom);
894 894
895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity] 895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClassData"), SuppressUnmanagedCodeSecurity]
896 public static extern IntPtr GeomGetClassData(IntPtr geom); 896 public static extern IntPtr GeomGetClassData(IntPtr geom);
897 897
898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity] 898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetCollideBits"), SuppressUnmanagedCodeSecurity]
899 public static extern uint GeomGetCollideBits(IntPtr geom); 899 public static extern uint GeomGetCollideBits(IntPtr geom);
900 900
901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity] 901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetClass"), SuppressUnmanagedCodeSecurity]
902 public static extern GeomClassID GeomGetClass(IntPtr geom); 902 public static extern GeomClassID GeomGetClass(IntPtr geom);
903 903
904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity] 904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetData"), SuppressUnmanagedCodeSecurity]
905 public static extern IntPtr GeomGetData(IntPtr geom); 905 public static extern IntPtr GeomGetData(IntPtr geom);
906 906
907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity] 907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetPosition"), SuppressUnmanagedCodeSecurity]
908 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom); 908 public extern unsafe static Vector3* GeomGetOffsetPositionUnsafe(IntPtr geom);
909 public static Vector3 GeomGetOffsetPosition(IntPtr geom) 909 public static Vector3 GeomGetOffsetPosition(IntPtr geom)
910 { 910 {
911 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); } 911 unsafe { return *(GeomGetOffsetPositionUnsafe(geom)); }
912 } 912 }
913 913
914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity] 914 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetOffsetRotation"), SuppressUnmanagedCodeSecurity]
915 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom); 915 public extern unsafe static Matrix3* GeomGetOffsetRotationUnsafe(IntPtr geom);
916 public static Matrix3 GeomGetOffsetRotation(IntPtr geom) 916 public static Matrix3 GeomGetOffsetRotation(IntPtr geom)
917 { 917 {
918 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); } 918 unsafe { return *(GeomGetOffsetRotationUnsafe(geom)); }
919 } 919 }
920 920
921 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity] 921 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetPosition"), SuppressUnmanagedCodeSecurity]
922 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom); 922 public extern unsafe static Vector3* GeomGetPositionUnsafe(IntPtr geom);
923 public static Vector3 GeomGetPosition(IntPtr geom) 923 public static Vector3 GeomGetPosition(IntPtr geom)
924 { 924 {
925 unsafe { return *(GeomGetPositionUnsafe(geom)); } 925 unsafe { return *(GeomGetPositionUnsafe(geom)); }
926 } 926 }
927 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) 927 public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom)
928 { 928 {
929 Vector3 vtmp = GeomGetPosition(geom); 929 Vector3 vtmp = GeomGetPosition(geom);
930 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); 930 return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z);
931 } 931 }
932 932
933 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 933 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
934 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); 934 public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q);
935 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) 935 public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom)
936 { 936 {
@@ -939,85 +939,85 @@ namespace OdeAPI
939 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W); 939 return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W);
940 } 940 }
941 941
942 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] 942 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity]
943 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); 943 public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X);
944 944
945 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity] 945 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetRotation"), SuppressUnmanagedCodeSecurity]
946 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom); 946 public extern unsafe static Matrix3* GeomGetRotationUnsafe(IntPtr geom);
947 public static Matrix3 GeomGetRotation(IntPtr geom) 947 public static Matrix3 GeomGetRotation(IntPtr geom)
948 { 948 {
949 unsafe { return *(GeomGetRotationUnsafe(geom)); } 949 unsafe { return *(GeomGetRotationUnsafe(geom)); }
950 } 950 }
951 951
952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity] 952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetSpace"), SuppressUnmanagedCodeSecurity]
953 public static extern IntPtr GeomGetSpace(IntPtr geom); 953 public static extern IntPtr GeomGetSpace(IntPtr geom);
954 954
955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
956 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData, 956 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, byte[] pHeightData, int bCopyHeightData,
957 dReal width, dReal depth, int widthSamples, int depthSamples, 957 dReal width, dReal depth, int widthSamples, int depthSamples,
958 dReal scale, dReal offset, dReal thickness, int bWrap); 958 dReal scale, dReal offset, dReal thickness, int bWrap);
959 959
960 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity] 960 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildByte"), SuppressUnmanagedCodeSecurity]
961 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 961 public static extern void GeomHeightfieldDataBuildByte(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
962 dReal width, dReal depth, int widthSamples, int depthSamples, 962 dReal width, dReal depth, int widthSamples, int depthSamples,
963 dReal scale, dReal offset, dReal thickness, int bWrap); 963 dReal scale, dReal offset, dReal thickness, int bWrap);
964 964
965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity] 965 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildCallback"), SuppressUnmanagedCodeSecurity]
966 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback, 966 public static extern void GeomHeightfieldDataBuildCallback(IntPtr d, IntPtr pUserData, HeightfieldGetHeight pCallback,
967 dReal width, dReal depth, int widthSamples, int depthSamples, 967 dReal width, dReal depth, int widthSamples, int depthSamples,
968 dReal scale, dReal offset, dReal thickness, int bWrap); 968 dReal scale, dReal offset, dReal thickness, int bWrap);
969 969
970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
971 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData, 971 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, ushort[] pHeightData, int bCopyHeightData,
972 dReal width, dReal depth, int widthSamples, int depthSamples, 972 dReal width, dReal depth, int widthSamples, int depthSamples,
973 dReal scale, dReal offset, dReal thickness, int bWrap); 973 dReal scale, dReal offset, dReal thickness, int bWrap);
974 974
975 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 975 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
976 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData, 976 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, short[] pHeightData, int bCopyHeightData,
977 dReal width, dReal depth, int widthSamples, int depthSamples, 977 dReal width, dReal depth, int widthSamples, int depthSamples,
978 dReal scale, dReal offset, dReal thickness, int bWrap); 978 dReal scale, dReal offset, dReal thickness, int bWrap);
979 979
980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity] 980 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildShort"), SuppressUnmanagedCodeSecurity]
981 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 981 public static extern void GeomHeightfieldDataBuildShort(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
982 dReal width, dReal depth, int widthSamples, int depthSamples, 982 dReal width, dReal depth, int widthSamples, int depthSamples,
983 dReal scale, dReal offset, dReal thickness, int bWrap); 983 dReal scale, dReal offset, dReal thickness, int bWrap);
984 984
985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
986 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData, 986 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, float[] pHeightData, int bCopyHeightData,
987 dReal width, dReal depth, int widthSamples, int depthSamples, 987 dReal width, dReal depth, int widthSamples, int depthSamples,
988 dReal scale, dReal offset, dReal thickness, int bWrap); 988 dReal scale, dReal offset, dReal thickness, int bWrap);
989 989
990 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity] 990 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildSingle"), SuppressUnmanagedCodeSecurity]
991 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 991 public static extern void GeomHeightfieldDataBuildSingle(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
992 dReal width, dReal depth, int widthSamples, int depthSamples, 992 dReal width, dReal depth, int widthSamples, int depthSamples,
993 dReal scale, dReal offset, dReal thickness, int bWrap); 993 dReal scale, dReal offset, dReal thickness, int bWrap);
994 994
995 995
996 996
997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
998 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, 998 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
999 dReal width, dReal depth, int widthSamples, int depthSamples, 999 dReal width, dReal depth, int widthSamples, int depthSamples,
1000 dReal scale, dReal offset, dReal thickness, int bWrap); 1000 dReal scale, dReal offset, dReal thickness, int bWrap);
1001 1001
1002 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1002 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1003 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData, 1003 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
1004 dReal width, dReal depth, int widthSamples, int depthSamples, 1004 dReal width, dReal depth, int widthSamples, int depthSamples,
1005 dReal scale, dReal offset, dReal thickness, int bWrap); 1005 dReal scale, dReal offset, dReal thickness, int bWrap);
1006 1006
1007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity] 1007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataCreate"), SuppressUnmanagedCodeSecurity]
1008 public static extern IntPtr GeomHeightfieldDataCreate(); 1008 public static extern IntPtr GeomHeightfieldDataCreate();
1009 1009
1010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity] 1010 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataDestroy"), SuppressUnmanagedCodeSecurity]
1011 public static extern void GeomHeightfieldDataDestroy(IntPtr d); 1011 public static extern void GeomHeightfieldDataDestroy(IntPtr d);
1012 1012
1013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity] 1013 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataSetBounds"), SuppressUnmanagedCodeSecurity]
1014 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight); 1014 public static extern void GeomHeightfieldDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
1015 1015
1016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1017 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g); 1017 public static extern IntPtr GeomHeightfieldGetHeightfieldData(IntPtr g);
1018 1018
1019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1019 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1020 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); 1020 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
1021 1021
1022 1022
1023 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity] 1023 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
@@ -1046,279 +1046,279 @@ namespace OdeAPI
1046 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d); 1046 public static extern void GeomOSTerrainSetHeightfieldData(IntPtr g, IntPtr d);
1047 1047
1048 1048
1049 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] 1049 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
1050 public static extern bool GeomIsEnabled(IntPtr geom); 1050 public static extern bool GeomIsEnabled(IntPtr geom);
1051 1051
1052 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity] 1052 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsOffset"), SuppressUnmanagedCodeSecurity]
1053 public static extern bool GeomIsOffset(IntPtr geom); 1053 public static extern bool GeomIsOffset(IntPtr geom);
1054 1054
1055 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity] 1055 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsSpace"), SuppressUnmanagedCodeSecurity]
1056 public static extern bool GeomIsSpace(IntPtr geom); 1056 public static extern bool GeomIsSpace(IntPtr geom);
1057 1057
1058 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1058 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1059 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result); 1059 public static extern void GeomPlaneGetParams(IntPtr geom, ref Vector4 result);
1060 1060
1061 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity] 1061 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneGetParams"), SuppressUnmanagedCodeSecurity]
1062 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A); 1062 public static extern void GeomPlaneGetParams(IntPtr geom, ref dReal A);
1063 1063
1064 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity] 1064 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlanePointDepth"), SuppressUnmanagedCodeSecurity]
1065 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1065 public static extern dReal GeomPlanePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1066 1066
1067 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity] 1067 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomPlaneSetParams"), SuppressUnmanagedCodeSecurity]
1068 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d); 1068 public static extern void GeomPlaneSetParams(IntPtr plane, dReal a, dReal b, dReal c, dReal d);
1069 1069
1070 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1070 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1071 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir); 1071 public static extern void GeomRayGet(IntPtr ray, ref Vector3 start, ref Vector3 dir);
1072 1072
1073 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity] 1073 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGet"), SuppressUnmanagedCodeSecurity]
1074 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX); 1074 public static extern void GeomRayGet(IntPtr ray, ref dReal startX, ref dReal dirX);
1075 1075
1076 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity] 1076 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetClosestHit"), SuppressUnmanagedCodeSecurity]
1077 public static extern int GeomRayGetClosestHit(IntPtr ray); 1077 public static extern int GeomRayGetClosestHit(IntPtr ray);
1078 1078
1079 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity] 1079 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetLength"), SuppressUnmanagedCodeSecurity]
1080 public static extern dReal GeomRayGetLength(IntPtr ray); 1080 public static extern dReal GeomRayGetLength(IntPtr ray);
1081 1081
1082 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity] 1082 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRayGetParams"), SuppressUnmanagedCodeSecurity]
1083 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull); 1083 public static extern dReal GeomRayGetParams(IntPtr g, out int firstContact, out int backfaceCull);
1084 1084
1085 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity] 1085 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySet"), SuppressUnmanagedCodeSecurity]
1086 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz); 1086 public static extern void GeomRaySet(IntPtr ray, dReal px, dReal py, dReal pz, dReal dx, dReal dy, dReal dz);
1087 1087
1088 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity] 1088 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetClosestHit"), SuppressUnmanagedCodeSecurity]
1089 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit); 1089 public static extern void GeomRaySetClosestHit(IntPtr ray, int closestHit);
1090 1090
1091 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity] 1091 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetLength"), SuppressUnmanagedCodeSecurity]
1092 public static extern void GeomRaySetLength(IntPtr ray, dReal length); 1092 public static extern void GeomRaySetLength(IntPtr ray, dReal length);
1093 1093
1094 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity] 1094 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomRaySetParams"), SuppressUnmanagedCodeSecurity]
1095 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull); 1095 public static extern void GeomRaySetParams(IntPtr ray, int firstContact, int backfaceCull);
1096 1096
1097 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity] 1097 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetBody"), SuppressUnmanagedCodeSecurity]
1098 public static extern void GeomSetBody(IntPtr geom, IntPtr body); 1098 public static extern void GeomSetBody(IntPtr geom, IntPtr body);
1099 1099
1100 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity] 1100 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCategoryBits"), SuppressUnmanagedCodeSecurity]
1101 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits); 1101 public static extern void GeomSetCategoryBits(IntPtr geom, uint bits);
1102 1102
1103 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity] 1103 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetCollideBits"), SuppressUnmanagedCodeSecurity]
1104 public static extern void GeomSetCollideBits(IntPtr geom, uint bits); 1104 public static extern void GeomSetCollideBits(IntPtr geom, uint bits);
1105 1105
1106 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity] 1106 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetConvex"), SuppressUnmanagedCodeSecurity]
1107 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons); 1107 public static extern IntPtr GeomSetConvex(IntPtr geom, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
1108 1108
1109 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity] 1109 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetData"), SuppressUnmanagedCodeSecurity]
1110 public static extern void GeomSetData(IntPtr geom, IntPtr data); 1110 public static extern void GeomSetData(IntPtr geom, IntPtr data);
1111 1111
1112 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity] 1112 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetPosition"), SuppressUnmanagedCodeSecurity]
1113 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1113 public static extern void GeomSetOffsetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1114
1115 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1116 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1117
1118 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1119 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1120
1121 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1122 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1123
1124 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1125 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1126 1114
1127 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity] 1115 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1128 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z); 1116 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref Quaternion Q);
1129 1117
1130 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1118 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetQuaternion"), SuppressUnmanagedCodeSecurity]
1131 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q); 1119 public static extern void GeomSetOffsetQuaternion(IntPtr geom, ref dReal X);
1132 1120
1133 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity] 1121 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1134 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X); 1122 public static extern void GeomSetOffsetRotation(IntPtr geom, ref Matrix3 R);
1135 1123
1136 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1124 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetRotation"), SuppressUnmanagedCodeSecurity]
1137 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R); 1125 public static extern void GeomSetOffsetRotation(IntPtr geom, ref dReal M00);
1138 1126
1139 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity] 1127 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldPosition"), SuppressUnmanagedCodeSecurity]
1140 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00); 1128 public static extern void GeomSetOffsetWorldPosition(IntPtr geom, dReal x, dReal y, dReal z);
1141 1129
1142 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity] 1130 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1143 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z); 1131 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref Quaternion Q);
1144 1132
1145 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1133 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldQuaternion"), SuppressUnmanagedCodeSecurity]
1146 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat); 1134 public static extern void GeomSetOffsetWorldQuaternion(IntPtr geom, ref dReal X);
1147 1135
1148 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity] 1136 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1149 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w); 1137 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref Matrix3 R);
1150 1138
1151 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1139 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetOffsetWorldRotation"), SuppressUnmanagedCodeSecurity]
1152 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R); 1140 public static extern void GeomSetOffsetWorldRotation(IntPtr geom, ref dReal M00);
1153 1141
1154 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity] 1142 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetPosition"), SuppressUnmanagedCodeSecurity]
1155 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00); 1143 public static extern void GeomSetPosition(IntPtr geom, dReal x, dReal y, dReal z);
1156 1144
1157 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity] 1145 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1158 public static extern dReal GeomSphereGetRadius(IntPtr geom); 1146 public static extern void GeomSetQuaternion(IntPtr geom, ref Quaternion quat);
1159 1147
1160 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity] 1148 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetQuaternion"), SuppressUnmanagedCodeSecurity]
1161 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z); 1149 public static extern void GeomSetQuaternion(IntPtr geom, ref dReal w);
1162 1150
1163 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity] 1151 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1164 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius); 1152 public static extern void GeomSetRotation(IntPtr geom, ref Matrix3 R);
1165 1153
1166 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity] 1154 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSetRotation"), SuppressUnmanagedCodeSecurity]
1167 public static extern int GeomTransformGetCleanup(IntPtr geom); 1155 public static extern void GeomSetRotation(IntPtr geom, ref dReal M00);
1168 1156
1169 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity] 1157 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereGetRadius"), SuppressUnmanagedCodeSecurity]
1170 public static extern IntPtr GeomTransformGetGeom(IntPtr geom); 1158 public static extern dReal GeomSphereGetRadius(IntPtr geom);
1171 1159
1172 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity] 1160 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSpherePointDepth"), SuppressUnmanagedCodeSecurity]
1173 public static extern int GeomTransformGetInfo(IntPtr geom); 1161 public static extern dReal GeomSpherePointDepth(IntPtr geom, dReal x, dReal y, dReal z);
1174 1162
1175 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity] 1163 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomSphereSetRadius"), SuppressUnmanagedCodeSecurity]
1176 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode); 1164 public static extern void GeomSphereSetRadius(IntPtr geom, dReal radius);
1177 1165
1178 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity] 1166 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetCleanup"), SuppressUnmanagedCodeSecurity]
1179 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj); 1167 public static extern int GeomTransformGetCleanup(IntPtr geom);
1180 1168
1181 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity] 1169 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetGeom"), SuppressUnmanagedCodeSecurity]
1182 public static extern void GeomTransformSetInfo(IntPtr geom, int info); 1170 public static extern IntPtr GeomTransformGetGeom(IntPtr geom);
1183 1171
1184 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1172 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformGetInfo"), SuppressUnmanagedCodeSecurity]
1185 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1173 public static extern int GeomTransformGetInfo(IntPtr geom);
1186 double[] vertices, int vertexStride, int vertexCount,
1187 int[] indices, int indexCount, int triStride);
1188 1174
1189 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity] 1175 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetCleanup"), SuppressUnmanagedCodeSecurity]
1190 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1176 public static extern void GeomTransformSetCleanup(IntPtr geom, int mode);
1191 IntPtr vertices, int vertexStride, int vertexCount,
1192 IntPtr indices, int indexCount, int triStride);
1193 1177
1194 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1178 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetGeom"), SuppressUnmanagedCodeSecurity]
1195 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d, 1179 public static extern void GeomTransformSetGeom(IntPtr geom, IntPtr obj);
1196 double[] vertices, int vertexStride, int vertexCount,
1197 int[] indices, int indexCount, int triStride,
1198 double[] normals);
1199 1180
1200 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity] 1181 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTransformSetInfo"), SuppressUnmanagedCodeSecurity]
1201 public static extern void GeomTriMeshDataBuildDouble(IntPtr d, 1182 public static extern void GeomTransformSetInfo(IntPtr geom, int info);
1202 IntPtr vertices, int vertexStride, int vertexCount,
1203 IntPtr indices, int indexCount, int triStride,
1204 IntPtr normals);
1205 1183
1206 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1184 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1207 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1185 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1208 dReal[] vertices, int vertexStride, int vertexCount, 1186 double[] vertices, int vertexStride, int vertexCount,
1209 int[] indices, int indexCount, int triStride); 1187 int[] indices, int indexCount, int triStride);
1210 1188
1211 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity] 1189 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble"), SuppressUnmanagedCodeSecurity]
1212 public static extern void GeomTriMeshDataBuildSingle(IntPtr d, 1190 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1213 IntPtr vertices, int vertexStride, int vertexCount, 1191 IntPtr vertices, int vertexStride, int vertexCount,
1214 IntPtr indices, int indexCount, int triStride); 1192 IntPtr indices, int indexCount, int triStride);
1215 1193
1216 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1194 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1217 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1195 public static extern void GeomTriMeshDataBuildDouble1(IntPtr d,
1218 dReal[] vertices, int vertexStride, int vertexCount, 1196 double[] vertices, int vertexStride, int vertexCount,
1219 int[] indices, int indexCount, int triStride, 1197 int[] indices, int indexCount, int triStride,
1220 dReal[] normals); 1198 double[] normals);
1221 1199
1222 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity] 1200 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildDouble1"), SuppressUnmanagedCodeSecurity]
1223 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d, 1201 public static extern void GeomTriMeshDataBuildDouble(IntPtr d,
1224 IntPtr vertices, int vertexStride, int vertexCount, 1202 IntPtr vertices, int vertexStride, int vertexCount,
1225 IntPtr indices, int indexCount, int triStride, 1203 IntPtr indices, int indexCount, int triStride,
1226 IntPtr normals); 1204 IntPtr normals);
1227 1205
1228 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1206 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1229 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1207 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1230 float[] vertices, int vertexStride, int vertexCount, 1208 dReal[] vertices, int vertexStride, int vertexCount,
1231 int[] indices, int indexCount, int triStride); 1209 int[] indices, int indexCount, int triStride);
1232 1210
1233 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity] 1211 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple"), SuppressUnmanagedCodeSecurity]
1234 public static extern void GeomTriMeshDataBuildSimple(IntPtr d, 1212 public static extern void GeomTriMeshDataBuildSingle(IntPtr d,
1235 IntPtr vertices, int vertexStride, int vertexCount, 1213 IntPtr vertices, int vertexStride, int vertexCount,
1236 IntPtr indices, int indexCount, int triStride); 1214 IntPtr indices, int indexCount, int triStride);
1237 1215
1238 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1216 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1239 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1217 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1240 float[] vertices, int vertexStride, int vertexCount, 1218 dReal[] vertices, int vertexStride, int vertexCount,
1241 int[] indices, int indexCount, int triStride, 1219 int[] indices, int indexCount, int triStride,
1242 float[] normals); 1220 dReal[] normals);
1243 1221
1244 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity] 1222 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSimple1"), SuppressUnmanagedCodeSecurity]
1245 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d, 1223 public static extern void GeomTriMeshDataBuildSingle1(IntPtr d,
1246 IntPtr vertices, int vertexStride, int vertexCount, 1224 IntPtr vertices, int vertexStride, int vertexCount,
1247 IntPtr indices, int indexCount, int triStride, 1225 IntPtr indices, int indexCount, int triStride,
1248 IntPtr normals); 1226 IntPtr normals);
1249 1227
1250 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity] 1228 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1251 public static extern void GeomTriMeshClearTCCache(IntPtr g); 1229 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1230 float[] vertices, int vertexStride, int vertexCount,
1231 int[] indices, int indexCount, int triStride);
1252 1232
1253 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity] 1233 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle"), SuppressUnmanagedCodeSecurity]
1254 public static extern IntPtr GeomTriMeshDataCreate(); 1234 public static extern void GeomTriMeshDataBuildSimple(IntPtr d,
1235 IntPtr vertices, int vertexStride, int vertexCount,
1236 IntPtr indices, int indexCount, int triStride);
1255 1237
1256 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity] 1238 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1257 public static extern void GeomTriMeshDataDestroy(IntPtr d); 1239 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1240 float[] vertices, int vertexStride, int vertexCount,
1241 int[] indices, int indexCount, int triStride,
1242 float[] normals);
1258 1243
1259 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity] 1244 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataBuildSingle1"), SuppressUnmanagedCodeSecurity]
1260 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id); 1245 public static extern void GeomTriMeshDataBuildSimple1(IntPtr d,
1246 IntPtr vertices, int vertexStride, int vertexCount,
1247 IntPtr indices, int indexCount, int triStride,
1248 IntPtr normals);
1261 1249
1262 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity] 1250 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshClearTCCache"), SuppressUnmanagedCodeSecurity]
1263 public static extern void GeomTriMeshDataPreprocess(IntPtr d); 1251 public static extern void GeomTriMeshClearTCCache(IntPtr g);
1264 1252
1265 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity] 1253 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataCreate"), SuppressUnmanagedCodeSecurity]
1266 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data); 1254 public static extern IntPtr GeomTriMeshDataCreate();
1267 1255
1268 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity] 1256 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataDestroy"), SuppressUnmanagedCodeSecurity]
1269 public static extern void GeomTriMeshDataUpdate(IntPtr d); 1257 public static extern void GeomTriMeshDataDestroy(IntPtr d);
1270 1258
1271 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity] 1259 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataGet"), SuppressUnmanagedCodeSecurity]
1272 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable); 1260 public static extern IntPtr GeomTriMeshDataGet(IntPtr d, int data_id);
1273 1261
1274 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity] 1262 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataPreprocess"), SuppressUnmanagedCodeSecurity]
1275 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g); 1263 public static extern void GeomTriMeshDataPreprocess(IntPtr d);
1276 1264
1277 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity] 1265 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataSet"), SuppressUnmanagedCodeSecurity]
1278 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g); 1266 public static extern void GeomTriMeshDataSet(IntPtr d, int data_id, IntPtr in_data);
1279 1267
1280 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity] 1268 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshDataUpdate"), SuppressUnmanagedCodeSecurity]
1281 public static extern IntPtr GeomTriMeshGetData(IntPtr g); 1269 public static extern void GeomTriMeshDataUpdate(IntPtr d);
1282 1270
1283 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity] 1271 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshEnableTC"), SuppressUnmanagedCodeSecurity]
1284 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom); 1272 public static extern void GeomTriMeshEnableTC(IntPtr g, int geomClass, bool enable);
1285 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom) 1273
1286 { 1274 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetArrayCallback"), SuppressUnmanagedCodeSecurity]
1287 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); } 1275 public static extern TriArrayCallback GeomTriMeshGetArrayCallback(IntPtr g);
1288 } 1276
1277 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetCallback"), SuppressUnmanagedCodeSecurity]
1278 public static extern TriCallback GeomTriMeshGetCallback(IntPtr g);
1279
1280 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetData"), SuppressUnmanagedCodeSecurity]
1281 public static extern IntPtr GeomTriMeshGetData(IntPtr g);
1282
1283 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetLastTransform"), SuppressUnmanagedCodeSecurity]
1284 public extern unsafe static Matrix4* GeomTriMeshGetLastTransformUnsafe(IntPtr geom);
1285 public static Matrix4 GeomTriMeshGetLastTransform(IntPtr geom)
1286 {
1287 unsafe { return *(GeomTriMeshGetLastTransformUnsafe(geom)); }
1288 }
1289 1289
1290 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity] 1290 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetPoint"), SuppressUnmanagedCodeSecurity]
1291 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec); 1291 public extern static void GeomTriMeshGetPoint(IntPtr g, int index, dReal u, dReal v, ref Vector3 outVec);
1292 1292
1293 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity] 1293 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetRayCallback"), SuppressUnmanagedCodeSecurity]
1294 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g); 1294 public static extern TriRayCallback GeomTriMeshGetRayCallback(IntPtr g);
1295 1295
1296 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity] 1296 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangle"), SuppressUnmanagedCodeSecurity]
1297 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2); 1297 public extern static void GeomTriMeshGetTriangle(IntPtr g, int index, ref Vector3 v0, ref Vector3 v1, ref Vector3 v2);
1298 1298
1299 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity] 1299 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriangleCount"), SuppressUnmanagedCodeSecurity]
1300 public extern static int GeomTriMeshGetTriangleCount(IntPtr g); 1300 public extern static int GeomTriMeshGetTriangleCount(IntPtr g);
1301 1301
1302 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity] 1302 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshGetTriMeshDataID"), SuppressUnmanagedCodeSecurity]
1303 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g); 1303 public static extern IntPtr GeomTriMeshGetTriMeshDataID(IntPtr g);
1304 1304
1305 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity] 1305 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshIsTCEnabled"), SuppressUnmanagedCodeSecurity]
1306 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass); 1306 public static extern bool GeomTriMeshIsTCEnabled(IntPtr g, int geomClass);
1307 1307
1308 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity] 1308 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetArrayCallback"), SuppressUnmanagedCodeSecurity]
1309 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback); 1309 public static extern void GeomTriMeshSetArrayCallback(IntPtr g, TriArrayCallback arrayCallback);
1310 1310
1311 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity] 1311 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetCallback"), SuppressUnmanagedCodeSecurity]
1312 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback); 1312 public static extern void GeomTriMeshSetCallback(IntPtr g, TriCallback callback);
1313 1313
1314 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity] 1314 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetData"), SuppressUnmanagedCodeSecurity]
1315 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data); 1315 public static extern void GeomTriMeshSetData(IntPtr g, IntPtr data);
1316 1316
1317 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1317 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1318 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans); 1318 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref Matrix4 last_trans);
1319 1319
1320 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity] 1320 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetLastTransform"), SuppressUnmanagedCodeSecurity]
1321 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00); 1321 public static extern void GeomTriMeshSetLastTransform(IntPtr g, ref dReal M00);
1322 1322
1323 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity] 1323 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomTriMeshSetRayCallback"), SuppressUnmanagedCodeSecurity]
1324 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback); 1324 public static extern void GeomTriMeshSetRayCallback(IntPtr g, TriRayCallback callback);
@@ -1333,416 +1333,416 @@ namespace OdeAPI
1333 return s; 1333 return s;
1334 } 1334 }
1335 1335
1336 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity] 1336 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceCreate"), SuppressUnmanagedCodeSecurity]
1337 public static extern IntPtr HashSpaceCreate(IntPtr space); 1337 public static extern IntPtr HashSpaceCreate(IntPtr space);
1338 1338
1339 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity] 1339 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceGetLevels"), SuppressUnmanagedCodeSecurity]
1340 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel); 1340 public static extern void HashSpaceGetLevels(IntPtr space, out int minlevel, out int maxlevel);
1341 1341
1342 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity] 1342 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dHashSpaceSetLevels"), SuppressUnmanagedCodeSecurity]
1343 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel); 1343 public static extern void HashSpaceSetLevels(IntPtr space, int minlevel, int maxlevel);
1344 1344
1345 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity] 1345 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInfiniteAABB"), SuppressUnmanagedCodeSecurity]
1346 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb); 1346 public static extern void InfiniteAABB(IntPtr geom, out AABB aabb);
1347 1347
1348 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity] 1348 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE"), SuppressUnmanagedCodeSecurity]
1349 public static extern void InitODE(); 1349 public static extern void InitODE();
1350 1350
1351 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity] 1351 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInitODE2"), SuppressUnmanagedCodeSecurity]
1352 public static extern int InitODE2(uint ODEInitFlags); 1352 public static extern int InitODE2(uint ODEInitFlags);
1353 1353
1354 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity] 1354 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dIsPositiveDefinite"), SuppressUnmanagedCodeSecurity]
1355 public static extern int IsPositiveDefinite(ref dReal A, int n); 1355 public static extern int IsPositiveDefinite(ref dReal A, int n);
1356 1356
1357 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity] 1357 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dInvertPDMatrix"), SuppressUnmanagedCodeSecurity]
1358 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n); 1358 public static extern int InvertPDMatrix(ref dReal A, out dReal Ainv, int n);
1359 1359
1360 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity] 1360 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddAMotorTorques"), SuppressUnmanagedCodeSecurity]
1361 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3); 1361 public static extern void JointAddAMotorTorques(IntPtr joint, dReal torque1, dReal torque2, dReal torque3);
1362 1362
1363 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity] 1363 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHingeTorque"), SuppressUnmanagedCodeSecurity]
1364 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque); 1364 public static extern void JointAddHingeTorque(IntPtr joint, dReal torque);
1365 1365
1366 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity] 1366 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddHinge2Torque"), SuppressUnmanagedCodeSecurity]
1367 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2); 1367 public static extern void JointAddHinge2Torques(IntPtr joint, dReal torque1, dReal torque2);
1368 1368
1369 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity] 1369 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddPRTorque"), SuppressUnmanagedCodeSecurity]
1370 public static extern void JointAddPRTorque(IntPtr joint, dReal torque); 1370 public static extern void JointAddPRTorque(IntPtr joint, dReal torque);
1371 1371
1372 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity] 1372 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddUniversalTorque"), SuppressUnmanagedCodeSecurity]
1373 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2); 1373 public static extern void JointAddUniversalTorques(IntPtr joint, dReal torque1, dReal torque2);
1374 1374
1375 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity] 1375 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAddSliderForce"), SuppressUnmanagedCodeSecurity]
1376 public static extern void JointAddSliderForce(IntPtr joint, dReal force); 1376 public static extern void JointAddSliderForce(IntPtr joint, dReal force);
1377 1377
1378 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity] 1378 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointAttach"), SuppressUnmanagedCodeSecurity]
1379 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2); 1379 public static extern void JointAttach(IntPtr joint, IntPtr body1, IntPtr body2);
1380 1380
1381 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity] 1381 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateAMotor"), SuppressUnmanagedCodeSecurity]
1382 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group); 1382 public static extern IntPtr JointCreateAMotor(IntPtr world, IntPtr group);
1383 1383
1384 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity] 1384 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateBall"), SuppressUnmanagedCodeSecurity]
1385 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group); 1385 public static extern IntPtr JointCreateBall(IntPtr world, IntPtr group);
1386 1386
1387 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1387 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1388 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact); 1388 public static extern IntPtr JointCreateContact(IntPtr world, IntPtr group, ref Contact contact);
1389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity] 1389 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateContact"), SuppressUnmanagedCodeSecurity]
1390 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact); 1390 public static extern IntPtr JointCreateContactPtr(IntPtr world, IntPtr group, IntPtr contact);
1391 1391
1392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity] 1392 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateFixed"), SuppressUnmanagedCodeSecurity]
1393 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group); 1393 public static extern IntPtr JointCreateFixed(IntPtr world, IntPtr group);
1394 1394
1395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity] 1395 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge"), SuppressUnmanagedCodeSecurity]
1396 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group); 1396 public static extern IntPtr JointCreateHinge(IntPtr world, IntPtr group);
1397 1397
1398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity] 1398 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateHinge2"), SuppressUnmanagedCodeSecurity]
1399 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group); 1399 public static extern IntPtr JointCreateHinge2(IntPtr world, IntPtr group);
1400 1400
1401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity] 1401 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateLMotor"), SuppressUnmanagedCodeSecurity]
1402 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group); 1402 public static extern IntPtr JointCreateLMotor(IntPtr world, IntPtr group);
1403 1403
1404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity] 1404 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateNull"), SuppressUnmanagedCodeSecurity]
1405 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group); 1405 public static extern IntPtr JointCreateNull(IntPtr world, IntPtr group);
1406 1406
1407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity] 1407 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePR"), SuppressUnmanagedCodeSecurity]
1408 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group); 1408 public static extern IntPtr JointCreatePR(IntPtr world, IntPtr group);
1409 1409
1410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity] 1410 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreatePlane2D"), SuppressUnmanagedCodeSecurity]
1411 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group); 1411 public static extern IntPtr JointCreatePlane2D(IntPtr world, IntPtr group);
1412 1412
1413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity] 1413 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateSlider"), SuppressUnmanagedCodeSecurity]
1414 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group); 1414 public static extern IntPtr JointCreateSlider(IntPtr world, IntPtr group);
1415 1415
1416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity] 1416 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointCreateUniversal"), SuppressUnmanagedCodeSecurity]
1417 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group); 1417 public static extern IntPtr JointCreateUniversal(IntPtr world, IntPtr group);
1418 1418
1419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity] 1419 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointDestroy"), SuppressUnmanagedCodeSecurity]
1420 public static extern void JointDestroy(IntPtr j); 1420 public static extern void JointDestroy(IntPtr j);
1421 1421
1422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1422 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1423 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum); 1423 public static extern dReal JointGetAMotorAngle(IntPtr j, int anum);
1424 1424
1425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity] 1425 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAngleRate"), SuppressUnmanagedCodeSecurity]
1426 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum); 1426 public static extern dReal JointGetAMotorAngleRate(IntPtr j, int anum);
1427 1427
1428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1428 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1429 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result); 1429 public static extern void JointGetAMotorAxis(IntPtr j, int anum, out Vector3 result);
1430 1430
1431 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity] 1431 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorAxisRel"), SuppressUnmanagedCodeSecurity]
1432 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum); 1432 public static extern int JointGetAMotorAxisRel(IntPtr j, int anum);
1433 1433
1434 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity] 1434 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorMode"), SuppressUnmanagedCodeSecurity]
1435 public static extern int JointGetAMotorMode(IntPtr j); 1435 public static extern int JointGetAMotorMode(IntPtr j);
1436 1436
1437 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1437 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1438 public static extern int JointGetAMotorNumAxes(IntPtr j); 1438 public static extern int JointGetAMotorNumAxes(IntPtr j);
1439 1439
1440 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity] 1440 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetAMotorParam"), SuppressUnmanagedCodeSecurity]
1441 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter); 1441 public static extern dReal JointGetAMotorParam(IntPtr j, int parameter);
1442 1442
1443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity] 1443 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor"), SuppressUnmanagedCodeSecurity]
1444 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result); 1444 public static extern void JointGetBallAnchor(IntPtr j, out Vector3 result);
1445 1445
1446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1446 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1447 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result); 1447 public static extern void JointGetBallAnchor2(IntPtr j, out Vector3 result);
1448 1448
1449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity] 1449 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetBody"), SuppressUnmanagedCodeSecurity]
1450 public static extern IntPtr JointGetBody(IntPtr j); 1450 public static extern IntPtr JointGetBody(IntPtr j);
1451 1451
1452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity] 1452 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetData"), SuppressUnmanagedCodeSecurity]
1453 public static extern IntPtr JointGetData(IntPtr j); 1453 public static extern IntPtr JointGetData(IntPtr j);
1454 1454
1455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity] 1455 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetFeedback"), SuppressUnmanagedCodeSecurity]
1456 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j); 1456 public extern unsafe static JointFeedback* JointGetFeedbackUnsafe(IntPtr j);
1457 public static JointFeedback JointGetFeedback(IntPtr j) 1457 public static JointFeedback JointGetFeedback(IntPtr j)
1458 { 1458 {
1459 unsafe { return *(JointGetFeedbackUnsafe(j)); } 1459 unsafe { return *(JointGetFeedbackUnsafe(j)); }
1460 } 1460 }
1461 1461
1462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1462 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1463 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result); 1463 public static extern void JointGetHingeAnchor(IntPtr j, out Vector3 result);
1464 1464
1465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity] 1465 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngle"), SuppressUnmanagedCodeSecurity]
1466 public static extern dReal JointGetHingeAngle(IntPtr j); 1466 public static extern dReal JointGetHingeAngle(IntPtr j);
1467 1467
1468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity] 1468 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAngleRate"), SuppressUnmanagedCodeSecurity]
1469 public static extern dReal JointGetHingeAngleRate(IntPtr j); 1469 public static extern dReal JointGetHingeAngleRate(IntPtr j);
1470 1470
1471 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity] 1471 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAxis"), SuppressUnmanagedCodeSecurity]
1472 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result); 1472 public static extern void JointGetHingeAxis(IntPtr j, out Vector3 result);
1473 1473
1474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity] 1474 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeParam"), SuppressUnmanagedCodeSecurity]
1475 public static extern dReal JointGetHingeParam(IntPtr j, int parameter); 1475 public static extern dReal JointGetHingeParam(IntPtr j, int parameter);
1476 1476
1477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity] 1477 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1"), SuppressUnmanagedCodeSecurity]
1478 public static extern dReal JointGetHinge2Angle1(IntPtr j); 1478 public static extern dReal JointGetHinge2Angle1(IntPtr j);
1479 1479
1480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity] 1480 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle1Rate"), SuppressUnmanagedCodeSecurity]
1481 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j); 1481 public static extern dReal JointGetHinge2Angle1Rate(IntPtr j);
1482 1482
1483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity] 1483 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Angle2Rate"), SuppressUnmanagedCodeSecurity]
1484 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j); 1484 public static extern dReal JointGetHinge2Angle2Rate(IntPtr j);
1485 1485
1486 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity] 1486 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHingeAnchor2"), SuppressUnmanagedCodeSecurity]
1487 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result); 1487 public static extern void JointGetHingeAnchor2(IntPtr j, out Vector3 result);
1488 1488
1489 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1489 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1490 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result); 1490 public static extern void JointGetHinge2Anchor(IntPtr j, out Vector3 result);
1491 1491
1492 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity] 1492 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Anchor2"), SuppressUnmanagedCodeSecurity]
1493 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result); 1493 public static extern void JointGetHinge2Anchor2(IntPtr j, out Vector3 result);
1494 1494
1495 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1495 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1496 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result); 1496 public static extern void JointGetHinge2Axis1(IntPtr j, out Vector3 result);
1497 1497
1498 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1498 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1499 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result); 1499 public static extern void JointGetHinge2Axis2(IntPtr j, out Vector3 result);
1500 1500
1501 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity] 1501 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetHinge2Param"), SuppressUnmanagedCodeSecurity]
1502 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter); 1502 public static extern dReal JointGetHinge2Param(IntPtr j, int parameter);
1503 1503
1504 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1504 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1505 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result); 1505 public static extern void JointGetLMotorAxis(IntPtr j, int anum, out Vector3 result);
1506 1506
1507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1507 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1508 public static extern int JointGetLMotorNumAxes(IntPtr j); 1508 public static extern int JointGetLMotorNumAxes(IntPtr j);
1509 1509
1510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity] 1510 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetLMotorParam"), SuppressUnmanagedCodeSecurity]
1511 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter); 1511 public static extern dReal JointGetLMotorParam(IntPtr j, int parameter);
1512 1512
1513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity] 1513 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAnchor"), SuppressUnmanagedCodeSecurity]
1514 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result); 1514 public static extern void JointGetPRAnchor(IntPtr j, out Vector3 result);
1515 1515
1516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity] 1516 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis1"), SuppressUnmanagedCodeSecurity]
1517 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result); 1517 public static extern void JointGetPRAxis1(IntPtr j, out Vector3 result);
1518 1518
1519 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity] 1519 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRAxis2"), SuppressUnmanagedCodeSecurity]
1520 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result); 1520 public static extern void JointGetPRAxis2(IntPtr j, out Vector3 result);
1521 1521
1522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity] 1522 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRParam"), SuppressUnmanagedCodeSecurity]
1523 public static extern dReal JointGetPRParam(IntPtr j, int parameter); 1523 public static extern dReal JointGetPRParam(IntPtr j, int parameter);
1524 1524
1525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity] 1525 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPosition"), SuppressUnmanagedCodeSecurity]
1526 public static extern dReal JointGetPRPosition(IntPtr j); 1526 public static extern dReal JointGetPRPosition(IntPtr j);
1527 1527
1528 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity] 1528 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetPRPositionRate"), SuppressUnmanagedCodeSecurity]
1529 public static extern dReal JointGetPRPositionRate(IntPtr j); 1529 public static extern dReal JointGetPRPositionRate(IntPtr j);
1530 1530
1531 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity] 1531 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderAxis"), SuppressUnmanagedCodeSecurity]
1532 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result); 1532 public static extern void JointGetSliderAxis(IntPtr j, out Vector3 result);
1533 1533
1534 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity] 1534 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderParam"), SuppressUnmanagedCodeSecurity]
1535 public static extern dReal JointGetSliderParam(IntPtr j, int parameter); 1535 public static extern dReal JointGetSliderParam(IntPtr j, int parameter);
1536 1536
1537 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity] 1537 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPosition"), SuppressUnmanagedCodeSecurity]
1538 public static extern dReal JointGetSliderPosition(IntPtr j); 1538 public static extern dReal JointGetSliderPosition(IntPtr j);
1539 1539
1540 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity] 1540 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetSliderPositionRate"), SuppressUnmanagedCodeSecurity]
1541 public static extern dReal JointGetSliderPositionRate(IntPtr j); 1541 public static extern dReal JointGetSliderPositionRate(IntPtr j);
1542 1542
1543 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity] 1543 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetType"), SuppressUnmanagedCodeSecurity]
1544 public static extern JointType JointGetType(IntPtr j); 1544 public static extern JointType JointGetType(IntPtr j);
1545 1545
1546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1546 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1547 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result); 1547 public static extern void JointGetUniversalAnchor(IntPtr j, out Vector3 result);
1548 1548
1549 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity] 1549 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAnchor2"), SuppressUnmanagedCodeSecurity]
1550 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result); 1550 public static extern void JointGetUniversalAnchor2(IntPtr j, out Vector3 result);
1551 1551
1552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity] 1552 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1"), SuppressUnmanagedCodeSecurity]
1553 public static extern dReal JointGetUniversalAngle1(IntPtr j); 1553 public static extern dReal JointGetUniversalAngle1(IntPtr j);
1554 1554
1555 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity] 1555 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle1Rate"), SuppressUnmanagedCodeSecurity]
1556 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j); 1556 public static extern dReal JointGetUniversalAngle1Rate(IntPtr j);
1557 1557
1558 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity] 1558 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2"), SuppressUnmanagedCodeSecurity]
1559 public static extern dReal JointGetUniversalAngle2(IntPtr j); 1559 public static extern dReal JointGetUniversalAngle2(IntPtr j);
1560 1560
1561 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity] 1561 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngle2Rate"), SuppressUnmanagedCodeSecurity]
1562 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j); 1562 public static extern dReal JointGetUniversalAngle2Rate(IntPtr j);
1563 1563
1564 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity] 1564 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAngles"), SuppressUnmanagedCodeSecurity]
1565 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2); 1565 public static extern void JointGetUniversalAngles(IntPtr j, out dReal angle1, out dReal angle2);
1566 1566
1567 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1567 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1568 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result); 1568 public static extern void JointGetUniversalAxis1(IntPtr j, out Vector3 result);
1569 1569
1570 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1570 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1571 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result); 1571 public static extern void JointGetUniversalAxis2(IntPtr j, out Vector3 result);
1572 1572
1573 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity] 1573 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGetUniversalParam"), SuppressUnmanagedCodeSecurity]
1574 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter); 1574 public static extern dReal JointGetUniversalParam(IntPtr j, int parameter);
1575 1575
1576 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity] 1576 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupCreate"), SuppressUnmanagedCodeSecurity]
1577 public static extern IntPtr JointGroupCreate(int max_size); 1577 public static extern IntPtr JointGroupCreate(int max_size);
1578 1578
1579 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity] 1579 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupDestroy"), SuppressUnmanagedCodeSecurity]
1580 public static extern void JointGroupDestroy(IntPtr group); 1580 public static extern void JointGroupDestroy(IntPtr group);
1581 1581
1582 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity] 1582 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointGroupEmpty"), SuppressUnmanagedCodeSecurity]
1583 public static extern void JointGroupEmpty(IntPtr group); 1583 public static extern void JointGroupEmpty(IntPtr group);
1584 1584
1585 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity] 1585 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAngle"), SuppressUnmanagedCodeSecurity]
1586 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle); 1586 public static extern void JointSetAMotorAngle(IntPtr j, int anum, dReal angle);
1587 1587
1588 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity] 1588 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorAxis"), SuppressUnmanagedCodeSecurity]
1589 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1589 public static extern void JointSetAMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1590 1590
1591 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity] 1591 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorMode"), SuppressUnmanagedCodeSecurity]
1592 public static extern void JointSetAMotorMode(IntPtr j, int mode); 1592 public static extern void JointSetAMotorMode(IntPtr j, int mode);
1593 1593
1594 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1594 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1595 public static extern void JointSetAMotorNumAxes(IntPtr group, int num); 1595 public static extern void JointSetAMotorNumAxes(IntPtr group, int num);
1596 1596
1597 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity] 1597 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetAMotorParam"), SuppressUnmanagedCodeSecurity]
1598 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value); 1598 public static extern void JointSetAMotorParam(IntPtr group, int parameter, dReal value);
1599 1599
1600 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity] 1600 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor"), SuppressUnmanagedCodeSecurity]
1601 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z); 1601 public static extern void JointSetBallAnchor(IntPtr j, dReal x, dReal y, dReal z);
1602 1602
1603 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity] 1603 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetBallAnchor2"), SuppressUnmanagedCodeSecurity]
1604 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z); 1604 public static extern void JointSetBallAnchor2(IntPtr j, dReal x, dReal y, dReal z);
1605 1605
1606 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity] 1606 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetData"), SuppressUnmanagedCodeSecurity]
1607 public static extern void JointSetData(IntPtr j, IntPtr data); 1607 public static extern void JointSetData(IntPtr j, IntPtr data);
1608 1608
1609 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity] 1609 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFeedback"), SuppressUnmanagedCodeSecurity]
1610 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback); 1610 public static extern void JointSetFeedback(IntPtr j, out JointFeedback feedback);
1611 1611
1612 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity] 1612 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetFixed"), SuppressUnmanagedCodeSecurity]
1613 public static extern void JointSetFixed(IntPtr j); 1613 public static extern void JointSetFixed(IntPtr j);
1614 1614
1615 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity] 1615 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchor"), SuppressUnmanagedCodeSecurity]
1616 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z); 1616 public static extern void JointSetHingeAnchor(IntPtr j, dReal x, dReal y, dReal z);
1617 1617
1618 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity] 1618 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAnchorDelta"), SuppressUnmanagedCodeSecurity]
1619 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1619 public static extern void JointSetHingeAnchorDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1620 1620
1621 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity] 1621 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeAxis"), SuppressUnmanagedCodeSecurity]
1622 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z); 1622 public static extern void JointSetHingeAxis(IntPtr j, dReal x, dReal y, dReal z);
1623 1623
1624 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity] 1624 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHingeParam"), SuppressUnmanagedCodeSecurity]
1625 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value); 1625 public static extern void JointSetHingeParam(IntPtr j, int parameter, dReal value);
1626 1626
1627 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity] 1627 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Anchor"), SuppressUnmanagedCodeSecurity]
1628 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z); 1628 public static extern void JointSetHinge2Anchor(IntPtr j, dReal x, dReal y, dReal z);
1629 1629
1630 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity] 1630 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis1"), SuppressUnmanagedCodeSecurity]
1631 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z); 1631 public static extern void JointSetHinge2Axis1(IntPtr j, dReal x, dReal y, dReal z);
1632 1632
1633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity] 1633 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Axis2"), SuppressUnmanagedCodeSecurity]
1634 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z); 1634 public static extern void JointSetHinge2Axis2(IntPtr j, dReal x, dReal y, dReal z);
1635 1635
1636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity] 1636 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetHinge2Param"), SuppressUnmanagedCodeSecurity]
1637 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value); 1637 public static extern void JointSetHinge2Param(IntPtr j, int parameter, dReal value);
1638 1638
1639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity] 1639 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorAxis"), SuppressUnmanagedCodeSecurity]
1640 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z); 1640 public static extern void JointSetLMotorAxis(IntPtr j, int anum, int rel, dReal x, dReal y, dReal z);
1641 1641
1642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity] 1642 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorNumAxes"), SuppressUnmanagedCodeSecurity]
1643 public static extern void JointSetLMotorNumAxes(IntPtr j, int num); 1643 public static extern void JointSetLMotorNumAxes(IntPtr j, int num);
1644 1644
1645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity] 1645 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetLMotorParam"), SuppressUnmanagedCodeSecurity]
1646 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value); 1646 public static extern void JointSetLMotorParam(IntPtr j, int parameter, dReal value);
1647 1647
1648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity] 1648 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DAngleParam"), SuppressUnmanagedCodeSecurity]
1649 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value); 1649 public static extern void JointSetPlane2DAngleParam(IntPtr j, int parameter, dReal value);
1650 1650
1651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity] 1651 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DXParam"), SuppressUnmanagedCodeSecurity]
1652 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value); 1652 public static extern void JointSetPlane2DXParam(IntPtr j, int parameter, dReal value);
1653 1653
1654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity] 1654 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPlane2DYParam"), SuppressUnmanagedCodeSecurity]
1655 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value); 1655 public static extern void JointSetPlane2DYParam(IntPtr j, int parameter, dReal value);
1656 1656
1657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity] 1657 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAnchor"), SuppressUnmanagedCodeSecurity]
1658 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z); 1658 public static extern void JointSetPRAnchor(IntPtr j, dReal x, dReal y, dReal z);
1659 1659
1660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity] 1660 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis1"), SuppressUnmanagedCodeSecurity]
1661 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z); 1661 public static extern void JointSetPRAxis1(IntPtr j, dReal x, dReal y, dReal z);
1662 1662
1663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity] 1663 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRAxis2"), SuppressUnmanagedCodeSecurity]
1664 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z); 1664 public static extern void JointSetPRAxis2(IntPtr j, dReal x, dReal y, dReal z);
1665 1665
1666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity] 1666 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetPRParam"), SuppressUnmanagedCodeSecurity]
1667 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value); 1667 public static extern void JointSetPRParam(IntPtr j, int parameter, dReal value);
1668 1668
1669 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity] 1669 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxis"), SuppressUnmanagedCodeSecurity]
1670 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z); 1670 public static extern void JointSetSliderAxis(IntPtr j, dReal x, dReal y, dReal z);
1671 1671
1672 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity] 1672 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderAxisDelta"), SuppressUnmanagedCodeSecurity]
1673 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az); 1673 public static extern void JointSetSliderAxisDelta(IntPtr j, dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
1674 1674
1675 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity] 1675 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetSliderParam"), SuppressUnmanagedCodeSecurity]
1676 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value); 1676 public static extern void JointSetSliderParam(IntPtr j, int parameter, dReal value);
1677 1677
1678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity] 1678 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAnchor"), SuppressUnmanagedCodeSecurity]
1679 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z); 1679 public static extern void JointSetUniversalAnchor(IntPtr j, dReal x, dReal y, dReal z);
1680 1680
1681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity] 1681 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis1"), SuppressUnmanagedCodeSecurity]
1682 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z); 1682 public static extern void JointSetUniversalAxis1(IntPtr j, dReal x, dReal y, dReal z);
1683 1683
1684 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity] 1684 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalAxis2"), SuppressUnmanagedCodeSecurity]
1685 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z); 1685 public static extern void JointSetUniversalAxis2(IntPtr j, dReal x, dReal y, dReal z);
1686 1686
1687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity] 1687 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dJointSetUniversalParam"), SuppressUnmanagedCodeSecurity]
1688 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value); 1688 public static extern void JointSetUniversalParam(IntPtr j, int parameter, dReal value);
1689 1689
1690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity] 1690 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dLDLTAddTL"), SuppressUnmanagedCodeSecurity]
1691 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip); 1691 public static extern void LDLTAddTL(ref dReal L, ref dReal d, ref dReal a, int n, int nskip);
1692 1692
1693 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity] 1693 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdd"), SuppressUnmanagedCodeSecurity]
1694 public static extern void MassAdd(ref Mass a, ref Mass b); 1694 public static extern void MassAdd(ref Mass a, ref Mass b);
1695 1695
1696 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity] 1696 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassAdjust"), SuppressUnmanagedCodeSecurity]
1697 public static extern void MassAdjust(ref Mass m, dReal newmass); 1697 public static extern void MassAdjust(ref Mass m, dReal newmass);
1698 1698
1699 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity] 1699 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassCheck"), SuppressUnmanagedCodeSecurity]
1700 public static extern bool MassCheck(ref Mass m); 1700 public static extern bool MassCheck(ref Mass m);
1701 1701
1702 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1702 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1703 public static extern void MassRotate(ref Mass mass, ref Matrix3 R); 1703 public static extern void MassRotate(ref Mass mass, ref Matrix3 R);
1704 1704
1705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity] 1705 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassRotate"), SuppressUnmanagedCodeSecurity]
1706 public static extern void MassRotate(ref Mass mass, ref dReal M00); 1706 public static extern void MassRotate(ref Mass mass, ref dReal M00);
1707 1707
1708 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity] 1708 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBox"), SuppressUnmanagedCodeSecurity]
1709 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz); 1709 public static extern void MassSetBox(out Mass mass, dReal density, dReal lx, dReal ly, dReal lz);
1710 1710
1711 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity] 1711 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetBoxTotal"), SuppressUnmanagedCodeSecurity]
1712 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz); 1712 public static extern void MassSetBoxTotal(out Mass mass, dReal total_mass, dReal lx, dReal ly, dReal lz);
1713 1713
1714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity] 1714 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsule"), SuppressUnmanagedCodeSecurity]
1715 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1715 public static extern void MassSetCapsule(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1716 1716
1717 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity] 1717 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCapsuleTotal"), SuppressUnmanagedCodeSecurity]
1718 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1718 public static extern void MassSetCapsuleTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1719 1719
1720 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity] 1720 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinder"), SuppressUnmanagedCodeSecurity]
1721 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length); 1721 public static extern void MassSetCylinder(out Mass mass, dReal density, int direction, dReal radius, dReal length);
1722 1722
1723 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity] 1723 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetCylinderTotal"), SuppressUnmanagedCodeSecurity]
1724 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length); 1724 public static extern void MassSetCylinderTotal(out Mass mass, dReal total_mass, int direction, dReal radius, dReal length);
1725 1725
1726 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity] 1726 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetParameters"), SuppressUnmanagedCodeSecurity]
1727 public static extern void MassSetParameters(out Mass mass, dReal themass, 1727 public static extern void MassSetParameters(out Mass mass, dReal themass,
1728 dReal cgx, dReal cgy, dReal cgz, 1728 dReal cgx, dReal cgy, dReal cgz,
1729 dReal i11, dReal i22, dReal i33, 1729 dReal i11, dReal i22, dReal i33,
1730 dReal i12, dReal i13, dReal i23); 1730 dReal i12, dReal i13, dReal i23);
1731 1731
1732 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity] 1732 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphere"), SuppressUnmanagedCodeSecurity]
1733 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius); 1733 public static extern void MassSetSphere(out Mass mass, dReal density, dReal radius);
1734 1734
1735 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity] 1735 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetSphereTotal"), SuppressUnmanagedCodeSecurity]
1736 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius); 1736 public static extern void dMassSetSphereTotal(out Mass mass, dReal total_mass, dReal radius);
1737 1737
1738 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity] 1738 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetTrimesh"), SuppressUnmanagedCodeSecurity]
1739 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g); 1739 public static extern void MassSetTrimesh(out Mass mass, dReal density, IntPtr g);
1740 1740
1741 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity] 1741 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassSetZero"), SuppressUnmanagedCodeSecurity]
1742 public static extern void MassSetZero(out Mass mass); 1742 public static extern void MassSetZero(out Mass mass);
1743 1743
1744 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity] 1744 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMassTranslate"), SuppressUnmanagedCodeSecurity]
1745 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z); 1745 public static extern void MassTranslate(ref Mass mass, dReal x, dReal y, dReal z);
1746 1746
1747 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity] 1747 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply0"), SuppressUnmanagedCodeSecurity]
1748 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1748 public static extern void Multiply0(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
@@ -1754,119 +1754,119 @@ namespace OdeAPI
1754 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1); 1754 MultiplyiM3V3(out outvector, ref matrix, ref invector, 3, 3, 1);
1755 } 1755 }
1756 1756
1757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity] 1757 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply1"), SuppressUnmanagedCodeSecurity]
1758 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1758 public static extern void Multiply1(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1759 1759
1760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity] 1760 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dMultiply2"), SuppressUnmanagedCodeSecurity]
1761 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r); 1761 public static extern void Multiply2(out dReal A00, ref dReal B00, ref dReal C00, int p, int q, int r);
1762 1762
1763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1763 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1764 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle); 1764 public static extern void QFromAxisAndAngle(out Quaternion q, dReal ax, dReal ay, dReal az, dReal angle);
1765 1765
1766 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity] 1766 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQfromR"), SuppressUnmanagedCodeSecurity]
1767 public static extern void QfromR(out Quaternion q, ref Matrix3 R); 1767 public static extern void QfromR(out Quaternion q, ref Matrix3 R);
1768 1768
1769 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity] 1769 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply0"), SuppressUnmanagedCodeSecurity]
1770 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1770 public static extern void QMultiply0(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1771 1771
1772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity] 1772 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply1"), SuppressUnmanagedCodeSecurity]
1773 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1773 public static extern void QMultiply1(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1774 1774
1775 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity] 1775 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply2"), SuppressUnmanagedCodeSecurity]
1776 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1776 public static extern void QMultiply2(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1777 1777
1778 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity] 1778 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQMultiply3"), SuppressUnmanagedCodeSecurity]
1779 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc); 1779 public static extern void QMultiply3(out Quaternion qa, ref Quaternion qb, ref Quaternion qc);
1780 1780
1781 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity] 1781 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQSetIdentity"), SuppressUnmanagedCodeSecurity]
1782 public static extern void QSetIdentity(out Quaternion q); 1782 public static extern void QSetIdentity(out Quaternion q);
1783 1783
1784 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1784 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1785 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth); 1785 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref Vector3 center, ref Vector3 extents, int depth);
1786 1786
1787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity] 1787 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dQuadTreeSpaceCreate"), SuppressUnmanagedCodeSecurity]
1788 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth); 1788 public static extern IntPtr QuadTreeSpaceCreate(IntPtr space, ref dReal centerX, ref dReal extentsX, int depth);
1789 1789
1790 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity] 1790 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRandReal"), SuppressUnmanagedCodeSecurity]
1791 public static extern dReal RandReal(); 1791 public static extern dReal RandReal();
1792 1792
1793 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity] 1793 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFrom2Axes"), SuppressUnmanagedCodeSecurity]
1794 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz); 1794 public static extern void RFrom2Axes(out Matrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal by, dReal bz);
1795 1795
1796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity] 1796 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromAxisAndAngle"), SuppressUnmanagedCodeSecurity]
1797 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle); 1797 public static extern void RFromAxisAndAngle(out Matrix3 R, dReal x, dReal y, dReal z, dReal angle);
1798 1798
1799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity] 1799 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromEulerAngles"), SuppressUnmanagedCodeSecurity]
1800 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi); 1800 public static extern void RFromEulerAngles(out Matrix3 R, dReal phi, dReal theta, dReal psi);
1801 1801
1802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity] 1802 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRfromQ"), SuppressUnmanagedCodeSecurity]
1803 public static extern void RfromQ(out Matrix3 R, ref Quaternion q); 1803 public static extern void RfromQ(out Matrix3 R, ref Quaternion q);
1804 1804
1805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity] 1805 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRFromZAxis"), SuppressUnmanagedCodeSecurity]
1806 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az); 1806 public static extern void RFromZAxis(out Matrix3 R, dReal ax, dReal ay, dReal az);
1807 1807
1808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity] 1808 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dRSetIdentity"), SuppressUnmanagedCodeSecurity]
1809 public static extern void RSetIdentity(out Matrix3 R); 1809 public static extern void RSetIdentity(out Matrix3 R);
1810 1810
1811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity] 1811 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetValue"), SuppressUnmanagedCodeSecurity]
1812 public static extern void SetValue(out dReal a, int n); 1812 public static extern void SetValue(out dReal a, int n);
1813 1813
1814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity] 1814 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSetZero"), SuppressUnmanagedCodeSecurity]
1815 public static extern void SetZero(out dReal a, int n); 1815 public static extern void SetZero(out dReal a, int n);
1816 1816
1817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity] 1817 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSimpleSpaceCreate"), SuppressUnmanagedCodeSecurity]
1818 public static extern IntPtr SimpleSpaceCreate(IntPtr space); 1818 public static extern IntPtr SimpleSpaceCreate(IntPtr space);
1819 1819
1820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity] 1820 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveCholesky"), SuppressUnmanagedCodeSecurity]
1821 public static extern void SolveCholesky(ref dReal L, out dReal b, int n); 1821 public static extern void SolveCholesky(ref dReal L, out dReal b, int n);
1822 1822
1823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity] 1823 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1"), SuppressUnmanagedCodeSecurity]
1824 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip); 1824 public static extern void SolveL1(ref dReal L, out dReal b, int n, int nskip);
1825 1825
1826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity] 1826 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveL1T"), SuppressUnmanagedCodeSecurity]
1827 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip); 1827 public static extern void SolveL1T(ref dReal L, out dReal b, int n, int nskip);
1828 1828
1829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity] 1829 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSolveLDLT"), SuppressUnmanagedCodeSecurity]
1830 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip); 1830 public static extern void SolveLDLT(ref dReal L, ref dReal d, out dReal b, int n, int nskip);
1831 1831
1832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity] 1832 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceAdd"), SuppressUnmanagedCodeSecurity]
1833 public static extern void SpaceAdd(IntPtr space, IntPtr geom); 1833 public static extern void SpaceAdd(IntPtr space, IntPtr geom);
1834 1834
1835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity] 1835 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceLockQuery"), SuppressUnmanagedCodeSecurity]
1836 public static extern bool SpaceLockQuery(IntPtr space); 1836 public static extern bool SpaceLockQuery(IntPtr space);
1837 1837
1838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity] 1838 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceClean"), SuppressUnmanagedCodeSecurity]
1839 public static extern void SpaceClean(IntPtr space); 1839 public static extern void SpaceClean(IntPtr space);
1840 1840
1841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity] 1841 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide"), SuppressUnmanagedCodeSecurity]
1842 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback); 1842 public static extern void SpaceCollide(IntPtr space, IntPtr data, NearCallback callback);
1843 1843
1844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity] 1844 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceCollide2"), SuppressUnmanagedCodeSecurity]
1845 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback); 1845 public static extern void SpaceCollide2(IntPtr space1, IntPtr space2, IntPtr data, NearCallback callback);
1846 1846
1847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity] 1847 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceDestroy"), SuppressUnmanagedCodeSecurity]
1848 public static extern void SpaceDestroy(IntPtr space); 1848 public static extern void SpaceDestroy(IntPtr space);
1849 1849
1850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity] 1850 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetCleanup"), SuppressUnmanagedCodeSecurity]
1851 public static extern bool SpaceGetCleanup(IntPtr space); 1851 public static extern bool SpaceGetCleanup(IntPtr space);
1852 1852
1853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity] 1853 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetNumGeoms"), SuppressUnmanagedCodeSecurity]
1854 public static extern int SpaceGetNumGeoms(IntPtr space); 1854 public static extern int SpaceGetNumGeoms(IntPtr space);
1855 1855
1856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity] 1856 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetGeom"), SuppressUnmanagedCodeSecurity]
1857 public static extern IntPtr SpaceGetGeom(IntPtr space, int i); 1857 public static extern IntPtr SpaceGetGeom(IntPtr space, int i);
1858 1858
1859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity] 1859 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceGetSublevel"), SuppressUnmanagedCodeSecurity]
1860 public static extern int SpaceGetSublevel(IntPtr space); 1860 public static extern int SpaceGetSublevel(IntPtr space);
1861 1861
1862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity] 1862 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceQuery"), SuppressUnmanagedCodeSecurity]
1863 public static extern bool SpaceQuery(IntPtr space, IntPtr geom); 1863 public static extern bool SpaceQuery(IntPtr space, IntPtr geom);
1864 1864
1865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity] 1865 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceRemove"), SuppressUnmanagedCodeSecurity]
1866 public static extern void SpaceRemove(IntPtr space, IntPtr geom); 1866 public static extern void SpaceRemove(IntPtr space, IntPtr geom);
1867 1867
1868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity] 1868 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetCleanup"), SuppressUnmanagedCodeSecurity]
1869 public static extern void SpaceSetCleanup(IntPtr space, bool mode); 1869 public static extern void SpaceSetCleanup(IntPtr space, bool mode);
1870 1870
1871 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity] 1871 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSpaceSetSublevel"), SuppressUnmanagedCodeSecurity]
1872 public static extern void SpaceSetSublevel(IntPtr space, int sublevel); 1872 public static extern void SpaceSetSublevel(IntPtr space, int sublevel);
@@ -1874,53 +1874,53 @@ namespace OdeAPI
1874 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity] 1874 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dSweepAndPruneSpaceCreate"), SuppressUnmanagedCodeSecurity]
1875 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder); 1875 public static extern IntPtr SweepAndPruneSpaceCreate(IntPtr space, int AxisOrder);
1876 1876
1877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity] 1877 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dVectorScale"), SuppressUnmanagedCodeSecurity]
1878 public static extern void VectorScale(out dReal a, ref dReal d, int n); 1878 public static extern void VectorScale(out dReal a, ref dReal d, int n);
1879 1879
1880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity] 1880 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldCreate"), SuppressUnmanagedCodeSecurity]
1881 public static extern IntPtr WorldCreate(); 1881 public static extern IntPtr WorldCreate();
1882 1882
1883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity] 1883 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldDestroy"), SuppressUnmanagedCodeSecurity]
1884 public static extern void WorldDestroy(IntPtr world); 1884 public static extern void WorldDestroy(IntPtr world);
1885 1885
1886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1886 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1887 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world); 1887 public static extern int WorldGetAutoDisableAverageSamplesCount(IntPtr world);
1888 1888
1889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1889 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1890 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world); 1890 public static extern dReal WorldGetAutoDisableAngularThreshold(IntPtr world);
1891 1891
1892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1892 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1893 public static extern bool WorldGetAutoDisableFlag(IntPtr world); 1893 public static extern bool WorldGetAutoDisableFlag(IntPtr world);
1894 1894
1895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1895 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1896 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world); 1896 public static extern dReal WorldGetAutoDisableLinearThreshold(IntPtr world);
1897 1897
1898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1898 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1899 public static extern int WorldGetAutoDisableSteps(IntPtr world); 1899 public static extern int WorldGetAutoDisableSteps(IntPtr world);
1900 1900
1901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1901 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1902 public static extern dReal WorldGetAutoDisableTime(IntPtr world); 1902 public static extern dReal WorldGetAutoDisableTime(IntPtr world);
1903 1903
1904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1904 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1905 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world); 1905 public static extern int WorldGetAutoEnableDepthSF1(IntPtr world);
1906 1906
1907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity] 1907 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetCFM"), SuppressUnmanagedCodeSecurity]
1908 public static extern dReal WorldGetCFM(IntPtr world); 1908 public static extern dReal WorldGetCFM(IntPtr world);
1909 1909
1910 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity] 1910 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetERP"), SuppressUnmanagedCodeSecurity]
1911 public static extern dReal WorldGetERP(IntPtr world); 1911 public static extern dReal WorldGetERP(IntPtr world);
1912 1912
1913 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1913 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1914 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity); 1914 public static extern void WorldGetGravity(IntPtr world, out Vector3 gravity);
1915 1915
1916 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity] 1916 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetGravity"), SuppressUnmanagedCodeSecurity]
1917 public static extern void WorldGetGravity(IntPtr world, out dReal X); 1917 public static extern void WorldGetGravity(IntPtr world, out dReal X);
1918 1918
1919 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1919 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1920 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world); 1920 public static extern dReal WorldGetContactMaxCorrectingVel(IntPtr world);
1921 1921
1922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1922 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1923 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world); 1923 public static extern dReal WorldGetContactSurfaceLayer(IntPtr world);
1924 1924
1925 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity] 1925 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetAngularDamping"), SuppressUnmanagedCodeSecurity]
1926 public static extern dReal WorldGetAngularDamping(IntPtr world); 1926 public static extern dReal WorldGetAngularDamping(IntPtr world);
@@ -1934,23 +1934,23 @@ namespace OdeAPI
1934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 1934 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
1935 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world); 1935 public static extern dReal WorldGetLinearDampingThreshold(IntPtr world);
1936 1936
1937 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 1937 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
1938 public static extern int WorldGetQuickStepNumIterations(IntPtr world); 1938 public static extern int WorldGetQuickStepNumIterations(IntPtr world);
1939 1939
1940 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity] 1940 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetQuickStepW"), SuppressUnmanagedCodeSecurity]
1941 public static extern dReal WorldGetQuickStepW(IntPtr world); 1941 public static extern dReal WorldGetQuickStepW(IntPtr world);
1942 1942
1943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 1943 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldGetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
1944 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world); 1944 public static extern dReal WorldGetMaxAngularSpeed(IntPtr world);
1945 1945
1946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1946 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1947 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force); 1947 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out Vector3 force);
1948 1948
1949 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity] 1949 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldImpulseToForce"), SuppressUnmanagedCodeSecurity]
1950 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX); 1950 public static extern void WorldImpulseToForce(IntPtr world, dReal stepsize, dReal ix, dReal iy, dReal iz, out dReal forceX);
1951 1951
1952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity] 1952 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldQuickStep"), SuppressUnmanagedCodeSecurity]
1953 public static extern void WorldQuickStep(IntPtr world, dReal stepsize); 1953 public static extern void WorldQuickStep(IntPtr world, dReal stepsize);
1954 1954
1955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity] 1955 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDamping"), SuppressUnmanagedCodeSecurity]
1956 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale); 1956 public static extern void WorldSetAngularDamping(IntPtr world, dReal scale);
@@ -1958,67 +1958,67 @@ namespace OdeAPI
1958 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity] 1958 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAngularDampingThreshold"), SuppressUnmanagedCodeSecurity]
1959 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold); 1959 public static extern void WorldSetAngularDampingThreshold(IntPtr world, dReal threshold);
1960 1960
1961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity] 1961 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAngularThreshold"), SuppressUnmanagedCodeSecurity]
1962 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold); 1962 public static extern void WorldSetAutoDisableAngularThreshold(IntPtr world, dReal angular_threshold);
1963 1963
1964 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity] 1964 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableAverageSamplesCount"), SuppressUnmanagedCodeSecurity]
1965 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count); 1965 public static extern void WorldSetAutoDisableAverageSamplesCount(IntPtr world, int average_samples_count);
1966 1966
1967 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity] 1967 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableFlag"), SuppressUnmanagedCodeSecurity]
1968 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable); 1968 public static extern void WorldSetAutoDisableFlag(IntPtr world, bool do_auto_disable);
1969 1969
1970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity] 1970 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableLinearThreshold"), SuppressUnmanagedCodeSecurity]
1971 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold); 1971 public static extern void WorldSetAutoDisableLinearThreshold(IntPtr world, dReal linear_threshold);
1972 1972
1973 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity] 1973 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableSteps"), SuppressUnmanagedCodeSecurity]
1974 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps); 1974 public static extern void WorldSetAutoDisableSteps(IntPtr world, int steps);
1975 1975
1976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity] 1976 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoDisableTime"), SuppressUnmanagedCodeSecurity]
1977 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time); 1977 public static extern void WorldSetAutoDisableTime(IntPtr world, dReal time);
1978 1978
1979 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity] 1979 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetAutoEnableDepthSF1"), SuppressUnmanagedCodeSecurity]
1980 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth); 1980 public static extern void WorldSetAutoEnableDepthSF1(IntPtr world, int autoEnableDepth);
1981 1981
1982 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity] 1982 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetCFM"), SuppressUnmanagedCodeSecurity]
1983 public static extern void WorldSetCFM(IntPtr world, dReal cfm); 1983 public static extern void WorldSetCFM(IntPtr world, dReal cfm);
1984 1984
1985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity] 1985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactMaxCorrectingVel"), SuppressUnmanagedCodeSecurity]
1986 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel); 1986 public static extern void WorldSetContactMaxCorrectingVel(IntPtr world, dReal vel);
1987 1987
1988 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity] 1988 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetContactSurfaceLayer"), SuppressUnmanagedCodeSecurity]
1989 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth); 1989 public static extern void WorldSetContactSurfaceLayer(IntPtr world, dReal depth);
1990 1990
1991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity] 1991 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetDamping"), SuppressUnmanagedCodeSecurity]
1992 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale); 1992 public static extern void WorldSetDamping(IntPtr world, dReal linear_scale, dReal angular_scale);
1993 1993
1994 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity] 1994 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetERP"), SuppressUnmanagedCodeSecurity]
1995 public static extern void WorldSetERP(IntPtr world, dReal erp); 1995 public static extern void WorldSetERP(IntPtr world, dReal erp);
1996
1997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1998 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1996 1999
1997 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetGravity"), SuppressUnmanagedCodeSecurity]
1998 public static extern void WorldSetGravity(IntPtr world, dReal x, dReal y, dReal z);
1999
2000 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity] 2000 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDamping"), SuppressUnmanagedCodeSecurity]
2001 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale); 2001 public static extern void WorldSetLinearDamping(IntPtr world, dReal scale);
2002 2002
2003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity] 2003 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetLinearDampingThreshold"), SuppressUnmanagedCodeSecurity]
2004 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold); 2004 public static extern void WorldSetLinearDampingThreshold(IntPtr world, dReal threshold);
2005 2005
2006 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity] 2006 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepNumIterations"), SuppressUnmanagedCodeSecurity]
2007 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num); 2007 public static extern void WorldSetQuickStepNumIterations(IntPtr world, int num);
2008 2008
2009 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity] 2009 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetQuickStepW"), SuppressUnmanagedCodeSecurity]
2010 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation); 2010 public static extern void WorldSetQuickStepW(IntPtr world, dReal over_relaxation);
2011 2011
2012 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity] 2012 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldSetMaxAngularSpeed"), SuppressUnmanagedCodeSecurity]
2013 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed); 2013 public static extern void WorldSetMaxAngularSpeed(IntPtr world, dReal max_speed);
2014 2014
2015 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity] 2015 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStep"), SuppressUnmanagedCodeSecurity]
2016 public static extern void WorldStep(IntPtr world, dReal stepsize); 2016 public static extern void WorldStep(IntPtr world, dReal stepsize);
2017 2017
2018 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity] 2018 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldStepFast1"), SuppressUnmanagedCodeSecurity]
2019 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations); 2019 public static extern void WorldStepFast1(IntPtr world, dReal stepsize, int maxiterations);
2020 2020
2021 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity] 2021 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dWorldExportDIF"), SuppressUnmanagedCodeSecurity]
2022 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix); 2022 public static extern void WorldExportDIF(IntPtr world, string filename, bool append, string prefix);
2023 } 2023 }
2024} 2024}
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
index f7e1044..9cef3d5 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
67 StopERP3 = 7 + 512, 67 StopERP3 = 7 + 512,
68 StopCFM3 = 8 + 512 68 StopCFM3 = 8 + 512
69 } 69 }
70 70
71 public class OdeCharacter : PhysicsActor 71 public class OdeCharacter : PhysicsActor
72 { 72 {
73 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 73 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -121,7 +121,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
121 private float m_buoyancy = 0f; 121 private float m_buoyancy = 0f;
122 122
123 private bool m_freemove = false; 123 private bool m_freemove = false;
124 124
125// private string m_name = String.Empty; 125// private string m_name = String.Empty;
126 // other filter control 126 // other filter control
127 int m_colliderfilter = 0; 127 int m_colliderfilter = 0;
@@ -155,7 +155,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
155 public UUID m_uuid; 155 public UUID m_uuid;
156 public bool bad = false; 156 public bool bad = false;
157 157
158 float mu; 158 float mu;
159 159
160 // HoverHeight control 160 // HoverHeight control
161 private float m_PIDHoverHeight; 161 private float m_PIDHoverHeight;
@@ -218,7 +218,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
218 walkDivisor = walk_divisor; 218 walkDivisor = walk_divisor;
219 runDivisor = rundivisor; 219 runDivisor = rundivisor;
220 220
221 m_mass = m_density * m_size.X * m_size.Y * m_size.Z; ; // sure we have a default 221 m_mass = m_density * m_size.X * m_size.Y * m_size.Z; ; // sure we have a default
222 222
223 PID_D = basePID_D * m_mass * invtimeStep; 223 PID_D = basePID_D * m_mass * invtimeStep;
224 PID_P = basePID_P * m_mass * invtimeStep; 224 PID_P = basePID_P * m_mass * invtimeStep;
@@ -256,7 +256,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
256 256
257 public override uint LocalID 257 public override uint LocalID
258 { 258 {
259 get { return m_localID; } 259 get { return m_localID; }
260 set { m_localID = value; } 260 set { m_localID = value; }
261 } 261 }
262 262
@@ -508,7 +508,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
508 { 508 {
509 m_log.Warn("[PHYSICS]: Got a NaN AvatarSize from Scene on a Character"); 509 m_log.Warn("[PHYSICS]: Got a NaN AvatarSize from Scene on a Character");
510 } 510 }
511 511
512 } 512 }
513 /// <summary> 513 /// <summary>
514 /// This creates the Avatar's physical Surrogate at the position supplied 514 /// This creates the Avatar's physical Surrogate at the position supplied
@@ -636,7 +636,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
636 { 636 {
637 get 637 get
638 { 638 {
639 return m_targetVelocity; 639 return m_targetVelocity;
640 } 640 }
641 set 641 set
642 { 642 {
@@ -774,7 +774,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
774 774
775 PID_D = basePID_D * m_mass / _parent_scene.ODE_STEPSIZE; 775 PID_D = basePID_D * m_mass / _parent_scene.ODE_STEPSIZE;
776 PID_P = basePID_P * m_mass / _parent_scene.ODE_STEPSIZE; 776 PID_P = basePID_P * m_mass / _parent_scene.ODE_STEPSIZE;
777 777
778 Body = d.BodyCreate(_parent_scene.world); 778 Body = d.BodyCreate(_parent_scene.world);
779 779
780 _zeroFlag = false; 780 _zeroFlag = false;
@@ -900,7 +900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
900 x = tx * cos - y * sin; 900 x = tx * cos - y * sin;
901 y = tx * sin + y * cos; 901 y = tx * sin + y * cos;
902 } 902 }
903 903
904 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact, 904 public bool Collide(IntPtr me, IntPtr other, bool reverse, ref d.ContactGeom contact,
905 ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision) 905 ref d.ContactGeom altContact , ref bool useAltcontact, ref bool feetcollision)
906 { 906 {
@@ -944,7 +944,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
944 } 944 }
945 } 945 }
946 return true; 946 return true;
947 } 947 }
948/* 948/*
949 d.AABB aabb; 949 d.AABB aabb;
950 d.GeomGetAABB(other,out aabb); 950 d.GeomGetAABB(other,out aabb);
@@ -1141,7 +1141,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1141 n.Y = 0f; 1141 n.Y = 0f;
1142 n.Z = 1.0f; 1142 n.Z = 1.0f;
1143 } 1143 }
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 if (depth < 0.2f) 1147 if (depth < 0.2f)
@@ -1223,7 +1223,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1223 break; 1223 break;
1224 } // end switch (m_PIDHoverType) 1224 } // end switch (m_PIDHoverType)
1225 1225
1226 // don't go underground 1226 // don't go underground
1227 if (m_targetHoverHeight > terrainheight + 0.5f * (aabb.MaxZ - aabb.MinZ)) 1227 if (m_targetHoverHeight > terrainheight + 0.5f * (aabb.MaxZ - aabb.MinZ))
1228 { 1228 {
1229 float fz = (m_targetHoverHeight - localpos.Z); 1229 float fz = (m_targetHoverHeight - localpos.Z);
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1248 } 1248 }
1249 } 1249 }
1250 } 1250 }
1251 1251
1252 //****************************************** 1252 //******************************************
1253 if (!m_iscolliding) 1253 if (!m_iscolliding)
1254 m_collideNormal.Z = 0; 1254 m_collideNormal.Z = 0;
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1495 /// Used to copy variables from unmanaged space at heartbeat rate and also trigger scene updates acording 1495 /// Used to copy variables from unmanaged space at heartbeat rate and also trigger scene updates acording
1496 /// also outbounds checking 1496 /// also outbounds checking
1497 /// copy and outbounds now done in move(..) at ode rate 1497 /// copy and outbounds now done in move(..) at ode rate
1498 /// 1498 ///
1499 /// </summary> 1499 /// </summary>
1500 public void UpdatePositionAndVelocity() 1500 public void UpdatePositionAndVelocity()
1501 { 1501 {
@@ -1625,7 +1625,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1625 CollisionEventsThisFrame.Clear(); 1625 CollisionEventsThisFrame.Clear();
1626 } 1626 }
1627 } 1627 }
1628 } 1628 }
1629 } 1629 }
1630 1630
1631 public override bool SubscribedEvents() 1631 public override bool SubscribedEvents()
@@ -1697,7 +1697,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1697 _position.Z + (m_size.Z - oldsz) * 0.5f); 1697 _position.Z + (m_size.Z - oldsz) * 0.5f);
1698 1698
1699// Velocity = Vector3.Zero; 1699// Velocity = Vector3.Zero;
1700 m_targetVelocity = Vector3.Zero; 1700 m_targetVelocity = Vector3.Zero;
1701 1701
1702 _parent_scene.actor_name_map[collider] = (PhysicsActor)this; 1702 _parent_scene.actor_name_map[collider] = (PhysicsActor)this;
1703 _parent_scene.actor_name_map[capsule] = (PhysicsActor)this; 1703 _parent_scene.actor_name_map[capsule] = (PhysicsActor)this;
@@ -1717,7 +1717,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1717 d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z); 1717 d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z);
1718 _position = newPos; 1718 _position = newPos;
1719 m_freemove = false; 1719 m_freemove = false;
1720 m_pidControllerActive = true; 1720 m_pidControllerActive = true;
1721 } 1721 }
1722 1722
1723 private void changeOrientation(Quaternion newOri) 1723 private void changeOrientation(Quaternion newOri)
@@ -1772,35 +1772,35 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1772 1772
1773 private void changeSetTorque(Vector3 newTorque) 1773 private void changeSetTorque(Vector3 newTorque)
1774 { 1774 {
1775 } 1775 }
1776 1776
1777 private void changeAddForce(Vector3 newForce) 1777 private void changeAddForce(Vector3 newForce)
1778 { 1778 {
1779 } 1779 }
1780 1780
1781 private void changeAddAngularForce(Vector3 arg) 1781 private void changeAddAngularForce(Vector3 arg)
1782 { 1782 {
1783 } 1783 }
1784 1784
1785 private void changeAngularLock(byte arg) 1785 private void changeAngularLock(byte arg)
1786 { 1786 {
1787 } 1787 }
1788 1788
1789 private void changeFloatOnWater(bool arg) 1789 private void changeFloatOnWater(bool arg)
1790 { 1790 {
1791 } 1791 }
1792 1792
1793 private void changeVolumedetetion(bool arg) 1793 private void changeVolumedetetion(bool arg)
1794 { 1794 {
1795 } 1795 }
1796 1796
1797 private void changeSelectedStatus(bool arg) 1797 private void changeSelectedStatus(bool arg)
1798 { 1798 {
1799 } 1799 }
1800 1800
1801 private void changeDisable(bool arg) 1801 private void changeDisable(bool arg)
1802 { 1802 {
1803 } 1803 }
1804 1804
1805 private void changeBuilding(bool arg) 1805 private void changeBuilding(bool arg)
1806 { 1806 {
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
index fa32441..63bef7c 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs
@@ -170,7 +170,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
170 m_type = vd.m_type; 170 m_type = vd.m_type;
171 m_flags = vd.m_flags; 171 m_flags = vd.m_flags;
172 172
173 173
174 // Linear properties 174 // Linear properties
175 m_linearMotorDirection = vd.m_linearMotorDirection; 175 m_linearMotorDirection = vd.m_linearMotorDirection;
176 176
@@ -761,8 +761,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
761 roll = (float)Math.Atan2(minuszY, zZ); 761 roll = (float)Math.Atan2(minuszY, zZ);
762 } 762 }
763 return ; 763 return ;
764 } 764 }
765 765
766 internal void Step() 766 internal void Step()
767 { 767 {
768 IntPtr Body = rootPrim.Body; 768 IntPtr Body = rootPrim.Body;
@@ -797,7 +797,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
797 Vector3 curLocalAngVel = curAngVel * irotq; // current angular velocity in local 797 Vector3 curLocalAngVel = curAngVel * irotq; // current angular velocity in local
798 798
799 float ldampZ = 0; 799 float ldampZ = 0;
800 800
801 bool mousemode = false; 801 bool mousemode = false;
802 bool mousemodebank = false; 802 bool mousemodebank = false;
803 803
@@ -852,7 +852,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
852 m_lmEfect = 0; 852 m_lmEfect = 0;
853 m_ffactor = 1f; 853 m_ffactor = 1f;
854 } 854 }
855 855
856 // hover 856 // hover
857 if (m_VhoverTimescale < 300 && rootPrim.prim_geom != IntPtr.Zero) 857 if (m_VhoverTimescale < 300 && rootPrim.prim_geom != IntPtr.Zero)
858 { 858 {
@@ -1001,7 +1001,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1001 if (broll > halfpi) 1001 if (broll > halfpi)
1002 broll = pi - broll; 1002 broll = pi - broll;
1003 else if (broll < -halfpi) 1003 else if (broll < -halfpi)
1004 broll = -pi - broll; 1004 broll = -pi - broll;
1005 */ 1005 */
1006 broll *= m_bankingEfficiency; 1006 broll *= m_bankingEfficiency;
1007 if (m_bankingMix != 0) 1007 if (m_bankingMix != 0)
@@ -1054,7 +1054,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1054 float invamts = 1.0f/m_angularMotorTimescale; 1054 float invamts = 1.0f/m_angularMotorTimescale;
1055 float tmp; 1055 float tmp;
1056 1056
1057 // get out of x == 0 plane 1057 // get out of x == 0 plane
1058 if(Math.Abs(dirv.X) < 0.001f) 1058 if(Math.Abs(dirv.X) < 0.001f)
1059 dirv.X = 0.001f; 1059 dirv.X = 0.001f;
1060 1060
@@ -1068,7 +1068,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1068 torque.Y += (tmp - curLocalAngVel.Y) * invamts; 1068 torque.Y += (tmp - curLocalAngVel.Y) * invamts;
1069 torque.Y -= curLocalAngVel.Y * m_amdampY; 1069 torque.Y -= curLocalAngVel.Y * m_amdampY;
1070 } 1070 }
1071 else 1071 else
1072 torque.Y -= curLocalAngVel.Y * m_invtimestep; 1072 torque.Y -= curLocalAngVel.Y * m_invtimestep;
1073 1073
1074 if (Math.Abs(dirv.Y) > 0.01) 1074 if (Math.Abs(dirv.Y) > 0.01)
@@ -1099,7 +1099,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1099 { 1099 {
1100 if(mousemodebank) 1100 if(mousemodebank)
1101 torque.X -= curLocalAngVel.X * m_invtimestep; 1101 torque.X -= curLocalAngVel.X * m_invtimestep;
1102 else 1102 else
1103 torque.Z -= curLocalAngVel.Z * m_invtimestep; 1103 torque.Z -= curLocalAngVel.Z * m_invtimestep;
1104 } 1104 }
1105 } 1105 }
@@ -1133,11 +1133,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1133 if (m_angularDeflectionEfficiency > 0) 1133 if (m_angularDeflectionEfficiency > 0)
1134 { 1134 {
1135 Vector3 dirv; 1135 Vector3 dirv;
1136 1136
1137 if (curLocalVel.X > 0.01f) 1137 if (curLocalVel.X > 0.01f)
1138 dirv = curLocalVel; 1138 dirv = curLocalVel;
1139 else if (curLocalVel.X < -0.01f) 1139 else if (curLocalVel.X < -0.01f)
1140 // use oposite 1140 // use oposite
1141 dirv = -curLocalVel; 1141 dirv = -curLocalVel;
1142 else 1142 else
1143 { 1143 {
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1167 torque.Z -= curLocalAngVel.Z * m_amdampZ; 1167 torque.Z -= curLocalAngVel.Z * m_amdampZ;
1168 } 1168 }
1169 } 1169 }
1170 1170
1171 force *= dmass.mass; 1171 force *= dmass.mass;
1172 1172
1173 force += rootPrim.m_force; 1173 force += rootPrim.m_force;
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
index bb661e5..923e2ff 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
@@ -27,7 +27,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
27 AssetOK = 0x0f, // 00001111 27 AssetOK = 0x0f, // 00001111
28 28
29 NeedMask = 0x30, // 00110000 29 NeedMask = 0x30, // 00110000
30 needMesh = 0x10, // 00010000 30 needMesh = 0x10, // 00010000
31 needAsset = 0x20, // 00100000 31 needAsset = 0x20, // 00100000
32 32
33 FailMask = 0xC0, // 11000000 33 FailMask = 0xC0, // 11000000
@@ -287,7 +287,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
287 public bool needsMeshing(ODEPhysRepData repData) 287 public bool needsMeshing(ODEPhysRepData repData)
288 { 288 {
289 PrimitiveBaseShape pbs = repData.pbs; 289 PrimitiveBaseShape pbs = repData.pbs;
290 // check sculpts or meshs 290 // check sculpts or meshs
291 if (pbs.SculptEntry) 291 if (pbs.SculptEntry)
292 { 292 {
293 if (meshSculptedPrim) 293 if (meshSculptedPrim)
@@ -462,7 +462,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
462 repData.meshState = MeshState.MeshFailed; 462 repData.meshState = MeshState.MeshFailed;
463 return; 463 return;
464 } 464 }
465 } 465 }
466 } 466 }
467 467
468 repData.meshState = MeshState.AssetOK; 468 repData.meshState = MeshState.AssetOK;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
525 } 525 }
526 526
527 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex, true); 527 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex, true);
528 528
529 if (mesh == null) 529 if (mesh == null)
530 { 530 {
531 if (pbs.SculptEntry) 531 if (pbs.SculptEntry)
@@ -607,7 +607,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
607 607
608 else if (_pbs.PathCurve == (byte)Extrusion.Curve1) 608 else if (_pbs.PathCurve == (byte)Extrusion.Curve1)
609 { 609 {
610 //a tube 610 //a tube
611 611
612 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX); 612 volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX);
613 tmp = 1.0f - 2.0e-2f * (float)(200 - _pbs.PathScaleY); 613 tmp = 1.0f - 2.0e-2f * (float)(200 - _pbs.PathScaleY);
@@ -857,7 +857,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
857 // this is crude aproximation 857 // this is crude aproximation
858 profileBegin = (float)_pbs.ProfileBegin * 2.0e-5f; 858 profileBegin = (float)_pbs.ProfileBegin * 2.0e-5f;
859 profileEnd = 1.0f - (float)_pbs.ProfileEnd * 2.0e-5f; 859 profileEnd = 1.0f - (float)_pbs.ProfileEnd * 2.0e-5f;
860 volume *= (profileEnd - profileBegin); 860 volume *= (profileEnd - profileBegin);
861 861
862 repData.volume = volume; 862 repData.volume = volume;
863 } 863 }
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
index 51b8e4e..4cb1736 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
@@ -11,16 +11,16 @@ using OpenSim.Region.Framework.Interfaces;
11 11
12namespace OpenSim.Region.PhysicsModule.ubOde 12namespace OpenSim.Region.PhysicsModule.ubOde
13{ 13{
14 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ubODEPhysicsScene")] 14 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ubODEPhysicsScene")]
15 class ubOdeModule : INonSharedRegionModule 15 class ubOdeModule : INonSharedRegionModule
16 { 16 {
17 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 17 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
18 18
19 private static Dictionary<Scene, ODEScene> m_scenes = new Dictionary<Scene, ODEScene>(); 19 private static Dictionary<Scene, ODEScene> m_scenes = new Dictionary<Scene, ODEScene>();
20 private bool m_Enabled = false; 20 private bool m_Enabled = false;
21 private IConfigSource m_config; 21 private IConfigSource m_config;
22 private bool OSOdeLib; 22 private bool OSOdeLib;
23 23
24 24
25 #region INonSharedRegionModule 25 #region INonSharedRegionModule
26 26
@@ -80,7 +80,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
80 80
81 if(m_scenes.ContainsKey(scene)) // ??? 81 if(m_scenes.ContainsKey(scene)) // ???
82 return; 82 return;
83 ODEScene newodescene = new ODEScene(scene, m_config, Name, Version, OSOdeLib); 83 ODEScene newodescene = new ODEScene(scene, m_config, Name, Version, OSOdeLib);
84 m_scenes[scene] = newodescene; 84 m_scenes[scene] = newodescene;
85 } 85 }
86 86
@@ -100,13 +100,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde
100 { 100 {
101 if (!m_Enabled) 101 if (!m_Enabled)
102 return; 102 return;
103 103
104 if(m_scenes.ContainsKey(scene)) 104 if(m_scenes.ContainsKey(scene))
105 { 105 {
106 m_scenes[scene].RegionLoaded(); 106 m_scenes[scene].RegionLoaded();
107 } 107 }
108 108
109 } 109 }
110 #endregion 110 #endregion
111 } 111 }
112} 112}
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index a50905b..a2fbf41 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -33,7 +33,7 @@
33 * ODEDynamics.cs contains methods dealing with Prim Physical motion 33 * ODEDynamics.cs contains methods dealing with Prim Physical motion
34 * (dynamics) and the associated settings. Old Linear and angular 34 * (dynamics) and the associated settings. Old Linear and angular
35 * motors for dynamic motion have been replace with MoveLinear() 35 * motors for dynamic motion have been replace with MoveLinear()
36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic 36 * and MoveAngular(); 'Physical' is used only to switch ODE dynamic
37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to 37 * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
38 * switch between 'VEHICLE' parameter use and general dynamics 38 * switch between 'VEHICLE' parameter use and general dynamics
39 * settings use. 39 * settings use.
@@ -107,7 +107,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
107 private float m_targetHoverHeight; 107 private float m_targetHoverHeight;
108 private float m_groundHeight; 108 private float m_groundHeight;
109 private float m_waterHeight; 109 private float m_waterHeight;
110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle. 110 private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
111 111
112 private int body_autodisable_frames; 112 private int body_autodisable_frames;
113 public int bodydisablecontrol = 0; 113 public int bodydisablecontrol = 0;
@@ -143,7 +143,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
143 143
144 private UUID? m_assetID; 144 private UUID? m_assetID;
145 private MeshState m_meshState; 145 private MeshState m_meshState;
146 146
147 public ODEScene _parent_scene; 147 public ODEScene _parent_scene;
148 148
149 /// <summary> 149 /// <summary>
@@ -888,7 +888,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
888 888
889 m_lastVelocity = _velocity; 889 m_lastVelocity = _velocity;
890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 890 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
891 m_vehicle.Stop(); 891 m_vehicle.Stop();
892 892
893 if(Body != IntPtr.Zero) 893 if(Body != IntPtr.Zero)
894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 894 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
@@ -980,7 +980,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
980 { 980 {
981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z); 981// m_log.DebugFormat("[axislock]: <{0},{1},{2}>", axis.X, axis.Y, axis.Z);
982 AddChange(changes.AngLock, axislock); 982 AddChange(changes.AngLock, axislock);
983 983
984 } 984 }
985 985
986 public override void SubscribeEvents(int ms) 986 public override void SubscribeEvents(int ms)
@@ -1464,7 +1464,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1464 IntPtr vertices, indices; 1464 IntPtr vertices, indices;
1465 int vertexCount, indexCount; 1465 int vertexCount, indexCount;
1466 int vertexStride, triStride; 1466 int vertexStride, triStride;
1467 1467
1468 IMesh mesh = m_mesh; 1468 IMesh mesh = m_mesh;
1469 1469
1470 if (mesh == null) 1470 if (mesh == null)
@@ -1529,7 +1529,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1529 m_OBB = _size * 0.5f; 1529 m_OBB = _size * 0.5f;
1530 m_physCost = 0.1f; 1530 m_physCost = 0.1f;
1531 m_streamCost = 1.0f; 1531 m_streamCost = 1.0f;
1532 1532
1533 _parent_scene.mesher.ReleaseMesh(mesh); 1533 _parent_scene.mesher.ReleaseMesh(mesh);
1534 m_meshState = MeshState.MeshFailed; 1534 m_meshState = MeshState.MeshFailed;
1535 m_mesh = null; 1535 m_mesh = null;
@@ -1830,7 +1830,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1830 if (childrenPrim.Count == 0) 1830 if (childrenPrim.Count == 0)
1831 { 1831 {
1832 collide_geom = prim_geom; 1832 collide_geom = prim_geom;
1833 m_targetSpace = _parent_scene.ActiveSpace; 1833 m_targetSpace = _parent_scene.ActiveSpace;
1834 } 1834 }
1835 else 1835 else
1836 { 1836 {
@@ -1911,7 +1911,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z); 1911 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
1912 _zeroFlag = false; 1912 _zeroFlag = false;
1913 bodydisablecontrol = 0; 1913 bodydisablecontrol = 0;
1914 } 1914 }
1915 _parent_scene.addActiveGroups(this); 1915 _parent_scene.addActiveGroups(this);
1916 } 1916 }
1917 1917
@@ -2011,7 +2011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2011 d.Matrix3 mat = new d.Matrix3(); 2011 d.Matrix3 mat = new d.Matrix3();
2012 d.Quaternion quat = new d.Quaternion(); 2012 d.Quaternion quat = new d.Quaternion();
2013 2013
2014 d.Mass tmpdmass = new d.Mass { }; 2014 d.Mass tmpdmass = new d.Mass { };
2015 d.Mass objdmass = new d.Mass { }; 2015 d.Mass objdmass = new d.Mass { };
2016 2016
2017 d.BodyGetMass(Body, out tmpdmass); 2017 d.BodyGetMass(Body, out tmpdmass);
@@ -2039,7 +2039,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2039 // subtract current prim inertia from object 2039 // subtract current prim inertia from object
2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass); 2040 DMassSubPartFromObj(ref tmpdmass, ref objdmass);
2041 2041
2042 // back prim own inertia 2042 // back prim own inertia
2043 tmpdmass = primdMass; 2043 tmpdmass = primdMass;
2044 2044
2045 // update to new position and orientation 2045 // update to new position and orientation
@@ -2444,7 +2444,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2444 MakeBody(); 2444 MakeBody();
2445 } 2445 }
2446 2446
2447 2447
2448 #region changes 2448 #region changes
2449 2449
2450 private void changeadd() 2450 private void changeadd()
@@ -3011,7 +3011,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3011 3011
3012 primVolume = repData.volume; 3012 primVolume = repData.volume;
3013 3013
3014 CreateGeom(); 3014 CreateGeom();
3015 3015
3016 if (prim_geom != IntPtr.Zero) 3016 if (prim_geom != IntPtr.Zero)
3017 { 3017 {
@@ -3145,7 +3145,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3145 3145
3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z); 3146 d.BodySetLinearVel(Body, newVel.X, newVel.Y, newVel.Z);
3147 } 3147 }
3148 //resetCollisionAccounting(); 3148 //resetCollisionAccounting();
3149 } 3149 }
3150 _velocity = newVel; 3150 _velocity = newVel;
3151 } 3151 }
@@ -3171,7 +3171,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3171 3171
3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z); 3172 d.BodySetAngularVel(Body, newAngVel.X, newAngVel.Y, newAngVel.Z);
3173 } 3173 }
3174 //resetCollisionAccounting(); 3174 //resetCollisionAccounting();
3175 } 3175 }
3176 m_rotationalVelocity = newAngVel; 3176 m_rotationalVelocity = newAngVel;
3177 } 3177 }
@@ -3316,7 +3316,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3316 // let vehicles sleep 3316 // let vehicles sleep
3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) 3317 if (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
3318 return; 3318 return;
3319 3319
3320 if (++bodydisablecontrol < 50) 3320 if (++bodydisablecontrol < 50)
3321 return; 3321 return;
3322 3322
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3414 break; 3414 break;
3415 } // end switch (m_PIDHoverType) 3415 } // end switch (m_PIDHoverType)
3416 3416
3417 // don't go underground unless volumedetector 3417 // don't go underground unless volumedetector
3418 3418
3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect) 3419 if (m_targetHoverHeight > m_groundHeight || m_isVolumeDetect)
3420 { 3420 {
@@ -3526,7 +3526,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3526 3526
3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it 3527 d.BodySetLinearVel(Body, 0, 0, 0); // stop it
3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it 3528 d.BodySetAngularVel(Body, 0, 0, 0); // stop it
3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere 3529 d.BodySetPosition(Body, lpos.X, lpos.Y, lpos.Z); // put it somewhere
3530 m_lastposition = _position; 3530 m_lastposition = _position;
3531 m_lastorientation = _orientation; 3531 m_lastorientation = _orientation;
3532 3532
@@ -3635,7 +3635,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3635 _orientation.X = ori.X; 3635 _orientation.X = ori.X;
3636 _orientation.Y = ori.Y; 3636 _orientation.Y = ori.Y;
3637 _orientation.Z = ori.Z; 3637 _orientation.Z = ori.Z;
3638 _orientation.W = ori.W; 3638 _orientation.W = ori.W;
3639 } 3639 }
3640 3640
3641 // update velocities and aceleration 3641 // update velocities and aceleration
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
index adefd5e..f671722 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
139 continue; 139 continue;
140 } 140 }
141 } 141 }
142 142
143 CurrentRayFilter = req.filter; 143 CurrentRayFilter = req.filter;
144 CurrentMaxCount = req.Count; 144 CurrentMaxCount = req.Count;
145 145
@@ -279,7 +279,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
279 /// Method that actually initiates the raycast with spaces 279 /// Method that actually initiates the raycast with spaces
280 /// </summary> 280 /// </summary>
281 /// <param name="req"></param> 281 /// <param name="req"></param>
282 /// 282 ///
283 283
284 private void NoContacts(ODERayRequest req) 284 private void NoContacts(ODERayRequest req)
285 { 285 {
@@ -488,7 +488,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
488 newcontactgeom = (d.ContactGeom)Marshal.PtrToStructure(contactptr, typeof(d.ContactGeom)); 488 newcontactgeom = (d.ContactGeom)Marshal.PtrToStructure(contactptr, typeof(d.ContactGeom));
489 return true; 489 return true;
490 } 490 }
491 491
492 // This is the standard Near. g1 is the ray 492 // This is the standard Near. g1 is the ray
493 private void near(IntPtr space, IntPtr g1, IntPtr g2) 493 private void near(IntPtr space, IntPtr g1, IntPtr g2)
494 { 494 {
@@ -530,7 +530,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
530 uint col1 = d.GeomGetCollideBits(g1); 530 uint col1 = d.GeomGetCollideBits(g1);
531 uint col2 = d.GeomGetCollideBits(g2); 531 uint col2 = d.GeomGetCollideBits(g2);
532*/ 532*/
533 533
534 uint ID = 0; 534 uint ID = 0;
535 PhysicsActor p2 = null; 535 PhysicsActor p2 = null;
536 536
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
671 { 671 {
672 d.GeomDestroy(Plane); 672 d.GeomDestroy(Plane);
673 Plane = IntPtr.Zero; 673 Plane = IntPtr.Zero;
674 } 674 }
675 } 675 }
676 } 676 }
677 677
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index 410463c..bed66cc 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
97 97
98 light = 7 // compatibility with old viewers 98 light = 7 // compatibility with old viewers
99 } 99 }
100 100
101 public enum changes : int 101 public enum changes : int
102 { 102 {
103 Add = 0, // arg null. finishs the prim creation. should be used internally only ( to remove later ?) 103 Add = 0, // arg null. finishs the prim creation. should be used internally only ( to remove later ?)
@@ -182,7 +182,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
182 const float comumContactERP = 0.75f; 182 const float comumContactERP = 0.75f;
183 const float comumContactCFM = 0.0001f; 183 const float comumContactCFM = 0.0001f;
184 const float comumContactSLIP = 0f; 184 const float comumContactSLIP = 0f;
185 185
186 float frictionMovementMult = 0.8f; 186 float frictionMovementMult = 0.8f;
187 187
188 float TerrainBounce = 0.1f; 188 float TerrainBounce = 0.1f;
@@ -241,7 +241,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
241 /// </summary> 241 /// </summary>
242 private List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>(); 242 private List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>();
243 private List<PhysicsActor> _collisionEventPrimRemove = new List<PhysicsActor>(); 243 private List<PhysicsActor> _collisionEventPrimRemove = new List<PhysicsActor>();
244 244
245 private HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>(); 245 private HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>();
246 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>(); 246 public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>();
247 247
@@ -262,7 +262,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
262 private IntPtr TerrainGeom; 262 private IntPtr TerrainGeom;
263 private float[] TerrainHeightFieldHeight; 263 private float[] TerrainHeightFieldHeight;
264 private GCHandle TerrainHeightFieldHeightsHandler = new GCHandle(); 264 private GCHandle TerrainHeightFieldHeightsHandler = new GCHandle();
265 265
266 private int m_physicsiterations = 15; 266 private int m_physicsiterations = 15;
267 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag 267 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag
268// private PhysicsActor PANull = new NullPhysicsActor(); 268// private PhysicsActor PANull = new NullPhysicsActor();
@@ -330,7 +330,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
330 EngineType = pname; 330 EngineType = pname;
331 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 331 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
332 EngineName = pname + " " + pversion; 332 EngineName = pname + " " + pversion;
333 m_config = psourceconfig; 333 m_config = psourceconfig;
334 m_OSOdeLib = pOSOdeLib; 334 m_OSOdeLib = pOSOdeLib;
335 335
336// m_OSOdeLib = false; //debug 336// m_OSOdeLib = false; //debug
@@ -343,7 +343,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
343 343
344 base.Initialise(m_frameWorkScene.PhysicsRequestAsset, 344 base.Initialise(m_frameWorkScene.PhysicsRequestAsset,
345 (m_frameWorkScene.Heightmap != null ? m_frameWorkScene.Heightmap.GetFloatsSerialised() : new float[m_frameWorkScene.RegionInfo.RegionSizeX * m_frameWorkScene.RegionInfo.RegionSizeY]), 345 (m_frameWorkScene.Heightmap != null ? m_frameWorkScene.Heightmap.GetFloatsSerialised() : new float[m_frameWorkScene.RegionInfo.RegionSizeX * m_frameWorkScene.RegionInfo.RegionSizeY]),
346 (float)m_frameWorkScene.RegionInfo.RegionSettings.WaterHeight); 346 (float)m_frameWorkScene.RegionInfo.RegionSettings.WaterHeight);
347 } 347 }
348 348
349 public void RegionLoaded() 349 public void RegionLoaded()
@@ -354,7 +354,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
354 m_log.ErrorFormat("[ubOde] No mesher. module disabled"); 354 m_log.ErrorFormat("[ubOde] No mesher. module disabled");
355 return; 355 return;
356 } 356 }
357 357
358 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig); 358 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
359 m_frameWorkScene.PhysicsEnabled = true; 359 m_frameWorkScene.PhysicsEnabled = true;
360 } 360 }
@@ -394,7 +394,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
394 } 394 }
395 catch 395 catch
396 { 396 {
397 // i must RtC#FM 397 // i must RtC#FM
398 // i did! 398 // i did!
399 } 399 }
400 400
@@ -674,7 +674,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
674 /// <param name="space">The space that contains the geoms. Remember, spaces are also geoms</param> 674 /// <param name="space">The space that contains the geoms. Remember, spaces are also geoms</param>
675 /// <param name="g1">a geometry or space</param> 675 /// <param name="g1">a geometry or space</param>
676 /// <param name="g2">another geometry or space</param> 676 /// <param name="g2">another geometry or space</param>
677 /// 677 ///
678 678
679 private void near(IntPtr space, IntPtr g1, IntPtr g2) 679 private void near(IntPtr space, IntPtr g1, IntPtr g2)
680 { 680 {
@@ -784,7 +784,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
784 if (count == 0) 784 if (count == 0)
785 return; 785 return;
786 786
787 // try get physical actors 787 // try get physical actors
788 PhysicsActor p1; 788 PhysicsActor p1;
789 PhysicsActor p2; 789 PhysicsActor p2;
790 790
@@ -1135,10 +1135,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1135 chr.IsColliding = false; 1135 chr.IsColliding = false;
1136 // chr.CollidingGround = false; not done here 1136 // chr.CollidingGround = false; not done here
1137 chr.CollidingObj = false; 1137 chr.CollidingObj = false;
1138 1138
1139 if(chr.Body == IntPtr.Zero || chr.collider == IntPtr.Zero ) 1139 if(chr.Body == IntPtr.Zero || chr.collider == IntPtr.Zero )
1140 continue; 1140 continue;
1141 1141
1142 // do colisions with static space 1142 // do colisions with static space
1143 d.SpaceCollide2(chr.collider, StaticSpace, IntPtr.Zero, nearCallback); 1143 d.SpaceCollide2(chr.collider, StaticSpace, IntPtr.Zero, nearCallback);
1144 1144
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1160 foreach (OdePrim aprim in _activeprims) 1160 foreach (OdePrim aprim in _activeprims)
1161 { 1161 {
1162 aprim.CollisionScore = 0; 1162 aprim.CollisionScore = 0;
1163 aprim.IsColliding = false; 1163 aprim.IsColliding = false;
1164 } 1164 }
1165 } 1165 }
1166 lock (_activegroups) 1166 lock (_activegroups)
@@ -1170,7 +1170,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1170 foreach (OdePrim aprim in _activegroups) 1170 foreach (OdePrim aprim in _activegroups)
1171 { 1171 {
1172 if(!aprim.m_outbounds && d.BodyIsEnabled(aprim.Body) && 1172 if(!aprim.m_outbounds && d.BodyIsEnabled(aprim.Body) &&
1173 aprim.collide_geom != IntPtr.Zero) 1173 aprim.collide_geom != IntPtr.Zero)
1174 { 1174 {
1175 d.SpaceCollide2(StaticSpace, aprim.collide_geom, IntPtr.Zero, nearCallback); 1175 d.SpaceCollide2(StaticSpace, aprim.collide_geom, IntPtr.Zero, nearCallback);
1176 d.SpaceCollide2(GroundSpace, aprim.collide_geom, IntPtr.Zero, nearCallback); 1176 d.SpaceCollide2(GroundSpace, aprim.collide_geom, IntPtr.Zero, nearCallback);
@@ -1251,7 +1251,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1251 size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun); 1251 size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
1252 newAv.Flying = isFlying; 1252 newAv.Flying = isFlying;
1253 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; 1253 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
1254 1254
1255 return newAv; 1255 return newAv;
1256 } 1256 }
1257 1257
@@ -1301,7 +1301,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1301 1301
1302 public void addActivePrim(OdePrim activatePrim) 1302 public void addActivePrim(OdePrim activatePrim)
1303 { 1303 {
1304 // adds active prim.. 1304 // adds active prim..
1305 lock (_activeprims) 1305 lock (_activeprims)
1306 { 1306 {
1307 if (!_activeprims.Contains(activatePrim)) 1307 if (!_activeprims.Contains(activatePrim))
@@ -1324,7 +1324,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1324 OdePrim newPrim; 1324 OdePrim newPrim;
1325 lock (OdeLock) 1325 lock (OdeLock)
1326 { 1326 {
1327 1327
1328 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID); 1328 newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID);
1329 } 1329 }
1330 return newPrim; 1330 return newPrim;
@@ -1372,7 +1372,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1372 { 1372 {
1373// lock (OdeLock) 1373// lock (OdeLock)
1374 { 1374 {
1375 1375
1376 OdePrim p = (OdePrim)prim; 1376 OdePrim p = (OdePrim)prim;
1377 p.setPrimForRemoval(); 1377 p.setPrimForRemoval();
1378 } 1378 }
@@ -1423,7 +1423,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1423 _prims[prim.LocalID] = prim; 1423 _prims[prim.LocalID] = prim;
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 public bool haveActor(PhysicsActor actor) 1427 public bool haveActor(PhysicsActor actor)
1428 { 1428 {
1429 if (actor is OdePrim) 1429 if (actor is OdePrim)
@@ -1531,14 +1531,14 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1531 x = (int)(pos.X * spacesPerMeterX); 1531 x = (int)(pos.X * spacesPerMeterX);
1532 if (x > spaceGridMaxX) 1532 if (x > spaceGridMaxX)
1533 return staticPrimspaceOffRegion[1]; 1533 return staticPrimspaceOffRegion[1];
1534 1534
1535 y = (int)(pos.Y * spacesPerMeterY); 1535 y = (int)(pos.Y * spacesPerMeterY);
1536 if (y > spaceGridMaxY) 1536 if (y > spaceGridMaxY)
1537 return staticPrimspaceOffRegion[3]; 1537 return staticPrimspaceOffRegion[3];
1538 1538
1539 return staticPrimspace[x, y]; 1539 return staticPrimspace[x, y];
1540 } 1540 }
1541 1541
1542 #endregion 1542 #endregion
1543 1543
1544 1544
@@ -1628,7 +1628,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1628 TimeSpan timedif = now - m_lastframe; 1628 TimeSpan timedif = now - m_lastframe;
1629 float timeStep = (float)timedif.TotalSeconds; 1629 float timeStep = (float)timedif.TotalSeconds;
1630 m_lastframe = now; 1630 m_lastframe = now;
1631 1631
1632 // acumulate time so we can reduce error 1632 // acumulate time so we can reduce error
1633 step_time += timeStep; 1633 step_time += timeStep;
1634 1634
@@ -1654,7 +1654,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1654 } 1654 }
1655 1655
1656 ODEchangeitem item; 1656 ODEchangeitem item;
1657 1657
1658// d.WorldSetQuickStepNumIterations(world, curphysiteractions); 1658// d.WorldSetQuickStepNumIterations(world, curphysiteractions);
1659 1659
1660 int loopstartMS = Util.EnvironmentTickCount(); 1660 int loopstartMS = Util.EnvironmentTickCount();
@@ -1662,9 +1662,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1662 int changestimeMS = 0; 1662 int changestimeMS = 0;
1663 int maxChangestime = (int)(reqTimeStep * 500f); // half the time 1663 int maxChangestime = (int)(reqTimeStep * 500f); // half the time
1664 int maxLoopTime = (int)(reqTimeStep * 1200f); // 1.2 the time 1664 int maxLoopTime = (int)(reqTimeStep * 1200f); // 1.2 the time
1665 1665
1666 d.AllocateODEDataForThread(~0U); 1666 d.AllocateODEDataForThread(~0U);
1667 1667
1668 if (ChangesQueue.Count > 0) 1668 if (ChangesQueue.Count > 0)
1669 { 1669 {
1670 while (ChangesQueue.Dequeue(out item)) 1670 while (ChangesQueue.Dequeue(out item))
@@ -1726,7 +1726,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1726 aprim.Move(); 1726 aprim.Move();
1727 } 1727 }
1728 } 1728 }
1729 1729
1730 m_rayCastManager.ProcessQueuedRequests(); 1730 m_rayCastManager.ProcessQueuedRequests();
1731 1731
1732 collision_optimized(); 1732 collision_optimized();
@@ -1750,7 +1750,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1750 { 1750 {
1751 pobj.SendCollisions((int)(odetimestepMS)); 1751 pobj.SendCollisions((int)(odetimestepMS));
1752 if(pobj.Body != IntPtr.Zero && !pobj.m_isSelected && 1752 if(pobj.Body != IntPtr.Zero && !pobj.m_isSelected &&
1753 !pobj.m_disabled && !pobj.m_building && 1753 !pobj.m_disabled && !pobj.m_building &&
1754 !d.BodyIsEnabled(pobj.Body)) 1754 !d.BodyIsEnabled(pobj.Body))
1755 sleepers.Add(pobj); 1755 sleepers.Add(pobj);
1756 } 1756 }
@@ -1900,7 +1900,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1900 1900
1901 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix); 1901 d.WorldExportDIF(world, fname, physics_logging_append_existing_logfile, prefix);
1902 } 1902 }
1903 1903
1904 fps = (float)nodeframes * ODE_STEPSIZE / reqTimeStep; 1904 fps = (float)nodeframes * ODE_STEPSIZE / reqTimeStep;
1905 1905
1906 if(step_time < HalfOdeStep) 1906 if(step_time < HalfOdeStep)
@@ -2166,7 +2166,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2166 h0 = (float)heights[iy]; // 0,1 2166 h0 = (float)heights[iy]; // 0,1
2167 h2 = (float)heights[iy+xstep]; // 1,1 vertice 2167 h2 = (float)heights[iy+xstep]; // 1,1 vertice
2168 norm.X = h0 - h2; 2168 norm.X = h0 - h2;
2169 norm.Y = h1 - h0; 2169 norm.Y = h1 - h0;
2170 } 2170 }
2171 else 2171 else
2172 { 2172 {
@@ -2214,7 +2214,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2214 const float thickness = 10f; 2214 const float thickness = 10f;
2215 const int wrap = 0; 2215 const int wrap = 0;
2216 2216
2217 2217
2218 float hfmin = float.MaxValue; 2218 float hfmin = float.MaxValue;
2219 float hfmax = float.MinValue; 2219 float hfmax = float.MinValue;
2220 float val; 2220 float val;
@@ -2503,7 +2503,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2503 2503
2504 orderedPrims.Sort(compareByCollisionsDesc); 2504 orderedPrims.Sort(compareByCollisionsDesc);
2505 topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore); 2505 topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore);
2506 2506
2507 return topColliders; 2507 return topColliders;
2508 } 2508 }
2509 2509
@@ -2546,7 +2546,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 2549
2550 public override List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count) 2550 public override List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count)
2551 { 2551 {
2552 List<ContactResult> ourresults = new List<ContactResult>(); 2552 List<ContactResult> ourresults = new List<ContactResult>();
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
index 0cdaa60..5d2b1f7 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Mesh.cs
@@ -243,8 +243,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
243 triangle.v3.Z) 243 triangle.v3.Z)
244 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == 244 || (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z ==
245 triangle.v3.Z) 245 triangle.v3.Z)
246 ) 246 )
247 { 247 {
248 return; 248 return;
249 } 249 }
250 250
@@ -444,7 +444,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
444 { 444 {
445 if (m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero) 445 if (m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
446 throw new NotSupportedException("Attempt to Append to a pinned Mesh"); 446 throw new NotSupportedException("Attempt to Append to a pinned Mesh");
447 447
448 if (!(newMesh is Mesh)) 448 if (!(newMesh is Mesh))
449 return; 449 return;
450 450
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 7f0713a..163f439 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -58,8 +58,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
58 // Setting baseDir to a path will enable the dumping of raw files 58 // Setting baseDir to a path will enable the dumping of raw files
59 // raw files can be imported by blender so a visual inspection of the results can be done 59 // raw files can be imported by blender so a visual inspection of the results can be done
60 60
61 private bool m_Enabled = false; 61 private bool m_Enabled = false;
62 62
63 public static object diskLock = new object(); 63 public static object diskLock = new object();
64 64
65 public bool doMeshFileCache = true; 65 public bool doMeshFileCache = true;
@@ -120,7 +120,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
120 } 120 }
121 121
122 CacheExpire = TimeSpan.FromHours(fcache); 122 CacheExpire = TimeSpan.FromHours(fcache);
123 123
124 lock (diskLock) 124 lock (diskLock)
125 { 125 {
126 if(doMeshFileCache && cachePath != "") 126 if(doMeshFileCache && cachePath != "")
@@ -165,9 +165,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
165 if (!m_Enabled) 165 if (!m_Enabled)
166 return; 166 return;
167 } 167 }
168 168
169 #endregion 169 #endregion
170 170
171 /// <summary> 171 /// <summary>
172 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may 172 /// creates a simple box mesh of the specified size. This mesh is of very low vertex count and may
173 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail 173 /// be useful as a backup proxy when level of detail is not needed or when more complex meshes fail
@@ -266,7 +266,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
266 private void AddSubMesh(OSDMap subMeshData, List<Coord> coords, List<Face> faces) 266 private void AddSubMesh(OSDMap subMeshData, List<Coord> coords, List<Face> faces)
267 { 267 {
268 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap)); 268 // Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap));
269 269
270 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level 270 // As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level
271 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no 271 // of Detail Blocks (maps) contain just a NoGeometry key to signal there is no
272 // geometry for this submesh. 272 // geometry for this submesh.
@@ -294,15 +294,15 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
294 ushort uX = Utils.BytesToUInt16(posBytes, i); 294 ushort uX = Utils.BytesToUInt16(posBytes, i);
295 ushort uY = Utils.BytesToUInt16(posBytes, i + 2); 295 ushort uY = Utils.BytesToUInt16(posBytes, i + 2);
296 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4); 296 ushort uZ = Utils.BytesToUInt16(posBytes, i + 4);
297 297
298 Coord c = new Coord( 298 Coord c = new Coord(
299 Utils.UInt16ToFloat(uX, posMin.X, posMax.X), 299 Utils.UInt16ToFloat(uX, posMin.X, posMax.X),
300 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y), 300 Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y),
301 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z)); 301 Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z));
302 302
303 coords.Add(c); 303 coords.Add(c);
304 } 304 }
305 305
306 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary(); 306 byte[] triangleBytes = subMeshData["TriangleList"].AsBinary();
307 for (int i = 0; i < triangleBytes.Length; i += 6) 307 for (int i = 0; i < triangleBytes.Length; i += 6)
308 { 308 {
@@ -448,7 +448,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
448 if (physicsParms != null) 448 if (physicsParms != null)
449 usemesh = true; 449 usemesh = true;
450 } 450 }
451 451
452 if(!usemesh && (map.ContainsKey("physics_convex"))) 452 if(!usemesh && (map.ContainsKey("physics_convex")))
453 physicsParms = (OSDMap)map["physics_convex"]; 453 physicsParms = (OSDMap)map["physics_convex"];
454 454
@@ -488,9 +488,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
488 488
489 byte[] decompressedBuf = outMs.GetBuffer(); 489 byte[] decompressedBuf = outMs.GetBuffer();
490 490
491 decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf); 491 decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf);
492 } 492 }
493 } 493 }
494 } 494 }
495 } 495 }
496 catch (Exception e) 496 catch (Exception e)
@@ -622,7 +622,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
622 faces.Add(f); 622 faces.Add(f);
623 } 623 }
624 vertsoffset += vs.Count; 624 vertsoffset += vs.Count;
625 vs.Clear(); 625 vs.Clear();
626 continue; 626 continue;
627 } 627 }
628 /* 628 /*
@@ -648,7 +648,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
648 c.Z = hullr.Vertices[i].z; 648 c.Z = hullr.Vertices[i].z;
649 coords.Add(c); 649 coords.Add(c);
650 } 650 }
651 651
652 for (i = 0; i < nindexs; i += 3) 652 for (i = 0; i < nindexs; i += 3)
653 { 653 {
654 t1 = hullr.Indices[i]; 654 t1 = hullr.Indices[i];
@@ -687,7 +687,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
687 c.Z = vs[i].z; 687 c.Z = vs[i].z;
688 coords.Add(c); 688 coords.Add(c);
689 } 689 }
690 690
691 for (i = 0; i < nindexs; i += 3) 691 for (i = 0; i < nindexs; i += 3)
692 { 692 {
693 t1 = indices[i]; 693 t1 = indices[i];
@@ -707,12 +707,12 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
707 } 707 }
708 } 708 }
709 if (coords.Count > 0 && faces.Count > 0) 709 if (coords.Count > 0 && faces.Count > 0)
710 return true; 710 return true;
711 } 711 }
712 else 712 else
713 { 713 {
714 // if neither mesh or decomposition present, warn and use convex 714 // if neither mesh or decomposition present, warn and use convex
715 m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName); 715 m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
716 } 716 }
717 } 717 }
718 vs.Clear(); 718 vs.Clear();
@@ -947,7 +947,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
947 { 947 {
948 PrimMesh primMesh; 948 PrimMesh primMesh;
949 coords = new List<Coord>(); 949 coords = new List<Coord>();
950 faces = new List<Face>(); 950 faces = new List<Face>();
951 951
952 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f; 952 float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
953 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 953 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
@@ -975,7 +975,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
975 profileHollow = 0.0f; 975 profileHollow = 0.0f;
976 else if (profileHollow > 0.95f) 976 else if (profileHollow > 0.95f)
977 profileHollow = 0.95f; 977 profileHollow = 0.95f;
978 978
979 int sides = 4; 979 int sides = 4;
980 LevelOfDetail iLOD = (LevelOfDetail)lod; 980 LevelOfDetail iLOD = (LevelOfDetail)lod;
981 byte profshape = (byte)(primShape.ProfileCurve & 0x07); 981 byte profshape = (byte)(primShape.ProfileCurve & 0x07);
@@ -1033,7 +1033,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1033 } 1033 }
1034 1034
1035 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides); 1035 primMesh = new PrimMesh(sides, profileBegin, profileEnd, profileHollow, hollowSides);
1036 1036
1037 if (primMesh.errorMessage != null) 1037 if (primMesh.errorMessage != null)
1038 if (primMesh.errorMessage.Length > 0) 1038 if (primMesh.errorMessage.Length > 0)
1039 m_log.Error("[ERROR] " + primMesh.errorMessage); 1039 m_log.Error("[ERROR] " + primMesh.errorMessage);
@@ -1162,7 +1162,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1162 for (int i = 0; i < someBytes.Length; i++) 1162 for (int i = 0; i < someBytes.Length; i++)
1163 hash = mdjb2(hash, someBytes[i]); 1163 hash = mdjb2(hash, someBytes[i]);
1164 hash = hash << 8; 1164 hash = hash << 8;
1165 } 1165 }
1166 1166
1167 if (convex) 1167 if (convex)
1168 hash |= 4; 1168 hash |= 4;
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1204 { 1204 {
1205 return CreateMesh(primName, primShape, size, lod, false, false, false); 1205 return CreateMesh(primName, primShape, size, lod, false, false, false);
1206 } 1206 }
1207 1207
1208 public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) 1208 public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
1209 { 1209 {
1210 Mesh mesh = null; 1210 Mesh mesh = null;
@@ -1245,7 +1245,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1245 } 1245 }
1246 1246
1247 private static Vector3 m_MeshUnitSize = new Vector3(1.0f, 1.0f, 1.0f); 1247 private static Vector3 m_MeshUnitSize = new Vector3(1.0f, 1.0f, 1.0f);
1248 1248
1249 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde) 1249 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde)
1250 { 1250 {
1251#if SPAM 1251#if SPAM
@@ -1348,7 +1348,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1348 m_uniqueMeshes.Add(key, mesh); 1348 m_uniqueMeshes.Add(key, mesh);
1349 } 1349 }
1350 catch { } 1350 catch { }
1351 } 1351 }
1352 1352
1353 return mesh; 1353 return mesh;
1354 } 1354 }
@@ -1380,7 +1380,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1380 m_uniqueReleasedMeshes.Add(mesh.Key, mesh); 1380 m_uniqueReleasedMeshes.Add(mesh.Key, mesh);
1381 } 1381 }
1382 catch { } 1382 catch { }
1383 } 1383 }
1384 } 1384 }
1385 } 1385 }
1386 1386
@@ -1447,7 +1447,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1447// BinaryFormatter bformatter = new BinaryFormatter(); 1447// BinaryFormatter bformatter = new BinaryFormatter();
1448 mesh = Mesh.FromStream(stream,key); 1448 mesh = Mesh.FromStream(stream,key);
1449 } 1449 }
1450 1450
1451 } 1451 }
1452 catch (Exception e) 1452 catch (Exception e)
1453 { 1453 {
@@ -1524,7 +1524,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1524 } 1524 }
1525 } 1525 }
1526 } 1526 }
1527 1527
1528 public void ExpireFileCache() 1528 public void ExpireFileCache()
1529 { 1529 {
1530 if (!doCacheExpire) 1530 if (!doCacheExpire)
@@ -1543,8 +1543,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
1543 int ndirs = 0; 1543 int ndirs = 0;
1544 DateTime OlderTime = File.GetLastAccessTimeUtc(controlfile) - CacheExpire; 1544 DateTime OlderTime = File.GetLastAccessTimeUtc(controlfile) - CacheExpire;
1545 File.SetLastAccessTimeUtc(controlfile, DateTime.UtcNow); 1545 File.SetLastAccessTimeUtc(controlfile, DateTime.UtcNow);
1546 1546
1547 foreach (string dir in Directory.GetDirectories(cachePath)) 1547 foreach (string dir in Directory.GetDirectories(cachePath))
1548 { 1548 {
1549 try 1549 try
1550 { 1550 {
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
index 51d067a..10facf2 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/PrimMesher.cs
@@ -522,7 +522,7 @@ namespace PrimMesher
522 public Profile(int sides, float profileStart, float profileEnd, float hollow, int hollowSides, bool hasProfileCut, bool createFaces) 522 public Profile(int sides, float profileStart, float profileEnd, float hollow, int hollowSides, bool hasProfileCut, bool createFaces)
523 { 523 {
524 const float halfSqr2 = 0.7071067811866f; 524 const float halfSqr2 = 0.7071067811866f;
525 525
526 coords = new List<Coord>(); 526 coords = new List<Coord>();
527 faces = new List<Face>(); 527 faces = new List<Face>();
528 528
@@ -769,7 +769,7 @@ namespace PrimMesher
769 } 769 }
770 } 770 }
771 } 771 }
772 772
773 } 773 }
774 774
775 else if (createFaces) 775 else if (createFaces)
@@ -865,7 +865,7 @@ namespace PrimMesher
865 int i; 865 int i;
866 int numVerts = coords.Count; 866 int numVerts = coords.Count;
867 Coord vert; 867 Coord vert;
868 868
869 for (i = 0; i < numVerts; i++) 869 for (i = 0; i < numVerts; i++)
870 { 870 {
871 vert = coords[i]; 871 vert = coords[i];
@@ -1226,7 +1226,7 @@ namespace PrimMesher
1226 s += "\nrevolutions..........: " + this.revolutions.ToString(); 1226 s += "\nrevolutions..........: " + this.revolutions.ToString();
1227 s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString(); 1227 s += "\nstepsPerRevolution...: " + this.stepsPerRevolution.ToString();
1228 s += "\nhasProfileCut........: " + this.hasProfileCut.ToString(); 1228 s += "\nhasProfileCut........: " + this.hasProfileCut.ToString();
1229 s += "\nhasHollow............: " + this.hasHollow.ToString(); 1229 s += "\nhasHollow............: " + this.hasHollow.ToString();
1230 1230
1231 return s; 1231 return s;
1232 } 1232 }
@@ -1324,7 +1324,7 @@ namespace PrimMesher
1324 needEndFaces = true; 1324 needEndFaces = true;
1325 } 1325 }
1326 else needEndFaces = true; 1326 else needEndFaces = true;
1327 1327
1328 if (pathType == PathType.Circular) 1328 if (pathType == PathType.Circular)
1329 { 1329 {
1330 if (sides == 3) 1330 if (sides == 3)
@@ -1377,7 +1377,7 @@ namespace PrimMesher
1377 hollow *= 1.414f; 1377 hollow *= 1.414f;
1378 } 1378 }
1379 1379
1380 Profile profile = new Profile(sides, profileStart, profileEnd, hollow, hollowSides, 1380 Profile profile = new Profile(sides, profileStart, profileEnd, hollow, hollowSides,
1381 HasProfileCut,true); 1381 HasProfileCut,true);
1382 errorMessage = profile.errorMessage; 1382 errorMessage = profile.errorMessage;
1383 1383
@@ -1407,7 +1407,7 @@ namespace PrimMesher
1407 path.stepsPerRevolution = stepsPerRevolution; 1407 path.stepsPerRevolution = stepsPerRevolution;
1408 1408
1409 path.Create(pathType, steps); 1409 path.Create(pathType, steps);
1410 1410
1411 int lastNode = path.pathNodes.Count - 1; 1411 int lastNode = path.pathNodes.Count - 1;
1412 1412
1413 for (int nodeIndex = 0; nodeIndex < path.pathNodes.Count; nodeIndex++) 1413 for (int nodeIndex = 0; nodeIndex < path.pathNodes.Count; nodeIndex++)
@@ -1537,7 +1537,7 @@ namespace PrimMesher
1537 /// DEPRICATED - use Extrude(PathType.Linear) instead 1537 /// DEPRICATED - use Extrude(PathType.Linear) instead
1538 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism. 1538 /// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism.
1539 /// </summary> 1539 /// </summary>
1540 /// 1540 ///
1541 public void ExtrudeLinear() 1541 public void ExtrudeLinear()
1542 { 1542 {
1543 Extrude(PathType.Linear); 1543 Extrude(PathType.Linear);
@@ -1548,7 +1548,7 @@ namespace PrimMesher
1548 /// DEPRICATED - use Extrude(PathType.Circular) instead 1548 /// DEPRICATED - use Extrude(PathType.Circular) instead
1549 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring. 1549 /// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring.
1550 /// </summary> 1550 /// </summary>
1551 /// 1551 ///
1552 public void ExtrudeCircular() 1552 public void ExtrudeCircular()
1553 { 1553 {
1554 Extrude(PathType.Circular); 1554 Extrude(PathType.Circular);
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
index adb1f2e..6503e35 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.ubODEMeshing")] 9[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.ubODEMeshing")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
index 2ca2af7..ebe2523 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/SculptMap.cs
@@ -57,7 +57,7 @@ namespace PrimMesher
57 int numLodPixels = lod * lod; // (32 * 2)^2 = 64^2 pixels for default sculpt map image 57 int numLodPixels = lod * lod; // (32 * 2)^2 = 64^2 pixels for default sculpt map image
58 58
59 bool needsScaling = false; 59 bool needsScaling = false;
60 bool smallMap = false; 60 bool smallMap = false;
61 61
62 width = bmW; 62 width = bmW;
63 height = bmH; 63 height = bmH;
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
index a7fa502..b71932e 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
46 /// <param name="assembly"></param> 46 /// <param name="assembly"></param>
47 /// <param name="linemap"></param> 47 /// <param name="linemap"></param>
48 void PerformScriptCompile( 48 void PerformScriptCompile(
49 string source, string asset, UUID ownerID, 49 string source, string asset, UUID ownerID,
50 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap); 50 out string assembly, out Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> linemap);
51 51
52 /// <summary> 52 /// <summary>
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
index 361a0b9..2e1dbbe 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
58 /// Post an event to a single script 58 /// Post an event to a single script
59 /// </summary> 59 /// </summary>
60 bool PostScriptEvent(UUID itemID, EventParams parms); 60 bool PostScriptEvent(UUID itemID, EventParams parms);
61 61
62 /// <summary> 62 /// <summary>
63 /// Post event to an entire prim 63 /// Post event to an entire prim
64 /// </summary> 64 /// </summary>
@@ -95,7 +95,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
95 /// Assemblies that need to be referenced when compiling scripts. 95 /// Assemblies that need to be referenced when compiling scripts.
96 /// </summary> 96 /// </summary>
97 /// <remarks> 97 /// <remarks>
98 /// These are currently additional to those always referenced by the compiler, BUT THIS MAY CHANGE IN THE 98 /// These are currently additional to those always referenced by the compiler, BUT THIS MAY CHANGE IN THE
99 /// FUTURE. 99 /// FUTURE.
100 /// This can be null if there are no additional assemblies. 100 /// This can be null if there are no additional assemblies.
101 /// </remarks> 101 /// </remarks>
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index e4297c4..40c2fd2 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
104 string State { get; set; } 104 string State { get; set; }
105 105
106 /// <summary> 106 /// <summary>
107 /// If true then the engine is responsible for persisted state. If false then some other component may 107 /// If true then the engine is responsible for persisted state. If false then some other component may
108 /// persist state (e.g. attachments persisting in assets). 108 /// persist state (e.g. attachments persisting in assets).
109 /// </summary> 109 /// </summary>
110 bool StatePersistedHere { get; } 110 bool StatePersistedHere { get; }
@@ -193,7 +193,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
193 /// </summary> 193 /// </summary>
194 /// <param name="data"></param> 194 /// <param name="data"></param>
195 void PostEvent(EventParams data); 195 void PostEvent(EventParams data);
196 196
197 void Suspend(); 197 void Suspend();
198 void Resume(); 198 void Resume();
199 199
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
223 /// Reset the script. 223 /// Reset the script.
224 /// </summary> 224 /// </summary>
225 /// <remarks> 225 /// <remarks>
226 /// This must not be called by any thread other than the one executing the scripts current event. This is 226 /// This must not be called by any thread other than the one executing the scripts current event. This is
227 /// because there is no wait or abort logic if another thread is in the middle of processing a script event. 227 /// because there is no wait or abort logic if another thread is in the middle of processing a script event.
228 /// Such an external thread should use ResetScript() instead. 228 /// Such an external thread should use ResetScript() instead.
229 /// </remarks> 229 /// </remarks>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 84d44a1..6a39bb9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -81,64 +81,64 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
81 81
82 public Dataserver DataserverPlugin 82 public Dataserver DataserverPlugin
83 { 83 {
84 get 84 get
85 { 85 {
86 lock (staticLock) 86 lock (staticLock)
87 return m_Dataserver[m_ScriptEngine]; 87 return m_Dataserver[m_ScriptEngine];
88 } 88 }
89 } 89 }
90 90
91 public Timer TimerPlugin 91 public Timer TimerPlugin
92 { 92 {
93 get 93 get
94 { 94 {
95 lock (staticLock) 95 lock (staticLock)
96 return m_Timer[m_ScriptEngine]; 96 return m_Timer[m_ScriptEngine];
97 } 97 }
98 } 98 }
99 99
100 public HttpRequest HttpRequestPlugin 100 public HttpRequest HttpRequestPlugin
101 { 101 {
102 get 102 get
103 { 103 {
104 lock (staticLock) 104 lock (staticLock)
105 return m_HttpRequest[m_ScriptEngine]; 105 return m_HttpRequest[m_ScriptEngine];
106 } 106 }
107 } 107 }
108 108
109 public Listener ListenerPlugin 109 public Listener ListenerPlugin
110 { 110 {
111 get 111 get
112 { 112 {
113 lock (staticLock) 113 lock (staticLock)
114 return m_Listener[m_ScriptEngine]; 114 return m_Listener[m_ScriptEngine];
115 } 115 }
116 } 116 }
117 117
118 public SensorRepeat SensorRepeatPlugin 118 public SensorRepeat SensorRepeatPlugin
119 { 119 {
120 get 120 get
121 { 121 {
122 lock (staticLock) 122 lock (staticLock)
123 return m_SensorRepeat[m_ScriptEngine]; 123 return m_SensorRepeat[m_ScriptEngine];
124 } 124 }
125 } 125 }
126 126
127 public XmlRequest XmlRequestPlugin 127 public XmlRequest XmlRequestPlugin
128 { 128 {
129 get 129 get
130 { 130 {
131 lock (staticLock) 131 lock (staticLock)
132 return m_XmlRequest[m_ScriptEngine]; 132 return m_XmlRequest[m_ScriptEngine];
133 } 133 }
134 } 134 }
135 135
136 public IScriptEngine[] ScriptEngines 136 public IScriptEngine[] ScriptEngines
137 { 137 {
138 get 138 get
139 { 139 {
140 lock (staticLock) 140 lock (staticLock)
141 return m_ScriptEngines.ToArray(); 141 return m_ScriptEngines.ToArray();
142 } 142 }
143 } 143 }
144 144
@@ -387,7 +387,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
387 } 387 }
388 } 388 }
389 389
390 390
391 391
392 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) 392 public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID)
393 { 393 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5269bf9..8f9ff03 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
100 100
101 protected IScriptEngine m_ScriptEngine; 101 protected IScriptEngine m_ScriptEngine;
102 protected SceneObjectPart m_host; 102 protected SceneObjectPart m_host;
103 103
104 /// <summary> 104 /// <summary>
105 /// The item that hosts this script 105 /// The item that hosts this script
106 /// </summary> 106 /// </summary>
@@ -298,7 +298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
298 m_host = host; 298 m_host = host;
299 m_item = item; 299 m_item = item;
300 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false); 300 m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
301 301
302 LoadConfig(); 302 LoadConfig();
303 303
304 m_TransferModule = 304 m_TransferModule =
@@ -400,7 +400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
400 } 400 }
401 401
402 IConfig smtpConfig = seConfigSource.Configs["SMTP"]; 402 IConfig smtpConfig = seConfigSource.Configs["SMTP"];
403 if (smtpConfig != null) 403 if (smtpConfig != null)
404 { 404 {
405 // there's an smtp config, so load in the snooze time. 405 // there's an smtp config, so load in the snooze time.
406 EMAIL_PAUSE_TIME = smtpConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME); 406 EMAIL_PAUSE_TIME = smtpConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME);
@@ -666,7 +666,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
666 case ScriptBaseClass.LINK_SET: 666 case ScriptBaseClass.LINK_SET:
667 return new List<SceneObjectPart>(part.ParentGroup.Parts); 667 return new List<SceneObjectPart>(part.ParentGroup.Parts);
668 668
669 case ScriptBaseClass.LINK_ROOT: 669 case ScriptBaseClass.LINK_ROOT:
670 ret.Add(part.ParentGroup.RootPart); 670 ret.Add(part.ParentGroup.RootPart);
671 return ret; 671 return ret;
672 672
@@ -807,8 +807,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
807 m_host.AddScriptLPS(1); 807 m_host.AddScriptLPS(1);
808 lock (Util.RandomClass) 808 lock (Util.RandomClass)
809 { 809 {
810 return Util.RandomClass.NextDouble() * mag; 810 return Util.RandomClass.NextDouble() * mag;
811 } 811 }
812 } 812 }
813 813
814 public LSL_Integer llFloor(double f) 814 public LSL_Integer llFloor(double f)
@@ -1097,7 +1097,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1097 m_host.AddScriptLPS(1); 1097 m_host.AddScriptLPS(1);
1098 /* This method is more accurate than the SL one, and thus causes problems 1098 /* This method is more accurate than the SL one, and thus causes problems
1099 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. 1099 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._.
1100 1100
1101 double dotProduct = LSL_Vector.Dot(a, b); 1101 double dotProduct = LSL_Vector.Dot(a, b);
1102 LSL_Vector crossProduct = LSL_Vector.Cross(a, b); 1102 LSL_Vector crossProduct = LSL_Vector.Cross(a, b);
1103 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b); 1103 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b);
@@ -1115,12 +1115,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1115 1115
1116 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w); 1116 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w);
1117 */ 1117 */
1118 1118
1119 // This method mimics the 180 errors found in SL 1119 // This method mimics the 180 errors found in SL
1120 // See www.euclideanspace.com... angleBetween 1120 // See www.euclideanspace.com... angleBetween
1121 LSL_Vector vec_a = a; 1121 LSL_Vector vec_a = a;
1122 LSL_Vector vec_b = b; 1122 LSL_Vector vec_b = b;
1123 1123
1124 // Eliminate zero length 1124 // Eliminate zero length
1125 LSL_Float vec_a_mag = LSL_Vector.Mag(vec_a); 1125 LSL_Float vec_a_mag = LSL_Vector.Mag(vec_a);
1126 LSL_Float vec_b_mag = LSL_Vector.Mag(vec_b); 1126 LSL_Float vec_b_mag = LSL_Vector.Mag(vec_b);
@@ -1129,7 +1129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1129 { 1129 {
1130 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); 1130 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
1131 } 1131 }
1132 1132
1133 // Normalize 1133 // Normalize
1134 vec_a = llVecNorm(vec_a); 1134 vec_a = llVecNorm(vec_a);
1135 vec_b = llVecNorm(vec_b); 1135 vec_b = llVecNorm(vec_b);
@@ -1137,13 +1137,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1137 // Calculate axis and rotation angle 1137 // Calculate axis and rotation angle
1138 LSL_Vector axis = vec_a % vec_b; 1138 LSL_Vector axis = vec_a % vec_b;
1139 LSL_Float cos_theta = vec_a * vec_b; 1139 LSL_Float cos_theta = vec_a * vec_b;
1140 1140
1141 // Check if parallel 1141 // Check if parallel
1142 if (cos_theta > 0.99999) 1142 if (cos_theta > 0.99999)
1143 { 1143 {
1144 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); 1144 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
1145 } 1145 }
1146 1146
1147 // Check if anti-parallel 1147 // Check if anti-parallel
1148 else if (cos_theta < -0.99999) 1148 else if (cos_theta < -0.99999)
1149 { 1149 {
@@ -1164,7 +1164,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1164 return new LSL_Rotation(x,y,z,s); 1164 return new LSL_Rotation(x,y,z,s);
1165 } 1165 }
1166 } 1166 }
1167 1167
1168 public void llWhisper(int channelID, string text) 1168 public void llWhisper(int channelID, string text)
1169 { 1169 {
1170 m_host.AddScriptLPS(1); 1170 m_host.AddScriptLPS(1);
@@ -1261,7 +1261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1261 { 1261 {
1262 World.SimChat(Utils.StringToBytes(text), 1262 World.SimChat(Utils.StringToBytes(text),
1263 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); 1263 ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
1264 1264
1265 } 1265 }
1266 1266
1267 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 1267 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -1830,7 +1830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1830 { 1830 {
1831 m_host.AddScriptLPS(1); 1831 m_host.AddScriptLPS(1);
1832 SceneObjectGroup group = m_host.ParentGroup; 1832 SceneObjectGroup group = m_host.ParentGroup;
1833 1833
1834 if (group == null || group.IsDeleted || group.inTransit) 1834 if (group == null || group.IsDeleted || group.inTransit)
1835 return 1.0f; 1835 return 1.0f;
1836 1836
@@ -1841,7 +1841,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1841 { 1841 {
1842 m_host.AddScriptLPS(1); 1842 m_host.AddScriptLPS(1);
1843 SceneObjectGroup group = m_host.ParentGroup; 1843 SceneObjectGroup group = m_host.ParentGroup;
1844 1844
1845 if (group == null || group.IsDeleted || group.inTransit) 1845 if (group == null || group.IsDeleted || group.inTransit)
1846 return 1.0f; 1846 return 1.0f;
1847 1847
@@ -1970,7 +1970,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1970 string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent"); 1970 string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent");
1971 if (userAgent.IndexOf("SecondLife") < 0) 1971 if (userAgent.IndexOf("SecondLife") < 0)
1972 return; // Not the embedded browser. Is this check good enough? 1972 return; // Not the embedded browser. Is this check good enough?
1973 1973
1974 // Use the IP address of the client and check against the request 1974 // Use the IP address of the client and check against the request
1975 // seperate logins from the same IP will allow all of them to get non-text/plain as long 1975 // seperate logins from the same IP will allow all of them to get non-text/plain as long
1976 // as the owner is in the region. Same as SL! 1976 // as the owner is in the region. Same as SL!
@@ -2030,7 +2030,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2030 m_UrlModule.HttpContentType(new UUID(id),type); 2030 m_UrlModule.HttpContentType(new UUID(id),type);
2031 } 2031 }
2032 } 2032 }
2033*/ 2033*/
2034 public void SetTexGen(SceneObjectPart part, int face,int style) 2034 public void SetTexGen(SceneObjectPart part, int face,int style)
2035 { 2035 {
2036 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 2036 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
@@ -2774,7 +2774,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2774 public void llSetRot(LSL_Rotation rot) 2774 public void llSetRot(LSL_Rotation rot)
2775 { 2775 {
2776 m_host.AddScriptLPS(1); 2776 m_host.AddScriptLPS(1);
2777 2777
2778 // try to let this work as in SL... 2778 // try to let this work as in SL...
2779 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) 2779 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart))
2780 { 2780 {
@@ -2960,7 +2960,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2960 m_host.AddScriptLPS(1); 2960 m_host.AddScriptLPS(1);
2961 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); 2961 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0);
2962 } 2962 }
2963 2963
2964 public void llSetAngularVelocity(LSL_Vector avel, int local) 2964 public void llSetAngularVelocity(LSL_Vector avel, int local)
2965 { 2965 {
2966 m_host.AddScriptLPS(1); 2966 m_host.AddScriptLPS(1);
@@ -3129,7 +3129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3129 { 3129 {
3130 m_SoundModule.SendSound( 3130 m_SoundModule.SendSound(
3131 m_host.UUID, 3131 m_host.UUID,
3132 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), 3132 ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound),
3133 volume, false, 0, 3133 volume, false, 0,
3134 0, false, false); 3134 0, false, false);
3135 } 3135 }
@@ -3602,7 +3602,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3602// LSL_Vector up = new LSL_Vector(0.0, 0.0, 1.0); 3602// LSL_Vector up = new LSL_Vector(0.0, 0.0, 1.0);
3603 // find normalized left axis parallel to horizon 3603 // find normalized left axis parallel to horizon
3604// LSL_Vector left = llVecNorm(LSL_Vector.Cross(up, dir)); 3604// LSL_Vector left = llVecNorm(LSL_Vector.Cross(up, dir));
3605 3605
3606 LSL_Vector left = new LSL_Vector(-dir.y, dir.x, 0.0f); 3606 LSL_Vector left = new LSL_Vector(-dir.y, dir.x, 0.0f);
3607 left = llVecNorm(left); 3607 left = llVecNorm(left);
3608 // make up orthogonal to left and dir 3608 // make up orthogonal to left and dir
@@ -3851,7 +3851,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3851 ScriptSleep(2000); 3851 ScriptSleep(2000);
3852 return; 3852 return;
3853 } 3853 }
3854 3854
3855 // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. 3855 // We may be able to use ClientView.SendInstantMessage here, but we need a client instance.
3856 // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent, 3856 // InstantMessageModule.OnInstantMessage searches through a list of scenes for a client matching the toAgent,
3857 // but I don't think we have a list of scenes available from here. 3857 // but I don't think we have a list of scenes available from here.
@@ -3864,7 +3864,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3864 UUID friendTransactionID = UUID.Random(); 3864 UUID friendTransactionID = UUID.Random();
3865 3865
3866 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 3866 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
3867 3867
3868 GridInstantMessage msg = new GridInstantMessage(); 3868 GridInstantMessage msg = new GridInstantMessage();
3869 msg.fromAgentID = new Guid(m_host.OwnerID.ToString()); // fromAgentID.Guid; 3869 msg.fromAgentID = new Guid(m_host.OwnerID.ToString()); // fromAgentID.Guid;
3870 msg.toAgentID = new Guid(user); // toAgentID.Guid; 3870 msg.toAgentID = new Guid(user); // toAgentID.Guid;
@@ -4217,7 +4217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4217 } 4217 }
4218 4218
4219 ScenePresence presence = World.GetScenePresence(agentID); 4219 ScenePresence presence = World.GetScenePresence(agentID);
4220 4220
4221 if (presence != null) 4221 if (presence != null)
4222 { 4222 {
4223 // If permissions are being requested from an NPC and were not implicitly granted above then 4223 // If permissions are being requested from an NPC and were not implicitly granted above then
@@ -4285,7 +4285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4285 m_host.TaskInventory.LockItemsForWrite(true); 4285 m_host.TaskInventory.LockItemsForWrite(true);
4286 m_host.TaskInventory[m_item.ItemID].PermsMask = answer; 4286 m_host.TaskInventory[m_item.ItemID].PermsMask = answer;
4287 m_host.TaskInventory.LockItemsForWrite(false); 4287 m_host.TaskInventory.LockItemsForWrite(false);
4288 4288
4289 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams( 4289 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams(
4290 "run_time_permissions", new Object[] { 4290 "run_time_permissions", new Object[] {
4291 new LSL_Integer(answer) }, 4291 new LSL_Integer(answer) },
@@ -4363,7 +4363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4363 UUID targetID; 4363 UUID targetID;
4364 4364
4365 if (!UUID.TryParse(target, out targetID)) 4365 if (!UUID.TryParse(target, out targetID))
4366 return; 4366 return;
4367 4367
4368 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID); 4368 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID);
4369 if (targetPart == null) 4369 if (targetPart == null)
@@ -4493,7 +4493,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4493 } 4493 }
4494 } 4494 }
4495 finally { } 4495 finally { }
4496 4496
4497 newRoot.ParentGroup.HasGroupChanged = true; 4497 newRoot.ParentGroup.HasGroupChanged = true;
4498 newRoot.ParentGroup.ScheduleGroupForFullUpdate(); 4498 newRoot.ParentGroup.ScheduleGroupForFullUpdate();
4499 } 4499 }
@@ -4515,7 +4515,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4515 m_host.AddScriptLPS(1); 4515 m_host.AddScriptLPS(1);
4516 4516
4517 TaskInventoryItem item = m_item; 4517 TaskInventoryItem item = m_item;
4518 4518
4519 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 4519 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
4520 && !m_automaticLinkPermission) 4520 && !m_automaticLinkPermission)
4521 { 4521 {
@@ -4634,7 +4634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4634 count = count + 1; 4634 count = count + 1;
4635 } 4635 }
4636 } 4636 }
4637 4637
4638 m_host.TaskInventory.LockItemsForRead(false); 4638 m_host.TaskInventory.LockItemsForRead(false);
4639 return count; 4639 return count;
4640 } 4640 }
@@ -4729,7 +4729,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4729 4729
4730 if (agentItem == null) 4730 if (agentItem == null)
4731 { 4731 {
4732 llSay(0, message); 4732 llSay(0, message);
4733 return; 4733 return;
4734 } 4734 }
4735 4735
@@ -4758,7 +4758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4758 if (m_TransferModule != null) 4758 if (m_TransferModule != null)
4759 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 4759 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
4760 } 4760 }
4761 4761
4762 //This delay should only occur when giving inventory to avatars. 4762 //This delay should only occur when giving inventory to avatars.
4763 ScriptSleep(m_sleepMsOnGiveInventory); 4763 ScriptSleep(m_sleepMsOnGiveInventory);
4764 } 4764 }
@@ -5064,7 +5064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5064 // Can't TP sitting avatars 5064 // Can't TP sitting avatars
5065 if (presence.ParentID != 0) // Sitting 5065 if (presence.ParentID != 0) // Sitting
5066 return; 5066 return;
5067 5067
5068 if (m_item.PermsGranter == agentId) 5068 if (m_item.PermsGranter == agentId)
5069 { 5069 {
5070 // If attached using llAttachToAvatarTemp, cowardly refuse 5070 // If attached using llAttachToAvatarTemp, cowardly refuse
@@ -5190,7 +5190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5190 5190
5191 string movementAnimation = presence.Animator.CurrentMovementAnimation; 5191 string movementAnimation = presence.Animator.CurrentMovementAnimation;
5192 string lslMovementAnimation; 5192 string lslMovementAnimation;
5193 5193
5194 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation)) 5194 if (MovementAnimationsForLSL.TryGetValue(movementAnimation, out lslMovementAnimation))
5195 return lslMovementAnimation; 5195 return lslMovementAnimation;
5196 } 5196 }
@@ -5531,7 +5531,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5531 rot.Normalize(); 5531 rot.Normalize();
5532 5532
5533 double angle = 2 * Math.Acos(rot.s); 5533 double angle = 2 * Math.Acos(rot.s);
5534 if (angle > Math.PI) 5534 if (angle > Math.PI)
5535 angle = 2 * Math.PI - angle; 5535 angle = 2 * Math.PI - angle;
5536 5536
5537 return angle; 5537 return angle;
@@ -6916,10 +6916,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6916 SceneObjectPart part = World.GetSceneObjectPart(uuid); 6916 SceneObjectPart part = World.GetSceneObjectPart(uuid);
6917 if (part != null) 6917 if (part != null)
6918 { 6918 {
6919 6919
6920 if(part.ParentGroup.IsAttachment) 6920 if(part.ParentGroup.IsAttachment)
6921 { 6921 {
6922 uuid = part.ParentGroup.AttachedAvatar; 6922 uuid = part.ParentGroup.AttachedAvatar;
6923 } 6923 }
6924 else 6924 else
6925 { 6925 {
@@ -10266,7 +10266,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10266 } 10266 }
10267 break; 10267 break;
10268 10268
10269 case ScriptBaseClass.PRIM_ROTATION: 10269 case ScriptBaseClass.PRIM_ROTATION:
10270 if (remain < 1) 10270 if (remain < 1)
10271 return new LSL_List(); 10271 return new LSL_List();
10272 10272
@@ -10329,7 +10329,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10329 catch (InvalidCastException e) 10329 catch (InvalidCastException e)
10330 { 10330 {
10331 Error( 10331 Error(
10332 originFunc, 10332 originFunc,
10333 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message); 10333 string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message);
10334 } 10334 }
10335 10335
@@ -10433,7 +10433,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10433 } 10433 }
10434 while (str2.EndsWith("=")) 10434 while (str2.EndsWith("="))
10435 str2 = str2.Substring(0, str2.Length - 1); 10435 str2 = str2.Substring(0, str2.Length - 1);
10436 10436
10437 byte[] d1 = new byte[str1.Length]; 10437 byte[] d1 = new byte[str1.Length];
10438 byte[] d2 = new byte[str2.Length]; 10438 byte[] d2 = new byte[str2.Length];
10439 10439
@@ -10638,7 +10638,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10638 10638
10639 Vector3 box = presence.Appearance.AvatarBoxSize * 0.5f; 10639 Vector3 box = presence.Appearance.AvatarBoxSize * 0.5f;
10640 10640
10641 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID 10641 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID
10642 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 10642 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
10643/* 10643/*
10644 { 10644 {
@@ -10803,7 +10803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10803 10803
10804 List<SceneObjectPart> parts; 10804 List<SceneObjectPart> parts;
10805 List<ScenePresence> avatars; 10805 List<ScenePresence> avatars;
10806 10806
10807 LSL_List res = new LSL_List(); 10807 LSL_List res = new LSL_List();
10808 LSL_List remaining = new LSL_List(); 10808 LSL_List remaining = new LSL_List();
10809 10809
@@ -12887,7 +12887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12887 return; 12887 return;
12888 } 12888 }
12889 } 12889 }
12890 12890
12891 ScenePresence avatar = World.GetScenePresence(detectedParams.Key); 12891 ScenePresence avatar = World.GetScenePresence(detectedParams.Key);
12892 if (avatar != null) 12892 if (avatar != null)
12893 { 12893 {
@@ -13239,7 +13239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13239 13239
13240 byte[] d2 = new Byte[data1.Length]; 13240 byte[] d2 = new Byte[data1.Length];
13241 int pos = 0; 13241 int pos = 0;
13242 13242
13243 if (data1.Length <= data2.Length) 13243 if (data1.Length <= data2.Length)
13244 { 13244 {
13245 Array.Copy(data2, 0, d2, 0, data1.Length); 13245 Array.Copy(data2, 0, d2, 0, data1.Length);
@@ -13636,7 +13636,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13636 13636
13637 LSL_List ret = new LSL_List(); 13637 LSL_List ret = new LSL_List();
13638 UUID key = new UUID(); 13638 UUID key = new UUID();
13639 13639
13640 13640
13641 if (UUID.TryParse(id, out key)) 13641 if (UUID.TryParse(id, out key))
13642 { 13642 {
@@ -13824,7 +13824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13824 case ScriptBaseClass.OBJECT_NAME: 13824 case ScriptBaseClass.OBJECT_NAME:
13825 ret.Add(new LSL_String(obj.Name)); 13825 ret.Add(new LSL_String(obj.Name));
13826 break; 13826 break;
13827 case ScriptBaseClass.OBJECT_DESC: 13827 case ScriptBaseClass.OBJECT_DESC:
13828 ret.Add(new LSL_String(obj.Description)); 13828 ret.Add(new LSL_String(obj.Description));
13829 break; 13829 break;
13830 case ScriptBaseClass.OBJECT_POS: 13830 case ScriptBaseClass.OBJECT_POS:
@@ -13865,7 +13865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13865 } 13865 }
13866 else 13866 else
13867 { 13867 {
13868 vel = obj.Velocity; 13868 vel = obj.Velocity;
13869 } 13869 }
13870 13870
13871 ret.Add(vel); 13871 ret.Add(vel);
@@ -14263,8 +14263,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14263 ossl.CheckThreatLevel(ThreatLevel.High, "print"); 14263 ossl.CheckThreatLevel(ThreatLevel.High, "print");
14264 m_log.Info("LSL print():" + str); 14264 m_log.Info("LSL print():" + str);
14265 } 14265 }
14266 } 14266 }
14267 14267
14268 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link) 14268 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link)
14269 { 14269 {
14270 List<SceneObjectPart> parts = GetLinkParts(link); 14270 List<SceneObjectPart> parts = GetLinkParts(link);
@@ -14488,7 +14488,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14488 { 14488 {
14489 // get work copies 14489 // get work copies
14490 float sx = rayStart.X; 14490 float sx = rayStart.X;
14491 float ex = rayEnd.X; 14491 float ex = rayEnd.X;
14492 float sy = rayStart.Y; 14492 float sy = rayStart.Y;
14493 float ey = rayEnd.Y; 14493 float ey = rayEnd.Y;
14494 14494
@@ -14497,7 +14497,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14497 14497
14498 // region size info 14498 // region size info
14499 float rsx = World.RegionInfo.RegionSizeX; 14499 float rsx = World.RegionInfo.RegionSizeX;
14500 14500
14501 float tmp; 14501 float tmp;
14502 14502
14503 // region bounds 14503 // region bounds
@@ -14513,7 +14513,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14513 sy += dy * dx; 14513 sy += dy * dx;
14514 sx = 0; 14514 sx = 0;
14515 } 14515 }
14516 else if(sx >= rsx) 14516 else if(sx >= rsx)
14517 { 14517 {
14518 if(ex >= rsx) // totally outside 14518 if(ex >= rsx) // totally outside
14519 return null; 14519 return null;
@@ -14537,7 +14537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14537 sx += dy * dx; 14537 sx += dy * dx;
14538 sy = 0; 14538 sy = 0;
14539 } 14539 }
14540 else if(sy >= rsy) 14540 else if(sy >= rsy)
14541 { 14541 {
14542 if(dy >= 0) // out and going away 14542 if(dy >= 0) // out and going away
14543 return null; 14543 return null;
@@ -14875,7 +14875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14875 { 14875 {
14876 return a.Depth.CompareTo(b.Depth); 14876 return a.Depth.CompareTo(b.Depth);
14877 }); 14877 });
14878 14878
14879 int values = 0; 14879 int values = 0;
14880 SceneObjectGroup thisgrp = m_host.ParentGroup; 14880 SceneObjectGroup thisgrp = m_host.ParentGroup;
14881 14881
@@ -14931,7 +14931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14931 list.Add(new LSL_Integer(values)); 14931 list.Add(new LSL_Integer(values));
14932 return list; 14932 return list;
14933 } 14933 }
14934 14934
14935 14935
14936 /// <summary> 14936 /// <summary>
14937 /// Implementation of llCastRay similar to SL 2015-04-21. 14937 /// Implementation of llCastRay similar to SL 2015-04-21.
@@ -15076,7 +15076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15076 isNonphysical = !isPhysical; 15076 isNonphysical = !isPhysical;
15077 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) || 15077 isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) ||
15078 (part.VolumeDetectActive); 15078 (part.VolumeDetectActive);
15079 15079
15080 if (isPhysical && rejectPhysical) 15080 if (isPhysical && rejectPhysical)
15081 continue; 15081 continue;
15082 if (isNonphysical && rejectNonphysical) 15082 if (isNonphysical && rejectNonphysical)
@@ -16291,7 +16291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16291 pos = sitroot.AbsolutePosition + pos * sitroot.GetWorldRotation(); 16291 pos = sitroot.AbsolutePosition + pos * sitroot.GetWorldRotation();
16292 } 16292 }
16293 else 16293 else
16294 pos = avatar.AbsolutePosition; 16294 pos = avatar.AbsolutePosition;
16295 16295
16296 res.Add(new LSL_Vector(pos.X,pos.Y,pos.Z)); 16296 res.Add(new LSL_Vector(pos.X,pos.Y,pos.Z));
16297 break; 16297 break;
@@ -16471,7 +16471,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16471 res.Add(new LSL_String("")); 16471 res.Add(new LSL_String(""));
16472 break; 16472 break;
16473 16473
16474 case (int)ScriptBaseClass.PRIM_ROT_LOCAL: 16474 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
16475 Quaternion lrot = avatar.Rotation; 16475 Quaternion lrot = avatar.Rotation;
16476 res.Add(new LSL_Rotation(lrot.X, lrot.Y, lrot.Z, lrot.W)); 16476 res.Add(new LSL_Rotation(lrot.X, lrot.Y, lrot.Z, lrot.W));
16477 break; 16477 break;
@@ -16577,7 +16577,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16577 presence.SetAnimationOverride("ALL", UUID.Zero); 16577 presence.SetAnimationOverride("ALL", UUID.Zero);
16578 return; 16578 return;
16579 } 16579 }
16580 16580
16581 string state = String.Empty; 16581 string state = String.Empty;
16582 16582
16583 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL) 16583 foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
index 8cd065b..cec595d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
@@ -831,6 +831,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
831 } 831 }
832 832
833 return success; 833 return success;
834 } 834 }
835 } 835 }
836} 836}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
index 1e26036..692bec0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs
@@ -107,14 +107,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
107 /// Dumps an error message on the debug console. 107 /// Dumps an error message on the debug console.
108 /// </summary> 108 /// </summary>
109 /// <param name='message'></param> 109 /// <param name='message'></param>
110 internal void MODShoutError(string message) 110 internal void MODShoutError(string message)
111 { 111 {
112 if (message.Length > 1023) 112 if (message.Length > 1023)
113 message = message.Substring(0, 1023); 113 message = message.Substring(0, 1023);
114 114
115 World.SimChat( 115 World.SimChat(
116 Utils.StringToBytes(message), 116 Utils.StringToBytes(message),
117 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, 117 ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL,
118 m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); 118 m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
119 119
120 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 120 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
122 } 122 }
123 123
124 /// <summary> 124 /// <summary>
125 /// 125 ///
126 /// </summary> 126 /// </summary>
127 /// <param name="fname">The name of the function to invoke</param> 127 /// <param name="fname">The name of the function to invoke</param>
128 /// <param name="parms">List of parameters</param> 128 /// <param name="parms">List of parameters</param>
@@ -130,9 +130,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
130 public void modInvokeN(string fname, params object[] parms) 130 public void modInvokeN(string fname, params object[] parms)
131 { 131 {
132// m_log.DebugFormat( 132// m_log.DebugFormat(
133// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 133// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
134// fname, 134// fname,
135// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 135// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
136// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 136// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
137 137
138 Type returntype = m_comms.LookupReturnType(fname); 138 Type returntype = m_comms.LookupReturnType(fname);
@@ -145,9 +145,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
145 public LSL_String modInvokeS(string fname, params object[] parms) 145 public LSL_String modInvokeS(string fname, params object[] parms)
146 { 146 {
147// m_log.DebugFormat( 147// m_log.DebugFormat(
148// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 148// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
149// fname, 149// fname,
150// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 150// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
151// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 151// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
152 152
153 Type returntype = m_comms.LookupReturnType(fname); 153 Type returntype = m_comms.LookupReturnType(fname);
@@ -161,9 +161,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
161 public LSL_Integer modInvokeI(string fname, params object[] parms) 161 public LSL_Integer modInvokeI(string fname, params object[] parms)
162 { 162 {
163// m_log.DebugFormat( 163// m_log.DebugFormat(
164// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 164// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
165// fname, 165// fname,
166// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 166// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
167// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 167// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
168 168
169 Type returntype = m_comms.LookupReturnType(fname); 169 Type returntype = m_comms.LookupReturnType(fname);
@@ -173,13 +173,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
173 int result = (int)modInvoke(fname,parms); 173 int result = (int)modInvoke(fname,parms);
174 return new LSL_Integer(result); 174 return new LSL_Integer(result);
175 } 175 }
176 176
177 public LSL_Float modInvokeF(string fname, params object[] parms) 177 public LSL_Float modInvokeF(string fname, params object[] parms)
178 { 178 {
179// m_log.DebugFormat( 179// m_log.DebugFormat(
180// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 180// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
181// fname, 181// fname,
182// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 182// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
183// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 183// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
184 184
185 Type returntype = m_comms.LookupReturnType(fname); 185 Type returntype = m_comms.LookupReturnType(fname);
@@ -193,9 +193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
193 public LSL_Key modInvokeK(string fname, params object[] parms) 193 public LSL_Key modInvokeK(string fname, params object[] parms)
194 { 194 {
195// m_log.DebugFormat( 195// m_log.DebugFormat(
196// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 196// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
197// fname, 197// fname,
198// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 198// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
199// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 199// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
200 200
201 Type returntype = m_comms.LookupReturnType(fname); 201 Type returntype = m_comms.LookupReturnType(fname);
@@ -209,9 +209,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
209 public LSL_Vector modInvokeV(string fname, params object[] parms) 209 public LSL_Vector modInvokeV(string fname, params object[] parms)
210 { 210 {
211// m_log.DebugFormat( 211// m_log.DebugFormat(
212// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 212// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
213// fname, 213// fname,
214// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 214// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
215// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 215// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
216 216
217 Type returntype = m_comms.LookupReturnType(fname); 217 Type returntype = m_comms.LookupReturnType(fname);
@@ -225,9 +225,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
225 public LSL_Rotation modInvokeR(string fname, params object[] parms) 225 public LSL_Rotation modInvokeR(string fname, params object[] parms)
226 { 226 {
227// m_log.DebugFormat( 227// m_log.DebugFormat(
228// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 228// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
229// fname, 229// fname,
230// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 230// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
231// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 231// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
232 232
233 Type returntype = m_comms.LookupReturnType(fname); 233 Type returntype = m_comms.LookupReturnType(fname);
@@ -241,9 +241,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
241 public LSL_List modInvokeL(string fname, params object[] parms) 241 public LSL_List modInvokeL(string fname, params object[] parms)
242 { 242 {
243// m_log.DebugFormat( 243// m_log.DebugFormat(
244// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 244// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
245// fname, 245// fname,
246// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 246// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
247// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 247// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
248 248
249 Type returntype = m_comms.LookupReturnType(fname); 249 Type returntype = m_comms.LookupReturnType(fname);
@@ -308,22 +308,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
308 } 308 }
309 309
310// m_log.DebugFormat( 310// m_log.DebugFormat(
311// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 311// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type",
312// fname, 312// fname,
313// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 313// string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())),
314// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); 314// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);
315 315
316 Type[] signature = m_comms.LookupTypeSignature(fname); 316 Type[] signature = m_comms.LookupTypeSignature(fname);
317 if (signature.Length != parms.Length) 317 if (signature.Length != parms.Length)
318 MODError(String.Format("wrong number of parameters to function {0}",fname)); 318 MODError(String.Format("wrong number of parameters to function {0}",fname));
319 319
320 object[] convertedParms = new object[parms.Length]; 320 object[] convertedParms = new object[parms.Length];
321 for (int i = 0; i < parms.Length; i++) 321 for (int i = 0; i < parms.Length; i++)
322 convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname); 322 convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname);
323 323
324 // now call the function, the contract with the function is that it will always return 324 // now call the function, the contract with the function is that it will always return
325 // non-null but don't trust it completely 325 // non-null but don't trust it completely
326 try 326 try
327 { 327 {
328 object result = m_comms.InvokeOperation(m_host.UUID, m_item.ItemID, fname, convertedParms); 328 object result = m_comms.InvokeOperation(m_host.UUID, m_item.ItemID, fname, convertedParms);
329 if (result != null) 329 if (result != null)
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
342 342
343 return null; 343 return null;
344 } 344 }
345 345
346 /// <summary> 346 /// <summary>
347 /// Send a command to functions registered on an event 347 /// Send a command to functions registered on an event
348 /// </summary> 348 /// </summary>
@@ -365,7 +365,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
365 /// </summary> 365 /// </summary>
366 protected object ConvertFromLSL(object lslparm, Type type, string fname) 366 protected object ConvertFromLSL(object lslparm, Type type, string fname)
367 { 367 {
368 368
369 if(lslparm.GetType() == type) 369 if(lslparm.GetType() == type)
370 return lslparm; 370 return lslparm;
371 371
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
429 for (int i = 0; i < plist.Length; i++) 429 for (int i = 0; i < plist.Length; i++)
430 { 430 {
431 if (plist[i] is LSL_String) 431 if (plist[i] is LSL_String)
432 result[i] = (string)(LSL_String)plist[i]; 432 result[i] = (string)(LSL_String)plist[i];
433 else if (plist[i] is LSL_Integer) 433 else if (plist[i] is LSL_Integer)
434 result[i] = (int)(LSL_Integer)plist[i]; 434 result[i] = (int)(LSL_Integer)plist[i];
435 // The int check exists because of the many plain old int script constants in ScriptBase which 435 // The int check exists because of the many plain old int script constants in ScriptBase which
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
451 return result; 451 return result;
452 } 452 }
453 } 453 }
454 454
455 MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType())); 455 MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType()));
456 return null; 456 return null;
457 } 457 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ba5a46d..066f6a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
142 internal float m_ScriptDelayFactor = 1.0f; 142 internal float m_ScriptDelayFactor = 1.0f;
143 internal float m_ScriptDistanceFactor = 1.0f; 143 internal float m_ScriptDistanceFactor = 1.0f;
144 internal bool m_debuggerSafe = false; 144 internal bool m_debuggerSafe = false;
145 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); 145 internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
146 protected IUrlModule m_UrlModule = null; 146 protected IUrlModule m_UrlModule = null;
147 147
148 public void Initialize( 148 public void Initialize(
@@ -418,7 +418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
418 //Only gods may use the function 418 //Only gods may use the function
419 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD")) 419 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GOD"))
420 { 420 {
421 if (World.Permissions.IsGod(ownerID)) 421 if (World.Permissions.IsGod(ownerID))
422 { 422 {
423 return String.Empty; 423 return String.Empty;
424 } 424 }
@@ -427,7 +427,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
427 //Only grid gods may use the function 427 //Only grid gods may use the function
428 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD")) 428 if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("GRID_GOD"))
429 { 429 {
430 if (World.Permissions.IsGridGod(ownerID)) 430 if (World.Permissions.IsGridGod(ownerID))
431 { 431 {
432 return String.Empty; 432 return String.Empty;
433 } 433 }
@@ -856,11 +856,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
856 // { 856 // {
857 857
858 // We will launch the teleport on a new thread so that when the script threads are terminated 858 // We will launch the teleport on a new thread so that when the script threads are terminated
859 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. 859 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
860 Util.FireAndForget( 860 Util.FireAndForget(
861 o => World.RequestTeleportLocation( 861 o => World.RequestTeleportLocation(
862 presence.ControllingClient, regionName, position, 862 presence.ControllingClient, regionName, position,
863 lookat, (uint)TPFlags.ViaLocation), 863 lookat, (uint)TPFlags.ViaLocation),
864 null, "OSSL_Api.TeleportAgentByRegionCoords"); 864 null, "OSSL_Api.TeleportAgentByRegionCoords");
865 865
866 ScriptSleep(5000); 866 ScriptSleep(5000);
@@ -906,8 +906,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
906 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. 906 // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
907 Util.FireAndForget( 907 Util.FireAndForget(
908 o => World.RequestTeleportLocation( 908 o => World.RequestTeleportLocation(
909 presence.ControllingClient, regionHandle, 909 presence.ControllingClient, regionHandle,
910 position, lookat, (uint)TPFlags.ViaLocation), 910 position, lookat, (uint)TPFlags.ViaLocation),
911 null, "OSSL_Api.TeleportAgentByRegionName"); 911 null, "OSSL_Api.TeleportAgentByRegionName");
912 912
913 ScriptSleep(5000); 913 ScriptSleep(5000);
@@ -972,13 +972,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
972 m_host.AddScriptLPS(1); 972 m_host.AddScriptLPS(1);
973 973
974 UUID targetID = new UUID(target); 974 UUID targetID = new UUID(target);
975 975
976 ForceSit(avatar, targetID); 976 ForceSit(avatar, targetID);
977 } 977 }
978 978
979 public void ForceSit(string avatar, UUID targetID) 979 public void ForceSit(string avatar, UUID targetID)
980 { 980 {
981 UUID agentID; 981 UUID agentID;
982 982
983 if (!UUID.TryParse(avatar, out agentID)) 983 if (!UUID.TryParse(avatar, out agentID))
984 return; 984 return;
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1015 ScenePresence target = (ScenePresence)World.Entities[avatarID]; 1015 ScenePresence target = (ScenePresence)World.Entities[avatarID];
1016 return target.ControllingClient.RemoteEndPoint.Address.ToString(); 1016 return target.ControllingClient.RemoteEndPoint.Address.ToString();
1017 } 1017 }
1018 1018
1019 // fall through case, just return nothing 1019 // fall through case, just return nothing
1020 return ""; 1020 return "";
1021 } 1021 }
@@ -1058,7 +1058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1058 ScenePresence target = null; 1058 ScenePresence target = null;
1059 if ((World.Entities[avatarID] is ScenePresence)) 1059 if ((World.Entities[avatarID] is ScenePresence))
1060 target = (ScenePresence)World.Entities[avatarID]; 1060 target = (ScenePresence)World.Entities[avatarID];
1061 1061
1062 if (target == null) 1062 if (target == null)
1063 return; 1063 return;
1064 1064
@@ -1115,8 +1115,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1115 else 1115 else
1116 animID = UUID.Zero; 1116 animID = UUID.Zero;
1117 } 1117 }
1118 1118
1119 1119
1120 if (animID == UUID.Zero) 1120 if (animID == UUID.Zero)
1121 target.Animator.RemoveAnimation(animation); 1121 target.Animator.RemoveAnimation(animation);
1122 else 1122 else
@@ -1257,7 +1257,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1257 public string osSetPenColor(string drawList, string color) 1257 public string osSetPenColor(string drawList, string color)
1258 { 1258 {
1259 CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); 1259 CheckThreatLevel(ThreatLevel.None, "osSetPenColor");
1260 1260
1261 m_host.AddScriptLPS(1); 1261 m_host.AddScriptLPS(1);
1262 drawList += "PenColor " + color + "; "; 1262 drawList += "PenColor " + color + "; ";
1263 return drawList; 1263 return drawList;
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1780 } 1780 }
1781 return result; 1781 return result;
1782 } 1782 }
1783 1783
1784 private ArrayList osdToArray(OSDArray list) 1784 private ArrayList osdToArray(OSDArray list)
1785 { 1785 {
1786 ArrayList result = new ArrayList(); 1786 ArrayList result = new ArrayList();
@@ -1834,7 +1834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1834 m_host.AddScriptLPS(1); 1834 m_host.AddScriptLPS(1);
1835 1835
1836 Object decoded = osParseJSONNew(JSON); 1836 Object decoded = osParseJSONNew(JSON);
1837 1837
1838 if ( decoded is Hashtable ) { 1838 if ( decoded is Hashtable ) {
1839 return (Hashtable) decoded; 1839 return (Hashtable) decoded;
1840 } else if ( decoded is ArrayList ) { 1840 } else if ( decoded is ArrayList ) {
@@ -1902,7 +1902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1902 { 1902 {
1903// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); 1903// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie");
1904 // if this is restricted to objects rezzed by this host level can be reduced 1904 // if this is restricted to objects rezzed by this host level can be reduced
1905 1905
1906 CheckThreatLevel(ThreatLevel.Low, "osDie"); 1906 CheckThreatLevel(ThreatLevel.Low, "osDie");
1907 m_host.AddScriptLPS(1); 1907 m_host.AddScriptLPS(1);
1908 1908
@@ -1931,7 +1931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1931 1931
1932 if (sceneOG.OwnerID != m_host.OwnerID) 1932 if (sceneOG.OwnerID != m_host.OwnerID)
1933 return; 1933 return;
1934 1934
1935 // harakiri check 1935 // harakiri check
1936 if(sceneOG.UUID == m_host.ParentGroup.UUID) 1936 if(sceneOG.UUID == m_host.ParentGroup.UUID)
1937 throw new SelfDeleteException(); 1937 throw new SelfDeleteException();
@@ -2042,16 +2042,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2042 if (assetID != UUID.Zero) 2042 if (assetID != UUID.Zero)
2043 { 2043 {
2044 StringBuilder notecardData = new StringBuilder(); 2044 StringBuilder notecardData = new StringBuilder();
2045 2045
2046 for (int count = 0; count < NotecardCache.GetLines(assetID); count++) 2046 for (int count = 0; count < NotecardCache.GetLines(assetID); count++)
2047 { 2047 {
2048 string line = NotecardCache.GetLine(assetID, count) + "\n"; 2048 string line = NotecardCache.GetLine(assetID, count) + "\n";
2049 2049
2050 // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line); 2050 // m_log.DebugFormat("[OSSL]: From notecard {0} loading line {1}", notecardNameOrUuid, line);
2051 2051
2052 notecardData.Append(line); 2052 notecardData.Append(line);
2053 } 2053 }
2054 2054
2055 return notecardData.ToString(); 2055 return notecardData.ToString();
2056 } 2056 }
2057 2057
@@ -2086,7 +2086,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2086 2086
2087 if (a == null) 2087 if (a == null)
2088 { 2088 {
2089 // Whoops, it's still possible here that the notecard name was properly 2089 // Whoops, it's still possible here that the notecard name was properly
2090 // formatted like a UUID but isn't an asset UUID so lets look it up by name after all 2090 // formatted like a UUID but isn't an asset UUID so lets look it up by name after all
2091 assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid); 2091 assetID = SearchTaskInventoryForAssetId(notecardNameOrUuid);
2092 if (assetID == UUID.Zero) 2092 if (assetID == UUID.Zero)
@@ -2291,7 +2291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2291 } 2291 }
2292 } 2292 }
2293 } 2293 }
2294 2294
2295 return ""; 2295 return "";
2296 } 2296 }
2297 2297
@@ -2429,7 +2429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2429 m_host.AddScriptLPS(1); 2429 m_host.AddScriptLPS(1);
2430 2430
2431 IConfigSource config = m_ScriptEngine.ConfigSource; 2431 IConfigSource config = m_ScriptEngine.ConfigSource;
2432 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", 2432 string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI",
2433 new string[] { "Startup", "Hypergrid" }, String.Empty); 2433 new string[] { "Startup", "Hypergrid" }, String.Empty);
2434 2434
2435 if (!string.IsNullOrEmpty(HomeURI)) 2435 if (!string.IsNullOrEmpty(HomeURI))
@@ -2705,12 +2705,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2705 { 2705 {
2706 CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); 2706 CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
2707 m_host.AddScriptLPS(1); 2707 m_host.AddScriptLPS(1);
2708 2708
2709 // have to get the npc module also here to set the default Not Owned 2709 // have to get the npc module also here to set the default Not Owned
2710 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2710 INPCModule module = World.RequestModuleInterface<INPCModule>();
2711 if(module == null) 2711 if(module == null)
2712 return new LSL_Key(UUID.Zero.ToString()); 2712 return new LSL_Key(UUID.Zero.ToString());
2713 2713
2714 bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0; 2714 bool owned = (module.NPCOptionFlags & NPCOptionsFlags.AllowNotOwned) == 0;
2715 2715
2716 return NpcCreate(firstname, lastname, position, notecard, owned, false, false); 2716 return NpcCreate(firstname, lastname, position, notecard, owned, false, false);
@@ -2795,7 +2795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2795 groupTitle = "- NPC -"; 2795 groupTitle = "- NPC -";
2796 } 2796 }
2797 } 2797 }
2798 2798
2799 if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0) 2799 if((createFlags & NPCOptionsFlags.AllowCloneOtherAvatars) != 0)
2800 { 2800 {
2801 UUID id; 2801 UUID id;
@@ -2973,7 +2973,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2973 2973
2974 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 2974 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2975 return; 2975 return;
2976 2976
2977 module.MoveToTarget(npcId, World, pos, false, true, false); 2977 module.MoveToTarget(npcId, World, pos, false, true, false);
2978 } 2978 }
2979 } 2979 }
@@ -3202,7 +3202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3202 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 3202 if (!module.CheckPermissions(npcId, m_host.OwnerID))
3203 return; 3203 return;
3204 3204
3205 module.DeleteNPC(npcId, World); 3205 module.DeleteNPC(npcId, World);
3206 } 3206 }
3207 } 3207 }
3208 catch { } 3208 catch { }
@@ -3259,7 +3259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3259 { 3259 {
3260 CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); 3260 CheckThreatLevel(ThreatLevel.High, "osNpcTouch");
3261 m_host.AddScriptLPS(1); 3261 m_host.AddScriptLPS(1);
3262 3262
3263 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3263 INPCModule module = World.RequestModuleInterface<INPCModule>();
3264 int linkNum = link_num.value; 3264 int linkNum = link_num.value;
3265 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS)) 3265 if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS))
@@ -3400,7 +3400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3400 bool isMale = vpShapeMale > 0.5f; 3400 bool isMale = vpShapeMale > 0.5f;
3401 return new LSL_String(isMale ? "male" : "female"); 3401 return new LSL_String(isMale ? "male" : "female");
3402 } 3402 }
3403 3403
3404 /// <summary> 3404 /// <summary>
3405 /// Get current region's map texture UUID 3405 /// Get current region's map texture UUID
3406 /// </summary> 3406 /// </summary>
@@ -3441,7 +3441,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3441 3441
3442 return key.ToString(); 3442 return key.ToString();
3443 } 3443 }
3444 3444
3445 /// <summary> 3445 /// <summary>
3446 /// Return information regarding various simulator statistics (sim fps, physics fps, time 3446 /// Return information regarding various simulator statistics (sim fps, physics fps, time
3447 /// dilation, total number of prims, total number of active scripts, script lps, various 3447 /// dilation, total number of prims, total number of active scripts, script lps, various
@@ -3455,7 +3455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3455 m_host.AddScriptLPS(1); 3455 m_host.AddScriptLPS(1);
3456 LSL_List ret = new LSL_List(); 3456 LSL_List ret = new LSL_List();
3457 float[] stats = World.StatsReporter.LastReportedSimStats; 3457 float[] stats = World.StatsReporter.LastReportedSimStats;
3458 3458
3459 for (int i = 0; i < 21; i++) 3459 for (int i = 0; i < 21; i++)
3460 { 3460 {
3461 ret.Add(new LSL_Float(stats[i])); 3461 ret.Add(new LSL_Float(stats[i]));
@@ -3488,7 +3488,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3488 3488
3489 return (int)pws; 3489 return (int)pws;
3490 } 3490 }
3491 3491
3492 public void osSetSpeed(string UUID, LSL_Float SpeedModifier) 3492 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
3493 { 3493 {
3494 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 3494 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
@@ -3498,7 +3498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3498 if (avatar != null) 3498 if (avatar != null)
3499 avatar.SpeedModifier = (float)SpeedModifier; 3499 avatar.SpeedModifier = (float)SpeedModifier;
3500 } 3500 }
3501 3501
3502 public void osKickAvatar(string FirstName, string SurName, string alert) 3502 public void osKickAvatar(string FirstName, string SurName, string alert)
3503 { 3503 {
3504 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 3504 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
@@ -3528,7 +3528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3528 if (presence != null) health = presence.Health; 3528 if (presence != null) health = presence.Health;
3529 return health; 3529 return health;
3530 } 3530 }
3531 3531
3532 public void osCauseDamage(string avatar, double damage) 3532 public void osCauseDamage(string avatar, double damage)
3533 { 3533 {
3534 CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); 3534 CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3537 UUID avatarId = new UUID(avatar); 3537 UUID avatarId = new UUID(avatar);
3538 Vector3 pos = m_host.GetWorldPosition(); 3538 Vector3 pos = m_host.GetWorldPosition();
3539 3539
3540 ScenePresence presence = World.GetScenePresence(avatarId); 3540 ScenePresence presence = World.GetScenePresence(avatarId);
3541 if (presence != null) 3541 if (presence != null)
3542 { 3542 {
3543 LandData land = World.GetLandData(pos); 3543 LandData land = World.GetLandData(pos);
@@ -3556,7 +3556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3556 } 3556 }
3557 } 3557 }
3558 } 3558 }
3559 3559
3560 public void osCauseHealing(string avatar, double healing) 3560 public void osCauseHealing(string avatar, double healing)
3561 { 3561 {
3562 CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); 3562 CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
@@ -3625,7 +3625,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3625 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams"); 3625 CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams");
3626 m_host.AddScriptLPS(1); 3626 m_host.AddScriptLPS(1);
3627 InitLSL(); 3627 InitLSL();
3628 3628
3629 return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); 3629 return m_LSL_Api.GetPrimitiveParamsEx(prim, rules);
3630 } 3630 }
3631 3631
@@ -3634,12 +3634,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3634 CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams"); 3634 CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams");
3635 m_host.AddScriptLPS(1); 3635 m_host.AddScriptLPS(1);
3636 InitLSL(); 3636 InitLSL();
3637 3637
3638 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); 3638 m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams");
3639 } 3639 }
3640 3640
3641 /// <summary> 3641 /// <summary>
3642 /// Set parameters for light projection in host prim 3642 /// Set parameters for light projection in host prim
3643 /// </summary> 3643 /// </summary>
3644 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb) 3644 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
3645 { 3645 {
@@ -3723,7 +3723,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3723 /// Get the description from an inventory item 3723 /// Get the description from an inventory item
3724 /// </summary> 3724 /// </summary>
3725 /// <param name="inventoryName"></param> 3725 /// <param name="inventoryName"></param>
3726 /// <returns>Item description</returns> 3726 /// <returns>Item description</returns>
3727 public LSL_String osGetInventoryDesc(string item) 3727 public LSL_String osGetInventoryDesc(string item)
3728 { 3728 {
3729 m_host.AddScriptLPS(1); 3729 m_host.AddScriptLPS(1);
@@ -3921,7 +3921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3921 if (item.InvType != (int)InventoryType.Object) 3921 if (item.InvType != (int)InventoryType.Object)
3922 { 3922 {
3923 // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set 3923 // FIXME: Temporary null check for regression tests since they dont' have the infrastructure to set
3924 // up the api reference. 3924 // up the api reference.
3925 if (m_LSL_Api != null) 3925 if (m_LSL_Api != null)
3926 ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName)); 3926 ((LSL_Api)m_LSL_Api).llSay(0, string.Format("Unable to attach, item '{0}' is not an object.", itemName));
3927 3927
@@ -4002,10 +4002,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4002 UUID targetUUID; 4002 UUID targetUUID;
4003 if(!UUID.TryParse(avatar.ToString(), out targetUUID)) 4003 if(!UUID.TryParse(avatar.ToString(), out targetUUID))
4004 return; 4004 return;
4005 4005
4006 if(targetUUID == UUID.Zero) 4006 if(targetUUID == UUID.Zero)
4007 return; 4007 return;
4008 4008
4009 ScenePresence target; 4009 ScenePresence target;
4010 if(!World.TryGetScenePresence(targetUUID, out target)) 4010 if(!World.TryGetScenePresence(targetUUID, out target))
4011 return; 4011 return;
@@ -4068,7 +4068,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4068 return; 4068 return;
4069 } 4069 }
4070 4070
4071 bool optionObjCreator = (options & 4071 bool optionObjCreator = (options &
4072 ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0; 4072 ScriptBaseClass.OS_ATTACH_MSG_OBJECT_CREATOR) != 0;
4073 bool optionScriptCreator = (options & 4073 bool optionScriptCreator = (options &
4074 ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0; 4074 ScriptBaseClass.OS_ATTACH_MSG_SCRIPT_CREATOR) != 0;
@@ -4316,7 +4316,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4316 { 4316 {
4317 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); 4317 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL");
4318 m_host.AddScriptLPS(1); 4318 m_host.AddScriptLPS(1);
4319 4319
4320 Hashtable opts = new Hashtable(); 4320 Hashtable opts = new Hashtable();
4321 for (int i = 0 ; i < options.Length ; i++) 4321 for (int i = 0 ; i < options.Length ; i++)
4322 { 4322 {
@@ -4334,7 +4334,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4334 { 4334 {
4335 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL"); 4335 CheckThreatLevel(ThreatLevel.Moderate, "osRequestSecureURL");
4336 m_host.AddScriptLPS(1); 4336 m_host.AddScriptLPS(1);
4337 4337
4338 Hashtable opts = new Hashtable(); 4338 Hashtable opts = new Hashtable();
4339 for (int i = 0 ; i < options.Length ; i++) 4339 for (int i = 0 ; i < options.Length ; i++)
4340 { 4340 {
@@ -4362,7 +4362,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4362 m_host.CollisionSoundType = 0; // full return to default sounds 4362 m_host.CollisionSoundType = 0; // full return to default sounds
4363 else 4363 else
4364 m_host.CollisionSoundType = 2; // default sounds with volume 4364 m_host.CollisionSoundType = 2; // default sounds with volume
4365 m_host.aggregateScriptEvents(); 4365 m_host.aggregateScriptEvents();
4366 return; 4366 return;
4367 } 4367 }
4368 // TODO: Parameter check logic required. 4368 // TODO: Parameter check logic required.
@@ -4376,7 +4376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4376 else 4376 else
4377 m_host.CollisionSoundType = -1; 4377 m_host.CollisionSoundType = -1;
4378 4378
4379 m_host.aggregateScriptEvents(); 4379 m_host.aggregateScriptEvents();
4380 } 4380 }
4381 4381
4382 // still not very usefull, detector is lost on rez, restarts, etc 4382 // still not very usefull, detector is lost on rez, restarts, etc
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 7bfe27b..d401ed8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
351 // your head but the sensor will stay with your (global) 351 // your head but the sensor will stay with your (global)
352 // avatar rotation and position. 352 // avatar rotation and position.
353 // Position of a sensor in a child prim attached to an avatar 353 // Position of a sensor in a child prim attached to an avatar
354 // will be still wrong. 354 // will be still wrong.
355 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); 355 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
356 356
357 // Don't proceed if the avatar for this attachment has since been removed from the scene. 357 // Don't proceed if the avatar for this attachment has since been removed from the scene.
@@ -473,7 +473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
473 473
474 SceneObjectPart SensePoint = ts.host; 474 SceneObjectPart SensePoint = ts.host;
475 Vector3 fromRegionPos = SensePoint.GetWorldPosition(); 475 Vector3 fromRegionPos = SensePoint.GetWorldPosition();
476 476
477 Quaternion q = SensePoint.GetWorldRotation(); 477 Quaternion q = SensePoint.GetWorldRotation();
478 if (SensePoint.ParentGroup.IsAttachment) 478 if (SensePoint.ParentGroup.IsAttachment)
479 { 479 {
@@ -486,7 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
486 // your head but the sensor will stay with your (global) 486 // your head but the sensor will stay with your (global)
487 // avatar rotation and position. 487 // avatar rotation and position.
488 // Position of a sensor in a child prim attached to an avatar 488 // Position of a sensor in a child prim attached to an avatar
489 // will be still wrong. 489 // will be still wrong.
490 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); 490 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
491 491
492 // Don't proceed if the avatar for this attachment has since been removed from the scene. 492 // Don't proceed if the avatar for this attachment has since been removed from the scene.
@@ -502,7 +502,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
502 bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); 502 bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0);
503 Vector3 toRegionPos; 503 Vector3 toRegionPos;
504 double dis; 504 double dis;
505 505
506 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => 506 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
507 { 507 {
508// m_log.DebugFormat( 508// m_log.DebugFormat(
@@ -542,7 +542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
542 542
543 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) 543 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0)
544 return; 544 return;
545 545
546 // if the object the script is in is attached and the avatar is the owner 546 // if the object the script is in is attached and the avatar is the owner
547 // then this one is not wanted 547 // then this one is not wanted
548 if (attached && presence.UUID == SensePoint.OwnerID) 548 if (attached && presence.UUID == SensePoint.OwnerID)
@@ -700,7 +700,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
700 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); 700 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
701 701
702 AddSenseRepeater(ts); 702 AddSenseRepeater(ts);
703 703
704 idx += 6; 704 idx += 6;
705 } 705 }
706 } 706 }
@@ -716,6 +716,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
716 } 716 }
717 717
718 return retList; 718 return retList;
719 } 719 }
720 } 720 }
721} 721}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
index 5b1fdc0..cae1c14 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
@@ -200,6 +200,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
200 } 200 }
201 201
202 return retList; 202 return retList;
203 } 203 }
204 } 204 }
205} 205}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
index 16805e4..e6676b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ScriptEngine.Shared.Api")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
index aa78aaa..7c518f3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IMOD_Api.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
49 LSL_Vector modInvokeV(string fname, params object[] parms); 49 LSL_Vector modInvokeV(string fname, params object[] parms);
50 LSL_Rotation modInvokeR(string fname, params object[] parms); 50 LSL_Rotation modInvokeR(string fname, params object[] parms);
51 LSL_List modInvokeL(string fname, params object[] parms); 51 LSL_List modInvokeL(string fname, params object[] parms);
52 52
53 //Module functions 53 //Module functions
54 string modSendCommand(string modules, string command, string k); 54 string modSendCommand(string modules, string command, string k);
55 } 55 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 7415fea..bee060a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
54 NoAccess = -1, 54 NoAccess = -1,
55 55
56 /// <summary> 56 /// <summary>
57 /// Function is no threat at all. It doesn't constitute a threat to 57 /// Function is no threat at all. It doesn't constitute a threat to
58 /// either users or the system and has no known side effects. 58 /// either users or the system and has no known side effects.
59 /// </summary> 59 /// </summary>
60 None = 0, 60 None = 0,
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
66 Nuisance = 1, 66 Nuisance = 1,
67 67
68 /// <summary> 68 /// <summary>
69 /// Extreme levels of abuse of this function can cause impaired 69 /// Extreme levels of abuse of this function can cause impaired
70 /// functioning of the region, or very gullible users can be tricked 70 /// functioning of the region, or very gullible users can be tricked
71 /// into experiencing harmless effects. 71 /// into experiencing harmless effects.
72 /// </summary> 72 /// </summary>
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
81 81
82 /// <summary> 82 /// <summary>
83 /// Intentional abuse can cause denial of service and crashes with 83 /// Intentional abuse can cause denial of service and crashes with
84 /// potential of data or state loss; or trusting users can be tricked 84 /// potential of data or state loss; or trusting users can be tricked
85 /// into embarrassing or uncomfortable situations. 85 /// into embarrassing or uncomfortable situations.
86 /// </summary> 86 /// </summary>
87 Moderate = 4, 87 Moderate = 4,
@@ -145,7 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
145 // Avatar Info Commands 145 // Avatar Info Commands
146 string osGetAgentIP(string agent); 146 string osGetAgentIP(string agent);
147 LSL_List osGetAgents(); 147 LSL_List osGetAgents();
148 148
149 // Teleport commands 149 // Teleport commands
150 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 150 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
151 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 151 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 903b362..3a90c77 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -746,7 +746,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
746 public const int FRICTION = 2; 746 public const int FRICTION = 2;
747 public const int RESTITUTION = 4; 747 public const int RESTITUTION = 4;
748 public const int GRAVITY_MULTIPLIER = 8; 748 public const int GRAVITY_MULTIPLIER = 8;
749 749
750 // extra constants for llSetPrimMediaParams 750 // extra constants for llSetPrimMediaParams
751 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); 751 public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0);
752 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); 752 public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 9d36341..1a42c3a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1580,7 +1580,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1580 m_LSL_Functions.llSetVelocity(force, local); 1580 m_LSL_Functions.llSetVelocity(force, local);
1581 } 1581 }
1582 1582
1583 1583
1584 public void llSetAngularVelocity(LSL_Vector force, int local) 1584 public void llSetAngularVelocity(LSL_Vector force, int local)
1585 { 1585 {
1586 m_LSL_Functions.llSetAngularVelocity(force, local); 1586 m_LSL_Functions.llSetAngularVelocity(force, local);
@@ -1995,7 +1995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1995 { 1995 {
1996 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); 1996 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2);
1997 } 1997 }
1998 1998
1999 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 1999 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
2000 { 2000 {
2001 return m_LSL_Functions.llGetPrimMediaParams(face, rules); 2001 return m_LSL_Functions.llGetPrimMediaParams(face, rules);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index c34ccd0..6164734 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -539,7 +539,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
539 { 539 {
540 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start); 540 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
541 } 541 }
542 542
543 543
544 // Information about data loaded into the region 544 // Information about data loaded into the region
545 public string osLoadedCreationDate() 545 public string osLoadedCreationDate()
@@ -914,7 +914,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
914 { 914 {
915 return m_OSSL_Functions.osGetRegionMapTexture(regionName); 915 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
916 } 916 }
917 917
918 public LSL_List osGetRegionStats() 918 public LSL_List osGetRegionStats()
919 { 919 {
920 return m_OSSL_Functions.osGetRegionStats(); 920 return m_OSSL_Functions.osGetRegionStats();
@@ -934,12 +934,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
934 { 934 {
935 return m_OSSL_Functions.osGetSimulatorMemory(); 935 return m_OSSL_Functions.osGetSimulatorMemory();
936 } 936 }
937 937
938 public void osKickAvatar(string FirstName,string SurName,string alert) 938 public void osKickAvatar(string FirstName,string SurName,string alert)
939 { 939 {
940 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert); 940 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
941 } 941 }
942 942
943 public void osSetSpeed(string UUID, LSL_Float SpeedModifier) 943 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
944 { 944 {
945 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier); 945 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
@@ -954,7 +954,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
954 { 954 {
955 m_OSSL_Functions.osCauseDamage(avatar, damage); 955 m_OSSL_Functions.osCauseDamage(avatar, damage);
956 } 956 }
957 957
958 public void osCauseHealing(string avatar, double healing) 958 public void osCauseHealing(string avatar, double healing)
959 { 959 {
960 m_OSSL_Functions.osCauseHealing(avatar, healing); 960 m_OSSL_Functions.osCauseHealing(avatar, healing);
@@ -984,12 +984,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
984 { 984 {
985 m_OSSL_Functions.osForceOtherSit(avatar, target); 985 m_OSSL_Functions.osForceOtherSit(avatar, target);
986 } 986 }
987 987
988 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) 988 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
989 { 989 {
990 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules); 990 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
991 } 991 }
992 992
993 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) 993 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
994 { 994 {
995 m_OSSL_Functions.osSetPrimitiveParams(prim, rules); 995 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
index b1825ac..81020f1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ScriptEngine.Shared.Api.Runtime")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Api.Runtime")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index bc6ce4f..031f00a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -433,9 +433,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
433 if (m_insertCoopTerminationChecks) 433 if (m_insertCoopTerminationChecks)
434 { 434 {
435 // We have to check in event functions as well because the user can manually call these. 435 // We have to check in event functions as well because the user can manually call these.
436 if (previousSymbol is GlobalFunctionDefinition 436 if (previousSymbol is GlobalFunctionDefinition
437 || previousSymbol is WhileStatement 437 || previousSymbol is WhileStatement
438 || previousSymbol is DoWhileStatement 438 || previousSymbol is DoWhileStatement
439 || previousSymbol is ForLoop 439 || previousSymbol is ForLoop
440 || previousSymbol is StateEvent) 440 || previousSymbol is StateEvent)
441 GenerateIndentedLine(m_coopTerminationCheck, sb); 441 GenerateIndentedLine(m_coopTerminationCheck, sb);
@@ -474,8 +474,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
474 { 474 {
475 // A non-braced single line do while structure cannot contain multiple statements. 475 // A non-braced single line do while structure cannot contain multiple statements.
476 // So to insert the termination check we change this to a braced control structure instead. 476 // So to insert the termination check we change this to a braced control structure instead.
477 if (previousSymbol is WhileStatement 477 if (previousSymbol is WhileStatement
478 || previousSymbol is DoWhileStatement 478 || previousSymbol is DoWhileStatement
479 || previousSymbol is ForLoop) 479 || previousSymbol is ForLoop)
480 { 480 {
481 transformToBlock = true; 481 transformToBlock = true;
@@ -530,7 +530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
530 // This code checks for LSL of the following forms, and generates a 530 // This code checks for LSL of the following forms, and generates a
531 // warning if it finds them. 531 // warning if it finds them.
532 // 532 //
533 // list l = [ "foo" ]; 533 // list l = [ "foo" ];
534 // l = (l=[]) + l + ["bar"]; 534 // l = (l=[]) + l + ["bar"];
535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS) 535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS)
536 // 536 //
@@ -758,7 +758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
758 for (int i = 0; i < fls.kids.Count; i++) 758 for (int i = 0; i < fls.kids.Count; i++)
759 { 759 {
760 SYMBOL s = (SYMBOL)fls.kids[i]; 760 SYMBOL s = (SYMBOL)fls.kids[i];
761 761
762 // Statements surrounded by parentheses in for loops 762 // Statements surrounded by parentheses in for loops
763 // 763 //
764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i)) 764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i))
@@ -774,7 +774,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
774 // like it would be considerably more complicated to handle). 774 // like it would be considerably more complicated to handle).
775 while (s is ParenthesisExpression) 775 while (s is ParenthesisExpression)
776 s = (SYMBOL)s.kids.Pop(); 776 s = (SYMBOL)s.kids.Pop();
777 777
778 GenerateNodeToSB(fls, s, sb); 778 GenerateNodeToSB(fls, s, sb);
779 if (0 < comma--) 779 if (0 < comma--)
780 Generate(", ", sb); 780 Generate(", ", sb);
@@ -891,9 +891,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
891 else if (value is OpenMetaverse.Quaternion) 891 else if (value is OpenMetaverse.Quaternion)
892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString()); 892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString());
893 else retval = id; 893 else retval = id;
894 894
895 Generate(retval, s, sb); 895 Generate(retval, s, sb);
896 return; 896 return;
897 } 897 }
898 } 898 }
899 899
@@ -911,7 +911,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
911 string modinvoke = null; 911 string modinvoke = null;
912 if (m_comms != null) 912 if (m_comms != null)
913 modinvoke = m_comms.LookupModInvocation(fc.Id); 913 modinvoke = m_comms.LookupModInvocation(fc.Id);
914 914
915 if (modinvoke != null) 915 if (modinvoke != null)
916 { 916 {
917 if (fc.kids[0] is ArgumentList) 917 if (fc.kids[0] is ArgumentList)
@@ -926,7 +926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
926 { 926 {
927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb); 927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb);
928 } 928 }
929 929
930 foreach (SYMBOL kid in fc.kids) 930 foreach (SYMBOL kid in fc.kids)
931 GenerateNodeToSB(fc, kid, sb); 931 GenerateNodeToSB(fc, kid, sb);
932 932
@@ -1124,7 +1124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
1124 { 1124 {
1125 Indent(sb); 1125 Indent(sb);
1126 sb.Append(s); 1126 sb.Append(s);
1127 1127
1128 if (null != sym) 1128 if (null != sym)
1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position)); 1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position));
1130 1130
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
index 7a2a4a0..19a248f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
84 if (word.StartsWith("ll")) return false; 84 if (word.StartsWith("ll")) return false;
85 char first = word.ToCharArray(0,1)[0]; 85 char first = word.ToCharArray(0,1)[0];
86 if (first >= 'A' && first <= 'Z') return false; 86 if (first >= 'A' && first <= 'Z') return false;
87 87
88 return (reservedWords.BinarySearch(word) >= 0); 88 return (reservedWords.BinarySearch(word) >= 0);
89 } 89 }
90 } 90 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index f632cb0..f3b8e1d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
119 { 119 {
120 in_startup = false; 120 in_startup = false;
121 CheckOrCreateScriptsDirectory(); 121 CheckOrCreateScriptsDirectory();
122 122
123 // First time we start? Delete old files 123 // First time we start? Delete old files
124 if (DeleteScriptsOnStartup) 124 if (DeleteScriptsOnStartup)
125 DeleteOldFiles(); 125 DeleteOldFiles();
@@ -310,9 +310,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
310 { 310 {
311// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); 311// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name);
312 312
313 // If we have already read this linemap file, then it will be in our dictionary. 313 // If we have already read this linemap file, then it will be in our dictionary.
314 // Don't build another copy of the dictionary (saves memory) and certainly 314 // Don't build another copy of the dictionary (saves memory) and certainly
315 // don't keep reading the same file from disk multiple times. 315 // don't keep reading the same file from disk multiple times.
316 if (!m_lineMaps.ContainsKey(assembly)) 316 if (!m_lineMaps.ContainsKey(assembly))
317 m_lineMaps[assembly] = ReadMapFile(assembly + ".map"); 317 m_lineMaps[assembly] = ReadMapFile(assembly + ".map");
318 linemap = m_lineMaps[assembly]; 318 linemap = m_lineMaps[assembly];
@@ -366,8 +366,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
366 366
367 LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls); 367 LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls);
368 AddCSScriptHeader( 368 AddCSScriptHeader(
369 m_scriptEngine.ScriptClassName, 369 m_scriptEngine.ScriptClassName,
370 m_scriptEngine.ScriptBaseClassName, 370 m_scriptEngine.ScriptBaseClassName,
371 m_scriptEngine.ScriptBaseClassParameters, 371 m_scriptEngine.ScriptBaseClassParameters,
372 sb); 372 sb);
373 373
@@ -381,20 +381,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
381 } 381 }
382 382
383 linemap = ((CSCodeGenerator)LSL_Converter).PositionMap; 383 linemap = ((CSCodeGenerator)LSL_Converter).PositionMap;
384 // Write the linemap to a file and save it in our dictionary for next time. 384 // Write the linemap to a file and save it in our dictionary for next time.
385 m_lineMaps[assembly] = linemap; 385 m_lineMaps[assembly] = linemap;
386 WriteMapFile(assembly + ".map", linemap); 386 WriteMapFile(assembly + ".map", linemap);
387 LSL_Converter.Clear(); 387 LSL_Converter.Clear();
388 } 388 }
389 else 389 else
390 { 390 {
391 switch (language) 391 switch (language)
392 { 392 {
393 case enumCompileType.cs: 393 case enumCompileType.cs:
394 compileScript = CreateCSCompilerScript( 394 compileScript = CreateCSCompilerScript(
395 compileScript, 395 compileScript,
396 m_scriptEngine.ScriptClassName, 396 m_scriptEngine.ScriptClassName,
397 m_scriptEngine.ScriptBaseClassName, 397 m_scriptEngine.ScriptBaseClassName,
398 m_scriptEngine.ScriptBaseClassParameters); 398 m_scriptEngine.ScriptBaseClassParameters);
399 break; 399 break;
400 case enumCompileType.vb: 400 case enumCompileType.vb:
@@ -434,22 +434,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
434 public static void AddCSScriptHeader(string className, string baseClassName, ParameterInfo[] constructorParameters, StringBuilder sb) 434 public static void AddCSScriptHeader(string className, string baseClassName, ParameterInfo[] constructorParameters, StringBuilder sb)
435 { 435 {
436 sb.Append(string.Format( 436 sb.Append(string.Format(
437@"using OpenSim.Region.ScriptEngine.Shared; 437@"using OpenSim.Region.ScriptEngine.Shared;
438using System.Collections.Generic; 438using System.Collections.Generic;
439 439
440namespace SecondLife 440namespace SecondLife
441{{ 441{{
442 public class {0} : {1} 442 public class {0} : {1}
443 {{ 443 {{
444 public {0}({2}) : base({3}) {{}} 444 public {0}({2}) : base({3}) {{}}
445", 445",
446 className, 446 className,
447 baseClassName, 447 baseClassName,
448 constructorParameters != null 448 constructorParameters != null
449 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString())) 449 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString()))
450 : "", 450 : "",
451 constructorParameters != null 451 constructorParameters != null
452 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name)) 452 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name))
453 : "" 453 : ""
454 )); 454 ));
455 } 455 }
@@ -462,26 +462,26 @@ namespace SecondLife
462 public static string CreateCSCompilerScript( 462 public static string CreateCSCompilerScript(
463 string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters) 463 string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters)
464 { 464 {
465 compileScript = string.Format( 465 compileScript = string.Format(
466@"using OpenSim.Region.ScriptEngine.Shared; 466@"using OpenSim.Region.ScriptEngine.Shared;
467using System.Collections.Generic; 467using System.Collections.Generic;
468 468
469namespace SecondLife 469namespace SecondLife
470{{ 470{{
471 public class {0} : {1} 471 public class {0} : {1}
472 {{ 472 {{
473 public {0}({2}) : base({3}) {{}} 473 public {0}({2}) : base({3}) {{}}
474{4} 474{4}
475 }} 475 }}
476}}", 476}}",
477 className, 477 className,
478 baseClassName, 478 baseClassName,
479 constructorParameters != null 479 constructorParameters != null
480 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString())) 480 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.ToString()))
481 : "", 481 : "",
482 constructorParameters != null 482 constructorParameters != null
483 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name)) 483 ? string.Join(", ", Array.ConvertAll<ParameterInfo, string>(constructorParameters, pi => pi.Name))
484 : "", 484 : "",
485 compileScript); 485 compileScript);
486 486
487 return compileScript; 487 return compileScript;
@@ -508,7 +508,7 @@ namespace SecondLife
508 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly) 508 internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly)
509 { 509 {
510// m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script); 510// m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script);
511 511
512 string ext = "." + lang.ToString(); 512 string ext = "." + lang.ToString();
513 513
514 // Output assembly name 514 // Output assembly name
@@ -562,7 +562,7 @@ namespace SecondLife
562 562
563 if (m_scriptEngine.ScriptReferencedAssemblies != null) 563 if (m_scriptEngine.ScriptReferencedAssemblies != null)
564 Array.ForEach<string>( 564 Array.ForEach<string>(
565 m_scriptEngine.ScriptReferencedAssemblies, 565 m_scriptEngine.ScriptReferencedAssemblies,
566 a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a))); 566 a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a)));
567 567
568 parameters.GenerateExecutable = false; 568 parameters.GenerateExecutable = false;
@@ -571,7 +571,7 @@ namespace SecondLife
571 //parameters.WarningLevel = 1; // Should be 4? 571 //parameters.WarningLevel = 1; // Should be 4?
572 parameters.TreatWarningsAsErrors = false; 572 parameters.TreatWarningsAsErrors = false;
573 parameters.GenerateInMemory = false; 573 parameters.GenerateInMemory = false;
574 574
575 CompilerResults results; 575 CompilerResults results;
576 576
577 CodeDomProvider provider; 577 CodeDomProvider provider;
@@ -605,7 +605,7 @@ namespace SecondLife
605// results = CScodeProvider.CompileAssemblyFromSource( 605// results = CScodeProvider.CompileAssemblyFromSource(
606// parameters, Script); 606// parameters, Script);
607// } 607// }
608 608
609 results = provider.CompileAssemblyFromSource( 609 results = provider.CompileAssemblyFromSource(
610 parameters, Script); 610 parameters, Script);
611 // Deal with an occasional segv in the compiler. 611 // Deal with an occasional segv in the compiler.
@@ -685,14 +685,14 @@ namespace SecondLife
685 } 685 }
686 686
687 provider.Dispose(); 687 provider.Dispose();
688 688
689 if (hadErrors) 689 if (hadErrors)
690 { 690 {
691 throw new Exception(errtext); 691 throw new Exception(errtext);
692 } 692 }
693 693
694 // On today's highly asynchronous systems, the result of 694 // On today's highly asynchronous systems, the result of
695 // the compile may not be immediately apparent. Wait a 695 // the compile may not be immediately apparent. Wait a
696 // reasonable amount of time before giving up on it. 696 // reasonable amount of time before giving up on it.
697 697
698 if (!File.Exists(assembly)) 698 if (!File.Exists(assembly))
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
index 7966f59..304cd81 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ScriptEngine.Shared.CodeTools")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.CodeTools")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
index ad4ccf0..12ba4de 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
81 m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); 81 m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve);
82 82
83 System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; 83 System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler;
84 84
85 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); 85 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll"));
86 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); 86 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"));
87 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); 87 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll"));
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
112 CSCodeGenerator cg = new CSCodeGenerator(); 112 CSCodeGenerator cg = new CSCodeGenerator();
113 string output = cg.Convert(input); 113 string output = cg.Convert(input);
114 114
115 output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); 115 output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null);
116 // System.Console.WriteLine(output); 116 // System.Console.WriteLine(output);
117 117
118 positionMap = cg.PositionMap; 118 positionMap = cg.PositionMap;
@@ -154,7 +154,7 @@ erros position is better tested on viewers
154 @l; 154 @l;
155 i = 1; 155 i = 1;
156 } 156 }
157}", out positionMap); 157}", out positionMap);
158 158
159 Assert.AreEqual( 159 Assert.AreEqual(
160 new KeyValuePair<int, int>(7, 9), 160 new KeyValuePair<int, int>(7, 9),
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
index 67ce10a..220ec72 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
150// TestHelpers.EnableLogging(); 150// TestHelpers.EnableLogging();
151 151
152 TestIntArgEvent("changed"); 152 TestIntArgEvent("changed");
153 } 153 }
154 154
155 [Test] 155 [Test]
156 public void TestCollisionEvent() 156 public void TestCollisionEvent()
@@ -159,7 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
159// TestHelpers.EnableLogging(); 159// TestHelpers.EnableLogging();
160 160
161 TestIntArgEvent("collision"); 161 TestIntArgEvent("collision");
162 } 162 }
163 163
164 [Test] 164 [Test]
165 public void TestCollisionStartEvent() 165 public void TestCollisionStartEvent()
@@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
168// TestHelpers.EnableLogging(); 168// TestHelpers.EnableLogging();
169 169
170 TestIntArgEvent("collision_start"); 170 TestIntArgEvent("collision_start");
171 } 171 }
172 172
173 [Test] 173 [Test]
174 public void TestCollisionEndEvent() 174 public void TestCollisionEndEvent()
@@ -177,7 +177,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
177// TestHelpers.EnableLogging(); 177// TestHelpers.EnableLogging();
178 178
179 TestIntArgEvent("collision_end"); 179 TestIntArgEvent("collision_end");
180 } 180 }
181 181
182 [Test] 182 [Test]
183 public void TestOnRezEvent() 183 public void TestOnRezEvent()
@@ -186,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
186// TestHelpers.EnableLogging(); 186// TestHelpers.EnableLogging();
187 187
188 TestIntArgEvent("on_rez"); 188 TestIntArgEvent("on_rez");
189 } 189 }
190 190
191 [Test] 191 [Test]
192 public void TestRunTimePermissionsEvent() 192 public void TestRunTimePermissionsEvent()
@@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
195// TestHelpers.EnableLogging(); 195// TestHelpers.EnableLogging();
196 196
197 TestIntArgEvent("run_time_permissions"); 197 TestIntArgEvent("run_time_permissions");
198 } 198 }
199 199
200 [Test] 200 [Test]
201 public void TestSensorEvent() 201 public void TestSensorEvent()
@@ -204,7 +204,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
204// TestHelpers.EnableLogging(); 204// TestHelpers.EnableLogging();
205 205
206 TestIntArgEvent("sensor"); 206 TestIntArgEvent("sensor");
207 } 207 }
208 208
209 [Test] 209 [Test]
210 public void TestTouchEvent() 210 public void TestTouchEvent()
@@ -213,7 +213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
213// TestHelpers.EnableLogging(); 213// TestHelpers.EnableLogging();
214 214
215 TestIntArgEvent("touch"); 215 TestIntArgEvent("touch");
216 } 216 }
217 217
218 [Test] 218 [Test]
219 public void TestTouchStartEvent() 219 public void TestTouchStartEvent()
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
222// TestHelpers.EnableLogging(); 222// TestHelpers.EnableLogging();
223 223
224 TestIntArgEvent("touch_start"); 224 TestIntArgEvent("touch_start");
225 } 225 }
226 226
227 [Test] 227 [Test]
228 public void TestTouchEndEvent() 228 public void TestTouchEndEvent()
@@ -231,7 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
231// TestHelpers.EnableLogging(); 231// TestHelpers.EnableLogging();
232 232
233 TestIntArgEvent("touch_end"); 233 TestIntArgEvent("touch_end");
234 } 234 }
235 235
236 [Test] 236 [Test]
237 public void TestLandCollisionEvent() 237 public void TestLandCollisionEvent()
@@ -351,8 +351,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
351 } 351 }
352 352
353 Assert.That( 353 Assert.That(
354 gotException, 354 gotException,
355 Is.EqualTo(expectException), 355 Is.EqualTo(expectException),
356 "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a"); 356 "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a");
357 } 357 }
358 } 358 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
index f87f446..66210b7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs
@@ -379,7 +379,7 @@ public override int yynum { get { return 96; }}
379 public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}} 379 public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}}
380//%|LSLTokens 380//%|LSLTokens
381public class yyLSLTokens : YyLexer { 381public class yyLSLTokens : YyLexer {
382 public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] { 382 public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] {
383101,4,6,52,0, 383101,4,6,52,0,
38446,0,53,0,6, 38446,0,53,0,6,
385102,4,16,117,0, 385102,4,16,117,0,
@@ -19717,13 +19717,13 @@ public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool
19717 break; 19717 break;
19718 case 1063: ; 19718 case 1063: ;
19719 break; 19719 break;
19720 case 1076: ; 19720 case 1076: ;
19721 break; 19721 break;
19722 case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } 19722 case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); }
19723 break; 19723 break;
19724 case 1067: ; 19724 case 1067: ;
19725 break; 19725 break;
19726 case 1072: ; 19726 case 1072: ;
19727 break; 19727 break;
19728 case 1003: { ((LSLTokens)yym).str += "\\\""; } 19728 case 1003: { ((LSLTokens)yym).str += "\\\""; }
19729 break; 19729 break;
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
index 5fef83c..e4b5891 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs
@@ -886,1493 +886,1493 @@ public IncrementDecrementExpression(Parser yyp):base(yyp){}}
886 886
887public class LSLProgramRoot_1 : LSLProgramRoot { 887public class LSLProgramRoot_1 : LSLProgramRoot {
888 public LSLProgramRoot_1(Parser yyq):base(yyq, 888 public LSLProgramRoot_1(Parser yyq):base(yyq,
889 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 889 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
890 , 890 ,
891 ((States)(yyq.StackAt(0).m_value)) 891 ((States)(yyq.StackAt(0).m_value))
892 ){}} 892 ){}}
893 893
894public class LSLProgramRoot_2 : LSLProgramRoot { 894public class LSLProgramRoot_2 : LSLProgramRoot {
895 public LSLProgramRoot_2(Parser yyq):base(yyq, 895 public LSLProgramRoot_2(Parser yyq):base(yyq,
896 ((States)(yyq.StackAt(0).m_value)) 896 ((States)(yyq.StackAt(0).m_value))
897 ){}} 897 ){}}
898 898
899public class GlobalDefinitions_1 : GlobalDefinitions { 899public class GlobalDefinitions_1 : GlobalDefinitions {
900 public GlobalDefinitions_1(Parser yyq):base(yyq, 900 public GlobalDefinitions_1(Parser yyq):base(yyq,
901 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) 901 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value))
902 ){}} 902 ){}}
903 903
904public class GlobalDefinitions_2 : GlobalDefinitions { 904public class GlobalDefinitions_2 : GlobalDefinitions {
905 public GlobalDefinitions_2(Parser yyq):base(yyq, 905 public GlobalDefinitions_2(Parser yyq):base(yyq,
906 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 906 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
907 , 907 ,
908 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) 908 ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value))
909 ){}} 909 ){}}
910 910
911public class GlobalDefinitions_3 : GlobalDefinitions { 911public class GlobalDefinitions_3 : GlobalDefinitions {
912 public GlobalDefinitions_3(Parser yyq):base(yyq, 912 public GlobalDefinitions_3(Parser yyq):base(yyq,
913 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) 913 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value))
914 ){}} 914 ){}}
915 915
916public class GlobalDefinitions_4 : GlobalDefinitions { 916public class GlobalDefinitions_4 : GlobalDefinitions {
917 public GlobalDefinitions_4(Parser yyq):base(yyq, 917 public GlobalDefinitions_4(Parser yyq):base(yyq,
918 ((GlobalDefinitions)(yyq.StackAt(1).m_value)) 918 ((GlobalDefinitions)(yyq.StackAt(1).m_value))
919 , 919 ,
920 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) 920 ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value))
921 ){}} 921 ){}}
922 922
923public class GlobalVariableDeclaration_1 : GlobalVariableDeclaration { 923public class GlobalVariableDeclaration_1 : GlobalVariableDeclaration {
924 public GlobalVariableDeclaration_1(Parser yyq):base(yyq, 924 public GlobalVariableDeclaration_1(Parser yyq):base(yyq,
925 ((Declaration)(yyq.StackAt(1).m_value)) 925 ((Declaration)(yyq.StackAt(1).m_value))
926 ){}} 926 ){}}
927 927
928public class GlobalVariableDeclaration_2 : GlobalVariableDeclaration { 928public class GlobalVariableDeclaration_2 : GlobalVariableDeclaration {
929 public GlobalVariableDeclaration_2(Parser yyq):base(yyq,new Assignment(((LSLSyntax 929 public GlobalVariableDeclaration_2(Parser yyq):base(yyq,new Assignment(((LSLSyntax
930)yyq), 930)yyq),
931 ((Declaration)(yyq.StackAt(3).m_value)) 931 ((Declaration)(yyq.StackAt(3).m_value))
932 , 932 ,
933 ((Expression)(yyq.StackAt(1).m_value)) 933 ((Expression)(yyq.StackAt(1).m_value))
934 , 934 ,
935 ((EQUALS)(yyq.StackAt(2).m_value)) 935 ((EQUALS)(yyq.StackAt(2).m_value))
936 .yytext)){}} 936 .yytext)){}}
937 937
938public class GlobalFunctionDefinition_1 : GlobalFunctionDefinition { 938public class GlobalFunctionDefinition_1 : GlobalFunctionDefinition {
939 public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void", 939 public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void",
940 ((IDENT)(yyq.StackAt(4).m_value)) 940 ((IDENT)(yyq.StackAt(4).m_value))
941 .yytext, 941 .yytext,
942 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 942 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
943 , 943 ,
944 ((CompoundStatement)(yyq.StackAt(0).m_value)) 944 ((CompoundStatement)(yyq.StackAt(0).m_value))
945 ){}} 945 ){}}
946 946
947public class GlobalFunctionDefinition_2 : GlobalFunctionDefinition { 947public class GlobalFunctionDefinition_2 : GlobalFunctionDefinition {
948 public GlobalFunctionDefinition_2(Parser yyq):base(yyq, 948 public GlobalFunctionDefinition_2(Parser yyq):base(yyq,
949 ((Typename)(yyq.StackAt(5).m_value)) 949 ((Typename)(yyq.StackAt(5).m_value))
950 .yytext, 950 .yytext,
951 ((IDENT)(yyq.StackAt(4).m_value)) 951 ((IDENT)(yyq.StackAt(4).m_value))
952 .yytext, 952 .yytext,
953 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 953 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
954 , 954 ,
955 ((CompoundStatement)(yyq.StackAt(0).m_value)) 955 ((CompoundStatement)(yyq.StackAt(0).m_value))
956 ){}} 956 ){}}
957 957
958public class States_1 : States { 958public class States_1 : States {
959 public States_1(Parser yyq):base(yyq, 959 public States_1(Parser yyq):base(yyq,
960 ((State)(yyq.StackAt(0).m_value)) 960 ((State)(yyq.StackAt(0).m_value))
961 ){}} 961 ){}}
962 962
963public class States_2 : States { 963public class States_2 : States {
964 public States_2(Parser yyq):base(yyq, 964 public States_2(Parser yyq):base(yyq,
965 ((States)(yyq.StackAt(1).m_value)) 965 ((States)(yyq.StackAt(1).m_value))
966 , 966 ,
967 ((State)(yyq.StackAt(0).m_value)) 967 ((State)(yyq.StackAt(0).m_value))
968 ){}} 968 ){}}
969 969
970public class State_1 : State { 970public class State_1 : State {
971 public State_1(Parser yyq):base(yyq, 971 public State_1(Parser yyq):base(yyq,
972 ((DEFAULT_STATE)(yyq.StackAt(3).m_value)) 972 ((DEFAULT_STATE)(yyq.StackAt(3).m_value))
973 .yytext, 973 .yytext,
974 ((StateBody)(yyq.StackAt(1).m_value)) 974 ((StateBody)(yyq.StackAt(1).m_value))
975 ){}} 975 ){}}
976 976
977public class State_2 : State { 977public class State_2 : State {
978 public State_2(Parser yyq):base(yyq, 978 public State_2(Parser yyq):base(yyq,
979 ((IDENT)(yyq.StackAt(3).m_value)) 979 ((IDENT)(yyq.StackAt(3).m_value))
980 .yytext, 980 .yytext,
981 ((StateBody)(yyq.StackAt(1).m_value)) 981 ((StateBody)(yyq.StackAt(1).m_value))
982 ){}} 982 ){}}
983 983
984public class StateBody_1 : StateBody { 984public class StateBody_1 : StateBody {
985 public StateBody_1(Parser yyq):base(yyq, 985 public StateBody_1(Parser yyq):base(yyq,
986 ((StateEvent)(yyq.StackAt(0).m_value)) 986 ((StateEvent)(yyq.StackAt(0).m_value))
987 ){}} 987 ){}}
988 988
989public class StateBody_2 : StateBody { 989public class StateBody_2 : StateBody {
990 public StateBody_2(Parser yyq):base(yyq, 990 public StateBody_2(Parser yyq):base(yyq,
991 ((StateBody)(yyq.StackAt(1).m_value)) 991 ((StateBody)(yyq.StackAt(1).m_value))
992 , 992 ,
993 ((StateEvent)(yyq.StackAt(0).m_value)) 993 ((StateEvent)(yyq.StackAt(0).m_value))
994 ){}} 994 ){}}
995 995
996public class StateBody_3 : StateBody { 996public class StateBody_3 : StateBody {
997 public StateBody_3(Parser yyq):base(yyq, 997 public StateBody_3(Parser yyq):base(yyq,
998 ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) 998 ((VoidArgStateEvent)(yyq.StackAt(0).m_value))
999 ){}} 999 ){}}
1000 1000
1001public class StateBody_4 : StateBody { 1001public class StateBody_4 : StateBody {
1002 public StateBody_4(Parser yyq):base(yyq, 1002 public StateBody_4(Parser yyq):base(yyq,
1003 ((StateBody)(yyq.StackAt(1).m_value)) 1003 ((StateBody)(yyq.StackAt(1).m_value))
1004 , 1004 ,
1005 ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) 1005 ((VoidArgStateEvent)(yyq.StackAt(0).m_value))
1006 ){}} 1006 ){}}
1007 1007
1008public class StateBody_5 : StateBody { 1008public class StateBody_5 : StateBody {
1009 public StateBody_5(Parser yyq):base(yyq, 1009 public StateBody_5(Parser yyq):base(yyq,
1010 ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) 1010 ((KeyArgStateEvent)(yyq.StackAt(0).m_value))
1011 ){}} 1011 ){}}
1012 1012
1013public class StateBody_6 : StateBody { 1013public class StateBody_6 : StateBody {
1014 public StateBody_6(Parser yyq):base(yyq, 1014 public StateBody_6(Parser yyq):base(yyq,
1015 ((StateBody)(yyq.StackAt(1).m_value)) 1015 ((StateBody)(yyq.StackAt(1).m_value))
1016 , 1016 ,
1017 ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) 1017 ((KeyArgStateEvent)(yyq.StackAt(0).m_value))
1018 ){}} 1018 ){}}
1019 1019
1020public class StateBody_7 : StateBody { 1020public class StateBody_7 : StateBody {
1021 public StateBody_7(Parser yyq):base(yyq, 1021 public StateBody_7(Parser yyq):base(yyq,
1022 ((IntArgStateEvent)(yyq.StackAt(0).m_value)) 1022 ((IntArgStateEvent)(yyq.StackAt(0).m_value))
1023 ){}} 1023 ){}}
1024 1024
1025public class StateBody_8 : StateBody { 1025public class StateBody_8 : StateBody {
1026 public StateBody_8(Parser yyq):base(yyq, 1026 public StateBody_8(Parser yyq):base(yyq,
1027 ((StateBody)(yyq.StackAt(1).m_value)) 1027 ((StateBody)(yyq.StackAt(1).m_value))
1028 , 1028 ,
1029 ((IntArgStateEvent)(yyq.StackAt(0).m_value)) 1029 ((IntArgStateEvent)(yyq.StackAt(0).m_value))
1030 ){}} 1030 ){}}
1031 1031
1032public class StateBody_9 : StateBody { 1032public class StateBody_9 : StateBody {
1033 public StateBody_9(Parser yyq):base(yyq, 1033 public StateBody_9(Parser yyq):base(yyq,
1034 ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) 1034 ((VectorArgStateEvent)(yyq.StackAt(0).m_value))
1035 ){}} 1035 ){}}
1036 1036
1037public class StateBody_10 : StateBody { 1037public class StateBody_10 : StateBody {
1038 public StateBody_10(Parser yyq):base(yyq, 1038 public StateBody_10(Parser yyq):base(yyq,
1039 ((StateBody)(yyq.StackAt(1).m_value)) 1039 ((StateBody)(yyq.StackAt(1).m_value))
1040 , 1040 ,
1041 ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) 1041 ((VectorArgStateEvent)(yyq.StackAt(0).m_value))
1042 ){}} 1042 ){}}
1043 1043
1044public class StateBody_11 : StateBody { 1044public class StateBody_11 : StateBody {
1045 public StateBody_11(Parser yyq):base(yyq, 1045 public StateBody_11(Parser yyq):base(yyq,
1046 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) 1046 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value))
1047 ){}} 1047 ){}}
1048 1048
1049public class StateBody_12 : StateBody { 1049public class StateBody_12 : StateBody {
1050 public StateBody_12(Parser yyq):base(yyq, 1050 public StateBody_12(Parser yyq):base(yyq,
1051 ((StateBody)(yyq.StackAt(1).m_value)) 1051 ((StateBody)(yyq.StackAt(1).m_value))
1052 , 1052 ,
1053 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) 1053 ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value))
1054 ){}} 1054 ){}}
1055 1055
1056public class StateBody_13 : StateBody { 1056public class StateBody_13 : StateBody {
1057 public StateBody_13(Parser yyq):base(yyq, 1057 public StateBody_13(Parser yyq):base(yyq,
1058 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) 1058 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value))
1059 ){}} 1059 ){}}
1060 1060
1061public class StateBody_14 : StateBody { 1061public class StateBody_14 : StateBody {
1062 public StateBody_14(Parser yyq):base(yyq, 1062 public StateBody_14(Parser yyq):base(yyq,
1063 ((StateBody)(yyq.StackAt(1).m_value)) 1063 ((StateBody)(yyq.StackAt(1).m_value))
1064 , 1064 ,
1065 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) 1065 ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value))
1066 ){}} 1066 ){}}
1067 1067
1068public class StateBody_15 : StateBody { 1068public class StateBody_15 : StateBody {
1069 public StateBody_15(Parser yyq):base(yyq, 1069 public StateBody_15(Parser yyq):base(yyq,
1070 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) 1070 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value))
1071 ){}} 1071 ){}}
1072 1072
1073public class StateBody_16 : StateBody { 1073public class StateBody_16 : StateBody {
1074 public StateBody_16(Parser yyq):base(yyq, 1074 public StateBody_16(Parser yyq):base(yyq,
1075 ((StateBody)(yyq.StackAt(1).m_value)) 1075 ((StateBody)(yyq.StackAt(1).m_value))
1076 , 1076 ,
1077 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) 1077 ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value))
1078 ){}} 1078 ){}}
1079 1079
1080public class StateEvent_1 : StateEvent { 1080public class StateEvent_1 : StateEvent {
1081 public StateEvent_1(Parser yyq):base(yyq, 1081 public StateEvent_1(Parser yyq):base(yyq,
1082 ((Event)(yyq.StackAt(4).m_value)) 1082 ((Event)(yyq.StackAt(4).m_value))
1083 .yytext, 1083 .yytext,
1084 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1084 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
1085 , 1085 ,
1086 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1086 ((CompoundStatement)(yyq.StackAt(0).m_value))
1087 ){}} 1087 ){}}
1088 1088
1089public class VoidArgStateEvent_1 : VoidArgStateEvent { 1089public class VoidArgStateEvent_1 : VoidArgStateEvent {
1090 public VoidArgStateEvent_1(Parser yyq):base(yyq, 1090 public VoidArgStateEvent_1(Parser yyq):base(yyq,
1091 ((VoidArgEvent)(yyq.StackAt(3).m_value)) 1091 ((VoidArgEvent)(yyq.StackAt(3).m_value))
1092 .yytext, 1092 .yytext,
1093 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1093 ((CompoundStatement)(yyq.StackAt(0).m_value))
1094 ){}} 1094 ){}}
1095 1095
1096public class KeyArgStateEvent_1 : KeyArgStateEvent { 1096public class KeyArgStateEvent_1 : KeyArgStateEvent {
1097 public KeyArgStateEvent_1(Parser yyq):base(yyq, 1097 public KeyArgStateEvent_1(Parser yyq):base(yyq,
1098 ((KeyArgEvent)(yyq.StackAt(4).m_value)) 1098 ((KeyArgEvent)(yyq.StackAt(4).m_value))
1099 .yytext, 1099 .yytext,
1100 ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1100 ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value))
1101 , 1101 ,
1102 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1102 ((CompoundStatement)(yyq.StackAt(0).m_value))
1103 ){}} 1103 ){}}
1104 1104
1105public class IntArgStateEvent_1 : IntArgStateEvent { 1105public class IntArgStateEvent_1 : IntArgStateEvent {
1106 public IntArgStateEvent_1(Parser yyq):base(yyq, 1106 public IntArgStateEvent_1(Parser yyq):base(yyq,
1107 ((IntArgEvent)(yyq.StackAt(4).m_value)) 1107 ((IntArgEvent)(yyq.StackAt(4).m_value))
1108 .yytext, 1108 .yytext,
1109 ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1109 ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value))
1110 , 1110 ,
1111 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1111 ((CompoundStatement)(yyq.StackAt(0).m_value))
1112 ){}} 1112 ){}}
1113 1113
1114public class VectorArgStateEvent_1 : VectorArgStateEvent { 1114public class VectorArgStateEvent_1 : VectorArgStateEvent {
1115 public VectorArgStateEvent_1(Parser yyq):base(yyq, 1115 public VectorArgStateEvent_1(Parser yyq):base(yyq,
1116 ((VectorArgEvent)(yyq.StackAt(4).m_value)) 1116 ((VectorArgEvent)(yyq.StackAt(4).m_value))
1117 .yytext, 1117 .yytext,
1118 ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1118 ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value))
1119 , 1119 ,
1120 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1120 ((CompoundStatement)(yyq.StackAt(0).m_value))
1121 ){}} 1121 ){}}
1122 1122
1123public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent { 1123public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent {
1124 public IntRotRotArgStateEvent_1(Parser yyq):base(yyq, 1124 public IntRotRotArgStateEvent_1(Parser yyq):base(yyq,
1125 ((IntRotRotArgEvent)(yyq.StackAt(4).m_value)) 1125 ((IntRotRotArgEvent)(yyq.StackAt(4).m_value))
1126 .yytext, 1126 .yytext,
1127 ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1127 ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value))
1128 , 1128 ,
1129 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1129 ((CompoundStatement)(yyq.StackAt(0).m_value))
1130 ){}} 1130 ){}}
1131 1131
1132public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent { 1132public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent {
1133 public IntVecVecArgStateEvent_1(Parser yyq):base(yyq, 1133 public IntVecVecArgStateEvent_1(Parser yyq):base(yyq,
1134 ((IntVecVecArgEvent)(yyq.StackAt(4).m_value)) 1134 ((IntVecVecArgEvent)(yyq.StackAt(4).m_value))
1135 .yytext, 1135 .yytext,
1136 ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1136 ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value))
1137 , 1137 ,
1138 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1138 ((CompoundStatement)(yyq.StackAt(0).m_value))
1139 ){}} 1139 ){}}
1140 1140
1141public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent { 1141public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent {
1142 public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq, 1142 public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq,
1143 ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value)) 1143 ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value))
1144 .yytext, 1144 .yytext,
1145 ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1145 ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value))
1146 , 1146 ,
1147 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1147 ((CompoundStatement)(yyq.StackAt(0).m_value))
1148 ){}} 1148 ){}}
1149 1149
1150public class ArgumentDeclarationList_1 : ArgumentDeclarationList { 1150public class ArgumentDeclarationList_1 : ArgumentDeclarationList {
1151 public ArgumentDeclarationList_1(Parser yyq):base(yyq, 1151 public ArgumentDeclarationList_1(Parser yyq):base(yyq,
1152 ((Declaration)(yyq.StackAt(0).m_value)) 1152 ((Declaration)(yyq.StackAt(0).m_value))
1153 ){}} 1153 ){}}
1154 1154
1155public class ArgumentDeclarationList_2 : ArgumentDeclarationList { 1155public class ArgumentDeclarationList_2 : ArgumentDeclarationList {
1156 public ArgumentDeclarationList_2(Parser yyq):base(yyq, 1156 public ArgumentDeclarationList_2(Parser yyq):base(yyq,
1157 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) 1157 ((ArgumentDeclarationList)(yyq.StackAt(2).m_value))
1158 , 1158 ,
1159 ((Declaration)(yyq.StackAt(0).m_value)) 1159 ((Declaration)(yyq.StackAt(0).m_value))
1160 ){}} 1160 ){}}
1161 1161
1162public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList { 1162public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList {
1163 public KeyArgumentDeclarationList_1(Parser yyq):base(yyq, 1163 public KeyArgumentDeclarationList_1(Parser yyq):base(yyq,
1164 ((KeyDeclaration)(yyq.StackAt(0).m_value)) 1164 ((KeyDeclaration)(yyq.StackAt(0).m_value))
1165 ){}} 1165 ){}}
1166 1166
1167public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList { 1167public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList {
1168 public IntArgumentDeclarationList_1(Parser yyq):base(yyq, 1168 public IntArgumentDeclarationList_1(Parser yyq):base(yyq,
1169 ((IntDeclaration)(yyq.StackAt(0).m_value)) 1169 ((IntDeclaration)(yyq.StackAt(0).m_value))
1170 ){}} 1170 ){}}
1171 1171
1172public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList { 1172public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList {
1173 public VectorArgumentDeclarationList_1(Parser yyq):base(yyq, 1173 public VectorArgumentDeclarationList_1(Parser yyq):base(yyq,
1174 ((VecDeclaration)(yyq.StackAt(0).m_value)) 1174 ((VecDeclaration)(yyq.StackAt(0).m_value))
1175 ){}} 1175 ){}}
1176 1176
1177public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList { 1177public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList {
1178 public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq, 1178 public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq,
1179 ((IntDeclaration)(yyq.StackAt(4).m_value)) 1179 ((IntDeclaration)(yyq.StackAt(4).m_value))
1180 , 1180 ,
1181 ((RotDeclaration)(yyq.StackAt(2).m_value)) 1181 ((RotDeclaration)(yyq.StackAt(2).m_value))
1182 , 1182 ,
1183 ((RotDeclaration)(yyq.StackAt(0).m_value)) 1183 ((RotDeclaration)(yyq.StackAt(0).m_value))
1184 ){}} 1184 ){}}
1185 1185
1186public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList { 1186public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList {
1187 public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq, 1187 public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq,
1188 ((IntDeclaration)(yyq.StackAt(4).m_value)) 1188 ((IntDeclaration)(yyq.StackAt(4).m_value))
1189 , 1189 ,
1190 ((VecDeclaration)(yyq.StackAt(2).m_value)) 1190 ((VecDeclaration)(yyq.StackAt(2).m_value))
1191 , 1191 ,
1192 ((VecDeclaration)(yyq.StackAt(0).m_value)) 1192 ((VecDeclaration)(yyq.StackAt(0).m_value))
1193 ){}} 1193 ){}}
1194 1194
1195public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList { 1195public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList {
1196 public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq, 1196 public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq,
1197 ((KeyDeclaration)(yyq.StackAt(4).m_value)) 1197 ((KeyDeclaration)(yyq.StackAt(4).m_value))
1198 , 1198 ,
1199 ((IntDeclaration)(yyq.StackAt(2).m_value)) 1199 ((IntDeclaration)(yyq.StackAt(2).m_value))
1200 , 1200 ,
1201 ((IntDeclaration)(yyq.StackAt(0).m_value)) 1201 ((IntDeclaration)(yyq.StackAt(0).m_value))
1202 ){}} 1202 ){}}
1203 1203
1204public class Declaration_1 : Declaration { 1204public class Declaration_1 : Declaration {
1205 public Declaration_1(Parser yyq):base(yyq, 1205 public Declaration_1(Parser yyq):base(yyq,
1206 ((Typename)(yyq.StackAt(1).m_value)) 1206 ((Typename)(yyq.StackAt(1).m_value))
1207 .yytext, 1207 .yytext,
1208 ((IDENT)(yyq.StackAt(0).m_value)) 1208 ((IDENT)(yyq.StackAt(0).m_value))
1209 .yytext){}} 1209 .yytext){}}
1210 1210
1211public class KeyDeclaration_1 : KeyDeclaration { 1211public class KeyDeclaration_1 : KeyDeclaration {
1212 public KeyDeclaration_1(Parser yyq):base(yyq, 1212 public KeyDeclaration_1(Parser yyq):base(yyq,
1213 ((KEY_TYPE)(yyq.StackAt(1).m_value)) 1213 ((KEY_TYPE)(yyq.StackAt(1).m_value))
1214 .yytext, 1214 .yytext,
1215 ((IDENT)(yyq.StackAt(0).m_value)) 1215 ((IDENT)(yyq.StackAt(0).m_value))
1216 .yytext){}} 1216 .yytext){}}
1217 1217
1218public class IntDeclaration_1 : IntDeclaration { 1218public class IntDeclaration_1 : IntDeclaration {
1219 public IntDeclaration_1(Parser yyq):base(yyq, 1219 public IntDeclaration_1(Parser yyq):base(yyq,
1220 ((INTEGER_TYPE)(yyq.StackAt(1).m_value)) 1220 ((INTEGER_TYPE)(yyq.StackAt(1).m_value))
1221 .yytext, 1221 .yytext,
1222 ((IDENT)(yyq.StackAt(0).m_value)) 1222 ((IDENT)(yyq.StackAt(0).m_value))
1223 .yytext){}} 1223 .yytext){}}
1224 1224
1225public class VecDeclaration_1 : VecDeclaration { 1225public class VecDeclaration_1 : VecDeclaration {
1226 public VecDeclaration_1(Parser yyq):base(yyq, 1226 public VecDeclaration_1(Parser yyq):base(yyq,
1227 ((VECTOR_TYPE)(yyq.StackAt(1).m_value)) 1227 ((VECTOR_TYPE)(yyq.StackAt(1).m_value))
1228 .yytext, 1228 .yytext,
1229 ((IDENT)(yyq.StackAt(0).m_value)) 1229 ((IDENT)(yyq.StackAt(0).m_value))
1230 .yytext){}} 1230 .yytext){}}
1231 1231
1232public class RotDeclaration_1 : RotDeclaration { 1232public class RotDeclaration_1 : RotDeclaration {
1233 public RotDeclaration_1(Parser yyq):base(yyq, 1233 public RotDeclaration_1(Parser yyq):base(yyq,
1234 ((ROTATION_TYPE)(yyq.StackAt(1).m_value)) 1234 ((ROTATION_TYPE)(yyq.StackAt(1).m_value))
1235 .yytext, 1235 .yytext,
1236 ((IDENT)(yyq.StackAt(0).m_value)) 1236 ((IDENT)(yyq.StackAt(0).m_value))
1237 .yytext){}} 1237 .yytext){}}
1238 1238
1239public class CompoundStatement_1 : CompoundStatement { 1239public class CompoundStatement_1 : CompoundStatement {
1240 public CompoundStatement_1(Parser yyq):base(yyq){}} 1240 public CompoundStatement_1(Parser yyq):base(yyq){}}
1241 1241
1242public class CompoundStatement_2 : CompoundStatement { 1242public class CompoundStatement_2 : CompoundStatement {
1243 public CompoundStatement_2(Parser yyq):base(yyq, 1243 public CompoundStatement_2(Parser yyq):base(yyq,
1244 ((StatementList)(yyq.StackAt(1).m_value)) 1244 ((StatementList)(yyq.StackAt(1).m_value))
1245 ){}} 1245 ){}}
1246 1246
1247public class StatementList_1 : StatementList { 1247public class StatementList_1 : StatementList {
1248 public StatementList_1(Parser yyq):base(yyq, 1248 public StatementList_1(Parser yyq):base(yyq,
1249 ((Statement)(yyq.StackAt(0).m_value)) 1249 ((Statement)(yyq.StackAt(0).m_value))
1250 ){}} 1250 ){}}
1251 1251
1252public class StatementList_2 : StatementList { 1252public class StatementList_2 : StatementList {
1253 public StatementList_2(Parser yyq):base(yyq, 1253 public StatementList_2(Parser yyq):base(yyq,
1254 ((StatementList)(yyq.StackAt(1).m_value)) 1254 ((StatementList)(yyq.StackAt(1).m_value))
1255 , 1255 ,
1256 ((Statement)(yyq.StackAt(0).m_value)) 1256 ((Statement)(yyq.StackAt(0).m_value))
1257 ){}} 1257 ){}}
1258 1258
1259public class EmptyStatement_1 : EmptyStatement { 1259public class EmptyStatement_1 : EmptyStatement {
1260 public EmptyStatement_1(Parser yyq):base(yyq){}} 1260 public EmptyStatement_1(Parser yyq):base(yyq){}}
1261 1261
1262public class Statement_1 : Statement { 1262public class Statement_1 : Statement {
1263 public Statement_1(Parser yyq):base(yyq, 1263 public Statement_1(Parser yyq):base(yyq,
1264 ((EmptyStatement)(yyq.StackAt(1).m_value)) 1264 ((EmptyStatement)(yyq.StackAt(1).m_value))
1265 ){}} 1265 ){}}
1266 1266
1267public class Statement_2 : Statement { 1267public class Statement_2 : Statement {
1268 public Statement_2(Parser yyq):base(yyq, 1268 public Statement_2(Parser yyq):base(yyq,
1269 ((Declaration)(yyq.StackAt(1).m_value)) 1269 ((Declaration)(yyq.StackAt(1).m_value))
1270 ){}} 1270 ){}}
1271 1271
1272public class Statement_3 : Statement { 1272public class Statement_3 : Statement {
1273 public Statement_3(Parser yyq):base(yyq, 1273 public Statement_3(Parser yyq):base(yyq,
1274 ((Assignment)(yyq.StackAt(1).m_value)) 1274 ((Assignment)(yyq.StackAt(1).m_value))
1275 ){}} 1275 ){}}
1276 1276
1277public class Statement_4 : Statement { 1277public class Statement_4 : Statement {
1278 public Statement_4(Parser yyq):base(yyq, 1278 public Statement_4(Parser yyq):base(yyq,
1279 ((Expression)(yyq.StackAt(1).m_value)) 1279 ((Expression)(yyq.StackAt(1).m_value))
1280 ){}} 1280 ){}}
1281 1281
1282public class Statement_5 : Statement { 1282public class Statement_5 : Statement {
1283 public Statement_5(Parser yyq):base(yyq, 1283 public Statement_5(Parser yyq):base(yyq,
1284 ((ReturnStatement)(yyq.StackAt(1).m_value)) 1284 ((ReturnStatement)(yyq.StackAt(1).m_value))
1285 ){}} 1285 ){}}
1286 1286
1287public class Statement_6 : Statement { 1287public class Statement_6 : Statement {
1288 public Statement_6(Parser yyq):base(yyq, 1288 public Statement_6(Parser yyq):base(yyq,
1289 ((JumpLabel)(yyq.StackAt(1).m_value)) 1289 ((JumpLabel)(yyq.StackAt(1).m_value))
1290 ){}} 1290 ){}}
1291 1291
1292public class Statement_7 : Statement { 1292public class Statement_7 : Statement {
1293 public Statement_7(Parser yyq):base(yyq, 1293 public Statement_7(Parser yyq):base(yyq,
1294 ((JumpStatement)(yyq.StackAt(1).m_value)) 1294 ((JumpStatement)(yyq.StackAt(1).m_value))
1295 ){}} 1295 ){}}
1296 1296
1297public class Statement_8 : Statement { 1297public class Statement_8 : Statement {
1298 public Statement_8(Parser yyq):base(yyq, 1298 public Statement_8(Parser yyq):base(yyq,
1299 ((StateChange)(yyq.StackAt(1).m_value)) 1299 ((StateChange)(yyq.StackAt(1).m_value))
1300 ){}} 1300 ){}}
1301 1301
1302public class Statement_9 : Statement { 1302public class Statement_9 : Statement {
1303 public Statement_9(Parser yyq):base(yyq, 1303 public Statement_9(Parser yyq):base(yyq,
1304 ((IfStatement)(yyq.StackAt(0).m_value)) 1304 ((IfStatement)(yyq.StackAt(0).m_value))
1305 ){}} 1305 ){}}
1306 1306
1307public class Statement_10 : Statement { 1307public class Statement_10 : Statement {
1308 public Statement_10(Parser yyq):base(yyq, 1308 public Statement_10(Parser yyq):base(yyq,
1309 ((WhileStatement)(yyq.StackAt(0).m_value)) 1309 ((WhileStatement)(yyq.StackAt(0).m_value))
1310 ){}} 1310 ){}}
1311 1311
1312public class Statement_11 : Statement { 1312public class Statement_11 : Statement {
1313 public Statement_11(Parser yyq):base(yyq, 1313 public Statement_11(Parser yyq):base(yyq,
1314 ((DoWhileStatement)(yyq.StackAt(0).m_value)) 1314 ((DoWhileStatement)(yyq.StackAt(0).m_value))
1315 ){}} 1315 ){}}
1316 1316
1317public class Statement_12 : Statement { 1317public class Statement_12 : Statement {
1318 public Statement_12(Parser yyq):base(yyq, 1318 public Statement_12(Parser yyq):base(yyq,
1319 ((ForLoop)(yyq.StackAt(0).m_value)) 1319 ((ForLoop)(yyq.StackAt(0).m_value))
1320 ){}} 1320 ){}}
1321 1321
1322public class Statement_13 : Statement { 1322public class Statement_13 : Statement {
1323 public Statement_13(Parser yyq):base(yyq, 1323 public Statement_13(Parser yyq):base(yyq,
1324 ((CompoundStatement)(yyq.StackAt(0).m_value)) 1324 ((CompoundStatement)(yyq.StackAt(0).m_value))
1325 ){}} 1325 ){}}
1326 1326
1327public class JumpLabel_1 : JumpLabel { 1327public class JumpLabel_1 : JumpLabel {
1328 public JumpLabel_1(Parser yyq):base(yyq, 1328 public JumpLabel_1(Parser yyq):base(yyq,
1329 ((IDENT)(yyq.StackAt(0).m_value)) 1329 ((IDENT)(yyq.StackAt(0).m_value))
1330 .yytext){}} 1330 .yytext){}}
1331 1331
1332public class JumpStatement_1 : JumpStatement { 1332public class JumpStatement_1 : JumpStatement {
1333 public JumpStatement_1(Parser yyq):base(yyq, 1333 public JumpStatement_1(Parser yyq):base(yyq,
1334 ((IDENT)(yyq.StackAt(0).m_value)) 1334 ((IDENT)(yyq.StackAt(0).m_value))
1335 .yytext){}} 1335 .yytext){}}
1336 1336
1337public class StateChange_1 : StateChange { 1337public class StateChange_1 : StateChange {
1338 public StateChange_1(Parser yyq):base(yyq, 1338 public StateChange_1(Parser yyq):base(yyq,
1339 ((IDENT)(yyq.StackAt(0).m_value)) 1339 ((IDENT)(yyq.StackAt(0).m_value))
1340 .yytext){}} 1340 .yytext){}}
1341 1341
1342public class StateChange_2 : StateChange { 1342public class StateChange_2 : StateChange {
1343 public StateChange_2(Parser yyq):base(yyq, 1343 public StateChange_2(Parser yyq):base(yyq,
1344 ((DEFAULT_STATE)(yyq.StackAt(0).m_value)) 1344 ((DEFAULT_STATE)(yyq.StackAt(0).m_value))
1345 .yytext){}} 1345 .yytext){}}
1346 1346
1347public class IfStatement_1 : IfStatement { 1347public class IfStatement_1 : IfStatement {
1348 public IfStatement_1(Parser yyq):base(yyq, 1348 public IfStatement_1(Parser yyq):base(yyq,
1349 ((Expression)(yyq.StackAt(2).m_value)) 1349 ((Expression)(yyq.StackAt(2).m_value))
1350 , 1350 ,
1351 ((Statement)(yyq.StackAt(0).m_value)) 1351 ((Statement)(yyq.StackAt(0).m_value))
1352 ){}} 1352 ){}}
1353 1353
1354public class IfStatement_2 : IfStatement { 1354public class IfStatement_2 : IfStatement {
1355 public IfStatement_2(Parser yyq):base(yyq, 1355 public IfStatement_2(Parser yyq):base(yyq,
1356 ((Expression)(yyq.StackAt(4).m_value)) 1356 ((Expression)(yyq.StackAt(4).m_value))
1357 , 1357 ,
1358 ((Statement)(yyq.StackAt(2).m_value)) 1358 ((Statement)(yyq.StackAt(2).m_value))
1359 , 1359 ,
1360 ((Statement)(yyq.StackAt(0).m_value)) 1360 ((Statement)(yyq.StackAt(0).m_value))
1361 ){}} 1361 ){}}
1362 1362
1363public class IfStatement_3 : IfStatement { 1363public class IfStatement_3 : IfStatement {
1364 public IfStatement_3(Parser yyq):base(yyq, 1364 public IfStatement_3(Parser yyq):base(yyq,
1365 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1365 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1366 , 1366 ,
1367 ((Statement)(yyq.StackAt(0).m_value)) 1367 ((Statement)(yyq.StackAt(0).m_value))
1368 ){}} 1368 ){}}
1369 1369
1370public class IfStatement_4 : IfStatement { 1370public class IfStatement_4 : IfStatement {
1371 public IfStatement_4(Parser yyq):base(yyq, 1371 public IfStatement_4(Parser yyq):base(yyq,
1372 ((SimpleAssignment)(yyq.StackAt(4).m_value)) 1372 ((SimpleAssignment)(yyq.StackAt(4).m_value))
1373 , 1373 ,
1374 ((Statement)(yyq.StackAt(2).m_value)) 1374 ((Statement)(yyq.StackAt(2).m_value))
1375 , 1375 ,
1376 ((Statement)(yyq.StackAt(0).m_value)) 1376 ((Statement)(yyq.StackAt(0).m_value))
1377 ){}} 1377 ){}}
1378 1378
1379public class WhileStatement_1 : WhileStatement { 1379public class WhileStatement_1 : WhileStatement {
1380 public WhileStatement_1(Parser yyq):base(yyq, 1380 public WhileStatement_1(Parser yyq):base(yyq,
1381 ((Expression)(yyq.StackAt(2).m_value)) 1381 ((Expression)(yyq.StackAt(2).m_value))
1382 , 1382 ,
1383 ((Statement)(yyq.StackAt(0).m_value)) 1383 ((Statement)(yyq.StackAt(0).m_value))
1384 ){}} 1384 ){}}
1385 1385
1386public class WhileStatement_2 : WhileStatement { 1386public class WhileStatement_2 : WhileStatement {
1387 public WhileStatement_2(Parser yyq):base(yyq, 1387 public WhileStatement_2(Parser yyq):base(yyq,
1388 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1388 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1389 , 1389 ,
1390 ((Statement)(yyq.StackAt(0).m_value)) 1390 ((Statement)(yyq.StackAt(0).m_value))
1391 ){}} 1391 ){}}
1392 1392
1393public class DoWhileStatement_1 : DoWhileStatement { 1393public class DoWhileStatement_1 : DoWhileStatement {
1394 public DoWhileStatement_1(Parser yyq):base(yyq, 1394 public DoWhileStatement_1(Parser yyq):base(yyq,
1395 ((Expression)(yyq.StackAt(2).m_value)) 1395 ((Expression)(yyq.StackAt(2).m_value))
1396 , 1396 ,
1397 ((Statement)(yyq.StackAt(5).m_value)) 1397 ((Statement)(yyq.StackAt(5).m_value))
1398 ){}} 1398 ){}}
1399 1399
1400public class DoWhileStatement_2 : DoWhileStatement { 1400public class DoWhileStatement_2 : DoWhileStatement {
1401 public DoWhileStatement_2(Parser yyq):base(yyq, 1401 public DoWhileStatement_2(Parser yyq):base(yyq,
1402 ((SimpleAssignment)(yyq.StackAt(2).m_value)) 1402 ((SimpleAssignment)(yyq.StackAt(2).m_value))
1403 , 1403 ,
1404 ((Statement)(yyq.StackAt(5).m_value)) 1404 ((Statement)(yyq.StackAt(5).m_value))
1405 ){}} 1405 ){}}
1406 1406
1407public class ForLoop_1 : ForLoop { 1407public class ForLoop_1 : ForLoop {
1408 public ForLoop_1(Parser yyq):base(yyq, 1408 public ForLoop_1(Parser yyq):base(yyq,
1409 ((ForLoopStatement)(yyq.StackAt(6).m_value)) 1409 ((ForLoopStatement)(yyq.StackAt(6).m_value))
1410 , 1410 ,
1411 ((Expression)(yyq.StackAt(4).m_value)) 1411 ((Expression)(yyq.StackAt(4).m_value))
1412 , 1412 ,
1413 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1413 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1414 , 1414 ,
1415 ((Statement)(yyq.StackAt(0).m_value)) 1415 ((Statement)(yyq.StackAt(0).m_value))
1416 ){}} 1416 ){}}
1417 1417
1418public class ForLoop_2 : ForLoop { 1418public class ForLoop_2 : ForLoop {
1419 public ForLoop_2(Parser yyq):base(yyq,null, 1419 public ForLoop_2(Parser yyq):base(yyq,null,
1420 ((Expression)(yyq.StackAt(4).m_value)) 1420 ((Expression)(yyq.StackAt(4).m_value))
1421 , 1421 ,
1422 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1422 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1423 , 1423 ,
1424 ((Statement)(yyq.StackAt(0).m_value)) 1424 ((Statement)(yyq.StackAt(0).m_value))
1425 ){}} 1425 ){}}
1426 1426
1427public class ForLoopStatement_1 : ForLoopStatement { 1427public class ForLoopStatement_1 : ForLoopStatement {
1428 public ForLoopStatement_1(Parser yyq):base(yyq, 1428 public ForLoopStatement_1(Parser yyq):base(yyq,
1429 ((Expression)(yyq.StackAt(0).m_value)) 1429 ((Expression)(yyq.StackAt(0).m_value))
1430 ){}} 1430 ){}}
1431 1431
1432public class ForLoopStatement_2 : ForLoopStatement { 1432public class ForLoopStatement_2 : ForLoopStatement {
1433 public ForLoopStatement_2(Parser yyq):base(yyq, 1433 public ForLoopStatement_2(Parser yyq):base(yyq,
1434 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1434 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1435 ){}} 1435 ){}}
1436 1436
1437public class ForLoopStatement_3 : ForLoopStatement { 1437public class ForLoopStatement_3 : ForLoopStatement {
1438 public ForLoopStatement_3(Parser yyq):base(yyq, 1438 public ForLoopStatement_3(Parser yyq):base(yyq,
1439 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1439 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1440 , 1440 ,
1441 ((Expression)(yyq.StackAt(0).m_value)) 1441 ((Expression)(yyq.StackAt(0).m_value))
1442 ){}} 1442 ){}}
1443 1443
1444public class ForLoopStatement_4 : ForLoopStatement { 1444public class ForLoopStatement_4 : ForLoopStatement {
1445 public ForLoopStatement_4(Parser yyq):base(yyq, 1445 public ForLoopStatement_4(Parser yyq):base(yyq,
1446 ((ForLoopStatement)(yyq.StackAt(2).m_value)) 1446 ((ForLoopStatement)(yyq.StackAt(2).m_value))
1447 , 1447 ,
1448 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1448 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1449 ){}} 1449 ){}}
1450 1450
1451public class Assignment_1 : Assignment { 1451public class Assignment_1 : Assignment {
1452 public Assignment_1(Parser yyq):base(yyq, 1452 public Assignment_1(Parser yyq):base(yyq,
1453 ((Declaration)(yyq.StackAt(2).m_value)) 1453 ((Declaration)(yyq.StackAt(2).m_value))
1454 , 1454 ,
1455 ((Expression)(yyq.StackAt(0).m_value)) 1455 ((Expression)(yyq.StackAt(0).m_value))
1456 , 1456 ,
1457 ((EQUALS)(yyq.StackAt(1).m_value)) 1457 ((EQUALS)(yyq.StackAt(1).m_value))
1458 .yytext){}} 1458 .yytext){}}
1459 1459
1460public class Assignment_2 : Assignment { 1460public class Assignment_2 : Assignment {
1461 public Assignment_2(Parser yyq):base(yyq, 1461 public Assignment_2(Parser yyq):base(yyq,
1462 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1462 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1463 ){}} 1463 ){}}
1464 1464
1465public class SimpleAssignment_1 : SimpleAssignment { 1465public class SimpleAssignment_1 : SimpleAssignment {
1466 public SimpleAssignment_1(Parser yyq):base(yyq, 1466 public SimpleAssignment_1(Parser yyq):base(yyq,
1467 ((IDENT)(yyq.StackAt(2).m_value)) 1467 ((IDENT)(yyq.StackAt(2).m_value))
1468 , 1468 ,
1469 ((Expression)(yyq.StackAt(0).m_value)) 1469 ((Expression)(yyq.StackAt(0).m_value))
1470 , 1470 ,
1471 ((EQUALS)(yyq.StackAt(1).m_value)) 1471 ((EQUALS)(yyq.StackAt(1).m_value))
1472 .yytext){}} 1472 .yytext){}}
1473 1473
1474public class SimpleAssignment_2 : SimpleAssignment { 1474public class SimpleAssignment_2 : SimpleAssignment {
1475 public SimpleAssignment_2(Parser yyq):base(yyq, 1475 public SimpleAssignment_2(Parser yyq):base(yyq,
1476 ((IDENT)(yyq.StackAt(2).m_value)) 1476 ((IDENT)(yyq.StackAt(2).m_value))
1477 , 1477 ,
1478 ((Expression)(yyq.StackAt(0).m_value)) 1478 ((Expression)(yyq.StackAt(0).m_value))
1479 , 1479 ,
1480 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1480 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1481 .yytext){}} 1481 .yytext){}}
1482 1482
1483public class SimpleAssignment_3 : SimpleAssignment { 1483public class SimpleAssignment_3 : SimpleAssignment {
1484 public SimpleAssignment_3(Parser yyq):base(yyq, 1484 public SimpleAssignment_3(Parser yyq):base(yyq,
1485 ((IDENT)(yyq.StackAt(2).m_value)) 1485 ((IDENT)(yyq.StackAt(2).m_value))
1486 , 1486 ,
1487 ((Expression)(yyq.StackAt(0).m_value)) 1487 ((Expression)(yyq.StackAt(0).m_value))
1488 , 1488 ,
1489 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1489 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1490 .yytext){}} 1490 .yytext){}}
1491 1491
1492public class SimpleAssignment_4 : SimpleAssignment { 1492public class SimpleAssignment_4 : SimpleAssignment {
1493 public SimpleAssignment_4(Parser yyq):base(yyq, 1493 public SimpleAssignment_4(Parser yyq):base(yyq,
1494 ((IDENT)(yyq.StackAt(2).m_value)) 1494 ((IDENT)(yyq.StackAt(2).m_value))
1495 , 1495 ,
1496 ((Expression)(yyq.StackAt(0).m_value)) 1496 ((Expression)(yyq.StackAt(0).m_value))
1497 , 1497 ,
1498 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1498 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1499 .yytext){}} 1499 .yytext){}}
1500 1500
1501public class SimpleAssignment_5 : SimpleAssignment { 1501public class SimpleAssignment_5 : SimpleAssignment {
1502 public SimpleAssignment_5(Parser yyq):base(yyq, 1502 public SimpleAssignment_5(Parser yyq):base(yyq,
1503 ((IDENT)(yyq.StackAt(2).m_value)) 1503 ((IDENT)(yyq.StackAt(2).m_value))
1504 , 1504 ,
1505 ((Expression)(yyq.StackAt(0).m_value)) 1505 ((Expression)(yyq.StackAt(0).m_value))
1506 , 1506 ,
1507 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1507 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1508 .yytext){}} 1508 .yytext){}}
1509 1509
1510public class SimpleAssignment_6 : SimpleAssignment { 1510public class SimpleAssignment_6 : SimpleAssignment {
1511 public SimpleAssignment_6(Parser yyq):base(yyq, 1511 public SimpleAssignment_6(Parser yyq):base(yyq,
1512 ((IDENT)(yyq.StackAt(2).m_value)) 1512 ((IDENT)(yyq.StackAt(2).m_value))
1513 , 1513 ,
1514 ((Expression)(yyq.StackAt(0).m_value)) 1514 ((Expression)(yyq.StackAt(0).m_value))
1515 , 1515 ,
1516 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1516 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1517 .yytext){}} 1517 .yytext){}}
1518 1518
1519public class SimpleAssignment_7 : SimpleAssignment { 1519public class SimpleAssignment_7 : SimpleAssignment {
1520 public SimpleAssignment_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1520 public SimpleAssignment_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1521)yyq), 1521)yyq),
1522 ((IDENT)(yyq.StackAt(4).m_value)) 1522 ((IDENT)(yyq.StackAt(4).m_value))
1523 .yytext, 1523 .yytext,
1524 ((IDENT)(yyq.StackAt(2).m_value)) 1524 ((IDENT)(yyq.StackAt(2).m_value))
1525 .yytext), 1525 .yytext),
1526 ((Expression)(yyq.StackAt(0).m_value)) 1526 ((Expression)(yyq.StackAt(0).m_value))
1527 , 1527 ,
1528 ((EQUALS)(yyq.StackAt(1).m_value)) 1528 ((EQUALS)(yyq.StackAt(1).m_value))
1529 .yytext){}} 1529 .yytext){}}
1530 1530
1531public class SimpleAssignment_8 : SimpleAssignment { 1531public class SimpleAssignment_8 : SimpleAssignment {
1532 public SimpleAssignment_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1532 public SimpleAssignment_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1533)yyq), 1533)yyq),
1534 ((IDENT)(yyq.StackAt(4).m_value)) 1534 ((IDENT)(yyq.StackAt(4).m_value))
1535 .yytext, 1535 .yytext,
1536 ((IDENT)(yyq.StackAt(2).m_value)) 1536 ((IDENT)(yyq.StackAt(2).m_value))
1537 .yytext), 1537 .yytext),
1538 ((Expression)(yyq.StackAt(0).m_value)) 1538 ((Expression)(yyq.StackAt(0).m_value))
1539 , 1539 ,
1540 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1540 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1541 .yytext){}} 1541 .yytext){}}
1542 1542
1543public class SimpleAssignment_9 : SimpleAssignment { 1543public class SimpleAssignment_9 : SimpleAssignment {
1544 public SimpleAssignment_9(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1544 public SimpleAssignment_9(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1545)yyq), 1545)yyq),
1546 ((IDENT)(yyq.StackAt(4).m_value)) 1546 ((IDENT)(yyq.StackAt(4).m_value))
1547 .yytext, 1547 .yytext,
1548 ((IDENT)(yyq.StackAt(2).m_value)) 1548 ((IDENT)(yyq.StackAt(2).m_value))
1549 .yytext), 1549 .yytext),
1550 ((Expression)(yyq.StackAt(0).m_value)) 1550 ((Expression)(yyq.StackAt(0).m_value))
1551 , 1551 ,
1552 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1552 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1553 .yytext){}} 1553 .yytext){}}
1554 1554
1555public class SimpleAssignment_10 : SimpleAssignment { 1555public class SimpleAssignment_10 : SimpleAssignment {
1556 public SimpleAssignment_10(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1556 public SimpleAssignment_10(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1557)yyq), 1557)yyq),
1558 ((IDENT)(yyq.StackAt(4).m_value)) 1558 ((IDENT)(yyq.StackAt(4).m_value))
1559 .yytext, 1559 .yytext,
1560 ((IDENT)(yyq.StackAt(2).m_value)) 1560 ((IDENT)(yyq.StackAt(2).m_value))
1561 .yytext), 1561 .yytext),
1562 ((Expression)(yyq.StackAt(0).m_value)) 1562 ((Expression)(yyq.StackAt(0).m_value))
1563 , 1563 ,
1564 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1564 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1565 .yytext){}} 1565 .yytext){}}
1566 1566
1567public class SimpleAssignment_11 : SimpleAssignment { 1567public class SimpleAssignment_11 : SimpleAssignment {
1568 public SimpleAssignment_11(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1568 public SimpleAssignment_11(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1569)yyq), 1569)yyq),
1570 ((IDENT)(yyq.StackAt(4).m_value)) 1570 ((IDENT)(yyq.StackAt(4).m_value))
1571 .yytext, 1571 .yytext,
1572 ((IDENT)(yyq.StackAt(2).m_value)) 1572 ((IDENT)(yyq.StackAt(2).m_value))
1573 .yytext), 1573 .yytext),
1574 ((Expression)(yyq.StackAt(0).m_value)) 1574 ((Expression)(yyq.StackAt(0).m_value))
1575 , 1575 ,
1576 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1576 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1577 .yytext){}} 1577 .yytext){}}
1578 1578
1579public class SimpleAssignment_12 : SimpleAssignment { 1579public class SimpleAssignment_12 : SimpleAssignment {
1580 public SimpleAssignment_12(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1580 public SimpleAssignment_12(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1581)yyq), 1581)yyq),
1582 ((IDENT)(yyq.StackAt(4).m_value)) 1582 ((IDENT)(yyq.StackAt(4).m_value))
1583 .yytext, 1583 .yytext,
1584 ((IDENT)(yyq.StackAt(2).m_value)) 1584 ((IDENT)(yyq.StackAt(2).m_value))
1585 .yytext), 1585 .yytext),
1586 ((Expression)(yyq.StackAt(0).m_value)) 1586 ((Expression)(yyq.StackAt(0).m_value))
1587 , 1587 ,
1588 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1588 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1589 .yytext){}} 1589 .yytext){}}
1590 1590
1591public class SimpleAssignment_13 : SimpleAssignment { 1591public class SimpleAssignment_13 : SimpleAssignment {
1592 public SimpleAssignment_13(Parser yyq):base(yyq, 1592 public SimpleAssignment_13(Parser yyq):base(yyq,
1593 ((IDENT)(yyq.StackAt(2).m_value)) 1593 ((IDENT)(yyq.StackAt(2).m_value))
1594 , 1594 ,
1595 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1595 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1596 , 1596 ,
1597 ((EQUALS)(yyq.StackAt(1).m_value)) 1597 ((EQUALS)(yyq.StackAt(1).m_value))
1598 .yytext){}} 1598 .yytext){}}
1599 1599
1600public class SimpleAssignment_14 : SimpleAssignment { 1600public class SimpleAssignment_14 : SimpleAssignment {
1601 public SimpleAssignment_14(Parser yyq):base(yyq, 1601 public SimpleAssignment_14(Parser yyq):base(yyq,
1602 ((IDENT)(yyq.StackAt(2).m_value)) 1602 ((IDENT)(yyq.StackAt(2).m_value))
1603 , 1603 ,
1604 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1604 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1605 , 1605 ,
1606 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1606 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1607 .yytext){}} 1607 .yytext){}}
1608 1608
1609public class SimpleAssignment_15 : SimpleAssignment { 1609public class SimpleAssignment_15 : SimpleAssignment {
1610 public SimpleAssignment_15(Parser yyq):base(yyq, 1610 public SimpleAssignment_15(Parser yyq):base(yyq,
1611 ((IDENT)(yyq.StackAt(2).m_value)) 1611 ((IDENT)(yyq.StackAt(2).m_value))
1612 , 1612 ,
1613 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1613 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1614 , 1614 ,
1615 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1615 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1616 .yytext){}} 1616 .yytext){}}
1617 1617
1618public class SimpleAssignment_16 : SimpleAssignment { 1618public class SimpleAssignment_16 : SimpleAssignment {
1619 public SimpleAssignment_16(Parser yyq):base(yyq, 1619 public SimpleAssignment_16(Parser yyq):base(yyq,
1620 ((IDENT)(yyq.StackAt(2).m_value)) 1620 ((IDENT)(yyq.StackAt(2).m_value))
1621 , 1621 ,
1622 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1622 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1623 , 1623 ,
1624 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1624 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1625 .yytext){}} 1625 .yytext){}}
1626 1626
1627public class SimpleAssignment_17 : SimpleAssignment { 1627public class SimpleAssignment_17 : SimpleAssignment {
1628 public SimpleAssignment_17(Parser yyq):base(yyq, 1628 public SimpleAssignment_17(Parser yyq):base(yyq,
1629 ((IDENT)(yyq.StackAt(2).m_value)) 1629 ((IDENT)(yyq.StackAt(2).m_value))
1630 , 1630 ,
1631 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1631 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1632 , 1632 ,
1633 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1633 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1634 .yytext){}} 1634 .yytext){}}
1635 1635
1636public class SimpleAssignment_18 : SimpleAssignment { 1636public class SimpleAssignment_18 : SimpleAssignment {
1637 public SimpleAssignment_18(Parser yyq):base(yyq, 1637 public SimpleAssignment_18(Parser yyq):base(yyq,
1638 ((IDENT)(yyq.StackAt(2).m_value)) 1638 ((IDENT)(yyq.StackAt(2).m_value))
1639 , 1639 ,
1640 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1640 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1641 , 1641 ,
1642 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1642 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1643 .yytext){}} 1643 .yytext){}}
1644 1644
1645public class SimpleAssignment_19 : SimpleAssignment { 1645public class SimpleAssignment_19 : SimpleAssignment {
1646 public SimpleAssignment_19(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1646 public SimpleAssignment_19(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1647)yyq), 1647)yyq),
1648 ((IDENT)(yyq.StackAt(4).m_value)) 1648 ((IDENT)(yyq.StackAt(4).m_value))
1649 .yytext, 1649 .yytext,
1650 ((IDENT)(yyq.StackAt(2).m_value)) 1650 ((IDENT)(yyq.StackAt(2).m_value))
1651 .yytext), 1651 .yytext),
1652 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1652 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1653 , 1653 ,
1654 ((EQUALS)(yyq.StackAt(1).m_value)) 1654 ((EQUALS)(yyq.StackAt(1).m_value))
1655 .yytext){}} 1655 .yytext){}}
1656 1656
1657public class SimpleAssignment_20 : SimpleAssignment { 1657public class SimpleAssignment_20 : SimpleAssignment {
1658 public SimpleAssignment_20(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1658 public SimpleAssignment_20(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1659)yyq), 1659)yyq),
1660 ((IDENT)(yyq.StackAt(4).m_value)) 1660 ((IDENT)(yyq.StackAt(4).m_value))
1661 .yytext, 1661 .yytext,
1662 ((IDENT)(yyq.StackAt(2).m_value)) 1662 ((IDENT)(yyq.StackAt(2).m_value))
1663 .yytext), 1663 .yytext),
1664 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1664 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1665 , 1665 ,
1666 ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) 1666 ((PLUS_EQUALS)(yyq.StackAt(1).m_value))
1667 .yytext){}} 1667 .yytext){}}
1668 1668
1669public class SimpleAssignment_21 : SimpleAssignment { 1669public class SimpleAssignment_21 : SimpleAssignment {
1670 public SimpleAssignment_21(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1670 public SimpleAssignment_21(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1671)yyq), 1671)yyq),
1672 ((IDENT)(yyq.StackAt(4).m_value)) 1672 ((IDENT)(yyq.StackAt(4).m_value))
1673 .yytext, 1673 .yytext,
1674 ((IDENT)(yyq.StackAt(2).m_value)) 1674 ((IDENT)(yyq.StackAt(2).m_value))
1675 .yytext), 1675 .yytext),
1676 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1676 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1677 , 1677 ,
1678 ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) 1678 ((MINUS_EQUALS)(yyq.StackAt(1).m_value))
1679 .yytext){}} 1679 .yytext){}}
1680 1680
1681public class SimpleAssignment_22 : SimpleAssignment { 1681public class SimpleAssignment_22 : SimpleAssignment {
1682 public SimpleAssignment_22(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1682 public SimpleAssignment_22(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1683)yyq), 1683)yyq),
1684 ((IDENT)(yyq.StackAt(4).m_value)) 1684 ((IDENT)(yyq.StackAt(4).m_value))
1685 .yytext, 1685 .yytext,
1686 ((IDENT)(yyq.StackAt(2).m_value)) 1686 ((IDENT)(yyq.StackAt(2).m_value))
1687 .yytext), 1687 .yytext),
1688 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1688 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1689 , 1689 ,
1690 ((STAR_EQUALS)(yyq.StackAt(1).m_value)) 1690 ((STAR_EQUALS)(yyq.StackAt(1).m_value))
1691 .yytext){}} 1691 .yytext){}}
1692 1692
1693public class SimpleAssignment_23 : SimpleAssignment { 1693public class SimpleAssignment_23 : SimpleAssignment {
1694 public SimpleAssignment_23(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1694 public SimpleAssignment_23(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1695)yyq), 1695)yyq),
1696 ((IDENT)(yyq.StackAt(4).m_value)) 1696 ((IDENT)(yyq.StackAt(4).m_value))
1697 .yytext, 1697 .yytext,
1698 ((IDENT)(yyq.StackAt(2).m_value)) 1698 ((IDENT)(yyq.StackAt(2).m_value))
1699 .yytext), 1699 .yytext),
1700 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1700 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1701 , 1701 ,
1702 ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) 1702 ((SLASH_EQUALS)(yyq.StackAt(1).m_value))
1703 .yytext){}} 1703 .yytext){}}
1704 1704
1705public class SimpleAssignment_24 : SimpleAssignment { 1705public class SimpleAssignment_24 : SimpleAssignment {
1706 public SimpleAssignment_24(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1706 public SimpleAssignment_24(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1707)yyq), 1707)yyq),
1708 ((IDENT)(yyq.StackAt(4).m_value)) 1708 ((IDENT)(yyq.StackAt(4).m_value))
1709 .yytext, 1709 .yytext,
1710 ((IDENT)(yyq.StackAt(2).m_value)) 1710 ((IDENT)(yyq.StackAt(2).m_value))
1711 .yytext), 1711 .yytext),
1712 ((SimpleAssignment)(yyq.StackAt(0).m_value)) 1712 ((SimpleAssignment)(yyq.StackAt(0).m_value))
1713 , 1713 ,
1714 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) 1714 ((PERCENT_EQUALS)(yyq.StackAt(1).m_value))
1715 .yytext){}} 1715 .yytext){}}
1716 1716
1717public class ReturnStatement_1 : ReturnStatement { 1717public class ReturnStatement_1 : ReturnStatement {
1718 public ReturnStatement_1(Parser yyq):base(yyq, 1718 public ReturnStatement_1(Parser yyq):base(yyq,
1719 ((Expression)(yyq.StackAt(0).m_value)) 1719 ((Expression)(yyq.StackAt(0).m_value))
1720 ){}} 1720 ){}}
1721 1721
1722public class ReturnStatement_2 : ReturnStatement { 1722public class ReturnStatement_2 : ReturnStatement {
1723 public ReturnStatement_2(Parser yyq):base(yyq){}} 1723 public ReturnStatement_2(Parser yyq):base(yyq){}}
1724 1724
1725public class Constant_1 : Constant { 1725public class Constant_1 : Constant {
1726 public Constant_1(Parser yyq):base(yyq,"integer", 1726 public Constant_1(Parser yyq):base(yyq,"integer",
1727 ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) 1727 ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value))
1728 .yytext){}} 1728 .yytext){}}
1729 1729
1730public class Constant_2 : Constant { 1730public class Constant_2 : Constant {
1731 public Constant_2(Parser yyq):base(yyq,"integer", 1731 public Constant_2(Parser yyq):base(yyq,"integer",
1732 ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) 1732 ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value))
1733 .yytext){}} 1733 .yytext){}}
1734 1734
1735public class Constant_3 : Constant { 1735public class Constant_3 : Constant {
1736 public Constant_3(Parser yyq):base(yyq,"float", 1736 public Constant_3(Parser yyq):base(yyq,"float",
1737 ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value)) 1737 ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value))
1738 .yytext){}} 1738 .yytext){}}
1739 1739
1740public class Constant_4 : Constant { 1740public class Constant_4 : Constant {
1741 public Constant_4(Parser yyq):base(yyq,"string", 1741 public Constant_4(Parser yyq):base(yyq,"string",
1742 ((STRING_CONSTANT)(yyq.StackAt(0).m_value)) 1742 ((STRING_CONSTANT)(yyq.StackAt(0).m_value))
1743 .yytext){}} 1743 .yytext){}}
1744 1744
1745public class ListConstant_1 : ListConstant { 1745public class ListConstant_1 : ListConstant {
1746 public ListConstant_1(Parser yyq):base(yyq, 1746 public ListConstant_1(Parser yyq):base(yyq,
1747 ((ArgumentList)(yyq.StackAt(1).m_value)) 1747 ((ArgumentList)(yyq.StackAt(1).m_value))
1748 ){}} 1748 ){}}
1749 1749
1750public class VectorConstant_1 : VectorConstant { 1750public class VectorConstant_1 : VectorConstant {
1751 public VectorConstant_1(Parser yyq):base(yyq, 1751 public VectorConstant_1(Parser yyq):base(yyq,
1752 ((Expression)(yyq.StackAt(5).m_value)) 1752 ((Expression)(yyq.StackAt(5).m_value))
1753 , 1753 ,
1754 ((Expression)(yyq.StackAt(3).m_value)) 1754 ((Expression)(yyq.StackAt(3).m_value))
1755 , 1755 ,
1756 ((Expression)(yyq.StackAt(1).m_value)) 1756 ((Expression)(yyq.StackAt(1).m_value))
1757 ){}} 1757 ){}}
1758 1758
1759public class RotationConstant_1 : RotationConstant { 1759public class RotationConstant_1 : RotationConstant {
1760 public RotationConstant_1(Parser yyq):base(yyq, 1760 public RotationConstant_1(Parser yyq):base(yyq,
1761 ((Expression)(yyq.StackAt(7).m_value)) 1761 ((Expression)(yyq.StackAt(7).m_value))
1762 , 1762 ,
1763 ((Expression)(yyq.StackAt(5).m_value)) 1763 ((Expression)(yyq.StackAt(5).m_value))
1764 , 1764 ,
1765 ((Expression)(yyq.StackAt(3).m_value)) 1765 ((Expression)(yyq.StackAt(3).m_value))
1766 , 1766 ,
1767 ((Expression)(yyq.StackAt(1).m_value)) 1767 ((Expression)(yyq.StackAt(1).m_value))
1768 ){}} 1768 ){}}
1769 1769
1770public class ConstantExpression_1 : ConstantExpression { 1770public class ConstantExpression_1 : ConstantExpression {
1771 public ConstantExpression_1(Parser yyq):base(yyq, 1771 public ConstantExpression_1(Parser yyq):base(yyq,
1772 ((Constant)(yyq.StackAt(0).m_value)) 1772 ((Constant)(yyq.StackAt(0).m_value))
1773 ){}} 1773 ){}}
1774 1774
1775public class IdentExpression_1 : IdentExpression { 1775public class IdentExpression_1 : IdentExpression {
1776 public IdentExpression_1(Parser yyq):base(yyq, 1776 public IdentExpression_1(Parser yyq):base(yyq,
1777 ((IDENT)(yyq.StackAt(0).m_value)) 1777 ((IDENT)(yyq.StackAt(0).m_value))
1778 .yytext){}} 1778 .yytext){}}
1779 1779
1780public class IdentDotExpression_1 : IdentDotExpression { 1780public class IdentDotExpression_1 : IdentDotExpression {
1781 public IdentDotExpression_1(Parser yyq):base(yyq, 1781 public IdentDotExpression_1(Parser yyq):base(yyq,
1782 ((IDENT)(yyq.StackAt(2).m_value)) 1782 ((IDENT)(yyq.StackAt(2).m_value))
1783 .yytext, 1783 .yytext,
1784 ((IDENT)(yyq.StackAt(0).m_value)) 1784 ((IDENT)(yyq.StackAt(0).m_value))
1785 .yytext){}} 1785 .yytext){}}
1786 1786
1787public class IncrementDecrementExpression_1 : IncrementDecrementExpression { 1787public class IncrementDecrementExpression_1 : IncrementDecrementExpression {
1788 public IncrementDecrementExpression_1(Parser yyq):base(yyq, 1788 public IncrementDecrementExpression_1(Parser yyq):base(yyq,
1789 ((IDENT)(yyq.StackAt(1).m_value)) 1789 ((IDENT)(yyq.StackAt(1).m_value))
1790 .yytext, 1790 .yytext,
1791 ((INCREMENT)(yyq.StackAt(0).m_value)) 1791 ((INCREMENT)(yyq.StackAt(0).m_value))
1792 .yytext, true){}} 1792 .yytext, true){}}
1793 1793
1794public class IncrementDecrementExpression_2 : IncrementDecrementExpression { 1794public class IncrementDecrementExpression_2 : IncrementDecrementExpression {
1795 public IncrementDecrementExpression_2(Parser yyq):base(yyq, 1795 public IncrementDecrementExpression_2(Parser yyq):base(yyq,
1796 ((IDENT)(yyq.StackAt(1).m_value)) 1796 ((IDENT)(yyq.StackAt(1).m_value))
1797 .yytext, 1797 .yytext,
1798 ((DECREMENT)(yyq.StackAt(0).m_value)) 1798 ((DECREMENT)(yyq.StackAt(0).m_value))
1799 .yytext, true){}} 1799 .yytext, true){}}
1800 1800
1801public class IncrementDecrementExpression_3 : IncrementDecrementExpression { 1801public class IncrementDecrementExpression_3 : IncrementDecrementExpression {
1802 public IncrementDecrementExpression_3(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1802 public IncrementDecrementExpression_3(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1803)yyq), 1803)yyq),
1804 ((IDENT)(yyq.StackAt(3).m_value)) 1804 ((IDENT)(yyq.StackAt(3).m_value))
1805 .yytext, 1805 .yytext,
1806 ((IDENT)(yyq.StackAt(1).m_value)) 1806 ((IDENT)(yyq.StackAt(1).m_value))
1807 .yytext), 1807 .yytext),
1808 ((INCREMENT)(yyq.StackAt(0).m_value)) 1808 ((INCREMENT)(yyq.StackAt(0).m_value))
1809 .yytext, true){}} 1809 .yytext, true){}}
1810 1810
1811public class IncrementDecrementExpression_4 : IncrementDecrementExpression { 1811public class IncrementDecrementExpression_4 : IncrementDecrementExpression {
1812 public IncrementDecrementExpression_4(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1812 public IncrementDecrementExpression_4(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1813)yyq), 1813)yyq),
1814 ((IDENT)(yyq.StackAt(3).m_value)) 1814 ((IDENT)(yyq.StackAt(3).m_value))
1815 .yytext, 1815 .yytext,
1816 ((IDENT)(yyq.StackAt(1).m_value)) 1816 ((IDENT)(yyq.StackAt(1).m_value))
1817 .yytext), 1817 .yytext),
1818 ((DECREMENT)(yyq.StackAt(0).m_value)) 1818 ((DECREMENT)(yyq.StackAt(0).m_value))
1819 .yytext, true){}} 1819 .yytext, true){}}
1820 1820
1821public class IncrementDecrementExpression_5 : IncrementDecrementExpression { 1821public class IncrementDecrementExpression_5 : IncrementDecrementExpression {
1822 public IncrementDecrementExpression_5(Parser yyq):base(yyq, 1822 public IncrementDecrementExpression_5(Parser yyq):base(yyq,
1823 ((IDENT)(yyq.StackAt(0).m_value)) 1823 ((IDENT)(yyq.StackAt(0).m_value))
1824 .yytext, 1824 .yytext,
1825 ((INCREMENT)(yyq.StackAt(1).m_value)) 1825 ((INCREMENT)(yyq.StackAt(1).m_value))
1826 .yytext, false){}} 1826 .yytext, false){}}
1827 1827
1828public class IncrementDecrementExpression_6 : IncrementDecrementExpression { 1828public class IncrementDecrementExpression_6 : IncrementDecrementExpression {
1829 public IncrementDecrementExpression_6(Parser yyq):base(yyq, 1829 public IncrementDecrementExpression_6(Parser yyq):base(yyq,
1830 ((IDENT)(yyq.StackAt(0).m_value)) 1830 ((IDENT)(yyq.StackAt(0).m_value))
1831 .yytext, 1831 .yytext,
1832 ((DECREMENT)(yyq.StackAt(1).m_value)) 1832 ((DECREMENT)(yyq.StackAt(1).m_value))
1833 .yytext, false){}} 1833 .yytext, false){}}
1834 1834
1835public class IncrementDecrementExpression_7 : IncrementDecrementExpression { 1835public class IncrementDecrementExpression_7 : IncrementDecrementExpression {
1836 public IncrementDecrementExpression_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1836 public IncrementDecrementExpression_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1837)yyq), 1837)yyq),
1838 ((IDENT)(yyq.StackAt(2).m_value)) 1838 ((IDENT)(yyq.StackAt(2).m_value))
1839 .yytext, 1839 .yytext,
1840 ((IDENT)(yyq.StackAt(0).m_value)) 1840 ((IDENT)(yyq.StackAt(0).m_value))
1841 .yytext), 1841 .yytext),
1842 ((INCREMENT)(yyq.StackAt(3).m_value)) 1842 ((INCREMENT)(yyq.StackAt(3).m_value))
1843 .yytext, false){}} 1843 .yytext, false){}}
1844 1844
1845public class IncrementDecrementExpression_8 : IncrementDecrementExpression { 1845public class IncrementDecrementExpression_8 : IncrementDecrementExpression {
1846 public IncrementDecrementExpression_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax 1846 public IncrementDecrementExpression_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax
1847)yyq), 1847)yyq),
1848 ((IDENT)(yyq.StackAt(2).m_value)) 1848 ((IDENT)(yyq.StackAt(2).m_value))
1849 .yytext, 1849 .yytext,
1850 ((IDENT)(yyq.StackAt(0).m_value)) 1850 ((IDENT)(yyq.StackAt(0).m_value))
1851 .yytext), 1851 .yytext),
1852 ((DECREMENT)(yyq.StackAt(3).m_value)) 1852 ((DECREMENT)(yyq.StackAt(3).m_value))
1853 .yytext, false){}} 1853 .yytext, false){}}
1854 1854
1855public class FunctionCallExpression_1 : FunctionCallExpression { 1855public class FunctionCallExpression_1 : FunctionCallExpression {
1856 public FunctionCallExpression_1(Parser yyq):base(yyq, 1856 public FunctionCallExpression_1(Parser yyq):base(yyq,
1857 ((FunctionCall)(yyq.StackAt(0).m_value)) 1857 ((FunctionCall)(yyq.StackAt(0).m_value))
1858 ){}} 1858 ){}}
1859 1859
1860public class BinaryExpression_1 : BinaryExpression { 1860public class BinaryExpression_1 : BinaryExpression {
1861 public BinaryExpression_1(Parser yyq):base(yyq, 1861 public BinaryExpression_1(Parser yyq):base(yyq,
1862 ((Expression)(yyq.StackAt(2).m_value)) 1862 ((Expression)(yyq.StackAt(2).m_value))
1863 , 1863 ,
1864 ((Expression)(yyq.StackAt(0).m_value)) 1864 ((Expression)(yyq.StackAt(0).m_value))
1865 , 1865 ,
1866 ((PLUS)(yyq.StackAt(1).m_value)) 1866 ((PLUS)(yyq.StackAt(1).m_value))
1867 .yytext){}} 1867 .yytext){}}
1868 1868
1869public class BinaryExpression_2 : BinaryExpression { 1869public class BinaryExpression_2 : BinaryExpression {
1870 public BinaryExpression_2(Parser yyq):base(yyq, 1870 public BinaryExpression_2(Parser yyq):base(yyq,
1871 ((Expression)(yyq.StackAt(2).m_value)) 1871 ((Expression)(yyq.StackAt(2).m_value))
1872 , 1872 ,
1873 ((Expression)(yyq.StackAt(0).m_value)) 1873 ((Expression)(yyq.StackAt(0).m_value))
1874 , 1874 ,
1875 ((MINUS)(yyq.StackAt(1).m_value)) 1875 ((MINUS)(yyq.StackAt(1).m_value))
1876 .yytext){}} 1876 .yytext){}}
1877 1877
1878public class BinaryExpression_3 : BinaryExpression { 1878public class BinaryExpression_3 : BinaryExpression {
1879 public BinaryExpression_3(Parser yyq):base(yyq, 1879 public BinaryExpression_3(Parser yyq):base(yyq,
1880 ((Expression)(yyq.StackAt(2).m_value)) 1880 ((Expression)(yyq.StackAt(2).m_value))
1881 , 1881 ,
1882 ((Expression)(yyq.StackAt(0).m_value)) 1882 ((Expression)(yyq.StackAt(0).m_value))
1883 , 1883 ,
1884 ((STAR)(yyq.StackAt(1).m_value)) 1884 ((STAR)(yyq.StackAt(1).m_value))
1885 .yytext){}} 1885 .yytext){}}
1886 1886
1887public class BinaryExpression_4 : BinaryExpression { 1887public class BinaryExpression_4 : BinaryExpression {
1888 public BinaryExpression_4(Parser yyq):base(yyq, 1888 public BinaryExpression_4(Parser yyq):base(yyq,
1889 ((Expression)(yyq.StackAt(2).m_value)) 1889 ((Expression)(yyq.StackAt(2).m_value))
1890 , 1890 ,
1891 ((Expression)(yyq.StackAt(0).m_value)) 1891 ((Expression)(yyq.StackAt(0).m_value))
1892 , 1892 ,
1893 ((SLASH)(yyq.StackAt(1).m_value)) 1893 ((SLASH)(yyq.StackAt(1).m_value))
1894 .yytext){}} 1894 .yytext){}}
1895 1895
1896public class BinaryExpression_5 : BinaryExpression { 1896public class BinaryExpression_5 : BinaryExpression {
1897 public BinaryExpression_5(Parser yyq):base(yyq, 1897 public BinaryExpression_5(Parser yyq):base(yyq,
1898 ((Expression)(yyq.StackAt(2).m_value)) 1898 ((Expression)(yyq.StackAt(2).m_value))
1899 , 1899 ,
1900 ((Expression)(yyq.StackAt(0).m_value)) 1900 ((Expression)(yyq.StackAt(0).m_value))
1901 , 1901 ,
1902 ((PERCENT)(yyq.StackAt(1).m_value)) 1902 ((PERCENT)(yyq.StackAt(1).m_value))
1903 .yytext){}} 1903 .yytext){}}
1904 1904
1905public class BinaryExpression_6 : BinaryExpression { 1905public class BinaryExpression_6 : BinaryExpression {
1906 public BinaryExpression_6(Parser yyq):base(yyq, 1906 public BinaryExpression_6(Parser yyq):base(yyq,
1907 ((Expression)(yyq.StackAt(2).m_value)) 1907 ((Expression)(yyq.StackAt(2).m_value))
1908 , 1908 ,
1909 ((Expression)(yyq.StackAt(0).m_value)) 1909 ((Expression)(yyq.StackAt(0).m_value))
1910 , 1910 ,
1911 ((AMP)(yyq.StackAt(1).m_value)) 1911 ((AMP)(yyq.StackAt(1).m_value))
1912 .yytext){}} 1912 .yytext){}}
1913 1913
1914public class BinaryExpression_7 : BinaryExpression { 1914public class BinaryExpression_7 : BinaryExpression {
1915 public BinaryExpression_7(Parser yyq):base(yyq, 1915 public BinaryExpression_7(Parser yyq):base(yyq,
1916 ((Expression)(yyq.StackAt(2).m_value)) 1916 ((Expression)(yyq.StackAt(2).m_value))
1917 , 1917 ,
1918 ((Expression)(yyq.StackAt(0).m_value)) 1918 ((Expression)(yyq.StackAt(0).m_value))
1919 , 1919 ,
1920 ((STROKE)(yyq.StackAt(1).m_value)) 1920 ((STROKE)(yyq.StackAt(1).m_value))
1921 .yytext){}} 1921 .yytext){}}
1922 1922
1923public class BinaryExpression_8 : BinaryExpression { 1923public class BinaryExpression_8 : BinaryExpression {
1924 public BinaryExpression_8(Parser yyq):base(yyq, 1924 public BinaryExpression_8(Parser yyq):base(yyq,
1925 ((Expression)(yyq.StackAt(2).m_value)) 1925 ((Expression)(yyq.StackAt(2).m_value))
1926 , 1926 ,
1927 ((Expression)(yyq.StackAt(0).m_value)) 1927 ((Expression)(yyq.StackAt(0).m_value))
1928 , 1928 ,
1929 ((CARET)(yyq.StackAt(1).m_value)) 1929 ((CARET)(yyq.StackAt(1).m_value))
1930 .yytext){}} 1930 .yytext){}}
1931 1931
1932public class BinaryExpression_9 : BinaryExpression { 1932public class BinaryExpression_9 : BinaryExpression {
1933 public BinaryExpression_9(Parser yyq):base(yyq, 1933 public BinaryExpression_9(Parser yyq):base(yyq,
1934 ((Expression)(yyq.StackAt(2).m_value)) 1934 ((Expression)(yyq.StackAt(2).m_value))
1935 , 1935 ,
1936 ((Expression)(yyq.StackAt(0).m_value)) 1936 ((Expression)(yyq.StackAt(0).m_value))
1937 , 1937 ,
1938 ((RIGHT_ANGLE)(yyq.StackAt(1).m_value)) 1938 ((RIGHT_ANGLE)(yyq.StackAt(1).m_value))
1939 .yytext){}} 1939 .yytext){}}
1940 1940
1941public class BinaryExpression_10 : BinaryExpression { 1941public class BinaryExpression_10 : BinaryExpression {
1942 public BinaryExpression_10(Parser yyq):base(yyq, 1942 public BinaryExpression_10(Parser yyq):base(yyq,
1943 ((Expression)(yyq.StackAt(2).m_value)) 1943 ((Expression)(yyq.StackAt(2).m_value))
1944 , 1944 ,
1945 ((Expression)(yyq.StackAt(0).m_value)) 1945 ((Expression)(yyq.StackAt(0).m_value))
1946 , 1946 ,
1947 ((LEFT_ANGLE)(yyq.StackAt(1).m_value)) 1947 ((LEFT_ANGLE)(yyq.StackAt(1).m_value))
1948 .yytext){}} 1948 .yytext){}}
1949 1949
1950public class BinaryExpression_11 : BinaryExpression { 1950public class BinaryExpression_11 : BinaryExpression {
1951 public BinaryExpression_11(Parser yyq):base(yyq, 1951 public BinaryExpression_11(Parser yyq):base(yyq,
1952 ((Expression)(yyq.StackAt(2).m_value)) 1952 ((Expression)(yyq.StackAt(2).m_value))
1953 , 1953 ,
1954 ((Expression)(yyq.StackAt(0).m_value)) 1954 ((Expression)(yyq.StackAt(0).m_value))
1955 , 1955 ,
1956 ((EQUALS_EQUALS)(yyq.StackAt(1).m_value)) 1956 ((EQUALS_EQUALS)(yyq.StackAt(1).m_value))
1957 .yytext){}} 1957 .yytext){}}
1958 1958
1959public class BinaryExpression_12 : BinaryExpression { 1959public class BinaryExpression_12 : BinaryExpression {
1960 public BinaryExpression_12(Parser yyq):base(yyq, 1960 public BinaryExpression_12(Parser yyq):base(yyq,
1961 ((Expression)(yyq.StackAt(2).m_value)) 1961 ((Expression)(yyq.StackAt(2).m_value))
1962 , 1962 ,
1963 ((Expression)(yyq.StackAt(0).m_value)) 1963 ((Expression)(yyq.StackAt(0).m_value))
1964 , 1964 ,
1965 ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value)) 1965 ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value))
1966 .yytext){}} 1966 .yytext){}}
1967 1967
1968public class BinaryExpression_13 : BinaryExpression { 1968public class BinaryExpression_13 : BinaryExpression {
1969 public BinaryExpression_13(Parser yyq):base(yyq, 1969 public BinaryExpression_13(Parser yyq):base(yyq,
1970 ((Expression)(yyq.StackAt(2).m_value)) 1970 ((Expression)(yyq.StackAt(2).m_value))
1971 , 1971 ,
1972 ((Expression)(yyq.StackAt(0).m_value)) 1972 ((Expression)(yyq.StackAt(0).m_value))
1973 , 1973 ,
1974 ((LESS_EQUALS)(yyq.StackAt(1).m_value)) 1974 ((LESS_EQUALS)(yyq.StackAt(1).m_value))
1975 .yytext){}} 1975 .yytext){}}
1976 1976
1977public class BinaryExpression_14 : BinaryExpression { 1977public class BinaryExpression_14 : BinaryExpression {
1978 public BinaryExpression_14(Parser yyq):base(yyq, 1978 public BinaryExpression_14(Parser yyq):base(yyq,
1979 ((Expression)(yyq.StackAt(2).m_value)) 1979 ((Expression)(yyq.StackAt(2).m_value))
1980 , 1980 ,
1981 ((Expression)(yyq.StackAt(0).m_value)) 1981 ((Expression)(yyq.StackAt(0).m_value))
1982 , 1982 ,
1983 ((GREATER_EQUALS)(yyq.StackAt(1).m_value)) 1983 ((GREATER_EQUALS)(yyq.StackAt(1).m_value))
1984 .yytext){}} 1984 .yytext){}}
1985 1985
1986public class BinaryExpression_15 : BinaryExpression { 1986public class BinaryExpression_15 : BinaryExpression {
1987 public BinaryExpression_15(Parser yyq):base(yyq, 1987 public BinaryExpression_15(Parser yyq):base(yyq,
1988 ((Expression)(yyq.StackAt(2).m_value)) 1988 ((Expression)(yyq.StackAt(2).m_value))
1989 , 1989 ,
1990 ((Expression)(yyq.StackAt(0).m_value)) 1990 ((Expression)(yyq.StackAt(0).m_value))
1991 , 1991 ,
1992 ((AMP_AMP)(yyq.StackAt(1).m_value)) 1992 ((AMP_AMP)(yyq.StackAt(1).m_value))
1993 .yytext){}} 1993 .yytext){}}
1994 1994
1995public class BinaryExpression_16 : BinaryExpression { 1995public class BinaryExpression_16 : BinaryExpression {
1996 public BinaryExpression_16(Parser yyq):base(yyq, 1996 public BinaryExpression_16(Parser yyq):base(yyq,
1997 ((Expression)(yyq.StackAt(2).m_value)) 1997 ((Expression)(yyq.StackAt(2).m_value))
1998 , 1998 ,
1999 ((Expression)(yyq.StackAt(0).m_value)) 1999 ((Expression)(yyq.StackAt(0).m_value))
2000 , 2000 ,
2001 ((STROKE_STROKE)(yyq.StackAt(1).m_value)) 2001 ((STROKE_STROKE)(yyq.StackAt(1).m_value))
2002 .yytext){}} 2002 .yytext){}}
2003 2003
2004public class BinaryExpression_17 : BinaryExpression { 2004public class BinaryExpression_17 : BinaryExpression {
2005 public BinaryExpression_17(Parser yyq):base(yyq, 2005 public BinaryExpression_17(Parser yyq):base(yyq,
2006 ((Expression)(yyq.StackAt(2).m_value)) 2006 ((Expression)(yyq.StackAt(2).m_value))
2007 , 2007 ,
2008 ((Expression)(yyq.StackAt(0).m_value)) 2008 ((Expression)(yyq.StackAt(0).m_value))
2009 , 2009 ,
2010 ((LEFT_SHIFT)(yyq.StackAt(1).m_value)) 2010 ((LEFT_SHIFT)(yyq.StackAt(1).m_value))
2011 .yytext){}} 2011 .yytext){}}
2012 2012
2013public class BinaryExpression_18 : BinaryExpression { 2013public class BinaryExpression_18 : BinaryExpression {
2014 public BinaryExpression_18(Parser yyq):base(yyq, 2014 public BinaryExpression_18(Parser yyq):base(yyq,
2015 ((Expression)(yyq.StackAt(2).m_value)) 2015 ((Expression)(yyq.StackAt(2).m_value))
2016 , 2016 ,
2017 ((Expression)(yyq.StackAt(0).m_value)) 2017 ((Expression)(yyq.StackAt(0).m_value))
2018 , 2018 ,
2019 ((RIGHT_SHIFT)(yyq.StackAt(1).m_value)) 2019 ((RIGHT_SHIFT)(yyq.StackAt(1).m_value))
2020 .yytext){}} 2020 .yytext){}}
2021 2021
2022public class UnaryExpression_1 : UnaryExpression { 2022public class UnaryExpression_1 : UnaryExpression {
2023 public UnaryExpression_1(Parser yyq):base(yyq, 2023 public UnaryExpression_1(Parser yyq):base(yyq,
2024 ((EXCLAMATION)(yyq.StackAt(1).m_value)) 2024 ((EXCLAMATION)(yyq.StackAt(1).m_value))
2025 .yytext, 2025 .yytext,
2026 ((Expression)(yyq.StackAt(0).m_value)) 2026 ((Expression)(yyq.StackAt(0).m_value))
2027 ){}} 2027 ){}}
2028 2028
2029public class UnaryExpression_2 : UnaryExpression { 2029public class UnaryExpression_2 : UnaryExpression {
2030 public UnaryExpression_2(Parser yyq):base(yyq, 2030 public UnaryExpression_2(Parser yyq):base(yyq,
2031 ((MINUS)(yyq.StackAt(1).m_value)) 2031 ((MINUS)(yyq.StackAt(1).m_value))
2032 .yytext, 2032 .yytext,
2033 ((Expression)(yyq.StackAt(0).m_value)) 2033 ((Expression)(yyq.StackAt(0).m_value))
2034 ){}} 2034 ){}}
2035 2035
2036public class UnaryExpression_3 : UnaryExpression { 2036public class UnaryExpression_3 : UnaryExpression {
2037 public UnaryExpression_3(Parser yyq):base(yyq, 2037 public UnaryExpression_3(Parser yyq):base(yyq,
2038 ((TILDE)(yyq.StackAt(1).m_value)) 2038 ((TILDE)(yyq.StackAt(1).m_value))
2039 .yytext, 2039 .yytext,
2040 ((Expression)(yyq.StackAt(0).m_value)) 2040 ((Expression)(yyq.StackAt(0).m_value))
2041 ){}} 2041 ){}}
2042 2042
2043public class ParenthesisExpression_1 : ParenthesisExpression { 2043public class ParenthesisExpression_1 : ParenthesisExpression {
2044 public ParenthesisExpression_1(Parser yyq):base(yyq, 2044 public ParenthesisExpression_1(Parser yyq):base(yyq,
2045 ((Expression)(yyq.StackAt(1).m_value)) 2045 ((Expression)(yyq.StackAt(1).m_value))
2046 ){}} 2046 ){}}
2047 2047
2048public class ParenthesisExpression_2 : ParenthesisExpression { 2048public class ParenthesisExpression_2 : ParenthesisExpression {
2049 public ParenthesisExpression_2(Parser yyq):base(yyq, 2049 public ParenthesisExpression_2(Parser yyq):base(yyq,
2050 ((SimpleAssignment)(yyq.StackAt(1).m_value)) 2050 ((SimpleAssignment)(yyq.StackAt(1).m_value))
2051 ){}} 2051 ){}}
2052 2052
2053public class TypecastExpression_1 : TypecastExpression { 2053public class TypecastExpression_1 : TypecastExpression {
2054 public TypecastExpression_1(Parser yyq):base(yyq, 2054 public TypecastExpression_1(Parser yyq):base(yyq,
2055 ((Typename)(yyq.StackAt(2).m_value)) 2055 ((Typename)(yyq.StackAt(2).m_value))
2056 .yytext, 2056 .yytext,
2057 ((Constant)(yyq.StackAt(0).m_value)) 2057 ((Constant)(yyq.StackAt(0).m_value))
2058 ){}} 2058 ){}}
2059 2059
2060public class TypecastExpression_2 : TypecastExpression { 2060public class TypecastExpression_2 : TypecastExpression {
2061 public TypecastExpression_2(Parser yyq):base(yyq, 2061 public TypecastExpression_2(Parser yyq):base(yyq,
2062 ((Typename)(yyq.StackAt(2).m_value)) 2062 ((Typename)(yyq.StackAt(2).m_value))
2063 .yytext, new IdentExpression(((LSLSyntax 2063 .yytext, new IdentExpression(((LSLSyntax
2064)yyq), 2064)yyq),
2065 ((IDENT)(yyq.StackAt(0).m_value)) 2065 ((IDENT)(yyq.StackAt(0).m_value))
2066 .yytext)){}} 2066 .yytext)){}}
2067 2067
2068public class TypecastExpression_3 : TypecastExpression { 2068public class TypecastExpression_3 : TypecastExpression {
2069 public TypecastExpression_3(Parser yyq):base(yyq, 2069 public TypecastExpression_3(Parser yyq):base(yyq,
2070 ((Typename)(yyq.StackAt(4).m_value)) 2070 ((Typename)(yyq.StackAt(4).m_value))
2071 .yytext, new IdentDotExpression(((LSLSyntax 2071 .yytext, new IdentDotExpression(((LSLSyntax
2072)yyq), 2072)yyq),
2073 ((IDENT)(yyq.StackAt(2).m_value)) 2073 ((IDENT)(yyq.StackAt(2).m_value))
2074 .yytext, 2074 .yytext,
2075 ((IDENT)(yyq.StackAt(0).m_value)) 2075 ((IDENT)(yyq.StackAt(0).m_value))
2076 .yytext)){}} 2076 .yytext)){}}
2077 2077
2078public class TypecastExpression_4 : TypecastExpression { 2078public class TypecastExpression_4 : TypecastExpression {
2079 public TypecastExpression_4(Parser yyq):base(yyq, 2079 public TypecastExpression_4(Parser yyq):base(yyq,
2080 ((Typename)(yyq.StackAt(3).m_value)) 2080 ((Typename)(yyq.StackAt(3).m_value))
2081 .yytext, new IncrementDecrementExpression(((LSLSyntax 2081 .yytext, new IncrementDecrementExpression(((LSLSyntax
2082)yyq), 2082)yyq),
2083 ((IDENT)(yyq.StackAt(1).m_value)) 2083 ((IDENT)(yyq.StackAt(1).m_value))
2084 .yytext, 2084 .yytext,
2085 ((INCREMENT)(yyq.StackAt(0).m_value)) 2085 ((INCREMENT)(yyq.StackAt(0).m_value))
2086 .yytext, true)){}} 2086 .yytext, true)){}}
2087 2087
2088public class TypecastExpression_5 : TypecastExpression { 2088public class TypecastExpression_5 : TypecastExpression {
2089 public TypecastExpression_5(Parser yyq):base(yyq, 2089 public TypecastExpression_5(Parser yyq):base(yyq,
2090 ((Typename)(yyq.StackAt(5).m_value)) 2090 ((Typename)(yyq.StackAt(5).m_value))
2091 .yytext, new IncrementDecrementExpression(((LSLSyntax 2091 .yytext, new IncrementDecrementExpression(((LSLSyntax
2092)yyq), new IdentDotExpression(((LSLSyntax 2092)yyq), new IdentDotExpression(((LSLSyntax
2093)yyq), 2093)yyq),
2094 ((IDENT)(yyq.StackAt(3).m_value)) 2094 ((IDENT)(yyq.StackAt(3).m_value))
2095 .yytext, 2095 .yytext,
2096 ((IDENT)(yyq.StackAt(1).m_value)) 2096 ((IDENT)(yyq.StackAt(1).m_value))
2097 .yytext), 2097 .yytext),
2098 ((INCREMENT)(yyq.StackAt(0).m_value)) 2098 ((INCREMENT)(yyq.StackAt(0).m_value))
2099 .yytext, true)){}} 2099 .yytext, true)){}}
2100 2100
2101public class TypecastExpression_6 : TypecastExpression { 2101public class TypecastExpression_6 : TypecastExpression {
2102 public TypecastExpression_6(Parser yyq):base(yyq, 2102 public TypecastExpression_6(Parser yyq):base(yyq,
2103 ((Typename)(yyq.StackAt(3).m_value)) 2103 ((Typename)(yyq.StackAt(3).m_value))
2104 .yytext, new IncrementDecrementExpression(((LSLSyntax 2104 .yytext, new IncrementDecrementExpression(((LSLSyntax
2105)yyq), 2105)yyq),
2106 ((IDENT)(yyq.StackAt(1).m_value)) 2106 ((IDENT)(yyq.StackAt(1).m_value))
2107 .yytext, 2107 .yytext,
2108 ((DECREMENT)(yyq.StackAt(0).m_value)) 2108 ((DECREMENT)(yyq.StackAt(0).m_value))
2109 .yytext, true)){}} 2109 .yytext, true)){}}
2110 2110
2111public class TypecastExpression_7 : TypecastExpression { 2111public class TypecastExpression_7 : TypecastExpression {
2112 public TypecastExpression_7(Parser yyq):base(yyq, 2112 public TypecastExpression_7(Parser yyq):base(yyq,
2113 ((Typename)(yyq.StackAt(5).m_value)) 2113 ((Typename)(yyq.StackAt(5).m_value))
2114 .yytext, new IncrementDecrementExpression(((LSLSyntax 2114 .yytext, new IncrementDecrementExpression(((LSLSyntax
2115)yyq), new IdentDotExpression(((LSLSyntax 2115)yyq), new IdentDotExpression(((LSLSyntax
2116)yyq), 2116)yyq),
2117 ((IDENT)(yyq.StackAt(3).m_value)) 2117 ((IDENT)(yyq.StackAt(3).m_value))
2118 .yytext, 2118 .yytext,
2119 ((IDENT)(yyq.StackAt(1).m_value)) 2119 ((IDENT)(yyq.StackAt(1).m_value))
2120 .yytext), 2120 .yytext),
2121 ((DECREMENT)(yyq.StackAt(0).m_value)) 2121 ((DECREMENT)(yyq.StackAt(0).m_value))
2122 .yytext, true)){}} 2122 .yytext, true)){}}
2123 2123
2124public class TypecastExpression_8 : TypecastExpression { 2124public class TypecastExpression_8 : TypecastExpression {
2125 public TypecastExpression_8(Parser yyq):base(yyq, 2125 public TypecastExpression_8(Parser yyq):base(yyq,
2126 ((Typename)(yyq.StackAt(2).m_value)) 2126 ((Typename)(yyq.StackAt(2).m_value))
2127 .yytext, 2127 .yytext,
2128 ((FunctionCall)(yyq.StackAt(0).m_value)) 2128 ((FunctionCall)(yyq.StackAt(0).m_value))
2129 ){}} 2129 ){}}
2130 2130
2131public class TypecastExpression_9 : TypecastExpression { 2131public class TypecastExpression_9 : TypecastExpression {
2132 public TypecastExpression_9(Parser yyq):base(yyq, 2132 public TypecastExpression_9(Parser yyq):base(yyq,
2133 ((Typename)(yyq.StackAt(4).m_value)) 2133 ((Typename)(yyq.StackAt(4).m_value))
2134 .yytext, 2134 .yytext,
2135 ((Expression)(yyq.StackAt(1).m_value)) 2135 ((Expression)(yyq.StackAt(1).m_value))
2136 ){}} 2136 ){}}
2137 2137
2138public class FunctionCall_1 : FunctionCall { 2138public class FunctionCall_1 : FunctionCall {
2139 public FunctionCall_1(Parser yyq):base(yyq, 2139 public FunctionCall_1(Parser yyq):base(yyq,
2140 ((IDENT)(yyq.StackAt(3).m_value)) 2140 ((IDENT)(yyq.StackAt(3).m_value))
2141 .yytext, 2141 .yytext,
2142 ((ArgumentList)(yyq.StackAt(1).m_value)) 2142 ((ArgumentList)(yyq.StackAt(1).m_value))
2143 ){}} 2143 ){}}
2144 2144
2145public class ArgumentList_1 : ArgumentList { 2145public class ArgumentList_1 : ArgumentList {
2146 public ArgumentList_1(Parser yyq):base(yyq, 2146 public ArgumentList_1(Parser yyq):base(yyq,
2147 ((Argument)(yyq.StackAt(0).m_value)) 2147 ((Argument)(yyq.StackAt(0).m_value))
2148 ){}} 2148 ){}}
2149 2149
2150public class ArgumentList_2 : ArgumentList { 2150public class ArgumentList_2 : ArgumentList {
2151 public ArgumentList_2(Parser yyq):base(yyq, 2151 public ArgumentList_2(Parser yyq):base(yyq,
2152 ((ArgumentList)(yyq.StackAt(2).m_value)) 2152 ((ArgumentList)(yyq.StackAt(2).m_value))
2153 , 2153 ,
2154 ((Argument)(yyq.StackAt(0).m_value)) 2154 ((Argument)(yyq.StackAt(0).m_value))
2155 ){}} 2155 ){}}
2156 2156
2157public class ExpressionArgument_1 : ExpressionArgument { 2157public class ExpressionArgument_1 : ExpressionArgument {
2158 public ExpressionArgument_1(Parser yyq):base(yyq, 2158 public ExpressionArgument_1(Parser yyq):base(yyq,
2159 ((Expression)(yyq.StackAt(0).m_value)) 2159 ((Expression)(yyq.StackAt(0).m_value))
2160 ){}} 2160 ){}}
2161 2161
2162public class Typename_1 : Typename { 2162public class Typename_1 : Typename {
2163 public Typename_1(Parser yyq):base(yyq, 2163 public Typename_1(Parser yyq):base(yyq,
2164 ((INTEGER_TYPE)(yyq.StackAt(0).m_value)) 2164 ((INTEGER_TYPE)(yyq.StackAt(0).m_value))
2165 .yytext){}} 2165 .yytext){}}
2166 2166
2167public class Typename_2 : Typename { 2167public class Typename_2 : Typename {
2168 public Typename_2(Parser yyq):base(yyq, 2168 public Typename_2(Parser yyq):base(yyq,
2169 ((FLOAT_TYPE)(yyq.StackAt(0).m_value)) 2169 ((FLOAT_TYPE)(yyq.StackAt(0).m_value))
2170 .yytext){}} 2170 .yytext){}}
2171 2171
2172public class Typename_3 : Typename { 2172public class Typename_3 : Typename {
2173 public Typename_3(Parser yyq):base(yyq, 2173 public Typename_3(Parser yyq):base(yyq,
2174 ((STRING_TYPE)(yyq.StackAt(0).m_value)) 2174 ((STRING_TYPE)(yyq.StackAt(0).m_value))
2175 .yytext){}} 2175 .yytext){}}
2176 2176
2177public class Typename_4 : Typename { 2177public class Typename_4 : Typename {
2178 public Typename_4(Parser yyq):base(yyq, 2178 public Typename_4(Parser yyq):base(yyq,
2179 ((KEY_TYPE)(yyq.StackAt(0).m_value)) 2179 ((KEY_TYPE)(yyq.StackAt(0).m_value))
2180 .yytext){}} 2180 .yytext){}}
2181 2181
2182public class Typename_5 : Typename { 2182public class Typename_5 : Typename {
2183 public Typename_5(Parser yyq):base(yyq, 2183 public Typename_5(Parser yyq):base(yyq,
2184 ((VECTOR_TYPE)(yyq.StackAt(0).m_value)) 2184 ((VECTOR_TYPE)(yyq.StackAt(0).m_value))
2185 .yytext){}} 2185 .yytext){}}
2186 2186
2187public class Typename_6 : Typename { 2187public class Typename_6 : Typename {
2188 public Typename_6(Parser yyq):base(yyq, 2188 public Typename_6(Parser yyq):base(yyq,
2189 ((ROTATION_TYPE)(yyq.StackAt(0).m_value)) 2189 ((ROTATION_TYPE)(yyq.StackAt(0).m_value))
2190 .yytext){}} 2190 .yytext){}}
2191 2191
2192public class Typename_7 : Typename { 2192public class Typename_7 : Typename {
2193 public Typename_7(Parser yyq):base(yyq, 2193 public Typename_7(Parser yyq):base(yyq,
2194 ((LIST_TYPE)(yyq.StackAt(0).m_value)) 2194 ((LIST_TYPE)(yyq.StackAt(0).m_value))
2195 .yytext){}} 2195 .yytext){}}
2196 2196
2197public class Event_1 : Event { 2197public class Event_1 : Event {
2198 public Event_1(Parser yyq):base(yyq, 2198 public Event_1(Parser yyq):base(yyq,
2199 ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) 2199 ((DATASERVER_EVENT)(yyq.StackAt(0).m_value))
2200 .yytext){}} 2200 .yytext){}}
2201 2201
2202public class Event_2 : Event { 2202public class Event_2 : Event {
2203 public Event_2(Parser yyq):base(yyq, 2203 public Event_2(Parser yyq):base(yyq,
2204 ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) 2204 ((EMAIL_EVENT)(yyq.StackAt(0).m_value))
2205 .yytext){}} 2205 .yytext){}}
2206 2206
2207public class Event_3 : Event { 2207public class Event_3 : Event {
2208 public Event_3(Parser yyq):base(yyq, 2208 public Event_3(Parser yyq):base(yyq,
2209 ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) 2209 ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value))
2210 .yytext){}} 2210 .yytext){}}
2211 2211
2212public class Event_4 : Event { 2212public class Event_4 : Event {
2213 public Event_4(Parser yyq):base(yyq, 2213 public Event_4(Parser yyq):base(yyq,
2214 ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) 2214 ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value))
2215 .yytext){}} 2215 .yytext){}}
2216 2216
2217public class Event_5 : Event { 2217public class Event_5 : Event {
2218 public Event_5(Parser yyq):base(yyq, 2218 public Event_5(Parser yyq):base(yyq,
2219 ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) 2219 ((LISTEN_EVENT)(yyq.StackAt(0).m_value))
2220 .yytext){}} 2220 .yytext){}}
2221 2221
2222public class Event_6 : Event { 2222public class Event_6 : Event {
2223 public Event_6(Parser yyq):base(yyq, 2223 public Event_6(Parser yyq):base(yyq,
2224 ((MONEY_EVENT)(yyq.StackAt(0).m_value)) 2224 ((MONEY_EVENT)(yyq.StackAt(0).m_value))
2225 .yytext){}} 2225 .yytext){}}
2226 2226
2227public class Event_7 : Event { 2227public class Event_7 : Event {
2228 public Event_7(Parser yyq):base(yyq, 2228 public Event_7(Parser yyq):base(yyq,
2229 ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) 2229 ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value))
2230 .yytext){}} 2230 .yytext){}}
2231 2231
2232public class Event_8 : Event { 2232public class Event_8 : Event {
2233 public Event_8(Parser yyq):base(yyq, 2233 public Event_8(Parser yyq):base(yyq,
2234 ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) 2234 ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value))
2235 .yytext){}} 2235 .yytext){}}
2236 2236
2237public class Event_9 : Event { 2237public class Event_9 : Event {
2238 public Event_9(Parser yyq):base(yyq, 2238 public Event_9(Parser yyq):base(yyq,
2239 ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value)) 2239 ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value))
2240 .yytext){}} 2240 .yytext){}}
2241 2241
2242public class VoidArgEvent_1 : VoidArgEvent { 2242public class VoidArgEvent_1 : VoidArgEvent {
2243 public VoidArgEvent_1(Parser yyq):base(yyq, 2243 public VoidArgEvent_1(Parser yyq):base(yyq,
2244 ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) 2244 ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value))
2245 .yytext){}} 2245 .yytext){}}
2246 2246
2247public class VoidArgEvent_2 : VoidArgEvent { 2247public class VoidArgEvent_2 : VoidArgEvent {
2248 public VoidArgEvent_2(Parser yyq):base(yyq, 2248 public VoidArgEvent_2(Parser yyq):base(yyq,
2249 ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) 2249 ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value))
2250 .yytext){}} 2250 .yytext){}}
2251 2251
2252public class VoidArgEvent_3 : VoidArgEvent { 2252public class VoidArgEvent_3 : VoidArgEvent {
2253 public VoidArgEvent_3(Parser yyq):base(yyq, 2253 public VoidArgEvent_3(Parser yyq):base(yyq,
2254 ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) 2254 ((MOVING_END_EVENT)(yyq.StackAt(0).m_value))
2255 .yytext){}} 2255 .yytext){}}
2256 2256
2257public class VoidArgEvent_4 : VoidArgEvent { 2257public class VoidArgEvent_4 : VoidArgEvent {
2258 public VoidArgEvent_4(Parser yyq):base(yyq, 2258 public VoidArgEvent_4(Parser yyq):base(yyq,
2259 ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) 2259 ((MOVING_START_EVENT)(yyq.StackAt(0).m_value))
2260 .yytext){}} 2260 .yytext){}}
2261 2261
2262public class VoidArgEvent_5 : VoidArgEvent { 2262public class VoidArgEvent_5 : VoidArgEvent {
2263 public VoidArgEvent_5(Parser yyq):base(yyq, 2263 public VoidArgEvent_5(Parser yyq):base(yyq,
2264 ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) 2264 ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value))
2265 .yytext){}} 2265 .yytext){}}
2266 2266
2267public class VoidArgEvent_6 : VoidArgEvent { 2267public class VoidArgEvent_6 : VoidArgEvent {
2268 public VoidArgEvent_6(Parser yyq):base(yyq, 2268 public VoidArgEvent_6(Parser yyq):base(yyq,
2269 ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2269 ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2270 .yytext){}} 2270 .yytext){}}
2271 2271
2272public class VoidArgEvent_7 : VoidArgEvent { 2272public class VoidArgEvent_7 : VoidArgEvent {
2273 public VoidArgEvent_7(Parser yyq):base(yyq, 2273 public VoidArgEvent_7(Parser yyq):base(yyq,
2274 ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2274 ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2275 .yytext){}} 2275 .yytext){}}
2276 2276
2277public class VoidArgEvent_8 : VoidArgEvent { 2277public class VoidArgEvent_8 : VoidArgEvent {
2278 public VoidArgEvent_8(Parser yyq):base(yyq, 2278 public VoidArgEvent_8(Parser yyq):base(yyq,
2279 ((TIMER_EVENT)(yyq.StackAt(0).m_value)) 2279 ((TIMER_EVENT)(yyq.StackAt(0).m_value))
2280 .yytext){}} 2280 .yytext){}}
2281 2281
2282public class KeyArgEvent_1 : KeyArgEvent { 2282public class KeyArgEvent_1 : KeyArgEvent {
2283 public KeyArgEvent_1(Parser yyq):base(yyq, 2283 public KeyArgEvent_1(Parser yyq):base(yyq,
2284 ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) 2284 ((ATTACH_EVENT)(yyq.StackAt(0).m_value))
2285 .yytext){}} 2285 .yytext){}}
2286 2286
2287public class KeyArgEvent_2 : KeyArgEvent { 2287public class KeyArgEvent_2 : KeyArgEvent {
2288 public KeyArgEvent_2(Parser yyq):base(yyq, 2288 public KeyArgEvent_2(Parser yyq):base(yyq,
2289 ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) 2289 ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value))
2290 .yytext){}} 2290 .yytext){}}
2291 2291
2292public class IntArgEvent_1 : IntArgEvent { 2292public class IntArgEvent_1 : IntArgEvent {
2293 public IntArgEvent_1(Parser yyq):base(yyq, 2293 public IntArgEvent_1(Parser yyq):base(yyq,
2294 ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) 2294 ((CHANGED_EVENT)(yyq.StackAt(0).m_value))
2295 .yytext){}} 2295 .yytext){}}
2296 2296
2297public class IntArgEvent_2 : IntArgEvent { 2297public class IntArgEvent_2 : IntArgEvent {
2298 public IntArgEvent_2(Parser yyq):base(yyq, 2298 public IntArgEvent_2(Parser yyq):base(yyq,
2299 ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) 2299 ((COLLISION_EVENT)(yyq.StackAt(0).m_value))
2300 .yytext){}} 2300 .yytext){}}
2301 2301
2302public class IntArgEvent_3 : IntArgEvent { 2302public class IntArgEvent_3 : IntArgEvent {
2303 public IntArgEvent_3(Parser yyq):base(yyq, 2303 public IntArgEvent_3(Parser yyq):base(yyq,
2304 ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) 2304 ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value))
2305 .yytext){}} 2305 .yytext){}}
2306 2306
2307public class IntArgEvent_4 : IntArgEvent { 2307public class IntArgEvent_4 : IntArgEvent {
2308 public IntArgEvent_4(Parser yyq):base(yyq, 2308 public IntArgEvent_4(Parser yyq):base(yyq,
2309 ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) 2309 ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value))
2310 .yytext){}} 2310 .yytext){}}
2311 2311
2312public class IntArgEvent_5 : IntArgEvent { 2312public class IntArgEvent_5 : IntArgEvent {
2313 public IntArgEvent_5(Parser yyq):base(yyq, 2313 public IntArgEvent_5(Parser yyq):base(yyq,
2314 ((ON_REZ_EVENT)(yyq.StackAt(0).m_value)) 2314 ((ON_REZ_EVENT)(yyq.StackAt(0).m_value))
2315 .yytext){}} 2315 .yytext){}}
2316 2316
2317public class IntArgEvent_6 : IntArgEvent { 2317public class IntArgEvent_6 : IntArgEvent {
2318 public IntArgEvent_6(Parser yyq):base(yyq, 2318 public IntArgEvent_6(Parser yyq):base(yyq,
2319 ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value)) 2319 ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value))
2320 .yytext){}} 2320 .yytext){}}
2321 2321
2322public class IntArgEvent_7 : IntArgEvent { 2322public class IntArgEvent_7 : IntArgEvent {
2323 public IntArgEvent_7(Parser yyq):base(yyq, 2323 public IntArgEvent_7(Parser yyq):base(yyq,
2324 ((SENSOR_EVENT)(yyq.StackAt(0).m_value)) 2324 ((SENSOR_EVENT)(yyq.StackAt(0).m_value))
2325 .yytext){}} 2325 .yytext){}}
2326 2326
2327public class IntArgEvent_8 : IntArgEvent { 2327public class IntArgEvent_8 : IntArgEvent {
2328 public IntArgEvent_8(Parser yyq):base(yyq, 2328 public IntArgEvent_8(Parser yyq):base(yyq,
2329 ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) 2329 ((TOUCH_EVENT)(yyq.StackAt(0).m_value))
2330 .yytext){}} 2330 .yytext){}}
2331 2331
2332public class IntArgEvent_9 : IntArgEvent { 2332public class IntArgEvent_9 : IntArgEvent {
2333 public IntArgEvent_9(Parser yyq):base(yyq, 2333 public IntArgEvent_9(Parser yyq):base(yyq,
2334 ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) 2334 ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value))
2335 .yytext){}} 2335 .yytext){}}
2336 2336
2337public class IntArgEvent_10 : IntArgEvent { 2337public class IntArgEvent_10 : IntArgEvent {
2338 public IntArgEvent_10(Parser yyq):base(yyq, 2338 public IntArgEvent_10(Parser yyq):base(yyq,
2339 ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) 2339 ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value))
2340 .yytext){}} 2340 .yytext){}}
2341 2341
2342public class VectorArgEvent_1 : VectorArgEvent { 2342public class VectorArgEvent_1 : VectorArgEvent {
2343 public VectorArgEvent_1(Parser yyq):base(yyq, 2343 public VectorArgEvent_1(Parser yyq):base(yyq,
2344 ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) 2344 ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value))
2345 .yytext){}} 2345 .yytext){}}
2346 2346
2347public class VectorArgEvent_2 : VectorArgEvent { 2347public class VectorArgEvent_2 : VectorArgEvent {
2348 public VectorArgEvent_2(Parser yyq):base(yyq, 2348 public VectorArgEvent_2(Parser yyq):base(yyq,
2349 ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) 2349 ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value))
2350 .yytext){}} 2350 .yytext){}}
2351 2351
2352public class VectorArgEvent_3 : VectorArgEvent { 2352public class VectorArgEvent_3 : VectorArgEvent {
2353 public VectorArgEvent_3(Parser yyq):base(yyq, 2353 public VectorArgEvent_3(Parser yyq):base(yyq,
2354 ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) 2354 ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value))
2355 .yytext){}} 2355 .yytext){}}
2356 2356
2357public class IntRotRotArgEvent_1 : IntRotRotArgEvent { 2357public class IntRotRotArgEvent_1 : IntRotRotArgEvent {
2358 public IntRotRotArgEvent_1(Parser yyq):base(yyq, 2358 public IntRotRotArgEvent_1(Parser yyq):base(yyq,
2359 ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2359 ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2360 .yytext){}} 2360 .yytext){}}
2361 2361
2362public class IntVecVecArgEvent_1 : IntVecVecArgEvent { 2362public class IntVecVecArgEvent_1 : IntVecVecArgEvent {
2363 public IntVecVecArgEvent_1(Parser yyq):base(yyq, 2363 public IntVecVecArgEvent_1(Parser yyq):base(yyq,
2364 ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) 2364 ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value))
2365 .yytext){}} 2365 .yytext){}}
2366 2366
2367public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent { 2367public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent {
2368 public KeyIntIntArgEvent_1(Parser yyq):base(yyq, 2368 public KeyIntIntArgEvent_1(Parser yyq):base(yyq,
2369 ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) 2369 ((CONTROL_EVENT)(yyq.StackAt(0).m_value))
2370 .yytext){}} 2370 .yytext){}}
2371public class yyLSLSyntax 2371public class yyLSLSyntax
2372: YyParser { 2372: YyParser {
2373 public override object Action(Parser yyq,SYMBOL yysym, int yyact) { 2373 public override object Action(Parser yyq,SYMBOL yysym, int yyact) {
2374 switch(yyact) { 2374 switch(yyact) {
2375 case -1: break; //// keep compiler happy 2375 case -1: break; //// keep compiler happy
2376} return null; } 2376} return null; }
2377 2377
2378public class ArgumentDeclarationList_3 : ArgumentDeclarationList { 2378public class ArgumentDeclarationList_3 : ArgumentDeclarationList {
@@ -2390,7 +2390,7 @@ public class ArgumentDeclarationList_4 : ArgumentDeclarationList {
2390public class ArgumentDeclarationList_5 : ArgumentDeclarationList { 2390public class ArgumentDeclarationList_5 : ArgumentDeclarationList {
2391 public ArgumentDeclarationList_5(Parser yyq):base(yyq){}} 2391 public ArgumentDeclarationList_5(Parser yyq):base(yyq){}}
2392public yyLSLSyntax 2392public yyLSLSyntax
2393():base() { arr = new int[] { 2393():base() { arr = new int[] {
2394101,4,6,52,0, 2394101,4,6,52,0,
239546,0,53,0,102, 239546,0,53,0,102,
239620,103,4,28,76, 239620,103,4,28,76,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 110fce6..7db6b6d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
48 } 48 }
49 49
50 protected EventAbortException( 50 protected EventAbortException(
51 SerializationInfo info, 51 SerializationInfo info,
52 StreamingContext context) 52 StreamingContext context)
53 { 53 {
54 } 54 }
@@ -62,7 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
62 } 62 }
63 63
64 protected SelfDeleteException( 64 protected SelfDeleteException(
65 SerializationInfo info, 65 SerializationInfo info,
66 StreamingContext context) 66 StreamingContext context)
67 { 67 {
68 } 68 }
@@ -76,14 +76,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
76 } 76 }
77 77
78 protected ScriptDeleteException( 78 protected ScriptDeleteException(
79 SerializationInfo info, 79 SerializationInfo info,
80 StreamingContext context) 80 StreamingContext context)
81 { 81 {
82 } 82 }
83 } 83 }
84 84
85 /// <summary> 85 /// <summary>
86 /// Used to signal when the script is stopping in co-operation with the script engine 86 /// Used to signal when the script is stopping in co-operation with the script engine
87 /// (instead of through Thread.Abort()). 87 /// (instead of through Thread.Abort()).
88 /// </summary> 88 /// </summary>
89 [Serializable] 89 [Serializable]
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
94 } 94 }
95 95
96 protected ScriptCoopStopException( 96 protected ScriptCoopStopException(
97 SerializationInfo info, 97 SerializationInfo info,
98 StreamingContext context) 98 StreamingContext context)
99 { 99 {
100 } 100 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
index fdbdd8c..411d49c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ScriptEngine.Shared.Instance")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.Instance")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 7129c8a..9d72b1c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
88 88
89 // The following is for setting a minimum delay between events 89 // The following is for setting a minimum delay between events
90 private double m_minEventDelay; 90 private double m_minEventDelay;
91 91
92 private long m_eventDelayTicks; 92 private long m_eventDelayTicks;
93 private long m_nextEventTimeTicks; 93 private long m_nextEventTimeTicks;
94 private bool m_startOnInit = true; 94 private bool m_startOnInit = true;
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
122 { 122 {
123 if (value > 0.001) 123 if (value > 0.001)
124 m_minEventDelay = value; 124 m_minEventDelay = value;
125 else 125 else
126 m_minEventDelay = 0.0; 126 m_minEventDelay = 0.0;
127 127
128 m_eventDelayTicks = (long)(m_minEventDelay * 10000000L); 128 m_eventDelayTicks = (long)(m_minEventDelay * 10000000L);
@@ -154,7 +154,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
154 { 154 {
155 bool wasSuspended = m_Suspended; 155 bool wasSuspended = m_Suspended;
156 m_Suspended = value; 156 m_Suspended = value;
157 157
158 if (wasSuspended && !m_Suspended) 158 if (wasSuspended && !m_Suspended)
159 { 159 {
160 lock (EventQueue) 160 lock (EventQueue)
@@ -201,11 +201,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
201 201
202 public long EventsQueued 202 public long EventsQueued
203 { 203 {
204 get 204 get
205 { 205 {
206 lock (EventQueue) 206 lock (EventQueue)
207 return EventQueue.Count; 207 return EventQueue.Count;
208 } 208 }
209 } 209 }
210 210
211 public long EventsProcessed { get; private set; } 211 public long EventsProcessed { get; private set; }
@@ -221,7 +221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
221 private static readonly int MeasurementWindow = 30 * 1000; // show the *recent* time used by the script, to find currently active scripts 221 private static readonly int MeasurementWindow = 30 * 1000; // show the *recent* time used by the script, to find currently active scripts
222 222
223 private bool m_coopTermination; 223 private bool m_coopTermination;
224 224
225 private EventWaitHandle m_coopSleepHandle; 225 private EventWaitHandle m_coopSleepHandle;
226 226
227 public void ClearQueue() 227 public void ClearQueue()
@@ -281,7 +281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
281 /// <param name='stateSource'></param> 281 /// <param name='stateSource'></param>
282 /// <returns>false if load failed, true if suceeded</returns> 282 /// <returns>false if load failed, true if suceeded</returns>
283 public bool Load( 283 public bool Load(
284 IScript script, EventWaitHandle coopSleepHandle, string assemblyPath, 284 IScript script, EventWaitHandle coopSleepHandle, string assemblyPath,
285 string dataPath, StateSource stateSource, bool coopTermination) 285 string dataPath, StateSource stateSource, bool coopTermination)
286 { 286 {
287 m_Script = script; 287 m_Script = script;
@@ -324,13 +324,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
324 return false; 324 return false;
325 } 325 }
326 326
327 // For attachments, XEngine saves the state into a .state file when XEngine.SetXMLState() is called. 327 // For attachments, XEngine saves the state into a .state file when XEngine.SetXMLState() is called.
328 string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state"); 328 string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state");
329 329
330 if (File.Exists(savedState)) 330 if (File.Exists(savedState))
331 { 331 {
332 // m_log.DebugFormat( 332 // m_log.DebugFormat(
333 // "[SCRIPT INSTANCE]: Found state for script {0} for {1} ({2}) at {3} in {4}", 333 // "[SCRIPT INSTANCE]: Found state for script {0} for {1} ({2}) at {3} in {4}",
334 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); 334 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name);
335 335
336 string xml = String.Empty; 336 string xml = String.Empty;
@@ -395,7 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
395 // else 395 // else
396 // { 396 // {
397 // m_log.DebugFormat( 397 // m_log.DebugFormat(
398 // "[SCRIPT INSTANCE]: Did not find state for script {0} for {1} ({2}) at {3} in {4}", 398 // "[SCRIPT INSTANCE]: Did not find state for script {0} for {1} ({2}) at {3} in {4}",
399 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); 399 // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name);
400 // } 400 // }
401 401
@@ -407,11 +407,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
407 if (ShuttingDown) 407 if (ShuttingDown)
408 return; 408 return;
409 409
410 if (m_startedFromSavedState) 410 if (m_startedFromSavedState)
411 { 411 {
412 if (m_startOnInit) 412 if (m_startOnInit)
413 Start(); 413 Start();
414 if (m_postOnRez) 414 if (m_postOnRez)
415 { 415 {
416 PostEvent(new EventParams("on_rez", 416 PostEvent(new EventParams("on_rez",
417 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0])); 417 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0]));
@@ -439,13 +439,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
439 new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0])); 439 new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0]));
440 } 440 }
441 } 441 }
442 else 442 else
443 { 443 {
444 if (m_startOnInit) 444 if (m_startOnInit)
445 Start(); 445 Start();
446 PostEvent(new EventParams("state_entry", 446 PostEvent(new EventParams("state_entry",
447 new Object[0], new DetectParams[0])); 447 new Object[0], new DetectParams[0]));
448 if (m_postOnRez) 448 if (m_postOnRez)
449 { 449 {
450 PostEvent(new EventParams("on_rez", 450 PostEvent(new EventParams("on_rez",
451 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0])); 451 new Object[] {new LSL_Types.LSLInteger(StartParam)}, new DetectParams[0]));
@@ -462,7 +462,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
462 private void ReleaseControls() 462 private void ReleaseControls()
463 { 463 {
464 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); 464 SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
465 465
466 if (part != null) 466 if (part != null)
467 { 467 {
468 int permsMask; 468 int permsMask;
@@ -508,8 +508,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
508 { 508 {
509 m_log.Warn( 509 m_log.Warn(
510 string.Format( 510 string.Format(
511 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ", 511 "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ",
512 savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name), 512 savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name),
513 e); 513 e);
514 } 514 }
515 } 515 }
@@ -631,7 +631,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
631 if (!m_InSelfDelete) 631 if (!m_InSelfDelete)
632 { 632 {
633 m_log.DebugFormat( 633 m_log.DebugFormat(
634 "[SCRIPT INSTANCE]: Aborting unstopped script {0} {1} in prim {2}, localID {3}, timeout was {4} ms", 634 "[SCRIPT INSTANCE]: Aborting unstopped script {0} {1} in prim {2}, localID {3}, timeout was {4} ms",
635 ScriptName, ItemID, PrimName, LocalID, timeout); 635 ScriptName, ItemID, PrimName, LocalID, timeout);
636 636
637 workItem.Abort(); 637 workItem.Abort();
@@ -709,7 +709,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
709 lock (EventQueue) 709 lock (EventQueue)
710 { 710 {
711 // The only events that persist across state changes are timers 711 // The only events that persist across state changes are timers
712 if (m_StateChangeInProgress && data.EventName != "timer") 712 if (m_StateChangeInProgress && data.EventName != "timer")
713 return; 713 return;
714 714
715 if (EventQueue.Count >= m_MaxScriptQueue) 715 if (EventQueue.Count >= m_MaxScriptQueue)
@@ -784,7 +784,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
784 return 0; 784 return 0;
785 785
786 ExecutionTimer.Restart(); 786 ExecutionTimer.Restart();
787 787
788 try 788 try
789 { 789 {
790 return EventProcessorInt(); 790 return EventProcessorInt();
@@ -927,7 +927,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
927 927
928 if(e.InnerException != null && e.InnerException is ScriptException) 928 if(e.InnerException != null && e.InnerException is ScriptException)
929 { 929 {
930 string text = e.InnerException.Message + 930 string text = e.InnerException.Message +
931 "(script: " + ScriptName + 931 "(script: " + ScriptName +
932 " event: " + data.EventName + 932 " event: " + data.EventName +
933 " at " + Part.AbsolutePosition + ")"; 933 " at " + Part.AbsolutePosition + ")";
@@ -945,10 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
945 Part.UUID, 945 Part.UUID,
946 Part.AbsolutePosition, 946 Part.AbsolutePosition,
947 Part.ParentGroup.Scene.Name)); 947 Part.ParentGroup.Scene.Name));
948 948
949 } 949 }
950 else 950 else
951 { 951 {
952 952
953 // DISPLAY ERROR INWORLD 953 // DISPLAY ERROR INWORLD
954 string text = FormatException(e); 954 string text = FormatException(e);
@@ -1217,7 +1217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1217 1217
1218 return null; 1218 return null;
1219 } 1219 }
1220 1220
1221 public override string ToString() 1221 public override string ToString()
1222 { 1222 {
1223 return String.Format("{0} {1} on {2}", ScriptName, ItemID, PrimName); 1223 return String.Format("{0} {1} on {2}", ScriptName, ItemID, PrimName);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
index 5b9794b..8138117 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
79 m_xEngine.DebugLevel = 1; 79 m_xEngine.DebugLevel = 1;
80 80
81 IniConfigSource configSource = new IniConfigSource(); 81 IniConfigSource configSource = new IniConfigSource();
82 82
83 IConfig startupConfig = configSource.AddConfig("Startup"); 83 IConfig startupConfig = configSource.AddConfig("Startup");
84 startupConfig.Set("DefaultScriptEngine", "XEngine"); 84 startupConfig.Set("DefaultScriptEngine", "XEngine");
85 85
@@ -124,9 +124,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
124 TestHelpers.InMethod(); 124 TestHelpers.InMethod();
125// TestHelpers.EnableLogging(); 125// TestHelpers.EnableLogging();
126 126
127 string script = 127 string script =
128@"default 128@"default
129{ 129{
130 state_entry() 130 state_entry()
131 { 131 {
132 llSay(0, ""Thin Lizzy""); 132 llSay(0, ""Thin Lizzy"");
@@ -143,12 +143,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
143 TestHelpers.InMethod(); 143 TestHelpers.InMethod();
144// TestHelpers.EnableLogging(); 144// TestHelpers.EnableLogging();
145 145
146 string script = 146 string script =
147@"default 147@"default
148{ 148{
149 state_entry() 149 state_entry()
150 { 150 {
151 integer i = 0; 151 integer i = 0;
152 for (i = 0; i <= 1; i++) llSay(0, ""Iter "" + (string)i); 152 for (i = 0; i <= 1; i++) llSay(0, ""Iter "" + (string)i);
153 } 153 }
154}"; 154}";
@@ -162,14 +162,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
162 TestHelpers.InMethod(); 162 TestHelpers.InMethod();
163// TestHelpers.EnableLogging(); 163// TestHelpers.EnableLogging();
164 164
165 string script = 165 string script =
166@"default 166@"default
167{ 167{
168 state_entry() 168 state_entry()
169 { 169 {
170 integer i = 0; 170 integer i = 0;
171 llSay(0, ""Thin Lizzy""); 171 llSay(0, ""Thin Lizzy"");
172 172
173 for (i = 0; i < 2147483647; i++) llSay(0, ""Iter "" + (string)i); 173 for (i = 0; i < 2147483647; i++) llSay(0, ""Iter "" + (string)i);
174 } 174 }
175}"; 175}";
@@ -183,15 +183,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
183 TestHelpers.InMethod(); 183 TestHelpers.InMethod();
184// TestHelpers.EnableLogging(); 184// TestHelpers.EnableLogging();
185 185
186 string script = 186 string script =
187@"default 187@"default
188{ 188{
189 state_entry() 189 state_entry()
190 { 190 {
191 integer i = 0; 191 integer i = 0;
192 llSay(0, ""Thin Lizzy""); 192 llSay(0, ""Thin Lizzy"");
193 193
194 for (i = 0; i < 2147483647; i++) 194 for (i = 0; i < 2147483647; i++)
195 { 195 {
196 llSay(0, ""Iter "" + (string)i); 196 llSay(0, ""Iter "" + (string)i);
197 } 197 }
@@ -207,12 +207,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
207 TestHelpers.InMethod(); 207 TestHelpers.InMethod();
208// TestHelpers.EnableLogging(); 208// TestHelpers.EnableLogging();
209 209
210 string script = 210 string script =
211@"default 211@"default
212{ 212{
213 state_entry() 213 state_entry()
214 { 214 {
215 integer i = 0; 215 integer i = 0;
216 while (i < 2) llSay(0, ""Iter "" + (string)i++); 216 while (i < 2) llSay(0, ""Iter "" + (string)i++);
217 } 217 }
218}"; 218}";
@@ -226,15 +226,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
226 TestHelpers.InMethod(); 226 TestHelpers.InMethod();
227// TestHelpers.EnableLogging(); 227// TestHelpers.EnableLogging();
228 228
229 string script = 229 string script =
230@"default 230@"default
231{ 231{
232 state_entry() 232 state_entry()
233 { 233 {
234 integer i = 0; 234 integer i = 0;
235 llSay(0, ""Thin Lizzy""); 235 llSay(0, ""Thin Lizzy"");
236 236
237 while (1 == 1) 237 while (1 == 1)
238 llSay(0, ""Iter "" + (string)i++); 238 llSay(0, ""Iter "" + (string)i++);
239 } 239 }
240}"; 240}";
@@ -248,15 +248,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
248 TestHelpers.InMethod(); 248 TestHelpers.InMethod();
249// TestHelpers.EnableLogging(); 249// TestHelpers.EnableLogging();
250 250
251 string script = 251 string script =
252@"default 252@"default
253{ 253{
254 state_entry() 254 state_entry()
255 { 255 {
256 integer i = 0; 256 integer i = 0;
257 llSay(0, ""Thin Lizzy""); 257 llSay(0, ""Thin Lizzy"");
258 258
259 while (1 == 1) 259 while (1 == 1)
260 { 260 {
261 llSay(0, ""Iter "" + (string)i++); 261 llSay(0, ""Iter "" + (string)i++);
262 } 262 }
@@ -272,9 +272,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
272 TestHelpers.InMethod(); 272 TestHelpers.InMethod();
273// TestHelpers.EnableLogging(); 273// TestHelpers.EnableLogging();
274 274
275 string script = 275 string script =
276@"default 276@"default
277{ 277{
278 state_entry() 278 state_entry()
279 { 279 {
280 integer i = 0; 280 integer i = 0;
@@ -293,9 +293,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
293 TestHelpers.InMethod(); 293 TestHelpers.InMethod();
294// TestHelpers.EnableLogging(); 294// TestHelpers.EnableLogging();
295 295
296 string script = 296 string script =
297@"default 297@"default
298{ 298{
299 state_entry() 299 state_entry()
300 { 300 {
301 integer i = 0; 301 integer i = 0;
@@ -315,15 +315,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
315 TestHelpers.InMethod(); 315 TestHelpers.InMethod();
316// TestHelpers.EnableLogging(); 316// TestHelpers.EnableLogging();
317 317
318 string script = 318 string script =
319@"default 319@"default
320{ 320{
321 state_entry() 321 state_entry()
322 { 322 {
323 integer i = 0; 323 integer i = 0;
324 llSay(0, ""Thin Lizzy""); 324 llSay(0, ""Thin Lizzy"");
325 325
326 do 326 do
327 { 327 {
328 llSay(0, ""Iter "" + (string)i++); 328 llSay(0, ""Iter "" + (string)i++);
329 } while (1 == 1); 329 } while (1 == 1);
@@ -339,15 +339,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
339 TestHelpers.InMethod(); 339 TestHelpers.InMethod();
340 TestHelpers.EnableLogging(); 340 TestHelpers.EnableLogging();
341 341
342 string script = 342 string script =
343@"default 343@"default
344{ 344{
345 state_entry() 345 state_entry()
346 { 346 {
347 integer i = 0; 347 integer i = 0;
348 llSay(0, ""Thin Lizzy""); 348 llSay(0, ""Thin Lizzy"");
349 349
350 @p1; 350 @p1;
351 llSay(0, ""Iter "" + (string)i++); 351 llSay(0, ""Iter "" + (string)i++);
352 jump p1; 352 jump p1;
353 } 353 }
@@ -364,7 +364,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests
364 TestHelpers.InMethod(); 364 TestHelpers.InMethod();
365// TestHelpers.EnableLogging(); 365// TestHelpers.EnableLogging();
366 366
367 string script = 367 string script =
368@" 368@"
369integer i = 0; 369integer i = 0;
370 370
@@ -375,7 +375,7 @@ ufn1()
375} 375}
376 376
377default 377default
378{ 378{
379 state_entry() 379 state_entry()
380 { 380 {
381 integer i = 0; 381 integer i = 0;
@@ -396,9 +396,9 @@ default
396 TestHelpers.InMethod(); 396 TestHelpers.InMethod();
397// TestHelpers.EnableLogging(); 397// TestHelpers.EnableLogging();
398 398
399 string script = 399 string script =
400@"default 400@"default
401{ 401{
402 state_entry() 402 state_entry()
403 { 403 {
404 integer i = 0; 404 integer i = 0;
@@ -417,7 +417,7 @@ default
417// UUID objectId = TestHelpers.ParseTail(0x100); 417// UUID objectId = TestHelpers.ParseTail(0x100);
418// UUID itemId = TestHelpers.ParseTail(0x3); 418// UUID itemId = TestHelpers.ParseTail(0x3);
419 419
420 SceneObjectGroup so 420 SceneObjectGroup so
421 = SceneHelpers.CreateSceneObject(1, userId, string.Format("Object for {0}", itemName), 0x100); 421 = SceneHelpers.CreateSceneObject(1, userId, string.Format("Object for {0}", itemName), 0x100);
422 m_scene.AddNewSceneObject(so, true); 422 m_scene.AddNewSceneObject(so, true);
423 423
@@ -505,7 +505,7 @@ default
505 505
506 if (++m_chatMessagesReceived >= m_chatMessagesThreshold) 506 if (++m_chatMessagesReceived >= m_chatMessagesThreshold)
507 { 507 {
508 m_scene.EventManager.OnChatFromWorld -= OnChatFromWorld; 508 m_scene.EventManager.OnChatFromWorld -= OnChatFromWorld;
509 m_chatEvent.Set(); 509 m_chatEvent.Set();
510 } 510 }
511 } 511 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 738a814..f16fd01 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1495,7 +1495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1495 return false; 1495 return false;
1496 } 1496 }
1497 } 1497 }
1498 1498
1499 public static bool operator true(key k) 1499 public static bool operator true(key k)
1500 { 1500 {
1501 return (Boolean)k; 1501 return (Boolean)k;
@@ -1575,7 +1575,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1575 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value); 1575 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value);
1576 m_string = s; 1576 m_string = s;
1577 } 1577 }
1578 1578
1579 public LSLString(int i) 1579 public LSLString(int i)
1580 { 1580 {
1581 string s = String.Format("{0}", i); 1581 string s = String.Format("{0}", i);
@@ -1583,7 +1583,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1583 } 1583 }
1584 1584
1585 public LSLString(LSLInteger i) : this(i.value) {} 1585 public LSLString(LSLInteger i) : this(i.value) {}
1586 1586
1587 #endregion 1587 #endregion
1588 1588
1589 #region Operators 1589 #region Operators
@@ -1648,7 +1648,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1648 { 1648 {
1649 return new LSLString(d); 1649 return new LSLString(d);
1650 } 1650 }
1651 1651
1652 static public explicit operator LSLString(int i) 1652 static public explicit operator LSLString(int i)
1653 { 1653 {
1654 return new LSLString(i); 1654 return new LSLString(i);
@@ -1936,7 +1936,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1936 return false; 1936 return false;
1937 } 1937 }
1938 } 1938 }
1939 1939
1940 return value == ((LSLInteger)o).value; 1940 return value == ((LSLInteger)o).value;
1941 } 1941 }
1942 1942
diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
index d08b0a6..a5362a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
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.Region.ScriptEngine.Shared")] 8[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
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
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
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//
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
index 30dc4cd..4dc8fc6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
112 public void TearDown() 112 public void TearDown()
113 { 113 {
114 MainServer.Instance.Stop(); 114 MainServer.Instance.Stop();
115 } 115 }
116 116
117 [Test] 117 [Test]
118 public void TestLlReleaseUrl() 118 public void TestLlReleaseUrl()
@@ -204,8 +204,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
204 // Check that request to URL works. 204 // Check that request to URL works.
205 string testResponse = "Hello World"; 205 string testResponse = "Hello World";
206 206
207 m_engine.ClearPostedEvents(); 207 m_engine.ClearPostedEvents();
208 m_engine.PostEventHook 208 m_engine.PostEventHook
209 += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); 209 += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse);
210 210
211// Console.WriteLine("Trying {0}", returnedUri); 211// Console.WriteLine("Trying {0}", returnedUri);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
index 9b7cab2..d652b0d1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs
@@ -160,7 +160,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
160 // Item has copy permissions so original should stay intact. 160 // Item has copy permissions so original should stay intact.
161 List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems(); 161 List<TaskInventoryItem> originalItems = so1.RootPart.Inventory.GetInventoryItems();
162 Assert.That(originalItems.Count, Is.EqualTo(1)); 162 Assert.That(originalItems.Count, Is.EqualTo(1));
163 163
164 // Should now have copied. 164 // Should now have copied.
165 List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName); 165 List<TaskInventoryItem> copiedItems = so2.RootPart.Inventory.GetInventoryItems(inventoryItemName);
166 Assert.That(copiedItems.Count, Is.EqualTo(1)); 166 Assert.That(copiedItems.Count, Is.EqualTo(1));
@@ -194,7 +194,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
194 194
195 api.llGiveInventory(user2Id.ToString(), inventoryItemName); 195 api.llGiveInventory(user2Id.ToString(), inventoryItemName);
196 196
197 InventoryItemBase receivedItem 197 InventoryItemBase receivedItem
198 = UserInventoryHelpers.GetInventoryItem( 198 = UserInventoryHelpers.GetInventoryItem(
199 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); 199 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName));
200 200
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
222 222
223 // Create an object embedded inside the first 223 // Create an object embedded inside the first
224 UUID itemId = TestHelpers.ParseTail(0x20); 224 UUID itemId = TestHelpers.ParseTail(0x20);
225 TaskInventoryItem tii 225 TaskInventoryItem tii
226 = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); 226 = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id);
227 tii.NextPermissions &= ~((uint)PermissionMask.Modify); 227 tii.NextPermissions &= ~((uint)PermissionMask.Modify);
228 228
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
230 230
231 api.llGiveInventory(user2Id.ToString(), inventoryItemName); 231 api.llGiveInventory(user2Id.ToString(), inventoryItemName);
232 232
233 InventoryItemBase receivedItem 233 InventoryItemBase receivedItem
234 = UserInventoryHelpers.GetInventoryItem( 234 = UserInventoryHelpers.GetInventoryItem(
235 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); 235 m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName));
236 236
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
index 14b1890..435a95f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs
@@ -127,7 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
127 TaskInventoryItem grp1Item 127 TaskInventoryItem grp1Item
128 = TaskInventoryHelpers.AddNotecard( 128 = TaskInventoryHelpers.AddNotecard(
129 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 129 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
130 130
131 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; 131 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
132 132
133 LSL_Api apiGrp1 = new LSL_Api(); 133 LSL_Api apiGrp1 = new LSL_Api();
@@ -156,7 +156,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
156 TaskInventoryItem grp1Item 156 TaskInventoryItem grp1Item
157 = TaskInventoryHelpers.AddNotecard( 157 = TaskInventoryHelpers.AddNotecard(
158 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); 158 m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!");
159 159
160 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; 160 grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS;
161 161
162 LSL_Api apiGrp1 = new LSL_Api(); 162 LSL_Api apiGrp1 = new LSL_Api();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
index 34a29e6..f978138 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs
@@ -37,7 +37,7 @@ using OpenSim.Region.ScriptEngine.Shared.Api;
37using OpenSim.Region.ScriptEngine.Shared.Instance; 37using OpenSim.Region.ScriptEngine.Shared.Instance;
38using OpenSim.Region.ScriptEngine.Shared.ScriptBase; 38using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
39using OpenMetaverse; 39using OpenMetaverse;
40 40
41using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; 41using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
42using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; 42using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
43using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; 43using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
69 m_lslApi = new LSL_Api(); 69 m_lslApi = new LSL_Api();
70 m_lslApi.Initialize(engine, part, null); 70 m_lslApi.Initialize(engine, part, null);
71 } 71 }
72 72
73 [Test] 73 [Test]
74 public void TestllListFindList() 74 public void TestllListFindList()
75 { 75 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
index 9ab3115..a341311 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
76 76
77 string[] ncLines = { "One", "Twoè", "Three" }; 77 string[] ncLines = { "One", "Twoè", "Three" };
78 78
79 TaskInventoryItem ncItem 79 TaskInventoryItem ncItem
80 = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines)); 80 = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines));
81 81
82 AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]); 82 AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]);
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
111 { 111 {
112 string key = m_lslApi.llGetNotecardLine(ncName, lineNumber); 112 string key = m_lslApi.llGetNotecardLine(ncName, lineNumber);
113 Assert.That(key, Is.Not.EqualTo(UUID.Zero.ToString())); 113 Assert.That(key, Is.Not.EqualTo(UUID.Zero.ToString()));
114 114
115 Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(1)); 115 Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(1));
116 Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); 116 Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID));
117 117
@@ -223,8 +223,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
223// // Check that request to URL works. 223// // Check that request to URL works.
224// string testResponse = "Hello World"; 224// string testResponse = "Hello World";
225// 225//
226// m_engine.ClearPostedEvents(); 226// m_engine.ClearPostedEvents();
227// m_engine.PostEventHook 227// m_engine.PostEventHook
228// += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); 228// += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse);
229// 229//
230//// Console.WriteLine("Trying {0}", returnedUri); 230//// Console.WriteLine("Trying {0}", returnedUri);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
index d957bf2..b994901 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
93 93
94 // Check simple 1 prim case 94 // Check simple 1 prim case
95 { 95 {
96 LSL_List resList 96 LSL_List resList
97 = apiGrp1.llGetLinkPrimitiveParams(1, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 97 = apiGrp1.llGetLinkPrimitiveParams(1, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
98 98
99 Assert.That(resList.Length, Is.EqualTo(1)); 99 Assert.That(resList.Length, Is.EqualTo(1));
@@ -101,11 +101,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
101 101
102 // Check 2 prim case 102 // Check 2 prim case
103 { 103 {
104 LSL_List resList 104 LSL_List resList
105 = apiGrp1.llGetLinkPrimitiveParams( 105 = apiGrp1.llGetLinkPrimitiveParams(
106 1, 106 1,
107 new LSL_List( 107 new LSL_List(
108 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 108 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
109 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 109 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
110 new LSL_Integer(2), 110 new LSL_Integer(2),
111 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 111 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
115 115
116 // Check invalid parameters are ignored 116 // Check invalid parameters are ignored
117 { 117 {
118 LSL_List resList 118 LSL_List resList
119 = apiGrp1.llGetLinkPrimitiveParams(3, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 119 = apiGrp1.llGetLinkPrimitiveParams(3, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
120 120
121 Assert.That(resList.Length, Is.EqualTo(0)); 121 Assert.That(resList.Length, Is.EqualTo(0));
@@ -123,11 +123,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
123 123
124 // Check all parameters are ignored if an initial bad link is given 124 // Check all parameters are ignored if an initial bad link is given
125 { 125 {
126 LSL_List resList 126 LSL_List resList
127 = apiGrp1.llGetLinkPrimitiveParams( 127 = apiGrp1.llGetLinkPrimitiveParams(
128 3, 128 3,
129 new LSL_List( 129 new LSL_List(
130 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 130 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
131 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 131 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
132 new LSL_Integer(1), 132 new LSL_Integer(1),
133 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 133 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -137,11 +137,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
137 137
138 // Check only subsequent parameters are ignored when we hit the first bad link number 138 // Check only subsequent parameters are ignored when we hit the first bad link number
139 { 139 {
140 LSL_List resList 140 LSL_List resList
141 = apiGrp1.llGetLinkPrimitiveParams( 141 = apiGrp1.llGetLinkPrimitiveParams(
142 1, 142 1,
143 new LSL_List( 143 new LSL_List(
144 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), 144 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION),
145 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), 145 new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET),
146 new LSL_Integer(3), 146 new LSL_Integer(3),
147 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); 147 new LSL_Integer(ScriptBaseClass.PRIM_ROTATION)));
@@ -197,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
197 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut 197 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut
198 0.90f, // Prim hollow 198 0.90f, // Prim hollow
199 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist 199 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist
200 new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper 200 new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper
201 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 201 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
202 0.90f); // Prim hollow check 202 0.90f); // Prim hollow check
203 203
@@ -211,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
211 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut 211 new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut
212 0.99f, // Prim hollow 212 0.99f, // Prim hollow
213 new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist 213 new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist
214 new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper 214 new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper
215 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 215 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
216 0.99f); // Prim hollow check 216 0.99f); // Prim hollow check
217 217
@@ -252,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
252 new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist 252 new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist
253 // Expression for y selected to test precision problems during sbyte 253 // Expression for y selected to test precision problems during sbyte
254 // cast in SetPrimitiveShapeParams. 254 // cast in SetPrimitiveShapeParams.
255 new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper 255 new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper
256 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear 256 new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear
257 0.70f); // Prim hollow check 257 0.70f); // Prim hollow check
258 258
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index d929da8..98800d0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -88,19 +88,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
88 CheckllAngleBetween(new Vector3(1, 1, 1), 0, 1, 1); 88 CheckllAngleBetween(new Vector3(1, 1, 1), 0, 1, 1);
89 CheckllAngleBetween(new Vector3(1, 1, 1), 90, 1, 1); 89 CheckllAngleBetween(new Vector3(1, 1, 1), 90, 1, 1);
90 CheckllAngleBetween(new Vector3(1, 1, 1), 180, 1, 1); 90 CheckllAngleBetween(new Vector3(1, 1, 1), 180, 1, 1);
91 91
92 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1.6f, 1.8f); 92 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1.6f, 1.8f);
93 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 0.3f, 3.9f); 93 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 0.3f, 3.9f);
94 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 8.8f, 7.4f); 94 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 8.8f, 7.4f);
95 95
96 CheckllAngleBetween(new Vector3(0, 1, 0), 0, 9.8f, -9.4f); 96 CheckllAngleBetween(new Vector3(0, 1, 0), 0, 9.8f, -9.4f);
97 CheckllAngleBetween(new Vector3(0, 1, 0), 90, 8.4f, -8.2f); 97 CheckllAngleBetween(new Vector3(0, 1, 0), 90, 8.4f, -8.2f);
98 CheckllAngleBetween(new Vector3(0, 1, 0), 180, 0.4f, -5.8f); 98 CheckllAngleBetween(new Vector3(0, 1, 0), 180, 0.4f, -5.8f);
99 99
100 CheckllAngleBetween(new Vector3(0, 0, 1), 0, -6.8f, 3.4f); 100 CheckllAngleBetween(new Vector3(0, 0, 1), 0, -6.8f, 3.4f);
101 CheckllAngleBetween(new Vector3(0, 0, 1), 90, -3.6f, 5.6f); 101 CheckllAngleBetween(new Vector3(0, 0, 1), 90, -3.6f, 5.6f);
102 CheckllAngleBetween(new Vector3(0, 0, 1), 180, -3.8f, 1.1f); 102 CheckllAngleBetween(new Vector3(0, 0, 1), 180, -3.8f, 1.1f);
103 103
104 CheckllAngleBetween(new Vector3(1, 1, 1), 0, -7.7f, -2.0f); 104 CheckllAngleBetween(new Vector3(1, 1, 1), 0, -7.7f, -2.0f);
105 CheckllAngleBetween(new Vector3(1, 1, 1), 90, -3.0f, -9.1f); 105 CheckllAngleBetween(new Vector3(1, 1, 1), 90, -3.0f, -9.1f);
106 CheckllAngleBetween(new Vector3(1, 1, 1), 180, -7.9f, -8.0f); 106 CheckllAngleBetween(new Vector3(1, 1, 1), 180, -7.9f, -8.0f);
@@ -246,7 +246,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
246 LSL_Types.Quaternion newRot = m_lslApi.llEuler2Rot(eulerCalc); 246 LSL_Types.Quaternion newRot = m_lslApi.llEuler2Rot(eulerCalc);
247 // Multiple original quaternion by conjugate of quaternion calculated with angles. 247 // Multiple original quaternion by conjugate of quaternion calculated with angles.
248 LSL_Types.Quaternion check = rot * new LSL_Types.Quaternion(-newRot.x, -newRot.y, -newRot.z, newRot.s); 248 LSL_Types.Quaternion check = rot * new LSL_Types.Quaternion(-newRot.x, -newRot.y, -newRot.z, newRot.s);
249 249
250 Assert.AreEqual(0.0, check.x, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler X bounds check fail"); 250 Assert.AreEqual(0.0, check.x, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler X bounds check fail");
251 Assert.AreEqual(0.0, check.y, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Y bounds check fail"); 251 Assert.AreEqual(0.0, check.y, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Y bounds check fail");
252 Assert.AreEqual(0.0, check.z, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Z bounds check fail"); 252 Assert.AreEqual(0.0, check.z, VECTOR_COMPONENT_ACCURACY, "TestllRot2Euler Z bounds check fail");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
index c8c7f82..b2396fa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
155 m_stringDoubleSet.Add("1ef", 1.0); 155 m_stringDoubleSet.Add("1ef", 1.0);
156 m_stringDoubleSet.Add("e10", 0.0); 156 m_stringDoubleSet.Add("e10", 0.0);
157 m_stringDoubleSet.Add("1.e0.0", 1.0); 157 m_stringDoubleSet.Add("1.e0.0", 1.0);
158 158
159 m_doubleStringSet = new Dictionary<double, string>(); 159 m_doubleStringSet = new Dictionary<double, string>();
160 m_doubleStringSet.Add(2.0, "2.000000"); 160 m_doubleStringSet.Add(2.0, "2.000000");
161 m_doubleStringSet.Add(-2.0, "-2.000000"); 161 m_doubleStringSet.Add(-2.0, "-2.000000");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
index c664108..2bd684f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
131 public void TestImplicitCastBooleanToLSLInteger() 131 public void TestImplicitCastBooleanToLSLInteger()
132 { 132 {
133 TestHelpers.InMethod(); 133 TestHelpers.InMethod();
134 134
135 LSL_Types.LSLInteger testInteger; 135 LSL_Types.LSLInteger testInteger;
136 136
137 testInteger = (1 == 0); 137 testInteger = (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
index 8550f2d..0159b9e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
125 public void TestImplicitCastBooleanToLSLFloat() 125 public void TestImplicitCastBooleanToLSLFloat()
126 { 126 {
127 TestHelpers.InMethod(); 127 TestHelpers.InMethod();
128 128
129 LSL_Types.LSLString testString; 129 LSL_Types.LSLString testString;
130 130
131 testString = (LSL_Types.LSLString) (1 == 0); 131 testString = (LSL_Types.LSLString) (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
index 99bff83..6936191 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
@@ -296,7 +296,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
296 string npcRaw 296 string npcRaw
297 = osslApi.osNpcCreate( 297 = osslApi.osNpcCreate(
298 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_CREATOR_OWNED); 298 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_CREATOR_OWNED);
299 299
300 otherOsslApi.osNpcRemove(npcRaw); 300 otherOsslApi.osNpcRemove(npcRaw);
301 301
302 // Should still be around 302 // Should still be around
@@ -340,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
340 string npcRaw 340 string npcRaw
341 = osslApi.osNpcCreate( 341 = osslApi.osNpcCreate(
342 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_NOT_OWNED); 342 "Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), notecardName, ScriptBaseClass.OS_NPC_NOT_OWNED);
343 343
344 osslApi.osNpcRemove(npcRaw); 344 osslApi.osNpcRemove(npcRaw);
345 345
346 UUID npcId = new UUID(npcRaw); 346 UUID npcId = new UUID(npcRaw);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
index f4211c8..80d9e2a 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.ScriptBase
44 /// <summary> 44 /// <summary>
45 /// Used for script sleeps when we are using co-operative script termination. 45 /// Used for script sleeps when we are using co-operative script termination.
46 /// </summary> 46 /// </summary>
47 /// <remarks>null if co-operative script termination is not active</remarks> 47 /// <remarks>null if co-operative script termination is not active</remarks>
48 WaitHandle m_coopSleepHandle; 48 WaitHandle m_coopSleepHandle;
49 49
50 public XEngineScriptBase(WaitHandle coopSleepHandle) : base() 50 public XEngineScriptBase(WaitHandle coopSleepHandle) : base()
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index 301eada..55a77bc 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
79 } 79 }
80 80
81 /// <summary> 81 /// <summary>
82 /// When an object gets paid by an avatar and generates the paid event, 82 /// When an object gets paid by an avatar and generates the paid event,
83 /// this will pipe it to the script engine 83 /// this will pipe it to the script engine
84 /// </summary> 84 /// </summary>
85 /// <param name="objectID">Object ID that got paid</param> 85 /// <param name="objectID">Object ID that got paid</param>
@@ -413,7 +413,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
413 return; 413 return;
414 414
415 foreach(SceneObjectPart part in grp.Parts) 415 foreach(SceneObjectPart part in grp.Parts)
416 { 416 {
417 myScriptEngine.PostObjectEvent(part.LocalId, new EventParams( 417 myScriptEngine.PostObjectEvent(part.LocalId, new EventParams(
418 "attach",new object[] { 418 "attach",new object[] {
419 new LSL_Types.LSLString(avatar.ToString()) }, 419 new LSL_Types.LSLString(avatar.ToString()) },
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
index a2b030d..b3fedcb 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4using Mono.Addins; 4using Mono.Addins;
5 5
6// General Information about an assembly is controlled through the following 6// General Information about an assembly is controlled through the following
7// set of attributes. Change these attribute values to modify the information 7// set of attributes. Change these attribute values to modify the information
8// associated with an assembly. 8// associated with an assembly.
9[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.XEngine")] 9[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.XEngine")]
@@ -15,8 +15,8 @@ using Mono.Addins;
15[assembly: AssemblyTrademark("")] 15[assembly: AssemblyTrademark("")]
16[assembly: AssemblyCulture("")] 16[assembly: AssemblyCulture("")]
17 17
18// Setting ComVisible to false makes the types in this assembly not visible 18// Setting ComVisible to false makes the types in this assembly not visible
19// to COM components. If you need to access a type in this assembly from 19// to COM components. If you need to access a type in this assembly from
20// COM, set the ComVisible attribute to true on that type. 20// COM, set the ComVisible attribute to true on that type.
21[assembly: ComVisible(false)] 21[assembly: ComVisible(false)]
22 22
@@ -26,7 +26,7 @@ using Mono.Addins;
26// Version information for an assembly consists of the following four values: 26// Version information for an assembly consists of the following four values:
27// 27//
28// Major Version 28// Major Version
29// Minor Version 29// Minor Version
30// Build Number 30// Build Number
31// Revision 31// Revision
32// 32//
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
index 878e571..71ef0ac 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
58 m_xEngine = new XEngine(); 58 m_xEngine = new XEngine();
59 59
60 IniConfigSource configSource = new IniConfigSource(); 60 IniConfigSource configSource = new IniConfigSource();
61 61
62 IConfig startupConfig = configSource.AddConfig("Startup"); 62 IConfig startupConfig = configSource.AddConfig("Startup");
63 startupConfig.Set("DefaultScriptEngine", "XEngine"); 63 startupConfig.Set("DefaultScriptEngine", "XEngine");
64 64
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
index c977285..477059f 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs
@@ -126,11 +126,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests
126 OSChatMessage messageReceived = null; 126 OSChatMessage messageReceived = null;
127 sceneA.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); }; 127 sceneA.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); };
128 128
129 sceneA.RezNewScript(userId, scriptItemSceneA, 129 sceneA.RezNewScript(userId, scriptItemSceneA,
130@"integer c = 0; 130@"integer c = 0;
131 131
132default 132default
133{ 133{
134 state_entry() 134 state_entry()
135 { 135 {
136 llSay(0, ""Script running""); 136 llSay(0, ""Script running"");
@@ -143,7 +143,7 @@ default
143 143
144 touch_start(integer n) 144 touch_start(integer n)
145 { 145 {
146 c = c + 1; 146 c = c + 1;
147 llSay(0, (string)c); 147 llSay(0, (string)c);
148 } 148 }
149}"); 149}");
@@ -151,7 +151,7 @@ default
151 chatEvent.WaitOne(60000); 151 chatEvent.WaitOne(60000);
152 152
153 Assert.That(messageReceived, Is.Not.Null, "No chat message received."); 153 Assert.That(messageReceived, Is.Not.Null, "No chat message received.");
154 Assert.That(messageReceived.Message, Is.EqualTo("Script running")); 154 Assert.That(messageReceived.Message, Is.EqualTo("Script running"));
155 155
156 { 156 {
157 // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead. 157 // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead.
@@ -167,7 +167,7 @@ default
167 xEngineA.PostObjectEvent(soSceneA.LocalId, ep); 167 xEngineA.PostObjectEvent(soSceneA.LocalId, ep);
168 chatEvent.WaitOne(60000); 168 chatEvent.WaitOne(60000);
169 169
170 Assert.That(messageReceived.Message, Is.EqualTo("1")); 170 Assert.That(messageReceived.Message, Is.EqualTo("1"));
171 } 171 }
172 172
173 AutoResetEvent chatEventB = new AutoResetEvent(false); 173 AutoResetEvent chatEventB = new AutoResetEvent(false);
@@ -181,7 +181,7 @@ default
181 chatEventB.WaitOne(60000); 181 chatEventB.WaitOne(60000);
182 Assert.That(messageReceived, Is.Not.Null, "No Changed message received."); 182 Assert.That(messageReceived, Is.Not.Null, "No Changed message received.");
183 Assert.That(messageReceived.Message, Is.Not.Null, "Changed message without content"); 183 Assert.That(messageReceived.Message, Is.Not.Null, "Changed message without content");
184 Assert.That(messageReceived.Message, Is.EqualTo("Changed")); 184 Assert.That(messageReceived.Message, Is.EqualTo("Changed"));
185 185
186 // TEST sending event to moved prim and output 186 // TEST sending event to moved prim and output
187 { 187 {
@@ -202,7 +202,7 @@ default
202 xEngineB.PostObjectEvent(soSceneB.LocalId, ep); 202 xEngineB.PostObjectEvent(soSceneB.LocalId, ep);
203 chatEventB.WaitOne(60000); 203 chatEventB.WaitOne(60000);
204 204
205 Assert.That(messageReceived.Message, Is.EqualTo("2")); 205 Assert.That(messageReceived.Message, Is.EqualTo("2"));
206 } 206 }
207 } 207 }
208 } 208 }
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 7822df9..cd5308d 100755
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -131,9 +131,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
131 /// It appears that if a script thread is aborted whilst it is holding ReaderWriterLockSlim (possibly the write 131 /// It appears that if a script thread is aborted whilst it is holding ReaderWriterLockSlim (possibly the write
132 /// lock) then the lock is not properly released. This causes mono 2.6, 2.10 and possibly 132 /// lock) then the lock is not properly released. This causes mono 2.6, 2.10 and possibly
133 /// later to crash, sometimes with symptoms such as a leap to 100% script usage and a vm thead dump showing 133 /// later to crash, sometimes with symptoms such as a leap to 100% script usage and a vm thead dump showing
134 /// all threads waiting on release of ReaderWriterLockSlim write thread which none of the threads listed 134 /// all threads waiting on release of ReaderWriterLockSlim write thread which none of the threads listed
135 /// actually hold. 135 /// actually hold.
136 /// 136 ///
137 /// Pausing for event completion reduces the risk of this happening. However, it may be that aborting threads 137 /// Pausing for event completion reduces the risk of this happening. However, it may be that aborting threads
138 /// is not a mono issue per se but rather a risky activity in itself in an AppDomain that is not immediately 138 /// is not a mono issue per se but rather a risky activity in itself in an AppDomain that is not immediately
139 /// shutting down. 139 /// shutting down.
@@ -307,7 +307,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
307 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); 307 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
308 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false); 308 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
309 m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000; 309 m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000;
310 m_WaitForEventCompletionOnScriptStop 310 m_WaitForEventCompletionOnScriptStop
311 = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop); 311 = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop);
312 312
313 m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); 313 m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines");
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
507 { 507 {
508 string rawItemId; 508 string rawItemId;
509 UUID itemId = UUID.Zero; 509 UUID itemId = UUID.Zero;
510 510
511 if (cmdparams.Length == 2) 511 if (cmdparams.Length == 2)
512 { 512 {
513 IEnumerable<IScriptInstance> scripts = m_Scripts.Values; 513 IEnumerable<IScriptInstance> scripts = m_Scripts.Values;
@@ -520,17 +520,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
520 520
521 return; 521 return;
522 } 522 }
523 523
524 for (int i = 2; i < cmdparams.Length; i++) 524 for (int i = 2; i < cmdparams.Length; i++)
525 { 525 {
526 rawItemId = cmdparams[i]; 526 rawItemId = cmdparams[i];
527 527
528 if (!UUID.TryParse(rawItemId, out itemId)) 528 if (!UUID.TryParse(rawItemId, out itemId))
529 { 529 {
530 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid UUID", rawItemId); 530 MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid UUID", rawItemId);
531 continue; 531 continue;
532 } 532 }
533 533
534 if (itemId != UUID.Zero) 534 if (itemId != UUID.Zero)
535 { 535 {
536 IScriptInstance instance = GetInstance(itemId); 536 IScriptInstance instance = GetInstance(itemId);
@@ -816,7 +816,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
816 { 816 {
817 if (!m_Enabled) 817 if (!m_Enabled)
818 return; 818 return;
819 819
820 lock (m_ScriptEngines) 820 lock (m_ScriptEngines)
821 { 821 {
822 if (m_ScriptEngines.Contains(this)) 822 if (m_ScriptEngines.Contains(this))
@@ -978,14 +978,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
978 SceneObjectPart part = 978 SceneObjectPart part =
979 m_Scene.GetSceneObjectPart( 979 m_Scene.GetSceneObjectPart(
980 localID); 980 localID);
981 981
982 TaskInventoryItem item = 982 TaskInventoryItem item =
983 part.Inventory.GetInventoryItem(itemID); 983 part.Inventory.GetInventoryItem(itemID);
984 984
985 ScenePresence presence = 985 ScenePresence presence =
986 m_Scene.GetScenePresence( 986 m_Scene.GetScenePresence(
987 item.OwnerID); 987 item.OwnerID);
988 988
989 if (presence != null) 989 if (presence != null)
990 { 990 {
991 presence.ControllingClient.SendAgentAlertMessage( 991 presence.ControllingClient.SendAgentAlertMessage(
@@ -1073,8 +1073,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1073 { 1073 {
1074 m_log.Error( 1074 m_log.Error(
1075 string.Format( 1075 string.Format(
1076 "[XEngine]: Failure in DoOnRezScriptQueue() for item {0} in {1}. Continuing. Exception ", 1076 "[XEngine]: Failure in DoOnRezScriptQueue() for item {0} in {1}. Continuing. Exception ",
1077 o[1], m_Scene.Name), 1077 o[1], m_Scene.Name),
1078 e); 1078 e);
1079 } 1079 }
1080 } 1080 }
@@ -1091,7 +1091,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1091 } 1091 }
1092 finally 1092 finally
1093 { 1093 {
1094 // FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the 1094 // FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the
1095 // RegionReadyModule is not forever waiting. This event really needs a different name. 1095 // RegionReadyModule is not forever waiting. This event really needs a different name.
1096 m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, 1096 m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount,
1097 m_ScriptErrorMessage); 1097 m_ScriptErrorMessage);
@@ -1108,8 +1108,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1108 { 1108 {
1109 m_CurrentCompile = null; 1109 m_CurrentCompile = null;
1110 1110
1111 // This is to avoid a situation where the m_CompileQueue while loop above could complete but 1111 // This is to avoid a situation where the m_CompileQueue while loop above could complete but
1112 // OnRezScript() place a new script on the queue and check m_CurrentCompile = null before we hit 1112 // OnRezScript() place a new script on the queue and check m_CurrentCompile = null before we hit
1113 // this section. 1113 // this section.
1114 if (m_CompileQueue.Count > 0) 1114 if (m_CompileQueue.Count > 0)
1115 m_CurrentCompile = m_ThreadPool.QueueWorkItem(DoOnRezScriptQueue, null); 1115 m_CurrentCompile = m_ThreadPool.QueueWorkItem(DoOnRezScriptQueue, null);
@@ -1186,7 +1186,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1186 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assemblyPath, out linemap); 1186 m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assemblyPath, out linemap);
1187 1187
1188// m_log.DebugFormat( 1188// m_log.DebugFormat(
1189// "[XENGINE]: Found assembly path {0} onrez {1} in {2}", 1189// "[XENGINE]: Found assembly path {0} onrez {1} in {2}",
1190// assemblyPath, item.ItemID, World.Name); 1190// assemblyPath, item.ItemID, World.Name);
1191 1191
1192 if (!m_AddingAssemblies.ContainsKey(assemblyPath)) { 1192 if (!m_AddingAssemblies.ContainsKey(assemblyPath)) {
@@ -1239,7 +1239,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1239 catch (Exception e) 1239 catch (Exception e)
1240 { 1240 {
1241// m_log.ErrorFormat( 1241// m_log.ErrorFormat(
1242// "[XEngine]: Exception when rezzing script with item ID {0}, {1}{2}", 1242// "[XEngine]: Exception when rezzing script with item ID {0}, {1}{2}",
1243// itemID, e.Message, e.StackTrace); 1243// itemID, e.Message, e.StackTrace);
1244 1244
1245 // try 1245 // try
@@ -1280,7 +1280,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1280 } 1280 }
1281 1281
1282 // optionaly do not load a assembly on top of a lot of to release memory 1282 // optionaly do not load a assembly on top of a lot of to release memory
1283 // only if logins disable since causes a lot of rubber banding 1283 // only if logins disable since causes a lot of rubber banding
1284 if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled) 1284 if(m_CompactMemOnLoad && !m_Scene.LoginsEnabled)
1285 GC.Collect(2); 1285 GC.Collect(2);
1286 1286
@@ -1323,7 +1323,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1323 { 1323 {
1324 sandbox = AppDomain.CurrentDomain; 1324 sandbox = AppDomain.CurrentDomain;
1325 } 1325 }
1326 1326
1327 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel(); 1327 //PolicyLevel sandboxPolicy = PolicyLevel.CreateAppDomainLevel();
1328 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition(); 1328 //AllMembershipCondition sandboxMembershipCondition = new AllMembershipCondition();
1329 //PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet"); 1329 //PermissionSet sandboxPermissionSet = sandboxPolicy.GetNamedPermissionSet("Internet");
@@ -1331,7 +1331,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1331 //CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement); 1331 //CodeGroup sandboxCodeGroup = new UnionCodeGroup(sandboxMembershipCondition, sandboxPolicyStatement);
1332 //sandboxPolicy.RootCodeGroup = sandboxCodeGroup; 1332 //sandboxPolicy.RootCodeGroup = sandboxCodeGroup;
1333 //sandbox.SetAppDomainPolicy(sandboxPolicy); 1333 //sandbox.SetAppDomainPolicy(sandboxPolicy);
1334 1334
1335 m_AppDomains[appDomain] = sandbox; 1335 m_AppDomains[appDomain] = sandbox;
1336 1336
1337 m_DomainScripts[appDomain] = new List<UUID>(); 1337 m_DomainScripts[appDomain] = new List<UUID>();
@@ -1341,7 +1341,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1341 m_log.ErrorFormat("[XEngine] Exception creating app domain:\n {0}", e.ToString()); 1341 m_log.ErrorFormat("[XEngine] Exception creating app domain:\n {0}", e.ToString());
1342 m_ScriptErrorMessage += "Exception creating app domain:\n"; 1342 m_ScriptErrorMessage += "Exception creating app domain:\n";
1343 m_ScriptFailCount++; 1343 m_ScriptFailCount++;
1344 lock (m_AddingAssemblies) 1344 lock (m_AddingAssemblies)
1345 { 1345 {
1346 m_AddingAssemblies[assemblyPath]--; 1346 m_AddingAssemblies[assemblyPath]--;
1347 } 1347 }
@@ -1364,14 +1364,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1364 { 1364 {
1365 coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset); 1365 coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset);
1366 1366
1367 scriptObj 1367 scriptObj
1368 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1368 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1369 assemblyName.FullName, 1369 assemblyName.FullName,
1370 "SecondLife.XEngineScript", 1370 "SecondLife.XEngineScript",
1371 false, 1371 false,
1372 BindingFlags.Default, 1372 BindingFlags.Default,
1373 null, 1373 null,
1374 new object[] { coopSleepHandle }, 1374 new object[] { coopSleepHandle },
1375 null, 1375 null,
1376 null); 1376 null);
1377 1377
@@ -1383,7 +1383,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1383 1383
1384 try 1384 try
1385 { 1385 {
1386 scriptObj 1386 scriptObj
1387 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1387 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1388 assemblyName.FullName, 1388 assemblyName.FullName,
1389 "SecondLife.Script", 1389 "SecondLife.Script",
@@ -1398,7 +1398,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1398 { 1398 {
1399 m_log.Error( 1399 m_log.Error(
1400 string.Format( 1400 string.Format(
1401 "[XENGINE]: Could not load previous SecondLife.Script from assembly {0} in {1}. Not starting. Exception ", 1401 "[XENGINE]: Could not load previous SecondLife.Script from assembly {0} in {1}. Not starting. Exception ",
1402 assemblyName.FullName, World.Name), 1402 assemblyName.FullName, World.Name),
1403 e2); 1403 e2);
1404 1404
@@ -1412,7 +1412,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1412 { 1412 {
1413 try 1413 try
1414 { 1414 {
1415 scriptObj 1415 scriptObj
1416 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1416 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1417 assemblyName.FullName, 1417 assemblyName.FullName,
1418 "SecondLife.Script", 1418 "SecondLife.Script",
@@ -1432,7 +1432,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1432 1432
1433 try 1433 try
1434 { 1434 {
1435 scriptObj 1435 scriptObj
1436 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( 1436 = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap(
1437 assemblyName.FullName, 1437 assemblyName.FullName,
1438 "SecondLife.XEngineScript", 1438 "SecondLife.XEngineScript",
@@ -1447,7 +1447,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1447 { 1447 {
1448 m_log.Error( 1448 m_log.Error(
1449 string.Format( 1449 string.Format(
1450 "[XENGINE]: Could not load previous SecondLife.XEngineScript from assembly {0} in {1}. Not starting. Exception ", 1450 "[XENGINE]: Could not load previous SecondLife.XEngineScript from assembly {0} in {1}. Not starting. Exception ",
1451 assemblyName.FullName, World.Name), 1451 assemblyName.FullName, World.Name),
1452 e2); 1452 e2);
1453 1453
@@ -1509,7 +1509,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1509 } 1509 }
1510 1510
1511 1511
1512 lock (m_AddingAssemblies) 1512 lock (m_AddingAssemblies)
1513 { 1513 {
1514 if (!m_Assemblies.ContainsKey(assetID)) 1514 if (!m_Assemblies.ContainsKey(assetID))
1515 m_Assemblies[assetID] = assemblyPath; 1515 m_Assemblies[assetID] = assemblyPath;
@@ -1517,7 +1517,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1517 m_AddingAssemblies[assemblyPath]--; 1517 m_AddingAssemblies[assemblyPath]--;
1518 } 1518 }
1519 1519
1520 if (instance != null) 1520 if (instance != null)
1521 instance.Init(); 1521 instance.Init();
1522 1522
1523 bool runIt; 1523 bool runIt;
@@ -1570,7 +1570,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1570 } 1570 }
1571 1571
1572 if (instance.StatePersistedHere) 1572 if (instance.StatePersistedHere)
1573 instance.RemoveState(); 1573 instance.RemoveState();
1574 1574
1575 instance.DestroyScriptInstance(); 1575 instance.DestroyScriptInstance();
1576 1576
@@ -1622,20 +1622,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1622 // Do not remove assembly files if another instance of the script 1622 // Do not remove assembly files if another instance of the script
1623 // is currently initialising 1623 // is currently initialising
1624 if (!m_AddingAssemblies.ContainsKey(m_Assemblies[assetID]) 1624 if (!m_AddingAssemblies.ContainsKey(m_Assemblies[assetID])
1625 || m_AddingAssemblies[m_Assemblies[assetID]] == 0) 1625 || m_AddingAssemblies[m_Assemblies[assetID]] == 0)
1626 { 1626 {
1627// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]); 1627// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]);
1628 try 1628 try
1629 { 1629 {
1630 if (File.Exists(m_Assemblies[assetID])) 1630 if (File.Exists(m_Assemblies[assetID]))
1631 File.Delete(m_Assemblies[assetID]); 1631 File.Delete(m_Assemblies[assetID]);
1632 1632
1633 if (File.Exists(m_Assemblies[assetID]+".text")) 1633 if (File.Exists(m_Assemblies[assetID]+".text"))
1634 File.Delete(m_Assemblies[assetID]+".text"); 1634 File.Delete(m_Assemblies[assetID]+".text");
1635 1635
1636 if (File.Exists(m_Assemblies[assetID]+".mdb")) 1636 if (File.Exists(m_Assemblies[assetID]+".mdb"))
1637 File.Delete(m_Assemblies[assetID]+".mdb"); 1637 File.Delete(m_Assemblies[assetID]+".mdb");
1638 1638
1639 if (File.Exists(m_Assemblies[assetID]+".map")) 1639 if (File.Exists(m_Assemblies[assetID]+".map"))
1640 File.Delete(m_Assemblies[assetID]+".map"); 1640 File.Delete(m_Assemblies[assetID]+".map");
1641 } 1641 }
@@ -1692,7 +1692,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1692 new WorkItemCallback(this.ProcessEventHandler), 1692 new WorkItemCallback(this.ProcessEventHandler),
1693 parms)); 1693 parms));
1694 } 1694 }
1695 1695
1696 /// <summary> 1696 /// <summary>
1697 /// Process a previously posted script event. 1697 /// Process a previously posted script event.
1698 /// </summary> 1698 /// </summary>
@@ -1703,7 +1703,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1703 Culture.SetCurrentCulture(); 1703 Culture.SetCurrentCulture();
1704 1704
1705 IScriptInstance instance = (ScriptInstance) parms; 1705 IScriptInstance instance = (ScriptInstance) parms;
1706 1706
1707// m_log.DebugFormat("[XEngine]: Processing event for {0}", instance); 1707// m_log.DebugFormat("[XEngine]: Processing event for {0}", instance);
1708 1708
1709 return instance.EventProcessor(); 1709 return instance.EventProcessor();
@@ -1736,7 +1736,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1736 instance = m_Scripts[itemID]; 1736 instance = m_Scripts[itemID];
1737 } 1737 }
1738 catch { /* ignore race conditions */ } 1738 catch { /* ignore race conditions */ }
1739 1739
1740 if (instance != null) 1740 if (instance != null)
1741 { 1741 {
1742 instance.PostEvent(p); 1742 instance.PostEvent(p);
@@ -1744,7 +1744,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1744 } 1744 }
1745 } 1745 }
1746 } 1746 }
1747 1747
1748 return result; 1748 return result;
1749 } 1749 }
1750 1750
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
index 9d9dee1..ede8ef3 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
60 public bool Wait(int t) 60 public bool Wait(int t)
61 { 61 {
62 // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the 62 // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the
63 // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an 63 // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an
64 // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8 64 // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8
65 // (or very likely other versions of Mono at least up until 3.0.3). 65 // (or very likely other versions of Mono at least up until 3.0.3).
66 return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false); 66 return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false);