aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stop explicitly closing and nulling out Animator in order to prevent NREs in ↵Justin Clark-Casey (justincc)2012-07-191-16/+6
| | | | | | | various places due to race conditions. Even where checks are being made they aren't enough since they all assume that the Animator they just checked is still there in the next line, which is not necessarily the case without locking. The memory used is small and these should be GC'd anyway when the SP is released. If this is not happening then the wider problem of old SPs being retained needs to be resolved.
* If a part has a sit target and an avatar is already sitting, allow another ↵Justin Clark-Casey (justincc)2012-07-101-7/+4
| | | | | | | avatar to sit in the position given if no sit target was set. Previous behave was that the second avatar could not sit. This matches behaviour observed on the LL grid.
* refactor: move management of SOP.SitTargetAvatar into SOP.AddSittingAvatar() ↵Justin Clark-Casey (justincc)2012-07-101-5/+0
| | | | and SOP.RemoveSittingAvatar()
* Revert "refactor: Add SOP.IsSitTargetOccupied to improve readability"Justin Clark-Casey (justincc)2012-07-101-2/+2
| | | | | This reverts commit c8f0d476d2f775ba4d7afca12eeff527b46bb8e2. On reconsideration, I think this is less readable since immediately following code still sets SitTargetAvatar directly
* refactor: Add SOP.IsSitTargetOccupied to improve readabilityJustin Clark-Casey (justincc)2012-07-101-2/+2
|
* refactor: use sit orientation argument passed in to SP.SendSitResponse() ↵Justin Clark-Casey (justincc)2012-07-101-4/+2
| | | | | | rather than creating a new copy There are no issues with side-effects since this is a struct.
* Move common code to detect whether a part has a valid sit target into a SOP ↵Justin Clark-Casey (justincc)2012-07-101-30/+5
| | | | | | | property rather than being repeated in SP. This also makes the detection in SP.FindNextAvailableSitTarget() and SendSitResponse() identical. Previously they varied slightly (SendSitResponse didn't check for an older type of invalid quaternion) but the practical effect is most probably zero.
* Remove log line accidentally left in SP.SendSitResponse()Justin Clark-Casey (justincc)2012-07-101-1/+1
|
* Don't allow a prim to be sat upon if its part of an attachmentJustin Clark-Casey (justincc)2012-07-091-0/+9
|
* Do not allow a script to attach a prim if its being sat upon.Justin Clark-Casey (justincc)2012-07-091-1/+17
| | | | | | This prevents a stack overflow where a get position on the avatar will refer to the attachment which will in turn refer back to the avatar. This required recording of all sitting avatars on a prim which is done separately from recording the sit target avatar. Recording HashSet is null if there are no sitting avatars in order to save memory.
* refactor: Move ScenePresence <-> AgentData attachments copying code into ↵Justin Clark-Casey (justincc)2012-06-271-37/+4
| | | | AttachmentsModule.
* When attachments are being saved and deleted for a closing root agent, ↵Justin Clark-Casey (justincc)2012-06-251-3/+0
| | | | | | 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.
* Comment out the scene presence sitting debug log messages for nowJustin Clark-Casey (justincc)2012-06-111-6/+6
|
* Don't make duplicate call to ScenePresence.Close() separately in ↵Justin Clark-Casey (justincc)2012-06-081-1/+1
| | | | | | | 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.
* Cleanup + change properties to set fields with private set : Thanks Justin ↵BlueWall2012-05-181-1/+0
| | | | for the tip.
* Provide Telehub setting to allow use of landmarksBlueWall2012-05-181-1/+2
| | | | Setting to allow use of landmarks to override telehub routing. Default is off.
* Merge branch 'master' of ssh://opensimulator.org/var/git/opensimJustin Clark-Casey (justincc)2012-05-171-29/+28
|\
| * Force the default Telehub router if no matches are found in the config.BlueWall2012-05-171-29/+28
| |
* | Check agent limit against root agent count rather than both root and child ↵Justin Clark-Casey (justincc)2012-05-171-2/+11
|/ | | | | | | | | | | 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.
* Add configurable SpawnPointRoutingBlueWall2012-05-131-19/+84
| | | | | | | | | | | | | | | | | | 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
* Merge branch 'master' of ssh://opensimulator.org/var/git/opensimDan Lake2012-05-081-0/+2
|\
| * Mantis 1456 same region teleport of a sitting avatar.Talun2012-05-091-0/+2
| | | | | | | | | | Region to region was fixed some time ago in EntityTransferModule. This applies the same fix for same region teleports.
* | Trigger event when scene presences are updatedDan Lake2012-05-081-0/+10
|/
* Mantis 60004 problems with damage and llSetDamage. In damage enabled areas ↵Talun2012-05-041-7/+46
| | | | this patch - Deletes any objects that have damage set > 0 that deliver that damage to an avatar Stops Gods receiving damage, Stops volume detect objects causing damage Deletes NPCS when their helth reduces to zero Gradually "heals" damage to an avatar Resets health on going to a non damage area
* Reinsert a 2000ms delay before closing a no longer required agent on the ↵Justin Clark-Casey (justincc)2012-05-031-4/+10
| | | | | | | | | source region after teleport to resolve Imprudence teleport problems. Viewers 1 and 3 are fine with doing this immediately. However, Imprudence has a small delay (<200ms, >500ms) after receiving the AgentCompleteMovement reply packet on the destination region before regarding that region as the currnet region. If Imprudence receives a DisableSimulator in this period, it quits. We are not restoring the full 5000ms delay since this brings back a bug where teleports permanently fail if an avatar tries to teleport back too quickly. This commit also sends the AgentCompleteMovement packet to the client before telling the source region to release its old agent, in order to further cut down any possibility of the DisableSimulator being recieved before the AgentMovementComplete.
* Add regression test for teleporting between neighbouring regions on the same ↵Justin Clark-Casey (justincc)2012-05-011-2/+2
| | | | | | | simulator This adds a non-advertised wait_for_callback option in [EntityTransfer]. Default is always true. Teleport tests disable the wait for callback from the destination region in order to run within a single thread.
* refactor: Simplify by combining SafeSendControlsToScripts() from fe8e835 ↵Justin Clark-Casey (justincc)2012-04-301-73/+75
| | | | into SendControlsToScripts() (instead of SendControlToScripts()).
* Fixed: scripted controls didn't work if the avatar was sitting downOren Hurvitz2012-04-301-9/+15
| | | | This fixes a bug introduced in 6473674bbf6ce006512083902e8ff1796d8c8b22
* Fixed: custom walking animations didn't stop when the avatar stopped walking.Oren Hurvitz2012-04-271-14/+19
| | | | | | This happened because the scripts were notified about control changes (e.g., the user stopped pressing the Forward key) when the animation was still WALK, so the script didn't stop the walking animation. Fixing this required: a) Update the movement animation *before* notifying the script; b) Add locking to prevent clashes with the Heartbeat thread (which also updates the animations); c) Handle the case of a user who stops walking just as the avatar is in the air: the avatar should STAND in that case, not WALK. This reverts commit feef1dd73243cfdd5322632fb67e64cabc1ad4bc.
* Tweak log messages on local region to region teleport path to help with ↵Justin Clark-Casey (justincc)2012-04-261-1/+4
| | | | problem resolution.
* Comment out avatar move to target message for now.Justin Clark-Casey (justincc)2012-04-251-3/+3
|
* Commit the avination Teleport() methods (adaptedto justincc's changes)Melanie2012-04-251-1/+12
|
* refactor: Combine ScenePresence.Teleport() and TeleportWithMomentum()Justin Clark-Casey (justincc)2012-04-251-16/+0
| | | | These are identical apart from setting Velocity = zero, which has no practical effect anyway since this is zeroed when the avatar is added back to the physics scene.
* Add regression test TestSameRegionTeleport()Justin Clark-Casey (justincc)2012-04-251-0/+6
|
* refactor: Rename EstateSettings.IsEstateManager() to ↵Justin Clark-Casey (justincc)2012-04-171-3/+3
| | | | | | | EstateSettings.IsEstateManagerOrOwner() to reflect what it actually does. This makes it consistent with other parts of OpenSimulator that are treating ESTATE_MANAGER and ESTATE_OWNER as different entities. As per opensim-dev mailing list.
* Mantis 55025 Implement script time.Talun2012-04-121-0/+19
| | | | Signed-off-by: nebadon <michael@osgrid.org>
* Mantis5502 implementation of some of the new constantsTalun2012-04-091-0/+38
| | | | Signed-off-by: Melanie <melanie@t-data.com>
* For llGetMass(), return the mass of the avatar is the object is attached.Justin Clark-Casey (justincc)2012-04-061-0/+16
| | | | | As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass This is the mass as used by the physics engine (ODE or Bullet).
* HG 2.0: added the beginning of HGSuitcaseInventoryService. Plus moved the ↵Diva Canto2012-03-281-16/+0
| | | | hack away from ScenePresence. This is better but it still doesn't restore the inventory upon arrival.
* More on switching the root folder from under the viewer. More experiments.Diva Canto2012-03-271-0/+18
|
* Incorporate scene teleporting debugging into "debug scene teleport ↵Justin Clark-Casey (justincc)2012-03-211-1/+1
| | | | true|false" command
* slight increase in jump power to make running jump slightly better.nebadon2012-03-201-1/+1
|
* reduce avatar verticle jump from the absurd 5 meter jump to a lessnebadon2012-03-201-1/+1
| | | | | absurd 3m vertical jump to better match what you would see in Second Life and be more in line with what users would expect.
* Get rid of unnecessary ParentID == 0 check on SP.Get_AbsolutePosition since ↵Justin Clark-Casey (justincc)2012-03-091-2/+2
| | | | this is handled by the necessary ParentPart check
* Use SP.ParentPart instead of ParentID in places where it's more efficient ↵Justin Clark-Casey (justincc)2012-03-091-13/+13
| | | | | | | (saving extra null checks, etc.) However, it looks like we should retain SP.ParentID since it's much easier to use that in places where another thread could change ParentPart to null. Otherwise one has to clumsily put ParentPart in a reference, etc. to avoid a race.
* refactor: cleanup SP.HandleAgentSit so that everything is done within one if ↵Justin Clark-Casey (justincc)2012-03-091-15/+8
| | | | (part != null), rather than having unnecessary multiple checks
* Remove a race condition from SP.Set_AbsolutePosition where we assume the ↵Justin Clark-Casey (justincc)2012-03-091-5/+5
| | | | | | ParentPart is still not null if the ParentID != 0 Another thread could come in and stand the avatar between those two instructions.
* Hold a ref to the prim we're sat on rather than querying scene each timeMelanie2012-03-081-27/+29
| | | | the check for significant is carried out. Prevents a deadlock condition.
* ScenePresence line endings and fix AllowMovement default to true.Dan Lake2012-03-021-30/+30
|
* In ScenePresence, removed several private variables used to store public ↵Dan Lake2012-03-011-108/+44
| | | | parameters. They were only used by the get/set and make code harder to refactor.