Commit Graph

547 Commits (28e68329b688b34279c5ff403a6f2b23994b452e)

Author SHA1 Message Date
Justin Clark-Casey (justincc) af5a3f2d73 Restore previous client AO behaviour by not allowing them to remove the default animation but continue to allow scripts to do so.
This keeps the fix from http://opensimulator.org/mantis/view.php?id=6327
and fixes the behaviour regression in http://opensimulator.org/mantis/view.php?id=6483
Animations may still exhibit different behaviour if both scripts and clients are adjusting animations.
A change in the behaviour of client AO to not remove all animations may be a better long term approach.
2013-01-25 23:54:53 +00:00
Justin Clark-Casey (justincc) 0ba01ce699 Check the existing ScenePresence.ParentPart to make sure we're not trying to sit on a prim we're already sat upon, rather than looking up the part from scratch.
An adaptation of commit 055b8a2
Having both ParentID and ParentPart references now is redundant.  ParentID should probably be eliminated.
2013-01-25 23:53:16 +00:00
dahlia e2823bfefe move resit fix to ScenePresence.cs and allow for requesting sit on objects other than the object currently sat on 2013-01-25 23:51:17 +00:00
Robert Adams fdf8732cd7 ScenePresence passes the avatar rotation down to the physics engine. This will be a no-op for ODE but enables asymmetrical avatars for BulletSim. 2012-12-28 16:29:16 -08:00
Robert Adams 5afab9bcfe Add check to always push terse updates for presences that have new velocities of zero. 2012-12-27 22:12:27 -08:00
Dan Lake 88b094cbf7 Simplify sit code a bit by determining correct animation in HandleSit instead of HandleSitRequest. This eliminates m_nextSitAnimation, an unneeded state-saving variable in ScenePresence 2012-12-13 13:05:28 -08:00
Justin Clark-Casey (justincc) 597a101b9f Minor formatting for 0962a35d and a few one-line comments as to why that code is there 2012-11-20 05:09:44 +00:00
Iain Oliver 0962a35d2f Fix movetotarget on mega regions. 2012-11-20 04:54:13 +00:00
Dan Lake 2e106cd5de Change to earlier commit for TargetVelocity to support distributed physics. 2012-11-02 03:09:04 -07:00
Dan Lake ffe4d738fb Add TargetVelocity to PhysicsActor interface to support distributed physics. No change to existing functions. 2012-10-31 17:13:18 -07:00
Melanie fd9cb3cb68 Store and send the current movement animation state to a new sim on crossing 2012-10-30 23:08:22 +00:00
Justin Clark-Casey (justincc) c97890ca69 Add "force gc" region console command which manually invokes garbage collection.
For debugging purposes.
2012-10-29 22:53:06 +00:00
Oren Hurvitz b4923da334 Changed "course" to "coarse" in several places 2012-10-25 23:32:37 +01:00
SignpostMarv 8d431c6359 formatting 2012-09-04 00:03:43 +01:00
SignpostMarv 663bfbb372 although the attachmentPoint argument is a uint, zero is not a valid attachment point 2012-09-04 00:03:43 +01:00
Justin Clark-Casey (justincc) ba58331b29 Extend "Restarting scripts in attachments" debug log message to show actual name of user and the region they are in 2012-08-24 22:56:05 +01:00
Robert Adams 7243d4f842 BulletSim: Properly regenerate hulls when objects made physical.
This fixes the problem of non-base shapes (cubes and spheres)
    falling through the terrain.
2012-08-17 14:45:18 -07:00
Robert Adams 5c192b9bab Modify order of code so SOP doesn't set the physics actor flying
property multiple times every time Update is called.
This eliminates zillions of settings which is better for BulletSim.
The should be no functionality change.
2012-08-17 13:34:20 -07:00
Justin Clark-Casey (justincc) e94831ddab Stop explicitly closing and nulling out Animator in order to prevent NREs in 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.
2012-07-19 22:59:28 +01:00
Justin Clark-Casey (justincc) 337ea019bd If a part has a sit target and an avatar is already sitting, allow another 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.
2012-07-10 23:55:22 +01:00
Justin Clark-Casey (justincc) cdea572d2e refactor: move management of SOP.SitTargetAvatar into SOP.AddSittingAvatar() and SOP.RemoveSittingAvatar() 2012-07-10 23:50:04 +01:00
Justin Clark-Casey (justincc) 11e0ad6dc8 Revert "refactor: Add SOP.IsSitTargetOccupied to improve readability"
This reverts commit c8f0d476d2.
On reconsideration, I think this is less readable since immediately following code still sets SitTargetAvatar directly
2012-07-10 23:39:05 +01:00
Justin Clark-Casey (justincc) c8f0d476d2 refactor: Add SOP.IsSitTargetOccupied to improve readability 2012-07-10 23:34:40 +01:00
Justin Clark-Casey (justincc) 69a6f6e3cd refactor: use sit orientation argument passed in to SP.SendSitResponse() rather than creating a new copy
There are no issues with side-effects since this is a struct.
2012-07-10 23:26:40 +01:00
Justin Clark-Casey (justincc) e8347b7095 Move common code to detect whether a part has a valid sit target into a SOP 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.
2012-07-10 23:21:39 +01:00
Justin Clark-Casey (justincc) 506437b684 Remove log line accidentally left in SP.SendSitResponse() 2012-07-10 23:06:34 +01:00
Justin Clark-Casey (justincc) d6f563794e Don't allow a prim to be sat upon if its part of an attachment 2012-07-09 21:43:44 +01:00
Justin Clark-Casey (justincc) 2eaa6d5ace Do not allow a script to attach a prim if its being sat upon.
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.
2012-07-09 21:24:32 +01:00
Justin Clark-Casey (justincc) d043213317 refactor: Move ScenePresence <-> AgentData attachments copying code into AttachmentsModule. 2012-06-27 00:41:46 +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) bab7dab4c5 Comment out the scene presence sitting debug log messages for now 2012-06-11 23:37:16 +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
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) 521ad080f1 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-05-17 23:56:36 +01: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
BlueWall 295bb3227d Force the default Telehub router if no matches are found in the config. 2012-05-17 00:47:19 -04: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 3bc5620d74 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-05-08 16:06:02 -07:00
Dan Lake 20952c75c5 Trigger event when scene presences are updated 2012-05-08 16:05:34 -07:00
Talun c21c9e13ef Mantis 1456 same region teleport of a sitting avatar.
Region to region was fixed some time ago in EntityTransferModule.
This applies the same fix for same region teleports.
2012-05-09 00:02:13 +01:00
Talun 92fde6ed26 Mantis 60004 problems with damage and llSetDamage. In damage enabled areas 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 2012-05-04 21:01:09 +01:00
Justin Clark-Casey (justincc) fcd5b0817b Reinsert a 2000ms delay before closing a no longer required agent on the 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.
2012-05-03 22:30:36 +01:00
Justin Clark-Casey (justincc) 9d2e1c67a8 Add regression test for teleporting between neighbouring regions on the same 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.
2012-05-01 23:14:12 +01:00
Justin Clark-Casey (justincc) d0598c63f3 refactor: Simplify by combining SafeSendControlsToScripts() from fe8e835 into SendControlsToScripts() (instead of SendControlToScripts()). 2012-04-30 17:33:08 +01:00
Oren Hurvitz fe8e835bfc Fixed: scripted controls didn't work if the avatar was sitting down
This fixes a bug introduced in 6473674bbf
2012-04-30 17:18:15 +01:00
Oren Hurvitz 6473674bbf Fixed: custom walking animations didn't stop when the avatar stopped walking.
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 feef1dd732.
2012-04-27 20:47:02 +01:00
Justin Clark-Casey (justincc) cb6791fb30 Tweak log messages on local region to region teleport path to help with problem resolution. 2012-04-26 22:35:25 +01:00
Justin Clark-Casey (justincc) 74dbfe6bb5 Comment out avatar move to target message for now. 2012-04-25 23:46:42 +01:00
Melanie 3be3189ee0 Commit the avination Teleport() methods (adaptedto justincc's changes) 2012-04-25 04:00:01 +01:00