Commit Graph

217 Commits (5c4056660fe7678315716e52cfe57da0ba448efe)

Author SHA1 Message Date
Dan Lake f43e5f92fd Just adding a comment to SendFullUpdatToClient 2011-12-13 23:34:59 -08: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
Dan Lake 9359293b11 Cleaned UpdatePermissions calls on SOP and SOG to eliminate redundant properties packet sends and so one part is not telling a different part what to do. That should be up to the SOG to manage permissions on its parts and notify clients when one of them changes. 2011-11-10 15:20:21 -08:00
Dan Lake f3fea81936 Merge branch 'master' of git://opensimulator.org/git/opensim 2011-11-10 14:09:53 -08:00
Dan Lake 18c625bda6 When updating SOG, a physics taint should not override a full update with a terse update 2011-11-10 14:09:35 -08:00
Justin Clark-Casey (justincc) 4f6915bad5 minor: Correct misleading method doc on SOG.UpdateRootRotation() 2011-11-09 21:49:08 +00:00
Melanie c7dd7b13a2 Convert SendKillObject to take a list of uint rather than sending one
packet per prim. More to come as we change to make use of this.
2011-11-06 20:38:07 +00:00
nebadon e3885625a0 Don't rotate child prims, if only the root prim is rotated. 2011-11-05 02:26:25 -07:00
Melanie c803ed28c3 Replacing te linking code with the code from Avination. Link sets prims are now
numbered properly even when sets are linked to sets.
2011-11-05 00:09:37 +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 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) 61e97ee4c8 Remove completely unused SOG.Rotation parameter
We always use SOP.Rotation instead
2011-10-29 00:39:01 +01:00
Justin Clark-Casey (justincc) c2da1c4580 set grp.RootPart.GroupPosition for code consistency (and readability) rather than calling SOP.OffsetForNewRegion 2011-10-28 23:43:31 +01:00
Justin Clark-Casey (justincc) 9bf8c3e7b7 Add missing doc to rotation/position methods in SOG 2011-10-28 23:38:57 +01:00
Justin Clark-Casey (justincc) 5ddefc2564 remove now redundant m_physical_prim flag from SOP.ApplyPhysics() 2011-10-15 02:47:27 +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
Snoopy Pfeffer 2b2580e3a1 Fix for rezzing and derezzing HUDs (see Mantis #5406). From now on updates are only sent to affected clients. 2011-09-25 00:51:43 +02: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) de19dc3024 refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to reflect what it actually does
This also makes it consistent with some other methods that send data to the client.
2011-09-15 18:58:58 +01:00
Justin Clark-Casey (justincc) 26b471f25a Go back to resetting the State parameter for all parts of a SOG when SOG.ClearPartAttachmentData() is called.
Even though we don't use these on rez they are still present after an unlink, after which selecting them causes various viewers to crash
Hopefully really does address http://opensimulator.org/mantis/view.php?id=5664
2011-09-02 22:28:27 +01:00
Justin Clark-Casey (justincc) 7eca929686 Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01 02:11:00 +01:00
Justin Clark-Casey (justincc) a90e1cf3aa add Name property to ISceneEntity 2011-08-30 22:39:16 +01:00
Justin Clark-Casey (justincc) 1615e7d29f Eliminate duplicate AttachmentPoint properties by always using the one stored in the root part's state field. 2011-08-27 00:33:24 +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) 15a514fcbc refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
2011-08-26 23:06:41 +01:00
Justin Clark-Casey (justincc) 5f3ffc195f refactor: move SOG.DetachToGround() to AttachmentsModule.DetachSceneObjectToGround() and remove redundant code 2011-08-26 22:49:11 +01:00
Justin Clark-Casey (justincc) 002313bf13 refactor: move sog.DetachToInventoryPrep() into AttachmentsModule.DetachSingleAttachmentToInv() 2011-08-26 22:02:23 +01:00
Justin Clark-Casey (justincc) 6d4432f440 refactor: simplify EntityBase.IsDeleted property 2011-08-24 22:34:26 +01:00
Justin Clark-Casey (justincc) 9ba4511d3e add SOG helper properties IsPhantom, IsTemporary, etc. to improve code readability
use these in some sog methods
2011-08-24 21:53:12 +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) ba89fc3aa1 Add regression test for setting phantom status on a scene object. This is not yet complete. 2011-08-05 23:42: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) 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) bc3679b67d Fix undo when changing just the root prim's position in a linkset.
I think (ha ha) this largely fixes undo, except for the fact that rotation a set of prims with 'edit linked parts' selected doesn't quite work properly (though this works fine if the checkbox isn't selected).
Also, the double undo bug for resize is still present.
Redo might be incredibly buggy, haven't even looked at that yet.
2011-07-19 05:46:17 +01:00
Justin Clark-Casey (justincc) 0ef29da9b2 refactor: rename UpdatePrimPosition() to UpdatePrimGroupPosition() for consistency 2011-07-19 05:20:04 +01:00
Justin Clark-Casey (justincc) 62325829ec comment out all kinds of debugging guff 2011-07-19 05:14:58 +01:00
Justin Clark-Casey (justincc) 1fdb16f1cd Fix undo for rotation of the root prim in a linkset on its own.
The only obviously broken things right now are the undo of the position of just a root prim (stays in place) and the fact that resizes need two undoes.
2011-07-19 05:05:50 +01:00
Justin Clark-Casey (justincc) b2722e984a Fix undo of rotation of single prims in a linkset 2011-07-19 04:40:02 +01:00
Justin Clark-Casey (justincc) 97f1edfd95 Fix undo of prim group rotation.
This isn't that great since I think I broke it a few commits earlier.
Undo of rotation of individual prims in a linkset is still broken
2011-07-19 04:15:27 +01:00
Justin Clark-Casey (justincc) c94dc95844 fix undo when resizing of non-root individual prims in a linkset
undo resize, rotation and position still needs fixing when only editing root prim of a linkset
2011-07-19 03:27:16 +01:00
Justin Clark-Casey (justincc) 430a4aeba8 Fix undo for resizing linksets
This involves implementing a boolean in UndoState to signal whether the undo needs to be done for an entire group/linkset or just a single prim
Resizing individual components of linksets is still dodgy.
Resizing still has to be down twice, since for some reason the client is sending two multiobjectupdate packets on every resize except the very first.  This applies to single prims and linksets.  Need to look into this.
2011-07-19 03:01:54 +01:00
Justin Clark-Casey (justincc) 6fc74b36d1 Make various tweaks to undo code in an effort to get things working better.
Undo rotation and position appear to be working.
Resizing a single prim appears to be working, though the undo has to be done twice.
Resizing a group of prims still does not work properly - possibly because in the UndoState we don't store a knowledge of when we're resizing a whole group rather than individual prims.
This needs to be addressed.
2011-07-18 04:54:21 +01:00
Justin Clark-Casey (justincc) f5ddf37112 Replace ifs in SOG.GroupResize() with Math.Min()
Also fiddle a bit with undo.  This is not currently working properly, though to be fair it also didn't appear to work in 0.7.1.1 either (at least for resize).
Will get some more attention soon.
2011-07-16 05:23:21 +01:00
Justin Clark-Casey (justincc) 9a80adf33a remove now unncessary parts of SceneObjectGroup.Resize() 2011-07-16 04:49:21 +01:00
Justin Clark-Casey (justincc) 2b68ac4ba3 refactor: Push all part resize code down into SceneObjectPart.Resize() 2011-07-16 04:22:57 +01:00
Justin Clark-Casey (justincc) df2a59d31b refactor: make SceneObjectGroup.GroupScale() a property rather than a mehod 2011-07-16 03:30:14 +01:00
Justin Clark-Casey (justincc) 982e71b6b8 eliminate unused and redundant SceneObjectGroup.AssetReceived() 2011-07-16 03:08:28 +01:00
Justin Clark-Casey (justincc) c82f19e41c fix build break from last commit 2011-07-16 03:06:30 +01:00