Commit Graph

638 Commits (8f88c17df969b1fd3e4a93747201e9436c9a1fcd)

Author SHA1 Message Date
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