Commit Graph

236 Commits (30d8506bc2f04028c1bbdcf57cf5f45fedb3ae7a)

Author SHA1 Message Date
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) cce760dbfc Rather than having a FromFolderID property on every single prim and only ever using the root prim one, store on SOG instead.
This reduces pointless memory usage.
2012-04-07 00:40:55 +01:00
Justin Clark-Casey (justincc) 7d8bb33c5b Store FromItemID for attachments once on SOG instead of on every SOP and only ever using the root part entry.
This eliminates some pointless memory use.
2012-04-07 00:33:02 +01:00
Justin Clark-Casey (justincc) 7468299673 Eliminate race condition where many callers would check SOP.PhysicsActor != null then assume it was still not null in later code.
Another thread could come and turn off physics for a part (null PhysicsActor) at any point.
Had to turn off localCopy on warp3D CoreModules section in prebuild.xml since on current nant this copies all DLLs in bin/ which can be a very large number with compiled DLLs
No obvious reason for doing that copy - nothing else does it.
2012-04-03 05:51:38 +01:00
Justin Clark-Casey (justincc) 32a953fed7 refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part. 2012-03-31 01:52:06 +01:00
Justin Clark-Casey (justincc) f0406f9fe2 Rename SOG.HasChildPrim(uint) to SOG.ContainsPart(uint) to match existing ContainsPart method and remove method duplication.
HasChildPrim is also misleading since the 'root' prim can also be returned.
2012-03-31 01:45:37 +01:00
Justin Clark-Casey (justincc) a4b01ef38a Replace script-lines-per-second with the script execution time scaled by its measurement period and an idealised frame time.
The previous lines-per-second measurement used for top scripts report was inaccurate, since lines executed does not reflect time taken to execute.
Also, every fetch of the report would reset all the numbers limiting its usefulness and we weren't even guaranteed to see the top 100.
The actual measurement value should be script execution time per frame but XEngine does not work this way.
Therefore, we use actual script execution time scaled by the measurement period and an idealised frame time.
This is still not ideal but gives reasonable results and allows scripts to be compared.
This commit moves script execution time calculations from SceneGraph into IScriptModule implementations.
2012-03-16 00:34:30 +00:00
PixelTomsen 4486b7d8e8 Fix: Object owned by the group does not return to the last owner http://opensimulator.org/mantis/view.php?id=5404 2012-02-16 03:35:18 +00:00
Justin Clark-Casey (justincc) dfa19e23f0 Stop a scene object from attempting to link with itself (which results in an exception and constant complaints in v3 viewers).
Aims to address http://opensimulator.org/mantis/view.php?id=5878
2012-02-08 22:19:34 +00:00
Justin Clark-Casey (justincc) c87751a822 Add start GC memory and end GC memory to object stress test printouts.
This illustrates that references to Scene, SOG, etc. are not currently being released when a stress test ends (or at regression test end in general).
This means even the current stress tests take much more memory than they need, a problem that will have to be addressed.
2012-02-07 23:03:53 +00:00
BlueWall 4e11983c7c Make configuration uniform
Pickup the max physical prim size in Scene to make it uniform since adding code to get default size from the OpenSim*.ini.
2012-02-05 12:38:20 -05:00
Justin Clark-Casey (justincc) ab89adfaef Implement "show object uuid <uuid>" console command.
This will show details about a part with the given uuid if it's found.
2012-01-31 23:03:39 +00:00
Justin Clark-Casey (justincc) 154ba0124a Add experimental --publish option to "save oar" so that OARs reloaded to the same grid don't have the publisher as owner. 2012-01-28 02:21:41 +00:00
Mic Bowman e1a2c44ebe Cleaned up the LookAt code in SOP and SOG. Added support for incrementally
rotating physical objects. This does not use physics. Currently the rate
of change is determined as 1 / (PI * Strength).
2012-01-13 14:48:56 -08:00
Mic Bowman f394cb2e8f fix the UsesPhysics flag to reference the physics flag rather than the temponrez flag 2011-12-22 16:21:32 -08:00
Justin Clark-Casey (justincc) f7dbdba447 Remove unused m_physicalPrim parameter from SOG.ApplyPhysics() 2011-12-22 19:52:09 +00:00
Justin Clark-Casey (justincc) f9137c923b Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object.
There were two problems here:
1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service.  This fails to groups created newly in that session
2) On object group update, we weren't setting the HasGroupChanged flag.  This meant that the change was not persisted unless some other action set this flag.
This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588
This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file
2011-12-17 02:23:24 +00:00
Justin Clark-Casey (justincc) 1bf05fbb1f refactor: simplify methods in Scene.PacketHandlers.cs by using GetGroupByPrim() rather than retrieving GetEntities() and inspecting the entire list 2011-12-17 00:11:17 +00: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
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