Commit Graph

874 Commits (e09c8681ad5f6a645ef433e86166795a5c7dd762)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 31304c222d Make SceneManager.OnRegionsReadyStatusChange event available.
This is fired when all regions are ready or when at least one region becomes not ready.
Recently added EventManager.OnRegionReady becomes OnRegionReadyStatusChange to match OnLoginsEnabledStatusChange
2012-07-25 21:00:59 +01:00
Melanie e126915bc1 Change attachment handling to remove object from the scene first as per
justincc's original work. Sample scripts before doing so. Also refactor some
crucial common code and eliminate parameters that were only ever used with
the same constant value.
2012-07-23 21:39:26 +01:00
Justin Clark-Casey (justincc) ba80f137b5 Prevent race conditions between two threads that call LLClientView.Close() simultaneously (e.g. ack timeout and an attempt to reconnect) 2012-07-19 22:32:27 +01:00
Justin Clark-Casey (justincc) e9a121e1b2 Add TestCreateDuplicateRootScenePresence() regression test. 2012-07-19 21:54:50 +01:00
Justin Clark-Casey (justincc) 6dda7c65ae Add EventManager.OnRegionLoginsStatusChange fired whenever logins are enabled or disabled at any point, not just during initial startup.
This replaces EventManager.OnLoginsEnabled which only fired when logins were first enabled
and was affected by a bug where it would never fire if the region started with logins disabled.
2012-07-19 00:09:22 +01:00
Justin Clark-Casey (justincc) 64db0bcbd2 Add back notification to neighbouring regions when RegionReadyModule is not active accidentally just removed in 528004d 2012-07-18 23:40:00 +01:00
Justin Clark-Casey (justincc) 528004d349 Perform other region ready actions even if simulator is configured to leave logins disabled on startup. 2012-07-18 23:35:05 +01:00
Justin Clark-Casey (justincc) 58b72933c8 Fix bug where region ready was being triggered twice in quick succession if a region contained no scripts. 2012-07-18 22:09:20 +01:00
Justin Clark-Casey (justincc) 4973fddc51 Establish EventManager.OnRegionReady event. This will only be triggerred once when the region is ready.
Switch MapImageServiceModule to use this.
2012-07-18 21:52:07 +01:00
Justin Clark-Casey (justincc) 6460e587c4 Pass entire scene object in OnLoginsEnabled event rather than just the region name.
This saves listeners from having to re-retrieve the scene from their own lists, which won't work anyway if multiple regions with the same name have been allowed
2012-07-18 21:29:12 +01:00
Justin Clark-Casey (justincc) eb590becf0 Close() the ScenePresence after we've removed it from the scene graph, to cut down race conditions when another thread manages the grab the presence after some SP structures have been reset. 2012-07-18 00:14:02 +01:00
Justin Clark-Casey (justincc) 75ab9b4b88 Change very recent AllowedViewerList and BannedViewerList config setting names in OpenSim.ini.example to AllowedClients and BannedClients to match long-existing settings in [LoginService]
Also changes separator from comma to bar to match existing [LoginService] config features.
Divergence of config names for identical facilities in different places makes for an unnecessarily confusing user experience.
2012-07-12 23:18:30 +01:00
Justin Clark-Casey (justincc) f3134b5cf6 When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts.
This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads.
2012-07-10 22:41:11 +01:00
Justin Clark-Casey (justincc) 7ff4eec79c Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
2012-07-07 00:02:45 +01:00
Justin Clark-Casey (justincc) f1f390cfdf Remove now duplicate interregion object check that should have been removed a few commits ago in 43a2da9 2012-07-06 23:22:40 +01:00
Justin Clark-Casey (justincc) 056c9a59b2 Add assert to attachment regression tests to check that number of objects in the scene graph 2012-07-06 23:07:50 +01:00
Justin Clark-Casey (justincc) 43a2da9edb Pull prim crossing/teleport checks up into Scene.IncomingCreateObject() from Scene.AddObject()
Only IncomingCreateObject() needs these checks.  General object adding does not need to perform crossing perm checks
2012-07-06 22:33:16 +01:00
Justin Clark-Casey (justincc) f7b4802577 Correct spelling mistake m_BanedViewers to m_BannedViewers 2012-07-03 23:26:02 +01:00
Michelle Argus 3399596e0e Adds a list of viewers that are allowed or banned from the region.
Signed-off-by: Melanie <melanie@t-data.com>
2012-07-02 18:45:11 +01:00
Justin Clark-Casey (justincc) a4551b027b Removing unused handling of incoming create object by userID and itemID only.
It appears this was never actually used since attachments were rezzed in other code.
This was never available on remote simulator comms, only local.
2012-06-30 01:14:49 +01:00
Justin Clark-Casey (justincc) 56c776066c Remove code listed for removal in 0.7.3 that handled script restart for incoming attachments from pre-fatpack regions (versions of OpenSimulator more than a year old) 2012-06-30 01:06:37 +01:00
Justin Clark-Casey (justincc) f202c36106 Add IScene.Name for code clarity to replace the RegionInfo.RegionName used in many, many log messages. 2012-06-29 00:03:22 +01:00
Justin Clark-Casey (justincc) e5b739aaeb When attachments are being saved and deleted for a closing root agent, delete first to avoid a hud race condition with update threads.
If delete doesn't occur first then the update thread can outrace the IsAttachment = false necessary to save attachments and send hud artifacts to other viewers.
2012-06-25 22:48:13 +01:00
Justin Clark-Casey (justincc) 9737e6d52e If RegionReady is active, don't falsely say that logins are enabled in the main scene loop before RegionReady is signalled when initial script compilation finishes.
Also raises this logging level to Info from Debug since this information is of high importance.  This matches the behaviour of the RegionReady module
2012-06-20 00:07:03 +01:00
Justin Clark-Casey (justincc) 8c7149063b In PresenceDetector.OnConnectionClose(), use the IsChildAgent check already available on IClientAPI.SceneAgent rather than retrieving it again by scanning all scenes. 2012-06-12 01:25:09 +01:00
Justin Clark-Casey (justincc) 30f4a33f01 Don't make duplicate call to ScenePresence.Close() separately in ETM.DoTeleport() if an agent needs closing.
This is always done as part of Scene.RemoveClient()
Also refactors try/catching in Scene.RemoveClient() to log NREs instead of silently discarding, since these are useful symptoms of problems.
2012-06-08 01:26:43 +01:00
Justin Clark-Casey (justincc) d547bcf8d1 Remove duplicate update of user count in Scene.IncomingCloseAgent()
This is already done in Scene.RemoveClient() which IncomingCloseAgent() always ends up calling.
2012-06-08 00:40:38 +01:00
Justin Clark-Casey (justincc) b56673c920 Fix bug with "kick user" reducing agent counts by 2 instead of 1.
This is done by making the kick user command call IClientAPI.Close() rather than routing through Scene.IncomingCloseAgent(), which also called IClientAPI.Close()
DisableSimulator for child agents is moved from IncomingCloseAgent() to RemoveClient(), this is not a functional change since IncomingCloseAgent() always ends up calling RemoveClient()
2012-06-08 00:18:25 +01:00
Justin Clark-Casey (justincc) 0c5fefacb4 Record the fact that child agents can have asset transactions.
Also change code to grab the agent asset transaction module once.
2012-06-07 23:51:04 +01:00
Justin Clark-Casey (justincc) de87e4871b Don't send kill object messages to clients when a child agent is closed. 2012-06-07 23:35:21 +01:00
Justin Clark-Casey (justincc) 655625ab87 Start sending spare frame time MS viewer stat. Make frame time correctly display total frame time, not just non-spare time.
This makes it easier to see when components of frame time exceed normal permitted frame time.
Currently reflect scene frame times.
2012-06-05 00:17:55 +01:00
Justin Clark-Casey (justincc) 72219eae7d Instead of updating sim stats root agent, child, objects and scripts accounts every single scene frame, update in the once every 3 seconds SimStatsReporter run 2012-06-01 04:47:11 +01:00
Justin Clark-Casey (justincc) 43a6f28620 If restating a region, clean up the physics scene after the main scene has been closed not before.
If this is done before then on ODE agent update calls still incoming can fail as they try to use a raycastmanager that has been disposed.
Bullet plugin does nothing on Dispose()
However, I wouldn't be at all surprised if individual region restarting was buggy in lots of other areas.
2012-05-26 01:55:35 +01:00
Justin Clark-Casey (justincc) 40c78b0624 Stop it being possible for an agent to teleport back to its source region before the source region has finished cleaning up old agent data and structures.
If this is allowed, then the client usually gets forcibly logged out and data structures might be put into bad states.
To prevent this, the binary state machine of EMT.m_agentsInTransit is replaced with a 4 state machine (Preparing, Transferring, ReceivedAtDestination, CleaningUp).
This is necessary because the source region needs to know when the destination region has received the user but a teleport back cannot happen until the source region has cleaned up.
Tested on standalone, grid and with v1 and v3 clients.
2012-05-25 02:02:53 +01:00
Justin Clark-Casey (justincc) 459c7635af If an agent is still registered as 'in transit' by the source region, don't allow an immediate teleport back.
This is to help relieve a race condition when an agent teleports then immediately attempts to teleport back before the source region has properly cleaned up/demoted the old ScenePresence.
This is rare in viewers but much more possible via scripting or region module.
However, more needs to be done since virtually all clean up happens after the transit flag is cleared .
Possibly need to add a 'cleaning up' state to in transit.
This change required making the EntityTransferModule and HGEntityTransferModule per-region rather than shared, in order to allow separate transit lists.
Changes were also required in LocalSimulationConnector.
Tested in standalone, grid and with local and remote region crossings with attachments.
2012-05-24 00:31:14 +01:00
Justin Clark-Casey (justincc) ee98b9c394 Add "show scene" command which lists stats for the currently selected console scene(s)
This includes prim count, script count, avatar count, etc.
Information is currently the same as "show stats", though show stats can only show one scene at a time because it listens for the latest outgoing stats packet (a bad approach that needs to change).
Might be better to tie this module into the other stats module to display arbitrary stats rather than fetching directly from scene.SimStatsReporter.
Console command is "show scene" because "show region" already exists for the grid service, which is unfortunate.
Might need to make a distinction between "scene" relating to a live scene and "region" relating to more static region data (url, coords, etc.)
2012-05-23 04:10:45 +01:00
BlueWall 247a56593f Further refinement on properties 2012-05-18 20:02:32 -04:00
BlueWall 895dadbdbd Cleanup + change properties to set fields with private set : Thanks Justin for the tip. 2012-05-18 19:34:12 -04:00
BlueWall c05f87b50c Provide Telehub setting to allow use of landmarks
Setting to allow use of landmarks to override telehub routing. Default is off.
2012-05-18 17:51:38 -04:00
Justin Clark-Casey (justincc) 4d34763f8c Check agent limit against root agent count rather than both root and child agents
From sl docs such as http://community.secondlife.com/t5/English-Knowledge-Base/Managing-Private-Regions/ta-p/700115
agent should apply to avatars only.
This makes sense from a user perspective, and also from a code perspective since child agents with no physics or actions take up a fraction of root agent resources.
As such, the check is now only performed in Scene.QueryAccess() - cross and teleport check this before allowing an agent to translocate.
This also removes an off-by-one error that could occur in certain circumstances on teleport when a new child agent was double counted when a pre-teleport agent update was performed.
This does not affect an existing bug where limits or other QueryAccess() checks are not applied to avatars logging directly into a region.
2012-05-17 23:33:26 +01:00
Justin Clark-Casey (justincc) deeac69312 minor: comment out individual attachment transfer log messages for now 2012-05-14 18:48:40 +01:00
BlueWall 7c229c8b81 Add configurable SpawnPointRouting
Will use one of three selected methods to route avatar landing
	points when using Telehubs. The setting is in [Startup] using
        SpawnPointRouting = closest/random/sequence

	closest: The default setting. Routes avatar to the nearest SpawnPoint
	to the location.

	random: Picks random SpawnPoints to land the avatar.

	sequence: Follows a sequence to place the avatar on the next available
	SpawnPoint location

Conflicts:

	OpenSim/Region/Framework/Scenes/Scene.cs
2012-05-13 17:20:54 -04:00
Dan Lake f374b63ac8 Add even for terrain tainting and synchronize terrain module with physics scene before physics simulation step rather than after 2012-05-10 14:42:46 -07:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Justin Clark-Casey (justincc) ca228c4770 Comment out old Scene.HandleLogOffUserFromGrid() to reduce client closing analysis complexity 2012-04-26 16:20:53 +01:00
Justin Clark-Casey (justincc) e52fe03fff minor: Add avatar name to removing agent log message 2012-04-26 00:42:37 +01:00
Mic Bowman a2d544c938 Add a configuration switch to turn on/off the use of the trash
folder when deleting objects from a scene. The use of the trash
folder causes assets to be created and stored everytime you delete
an object from the scene (slows down the delete and adds mostly useless
assets to your database).

Default is on (use the trash folder) which is the standard behavior.
2012-04-25 11:54:57 -07:00
Justin Clark-Casey (justincc) 8205fe79ce Fix bug where setting phantom on a prim would result in a server log message rather than setting phantom.
This was an oversight when removing some race conditions from PhysicsActor setting recently.
Regression tests extended to probe this code path.
Extending regression tests required implementation of a BasicPhysicsPrim (there was none before).  However, BasicPhysics plugin is still of no current practical use other than to fill in as a component for other parts of regression testing.
2012-04-22 19:51:51 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 633f4bb3d8 remove possible PhysActor unexpectedly null race conditions when changing prim collision status
factor out common SOP physics scene adding code into a common SOP.AddToPhysics() that is the counterpart to the existing RemoveFromPhysics()
2012-04-03 09:28:17 +01:00
Justin Clark-Casey (justincc) 7468299673 Eliminate race condition where many callers would check SOP.PhysicsActor != null then assume it was still not null in later code.
Another thread could come and turn off physics for a part (null PhysicsActor) at any point.
Had to turn off localCopy on warp3D CoreModules section in prebuild.xml since on current nant this copies all DLLs in bin/ which can be a very large number with compiled DLLs
No obvious reason for doing that copy - nothing else does it.
2012-04-03 05:51:38 +01:00
Justin Clark-Casey (justincc) 32a953fed7 refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part. 2012-03-31 01:52:06 +01:00
Justin Clark-Casey (justincc) 69fc8c4985 minor: small message adjustment and unnecessary code elimination when notifying client of no build permission 2012-03-31 01:07:14 +01:00
PixelTomsen 874140f950 fix Infinite loading on No Rez http://opensimulator.org/mantis/view.php?id=5932 2012-03-31 01:01:59 +01:00
Justin Clark-Casey (justincc) 22a85b947a Add back parts of reverted changes that were not concerned with child agent caching.
This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin()
Also add a code comment as to why we're caching friend information for child agents.
2012-03-29 01:26:30 +01:00
Justin Clark-Casey (justincc) 93ac47f0d3 Revert "Simplify friends caching by only doing this for root agents - no functions require caching for child agents."
We need to cache child agents so that friends object edit/delete permissions will work across boarders on regions hosted by different simulators.

This reverts commit d9f7b8549b.
2012-03-29 01:08:47 +01:00
Justin Clark-Casey (justincc) a1de9bc33f Revert "Add comment about setting client.SceneAgent in AddNewClient()"
This reverts commit 964cae4f37.
2012-03-29 01:08:37 +01:00
Justin Clark-Casey (justincc) 964cae4f37 Add comment about setting client.SceneAgent in AddNewClient() 2012-03-29 00:21:14 +01:00
Justin Clark-Casey (justincc) d9f7b8549b Simplify friends caching by only doing this for root agents - no functions require caching for child agents.
This allows us to avoid unnecessary multiple calls to the friends service.
All friends functions originate from the root agent and only go to other root agents in existing code.
This also allows us to eliminate complex ref counting.
2012-03-28 23:40:25 +01:00
Diva Canto af96b99356 More on switching the root folder from under the viewer. More experiments. 2012-03-27 20:36:54 -07:00
Diva Canto 300968e933 HG: Switch root folders from under the viewer. Towards HG 2.0. This is guarded by an obscure config that no one but me should be using at this point. 2012-03-27 19:08:29 -07:00
Dan Lake 971d32fda3 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-27 12:51:58 -07:00
Dan Lake 0247d738e2 When loading objects from DB, first add to scene, then call TriggerOnSceneObjectLoaded. 2012-03-27 12:50:58 -07:00
Diva Canto de242a29ca HG: beginning of a more restrictive inventory access procedure (optional). Experimental: we'll try switching the root folder from under the viewer. 2012-03-27 11:54:13 -07:00
Justin Clark-Casey (justincc) d4beb2f5bc Comment out log message about sending periodic appearance updates. 2012-03-23 03:39:39 +00:00
Justin Clark-Casey (justincc) 54887bf386 Add experimental SendPeriodicAppearanceUpdates = true/false setting to [Startup] in OpenSim.ini
On osgrid and other places, I have observed that manually sending appearance updates from the console often relieves grey avatar syndrome.
Despite hunting high and low, I haven't been able to find where this packet is sometimes being lost - it might be a persistent viewer bug for all I know.
Therefore, this experimental setting resends appearance data for everybody in the scene every 60 seconds.  These packets are small and the viewer only fetches texture
data if it doesn't already have it.
Default is false.
2012-03-23 03:33:07 +00:00
Justin Clark-Casey (justincc) 4ed833bc9d Add a scene maintenance thread in parallel to the heartbeat thread. The maintenance thread will end up running regular jobs that don't need to be in the main scene loop.
The idea is to make the critical main scene loop as skinny as possible - it doesn't need to run things that aren't time critical and don't depend on update ordering.
This will be done gradually over time to try and uncover any issues.  Many non-criticial scene loop activities are being launched on separate threadpool threads anyway.
This may also allow modules to register their own maintenance jobs without having to maintain their own timers and threads.
Currently the maintenance loop runs once a second, as opposed to the 89ms scene loop.
2012-03-23 02:49:29 +00:00
Justin Clark-Casey (justincc) 349454ca27 Remove unnecessary shutting down check in Scene.Heartbeat(). Add some method doc. Rename HeartbeatThread, shuttingdown to conform to code standards. 2012-03-23 01:46:11 +00:00
Justin Clark-Casey (justincc) 18b3f1132e Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code. 2012-03-23 01:21:43 +00:00
Justin Clark-Casey (justincc) 4ee8b3e23e Fix build break 2012-03-23 01:11:43 +00:00
Justin Clark-Casey (justincc) a9995ede65 Fix bug in ScenePresenceAnimator.RemoveAnimation() introduced in commit 1a8769e
Forgot to uppercase the animation name for default animations, since for some reason we store and use them in upper rather than lowercase.
2012-03-23 01:08:13 +00:00
Justin Clark-Casey (justincc) bc2963d42a Comment out unused scene loop restart code.
This has actually been unused since at least 0.7.2 due to earlier changes.
2012-03-23 01:03:10 +00:00
Justin Clark-Casey (justincc) 08b8ebcc7e Use m_lastFrameTick instead of m_lastUpdate in Scene.GetHealth(). m_lastUpdate is no longer properly updated and is redundant anyway. 2012-03-23 00:55:11 +00:00
Justin Clark-Casey (justincc) 40b9b519b8 Add commented out section on collisions switch in Scene.SetSceneCoreDebug().
This was not implemented before the recent changes but should be at some point.
2012-03-23 00:12:14 +00:00
Justin Clark-Casey (justincc) 54a8a5baba If "debug scene updates true" then print out to log when a garbage collection occurs. 2012-03-21 02:02:14 +00:00
Justin Clark-Casey (justincc) de53aa32e0 Add Scene.DebugUpdates switch which, if turned on, will print out a warning when a frame updates takes longer than twice the desired time
This is controlled via "debug scene updates true|false" on the region console.
Also fix an oversight with "debug scene teleport true|false"
2012-03-21 01:27:09 +00:00
Justin Clark-Casey (justincc) ab243f4a57 Incorporate scene teleporting debugging into "debug scene teleport true|false" command 2012-03-21 01:13:44 +00:00
Justin Clark-Casey (justincc) 9671e43497 Replace "scene debug true false true" console command with "scene debug scripting true" or other parameters as appropriate.
This is to allow individual switching of scene debug settings and to provide flexibiltiy for additional settings.
2012-03-21 01:02:58 +00:00
Justin Clark-Casey (justincc) 7bf628ab31 Add ability to log warn if a frame takes longer than twice the expected time. Currently commented out. 2012-03-21 00:02:08 +00:00
Justin Clark-Casey (justincc) 3701f893d3 remove unnecessary tmpFrameMS, use maintc instead for frame time calculation 2012-03-20 23:31:57 +00:00
Justin Clark-Casey (justincc) 30b2a8c778 Move frame loop entirely within Scene.Update() for better future performance analysis and stat accuracy.
Update() now accepts a frames parameter which can control the number of frames updated.
-1 will update until shutdown.
The watchdog updating moves above the maintc recalculation for any required sleep since it should be accounted for within the frame.
2012-03-20 23:12:21 +00:00
Justin Clark-Casey (justincc) 8c911ddaf0 Remove some pointless catching/throwing in the scene loop. 2012-03-20 01:39:19 +00:00
Diva Canto 1a4fdd2666 Moved HandleAvatarPickerRequest from the generic Scene.PacketHandlers to the UserManagementModule where it belongs. No functional changes. 2012-03-17 10:48:22 -07:00
Diva Canto 33c14cb107 Region access control! Region operators can now specify things like DisallowForeigners (means what it says) and DisallowResidents (means that only admins and managers can get into the region). This puts the never-completed AuthorizationService to good use. Note that I didn't implement a grid-wide Authorization service; this service implementation is done entirely locally on the simulator. This can be changed as usual by pluging in a different AuthorizationServicesConnector. 2012-03-17 10:00:11 -07:00
Diva Canto a2009ffe2e Terrain: added [Terrain] section with an option to load an initial flat terrain. Default is still pinhead island. I much rather have a flat land in the beginning. 2012-03-16 13:08:05 -07:00
Justin Clark-Casey (justincc) 2f81e53f63 Fix a problem where multiple near simultaneous calls to llDie() from multiple scripts in the same linkset can cause unnecessary thread aborts.
The first llDie() could lock Scene.m_deleting_scene_object.
The second llDie() would then wait at this lock.
The first llDie() would go on to remove the second script but always abort it since the second script's WorkItem would not go away.
Easiest solution here is to remove the m_deleting_scene_object since it's no longer justified - we no longer lock m_parts but take a copy instead.
This also requires an adjustment in XEngine.OnRemoveScript not to use instance.ObjectID instead when firing the OnObjectRemoved event.
2012-03-15 00:20:47 +00:00
Justin Clark-Casey (justincc) 650d761c06 Display help commander topics in capitalized form - the commands themselves are still lowercase.
Also convert the estate commands to simply AddCommand() calls so that commands from two different modules can be placed in the same category
2012-03-08 02:17:45 +00:00
Justin Clark-Casey (justincc) 749c3fef8a Change "help" to display categories/module list then "help <category/module>" to display commands in a category.
This is to deal with the hundred lines of command splurge when one previously typed "help"
Modelled somewhat on the mysql console
One can still type help <command> to get per command help at any point.
Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet).
Does not affect command parsing or any other aspects of the console apart from the help system.
Backwards compatible with existing modules.
2012-03-08 01:51:37 +00:00
Justin Clark-Casey (justincc) f3678d217f Stop individually deleting objects at the end of each ObjectTortureTest.
We can now do this since the entire scene and all objects within it are now successfully gc'd at the end of these tests.
This greatly improves the time taken to run each test (by reducing teardown time, not the time to actually do the test work that we're interested in).
Slightly simplifies config read in Scene constructor to help facilitate this.
2012-03-07 00:31:18 +00:00
Justin Clark-Casey (justincc) 0f4cdc0c5b Explictly close down the StatsReporter so that we can shutdown its timer
This is another step necessary for the scene to be garbage collected between performance tests
2012-03-06 19:05:32 +00:00
Justin Clark-Casey (justincc) c2c102d33e Remove outdated comment about checking attachment prims in Scene.PipeEventsForScript() 2012-03-02 22:52:26 +00:00
Justin Clark-Casey (justincc) 089fd61a3b Allow a script to receive events if its root prim is in an area where it's allowed to run rather than checking its own prim.
This allows scripts to run in child prims that are outside region boundaries.
This is an interim patch applied from http://opensimulator.org/mantis/view.php?id=5899 though it does not resolve that bug
Thanks tglion!
2012-03-02 22:43:24 +00:00
Justin Clark-Casey (justincc) 84735b644c Get rid of some of the identical exception catching in Scene.Update(). 2012-02-24 05:12:56 +00:00
Justin Clark-Casey (justincc) f67f37074f Stop spurious scene loop startup timeout alarms for scenes with many prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-24 05:02:33 +00:00
Justin Clark-Casey (justincc) 90ea00a109 Try to resolve some problems with viewers crashing after hitting parcel banlines or freezing on the banline.
This involves
1) On forcible teleport, call m_scene.RequestTeleportLocation() rather than ScenePresence.Teleport() - only EntityTransferModule now should call SP.Teleport()
2) When avatar is being forcibly moved due to banlines, use a 'stop movement' tolerance of 0.2 to requested position rather than 1
This prevents the avatar sometimes being stuck to banlines until they teleport somewhere else.
This aims to fix some problems in http://opensimulator.org/mantis/view.php?id=5822
2012-02-23 22:56:42 +00:00
Melanie 9ed4245d9e Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-02-23 01:42:08 +00:00
Melanie 1dfc990264 Add a position parameter to region crossing of objects. This avoids the
potential bad update that places an object at the opposite side of the
origin sim for a moment before actually crossing it. Especially important in
grids like OSG where lag between sims is high.
2012-02-23 01:40:30 +00:00
Justin Clark-Casey (justincc) 5d31267185 Remove two spurious m_sceneGraph != null checks in Scene.cs. It's set in constructor and never subsequent set to null. 2012-02-22 00:55:16 +00:00
Justin Clark-Casey (justincc) 90dc5f47e7 Fix bug where NPCs would establish child agents on other neighbour regions that had come up after the NPC was created. 2012-02-21 01:57:19 +00:00
BlueWall bcb9577495 Use localy defined name, TPFlags, for Constants.TeleportFlags 2012-02-19 12:09:57 -05:00
BlueWall f4cd35322f Route logins according to Estate, Telehub and TeleportFlags 2012-02-18 00:45:43 -05:00
BlueWall 7bdcf9eb26 Propagate our teleport flags on logins 2012-02-18 00:32:09 -05:00
BlueWall ba98d6fffe Fix missing telehub handling on login 2012-02-17 08:03:53 -05:00
Justin Clark-Casey (justincc) 04986bbb15 Add some more data to the new user connection logging for debug purposes. 2012-02-14 01:50:51 +00:00
nebadon 36ed0dcdaa change NonPhysicalPrimMax to NonphysicalPrimMax in Scenes.cs to make the
variable in OpenSim.ini and Regions.ini match
2012-02-04 19:45:10 -07:00
Dan Lake 146d78edfa ObjectAddedToScene event should be fired when duplicating objects 2012-02-02 17:41:05 -08:00
Dan Lake 0ce9ad4a56 Add event RegionHeartbeatEnd for modules interested in coordinating activity with region heartbeats 2012-02-01 17:01:28 -08:00
Dan Lake c10193c72b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-02-01 16:25:35 -08:00
Melanie 003bd9f1b3 Small optimization to last commit 2012-02-01 10:05:04 +00:00
Melanie 241ddd031f Fix copy/paste errors 2012-02-01 09:45:15 +00:00
Melanie fcc1fa2c32 Straighten out some attachment mess. Don't save attachment states for HG
visitors at all. On Leaving a sim, save only the changed ones. Don't save
all scripted stuff when leaving a sim.
2012-02-01 09:36:14 +00:00
Justin Clark-Casey (justincc) 9bd02b5da1 Move object delete commands into a commands region module, in preparation for adding similar show commands. 2012-01-31 21:57:45 +00:00
Justin Clark-Casey (justincc) f3780b9eae Add torture tests to test adding 10,000, 100,000 and 200,000 single prim scene objects.
These can be run using the "nant torture" target.  They are not part of "nant test" due to their long-run future nature.
Such tests are designed to do some testing of extreme situations and give some feedback on memory usage, etc.
However, data can be inconsistent due to different machine circumstances and virtual machine actions.
This area is under development.
2012-01-31 19:56:37 +00:00
Melanie da720ce9be Support rejecting a teleport if a user is banned in all parcels that have
spawn points
2012-01-26 10:21:45 +00:00
Dan Lake 2c6272d11a Add a version of GetGroupByPrim to Scene which accepts UUID instead of localID 2012-01-19 03:01:37 -08:00
BlueWall 3deb52d399 Teleport Debugging
Move setting from ini to existing facitilies - thanks justincc

	toggle with console command: debug teleport
2012-01-10 13:41:35 -05:00
BlueWall 707c8c6f2b Add some run-time debugging support
Add configuration option - DEBUG to enable debugging methods. This is temporary for helping users testing teleport routing be able to report back the data with the test cases. We can remove when finished with this, or leave it if it proves to be useful.

	Users: set DEBUG = true in OpenSim.ini to get more information from teleport routing. The default is false. It presently prints the TeleportFlags value.
2012-01-09 18:19:55 -05:00
BlueWall b3a12167d6 Use our TeleportFlags
Switch to our TeleportFlags enum instead of LibOMV because we need to define a type for HG Logins. Also moved some debugging in ScenePresence into a function to make it simpler to enable/disable.
2012-01-09 17:54:35 -05:00
Dan Lake fc391d4b10 Added EventManager.OnRegionStarted which is triggered when Heartbeat is started. 2012-01-04 12:01:18 -08:00
Diva Canto 56dbcae402 Bug fix in map tiles in standalone: the map has been blank since commit 01ae916bad r/17324 (Nov.18, justincc). But the root cause comes from commit 02e54c57c4 Author: Oren Hurvitz Date: 7/22/2011
This is a nasty situation. The map tile UUID is, in principle, stored authoritatively in RegionSettings. However, it also needs to be stored in the Grid Service because that's how other sims can retrieve it to send it in Map Blocks to non-V3 viewers. So every time the tile image changes, that change needs to propagate to the Grid Service, and this is done via RegisterRegion (ugh!). Interestingly, this problem didn't affect grids because by default AllowRemoteDelete is false, so the prior images aren't being deleted from the asset servers -- but they were not being correctly updated in the map either, the map was stuck with old images.
2011-12-30 21:32:28 -08:00
Justin Clark-Casey (justincc) 7ccd8f8f1d rename Scene.m_physicalPrim to PhysicalPrims since its public and access external as a property 2011-12-22 19:57:50 +00:00
Justin Clark-Casey (justincc) 48113f0fc8 Make it possible to force all prims to be phantom via the collidable_prim boolean setting in the OpenSim.ini config [Startup] section.
Naturally, default is true.
When set to false, "phantom" flags on prims can be set as usual but all prims remain phantom.
This setting is for test purposes.
This switch does not affect the collision of avatars with the terrain.
2011-12-22 19:44:52 +00:00
Justin Clark-Casey (justincc) 87a2d8d51b Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs as this is updating SOG/SOP.GroupID, which is arguably generic. 2011-12-19 23:03:45 +00:00
Justin Clark-Casey (justincc) f9137c923b Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object.
There were two problems here:
1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service.  This fails to groups created newly in that session
2) On object group update, we weren't setting the HasGroupChanged flag.  This meant that the change was not persisted unless some other action set this flag.
This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588
This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file
2011-12-17 02:23:24 +00:00
Diva Canto 3bf699ad36 No functional changes. Changed the prefix of that log message [CONNECTION BEGIN] to [SCENE] because that's where the message happens.
Also changed the instantiation of a vector object to be done only once instead of every time we receive a position update.
2011-12-16 08:59:33 -08:00
Dan Lake c34ab0ee66 Cleaned up ScenePresence parameters for Flying, WasFlying, FlyingOld and IsColliding 2011-12-12 02:43:38 -08:00
Justin Clark-Casey (justincc) 13b1c8c173 Do some clean up Scene.cs log messages.
This prints out both exception message and stacktrace (Exception.ToString()) isn't enough on Windows.
This also uses m_log.*Format() which is more efficient than string concat.
2011-12-09 23:21:54 +00:00
Justin Clark-Casey (justincc) af3cd00048 Get rid of IScene.PresenceChildStatus() which always had to execute a lookup in favour of IClientAPI.ISceneAgent.IsChildAgent instead. 2011-12-09 23:07:53 +00:00
Justin Clark-Casey (justincc) 0e265889dd Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists.
This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08 19:25:24 +00:00
Justin Clark-Casey (justincc) f61e54892f On a new client circuit, send the initial reply ack to let the client know it's live before sending other data.
This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before.
This may stop some avatars appearing grey on login.
This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity
This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-12-08 18:34:23 +00:00
Justin Clark-Casey (justincc) 355cde464a Simplify Scene.AddNewClient()
If sp becomes null right after we've checked or created it, then behaviour down the line is going to be wrong anyway.
So instead retain the check/create ScenePresence reference and use this.
2011-12-08 16:10:47 +00:00
Justin Clark-Casey (justincc) 3d95015686 On an Exception in Scene.RemoveClient(), always remove the client (and SP) structure so that logout on unexpired packets isn't retriggered, causing the same exception 2011-12-07 18:43:48 +00:00
Justin Clark-Casey (justincc) 415b7b7ec4 Implement XMLRPCAdmin command admin_teleport_agent.
This allows someone with access to this command on the XMLRPCAdmin interface to teleport an avatar to an arbitrary region and/or position.
2011-12-07 17:31:57 +00:00
Justin Clark-Casey (justincc) 054ebe8878 Stop some places where we're trying to reset animations in child agents where such requests are ignored. 2011-12-02 23:56:01 +00:00
Justin Clark-Casey (justincc) 8e32ce85a7 Remove bizarre call to PhysicsScene.Simulate(0) in Scene.GetNearestAllowedPosition()
At least on ODE, this wasn't doing any harm but there wasn't any point to it either
2011-11-24 22:45:29 +00:00
Justin Clark-Casey (justincc) 01ae916bad Don't register a region twice on both official registration and maptile regeneration.
Maptile storage appears orthogonal to region registration
2011-11-19 00:07:34 +00:00
Dan Lake baa65d4a15 In AddNewClient, iterator over copy of entities rather than copying under read lock 2011-11-15 17:09:17 -08:00
Justin Clark-Casey (justincc) 31ffd5450b Make tracked per scene thread names conform to the majorirty format.
This is <thread-name> (<region-name>)
2011-11-15 23:34:28 +00:00
Justin Clark-Casey (justincc) a3c5f76942 Removed unused and mostly commented out SceneCommunicationService methods
As far as I can see, the SCS is only now used for informing neighbours of up/down status and possibly sending child agent updates and close requests
2011-11-15 18:16:43 +00:00
Justin Clark-Casey (justincc) 64784bc0cf remove SceneCommunicationService.OnAvatarCrossingIntoRegion. This stuff is not being used any more - it's now IEntityTransferModule and SimulationService instead 2011-11-15 17:30:58 +00:00
Dan Lake 5fd1749150 Remove SceneViewer from ScenePresence to reduce quadruple queueing of
prim update to only triple queuing. Existing method was:
1. Schedule prim for update, adding to scene update list
2. Update on SOGs during heartbeat queues update onto each SceneViewer
3. Update on SPs during heartbeat queues update onto each IClientAPI
4. ProcessEntityUpdates queues updates into UDP send stack

Now the SceneViewer has been eliminated so updates are scheduled at any
time and then put onto the IClientAPI priority queues immediately during
SceneGraph.UpdateObjectGroups.
2011-11-11 17:16:52 -08:00
Melanie c7dd7b13a2 Convert SendKillObject to take a list of uint rather than sending one
packet per prim. More to come as we change to make use of this.
2011-11-06 20:38:07 +00:00
Snoopy Pfeffer 927561383e HUD attachments: Removes some more messages sent to wrong clients. 2011-11-06 17:43:39 +01:00
Melanie 4d3926694d Remove enableprejump config option and associated code as this is now
fully functional and cannot be disabled because that would break timings.
2011-11-05 22:43:45 +00:00
Dan Lake b8d50b10fb Rename ForEachAvatar back to ForEachScenePresence. The other changes
from previous commit which sort out which iterator is used are left
intact. A discussion is needed as to what constitutes an avatar vs a
ScenePresence.
2011-11-03 17:53:51 -07:00
Dan Lake 94dc7d07eb Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls to
the 3 iteration functions so more of them are using the correct
iteration for the action they are performing. The 3 iterators that seem
to fit all actions within OpenSim at this time are:

ForEachAvatar: Perform an action on all avatars (root presences)
ForEachClient: Perform an action on all clients (root or child clients)
ForEachRootClient: Perform an action on all clients that have an avatar

There are still a dozen places or so calling the old
ForEachScenePresence that will take a little more refactoring to
eliminate.
2011-11-03 17:06:08 -07:00
Melanie 08fcf958c2 Port the Avination offline messaging system to Core 2011-11-02 23:50:47 +00:00
Dan Lake 7c8bfac11b Removed redundant SceneContents property from Scene. It's the same as SceneGraph property. 2011-11-01 17:20:12 -07:00
Dan Lake 4b58d4ff95 Removed see_into_this_sim_from_neighbor configuration option. 2011-11-01 16:51:14 -07:00
Dan Lake 3c55f3015f Removed unused show commands from Scene.cs and SceneBase.cs. The show modules command in OpenSim.cs now shows both shared modules and region modules. 2011-10-31 16:42:28 -07:00
Dan Lake 14646f2524 Fix line endings 2011-10-30 23:43:17 -07:00
Dan Lake a85ff884d9 Experimental reorder of Heartbeat loop now simulates physics and sends updates to clients prior to sleep. Existing behavior was to sleep BEFORE sending updates. We found this patch reduced latency to clients by 1-2 heartbeat periods. 2011-10-30 23:39:39 -07:00
Justin Clark-Casey (justincc) 6d97545b6b Remove the SyncRoot locking from Scene which was only being done around the main physics loop and ScenePresence position and velocity setting
This is no longer necessary with ODECharacter taints (ODEPrim was already not taking part in this).  BSCharacter was already tainting.
2011-10-29 02:42:53 +01:00
Dan Lake b98613091c Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors. 2011-10-27 00:42:21 -07:00
Justin Clark-Casey (justincc) e28e2d24c7 Add new EventQueueTests with basic test to check that adding a client registers an http poll 2011-10-24 22:23:41 +01:00
Justin Clark-Casey (justincc) 9c43020876 Get OdeScene to use passed in time step rather than hard-coded 0.089
However, I still don't recommend changing MinFrameTime from 0.089, high values do not work well and lower values don't seem to make much difference
2011-10-20 20:48:51 +01:00
Justin Clark-Casey (justincc) 6837e44d07 Pass PhysicsScene.Simulate() only the MinFrameTime rather than the useless Math.Max(SinceLastFrame.TotalSeconds, MinFrameTime)
SinceLastFrame was calculating the interval between any sleep that had occurred to pad out the frame time and the start of the next frame.
This would usually be below MinFrameTime but occasionally if the sleep was long it would be above, often due to the time required to update the watchdog.
This doesn't appear to play much practical role right now.
ODE was actually ignoring it entirely.  Bullet might be helped slightly by receiving a non-varying value.
2011-10-20 19:44:59 +01:00
Dan Lake eac29396d9 Moved HaveNeighbor utility function from ScenePresence to Scene. Fixed line endings from previous commit. 2011-10-19 15:38:25 -07:00
Dan Lake da794f34a5 Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of scene presence by client ID. 2011-10-19 14:41:44 -07:00
Justin Clark-Casey (justincc) b9930a6305 improve method doc on Scene.OtherRegionUp()
this is really just to trigger panda.
2011-10-15 03:17:58 +01:00
Justin Clark-Casey (justincc) ddf54b5537 move see_into_this_sim_from_neighbor [Startup] flag parsing into Scene with the others 2011-10-15 03:03:05 +01:00
Justin Clark-Casey (justincc) 528cc8136e fetch physical_prim switch from [Startup] config from inside scene, as is done for most other scene config params 2011-10-15 02:54:43 +01:00
Justin Clark-Casey (justincc) c93c9ea072 factor common code out into SOP.RemoveFromPhysics() 2011-10-15 02:02:39 +01:00
Justin Clark-Casey (justincc) 4e7d4330c2 Expose minimum frame time and update periods for experimentation.
Settings are at bottom of [Startup] in OpenSimDefaults.ini, override in OpenSim.ini to change
Defaults are the same as previously.
More information to come on opensim-dev shortly.
Feel free to tweak but if you do please don't expect any support unless feedback on certain tweaks is explicitly requested.
2011-10-13 23:47:37 +01:00
Justin Clark-Casey (justincc) 128d8dfd8b refactor: Put the frame update period when temporary objects are cleaned up in a field, like all the other update periods 2011-10-13 22:28:42 +01:00
Justin Clark-Casey (justincc) fd274a6688 refactor: chain the two scene constructors together to eliminate more copypasta 2011-10-13 22:21:03 +01:00
Justin Clark-Casey (justincc) a6fa15e8b6 Tie reported FPS correction factor into the minimum frame time rather than setting separately.
This makes reported FPS scale as required if min frame time changes
2011-10-13 22:07:55 +01:00
Justin Clark-Casey (justincc) f08664f422 remove some mono compiler warnings 2011-10-12 21:54:25 +01:00
Justin Clark-Casey (justincc) 2b290793ab refactor: have lsl and ossl interrogate scene.StatsReporter directly rather than going through scene
I know this goes against the law of demeter but I don't think it's that useful here and I'd rather get rid of nasty little wrapper methods
2011-10-10 21:54:08 +01:00
Dan Lake 4b46b7a5ad Fixed line endings from previous commit 2011-10-06 23:20:51 -07:00
Dan Lake 4748c19bdb Refactored "known child region" in ScenePresence. There were 4 different
ways to access the list/dictionary of child regions and locking was
inconsistent. There are now public properties which enforce locks.
Callers are no longer required to create new copies of lists.
2011-10-06 22:47:33 -07:00
Justin Clark-Casey (justincc) ca83f99332 Instead of adding stat agentMS in all kinds of places, calculate it instead in the main Scene.Update() loop, like the other stats
Some of the places where agentMS was added were in separate threads launched by the update loop.  I don't believe this is correct, since such threads are no longer contributing to frame time.
Some of the places were also driven by client input rather than the scene loop.  I don't believe it's appropriate to add this kind of stuff to scene loop stats.
These changes hopefully have the nice affect of making the broken out frame stats actually add up to the total frame time
2011-10-06 00:45:25 +01:00
Justin Clark-Casey (justincc) 7d033187d8 Make reported sim fps more accurate, in line with frame time ms
Also remove some unused fields and improve naming on others.
2011-10-05 22:08:56 +01:00
Dan Lake bfa405e6f7 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-03 16:45:04 -07:00
Dan Lake 460946ad62 Removed redundant code in AttachmentsModule and simplified interfaces which converted back and forth between ScenePresence and IClientAPI. More to be done still. 2011-10-03 16:44:32 -07:00
Justin Clark-Casey (justincc) 37ae6451f9 Remove vestigal RegionStatus.SlaveScene.
This appears to be code clutter since the code that uses this has long gone.
2011-10-03 23:25:09 +01:00
Justin Clark-Casey (justincc) d358125cac Reinstate option to land an npc when it reaches a target.
This is moved into ScenePresence for now as a general facility
2011-09-22 00:16:05 +01:00
Justin Clark-Casey (justincc) 241e07d006 Move code which handles NPC movement into Scene so that this can also be used by Autopilot coming from the client side.
I thought that I had implemented this but must have accidentally removed it.
Adds a regression test to detect if this happens again.
Temporarily disables automatic landing of NPC at a target.  Will be fixed presently.
2011-09-21 23:56:11 +01:00
Justin Clark-Casey (justincc) 522d6261f1 Correctly create a freshly created estate owner's default items and avatar entries on standalone if applicable. 2011-09-16 00:12:12 +01:00
Justin Clark-Casey (justincc) c4efb97d49 Write code to create minimum necessary body parts/clothing and avatar entries to make a newly created user appear as a non-cloud on viewer 2
Viewer 2 no longer contains the default avatar assets (i.e. "Ruth") that would appear if the user had insufficient body part/clothing entries.
Instead, avatars always appear as a cloud, which is a very bad experience for out-of-the-box OpenSim.
Default is currently off.  My intention is to switch it on for standalone shortly.
This is not particularly flexible as "Ruth" is hardcoded, but this can change in the future, in co-ordination with the existing RemoteAdmin capabilities.
Need to fix creation of suitable entries for users created as estate owners on standalone.
Avatars still appear with spooky empty eyes, need to see if we can address this.
This commit adds a "Default Iris" to the library (thanks to Eirynne Sieyes from http://opensimulator.org/mantis/view.php?id=1461) which can be used.
2011-09-15 22:59:29 +01:00
Justin Clark-Casey (justincc) 618277e797 Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID itemID) for now
As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway.
Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene.
Being commented to simplify analysis of attachments issues.  Can be uncommented when in use.
Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
2011-09-13 20:25:32 +01:00
Justin Clark-Casey (justincc) 306af9934a In an object return message, send a null-terminated empty string in binary bucket to prevent a viewer 3 crash.
This is the message sent to the client when the object is returned.
We were sending byte[0] in the binary bucket.  This didn't kill viewer 1 but did terminate viewer 3 (don't know about viewer 2).
So sending "\0" instead.
This is to address http://opensimulator.org/mantis/view.php?id=5683
2011-09-13 17:13:42 +01:00
Justin Clark-Casey (justincc) 56cd7d9685 stop the redundant passing in of RegionInfo to SceneGraph, since the Scene is always passed in at the same time. 2011-09-12 22:51:56 +01:00
Justin Clark-Casey (justincc) 086bf9f15d Save the default terrain texture UUIDs for a new region instead of leaving them as UUID.Zero.
Leaving them at UUID.Zero meant that when a viewer 2 logged into a region that had been freshly created, it received UUID.Zero for these textures, and hence display the land as plain white.
On a simulator restart, the problem would go away since when the database adapators loaded the new region settings, RegionSettings itself has code to use default textures instead of UUID.Zero.
This commit resolves the problem by saving the default texture UUIDs instead of Zero.
However, we currently have to do this in a roundabout way by resaving once the RegionSettings have been created by the database for the first time.  This needless complexity should be addressed.
This change will also have the effect of replacing any existing UUID.Zero terrain textures with the default ones.
However, this shouldn't have any effect since the UUID.Zeros were already being replaced in memory with those same UUIDs.
2011-09-09 00:38:04 +01:00
Justin Clark-Casey (justincc) e6eb0d9a6f Comment out Scene.CleanDroppedAttachments() and calls.
This method wasn't actually doing anything since dropped attachments retain a PCode of 9.
Also, behaviour of dropped attachments in other places appears to be that they persist after avatar logout rather than get deleted.
2011-09-02 23:19:27 +01:00
Justin Clark-Casey (justincc) 7eca929686 Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01 02:11:00 +01:00
Justin Clark-Casey (justincc) 095b3e5756 Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
2011-09-01 01:22:28 +01:00
Justin Clark-Casey (justincc) 1809aaf74c minor: remove already processed avatar null check in Scene.RemoveClient()
remove some now duplicated method doc
2011-08-30 23:36:45 +01:00
Justin Clark-Casey (justincc) ddc733cd3d refactor: move SP.SaveChangedAttachments() fully into AttachmentsModule 2011-08-30 23:32:30 +01:00
Justin Clark-Casey (justincc) 04bafd2122 refactor: Move ScenePresence.RezAttachments() into AttachmentsModule
This adds an incomplete IScenePresence to match ISceneEntity
2011-08-30 23:06:10 +01:00
Justin Clark-Casey (justincc) 1de68b34d9 refactor: migrate DropObject handling fully into AttachmentsModule from Scene 2011-08-30 22:25:38 +01:00
Justin Clark-Casey (justincc) 33a894f3d2 refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values 2011-08-27 00:15:21 +01:00
Justin Clark-Casey (justincc) c9e6b7bd10 Stop NPC's getting hypergrid like names in some circumstances.
This meant punching in another AddUser() method in IUserManagement to do a direct name to UUID associated without the account check (since NPCs don't have accounts).
May address http://opensimulator.org/mantis/view.php?id=5645
2011-08-19 00:45:22 +01:00
Justin Clark-Casey (justincc) c1a34cd8da Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-18 00:53:05 +01:00
Snoopy Pfeffer 9a6ad1535e Added console command "delete object outside" to delete all objects outside region boundaries. This is especiyll useful in cases where physical objects outside regions boundaries cause much physics engine lag. 2011-08-15 17:46:51 +02:00
Justin Clark-Casey (justincc) 4cb8d6379d Stop trying to deregister caps or close child agents when an NPC is removed 2011-08-10 00:59:31 +01:00
Justin Clark-Casey (justincc) b6ac1c46cd Get rid of AvatarAppearance.Owner to simplify the code.
This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned.
2011-08-02 00:13:04 +01:00
Justin Clark-Casey (justincc) 8c3eb324c4 When using osTeleportAgent() and osTeleportAvatar(), only teleport if the region name exactly matches (not near matches)
This is to prevent situations where the first name returned by GridService.GetRegionsByName is not one that exactly matches the given region name, even when there is an exact match later on in the list.
Only the above two functions call this teleport method (the map uses a different routine) so this seems safe to change.
Addresses http://opensimulator.org/mantis/view.php?id=5606
2011-07-29 00:00:35 +01:00
Justin Clark-Casey (justincc) 504de8bc47 Pass the first name and last name from the agent circuit data to the authorization service rather than from the account.
This is to accomodate situations where the authorization service is being used by the hypergrid, where visitors have no user account.
See http://opensimulator.org/mantis/view.php?id=5517, this code is somewhat adapted/cleaned up from Michelle's patch
I'm a little ambivalent about this since visitors could put anything in firstname/lastname so it's not much of an auth measure.
It's up to the auth service to decide which data it actually uses.
Possibly we should be passing through other info such as agent circuit ip
2011-07-23 03:48:53 +01:00
Oren Hurvitz 02e54c57c4 Generate the initial maptile asynchronously
Signed-off-by: Melanie <melanie@t-data.com>
2011-07-22 09:52:21 +01:00
Justin Clark-Casey (justincc) 0ef29da9b2 refactor: rename UpdatePrimPosition() to UpdatePrimGroupPosition() for consistency 2011-07-19 05:20:04 +01:00
Justin Clark-Casey (justincc) 4b9ef4f39c Rename UpdatePrimRotation() to UpdatePrimGroupRotation() since this is what it actually does and is more consistent with other method names. 2011-07-19 03:44:49 +01:00
Justin Clark-Casey (justincc) df0e5cc9fe When a mesh object is added to a scene, delay adding the physics actor until the sculpt data has been added to the shape (possibly via an async asset service request)
This prevents spurious 'no asset data' for meshes added on startup.
2011-07-12 02:33:09 +01:00
Justin Clark-Casey (justincc) 2f3d0e209f When a sculpt/mesh texture is received by a part on a callback request, don't do the unnecessary work of copying the base shape.
Just setting the new base shape is enough to reinsert the sculpt data and set the taint.
Also cleans up a few more left-in debugging messages.
2011-07-11 03:13:59 +01:00
Justin Clark-Casey (justincc) e41093635a fix build break I just introduced 2011-07-01 21:37:03 +01:00
Justin Clark-Casey (justincc) 9f72fbcb75 Add an async inventory details sender to respond to FetchInventory packets.
If a user with a very large inventory right-clicks on their "My Inventory" folder, viewer 1 code will send a massive number of Fetchinventory requests.
Even though each is handled asynchronously via a pool thread, the sheer frequency of requests overwhelms the pool and freezes inbound packet handling.
This change makes the first Fetchinventory thread also handle subsequent requests, freeing up the other threads.
Further efficiencies could be made by handling all the items in a particular FetchInventory request together, rather than separately.
2011-07-01 21:25:40 +01:00
Justin Clark-Casey (justincc) 22f25fae38 Hack around with the NPC module to get osNpcCreate() partially working again.
This now creates an avatar but appearance is always cloudy.
Move doesn't work.
Really, creating an NPC should only involve a ScenePresence rather than doing anything with IClientAPI, since an NPC has no viewer to communicate with!
2011-06-29 00:28:22 +01:00
Diva Canto 80fc607d75 Fixed "Unknown User" listed as creator/owner on prims created with the Build button by foreign visitors. Added command to the UserManagementModule to list all the known bindings between user UUIDs and their names: show user-names. 2011-06-08 16:01:33 -07:00
Diva Canto 9759b2a4bb Added EventManager.OnPrimsLoaded, an event that modules can hook up onto so that they know when the scene's objects have been loaded from the DB. 2011-06-08 15:18:14 -07:00
Diva Canto 02b40670be This makes the display names work better for foreigners 2011-06-07 12:10:57 -07:00
Diva Canto e33cedfd42 HG Landmarks now working. 2011-06-03 10:26:58 -07:00
Diva Canto 76c60f1f99 Moved CreateNewInventoryItem to the InventoryAccessModule in preparation for supporting HG landmarks. 2011-06-03 08:27:01 -07:00
BlueWall c7e18f9017 Adding an event to signal that logins are enabled
Added an event to signal the eabling of logins and added an alert to send to a configured service.
2011-05-28 16:20:10 -04:00
BlueWall 99f42c0a6e Add option to disable logins
This just covers script loading for now. More to come.
2011-05-28 00:35:06 -04:00
Melanie 28c25d8477 Allow disabling the legacy backup mechanism to avoid the object clone if
backup is not used.
2011-05-24 04:03:51 +01:00
Melanie 178d541dca Add an event for an orderly region shutdown that fires once per region before
the SceneGraph is torn down.
2011-05-24 01:19:48 +01:00
Justin Clark-Casey (justincc) 90567a9eaa refactor Scene.RezObject() to use AddNewSceneObject() rather than copy/pasting code with small differences 2011-05-21 00:02:53 +01:00
Justin Clark-Casey (justincc) 4b0fc4faef implement Scene.GetSceneObjectGroup(string name) to match the equivalent GetSOP method 2011-05-20 23:41:14 +01:00
Justin Clark-Casey (justincc) 91a9f30b16 implement Scene.GetSceneObjectGroup(UUID fullID) using existing index 2011-05-20 23:34:34 +01:00
Justin Clark-Casey (justincc) 7ed419217f add test for rezzing an object from a prim item 2011-05-20 23:22:27 +01:00
Justin Clark-Casey (justincc) c562b9ef19 correct small mistake in "delete object name <name>" usage summary 2011-05-18 00:22:09 +01:00
Melanie 2b88d8f93f Add commands to delete objects by name, UUID, creator or owner 2011-05-09 01:28:23 +01:00
Diva Canto eafc01cf8f Bug fix: iars under Library weren't being loaded. 2011-05-06 09:08:24 -07:00
Diva Canto f79400e94c Broke down Caps.cs into a generic Caps object that simply registers/unregisters capabilities and a specific bunch of capability implementations in Linden space called BunchOfCaps.
Renamed a few methods that were misnomers.
Compiles but doesn't work.
2011-05-01 18:22:53 -07:00
Melanie 99b35d3ca6 When coming in from a legacy region without fatpacks, start scripts the
usual way
2011-04-30 16:20:20 +01:00
Diva Canto 4d5d6222f7 Delaying starting the scripts on TPs and crossings until the agent is root. 2011-04-29 17:09:48 -07:00
Diva Canto 9892e115cc Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. 2011-04-28 20:19:54 -07:00
Melanie 13d6e05d5a Implement agent limits 2011-04-21 23:03:38 +01:00
Justin Clark-Casey (justincc) c81f5bfc5c Adjust the quanterions used in the rez coalsced object tests to get sensible bounding box and offset numbers.
Extend test to check position of objects in the rezzed coalescence.
2011-04-13 22:29:12 +01:00
Justin Clark-Casey (justincc) 58efd761d1 Add coalesced scene objects class and serializer. This is currently only used by the TestRezCoalescedObject() regression test.
This structure matches the existing one for SceneObjects and will allow code to be reused by the uuid gatherer, other tests, etc.
Test is not yet fully implemented due to a bug in rezzing coalesced objects where they all get the same name as the item.
Only one object should get the same name as the item, which appears to be the one selected last when the the objects were coalesced in the first place.
This bug will be addressed shortly.
2011-04-13 21:17:43 +01:00
Justin Clark-Casey (justincc) 2497962360 Change some text to make the autoreturn mechanism more obvious, and align with the fact that it's one word rather than two. 2011-04-05 22:25:00 +01:00
Justin Clark-Casey (justincc) 0e465da187 remove now unused individual LandData prim counts.
However, the calls to the land management module to record prims need to remain, since they were also being used to return owner object lists, etc.
This is probably why prim counts were being done there in the first place.
2011-04-05 21:25:54 +01:00
Melanie b385d4aa03 Implement taking of coalesced objects.
WARNING!!!!!
You can TAKE them, but you can't REZ them again. Only the first of the contained
objects will rez, the rest is inaccessible until rezzing them is implemented.
Also, rotations are not explicitly stored. This MAY work. Or not.
2011-04-03 20:24:44 +01:00
Justin Clark-Casey (justincc) 8022400bd4 Remove unused Datastore parameter from RegionInfo (legacy from early 2008) 2011-03-31 22:16:09 +01:00
Justin Clark-Casey (justincc) d011896341 Add generic EventManager.OnObjectAddedToScene and get PrimCountModule to listen for that rather than EventManager.OnParcelPrimCountAdd
OnParcelPrimCountAdd had the wrong semantics for the PrimCountModule - it was invoked for every entity in the scene, not just new ones, which would screw up the untainted count.
Extend automated test for this scenario.
2011-03-23 21:53:14 +00:00
Justin Clark-Casey (justincc) 7acade00b9 On initial setup, include estate and regions names in questions to make it clearer what they relate to. 2011-03-21 23:26:35 +00:00
Justin Clark-Casey (justincc) 2b04cab1ee change some log messages from info to debug 2011-02-25 02:15:06 +00:00
Mic Bowman 5a16fa882c Parameterizes the view distance used to compute and manage
child agents in neighbor regions. This means you can extend
the view on a simulator beyond the default 3x3 regions.

This uses a region default draw distance and should be
replaced at some point by the avatar specified draw distance.
That will require more careful, dynamic recomputation of child
agents every time the draw distance changes.

WARNING: this is experimental and has known instabilities. specifically
all regions "within site" should be running the same default draw distance
or agents will not be closed correctly.
2011-02-22 13:23:54 -08:00
Justin Clark-Casey (justincc) 60fe3d48ee Put some CapabilitiesModule null checks in Scene
Stop tests setting up a capabilities module by default
2011-02-18 23:50:54 +00:00
Justin Clark-Casey (justincc) 88da253c94 Add very basic test which invokes the scene update loop once and checks the frame number.
This makes Scene.Update() match its original description of performing a single update, which also matches the semantics of SOG and ScenePresence.
2011-02-18 21:54:44 +00:00
Marck 4f9c3c73ad Add support for new naming syntax of linked regions to osTeleportAgent and osTeleportOwner. 2011-02-17 13:47:13 +01:00
Melanie 918c12c965 Change the QUERYACCESS method to eliminate spurious access denied messages 2011-02-16 08:06:11 +00:00
Diva Canto ac7bc78555 Added emergency monitoring of UDP Outgoing packets thread. Just type "emergency-monitoring on/off" 2011-02-08 12:06:14 -08:00
Melanie 188d86998d Fix up QueryAccess to also check parcels 2011-01-28 04:09:04 +00:00
Melanie d90b0c53ec Fix bumping into sim borders and check estate bans for walking crossings 2011-01-28 02:38:14 +00:00
Melanie b0f641fa15 Make it work 2011-01-27 06:41:07 +00:00
Melanie 17801bd78b Add a TeleportFlags member to SP so we can tell how we got there. 2011-01-27 05:33:46 +00:00
Mic Bowman 240c0eaf1d Remove the RestorePresences functions (which don't seem to be doing
anything) and clean up the code in AddNewClient (so Appearance only
gets assigned once, not three times).
2011-01-26 13:33:34 -08:00
Diva Canto 5b43f9cac4 HG bug fix. Must wait for client's UDP contact before getting scene presence. 2011-01-06 12:47:13 -08:00
Diva Canto d42e0c39fc Bug fix in neighbors: serverURI now always has a trailing '/'... neighbors were not getting notified. 2010-12-29 07:36:39 -08:00