aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix recent regression where a race condition meant SP.MakeRootAgent() would ↵Justin Clark-Casey (justincc)2014-12-171-32/+29
| | | | | | sometimes look to start attachment scripts before ETM.HandleIncomingSceneObject() had added them. Probably a regression since ghosts branch merge on Nov 26 2014
* Halve the prediction lag for region crossing to improve most flying region ↵Justin Clark-Casey (justincc)2014-11-291-2/+2
| | | | crossings without degrading the walk cross experience (neither of which have been that great anyway).
* Somewhat improve avatar region crossings by properly preserving velocity ↵Justin Clark-Casey (justincc)2014-11-291-20/+24
| | | | | | | | | when avatar enters the new region. This commit addresses the following issues were causing velocity to be set to 0 on the new region, disrupting flight in particular * Full avatar updates contained no velocity information, which does appear to have some effect in testing. * BulletSim was always setting the velocity to 0 for the new BSCharacter. Now, physics engines take a velocity parameter when setting up characters so we can avoid this. This patch applies to both Bullet and ODE.
* refactor: Move methods to start a monitored thread, start work in its own ↵Justin Clark-Casey (justincc)2014-11-251-11/+11
| | | | | | | | thread and run work in the jobengine from Watchdog to a WorkManager class. This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management. Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget. Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
* Move conditionals which control whether a task is placed in the JobEngine ↵Justin Clark-Casey (justincc)2014-11-251-43/+25
| | | | inside Watchdog.RunJob() (renamed from RunWhenPossible) and generalize them.
* Label all threadpool calls being made in core OpenSimulator. This is to add ↵Justin Clark-Casey (justincc)2014-11-251-4/+6
| | | | | | problem diagnosis. "show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
* If JobEngine is active, then use it to copy/rez attachments for an avatar ↵Justin Clark-Casey (justincc)2014-11-251-22/+62
| | | | | | | | | entering the scene that isn't initially logging on. This will execute tasks consecutively rather than concurrently. This has two aims 1) Reduce initial teleport failures when a foreign Hypergrid user enters a region by not holding up the teleport for attachment rez (this can be particularly costly when HG gets all assets in the object graph. 2) Reduce server load that may impact other simulator activities. This complements existing JobEngine options that perform initial login attachment rez and appearance send in consecutive tasks.
* Temporarily add root agent rez attachments work to job engine if it is ↵Justin Clark-Casey (justincc)2014-11-251-4/+8
| | | | | | running rather than as a fire and forget. Experiment to see if serializing attachment rez and send initial data jobs improves other parts of sim performance.
* Add experimental job engine to see if queueing some existing async work ↵Justin Clark-Casey (justincc)2014-11-251-1/+1
| | | | | | | | during root agent entry to a region improves perf rather than always attempting to execute everything concurrently Job engine is controlled via "debug jobengine start|stop|status". Can only currently be enabled and disabled dynamically at runtime. Currently only applies to code sending initial region data (objects, other avatar data) to a client.
* Fix regression from recent a02dae5 where stand positions are no longer ↵Justin Clark-Casey (justincc)2014-09-111-3/+2
| | | | | | | correct when a sit target is specified. Adjusts stand position using just avatar position relative to the root prim instead. Fixes http://opensimulator.org/mantis/view.php?id=7315 and preserves previous fix for http://opensimulator.org/mantis/view.php?id=7299
* For monitoring purposes, start non-timeout tasks (which do not currently use ↵Justin Clark-Casey (justincc)2014-09-051-3/+3
| | | | | | | a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout() The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc. Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
* Add [EntityTransfer] AllowAvatarCrossing setting to determine whether ↵Justin Clark-Casey (justincc)2014-09-031-1/+2
| | | | | | avatars are allowed to cross regions at all. Defaults to true. For test purposes.
* Fix recent regression from 473c5594 where camera started to judder on moving ↵Justin Clark-Casey (justincc)2014-09-021-15/+25
| | | | | | | vehicles. Other parts of OpenSimulator are relying on SP.Velocity == 0 for vehicles. So add and use SP.GetWorldVelocity() instead when we need vehicle velocity, along the same lines as existing SP.GetWorldRotation()
* As per the LL grid, if an avatar is sitting then return it's velocity ↵Justin Clark-Casey (justincc)2014-08-301-0/+5
| | | | | | relative to the region rather than relative to its seat. Resolves http://opensimulator.org/mantis/view.php?id=7175
* Fix issue where moving a seated avatar would not adjust their subsequent ↵Justin Clark-Casey (justincc)2014-08-301-1/+1
| | | | | | stand position. Addresses http://opensimulator.org/mantis/view.php?id=7299
* If a user moves back in sight of a child region before the agent has been ↵Justin Clark-Casey (justincc)2014-08-151-6/+3
| | | | closed on teleport, don't unnecessarily resend all avatar and object data about that region.
* On teleport to a region that already has a child agent established (e.g. a ↵Justin Clark-Casey (justincc)2014-08-151-32/+43
| | | | | | neighbour) don't resend all the initial avatar and object data again. This is unnecessary since it has been received (and data continues to be received) in the existing child connection.
* On entity transfer of scene presence, replace polling sleep in ↵Justin Clark-Casey (justincc)2014-08-131-14/+13
| | | | | | | SP.WaitForUpdateAgent() with a triggered event instead. Rapid polls are more expensive than triggered events (several polls vs one trigger) and may be problematic on heavily loaded simulators where many threads are vying for processor time. A triggered event is also slightly quicker as there is no maximum 200ms wait between polls.
* Remove redundant origin region lock in SP.CompleteMovement()Justin Clark-Casey (justincc)2014-08-131-6/+1
| | | | This is already going to be correctly set by WaitForUpdateAgent() earlier on in that method, which is always called where a callback to the originating region is required.
* refactor: Rename recent new Client*UpdateTolerance to Root*UpdateTolerance ↵Justin Clark-Casey (justincc)2014-08-061-4/+4
| | | | for better accuracy and consistency with other similar parameters
* Implement "scene debug set root-upd-per" for dropping 1 in N root agent ↵Justin Clark-Casey (justincc)2014-07-291-2/+19
| | | | | | | updates except to originator For experimental purposes. Also corrects a previous bug where each terse update sent was counted rather than each set of terse updates to agents.
* Add debug mechanism for only sending 1 in N AgentUpdate packets to child agents.Justin Clark-Casey (justincc)2014-07-291-1/+13
| | | | | | Allows experiments in manually reducing updates under heavy load. Activated by "debug scene set client-upd-per" console command. In a simple test, can send as few as every 4th update before observed movement starts becoming disturbingly rubber-banded.
* Make it possible to change avatar position update, rotation and velocity ↵Justin Clark-Casey (justincc)2014-07-291-7/+3
| | | | | | | tolerances on the fly. This is done via "debug scene set client-pos-upd, client-rot-upd, client-vel-upd". For testing purposes.
* Fixed: after a Hypergrid teleport, attachments often either disappear, or ↵Oren Hurvitz2014-07-211-10/+13
| | | | | | | | | | | appear both on the avatar AND as in-world objects. Another manifestation of this bug is that after a Hypergrid teleport, when you click on one of the avatar's attachments the object doesn't show its name. This means that the viewer knows the attachment is there, but the simulator does not. The problem was caused by treating Hypergrid teleports as if they're Logins (because the teleport flag ViaLogin is enabled). This may fix: http://opensimulator.org/mantis/view.php?id=7238 This may fix: http://opensimulator.org/mantis/view.php?id=7220
* Fixed problems if an avatar tries to cross regions when the previous cross ↵Oren Hurvitz2014-07-211-135/+133
| | | | | | hasn't completed yet This caused the client to stop responding, and even the simulators to have problems. The solution is to disallow crossing before the previous cross has completed.
* It turns out that child agent management has had a bug for a while: there ↵Diva Canto2014-07-041-1/+3
| | | | was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions.
* Revert "Let HG users be gods too, if they have local permission to be so."Diva Canto2014-06-091-4/+7
| | | | | | | HG gods are not safe at this point. It's better to disallow this until they can be made safe. This reverts commit e86c765be3b0d94c94ff1c5f15a3949ecc857627.
* Let HG users be gods too, if they have local permission to be so.Diva Canto2014-06-091-7/+4
|
* varregion: More tweeking to only sending patches within avatar draw distance.Robert Adams2014-05-311-9/+10
| | | | Still has problems with child avatars.
* minor: rename velocidyDiff -> velocityDiffJustin Clark-Casey (justincc)2014-05-301-2/+2
|
* minor: Add some commented out logging to ↵Justin Clark-Casey (justincc)2014-05-301-0/+8
| | | | ScenePresence.SendTerseUpdateToAllClients() which is extremely helpful when investigating presence update triggers.
* If one is sitting on a child with an unset camera-eye and so using one set ↵Justin Clark-Casey (justincc)2014-05-231-3/+7
| | | | | | in a root prim, the focus should remain on the root prim. Matches behaviour just tested on the Linden grid.
* Add any camera at compensation for sat upon child prims to any existing ↵Justin Clark-Casey (justincc)2014-05-231-1/+1
| | | | camera-at value, rather than replace.
* Compensate camera-at and camera-eye for child prim rotation when sitting on ↵Justin Clark-Casey (justincc)2014-05-231-0/+12
| | | | child prim with camera-eye set
* If the root prim has a camera-at or camera-eye setting and a sat upon child ↵Justin Clark-Casey (justincc)2014-05-221-0/+7
| | | | | | prim does not, use the root prim offsets. This matches behaviour just tested on the Linden Lab grid.
* Fix issue where llSetCameraAtOffset() and llSetCameraEyeOffset() in non-root ↵Justin Clark-Casey (justincc)2014-05-221-0/+4
| | | | | | | | prims moved camera/focus to wrong position. For non-root prim, eye offsets now need to be made relative to root prim if either camera-at or camera-eye are set. Probably a regression since November 2013 when all sits were made relative to root prim to match viewer expections (and fix other bugs). Addresses http://opensimulator.org/mantis/view.php?id=7176
* minor: Remove some unused fields in ScenePresenceJustin Clark-Casey (justincc)2014-05-201-3/+0
|
* Fix issue where avatar and script chat could sometimes be heard from ↵Justin Clark-Casey (justincc)2014-05-201-3/+8
| | | | | | | | | | anywhere in neighbouring regions. This was due to a silent uint overflow in ScenePresence.UpdateChildAgent() corrupting child agent positions when the child agent was in a region with a greater x or y map co-ord than the root agent region Probably introduced in beeec1c. This still will not function properly with very high region map co-ords (in the millions) but other parts of the code don't handle this properly anyway. Looks to address http://opensimulator.org/mantis/view.php?id=7163
* On ScenePresence.MakeChildAgent(), reset the m_originRegionID as this is ↵Justin Clark-Casey (justincc)2014-05-141-0/+5
| | | | | | currently being used as a flag to orchestrate destination simulator threads on teleport. If not reset, it's possible that teleports back and forth between simulators may not restart scripts in attachments.
* Remove a race where the client's SP.CompleteMovement() thread could attempt ↵Justin Clark-Casey (justincc)2014-05-141-3/+6
| | | | | | | to restart attachment scripts before the source simulator's SP.UpdateAgent() thread had added them. This commit changes the order of code so that attachments are re-added before the CompleteMovement() thread is released. Relates to http://opensimulator.org/mantis/view.php?id=7148
* minor: convert back some tabs to spaces that got into ScenePresence via ↵Justin Clark-Casey (justincc)2014-04-291-4/+4
| | | | recent patch bc969a6b
* Restore terrain height and flying adjustments that were eliminated from ↵Justin Clark-Casey (justincc)2014-04-291-28/+28
| | | | non-megaregion paths in ScenePresence.MoveToTarget() by recent patch bc969a6b
* Adjust avatar sit positioning on a target to pretty much exactly match that ↵Justin Clark-Casey (justincc)2014-04-231-14/+26
| | | | | | | | | | of the LL grid. This uses an offset of 0.05 on the up vector of the sit orientation, after extensive analysis on http://opensimulator.org/mantis/view.php?id=7096 and https://wiki.secondlife.com/wiki/Talk:LlSitTarget This supersedes the previous adjustment in 5b73b9c4 which had been wrongly applied. The maximum change is about 0.1 with a maximum height avatar. This patch is all Aleric's work - I am applying manually in order to add these additional notes
* Eliminated many warningsOren Hurvitz2014-04-231-1/+0
|
* Possible solution for #7120 and #7051lillith_xue2014-04-211-23/+32
| | | | Signed-off-by: Robert Adams <misterblue@misterblue.com>
* Fixed: when teleporting between grids, the avatar name wasn't always updated.Oren Hurvitz2014-04-091-6/+67
| | | | When an avatar is in their home grid, their name appears as "First Last". In other grids the name appears as "First.Last @grid.example.com". However, viewers have a bug and they don't always show the new name. We use a trick (changing the Group Title briefly) in order to make the viewers show the new name. This is only done after a Hypergrid teleport.
* Don't re-retrieve sit part in SP.HandleAgentSit() when we already have it ↵Justin Clark-Casey (justincc)2014-04-051-2/+1
| | | | (this time with the right code change)
* Fix sp.AbsolutePosition when agent is sitting on a child prim, which in ↵Justin Clark-Casey (justincc)2014-04-031-1/+1
| | | | | | | turns fixes llDetectedPos(), llGetLinkPrimitiveParams() and similar functions. Add regression test for this case. In relation to http://opensimulator.org/mantis/view.php?id=7043
* Fix problem with floating avatar by passing avatar size informationRobert Adams2014-04-021-3/+7
| | | | | | | | to the physics engine. This operation was accidentally removed while in the middle of improving the computation of the avatar height. This is a temp fix until the real solution is added.
* Remove redundant part.SitTargetAvatar setting from SP.MakeRootAgent as ↵Justin Clark-Casey (justincc)2014-04-031-2/+0
| | | | part.AddSittingAvatar already does this.