Commit Graph

425 Commits (bd01c4a5cb40a2df02e9a3a9aee3db0829795f05)

Author SHA1 Message Date
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