aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-08-02It turns out that child agent management has had a bug for a while: there ↵Diva Canto1-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.
2014-06-10minor: rename velocidyDiff -> velocityDiffJustin Clark-Casey (justincc)1-2/+2
2014-06-10minor: Add some commented out logging to ↵Justin Clark-Casey (justincc)1-0/+8
ScenePresence.SendTerseUpdateToAllClients() which is extremely helpful when investigating presence update triggers.
2014-05-23If one is sitting on a child with an unset camera-eye and so using one set ↵Justin Clark-Casey (justincc)1-3/+7
in a root prim, the focus should remain on the root prim. Matches behaviour just tested on the Linden grid.
2014-05-23Add any camera at compensation for sat upon child prims to any existing ↵Justin Clark-Casey (justincc)1-1/+1
camera-at value, rather than replace.
2014-05-23Compensate camera-at and camera-eye for child prim rotation when sitting on ↵Justin Clark-Casey (justincc)1-0/+12
child prim with camera-eye set
2014-05-22If the root prim has a camera-at or camera-eye setting and a sat upon child ↵Justin Clark-Casey (justincc)1-0/+7
prim does not, use the root prim offsets. This matches behaviour just tested on the Linden Lab grid.
2014-05-22Fix issue where llSetCameraAtOffset() and llSetCameraEyeOffset() in non-root ↵Justin Clark-Casey (justincc)1-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
2014-05-20minor: Remove some unused fields in ScenePresenceJustin Clark-Casey (justincc)1-3/+0
2014-05-20Fix issue where avatar and script chat could sometimes be heard from ↵Justin Clark-Casey (justincc)1-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
2014-05-14On ScenePresence.MakeChildAgent(), reset the m_originRegionID as this is ↵Justin Clark-Casey (justincc)1-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.
2014-05-14Remove a race where the client's SP.CompleteMovement() thread could attempt ↵Justin Clark-Casey (justincc)1-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
2014-04-29minor: convert back some tabs to spaces that got into ScenePresence via ↵Justin Clark-Casey (justincc)1-4/+4
recent patch bc969a6b
2014-04-29Restore terrain height and flying adjustments that were eliminated from ↵Justin Clark-Casey (justincc)1-28/+28
non-megaregion paths in ScenePresence.MoveToTarget() by recent patch bc969a6b
2014-04-23Adjust avatar sit positioning on a target to pretty much exactly match that ↵Justin Clark-Casey (justincc)1-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
2014-04-23Eliminated many warningsOren Hurvitz1-1/+0
2014-04-21Possible solution for #7120 and #7051lillith_xue1-23/+32
Signed-off-by: Robert Adams <misterblue@misterblue.com>
2014-04-09Fixed: when teleporting between grids, the avatar name wasn't always updated.Oren Hurvitz1-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.
2014-04-05Don't re-retrieve sit part in SP.HandleAgentSit() when we already have it ↵Justin Clark-Casey (justincc)1-2/+1
(this time with the right code change)
2014-04-03Fix sp.AbsolutePosition when agent is sitting on a child prim, which in ↵Justin Clark-Casey (justincc)1-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
2014-04-02Fix problem with floating avatar by passing avatar size informationRobert Adams1-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.
2014-04-03Remove redundant part.SitTargetAvatar setting from SP.MakeRootAgent as ↵Justin Clark-Casey (justincc)1-2/+0
part.AddSittingAvatar already does this.
2014-04-03refactor: Use m_sittingAvatars to maintain the list of sitting avatars ↵Justin Clark-Casey (justincc)1-8/+4
instead of two independent structures that do exactly the same thing m_sittingAvatars code also already properly handles locking to avoid races.
2014-04-03Fix bug where crossing to a neighbouring region and back again would trigger ↵Justin Clark-Casey (justincc)1-1/+1
an exception, and a second recross would stop the user moving until relog Also fixes an issue where sitting avatar counts became inaccurate after any cross. Part of the problem was due to cloning code using MemberwiseClone() but not resetting certain collection structures. Adds regression test for this case. In relation to http://opensimulator.org/mantis/view.php?id=7050
2014-03-25Run slow operations in a separate thread, instead of using FireAndForget ↵Oren Hurvitz1-2/+2
(which has a 1-minute timeout) Resolves http://opensimulator.org/mantis/view.php?id=6945
2014-03-24Get the full viewer name even if it's (incorrectly) sent in the 'Channel' fieldOren Hurvitz1-1/+1
Recent versions of Firestorm and Singularity have started sending the viewer name in the 'Channel' field, leaving only their version number in the 'Viewer' field. So we need to search both of these fields for the viewer name. This resolves http://opensimulator.org/mantis/view.php?id=6952
2014-03-05Don't request a terse update after local teleport - this will be done by the ↵Justin Clark-Casey (justincc)1-6/+0
main frame loop anyway and has the potential to race that thread.
2014-03-05If an avatar is sitting, send out position updates to clients for any ↵Justin Clark-Casey (justincc)1-3/+13
change, not just those outside the usual tolerances. This is to allow small adjustments of less than 0.05m in functions such as llSetPrimitiveLinkParams() to work This is another fix for http://opensimulator.org/mantis/view.php?id=7044 Extends regression test for this case.
2014-02-15Properly restore position on crossing failure for mega-regions.Robert Adams1-14/+32
Fix odd "cannot cross into banned parcel" viewer error message when crossing into non-existant region. Proper permission failure messages are now returned.
2014-02-14Don't request group information in SP.MakeRootAgent() if the presence ↵Justin Clark-Casey (justincc)1-8/+10
belongs to no group (UUID.Zero) This was trigger the XmlRpcGroups errors described in http://opensimulator.org/mantis/view.php?id=6986 Introduced in commit 5b73b9c4 (Wed Dec 11 01:39:56 2013)
2014-01-27Reinsert attachments list taking code in SP.MakeRootAgent()Justin Clark-Casey (justincc)1-14/+30
Locking attachments then launching script instances on a separate thread will not work, attachments will simply be unlocked and vulnerable to race conditions.
2014-01-27refactor: Remove identical part.ParentGroup.AddAvatar(UUID); calls which ↵Justin Clark-Casey (justincc)1-2/+1
occur no matter which branch of the conditional is executed
2014-01-16Reorder checks in SP.CompleteMovement() to fix test failuresJustin Clark-Casey (justincc)1-36/+33
2014-01-16Actually put IsChildAgent = true inside the lock, otherwise there is still a ↵Justin Clark-Casey (justincc)1-1/+3
small window for race conditions on duplicate CompleteMovement calls
2014-01-16Prevent duplicate invocations or race dontision in SP.CompleteMovement()Justin Clark-Casey (justincc)1-3/+26
This can happen under poor network conditions if a viewer repeats the message send If this happens, physics actors can get orphaned, which unecessarily raises physics frame times
2014-01-11varregion: remove unnecessary border checking code in ScenePresence.Robert Adams1-0/+6
2014-01-08If an agent is sitting, then do send the rotation in the agent update ↵Justin Clark-Casey (justincc)1-0/+2
instead of zeroing it to resolve mouselook camera problems Addresses http://opensimulator.org/mantis/view.php?id=6892 Thanks to tglion for this spot. This resolves a recent regression from 17b32b764acd815400d9eb903aaec6dcebd60ac7
2013-12-27varregion: extract banned region logic into a class for cleanlyness.Robert Adams1-115/+13
Add 'not found' caching in EntityTransferModule.GetRegionContainingWorldLocation so hitting borders and bad teleports do not continuiously hammer on the GridService.
2013-12-24varregion: add lots of DEBUG level log messages. Especially for teleport.Robert Adams1-4/+4
2013-12-14varregion: rename 'LegacyRegionLocX' back to 'RegionLocX' and same for Y and Z.Robert Adams1-3/+3
Rename 'RegionWorldLocX' to 'WorldLocX' and same for Y and Z. This keeps the downward compatibility and follows the scheme of 'region' and 'world' location naming that is happening in the Util module.
2013-12-13Eliminate unnecessary line from my previous commit 1d605642Justin Clark-Casey (justincc)1-2/+0
2013-12-11Refix sitting on child prims by reinserting relevant code back into ↵Justin Clark-Casey (justincc)1-3/+22
SP.HandleAgentSit()
2013-12-11Committing the Avination Scene Presence and related texture codeMelanie1-352/+667
- Parts of region crossing code - New bakes handling code - Bakes now sent from sim to sim without central storage - Appearance handling changes - Some changes to sitting - A number of unrelated fixes and improvements
2013-12-05Fix regression where mouse look flight direction no longer worked by zeroing ↵Justin Clark-Casey (justincc)1-13/+2
x/y rot before sending agent updates, instead of before any agent update processing It turns out that the x/y rot data in mouselook is needed to implement this and to push the avatar against the ground if walking in mouselook. Doing this in the terse send so that we preserve mouselook rotation information
2013-12-03Ignore X and Y body rotations when sent by mouse look.Justin Clark-Casey (justincc)1-3/+15
Fixes http://opensimulator.org/mantis/view.php?id=3274 When not in mouselook, avatar only sends rotations around the Z plane (since that's the only way an avatar can rotate). However, in mouselook it also sends X and Y information. But sending X and Y in terse updates causes issues with wrong camera movement in mouselook. So strip out X and Y components for now. If this is an issue, then could strip out before sending avatar terse update, though this generates more cpu work. Thanks to mirceakitsune for suggesting an initial fix
2013-11-30varregion: Add MaxRegionSize constant and enforce in RegionInfo.Robert Adams1-4/+44
Intermediate checkin of changing border cross computation from checking boundry limits to requests to GridService. Not totally functional.
2013-11-30Actually use the SP.AgentControlStopSlowWhilstMoving parameter intoroduced ↵Justin Clark-Casey (justincc)1-1/+1
for slow walk/run in 4cfe02a rather than the magic number
2013-11-30Remove unused SP.Updated flag, which appears unused for many years and was ↵Justin Clark-Casey (justincc)1-10/+0
only set true once and never reset
2013-11-30Implement most effects of AGENT_CONTROL_STOPJustin Clark-Casey (justincc)1-40/+91
AGENT_CONTROL_STOP is specified to SP.HandleAgentUpdate if the user holds down the space bar on a viewer. For a stopped avatar, this prevents fly or walk/run (though not rotate) until released. For a walking/running avatar, this reduces movement to half speed. For a flying avatar, this stops the avatar. These are observed behaviours on the LL grid - there was no previous OpenSimulator implementation This commit introduces an optional parameter to SP.AddNewMovement(), which means that it will no longer compile on .NET 3.5 or earlier versions of Mono than 2.8 Currently, this does not work for jumping, and if used whilst flying the avatar continues the fly animation even though it does not move
2013-11-30Remove nudgehack from SP.HandleAgentUpdate by making MovementFlag a uint ↵Justin Clark-Casey (justincc)1-19/+6
rather than a byte