Commit Graph

713 Commits (8b267b5bb547b807dd3cb6cd83ea03bd101e19ff)

Author SHA1 Message Date
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
Justin Clark-Casey (justincc) 683cfc6f82 refactor: Combine ScenePresence.Teleport() and TeleportWithMomentum()
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.
2012-04-25 02:07:55 +01:00
Justin Clark-Casey (justincc) a65ca24701 Add regression test TestSameRegionTeleport() 2012-04-25 01:51:40 +01:00
Justin Clark-Casey (justincc) 24a0cc5261 refactor: Rename EstateSettings.IsEstateManager() to 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.
2012-04-17 01:25:41 +01:00
Talun 08e509978d Mantis 55025 Implement script time.
Signed-off-by: nebadon <michael@osgrid.org>
2012-04-12 18:44:00 -07:00
Talun 78c0028179 Mantis5502 implementation of some of the new constants
Signed-off-by: Melanie <melanie@t-data.com>
2012-04-09 21:25:22 +01:00
Justin Clark-Casey (justincc) f2903db390 For llGetMass(), return the mass of the avatar is the object is attached.
As per http://lslwiki.net/lslwiki/wakka.php?wakka=llGetMass
This is the mass as used by the physics engine (ODE or Bullet).
2012-04-06 21:14:19 +01:00
Diva Canto 51dc1e709c HG 2.0: added the beginning of HGSuitcaseInventoryService. Plus moved the hack away from ScenePresence. This is better but it still doesn't restore the inventory upon arrival. 2012-03-28 15:01:37 -07:00
Diva Canto af96b99356 More on switching the root folder from under the viewer. More experiments. 2012-03-27 20:36:54 -07: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
nebadon bd1f848bf6 slight increase in jump power to make running jump slightly better. 2012-03-20 14:17:15 -07:00
nebadon 9ed3532c1b reduce avatar verticle jump from the absurd 5 meter jump to a less
absurd 3m vertical jump to better match what you would see in Second
Life and be more in line with what users would expect.
2012-03-20 13:45:38 -07:00
Justin Clark-Casey (justincc) 205c36d3a4 Get rid of unnecessary ParentID == 0 check on SP.Get_AbsolutePosition since this is handled by the necessary ParentPart check 2012-03-09 02:44:08 +00:00
Justin Clark-Casey (justincc) 94e58ff6b9 Use SP.ParentPart instead of ParentID in places where it's more efficient (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.
2012-03-09 02:38:11 +00:00
Justin Clark-Casey (justincc) b454326273 refactor: cleanup SP.HandleAgentSit so that everything is done within one if (part != null), rather than having unnecessary multiple checks 2012-03-09 02:33:48 +00:00
Justin Clark-Casey (justincc) 73c47f7205 Remove a race condition from SP.Set_AbsolutePosition where we assume the ParentPart is still not null if the ParentID != 0
Another thread could come in and stand the avatar between those two instructions.
2012-03-09 02:22:22 +00:00
Melanie 675d40357c Hold a ref to the prim we're sat on rather than querying scene each time
the check for significant is carried out. Prevents a deadlock condition.
2012-03-08 19:14:34 +00:00
Dan Lake 8d249f8456 ScenePresence line endings and fix AllowMovement default to true. 2012-03-02 09:19:13 -08:00
Dan Lake e8779cd9e5 In ScenePresence, removed several private variables used to store public parameters. They were only used by the get/set and make code harder to refactor. 2012-03-01 19:22:05 -08:00
Justin Clark-Casey (justincc) 90ea00a109 Try to resolve some problems with viewers crashing after hitting parcel banlines or freezing on the banline.
This involves
1) On forcible teleport, call m_scene.RequestTeleportLocation() rather than ScenePresence.Teleport() - only EntityTransferModule now should call SP.Teleport()
2) When avatar is being forcibly moved due to banlines, use a 'stop movement' tolerance of 0.2 to requested position rather than 1
This prevents the avatar sometimes being stuck to banlines until they teleport somewhere else.
This aims to fix some problems in http://opensimulator.org/mantis/view.php?id=5822
2012-02-23 22:56:42 +00:00
Melanie 1dfc990264 Add a position parameter to region crossing of objects. This avoids the
potential bad update that places an object at the opposite side of the
origin sim for a moment before actually crossing it. Especially important in
grids like OSG where lag between sims is high.
2012-02-23 01:40:30 +00:00
Diva Canto b489c85226 Amend to last commit. This should have been committed too. 2012-02-19 15:37:37 -08:00
Diva Canto 20c65ac438 A few more tweaks on position updates and create child agents. Mono hates concurrent uses of the same TCP connection, and even of the connections to the same server. So let's stop doing it. This patch makes movement much smoother when there are lots of neighbours. 2012-02-19 12:28:07 -08:00
Justin Clark-Casey (justincc) e7fd732209 Make ScenePresence.MovementFlag a private only settable value to reduce complexity of code analysis 2012-02-11 00:10:59 +00:00
Melanie 855d3a3ba5 Teleport routing, part 1 2012-01-24 04:06:37 +00:00
Justin Clark-Casey (justincc) 59a0c50d48 Comment out noisy log lines I accidentally included in the nant build target adjustment commit.
Left in the method doc.
2012-01-16 23:04:08 +00:00
Justin Clark-Casey (justincc) 82ad9d4e04 Remove monocov and other obsolete nant build targets.
monocov was a code coverage attempt 3 years ago which no longer works.
other removed targets have been commented out or unused for a very long time
2012-01-16 22:58:58 +00:00
Diva Canto 7b84942f86 HG landing points: this hopefully fixes some confusion that was making HG avies always land in 0,0 2012-01-10 11:10:47 -08:00
BlueWall 707c8c6f2b Add some run-time debugging support
Add configuration option - DEBUG to enable debugging methods. This is temporary for helping users testing teleport routing be able to report back the data with the test cases. We can remove when finished with this, or leave it if it proves to be useful.

	Users: set DEBUG = true in OpenSim.ini to get more information from teleport routing. The default is false. It presently prints the TeleportFlags value.
2012-01-09 18:19:55 -05:00
BlueWall b3a12167d6 Use our TeleportFlags
Switch to our TeleportFlags enum instead of LibOMV because we need to define a type for HG Logins. Also moved some debugging in ScenePresence into a function to make it simpler to enable/disable.
2012-01-09 17:54:35 -05:00
BlueWall 95345521f0 TP Routing debug
Fix test to checking against bitfield instead of int
2012-01-09 17:04:34 -05:00
BlueWall 3640afdd95 Fix teleport routing for incoming HG+Owner
Incoming HG owner/estate manager, etc. is routed according to the rules defined for teleports within the local grid. Left some commented debugging code inside so we can test other cases. Will remove when tings are settled in.
2012-01-09 14:31:22 -05:00
BlueWall 43145c7f67 Debugging HG teleport routing
Add some temporary debugging to the teleport routing to get a better view of what happens when HG jumps are made.
2012-01-09 13:07:02 -05:00
BlueWall 34c42cdab0 Fix HG teleport routing
Needed to breakout the ViaHGLogin check to it's own section. For some reason it would not factor in when combined with the other teleport flag types.
2012-01-09 01:37:28 -05:00
Melanie 0e855fea7c Fix a build break 2012-01-09 01:05:19 +00:00
Melanie 1ebd79e413 Add the HG case to landing point checks 2012-01-09 00:54:59 +00:00
Melanie 44cde8d5c6 Update teleport routing to match Avination 2012-01-08 23:36:49 +00:00
BlueWall 266167f5a3 Fix teleport routing
Route non-owner avatars according to land settings
2012-01-08 17:41:47 -05:00
Justin Clark-Casey (justincc) c5c079f6aa Fix bug where tapping home to stop falling would stop any avatar movement other than falling again.
Addresses http://opensimulator.org/mantis/view.php?id=5839
2012-01-07 00:17:40 +00:00
Justin Clark-Casey (justincc) 983b49c0c8 commented out "Prevented flyoff" log message for now as this becomes problematic with bot testing.
Please uncomment if still needed.
2012-01-03 18:25:31 +00:00
Melanie 7f527814d5 And a typo fix 2011-12-22 16:57:49 +00:00
Melanie 6412349dec Add a few comments, correct a merge artefact 2011-12-22 16:51:51 +00:00
Melanie 2347593dac Harmonizing SP with Avination 2011-12-22 16:48:52 +00:00
Diva Canto 219ec7ef20 Fixing a bug introduced yesterday. This put the precondition test inside CheckForBorderCrossing the right way. 2011-12-22 08:18:03 -08:00
Diva Canto bb0c6a498b Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-21 15:17:44 -08:00
Diva Canto ddff2f246c Moved an external test into the method that uses those preconditions. 2011-12-21 15:17:26 -08:00
Justin Clark-Casey (justincc) fa0a71253f Though the viewer warns about receiving this, not sending appears to break baked texture caching when crossing region boundaries.
Needs further investigation.

Revert "Stop sending the viewer its own AvatarAppearance packet."

This reverts commit 92039f295d.
2011-12-20 18:54:15 +00:00
Diva Canto dd69c9fd20 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-12-20 09:53:05 -08:00
Justin Clark-Casey (justincc) 92039f295d Stop sending the viewer its own AvatarAppearance packet.
The viewer warns in the log if it receives this.
Stopping this doesn't appear to have adverse effects on viewer 1 or viewer 3 - the viewer gets its own appearance from body parts/clothes and self-baked textures.
2011-12-19 20:13:48 +00:00
Justin Clark-Casey (justincc) 0b91ec8dd2 Migrate detailed "appearance show" report generation up to AvatarFactoryModule from AppearanceInfoModule so that it can be used in debug (inactive).
Further filters "debug packet <level>" to exclused [Request]ObjectPropertiesFamily if level is below 25.
Adjust some method doc
Minor changes to some logging messages.
2011-12-19 18:58:05 +00:00
Diva Canto 964ec57ffe Changed the async approach on close child agents. This may improve crossings a little bit. 2011-12-16 17:24:50 -08:00
Justin Clark-Casey (justincc) a3a17e929e Stop generating client flags when we send out full object updates.
These were entirely unused.
2011-12-16 23:20:12 +00:00
Diva Canto 3bf699ad36 No functional changes. Changed the prefix of that log message [CONNECTION BEGIN] to [SCENE] because that's where the message happens.
Also changed the instantiation of a vector object to be done only once instead of every time we receive a position update.
2011-12-16 08:59:33 -08:00
Justin Clark-Casey (justincc) c0ba99e5ad Stop having to call SetHeight again in ScenePresence.AddToPhysicalScene() when we've already passed size information to the avatar at PhysicsScene.AddAvatar()
Eliminate some copypasta for height setting in OdeCharacter
2011-12-15 22:29:36 +00:00
Justin Clark-Casey (justincc) 937c06db54 Code cleanup related to ScenePresence.PhysicsActor and OdeScene/OdeCharacter
Stop hiding RemoveAvatar failure, add log messages when characters are removed through defects or re-added unexpectedly.
Add commented out log lines for future use.
Use automatic property for PhysicsActor for better code readability and simplicity
2011-12-15 21:57:22 +00:00
Dan Lake c34ab0ee66 Cleaned up ScenePresence parameters for Flying, WasFlying, FlyingOld and IsColliding 2011-12-12 02:43:38 -08:00
Justin Clark-Casey (justincc) af3cd00048 Get rid of IScene.PresenceChildStatus() which always had to execute a lookup in favour of IClientAPI.ISceneAgent.IsChildAgent instead. 2011-12-09 23:07:53 +00:00
Justin Clark-Casey (justincc) fc27806e90 remove some unused fields in ScenePresence 2011-12-09 22:52:54 +00:00
Justin Clark-Casey (justincc) 0e265889dd Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists.
This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08 19:25:24 +00:00
Justin Clark-Casey (justincc) 55de189752 minor: remove some mono compiler warnings 2011-12-08 18:56:07 +00:00
Justin Clark-Casey (justincc) 54360dd20e When a client connects to a scene, send other avatar appearance data asynchronously to reduce hold up in the IN UDP packet processing loop.
This is already being done for the initial object data send.
2011-12-08 18:39:56 +00:00
Justin Clark-Casey (justincc) f61e54892f On a new client circuit, send the initial reply ack to let the client know it's live before sending other data.
This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before.
This may stop some avatars appearing grey on login.
This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity
This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-12-08 18:34:23 +00:00
Justin Clark-Casey (justincc) 585fc5e79d Update SP.PhysicsCollisionUpdate() doc.
It might be inefficient, but there are collisions every frame if the avatar is walking/standing on the ground or a prim surface
2011-12-03 02:51:17 +00:00
Justin Clark-Casey (justincc) b66fe3e9ff Add method doc to SP.PhysicsCollisionUpdate() to make it clear that it's called continuously even where there are no collisions 2011-12-03 02:45:02 +00:00
Justin Clark-Casey (justincc) a009871827 Add basic TestFlyingAnimation() regression test 2011-12-03 02:39:21 +00:00
Justin Clark-Casey (justincc) feef1dd732 Stop calling Animator.UpdateMovementAnimations() at the end of HandleAgentUpdate().
There's no point doing this if it's being called via PhysicsCollisionUpdate
2011-12-03 02:05:11 +00:00
Justin Clark-Casey (justincc) f08aad8a40 For now, disable mechanism to limit avatar animation updates since this causes avatars to never reach the correct animation after some actions.
This reverts to situation where animation updates are made each frame on SP.PhysicsCollisionUpdate (though a packet is only sent if the anim actually changes).
m_updateCount was not being update on various avatar state changes, causing the correct animations to never be sent.
Always setting in HandleAgentUpdate() is not enough since the avatar is continually sending AgentUpdate packets.
One would need to identify all the conditions under which animations need to play out and set m_updateCount appropriately in SP.HandleAgentUpdate()
2011-12-03 01:47:12 +00:00
Justin Clark-Casey (justincc) 8185ce8b4a Do a cagent.Anims != null check in SP.CopyFrom() 2011-12-03 00:30:13 +00:00
Justin Clark-Casey (justincc) 96c191f4fd Stop SP.HandleAgentUpdate() and PhysicsCollisionUpdate() from being processed if we're dealing with a child ScenePresence.
Neither of these can have any effect on child agents
Now leaving warning about trying to set animation on a child agent active.  Might temporarily pop up now and again.
2011-12-03 00:09:18 +00:00
Justin Clark-Casey (justincc) 054ebe8878 Stop some places where we're trying to reset animations in child agents where such requests are ignored. 2011-12-02 23:56:01 +00:00
Justin Clark-Casey (justincc) 2a6597f61e Remove pointless Animator.TrySetMovementAnimation("STAND") in ScenePresnece constructor.
Comment was right - it is indeed useless since SP always starts off as child and TrySetMovementAnimation screens out child SP
2011-12-02 22:14:47 +00:00
Justin Clark-Casey (justincc) b0fe0464af Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines.
This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry.
Callers adjusted to stop checking for the list reference being null (which never happened anyway)
2011-11-22 22:13:57 +00:00
Justin Clark-Casey (justincc) b6d83e9c0f Stop OdePrim and OdeCharacter insanely overriding set LocalID to set their own private m_localID property but leaving get to return the then unset PhysicsActor.LocalId!
Instead, just have both subclasses use the PhysicsActor.LocalID property.
This restores collision functionality that fell away in 45c7789 yesterday
2011-11-16 23:01:59 +00:00
Justin Clark-Casey (justincc) 828e4a5b09 Add comments about trying to avoid synchronous work off the EventManager.OnMakeRootAgent event since this is on the critical path for transfer of avatars from one region to another. 2011-11-15 20:26:42 +00:00
Justin Clark-Casey (justincc) 64784bc0cf remove SceneCommunicationService.OnAvatarCrossingIntoRegion. This stuff is not being used any more - it's now IEntityTransferModule and SimulationService instead 2011-11-15 17:30:58 +00:00
Dan Lake ed19284d85 Merge branch 'remove-scene-viewer' 2011-11-14 12:37:48 -08:00
Justin Clark-Casey (justincc) 49ec85ae15 Do a ScenePresence null check in HGMessageTransferModule.SendIMToScene() to stop a NullReferenceException being thrown if an HG IM is sent to a simulator running multiple regions
This is an attempt to address http://opensimulator.org/mantis/view.php?id=5791
2011-11-14 15:24:02 +00:00
Dan Lake 5fd1749150 Remove SceneViewer from ScenePresence to reduce quadruple queueing of
prim update to only triple queuing. Existing method was:
1. Schedule prim for update, adding to scene update list
2. Update on SOGs during heartbeat queues update onto each SceneViewer
3. Update on SPs during heartbeat queues update onto each IClientAPI
4. ProcessEntityUpdates queues updates into UDP send stack

Now the SceneViewer has been eliminated so updates are scheduled at any
time and then put onto the IClientAPI priority queues immediately during
SceneGraph.UpdateObjectGroups.
2011-11-11 17:16:52 -08:00
Justin Clark-Casey (justincc) a3052e40ad extract ground sit code into SP.HandleAgentSitOnGround() for consistency with other sitting code. 2011-11-11 23:28:32 +00:00
Justin Clark-Casey (justincc) 2a2cdaa211 As with prim sitting avatars, make an avatar phantom when it sits on the ground and solid again when it stands.
This is to avoid http://opensimulator.org/mantis/view.php?id=5783 when a collision with a ground sitting avatar causes that avatar to automatically stand and sometimes not be able to move
A better solution may be to keep gound sitting avatars solid but remove their collision status.  However, this requires some physics code work.
2011-11-11 23:10:43 +00:00
Justin Clark-Casey (justincc) 2a7f4e0602 remove unncessary IClientAPI parameter from SP.SendSitResponse() 2011-11-11 21:53:00 +00:00
Justin Clark-Casey (justincc) b1cb4f5b04 As per mailing list last week, remove facility that would automatically move the avatar if prim with no sit target was out of sitting range.
Now, no movement occurs.
Note that you can still sit on a prim with an explicit sit target from any distance, as was the case before.
2011-11-11 21:42:58 +00:00
Justin Clark-Casey (justincc) a658bddbcd Bump warp sit distance up to 10 meters, as discussed on opensim-dev mailing list last week.
This means that if the avatar is within 10 meters of the selected target, it sits on it immediately without walking.
Existing autopilot outside this range will be disabled in a later commit
2011-11-11 19:59:12 +00:00
Melanie 0daece6f2b Fix turn left and turn right properly. Works for both built-ins and LSL AOs 2011-11-10 23:42:48 +00:00
Melanie f5abae5ac6 Implement nudging support for strafing motion 2011-11-10 23:03:05 +00:00
Melanie 48d2300b8a Fix misaligned sit animation on scripted sit caused by the default sit
animation being run after the scripted one.
2011-11-10 20:54:15 +00:00
Melanie 0bf757e42b Allow HG and other scene presences not linked to a user account to function. 2011-11-06 20:00:03 +00:00
Melanie bd10d14bbd Fix build break 2011-11-05 23:12:00 +00:00
Melanie bbbcdaa462 Remove spammy autopilot debug 2011-11-05 22:54:47 +00:00
Melanie 71388fc02a Porting the ScenePresenceAnimator from Avination. Jump and fall anims now work
properly.
2011-11-05 22:41:00 +00:00
Melanie ac3254a5f5 Change puvlic m_ variable to a getter property 2011-11-05 21:43:35 +00:00
Melanie 2dc452b4a7 ScenePresence part of the Avination animator fixes. 2011-11-05 21:41:16 +00:00
Melanie b6df9e9fe4 Chnaging the sit target adjustment to a more precise approximation of SL. Some small
fixes ported from Avination. Some white space fixes.
2011-11-05 21:24:36 +00:00
nebadon e182cc198d Fix avatar height, removes the hip offset hack
Author: Mana Janus <mana@mjm-labs.com>
2011-11-05 02:56:52 -07:00
Justin Clark-Casey (justincc) cfce2529ad refactor: In sit code, compare against Vector3.Zero and Quaternion.Identity instead of individual components of a vector/quat 2011-11-05 02:04:48 +00:00
Justin Clark-Casey (justincc) 28c4dc9be4 Fix NPC sitting for prims without a sit target.
This is to partially address http://opensimulator.org/mantis/view.php?id=5769
We don't need to call SP.HandleAgentSit() again if we are within 10m since the autopilot won't trigger.
By calling it twice, the position of the sitting NPC was wrongly adjusted, ending up near <0,0,0>.
However, this change does mean that NPCs further than 10m away will not attempt to autopilot to the prim, though this code was broken anyway (is actually a different mechanism to normal NPC movmeent).
Hopefully this can be addressed soon.
2011-11-05 01:38:42 +00:00
Justin Clark-Casey (justincc) d7815ace4a On standup, trigger the changed link script event after the avatar has been fully changed.
This was meant to help with the script in http://opensimulator.org/mantis/view.php?id=5772 but it doesn't work.
Probably the event is fired before the physics actor has been set up again for the stood avatar.
Fixing that would be much more complicated, but processing the event last of all seems like a good idea in any case.
2011-11-04 23:24:22 +00:00
Dan Lake b8d50b10fb Rename ForEachAvatar back to ForEachScenePresence. The other changes
from previous commit which sort out which iterator is used are left
intact. A discussion is needed as to what constitutes an avatar vs a
ScenePresence.
2011-11-03 17:53:51 -07:00
Dan Lake 94dc7d07eb Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls to
the 3 iteration functions so more of them are using the correct
iteration for the action they are performing. The 3 iterators that seem
to fit all actions within OpenSim at this time are:

ForEachAvatar: Perform an action on all avatars (root presences)
ForEachClient: Perform an action on all clients (root or child clients)
ForEachRootClient: Perform an action on all clients that have an avatar

There are still a dozen places or so calling the old
ForEachScenePresence that will take a little more refactoring to
eliminate.
2011-11-03 17:06:08 -07:00
Dan Lake a724ebacd7 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-02 14:59:34 -07:00
Dan Lake e2c51a977d Changes UpdateFlag in SOP to an enumeration of NONE, TERSE and FULL.
UpdateFlag is now referenced/used only within SOP and SOG. Outsiders are
using ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule on
SOP consistently now. Also started working toward eliminating those
calls to ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule
from outside SOP in favor of just setting properties on SOP and let SOP
decide if an update should be scheduled. This consolidates the update
policy within SOP and the client rather than everywhere that makes
changes to SOP. Some places forget to call update while others call it
multiple times, "just to be sure".

UpdateFlag and Schedule*Update will both be made private shortly.

UpdateFlag is intended to be transient and internal to SOP so it has
been removed from XML serializer for SOPs.
2011-11-02 14:59:00 -07:00
Justin Clark-Casey (justincc) 03993d0b14 Fix race condition that would sometimes send or save appearance for the wrong avatar.
In AvatarFactoryModule.HandleAppearanceUpdateTimer(), we loop through appearance save and send requests and dispatch via a FireAndForget thread.
If there was more than one request in the save or send queue, then this led to a subtle race condition where the foreach loop would load in the next KeyValuePair before the thread was dispatched.
This gave the thread the wrong avatar ID, leaving some avatar appearance cloudy since appearance data was never sent.
This change loads the fields into local references so that this doesn't happen.
2011-11-02 18:25:03 +00:00
Justin Clark-Casey (justincc) 9456a540c5 Add "appearance send" command to allow manual sending of appearance. 2011-11-01 23:23:45 +00:00
Justin Clark-Casey (justincc) 6d97545b6b Remove the SyncRoot locking from Scene which was only being done around the main physics loop and ScenePresence position and velocity setting
This is no longer necessary with ODECharacter taints (ODEPrim was already not taking part in this).  BSCharacter was already tainting.
2011-10-29 02:42:53 +01:00
Justin Clark-Casey (justincc) 0fe756e42c Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-10-28 23:16:46 +01:00
Justin Clark-Casey (justincc) 7b46506822 fetch SOP.RotationOffset once in UpdateRotation() and compare rather than fetch four separate times.
No functional change.
2011-10-28 23:15:51 +01:00
Dan Lake 06577d7299 Continuation of previous checkin. Found more places where ForEachScenePresence can be changed to ForEachRootScenePresence. 2011-10-27 01:25:12 -07:00
Justin Clark-Casey (justincc) c825c9a945 Get rid of the pointless null checks on collision listeners. Add warning about synchronicity for PhysicsActor.OnCollisionUpdate event doc 2011-10-25 22:35:00 +01:00
Dan Lake 9ab2943abf Removed redundant NotInTransit function from ScenePresence. IsInTransit=false does the same thing and NotInTransit was not used anywhere. 2011-10-19 15:50:09 -07:00
Dan Lake eac29396d9 Moved HaveNeighbor utility function from ScenePresence to Scene. Fixed line endings from previous commit. 2011-10-19 15:38:25 -07:00
Dan Lake da794f34a5 Renamed and rearranged AvatarFactoryModule to eliminate redundant lookups of scene presence by client ID. 2011-10-19 14:41:44 -07:00
Justin Clark-Casey (justincc) 62a63f834b refactor: Use SOP.SitTargetAvatar instead of calling a special GetAvatarOnSitTarget() which returned exactly the same thing 2011-10-17 02:04:20 +01:00
Justin Clark-Casey (justincc) 0c041ce12f Implement osNpcSit(). This is still in development so don't trust it
Format is osNpcSit(<npc-uuid>, <target-uuid>, OS_NPC_SIT_IMMEDIATE)
e.g. osNpcSit(npc, llGetKey(), OS_NPC_SIT_IMMEDIATE);
At the moment, sit only succeeds if the part has a sit target set.
NPC immediately sits on the target even if miles away - they do not walk up to it.
This method is in development - it may change so please don't trust it yet.
Standing will follow shortly since that's kind of important once you're sitting :)
2011-10-17 01:42:31 +01:00
Justin Clark-Casey (justincc) aa19ccf65c refactor: rename IClientAPI.SendPrimUpdate() to SendEntityUpdate() since it sends entity updates (including presence ones), not just prims. 2011-10-14 01:45:46 +01:00
Justin Clark-Casey (justincc) f08664f422 remove some mono compiler warnings 2011-10-12 21:54:25 +01:00
Justin Clark-Casey (justincc) e3c522e211 Comment out [SCENE PRESENCE] SendAppearanceToAllOtherAgents: log message
As per earlier discussions with dslake
2011-10-07 20:51:26 +01:00
Dan Lake 4b46b7a5ad Fixed line endings from previous commit 2011-10-06 23:20:51 -07:00
Dan Lake 4748c19bdb Refactored "known child region" in ScenePresence. There were 4 different
ways to access the list/dictionary of child regions and locking was
inconsistent. There are now public properties which enforce locks.
Callers are no longer required to create new copies of lists.
2011-10-06 22:47:33 -07:00
Dan Lake 9a16e76f51 Simplified IsInTransit property on ScenePresence and removed InTransit() which called IsInTransit=true which called m_inTransit=true. Also removed NotInTransit(). 2011-10-06 12:39:19 -07:00
Dan Lake 08f264d096 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Conflicts:
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2011-10-06 12:22:15 -07:00
Dan Lake bd9ba904c3 Refactor ScenePresence so gets and sets are through properties. Added private sets when needed. Removed redundant code when methods replicated what the set already does 2011-10-06 12:19:31 -07:00
Justin Clark-Casey (justincc) ca83f99332 Instead of adding stat agentMS in all kinds of places, calculate it instead in the main Scene.Update() loop, like the other stats
Some of the places where agentMS was added were in separate threads launched by the update loop.  I don't believe this is correct, since such threads are no longer contributing to frame time.
Some of the places were also driven by client input rather than the scene loop.  I don't believe it's appropriate to add this kind of stuff to scene loop stats.
These changes hopefully have the nice affect of making the broken out frame stats actually add up to the total frame time
2011-10-06 00:45:25 +01:00
Justin Clark-Casey (justincc) 56dbab35e1 Remove unimplementated UpdateMovement() methods from SOG, SOP.
SP still has an implementation but this is now just a public method on SP rather than an abstract one in EntityBase.
No point making the code more complex until it actually needs to be,
2011-10-01 01:26:50 +01:00
Dan Lake 28a482a7ee Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-21 16:24:48 -07:00
Dan Lake 2c0bb8118d Commented out new debug statements in ScenePresence 2011-09-21 16:24:19 -07:00
Justin Clark-Casey (justincc) d358125cac Reinstate option to land an npc when it reaches a target.
This is moved into ScenePresence for now as a general facility
2011-09-22 00:16:05 +01:00
Justin Clark-Casey (justincc) f9438e7147 Remove unused and never set SP.PreviousRotation 2011-09-21 22:01:57 +01:00
Justin Clark-Casey (justincc) 572b680cb0 get rid of an incredibly noisy logging message from the last commit 2011-09-21 20:15:06 +01:00
Justin Clark-Casey (justincc) c9c40343af Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-09-21 20:05:11 +01:00
Justin Clark-Casey (justincc) 8159fd7110 When calling osNpcMoveTo(), rotate the avatar in the direction of travel.
This stops the npc walking backwards if the target is directly behind.
This means that the npc no longer returns to its original rotation once movement has finished.
If you want this behaviour, please store and reset the original rotation after movement.
This is somewhat to address http://opensimulator.org/mantis/view.php?id=5678
2011-09-21 19:28:41 +01:00
Dan Lake fa9291512a Make debug statements in ScenePresence consistent and add a few more 2011-09-20 14:07:10 -07:00
Justin Clark-Casey (justincc) 385c4a210d On setting a new avatar appearance, if height hasn't changed then don't set that same height in ScenePresence.
This prevents unnecessary work in the ODE module, though possibly that should be checking against same size sets itself
2011-09-17 00:26:53 +01:00
Justin Clark-Casey (justincc) 6f542f73d4 Stop the avatar stalling on its first boarder cross when using the ODE plugin
When upgrading the previously child agent to a root, the code was setting the Size parameter on the ODECharacter PhysicsActor.
This in turn reset Velocity, which cause the border stall.
I'm fixing this by commenting out the Velocity = Vector3.Zero lines since they don't appear to play a useful purpose
2011-09-16 23:57:16 +01:00
Justin Clark-Casey (justincc) adfe713b43 minor: I was wrong about OffsetPosition - sometimes it genuinely does return offset position!
Add method doc to explain this.
2011-09-16 22:55:24 +01:00
Justin Clark-Casey (justincc) b2356340d2 Remove setter from SP.OffsetPosition, since all sets should flow through SP.AbsolutePosition
OffsetPosition is also misnamed - it returns the absolute position and never contains an offset.
2011-09-16 22:51:36 +01:00
Justin Clark-Casey (justincc) bd991fc95f Don't try and delete attachments for child agent close 2011-09-13 22:54:50 +01:00
Justin Clark-Casey (justincc) dea0935361 eliminate redundant SP.m_regionInfo since it always has the scene.
We were already referencing through the scene in some places.
2011-09-12 23:00:15 +01:00
Justin Clark-Casey (justincc) 62b2450529 remove the unused SP.initializeScenePresence() 2011-09-12 22:54:54 +01:00
Justin Clark-Casey (justincc) 56cd7d9685 stop the redundant passing in of RegionInfo to SceneGraph, since the Scene is always passed in at the same time. 2011-09-12 22:51:56 +01:00
Justin Clark-Casey (justincc) ea0f78c971 Start locking entire add/remove operations on an IScenePresence.AttachmentsSyncLock object
Attach and detach packets are processed asynchronously when received from a viewer.
Bugs like http://opensimulator.org/mantis/view.php?id=5644 indicate that in some situations (such as attaching/detaching entire folders of objects at once), there are race conditions between these threads.
Since multiple data structures need to be updated on attach/detach, it's not enough to lock the individual collections.
Therefore, this commit introduces a new IScenePresence.AttachmentsSyncLock which add/remove operations lock on.
2011-09-12 21:57:22 +01:00
Justin Clark-Casey (justincc) 728fd0b1b8 lock attachments when enumerating through them in ScenePresence.CopyTo().
May have some effect on http://opensimulator.org/mantis/view.php?id=5644
2011-09-10 01:09:17 +01:00
Justin Clark-Casey (justincc) 9c32b131fd Add extra log information when attachments fail validation 2011-09-10 00:57:52 +01:00
Justin Clark-Casey (justincc) cf73afec35 Try disabling the inconsistent attachment state check to see if this actually has an impact.
The code in question is over three years old and just be catching an inconsistency rather than being wholly necessary.
This commit still carries out the check and prints all the previous log warnings but a 'failure' no longer prevents avatar region crossing or teleport, and it doesn't give the client the error message.
This will have some kind of impact on http://opensimulator.org/mantis/view.php?id=5672
2011-09-05 23:42:37 +01:00
Justin Clark-Casey (justincc) 5c1fa968ab Stop NPCs losing attachments when the source avatar takes them off.
This was happening because we were using the source avatar's item IDs in the clone appearance.
Switch to using the asset IDs of attachments instead for NPCs.
The InventoryAccessModule and AttachmentModule had to be changed to allow rezzing of an object without an associated inventory item.
Hopefully goes some way towards resolving http://opensimulator.org/mantis/view.php?id=5653
2011-09-03 01:11:16 +01:00
Justin Clark-Casey (justincc) 7d58b5fa15 move common code into AttachmentsModule.DeleteAttachmentsFromScene() 2011-08-31 17:53:58 +01:00
Justin Clark-Casey (justincc) e69f246b86 refactor: move multiple class to set avatar height into associated SP.AddToPhysicalScene() 2011-08-31 17:25:18 +01:00
Justin Clark-Casey (justincc) 899d109e82 get rid of appearance null checks - this is never null 2011-08-31 17:13:53 +01:00
Justin Clark-Casey (justincc) 54839d28ad remove pointless m_attachments == null check since this field is never null 2011-08-31 16:46:43 +01:00
Justin Clark-Casey (justincc) 5a5206449f minor: seal up another instance of using the appearance list without locking 2011-08-31 16:41:58 +01:00
Justin Clark-Casey (justincc) 32444d98cb Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself
This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase.
It also improves liveness.
This might improve attachment anomolies when performing region crossings.
2011-08-31 16:29:51 +01:00
Justin Clark-Casey (justincc) 1809aaf74c minor: remove already processed avatar null check in Scene.RemoveClient()
remove some now duplicated method doc
2011-08-30 23:36:45 +01:00
Justin Clark-Casey (justincc) ddc733cd3d refactor: move SP.SaveChangedAttachments() fully into AttachmentsModule 2011-08-30 23:32:30 +01:00
Justin Clark-Casey (justincc) 04bafd2122 refactor: Move ScenePresence.RezAttachments() into AttachmentsModule
This adds an incomplete IScenePresence to match ISceneEntity
2011-08-30 23:06:10 +01:00
Justin Clark-Casey (justincc) be357f8fee Fix bug in persisting saved appearances for npcs
Assets have to be marked non-local as well as non-temporary to persist.  This is now done.
Hopefully addresses http://opensimulator.org/mantis/view.php?id=5660
2011-08-30 01:58:32 +01:00
Justin Clark-Casey (justincc) d4d894c20f Stop avatars returning from neighbouring regions from stalling on the border crossing.
On making a root agent, we need to reset the ScenePresence.m_movement_flag so that it doesn't remember the
movement registered to the client when it exited the initial region.
If this is remember, then the client avatar movement isn't updated and it appears to stall in mid-air, though this is resolved with a prod/release of any other direction key.
This bug was probably introduced a few weeks ago.  Surprised that nobody brought it up.
2011-08-27 01:28:33 +01:00
Justin Clark-Casey (justincc) 33a894f3d2 refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values 2011-08-27 00:15:21 +01:00
Justin Clark-Casey (justincc) d5dc8133fc remove pointless IsDeleted check on SP.RezAttachments()
IsDeleted is never set for an SP, even though it's on EntityBase.
It might be an idea to set it in the future
2011-08-24 22:37:08 +01:00
Justin Clark-Casey (justincc) 6d4432f440 refactor: simplify EntityBase.IsDeleted property 2011-08-24 22:34:26 +01:00
Justin Clark-Casey (justincc) afd5469eec Remove pointless contains check in ScenePresence.RemoveAttachment() 2011-08-23 00:08:29 +01:00
Justin Clark-Casey (justincc) d328046efb If an attachment fails, then start logging the exception for now, in order to help with the inconsistent state bug.
This also refactors AttachmentsModules to stop pointlessly refetching the ScenePresence in various methods.  However, more of this is required.
2011-08-22 23:59:48 +01:00
Justin Clark-Casey (justincc) 2eaadf2dc0 Add warning log message to say which attachment fails validation in order to pin down problems with "Inconsistent Attachment State" 2011-08-22 23:28:37 +01:00
Justin Clark-Casey (justincc) 49258350e8 refactor: fold CreateSceneViewer() back into ScenePresence constructor 2011-08-18 01:22:01 +01:00
Justin Clark-Casey (justincc) 45c37ef494 refactor: Fold 3 ScenePresence() constructors into one since only one is called. 2011-08-18 01:11:23 +01:00
Justin Clark-Casey (justincc) c1a34cd8da Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-18 00:53:05 +01:00
Justin Clark-Casey (justincc) d73c424078 get rid of logged warnings about lack of some modules - afaik these never occur in real life and just clutter up tests 2011-08-16 23:12:58 +01:00
Justin Clark-Casey (justincc) b3a4b10531 eliminate redundant ground sitting checks since these are already done in enclosing control structures 2011-08-11 03:16:46 +01:00
Justin Clark-Casey (justincc) 1aa1711893 eliminate the rotation parameter from SP.HandleMoveToTargetUpdate(). This can just use the currently set Rotation
looks like I spoke to soon about eliminating jerkiness on "go here"/autopilot.  It's still there.
2011-08-11 03:06:38 +01:00
Justin Clark-Casey (justincc) 36f7d36fa1 instead of setting avatar rotation twice in SP.HandleAgentUpdate(), eliminate the second setting in AddNewMovement() 2011-08-11 02:54:15 +01:00
Justin Clark-Casey (justincc) 29093df1a7 get rid of intermediate local store of body rotation in ScenePresence, this is not used. 2011-08-11 02:36:02 +01:00
Justin Clark-Casey (justincc) 4402851b08 Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) after finishing their movement. This also fixes judder after an avatar has finished "go here"/autopilot movement in a viewer.
This meant reseting the SP.AgentControlFlags since the Animator uses these to determine the correct default animation.
2011-08-11 01:56:42 +01:00
Justin Clark-Casey (justincc) 951ffad81e If SP.MoveToTarget has been called with a force walk, begin by landing the avatar.
There is a bug here - once an avatar has landed it glides to its new position instead of performing a walk animation
2011-08-11 00:23:54 +01:00
Justin Clark-Casey (justincc) 5d6c9644fa early code to allow scripts to force npcs not to fly when moving to target
this is to allow walking on prims.  it will be up to the script writer to be sure that there is a continuous path.
currently implemented in osNpcMoveToTarget(), but none of this is final.
2011-08-10 01:47:37 +01:00
Justin Clark-Casey (justincc) 4cb8d6379d Stop trying to deregister caps or close child agents when an NPC is removed 2011-08-10 00:59:31 +01:00
Justin Clark-Casey (justincc) 92e96d394a When an NPC is created, stop telling neighbouring regions to expect a child agent 2011-08-09 23:11:07 +01:00
Justin Clark-Casey (justincc) 6878049952 get rid of bogus log message 2011-08-06 03:06:05 +01:00
Justin Clark-Casey (justincc) 94d496cf2b remove the largely unused copy/pasted HandleAgentRequestSit() method 2011-08-05 00:57:43 +01:00
Justin Clark-Casey (justincc) 1918402cb1 if an NPC target is set to a ground location, then automatically land them when they get there.
This doesn't help where the target is a prim surface.  In these situations, it might be better to provide manual overrides so the script can control whethre an avatar flys there/lands, etc.
2011-08-04 03:08:35 +01:00
Justin Clark-Casey (justincc) 54ce029342 if an NPC move to target is above the terrain then make it fly to destination 2011-08-04 02:31:40 +01:00
Justin Clark-Casey (justincc) c678b75d65 if a move to target is set underground, constrain it to the terrain height 2011-08-04 01:45:56 +01:00
Justin Clark-Casey (justincc) 61a931490d move bAllowUpdateMoveToPosition switch outside of HandleMoveToTargetUpdate() 2011-08-04 01:30:37 +01:00
Justin Clark-Casey (justincc) 831f933ce6 only call move target code in SP.HandleAgentUpdate() if we're actually in the process of moving to a position 2011-08-04 01:22:01 +01:00
Justin Clark-Casey (justincc) 7b2b47530e move reset code out of HandleMoveToTargetUpdate() so that we only call it where needed instead of passing in a flag 2011-08-04 01:16:24 +01:00
Justin Clark-Casey (justincc) fc64cc2439 Make SIGNIFICANT_MOVEMENT SP constant a top-level property so that other classes can use it. 2011-08-04 01:05:43 +01:00
Justin Clark-Casey (justincc) 7f6f100c5a When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the target, move it directly to the target.
This makes the movement exact.  Regression test changed to check avatar reaches exact target.
Also has the nice side effect of making NPC animations continue to work after the first movement (which wasn't working).  However, avatar still pauses in mid-stride
2011-08-04 01:00:33 +01:00
Justin Clark-Casey (justincc) ba0c65e028 extend npc move test to check a second movement 2011-08-04 00:25:51 +01:00
Justin Clark-Casey (justincc) 6f913e8caf eliminate pre-existing unused SP.StopMovement() 2011-08-04 00:13:27 +01:00
Justin Clark-Casey (justincc) a2f5b4ac9a Rename HandleMoveToPositionUpdate() to HandleMoveToTargetUpdate() for consistency. Improve method doc. 2011-08-04 00:10:53 +01:00
Justin Clark-Casey (justincc) 0299cb060e eliminate a reset position flag by using functionally equivalent DCFlagKeyPressed 2011-08-04 00:06:01 +01:00
Justin Clark-Casey (justincc) 6ab01b338f Stop calling the SP.ResetMoveToTarget() code if a target is not actually set 2011-08-03 23:59:13 +01:00
Justin Clark-Casey (justincc) 31fb6b2d72 remove move to duck walk compensation - no longer required.
extends npc move to regression test to check stop after sufficient sim updates
2011-08-03 23:40:05 +01:00
Justin Clark-Casey (justincc) a333c60f28 refactor: rename the move to position methods to move to target to be consistent with terminology used by scene object part and elsewhere 2011-08-03 22:34:05 +01:00
Justin Clark-Casey (justincc) 2964467708 get rid of vestigal move to parameters 2011-08-03 22:11:05 +01:00
Justin Clark-Casey (justincc) 6e4ec29722 Do a partial fix/implementation of OSSL osNpcMoveTo()
Avatar moves and stops.  However, will stop in mid stride.
And if the move to position is in the air, avatar will continue to make vain and quite hilarious attempts to take off (but never doing so).
Clearly more work is needed.
2011-08-03 04:19:19 +01:00
Justin Clark-Casey (justincc) 68a5fe0431 Improve z axis move to/autopilot so the avatar does alternative crouch/huzzah when walking along the ground
Moving a flying avatar to a ground point doesn't yet land the avatar.  This may or may not be the best thing
2011-08-03 02:59:49 +01:00
Justin Clark-Casey (justincc) 30e816bfa2 Implement move to/autopilot for z axis movement as well.
This is jerky (an artifact of the way it's being done, I think), but it's better than on implementation.
2011-08-03 02:04:38 +01:00
Justin Clark-Casey (justincc) 0c23764ce2 get autopilot/go here to work immediately.
This works with viewer 1.23.5 and so in theory should work with libopenmetaverse.
2011-08-03 01:12:32 +01:00
Justin Clark-Casey (justincc) 1c126e6e22 refactor: Move update_movement_flag and the final check inside the m_allowMovement if in HandleAgentUpdate() since it's logically only ever used there 2011-08-03 00:55:52 +01:00
Justin Clark-Casey (justincc) f9689f5cc9 refactor: move out code from HandleAgentUpdate() which processes updates to move to a set position
Also comment out the really spammy log message I accidentally left in on the last commit.
2011-08-03 00:46:46 +01:00
Justin Clark-Casey (justincc) c122489e09 Partially fix autopilot/go here
This now works again except that it requires a click or avatar mvmt to get going
This is because the ScenePresence.HandleAgentUpdate() method doesn't trigger until the client does something significant, at which point autopilot takes over.
Even clicking is enough to trigger.
This will be improved presently.
2011-08-02 23:41:12 +01:00
Justin Clark-Casey (justincc) b6ac1c46cd Get rid of AvatarAppearance.Owner to simplify the code.
This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned.
2011-08-02 00:13:04 +01:00
Justin Clark-Casey (justincc) 59f548cda8 Get osNpcCreate appearance working with avatars that are currently in the scene.
Had to stop using AvatarService for now since it doesn't store baked texture IDs (which is why this was failing).
Also failing because cloning appearance was also cloning the AvatarApperance.Owner field, which we weren't then changing.
Extended TestCreate() to check this.
2011-08-01 23:41:29 +01:00
Justin Clark-Casey (justincc) 22f25fae38 Hack around with the NPC module to get osNpcCreate() partially working again.
This now creates an avatar but appearance is always cloudy.
Move doesn't work.
Really, creating an NPC should only involve a ScenePresence rather than doing anything with IClientAPI, since an NPC has no viewer to communicate with!
2011-06-29 00:28:22 +01:00
Mic Bowman ad84728aba Add localID to physical object creation functions. 2011-06-15 11:31:32 -07:00
dahlia eaa33cf478 adjust avatar terse update packet filter distance error threshold based on avatar speed 2011-05-06 16:56:54 -07:00
Justin Clark-Casey (justincc) 04ecd748d9 remove further mono compiler warnings 2011-05-06 22:47:41 +01:00
Diva Canto 6c503e75ac Put the previous state back in the attachments in case the agent transfer fails. 2011-05-04 12:04:35 -07:00
dahlia 4c59d57596 use getters instead of member variables in velocity network filter code and add some more descriptive comments. 2011-05-04 03:29:06 -07:00
dahlia 13ab00e45a adjust terse avatar update filtering to send updates when distance traveled does not match expected distance, rather than at a fixed time period. this should smooth avatar motion somewhat when moving in a straight line and velocity is constant. 2011-05-03 19:47:50 -07:00
Diva Canto 00e94b0ba8 Check for RegionID instead of RegionHandle. Other minor tweaks 2011-04-30 16:53:11 -07:00
Diva Canto 4d5d6222f7 Delaying starting the scripts on TPs and crossings until the agent is root. 2011-04-29 17:09:48 -07:00
Diva Canto 0d49611f6d Remove the scripts of the attachments in the departing region and recreate them if fail. 2011-04-29 15:52:06 -07:00
Diva Canto 73caa4e94a Minor correction to yesterday's changes. Make normal prim crossing (no attach) work well again. 2011-04-29 08:42:51 -07:00
Diva Canto 9892e115cc Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. 2011-04-28 20:19:54 -07:00
dahlia 16f6f55f2d network traffic reduction - decrease update frequency for moving avatars when velocity is unchanged 2011-04-26 16:22:44 -07:00
Mic Bowman 77ab7ce084 Fixed the transmission of throttles from root agent to child
agents. Child throttles are based on the number of child agents
known to the root and at least 1/4 of the throttle given to
the root.
2011-04-25 15:11:29 -07:00
Justin Clark-Casey (justincc) 2b04cab1ee change some log messages from info to debug 2011-02-25 02:15:06 +00:00
Mic Bowman 5a16fa882c Parameterizes the view distance used to compute and manage
child agents in neighbor regions. This means you can extend
the view on a simulator beyond the default 3x3 regions.

This uses a region default draw distance and should be
replaced at some point by the avatar specified draw distance.
That will require more careful, dynamic recomputation of child
agents every time the draw distance changes.

WARNING: this is experimental and has known instabilities. specifically
all regions "within site" should be running the same default draw distance
or agents will not be closed correctly.
2011-02-22 13:23:54 -08:00
Justin Clark-Casey (justincc) dd9efc1838 extend TestChildAgentEstablished() test slightly to put in EntityTransferModule. Not yet enabled. 2011-02-18 23:05:56 +00:00
Justin Clark-Casey (justincc) e774679f62 minor: add method doc to a few ScenePresence methods 2011-02-18 21:19:16 +00:00
Justin Clark-Casey (justincc) 4725221435 Stop the avatar sometimes pausing for more than a second on the border when region crossing.
This restores a RemoveFromPhysicalScene() call in ScenePresence.CheckForBorderCrossing() when the agent has been placed in transit.
If we don't remove the agent from the physical scene, then the method continues to be called via ScenePresence.Update()
until the handover of the client between regions is completed.  Since this handover can take more than 1000ms (due to the 1000ms
event queue polling response from the server), this results in the avatar pausing on the border for the entire handover period.
2011-02-18 20:54:00 +00:00
Melanie d90b0c53ec Fix bumping into sim borders and check estate bans for walking crossings 2011-01-28 02:38:14 +00:00
Melanie 17801bd78b Add a TeleportFlags member to SP so we can tell how we got there. 2011-01-27 05:33:46 +00:00
Diva Canto a07375a7ae Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2011-01-17 17:41:06 -08:00
Diva Canto c98d1cffe2 Removed the call to sceneViewer.Reset upon MakeRoot and ChildAgentUpdate, because Reset hangs for a long time waiting for the lock. That is a problem in itself -- that long holding of the lock by some thread -- but let's just avoid it altogether. 2011-01-17 17:40:48 -08:00
Justin Clark-Casey (justincc) 3083c517a0 minor: resolve some mono compiler warnings 2011-01-18 00:29:10 +00:00
Justin Clark-Casey (justincc) c544f0d0c5 Prune some of the excess logging for client logins.
Didn't touch the appearance related stuff.
2011-01-18 00:25:24 +00:00
Diva Canto 4bcee1dfb4 Revert "DEBUG DEBUG DEBUG"
This reverts commit 59c2cd04ba.
2011-01-17 13:07:02 -08:00
Diva Canto 59c2cd04ba DEBUG DEBUG DEBUG 2011-01-17 12:35:19 -08:00
Diva Canto fbde9b1136 Note to self: try to make only 3 things at the same time. 2011-01-04 11:33:15 -08:00
Diva Canto db55859125 Guard against null Animator. 2011-01-04 11:30:08 -08:00
Diva Canto c082254b9d Put the coarse location updates back to 50 frames, otherwise the dots on the mini-map come and go noticeably. Also increased the Velocity a bit; I had decreased it to 0.885; now it's 0.9. 2010-12-19 19:29:07 -08:00
Diva Canto ed26376ec5 Yet more things out of the main Update thread loop and into threadlets. This time, SendPrimsUpdate. Plus a few more tweaks on triggering actions from the Update loop. #LoginLag. 2010-12-14 20:15:26 -08:00
Diva Canto e3262ef5ac Commented out the UpdateLand call from the Update thread loop, because this may be causing the #LoginLag. Attachments taint the prim count. Twice. Each. 2010-12-14 17:50:37 -08:00
Melanie e47cc10674 Null checking ParentGroup is not needed. It can't be null. 2010-12-14 12:07:35 +00:00
Diva Canto b41164b620 This seems to get rid of the stuck PREJUMP animation, as reported by Justin in -dev. Also in this commit, a slight adjustment to the Velocity of SP -- this makes the avie walking feel less jerky for me. Will wait reports from others. 2010-12-13 21:35:40 -08:00