Commit Graph

2749 Commits (a086adf4271a014334529cd6ea3ee24b75c9195d)

Author SHA1 Message Date
Justin Clark-Casey (justincc) e6d0dcd4e8 Fix bug where crossing to a neighbouring region and back again would trigger an exception, and a second recross would stop the user moving until relog
Also fixes an issue where sitting avatar counts became inaccurate after any cross.
Part of the problem was due to cloning code using MemberwiseClone() but not resetting certain collection structures.
Adds regression test for this case.
In relation to http://opensimulator.org/mantis/view.php?id=7050
2014-04-03 00:19:53 +01:00
Oren Hurvitz 0301c81b01 Made GetScenePresence() case-insensitive when searching by user name. This makes it easier to use console commands such as "show appearance". 2014-04-02 13:08:31 +01:00
Justin Clark-Casey (justincc) 7bafee28fa Removing warning from SceneObjectLinkingTests.TestLinkDelink2SceneObjects() by actually checking whether delinked grp3 is not null 2014-04-02 01:26:58 +01:00
Justin Clark-Casey (justincc) 7cb1690589 minor: disable logging in recently added scene object crossing tests and remove some unnecessary test config 2014-04-02 01:01:53 +01:00
Justin Clark-Casey (justincc) 0af8886400 Fix problem where moving an object to another region on the same simulator was failing, with the object returning to its original position.
Root cause was that PrimLimitsModule was not properly handling the case where the parcel it was asked to check was outside the current region's bounds.
If this is the case, we can abort the check since the receiving region will perform it.
Added a regression test for this case.
2014-04-02 00:58:33 +01:00
Oren Hurvitz 1fe504fee5 Better skipping of "SculptData" when parsing XML 2014-03-28 12:52:06 +03:00
Oren Hurvitz f360b687d6 Removed "SculptData" from the serialized XML format of prims 2014-03-28 07:51:21 +01:00
Justin Clark-Casey (justincc) 99308d64c6 minor: Add some doc to Scene.Backup() detailing its direct invocation if the indepedent backup thread is not running (e.g. in a regression test) 2014-03-26 00:43:17 +00:00
Oren Hurvitz e131e73652 Run slow operations in a separate thread, instead of using FireAndForget (which has a 1-minute timeout)
Resolves http://opensimulator.org/mantis/view.php?id=6945
2014-03-25 08:01:55 +01:00
Oren Hurvitz 1769e93c42 Fixed parsing of coalesced objects if the XML starts with an XML Declaration ("<xml ...>")
Resolves http://opensimulator.org/mantis/view.php?id=6944
2014-03-24 18:18:29 +01:00
Oren Hurvitz 5fd9411143 Refactored Load IAR: created a generic mechanism to modify the SOG's as they are being loaded
Resolves http://opensimulator.org/mantis/view.php?id=6942
2014-03-24 18:17:35 +01:00
Oren Hurvitz 89945f8829 Refactored: ExternalRepresentationUtils should be the only place where the "CreatorData" field is calculated, to ensure uniformity
Resolves http://opensimulator.org/mantis/view.php?id=6933
2014-03-24 18:00:59 +01:00
Oren Hurvitz 7496d0b0f7 Fixed unit tests for delinking objects 2014-03-24 15:05:39 +02:00
Oren Hurvitz 921f0052f4 Get the full viewer name even if it's (incorrectly) sent in the 'Channel' field
Recent versions of Firestorm and Singularity have started sending the viewer name in the 'Channel' field, leaving only their version number in the 'Viewer' field. So we need to search both of these fields for the viewer name.

This resolves http://opensimulator.org/mantis/view.php?id=6952
2014-03-24 12:26:52 +01:00
Oren Hurvitz 773ffcafc3 Removed "hacktastic" code that is no longer needed.
We no longer set the object's AbsolutePosition in this place, so the IsAttachment hack doesn't do anything anymore.

This resolves http://opensimulator.org/mantis/view.php?id=6936
2014-03-24 12:05:25 +01:00
Oren Hurvitz 62b3bdf0fc When linking two groups, and then deleting the combined group: delete *all* of the combined group's prims, including those that came from the second subgroup
This fixes http://opensimulator.org/mantis/view.php?id=6175
2014-03-24 11:44:48 +01:00
Justin Clark-Casey (justincc) ccf18fd2ef Rename SOG.InSceneBackup to CanBeBackedUp to reflect its actual functionality.
It does not indicate that a SOG has been set to be backed up or not.  It indicates that a SOG can be backed up in principle.
In practice, this was added by lbsa71 in 2007 and is set to always true, albeit as a virtual property.
2014-03-22 01:36:21 +00:00
Justin Clark-Casey (justincc) a5800f479e If an object has it's temporary flag unset after being set, put it back in the persistence list.
Effectively uses the patch in http://opensimulator.org/mantis/view.php?id=7060
But also adds a regression test and exposes the necessary property to allow this to work.
2014-03-22 00:29:13 +00:00
Jak Daniels 61353dde80 Allow Region specific static maptiles to be loaded from file. 2014-03-18 22:18:50 -07:00
Robert Adams 742f505440 Change terrain update sending to be triggered by frame tick rather
than everytime terrain is changed.

The TerrainModule now hooks the frame event and, if terrain has changed,
sends terrain updates to the clients. This polling pattern replaces
the previous push on change pattern and will make it easier to do per
client throttling and per scene presence terrain update ordering.
2014-03-10 22:05:18 -07:00
Oren Hurvitz 0237d9113d Don't start KeyframeMotion timers until all the regions are ready. This prevents problems in megaregions (prims that think they've crossed over to other regions). 2014-03-11 00:55:58 +00:00
Justin Clark-Casey (justincc) 39ed382ddf Don't request a terse update after local teleport - this will be done by the main frame loop anyway and has the potential to race that thread. 2014-03-05 00:59:27 +00:00
Justin Clark-Casey (justincc) c9415fd763 If an avatar is sitting, send out position updates to clients for any change, not just those outside the usual tolerances.
This is to allow small adjustments of less than 0.05m in functions such as llSetPrimitiveLinkParams() to work
This is another fix for http://opensimulator.org/mantis/view.php?id=7044
Extends regression test for this case.
2014-03-05 00:38:38 +00:00
Robert Adams 0f03c64a0c Make Scene.DefaultDrawDistance to be the max of the region size and the
user setting. Seems this parameter has many side effects.
2014-02-23 21:56:37 -08:00
Robert Adams 0b213af675 Fix problem of hurricane speed winds. Thanks Vegaslon. 2014-02-22 15:04:28 -08:00
dahlia a2866b85f3 add newRegion parameter to CrossAgentToNewRegion event and trigger the event after crossing thread is invoked 2014-02-20 00:18:28 -08:00
dahlia 269a6410a0 add EventManager event OnCrossAgentToNewRegion 2014-02-19 17:52:38 -08:00
Robert Adams c26f01ff8c varregion: make scene default draw distance to be the maximum size of the
region. This is a temp fix for the use of draw distance to compute child
regions. Eventually must use the draw distance from the viewer for the
computation.
2014-02-19 09:51:49 -08:00
Robert Adams fc9930e420 Repair check for if in region position (I mean || is kinda like &&). 2014-02-15 18:49:40 -08:00
Robert Adams 7fc289c039 Properly restore position on crossing failure for mega-regions.
Fix odd "cannot cross into banned parcel" viewer error message when crossing
into non-existant region. Proper permission failure messages are now returned.
2014-02-15 17:02:53 -08:00
Robert Adams 877bdcdce1 Rewrite of mega-region code to use new form of border checking.
This commit eliminates all of the 'border' class and list code and replaces
it with testing if in the current region.
Impacts: can make a mega-region out of varregions of the same size; and
mega-region combinations must be rectangular (not square but rectangular)
2014-02-15 16:01:43 -08:00
Justin Clark-Casey (justincc) 4fed301e65 Don't request group information in SP.MakeRootAgent() if the presence belongs to no group (UUID.Zero)
This was trigger the XmlRpcGroups errors described in http://opensimulator.org/mantis/view.php?id=6986
Introduced in commit 5b73b9c4 (Wed Dec 11 01:39:56 2013)
2014-02-14 23:43:07 +00:00
Robert Adams c0cc5e0fa4 varregion: Send large region patches for wind and clouds. 2014-02-11 21:07:55 -08:00
Robert Adams 1b41ec0a85 Fix raw32 terrain heightmap reader so it estimates terrain size from
the size of the input stream. This is required since the raw heightmap
format (.r32) does not contain any size information.
The estimation relies on terrain being square.
2014-02-03 21:23:32 -08:00
Robert Adams 9c97fb8e12 Implement terrain merging in TerrainChannel.
Modify archiver to use terrain merging when loading oars.
This makes displacement AND rotation properly work on terrain when loading oars.
Especially useful when loading legacy region oars into large varregions.
2014-02-02 11:17:49 -08:00
Oren Hurvitz abb193ec94 In UuidGatherer, gather materials referenced in the prim's TextureEntry
Signed-off-by: dahlia <dahlia@nomail>
2014-02-01 02:56:15 -08:00
Robert Adams 8eec717f5f Merge branch 'master' into varregion 2014-01-28 08:50:28 -08:00
Justin Clark-Casey (justincc) a4017ee1eb Reinsert attachments list taking code in SP.MakeRootAgent()
Locking attachments then launching script instances on a separate thread will not work, attachments will simply be unlocked and vulnerable to race conditions.
2014-01-27 23:47:43 +00:00
Justin Clark-Casey (justincc) 1b86239f79 refactor: Remove identical part.ParentGroup.AddAvatar(UUID); calls which occur no matter which branch of the conditional is executed 2014-01-27 23:17:09 +00:00
Robert Adams 4c362a83f9 Merge branch 'master' into varregion 2014-01-21 11:31:51 -08:00
dahlia 7bd42fc42f Add back code to UuidGatherer to retrieve UUIDs for materials stored in DynAttrs. This is unfortunately still necessary until a better solution for handling existing legacy materials can be implemented 2014-01-20 15:01:18 -08:00
Justin Clark-Casey (justincc) 2cf7478b9a Merge branch 'justincc-master' 2014-01-20 19:34:55 +00:00
Justin Clark-Casey (justincc) 8e72b53edc Stop exceptions being generated on agent connection if a telehub object has been deleted or has no spawn points. 2014-01-20 19:16:19 +00:00
Oren Hurvitz 3018b2c5d7 Materials module: a) Store materials as assets; b) Finalized it (removed the "Demo" label; removed most of the logging); c) Enabled by default
Changed UuidGatherer to use 'sbyte' to identify assets instead of 'AssetType'. This lets UuidGatherer handle Materials, which are defined in a different enum from 'AssetType'.
2014-01-20 00:38:42 -08:00
Robert Adams f127e4b4ee Merge branch 'master' into varregion 2014-01-19 07:38:53 -08:00
Justin Clark-Casey (justincc) 4fa843ff19 Reorder checks in SP.CompleteMovement() to fix test failures 2014-01-16 23:44:17 +00:00
Justin Clark-Casey (justincc) f467121c51 Merge branch 'justincc-master' 2014-01-16 23:33:30 +00:00
Justin Clark-Casey (justincc) 3bc669ffc7 Actually put IsChildAgent = true inside the lock, otherwise there is still a small window for race conditions on duplicate CompleteMovement calls 2014-01-16 23:31:50 +00:00
Justin Clark-Casey (justincc) 3ffd90496a Prevent duplicate invocations or race dontision in SP.CompleteMovement()
This can happen under poor network conditions if a viewer repeats the message send
If this happens, physics actors can get orphaned, which unecessarily raises physics frame times
2014-01-16 20:23:31 +00:00
Justin Clark-Casey (justincc) 1a8b56fa87 Merge branch 'justincc-master' 2014-01-16 00:33:04 +00:00
Justin Clark-Casey (justincc) e99a7d879e Remove old IInterRegionComms and references. This hasn't been used since 2009 and was superseded by ISimulationService 2014-01-16 00:05:04 +00:00
Robert Adams 3760d10cd0 varregion: remove unnecessary border checking code in ScenePresence. 2014-01-11 21:59:22 -08:00
Robert Adams 1cf17a3cf7 Merge branch 'master' into varregion
Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/SceneBase.cs
	OpenSim/Services/Interfaces/IGridService.cs
	OpenSim/Services/LLLoginService/LLLoginResponse.cs
(conflicts were debug statements that are commented out in master branch)
2014-01-11 08:52:23 -08:00
Justin Clark-Casey (justincc) 68cbccb288 Merge branch 'justincc-master' 2014-01-10 20:37:14 +00:00
Oren Hurvitz da47bcae3e When moving the root prim of an attachment: a) Change the attach position; b) Move the other prims in the reverse direction to compensate 2014-01-10 20:24:11 +00:00
Justin Clark-Casey (justincc) 5e72de1908 Merge branch 'justincc-master' 2014-01-10 20:19:38 +00:00
Oren Hurvitz 91fd9c4670 Refactored: use a single function to apply an object's folded permissions to its main permissions 2014-01-10 19:50:03 +00:00
Oren Hurvitz 13f31fdf85 Refactored setting permissions when rezzing items: use the same function when rezzing from user inventory and prim inventory.
Also, fixed a bug: when rezzing a coalesced object from a prim's inventory, apply the coalesced object's name and description only to the first sub-object; not to all the objects in the coalescence. (This was already done correctly when rezzing from a user's inventory.)
2014-01-10 19:37:59 +00:00
Justin Clark-Casey (justincc) 32e9c16957 Merge branch 'justincc-master' 2014-01-08 01:04:26 +00:00
Justin Clark-Casey (justincc) 0155d42b80 If an agent is sitting, then do send the rotation in the agent update instead of zeroing it to resolve mouselook camera problems
Addresses http://opensimulator.org/mantis/view.php?id=6892
Thanks to tglion for this spot.
This resolves a recent regression from 17b32b764a
2014-01-08 00:54:39 +00:00
Robert Adams 38148bd4b6 Some missing definitions needed for successful compilation. 2014-01-04 19:01:05 -08:00
Robert Adams 7e32313a49 varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent).
Have Simian grid service return the region size.
Many teleport related debug log messages. Can be removed when teleport
works (like that's ever going to happen).

Conflicts:

	OpenSim/Framework/RegionInfo.cs
2014-01-04 19:01:04 -08:00
Robert Adams 9984ecf862 varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent).
Have Simian grid service return the region size.
Many teleport related debug log messages. Can be removed when teleport
works (like that's ever going to happen).
2014-01-03 07:41:06 -08:00
Robert Adams 01c0bbf181 varregion: extract banned region logic into a class for cleanlyness.
Add 'not found' caching in EntityTransferModule.GetRegionContainingWorldLocation
so hitting borders and bad teleports do not continuiously hammer on the GridService.
2013-12-27 08:23:37 -08:00
Robert Adams 2d2bea4aa7 varregion: many more updates removing the constant RegionSize and replacing
with a passed region size. This time in the map code and grid services code.
2013-12-26 22:45:59 -08:00
Robert Adams e5f7c8b6e8 varregion: add lots of DEBUG level log messages. Especially for teleport. 2013-12-24 12:31:26 -08:00
Robert Adams b40b57776b varregion: remove unused Scene.HaveNeighbor routine. Its computation
was wrong for large regions anyway.
2013-12-24 12:28:54 -08:00
Robert Adams 6937eec258 Merge branch 'master' into varregion
Add new region crossing code to varregion

Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2013-12-17 06:18:13 -08:00
Melanie fe01e7d1cc Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2013-12-16 22:11:03 +00:00
Melanie f69e91dc2d This is the acutal sitting avatar crossing code. This commit implements the
actual crossing mechanics for seated avatars, using the supporting code from
the previous commits. Physics is not supported yet, although some few bits
for them are already in place due to the earlier code drops. With this commit,
crossing sitting avatar by "editing" the prim across the border, by using
llSetPos or keyframe motion may already be possible. Vehicles will come next.
2013-12-16 22:08:02 +00:00
Robert Adams 13a9a4b653 varregion: rename 'LegacyRegionLocX' back to 'RegionLocX' and same for Y and Z.
Rename 'RegionWorldLocX' to 'WorldLocX' and same for Y and Z.
This keeps the downward compatibility and follows the scheme of 'region'
and 'world' location naming that is happening in the Util module.
2013-12-14 07:53:01 -08:00
Justin Clark-Casey (justincc) ee163b5751 Merge branch 'justincc-master' 2013-12-14 02:23:12 +00:00
Justin Clark-Casey (justincc) e7a294e739 Wrap analysis of the particle system in the UUID Gatherer in a separate try/catch as sometimes it appears that this can be corrupt.
As per Oren's suggestion.
2013-12-14 01:48:03 +00:00
Justin Clark-Casey (justincc) bcb8c4068e Comment out sit position checks in TestSitAndStandWithSitTarget() in SP and NPC tests until positions are known to be stable.
Also resolve issues with NoSitTarget() tests where I was trying to use a destroyed PhysActor
2013-12-14 00:36:25 +00:00
Justin Clark-Casey (justincc) d2d4ae541b Fix build break in test from previous commit 54cc229 - hadn't realized ScenePresence inst var name was slightly different 2013-12-14 00:19:04 +00:00
Justin Clark-Casey (justincc) 54cc229768 Fix TestSitAndStandWithNoSitTarget NPC and SP tests.
These stopped working because current code calculates sit heights based on avatar physics rather than appearance data.
Also changed BasicPhysics to not divide Z param of all set sizes by 2 - there's no obvious good reason for this and basicphysics is only used in tests
2013-12-14 00:10:32 +00:00
Justin Clark-Casey (justincc) 11f177d6a8 Eliminate unnecessary line from my previous commit 1d605642 2013-12-13 23:30:08 +00:00
Justin Clark-Casey (justincc) 1d605642f7 Refix sitting on child prims by reinserting relevant code back into SP.HandleAgentSit() 2013-12-11 23:59:52 +00:00
Melanie 5b73b9c4a8 Committing the Avination Scene Presence and related texture code
- Parts of region crossing code
- New bakes handling code
- Bakes now sent from sim to sim without central storage
- Appearance handling changes
- Some changes to sitting
- A number of unrelated fixes and improvements
2013-12-11 01:39:56 +00:00
Robert Adams 4eb52eb19e Merge branch 'master' into varregion 2013-12-05 21:07:44 -08:00
Justin Clark-Casey (justincc) 17b32b764a Fix regression where mouse look flight direction no longer worked by zeroing x/y rot before sending agent updates, instead of before any agent update processing
It turns out that the x/y rot data in mouselook is needed to implement this and to push the avatar against the ground if walking in mouselook.
Doing this in the terse send so that we preserve mouselook rotation information
2013-12-05 02:10:46 +00:00
Justin Clark-Casey (justincc) 62a2d7836f Ignore X and Y body rotations when sent by mouse look.
Fixes http://opensimulator.org/mantis/view.php?id=3274
When not in mouselook, avatar only sends rotations around the Z plane (since that's the only way an avatar can rotate).
However, in mouselook it also sends X and Y information.  But sending X and Y in terse updates causes issues with wrong camera movement in mouselook.
So strip out X and Y components for now.  If this is an issue, then could strip out before sending avatar terse update, though this generates more cpu work.
Thanks to mirceakitsune for suggesting an initial fix
2013-12-03 02:27:40 +00:00
Robert Adams 31bacfbb63 Merge branch 'master' into varregion 2013-12-01 15:51:42 -08:00
Robert Adams 6cd0d7a62b varregion: Add MaxRegionSize constant and enforce in RegionInfo.
Intermediate checkin of changing border cross computation from checking
boundry limits to requests to GridService. Not totally functional.
2013-11-30 15:28:39 -08:00
Justin Clark-Casey (justincc) 8ebad90800 Actually use the SP.AgentControlStopSlowWhilstMoving parameter intoroduced for slow walk/run in 4cfe02a rather than the magic number 2013-11-30 01:56:46 +00:00
Justin Clark-Casey (justincc) 96018afab4 Remove unused SP.Updated flag, which appears unused for many years and was only set true once and never reset 2013-11-30 01:52:45 +00:00
Justin Clark-Casey (justincc) 4cde02a2a3 Implement most effects of AGENT_CONTROL_STOP
AGENT_CONTROL_STOP is specified to SP.HandleAgentUpdate if the user holds down the space bar on a viewer.
For a stopped avatar, this prevents fly or walk/run (though not rotate) until released.
For a walking/running avatar, this reduces movement to half speed.
For a flying avatar, this stops the avatar.
These are observed behaviours on the LL grid - there was no previous OpenSimulator implementation
This commit introduces an optional parameter to SP.AddNewMovement(), which means that it will no longer compile on .NET 3.5 or earlier versions of Mono than 2.8
Currently, this does not work for jumping, and if used whilst flying the avatar continues the fly animation even though it does not move
2013-11-30 01:44:30 +00:00
Justin Clark-Casey (justincc) 4bd4f1cd83 Remove nudgehack from SP.HandleAgentUpdate by making MovementFlag a uint rather than a byte 2013-11-30 01:14:12 +00:00
Justin Clark-Casey (justincc) 5f0e763062 Remove unused sp.ParentPosition, which has not been used for some time 2013-11-29 02:48:59 +00:00
Justin Clark-Casey (justincc) 84bfde3bdf Comment out debug sit message accidently left active 2013-11-29 02:45:14 +00:00
Justin Clark-Casey (justincc) 868c0c2746 Fix regression where sitting on ground stopped working.
This was due to the PhysicsActor no longer being recreated on stand from ground.
2013-11-29 01:56:49 +00:00
Justin Clark-Casey (justincc) f9193e3c51 Restore SP.AbsolutePosition to properly return actual absolute position when sitting 2013-11-29 01:50:12 +00:00
Robert Adams 109136c074 varregion: add ITerrainChannel.GetHeightAtXYZ() for eventual mesh terrain.
Implementation of same in TerrainChannel.cs.
Check for bounds in TerrainChannel[x,y] to prevent array access exceptions.
2013-11-28 08:22:41 -08:00
Robert Adams 7aa00632b9 varregion: many replacements of in-place arithmetic with calls to
the Util functions for converting world addresses to region addresses
and converting region handles to locations.
2013-11-28 08:20:16 -08:00
Justin Clark-Casey (justincc) 0785210e29 Fix stand positions rather than having the stand jump to the root prim. 2013-11-27 02:08:22 +00:00
Justin Clark-Casey (justincc) a3c72dafe6 Only translate linked prim specified offset pos by the link prim rotation, not any specified avatar rotation as well.
Don't translate root prim position by avatar rotation.
2013-11-26 01:40:55 +00:00
Justin Clark-Casey (justincc) 36d146bf27 fix position changes when sitting on a prim with position and/or orientation explicitly specified 2013-11-26 00:43:35 +00:00
Justin Clark-Casey (justincc) 65304260af fix avatar rotation when sitting on a linked part
Need to take into account rotation of linked prim now that we are always specifying sits wrt the root prim
2013-11-23 02:09:03 +00:00
Justin Clark-Casey (justincc) 78649eb099 Refix fix for sitting on non-root linked prims with explicit sit targets.
I forgot that m_post is being set inconsistently between non-explicit and explicit ragets
2013-11-23 01:35:08 +00:00
Justin Clark-Casey (justincc) 70e651a8d1 Fix non-root prim sit positions for prims where a sit target has been specified as well. 2013-11-23 01:32:29 +00:00
Justin Clark-Casey (justincc) ed1029712a Add line accidentally left out of recent non-root prim sit fix
Original commit is ff4e7de7
2013-11-23 01:18:07 +00:00
Justin Clark-Casey (justincc) ff4e7de776 Fix issue where sitting on non-root linked prims would send camera to wrong position in third-person and mouselook
We now specify sits as offsets from the root prim, as the viewer expects.
2013-11-23 00:53:09 +00:00
Robert Adams 604b39cea9 Merge branch 'master' into varregion 2013-11-15 14:56:13 -08:00
Justin Clark-Casey (justincc) 7cab41f422 refactor: replace verbose checks with String.IsNullOrEmpty where applicable.
Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
2013-11-15 21:45:08 +00:00
Robert Adams d67236c09d Merge branch 'master' into varregion 2013-11-13 16:10:25 -08:00
Justin Clark-Casey (justincc) 7da10850b0 Fix bug where removing a physical linkset would only decrement the Active Objects statistic by 1 instead of by the number of prims removed.
Unlike LL, OpenSimulator currently uses this stat to record the number of prims in the physics simulation, even when they are at rest.
Added regression test for this case.
2013-11-13 23:25:54 +00:00
Robert Adams beeec1c467 varregion: elimination of Constants.RegionSize from all over OpenSimulator.
Routines in Util to compute region world coordinates from region coordinates
as well as the conversion to and from region handles. These routines have
replaced a lot of math scattered throughout the simulator.
Should be no functional changes.
2013-11-08 20:53:37 -08:00
Robert Adams cd1a23fc14 varregion: remove uses of region size constant. In particular, update scene
to check for border crossings based on the size of the region.
2013-11-04 22:09:52 -08:00
Robert Adams 9bf363e9be varregion: send the proper terrain patch layer code for large terrain.
Code cleanups.
2013-11-03 08:14:51 -08:00
Robert Adams ff5885ab23 varregion: push TerrainData implementation up and down the database storage stack.
Implement both LoadTerrain and StoreTerrain for all DBs.
Move all database blob serialization/deserialization into TerrainData.
2013-11-01 11:35:31 -07:00
Robert Adams 39777db8ef varregion: fix problem of X/Y dimensions swapped and incorrect terrain
compression base computation.
Complete replacement of float[] for terrain heightmap with TerrainData instance.
2013-10-31 09:24:06 -07:00
Robert Adams 2be0347f50 Merge branch 'master' into varregion 2013-10-28 09:30:26 -07:00
Oren Hurvitz 0094971186 After finishing to edit an attachment, let other avatars see the changes. (The changes weren't visible before because updates to attachments aren't sent while the attachment is selected.) 2013-10-17 23:10:16 +01:00
Robert Adams 8937a2244d Merge branch 'master' into varregion 2013-10-16 07:53:44 -07:00
Robert Adams 97bc5263de varregion: move the compressed heighmap compression factor from
Constants into TerrainData.
Save compression factor with the terrain blob in the database.
2013-10-16 07:52:30 -07:00
Oren Hurvitz d0c1780839 Fixed rezzing coalesced objects from a prim's inventory
Previously only the first object in the Coalesced Object was rezzed. Now all the objects are rezzed.
2013-10-15 23:59:16 +01:00
Robert Adams 7416809077 varregion: plug in TerrainData class and modify TerrainModule and LLClientView to use same. This passes a terrain info class around rather than passing a one dimensional array thus allowing variable regions. Update the database storage for variable region sizes. This should be downward compatible (same format for 256x256 regions). 2013-10-07 13:57:40 -07:00
Robert Adams 25ae59b9eb varregion: remove scattered use of Constants.RegionSize by having routines reference RegionInfo.RegionWorldLoc?. 2013-10-07 13:57:30 -07:00
Robert Adams 9b150194f6 varregion: add new TerrainData and TerrainCompressor routines. TerrainCompressor needed to replace the one in libopenmetaverse that doesn't know about the larger terrain packets. 2013-10-07 13:57:16 -07:00
Robert Adams 8c1d80fdfd varregion: serious rework of TerrainChannel:
-- addition of varaible region size in X and Y
    -- internal storage of heightmap changed from double[] to short[]
    -- helper routines for handling internal structure while keeping existing API
    -- to and from XML that adds region size information (for downward compatibility,
        output in the legacy XML format if X and Y are 256)
Updated and commented Constants.RegionSize but didn't change the name for compatibility.
2013-09-28 07:33:56 -07:00
Robert Adams 317c04fe17 VarRegion: change RegionInfo storage of region coordinates from region
count number to integer world coordinates.
Added new methods RegionWorldLoc[XY].
Refactored name of 'RegionLoc*' to 'LegacyRegionLoc*' throughout OpenSim.
Kept old 'RegionLoc*' entrypoint to RegionInfo for downward compatability
of external region management packages.
2013-09-28 07:33:52 -07:00
Justin Clark-Casey (justincc) 8996ac1a9c minor: Disable logging left active on regression test TestSameSimulatorIsolatedRegionsV2() 2013-09-27 22:33:42 +01:00
Justin Clark-Casey (justincc) 2cd95fac73 refactor: Rename Scene.AddNewClient() to AddNewAgent() to make it obvious in the code that this is symmetric with CloseAgent() 2013-09-27 22:27:39 +01:00
Justin Clark-Casey (justincc) b16bc7b01c refactor: rename Scene.IncomingCloseAgent() to CloseAgent() in order to make it clear that all non-clientstack callers should be using this rather than RemoveClient() in order to step through the ScenePresence state machine properly.
Adds IScene.CloseAgent() to replace RemoveClient()
2013-09-27 19:14:21 +01:00
Justin Clark-Casey (justincc) 253f8de8cd minor: Add scene name to baked textures in cache log message 2013-09-26 00:33:50 +01:00
Justin Clark-Casey (justincc) 32ddfc2740 Reinsert client.SceneAgent checks into LLUDPServer.HandleCompleteMovementIntoRegion() to fix race condition regression in commit 7dbc93c (Wed Sep 18 21:41:51 2013 +0100)
This check is necessary to close a race condition where the CompleteAgentMovement processing could proceed when the UseCircuitCode thread had added the client to the client manager but before the ScenePresence had registered to process the CompleteAgentMovement message.
This is most probably why the message appeared to get lost on a proportion of entity transfers.
A better long term solution may be to set the IClientAPI.SceneAgent property before the client is added to the manager.
2013-09-25 18:45:56 +01:00
Aleric Inglewood 2dc92e7de1 Preserve attachment point & position when attachment is rezzed in world
Patch taken from
http://opensimulator.org/mantis/view.php?id=4905
originally by Greg C.

Fixed to apply to r/23314 commit
ba9daf849e
(cherry picked from commit 4ff9fbca441110cc2b93edc7286e0e9339e61cbe)
2013-09-22 21:10:01 -05:00
Justin Clark-Casey (justincc) c01db5fbdd Lock around read/write of ScenePresence.m_originRegionID to make sure that all threads are seeing the latest value and not a cached one.
There is a possibilty that some V2 teleport failures are due to the viewer triggered CompleteMovement thread not seeing the change of m_originRegionID by the UpdateAgent thread.
2013-09-20 22:41:53 +01:00
Justin Clark-Casey (justincc) c6dea6ee78 Change some message log levels in Scene.IncomingUpdateChildAgent() for debugging purposes 2013-09-20 20:19:44 +01:00
Oren Hurvitz f1267730ef UUID Gatherer: find assets used in Light Projection, Particle Systems, and Collision Sounds. 2013-09-19 23:01:06 +01:00
Justin Clark-Casey (justincc) 979b17165b For debug purposes, allow simulators to force use of earlier SIMULATION/0.1 teleport protocol even if SIMULATION/0.2 is available.
This is specified in the MaxOutgoingTransferVersion attribute of [EntityTransfer] in OpenSim.ini, see OpenSimDefaults.ini for more details.
Default remains "SIMULATION/0.2"
Primarily for http://opensimulator.org/mantis/view.php?id=6755
2013-09-19 22:45:50 +01:00
Justin Clark-Casey (justincc) b6f10780c2 minor: Make SP.MakeRootAgent() private - no external code has any business calling this method 2013-09-19 21:44:30 +01:00
Justin Clark-Casey (justincc) 03b2b5b77b minor: Make log message at top of ScenePresence.CompleteMovement info level and comment out later log message in ScenePresence.MakeRootAgent()
Need an info message since this is currently important in detecting teleport issue when not at debug log level.
CompleteMovement message occurs before MakeRootAgent() one did
2013-09-19 20:59:27 +01:00
Justin Clark-Casey (justincc) 3a9a8d2113 Revert "Also check user authorization if looking to upgrade from a child to a root agent."
This reverts commit c7ded0618c.
This proves not to be necessary - the necessary checks are already being done via QueryAccess() before cross or teleport
2013-09-19 20:26:26 +01:00
Justin Clark-Casey (justincc) 83c113896e Create regression TestCrossOnSameSimulatorNoRootDestPerm() to check that avatars are not allowed to cross into a neighbour where they are not authorized, even if a child agent was allowed. 2013-09-19 20:26:08 +01:00
Justin Clark-Casey (justincc) 8999f06025 minor: correct method name in comment 2013-09-18 23:13:31 +01:00
Justin Clark-Casey (justincc) ddcbd4bb7d refactor: rename *ChildAgentDataUpdate() methods to *UpdateChildAgent()
verb-noun is consistent with other similar methods
2013-09-18 23:09:38 +01:00
Justin Clark-Casey (justincc) 3ce46adb2a minor: Make log message when Scene.IncomingChildAgentDateUpdate() more explicit that there is a problem if it still finds the agent to be a child if the sender wanted to wait till it became root
Add some comments about the mssage sequence, though much more data is at
http://opensimulator.org/wiki/Teleports
2013-09-18 22:56:00 +01:00
Justin Clark-Casey (justincc) 2603a2891b Reinsert comments about possible race conditions when sending bulk inventory updates on non-flag clothing editing 2013-09-16 23:26:13 +01:00
Robert Adams 3dbf4a1002 BulletSim: remove chatty debug message from previous commit. 2013-09-11 09:12:09 -07:00
Robert Adams e0b457d3c3 BulletSim: add position and rotation update for child prim physics update events. Normally, physics engines do not return updates for child prims so, under normal operation, this code should never execute. Will only be used when using flexible linkset linkages. 2013-09-11 09:12:07 -07:00
Robert Adams b05cb3b2bf Change collision logic in SceneObjectPart so land_collision will happen.
The previous logic would generate land_collision_start and land_collision_end
but would not generate the land_collision itself.
2013-09-09 14:50:33 -07:00
Diva Canto 04619a9b13 Restore group membership check for HG users in QueryAccess. 2013-09-05 07:44:27 -07:00
Justin Clark-Casey (justincc) c7ded0618c Also check user authorization if looking to upgrade from a child to a root agent.
Relevant if a child agent has been allowed into the region which should not be upgraded to a root agent.
2013-09-04 00:44:17 +01:00
Justin Clark-Casey (justincc) 5f0d54c209 For a Hypergrid user, delay estate access checks until NewUserConnection() so that they work.
This is necessary because the hypergrid groups checks (as referenced by estates) require an agent circuit to be present to construct the hypergrid ID.
However, this is not around until Scene.NewUserConnection(), as called by CreateAgent() in EntityTransferModule.
Therefore, if we're dealing with a hypergrid user, delay the check until NewUserConnection()/CreateAgent()
The entity transfer impact should be minimal since CreateAgent() is the next significant call after NewUserConnection()
However, to preserve the accuracy of query access we will only relax the check for HG users.
2013-09-04 00:42:23 +01:00
Justin Clark-Casey (justincc) 857f24a5e2 Fix bug where users teleporting to non-neighbour regions could continue to hear chat from their source region for some time after teleport completion.
This occurs on v2 teleport since the source region now waits 15 secs before closing the old child agent, which could still receive chat.
This commit introduces a ScenePresenceState.PreClose which is set before the wait, so that ChatModule can check for ScenePresenceState.Running.
This was theoretically also an issue on v1 teleport but since the pause before close was only 2 secs there, it was not noticed.
2013-09-02 19:15:10 +01:00
Justin Clark-Casey (justincc) 5ce5ce6edb Comment out warning about agent updating without valid session ID for now.
This causes extreme console spam if a simulator running latest master and one running 0.7.5 have adjacent regions occupied by avatars.
2013-09-02 17:45:38 +01:00
Diva Canto f0c0376660 Potential fix for access control bug on login introduced with SeeIntoRegion commit. 2013-08-24 08:42:41 -07:00
Justin Clark-Casey (justincc) 61c20bd06a Remove old and unused ScenePresence.RestoreInCurrentScene() 2013-08-23 00:53:42 +01:00
Justin Clark-Casey (justincc) 065c5839b5 Refactor: merge SceneGraph.AddScenePresence() into CreateAndAddChildScenePresence() since the former was only ever called from the latter
This allows us to remove dead code relating to adding root agents directly to the scenegraph, which never happens.
2013-08-23 00:49:13 +01:00